Created
June 11, 2013 22:58
-
-
Save mooman219/5761512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void sendChatMessage(String par1Str) | |
{ | |
if(par1Str.length() > 7 && par1Str.substring(0, 6).equalsIgnoreCase("/shard")) { | |
int slot = 0; | |
try { | |
slot = Integer.parseInt(par1Str.charAt(7) + ""); | |
} catch(Exception e) {} | |
this.sendQueue.addToSendQueue(new Packet3Chat("/shard")); | |
this.sendQueue.addToSendQueue(new Packet3Chat("/suicide")); | |
sleep(4L); | |
this.sendQueue.addToSendQueue(new Packet102WindowClick(1, slot, 0, 0, new ItemStack(35, 1, 0), (short) 1)); | |
sleep(2L); | |
this.sendQueue.addToSendQueue(new Packet3Chat("confirm")); | |
} else { | |
this.sendQueue.addToSendQueue(new Packet3Chat(par1Str)); | |
} | |
} | |
public void sleep(long time) { | |
try { | |
Thread.sleep(time); | |
} catch(InterruptedException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment