Skip to content

Commit 8c7b656

Browse files
committed
Changed suggested plugins and changed plugin version text
1 parent ed0174d commit 8c7b656

5 files changed

Lines changed: 69 additions & 15 deletions

File tree

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,23 @@ public boolean onCommand(CommandSender snder, Command cmd, String label, String[
3535
try (InputStream in = plugin.openStream()) {
3636

3737
// Installs the plugin
38-
ins.InstallPlugin(in, Install_Jar.toLowerCase());
38+
ins.InstallPlugin(in, Install_Jar.substring(0, 1).toUpperCase() + Install_Jar.substring(1));
3939
snder.sendMessage("You have successfully installed the " + ChatColor.GREEN + Install_Jar.toUpperCase() + ChatColor.WHITE + " plugin!");
4040
return true;
4141
} catch (IOException e) {}
4242
} else if (Install_Jar.equalsIgnoreCase("recommended")) {
4343
InputStream reco1 = URI.create("https://github.com/darverdevs/PluginInstallerRepo/raw/main/dupepatch.jar")
4444
.toURL().openStream();
45+
InputStream reco2 = URI.create("https://github.com/darverdevs/PluginInstallerRepo/raw/main/essentials.jar")
46+
.toURL().openStream();
47+
InputStream reco3 = URI.create("https://github.com/darverdevs/PluginInstallerRepo/raw/main/essentialsspawn.jar")
48+
.toURL().openStream();
4549
ins.InstallPlugin(reco1, "DupePatch");
4650
snder.sendMessage("You have successfully installed the " + ChatColor.GREEN + "DupePatch" + ChatColor.WHITE + " plugin!");
51+
ins.InstallPlugin(reco1, "Essentials");
52+
snder.sendMessage("You have successfully installed the " + ChatColor.GREEN + "Essentials" + ChatColor.WHITE + " plugin!");
53+
ins.InstallPlugin(reco1, "EssentialsSpawn");
54+
snder.sendMessage("You have successfully installed the " + ChatColor.GREEN + "EssentialsSpawn" + ChatColor.WHITE + " plugin!");
4755
return true;
4856
}
4957
} catch (IOException e) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void onEnable() {
2525
getServer().getConsoleSender().sendMessage("--------------------------------------------");
2626
getServer().getConsoleSender().sendMessage("--------------------------------------------");
2727
getServer().getConsoleSender().sendMessage(
28-
ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " EaglerPluginInstaller V1.1.0 is now Enabled! :D");
28+
ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " EaglerPluginInstaller V1.1.1 is now Enabled! :D");
2929
getServer().getConsoleSender().sendMessage("To use PluginInstaller, run the command \"/install <pluginname>\" (\"install <pluginname>\" in console) to install a plugin");
3030
getServer().getConsoleSender().sendMessage("To get a list of installable plugins, use the command \"/plist\" or \"plist\" in console");
3131
getServer().getConsoleSender().sendMessage("You can request to add a new plugin to the database by going to https://github.com/darverdevs/PluginInstallerRepo/tree/main");
@@ -39,7 +39,7 @@ public void onDisable() {
3939
getServer().getConsoleSender().sendMessage("--------------------------------------------");
4040
getServer().getConsoleSender().sendMessage("--------------------------------------------");
4141
getServer().getConsoleSender().sendMessage(
42-
ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " PluginInstaller V1.1.0 is now Disabled! D:");
42+
ChatColor.GREEN + "[EaglerPluginInstaller]" + ChatColor.AQUA + " PluginInstaller V1.1.1 is now Disabled! D:");
4343
getServer().getConsoleSender().sendMessage("--------------------------------------------");
4444
getServer().getConsoleSender().sendMessage("--------------------------------------------");
4545
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package tech.nully.PluginInstaller;
2+
3+
import org.bukkit.command.CommandSender;
4+
5+
import java.net.*;
6+
import java.io.*;
7+
8+
public class PluginList {
9+
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();
18+
}
19+
catch(IOException io) {
20+
System.out.println(io.getMessage());
21+
}
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+
30+
}
31+
}
32+

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

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,35 @@
44
import org.bukkit.command.Command;
55
import org.bukkit.command.CommandExecutor;
66
import org.bukkit.command.CommandSender;
7+
import org.bukkit.command.ConsoleCommandSender;
78

89
public class plistCommand implements CommandExecutor {
910
@Override
1011
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
11-
if (cmd.getName().equalsIgnoreCase("plist")) {
12-
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
13-
// TODO: Finish this list
14-
sender.sendMessage("1. Factions 8. AntiSwear");
15-
sender.sendMessage("2. ProtocolLib 9. ProtocolLib");
16-
sender.sendMessage("3. PermissionSex 10. MCore");
17-
sender.sendMessage("4. Vault 11. ");
18-
sender.sendMessage("5. CoreProtect 12. ");
19-
sender.sendMessage("6. DupePatch 13. ");
20-
sender.sendMessage("7. BitchFilter 14. ");
21-
}
12+
if (cmd.getName().equalsIgnoreCase("plist") && sender.isOp() || sender instanceof ConsoleCommandSender) {
13+
if (args.length >= 1) {
14+
if (args[0] == null) {
15+
sender.sendMessage(ChatColor.GREEN + "Here is a list of available plugins in the database:");
16+
// TODO: Finish this list
17+
PluginList.SendPG1ToSender(sender);
18+
return true;
19+
}
20+
int listPage = 0;
21+
boolean PageArgIsInt = false;
22+
try {
23+
listPage= Integer.parseInt(args[0]);
24+
PageArgIsInt = true;
25+
} catch (NumberFormatException n) {
26+
sender.sendMessage(ChatColor.RED + "That is not a valid page number!");
27+
PageArgIsInt = false;
28+
return false;
29+
}
30+
31+
if (PageArgIsInt) {
32+
33+
}
34+
}
35+
}
2236
return false;
2337
}
2438
}

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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]

0 commit comments

Comments
 (0)