mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 01:45:44 -05:00
append new text instead of concatenating (#330)
This commit is contained in:
parent
baddda61aa
commit
411cdaa104
2 changed files with 13 additions and 5 deletions
|
@ -35,9 +35,13 @@ public final class CommandDestroyEntities implements CommandExecutor {
|
||||||
worldCount++;
|
worldCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(Component.text(
|
sender.sendMessage(
|
||||||
"Successfully destroyed " + entityCount + " entities in "
|
Component.text("Successfully destroyed ")
|
||||||
+ worldCount + " worlds"));
|
.append(Component.text(entityCount))
|
||||||
|
.append(Component.text(" entities in "))
|
||||||
|
.append(Component.text(worldCount))
|
||||||
|
.append(Component.text(" worlds"))
|
||||||
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,12 @@ public final class CommandPing implements CommandExecutor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage(Component.text((args.length == 0 ?
|
Component namePrefix = args.length == 0
|
||||||
"Your" : target.getName() + "'s") + " ping is ")
|
? Component.text("Your")
|
||||||
|
: Component.text(target.getName()).append(Component.text("'s"));
|
||||||
|
|
||||||
|
sender.sendMessage(namePrefix
|
||||||
|
.append(Component.text(" ping is "))
|
||||||
.append(Component.text(ping, highlighting))
|
.append(Component.text(ping, highlighting))
|
||||||
.append(Component.text("ms.", highlighting)));
|
.append(Component.text("ms.", highlighting)));
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue