Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package handler.admincommands;
- import events.XmlDropEvent;
- import l2.gameserver.model.Player;
- /**
- * @author Trance
- */
- public class AdminReloadDrops extends ScriptAdminCommand
- {
- private enum Commands
- {
- admin_reload_drops
- }
- @Override
- public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, Player player)
- {
- final Commands command = (Commands) comm;
- if (!player.getPlayerAccess().CanEditChar)
- return false;
- if (command == Commands.admin_reload_drops)
- {
- XmlDropEvent.loadDrops(); // Reload the XML drop configuration
- if (XmlDropEvent.isEventEnabled())
- player.sendMessage("Drop configuration reloaded successfully.");
- else
- player.sendMessage("XML Drop Event is disabled in the configuration.");
- }
- return true;
- }
- @Override
- public Enum<?>[] getAdminCommandEnum()
- {
- return Commands.values();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement