Skip to content

Commit b74c110

Browse files
committed
lots of fixes, changes, code cleanup
1 parent 01c9dd0 commit b74c110

File tree

109 files changed

+783
-807
lines changed

Some content is hidden

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

109 files changed

+783
-807
lines changed

BetterProxy/config.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
{
2-
"port": 1337,
3-
"motd": {
4-
"versionInfo": "&4BetterProxy",
5-
"line1": " &f✖ &l&m\\-\\-\\-\\-&r&f&l>> &6BetterProxy &f&l<<&m-/-/-/-/&r&f ✖&r",
6-
"line2": " &c----&e/ &6✯ &eProxy by ANONIMUS &6✯ &e\\&c----",
7-
"playerList": [
8-
"&f---------------------------------------------------",
9-
" &8Supported versions:",
10-
" &e%supported_versions%",
11-
"&f---------------------------------------------------"
12-
],
13-
"icon": "icon.png",
14-
"protocol": 0
2+
"motd" : {
3+
"protocol" : 0,
4+
"playerList" : [ "&f---------------------------------------------------", " &8Supported versions:", " &e%supported_versions%", "&f---------------------------------------------------" ],
5+
"icon" : "icon.png",
6+
"versionInfo" : "&4BetterProxy",
7+
"line2" : " &c----&e/ &6✯ &eProxy by ANONIMUS &6✯ &e\\&c----",
8+
"line1" : " &f✖ &l&m\\-\\-\\-\\-&r&f&l>> &6BetterProxy &f&l<<&m-/-/-/-/&r&f ✖&r"
159
},
16-
"packet_debugger": true
10+
"debug" : {
11+
"debugType" : "LEGIBLE",
12+
"debugger" : true,
13+
"showCustomPackets" : false
14+
},
15+
"port" : 1337
1716
}

BetterProxy/exploits/dream.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

BetterProxy/exploits/good.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

BetterProxy/exploits/killer.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

BetterProxy/exploits/light.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

BetterProxy/exploits/moon.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

BetterProxy/exploits/power.json

Lines changed: 3 additions & 2 deletions
Large diffs are not rendered by default.

pom.xml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
<dependency>
2020
<groupId>org.projectlombok</groupId>
2121
<artifactId>lombok</artifactId>
22-
<version>1.18.16</version>
22+
<version>1.18.20</version>
2323
<scope>provided</scope>
2424
</dependency>
2525
<dependency>
2626
<groupId>io.netty</groupId>
2727
<artifactId>netty-all</artifactId>
28-
<version>4.1.45.Final</version>
28+
<version>4.1.67.Final</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>com.google.code.gson</groupId>
3232
<artifactId>gson</artifactId>
33-
<version>2.8.6</version>
33+
<version>2.8.7</version>
3434
</dependency>
3535
<dependency>
3636
<groupId>com.google.guava</groupId>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>org.apache.commons</groupId>
4747
<artifactId>commons-lang3</artifactId>
48-
<version>3.11</version>
48+
<version>3.12.0</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>com.googlecode.json-simple</groupId>
@@ -55,7 +55,7 @@
5555
<dependency>
5656
<groupId>javax.json</groupId>
5757
<artifactId>javax.json-api</artifactId>
58-
<version>1.1</version>
58+
<version>1.1.4</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.reflections</groupId>
@@ -75,9 +75,10 @@
7575
<dependency>
7676
<groupId>org.codehaus.jackson</groupId>
7777
<artifactId>jackson-xc</artifactId>
78-
<version>1.9.12</version>
78+
<version>1.9.13</version>
7979
</dependency>
8080
</dependencies>
81+
8182
<build>
8283
<plugins>
8384
<plugin>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
public class BetterProxy {
2121
private final CommandManager commandManager;
2222
private final PacketRegistry packetRegistry;
23+
private final Map<String, Account> accounts;
2324
private final ExploitManager exploitManager;
2425
private final ConfigManager configManager;
2526
private final PlayerManager playerManager;
2627
private static BetterProxy instance;
27-
private final Map<String, Account> accounts;
2828
private final ProxyServer server;
2929
private final File dirFolder;
3030

src/main/java/me/ANONIMUS/proxy/commands/CommandHelp.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public CommandHelp() {
2121

2222
@Override
2323
public void onCommand(Player sender, String[] args) {
24-
List<Command> list = BetterProxy.getInstance().getCommandManager().getCommands();
24+
List<Command> list = BetterProxy.getInstance().getCommandManager().elements;
2525
list.sort(Comparator.comparingInt(s -> StringUtil.getStringWidth(s.getPrefix())));
2626

2727
int i = 1;
@@ -32,19 +32,20 @@ public void onCommand(Player sender, String[] args) {
3232
int k = i - 1;
3333
int l = Math.min((k + 1) * 10, list.size());
3434
int j = (list.size() - 1) / 10;
35+
int f = j + 1;
3536

3637
if (i < 1) {
3738
ChatUtil.sendChatMessage("&cThe given number (" + i + ") is too small, must be at least 1", sender, false);
3839
return;
3940
}
4041

41-
if (i > (j + 1)) {
42-
ChatUtil.sendChatMessage("&cThe given number (" + i + ") is too high, cannot exceed " + (j + 1), sender, false);
42+
if (i > f) {
43+
ChatUtil.sendChatMessage("&cThe given number (" + i + ") is too high, cannot exceed " + f, sender, false);
4344
return;
4445
}
4546

4647
ChatUtil.clearChat(1, sender);
47-
ChatUtil.sendChatMessage(" &8 --- Showing help page: " + sender.getThemeType().getColor(1) + i + " &8of " + sender.getThemeType().getColor(1) + (j + 1) + " &8---", sender, false);
48+
ChatUtil.sendChatMessage(" &8 --- Showing help page: " + sender.getThemeType().getColor(1) + i + " &8of " + sender.getThemeType().getColor(1) + f + " &8---", sender, false);
4849
for (int i1 = k * 10; i1 < l; ++i1) {
4950
final Command command = list.get(i1);
5051
ChatUtil.sendHoverMessage(sender, "&8>> &f" + sender.getPrefixCMD() + command.getPrefix() + " &7" + command.getUsage(), sender.getThemeType().getColor(1) + command.getDesc());
@@ -56,11 +57,12 @@ public void onCommand(Player sender, String[] args) {
5657
msg.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, sender.getPrefixCMD() + "help " + (i - 1)));
5758
}
5859

59-
TextComponent msg2 = new TextComponent(ChatUtil.fixColor((i != (j + 1) ? "&a" : "&7") + "[NEXT]"));
60-
if (i != (j + 1)) {
60+
TextComponent msg2 = new TextComponent(ChatUtil.fixColor((i != f ? "&a" : "&7") + "[NEXT]"));
61+
if (i != f) {
6162
msg2.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent(ChatUtil.fixColor(sender.getThemeType().getColor(2) + "Click to go to the next page!"))));
6263
msg2.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, sender.getPrefixCMD() + "help " + (i + 1)));
6364
}
65+
6466
sender.getSession().sendPacket(new ServerChatPacket(msg, new TextComponent(" "), msg2));
6567
}
6668
}

0 commit comments

Comments
 (0)