Class AdditionsEvent
java.lang.Object
net.gcnt.additionsplus.files.events.AdditionsEvent
Class that contains all information about a custom event that can be triggered from anywhere.
-
Constructor Summary
ConstructorDescriptionAdditionsEvent(String pluginName, String eventName, String author, String description)
-
Method Summary
Modifier and TypeMethodDescriptionaddPlaceholder(String arg0, String arg1)
Add a placeholder to the actions.static AdditionsEvent
fromString(String identifier)
Get a custom event from its identifier.Get the author of the custom eventGet the custom event descriptionGet the event name of the custom eventgetExtraOption(String optionIdentifier)
Get the extra option value of an identifierGet the list of extra event optionsGet the event identifier assigned by the plugin.Get the plugin name of the custom eventvoid
perform(org.bukkit.entity.Player arg0)
Perform the custom event.removePlaceholder(String arg0)
Remove a placeholder from the placeholder list.
-
Constructor Details
-
AdditionsEvent
-
-
Method Details
-
fromString
Get a custom event from its identifier.- Parameters:
identifier
- Identifier of the event.- Returns:
AdditionsEvent
when found, null if not.
-
getAuthor
Get the author of the custom event- Returns:
- Author name
-
getDescription
Get the custom event description- Returns:
- Description
-
getPluginName
Get the plugin name of the custom event- Returns:
- Plugin name
-
getEventName
Get the event name of the custom event- Returns:
- Event name
-
addPlaceholder
Add a placeholder to the actions. These will be replaced with the value that you specify.- Parameters:
arg0
- Placeholder to be replaced. This will be between percent characters (%%).arg1
- Value to be replaced.
-
removePlaceholder
Remove a placeholder from the placeholder list.- Parameters:
arg0
- Placeholder to be removed.
-
getIdentifier
Get the event identifier assigned by the plugin. Commonly, this is plugin-eventname- Returns:
- event identifier
-
getExtraOptions
Get the list of extra event options- Returns:
- HashMap with the string (identifier) and object (value)
-
getExtraOption
Get the extra option value of an identifier- Parameters:
optionIdentifier
- Option identifier- Returns:
- Object
-
perform
public void perform(org.bukkit.entity.Player arg0)Perform the custom event. Using this method will send the event to our plugin and lets AdditionsPlus handle the actions. A player needs to be specified.- Parameters:
arg0
- Player to perform the actions for.
-