diff --git a/config.yml b/config.yml index 86efbbd..e24eed4 100644 --- a/config.yml +++ b/config.yml @@ -233,7 +233,7 @@ schematicProfiles: ## You can add groups by using 'g:', so in total you could use: '%uuid%, %friendsuuid%, g:vip, n:cool-guy' ## For flags like 'entry' and 'exit' you can add group setting by using 'g:' behind it, is one of the following: ## members, non_members, owners, non_owners, all. Example, only owners can enter the region: -## entry: 'allow g:owners' +## entry: 'deny g:non_owners' ## Use '' for a flag to reset it. flagProfiles: default: diff --git a/plugin.yml b/plugin.yml index b895800..52f727b 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,6 +1,6 @@ name: AreaShop main: nl.evolutioncoding.areashop.AreaShop -version: 2.1.3 +version: 2.1.4 depend: [Vault, WorldGuard, WorldEdit] softdepend: [Multiverse-Core] author: NLThijs48 @@ -9,8 +9,6 @@ commands: AreaShop: description: For all commands use /as help usage: AreaShop has not started correctly, check the console and correct any errors - permission: areashop.help - permission-message: You don't have aliases: [as] permissions: areashop.*: @@ -53,7 +51,7 @@ permissions: areashop.stopresellall: true areashop.addfriendall: true areashop.delfriendall: true - areashop.nofityupdate: true + areashop.notifyupdate: true areashop.help: description: Allows you to see the help pages default: true @@ -207,6 +205,6 @@ permissions: areashop.delfriendall: description: Allows you to delete friends from all regions default: op - areashop.nofityupdate: + areashop.notifyupdate: description: Will notify this player when an update is available default: op \ No newline at end of file diff --git a/src/nl/evolutioncoding/areashop/regions/BuyRegion.java b/src/nl/evolutioncoding/areashop/regions/BuyRegion.java index d68dd68..4e2ecf1 100644 --- a/src/nl/evolutioncoding/areashop/regions/BuyRegion.java +++ b/src/nl/evolutioncoding/areashop/regions/BuyRegion.java @@ -266,7 +266,7 @@ public class BuyRegion extends GeneralRegion { } /* Check if the player has enough money */ - if(plugin.getEconomy().has(player, getWorldName(), getPrice())) { + if((!isResell && plugin.getEconomy().has(player, getWorldName(), getPrice())) || (isResell && plugin.getEconomy().has(player, getWorldName(), getResellPrice()))) { UUID oldOwner = getBuyer(); if(isResell && oldOwner != null) { clearFriends(); @@ -335,7 +335,13 @@ public class BuyRegion extends GeneralRegion { return true; } else { /* Player has not enough money */ - plugin.message(player, "buy-lowMoney", plugin.formatCurrency(plugin.getEconomy().getBalance(player, getWorldName())), getFormattedPrice()); + String requiredMoney = ""; + if(isResell) { + requiredMoney = getFormattedResellPrice(); + } else { + requiredMoney = getFormattedPrice(); + } + plugin.message(player, "buy-lowMoney", plugin.formatCurrency(plugin.getEconomy().getBalance(player, getWorldName())), requiredMoney); } } else { if(isBuyer(player)) {