/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * [URL]http://www.gnu.org/copyleft/gpl.html[/URL] */ package net.sf.l2j.gameserver.handler.admincommandhandlers; import net.sf.l2j.Config; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.L2PcInstance; /** * This class handles following admin commands: * - admin = shows menu * * @version $Revision: 1.3.2.1.2.4 $ $Date: 2005/04/11 10:06:06 $ */ public class AdminDonor2 implements IAdminCommandHandler { private static String[] _adminCommands = {"admin_donor2"}; private static final int REQUIRED_LEVEL = Config.GM_DONOR2; public boolean useAdminCommand(String command, L2PcInstance activeChar) { if (!(checkLevel(activeChar.getAccessLevel()) && activeChar.isGM())) return false; if (command.equals("admin_donor2")) { AdminHelpPage.showHelpPage(activeChar, "donorroom.htm"); } return true; } public String[] getAdminCommandList() { return _adminCommands; } private boolean checkLevel(int level) { return (level >= REQUIRED_LEVEL); } }