Add message to access and creative mode ignoring

This commit is contained in:
Phoenix616 2020-10-31 20:55:48 +01:00
parent 717dcc8d9d
commit f0bf9a08ec
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
5 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,8 @@ public class Messages {
public static Message ACCESS_DENIED; public static Message ACCESS_DENIED;
public static Message TRADE_DENIED; public static Message TRADE_DENIED;
public static Message TRADE_DENIED_ACCESS_PERMS;
public static Message TRADE_DENIED_CREATIVE_MODE;
public static Message NOT_ENOUGH_MONEY; public static Message NOT_ENOUGH_MONEY;
public static Message NOT_ENOUGH_MONEY_SHOP; public static Message NOT_ENOUGH_MONEY_SHOP;

View File

@ -126,6 +126,7 @@ public class PlayerInteract implements Listener {
return; return;
} }
// don't allow owners or people with access to buy/sell at this shop // don't allow owners or people with access to buy/sell at this shop
Messages.TRADE_DENIED_ACCESS_PERMS.sendWithPrefix(player);
return; return;
} }
} }

View File

@ -21,8 +21,6 @@ import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.UUID; import java.util.UUID;
import static com.Acrobot.ChestShop.Configuration.Messages.CLIENT_DEPOSIT_FAILED; import static com.Acrobot.ChestShop.Configuration.Messages.CLIENT_DEPOSIT_FAILED;
@ -114,6 +112,9 @@ public class ErrorMessageSender implements Listener {
case INVALID_SHOP: case INVALID_SHOP:
message = Messages.INVALID_SHOP_DETECTED; message = Messages.INVALID_SHOP_DETECTED;
break; break;
case CREATIVE_MODE_PROTECTION:
message = Messages.TRADE_DENIED_CREATIVE_MODE;
break;
default: default:
break; break;
} }

View File

@ -20,6 +20,8 @@ METRICS: |-
ACCESS_DENIED: "Du kannst diese Kiste nicht öffnen da dir der Shop nicht gehört!" ACCESS_DENIED: "Du kannst diese Kiste nicht öffnen da dir der Shop nicht gehört!"
TRADE_DENIED: "Du hast keine Berechtigung, um mit diesem Shop zu handeln!" TRADE_DENIED: "Du hast keine Berechtigung, um mit diesem Shop zu handeln!"
TRADE_DENIED_ACCESS_PERMS: "Du darfst nicht mit Shops handeln auf die du zugreifen kannst!"
TRADE_DENIED_CREATIVE_MODE: "Du darfst nicht mit Shops handeln während du im Kreativmodus bist!"
NOT_ENOUGH_MONEY: "Du hast zu wenig Geld!" NOT_ENOUGH_MONEY: "Du hast zu wenig Geld!"
NOT_ENOUGH_MONEY_SHOP: "Der Shop Besitzer hat zu wenig Geld!" NOT_ENOUGH_MONEY_SHOP: "Der Shop Besitzer hat zu wenig Geld!"

View File

@ -20,6 +20,8 @@ METRICS: |-
ACCESS_DENIED: "You don't have permission to access that shop's storage container!" ACCESS_DENIED: "You don't have permission to access that shop's storage container!"
TRADE_DENIED: "You don't have permission to trade with that shop!" TRADE_DENIED: "You don't have permission to trade with that shop!"
TRADE_DENIED_ACCESS_PERMS: "You cannot trade with shops that you have access to!"
TRADE_DENIED_CREATIVE_MODE: "You cannot trade with shops while you are in creative mode!"
NOT_ENOUGH_MONEY: "You don't have enough money!" NOT_ENOUGH_MONEY: "You don't have enough money!"
NOT_ENOUGH_MONEY_SHOP: "Shop owner doesn't have enough money!" NOT_ENOUGH_MONEY_SHOP: "Shop owner doesn't have enough money!"