From e9d3da07f092e7e89913b3b0e349d1d74b1c9365 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 25 Nov 2010 17:33:17 -0800 Subject: [PATCH] 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. --- vminecraftListener.java | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/vminecraftListener.java b/vminecraftListener.java index 191948f3f..f1dc12b58 100644 --- a/vminecraftListener.java +++ b/vminecraftListener.java @@ -7,12 +7,20 @@ import java.util.logging.Logger; public void disable() { log.log(Level.INFO, "vminecraft disabled"); } + private ArrayList ezmodo = new ArrayList(); //An array of players currently in ezmodo public void enable() { settings.getInstance().loadSettings(); //Load the settings files 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){ 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 @@ -93,6 +101,21 @@ import java.util.logging.Logger; } 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 if(settings.getInstance().cmdTp() && split[0].equalsIgnoreCase("/tp")) { {