From 021a99344835adc1487d56297ec1a52431c5e7f3 Mon Sep 17 00:00:00 2001 From: Fangoboyo <77935781+Fangoboyo@users.noreply.github.com> Date: Mon, 20 Jun 2022 17:49:07 -0700 Subject: [PATCH] updated plist --- .../java/tech/nully/PluginInstaller/Main.java | 4 +- .../nully/PluginInstaller/PluginList.java | 80 ++++++++++++++++++- 2 files changed, 78 insertions(+), 6 deletions(-) diff --git a/src/main/java/tech/nully/PluginInstaller/Main.java b/src/main/java/tech/nully/PluginInstaller/Main.java index 68a386b..653bece 100644 --- a/src/main/java/tech/nully/PluginInstaller/Main.java +++ b/src/main/java/tech/nully/PluginInstaller/Main.java @@ -29,7 +29,7 @@ public class Main extends JavaPlugin { ConsoleSender.sendMessage("--------------------------------------------"); ConsoleSender.sendMessage("--------------------------------------------"); ConsoleSender.sendMessage( - ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " EaglerPluginInstaller V1.1.2 is now Enabled! :D"); + ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " EaglerPluginInstaller V1.1.3 is now Enabled! :D"); ConsoleSender.sendMessage("To use PluginInstaller, run the command \"/install \" (\"install \" in console) to install a plugin"); ConsoleSender.sendMessage("To get a list of installable plugins, use the command \"/plist\" or \"plist\" in console"); ConsoleSender.sendMessage("You can request to add a new plugin to the database by going to https://github.com/darverdevs/PluginInstallerRepo/tree/main"); @@ -43,7 +43,7 @@ public class Main extends JavaPlugin { ConsoleSender.sendMessage("--------------------------------------------"); ConsoleSender.sendMessage("--------------------------------------------"); ConsoleSender.sendMessage( - ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " PluginInstaller V1.1.2 is now Disabled! D:"); + ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " PluginInstaller V1.1.3 is now Disabled! D:"); ConsoleSender.sendMessage("--------------------------------------------"); ConsoleSender.sendMessage("--------------------------------------------"); } diff --git a/src/main/java/tech/nully/PluginInstaller/PluginList.java b/src/main/java/tech/nully/PluginInstaller/PluginList.java index 292a7d0..77f71f3 100644 --- a/src/main/java/tech/nully/PluginInstaller/PluginList.java +++ b/src/main/java/tech/nully/PluginInstaller/PluginList.java @@ -27,7 +27,7 @@ public class PluginList { sender.sendMessage(i+". "+ AlphaPluginList[i-1] + "" + Utils.ListToString(spaces) + "" +SecondCollumn + ". " + AlphaPluginList[SecondCollumn-1]); SecondCollumn++; } - sender.sendMessage(" Page 1 of 4"); + sender.sendMessage(" Page 1 of 6"); sender.sendMessage("Note: You do not need to have proper"); sender.sendMessage("capitalization when using the install command"); } @@ -63,7 +63,7 @@ public class PluginList { SecondCollumn++; } - sender.sendMessage(" Page 2 of 4"); + sender.sendMessage(" Page 2 of 6"); sender.sendMessage("Note: You do not need to have proper"); sender.sendMessage("capitalization when using the install command"); } @@ -99,7 +99,7 @@ public class PluginList { SecondCollumn++; } - sender.sendMessage(" Page 3 of 4"); + sender.sendMessage(" Page 3 of 6"); sender.sendMessage("Note: You do not need to have proper"); sender.sendMessage("capitalization when using the install command"); } @@ -135,7 +135,79 @@ public class PluginList { SecondCollumn++; } - sender.sendMessage(" Page 4 of 4"); + sender.sendMessage(" Page 4 of 6"); + sender.sendMessage("Note: You do not need to have proper"); + sender.sendMessage("capitalization when using the install command"); + } + + public static void SendPG5ToSender(CommandSender sender) { + sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:"); + + // List ------------------------------------------------------------- + int SecondCollumn = 64; + for (int i = 57; i < 64; i++) { + String Col41; + String Col42; + + // Null checkers for elements in the Array + try { + Col41 = AlphaPluginList[i-1]; + } catch (ArrayIndexOutOfBoundsException e) { + Col41 = "N/A"; + } + try { + Col42 = AlphaPluginList[SecondCollumn-1]; + } catch (ArrayIndexOutOfBoundsException e) { + Col42 = "N/A"; + } + // _________________________________________ + + int Spaces = 21-Col41.length(); + List spaces = new ArrayList<>(); + for (int forInt = 0; forInt < Spaces; forInt++) { + spaces.add(" "); + } + sender.sendMessage(i+". "+ Col41 + "" + Utils.ListToString(spaces) + "" + SecondCollumn + ". " + Col42); + SecondCollumn++; + } + + sender.sendMessage(" Page 5 of 6"); + sender.sendMessage("Note: You do not need to have proper"); + sender.sendMessage("capitalization when using the install command"); + } + + public static void SendPG6ToSender(CommandSender sender) { + sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:"); + + // List ------------------------------------------------------------- + int SecondCollumn = 78; + for (int i = 71; i < 78; i++) { + String Col41; + String Col42; + + // Null checkers for elements in the Array + try { + Col41 = AlphaPluginList[i-1]; + } catch (ArrayIndexOutOfBoundsException e) { + Col41 = "N/A"; + } + try { + Col42 = AlphaPluginList[SecondCollumn-1]; + } catch (ArrayIndexOutOfBoundsException e) { + Col42 = "N/A"; + } + // _________________________________________ + + int Spaces = 21-Col41.length(); + List spaces = new ArrayList<>(); + for (int forInt = 0; forInt < Spaces; forInt++) { + spaces.add(" "); + } + sender.sendMessage(i+". "+ Col41 + "" + Utils.ListToString(spaces) + "" + SecondCollumn + ". " + Col42); + SecondCollumn++; + } + + sender.sendMessage(" Page 6 of 6"); sender.sendMessage("Note: You do not need to have proper"); sender.sendMessage("capitalization when using the install command"); }