Skip to content

Commit 8f237ff

Browse files
committed
fixed the shit code
1 parent 7d7a9eb commit 8f237ff

1 file changed

Lines changed: 32 additions & 18 deletions

File tree

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
11
package tech.nully.PluginInstaller;
22

3+
import org.bukkit.ChatColor;
34
import org.bukkit.command.CommandSender;
45

56
import java.net.*;
67
import java.io.*;
8+
import java.util.List;
79

810
public class PluginList {
11+
private static String[] AlphaPluginList = new String[]{"AntiSwear", "BitchFilter", "CoreProtect", "CrackShot", "DupePatch", "DynMap", "Essentials",
12+
"EssenttialsAntiBuild", "EssentialsChat", "EssentialsProtect", "EssentialsSpawn", "Factions", "MCore", "MyWarp",};
913
public static void SendPG1ToSender(CommandSender sender) {
10-
try {
11-
URL files = URI.create("https://raw.githubusercontent.com/darverdevs/PluginInstallerRepo/main/names.txt").toURL();
12-
URLConnection file = files.openConnection();
13-
BufferedReader best = new BufferedReader(new InputStreamReader(file.getInputStream()));
14-
while ((best.readLine() != null)) {
15-
sender.sendMessage(best.readLine());
16-
}
17-
best.close();
14+
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
15+
int SecondCollumn = 8;
16+
for (int i = 1; i < 8; i++) {
17+
sender.sendMessage(i+". "+ AlphaPluginList[i-1] + "" +SecondCollumn + ". " + AlphaPluginList[SecondCollumn-1]);
18+
SecondCollumn++;
1819
}
19-
catch(IOException io) {
20-
System.out.println(io.getMessage());
20+
sender.sendMessage(" Page 1 of 12");
21+
sender.sendMessage("Note: You do not need to have proper");
22+
sender.sendMessage("capitalization when using the install command");
23+
}
24+
25+
public static void SendPG2ToSender(CommandSender sender) {
26+
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
27+
int SecondCollumn = 22;
28+
for (int i = 15; i < 22; i++) {
29+
String Col1 = "";
30+
String Col2 = "";
31+
if (AlphaPluginList[i-1] != null) {
32+
Col1 = AlphaPluginList[i-1];
33+
}
34+
if (AlphaPluginList[SecondCollumn-1] != null) {
35+
Col2 = AlphaPluginList[SecondCollumn-1];
36+
}
37+
sender.sendMessage(i+". "+ Col1 + "" + SecondCollumn + ". " + Col2);
38+
SecondCollumn++;
2139
}
22-
/*sender.sendMessage("1. AntiSwear 8. AntiSwear");
23-
sender.sendMessage("2. BitchFilter 9. ProtocolLib");
24-
sender.sendMessage("3. CoreProtect 10. MCore");
25-
sender.sendMessage("4. CrackShot 11. ");
26-
sender.sendMessage("5. DupePatch 12. ");
27-
sender.sendMessage("6. DynMap 13. ");
28-
sender.sendMessage("7. BitchFilter 14. ");*/
29-
40+
41+
sender.sendMessage(" Page 2 of 12");
42+
sender.sendMessage("Note: You do not need to have proper");
43+
sender.sendMessage("capitalization when using the install command");
3044
}
3145
}
3246

0 commit comments

Comments
 (0)