Alternate message for bedrock players
This commit is contained in:
@@ -39,6 +39,7 @@ command:
|
||||
notify-player: '&p<admin> &srecovered your inventory from &p<time> &sago.'
|
||||
notify-player-claim-button: '&a[Claim]'
|
||||
notify-player-claim-hover: '&aClick to claim your recovered inventory'
|
||||
notify-player-claim-alt: '&fRun &b/claiminv&f to claim.'
|
||||
notify-player-ensure-room: '&tEnsure you have room in your inventory before claiming!'
|
||||
notify-player-waiting: '&aYou have a restored inventory waiting to be claimed!'
|
||||
item-viewer: 'Item Viewer'
|
||||
|
||||
@@ -117,6 +117,7 @@ public class Language {
|
||||
COMMAND__INV__NOTIFY_PLAYER("admin", "time"),
|
||||
COMMAND__INV__NOTIFY_PLAYER_CLAIM_BUTTON,
|
||||
COMMAND__INV__NOTIFY_PLAYER_CLAIM_HOVER,
|
||||
COMMAND__INV__NOTIFY_PLAYER_CLAIM_ALT,
|
||||
COMMAND__INV__NOTIFY_PLAYER_ENSURE_ROOM,
|
||||
COMMAND__INV__NOTIFY_PLAYER_WAITING,
|
||||
COMMAND__INV__RECOVERED("admin", "target", "optional_s", "time"),
|
||||
|
||||
@@ -236,8 +236,12 @@ public class PlayerListener implements Listener {
|
||||
senderAdapter.sendLang(Language.L.COMMAND__INV__NOTIFY_PLAYER_ENSURE_ROOM);
|
||||
ComponentBuilder message = new ComponentBuilder();
|
||||
message.append(ChatColor.COLOR_CHAR + "f\n ");
|
||||
if (e.getPlayer().getUniqueId().getMostSignificantBits() == 0) { // bedrock player
|
||||
message.append(Language.L.COMMAND__INV__NOTIFY_PLAYER_CLAIM_ALT.translate());
|
||||
} else {
|
||||
message.append(Language.L.COMMAND__INV__NOTIFY_PLAYER_CLAIM_BUTTON.translate()).event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/claiminv"))
|
||||
.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(Language.L.COMMAND__CLAIMINV__CLAIM_BUTTON__HOVER.translate())));
|
||||
}
|
||||
message.append("\n" + ChatColor.COLOR_CHAR + "f").event((ClickEvent) null).event((HoverEvent) null);
|
||||
e.getPlayer().spigot().sendMessage(message.create());
|
||||
e.getPlayer().playSound(e.getPlayer().getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1, 1);
|
||||
|
||||
Reference in New Issue
Block a user