Improved lang on /claiminv notification
This commit is contained in:
@@ -37,7 +37,10 @@ command:
|
||||
force-recovered: '&p<admin> &sforce recovered &p<target>''<optional_s> &sinventory from &p<time> &sago.'
|
||||
success: '&sYou recovered &p<target>''<optional_s> &sinventory.'
|
||||
notify-player: '&p<admin> &srecovered your inventory from &p<time> &sago.'
|
||||
notify-player-ensure-room: '&tEnsure you have room in your inventory before claming!'
|
||||
notify-player-claim-button: '&a[Claim]'
|
||||
notify-player-claim-hover: '&aClick to claim your recovered inventory'
|
||||
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'
|
||||
claiminv:
|
||||
cancelled-other: '&aYou cancelled <target>''<optional_s> claimable inventory.'
|
||||
|
||||
@@ -115,7 +115,10 @@ public class Language {
|
||||
COMMAND__INV__FORCE_RECOVERED("admin", "target", "optional_s", "time"),
|
||||
COMMAND__INV__ITEM_VIEWER,
|
||||
COMMAND__INV__NOTIFY_PLAYER("admin", "time"),
|
||||
COMMAND__INV__NOTIFY_PLAYER_CLAIM_BUTTON,
|
||||
COMMAND__INV__NOTIFY_PLAYER_CLAIM_HOVER,
|
||||
COMMAND__INV__NOTIFY_PLAYER_ENSURE_ROOM,
|
||||
COMMAND__INV__NOTIFY_PLAYER_WAITING,
|
||||
COMMAND__INV__RECOVERED("admin", "target", "optional_s", "time"),
|
||||
COMMAND__INV__SUCCESS("target", "optional_s"),
|
||||
COMMAND__LOOKUP__ACTION_NEGATE,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package dev.heliosares.auxprotect.spigot.listeners;
|
||||
|
||||
import dev.heliosares.auxprotect.api.AuxProtectAPI;
|
||||
import dev.heliosares.auxprotect.adapters.sender.SpigotSenderAdapter;
|
||||
import dev.heliosares.auxprotect.core.APPermission;
|
||||
import dev.heliosares.auxprotect.core.Language;
|
||||
import dev.heliosares.auxprotect.database.DbEntry;
|
||||
import dev.heliosares.auxprotect.database.EntryAction;
|
||||
import dev.heliosares.auxprotect.database.SingleItemEntry;
|
||||
@@ -230,13 +231,13 @@ public class PlayerListener implements Listener {
|
||||
} catch (SQLException | BusyException e1) {
|
||||
return;
|
||||
}
|
||||
e.getPlayer().sendMessage(ChatColor.COLOR_CHAR + "aYou have an inventory waiting to be claimed!");
|
||||
e.getPlayer().sendMessage(ChatColor.COLOR_CHAR + "7Ensure you have room in your inventory before claiming!");
|
||||
SpigotSenderAdapter senderAdapter = new SpigotSenderAdapter(plugin, e.getPlayer());
|
||||
senderAdapter.sendLang(Language.L.COMMAND__INV__NOTIFY_PLAYER_WAITING);
|
||||
senderAdapter.sendLang(Language.L.COMMAND__INV__NOTIFY_PLAYER_ENSURE_ROOM);
|
||||
ComponentBuilder message = new ComponentBuilder();
|
||||
message.append(ChatColor.COLOR_CHAR + "f\n ");
|
||||
message.append(ChatColor.COLOR_CHAR + "a[Claim]").event(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/claiminv"))
|
||||
.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
|
||||
new Text(ChatColor.COLOR_CHAR + "aClick to claim your recovered inventory")));
|
||||
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