mirror of
https://github.com/SerendipityR-2022/EndMinecraftPlusV2.git
synced 2024-10-18 05:28:05 +00:00
Add: 全局代码格式化
This commit is contained in:
parent
851601f37d
commit
0605c8f355
@ -40,7 +40,8 @@ public class CatAntiCheat {
|
||||
out.writeBytes(new byte[]{sendPacketID, 0, clientVersion, salt});
|
||||
// LogUtil.doLog(0,"发送PluginMessage: " + "CatAntiCheat" + " | " + Arrays.toString(buf.toByteArray()), "CatAntiCheat");
|
||||
session.send(new ClientPluginMessagePacket("CatAntiCheat", buf.toByteArray()));
|
||||
} catch (IOException ignored) {}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// File Check packet reply
|
||||
@ -168,7 +169,8 @@ public class CatAntiCheat {
|
||||
try (InputStream in = Files.newInputStream(file.toPath())) {
|
||||
return calcHash(in) + "\0" + file.getName();
|
||||
}
|
||||
} catch (IOException ignored) { }
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -214,7 +216,8 @@ public class CatAntiCheat {
|
||||
ImageIO.write(bufferedImage, "png", gzipOutputStream);
|
||||
gzipOutputStream.flush();
|
||||
gzipOutputStream.close();
|
||||
} catch (Exception ignored) {}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
return out.toByteArray();
|
||||
}
|
||||
|
@ -10,5 +10,6 @@ public abstract class MCForgeHandShake {
|
||||
}
|
||||
|
||||
public abstract void handle(Packet recvPacket);
|
||||
|
||||
public abstract String getFMLVersion();
|
||||
}
|
||||
|
@ -124,7 +124,9 @@ public class MCForgeHandShakeV2 extends MCForgeHandShake {
|
||||
private String targetNetworkReceiver;
|
||||
private byte[] payload;
|
||||
|
||||
public LoginWrapper() {}
|
||||
public LoginWrapper() {
|
||||
}
|
||||
|
||||
public LoginWrapper(String targetNetworkReceiver, byte[] payload) {
|
||||
this.targetNetworkReceiver = targetNetworkReceiver;
|
||||
this.payload = payload;
|
||||
|
@ -62,7 +62,8 @@ public class MCForgeMOTD {
|
||||
try {
|
||||
if (socket.isConnected())
|
||||
socket.close();
|
||||
} catch (IOException ignored) {}
|
||||
} catch (IOException ignored) {
|
||||
}
|
||||
}
|
||||
return modList;
|
||||
}
|
||||
|
@ -391,7 +391,8 @@ public class ConfigUtil {
|
||||
AttackPort = Integer.parseInt(re[2]);
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
public static HashMap<String, String> readModInfo(String directoryPath) {
|
||||
|
@ -82,7 +82,8 @@ public class DataUtil {
|
||||
try {
|
||||
String[] aPwdData = PwdData.split("@");
|
||||
botRegPasswordsMap.put(aPwdData[0], aPwdData[1]);
|
||||
} catch (Exception ignored) {}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
updateData(botRegPasswords);
|
||||
|
@ -6,5 +6,6 @@ import com.sun.jna.Platform;
|
||||
|
||||
public interface SetTitle extends Library {
|
||||
SetTitle INSTANCE = Native.loadLibrary((Platform.isWindows() ? "kernel32" : "c"), SetTitle.class);
|
||||
|
||||
boolean SetConsoleTitleA(String title);
|
||||
}
|
@ -20,6 +20,7 @@ public interface BotHandler {
|
||||
boolean hasClientFlag(Object client, String flag);
|
||||
|
||||
void setClientFlag(Object client, String flag, Object value);
|
||||
|
||||
Object getClientFlag(Object client, String flag);
|
||||
|
||||
void setClientTimeout(Object client, int timeout);
|
||||
|
@ -356,7 +356,8 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleOtherPacket(Object packet) {}
|
||||
public void handleOtherPacket(Object packet) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendChatPacket(Object client, String text) {
|
||||
|
@ -122,6 +122,7 @@ public class PacketHandler implements cn.serendipityr.EndMinecraftPlusV2.Multipl
|
||||
Session session = ((Client) client).getSession();
|
||||
ServerPlayerPositionRotationPacket positionRotationPacket = (ServerPlayerPositionRotationPacket) recvPacket;
|
||||
session.setFlag("location", new double[]{positionRotationPacket.getX(), positionRotationPacket.getY(), positionRotationPacket.getZ(), positionRotationPacket.getYaw(), positionRotationPacket.getPitch()});
|
||||
|
||||
if (ConfigUtil.PacketHandlerMove) {
|
||||
sendClientPlayerMovementPacket(session, true);
|
||||
ClientTeleportConfirmPacket teleportConfirmPacket = new ClientTeleportConfirmPacket(positionRotationPacket.getTeleportId());
|
||||
|
Loading…
Reference in New Issue
Block a user