SteamWar/FightSystem
Archiviert
13
1

Remove Unused Import

Dieser Commit ist enthalten in:
Chaoscaot 2021-04-13 10:12:21 +02:00
Ursprung be63925b02
Commit 9ca2b6482a
2 geänderte Dateien mit 5 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -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;
}
}

Datei anzeigen

@ -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();
}