mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-09-07 12:58:02 +02:00
Merge branch 'develop' of https://github.com/BentoBoxWorld/BentoBox.git into develop
This commit is contained in:
commit
f5c138f946
@ -27,14 +27,19 @@ public class BlockEndDragon implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onEnd(ChunkLoadEvent e) {
|
public void onEnd(ChunkLoadEvent e) {
|
||||||
if (!Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getWorld())
|
if (!e.getWorld().getEnvironment().equals(Environment.THE_END)
|
||||||
|| !e.getWorld().getEnvironment().equals(Environment.THE_END)
|
|| e.getChunk().getX() != 0
|
||||||
|| !plugin.getIWM().inWorld(e.getWorld())
|
|| e.getChunk().getZ() != 0
|
||||||
|
|| !Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getWorld())
|
||||||
|
|| !plugin.getIWM().inWorld(e.getWorld())
|
||||||
|| !plugin.getIWM().isEndGenerate(e.getWorld())
|
|| !plugin.getIWM().isEndGenerate(e.getWorld())
|
||||||
|| !plugin.getIWM().isEndIslands(e.getWorld())
|
|| !plugin.getIWM().isEndIslands(e.getWorld())
|
||||||
|| !(e.getChunk().getX() == 0 && e.getChunk().getZ() == 0)) {
|
|| e.getChunk().getBlock(0, 255, 0).getType().equals(Material.END_PORTAL))
|
||||||
|
{
|
||||||
|
// No need to process.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting a End Portal at the top will trick dragon legacy check.
|
// Setting a End Portal at the top will trick dragon legacy check.
|
||||||
e.getChunk().getBlock(0, 255, 0).setType(Material.END_PORTAL);
|
e.getChunk().getBlock(0, 255, 0).setType(Material.END_PORTAL);
|
||||||
}
|
}
|
||||||
@ -46,12 +51,12 @@ public class BlockEndDragon implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onEndBlockPlace(BlockPlaceEvent e) {
|
public void onEndBlockPlace(BlockPlaceEvent e) {
|
||||||
if (!Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getBlock().getWorld())
|
if (e.getBlock().getY() != 255
|
||||||
|| e.getBlock().getY() != 255
|
|
||||||
|| e.getBlock().getX() != 0
|
|| e.getBlock().getX() != 0
|
||||||
|| e.getBlock().getZ() != 0
|
|| e.getBlock().getZ() != 0
|
||||||
|| !e.getBlock().getType().equals(Material.END_PORTAL)
|
|| !e.getBlock().getType().equals(Material.END_PORTAL)
|
||||||
|| !e.getBlock().getWorld().getEnvironment().equals(Environment.THE_END)
|
|| !e.getBlock().getWorld().getEnvironment().equals(Environment.THE_END)
|
||||||
|
|| !Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().inWorld(e.getBlock().getWorld())
|
|| !plugin.getIWM().inWorld(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().isEndGenerate(e.getBlock().getWorld())
|
|| !plugin.getIWM().isEndGenerate(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().isEndIslands(e.getBlock().getWorld())) {
|
|| !plugin.getIWM().isEndIslands(e.getBlock().getWorld())) {
|
||||||
@ -67,12 +72,12 @@ public class BlockEndDragon implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
||||||
public void onEndBlockBreak(BlockBreakEvent e) {
|
public void onEndBlockBreak(BlockBreakEvent e) {
|
||||||
if (!Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getBlock().getWorld())
|
if (e.getBlock().getY() != 255
|
||||||
|| e.getBlock().getY() != 255
|
|
||||||
|| e.getBlock().getX() != 0
|
|| e.getBlock().getX() != 0
|
||||||
|| e.getBlock().getZ() != 0
|
|| e.getBlock().getZ() != 0
|
||||||
|| !e.getBlock().getType().equals(Material.END_PORTAL)
|
|| !e.getBlock().getType().equals(Material.END_PORTAL)
|
||||||
|| !e.getBlock().getWorld().getEnvironment().equals(Environment.THE_END)
|
|| !e.getBlock().getWorld().getEnvironment().equals(Environment.THE_END)
|
||||||
|
|| !Flags.REMOVE_END_EXIT_ISLAND.isSetForWorld(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().inWorld(e.getBlock().getWorld())
|
|| !plugin.getIWM().inWorld(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().isEndGenerate(e.getBlock().getWorld())
|
|| !plugin.getIWM().isEndGenerate(e.getBlock().getWorld())
|
||||||
|| !plugin.getIWM().isEndIslands(e.getBlock().getWorld())) {
|
|| !plugin.getIWM().isEndIslands(e.getBlock().getWorld())) {
|
||||||
|
@ -135,7 +135,7 @@ public class BlueprintsManager {
|
|||||||
* @param addon the {@link GameModeAddon} to get the blueprint bundles.
|
* @param addon the {@link GameModeAddon} to get the blueprint bundles.
|
||||||
*/
|
*/
|
||||||
public Map<String, BlueprintBundle> getBlueprintBundles(@NonNull GameModeAddon addon) {
|
public Map<String, BlueprintBundle> getBlueprintBundles(@NonNull GameModeAddon addon) {
|
||||||
return blueprintBundles.getOrDefault(addon, new HashMap<>());
|
return blueprintBundles.getOrDefault(addon, new TreeMap<>(String.CASE_INSENSITIVE_ORDER));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,7 +153,7 @@ public class BlueprintsManager {
|
|||||||
* @param addon the {@link GameModeAddon} to load the blueprints of.
|
* @param addon the {@link GameModeAddon} to load the blueprints of.
|
||||||
*/
|
*/
|
||||||
public void loadBlueprintBundles(@NonNull GameModeAddon addon) {
|
public void loadBlueprintBundles(@NonNull GameModeAddon addon) {
|
||||||
blueprintBundles.put(addon, new HashMap<>());
|
blueprintBundles.put(addon, new TreeMap<>(String.CASE_INSENSITIVE_ORDER));
|
||||||
|
|
||||||
// See if there are any schems that need converting
|
// See if there are any schems that need converting
|
||||||
new SchemToBlueprint(plugin).convertSchems(addon);
|
new SchemToBlueprint(plugin).convertSchems(addon);
|
||||||
|
Loading…
Reference in New Issue
Block a user