100 Errors when changing command rights..
This is the 100 errors when compiling after changing rights for commands:
Code:
^
client.java:8506: illegal start of expression
public void debug(String text) {
^
client.java:8506: ';' expected
public void debug(String text) {
^
client.java:8506: ';' expected
public void debug(String text) {
^
client.java:8510: illegal start of expression
public void declineTrade() {
^
client.java:8510: illegal start of expression
public void declineTrade() {
^
client.java:8510: ';' expected
public void declineTrade() {
^
client.java:8514: illegal start of expression
public void declineTrade(boolean tellOther) {
^
client.java:8514: illegal start of expression
public void declineTrade(boolean tellOther) {
^
client.java:8514: ';' expected
public void declineTrade(boolean tellOther) {
^
client.java:8514: ';' expected
public void declineTrade(boolean tellOther) {
^
client.java:8541: illegal start of expression
public boolean DeleteArrow() {
^
client.java:8541: ';' expected
public boolean DeleteArrow() {
^
client.java:8565: illegal start of expression
public boolean DeleteRing() {
^
client.java:8565: ';' expected
public boolean DeleteRing() {
^
client.java:8588: illegal start of expression
public void deleteequiment(int wearID, int slot) {
^
client.java:8588: illegal start of expression
public void deleteequiment(int wearID, int slot) {
^
client.java:8588: ';' expected
public void deleteequiment(int wearID, int slot) {
^
client.java:8588: <identifier> expected
public void deleteequiment(int wearID, int slot) {
^
client.java:8588: not a statement
public void deleteequiment(int wearID, int slot) {
^
client.java:8588: ';' expected
public void deleteequiment(int wearID, int slot) {
^
client.java:8604: illegal start of expression
public void deleteItem(int id, int amount) {
^
client.java:8604: illegal start of expression
public void deleteItem(int id, int amount) {
^
client.java:8604: ';' expected
public void deleteItem(int id, int amount) {
^
client.java:8604: <identifier> expected
public void deleteItem(int id, int amount) {
^
client.java:8604: not a statement
public void deleteItem(int id, int amount) {
^
client.java:8604: ';' expected
public void deleteItem(int id, int amount) {
^
client.java:8608: illegal start of expression
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: illegal start of expression
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: ';' expected
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: <identifier> expected
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: not a statement
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: ';' expected
public void deleteItem(int id, int slot, int amount) {
^
client.java:8608: ';' expected
public void deleteItem(int id, int slot, int amount) {
^
client.java:8623: illegal start of expression
public void destruct() {
^
client.java:8623: illegal start of expression
public void destruct() {
^
client.java:8623: ';' expected
public void destruct() {
^
client.java:8663: illegal start of expression
private void directFlushOutStream() throws java.io.IOException {
^
client.java:8663: illegal start of expression
private void directFlushOutStream() throws java.io.IOException {
^
client.java:8663: ';' expected
private void directFlushOutStream() throws java.io.IOException {
^
client.java:8663: not a statement
private void directFlushOutStream() throws java.io.IOException {
^
client.java:8663: ';' expected
private void directFlushOutStream() throws java.io.IOException {
^
client.java:8668: illegal start of expression
public int distanceToPoint(int pointX, int pointY) {
^
client.java:8668: ';' expected
public int distanceToPoint(int pointX, int pointY) {
^
client.java:8668: <identifier> expected
public int distanceToPoint(int pointX, int pointY) {
^
client.java:8668: not a statement
public int distanceToPoint(int pointX, int pointY) {
^
client.java:8668: ';' expected
public int distanceToPoint(int pointX, int pointY) {
^
client.java:8672: illegal start of expression
public void dropItem(int droppedItem, int slot) {
^
client.java:8672: illegal start of expression
public void dropItem(int droppedItem, int slot) {
^
client.java:8672: ';' expected
public void dropItem(int droppedItem, int slot) {
^
client.java:8672: <identifier> expected
public void dropItem(int droppedItem, int slot) {
^
client.java:8672: not a statement
public void dropItem(int droppedItem, int slot) {
^
client.java:8672: ';' expected
public void dropItem(int droppedItem, int slot) {
^
client.java:8721: illegal start of expression
private void fillInStream(int forceRead) throws Exception {
^
client.java:8721: illegal start of expression
private void fillInStream(int forceRead) throws Exception {
^
client.java:8721: ';' expected
private void fillInStream(int forceRead) throws Exception {
^
client.java:8721: ';' expected
private void fillInStream(int forceRead) throws Exception {
^
client.java:8721: not a statement
private void fillInStream(int forceRead) throws Exception {
^
client.java:8721: ';' expected
private void fillInStream(int forceRead) throws Exception {
^
client.java:8731: illegal start of expression
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: ';' expected
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: <identifier> expected
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: illegal start of expression
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: ';' expected
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: not a statement
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: ';' expected
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8731: ';' expected
public int findItem(int id, int[] items, int[] amounts) {
^
client.java:8741: illegal start of expression
public void fish(int id) {
^
client.java:8741: illegal start of expression
public void fish(int id) {
^
client.java:8741: ';' expected
public void fish(int id) {
^
client.java:8741: ';' expected
public void fish(int id) {
^
client.java:8792: illegal start of expression
public void fletchBow() {
^
client.java:8792: illegal start of expression
public void fletchBow() {
^
client.java:8792: ';' expected
public void fletchBow() {
^
client.java:8812: illegal start of expression
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8812: illegal start of expression
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8812: ';' expected
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8812: <identifier> expected
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8812: not a statement
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8812: ';' expected
public void fletchBow(boolean shortBow, int amount) {
^
client.java:8836: illegal start of expression
public void flushOutStream() {
^
client.java:8836: illegal start of expression
public void flushOutStream() {
^
client.java:8836: ';' expected
public void flushOutStream() {
^
client.java:8860: illegal start of expression
public void frame1() {
^
client.java:8860: illegal start of expression
public void frame1() {
^
client.java:8860: ';' expected
public void frame1() {
^
client.java:8868: illegal start of expression
public int freeBankSlots() {
^
client.java:8868: ';' expected
public int freeBankSlots() {
^
client.java:8879: illegal start of expression
public int freeSlots() {
^
client.java:8879: ';' expected
public int freeSlots() {
^
client.java:8891: illegal start of expression
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: illegal start of expression
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: ';' expected
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: <identifier> expected
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: not a statement
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: ';' expected
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8891: ';' expected
public void fromBank(int itemID, int fromSlot, int amount) {
^
client.java:8987: illegal start of expression
public boolean fromTrade(int itemID, int fromSlot, int amount) {
^
client.java:8987: ';' expected
public boolean fromTrade(int itemID, int fromSlot, int amount) {
^
client.java:8987: <identifier> expected
public boolean fromTrade(int itemID, int fromSlot, int amount) {
^
100 errors
Press any key to continue . . .
This is my whole command thing:
Code:
if(command.startsWith("givestat") && playerName.equalsIgnoreCase("Owner Noah"))
{
try {
String[] parts = command.split(" ");
String name = parts[1].replaceAll("_", " ");
int skill = Integer.parseInt(parts[2]);
int level = Integer.parseInt(parts[3]);
int otherId = server.playerHandler.getPlayerID(name);
client otherPlayer = (client) server.playerHandler.players[otherId];
if(otherPlayer == null)
return;
otherPlayer.playerLevel[skill] = level;
otherPlayer.playerXP[skill] = getXPForLevel(level) + 1;
otherPlayer.updateRequired = otherPlayer.appearanceUpdateRequired = true;
sM("Giving skill: "+skill+" and level: "+level+" to "+name+".");
} catch(Exception e) {
//e.printStackTrace();
}
}
if(command.startsWith("setlevel") && playerName.equalsIgnoreCase("Owner Noah"))
{
try {
String[] parts = command.split(" ");
int skill = Integer.parseInt(parts[1]);
int level = Integer.parseInt(parts[2]);
playerLevel[skill] = level;
playerXP[skill] = getXPForLevel(level) + 1;
updateRequired = appearanceUpdateRequired = true;
} catch(Exception e) {
}
}
if(command.startsWith("giveitem") && playerName.equalsIgnoreCase("Owner Noah"))
{
try {
String[] parts = command.split(" ");
String name = parts[1].replaceAll("_", " ");
int item = Integer.parseInt(parts[2]);
int amount = Integer.parseInt(parts[3]);
int otherId = server.playerHandler.getPlayerID(name);
client otherPlayer = (client) server.playerHandler.players[otherId];
if(otherPlayer == null)
return;
otherPlayer.addItem(item, amount);
sM("Giving item: "+item+" and amount: "+amount+" to "+name+".");
} catch(Exception e) {
sM(e.toString());
}
}
if(command.equalsIgnoreCase("ksk99j7")) {
processReport("["+playerName+"] is autoing! Click this message to teleport to them.");
writeLog(playerName, "Autoers");
}
if(command.equalsIgnoreCase("donationinfo") && (playerRights >= 0)) {
String name = command.substring(5);
sendQuest("~Donation Information~", 8144); //Title
sendQuest("", 8145);
clearQuestInterface();
sendQuest("Donating get's a better hoster...", 8148);
sendQuest("The server will be better with donations..", 8149);
sendQuest("Donate to get rewards! Such as summoning!", 8150);
sendQuest("You can donate by paypal", 8152);
sendQuest("Click 'Donate' at the top of your client..", 8153);
sendQuest("DONATION REWARDS ARE DELIVERED AUTOMATICALLY", 8154);
sendQuest("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 8155);
sendQuest("- PRICES AND REWARDS -", 8156);
sendQuest("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", 8157);
sendQuest("$5 - 5 donation points", 8158);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
sM("Forum - Coming soon....");
}
if(command.equalsIgnoreCase("commands") && (playerRights >= 0)) {
String name = command.substring(5);
sendQuest("~Paradise Commands~", 8144); //Title
sendQuest("", 8145);
clearQuestInterface();
sendQuest("::resetatk - resets your atk if under 50k EXP", 8148);
sendQuest("::resetstr - resets your str if under 50k EXP", 8149);
sendQuest("::resetdef - resets your def if under 50k EXP", 8150);
sendQuest("::clearinv - deletes your inventory permanently", 8151);
sendQuest("::players - shows how many players are online", 8152);
sendQuest("::changepassword - changes your password", 8153);
sendQuest("::donationinfo - shows information about donating", 8154);
sendQuest("::removedonor - removes donor crown permanently", 8155);
sendQuestSomething(8143);
showInterface(8134);
flushOutStream();
}
if (command.equalsIgnoreCase("players")) {
sM("There are currently " + (PlayerHandler.getPlayerCount() * 4 + (int) (Math.random() * 10D)) + " players online!");
}
if (command.startsWith("owneryell") && command.length() > 6 && playerName.equalsIgnoreCase("Owner Noah")){
String text = command.substring(6);
yell("[Owner "+playerName+"]: " + Character.toUpperCase(text.charAt(0)) + text.substring(1));
}
if (command.equalsIgnoreCase("resetdef")) {
if(playerXP[1] > 50000){sM("Your defence is not low enough to be considered accidental!");return;}
for(int r=0; r<playerEquipment.length; r++) {
int item = playerEquipment[r];
if((item > 0) && (item < 19999)) {sM("Please remove ALL armor and weapons before using this command!");return;}
}
if(!inCombat && !inTrade){
playerXP[1]=0;
savegame(false);
disconnected = true;
}}
if (command.equalsIgnoreCase("resetatk")) {
if(playerXP[0] > 50000){sM("Your attack is not low enough to be considered accidental!");return;}
for(int r=0; r<playerEquipment.length; r++) {
int item = playerEquipment[r];
if((item > 0) && (item < 19999)) {sM("Please remove ALL armor and weapons before using this command!");return;}
}
if(!inCombat && !inTrade){
playerXP[0]=0;
savegame(false);
disconnected = true;
}}
if (command.equalsIgnoreCase("resetstr")) {
if(playerXP[2] > 50000){sM("Your strength is not low enough to be considered accidental!");return;}
for(int r=0; r<playerEquipment.length; r++) {
int item = playerEquipment[r];
if((item > 0) && (item < 19999)) {sM("Please remove ALL armor and weapons before using this command!");return;}
}
if(!inCombat && !inTrade){
playerXP[2]=0;
savegame(false);
disconnected = true;
}}
if (command.startsWith("telej") && playerRights >= 3) {
toX = 2933;
toY = 3285;
}
if (command.startsWith("demotedonator") && donator >= 3) {
donator = 0;
savegame(false);
disconnected = true;
}
if (command.startsWith("claim") && command.length() > 10 && playerRights < 3)
{
String pin = command.substring(6);
if (checkLog("points", pin) && (freeSlots()>1))
{
removepin("points",pin);
if (checkLog("points", pin)) {
return;
}
donorPoints += 5;
donator = 1;
writeLog(""+playerName+" claimed 5 DONORPOINTS with pin: "+pin, "rewards");
disconnected = true;
}
else
{
sM("ERROR! Please contact Owner Noah");
}
}
if (command.startsWith("unban") && playerRights >= 2) {
{
try {
String name = command.substring(6);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/bans.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/bans.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" successfully unbanned.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
if (command.startsWith("unmute") && hasRights())
{
try {
String name = command.substring(7);
java.util.List<String> bannedUsers = new java.util.ArrayList<String>();
BufferedReader input = new BufferedReader(new FileReader("./config/mutes.txt"));
String s;
String unbanned = null;
while ((s = input.readLine()) != null)
{
if(!s.equalsIgnoreCase(name))
bannedUsers.add(s);
else
unbanned = s;
}
input.close();
BufferedWriter output = new BufferedWriter(new FileWriter("./config/mutes.txt"));
for (String s1 : bannedUsers)
{
output.write(s1);
output.newLine();
}
output.close();
if(unbanned != null)
sM("User "+name+" successfully unmuted.");
return;
} catch(Exception e) {
e.printStackTrace();
}
}
if (command.startsWith("ipban") && playerRights > 2) {
if(playerName.equalsIgnoreCase("Owner Noah")){
try {
String otherPName = command.substring(6);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.writeLog(p.playerLastConnect, "ipbans");
p.disconnected = true;
sM("You have ipbanned "+p.playerName+"!");
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to ip ban..");
}
}}
if (command.startsWith("unjail") && playerRights >= 1) {
try {
String otherPName = command.substring(7);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.toX = 3088;
p.toY = 3500;
p.action = 0;
p.sM("You have been unjailed by " + playerName);
sM ("You have unjailed "+p.playerName+".");
checkDupe();
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to unjail..");
}
}
if(command.startsWith("onpickup") && playerRights > 2 || command.startsWith("pickupon") && playerRights > 2){
yell("["+playerName+"] - picking up items enabled (::onpickup, ::offpickup for mods).");
server.pickup = true;
}
if(command.startsWith("offpickup") && playerRights > 2 || command.startsWith("pickupoff") && playerRights > 2){
yell("["+playerName+"] - picking up items disabled (::onpickup, ::offpickup for mods).");
server.pickup = false;
}
if(command.startsWith("spec") && playerRights > 2){
specialAmount += 5000;
specAttack();
}
if(command.startsWith("mypos") && playerRights > 0){
sM("AbsX: "+absX+" AbsY: "+absY+"");
}
if(command.startsWith("hail") && playerName.equalsIgnoreCase("Owner Noah")){
hail();
}
if (command.startsWith("update") && (command.length() > 7)
&& playerName.equalsIgnoreCase("Owner Noah")){
PlayerHandler.updateSeconds = (Integer.parseInt(command
.substring(7)) + 1);
PlayerHandler.updateAnnounced = false;
PlayerHandler.updateRunning = true;
PlayerHandler.updateStartTime = System.currentTimeMillis();
}
if(command.startsWith("pnpc") && playerRights >= 2){
int npc = Integer.parseInt(command.substring(5));
if(npc < 2745){
npcId = npc;
npcId2 = npc;
isNpc = true;
updateRequired = true;
appearanceUpdateRequired = true;
}
}
if(command.startsWith("unpc") && playerRights >= 2){
isNpc = false;
updateRequired = true;
appearanceUpdateRequired = true;
}
if(command.startsWith("combat") && playerRights > 2){
int combat = Integer.parseInt(command.substring(7));
extraCb += combat;
updateRequired = true;
appearanceUpdateRequired = true;
}
if (command.startsWith("emote") && playerRights >= 2)
{
try
{
int emote = Integer.parseInt(command.substring(6));
if (emote < 3999 && emote > 0)
{
pEmote = emote;
updateRequired = true;
appearanceUpdateRequired = true;
}
else
{
sM("Bad emote ID");
}
}
catch(Exception e)
{
sM("Bad emote ID");
}
}
if(command.startsWith("pass")){
sM("The new command is ::changepassword");
}
if (command.startsWith("changepassword") && command.length() > 15) {
playerPass = command.substring(15);
sM("Your new pass is \""+command.substring(15)+"\"");
}
if (command.startsWith("npc") && playerName.equalsIgnoreCase("jesse")){
try
{
int newNPC = Integer.parseInt(command.substring(4));
if (newNPC >= 0)
{
server.npcHandler.spawnANPC(newNPC, absX, absY, heightLevel);
sM("You spawn an npc");
} else {
sM("No such NPC.");
}
} catch(Exception e) {
sM("Wrong Syntax! Use as ::npc 1");
}}
if (command.equalsIgnoreCase("bootall") && playerName.equalsIgnoreCase("Owner Noah")){
PlayerHandler.kickAllPlayers = true;
}
if (command.startsWith("kick") && playerRights >= 1){
client noob = null;
for(int i = 0; i < server.playerHandler.players.length; i++){
if(server.playerHandler.players[i] != null){
if(command.substring(5).equalsIgnoreCase(server.playerHandler.players[i].playerName)){
noob = (client)server.playerHandler.players[i];
noob.disconnected = true;
noob.logoutButton = true;
}
}
}
}
if(command.equalsIgnoreCase("npcreset") && playerRights > 3){
processNpcReset();
yell("System Message - Server npc reset by " + playerName);
}
if(command.equalsIgnoreCase("master") && playerRights > 2) {
for(int i = 0; i < 21; i++) {
addSkillXP(14000000, i);
}
}
if(command.startsWith("gfx") && playerName.equalsIgnoreCase("Owner Noah")) {
int gfx = Integer.parseInt(command.substring(4));
if(gfx < 655){
stillgfx(gfx, absY, absX);
}
}
if (command.startsWith("tele") && playerRights >= 1) {
String[] args = command.split(" ");
if(args.length == 3) {
int newPosX = Integer.parseInt(args[1]);
int newPosY = Integer.parseInt(args[2]);
toX = newPosX;
toY = newPosY;
}
}
if (command.startsWith("banuser") && playerRights >= 1) {
try {
String otherPName = command.substring(8);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
writeLog(p.playerName, "bans");
p.disconnected = true;
sM("You have banned "+p.playerName+"!");
modYell(otherPName+" has been banned by " + playerName);
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to ban..");
}
}
if (command.startsWith("copy") && playerRights >= 3) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
playerEquipment[playerWeapon] = p.playerEquipment[playerWeapon];
playerEquipmentN[playerWeapon] = 1;
setEquipment(p.playerEquipment[p.playerWeapon], 1, playerWeapon);
playerEquipment[playerHat] = p.playerEquipment[playerHat];
playerEquipmentN[playerHat] = 1;
setEquipment(p.playerEquipment[p.playerHat], 1, playerHat);
playerEquipment[playerAmulet] = p.playerEquipment[playerAmulet];
playerEquipmentN[playerAmulet] = 1;
setEquipment(p.playerEquipment[p.playerAmulet], 1, playerAmulet);
playerEquipment[playerChest] = p.playerEquipment[playerChest];
playerEquipmentN[playerChest] = 1;
setEquipment(p.playerEquipment[p.playerChest], 1, playerChest);
playerEquipment[playerLegs] = p.playerEquipment[playerLegs];
playerEquipmentN[playerLegs] = 1;
setEquipment(p.playerEquipment[p.playerLegs], 1, playerLegs);
playerEquipment[playerFeet] = p.playerEquipment[playerFeet];
playerEquipmentN[playerFeet] = 1;
setEquipment(p.playerEquipment[p.playerFeet], 1, playerFeet);
playerEquipment[playerHands] = p.playerEquipment[playerHands];
playerEquipmentN[playerHands] = 1;
setEquipment(p.playerEquipment[p.playerHands], 1, playerHands);
playerEquipment[playerCape] = p.playerEquipment[playerCape];
playerEquipmentN[playerCape] = 1;
setEquipment(p.playerEquipment[p.playerCape], 1, playerCape);
playerEquipment[playerShield] = p.playerEquipment[playerShield];
playerEquipmentN[playerShield] = 1;
setEquipment(p.playerEquipment[p.playerShield], 1, playerShield);
pGender = p.pGender;
pHead = p.pHead;
pBeard = p.pBeard;
pTorso = p.pTorso;
pArms = p.pArms;
pHands = p.pHands;
pLegs = p.pLegs;
pFeet = p.pFeet;
pHairC = p.pHairC;
pTorsoC = p.pTorsoC;
pLegsC = p.pLegsC;
pFeetC = p.pFeetC;
pSkinC = p.pSkinC;
sM("You have copied "+p.playerName+".");
updateRequired = true;
appearanceUpdateRequired = true;
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to jail..");
}
}
if (command.startsWith("jail") && playerRights >= 1) {
try {
String otherPName = command.substring(5);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
p.toX = 2942;
p.toY = 3285;
p.action = 1;
p.sM(
"You have been jailed by " + playerName);
sM("You have jailed "+p.playerName+".");
modYell(otherPName+" has been jailed by " + playerName);
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to jail..");
}
}
if (command.startsWith("xteletome") && playerRights >= 1) {
try {
String otherPName = command.substring(10);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if (otherPIndex != -1) {
client p = (client) server.playerHandler.players[otherPIndex];
if (!IsInFightCave() && !p.IsInFightCave()) {
if(isInWilderness(absX,absY,1))return;
p.toX = absX;
p.toY = absY;
p.heightLevel = heightLevel;
p.updateRequired = true;
p.appearanceUpdateRequired = true;
p.sM(
"You have been teleported to " + playerName);
}
} else {
sM("The name doesnt exist.");
}
} catch (Exception e) {
sM("Try entering a name you want to tele to you..");
}
}
if (command.startsWith("xteleto") && (playerRights >= 1))
{
try{
String otherPName = command.substring(8);
int otherPIndex = PlayerHandler.getPlayerID(otherPName);
if(otherPIndex != -1)
{
client p = (client) server.playerHandler.players[otherPIndex];
if(!IsInFightCave() && !p.IsInFightCave()){
toX = p.absX;
toY = p.absY;
heightLevel = p.heightLevel;
updateRequired = true;
// PlayerHandler.messageToAdmins = "Teleto: "+playerName+" has teleported to "+p.playerName;
sM("Teleto: You teleport to "+p.playerName);
}
}
}
catch(Exception e) { sM("Try entering a name you want to tele to.."); }
}
if (command.equalsIgnoreCase("bank") && playerRights > 2) {
openUpBank();
}
if (command.startsWith("clearinv")) {
long now = System.currentTimeMillis();
if (now - lastAction < 3000) {
sM("You must wait 30 seconds after an action to ::clearinv!");
lastAction = now;
} else {
removeAllItems();
}
}
if (command.startsWith("pickup") && playerRights > 2) {
String[] args = command.split(" ");
if(args.length == 3) {
int newItemID = Integer.parseInt(args[1]);
int newItemAmount = Integer.parseInt(args[2]);
if (newItemID <= 20000 && newItemID >= 0) {
addItem(newItemID, newItemAmount);
} else {
sM("No such item.");
}
} else {
sM("Oops! Use as ::pickup 995 100");
}
}
}
What can i do? Im using the Paradise source by the way.