Temporary fix for island schem pasting.

Note that blocks are not pasted properly. The Clipboard class needs
rewriting to 1.13.
This commit is contained in:
tastybento 2018-08-01 16:40:21 -07:00
parent a9da00478d
commit acbcd27142
2 changed files with 4 additions and 2 deletions

View File

@ -260,7 +260,7 @@ public class Island implements DataObject {
/** /**
* Returns the island range. * Returns the island range.
* It is a convenience method that returns the exact same value than {@link Settings#getIslandDistance()}, although it has been saved into the Island object for easier access. * It is a convenience method that returns the exact same value than island range, although it has been saved into the Island object for easier access.
* @return the island range * @return the island range
* @see #getProtectionRange() * @see #getProtectionRange()
*/ */

View File

@ -260,7 +260,9 @@ public class Clipboard {
int y = location.getBlockY() + Integer.valueOf(pos[1]); int y = location.getBlockY() + Integer.valueOf(pos[1]);
int z = location.getBlockZ() + Integer.valueOf(pos[2]); int z = location.getBlockZ() + Integer.valueOf(pos[2]);
// Default type is air // Default type is air
Material material = Material.getMaterial(config.getString("type", "AIR")); Material mat = Material.getMaterial(config.getString("type", "AIR"));
Material material = mat != null ? mat : Material.getMaterial(config.getString("type", "AIR"), true);
Block block = world.getBlockAt(x, y, z); Block block = world.getBlockAt(x, y, z);
if (config.getBoolean(ATTACHED)) { if (config.getBoolean(ATTACHED)) {
plugin.getServer().getScheduler().runTask(plugin, () -> setBlock(island, block, config, material)); plugin.getServer().getScheduler().runTask(plugin, () -> setBlock(island, block, config, material));