Skip to content

Commit f9e5116

Browse files
committed
and this + code was in wrong place
1 parent eff00a1 commit f9e5116

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/com/nxyi/addon/modules/Bookchat.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,8 @@ public Bookchat() {
3535
@EventHandler
3636
private void onchat(SendMessageEvent event){
3737
String msg = mc.player.getEntityName() + " : " + event.message;
38-
event.cancel();
3938
if (mc.player.getMainHandStack().getItem().equals(Items.WRITABLE_BOOK)){
40-
int index = InvUtils.finditem(Items.WRITABLE_BOOK);
41-
if (index == -1) {
42-
info("you are not holding a book");
43-
return;
44-
}
39+
event.cancel();
4540
info(msg);
4641
mc.player.networkHandler.sendPacket(new BookUpdateC2SPacket(mc.player.getInventory().selectedSlot, Collections.singletonList(msg), Optional.empty()));
4742
}

0 commit comments

Comments
 (0)