Thread: [PI] Adding My Control Panel to Your Server!

Page 1 of 31 12311 ... LastLast
Results 1 to 10 of 305
  1. #1 [PI] Adding My Control Panel to Your Server! 
    Donator

    Robgob69's Avatar
    Join Date
    Oct 2010
    Age
    33
    Posts
    749
    Thanks given
    71
    Thanks received
    139
    Rep Power
    117
    So people have been asking for it, tho many of you don't like it.. I am releasing my control panel to you all. Remember i just converted this from my allstar source to PI so if you have any errors please post them here.

    NOTE: If you don't know how to fix common compile errors(cannot fine symbol - 100 Errors crap) this is not for you
    you will at least have to know what you are doing to get this in.

    What you're adding:


    Spoiler for Pictures:











    First off in your util folder: server.util
    add these 2 classes:
    ControlPanel.java
    Spoiler for 1:

    Code:
    package server.util;
    
    import server.Config;
    
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.RenderedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    
    public class ControlPanel extends JFrame {
    
    	private static final long serialVersionUID = 1L;
    
    	public ControlPanel(boolean visible) {
    		PANEL_ACTIVE = visible;
    		initComponents();
    	}
    
    	public void addEntity(String name) {
    		if(PANEL_ACTIVE)
    			this.LIST_MODEL.addElement(name);
    	}
    	public void removeEntity(String name) {
    		if(PANEL_ACTIVE)
    			this.LIST_MODEL.removeElement(name);
    	}
    
    	private PanelSettings settings = null;
    
    	public PanelSettings settings() {
    		return settings;
    	}
    
    	@SuppressWarnings("serial")
    	public void initComponents() {
    
    		if (!PANEL_ACTIVE) {
    			System.out.println("[Console]: Control Panel disabled.");
    			return;
    		}
    		settings = new PanelSettings(this);
    		LIST_MODEL = new DefaultListModel();
    		LIST_NPCS = new DefaultListModel();
    		buttonGroup1 = new ButtonGroup();
    		CONTROL_TABS = new JTabbedPane();
    		PLAYER_PANEL = new JPanel();
    		PLAYER_CONTROLS_TAB = new JTabbedPane();
    		PLAYER_CONTROLS = new JPanel();
    		MUTE_PLAYER = new JButton();
    		BAN_PLAYER = new JButton();
    		KICK_PLAYER = new JButton();
    		SEND_MESSAGE = new JButton();
    		IPBAN_PLAYER = new JButton();
    		IPMUTE_PLAYER = new JButton();
    		FORCE_NPC = new JButton();
    		PLAYER_EQUIPMENT = new JPanel();
    		ADD_ITEM = new JButton();
    		REMOVE_ITEM = new JButton();
    		EMPTY_INVENTORY = new JButton();
    		EMPTY_BANK = new JButton();
    		DROP_ITEM = new JButton();
    		UNEQUIP_ITEM = new JButton();
    		REMOVE_OBTAINED_ITEMS = new JButton();
    		DANGEROUS_COMMAND = new JLabel();
    		PLAYER_MISC = new JPanel();
    		jScrollPane1 = new JScrollPane();
    		FORCE_COMMANDS = new JList();
    		INIT_COMMAND = new JButton();
    		PLAYER_LOCATION = new JPanel();
    		jScrollPane2 = new JScrollPane();
    		TELEPORT_LIST = new JList();
    		TELEPORT_BUTTON = new JButton();
    		MAKE_NPC = new JButton();
    		UPDATE_PLAYERS = new JButton();
    		TELE_ALL = new JButton();
    		KICK_ALL = new JButton();
    		FORCE_CHAT = new JButton();
    		NPCS_PANEL = new JPanel();
    		FORCE_NPCS_CHAT_TEXT = new JTextField();
    		FORCE_NPC_CHAT_LABEL = new JLabel();
    		FORCE_NPC_CHAT_CMD = new JButton();
    		LABELBUTTON = new JLabel();
    		NPC_ANIMATION_TEXT = new JTextField();
    		NPC_ANIMATION_BUTTON = new JButton();
    		NPC_CHECKBOX = new JCheckBox();
    		jScrollPane3 = new JScrollPane();
    		NPC_OPTION_LIST = new JList(LIST_NPCS);
    		ADD_NPC_BUTTON = new JButton();
    		REMOVE_NPC_BUTTON1 = new JButton();
    		SERVER_PANEL = new JPanel();
    		SERVER_SETTINGS = new JTabbedPane();
    		SETTINGS_PANEL = new JPanel();
    		SERVER_NAME_LABEL = new JLabel();
    		SERVER_NAME_TEXT = new JTextField();
    		ADMINS_CAN_TRADE = new JCheckBox();
    		ADMINS_CAN_DROP = new JCheckBox();
    		ADMINS_CAN_SELL_ITEMS = new JCheckBox();
    		MINI_GAMES = new JCheckBox();
    		LOCK_EXPERIENCE = new JCheckBox();
    		DOUBLE_EXPERIENCE = new JCheckBox();
    		LOGOUT_BUTTON_LABEL = new JLabel();
    		LOGOUT_BUTTON_TEXT = new JTextField();
    		DEATH_MESSAGE_LABEL = new JLabel();
    		DEATH_MESSAGE_TEXT = new JTextField();
    		UPDATE_SETTINGS = new JButton();
    		SERVER_CONTROLS = new JPanel();
    		MESSAGE_ALL = new JLabel();
    		MESSAGE_ALL_TEXT = new JTextField();
    		MESSAGE_ALL_BUTTON = new JButton();
    		MESSAGE_ALL_BOX = new JComboBox();
    		MESSAGE_ALL_BOX.setEditable(true);
    		MESSAGE_ALL_BOX.setModel(new DefaultComboBoxModel(new String[] { "[Alert]", "[Update]", "[Server]", "[Robgob]", "[Control Panel]", "[Panel]", "[Console]", "[Prompt]", "[None]" }));
    		MESSAGE_ALL_BOX.setToolTipText("Choose a name that will show next to the message.");
    		MESSAGE_ALL_COLOR_BOX = new JComboBox();
    		MESSAGE_ALL_COLOR_BOX.setModel(new DefaultComboBoxModel(MESSAGE_COLOR));
    		MESSAGE_ALL_NAME_LABEL = new JLabel();
    		MESSAGE_ALL_NAME_LABEL.setText("Name:");
    		MESSAGE_ALL_COLOR_LABEL = new JLabel();
    		MESSAGE_ALL_COLOR_LABEL.setText("Color:");
    
    		UPDATE_SERVER_LABEL = new JLabel();
    		UPDATE_SERVER_TEXT = new JTextField();
    		UPDATE_TIME_LABEL = new JLabel();
    		UPDATE_SERVER_CMD = new JButton();
    
    		RESET_NPCS_LABEL = new JLabel();
    		RESET_NPCS_BUTTON = new JButton();
    
    		CLEAR_CONSOLE_LABEL = new JLabel();
    		CLEAR_CONSOLE_BUTTON = new JButton();
    
    		SERVER_CONSOLE_TAB = new JPanel();
    		if (PANEL_ACTIVE) {
    			SYSTEM_OUT =  new PrintStream(System.out) {
    				public void println(String x) {
    					SERVER_CONSOLE.append(x + "\n");
    					CONSOL_SCROLLER.getVerticalScrollBar().setValue(CONSOL_SCROLLER.getVerticalScrollBar().getMaximum());
    				}
    			};
    			System.setOut(SYSTEM_OUT);  
    		}
    		jScrollPane4 = new JScrollPane();
    		SERVER_CONSOLE = new JTextArea();
    		CONSOL_SCROLLER = new JScrollPane(SERVER_CONSOLE, 22, 31);
    		SCROLL_PANE = new JScrollPane();
    		ENTITY_LIST = new JList(LIST_MODEL);
    		MENU_BAR = new JMenuBar();
    		FILE_MENU = new JMenu();
    		DEBUG_MODE = new JCheckBoxMenuItem();
    		SEPARATOR_ITEM = new JPopupMenu.Separator();
    		EXIT_ITEM = new JMenuItem();
    
    		setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    		setTitle(Config.SERVER_NAME + " ControlPanel");
    		setBackground(new java.awt.Color(245, 244, 244));
    		setResizable(false);
    
    		PLAYER_CONTROLS_TAB.setToolTipText("Player Options");
    
    		MUTE_PLAYER.setText("Mute Player");
    		MUTE_PLAYER.setToolTipText("Mute a player so that they cannot speak.");
    		MUTE_PLAYER.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		BAN_PLAYER.setText("Ban Player");
    		BAN_PLAYER.setToolTipText("Ban a player.");
    		BAN_PLAYER.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		KICK_PLAYER.setText("Disconnect");
    		KICK_PLAYER.setToolTipText("Disconnect a player from the server.");
    		KICK_PLAYER.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		SEND_MESSAGE.setText("Send Message");
    		SEND_MESSAGE.setToolTipText("Send the lpayer a lovely message.");
    		SEND_MESSAGE.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		IPBAN_PLAYER.setText("IP-Ban");
    		IPBAN_PLAYER.setToolTipText("IP-Ban a player from ever connecting.");
    		IPBAN_PLAYER.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		IPMUTE_PLAYER.setText("IP-Mute");
    		IPMUTE_PLAYER.setToolTipText("IP-Mute a player so that any same connection cannot speak.");
    		IPMUTE_PLAYER.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		FORCE_NPC.setText("Make Npc");
    		FORCE_NPC.setToolTipText("Turn the player into a npc.");
    		FORCE_NPC.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		GroupLayout PLAYER_CONTROLSLayout = new GroupLayout(PLAYER_CONTROLS);
    		PLAYER_CONTROLS.setLayout(PLAYER_CONTROLSLayout);
    		PLAYER_CONTROLSLayout.setHorizontalGroup(
    			PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_CONTROLSLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
    					.addComponent(SEND_MESSAGE, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
    					.addGroup(GroupLayout.Alignment.LEADING, PLAYER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(BAN_PLAYER, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(IPBAN_PLAYER, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
    					.addGroup(GroupLayout.Alignment.LEADING, PLAYER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(MUTE_PLAYER, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(IPMUTE_PLAYER, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
    					.addGroup(GroupLayout.Alignment.LEADING, PLAYER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(KICK_PLAYER, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(FORCE_NPC, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE)))
    				.addContainerGap(11, Short.MAX_VALUE))
    		);
    		PLAYER_CONTROLSLayout.setVerticalGroup(
    			PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_CONTROLSLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(BAN_PLAYER, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(IPBAN_PLAYER, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(MUTE_PLAYER, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(IPMUTE_PLAYER, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(PLAYER_CONTROLSLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(KICK_PLAYER, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(FORCE_NPC, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
    				.addComponent(SEND_MESSAGE, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    				.addContainerGap())
    		);
    
    		PLAYER_CONTROLS_TAB.addTab("Main", PLAYER_CONTROLS);
    
    		ADD_ITEM.setText("Add Item");
    		ADD_ITEM.setToolTipText("Add an item to the players Inventory. (etc: 995, 1046, 1050, 4151)");
    		ADD_ITEM.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		REMOVE_ITEM.setText("Remove Item");
    		REMOVE_ITEM.setToolTipText("Remove an item from the players inventory.");
    		REMOVE_ITEM.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		EMPTY_INVENTORY.setText("Empty Inv.");
    		EMPTY_INVENTORY.setToolTipText("Delete ALL items in the players Inventory.");
    		EMPTY_INVENTORY.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		EMPTY_BANK.setText("Empty Bank");
    		EMPTY_BANK.setToolTipText("Delete ALL items from the players bank.");
    		EMPTY_BANK.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		DROP_ITEM.setText("Drop Item");
    		DROP_ITEM.setToolTipText("Force the player to drop an item.");
    		DROP_ITEM.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		UNEQUIP_ITEM.setText("Unequip Item");
    		UNEQUIP_ITEM.setToolTipText("Force the player to remove an item from their equipment slot.");
    		UNEQUIP_ITEM.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		REMOVE_OBTAINED_ITEMS.setText("Remove All Obtained Items");
    		REMOVE_OBTAINED_ITEMS.setToolTipText("Warning! This will delete ALL of the players items!!!!");
    		REMOVE_OBTAINED_ITEMS.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		DANGEROUS_COMMAND.setText("Warning! This will delete EVERYTHING!");
    
    		GroupLayout PLAYER_EQUIPMENTLayout = new GroupLayout(PLAYER_EQUIPMENT);
    		PLAYER_EQUIPMENT.setLayout(PLAYER_EQUIPMENTLayout);
    		PLAYER_EQUIPMENTLayout.setHorizontalGroup(
    			PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_EQUIPMENTLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addComponent(REMOVE_OBTAINED_ITEMS, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
    					.addGroup(PLAYER_EQUIPMENTLayout.createSequentialGroup()
    						.addComponent(ADD_ITEM, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(REMOVE_ITEM, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
    					.addGroup(PLAYER_EQUIPMENTLayout.createSequentialGroup()
    						.addComponent(EMPTY_INVENTORY, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(EMPTY_BANK, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
    					.addGroup(PLAYER_EQUIPMENTLayout.createSequentialGroup()
    						.addComponent(DROP_ITEM, GroupLayout.PREFERRED_SIZE, 103, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(UNEQUIP_ITEM, GroupLayout.PREFERRED_SIZE, 111, GroupLayout.PREFERRED_SIZE))
    					.addComponent(DANGEROUS_COMMAND))
    				.addContainerGap())
    		);
    		PLAYER_EQUIPMENTLayout.setVerticalGroup(
    			PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_EQUIPMENTLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(ADD_ITEM, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(REMOVE_ITEM, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(EMPTY_INVENTORY, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(EMPTY_BANK, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(PLAYER_EQUIPMENTLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    					.addComponent(DROP_ITEM, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    					.addComponent(UNEQUIP_ITEM, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(DANGEROUS_COMMAND)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
    				.addComponent(REMOVE_OBTAINED_ITEMS, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)
    				.addContainerGap())
    		);
    
    		PLAYER_CONTROLS_TAB.addTab("Equipment", PLAYER_EQUIPMENT);
    
    		FORCE_COMMANDS.setBackground(new java.awt.Color(254, 254, 254));
    		FORCE_COMMANDS.setBorder(BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    		FORCE_COMMANDS.setFont(new java.awt.Font("Tahoma", 0, 12));
    		FORCE_COMMANDS.setForeground(new java.awt.Color(153, 0, 51));
    		FORCE_COMMANDS.setModel(new AbstractListModel() {
    			String[] strings = { "Force Animation", "Display GFX", "Lock EXP", "Force Bank", "Force Shop", "Force Death", "Force Command", "Force Chat", "Give Master", "Add SkillXP", "Remove SkillXP", "Reset Skill", "Reset All Skills" };
    			public int getSize() { return strings.length; }
    			public Object getElementAt(int i) { return strings[i]; }
    		});
    		FORCE_COMMANDS.setToolTipText("Another list of commands you can force the player to perfoem.");
    		jScrollPane1.setViewportView(FORCE_COMMANDS);
    
    		INIT_COMMAND.setText("Initiate CMD");
    		INIT_COMMAND.setToolTipText("Initiates the selected comand.");
    		INIT_COMMAND.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		GroupLayout PLAYER_MISCLayout = new GroupLayout(PLAYER_MISC);
    		PLAYER_MISC.setLayout(PLAYER_MISCLayout);
    		PLAYER_MISCLayout.setHorizontalGroup(
    			PLAYER_MISCLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(GroupLayout.Alignment.TRAILING, PLAYER_MISCLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_MISCLayout.createParallelGroup(GroupLayout.Alignment.TRAILING)
    					.addComponent(INIT_COMMAND, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
    					.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE))
    				.addContainerGap())
    		);
    		PLAYER_MISCLayout.setVerticalGroup(
    			PLAYER_MISCLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_MISCLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 135, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    				.addComponent(INIT_COMMAND, GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
    				.addContainerGap())
    		);
    
    		PLAYER_CONTROLS_TAB.addTab("Misc", PLAYER_MISC);
    
    		TELEPORT_LIST.setBorder(BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    		TELEPORT_LIST.setForeground(new java.awt.Color(0, 51, 102));
    		TELEPORT_LIST.setModel(new AbstractListModel() {
    			public int getSize() {
    				return PANEL_TELEPORTS.length;
    			}
    			public Object getElementAt(int i) {
    				return PANEL_TELEPORTS[i];
    			}
    		});
    		jScrollPane2.setViewportView(TELEPORT_LIST);
    
    		TELEPORT_BUTTON.setText("Teleport Player");
    		TELEPORT_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		GroupLayout PLAYER_LOCATIONLayout = new GroupLayout(PLAYER_LOCATION);
    		PLAYER_LOCATION.setLayout(PLAYER_LOCATIONLayout);
    		PLAYER_LOCATIONLayout.setHorizontalGroup(
    			PLAYER_LOCATIONLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_LOCATIONLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(PLAYER_LOCATIONLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addComponent(TELEPORT_BUTTON, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
    					.addComponent(jScrollPane2, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE))
    				.addContainerGap())
    		);
    		PLAYER_LOCATIONLayout.setVerticalGroup(
    			PLAYER_LOCATIONLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_LOCATIONLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, 136, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(TELEPORT_BUTTON, GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE)
    				.addContainerGap())
    		);
    
    		PLAYER_CONTROLS_TAB.addTab("Location", PLAYER_LOCATION);
    
    		MAKE_NPC.setText("Players to Npcs");
    		MAKE_NPC.setToolTipText("Turn all of the players into Npcs.");
    		MAKE_NPC.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		UPDATE_PLAYERS.setText("Update Players");
    		UPDATE_PLAYERS.setToolTipText("Update the players to their origional look.");
    		UPDATE_PLAYERS.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		TELE_ALL.setText("Teleport All");
    		TELE_ALL.setToolTipText("Teleport all players to a set location.");
    		TELE_ALL.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		KICK_ALL.setText("Disconnect All");
    		KICK_ALL.setToolTipText("Disconnect all players from the server.");
    		KICK_ALL.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		FORCE_CHAT.setText("Force Chat");
    		FORCE_CHAT.setToolTipText("Force all players to say something.");
    		FORCE_CHAT.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		GroupLayout PLAYER_PANELLayout = new GroupLayout(PLAYER_PANEL);
    		PLAYER_PANEL.setLayout(PLAYER_PANELLayout);
    		PLAYER_PANELLayout.setHorizontalGroup(
    			PLAYER_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(PLAYER_CONTROLS_TAB, GroupLayout.PREFERRED_SIZE, 250, GroupLayout.PREFERRED_SIZE)
    				.addGap(18, 18, 18)
    				.addGroup(PLAYER_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addComponent(FORCE_CHAT, GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
    					.addComponent(KICK_ALL, GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
    					.addComponent(TELE_ALL, GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
    					.addComponent(UPDATE_PLAYERS, GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
    					.addComponent(MAKE_NPC, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    				.addGap(24, 24, 24))
    		);
    		PLAYER_PANELLayout.setVerticalGroup(
    			PLAYER_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(PLAYER_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(MAKE_NPC, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(UPDATE_PLAYERS, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(TELE_ALL, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(KICK_ALL, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(FORCE_CHAT, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE)
    				.addGap(47, 47, 47))
    			.addGroup(PLAYER_PANELLayout.createSequentialGroup()
    				.addComponent(PLAYER_CONTROLS_TAB)
    				.addGap(22, 22, 22))
    		);
    
    		CONTROL_TABS.addTab("Player", PLAYER_PANEL);
    
    		FORCE_NPCS_CHAT_TEXT.setText("I love you!");
    		FORCE_NPCS_CHAT_TEXT.setToolTipText("Enter a line of text you wish to have all npcs in game to say.");
    
    		FORCE_NPC_CHAT_LABEL.setText("Force Chat:");
    		FORCE_NPC_CHAT_LABEL.setToolTipText("Its just a label...");
    
    		FORCE_NPC_CHAT_CMD.setText("Send");
    		FORCE_NPC_CHAT_CMD.setToolTipText("Send the message.");
    		FORCE_NPC_CHAT_CMD.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    		LABELBUTTON.setText("Force Animation:");
    
    		NPC_ANIMATION_TEXT.setText("811");
    		NPC_ANIMATION_TEXT.setToolTipText("Enter the npc ID");
    
    		NPC_ANIMATION_BUTTON.setText("Animate");
    		NPC_ANIMATION_BUTTON.setToolTipText("Animate npc's");
    		NPC_ANIMATION_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		NPC_CHECKBOX.setText("Use Npc's from list");
    
    		NPC_OPTION_LIST.setBorder(BorderFactory.createLineBorder(new java.awt.Color(102, 0, 102)));
    		NPC_OPTION_LIST.setForeground(new java.awt.Color(153, 0, 153));
    		NPC_OPTION_LIST.setToolTipText("A list of Npc ID's to use for the following settings.");
    		jScrollPane3.setViewportView(NPC_OPTION_LIST);
    
    		ADD_NPC_BUTTON.setText("Add Npc");
    		ADD_NPC_BUTTON.setToolTipText("Add an Npc ID to the list.");
    		ADD_NPC_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		REMOVE_NPC_BUTTON1.setText("Remove Npc");
    		REMOVE_NPC_BUTTON1.setToolTipText("Remove an Npc ID from the list.");
    		REMOVE_NPC_BUTTON1.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		GroupLayout NPCS_PANELLayout = new GroupLayout(NPCS_PANEL);
    		NPCS_PANEL.setLayout(NPCS_PANELLayout);
    		NPCS_PANELLayout.setHorizontalGroup(
    			NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(GroupLayout.Alignment.TRAILING, NPCS_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(jScrollPane3, GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
    				.addGap(18, 18, 18)
    				.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addComponent(NPC_CHECKBOX)
    					.addComponent(LABELBUTTON)
    					.addGroup(NPCS_PANELLayout.createSequentialGroup()
    						.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    							.addGroup(NPCS_PANELLayout.createSequentialGroup()
    								.addGap(10, 10, 10)
    								.addComponent(FORCE_NPCS_CHAT_TEXT, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE))
    							.addComponent(FORCE_NPC_CHAT_LABEL))
    						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(FORCE_NPC_CHAT_CMD))
    					.addGroup(NPCS_PANELLayout.createSequentialGroup()
    						.addGap(15, 15, 15)
    						.addComponent(NPC_ANIMATION_TEXT, GroupLayout.PREFERRED_SIZE, 66, GroupLayout.PREFERRED_SIZE)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    						.addComponent(NPC_ANIMATION_BUTTON))
    					.addGroup(NPCS_PANELLayout.createSequentialGroup()
    						.addComponent(ADD_NPC_BUTTON, GroupLayout.PREFERRED_SIZE, 107, GroupLayout.PREFERRED_SIZE)
    						.addGap(18, 18, 18)
    						.addComponent(REMOVE_NPC_BUTTON1, GroupLayout.PREFERRED_SIZE, 107, GroupLayout.PREFERRED_SIZE)))
    				.addContainerGap())
    		);
    		NPCS_PANELLayout.setVerticalGroup(
    			NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(NPCS_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addGroup(NPCS_PANELLayout.createSequentialGroup()
    						.addComponent(jScrollPane3, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
    						.addContainerGap())
    					.addGroup(NPCS_PANELLayout.createSequentialGroup()
    						.addComponent(NPC_CHECKBOX)
    						.addGap(11, 11, 11)
    						.addComponent(FORCE_NPC_CHAT_LABEL)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    						.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    							.addComponent(FORCE_NPCS_CHAT_TEXT, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    							.addComponent(FORCE_NPC_CHAT_CMD))
    						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(LABELBUTTON)
    						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
    						.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    							.addComponent(NPC_ANIMATION_TEXT, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
    							.addComponent(NPC_ANIMATION_BUTTON))
    						.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 55, Short.MAX_VALUE)
    						.addGroup(NPCS_PANELLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
    							.addComponent(ADD_NPC_BUTTON, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
    							.addComponent(REMOVE_NPC_BUTTON1, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE))
    						.addGap(22, 22, 22))))
    		);
    
    		CONTROL_TABS.addTab("Npcs", NPCS_PANEL);
    
    		SERVER_NAME_LABEL.setText("Server Name:");
    
    		SERVER_NAME_TEXT.setText(Config.SERVER_NAME);
    		SERVER_NAME_TEXT.setToolTipText("Set the name of the server.");
    
    		ADMINS_CAN_TRADE.setSelected(Config.ADMIN_CAN_TRADE);
    		ADMINS_CAN_TRADE.setText("Admins can Trade");
    		ADMINS_CAN_TRADE.setToolTipText("Determins wether or not an admin can trade other players.");
    		
    		ADMINS_CAN_DROP.setText("Admins can Drop");
    		ADMINS_CAN_DROP.setSelected(Config.ADMIN_DROP_ITEMS);
    		ADMINS_CAN_DROP.setToolTipText("Determins if admins can drop an item.");
    
    		
    		ADMINS_CAN_SELL_ITEMS.setText("Admins can sell Items");
    		ADMINS_CAN_SELL_ITEMS.setSelected(Config.ADMIN_CAN_SELL_ITEMS);
    		ADMINS_CAN_SELL_ITEMS.setToolTipText("Determins if admins can sell items or not.");
    
    	
    		MINI_GAMES.setText("MiniGames Enabled");
    		MINI_GAMES.setSelected(Config.MINI_GAMES);
    		MINI_GAMES.setToolTipText("Determins wether or not if players can play games.");
    
    		LOCK_EXPERIENCE.setText("Lock Experience");
    		LOCK_EXPERIENCE.setSelected(Config.LOCK_EXPERIENCE);
    		LOCK_EXPERIENCE.setToolTipText("Determins if players can gain experience.");
    		
    		DOUBLE_EXPERIENCE.setText("Double Experience");
    		DOUBLE_EXPERIENCE.setSelected(Config.DOUBLE_EXP);
    		DOUBLE_EXPERIENCE.setToolTipText("Determins if players can duel one other.");
    		
    		LOGOUT_BUTTON_LABEL.setText("Logout Button Text:");
    
    		LOGOUT_BUTTON_TEXT.setText(Config.LOGOUT_MESSAGE);
    		LOGOUT_BUTTON_TEXT.setToolTipText("Set the text displayed on the logout button.");
    
    		DEATH_MESSAGE_LABEL.setText("Death Message:");
    
    		DEATH_MESSAGE_TEXT.setText(Config.DEATH_MESSAGE);
    		DEATH_MESSAGE_TEXT.setToolTipText("Set the message displayed on a players death.");
    
    		UPDATE_SETTINGS.setText("Update Settings");
    		UPDATE_SETTINGS.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		javax.swing.GroupLayout SETTINGS_PANELLayout = new javax.swing.GroupLayout(SETTINGS_PANEL);
    		SETTINGS_PANEL.setLayout(SETTINGS_PANELLayout);
    		SETTINGS_PANELLayout.setHorizontalGroup(
    			SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    			.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addComponent(ADMINS_CAN_SELL_ITEMS)
    					.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    						.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    							.addComponent(SERVER_NAME_LABEL)
    							.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    								.addGap(10, 10, 10)
    								.addComponent(SERVER_NAME_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
    							.addComponent(ADMINS_CAN_TRADE)
    							.addComponent(ADMINS_CAN_DROP)
    							.addComponent(LOCK_EXPERIENCE)
    							.addComponent(MINI_GAMES)
    							.addComponent(DOUBLE_EXPERIENCE))
    						.addGap(69, 69, 69)
    						.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    							.addComponent(DEATH_MESSAGE_LABEL)
    							.addComponent(LOGOUT_BUTTON_LABEL)
    							.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    								.addGap(10, 10, 10)
    								.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
    									.addComponent(LOGOUT_BUTTON_TEXT, javax.swing.GroupLayout.Alignment.LEADING)
    									.addComponent(DEATH_MESSAGE_TEXT, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
    									.addComponent(UPDATE_SETTINGS, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))))))
    				.addContainerGap())
    		);
    		SETTINGS_PANELLayout.setVerticalGroup(
    			SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    			.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    					.addComponent(SERVER_NAME_LABEL)
    					.addComponent(LOGOUT_BUTTON_LABEL))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    					.addComponent(SERVER_NAME_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    					.addComponent(LOGOUT_BUTTON_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    					.addComponent(ADMINS_CAN_TRADE)
    					.addComponent(DEATH_MESSAGE_LABEL))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    					.addComponent(ADMINS_CAN_DROP)
    					.addComponent(DEATH_MESSAGE_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    				.addComponent(ADMINS_CAN_SELL_ITEMS)
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(SETTINGS_PANELLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addGroup(SETTINGS_PANELLayout.createSequentialGroup()
    						.addComponent(MINI_GAMES)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(LOCK_EXPERIENCE)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(DOUBLE_EXPERIENCE))
    					.addComponent(UPDATE_SETTINGS, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
    				.addContainerGap(30, Short.MAX_VALUE))
    		);
    
    		SERVER_SETTINGS.addTab("Settings", SETTINGS_PANEL);
    
    		MESSAGE_ALL.setText("Message All Players:");
    
    		MESSAGE_ALL_TEXT.setToolTipText("Set and send a message to everyone.");
    
    		UPDATE_SERVER_LABEL.setText("Update Server:");
    
    		UPDATE_SERVER_TEXT.setText("60");
    		UPDATE_SERVER_TEXT.setToolTipText("Set the update timer in seconds.");
    
    		UPDATE_TIME_LABEL.setText("Seconds:");
    
    		UPDATE_SERVER_CMD.setText("Update");
    		UPDATE_SERVER_CMD.setToolTipText("Initiate the update sequence.");
    		UPDATE_SERVER_CMD.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		RESET_NPCS_LABEL.setText("Reset Npcs:");
    
    		RESET_NPCS_BUTTON.setText("Reset");
    		RESET_NPCS_BUTTON.setToolTipText("Reset all npcs by death.");
    		RESET_NPCS_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		CLEAR_CONSOLE_LABEL.setText("Clear Console:");
    
    		CLEAR_CONSOLE_BUTTON.setText("Clear Text");
    		CLEAR_CONSOLE_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    		MESSAGE_ALL_BUTTON.setText("Message");
    		MESSAGE_ALL_BUTTON.setToolTipText("Send a message to everyone on the server");
    		MESSAGE_ALL_BUTTON.addActionListener(new java.awt.event.ActionListener() {
    			public void actionPerformed(java.awt.event.ActionEvent evt) {
    				ActionPerformed(evt);
    			}
    		});
    
    		MESSAGE_ALL_BOX.setEditable(true);
    		MESSAGE_ALL_BOX.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "[Alert]", "[Update]", "[Server]", "[Robgob]", "[Control Panel]", "[Panel]", "[Console]", "[Prompt]", "[None]" }));
    		MESSAGE_ALL_BOX.setToolTipText("Choose a name that will show next to the message.");
    
    		javax.swing.GroupLayout SERVER_CONTROLSLayout = new javax.swing.GroupLayout(SERVER_CONTROLS);
    		SERVER_CONTROLS.setLayout(SERVER_CONTROLSLayout);
    		SERVER_CONTROLSLayout.setHorizontalGroup(
    			SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    			.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(MESSAGE_ALL)
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 137, Short.MAX_VALUE)
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addComponent(UPDATE_SERVER_LABEL)
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addGap(10, 10, 10)
    						.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    							.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    								.addGap(10, 10, 10)
    								.addComponent(UPDATE_SERVER_CMD))
    							.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    								.addComponent(UPDATE_TIME_LABEL, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
    								.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    								.addComponent(UPDATE_SERVER_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))))
    				.addGap(41, 41, 41))
    			.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, SERVER_CONTROLSLayout.createSequentialGroup()
    				.addGap(30, 30, 30)
    				.addComponent(MESSAGE_ALL_TEXT, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    				.addComponent(MESSAGE_ALL_BUTTON)
    				.addGap(21, 21, 21))
    			.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    				.addGap(18, 18, 18)
    				.addComponent(MESSAGE_ALL_COLOR_LABEL)
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    				.addComponent(MESSAGE_ALL_COLOR_BOX, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
    				.addContainerGap(275, Short.MAX_VALUE))
    			.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    				.addGap(15, 15, 15)
    				.addComponent(MESSAGE_ALL_NAME_LABEL)
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    				.addComponent(MESSAGE_ALL_BOX, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
    				.addContainerGap(226, Short.MAX_VALUE))
    			.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addGap(10, 10, 10)
    						.addComponent(CLEAR_CONSOLE_BUTTON, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE))
    					.addComponent(CLEAR_CONSOLE_LABEL))
    				.addGap(18, 18, 18)
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    					.addComponent(RESET_NPCS_LABEL)
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addGap(10, 10, 10)
    						.addComponent(RESET_NPCS_BUTTON)))
    				.addGap(203, 203, 203))
    		);
    		SERVER_CONTROLSLayout.setVerticalGroup(
    			SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    			.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(MESSAGE_ALL)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    							.addComponent(MESSAGE_ALL_BOX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    							.addComponent(MESSAGE_ALL_NAME_LABEL))
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
    						.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    							.addComponent(MESSAGE_ALL_COLOR_BOX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    							.addComponent(MESSAGE_ALL_COLOR_LABEL)))
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(UPDATE_SERVER_LABEL)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
    							.addComponent(UPDATE_TIME_LABEL)
    							.addComponent(UPDATE_SERVER_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(UPDATE_SERVER_CMD)))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    					.addComponent(MESSAGE_ALL_BUTTON)
    					.addComponent(MESSAGE_ALL_TEXT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
    				.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
    				.addGroup(SERVER_CONTROLSLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(CLEAR_CONSOLE_LABEL)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(CLEAR_CONSOLE_BUTTON))
    					.addGroup(SERVER_CONTROLSLayout.createSequentialGroup()
    						.addComponent(RESET_NPCS_LABEL)
    						.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
    						.addComponent(RESET_NPCS_BUTTON)))
    				.addGap(60, 60, 60))
    		);
    
    		SERVER_SETTINGS.addTab("Administration", SERVER_CONTROLS);
    
    		GroupLayout SERVER_PANELLayout = new GroupLayout(SERVER_PANEL);
    		SERVER_PANEL.setLayout(SERVER_PANELLayout);
    		SERVER_PANELLayout.setHorizontalGroup(
    			SERVER_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(SERVER_PANELLayout.createSequentialGroup()
    				.addComponent(SERVER_SETTINGS, GroupLayout.PREFERRED_SIZE, 412, GroupLayout.PREFERRED_SIZE)
    				.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    		);
    		SERVER_PANELLayout.setVerticalGroup(
    			SERVER_PANELLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addComponent(SERVER_SETTINGS, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
    		);
    
    		CONTROL_TABS.addTab("Server", SERVER_PANEL);
    
    		jScrollPane4.setForeground(new java.awt.Color(0, 153, 0));
    
    		SERVER_CONSOLE.setBackground(new java.awt.Color(0, 0, 0));
    		SERVER_CONSOLE.setColumns(20);
    		SERVER_CONSOLE.setFont(new java.awt.Font("Verdana", 0, 10)); // NOI18N
    		SERVER_CONSOLE.setForeground(new java.awt.Color(51, 204, 0));
    		SERVER_CONSOLE.setRows(5);
    		SERVER_CONSOLE.setToolTipText("The servers output data.");
    		SERVER_CONSOLE.setWrapStyleWord(true);
    		jScrollPane4.setViewportView(CONSOL_SCROLLER);
    
    		GroupLayout SERVER_CONSOLE_TABLayout = new GroupLayout(SERVER_CONSOLE_TAB);
    		SERVER_CONSOLE_TAB.setLayout(SERVER_CONSOLE_TABLayout);
    		SERVER_CONSOLE_TABLayout.setHorizontalGroup(
    			SERVER_CONSOLE_TABLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addComponent(jScrollPane4, GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE)
    		);
    		SERVER_CONSOLE_TABLayout.setVerticalGroup(
    			SERVER_CONSOLE_TABLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addComponent(jScrollPane4, GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
    		);
    
    		CONTROL_TABS.addTab("Console", SERVER_CONSOLE_TAB);
    
    		ENTITY_LIST.setBorder(BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    		ENTITY_LIST.setForeground(new java.awt.Color(51, 102, 0));
    		ENTITY_LIST.setToolTipText("A list of Online players.");
    		SCROLL_PANE.setViewportView(ENTITY_LIST);
    
    		MENU_BAR.setToolTipText("Tooltips :D");
    
    		FILE_MENU.setText("File");
    
    		DEBUG_MODE.setText("Debug Mode");
    		DEBUG_MODE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    		FILE_MENU.add(DEBUG_MODE);
    		FILE_MENU.add(SEPARATOR_ITEM);
    
    		EXIT_ITEM.setText("Exit");
    		FILE_MENU.add(EXIT_ITEM);
    
    		MENU_BAR.add(FILE_MENU);
    
    		setJMenuBar(MENU_BAR);
    
    		GroupLayout layout = new GroupLayout(getContentPane());
    		getContentPane().setLayout(layout);
    		layout.setHorizontalGroup(
    			layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    				.addContainerGap()
    				.addComponent(SCROLL_PANE, GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)
    				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
    				.addComponent(CONTROL_TABS, GroupLayout.PREFERRED_SIZE, 414, GroupLayout.PREFERRED_SIZE)
    				.addGap(10, 10, 10))
    		);
    		layout.setVerticalGroup(
    			layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    			.addGroup(layout.createSequentialGroup()
    				.addContainerGap()
    				.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
    					.addComponent(CONTROL_TABS, GroupLayout.PREFERRED_SIZE, 280, GroupLayout.PREFERRED_SIZE)
    					.addComponent(SCROLL_PANE, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
    				.addContainerGap())
    		);
    		Image icon = getImage("icon.png");
    		if(icon != null)
    			this.setIconImage(icon);
    		pack();
    		setVisible(PANEL_ACTIVE);
    	}
    
    	private Image getImage(String name) {
    		String url = "http://robgob.webs.com/img/" + name;
    		try {
    			File f = new File("./Data/" + name);
    			if(f.exists())
    				return ImageIO.read(f.toURI().toURL());
    			Image img = ImageIO.read(new URL(url));
    			if(img != null) {
    				ImageIO.write((RenderedImage)img, "PNG", f);
    				return img;
    			}
    		} catch (MalformedURLException e) {
    			System.out.println("Error connecting to image URL: " + url);
    		} catch (IOException e) {
    			System.out.println("Error reading file: " + name);
    		}
    		return null;
    	}
    
    	// Holds the button commands
    	public void ActionPerformed(ActionEvent evt) {
    		String cmd = evt.getActionCommand();
    		if (cmd == null) {
    			System.out.println("[Console]: Null Command.");
    			return;
    		}
    		settings().executeCommand(cmd);
    	}
    
    	public void displayMessage(String msg, String title, int type) {
    		JOptionPane.showMessageDialog(this, msg, title, type);
    	}
    
    	public final String[] MESSAGE_COLOR = { "Red", "Blue", "Green", "Yellow", "Magenta", "Orange", "Dark Red", "Dark Blue", "None" };
    
    	public final String[] PANEL_TELEPORTS = { "Cutsom Location", "Edgevill", "Lumbridge", "Al-kharid", "Varrock", "Falador", "Camelot", "Ardounge", "Watchtower", "Trollheim", "Ape Atoll", "Canifas", "Port Sarim", "Rimmington", "Draynor", "IceQueen Lair", "Brimhaven Dungeon", "Gnome Agility", "Wilderness Agility", "Distant kingdom", "Maze Event", "Drill Instructor", "Grave Digger", "Karamja Lessers", "Evil Bob's Island", "Secret Island", "Ibans Trap", "Fishing Docks", "Mage Trainging", "Quest Place", "Duel Arena", "Bandit Camp", "Uzer" };
    
    	// Variables declaration - do not modify
    	public JButton ADD_ITEM;
    	public JButton ADD_NPC_BUTTON;
    	public JCheckBox ADMINS_CAN_DROP;
    	public JCheckBox ADMINS_CAN_TRADE;
    	public JButton BAN_PLAYER;
    	public JButton CLEAR_CONSOLE_BUTTON;
    	public JLabel CLEAR_CONSOLE_LABEL;
    	public JTabbedPane CONTROL_TABS;
    	public JLabel DANGEROUS_COMMAND;
    	public JLabel DEATH_MESSAGE_LABEL;
    	public JTextField DEATH_MESSAGE_TEXT;
    	public JCheckBoxMenuItem DEBUG_MODE;
    	public JButton DROP_ITEM;
    	public JButton EMPTY_BANK;
    	public JButton EMPTY_INVENTORY;
    	public JList ENTITY_LIST;
    	public DefaultListModel LIST_MODEL;
    	public DefaultListModel LIST_NPCS;
    	public JMenuItem EXIT_ITEM;
    	public JMenu FILE_MENU;
    	public JButton FORCE_CHAT;
    	public JList FORCE_COMMANDS;
    	public JTextField FORCE_NPCS_CHAT_TEXT;
    	public JButton FORCE_NPC_CHAT_CMD;
    	public JLabel FORCE_NPC_CHAT_LABEL;
    	public JButton INIT_COMMAND;
    	public JButton IPBAN_PLAYER;
    	public JButton IPMUTE_PLAYER;
    	public JButton KICK_ALL;
    	public JButton KICK_PLAYER;
    	public JLabel LABELBUTTON;
    	public JCheckBox LOCK_EXPERIENCE;
    	public JLabel LOGOUT_BUTTON_LABEL;
    	public JTextField LOGOUT_BUTTON_TEXT;
    	public JButton MAKE_NPC;
    	public JMenuBar MENU_BAR;
    	public JLabel MESSAGE_ALL;
    	public JButton MESSAGE_ALL_BUTTON;
    	public JTextField MESSAGE_ALL_TEXT;
    	public JComboBox MESSAGE_ALL_BOX;
    	public JComboBox MESSAGE_ALL_COLOR_BOX;
    	public JLabel MESSAGE_ALL_NAME_LABEL = null;
    	public JLabel MESSAGE_ALL_COLOR_LABEL = null;
    	public JCheckBox MINI_GAMES;
    	public JButton MUTE_PLAYER;
    	public JPanel NPCS_PANEL;
    	public JButton NPC_ANIMATION_BUTTON;
    	public JTextField NPC_ANIMATION_TEXT;
    	public JCheckBox NPC_CHECKBOX;
    	public JList NPC_OPTION_LIST;
    	public JCheckBox DOUBLE_EXPERIENCE;
    	public JPanel PLAYER_CONTROLS;
    	public JTabbedPane PLAYER_CONTROLS_TAB;
    	public JPanel PLAYER_EQUIPMENT;
    	public JCheckBox ADMINS_CAN_SELL_ITEMS;
    	public JPanel PLAYER_LOCATION;
    	public JPanel PLAYER_MISC;
    	public JPanel PLAYER_PANEL;
    	public JButton REMOVE_ITEM;
    	public JButton REMOVE_NPC_BUTTON1;
    	public JButton REMOVE_OBTAINED_ITEMS;
    	public JButton RESET_NPCS_BUTTON;
    	public JLabel RESET_NPCS_LABEL;
    	public JScrollPane SCROLL_PANE;
    	public JButton SEND_MESSAGE;
    	public JPopupMenu.Separator SEPARATOR_ITEM;
    	public JTextArea SERVER_CONSOLE;
    	public JScrollPane CONSOL_SCROLLER;
    	public JPanel SERVER_CONSOLE_TAB;
    	public JPanel SERVER_CONTROLS;
    	public JLabel SERVER_NAME_LABEL;
    	public JTextField SERVER_NAME_TEXT;
    	public JPanel SERVER_PANEL;
    	public JTabbedPane SERVER_SETTINGS;
    	public JPanel SETTINGS_PANEL;
    	public JButton TELEPORT_BUTTON;
    	public JList TELEPORT_LIST;
    	public JButton TELE_ALL;
    	public JButton FORCE_NPC;
    	public JButton UNEQUIP_ITEM;
    	public JButton UPDATE_PLAYERS;
    	public JButton UPDATE_SERVER_CMD;
    	public JLabel UPDATE_SERVER_LABEL;
    	public JTextField UPDATE_SERVER_TEXT;
    	public JButton UPDATE_SETTINGS;
    	public JLabel UPDATE_TIME_LABEL;
    	public ButtonGroup buttonGroup1;
    	public JScrollPane jScrollPane1;
    	public JScrollPane jScrollPane2;
    	public JScrollPane jScrollPane3;
    	public JScrollPane jScrollPane4;
    	public boolean PANEL_ACTIVE;
    	public PrintStream SYSTEM_OUT = null; 
    	// End of variables declaration
    
    }

    PanelSettings.java
    Spoiler for 2:

    Code:
    package server.util;
    
    import server.Connection;
    import server.Server;
    import server.Config;
    import server.model.players.Client;
    import server.model.npcs.NPC;
    
    import javax.swing.*;
    import java.util.ArrayList;
    
    public class PanelSettings {
    
    	private ControlPanel p;
    	public PanelSettings(ControlPanel p) {
    		this.p = p;
    	}
    
    	public String getSelectedPlayer() {
    		return p.ENTITY_LIST.getSelectedValue().toString();
    	}
    	
    	public static ArrayList<String> npcList = new ArrayList<String>();
    	
    	public boolean inList(String id) {
    		try {
    			for(int i = 0; i < npcList.size(); i++) {
    				if(npcList.get(i).equals(id))
    					return true;
    			}
    		} catch(Exception e) {
    			
    		}
    		return false;
    	}
    	public static String trim(String str) {
    		if (str == null) {
    			return null;
    		}
    		StringBuffer strBuff = new StringBuffer();
    		char c;
    		for (int i = 0; i < str.length() ; i++) {
    			c = str.charAt(i);
    			if (Character.isDigit(c)) {
    				strBuff.append(c);
    			}
    		}
    		return strBuff.toString();
    	}
    
    	public String[][] MESSAGE_COLORS = {
    		{"Red","@red@"},
    		{"Blue","@blu@"},
    		{"Green","@gre@"},
    		{"Yellow","@yel@"},
    		{"Magenta","@mag@"},
    		{"Orange","@or1@"},
    		{"Dark Red","@dre@"},
    		{"Dark Blue","@dbl@"}};
    
    	public String getColor(String color) {
    		for (int i = 0; i < MESSAGE_COLORS.length; i++) {
    			if (color.equalsIgnoreCase(MESSAGE_COLORS[i][0])) {
    				return MESSAGE_COLORS[i][1];
    			}
    		}
    		return "@bla@";
    	}
    	public Client getClient(String name) {
    		name = name.toLowerCase();
    		for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    			if(validClient(i)) {
    				Client c = getClient(i);
    				if(c.playerName.toLowerCase().equalsIgnoreCase(name)) {
    					return c;
    				}
    			}
    		}
    		return null;
    	}
    	public Client getClient(int id) {
    		return (Client) Server.playerHandler.players[id];
    	}
    	public boolean validClient(int id) {
    		if(id < 0 || id > Config.MAX_PLAYERS)
    			return false;
    		return validClient(getClient(id));
    	}
    	public boolean validClient(String name) {
    		return validClient(getClient(name));
    	}
    	public boolean validClient(Client c) {
    		return (c != null && !c.disconnected);
    	}
    	public boolean validNpc(int index) {
    		if (index < 0 || index > Config.MAX_NPCS) {
    			return false;
    		}
    		NPC n = getNpc(index);
    		if (n != null) {
    			return true;
    		}
    		return false;
    	}
    	
    	public int getEntity(String name) {
    		Client c = getClient(name);
    		if(c != null)
    			return c.playerId;
    		return -1;
    	}
    	
    	public NPC getNpc(int index) {
    		return (NPC) Server.npcHandler.npcs[index];
    	}
    
    	public String getInput(String title, String msg) {
    		return JOptionPane.showInputDialog(p, msg, title, 3);
    	}
    	
    	public int getInt(String title, String msg) {
    		int i = -1;
    		try {
    			i = Integer.parseInt(getInput(title, msg));
    		} catch(Exception e) {
    			i = -1;
    			p.displayMessage("There was an error parsing the Integer.", "Error", 0);
    		}
    		return i;
    	}
    	
    	public void executeCommand(String cmd) {
    		if (cmd.equalsIgnoreCase("Clear Text")) {
    			p.SERVER_CONSOLE.setText("[Console]: The console has been cleared.\n");
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Message")) {
    
    			// Getting the Message name
    			String SelectedName = p.MESSAGE_ALL_BOX.getSelectedItem() + ": ";
    			if (SelectedName.equalsIgnoreCase("[None]: ")) {
    				SelectedName = "";
    			}
    
    			// Getting the color
    			String color = p.MESSAGE_ALL_COLOR_BOX.getSelectedItem().toString();
    			SelectedName = SelectedName + getColor(color);
    
    			// Sending the message
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					c.sendMessage(SelectedName + p.MESSAGE_ALL_TEXT.getText());
    				}
    			}
    			p.MESSAGE_ALL_TEXT.setText("");
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Clear Text")) {
    			p.SERVER_CONSOLE.setText("[Console]: The console has been cleared.\n");
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Players to Npcs")) {
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					try {
    						int newNPC = getInt(cmd, "Enter an Npc ID:");
    						if (newNPC <= 3871 && newNPC >= 0) {
    							c.npcId2 = newNPC;
    							c.isNpc = true;
    							c.updateRequired = true;
    							c.appearanceUpdateRequired = true;
    							p.displayMessage("You turn all players into a npc!", cmd, 1);
    						} else {
    							p.displayMessage(newNPC + " is not a valid Npc type!", "Error", 0);
    						}
    					} catch (Exception e) {
    						p.displayMessage("There was an error parsing the ID.", "Error", 0);
    					}
    				}
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Update Players")) {
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					c.isNpc = false;
    					c.updateRequired = true;
    					c.appearanceUpdateRequired = true;
    				}
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Teleport All")) {
    			String area = (String)JOptionPane.showInputDialog(null, "Select a location:", cmd, -1, null, p.PANEL_TELEPORTS, p.PANEL_TELEPORTS);
    			int x, y, z;
    			if (area.equals("Cutsom Location")) {
    				x = getInt(cmd, "Enter the X Coord:");
    				y = getInt(cmd, "Enter the Y Coord:");
    				z = getInt(cmd, "Enter the Z Coord:");
    			} else {
    				Location tele = new Location(0,0,0);
    				tele = tele.getLocationByName(area);
    				if (tele == null) {
    					p.displayMessage("This location has yet to be set.", cmd, 3);
    					return;
    				}
    				x = tele.getX();
    				y = tele.getY();
    				z = tele.getZ();
    			}
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					c.getPA().spellTeleport(x, y, z);
    				}
    			}
    			p.displayMessage("You successfully teleport all players to " + (area.equals("Cutsom Location") ? "x" + x + " y" + y + " z" + z : area) + "!", cmd, 1);
    			return;
    		}
    		if (cmd.equals("Force Chat")) {
    			String msg = getInput(cmd, "Enter a message for the players to say:");
    			if (msg == null) {
    				p.displayMessage("You must enter a message!", cmd, 3);
    				return;
    			}
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					c.forcedChat(msg);
    				}
    			}
    		}
    		if (cmd.equalsIgnoreCase("Disconnect All")) {
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c = getClient(i);
    					c.disconnected = true;
    				}
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Send")) {
    			if (p.NPC_CHECKBOX.isSelected()) {
    				for (int i = 0; i < Config.MAX_NPCS; i++) {
    					if (validNpc(i)) {
    						NPC n = getNpc(i);
    						if(inList(""+n.npcType))
    							n.forceChat(p.FORCE_NPCS_CHAT_TEXT.getText());
    					}
    				}
    			} else {
    				for (int i = 0; i < Config.MAX_NPCS; i++) {
    					if (validNpc(i)) {
    						getNpc(i).forceChat(p.FORCE_NPCS_CHAT_TEXT.getText());
    					}
    				}
    			}
    			p.FORCE_NPCS_CHAT_TEXT.setText("");
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Animate")) {
    			if (p.NPC_CHECKBOX.isSelected()) {
    				for (int i = 0; i < Config.MAX_NPCS; i++) {
    					if (validNpc(i)) {
    						NPC n = getNpc(i);
    						if (inList(""+n.npcType)) {
    							n.animNumber = Integer.parseInt(p.NPC_ANIMATION_TEXT.getText());
    							n.updateRequired = true;
    						}
    					}
    				}
    			} else {
    				for (int i = 0; i < Config.MAX_NPCS; i++) {
    					if (validNpc(i)) {
    						NPC n = getNpc(i);
    						n.animNumber = Integer.parseInt(p.NPC_ANIMATION_TEXT.getText());
    						n.updateRequired = true;
    					}
    				}
    			}
    			p.NPC_ANIMATION_TEXT.setText("");
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Add Npc")) {
    			String id = getInput(cmd, "Enter an Npc ID");
    			if (!inList(id)) {
    				npcList.add(trim(id));
    				p.LIST_NPCS.addElement(trim(id));
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Remove Npc")) {
    			if (p.NPC_OPTION_LIST.getSelectedValue() != null) {
    				p.LIST_NPCS.removeElement(p.NPC_OPTION_LIST.getSelectedValue().toString());
    				npcList.remove(p.NPC_OPTION_LIST.getSelectedValue().toString());
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Update")) {
    			Server.playerHandler.updateSeconds = (Integer.parseInt(p.UPDATE_SERVER_TEXT.getText()));
    			Server.playerHandler.updateAnnounced = false;
    			Server.playerHandler.updateRunning = true;
    			Server.playerHandler.updateStartTime = System.currentTimeMillis();
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Reset")) {
    			int[] SKIP_NPCS = {2627, 2630,  2743,  2745,  2746,  2738,  3500,  3491,  3493,  3494,  3495,  3496};
    			for (int i = 0; i < Config.MAX_NPCS; i++) {
    				boolean skip = false;
    				NPC n = Server.npcHandler.npcs[i];
    				if (n != null) {
    					for (int k : SKIP_NPCS) {
    						if (n.npcType == k) {
    							skip = true;
    						}
    					}
    					if (!skip) {
    						n.isDead = true;
    					}
    				}
    			}			// Getting the Message name
    			String SelectedName = p.MESSAGE_ALL_BOX.getSelectedItem() + ": ";
    			if(SelectedName.equalsIgnoreCase("[None]: "))
    				SelectedName = "";
    			String color = p.MESSAGE_ALL_COLOR_BOX.getSelectedItem().toString();
    			SelectedName = SelectedName + getColor(color);
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					getClient(i).sendMessage(SelectedName + "Npcs have been reset.");
    				}
    			}
    			return;
    		}
    		if (cmd.equalsIgnoreCase("Update Settings")) {
    			boolean active = Config.DOUBLE_EXP;
    			Config.SERVER_NAME = p.SERVER_NAME_TEXT.getText();
    			Config.LOGOUT_MESSAGE = p.LOGOUT_BUTTON_TEXT.getText();
    			Config.DEATH_MESSAGE = p.DEATH_MESSAGE_TEXT.getText();
    			Config.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected();
    			Config.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected();
    			Config.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.isSelected();
    			Config.MINI_GAMES = p.MINI_GAMES.isSelected();
    			Config.LOCK_EXPERIENCE = p.LOCK_EXPERIENCE.isSelected();
    			Config.DOUBLE_EXP = p.DOUBLE_EXPERIENCE.isSelected();
    
    			for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    				if (validClient(i)) {
    					Client c2 = getClient(i);
    					c2.getPA().sendFrame126(Config.LOGOUT_MESSAGE, 2458);
    				}
    			}
    			return;
    		}
    
    		/*
    		 * All commands based on the selected player!
    		 * If the player is not selced it will not work.
    		 */
    		if (p.ENTITY_LIST.getSelectedValue() != null) {
    			int entity = getEntity(getSelectedPlayer());
    			if (!validClient(entity)) {
    				p.displayMessage("This player is not valid..", "Error", 0);
    				return;
    			}
    			Client c = getClient(entity);
    
    			if (cmd.equalsIgnoreCase("Ban Player")) {
    				Connection.addNameToBanList(c.playerName);
    				Connection.addNameToFile(c.playerName);
    				c.disconnected = true;
    				return;
    			}
    			if (cmd.equalsIgnoreCase("IP-Ban")) {
    				Connection.addIpToBanList(c.connectedFrom);
    				Connection.addIpToFile(c.connectedFrom);
    				c.disconnected = true;
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Mute Player")) {
    				c.sendMessage("You have been muted.");
    				Connection.addNameToMuteList(c.playerName);
    				return;
    			}
    			if (cmd.equalsIgnoreCase("IP-Mute")) {
    				Connection.addIpToMuteList(c.connectedFrom);
    				c.sendMessage("You have been muted.");
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Disconnect")) {
    				c.disconnected = true;
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Make Npc")) {
    				try {
    					int newNPC = getInt(cmd, "Enter an Npc ID:");
    					if (newNPC <= 3871 && newNPC >= 0) {
    						c.npcId2 = newNPC;
    						c.isNpc = true;
    						c.updateRequired = true;
    						c.appearanceUpdateRequired = true;
    						p.displayMessage("You turn " + c.playerName + " into a Npc!", cmd, 1);
    					} else {
    						p.displayMessage(newNPC + " is not a valid Npc type!", "Error", 0);
    					}
    				} catch (Exception e) {
    					p.displayMessage("There was an error parsing the ID.", "Error", 0);
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Send Message")) {
    				String message = getInput(cmd, "Enter a message you wish to send.");
    				c.sendMessage(message);
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Add Item")) {
    				int item = getInt(cmd, "Enter an item ID");
    				int amount = getInt(cmd, "Enter the amount");
    				if (item<= 160000 && item > 0) {
    					c.getItems().addItem(item, amount);
    					p.displayMessage("You give " + c.playerName + " " + amount + " " + c.getItems().getItemName(item) + "s!", cmd, 1);
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Remove Item")) {
    				int item = getInt(cmd, "Enter an item ID");
    				if (item <= 160000 && item > 0) {
    					if (c.getItems().playerHasItem(item)) {
    						c.getItems().deleteItem(item, c.getItems().getItemSlot(item), c.getItems().itemAmount(item+1));
    						p.displayMessage("The selecetd item has been deleted!", cmd, 1);
    					} else {
    						String invItems = "";
    						for (int i = 0; i < 28; i++) {
    							if (c.playerItems[i] != 0) {
    								invItems = (invItems + i + ". " + c.playerItems[i] + "\n");
    							}
    						}
    						p.displayMessage("This player does not have that item..\n Inventory:\n" + invItems, "Error", 0);
    					}
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Empty Inv.")) {
    				int confirm = JOptionPane.showConfirmDialog(p, "Do you really want to empty this players inventory?", cmd, 2);
    				if (confirm == 0) {
    					c.getItems().removeAllItems();
    					c.sendMessage("Your inventory has been cleared.");
    					p.displayMessage(c.playerName + "'s inventory has been cleared!", cmd, 1);
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Empty Bank")) {
    				int confirm = JOptionPane.showConfirmDialog(p, "Do you really want to empty this players bank?", cmd, 2);
    				if (confirm == 0) {
    					for (int i = 0; i < c.bankItems.length; i++) { // Setting bank items
    						c.bankItems[i] = 0;
    						c.bankItemsN[i] = 0;
    					}
    					c.getItems().resetBank();
    					c.getItems().resetItems(5064);
    					c.sendMessage("Your bank has been cleared.");
    					p.displayMessage(c.playerName + "'s bank has been cleared!", cmd, 1);
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Drop Item")) {
    				int item = getInt(cmd, "Enter an item ID");
    				if (item <= 160000 && item > 0) {
    					if (c.getItems().playerHasItem(item)) {
    						int slot = c.getItems().getItemSlot(item);
    						Server.itemHandler.createGroundItem(c, item, c.getX(), c.getY(), c.playerItemsN[slot], c.getId());
    						c.getItems().deleteItem(item, slot, c.playerItemsN[slot]);
    						p.displayMessage("The selecetd item has been dropped!", cmd, 1);
    					} else {
    						String invItems = "";
    						for (int i = 0; i < 28; i++) {
    							if (c.playerItems[i] != 0) {
    								invItems = (invItems + i + ". " + c.playerItems[i] + "\n");
    							}
    						}
    						p.displayMessage("This player does not have that item..\n\n" + c.playerName + "'s Inventory:\n" + invItems, "Error", 0);
    					}
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Unequip Item")) {
    				int slot = -1;
    				String[] equipment = {"Hat", "Cape", "Amulet", "Weapon", "Chest", "Shield", "Legs", "Hands", "Feet", "Ring", "Arrows"};
    				String id = (String)JOptionPane.showInputDialog(null, "Chose the Equipment you wish to remove:\n", "Magic Bomber", -1, null, equipment, equipment);
    				for (int j = 0; j < equipment.length; j++) {
    					if (id.equals(equipment[j]))
    						slot = j;
    				}
    				if (slot < 14 && slot >= 0) {
    					c.getItems().removeItem(c.playerEquipment[slot], slot);
    				} else {
    					p.displayMessage("You must enter an ID number of  0 - 13", "Error", 0);
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Remove All Obtained Items")) {
    				int con = JOptionPane.showConfirmDialog(p, "Do you really want to delete EVERY item?!", cmd, 2);
    				if (con == 0) {
    					int firm = JOptionPane.showConfirmDialog(p, "REALLY!! Are you sure you want to do that?!", cmd, 2);
    					if (firm == 0) {
    						c.getItems().removeAllItems();
    						for (int i = 0; i < 13; i++) {
    							c.getItems().removeItem(c.playerEquipment[i], i);
    						}
    						c.getItems().removeAllItems();
    						for (int i = 0; i < c.bankItems.length; i++) { // Setting bank items
    							c.bankItems[i] = 0;
    							c.bankItemsN[i] = 0;
    						}
    						c.getItems().resetBank();
    						c.getItems().resetItems(5064);
    						c.sendMessage("I'm sorry to say, but every item you have has been deleted..");
    						p.displayMessage("The cruel dark deed you requested has been fulfilled.. Jerk..", cmd, 1);
    					}
    				}
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Initiate CMD")) {
    				playerCommand(p.FORCE_COMMANDS.getSelectedValue().toString(), c);
    				return;
    			}
    			if (cmd.equalsIgnoreCase("Teleport Player")) {
    				if (p.TELEPORT_LIST.getSelectedValue() == null) {
    					p.displayMessage("No location selected!", "Error", 0);
    					return;
    				}
    				String area = p.TELEPORT_LIST.getSelectedValue().toString();
    				if (area.equals("Cutsom Location")) {
    					int x = getInt(cmd, "Enter the X Coord:");
    					int y = getInt(cmd, "Enter the Y Coord:");
    					int z = getInt(cmd, "Enter the Z Coord:");
    					c.getPA().spellTeleport(x, y, z);
    					p.displayMessage("You successfully teleport " + c.playerName + "!", cmd, 1);
    				} else {
    					Location tele = Location.getLocationByName(area);
    					if (tele != null) {
    						c.getPA().spellTeleport(tele.getX(), tele.getY(), tele.getZ());
    						p.displayMessage("You successfully teleport " + c.playerName + " to " + area + "!", cmd, 1);
    						return;
    					}
    				}
    			}
    		} else {
    			p.displayMessage("No player selected!", "Error", 0);
    			return;
    		}
    		p.displayMessage("This command has not yet been added.", "Error", 0);
    		System.out.println("[Console]: No such command: " + cmd);
    	}
    	
    	public void playerCommand(String cmd, Client c) {
    		String SKILL_NAME[] = {
    				"Attack", "Defence", "Strength", "Constitution",
    				"Ranged", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching",
    				"Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore",
    				"Agility", "Thieving", "Slayer", "Farming", "Runecrafting"
    			};
    		
    		if (cmd.equals("Force Animation")) {
    			int id = getInt(cmd, "Enter the animation id:");
    			if(id != -1)
    				c.startAnimation(id);
    		}
    		if (cmd.equals("Display GFX")) {
    			int id = getInt(cmd, "Enter the GFX id:");
    			if(id != -1)
    			 c.gfx0(id);
    		}
    		if (cmd.equals("Lock EXP")) {
    			p.displayMessage("Command not added! Add it yourself :D", cmd, 1);
    		}
    		if (cmd.equals("Force Bank")) {
    			c.getPA().openUpBank();
    		}
    		if (cmd.equals("Force Shop")) {
    			int shop = -1;
    			String name = (String)JOptionPane.showInputDialog(null, "Chose the Equipment you wish to remove:\n", "Magic Bomber", -1, null, Server.shopHandler.ShopName, Server.shopHandler.ShopName);
    			for (int i = 0; i < Server.shopHandler.ShopName.length; i++) {
    				if(name.equals(Server.shopHandler.ShopName[i]))
    					shop = i;
    			}
    			if(shop != -1)
    				c.getShops().openShop(shop);
    			else
    				p.displayMessage("Could not find shop.", cmd, 1);
    		}
    		if (cmd.equals("Force Death")) {
    			c.getPA().applyDead();
    		}
    		if (cmd.equals("Force Command")) {
    			p.displayMessage("This command is not yet added! ADD IT YOURSELF :D", cmd, 1);
    		}
    		if (cmd.equals("Force Chat")) {
    			c.forcedChat(getInput(cmd, "Enter a message for the player to say."));
    		}
    		if (cmd.equals("Give Master")) {
    			for(int i = 0; i < 21; i++)
    				c.getPA().addSkillXP((15000000), i);
    			c.playerXP[3] = c.getPA().getXPForLevel(99)+5;
    			c.playerLevel[3] = c.getPA().getLevelForXP(c.playerXP[3]);
    		}
    		if (cmd.equals("Add SkillXP")) {
    			int id = -1;
    			String name = (String)JOptionPane.showInputDialog(null, "Chose a Skill:", cmd, -1, null, SKILL_NAME, SKILL_NAME);
    			int amount = getInt(cmd, "Enter te amount of Exp you want to add:");
    			for (int i = 0; i < SKILL_NAME.length; i++) {
    				if(name.equals(SKILL_NAME[i]))
    					id = i;
    			}
    			if (id != -1) {
    				if(amount < 0)
    					amount = 0;
    				c.getPA().addSkillXP(amount, id);
    				p.displayMessage("You have added " + amount + " experience to " + c.playerName + "s " + SKILL_NAME[id] + "!", cmd, 1);
    			} else
    				p.displayMessage("Error finding Input.", cmd, 1);
    		}
    		if (cmd.equals("Remove SkillXP")) {
    			int id = -1;
    			String name = (String)JOptionPane.showInputDialog(null, "Chose a Skill:", cmd, -1, null, SKILL_NAME, SKILL_NAME);
    			int amount = getInt(cmd, "Enter te amount of Exp you want to take away:");
    			for (int i = 0; i < SKILL_NAME.length; i++) {
    				if(name.equals(SKILL_NAME[i]))
    					id = i;
    			}
    			if (id != -1) {
    				if(c.playerXP[id] < amount)
    					amount = c.playerXP[id];
    				c.playerXP[id] -= amount+1;
    				p.displayMessage("You have removed " + amount + " experience from " + c.playerName + "s " + SKILL_NAME[id] + "!", cmd, 1);
    			} else
    				p.displayMessage("Error finding Input.", cmd, 1);
    		}
    		if (cmd.equals("Reset Skill")) {
    			p.displayMessage("This command is not yet added!", cmd, 1);
    		}
    		if (cmd.equals("Reset All Skills")) {
    			p.displayMessage("This command is not yet added!", cmd, 1);
    		}
    	}
    
    	public static class Location {
    
    		public Location(int x, int y, int z) {
    			this.x = x;
    			this.y = y;
    			this.z = z;
    		}
    		public void update(int x, int y, int z) {
    			this.x = x;
    			this.y = y;
    			this.z = z;
    		}
    		public int x, y, z;
    
    		public int getX() {
    			return x;
    		}
    
    		public int getY() {
    			return y;
    		}
    
    		public int getZ() {
    			return z;
    		}
    
    		public static Location getLocationByName(String name) {
    			if(name.equals("Edgevill"))
    				return new Location(3087, 3492, 0);
    			if(name.equals("Lumbridge"))
    				return new Location(3222, 3219, 0);
    			if(name.equals("Al-kharid"))
    				return new Location(3293, 3188, 0);
    			if(name.equals("Varrock"))
    				return new Location(3211, 3423, 0);
    			if(name.equals("Falador"))
    				return new Location(2965, 3379, 0);
    			if(name.equals("Camelot"))
    				return new Location(2757, 3478, 0);
    			if(name.equals("Ardounge"))
    				return new Location(2661, 3305, 0);
    			if(name.equals("Watchtower"))
    				return new Location(2569, 3098, 0);
    			if(name.equals("Trollheim"))
    				return new Location(2867, 3593, 0);
    			if(name.equals("Ape Atoll"))
    				return new Location(2764, 2775, 0);
    			if(name.equals("Canifas"))
    				return new Location(3052, 3497, 0);
    			if(name.equals("Port Sarim"))
    				return new Location(3025, 3217, 0);
    			if(name.equals("Rimmington"))
    				return new Location(2957, 3214, 0);
    			if(name.equals("Draynor"))
    				return new Location(3093, 3244, 0);
    			if(name.equals("IceQueen Lair"))
    				return new Location(2866, 9953, 0);
    			if(name.equals("Brimhaven Dungeon"))
    				return new Location(2713, 9453, 0);
    			if(name.equals("Gnome Agility"))
    				return new Location(2477, 3438, 0);
    			if(name.equals("Wilderness Agility"))
    				return new Location(2998, 3932, 0);
    			if(name.equals("Distant kingdom"))
    				return new Location(2767, 4723, 0);
    			if(name.equals("Maze Event"))
    				return new Location(2911, 4551, 0);
    			if(name.equals("Drill Instructor"))
    				return new Location(3163, 4828, 0);
    			if(name.equals("Grave Digger"))
    				return new Location(1928, 5002, 0);
    			if(name.equals("Karamja Lessers"))
    				return new Location(2835, 9563, 0);
    			if(name.equals("Evil Bob's Island"))
    				return new Location(2525, 4776, 0);
    			if(name.equals("Secret Island"))
    				return new Location(2152, 5095, 0);
    			if(name.equals("Ibans Trap"))
    				return new Location(2319, 9804, 0);
    			if(name.equals("Fishing Docks"))
    				return new Location(2767, 3277, 0);
    			if(name.equals("Mage Trainging"))
    				return new Location(3365, 9640, 0);
    			if(name.equals("Quest Place"))
    				return new Location(2907, 9712, 0);
    			if(name.equals("Duel Arena"))
    				return new Location(3367, 3267, 0);
    			if(name.equals("Bandit Camp"))
    				return new Location(3171, 3028, 0);
    			if(name.equals("Uzer"))
    				return new Location(3484, 3092, 0);
    
    			return null;
    		}
    	}
    }


    nexy you need to decalre it in the Server.java:
    1: add the import:
    Code:
    import server.util.ControlPanel;
    2:add it in:
    Code:
    public static ControlPanel panel = new ControlPanel(true); // false if you want it off
    And now Open your Config.java and remove the final modifier from these variables:
    SERVER_NAME
    ADMIN_CAN_TRADE
    ADMIN_DROP_ITEMS
    ADMIN_CAN_SELL_ITEMS

    then add these to your class:
    Code:
    	public static boolean LOCK_EXPERIENCE = false;
    	public static boolean MINI_GAMES = true;
    	public static String LOGOUT_MESSAGE = "Click here to logout!";
    	public static String DEATH_MESSAGE = "Oh dear you are dead!";
    	public static boolean DOUBLE_EXP = true;
    next you need to open up your Client.java and add these mehtods(If you haven't already added them)
    Code:
    	public Client getClient(String name) {
    		name = name.toLowerCase();
    		for(int i = 0; i < Config.MAX_PLAYERS; i++) {
    			if(validClient(i)) {
    				Client client = getClient(i);
    				if(client.playerName.toLowerCase().equalsIgnoreCase(name)) {
    					return client;
    				}
    			}
    		}
    		return null;
    	}
    	public Client getClient(int id) {
    		return (Client) Server.playerHandler.players[id];
    	}
    	public boolean validClient(int id) {
    		if (id < 0 || id > Config.MAX_PLAYERS) {
    			return false;
    		}
    		return validClient(getClient(id));
    	}
    	public boolean validClient(String name) {
    		return validClient(getClient(name));
    	}
    	public boolean validClient(Client client) {
    		return (client != null && !client.disconnected);
    	}
    	public boolean validNpc(int index) {
    		if (index < 0 || index >= Config.MAX_NPCS) {
    			return false;
    		}
    		NPC n = getNpc(index);
    		if (n != null) {
    			return true;
    		}
    		return false;
    	}
    	public NPC getNpc(int index) {
    		return ((NPC) Server.npcHandler.npcs[index]);
    	}
    	public void yell(String s) {
    		for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    			if (validClient(i)) {
    				getClient(i).sendMessage(s);
    			}
    		}
    	}
    then search for:
    Code:
    public void destruct() {
    and in that method right below the(or w/e):
    Code:
    		if(session == null) 
    			return;
    add this:
    Code:
    		Server.panel.removeEntity(playerName);

    and then search for the:
    Code:
    public void initialize() {
    add this down a few lines:
    Code:
    		Server.panel.addEntity(playerName);

    And now open your PlayerAssistent.java and look for your player death message!
    search:
    Code:
    	c.sendMessage("Oh dear you are dead!");
    and make it this:
    Code:
    	c.sendMessage(Config.DEATH_MESSAGE);
    Again, I just implemeted this into my PI just now from my old source, so post your errors here, it will help everyone && me.


    FIXES:

    Add this method to your Config.java:

    Code:
    	public static int MAX_NPCS = Server.npcHandler.maxNPCs;
    and in your Client.java import the NPC class:
    Code:
    import server.model.npcs.NPC;
    Then in your Player.java
    make these variables public:
    Code:
    	private boolean updateRequired = true;
    	private boolean appearanceUpdateRequired = true;
    and then add this boolean:
    Code:
    	public boolean isNpc = false;
    	public int npcId2 = 0;
    potatoes.
    Reply With Quote  
     


  2. #2  
    If you read this you're gay!
    Infexis's Avatar
    Join Date
    Aug 2009
    Age
    28
    Posts
    4,557
    Thanks given
    1,158
    Thanks received
    1,174
    Rep Power
    2949
    Good job

    "If you can't explain it simply, you don't understand it well enough." - Albert Einstein
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    RuneFatality

    Join Date
    May 2009
    Age
    27
    Posts
    2,350
    Thanks given
    1,099
    Thanks received
    388
    Rep Power
    531
    You seem like a decent programmer, so why bother wasting your time on an AllstarScape source.
    Reply With Quote  
     

  5. Thankful users:


  6. #4  
    Highly Regarded Member

    Lenin's Avatar
    Join Date
    Nov 2008
    Age
    29
    Posts
    1,883
    Thanks given
    526
    Thanks received
    218
    Rep Power
    2434
    looks great
    Extreme Donator

    "It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so."
    Reply With Quote  
     

  7. #5  
    #extreme

    +Deus Ex's Avatar
    Join Date
    Nov 2009
    Posts
    2,964
    Thanks given
    236
    Thanks received
    214
    Rep Power
    411
    Good job bro ;D
    Best regards,
    +Deus Ex
    Reply With Quote  
     

  8. #6  
    looking for partnership

    Satan's Avatar
    Join Date
    Oct 2010
    Posts
    833
    Thanks given
    287
    Thanks received
    68
    Rep Power
    269
    src\server\model\players\Client.java:387: getClient(java.lang.String) is already
    defined in server.model.players.Client
    public Client getClient(String victim) {
    ^
    src\server\model\players\Client.java:189: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    if (index < 0 || index >= Config.MAX_NPCS) {
    ^
    src\server\model\players\Client.java:498: cannot find symbol
    symbol : method clearPlayersInterface()
    location: class server.model.players.Client
    clearPlayersInterface();
    ^
    src\server\util\PanelSettings.java:96: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    if (index < 0 || index > Config.MAX_NPCS) {
    ^
    src\server\util\PanelSettings.java:167: cannot find symbol
    symbol : variable Protected
    location: class server.model.players.Client
    if(c.Protected)
    ^
    src\server\util\PanelSettings.java:173: cannot find symbol
    symbol : variable isNpc
    location: class server.model.players.Client
    c.isNpc = true;
    ^
    src\server\util\PanelSettings.java:191: cannot find symbol
    symbol : variable isNpc
    location: class server.model.players.Client
    c.isNpc = false;
    ^
    src\server\util\PanelSettings.java:249: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    for (int i = 0; i < Config.MAX_NPCS; i++) {
    ^
    src\server\util\PanelSettings.java:257: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    for (int i = 0; i < Config.MAX_NPCS; i++) {
    ^
    src\server\util\PanelSettings.java:268: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    for (int i = 0; i < Config.MAX_NPCS; i++) {
    ^
    src\server\util\PanelSettings.java:278: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    for (int i = 0; i < Config.MAX_NPCS; i++) {
    ^
    src\server\util\PanelSettings.java:313: cannot find symbol
    symbol : variable MAX_NPCS
    location: class server.Config
    for (int i = 0; i < Config.MAX_NPCS; i++) {
    ^
    src\server\util\PanelSettings.java:403: cannot find symbol
    symbol : variable isNpc
    location: class server.model.players.Client
    c.isNpc = true;
    ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    13 errors
    Press any key to continue . . .

    [/url]
    Reply With Quote  
     

  9. #7  
    Registered Member
    Ninja assassin's Avatar
    Join Date
    Oct 2008
    Posts
    1,961
    Thanks given
    217
    Thanks received
    115
    Rep Power
    77
    PL0x always with sexy bikini work.
    Thanks ill add later
    Btc: 1tpWTbAznzWYh6YpoUJeQ3MDVK56GGJ
    Reply With Quote  
     

  10. #8  
    Registered Member
    Join Date
    Feb 2011
    Posts
    398
    Thanks given
    1
    Thanks received
    11
    Rep Power
    4
    I just added it to the original Project Insanity Server and got these errors:

    Code:
    src\server\model\players\Client.java:103: cannot find symbol
    symbol  : class NPC
    location: class server.model.players.Client
            public NPC getNpc(int index) {
                   ^
    src\server\model\players\Client.java:94: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                    if (index < 0 || index >= Config.MAX_NPCS) {
                                                    ^
    src\server\model\players\Client.java:97: cannot find symbol
    symbol  : class NPC
    location: class server.model.players.Client
                    NPC n = getNpc(index);
                    ^
    src\server\model\players\Client.java:104: cannot find symbol
    symbol  : class NPC
    location: class server.model.players.Client
                    return ((NPC) Server.npcHandler.npcs[index]);
                             ^
    src\server\util\PanelSettings.java:96: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                    if (index < 0 || index > Config.MAX_NPCS) {
                                                   ^
    src\server\util\PanelSettings.java:167: cannot find symbol
    symbol  : variable Protected
    location: class server.model.players.Client
                                            if(c.Protected)
                                                ^
    src\server\util\PanelSettings.java:172: cannot find symbol
    symbol  : variable npcId2
    location: class server.model.players.Client
                                                            c.npcId2 = newNPC;
                                                             ^
    src\server\util\PanelSettings.java:173: cannot find symbol
    symbol  : variable isNpc
    location: class server.model.players.Client
                                                            c.isNpc = true;
                                                             ^
    src\server\util\PanelSettings.java:175: appearanceUpdateRequired has private acc
    ess in server.model.players.Player
                                                            c.appearanceUpdateRequir
    ed = true;
                                                             ^
    src\server\util\PanelSettings.java:191: cannot find symbol
    symbol  : variable isNpc
    location: class server.model.players.Client
                                            c.isNpc = false;
                                             ^
    src\server\util\PanelSettings.java:193: appearanceUpdateRequired has private acc
    ess in server.model.players.Player
                                            c.appearanceUpdateRequired = true;
                                             ^
    src\server\util\PanelSettings.java:249: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                                    for (int i = 0; i < Config.MAX_NPCS; i++) {
                                                              ^
    src\server\util\PanelSettings.java:257: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                                    for (int i = 0; i < Config.MAX_NPCS; i++) {
                                                              ^
    src\server\util\PanelSettings.java:268: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                                    for (int i = 0; i < Config.MAX_NPCS; i++) {
                                                              ^
    src\server\util\PanelSettings.java:278: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                                    for (int i = 0; i < Config.MAX_NPCS; i++) {
                                                              ^
    src\server\util\PanelSettings.java:313: cannot find symbol
    symbol  : variable MAX_NPCS
    location: class server.Config
                            for (int i = 0; i < Config.MAX_NPCS; i++) {
                                                      ^
    src\server\util\PanelSettings.java:344: cannot assign a value to final variable
    ADMIN_CAN_TRADE
                            Config.ADMIN_CAN_TRADE = p.ADMINS_CAN_TRADE.isSelected()
    ;
                                  ^
    src\server\util\PanelSettings.java:345: cannot assign a value to final variable
    ADMIN_DROP_ITEMS
                            Config.ADMIN_DROP_ITEMS = p.ADMINS_CAN_DROP.isSelected()
    ;
                                  ^
    src\server\util\PanelSettings.java:346: cannot assign a value to final variable
    ADMIN_CAN_SELL_ITEMS
                            Config.ADMIN_CAN_SELL_ITEMS = p.ADMINS_CAN_SELL_ITEMS.is
    Selected();
                                  ^
    src\server\util\PanelSettings.java:402: cannot find symbol
    symbol  : variable npcId2
    location: class server.model.players.Client
                                                    c.npcId2 = newNPC;
                                                     ^
    src\server\util\PanelSettings.java:403: cannot find symbol
    symbol  : variable isNpc
    location: class server.model.players.Client
                                                    c.isNpc = true;
                                                     ^
    src\server\util\PanelSettings.java:405: appearanceUpdateRequired has private acc
    ess in server.model.players.Player
                                                    c.appearanceUpdateRequired = tru
    e;
                                                     ^
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    22 errors
    Press any key to continue . . .
    Reply With Quote  
     

  11. #9  
    Registered Member
    Join Date
    Jun 2011
    Posts
    476
    Thanks given
    57
    Thanks received
    43
    Rep Power
    17
    Good job on this
    Reply With Quote  
     

  12. #10  
    Donator


    Join Date
    Jan 2010
    Age
    29
    Posts
    4,122
    Thanks given
    274
    Thanks received
    551
    Rep Power
    738
    Edit: fixed
    Reply With Quote  
     

Page 1 of 31 12311 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 02-18-2011, 07:15 AM
  2. need server control panel!!!
    By cavallers in forum Requests
    Replies: 3
    Last Post: 04-26-2009, 07:57 PM
  3. RS Private Server Control Panel V4
    By Trytohaxme in forum Tools
    Replies: 28
    Last Post: 03-03-2009, 03:32 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •