Class SurvivalRewardManager
java.lang.Object
com.storytimeproductions.stweaks.managers.SurvivalRewardManager
- All Implemented Interfaces:
org.bukkit.event.Listener
Gives portal-unlocked players the StoryTime Guide (slot 3) and Threshold Key (slot 5) when they
enter the survival world, and handles right-click interactions for both items.
Portal-unlock state is read directly from EDEN's per-player YAML so that STweaks has no compile-time dependency on the EDEN plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionSurvivalRewardManager(Stweaks plugin) Constructs a new SurvivalRewardManager. -
Method Summary
Modifier and TypeMethodDescriptionvoidonInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) Handles clicks inside the StoryTime guide menu GUI.voidonInventoryDrag(org.bukkit.event.inventory.InventoryDragEvent event) Prevents dragging items inside the StoryTime guide menu GUI.voidonPlayerChangedWorld(org.bukkit.event.player.PlayerChangedWorldEvent event) Gives items when entering the lobby, removes them when leaving.voidonPlayerDrop(org.bukkit.event.player.PlayerDropItemEvent event) Prevents players from dropping the Guide Book or Threshold Key.voidonPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event) Handles right-clicking the Guide Book (opens menu) and Threshold Key (returns to lobby).voidonPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Gives items to portal-unlocked players who join (they are auto-sent to the lobby).
-
Constructor Details
-
SurvivalRewardManager
Constructs a new SurvivalRewardManager.- Parameters:
plugin- the Stweaks plugin instance
-
-
Method Details
-
onPlayerJoin
public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event) Gives items to portal-unlocked players who join (they are auto-sent to the lobby).- Parameters:
event- the join event
-
onPlayerChangedWorld
public void onPlayerChangedWorld(org.bukkit.event.player.PlayerChangedWorldEvent event) Gives items when entering the lobby, removes them when leaving.- Parameters:
event- the world-change event
-
onPlayerDrop
public void onPlayerDrop(org.bukkit.event.player.PlayerDropItemEvent event) Prevents players from dropping the Guide Book or Threshold Key.- Parameters:
event- the drop event
-
onPlayerInteract
public void onPlayerInteract(org.bukkit.event.player.PlayerInteractEvent event) Handles right-clicking the Guide Book (opens menu) and Threshold Key (returns to lobby).- Parameters:
event- the interact event
-
onInventoryClick
public void onInventoryClick(org.bukkit.event.inventory.InventoryClickEvent event) Handles clicks inside the StoryTime guide menu GUI.- Parameters:
event- the click event
-
onInventoryDrag
public void onInventoryDrag(org.bukkit.event.inventory.InventoryDragEvent event) Prevents dragging items inside the StoryTime guide menu GUI.- Parameters:
event- the drag event
-