mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2026-02-20 10:43:12 +01:00
Added half-functional /me recode
This commit is contained in:
@@ -361,6 +361,20 @@ public class vMinecraftChat {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//=====================================================================
|
||||
//Function: emote
|
||||
//Input: Player player: The player talking
|
||||
// String message: The message to apply the effect to
|
||||
//Output: boolean: If this feature is enabled
|
||||
//Use: /me but with our custom colors applied
|
||||
//=====================================================================
|
||||
public static boolean emote(Player player, String[] message)
|
||||
{
|
||||
String[] msg = wordWrap("* " + getName(player) + Colors.White + message);
|
||||
for(String str: msg)
|
||||
gmsg(str);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=====================================================================
|
||||
@@ -385,7 +399,7 @@ public class vMinecraftChat {
|
||||
//Loop through looking for a color code
|
||||
for(int x = 0; x< msg.length(); x++)
|
||||
{
|
||||
//If the char is a ^ or §
|
||||
//If the char is a ^ or <EFBFBD>
|
||||
if(msg.charAt(x) == '^' || msg.charAt(x) == Colors.White.charAt(0))
|
||||
{
|
||||
if(x != msg.length() - 1)
|
||||
@@ -451,7 +465,7 @@ public class vMinecraftChat {
|
||||
//Loop through looking for a color code
|
||||
for(int x = 0; x< message.length(); x++)
|
||||
{
|
||||
//If the char is a ^ or '§'
|
||||
//If the char is a ^ or '<EFBFBD>'
|
||||
if(message.charAt(x) == '^' || message.charAt(x) == Colors.White.charAt(0))
|
||||
{
|
||||
if(x != message.length() - 1)
|
||||
|
||||
Reference in New Issue
Block a user