forked from chipmunkmc/chipmunkbot
truncation.,.,.,,,..,,
This commit is contained in:
parent
3493df35e9
commit
eeea72ccfd
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ public class ChatPlugin extends SessionAdapter {
|
||||||
public void tellraw (Component message, String targets) {
|
public void tellraw (Component message, String targets) {
|
||||||
final int maxLength = client.core().maxCommandLength();
|
final int maxLength = client.core().maxCommandLength();
|
||||||
String command = "minecraft:tellraw " + targets + " " + GsonComponentSerializer.gson().serialize(message);
|
String command = "minecraft:tellraw " + targets + " " + GsonComponentSerializer.gson().serialize(message);
|
||||||
if (command.length() > maxLength) command = "minecraft:w " + targets + " " + ComponentUtilities.stringify(message);
|
if (command.length() > maxLength) command = ("minecraft:w " + targets + " " + ComponentUtilities.stringify(message));
|
||||||
|
if (command.length() > maxLength) command = command.substring(0, maxLength);
|
||||||
client.core().run(command);
|
client.core().run(command);
|
||||||
}
|
}
|
||||||
public void tellraw (Component message) { tellraw(message, "@a"); }
|
public void tellraw (Component message) { tellraw(message, "@a"); }
|
||||||
|
|
Loading…
Reference in a new issue