forked from SteamWar/SteamWar
Remove unused code
This commit is contained in:
-4
@@ -27,12 +27,9 @@ import de.steamwar.fightsystem.fight.FightPlayer;
|
|||||||
import de.steamwar.fightsystem.utils.Message;
|
import de.steamwar.fightsystem.utils.Message;
|
||||||
import de.steamwar.fightsystem.utils.Region;
|
import de.steamwar.fightsystem.utils.Region;
|
||||||
import de.steamwar.fightsystem.utils.SWSound;
|
import de.steamwar.fightsystem.utils.SWSound;
|
||||||
import de.steamwar.techhider.ProtocolUtils;
|
|
||||||
import net.md_5.bungee.api.ChatMessageType;
|
import net.md_5.bungee.api.ChatMessageType;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class EnternCountdown extends Countdown {
|
public class EnternCountdown extends Countdown {
|
||||||
|
|
||||||
private static int calcTime(FightPlayer fp, Countdown countdown) {
|
private static int calcTime(FightPlayer fp, Countdown countdown) {
|
||||||
@@ -47,7 +44,6 @@ public class EnternCountdown extends Countdown {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private final FightPlayer fightPlayer;
|
private final FightPlayer fightPlayer;
|
||||||
private List<ProtocolUtils.ChunkPos> chunkPos;
|
|
||||||
|
|
||||||
public EnternCountdown(FightPlayer fp, Countdown countdown) {
|
public EnternCountdown(FightPlayer fp, Countdown countdown) {
|
||||||
super(calcTime(fp, countdown), new Message("ENTERN_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false);
|
super(calcTime(fp, countdown), new Message("ENTERN_COUNTDOWN"), SWSound.BLOCK_NOTE_PLING, false);
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
package de.steamwar.techhider;
|
package de.steamwar.techhider;
|
||||||
|
|
||||||
import com.google.common.primitives.Bytes;
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@@ -80,25 +79,6 @@ public class ProtocolUtils {
|
|||||||
return chunk;
|
return chunk;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static int readVarInt(byte[] array, int startPos) {
|
|
||||||
int numRead = 0;
|
|
||||||
int result = 0;
|
|
||||||
byte read;
|
|
||||||
do {
|
|
||||||
read = array[startPos + numRead];
|
|
||||||
int value = (read & 0b01111111);
|
|
||||||
result |= (value << (7 * numRead));
|
|
||||||
|
|
||||||
numRead++;
|
|
||||||
if (numRead > 5) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while ((read & 0b10000000) != 0);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int readVarInt(ByteBuf buf) {
|
public static int readVarInt(ByteBuf buf) {
|
||||||
int numRead = 0;
|
int numRead = 0;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
@@ -141,53 +121,4 @@ public class ProtocolUtils {
|
|||||||
writeVarInt(buf, varInt);
|
writeVarInt(buf, varInt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static int readVarIntLength(byte[] array, int startPos) {
|
|
||||||
int numRead = 0;
|
|
||||||
byte read;
|
|
||||||
do {
|
|
||||||
read = array[startPos + numRead];
|
|
||||||
numRead++;
|
|
||||||
if (numRead > 5) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while ((read & 0b10000000) != 0);
|
|
||||||
|
|
||||||
return numRead;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static byte[] writeVarInt(int value) {
|
|
||||||
List<Byte> buffer = new ArrayList<>(5);
|
|
||||||
do {
|
|
||||||
byte temp = (byte) (value & 0b01111111);
|
|
||||||
// Note: >>> means that the sign bit is shifted with the rest of the number rather than being left alone
|
|
||||||
value >>>= 7;
|
|
||||||
if (value != 0) {
|
|
||||||
temp |= 0b10000000;
|
|
||||||
}
|
|
||||||
buffer.add(temp);
|
|
||||||
} while (value != 0);
|
|
||||||
return Bytes.toArray(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static class ChunkPos {
|
|
||||||
final int x;
|
|
||||||
final int z;
|
|
||||||
|
|
||||||
public ChunkPos(int x, int z) {
|
|
||||||
this.x = x;
|
|
||||||
this.z = z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final int x() {
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final int z() {
|
|
||||||
return z;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user