Formatting

This commit is contained in:
cerevisiae 2010-12-01 11:44:32 -06:00
parent f1eb5ffc9e
commit 535c42be0b
3 changed files with 23 additions and 11 deletions

1
TODO
View File

@ -1,7 +1,6 @@
Vminecraft b8 Todo:
+ Antigriefs <Nos> 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?

View File

@ -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

View File

@ -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