God mode was scripted, couldn't get netbeans to compile this to test though. I'll try again when I'm not so mad at netbeans :(. The message it says when you use /ezmodo is a reference to Overdrive by IOSYS.

This commit is contained in:
nossr50 2010-11-25 17:33:17 -08:00
parent 10c2a90efc
commit e9d3da07f0

View File

@ -7,12 +7,20 @@ import java.util.logging.Logger;
public void disable() { public void disable() {
log.log(Level.INFO, "vminecraft disabled"); log.log(Level.INFO, "vminecraft disabled");
} }
private ArrayList<String> ezmodo = new ArrayList<String>(); //An array of players currently in ezmodo
public void enable() { public void enable() {
settings.getInstance().loadSettings(); //Load the settings files settings.getInstance().loadSettings(); //Load the settings files
log.log(Level.INFO, "vminecraft enabled"); log.log(Level.INFO, "vminecraft enabled");
} }
public void onPlayerMove () {
if (ezmodo.contains(player.getName())){
if (player.getHealth() < 30)
{
player.setHealth(30);
}
}
}
public boolean onChat(Player player, String message){ public boolean onChat(Player player, String message){
String temp2 = "<" + player.getColor() + player.getName() + Colors.White +"> "; //Copies the formatting of id.java String temp2 = "<" + player.getColor() + player.getName() + Colors.White +"> "; //Copies the formatting of id.java
String adminchat = Colors.DarkPurple + "{" + player.getColor() + player.getName() + Colors.DarkPurple +"}" + Colors.White + " "; //Special formatting for adminchat String adminchat = Colors.DarkPurple + "{" + player.getColor() + player.getName() + Colors.DarkPurple +"}" + Colors.White + " "; //Special formatting for adminchat
@ -93,6 +101,21 @@ import java.util.logging.Logger;
} }
player.sendMessage(Colors.Blue+"Summoning successful."); player.sendMessage(Colors.Blue+"Summoning successful.");
} }
//ezmodo
if (split[0].equals("/ezmodo")) {
if (ezmodo.contains(player.getName())) {
player.sendMessage(Colors.Red + "ezmodo = off");
ezmodo.remove(ezmodo.indexOf(player.getName()));
} else {
player.sendMessage(Colors.LightBlue + "eh- maji? ezmodo!?");
player.sendMessage(Colors.Rose + "kimo-i");
player.sendMessage(Colors.LightBlue + "Easy Mode ga yurusareru no wa shougakusei made dayo ne");
player.sendMessage(Colors.Red + "**Laughter**");
ezmodo.add(player.getName());
player.setHealth(30);
}
return true;
}
//Replacement for /tp //Replacement for /tp
if(settings.getInstance().cmdTp() && split[0].equalsIgnoreCase("/tp")) { if(settings.getInstance().cmdTp() && split[0].equalsIgnoreCase("/tp")) {
{ {