Spigot 1.16.1 + Biome menu

This commit is contained in:
Fabrizio La Rosa 2020-06-25 22:33:14 +02:00
parent 0fac999afe
commit 95d605c025
23 changed files with 671 additions and 489 deletions

10
pom.xml
View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.songoda</groupId>
<artifactId>skyblock</artifactId>
<version>2.3.4-DEV2</version>
<version>2.3.4-DEV3</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -147,9 +147,9 @@
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.destroystokyo.papermc</groupId>
<artifactId>paper</artifactId>
<version>1.15.2</version>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
@ -161,7 +161,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.15</version>
<version>1.16.1</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -22,9 +22,8 @@ public class BiomeManager {
}
public void setBiome(Island island, Biome biome) {
Location location = island.getLocation(IslandWorld.Normal, IslandEnvironment.Island);
if (location == null) return;
if (island.getLocation(IslandWorld.Normal, IslandEnvironment.Island) == null) return;
if(skyblock.isPaperAsync()){
// We keep it sequentially in order to use less RAM
@ -48,7 +47,13 @@ public class BiomeManager {
private void setChunkBiome(Biome biome, Chunk chunk) {
for(int xx = 0; xx < 16; xx++){
for(int zz = 0; zz < 16; zz++){
chunk.getBlock(xx, 0, zz).setBiome(biome);
//if(ServerVersion.isServerVersionBelow(ServerVersion.V1_15)){
chunk.getBlock(xx, 0, zz).setBiome(biome);
//} else {
// for(int i = 0; i<256; i+=2){
// chunk.getBlock(xx, i, zz).setBiome(biome);
// }
//}
}
}
}

View File

@ -3,12 +3,16 @@ package com.songoda.skyblock.command.commands.island;
import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.skyblock.command.SubCommand;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.gui.bank.GuiBank;
import com.songoda.skyblock.gui.wip.GuiBiome;
import com.songoda.skyblock.island.Island;
import com.songoda.skyblock.island.IslandManager;
import com.songoda.skyblock.island.IslandRole;
import com.songoda.skyblock.island.IslandWorld;
import com.songoda.skyblock.menus.Biome;
import com.songoda.skyblock.message.MessageManager;
import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.world.WorldManager;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
@ -34,7 +38,7 @@ public class BiomeCommand extends SubCommand {
} else if ((island.hasRole(IslandRole.Operator, player.getUniqueId())
&& skyblock.getPermissionManager().hasPermission(island,"Biome", IslandRole.Operator))
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
Biome.getInstance().open(player);
skyblock.getGuiManager().showGUI(player, new GuiBiome(skyblock, player, island, IslandWorld.Normal, null, false)); // TODO Nether and End support
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
} else {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.Permission.Message"));

View File

@ -67,7 +67,7 @@ public class FileManager {
configFiles.put("language.yml", new File(skyblock.getDataFolder(), "language.yml"));
configFiles.put("settings.yml", new File(skyblock.getDataFolder(), "settings.yml"));
configFiles.put("upgrades.yml", new File(skyblock.getDataFolder(), "upgrades.yml"));
// configFiles.put("biomes.yml", new File(skyblock.getDataFolder(), "biomes.yml"));
configFiles.put("biomes.yml", new File(skyblock.getDataFolder(), "biomes.yml"));
// configFiles.put("menus.yml", new File(skyblock.getDataFolder(), "menus.yml"));
configFiles.put("generators.yml", new File(skyblock.getDataFolder(), "generators.yml"));
configFiles.put("stackables.yml", new File(skyblock.getDataFolder(), "stackables.yml"));
@ -102,10 +102,10 @@ public class FileManager {
}
if (configFile.exists()) {
if (fileName.equals("config.yml") || fileName.equals("language.yml") || fileName.equals("worlds.yml")) {
if (fileName.equals("config.yml") || fileName.equals("language.yml") || fileName.equals("worlds.yml") || fileName.equals("biomes.yml")) {
FileChecker fileChecker;
if (fileName.equals("config.yml")) {
if (fileName.equals("config.yml") || fileName.equals("biomes.yml")) {
fileChecker = new FileChecker(skyblock, this, fileName, true);
} else {
fileChecker = new FileChecker(skyblock, this, fileName, false);

View File

@ -37,10 +37,6 @@ public class GeneratorManager {
if (configLoad.getString("Generators") == null)
return;
CompatibleMaterial[] oreMaterials = new CompatibleMaterial[]{CompatibleMaterial.COAL, CompatibleMaterial.CHARCOAL, CompatibleMaterial.DIAMOND,
CompatibleMaterial.IRON_INGOT, CompatibleMaterial.GOLD_INGOT, CompatibleMaterial.EMERALD};
Random rnd = new Random();
for (String generatorList : configLoad.getConfigurationSection("Generators").getKeys(false)) {
if (configLoad.getString("Generators." + generatorList + ".Name") == null)
continue;
@ -55,10 +51,18 @@ public class GeneratorManager {
}
}
}
Random rnd = new Random();
CompatibleMaterial icon;
if(!generatorMaterials.isEmpty()) {
icon = generatorMaterials.get(rnd.nextInt(generatorMaterials.size())).getMaterials();
} else {
icon = CompatibleMaterial.STONE;
}
generatorStorage.add(new Generator(configLoad.getString("Generators." + generatorList + ".Name"),
IslandWorld.valueOf(configLoad.getString("Generators." + generatorList + ".World", "Normal")),
oreMaterials[rnd.nextInt(oreMaterials.length)], generatorMaterials,
icon, generatorMaterials,
configLoad.getBoolean("Generators." + generatorList + ".Permission")));
}
}

View File

@ -1,13 +1,18 @@
package com.songoda.skyblock.gui.wip;
import com.songoda.core.compatibility.CompatibleBiome;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.skyblock.SkyBlock;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.io.File;
import java.util.Map;
public class BiomeIcon {
public final CompatibleBiome biome;
@ -19,8 +24,15 @@ public class BiomeIcon {
public BiomeIcon(SkyBlock plugin, CompatibleBiome biome){
this.biome = biome;
FileConfiguration biomeConfig = plugin.getFileManager().getConfig(new File("biomes.yml")).getFileConfiguration();
this.displayItem = null; // TODO
FileConfiguration biomeConfig = plugin.getFileManager().getConfig(new File(plugin.getDataFolder(),"biomes.yml")).getFileConfiguration();
CompatibleMaterial tempMat = CompatibleMaterial.getMaterial(biomeConfig.getString("Biomes." + biome.name() + ".DisplayItem.Material"));
if(tempMat == null){
tempMat = CompatibleMaterial.STONE;
}
byte tempData = (byte) biomeConfig.getInt("Biomes." + biome.name() + ".DisplayItem.Data", 0);
this.displayItem = CompatibleMaterial.getMaterial(tempMat.getMaterial(), tempData).getItem();
ItemMeta im = displayItem.getItemMeta();
if(im != null){
im.setDisplayName(ChatColor.translateAlternateColorCodes('&', biomeConfig.getString("Biomes." + biome.name() + ".DisplayName", biome.name())));
@ -45,4 +57,13 @@ public class BiomeIcon {
this.nether = nether;
this.end = end;
}
public void enchant(){
ItemMeta im = displayItem.getItemMeta();
if(im != null){
im.addEnchant(Enchantment.DURABILITY,1, true);
im.addItemFlags(ItemFlag.HIDE_ENCHANTS);
displayItem.setItemMeta(im);
}
}
}

View File

@ -24,6 +24,7 @@ import com.songoda.skyblock.island.IslandWorld;
import com.songoda.skyblock.message.MessageManager;
import com.songoda.skyblock.sound.SoundManager;
import com.songoda.skyblock.utils.NumberUtil;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@ -32,6 +33,7 @@ import org.bukkit.inventory.meta.ItemMeta;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
@ -46,7 +48,7 @@ public class GuiBiome extends Gui {
private final boolean admin;
public GuiBiome(SkyBlock plugin, Player player, Island island, IslandWorld world, Gui returnGui, boolean admin) {
super(returnGui);
super(6, returnGui);
this.plugin = plugin;
this.island = island;
this.world = world;
@ -58,7 +60,7 @@ public class GuiBiome extends Gui {
this.languageLoad = plugin.getFileManager()
.getConfig(new File(plugin.getDataFolder(), "language.yml")).getFileConfiguration();
setDefaultItem(null);
setTitle(TextUtils.formatText(languageLoad.getString("Menu.Input.Title")));
setTitle(TextUtils.formatText(languageLoad.getString("Menu.Biome.Title")));
paint();
}
@ -71,56 +73,63 @@ public class GuiBiome extends Gui {
if (inventory != null)
inventory.clear();
setActionForRange(0, 0, 1, 8, null);
setActionForRange(0, 0, 5, 9, null);
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
TextUtils.formatText(languageLoad.getString("Menu.Bans.Item.Exit.Displayname"))), (event) -> {
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Exit.Displayname"))), (event) -> {
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
event.player.closeInventory();
});
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
TextUtils.formatText(languageLoad.getString("Menu.Bans.Item.Exit.Displayname"))), (event) -> {
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Exit.Displayname"))), (event) -> {
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
event.player.closeInventory();
});
setItem(4, GuiUtils.createButtonItem(CompatibleMaterial.PAINTING, // Info
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Info.Displayname")),
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Info.Lore")
.replace("%biome_type", island.getBiomeName()))));
for(int i=9; i<18; i++){
setItem(i, CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem());
}
List<BiomeIcon> biomes = new ArrayList<>();
for(CompatibleBiome biome : CompatibleBiome.getCompatibleBiomes()) {
if(biome.isCompatible()
&& player.hasPermission("fabledskyblock.biome." + biome.name().toLowerCase())
&& config.getBoolean("Island.Biome." + world.name() + "." + biome.name(), false)){
if(biome.isCompatible()){
BiomeIcon icon = new BiomeIcon(plugin, biome);
switch(world){
case Normal:
if(icon.normal){
biomes.add(icon);
}
break;
case Nether:
if(icon.nether){
biomes.add(icon);
}
break;
case End:
if(icon.end){
biomes.add(icon);
}
break;
if(!icon.permission || player.hasPermission("fabledskyblock.biome." + biome.name().toLowerCase())){
switch(world){
case Normal:
if(icon.normal){
biomes.add(icon);
}
break;
case Nether:
if(icon.nether){
biomes.add(icon);
}
break;
case End:
if(icon.end){
biomes.add(icon);
}
break;
}
}
}
}
if(biomes.size() > 0){
biomes.sort(Comparator.comparing(m -> m.biome));
this.pages = (int) Math.max(1, Math.ceil((double) biomes.size() / 27d));
if (page != 1)
setButton(5, 2, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
TextUtils.formatText(languageLoad.getString("Menu.Bank.Item.Last.Displayname"))),
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Last.Displayname"))),
(event) -> {
page--;
paint();
@ -128,14 +137,14 @@ public class GuiBiome extends Gui {
if (page != pages)
setButton(5, 6, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
TextUtils.formatText(languageLoad.getString("Menu.Bank.Item.Next.Displayname"))),
TextUtils.formatText(languageLoad.getString("Menu.Biome.Item.Next.Displayname"))),
(event) -> {
page++;
paint();
});
for (int i = 9; i < ((getRows()-1)*9)+9; i++) {
int current = ((page - 1) * 36) - 9;
for (int i = 18; i < ((getRows()-2)*9)+9; i++) {
int current = ((page - 1) * 27) - 18;
if (current + i >= biomes.size()) {
setItem(i, null);
continue;
@ -143,6 +152,10 @@ public class GuiBiome extends Gui {
BiomeIcon icon = biomes.get(current + i);
if (icon == null) continue;
if(icon.biome.getBiome().equals(island.getBiome())){
icon.enchant();
}
setButton(i, icon.displayItem, event -> {
if (cooldownManager.hasPlayer(CooldownType.Biome, player) && !player.hasPermission("fabledskyblock.bypass.cooldown")) {
CooldownPlayer cooldownPlayer = cooldownManager.getCooldownPlayer(CooldownType.Biome, player);
@ -169,9 +182,11 @@ public class GuiBiome extends Gui {
return;
}
cooldownManager.createPlayer(CooldownType.Biome, player);
biomeManager.setBiome(island, icon.biome.getBiome());
Bukkit.getScheduler().runTask(plugin, () -> {
biomeManager.setBiome(island, icon.biome.getBiome());
island.save();
});
island.setBiome(icon.biome.getBiome());
island.save();
soundManager.playSound(island.getLocation(IslandWorld.Normal, IslandEnvironment.Island),
CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
@ -179,10 +194,11 @@ public class GuiBiome extends Gui {
if (!islandManager.isPlayerAtIsland(island, player, IslandWorld.Normal)) {
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
}
paint();
});
}
} else {
setItem(31, CompatibleMaterial.BARRIER.getItem());
setItem(31, CompatibleMaterial.BARRIER.getItem()); // TODO
}
}
}

View File

@ -1137,29 +1137,26 @@ public class IslandManager {
}
}
}
Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, () -> {
Location loc = island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor);
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(loc);
if(safeLoc != null){
loc = safeLoc.join();
}
}
if(loc != null){
PaperLib.teleportAsync(player, loc);
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
player.setFallDistance(0.0F);
}
} else {
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Command.Island.Teleport.Unsafe.Message")));
Location loc = island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor);
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
Location safeLoc = LocationUtil.getSafeLocation(loc);
if(safeLoc != null){
loc = safeLoc;
}
}
if(loc != null){
PaperLib.teleportAsync(player, loc);
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
player.setFallDistance(0.0F);
}
});
} else {
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Command.Island.Teleport.Unsafe.Message")));
}
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
player.setFallDistance(0.0F);
}
List<String> islandWelcomeMessage = island.getMessage(IslandMessage.Welcome);

View File

@ -3,6 +3,7 @@ package com.songoda.skyblock.listeners;
import com.google.common.collect.Lists;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager.Config;
import com.songoda.skyblock.generator.Generator;
@ -215,7 +216,7 @@ public class Block implements Listener {
if(!player.hasPermission("fabledskyblock.bypass.netherplace") && !islandManager.isIslandWorldUnlocked(island, IslandWorld.Nether)){
for(String s : Objects.requireNonNull(configLoad.getConfigurationSection("Island.Restrict.NetherBlocks")).getKeys(false)){
if(s.equalsIgnoreCase(block.getType().toString())){
if(configLoad.getBoolean("Island.Restrict.NetherBlocks." + s)){
if(configLoad.getBoolean("Island.Restrict.NetherBlocks." + s, false)){
skyblock.getMessageManager().sendMessage(player, Objects.requireNonNull(skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Island.Unlock.NetherBlocksPlace.Message")));
event.setCancelled(true);
@ -326,24 +327,31 @@ public class Block implements Listener {
Collection<Entity> entities = block.getWorld().getNearbyEntities(block.getLocation(), 1d, 1d, 1d);
if(entities.size() > 0){
for(Entity ent : entities){
boolean witherSkeleton;
if (NMSUtil.getVersionNumber() > 10) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
} else {
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
}
if (ent.getType().equals(EntityType.PIG_ZOMBIE) ||
ent.getType().equals(EntityType.BLAZE) ||
ent.getType().equals(EntityType.MAGMA_CUBE) ||
ent.getType().equals(EntityType.WITHER) ||
ent.getType().equals(EntityType.GHAST) ||
witherSkeleton) {
if(block.getRelative(event.getFace().getOppositeFace()).getType().equals(Material.WATER)){
event.setCancelled(true);
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
if((((ent instanceof Blaze || ent instanceof MagmaCube) || ent instanceof Wither) || ent instanceof Ghast) || witherSkeleton){
event.setCancelled(true);
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
} else {
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){
if(((ent instanceof Piglin || ent instanceof Hoglin) || ent instanceof Strider) || ent instanceof Zoglin) {
event.setCancelled(true);
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
}
} else {
if(ent instanceof PigZombie) {
event.setCancelled(true);
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
}
}
break;
}
}
}

View File

@ -194,41 +194,37 @@ public class Move implements Listener {
}
private void teleportPlayerToIslandSpawn(Player player, IslandWorld world, Island island) {
Bukkit.getScheduler().runTaskAsynchronously(skyblock, () -> {
Location loc = null;
if (island.hasRole(IslandRole.Member, player.getUniqueId()) || island.hasRole(IslandRole.Operator, player.getUniqueId())
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Main));
if(safeLoc != null){
loc = safeLoc.join();
}
} else {
loc = island.getLocation(world, IslandEnvironment.Main);
LocationUtil.removeWaterFromLoc(skyblock, loc);
Location loc = null;
if (island.hasRole(IslandRole.Member, player.getUniqueId()) || island.hasRole(IslandRole.Operator, player.getUniqueId())
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Main));
if(safeLoc != null){
loc = safeLoc;
}
} else {
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Visitor));
if(safeLoc != null){
loc = safeLoc.join();
}
} else {
loc = island.getLocation(world, IslandEnvironment.Visitor);
}
loc = island.getLocation(world, IslandEnvironment.Main);
LocationUtil.removeWaterFromLoc(skyblock, loc);
}
Location finalLoc = loc;
Bukkit.getScheduler().runTask(skyblock, () -> {
if(finalLoc != null){
PaperLib.teleportAsync(player, finalLoc);
} else {
LocationUtil.teleportPlayerToSpawn(player);
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Command.Island.Teleport.Unsafe.Message")));
} else {
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Visitor));
if(safeLoc != null){
loc = safeLoc;
}
});
});
} else {
loc = island.getLocation(world, IslandEnvironment.Visitor);
}
}
Location finalLoc = loc;
if(finalLoc != null){
PaperLib.teleportAsync(player, finalLoc);
} else {
LocationUtil.teleportPlayerToSpawn(player);
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
.getFileConfiguration().getString("Command.Island.Teleport.Unsafe.Message")));
}
}
private void teleportPlayerToIslandSpawn(Player player, Island island) {

View File

@ -164,20 +164,18 @@ public class Portal implements Listener {
private void teleportPlayerToWorld(Player player, SoundManager soundManager, Island island, IslandEnvironment spawnEnvironment, Tick tick, IslandWorld toWorld) {
IslandWorld toWorldF = toWorld;
Bukkit.getScheduler().runTaskLaterAsynchronously(skyblock, () -> {
Bukkit.getScheduler().runTaskLater(skyblock, () -> {
Location loc = island.getLocation(toWorldF, spawnEnvironment);
CompletableFuture<Location> tempSafeLoc = LocationUtil.getSafeLocation(loc);
Location tempSafeLoc = LocationUtil.getSafeLocation(loc);
Location safeLoc = null;
if(tempSafeLoc != null) {
safeLoc = tempSafeLoc.join();
safeLoc = tempSafeLoc;
}
if(safeLoc != null){
loc = safeLoc;
}
Location finalLoc = loc;
Bukkit.getScheduler().runTask(skyblock, () -> {
PaperLib.teleportAsync(player, finalLoc);
});
PaperLib.teleportAsync(player, finalLoc);
}, 1L);
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
player.setFallDistance(0.0F);

View File

@ -8,7 +8,9 @@ import com.songoda.skyblock.permission.PermissionHandler;
import com.songoda.skyblock.permission.PermissionType;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.block.Action;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.player.PlayerInteractEvent;
public class FirePermission extends ListeningPermission {
@ -29,7 +31,21 @@ public class FirePermission extends ListeningPermission {
Player player = event.getPlayer();
if (CompatibleMaterial.getMaterial(player.getTargetBlock(null, 5)) == CompatibleMaterial.FIRE)
if (CompatibleMaterial.getMaterial(player.getTargetBlock(null, 5)).equals(CompatibleMaterial.FIRE))
cancelAndMessage(event, player, plugin, messageManager);
}
@PermissionHandler
public void onProjectileHit(BlockIgniteEvent event) {
Player player = null;
if(event.getPlayer() != null){
player = event.getPlayer();
} else if(event.getIgnitingEntity() instanceof Projectile && ((Projectile) event.getIgnitingEntity()).getShooter() instanceof Player) {
player = (Player) ((Projectile) event.getIgnitingEntity()).getShooter();
}
if(player != null) {
cancelAndMessage(event, player, plugin, messageManager);
}
}
}

View File

@ -70,22 +70,20 @@ public class PortalPermission extends ListeningPermission {
}
}
private CompletableFuture<Location> getToLocation(Location from, Player player) {
return CompletableFuture.supplyAsync(() -> {
IslandManager islandManager = plugin.getIslandManager();
Island island = islandManager.getIslandAtLocation(from);
Location to = island.getLocation(IslandWorld.Normal, IslandEnvironment.Main);
if(island.hasRole(IslandRole.Visitor, player.getUniqueId())){
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor));
if(safeLoc != null) {
to = safeLoc.join();
}
if(to == null){
to = LocationUtil.getSpawnLocation();
}
private Location getToLocation(Location from, Player player) {
IslandManager islandManager = plugin.getIslandManager();
Island island = islandManager.getIslandAtLocation(from);
Location to = island.getLocation(IslandWorld.Normal, IslandEnvironment.Main);
if(island.hasRole(IslandRole.Visitor, player.getUniqueId())){
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor));
if(safeLoc != null) {
to = safeLoc;
}
return to;
});
if(to == null){
to = LocationUtil.getSpawnLocation();
}
}
return to;
}
}

View File

@ -1,6 +1,7 @@
package com.songoda.skyblock.tasks;
import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.core.utils.TextUtils;
import com.songoda.skyblock.SkyBlock;
import com.songoda.skyblock.config.FileManager;
@ -19,10 +20,7 @@ import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
import org.bukkit.entity.*;
import org.bukkit.scheduler.BukkitRunnable;
import java.io.File;
@ -57,20 +55,29 @@ public class MobNetherWaterTask extends BukkitRunnable {
if(plugin.getWorldManager().isIslandWorld(world) && plugin.getWorldManager().getIslandWorld(world).equals(IslandWorld.Nether)){
for(Entity ent : world.getEntities()) {
boolean witherSkeleton;
if (NMSUtil.getVersionNumber() > 10) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
} else {
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
}
if (ent.getType().equals(EntityType.PIG_ZOMBIE) ||
ent.getType().equals(EntityType.BLAZE) ||
ent.getType().equals(EntityType.MAGMA_CUBE) ||
ent.getType().equals(EntityType.WITHER) ||
ent.getType().equals(EntityType.GHAST) ||
witherSkeleton) {
if((((ent instanceof Blaze || ent instanceof MagmaCube) || ent instanceof Wither) || ent instanceof Ghast) || witherSkeleton){
Block block = ent.getLocation().getBlock();
removeWater(world, block);
removeWater(world, block.getRelative(BlockFace.UP));
} else {
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){
if(((ent instanceof Piglin || ent instanceof Hoglin) || ent instanceof Strider) || ent instanceof Zoglin) {
Block block = ent.getLocation().getBlock();
removeWater(world, block);
removeWater(world, block.getRelative(BlockFace.UP));
}
} else {
if(ent instanceof PigZombie) {
Block block = ent.getLocation().getBlock();
removeWater(world, block);
removeWater(world, block.getRelative(BlockFace.UP));
}
}
}
}
}

View File

@ -42,31 +42,29 @@ public final class LocationUtil {
}
}
public static @Nullable CompletableFuture<Location> getSafeLocation(Location loc){
return CompletableFuture.supplyAsync(() -> {
boolean found = false;
Location locChecked = null;
if(loc != null && loc.getWorld() != null){
locChecked = loc.clone();
loc.getWorld().loadChunk(loc.getWorld().getChunkAt(loc));
for(int i=loc.getBlockY(); i>=0 && !found; i--){
locChecked = locChecked.subtract(0d, 1d, 0d);
public static @Nullable Location getSafeLocation(Location loc){
boolean found = false;
Location locChecked = null;
if(loc != null && loc.getWorld() != null){
locChecked = loc.clone();
loc.getWorld().loadChunk(loc.getWorld().getChunkAt(loc));
for(int i=loc.getBlockY(); i>=0 && !found; i--){
locChecked = locChecked.subtract(0d, 1d, 0d);
found = checkBlock(locChecked);
}
if(!found){
for(int i=loc.getBlockY(); i<256 && !found; i++){
locChecked = locChecked.add(0d, 1d, 0d);
found = checkBlock(locChecked);
}
if(!found){
for(int i=loc.getBlockY(); i<256 && !found; i++){
locChecked = locChecked.add(0d, 1d, 0d);
found = checkBlock(locChecked);
}
}
if (found) {
locChecked = locChecked.add(0d,1d,0d);
} else {
locChecked = null;
}
}
return locChecked;
});
if (found) {
locChecked = locChecked.add(0d,1d,0d);
} else {
locChecked = null;
}
}
return locChecked;
}
public static @Nonnull Location getDefinitiveLocation(Location loc){

View File

@ -34,6 +34,7 @@ public class BlockData {
private String skullOwner = "Notch";
private String skullType = SkullType.PLAYER.toString();
private String facing;
private int charges = 0;
private Map<Integer, String> inventory = new HashMap<>();
@ -313,4 +314,12 @@ public class BlockData {
public void setExactTeleport(boolean exactTeleport) {
this.exactTeleport = exactTeleport;
}
public int getCharges() {
return charges;
}
public void setCharges(int charges) {
this.charges = charges;
}
}

View File

@ -3,6 +3,6 @@ package com.songoda.skyblock.utils.world.block;
public enum BlockStateType {
NORMAL, BANNER, BEACON, BREWINGSTAND, COMMANDBLOCK, CHEST, DISPENSER, DROPPER, HOPPER, SHULKERBOX, CREATURESPAWNER,
ENDGATEWAY, FURNACE, JUKEBOX, SIGN, SKULL, DOUBLECHEST, BARREL
ENDGATEWAY, FURNACE, JUKEBOX, SIGN, SKULL, DOUBLECHEST, BARREL, RESPAWN_ANCHOR
}

View File

@ -9,6 +9,7 @@ import org.bukkit.*;
import org.bukkit.block.*;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.block.data.type.RespawnAnchor;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.material.MaterialData;
@ -212,6 +213,14 @@ public final class BlockUtil extends BlockUtils {
blockData.setStateType(BlockStateType.BARREL.toString());
}
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){
if (blockState instanceof RespawnAnchor) {
RespawnAnchor respawnAnchor = (RespawnAnchor) blockState;
blockData.setCharges(respawnAnchor.getCharges());
blockData.setStateType(BlockStateType.RESPAWN_ANCHOR.toString());
}
}
}
}
}
@ -284,7 +293,7 @@ public final class BlockUtil extends BlockUtils {
BlockState state = block.getState();
if (blockTypeState == BlockStateType.BANNER) {
if (blockTypeState.equals(BlockStateType.BANNER)) {
Banner banner = (Banner) state;
banner.setBaseColor(DyeColor.valueOf(blockData.getBaseColor().toUpperCase()));
@ -293,7 +302,7 @@ public final class BlockUtil extends BlockUtils {
banner.addPattern(new Pattern(DyeColor.valueOf(pattern[1].toUpperCase()), PatternType.valueOf(pattern[0].toUpperCase())));
}
state.update();
} else if (blockTypeState == BlockStateType.BEACON) {
} else if (blockTypeState.equals(BlockStateType.BEACON)) {
Beacon beacon = (Beacon) state;
String[] potionEffect = blockData.getPotionEffect().split(":");
if (!potionEffect[0].equals("null")) {
@ -304,17 +313,17 @@ public final class BlockUtil extends BlockUtils {
beacon.setSecondaryEffect(PotionEffectType.getByName(potionEffect[1].toUpperCase()));
}
state.update();
} else if (blockTypeState == BlockStateType.BREWINGSTAND && ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) {
} else if (blockTypeState.equals(BlockStateType.BREWINGSTAND) && ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12)) {
BrewingStand brewingStand = (BrewingStand) state;
brewingStand.setBrewingTime(blockData.getBrewingTime());
brewingStand.setFuelLevel(blockData.getFuelLevel());
state.update();
} else if (blockTypeState == BlockStateType.COMMANDBLOCK) {
} else if (blockTypeState.equals(BlockStateType.COMMANDBLOCK)) {
CommandBlock commandBlock = (CommandBlock) state;
commandBlock.setCommand(blockData.getCommand());
commandBlock.setName(blockData.getCommandBlockName());
state.update();
} else if (blockTypeState == BlockStateType.CHEST) {
} else if (blockTypeState.equals(BlockStateType.CHEST)) {
Chest chest = (Chest) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -323,7 +332,7 @@ public final class BlockUtil extends BlockUtils {
chest.getInventory().setItem(slotList, is);
}
}
} else if (blockTypeState == BlockStateType.DISPENSER) {
} else if (blockTypeState.equals(BlockStateType.DISPENSER)) {
Dispenser dispenser = (Dispenser) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -332,7 +341,7 @@ public final class BlockUtil extends BlockUtils {
dispenser.getInventory().setItem(slotList, is);
}
}
} else if (blockTypeState == BlockStateType.DROPPER) {
} else if (blockTypeState.equals(BlockStateType.DROPPER)) {
Dropper dropper = (Dropper) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -341,7 +350,7 @@ public final class BlockUtil extends BlockUtils {
dropper.getInventory().setItem(slotList, is);
}
}
} else if (blockTypeState == BlockStateType.HOPPER) {
} else if (blockTypeState.equals(BlockStateType.HOPPER)) {
Hopper hopper = (Hopper) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -350,7 +359,7 @@ public final class BlockUtil extends BlockUtils {
hopper.getInventory().setItem(slotList, is);
}
}
} else if (blockTypeState == BlockStateType.CREATURESPAWNER) {
} else if (blockTypeState.equals(BlockStateType.CREATURESPAWNER)) {
CreatureSpawner creatureSpawner = (CreatureSpawner) state;
if (blockData.getEntity() != null) {
@ -359,7 +368,7 @@ public final class BlockUtil extends BlockUtils {
creatureSpawner.setDelay(blockData.getDelay());
state.update();
} else if (blockTypeState == BlockStateType.FURNACE) {
} else if (blockTypeState.equals(BlockStateType.FURNACE)) {
Furnace furnace = (Furnace) state;
furnace.setBurnTime(blockData.getBurnTime());
furnace.setCookTime(blockData.getCookTime());
@ -372,21 +381,21 @@ public final class BlockUtil extends BlockUtils {
furnace.getInventory().setItem(slotList, is);
}
}
} else if (blockTypeState == BlockStateType.JUKEBOX) {
} else if (blockTypeState.equals(BlockStateType.JUKEBOX)) {
Jukebox jukebox = (Jukebox) state;
if (blockData.getPlaying() != null) {
jukebox.setPlaying(Material.valueOf(blockData.getPlaying().toUpperCase()));
}
state.update();
} else if (blockTypeState == BlockStateType.SIGN) {
} else if (blockTypeState.equals(BlockStateType.SIGN)) {
Sign sign = (Sign) state;
for (int i = 0; i < blockData.getSignLines().length; i++) {
sign.setLine(i, ChatColor.translateAlternateColorCodes('&', blockData.getSignLines()[i]));
}
state.update();
} else if (blockTypeState == BlockStateType.SKULL) {
} else if (blockTypeState.equals(BlockStateType.SKULL)) {
Skull skull = (Skull) state;
skull.setRotation(BlockFace.valueOf(blockData.getRotateFace().toUpperCase()));
@ -400,7 +409,7 @@ public final class BlockUtil extends BlockUtils {
state.update();
} else {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_9)) {
if (blockTypeState == BlockStateType.ENDGATEWAY) {
if (blockTypeState.equals(BlockStateType.ENDGATEWAY)) {
EndGateway endGateway = (EndGateway) state;
endGateway.setExactTeleport(blockData.isExactTeleport());
@ -416,7 +425,7 @@ public final class BlockUtil extends BlockUtils {
}
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
if (blockTypeState == BlockStateType.SHULKERBOX) {
if (blockTypeState.equals(BlockStateType.SHULKERBOX)) {
ShulkerBox shulkerBox = (ShulkerBox) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -427,7 +436,7 @@ public final class BlockUtil extends BlockUtils {
}
}
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)){
if (blockTypeState == BlockStateType.BARREL) {
if (blockTypeState.equals(BlockStateType.BARREL)) {
Barrel barrel = (Barrel) state;
for (Integer slotList : blockData.getInventory().keySet()) {
@ -438,6 +447,14 @@ public final class BlockUtil extends BlockUtils {
}
}
}
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){
if (blockTypeState.equals(BlockStateType.RESPAWN_ANCHOR)) {
RespawnAnchor respawnAnchor = (RespawnAnchor) state;
respawnAnchor.setCharges(blockData.getCharges());
state.update();
}
}
}
}
}

View File

@ -1,6 +1,7 @@
package com.songoda.skyblock.utils.world.entity;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.skyblock.utils.item.ItemStackUtil;
import com.songoda.skyblock.utils.version.NMSUtil;
import com.songoda.skyblock.utils.world.block.BlockDegreesType;
@ -496,43 +497,4 @@ public final class EntityUtil {
}
}
}
public static boolean isMonster(EntityType type) {
if (NMSUtil.getVersionNumber() > 10) {
if(type.equals(EntityType.WITHER_SKELETON)) return true; // TODO In < 11 we have SkeletonType.Wither
}
switch (type) { // TODO Check server versions
case BAT:
case BLAZE:
case CAVE_SPIDER:
case COD:
case CREEPER:
case DROWNED:
case ELDER_GUARDIAN:
case ENDERMAN:
case ENDERMITE:
case EVOKER:
case GHAST:
case HUSK:
case ILLUSIONER:
case MAGMA_CUBE:
case PHANTOM:
case PIG_ZOMBIE:
case RAVAGER:
case SILVERFISH:
case SKELETON:
case SLIME:
case SPIDER:
case STRAY:
case VEX:
case VINDICATOR:
case WITCH:
case WITHER:
case ZOMBIE:
case ZOMBIE_VILLAGER:
return true;
default:
return false;
}
}
}

View File

@ -1,497 +1,567 @@
# All the Minecraft Biomes
# Use "Data" only on pre - 1.13
# Normal: true means that the biome is available in the Overworld.
# Nether and The End will come in future updates.
Biomes:
BADLANDS:
DisplayName: 'Badlands'
DiplayItem:
DisplayName: '&6Badlands'
DisplayItem:
Material: WHITE_TERRACOTTA
Data: 0
Permission: true
Normal: true
Nether: false
End: false
BADLANDS_PLATEAU:
DisplayName: 'Badlands Plateau'
DiplayItem:
DisplayName: '&6Badlands Plateau'
DisplayItem:
Material: RED_TERRACOTTA
Data: 14
Permission: true
Normal: true
Nether: false
End: false
BAMBOO_JUNGLE:
DisplayName: 'Bamboo Jungle'
DiplayItem:
DisplayName: '&6Bamboo Jungle'
DisplayItem:
Material: BAMBOO
Data: 0
Permission: true
Normal: true
Nether: false
End: false
BAMBOO_JUNGLE_HILLS:
DisplayName: 'Bamboo Jungle Hills'
DiplayItem:
Material: BAMBOO
DisplayName: '&6Bamboo Jungle Hills'
DisplayItem:
Material: SCAFFOLDING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
BASALT_DELTAS:
DisplayName: 'Basalt Deltas'
DiplayItem:
DisplayName: '&6Basalt Deltas'
DisplayItem:
Material: BASALT
Data: 0
Permission: true
Normal: false
Nether: true
End: false
BEACH:
DisplayName: 'Beach'
DisplayName: '&6Beach'
DisplayItem:
Material: SAND
Data: 0
Permission: true
Normal: true
Nether: false
End: false
BIRCH_FOREST:
DisplayName: 'Birch Forest'
DisplayName: '&6Birch Forest'
DisplayItem:
Material: BIRCH_SAPLING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
BIRCH_FOREST_HILLS:
DisplayName: 'Birch Forest Hills'
DisplayName: '&6Birch Forest Hills'
DisplayItem:
Material: BIRCH_LEAVES
Data: 0
Permission: true
Normal: true
Nether: false
End: false
COLD_OCEAN:
DisplayName: 'Cold Ocean'
DisplayName: '&6Cold Ocean'
DisplayItem:
Material: SEAGRASS
Data: 0
Permission: true
Normal: true
Nether: false
End: false
CRIMSON_FOREST:
DisplayName: 'Crimson Forest'
DisplayName: '&6Crimson Forest'
DisplayItem:
Material: WEEPING_VINES
Data: 0
Permission: true
Normal: false
Nether: true
End: false
DARK_FOREST:
DisplayName: 'Dark Forest'
DisplayName: '&6Dark Forest'
DisplayItem:
Material: DARK_OAK_SAPLING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DARK_FOREST_HILLS:
DisplayName: 'Dark Forest Hills'
DisplayName: '&6Dark Forest Hills'
DisplayItem:
Material: DARK_OAK_LEAVES
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DEEP_COLD_OCEAN:
DisplayName: 'Deep Cold Ocean'
DisplayName: '&6Deep Cold Ocean'
DisplayItem:
Material: COD
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DEEP_FROZEN_OCEAN:
DisplayName: 'Deep Frozen Ocean'
DisplayName: '&6Deep Frozen Ocean'
DisplayItem:
Material: ICE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DEEP_LUKEWARM_OCEAN:
DisplayName: 'Deep Lukewarm Ocean'
DisplayName: '&6Deep Lukewarm Ocean'
DisplayItem:
Material: PUFFERFISH
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DEEP_OCEAN:
DisplayName: 'Deep Ocean'
DisplayName: '&6Deep Ocean'
DisplayItem:
Material: GRAVEL
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DEEP_WARM_OCEAN:
DisplayName: 'Deep Warm Ocean'
DisplayName: '&6Deep Warm Ocean'
DisplayItem:
Material: TROPICAL_FISH
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DESERT:
DisplayName: 'Desert'
DisplayName: '&6Desert'
DisplayItem:
Material: CACTUS
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DESERT_HILLS:
DisplayName: 'Desert Hills'
DisplayName: '&6Desert Hills'
DisplayItem:
Material: RED_SAND
Data: 0
Permission: true
Normal: true
Nether: false
End: false
DESERT_LAKES:
DisplayName: 'Desert Lakes'
DisplayName: '&6Desert Lakes'
DisplayItem:
Material: SANDSTONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
END_BARRENS:
DisplayName: 'End Barrens'
DisplayName: '&6End Barrens'
DisplayItem:
Material: END_STONE
Data: 0
Permission: true
Normal: false
Nether: false
End: end
END_HIGHLANDS:
DisplayName: 'End HighLands'
DisplayName: '&6End HighLands'
DisplayItem:
Material: END_STONE_BRICKS
Data: 0
Permission: true
Normal: false
Nether: false
End: true
END_MIDLANDS:
DisplayName: 'End Midlands'
DisplayName: '&6End Midlands'
DisplayItem:
Material: PURPUR_BLOCK
Data: 0
Permission: true
Normal: false
Nether: false
End: end
ERODED_BADLANDS:
DisplayName: 'Eroded Badlands'
DisplayName: '&6Eroded Badlands'
DisplayItem:
Material: PINK_TERRACOTTA
Data: 0
Permission: true
Normal: true
Nether: false
End: false
FLOWER_FOREST:
DisplayName: 'Flower Forest'
DisplayName: '&6Flower Forest'
DisplayItem:
Material: SUNFLOWER
Data: 0
Permission: true
Normal: true
Nether: false
End: false
FOREST:
DisplayName: 'Forest'
DisplayName: '&6Forest'
DisplayItem:
Material: APPLE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
FROZEN_OCEAN:
DisplayName: 'Frozen Ocean'
DisplayName: '&6Frozen Ocean'
DisplayItem:
Material: ICE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
FROZEN_RIVER:
DisplayName: 'Frozen River'
DisplayName: '&6Frozen River'
DisplayItem:
Material: COD
Data: 0
Permission: true
Normal: true
Nether: false
End: false
GIANT_SPRUCE_TAIGA:
DisplayName: 'Giant Spruce Taiga'
DisplayName: '&6Giant Spruce Taiga'
DisplayItem:
Material: SPRUCE_LOG
Data: 0
Permission: true
Normal: true
Nether: false
End: false
GIANT_SPRUCE_TAIGA_HILLS:
DisplayName: 'Giant Spruce Taiga Hills'
DisplayName: '&6Giant Spruce Taiga Hills'
DisplayItem:
Material: SPRUCE_LEAVES
Data: 0
Permission: true
Normal: true
Nether: false
End: false
GIANT_TREE_TAIGA:
DisplayName: 'Giant Tree Taiga'
DisplayItem:
Material: SPRUCE_SAPLING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
GIANT_TREE_TAIGA_HILLS:
DisplayName: 'Giant Tree Taiga Hills'
DisplayName: '&6Giant Tree Taiga Hills'
DisplayItem:
Material: SPRUCE_WOOD
Data: 0
Permission: true
Normal: true
Nether: false
End: false
GRAVELLY_MOUNTAINS:
DisplayName: 'Gravelly Mountains'
DisplayName: '&6Gravelly Mountains'
DisplayItem:
Material: GRAVEL
Data: 0
Permission: true
Normal: true
Nether: false
End: false
ICE_SPIKES:
DisplayName: 'Ice Spikes'
DisplayName: '&6Ice Spikes'
DisplayItem:
Material: PACKED_ICE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
JUNGLE:
DisplayName: 'Jungle'
DisplayName: '&6Jungle'
DisplayItem:
Material: VINES
Data: 0
Permission: true
Normal: true
Nether: false
End: false
JUNGLE_EDGE:
DisplayName: 'Jungle Edge'
DisplayName: '&6Jungle Edge'
DisplayItem:
Material: JUNGLE_TREE_LOG
Data: 0
Permission: true
Normal: true
Nether: false
End: false
JUNGLE_HILLS:
DisplayName: 'Jungle Hills'
DisplayName: '&6Jungle Hills'
DisplayItem:
Material: JUNGLE_TREE_SAPLING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
LUKEWARM_OCEAN:
DisplayName: 'Lukewarm Ocean'
DisplayName: '&6Lukewarm Ocean'
DisplayItem:
Material: KELP
Data: 0
Permission: true
Normal: true
Nether: false
End: false
MODIFIED_BADLANDS_PLATEAU:
DisplayName: 'Modified Badlands Plateau'
DisplayName: '&6Modified Badlands Plateau'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
MODIFIED_GRAVELLY_MOUNTAINS:
DisplayName: 'Modified Gravelly Mountains'
DisplayName: '&6Modified Gravelly Mountains'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
MODIFIED_JUNGLE:
DisplayName: 'Modified Jungle'
DisplayName: '&6Modified Jungle'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
MODIFIED_JUNGLE_EDGE:
DisplayName: 'Modified Jungle Edge'
DisplayName: '&6Modified Jungle Edge'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
MODIFIED_WOODED_BADLANDS_PLATEAU:
DisplayName: 'Modified Wooden Badlands Plateau'
DisplayName: '&6Modified Wooden Badlands Plateau'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
MOUNTAINS:
DisplayName: 'Mountains'
DisplayName: '&6Mountains'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
MOUNTAIN_EDGE:
DisplayName: 'Mountain Edge'
DisplayName: '&6Mountain Edge'
DisplayItem:
Material: DIORITE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
MUSHROOM_FIELDS:
DisplayName: 'Mushroom Fields'
DisplayName: '&6Mushroom Fields'
DisplayItem:
Material: RED_MUSHROOM
Data: 0
Permission: true
Normal: true
Nether: false
End: false
MUSHROOM_FIELD_SHORE:
DisplayName: 'Mushroom Field Shore'
DisplayName: '&6Mushroom Field Shore'
DisplayItem:
Material: BROWN_MUSHROOM
Data: 0
Permission: true
Normal: true
Nether: false
End: false
# PRE-1.16
NETHER:
DisplayName: 'Nether'
DisplayName: '&6Nether'
DisplayItem:
Material: NETHERRACK
Data: 0
Permission: true
Normal: false
Nether: true
End: false
NETHER_WASTES:
DisplayName: 'Nether Wastes'
DisplayName: '&6Nether Wastes'
DisplayItem:
Material: NETHER_WART
Data: 0
Permission: true
Normal: false
Nether: true
End: false
OCEAN:
DisplayName: 'Ocean'
DisplayName: '&6Ocean'
DisplayItem:
Material: SEA_LANTERN
Data: 0
Permission: true
Normal: true
Nether: false
End: false
PLAINS:
DisplayName: 'Plains'
DisplayName: '&6Plains'
DisplayItem:
Material: GRASS_BLOCK
Data: 0
Permission: true
Normal: true
Nether: false
End: false
RIVER:
DisplayName: 'River'
DisplayName: '&6River'
DisplayItem:
Material: SUGAR_CANE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SAVANNA:
DisplayName: 'Savanna'
DisplayName: '&6Savanna'
DisplayItem:
Material: GRASS
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SAVANNA_PLATEAU:
DisplayName: 'Savanna Plateau'
DisplayName: '&6Savanna Plateau'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
SHATTERED_SAVANNA:
DisplayName: 'Shattered Savanna'
DisplayName: '&6Shattered Savanna'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
SHATTERED_SAVANNA_PLATEAU:
DisplayName: 'Shattered Savanna Plateau'
DisplayName: '&6Shattered Savanna Plateau'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
SMALL_END_ISLANDS:
DisplayName: 'Small End Island'
DisplayName: '&6Small End Island'
DisplayItem:
Material: PURPUR_PILLAR
Data: 0
Permission: true
Normal: false
Nether: false
End: true
SNOWY_BEACH:
DisplayName: 'Snowy Beach'
DisplayName: '&6Snowy Beach'
DisplayItem:
Material: RABBIT_FOOT
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SNOWY_MOUNTAINS:
DisplayName: 'Snowy Mountains'
DisplayName: '&6Snowy Mountains'
DisplayItem:
Material: SNOW_BLOCK
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SNOWY_TAIGA:
DisplayName: 'Snowy Taiga'
DisplayName: '&6Snowy Taiga'
DisplayItem:
Material: SPRUCE_SAPLING
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SNOWY_TAIGA_HILLS:
DisplayName: 'Snowy Taiga Hills'
DisplayName: '&6Snowy Taiga Hills'
DisplayItem:
Material: SNOWBALL
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SNOWY_TAIGA_MOUNTAINS:
DisplayName: 'Snowy Taiga Mountains'
DisplayName: '&6Snowy Taiga Mountains'
DisplayItem:
Material: SWEET_BERRIES
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SNOWY_TUNDRA:
DisplayName: 'Snowy Tundra'
DisplayName: '&6Snowy Tundra'
DisplayItem:
Material: SNOW
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SOUL_SAND_VALLEY:
DisplayName: 'Soul Sand Valley'
DisplayName: '&6Soul Sand Valley'
DisplayItem:
Material: SOULSAND
Data: 0
Permission: true
Normal: false
Nether: true
End: false
STONE_SHORE:
DisplayName: 'Stone Shore'
DisplayName: '&6Stone Shore'
DisplayItem:
Material: CLAY
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SUNFLOWER_PLAINS:
DisplayName: 'Sunflower Plains'
DisplayName: '&6Sunflower Plains'
DisplayItem:
Material: SUNFLOWER
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SWAMP:
DisplayName: 'Swamp'
DisplayName: '&6Swamp'
DisplayItem:
Material: LILYPAD
Data: 0
Permission: true
Normal: true
Nether: false
End: false
SWAMP_HILLS:
DisplayName: 'Swamp Hills'
DisplayName: '&6Swamp Hills'
DisplayItem:
Material: SLIME_BLOCK
Data: 0
Permission: true
Normal: true
Nether: false
End: false
TAIGA:
DisplayName: 'Taiga'
DisplayName: '&6Taiga'
DisplayItem:
Material: SPRUCE_WOOD
Data: 0
Permission: true
Normal: true
Nether: false
End: false
TAIGA_HILLS:
DisplayName: 'Taiga Hills'
DisplayName: '&6Taiga Hills'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
TAIGA_MOUNTAINS:
DisplayName: 'Taiga Mountains'
DisplayName: '&6Taiga Mountains'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
TALL_BIRCH_FOREST:
DisplayName: 'Tall Birch Forest'
DisplayName: '&6Tall Birch Forest'
DisplayItem:
Material: BIRCH_LOG
Data: 0
Permission: true
Normal: true
Nether: false
End: false
TALL_BIRCH_HILLS:
DisplayName: 'Tall Birch Hills'
DisplayName: '&6Tall Birch Hills'
DisplayItem:
Material: BIRCH_PLANKS
Data: 0
Permission: true
Normal: true
Nether: false
End: false
THE_END:
DisplayName: 'The End'
DisplayName: '&6The End'
DisplayItem:
Material: CHORUS_FRUIT
Data: 0
Permission: true
Normal: false
Nether: false
End: true
THE_VOID:
DisplayName: 'The Void'
DisplayName: '&6The Void'
DisplayItem:
Material: BEDROCK
Data: 0
Permission: true
Normal: false
Nether: false
End: false
WARM_OCEAN:
DisplayName: 'Warm Ocean'
DisplayName: '&6Warm Ocean'
DisplayItem:
Material: BRAIN_CORAL
Data: 0
Permission: true
Normal: true
Nether: false
End: false
WARPED_FOREST:
DisplayName: 'Warped Forest'
DisplayName: '&6Warped Forest'
DisplayItem:
Material: WARPED_STEM
Data: 0
Permission: true
Normal: false
Nether: true
End: false
WOODED_BADLANDS_PLATEAU:
DisplayName: 'Wooded Badlands Plateau'
DisplayName: '&6Wooded Badlands Plateau'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
WOODED_HILLS:
DisplayName: 'Wooded Hills'
DisplayName: '&6Wooded Hills'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false
WOODED_MOUNTAINS:
DisplayName: 'Wooded Mountains'
DisplayName: '&6Wooded Mountains'
DisplayItem:
Material: STONE
Data: 0
Permission: true
Normal: true
Nether: false
End: false
Normal: false

View File

@ -182,10 +182,6 @@ Island:
Type: Plains
Cooldown:
Time: 900
# If the Nether/End biomes should be allowed in the overworld
AllowOtherWorldlyBiomes:
Nether: true
End: true
Weather:
Default:
# The weather and time will operate the same weather and time as the world.
@ -355,6 +351,7 @@ Island:
BlazeImmuneToWaterInNether: false
Restrict:
# Blocks that can be placed only if the island has nether unlocked
# You may add/remove as many as you want
NetherBlocks:
NETHERRACK: true
SOUL_SAND: true
@ -377,7 +374,63 @@ Island:
NETHER_WART_BLOCK: true
WITHER_SKELETON_SKULL: true
WITHER_ROSE: true
CRIMSON_NYLIUM: true
WARPED_NYLIUM: true
CRIMSON_PLANKS: true
WARPED_PLANKS: true
NETHER_GOLD_ORE: true
CRIMSTON_STEM: true
WARPED_STEM: true
STRIPPED_CRIMSON_STEM: true
STRIPPED_WARPED_STEM: true
STRIPPED_CRIMSON_HYPHAE: true
STRIPPED_WARPED_HYPHAE: true
CRIMSON_HYPHAE: true
WARPED_HYPHAE: true
CRIMSON_FUNGUS: true
WARPED_FUNGUS: true
CRIMSON_ROOTS: true
WARPED_ROOTS: true
NETHER_SPROUTS: true
WEEPING_VINES: true
TWISTING_VINES: true
SOUL_OIL: true
BASALT: true
POLISHED_BASALT: true
SOUL_TORCH: true
CRIMSON_TRAPDOOR: true
WARPED_TRAPDOOR: true
CHAIN: true
CRIMSON_FENCE_GATE: true
WARPED_FENCE_GATE: true
CRACKED_NETHER_BRICKS: true
BLACKSTONE_WALL: true
POLISHED_BLACKSTONE_WALL: true
POLISHED_BLACKSTONE_BRICK_WALL: true
CRIMSON_BUTTON: true
WARPED_BUTTON: true
POLISHED_BLACKSTONE_BUTTON: true
SOUL_CAMPFIRE: true
SHROOMLIGHT: true
LODESTONE: true
NETHERITE_BLOCK: true
ANCIENT_DEBRIS: true
CRYING_OBSIDIAN: true
BLACKSTONE: true
BLACKSTONE_SLAB: true
BLACKSTONE_STAIRS: true
GLIDED_BLACKSTONE: true
POLISHED_BLACKSTONE: true
POLISHED_BLACKSTONE_SLAB: true
POLISHED_BLACKSTONE_STAIRS: true
CHISELED_POLISHED_BLACKSTONE: true
POLISHED_BLACKSTONE_BRICKS: true
POLISHED_BLACKSTONE_BRICK_SLAB: true
POLISHED_BLACKSTONE_BRICK_STAIRS: true
CRACKED_POLISHED_BLACKSTONE_BRICKS: true
RESPAWN_ANCHOR: true
# Blocks that can be placed only if the island has The End unlocked
# You may add/remove as many as you want
EndBlocks:
END_STONE: true
END_STONE_BRICKS: true

View File

@ -2574,8 +2574,6 @@ Menu:
Item:
Exit:
Displayname: '&cExit Biome Selection'
Barrier:
Displayname: '&cSelect a Biome'
Info:
Displayname: '&bCurrent Biome'
Lore:
@ -2589,6 +2587,10 @@ Menu:
Lore:
- '&7Click to Set!'
Displayname: '&aBiome: &e%biome_type'
Next:
Displayname: '&aNext Page >'
Previous:
Displayname: '&a< Previous Page'
Title: '&8Select a Biome'
Information:
Categories:

View File

@ -3,3 +3,4 @@ Stackables:
- IRON_BLOCK
- GOLD_BLOCK
- EMERALD_BLOCK
- NETHERITE_BLOCK