Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
c39eba6bfc
|
|
@ -24,11 +24,13 @@ public class MessageConfig extends AbstractConfiguration {
|
||||||
public static String NO_SHOP_CREATE_PERMISSION = "<red>You don't have permission to create shops.</red>";
|
public static String NO_SHOP_CREATE_PERMISSION = "<red>You don't have permission to create shops.</red>";
|
||||||
public static String SHOP_LIMIT_REACHED = "<red>You cannot create this shop as you already have reached the limit (<limit>).</red>";
|
public static String SHOP_LIMIT_REACHED = "<red>You cannot create this shop as you already have reached the limit (<limit>).</red>";
|
||||||
public static String BREAK_SHOP_WHILE_CONVERSING = "<red>You can not break shop signs while editing them.</red>";
|
public static String BREAK_SHOP_WHILE_CONVERSING = "<red>You can not break shop signs while editing them.</red>";
|
||||||
|
public static String NO_PERMISSION_FOR_SHOP_TYPE = "<red>You do not have permission to use <shop_type> shops.";
|
||||||
|
|
||||||
void loadErrorMessages() {
|
void loadErrorMessages() {
|
||||||
SHOP_ALREADY_EXISTS = getString("errors.shop-already-exists", SHOP_ALREADY_EXISTS);
|
SHOP_ALREADY_EXISTS = getString("errors.shop-already-exists", SHOP_ALREADY_EXISTS);
|
||||||
NO_SHOP_CREATE_PERMISSION = getString("errors.no-shop-create-permission", NO_SHOP_CREATE_PERMISSION);
|
NO_SHOP_CREATE_PERMISSION = getString("errors.no-shop-create-permission", NO_SHOP_CREATE_PERMISSION);
|
||||||
SHOP_LIMIT_REACHED = getString("errors.shop-limit-reached", SHOP_LIMIT_REACHED);
|
SHOP_LIMIT_REACHED = getString("errors.shop-limit-reached", SHOP_LIMIT_REACHED);
|
||||||
BREAK_SHOP_WHILE_CONVERSING = getString("errors.break-shop-while-conversing", BREAK_SHOP_WHILE_CONVERSING);
|
BREAK_SHOP_WHILE_CONVERSING = getString("errors.break-shop-while-conversing", BREAK_SHOP_WHILE_CONVERSING);
|
||||||
|
NO_PERMISSION_FOR_SHOP_TYPE = getString("permissions-messages.shop-type", NO_PERMISSION_FOR_SHOP_TYPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.alttd.playershops.listener;
|
package com.alttd.playershops.listener;
|
||||||
|
|
||||||
import com.alttd.playershops.PlayerShops;
|
import com.alttd.playershops.PlayerShops;
|
||||||
|
import com.alttd.playershops.config.MessageConfig;
|
||||||
import com.alttd.playershops.gui.ShopManagementGui;
|
import com.alttd.playershops.gui.ShopManagementGui;
|
||||||
import com.alttd.playershops.handler.ShopHandler;
|
import com.alttd.playershops.handler.ShopHandler;
|
||||||
import com.alttd.playershops.hook.WorldGuardHook;
|
import com.alttd.playershops.hook.WorldGuardHook;
|
||||||
|
|
@ -60,8 +61,9 @@ public class TransactionListener extends EventListener {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player.hasPermission("playershops.shop.use." + playerShop.getType().toString())) {
|
String shopType = playerShop.getType().toString();
|
||||||
player.sendMiniMessage("<red>You do not have permission to use " + playerShop.getType().toString() + " shops.", null); // TODO config
|
if (!player.hasPermission("playershops.shop.use." + shopType)) {
|
||||||
|
player.sendMiniMessage(MessageConfig.NO_PERMISSION_FOR_SHOP_TYPE, Placeholder.unparsed("shop_type", shopType));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user