*/
    public void doAdmiralCommand(String admiralCommand) {
        if (admiralCommand.equals(""))
            return;

        if (admiralCommand.contains("create gold")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc == -1) {
                ship.currentQuadrant.addObject(new TrekGold(100, ship));
            } else {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    String goldStr = admiralCommand.substring(brackLoc + 1, closingBrackLoc);
                    int goldAmt = new Integer(goldStr);
                    ship.currentQuadrant.addObject(new TrekGold(goldAmt, ship, ship.point.x + 100, ship.point.y + 100, ship.point.z + 100));
                } else {
                    hud.sendMessage("Poorly formed gold command, missing closing bracket: create gold [xxx]");
                }
            }
            return;
        }

        if (admiralCommand.equalsIgnoreCase("create ship debris with gold")) {
            ship.currentQuadrant.addObject(new TrekShipDebris(ship, 100));
            return;
        }

        if (admiralCommand.equalsIgnoreCase("autofix")) {
            ShipQ adminShip = (ShipQ) ship;
            if (adminShip.autoFix) {
                adminShip.autoFix = false;
                hud.sendMessage("AutoFix disabled.");
            } else {
                adminShip.autoFix = true;
                hud.sendMessage("AutoFix enabled.");
            }
            return;
        }

        if (admiralCommand.contains("show db data")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String dbShipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip dbShip = TrekServer.getPlayerShipByScanLetter(dbShipStr);
                if (dbShip != null) {
                    hud.sendMessage("For: " + dbShip.name + ", dbPlayerID: " + dbShip.parent.dbPlayerID + "   dbShipID: " + dbShip.dbShipID +
                            "   dbConnectionID: " + dbShip.parent.dbConnectionID);
                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            }
            return;
        }

        // show xyz [c]
        if (admiralCommand.contains("show xyz")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String xyzShipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip xyzShip = TrekServer.getPlayerShipByScanLetter(xyzShipStr);
                if (xyzShip != null) {
                    hud.sendMessage("Ship (" + xyzShip.name + ") located at: " + xyzShip.point.toString());
                    // update the observed ship's coord in ship spotted database
                    if (ship.scannedHistory.containsKey(xyzShip.scanLetter)) {
                        ship.scannedHistory.remove(xyzShip.scanLetter);
                    }

                    ship.scannedHistory.put(xyzShip.scanLetter, new TrekCoordHistory(xyzShip.scanLetter, xyzShip.name, new Trek3DPoint(xyzShip.point)));

                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            } else {
                hud.sendMessage("Poorly formed XYZ Admiral command, use: show xyz [shipletter]");
            }
            return;
        }

        if (admiralCommand.contains("move to")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String xyzShipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip xyzShip = TrekServer.getPlayerShipByScanLetter(xyzShipStr);
                if (xyzShip != null) {
                    if (!xyzShip.currentQuadrant.name.equals(ship.currentQuadrant.name)) {
                        ship.currentQuadrant.removeShipByScanLetter(ship.scanLetter);
                        ship.currentQuadrant = xyzShip.currentQuadrant;
                        ship.currentQuadrant.addShip(ship);
                    }

                    ship.point = new Trek3DPoint(xyzShip.point);
                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            } else {
                hud.sendMessage("Poorly formed Move Admiral command, use: move to [shipletter]");
            }
            return;
        }

        if (admiralCommand.contains("change quad")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                char quadLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2).charAt(0);
                if ((quadLtr != 'a') && (quadLtr != 'b') && (quadLtr != 'd') && (quadLtr != 'g') && (quadLtr != 'o') && (quadLtr != 'n')) {
                    hud.sendMessage("Poorly formed Quad command, use: change quad [quadletter] <- a,b,d,g,o,n");
                } else {
                    ship.currentQuadrant.removeShipByScanLetter(ship.scanLetter);

                    String targetQuadrant = "";
                    switch (quadLtr) {
                        case 'a':
                            targetQuadrant = "Alpha Quadrant";
                            break;
                        case 'b':
                            targetQuadrant = "Beta Quadrant";
                            break;
                        case 'd':
                            targetQuadrant = "Delta Quadrant";
                            break;
                        case 'g':
                            targetQuadrant = "Gamma Quadrant";
                            break;
                        case 'o':
                            targetQuadrant = "Omega Quadrant";
                            break;
                        case 'n':
                            targetQuadrant = "Nu Quadrant";
                    }

                    ship.currentQuadrant = (TrekQuadrant) TrekServer.quadrants.get(targetQuadrant);
                    ship.currentQuadrant.addShip(ship);
                }
            }
            return;
        }

        if (admiralCommand.equalsIgnoreCase("give all")) {
            ship.buoyTimeout = 0;
            ship.corbomite = true;
            ship.corbomiteTimeout = 0;
            ship.iridium = true;
            ship.lithium = true;
            ship.lithiumTimeout = 0;
            ship.magnabuoy = true;
            ship.magnabuoyTimeout = 0;
            ship.neutron = true;
            ship.seeker = true;
            ship.seekerTimeout = 0;
            return;
        }

        if (admiralCommand.contains("send msg:")) {
            String msgContents = admiralCommand.substring(admiralCommand.indexOf(":") + 1, admiralCommand.length());
            TrekServer.sendAnnouncement(msgContents, true);
            return;
        }

        if (admiralCommand.contains("change name")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    String newName = admiralCommand.substring(brackLoc + 1, closingBrackLoc);
                    if (newName.length() <= 16) { // max characters per ship name
                        shipName = newName;
                        ship.name = newName;
                    } else {
                        hud.sendMessage("New name is too long!  Keep it at or under 16 characters.");
                    }

                } else {
                    hud.sendMessage("Poorly formed Change Name Admiral command, use: change name [newshipname]");
                }
            } else {
                hud.sendMessage("Poorly formed Change Name Admiral command, use: change name [newshipname]");
            }
            return;
        }

        if (admiralCommand.equals("toggle follow")) {
            ShipQ admiralShip = (ShipQ) ship;
            if (admiralShip.followTarget != null) {
                admiralShip.followTarget = null;
                hud.sendMessage("Following is off.");
            } else {
                if (admiralShip.scanTarget == null) {
                    hud.sendMessage("For the 'Follow' Admiral command, you need to be scanning an object.");
                } else {
                    admiralShip.followTarget = admiralShip.scanTarget;
                    hud.sendMessage("Now following " + admiralShip.followTarget.name);
                }
            }
            return;
        }

        if (admiralCommand.contains("heal ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String xyzShipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip xyzShip = TrekServer.getPlayerShipByScanLetter(xyzShipStr);
                if (xyzShip != null) {
                    hud.sendMessage("Clearing " + xyzShip.name + "'s damage and restoring shields.");
                    xyzShip.damage = 0;
                    xyzShip.shields = 100;
                    xyzShip.lifeSupport = 100;
                    if (xyzShip.lifeSupportFailing)
                        xyzShip.lifeSupportFailing = false;

                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            } else {
                hud.sendMessage("Poorly formed Heal Admiral command, use: heal ship [shipletter]");
            }
            return;
        }

        if (admiralCommand.contains("energize ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String xyzShipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip xyzShip = TrekServer.getPlayerShipByScanLetter(xyzShipStr);
                if (xyzShip != null) {
                    hud.sendMessage("Restoring " + xyzShip.name + "'s energy levels.");
                    xyzShip.warpEnergy = xyzShip.maxWarpEnergy;
                    xyzShip.impulseEnergy = xyzShip.maxImpulseEnergy;
                    xyzShip.currentCrystalCount = xyzShip.maxCrystalStorage;
                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            } else {
                hud.sendMessage("Poorly formed Energize Admiral command, use: energize ship [shipletter]");
            }
            return;
        }

        if (admiralCommand.contains("bring ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipStr);
                if (theShip != null && theShip.currentQuadrant.name.equals(ship.currentQuadrant.name)) {
                    theShip.point = new Trek3DPoint(this.ship.point);
                    hud.sendMessage("Teleported ship " + theShip.name + " to current point.");
                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            } else {
                hud.sendMessage("Poorly formed Move Admiral command, use: move to [shipletter]");
            }
            return;
        }

        if (admiralCommand.equals("tractor beam")) {
            ShipQ admiralShip = (ShipQ) ship;
            if (admiralShip.beamTarget != null) {
                admiralShip.beamTarget = null;
                hud.sendMessage("Deactivated tractor beam.");
            } else {
                if (admiralShip.scanTarget == null) {
                    hud.sendMessage("For the Tractor Beam Admiral command, you need to be scanning an object.");
                } else {
                    admiralShip.beamTarget = admiralShip.scanTarget;
                    hud.sendMessage("Locking Q tractor beam on " + admiralShip.beamTarget.name);
                }
            }
            return;
        }

        // TODO:possibly enhance command to get the bot name as well as class, thx currently defines it's name in the class though
        if (admiralCommand.contains("spawn bot")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    String botStr = admiralCommand.substring(brackLoc + 1, closingBrackLoc);
                    try {
                        String botString = "org.gamehost.jtrek.javatrek.bot." + botStr;
                        TrekBot botPlayer;
                        Class botClass;
                        Class[] constArgs = new Class[]{TrekServer.class, String.class};
                        Object[] actualArgs = new Object[]{TrekServer.getInstance(), "test"};
                        Constructor botConst;
                        try {
                            ClassLoader botLoader = new URLClassLoader(new URL[]{new File("lib/.").toURL()});
                            botClass = botLoader.loadClass(botString);
                            botConst = botClass.getConstructor(constArgs);
                            botPlayer = (TrekBot) botConst.newInstance(actualArgs);
                            TrekServer.addBot(botPlayer);
                            hud.sendMessage("Spawned new " + botStr + " bot.");
                        } catch (MalformedURLException mue) {
                            TrekLog.logException(mue);
                            hud.sendMessage("Failed to load new instance of bot class. MalformedURLException");
                        }
                    } catch (Exception e) {
                        hud.sendMessage("Failed to spawn new bot. " + e.getClass().getName());
                        TrekLog.logException(e);
                    }
                } else {
                    hud.sendMessage("Poorly formed Bot Admiral command, use: spawn bot [classname]");
                }
            } else {
                hud.sendMessage("Poorly formed Bot Admiral command, use: spawn bot [classname]");
            }
            return;
        }

        if (admiralCommand.contains("kill ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipStr);
                if (theShip != null) { // && theShip.currentQuadrant.name.equals(ship.currentQuadrant.name)) {
                    theShip.parent.kill();
                }
            } else {
                hud.sendMessage("Poorly formed Kill Admiral command, use: kill ship [shipletter]");
            }
            return;
        }

        if (admiralCommand.contains("save ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipStr);
                if (theShip != null) {
                    theShip.parent.doSave();
                }
            } else {
                hud.sendMessage("Poorly formed Save Admiral command, use: save ship [shipletter]");
            }
            return;
        }

        if (admiralCommand.equals("save all ships")) {
            for (int x = 0; x < 5; x++) {
                TrekQuadrant quadrant = (TrekQuadrant) TrekServer.quadrants.get("Alpha Quadrant");
                switch (x) {
                    case 0:
                        // set to alpha by default
                        //quadrant = (TrekQuadrant) TrekServer.quadrants.get("Alpha Quadrant");
                        break;
                    case 1:
                        quadrant = (TrekQuadrant) TrekServer.quadrants.get("Beta Quadrant");
                        break;
                    case 2:
                        quadrant = (TrekQuadrant) TrekServer.quadrants.get("Gamma Quadrant");
                        break;
                    case 3:
                        quadrant = (TrekQuadrant) TrekServer.quadrants.get("Omega Quadrant");
                        break;
                    case 4:
                        quadrant = (TrekQuadrant) TrekServer.quadrants.get("Nu Quadrant");
                }
                Vector curQuadShips = quadrant.getAllShips();
                for (Enumeration e = curQuadShips.elements(); e.hasMoreElements(); ) {
                    TrekShip theShip = (TrekShip) e.nextElement();
                    if (theShip != null) {
                        theShip.parent.doSave();
                    }
                }
            }
            return;
        }

        if (admiralCommand.contains("observe ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipStr);
                if (theShip != null) {
                    if (theShip.parent instanceof TrekRawDataInterface || ship.parent instanceof TrekRawDataInterface) {
                        hud.sendMessage("Cannot use observe with raw data streams.");
                    } else {
                        ShipQ thisShip = (ShipQ) ship;
                        if (isObserving) { // remove current observation
                            thisShip.observeShip.parent.theObservers.remove(ship.name);
                            if (thisShip.observeShip.parent.theObservers.size() == 0)
                                thisShip.observeShip.parent.isObserved = false;

                            isObserving = false;
                            thisShip.observeShip = null;
                        }
                        if (theShip == this.ship) {
                            // refresh screen
                            drawHud(false);
                        } else {
                            theShip.parent.theObservers.put(ship.name, this);
                            theShip.parent.isObserved = true;

                            isObserving = true;
                            thisShip.observeShip = theShip;
                            theShip.parent.drawHud(false);
                        }
                    }
                } else {
                    hud.sendMessage("Ship letter does not exist.");
                }
            }
            return;
        }

        if (admiralCommand.contains("send quad")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                char quadLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2).charAt(0);
                if ((quadLtr != 'a') && (quadLtr != 'b') && (quadLtr != 'd') && (quadLtr != 'g') && (quadLtr != 'o') && (quadLtr != 'n')) {
                    hud.sendMessage("Poorly formed Send Admiral command, use: send quad [quadletter,ship]");
                } else {
                    int commaLoc = admiralCommand.indexOf(",");
                    if (commaLoc != -1) {
                        String shipLtr = admiralCommand.substring(commaLoc + 1, commaLoc + 2);
                        TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipLtr);
                        if (theShip != null) {
                            theShip.currentQuadrant.removeShipByScanLetter(theShip.scanLetter);

                            String targetQuadrant = "";
                            switch (quadLtr) {
                                case 'a':
                                    targetQuadrant = "Alpha Quadrant";
                                    break;
                                case 'b':
                                    targetQuadrant = "Beta Quadrant";
                                    break;
                                case 'd':
                                    targetQuadrant = "Delta Quadrant";
                                    break;
                                case 'g':
                                    targetQuadrant = "Gamma Quadrant";
                                    break;
                                case 'o':
                                    targetQuadrant = "Omega Quadrant";
                                    break;
                                case 'n':
                                    targetQuadrant = "Nu Quadrant";
                            }

                            theShip.currentQuadrant = (TrekQuadrant) TrekServer.quadrants.get(targetQuadrant);
                            theShip.currentQuadrant.addShip(theShip);
                        } else {
                            hud.sendMessage("Ship letter does not exist.");
                        }
                    } else {
                        hud.sendMessage("Poorly formed Send Admiral command, use: send quad [quadletter,ship]");
                    }
                }
            } else {
                hud.sendMessage("Poorly formed Send Admiral command, use: send quad [quadletter,ship]");
            }
            return;
        }

        if (admiralCommand.contains("send obj")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String objLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekObject theObj = ship.currentQuadrant.getObjectByScanLetter(objLtr);
                if (theObj == null) {
                    hud.sendMessage("Object letter doesn't exist.");
                } else {
                    int commaLoc = admiralCommand.indexOf(",");
                    if (commaLoc != -1) {
                        String shipLtr = admiralCommand.substring(commaLoc + 1, commaLoc + 2);
                        TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipLtr);
                        if (theShip != null) {
                            theShip.point = new Trek3DPoint(theObj.point);
                        } else {
                            hud.sendMessage("Ship letter does not exist.");
                        }
                    } else {
                        hud.sendMessage("Poorly formed Send Admiral command, use: send obj [objletter,ship]");
                    }
                }
            } else {
                hud.sendMessage("Poorly formed Send Admiral command, use: send obj [objletter,ship]");
            }
            return;
        }

        if (admiralCommand.equals("toggle bots")) {
            if (TrekServer.isBotRespawnEnabled()) {
                TrekServer.setBotRespawnEnabled(false);

                hud.sendMessage("Server bot spawning is off.");
            } else {
                TrekServer.setBotRespawnEnabled(true);
                hud.sendMessage("Server bot spawning enabled.");
            }
            return;
        }

        if (admiralCommand.contains("set bot max")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    int numBots = new Integer(admiralCommand.substring(brackLoc + 1, closingBrackLoc));
                    TrekServer.setMaxBots(numBots);
                    hud.sendMessage("Max bots set to " + numBots + ".");
                }
            }
            return;
        }

        if (admiralCommand.contains("set bot timeout")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    int reTime = new Integer(admiralCommand.substring(brackLoc + 1, closingBrackLoc));
                    TrekServer.setBotRespawnTime(reTime);
                    hud.sendMessage("Respawn time set to " + reTime / 60 + " minutes.");
                }
            }
            return;
        }

        if (admiralCommand.contains("debug bot")) {
            int brackLoc = admiralCommand.indexOf("[");
            String shipStr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
            TrekShip botShip = TrekServer.getPlayerShipByScanLetter(shipStr);
            if (botShip != null) {
                if (botShip.parent instanceof BotPlayer) {
                    BotPlayer theBot = (BotPlayer) botShip.parent;
                    hud.sendMessage("BOT: " + theBot.shipName + ", MODE: " + theBot.shipMode + ", SUB: " + theBot.shipSubMode + ", SUP: " +
                            theBot.supplyNeed + ", BP: " + theBot.botPeace + ", TM: " + theBot.botTeam + ", SK: " + theBot.skillLevel);
                }
            }
            return;
        }

        if (admiralCommand.contains("toggle bot debug")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip botShip = TrekServer.getPlayerShipByScanLetter(shipLtr);
                if (botShip != null && botShip.parent instanceof BotPlayer) {
                    BotPlayer bp = (BotPlayer) botShip.parent;
                    bp.toggleDebug();

                    if (bp.getDebugStatus()) hud.sendMessage("Enabled bot debugging for " + botShip.name + ".");
                    else hud.sendMessage("Disabled bot debugging for " + botShip.name + ".");
                }
            }
            return;
        }

        if (admiralCommand.contains("set bot skill")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int skillLevel = new Integer(admiralCommand.substring(brackLoc + 1, brackLoc + 2));
                if (skillLevel < 1 || skillLevel > 5) {
                    hud.sendMessage("Valid levels are 1 - 5.");
                } else {
                    int commaLoc = admiralCommand.indexOf(",");
                    if (commaLoc != -1) {
                        String shipLtr = admiralCommand.substring(commaLoc + 1, commaLoc + 2);
                        TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipLtr);
                        if (theShip != null) {
                            if (theShip.parent instanceof BotPlayer) {
                                BotPlayer theBot = (BotPlayer) theShip.parent;
                                theBot.skillLevel = skillLevel;
                                hud.sendMessage("Set " + theBot.shipName + " to skill level " + skillLevel);
                            } else {
                                hud.sendMessage("Specified ship isn't a BotPlayer.");
                            }
                        } else {
                            hud.sendMessage("Ship letter does not exist.");
                        }
                    } else {
                        hud.sendMessage("Poorly formed bot skill command, use: set bot skill [skill,ship]");
                    }
                }
            } else {
                hud.sendMessage("Poorly formed bot skill command, use: set bot skill [skill,ship]");
            }
            return;
        }

        if (admiralCommand.equals("toggle teamplay")) {
            if (TrekServer.isTeamPlayEnabled()) {
                TrekServer.setTeamPlayEnabled(false);
                TrekServer.getQuadrantByName("Alpha Quadrant").clearFlag();
                //TrekServer.getQuadrantByName("Beta Quadrant").clearFlag();
                //TrekServer.getQuadrantByName("Gamma Quadrant").clearFlag();
                //TrekServer.getQuadrantByName("Omega Quadrant").clearFlag();

                hud.sendMessage("Teamplay is off.");
            } else {
                TrekServer.setTeamPlayEnabled(true);
                hud.sendMessage("Teamplay enabled.");
                // set nu flag enabled
                TrekServer.getQuadrantByName("Nu Quadrant").setFlag(new TrekFlag("Nu Quadrant", "f"));
            }
            return;
        }
        if (admiralCommand.contains("set team")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int teamNum = new Integer(admiralCommand.substring(brackLoc + 1, brackLoc + 2));
                if (teamNum < 0 || teamNum > 9) {
                    hud.sendMessage("Valid Teams are 1 - 9, or 0 for no team.");
                } else {
                    int commaLoc = admiralCommand.indexOf(",");
                    if (commaLoc != -1) {
                        String shipLtr = admiralCommand.substring(commaLoc + 1, commaLoc + 2);
                        TrekShip theShip = TrekServer.getPlayerShipByScanLetter(shipLtr);
                        if (theShip != null) {
                            theShip.parent.teamNumber = teamNum;
                            if (theShip.parent instanceof BotPlayer) {
                                BotPlayer theBot = (BotPlayer) theShip.parent;
                                theBot.botTeam = teamNum;
                            }
                        } else {
                            hud.sendMessage("Ship letter does not exist.");
                        }
                    } else {
                        hud.sendMessage("Poorly formed Set Team Admiral command, use: set team [teamnum,ship]");
                    }
                }
            } else {
                hud.sendMessage("Poorly formed Set Team Admiral command, use: set team [teamnum,ship]");
            }
            return;
        }

        if (admiralCommand.equals("toggle thx")) {
            TrekServer.toggleThx();
            if (TrekServer.isThxEnabled()) {
                hud.sendMessage("THX enabled.");
            } else {
                hud.sendMessage("THX disabled.");
            }
            return;
        }

        if (admiralCommand.contains("resupply ship")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String shipLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                TrekShip theShip = (TrekShip) TrekServer.getShipByScanLetter(shipLtr);
                if (theShip != null) {
                    theShip.torpedoCount = theShip.maxTorpedoStorage;
                    theShip.droneCount = theShip.maxDroneStorage;
                    theShip.mineCount = theShip.maxMineStorage;
                    theShip.antiMatter = 5000;
                    theShip.buoyTimeout = 0;
                    theShip.lithium = true;
                    theShip.lithiumTimeout = 0;
                    theShip.seeker = true;
                    theShip.seekerTimeout = 0;
                    theShip.corbomite = true;
                    theShip.corbomiteTimeout = 0;
                    theShip.iridium = true;
                    theShip.magnabuoy = true;
                    theShip.magnabuoyTimeout = 0;
                    theShip.neutron = true;
                    if (theShip.cloak) {
                        theShip.cloakTimeCurrent = theShip.cloakTime;
                        if (theShip.cloakBurnt)
                            theShip.cloakBurnt = false;
                    }
                }
            } else {
                hud.sendMessage("Poorly formed resupply command, use: resupply ship [shipLtr]");
            }
            return;
        }

        if (admiralCommand.contains("change class")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                String classLtr = admiralCommand.substring(brackLoc + 1, brackLoc + 2);
                final String validClasses = "abcdefghijklmnopqrstuvxyzAQ";
                if (!validClasses.contains(classLtr)) {
                    hud.sendMessage("Not a valid ship class: " + classLtr + ", valid are: " + validClasses);
                    return;
                }
                int commaLoc = admiralCommand.indexOf(",");
                if (commaLoc != -1) {
                    String shipLtr = admiralCommand.substring(commaLoc + 1, commaLoc + 2);
                    TrekShip oldShip = (TrekShip) TrekServer.getShipByScanLetter(shipLtr);
                    TrekPlayer thePlayer = oldShip.parent;
                    thePlayer.changeShipClass(classLtr);
                } else {
                    hud.sendMessage("Poorly formed change class cmd, use: change class [class,shipLtr]");
                }
            } else {
                hud.sendMessage("Poorly formed change class cmd, use: change class [class,shipLtr]");
            }
            return;
        }

        if (admiralCommand.contains("set tick")) {
            int brackLoc = admiralCommand.indexOf("[");
            if (brackLoc != -1) {
                int closingBrackLoc = admiralCommand.indexOf("]");
                if (closingBrackLoc != -1) {
                    String tickStr = admiralCommand.substring(brackLoc + 1, closingBrackLoc);
                    int tickTime = Integer.parseInt(tickStr);
                    if (tickTime > 0) {
                        TrekServer.setTimerTickDuration(tickTime);
                    } else {
                        hud.sendMessage("Invalid tick value, must be greater than zero");
                    }
                } else {
                    hud.sendMessage("Poorly formed 'set tick' cmd, use: set tick [xxx] (xxx = tick time in ms)");
                }
            } else {
                hud.sendMessage("Poorly formed 'set tick' cmd, use: set tick [xxx] (xxx = tick time in ms)");
            }
        }