Class: Australium::PlayerDisconnect

Inherits:
Event
  • Object
show all
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

Attributes inherited from Event

#raw

Instance Method Summary collapse

Methods inherited from Event

inherited, #to_s

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

#playerPlayer

Returns the Australium::Player who disconnected from the server.

Returns:



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