Skip to content

Instantly share code, notes, and snippets.

@mooman219
Created June 11, 2013 22:50
Show Gist options
  • Save mooman219/5761453 to your computer and use it in GitHub Desktop.
Save mooman219/5761453 to your computer and use it in GitHub Desktop.
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"));
sleep(2L);
this.sendQueue.addToSendQueue(new Packet3Chat("/suicide"));
sleep(2L);
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));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment