From 535c42be0b226cb757d651bba0c020a62e5d7207 Mon Sep 17 00:00:00 2001 From: cerevisiae Date: Wed, 1 Dec 2010 11:44:32 -0600 Subject: [PATCH] Formatting --- TODO | 1 - vMinecraftChat.java | 8 ++++---- vminecraftCommands.java | 25 +++++++++++++++++++------ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/TODO b/TODO index fefb779f0..33ae124a9 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ Vminecraft b8 Todo: + Antigriefs Working on this, waiting for hMod to fix player health + Allow players to nickname themselves or others - + vminecraft Help * Specialized help message for vminecraft ? /vhelp? diff --git a/vMinecraftChat.java b/vMinecraftChat.java index 3f57430f6..e3e9b9694 100644 --- a/vMinecraftChat.java +++ b/vMinecraftChat.java @@ -46,10 +46,10 @@ public class vMinecraftChat { //Loop through the words finding their length and increasing //j, the end point for the sub string - while(len <= 316 && i < split.length) + while(len <= 300 && i < split.length) { len += msgLength(split[i]) + 4; - if( len <= 316) + if( len <= 300) i++; } @@ -57,8 +57,8 @@ public class vMinecraftChat { String[] temp = new String[i - j]; System.arraycopy(split, j, temp, 0, i - j); - //Merge them and add them to the output array - out.add( etc.combineSplit(0, temp, " ") ); + //Merge them and add them to the output array. + out.add( applyColors(etc.combineSplit(0, temp, " ")) ); } //Convert to an array and return diff --git a/vminecraftCommands.java b/vminecraftCommands.java index b15f9a6b8..d55e481c6 100644 --- a/vminecraftCommands.java +++ b/vminecraftCommands.java @@ -34,19 +34,34 @@ public class vMinecraftCommands{ cl.register("/fabulous", "fabulous", "makes text SUUUPER"); cl.register("/whois", "whois", "/whois [user]"); cl.register("/who", "who"); - cl.registerAlias("/playerlist", "/who"); cl.register("/say", "say"); cl.register("/slay", "slay", "Kill target player"); cl.register("/ezmodo", "invuln", "Toggle invulnerability"); cl.register("/ezlist", "ezlist", "List invulnerable players"); cl.register("/heal", "heal", "heal yourself or other players"); cl.register("/suicide", "suicide", "kill yourself... you loser"); - cl.registerAlias("/wrists", "/suicide"); cl.register("/a", "adminChatToggle", "toggle admin chat for every message"); - cl.registerAlias("/admin", "/a"); cl.register("/modify", "modifySplit"); - cl.registerAlias("/ci", "/clearinventory"); + cl.register("/me", "me"); + cl.registerAlias("/playerlist", "/who"); + cl.registerAlias("/suicide", "/wrists"); + cl.registerAlias("/clearinventory", "/ci"); } + + //===================================================================== + //Function: me (/me) + //Input: Player player: The player using the command + //Output: int: Exit Code + //Use: The player uses this to emote, but now its colorful. + //===================================================================== + public static int me(Player player, String[] args) + { + String str = etc.combineSplit(0, args, " "); + if (args.length < 1) {return EXIT_FAIL;} + vMinecraftChat.emote(player, str); + return EXIT_SUCCESS; + } + //===================================================================== //Function: adminChatToggle (/a) //Input: Player player: The player using the command @@ -54,7 +69,6 @@ public class vMinecraftCommands{ //Use: Toggles the player into admin chat. Every message they // send will be piped to admin chat. //===================================================================== - public static int adminChatToggle(Player player, String[] args) { if(vMinecraftSettings.getInstance().adminChatToggle()) @@ -72,7 +86,6 @@ public class vMinecraftCommands{ } return EXIT_FAIL; } - //===================================================================== //Function: heal (/heal) //Input: Player player: The player using the command