package commands.admin;
import l2p.extensions.scripts.ScriptFile;
import l2p.gameserver.handler.AdminCommandHandler;
import l2p.gameserver.handler.IAdminCommandHandler;
import l2p.gameserver.model.L2Player;
import l2p.gameserver.serverpackets.NpcHtmlMessage;
public class AdminEvents implements IAdminCommandHandler, ScriptFile
{
private static enum Commands
{
admin_events
}
public boolean useAdminCommand(Enum comm, String[] wordList, String fullString, L2Player activeChar)
{
Commands command = (Commands) comm;
if(!activeChar.getPlayerAccess().IsEventGm)
{
return false;
}
switch(command)
{
case admin_events:
if(wordList.length == 1)
{
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/events/events.htm"));
}
else
{
activeChar.sendPacket(new NpcHtmlMessage(5).setFile("data/html/admin/events/" + wordList[1].trim()));
}
break;
}
return true;
}
public Enum[] getAdminCommandEnum()
{
return Commands.values();
}
public void onLoad()
{
AdminCommandHandler.getInstance().registerAdminCommandHandler(this);
}
public void onReload()
{
}
public void onShutdown()
{
}
}