1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

Added /promote and /demote

This commit is contained in:
cerevisiae
2010-12-14 22:35:33 -06:00
parent b6396b9dc5
commit dcebdfdf5e
2 changed files with 304 additions and 46 deletions

View File

@@ -19,11 +19,11 @@ public class vMinecraftSettings {
greentext = false,
FFF = false,
quakeColors = false,
prefix = false,
suffix = false,
ignore = false,
colors = false,
nick = false,
prefix = false,
suffix = false,
ignore = false,
colors = false,
nick = false,
cmdFabulous = false,
cmdPromote = false,
cmdDemote = false,
@@ -37,22 +37,23 @@ public class vMinecraftSettings {
cmdWho = false,
stopFire = false,
stopTnt = false,
cmdHeal = false,
cmdSuicide = false,
cmdAdminToggle = false,
cmdHeal = false,
cmdSuicide = false,
cmdAdminToggle = false,
cmdEzModo = false;
//An array of players currently in ezmodo
static ArrayList<String> ezModo = new ArrayList<String>();
//An array of players currently toggled for admin chat
static ArrayList<String> adminChatList = new ArrayList<String>();
//An array of blocks that won't catch on fire
//An array of players currently toggled for admin chat
static ArrayList<String> adminChatList = new ArrayList<String>();
//An array of blocks that won't catch on fire
private PropertiesFile properties;
String file = "vminecraft.properties";
public String rules[] = new String[0];
public static String deathMessages[] = new String[0];
public static String deathMessages[] = new String[0];
public static String ranks[] = new String[0];
//=====================================================================
//Function: loadSettings
@@ -72,32 +73,34 @@ public class vMinecraftSettings {
writer.write("#This plugin is modular\r\n");
writer.write("#Turn any features you don't want to false and they won't be running\r\n");
writer.write("#If you edit this file and save it, then use /reload it will reload the settings\r\n");
writer.write("#Chat Options\r\n");
writer.write("#Allows the use of color codes following ^ symbol\r\n");
writer.write("ColoredChat=true\r\n");
writer.write("#Text following a > will be colored green to mimic quoting of popular internet message boards\r\n");
writer.write("#Chat Options\r\n");
writer.write("#Allows the use of color codes following ^ symbol\r\n");
writer.write("ColoredChat=true\r\n");
writer.write("#Text following a > will be colored green to mimic quoting of popular internet message boards\r\n");
writer.write("QuotesAreGreen=true\r\n");
writer.write("#Turns any chat message starting with FFF automagically blood red\r\n");
writer.write("FFF=true\r\n");
writer.write("#Admin Settings\r\n");
writer.write("#Enables or disables the admin only chat\r\n");
writer.write("adminchat=true\r\n");
writer.write("#Lets non admins use admin chat if they have the /adminchat command permission\r\n");
writer.write("/adminchat=true\r\n");
writer.write("#Enables overriding of regular /tp and /tphere to make it so you can only teleport to players with lower permissions, and only bring players of lower permissions to you\r\n");
writer.write("/tp=true\r\n");
writer.write("/tphere=true\r\n");
writer.write("#Mass Tp uses the same concept, anyone with this command only brings those with lower permissions to themselves\r\n");
writer.write("/masstp=true\r\n");
writer.write("#Server Settings\r\n");
writer.write("#Enables or Disables the following commands, give groups/users permissions to use these commands for them to work\r\n");
writer.write("#Turns any chat message starting with FFF automagically blood red\r\n");
writer.write("FFF=true\r\n");
writer.write("\r\n");
writer.write("#Admin Settings\r\n");
writer.write("#Enables or disables the admin only chat\r\n");
writer.write("adminchat=true\r\n");
writer.write("#Lets non admins use admin chat if they have the /adminchat command permission\r\n");
writer.write("/adminchat=true\r\n");
writer.write("#Enables overriding of regular /tp and /tphere to make it so you can only teleport to players with lower permissions, and only bring players of lower permissions to you\r\n");
writer.write("/tp=true\r\n");
writer.write("/tphere=true\r\n");
writer.write("#Mass Tp uses the same concept, anyone with this command only brings those with lower permissions to themselves\r\n");
writer.write("/masstp=true\r\n");
writer.write("\r\n");
writer.write("#Server Settings\r\n");
writer.write("#Enables or Disables the following commands, give groups/users permissions to use these commands for them to work\r\n");
writer.write("/fabulous=true\r\n");
writer.write("/prefix=true\r\n");
writer.write("/suffix=true\r\n");
writer.write("/ignore=true\r\n");
writer.write("/colors=true\r\n");
writer.write("/prefix=true\r\n");
writer.write("/suffix=true\r\n");
writer.write("/ignore=true\r\n");
writer.write("/colors=true\r\n");
writer.write("/whois=true\r\n");
writer.write("/nick=true\r\n");
writer.write("/nick=true\r\n");
writer.write("/who=true\r\n");
writer.write("/promote=true\r\n");
writer.write("/demote=true\r\n");
@@ -105,14 +108,18 @@ public class vMinecraftSettings {
writer.write("/rules=true\r\n");
writer.write("/suicide=true\r\n");
writer.write("/ezmodo=true\r\n");
writer.write("#Global Messages\r\n");
writer.write("#Enable or Disable sending announcements about sensitive commands to the entire server\r\n");
writer.write("globalmessages=true\r\n");
writer.write("#Global Messages\r\n");
writer.write("#Enable or Disable sending announcements about sensitive commands to the entire server\r\n");
writer.write("globalmessages=true\r\n");
writer.write("\r\n");
writer.write("#Adding player names to this list will have them start off in ezmodo\r\n");
writer.write("ezModo=\r\n");
writer.write("Stop fire from spreading\r\n");
writer.write("#Stop fire from spreading\r\n");
writer.write("stopFire=false\r\n");
writer.write("#Write the rules to be shown when /rules is used here, it works just like the MOTD does\r\n");
writer.write("\r\n");
writer.write("#Organize your player ranks from lowest to highest.\r\n");
writer.write("ranks=default,trusted,mods,admins,superadmins\r\n");
writer.write("#Write the rules to be shown when /rules is used here, it works just like the MOTD does\r\n");
writer.write("rules=Rules@#1: No griefing@#2: No griefing\r\n");
writer.write("#The Random Death messages, seperate them by comma. All death messages start with the player name and a space.\r\n");
writer.write("deathMessages=is no more,died horribly,went peacefully\r\n");
@@ -142,11 +149,11 @@ public class vMinecraftSettings {
greentext = properties.getBoolean("QuotesAreGreen",true);
FFF = properties.getBoolean("FFF",true);
quakeColors = properties.getBoolean("ColoredChat",true);
prefix = properties.getBoolean("prefix",true);
suffix = properties.getBoolean("suffix",true);
ignore = properties.getBoolean("ignore",true);
colors = properties.getBoolean("colors",true);
nick = properties.getBoolean("nick",true);
prefix = properties.getBoolean("prefix",true);
suffix = properties.getBoolean("suffix",true);
ignore = properties.getBoolean("ignore",true);
colors = properties.getBoolean("colors",true);
nick = properties.getBoolean("nick",true);
cmdFabulous = properties.getBoolean("/fabulous",true);
cmdPromote = properties.getBoolean("/promote",true);
cmdDemote = properties.getBoolean("/demote",true);
@@ -170,6 +177,8 @@ public class vMinecraftSettings {
for(String ezName : tempEz)
ezModo.add(ezName);
ranks = properties.getString("ranks").split(",");
log.log(Level.INFO, "vminecraft plugin successfully loaded");
@@ -214,6 +223,8 @@ public class vMinecraftSettings {
public boolean stopTnt() {return stopTnt;}
public boolean cmdSuicide() {return cmdSuicide;}
public boolean cmdHeal() {return cmdHeal;}
public String[] getRanks() {return ranks;}
//EzModo methods
public boolean cmdEzModo() {return cmdEzModo;}