diff --git a/src/config.yml b/src/config.yml index 2286f3c..c161374 100644 --- a/src/config.yml +++ b/src/config.yml @@ -33,8 +33,4 @@ disable_weather: true # Superadmins: Users that can always log in and use the most powerful commands: # When online-mode = false, only superadmin_ips will be used. -superadmins: - - Madgeek1450 - - markbyron -superadmin_ips: - - 127.0.0.1 +# The superadmin lists have been moved to superadmin.yml diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/CantFindPlayerException.java b/src/me/StevenLawson/TotalFreedomMod/Commands/CantFindPlayerException.java new file mode 100644 index 0000000..ee5bb43 --- /dev/null +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/CantFindPlayerException.java @@ -0,0 +1,13 @@ +package me.StevenLawson.TotalFreedomMod.Commands; + +public class CantFindPlayerException extends Exception +{ + public CantFindPlayerException() + { + } + + public CantFindPlayerException(String msg) + { + super("Can't find player: " + msg); + } +} diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java index 6dbfd74..d2fab56 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_cage.java @@ -1,10 +1,8 @@ package me.StevenLawson.TotalFreedomMod.Commands; -import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_UserInfo; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Location; @@ -26,15 +24,14 @@ public class Command_cage extends TFM_Command } Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage(ChatColor.GRAY + "Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p, plugin); diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java index 9147b3d..056e458 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_creative.java @@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.util.List; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -21,31 +22,28 @@ public class Command_creative extends TFM_Command return true; } } - else + + if (!sender.isOp()) { - if (!sender.isOp()) - { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); - return true; - } + sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + return true; } Player p; if (args.length == 0) { - p = Bukkit.getPlayerExact(sender.getName()); + p = sender_p; } else { - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage("Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_expel.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_expel.java index 2c9571a..ae7aee2 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_expel.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_expel.java @@ -29,7 +29,7 @@ public class Command_expel extends TFM_Command { try { - radius = Double.parseDouble(args[0]); + radius = Math.max(1.0, Math.min(200.0, Double.parseDouble(args[0]))); } catch (NumberFormatException nfex) { @@ -40,7 +40,7 @@ public class Command_expel extends TFM_Command { try { - strength = Double.parseDouble(args[1]); + strength = Math.max(0.0, Math.min(200.0, Double.parseDouble(args[1]))); } catch (NumberFormatException nfex) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_explosives.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_explosives.java index f240ee3..27d93c9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_explosives.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_explosives.java @@ -22,7 +22,7 @@ public class Command_explosives extends TFM_Command { try { - plugin.explosiveRadius = Double.parseDouble(args[1]); + plugin.explosiveRadius = Math.max(1.0, Math.min(30.0, Double.parseDouble(args[1]))); } catch (NumberFormatException nfex) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java index dc9347a..c5093c5 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_fr.java @@ -37,15 +37,14 @@ public class Command_fr extends TFM_Command else { Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage("Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p, plugin); diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java index e8318d8..01a5a92 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gcmd.java @@ -22,15 +22,14 @@ public class Command_gcmd extends TFM_Command } Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage(ChatColor.GRAY + "Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } String outcommand = ""; @@ -43,9 +42,9 @@ public class Command_gcmd extends TFM_Command } outcommand = outcommand_bldr.toString().trim(); } - catch (Exception cmdex) + catch (Throwable ex) { - sender.sendMessage(ChatColor.GRAY + "Error building command: " + cmdex.getMessage()); + sender.sendMessage(ChatColor.GRAY + "Error building command: " + ex.getMessage()); } try @@ -60,9 +59,9 @@ public class Command_gcmd extends TFM_Command sender.sendMessage(ChatColor.GRAY + "Unknown error sending command."); } } - catch (Exception cmdex) + catch (Throwable ex) { - sender.sendMessage(ChatColor.GRAY + "Error sending command: " + cmdex.getMessage()); + sender.sendMessage(ChatColor.GRAY + "Error sending command: " + ex.getMessage()); } } else diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java index a188d9b..ff6a5d9 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_gtfo.java @@ -24,15 +24,14 @@ public class Command_gtfo extends TFM_Command if (senderIsConsole || TFM_Util.isUserSuperadmin(sender, plugin)) { Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage("Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } TFM_Util.tfm_broadcastMessage(p.getName() + " has been a VERY naughty, naughty boy.", ChatColor.RED); diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nonuke.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nonuke.java index ac46da5..ab2fddf 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nonuke.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_nonuke.java @@ -23,7 +23,7 @@ public class Command_nonuke extends TFM_Command { try { - plugin.nukeMonitorRange = Double.parseDouble(args[1]); + plugin.nukeMonitorRange = Math.max(1.0, Math.min(500.0, Double.parseDouble(args[1]))); } catch (NumberFormatException nfex) { @@ -34,7 +34,7 @@ public class Command_nonuke extends TFM_Command { try { - plugin.nukeMonitorCountBreak = Integer.parseInt(args[2]); + plugin.nukeMonitorCountBreak = Math.max(1, Math.min(500, Integer.parseInt(args[2]))); } catch (NumberFormatException nfex) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java index 16683cb..5cb1b51 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_orbit.java @@ -1,10 +1,8 @@ package me.StevenLawson.TotalFreedomMod.Commands; -import java.util.List; import me.StevenLawson.TotalFreedomMod.TFM_UserInfo; import me.StevenLawson.TotalFreedomMod.TFM_Util; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; @@ -25,15 +23,14 @@ public class Command_orbit extends TFM_Command } Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage(ChatColor.GRAY + "Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } TFM_UserInfo playerdata = TFM_UserInfo.getPlayerData(p, plugin); @@ -51,11 +48,10 @@ public class Command_orbit extends TFM_Command try { - strength = Double.parseDouble(args[1]); + strength = Math.max(1.0, Math.min(150.0, Double.parseDouble(args[1]))); } catch (NumberFormatException nfex) { - strength = 10.0; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qjail.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qjail.java index 173c608..5820d07 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qjail.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_qjail.java @@ -24,15 +24,14 @@ public class Command_qjail extends TFM_Command } Player p; - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage(ChatColor.GRAY + "Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } //Deop diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_radar.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_radar.java index ed878d4..c67b552 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_radar.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_radar.java @@ -47,7 +47,7 @@ public class Command_radar extends TFM_Command { try { - countmax = Integer.parseInt(args[0]); + countmax = Math.max(1, Math.min(64, Integer.parseInt(args[0]))); } catch (NumberFormatException nfex) { diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java new file mode 100644 index 0000000..d7638ab --- /dev/null +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_saconfig.java @@ -0,0 +1,74 @@ +package me.StevenLawson.TotalFreedomMod.Commands; + +import java.io.File; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.configuration.file.YamlConfiguration; +import org.bukkit.entity.Player; + +public class Command_saconfig extends TFM_Command +{ + @Override + public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) + { + if (!senderIsConsole || sender.getName().equalsIgnoreCase("remotebukkit")) + { + sender.sendMessage(ChatColor.GRAY + "This command may only be used from the Telnet or BukkitHttpd console."); + return true; + } + + if (args.length < 2) + { + return false; + } + + if (args[0].equalsIgnoreCase("add")) + { + Player p; + try + { + p = getPlayer(args[1]); + } + catch (CantFindPlayerException ex) + { + sender.sendMessage(ex.getMessage()); + return true; + } + + String user_name = p.getName().toLowerCase().trim(); + String user_ip = p.getAddress().getAddress().toString().replaceAll("/", "").trim(); + + sender.sendMessage(ChatColor.GRAY + "Adding " + user_name + " as a superadmin, with current IP = " + user_ip); + + if (!plugin.superadmins.contains(user_name)) + { + plugin.superadmins.add(user_name); + } + + if (!plugin.superadmin_ips.contains(user_ip)) + { + plugin.superadmin_ips.add(user_ip); + } + + try + { + FileConfiguration sa_config = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder(), TotalFreedomMod.SUPERADMIN_FILE)); + sa_config.set("superadmins", plugin.superadmins); + sa_config.set("superadmin_ips", plugin.superadmin_ips); + sa_config.save(new File(plugin.getDataFolder(), TotalFreedomMod.SUPERADMIN_FILE)); + } + catch (IOException ex) + { + Logger.getLogger("Minecraft").log(Level.SEVERE, null, ex); + } + } + + return true; + } +} diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java index ee2b13d..bae8121 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_survival.java @@ -3,6 +3,7 @@ package me.StevenLawson.TotalFreedomMod.Commands; import java.util.List; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -21,31 +22,28 @@ public class Command_survival extends TFM_Command return true; } } - else + + if (!sender.isOp()) { - if (!sender.isOp()) - { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); - return true; - } + sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + return true; } Player p; if (args.length == 0) { - p = Bukkit.getPlayerExact(sender.getName()); + p = sender_p; } else { - List matches = Bukkit.matchPlayer(args[0]); - if (matches.isEmpty()) + try { - sender.sendMessage("Can't find user " + args[0]); - return true; + p = getPlayer(args[0]); } - else + catch (CantFindPlayerException ex) { - p = matches.get(0); + sender.sendMessage(ex.getMessage()); + return true; } } diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java index c4b3730..6e7379a 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/TFM_Command.java @@ -1,7 +1,9 @@ package me.StevenLawson.TotalFreedomMod.Commands; +import java.util.List; import java.util.logging.Logger; import me.StevenLawson.TotalFreedomMod.TotalFreedomMod; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; @@ -27,4 +29,17 @@ public class TFM_Command { this.plugin = plugin; } + + public Player getPlayer(String partialname) throws CantFindPlayerException + { + List matches = Bukkit.matchPlayer(partialname); + if (matches.isEmpty()) + { + throw new CantFindPlayerException(partialname); + } + else + { + return matches.get(0); + } + } } diff --git a/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java b/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java index 023e1b1..2f61f07 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java +++ b/src/me/StevenLawson/TotalFreedomMod/TFM_Heartbeat.java @@ -8,7 +8,7 @@ public class TFM_Heartbeat implements Runnable { private TotalFreedomMod plugin; - TFM_Heartbeat(TotalFreedomMod instance) + public TFM_Heartbeat(TotalFreedomMod instance) { this.plugin = instance; } diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java index 90d2bce..350d3b5 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java +++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java @@ -27,6 +27,7 @@ public class TotalFreedomMod extends JavaPlugin public static final long HEARTBEAT_RATE = 5L; //Seconds public static final String CONFIG_FILE = "config.yml"; + public static final String SUPERADMIN_FILE = "superadmin.yml"; private static final String COMMAND_PATH = "me.StevenLawson.TotalFreedomMod.Commands"; private static final String COMMAND_PREFIX = "Command_"; @@ -42,7 +43,9 @@ public class TotalFreedomMod extends JavaPlugin @Override public void onEnable() { - loadTFMConfig(); + loadMainConfig(); + loadSuperadminConfig(); + registerEventHandlers(); Bukkit.getServer().getScheduler().scheduleAsyncRepeatingTask(this, new TFM_Heartbeat(this), HEARTBEAT_RATE * 20L, HEARTBEAT_RATE * 20L); @@ -93,7 +96,7 @@ public class TotalFreedomMod extends JavaPlugin } catch (Throwable ex) { - log.log(Level.SEVERE, "Command not loaded: " + cmd.getName(), ex); + log.log(Level.SEVERE, "[" + getDescription().getName() + "] Command not loaded: " + cmd.getName(), ex); sender.sendMessage(ChatColor.RED + "Command Error: Command not loaded: " + cmd.getName()); return true; } @@ -109,7 +112,7 @@ public class TotalFreedomMod extends JavaPlugin } catch (Throwable ex) { - log.log(Level.SEVERE, "Command Error: " + commandLabel, ex); + log.log(Level.SEVERE, "[" + getDescription().getName() + "] Command Error: " + commandLabel, ex); sender.sendMessage(ChatColor.RED + "Unknown Command Error."); } @@ -132,13 +135,10 @@ public class TotalFreedomMod extends JavaPlugin public Boolean preprocessLogEnabled = true; public Boolean disableNight = true; public Boolean disableWeather = true; - public List superadmins = new ArrayList(); - public List superadmin_ips = new ArrayList(); - private void loadTFMConfig() + public void loadMainConfig() { TFM_Util.createDefaultConfiguration(CONFIG_FILE, this, getFile()); - FileConfiguration config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), CONFIG_FILE)); allowFirePlace = config.getBoolean("allow_fire_place", allowFirePlace); @@ -157,9 +157,18 @@ public class TotalFreedomMod extends JavaPlugin preprocessLogEnabled = config.getBoolean("preprocess_log", preprocessLogEnabled); disableNight = config.getBoolean("disable_night", disableNight); disableWeather = config.getBoolean("disable_weather", disableWeather); + } + + public List superadmins = new ArrayList(); + public List superadmin_ips = new ArrayList(); + + public void loadSuperadminConfig() + { + TFM_Util.createDefaultConfiguration(SUPERADMIN_FILE, this, getFile()); + FileConfiguration sa_config = YamlConfiguration.loadConfiguration(new File(getDataFolder(), SUPERADMIN_FILE)); superadmins = new ArrayList(); - List superadmins_temp = (List) config.getList("superadmins", null); + List superadmins_temp = (List) sa_config.getList("superadmins", null); if (superadmins_temp == null || superadmins_temp.isEmpty()) { superadmins.add("Madgeek1450"); @@ -174,7 +183,7 @@ public class TotalFreedomMod extends JavaPlugin } superadmin_ips = new ArrayList(); - List superadmin_ips_temp = (List) config.getList("superadmin_ips", null); + List superadmin_ips_temp = (List) sa_config.getList("superadmin_ips", null); if (superadmin_ips_temp == null || superadmin_ips_temp.isEmpty()) { superadmin_ips.add("127.0.0.1"); diff --git a/src/plugin.yml b/src/plugin.yml index 299ae12..ac1f648 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -4,130 +4,133 @@ version: 2.1 description: Plugin for the Total Freedom server. author: StevenLawson / Madgeek1450 commands: - cage: - description: Superadmin command - Place a cage around someone. - usage: / [off | outermaterial] [water | lava] - cake: - description: Superadmin command - For the people that are still alive. - usage: / - creative: - description: Quickly change your own gamemode to creative, or define someone's username to change theirs. - usage: / [partialname] - csay: - description: Telnet command - Send a chat message with chat formatting over telnet. - usage: / [partialname] - deopall: - description: Superadmin command - Deop everyone on the server. Use 'purge' to clear ops.txt as well. - usage: / [purge] - expel: - description: Superadmin command - Push people away from you. - usage: / [radius] [strength] - explosives: - description: Superadmin command - Enable/disable explosives and set effect radius. - usage: / [radius] - fireplace: - description: Superadmin command - Enable/disable fire placement. - usage: / - firespread: - description: Superadmin command - Enable/disable fire spread. - usage: / - flatlands: - description: Goto the flatlands. - usage: / - fr: - description: Superadmin command - Freeze all players (toggles on and off). - usage: / - gadmin: - description: Superadmin command - Use admin commands on someone by hash. Use mode 'list' to get a player's hash. Other modes are kick, nameban, ipban, ban, op, deop, ci - usage: / [list | [ ] ] - gcmd: - description: Superadmin command - Send a command as someone else. - usage: / - gtfo: - description: Superadmin command - Makes someone GTFO (deop and ip ban by username). - usage: / - lavadmg: - description: Superadmin command - Enable/disable lava damage. - usage: / - lavaplace: - description: Superadmin command - Enable/disable lava placement. - usage: / - list: - description: Lists the real names of all online players. - usage: / - aliases: [listreal] - mp: - description: Purge all mobs in all worlds. - usage: / - mp44: - description: Superadmin Command - Modern weaponry, FTW. Use 'draw' to start firing, 'sling' to stop firing. - usage: / - nether: - description: Goto the nether. - usage: / - nonuke: - description: Superadmin command - Attempt to detect "invisible griefers" and "nukers". - usage: / [range] [blockrate] - opall: - description: Superadmin command - Op everyone on the server, optionally change everyone's gamemode at the same time. - usage: / [-c | -s] - opme: - description: Superadmin command - Automatically ops user. - usage: / - orbit: - description: Superadmin command - POW!!! Right in the kisser! One of these days Alice, straight to the Moon! - usage: / [power] - prelog: - description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages. - usage: / - qdeop: - description: Quick De-Op - deop someone based on a partial name. - usage: / - qjail: - description: Quick Jail - Quickly jail someone (mgjail must be set as a jail!) - usage: / - qop: - description: Quick Op - op someone based on a partial name. - usage: / - radar: - description: Shows nearby people sorted by distance. - usage: / [range] - rd: - description: Remove drops, arrows, primed TNT, and expierence orbs in all worlds. - usage: / - say: - description: Broadcasts the given message as the console, includes sender name. - usage: / - skylands: - description: Goto the skylands. - usage: / - status: - description: Show misc. server info. - usage: / - stop: - description: Superadmin command - Kicks everyone and stops the server. - usage: / - survival: - description: Quickly change your own gamemode to survival, or define someone's username to change theirs. - usage: / [partialname] - tfbanlist: - description: Shows all banned player names. Superadmins may optionally use 'purge' to clear the list. - usage: / [purge] - tfipbanlist: - description: Shows all banned IPs. Superadmins may optionally use 'purge' to clear the list. - usage: / [purge] - tfsmite: - description: De-op, inventory clear, de-godmode, lightning, and kill your target. For naughty people only (or the entire server). - usage: / - tossmob: - description: Throw a mob in the direction you are facing when you left click with a stick. - usage: / [mobtype | off] [speed] - umd: - description: Superadmin command - Undisguse all players. - usage: / - waterplace: - description: Superadmin command - Enable/disable water placement. - usage: / - wildcard: - description: Superadmin command - Run any command on all users, username placeholder = ?. - usage: / [fluff] ? [fluff] ? + cage: + description: Superadmin command - Place a cage around someone. + usage: / [off | outermaterial] [water | lava] + cake: + description: Superadmin command - For the people that are still alive. + usage: / + creative: + description: Quickly change your own gamemode to creative, or define someone's username to change theirs. + usage: / [partialname] + csay: + description: Telnet command - Send a chat message with chat formatting over telnet. + usage: / [partialname] + deopall: + description: Superadmin command - Deop everyone on the server. Use 'purge' to clear ops.txt as well. + usage: / [purge] + expel: + description: Superadmin command - Push people away from you. + usage: / [radius] [strength] + explosives: + description: Superadmin command - Enable/disable explosives and set effect radius. + usage: / [radius] + fireplace: + description: Superadmin command - Enable/disable fire placement. + usage: / + firespread: + description: Superadmin command - Enable/disable fire spread. + usage: / + flatlands: + description: Goto the flatlands. + usage: / + fr: + description: Superadmin command - Freeze all players (toggles on and off). + usage: / + gadmin: + description: Superadmin command - Use admin commands on someone by hash. Use mode 'list' to get a player's hash. Other modes are kick, nameban, ipban, ban, op, deop, ci + usage: / [list | [ ] ] + gcmd: + description: Superadmin command - Send a command as someone else. + usage: / + gtfo: + description: Superadmin command - Makes someone GTFO (deop and ip ban by username). + usage: / + lavadmg: + description: Superadmin command - Enable/disable lava damage. + usage: / + lavaplace: + description: Superadmin command - Enable/disable lava placement. + usage: / + list: + description: Lists the real names of all online players. + usage: / + aliases: [listreal] + mp: + description: Purge all mobs in all worlds. + usage: / + mp44: + description: Superadmin Command - Modern weaponry, FTW. Use 'draw' to start firing, 'sling' to stop firing. + usage: / + nether: + description: Goto the nether. + usage: / + nonuke: + description: Superadmin command - Attempt to detect "invisible griefers" and "nukers". + usage: / [range] [blockrate] + opall: + description: Superadmin command - Op everyone on the server, optionally change everyone's gamemode at the same time. + usage: / [-c | -s] + opme: + description: Superadmin command - Automatically ops user. + usage: / + orbit: + description: Superadmin command - POW!!! Right in the kisser! One of these days Alice, straight to the Moon! + usage: / [power] + prelog: + description: Superadmin command - Enable/disable the command prelogger. When this is on, logs will be filled with many duplicate messages. + usage: / + qdeop: + description: Quick De-Op - deop someone based on a partial name. + usage: / + qjail: + description: Quick Jail - Quickly jail someone (mgjail must be set as a jail!) + usage: / + qop: + description: Quick Op - op someone based on a partial name. + usage: / + radar: + description: Shows nearby people sorted by distance. + usage: / [range] + rd: + description: Remove drops, arrows, primed TNT, and expierence orbs in all worlds. + usage: / + saconfig: + description: Owner command - Manage superadmins. + usage: / + say: + description: Broadcasts the given message as the console, includes sender name. + usage: / + skylands: + description: Goto the skylands. + usage: / + status: + description: Show misc. server info. + usage: / + stop: + description: Superadmin command - Kicks everyone and stops the server. + usage: / + survival: + description: Quickly change your own gamemode to survival, or define someone's username to change theirs. + usage: / [partialname] + tfbanlist: + description: Shows all banned player names. Superadmins may optionally use 'purge' to clear the list. + usage: / [purge] + tfipbanlist: + description: Shows all banned IPs. Superadmins may optionally use 'purge' to clear the list. + usage: / [purge] + tfsmite: + description: De-op, inventory clear, de-godmode, lightning, and kill your target. For naughty people only (or the entire server). + usage: / + tossmob: + description: Throw a mob in the direction you are facing when you left click with a stick. + usage: / [mobtype | off] [speed] + umd: + description: Superadmin command - Undisguse all players. + usage: / + waterplace: + description: Superadmin command - Enable/disable water placement. + usage: / + wildcard: + description: Superadmin command - Run any command on all users, username placeholder = ?. + usage: / [fluff] ? [fluff] ? diff --git a/src/superadmin.yml b/src/superadmin.yml new file mode 100644 index 0000000..b5eb3a3 --- /dev/null +++ b/src/superadmin.yml @@ -0,0 +1,5 @@ +superadmins: + - Madgeek1450 + - markbyron +superadmin_ips: + - 127.0.0.1