Added new island and nether island schems

Fixed bugs with schem pasting, especially empty chests.
This commit is contained in:
tastybento 2018-07-03 17:51:01 -07:00
parent 265f05529b
commit aa1ef9bcbd
5 changed files with 6 additions and 6 deletions

View File

@ -41,13 +41,13 @@ permissions:
default: true
bskyblock.island.lock:
description: Allows island locking
default: false
default: true
bskyblock.island.expel:
description: Allows expelling of visitors
default: true
bskyblock.island.ban:
description: Allows banning of visitors
default: false
default: true
bskyblock.island.settings:
description: Player can see server settings
default: true

Binary file not shown.

Binary file not shown.

View File

@ -39,8 +39,6 @@ public class AdminSchemCommand extends CompositeCommand {
return false;
}
File schemFolder = new File(getIWM().getDataFolder(getWorld()), "schems");
getPlugin().log("DEBUG: schemFolder = " + schemFolder.getAbsolutePath());
getPlugin().log(getIWM().getAddon(getWorld()).map(a -> "Addon = " + a.toString() + " data folder = " + a.getDataFolder().getAbsolutePath()).orElse("Not addon"));
Clipboard cb = clipboards.getOrDefault(user.getUniqueId(), new Clipboard(getPlugin(), schemFolder));
if (args.get(0).equalsIgnoreCase("paste")) {

View File

@ -359,8 +359,10 @@ public class Clipboard {
if (bs instanceof InventoryHolder) {
bs.update(true, false);
Inventory ih = ((InventoryHolder)bs).getInventory();
ConfigurationSection inv = config.getConfigurationSection("inventory");
inv.getKeys(false).forEach(i -> ih.setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
if (config.isConfigurationSection("inventory")) {
ConfigurationSection inv = config.getConfigurationSection("inventory");
inv.getKeys(false).forEach(i -> ih.setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
}
}
// Entities