Class: Australium::Trigger

Inherits:
Event
  • Object
show all
Defined in:
lib/australium/events/trigger.rb

Overview

A Trigger Event is a very general Event. Triggers occur on point capture, round end, even damage and healing with plugins installed. Depending on the kind of trigger, it could involve one player, two players, or no players at all (in the case of ‘World’ triggering an event, such as a round end).

Constant Summary collapse

LOG_REGEX =
/: "?(?<initiator>.*(World|>))"? triggered "(?<action>[^"]+)"(?: against "(?<target>.+>)")?/

Constants inherited from Event

Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX

Instance Attribute Summary collapse

Attributes inherited from Event

#raw

Method Summary

Methods inherited from Event

inherited, #initialize, #to_s

Constructor Details

This class inherits a constructor from Australium::Event

Instance Attribute Details

#actionString

Returns the name of the triggered action.

Returns:

  • (String)

    the name of the triggered action.



# File 'lib/australium/events/trigger.rb', line 9

#initiatorPlayer, String

Returns the Player who triggered the event, or the string ‘World’.

Returns:

  • (Player, String)

    the Player who triggered the event, or the string ‘World’



# File 'lib/australium/events/trigger.rb', line 9

#targetPlayer, NilClass

Returns the Player who received the action, or nil if no Player received the action.

Returns:

  • (Player, NilClass)

    the Player who received the action, or nil if no Player received the action.



# File 'lib/australium/events/trigger.rb', line 9