Class QuestMenuCommand
java.lang.Object
com.storytimeproductions.stweaks.commands.QuestMenuCommand
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
Handles the "/questmenu" command to open a graphical quest menu interface for players. This menu
displays available quests, quest completion statistics, and access to a QuestBook.
-
Constructor Summary
ConstructorsConstructorDescriptionQuestMenuCommand
(QuestsManager questsManager) Constructs the command executor with a reference to the QuestsManager. -
Method Summary
Modifier and TypeMethodDescriptionboolean
onCommand
(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args) Executes the /quests command.void
openQuestViewMenu
(org.bukkit.entity.Player player, Quest quest, int page) Opens a detailed view of a specific quest for the player.
-
Constructor Details
-
QuestMenuCommand
Constructs the command executor with a reference to the QuestsManager.- Parameters:
questsManager
- the quests manager used to retrieve quest data
-
-
Method Details
-
onCommand
public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, String label, String[] args) Executes the /quests command. Only players can use this command.- Specified by:
onCommand
in interfaceorg.bukkit.command.CommandExecutor
- Parameters:
sender
- the source of the commandcommand
- the command that was executedlabel
- the alias of the commandargs
- the arguments passed with the command- Returns:
- true if the command was processed successfully, false otherwise
-
openQuestViewMenu
Opens a detailed view of a specific quest for the player.- Parameters:
player
- the player who will see the quest detailsquest
- the quest to be displayed
-