mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Merge branch 'master' of github.com:nossr50/vminecraft-plugin
This commit is contained in:
commit
7561b40a15
@ -20,8 +20,8 @@ public class vMinecraftAnnouncements extends vMinecraftCommands{
|
||||
return false;
|
||||
}
|
||||
//Only run if the global message feature is enabled
|
||||
if(vMinecraftSettings.getInstance().globalmessages())
|
||||
{
|
||||
//if(vMinecraftSettings.getInstance().globalmessages())
|
||||
//{
|
||||
//Global messages that should only parse when a command can be successful
|
||||
if(split[0].equalsIgnoreCase("/kick")) {
|
||||
Player playerTarget = etc.getServer().matchPlayer(split[1]);
|
||||
@ -52,7 +52,7 @@ public class vMinecraftAnnouncements extends vMinecraftCommands{
|
||||
vMinecraftChat.gmsg(player, player.getName() + Colors.Blue+" has teleported to " + etc.getServer().getPlayer(split[1]).getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -36,6 +36,9 @@ public class vMinecraftCommands{
|
||||
// the command is used
|
||||
//String(Optional): The help menu description
|
||||
cl.register("/tp", "teleport");
|
||||
cl.register("/vminecraft", "vminecrafthelp");
|
||||
cl.registerAlias("/vhelp", "/vminecraft");
|
||||
cl.register("/colors", "colors");
|
||||
cl.register("/masstp", "masstp", "Teleports those with lower permissions to you");
|
||||
cl.register("/reload", "reload");
|
||||
cl.register("/rules", "rules", "Displays the rules");
|
||||
@ -86,7 +89,48 @@ public class vMinecraftCommands{
|
||||
cl.registerMessage("/time", "Time change thanks to %p", Colors.Blue, 1, true);
|
||||
cl.registerMessage("/tp", "%p has teleported to %0p", Colors.Blue, 1, true);
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: vminecrafthelp (/vhelp or /vminecraft)
|
||||
//Input: Player player: The player using the command
|
||||
//Output: int: Exit Code
|
||||
//Use: Displays the current status of most vMinecraft settings
|
||||
// and provides some useful tips.
|
||||
//=====================================================================
|
||||
public static int vminecrafthelp(Player player, String[] args){
|
||||
vMinecraftChat.sendMessage(player, player, Colors.Yellow + "Chat Settings");
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Admin Chat: " + vMinecraftSettings.getInstance().adminchat());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "FFF turns red: " + vMinecraftSettings.getInstance().FFF());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Greentext After >: " + vMinecraftSettings.getInstance().greentext());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Quake Color Script: " + vMinecraftSettings.getInstance().quakeColors());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.Yellow + "Enabled Commands are TRUE, disabled are FALSE");
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /ezmodo: " + vMinecraftSettings.getInstance().cmdEzModo());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /fabulous: " + vMinecraftSettings.getInstance().cmdFabulous());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /rules: " + vMinecraftSettings.getInstance().cmdRules());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /heal: " + vMinecraftSettings.getInstance().cmdHeal());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /masstp: " + vMinecraftSettings.getInstance().cmdMasstp());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /say: " + vMinecraftSettings.getInstance().cmdSay());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /suicide: " + vMinecraftSettings.getInstance().cmdSuicide());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /whois: " + vMinecraftSettings.getInstance().cmdWhoIs());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /tp won't work on higher ranked players: " + vMinecraftSettings.getInstance().cmdTp());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /tphere won't work on higher ranked players: " + vMinecraftSettings.getInstance().cmdTphere());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.Yellow + "Other Settings");
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Command /who: " + vMinecraftSettings.getInstance().cmdWho());
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "COLORED PLAYER LIST IS DEPENDENT ON /who BEING TRUE!");
|
||||
vMinecraftChat.sendMessage(player, player, Colors.LightPurple + "Global Messages: " + vMinecraftSettings.getInstance().globalmessages());
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: colors (/colors)
|
||||
//Input: Player player: The player using the command
|
||||
//Output: int: Exit Code
|
||||
//Use: Displays a list of all colors and color codes
|
||||
//=====================================================================
|
||||
public static int colors(Player player, String[] args){
|
||||
vMinecraftChat.sendMessage(player, player, Colors.Black + "0" + Colors.Navy + "1" + Colors.Green+ "2" + Colors.Blue + "3" + Colors.Red + "4" + Colors.Purple + "5" + Colors.Gold + "6" + Colors.LightGray + "7" + Colors.Gray + "8" + Colors.DarkPurple + "9" + Colors.LightGreen + "a" + Colors.LightBlue + "b" + Colors.Rose + "c" + Colors.LightPurple + "d" + Colors.White + "f");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
//=====================================================================
|
||||
//Function: me (/me)
|
||||
//Input: Player player: The player using the command
|
||||
|
@ -93,7 +93,10 @@ public class vMinecraftListener extends PluginListener {
|
||||
|
||||
public boolean onIgnite(Block block, Player player) {
|
||||
if(vMinecraftSettings.stopFire){
|
||||
if (vMinecraftSettings.fireNoSpread.contains(block)){
|
||||
if(block.getStatus() == 3 || block.getStatus() == 1){
|
||||
return true;
|
||||
}
|
||||
if(block.getStatus() == 2 && !player.isAdmin()){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import java.util.logging.Logger;
|
||||
public class vMinecraftSettings {
|
||||
//private final static Object syncLock = new Object();
|
||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||
private static volatile vMinecraftSettings instance;
|
||||
private static volatile vMinecraftSettings instance;
|
||||
|
||||
|
||||
//The feature settings
|
||||
@ -41,7 +41,7 @@ public class vMinecraftSettings {
|
||||
//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
|
||||
static ArrayList<String> fireNoSpread = new ArrayList<String>();
|
||||
|
||||
|
||||
|
||||
private PropertiesFile properties;
|
||||
@ -87,11 +87,7 @@ public class vMinecraftSettings {
|
||||
writer.write("cmdEzModo=true\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("#The health ezmodo people will have while in ezmodo. Don't set to 0\r\n");
|
||||
writer.write("ezHealth=30\r\n");
|
||||
writer.write("stopFire=false\r\n");
|
||||
writer.write("#Flame Immune blocks will never have fire spread to them, seperate with comma. Needs stopFire to be true\r\n");
|
||||
writer.write("fireNoSpread=5,17,18");
|
||||
writer.write("stopTnt=false\r\n");
|
||||
writer.write("rules=Rules@#1: No griefing@#2: No griefing\r\n");
|
||||
writer.write("#Death messages, seperate them by comma. All death messages start with the player name and a space.\r\n");
|
||||
@ -141,7 +137,6 @@ public class vMinecraftSettings {
|
||||
stopTnt = properties.getBoolean("stopTNT",true);
|
||||
rules = properties.getString("rules", "").split("@");
|
||||
deathMessages = properties.getString("deathmessages", "").split(",");
|
||||
fireNoSpread.add(properties.getString("fireNoSpread", "").split(",").toString());
|
||||
String[] tempEz = properties.getString("ezModo").split(",");
|
||||
ezModo = new ArrayList<String>();
|
||||
for(String ezName : tempEz)
|
||||
|
Loading…
Reference in New Issue
Block a user