From 7565d0321081fbfdf0fd300f4ab9224d3460ef77 Mon Sep 17 00:00:00 2001 From: 0xBitMC <101461932+0xBitMC@users.noreply.github.com> Date: Sat, 4 Jun 2022 04:09:03 -0700 Subject: [PATCH] Change language in unallied nation spawning error. Currently, when a player tries to use `/n spawn` to a nation that is not allied with them, it simple says "That nation is not public" when it should suggest that nation is not affiliated with their nation, giving a hint at the problem lies with their relationship and not if the nation has enabled/disabled public. --- resources/lang/en-US.yml | 6 +++++- src/com/palmergames/bukkit/towny/utils/SpawnUtil.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/lang/en-US.yml b/resources/lang/en-US.yml index f1b0e1d04c..108532f999 100644 --- a/resources/lang/en-US.yml +++ b/resources/lang/en-US.yml @@ -1,5 +1,5 @@ name: Towny -version: 0.150 +version: 0.151 language: english author: ElgarL website: 'http://townyadvanced.github.io/' @@ -1681,6 +1681,10 @@ msg_cost_spawn_rtp: '&bYou were charged %s to teleport to a random town plot tha #Message shown to a player when they use the town rtp command. msg_you_are_about_to_be_teleported_to_a_plot: 'You are about to be teleported to a plot which is forsale in %s which will let you join. Use ''/plot claim'' to claim your plot when you arrive.' +#Added in 0.151 +msg_err_nation_unaffiliated: '&cThat nation is not affiliated with you.' + + # #Used in the town's status screen to display plots status_plot_string: 'Plots' diff --git a/src/com/palmergames/bukkit/towny/utils/SpawnUtil.java b/src/com/palmergames/bukkit/towny/utils/SpawnUtil.java index 3680b985b2..a14e0de756 100644 --- a/src/com/palmergames/bukkit/towny/utils/SpawnUtil.java +++ b/src/com/palmergames/bukkit/towny/utils/SpawnUtil.java @@ -311,7 +311,7 @@ private static NationSpawnLevel getNationSpawnLevel(Player player, Resident resi } if (nationSpawnLevel == NationSpawnLevel.UNAFFILIATED && !nation.isPublic()) - throw new TownyException(Translatable.of("msg_err_nation_not_public")); + throw new TownyException(Translatable.of("msg_err_nation_unaffiliated")); } // Check if the player has the permission/config allows for this type of spawning.