Skip to content

Commit

Permalink
reobfuscate to match original code
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonsojon committed Nov 21, 2024
1 parent bc2ccef commit e59322a
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 120 deletions.
32 changes: 16 additions & 16 deletions src/main/java/net/minecraft/server/ConsoleCommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
if (!s.toLowerCase().startsWith("help") && !s.toLowerCase().startsWith("?")) {
if (s.toLowerCase().startsWith("list")) {
if (!checkPermission(listener, "list")) return true; // Craftbukkit
icommandlistener.sendMessage("Connected players: " + serverconfigurationmanager.getPlayerNames());
icommandlistener.sendMessage("Connected players: " + serverconfigurationmanager.c());
} else if (s.toLowerCase().startsWith("stop")) {
if (!checkPermission(listener, "stop")) return true; // Craftbukkit
this.print(s1, "Stopping the server..");
Expand Down Expand Up @@ -104,19 +104,19 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
if (s.toLowerCase().startsWith("op ")) {
if (!checkPermission(listener, "op.give")) return true; // Craftbukkit
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.addOperator(s2);
serverconfigurationmanager.e(s2);
this.print(s1, "Opping " + s2);
serverconfigurationmanager.assignPlayerToDimension(s2, "\u00A7eYou are now op!");
serverconfigurationmanager.a(s2, "\u00A7eYou are now op!");
} else if (s.toLowerCase().startsWith("deop ")) {
if (!checkPermission(listener, "op.take")) return true; // Craftbukkit
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.reloadWhiteList(s2);
serverconfigurationmanager.assignPlayerToDimension(s2, "\u00A7eYou are no longer op!");
serverconfigurationmanager.f(s2);
serverconfigurationmanager.a(s2, "\u00A7eYou are no longer op!");
this.print(s1, "De-opping " + s2);
} else if (s.toLowerCase().startsWith("ban-ip ")) {
if (!checkPermission(listener, "ban.ip")) return true; // Craftbukkit
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.getPlayerNames(s2);
serverconfigurationmanager.c(s2);
this.print(s1, "Banning ip " + s2);
} else if (s.toLowerCase().startsWith("pardon-ip ")) {
if (!checkPermission(listener, "unban.ip")) return true; // Craftbukkit
Expand All @@ -129,9 +129,9 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
if (s.toLowerCase().startsWith("ban ")) {
if (!checkPermission(listener, "ban.player")) return true; // Craftbukkit
s2 = s.substring(s.indexOf(" ")).trim();
serverconfigurationmanager.assignPlayerToDimension(s2);
serverconfigurationmanager.a(s2);
this.print(s1, "Banning " + s2);
entityplayer = serverconfigurationmanager.loadBannedIps(s2);
entityplayer = serverconfigurationmanager.i(s2);
if (entityplayer != null) {
entityplayer.netServerHandler.disconnect("Banned by admin");
}
Expand Down Expand Up @@ -173,8 +173,8 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
if (!checkPermission(listener, "teleport")) return true; // Craftbukkit
astring = s.split(" ");
if (astring.length == 3) {
entityplayer = serverconfigurationmanager.loadBannedIps(astring[1]);
entityplayer2 = serverconfigurationmanager.loadBannedIps(astring[2]);
entityplayer = serverconfigurationmanager.i(astring[1]);
entityplayer2 = serverconfigurationmanager.i(astring[2]);
if (entityplayer == null) {
icommandlistener.sendMessage("Can\'t find user " + astring[1] + ". No tp.");
} else if (entityplayer2 == null) {
Expand All @@ -200,7 +200,7 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
}

s3 = astring[1];
entityplayer2 = serverconfigurationmanager.loadBannedIps(s3);
entityplayer2 = serverconfigurationmanager.i(s3);
if (entityplayer2 != null) {
try {
k = Integer.parseInt(astring[2]);
Expand Down Expand Up @@ -278,7 +278,7 @@ public boolean handle(ServerCommand servercommand) { // CraftBukkit - returns bo
a.info("[" + s1 + "->" + astring[1] + "] " + s);
s = "\u00A77" + s1 + " whispers " + s;
a.info(s);
if (!serverconfigurationmanager.assignPlayerToDimension(astring[1], (Packet) (new Packet3Chat(s)))) {
if (!serverconfigurationmanager.a(astring[1], (Packet) (new Packet3Chat(s)))) {
icommandlistener.sendMessage("There\'s no player by that name online.");
}
}
Expand Down Expand Up @@ -319,7 +319,7 @@ private void a(String s, String s1, ICommandListener icommandlistener) {
this.server.propertyManager.b("white-list", false);
} else if ("list".equals(s2)) {
if (!checkPermission(listener, "whitelist.list")) return; // Craftbukkit
Set set = this.server.serverConfigurationManager.addOperator();
Set set = this.server.serverConfigurationManager.e();
String s3 = "";

String s4;
Expand All @@ -335,16 +335,16 @@ private void a(String s, String s1, ICommandListener icommandlistener) {
if ("add".equals(s2) && astring.length == 3) {
if (!checkPermission(listener, "whitelist.add")) return; // Craftbukkit
s5 = astring[2].toLowerCase();
this.server.serverConfigurationManager.loadOps(s5);
this.server.serverConfigurationManager.k(s5);
this.print(s, "Added " + s5 + " to white-list");
} else if ("remove".equals(s2) && astring.length == 3) {
if (!checkPermission(listener, "whitelist.remove")) return; // Craftbukkit
s5 = astring[2].toLowerCase();
this.server.serverConfigurationManager.saveOps(s5);
this.server.serverConfigurationManager.l(s5);
this.print(s, "Removed " + s5 + " from white-list");
} else if ("reload".equals(s2)) {
if (!checkPermission(listener, "whitelist.reload")) return; // Craftbukkit
this.server.serverConfigurationManager.reloadWhiteList();
this.server.serverConfigurationManager.f();
this.print(s, "Reloaded white-list from file");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/minecraft/server/EntityPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void a(boolean flag) {
if (this.F >= 1.0F) {
this.F = 1.0F;
this.D = 10;
this.b.serverConfigurationManager.reloadWhiteList(this);
this.b.serverConfigurationManager.f(this);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/minecraft/server/EntityTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class EntityTracker {
public EntityTracker(MinecraftServer minecraftserver, int i) {
this.c = minecraftserver;
this.e = i;
this.d = minecraftserver.serverConfigurationManager.assignPlayerToDimension();
this.d = minecraftserver.serverConfigurationManager.a();
}

// CraftBukkit - synchronized
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/minecraft/server/NetLoginHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void a(Packet1Login packet1login) {
}

public void b(Packet1Login packet1login) {
EntityPlayer entityplayer = this.server.serverConfigurationManager.assignPlayerToDimension(this, packet1login.name);
EntityPlayer entityplayer = this.server.serverConfigurationManager.a(this, packet1login.name);

if (entityplayer != null) {
this.server.serverConfigurationManager.b(entityplayer);
Expand All @@ -174,9 +174,9 @@ public void b(Packet1Login packet1login) {
//Poseidon End
netserverhandler.sendPacket(new Packet1Login("", entityplayer.id, worldserver.getSeed(), (byte) worldserver.worldProvider.dimension));
netserverhandler.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z));
this.server.serverConfigurationManager.assignPlayerToDimension(entityplayer, worldserver);
this.server.serverConfigurationManager.a(entityplayer, worldserver);
// this.server.serverConfigurationManager.sendAll(new Packet3Chat("\u00A7e" + entityplayer.name + " joined the game.")); // CraftBukkit - message moved to join event
this.server.serverConfigurationManager.getPlayerNames(entityplayer);
this.server.serverConfigurationManager.c(entityplayer);
netserverhandler.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
this.server.networkListenThread.a(netserverhandler);
netserverhandler.sendPacket(new Packet4UpdateTime(entityplayer.getPlayerTime())); // CraftBukkit - add support for player specific time
Expand Down
Loading

0 comments on commit e59322a

Please sign in to comment.