Skip to content

Commit 0fafd12

Browse files
committed
untestested rebuild
1 parent 4549410 commit 0fafd12

10 files changed

Lines changed: 55 additions & 9 deletions

File tree

.idea/artifacts/EaglerPluginInstaller_jar.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.

pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<artifactId>craftbukkit</artifactId>
3434
<version>1.5.2-R1.0</version>
3535
</dependency>
36+
<dependency>
37+
<groupId>com.googlecode.json-simple</groupId>
38+
<artifactId>json-simple</artifactId>
39+
<version>1.1</version>
40+
</dependency>
3641
</dependencies>
3742

3843

src/main/java/tech/nully/PluginInstaller/PluginList.java

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
import org.bukkit.command.CommandSender;
55

66
public class PluginList {
7-
private static String[] AlphaPluginList = new String[]{"AntiSwear", "BitchFilter", "CoreProtect", "CrackShot", "DupePatch", "DynMap", "Essentials",
8-
"EssenttialsAntiBuild", "EssentialsChat", "EssentialsProtect", "EssentialsSpawn", "Factions", "MCore", "MyWarp",};
7+
private static String[] AlphaPluginList = new String[]{"AntiSwear", "AyunCord", "BitchFilter", "CoreProtect", "CrackShot", "CraftBook", "DupePatch", "DynMap", "Essentials",
8+
"EssenttialsAntiBuild", "EssentialsChat", "EssentialsProtect", "EssentialsSpawn", "Factions", "MCore", "Multiverse", "MyWarp", "PermissionSex", "ProtocolLib",
9+
"Vault", "WorldEdit", "WorldGuard"};
910
public static void SendPG1ToSender(CommandSender sender) {
1011
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
1112
int SecondCollumn = 8;
@@ -48,5 +49,36 @@ public static void SendPG2ToSender(CommandSender sender) {
4849
sender.sendMessage("Note: You do not need to have proper");
4950
sender.sendMessage("capitalization when using the install command");
5051
}
52+
53+
public static void SendPG3ToSender(CommandSender sender) {
54+
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
55+
56+
// List -------------------------------------------------------------
57+
int SecondCollumn = 36;
58+
for (int i = 29; i < 36; i++) {
59+
String Col31;
60+
String Col32;
61+
62+
// Null checkers for elements in the Array
63+
if (AlphaPluginList[i-1] != null) {
64+
Col31 = AlphaPluginList[i-1];
65+
} else {
66+
Col31 = "N/A";
67+
}
68+
if (AlphaPluginList[SecondCollumn-1] != null) {
69+
Col32 = AlphaPluginList[SecondCollumn-1];
70+
} else {
71+
Col32 = "N/A";
72+
}
73+
// _________________________________________
74+
75+
sender.sendMessage(i+". "+ Col31 + "" + SecondCollumn + ". " + Col32);
76+
SecondCollumn++;
77+
}
78+
79+
sender.sendMessage(" Page 3 of 12");
80+
sender.sendMessage("Note: You do not need to have proper");
81+
sender.sendMessage("capitalization when using the install command");
82+
}
5183
}
5284

src/main/java/tech/nully/PluginInstaller/plistCommand.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
1212
if (cmd.getName().equalsIgnoreCase("plist") && sender.isOp() || sender instanceof ConsoleCommandSender) {
1313
if (args.length >= 1) {
1414
if (args[0] == null) {
15-
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
16-
// TODO: Finish this list
1715
PluginList.SendPG1ToSender(sender);
1816
return true;
1917
}
@@ -25,11 +23,21 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
2523
} catch (NumberFormatException n) {
2624
sender.sendMessage(ChatColor.RED + "That is not a valid page number!");
2725
PageArgIsInt = false;
28-
return false;
26+
return true;
2927
}
30-
3128
if (PageArgIsInt) {
32-
29+
int PageArg = Integer.parseInt(args[0]);
30+
switch (PageArg) {
31+
case 1:
32+
PluginList.SendPG1ToSender(sender);
33+
break;
34+
case 2:
35+
PluginList.SendPG2ToSender(sender);
36+
break;
37+
case 3:
38+
PluginList.SendPG3ToSender(sender);
39+
break;
40+
}
3341
}
3442
}
3543
}

target/classes/plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: EaglerPluginInstaller
2-
version: 1.1.0
2+
version: 1.1.1
33
main: tech.nully.PluginInstaller.Main
44
prefix: [EaglerPluginInstaller]
55
loadbefore: [EaglerPluginUpdater]
66
authors: [BongoCat]
7-
description: A plugin that is capable of installing the latest compatible version of plugins with eaglercraft from an online repository
7+
description: A plugin that is capable of installing the latest compatible version of plugins with eaglercraft from an online repository weith the executing of a command.
88
website: nully.tech
99
commands:
1010
install:
506 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
2.75 KB
Binary file not shown.
410 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)