Class PlayerSettingChangeEvent
java.lang.Object
org.bukkit.event.Event
us.teaminceptus.novaconomy.api.events.settings.SettingEvent
us.teaminceptus.novaconomy.api.events.player.PlayerSettingChangeEvent
Called when a Player changes their personal settings
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlayerSettingChangeEvent(@NotNull Player player, boolean oldValue, boolean newValue, Settings.Personal setting) Constructs a BusinessSettingChangeEvent. -
Method Summary
Modifier and TypeMethodDescriptionbooleanFetches the new value of the setting.booleanFetches the old value of the setting.@NotNull PlayerFetches the player involved in this event.Fetches the setting involved in this event.Methods inherited from class us.teaminceptus.novaconomy.api.events.settings.SettingEvent
getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerSettingChangeEvent
public PlayerSettingChangeEvent(@NotNull @NotNull Player player, boolean oldValue, boolean newValue, @NotNull Settings.Personal setting) throws IllegalArgumentException Constructs a BusinessSettingChangeEvent.- Parameters:
setting- Setting involvedplayer- Business involvedoldValue- Old value of the settingnewValue- New value of the setting- Throws:
IllegalArgumentException- if player or setting is null
-
-
Method Details
-
getPlayer
Fetches the player involved in this event.- Returns:
- Player involved
-
getOldValue
public boolean getOldValue()Fetches the old value of the setting.- Returns:
- Old value of the setting
-
getNewValue
public boolean getNewValue()Fetches the new value of the setting.- Returns:
- New value of the setting
-
getSetting
Description copied from class:SettingEventFetches the setting involved in this event.- Overrides:
getSettingin classSettingEvent- Returns:
Settings.NovaSettinginvolved
-