~ Improved #8.
This commit is contained in:
parent
b577259249
commit
769f2c684e
@ -153,35 +153,12 @@ public class ArenaHandler {
|
||||
.get(ConfigC.shop_blockChooserv1Enabled) == true) {
|
||||
if (W.shop.getFile().get(
|
||||
player.getName()
|
||||
+ ".blockchooser") != null) {
|
||||
ItemStack shopBlockChooser = new ItemStack(
|
||||
Material.getMaterial((String) W.config
|
||||
.get(ConfigC.shop_blockChooserv1IDname)),
|
||||
1);
|
||||
ItemMeta shopBlockChooser_IM = shopBlockChooser
|
||||
.getItemMeta();
|
||||
shopBlockChooser_IM
|
||||
.setDisplayName(MessageM
|
||||
.replaceAll((String) W.config
|
||||
.get(ConfigC.shop_blockChooserv1Name)));
|
||||
List<String> lores = W.config
|
||||
.getFile()
|
||||
.getStringList(
|
||||
ConfigC.shop_blockChooserv1Description.location);
|
||||
List<String> lores2 = new ArrayList<String>();
|
||||
for (String lore : lores) {
|
||||
lores2.add(MessageM
|
||||
.replaceAll(lore));
|
||||
}
|
||||
shopBlockChooser_IM.setLore(lores2);
|
||||
shopBlockChooser
|
||||
.setItemMeta(shopBlockChooser_IM);
|
||||
|
||||
player.getInventory().addItem(
|
||||
shopBlockChooser);
|
||||
}
|
||||
if (!PermissionsM.hasPerm(player,
|
||||
Permissions.vip, true)) {
|
||||
+ ".blockchooser") != null
|
||||
|| PermissionsM
|
||||
.hasPerm(
|
||||
player,
|
||||
Permissions.shopblockchooser,
|
||||
false)) {
|
||||
ItemStack shopBlockChooser = new ItemStack(
|
||||
Material.getMaterial((String) W.config
|
||||
.get(ConfigC.shop_blockChooserv1IDname)),
|
||||
|
@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
import nl.Steffion.BlockHunt.Arena.ArenaType;
|
||||
import nl.Steffion.BlockHunt.Managers.MessageM;
|
||||
import nl.Steffion.BlockHunt.Managers.PermissionsM;
|
||||
import nl.Steffion.BlockHunt.PermissionsC.Permissions;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
@ -310,8 +312,9 @@ public class InventoryHandler {
|
||||
|
||||
shop.setItem(0, shopTokens);
|
||||
if ((Boolean) W.config.get(ConfigC.shop_blockChooserv1Enabled) == true
|
||||
&& (Boolean) W.shop.getFile().get(
|
||||
player.getName() + ".blockchooser") == null) {
|
||||
&& ((Boolean) W.shop.getFile().get(
|
||||
player.getName() + ".blockchooser") == null || !PermissionsM
|
||||
.hasPerm(player, Permissions.shopblockchooser, false))) {
|
||||
shop.setItem(1, shopBlockChooser);
|
||||
}
|
||||
if ((Boolean) W.config.get(ConfigC.shop_BlockHuntPassv2Enabled) == true) {
|
||||
|
@ -29,6 +29,7 @@ public class PermissionsC {
|
||||
leave (main + "leave", PType.PLAYER),
|
||||
list (main + "list", PType.PLAYER),
|
||||
shop (main + "shop", PType.PLAYER),
|
||||
shopblockchooser (main + "shop.blockchooser", PType.ADMIN),
|
||||
start (main + "start", PType.MODERATOR),
|
||||
create (main + "create", PType.ADMIN),
|
||||
set (main + "set", PType.MODERATOR),
|
||||
@ -36,8 +37,7 @@ public class PermissionsC {
|
||||
signcreate (main + "signcreate", PType.MODERATOR),
|
||||
remove (main + "remove", PType.ADMIN),
|
||||
tokens (main + "tokens", PType.ADMIN),
|
||||
allcommands (main + "allcommands", PType.OP),
|
||||
vip (main + "vip", PType.ADMIN);
|
||||
allcommands (main + "allcommands", PType.OP);
|
||||
|
||||
public String perm;
|
||||
public PType type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user