Skip to content

Commit 369975a

Browse files
committed
some fixes
1 parent aac94d9 commit 369975a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+184
-257
lines changed

src/main/java/me/ANONIMUS/proxy/BetterProxy.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package me.ANONIMUS.proxy;
22

33
import lombok.Data;
4-
import me.ANONIMUS.proxy.protocol.ProxyServer;
5-
import me.ANONIMUS.proxy.threads.MemoryFreeThread;
6-
import me.ANONIMUS.proxy.threads.MessageThread;
74
import me.ANONIMUS.proxy.command.CommandManager;
85
import me.ANONIMUS.proxy.config.ConfigManager;
96
import me.ANONIMUS.proxy.objects.Account;
7+
import me.ANONIMUS.proxy.protocol.ProxyServer;
108
import me.ANONIMUS.proxy.protocol.packet.PacketRegistry;
9+
import me.ANONIMUS.proxy.threads.MemoryFreeThread;
10+
import me.ANONIMUS.proxy.threads.MessageThread;
1111
import me.ANONIMUS.proxy.threads.TitleLagThread;
12-
import me.ANONIMUS.proxy.utils.java.FileUtil;
12+
import me.ANONIMUS.proxy.utils.FileUtil;
1313

1414
import java.io.File;
1515
import java.util.ArrayList;

src/main/java/me/ANONIMUS/proxy/command/CommandManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package me.ANONIMUS.proxy.command;
22

3-
import me.ANONIMUS.proxy.protocol.objects.Player;
4-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
5-
import me.ANONIMUS.proxy.utils.proxy.ScoreboardUtil;
63
import me.ANONIMUS.proxy.enums.CommandType;
74
import me.ANONIMUS.proxy.enums.ConnectedType;
85
import me.ANONIMUS.proxy.enums.GroupType;
6+
import me.ANONIMUS.proxy.protocol.objects.Player;
7+
import me.ANONIMUS.proxy.utils.ChatUtil;
8+
import me.ANONIMUS.proxy.utils.ScoreboardUtil;
99
import org.reflections.Reflections;
1010

1111
import java.util.ArrayList;
@@ -18,7 +18,7 @@ public class CommandManager {
1818
private final List<Command> commands = new ArrayList<>();
1919

2020
public void init() {
21-
new Reflections("me.AlshainTeam.proxy.command.impl").getSubTypesOf(Command.class).forEach(cmd -> {
21+
new Reflections("me.ANONIMUS.proxy.command.impl").getSubTypesOf(Command.class).forEach(cmd -> {
2222
try {
2323
commands.add(cmd.newInstance());
2424
} catch (InstantiationException | IllegalAccessException e) {

src/main/java/me/ANONIMUS/proxy/command/impl/CommandHelp.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package me.ANONIMUS.proxy.command.impl;
22

3-
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.protocol.packet.impl.server.play.ServerChatPacket;
53
import me.ANONIMUS.proxy.BetterProxy;
4+
import me.ANONIMUS.proxy.command.Command;
65
import me.ANONIMUS.proxy.enums.ConnectedType;
76
import me.ANONIMUS.proxy.protocol.objects.Player;
8-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
7+
import me.ANONIMUS.proxy.protocol.packet.impl.server.play.ServerChatPacket;
8+
import me.ANONIMUS.proxy.utils.ChatUtil;
99
import net.kyori.adventure.text.Component;
1010
import net.kyori.adventure.text.event.ClickEvent;
1111
import net.kyori.adventure.text.event.HoverEvent;
@@ -16,7 +16,7 @@
1616

1717
public class CommandHelp extends Command {
1818
public CommandHelp() {
19-
super("help", "pomoc", "helpful commands", "[page]", null, ConnectedType.NONE);
19+
super("help", null, "helpful commands", "[page]", null, ConnectedType.NONE);
2020
}
2121

2222
@Override

src/main/java/me/ANONIMUS/proxy/command/impl/CommandLogin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package me.ANONIMUS.proxy.command.impl;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
54
import me.ANONIMUS.proxy.enums.ConnectedType;
65
import me.ANONIMUS.proxy.protocol.objects.Player;
7-
import me.ANONIMUS.proxy.utils.proxy.WorldUtil;
6+
import me.ANONIMUS.proxy.utils.ChatUtil;
7+
import me.ANONIMUS.proxy.utils.WorldUtil;
88

99
public class CommandLogin extends Command {
1010
public CommandLogin() {

src/main/java/me/ANONIMUS/proxy/command/impl/admins/CommandAlert.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package me.ANONIMUS.proxy.command.impl.admins;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.managers.PlayerManager;
5-
import me.ANONIMUS.proxy.protocol.objects.Player;
6-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
74
import me.ANONIMUS.proxy.enums.CommandType;
85
import me.ANONIMUS.proxy.enums.ConnectedType;
6+
import me.ANONIMUS.proxy.managers.PlayerManager;
7+
import me.ANONIMUS.proxy.protocol.objects.Player;
8+
import me.ANONIMUS.proxy.utils.ChatUtil;
99

1010
public class CommandAlert extends Command {
1111
public CommandAlert() {

src/main/java/me/ANONIMUS/proxy/command/impl/admins/CommandFree.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import me.ANONIMUS.proxy.enums.CommandType;
55
import me.ANONIMUS.proxy.enums.ConnectedType;
66
import me.ANONIMUS.proxy.protocol.objects.Player;
7-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
7+
import me.ANONIMUS.proxy.utils.ChatUtil;
88

99
public class CommandFree extends Command {
1010
public CommandFree() {

src/main/java/me/ANONIMUS/proxy/command/impl/admins/CommandKick.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package me.ANONIMUS.proxy.command.impl.admins;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.managers.PlayerManager;
5-
import me.ANONIMUS.proxy.protocol.objects.Player;
6-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
74
import me.ANONIMUS.proxy.enums.CommandType;
85
import me.ANONIMUS.proxy.enums.ConnectedType;
6+
import me.ANONIMUS.proxy.managers.PlayerManager;
7+
import me.ANONIMUS.proxy.protocol.objects.Player;
8+
import me.ANONIMUS.proxy.utils.ChatUtil;
99

1010
public class CommandKick extends Command {
1111
public CommandKick() {

src/main/java/me/ANONIMUS/proxy/command/impl/admins/CommandStatus.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package me.ANONIMUS.proxy.command.impl.admins;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.protocol.objects.Player;
5-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
64
import me.ANONIMUS.proxy.enums.CommandType;
75
import me.ANONIMUS.proxy.enums.ConnectedType;
6+
import me.ANONIMUS.proxy.protocol.objects.Player;
7+
import me.ANONIMUS.proxy.utils.ChatUtil;
88

99
import javax.management.Attribute;
1010
import javax.management.AttributeList;
@@ -58,7 +58,7 @@ private String humanReadableByteCount(long bytes) {
5858
if (bytes < 1536L) {
5959
return bytes + " B";
6060
}
61-
int exp = (int) (Math.log((double) bytes) / Math.log((double) 1536.0));
61+
int exp = (int) (Math.log((double) bytes) / Math.log(1536.0));
6262
String pre = String.valueOf("KMGTPE".charAt(exp - 1));
6363
return String.format("%.2f %sB", (double) bytes / Math.pow(1024.0, exp), pre);
6464
}

src/main/java/me/ANONIMUS/proxy/command/impl/admins/CommandThreads.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package me.ANONIMUS.proxy.command.impl.admins;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.protocol.objects.Player;
5-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
64
import me.ANONIMUS.proxy.enums.CommandType;
75
import me.ANONIMUS.proxy.enums.ConnectedType;
6+
import me.ANONIMUS.proxy.protocol.objects.Player;
7+
import me.ANONIMUS.proxy.utils.ChatUtil;
88

99
import java.util.Set;
1010

src/main/java/me/ANONIMUS/proxy/command/impl/bots/CommandBotQuit.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package me.ANONIMUS.proxy.command.impl.bots;
22

33
import me.ANONIMUS.proxy.command.Command;
4-
import me.ANONIMUS.proxy.protocol.objects.Bot;
5-
import me.ANONIMUS.proxy.protocol.objects.Player;
6-
import me.ANONIMUS.proxy.utils.proxy.ChatUtil;
74
import me.ANONIMUS.proxy.enums.CommandType;
85
import me.ANONIMUS.proxy.enums.ConnectedType;
6+
import me.ANONIMUS.proxy.protocol.objects.Bot;
7+
import me.ANONIMUS.proxy.protocol.objects.Player;
8+
import me.ANONIMUS.proxy.utils.ChatUtil;
99

1010
public class CommandBotQuit extends Command {
1111
public CommandBotQuit() {
@@ -32,7 +32,7 @@ public void onCommand(Player sender, String cmd, String[] args) throws Exception
3232
}
3333
}
3434
if (b == null) {
35-
ChatUtil.sendChatMessage("&cThe bot you provided with the nickname &4" + args[1] + " &cdoes not exist", sender, true);
35+
ChatUtil.sendChatMessage("&cThe bot with a nickname &4" + args[1] + " &cdoes not exist", sender, true);
3636
return;
3737
}
3838
b.getSession().getChannel().close();

0 commit comments

Comments
 (0)