Changed all message keys from 'cant' to 'cannot'.

* 'cant-hire' -> 'cannot-hire'
* 'cant-hire-shop-type' -> 'cannot-hire-shop-type'
* 'cant-trade-with-own-shop' -> 'cannot-trade-with-own-shop'
* 'cant-trade-while-owner-online' -> 'cannot-trade-while-owner-online'
* 'cant-trade-with-shop-missing-container' ->
'cannot-trade-with-shop-missing-container'
master
blablubbabc 2020-11-21 19:00:43 +01:00
parent 201a77d78a
commit b12616ecfc
6 changed files with 25 additions and 18 deletions

View File

@ -17,7 +17,14 @@ Migration notes:
* Language files are located inside a new 'lang' folder now. Existing custom language files need to be manually moved!
Messages:
* All message keys were changed to no longer start with the 'msg' prefix. You will have to manually update your custom language files to adapt for this change.
* All message keys were changed to no longer start with the 'msg' prefix.
* 'cant-hire' -> 'cannot-hire'
* 'cant-hire-shop-type' -> 'cannot-hire-shop-type'
* 'cant-trade-with-own-shop' -> 'cannot-trade-with-own-shop'
* 'cant-trade-while-owner-online' -> 'cannot-trade-while-owner-online'
* 'cant-trade-with-shop-missing-container' -> 'cannot-trade-with-shop-missing-container'
You will have to manually update your custom language files to adapt for these changes.
## v2.12.0 (2020-11-04)
### Supported MC versions: 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.15.2, 1.14.4

View File

@ -177,16 +177,16 @@ public class Messages {
public static Text setForHire = Text.parse("&aThe Shopkeeper was set for hire.");
public static Text hired = Text.parse("&aYou have hired this shopkeeper!");
public static Text missingHirePerm = Text.parse("&7You do not have the permission to hire shopkeepers.");
public static Text cantHire = Text.parse("&aYou cannot afford to hire this shopkeeper.");
public static Text cantHireShopType = Text.parse("&7You do not have the permission to hire this type of shopkeeper.");
public static Text cannotHire = Text.parse("&aYou cannot afford to hire this shopkeeper.");
public static Text cannotHireShopType = Text.parse("&7You do not have the permission to hire this type of shopkeeper.");
// Placeholders: {costs}, {hire-item}
public static Text villagerForHire = Text.parse("&aThe villager offered his services as a shopkeeper in exchange for &6{costs}x {hire-item}&a.");
public static Text missingTradePerm = Text.parse("&7You do not have the permission to trade with this shop.");
public static Text missingCustomTradePerm = Text.parse("&7You do not have the permission to trade with this shop.");
public static Text cantTradeWithOwnShop = Text.parse("&7You cannot trade with your own shop.");
public static Text cantTradeWhileOwnerOnline = Text.parse("&7You cannot trade while the owner of this shop ('&e{owner}&7') is online.");
public static Text cantTradeWithShopMissingContainer = Text.parse("&7You cannot trade with this shop, because its container is missing.");
public static Text cannotTradeWithOwnShop = Text.parse("&7You cannot trade with your own shop.");
public static Text cannotTradeWhileOwnerOnline = Text.parse("&7You cannot trade while the owner of this shop ('&e{owner}&7') is online.");
public static Text cannotTradeWithShopMissingContainer = Text.parse("&7You cannot trade with this shop, because its container is missing.");
public static Text shopkeeperCreated = Text.parse("&aShopkeeper created: &6{type} &7({description})\n{setupDesc}");

View File

@ -66,7 +66,7 @@ public class PlayerShopHiringHandler extends HiringHandler {
if (Settings.hireRequireCreationPermission && (!this.getShopkeeper().getType().hasPermission(player)
|| !this.getShopkeeper().getShopObject().getType().hasPermission(player))) {
// Missing permission to hire this type of shopkeeper:
TextUtils.sendMessage(player, Messages.cantHireShopType);
TextUtils.sendMessage(player, Messages.cannotHireShopType);
this.getUISession(player).abortDelayed();
return;
}
@ -96,7 +96,7 @@ public class PlayerShopHiringHandler extends HiringHandler {
if (hireCost.getAmount() != 0) {
// Not enough money:
TextUtils.sendMessage(player, Messages.cantHire);
TextUtils.sendMessage(player, Messages.cannotHire);
// Close window for this player:
this.getUISession(player).abortDelayed();
return;

View File

@ -42,7 +42,7 @@ public abstract class PlayerShopTradingHandler extends TradingHandler {
if (ownerPlayer != null) {
if (!silent) {
Log.debug(() -> "Blocked trade window opening for " + player.getName() + ", because the shop owner is online.");
TextUtils.sendMessage(player, Messages.cantTradeWhileOwnerOnline, "owner", ownerPlayer.getName());
TextUtils.sendMessage(player, Messages.cannotTradeWhileOwnerOnline, "owner", ownerPlayer.getName());
}
return false;
}
@ -59,7 +59,7 @@ public abstract class PlayerShopTradingHandler extends TradingHandler {
// No trading with own shop:
if (Settings.preventTradingWithOwnShop && shopkeeper.isOwner(tradingPlayer)
&& !PermissionUtils.hasPermission(tradingPlayer, ShopkeepersPlugin.BYPASS_PERMISSION)) {
TextUtils.sendMessage(tradingPlayer, Messages.cantTradeWithOwnShop);
TextUtils.sendMessage(tradingPlayer, Messages.cannotTradeWithOwnShop);
this.debugPreventedTrade(tradingPlayer, "Trading with the own shop is not allowed.");
return false;
}
@ -69,7 +69,7 @@ public abstract class PlayerShopTradingHandler extends TradingHandler {
Player ownerPlayer = shopkeeper.getOwner();
if (ownerPlayer != null && !shopkeeper.isOwner(tradingPlayer)
&& !PermissionUtils.hasPermission(tradingPlayer, ShopkeepersPlugin.BYPASS_PERMISSION)) {
TextUtils.sendMessage(tradingPlayer, Messages.cantTradeWhileOwnerOnline, "owner", ownerPlayer.getName());
TextUtils.sendMessage(tradingPlayer, Messages.cannotTradeWhileOwnerOnline, "owner", ownerPlayer.getName());
this.debugPreventedTrade(tradingPlayer, "Trading is not allowed while the shop owner is online.");
return false;
}
@ -78,7 +78,7 @@ public abstract class PlayerShopTradingHandler extends TradingHandler {
// Check for the shop's container:
Block container = shopkeeper.getContainer();
if (!ShopContainers.isSupportedContainer(container.getType())) {
TextUtils.sendMessage(tradingPlayer, Messages.cantTradeWithShopMissingContainer, "owner", shopkeeper.getOwnerName());
TextUtils.sendMessage(tradingPlayer, Messages.cannotTradeWithShopMissingContainer, "owner", shopkeeper.getOwnerName());
this.debugPreventedTrade(tradingPlayer, "The shop's container is missing.");
return false;
}

View File

@ -135,7 +135,7 @@ public class VillagerInteractionListener implements Listener {
if (costs > 0) {
ItemStack[] storageContents = playerInventory.getStorageContents();
if (!ItemUtils.containsAtLeast(storageContents, Settings.hireItem, costs)) {
TextUtils.sendMessage(player, Messages.cantHire);
TextUtils.sendMessage(player, Messages.cannotHire);
Log.debug(" ..not holding enough hire items.");
return false;
}

View File

@ -217,15 +217,15 @@ must-hold-hire-item: "&7You have to hold the required hire item in your hand."
set-for-hire: "&aThe Shopkeeper was set for hire."
hired: "&aYou have hired this shopkeeper!"
missing-hire-perm: "&7You do not have the permission to hire shopkeepers."
cant-hire: "&7You cannot afford to hire this shopkeeper."
cant-hire-shop-type: "&7You do not have the permission to hire this type of shopkeeper."
cannot-hire: "&7You cannot afford to hire this shopkeeper."
cannot-hire-shop-type: "&7You do not have the permission to hire this type of shopkeeper."
villager-for-hire: "&aThe villager offered his services as a shopkeeper in exchange for &6{costs}x {hire-item}&a."
missing-trade-perm: "&7You do not have the permission to trade with this shop."
missing-custom-trade-perm: "&7You do not have the permission to trade with this shop."
cant-trade-with-own-shop: "&7You cannot trade with your own shop."
cant-trade-while-owner-online: "&7You cannot trade while the owner of this shop ('&e{owner}&7') is online."
cant-trade-with-shop-missing-container: "&7You cannot trade with this shop, because its container is missing."
cannot-trade-with-own-shop: "&7You cannot trade with your own shop."
cannot-trade-while-owner-online: "&7You cannot trade while the owner of this shop ('&e{owner}&7') is online."
cannot-trade-with-shop-missing-container: "&7You cannot trade with this shop, because its container is missing."
shopkeeper-created: "&aShopkeeper created: &6{type} &7({description})\n{setupDesc}"