oops modes now work properly for antichunkban

This commit is contained in:
Bella 2019-12-01 20:54:27 -05:00
parent dc00d785b3
commit b188af2759
1 changed files with 5 additions and 3 deletions

View File

@ -59,9 +59,11 @@ public class AntiChunkBan extends Module {
@Listener
public void onReceivePacket(EventReceivePacket event) {
if (event.getStage() == EventStageable.EventStage.PRE) {
if (event.getPacket() instanceof SPacketChunkData) {
event.setCanceled(true);
if (modeThing.getValue().equals(ModeThing.PACKET)) {
if (event.getStage() == EventStageable.EventStage.PRE) {
if (event.getPacket() instanceof SPacketChunkData) {
event.setCanceled(true);
}
}
}
}