mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
SuperAwesomeAdmins. Because who are we kidding anyway.
This commit is contained in:
parent
e7f2ad893c
commit
2a396ca904
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<String> superUsers = Arrays.asList(tempArray);
|
||||
public static List<String> 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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user