diff --git a/src/config.yml b/src/config.yml index f29a9a9..f722141 100644 --- a/src/config.yml +++ b/src/config.yml @@ -54,8 +54,8 @@ flatlands_generation_params: 16,stone,32,dirt,1,grass # Admin-Only Mode admin_only_mode: false -# SuperUsers; telnet users who have the permissions for certain high-profile commands (/doom, /lockup, ect) -superuser_names: +# SuperAwesomeAdmins - Because normal superadmin just isn't awesome enough. These users can do even more awesomey admin shit. +super_awesome_admins: - markbyron - mark - madgeek1450 diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java index 8b8408b..62972f3 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_doom.java @@ -13,7 +13,7 @@ public class Command_doom extends TFM_Command @Override public boolean run(final CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - if (!(senderIsConsole && TotalFreedomMod.superUsers.contains(sender.getName().toLowerCase()))) + if (!(senderIsConsole && TotalFreedomMod.superAwesomeAdmins.contains(sender.getName().toLowerCase()))) { sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java index 829fa31..cf5dfe9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fuckoff.java @@ -1,6 +1,5 @@ package me.StevenLawson.TotalFreedomMod.Commands; -import java.util.Arrays; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.command.Command; @@ -24,7 +23,7 @@ public class Command_fuckoff extends TFM_Command return true; } - if (!Arrays.asList("madgeek1450", "markbyron", "darthsalamon").contains(sender.getName().toLowerCase())) + if (!TotalFreedomMod.superAwesomeAdmins.contains(sender.getName().toLowerCase())) { sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); return true; diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java index d6bda7d..e927429 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_lockup.java @@ -4,7 +4,6 @@ import java.util.Random; import me.StevenLawson.TotalFreedomMod.TFM_UserInfo; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; -import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -16,7 +15,7 @@ public class Command_lockup extends TFM_Command @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - if (!(senderIsConsole && TotalFreedomMod.superUsers.contains(sender.getName().toLowerCase()))) + if (!(senderIsConsole && TotalFreedomMod.superAwesomeAdmins.contains(sender.getName().toLowerCase()))) { sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); return true; @@ -26,8 +25,8 @@ public class Command_lockup extends TFM_Command { if (args[0].equalsIgnoreCase("all")) { - TFM_Util.adminAction(sender.getName(), "Locking up all players", true); - + TFM_Util.adminAction(sender.getName(), "Locking up all players", true); + for (Player p : server.getOnlinePlayers()) { startLockup(p); @@ -36,7 +35,7 @@ public class Command_lockup extends TFM_Command } else if (args[0].equalsIgnoreCase("purge")) { - TFM_Util.adminAction(sender.getName(), "Unlocking all players", true); + TFM_Util.adminAction(sender.getName(), "Unlocking all players", true); for (Player p : server.getOnlinePlayers()) { cancelLockup(p); diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java index a20122e..a6c3430 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java +++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java @@ -3,15 +3,12 @@ package me.StevenLawson.TotalFreedomMod; import java.io.File; import java.io.InputStream; import java.util.*; - import me.StevenLawson.TotalFreedomMod.Commands.TFM_Command; import me.StevenLawson.TotalFreedomMod.Listener.TFM_BlockListener; import me.StevenLawson.TotalFreedomMod.Listener.TFM_EntityListener; import me.StevenLawson.TotalFreedomMod.Listener.TFM_PlayerListener; import me.StevenLawson.TotalFreedomMod.Listener.TFM_WeatherListener; - import org.apache.commons.lang.exception.ExceptionUtils; - import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; @@ -188,24 +185,12 @@ public class TotalFreedomMod extends JavaPlugin public static String flatlandsGenerationParams = "16,stone,32,dirt,1,grass"; public static boolean allowFliudSpread = false; public static boolean adminOnlyMode = false; - public static String[] tempArray = - { - "markbyron", - "mark", - "madgeek1450", - "madgeek", - "darthsalamon", - "darth" - }; - - public static List superUsers = Arrays.asList(tempArray); + public static List superAwesomeAdmins = Arrays.asList("markbyron", "mark", "madgeek1450", "madgeek", "darthsalamon", "darth"); public void loadMainConfig() { try { - tempArray = null; - TFM_Util.createDefaultConfiguration(CONFIG_FILE, getFile()); FileConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), CONFIG_FILE)); @@ -238,7 +223,7 @@ public class TotalFreedomMod extends JavaPlugin flatlandsGenerationParams = config.getString("flatlands_generation_params", flatlandsGenerationParams); allowFliudSpread = config.getBoolean("allow_fluid_spread", allowFliudSpread); adminOnlyMode = config.getBoolean("admin_only_mode", adminOnlyMode); - superUsers = config.getStringList("superuser_names"); + superAwesomeAdmins = config.getStringList("super_awesome_admins"); } catch (Exception ex) {