Class: Australium::PlayerDisconnect
- Defined in:
- lib/australium/events/player_disconnect.rb
Constant Summary collapse
- LOG_REGEX =
/"(?<player>.+)" disconnected"/
Constants inherited from Event
Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX
Instance Attribute Summary collapse
-
#player ⇒ Player
The Player who disconnected from the server.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayerDisconnect
constructor
A new instance of PlayerDisconnect.
Methods inherited from Event
Constructor Details
#initialize(data) ⇒ PlayerDisconnect
Returns a new instance of PlayerDisconnect.
9 10 11 12 |
# File 'lib/australium/events/player_disconnect.rb', line 9 def initialize(data) super(data) state.players.delete(player) unless state.nil? end |
Instance Attribute Details
#player ⇒ Player
Returns the Australium::Player who disconnected from the server.
9 10 11 12 |
# File 'lib/australium/events/player_disconnect.rb', line 9 def initialize(data) super(data) state.players.delete(player) unless state.nil? end |