All pastes #496077 Raw Edit

Mine

public java v1 · immutable
·published 2007-05-19 01:12 UTC
rendered paste body
package net.sf.l2j.gameserver.handler.admincommandhandlers;import net.sf.l2j.Config;import net.sf.l2j.gameserver.Announcements;import net.sf.l2j.gameserver.handler.IAdminCommandHandler;import net.sf.l2j.gameserver.model.L2World;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;public class AdminSt0rm implements IAdminCommandHandler {	/** 	 * Custom St0rm Commands	 */	private static String[] _adminCommands = {		"admin_irc",		"admin_forcevis"		};	private static final int REQUIRED_LEVEL = Config.GM_ACCESSLEVEL;	public String[] getAdminCommandList() {		// TODO Auto-generated method stub		return _adminCommands;	}	public boolean useAdminCommand(String command, L2PcInstance activeChar) {		// TODO Auto-generated method stub		if (activeChar.getAccessLevel() < REQUIRED_LEVEL) { return false; }		if (command.equalsIgnoreCase("admin_irc")) {			/**			 * Advertises IRC server and channel.			 */			new Announcements().handleAnnounce("Join our IRC server and Lineage II channel to have better access to your offline" +					"friends, the GMs, or information as the server is being worked on! For help joining see the forums, the server is" +					" " + Config.IRC_SERVER + " and channel " + Config.IRC_CHANNEL, 0);			return true;		}		else if (command.toLowerCase().startsWith("admin_forcevis ") && activeChar.getAccessLevel() >= 300) {			L2PcInstance target = L2World.getInstance().getPlayer(command.substring("admin_forcevis ".length()));			if (target == null || target.isVisible()) { activeChar.sendMessage("No such invisible player."); }			else {				target.getAppearance().setVisible();				target.sendMessage("Set player to visible status.");			}			return true;		}		return false;	}}