From 9ca2b6482a667e944f977d1f5d10223735262931 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 13 Apr 2021 10:12:21 +0200 Subject: [PATCH] Remove Unused Import --- .../src/de/steamwar/fightsystem/listener/Recording.java | 6 ++---- .../src/de/steamwar/fightsystem/record/RecordSystem.java | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java index 762db4a..f3bd7c9 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/Recording.java @@ -87,7 +87,7 @@ public class Recording implements Listener { (hand == EnumWrappers.Hand.OFF_HAND && p.getInventory().getItemInOffHand().getType() == Material.BOW))) return; - RecordSystem.bowSpan(p, true, hand == EnumWrappers.Hand.MAIN_HAND?1:0); + RecordSystem.bowSpan(p, true, hand != EnumWrappers.Hand.MAIN_HAND); ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(FightSystem.getPlugin(), PacketType.Play.Client.BLOCK_DIG) { @Override public void onPacketReceiving(PacketEvent e) { @@ -96,7 +96,7 @@ public class Recording implements Listener { PacketContainer packetDig = e.getPacket(); if(packetDig.getPlayerDigTypes().read(0) == EnumWrappers.PlayerDigType.RELEASE_USE_ITEM) { - RecordSystem.bowSpan(e.getPlayer(), false, hand == EnumWrappers.Hand.MAIN_HAND?0:1); + RecordSystem.bowSpan(e.getPlayer(), false, hand != EnumWrappers.Hand.MAIN_HAND); ProtocolLibrary.getProtocolManager().removePacketListener(this); } } @@ -275,6 +275,4 @@ public class Recording implements Listener { FightPlayer fp = Fight.getFightPlayer(p); return fp == null || !fp.isLiving() || FightState.getFightState() == FightState.SPECTATE; } - - } diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/record/RecordSystem.java b/FightSystem_Main/src/de/steamwar/fightsystem/record/RecordSystem.java index 526e75d..9f2cc74 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/record/RecordSystem.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/record/RecordSystem.java @@ -64,7 +64,7 @@ public class RecordSystem { * PlayerItemPacket (0x07) + int EntityId + String item + boolean enchanted + String slot * ArrowSpawnPacket (0x08) + int EntityId * FireballSpawnPacket (0x09) + int EntityId - * BowSpanPacket (0x0A) + int EntityId + boolean start + int hand + * BowSpanPacket (0x0A) + int EntityId + boolean start + hand * PlayerDamagePacket (0x0B) + int EntityId * SetOnFire (0x0C) + int EntityId + boolean perma * @@ -175,11 +175,11 @@ public class RecordSystem { spawnEntity(e); } - public static synchronized void bowSpan(Entity e, boolean start, int hand) { + public static synchronized void bowSpan(Entity e, boolean start, boolean offHand) { Recorder.rByte(0x0A); Recorder.rInt(e.getEntityId()); Recorder.rBoolean(start); - Recorder.rInt(hand); + Recorder.rBoolean(hand); Recorder.flush(); }