diff --git a/buildfard.sh b/buildfard.sh new file mode 100755 index 0000000..b158943 --- /dev/null +++ b/buildfard.sh @@ -0,0 +1,6 @@ +#!/bin/bash +rm -rfv buildtools_tmp/ +mkdir buildtools_tmp +cd buildtools_tmp +wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar +java -jar BuildTools.jar --rev 1.8.8 \ No newline at end of file diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_adminmode.java b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_adminmode.java index 058a0ec..7c75dae 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_adminmode.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/commands/Command_adminmode.java @@ -7,7 +7,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.ONLY_CONSOLE, blockHostConsole = true) +@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.BOTH, blockHostConsole = true) @CommandParameters(description = "Close server to non-superadmins.", usage = "/ [on | off]") public class Command_adminmode extends FreedomCommand { @Override @@ -18,18 +18,18 @@ public class Command_adminmode extends FreedomCommand { if (args[0].equalsIgnoreCase("off")) { ConfigurationEntry.ADMIN_ONLY_MODE.setBoolean(false); - Utilities.adminAction(sender.getName(), "Opening the server to all players.", true); + Utilities.adminAction(sender.getName(), "Deactivating adminmode.", true); return true; } else if (args[0].equalsIgnoreCase("on")) { ConfigurationEntry.ADMIN_ONLY_MODE.setBoolean(true); - Utilities.adminAction(sender.getName(), "Closing the server to non-superadmins.", true); + Utilities.adminAction(sender.getName(), "Activating adminmode.", true); for (Player player : server.getOnlinePlayers()) { if (!AdminList.isSuperAdmin(player)) { - player.kickPlayer("Server is now closed to non-superadmins."); + player.kickPlayer("Server is now in adminmode."); } } return true; diff --git a/src/main/java/me/StevenLawson/TotalFreedomMod/listener/ServerListener.java b/src/main/java/me/StevenLawson/TotalFreedomMod/listener/ServerListener.java index 8b0342d..8126fa2 100644 --- a/src/main/java/me/StevenLawson/TotalFreedomMod/listener/ServerListener.java +++ b/src/main/java/me/StevenLawson/TotalFreedomMod/listener/ServerListener.java @@ -23,13 +23,13 @@ public class ServerListener implements Listener { if (ConfigurationEntry.ADMIN_ONLY_MODE.getBoolean()) { - event.setMotd(ChatColor.RED + "Server is closed."); + event.setMotd(ChatColor.RED + "Server is in adminmode."); return; } if (Bukkit.hasWhitelist()) { - event.setMotd(ChatColor.RED + "Whitelist enabled."); + event.setMotd(ChatColor.RED + "Server is whitelisted."); return; }