mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
god fucking damnit fleek
This commit is contained in:
parent
fbfc605f1e
commit
a7de5edfcb
@ -59,6 +59,12 @@ public class ChatManager extends FreedomService
|
|||||||
// Format colors and strip &k
|
// Format colors and strip &k
|
||||||
message = FUtil.colorize(message);
|
message = FUtil.colorize(message);
|
||||||
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
|
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
|
||||||
|
|
||||||
|
if (message.equals("Connected using PickaxeChat for Android"))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Truncate messages that are too long - 256 characters is vanilla client max
|
// Truncate messages that are too long - 256 characters is vanilla client max
|
||||||
if (message.length() > 256)
|
if (message.length() > 256)
|
||||||
@ -96,7 +102,7 @@ public class ChatManager extends FreedomService
|
|||||||
message = ChatColor.GOLD + message;
|
message = ChatColor.GOLD + message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally, set message
|
// Finally, set message
|
||||||
event.setMessage(message);
|
event.setMessage(message);
|
||||||
|
|
||||||
@ -123,7 +129,10 @@ public class ChatManager extends FreedomService
|
|||||||
event.setFormat(format);
|
event.setFormat(format);
|
||||||
|
|
||||||
// Send to discord
|
// Send to discord
|
||||||
plugin.dc.messageChatChannel(player.getName() + " \u00BB " + ChatColor.stripColor(message));
|
if (!ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
|
||||||
|
{
|
||||||
|
plugin.dc.messageChatChannel(player.getName() + " \u00BB " + ChatColor.stripColor(message));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatColor getColor(Admin admin, Displayable display)
|
public ChatColor getColor(Admin admin, Displayable display)
|
||||||
|
@ -163,15 +163,11 @@ public class BlockBlocker extends FreedomService
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (skull.getOwner().length() > 16)
|
if (skull.getOwner().length() > 100)
|
||||||
{
|
{
|
||||||
skull.setOwner(skull.getOwner().substring(0, 16));
|
player.sendMessage(ChatColor.GRAY + "Instead of using Pi to crash players, be useful with your life and use it to discover things.");
|
||||||
SkullMeta meta = (SkullMeta)event.getItemInHand().getItemMeta();
|
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
|
||||||
if (meta != null)
|
event.setCancelled(true);
|
||||||
{
|
|
||||||
meta.setOwner(meta.getOwner().substring(0, 16));
|
|
||||||
event.getItemInHand().setItemMeta(meta);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user