Skip to content

Commit

Permalink
Warp hint uses welcomeLine from config
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Sep 28, 2018
1 parent 3e07cb1 commit c791126
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public boolean execute(User user, String label, List<String> args) {
Set<UUID> warpList = addon.getWarpSignsManager().listWarps(getWorld());
if (warpList.isEmpty()) {
user.sendMessage("warps.error.no-warps-yet");
user.sendMessage("warps.warpTip");
user.sendMessage("warps.warpTip", "[text]", getAddon().getConfig().getString("welcomeLine", "[WELCOME]"));
return true;
} else {
// Check if this is part of a name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void setup() {
public boolean execute(User user, String label, List<String> args) {
if (plugin.getWarpSignsManager().listWarps(getWorld()).isEmpty()) {
user.sendMessage("warps.error.no-warps-yet");
user.sendMessage("warps.warpTip");
user.sendMessage("warps.warpTip", "[text]", getAddon().getConfig().getString("welcomeLine", "[WELCOME]"));
} else {
plugin.getWarpPanelManager().showWarpPanel(getWorld(), user,0);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ warps:
previous: "&6Previous page"
next: "&6Next page"
warpToPlayersSign: "&6Warping to [player]'s sign"
warpTip: "&6Place a warp sign with [Welcome] on the top"
# The [text] is replaced with the welcome line text from config.yml
warpTip: "&6Place a warp sign with [text] on the top"
error:
does-not-exist: "&cOh snap! That warp no longer exists!"
no-remove: "&CYou cannot remove that sign!"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ warps:
previous: "&6上一页"
next: "&6下一页"
warpToPlayersSign: "&6正传送到 [player] 的传送木牌"
warpTip: "&6放置一个第一行是 [Welcome] 的木牌以创建传送木牌"
warpTip: "&6放置一个第一行是 [text] 的木牌以创建传送木牌"
error:
no-remove: "&C无权移除传送木牌!"
not-enough-level: "&C岛屿等级不够高!"
Expand Down

0 comments on commit c791126

Please sign in to comment.