mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 19:55:17 +01:00
Adjusted to run in 1.13-pre7
Removed references to STATIONARY_WATER as this does not exist in 1.13.
This commit is contained in:
parent
b40023bcf9
commit
342387cf09
@ -52,6 +52,7 @@ public class AddonsManager {
|
||||
plugin.logError("Cannot make addons folder!");
|
||||
return;
|
||||
}
|
||||
|
||||
Arrays.stream(Objects.requireNonNull(f.listFiles())).filter(x -> !x.isDirectory() && x.getName().endsWith(".jar")).forEach(this::loadAddon);
|
||||
addons.forEach(Addon::onLoad);
|
||||
plugin.log("Loaded " + addons.size() + " addons.");
|
||||
@ -122,12 +123,14 @@ public class AddonsManager {
|
||||
addons.add(addon);
|
||||
|
||||
// Inform the console
|
||||
plugin.log("Loaded BSkyBlock addon " + addon.getDescription().getName() + "...");
|
||||
plugin.log("Loaded BSkyBlock addon " + addon.getDescription().getName() + "...");
|
||||
} catch (Exception e) {
|
||||
plugin.log(e.getMessage());
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
if (DEBUG) {
|
||||
plugin.log(f.getName() + "is not a jarfile, ignoring...");
|
||||
plugin.log(f.getName() + " is not a jarfile, ignoring...");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -171,7 +174,7 @@ public class AddonsManager {
|
||||
* @param name - name of the class
|
||||
* @return Class - the class
|
||||
*/
|
||||
public Class<?> getClassByName(final String name) {
|
||||
public Class<?> getClassByName(final String name) {
|
||||
return classes.getOrDefault(name, loader.stream().map(l -> l.findClass(name, false)).filter(Objects::nonNull).findFirst().orElse(null));
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
|
||||
@ -220,7 +221,7 @@ public class NewIsland {
|
||||
|
||||
if (!plugin.getIWM().isUseOwnGenerator(location.getWorld())) {
|
||||
// Block check
|
||||
if (!location.getBlock().isEmpty() && !location.getBlock().isLiquid()) {
|
||||
if (!location.getBlock().isEmpty() && !location.getBlock().getType().equals(Material.WATER)) {
|
||||
plugin.getIslands().createIsland(location);
|
||||
return Result.BLOCK_AT_CENTER;
|
||||
}
|
||||
@ -229,7 +230,7 @@ public class NewIsland {
|
||||
for (int y = 10; y < location.getWorld().getMaxHeight(); y++) {
|
||||
for (int z = -5; z <= 5; z++) {
|
||||
if (!location.getWorld().getBlockAt(x + location.getBlockX(), y, z + location.getBlockZ()).isEmpty()
|
||||
&& !location.getWorld().getBlockAt(x + location.getBlockX(), y, z + location.getBlockZ()).isLiquid()) {
|
||||
&& !location.getWorld().getBlockAt(x + location.getBlockX(), y, z + location.getBlockZ()).getType().equals(Material.WATER)) {
|
||||
plugin.getIslands().createIsland(location);
|
||||
return Result.BLOCKS_IN_AREA;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user