mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-06-26 06:34:49 +02:00
Spigot 1.16.1 + Biome menu
This commit is contained in:
parent
0fac999afe
commit
95d605c025
10
pom.xml
10
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>skyblock</artifactId>
|
<artifactId>skyblock</artifactId>
|
||||||
<version>2.3.4-DEV2</version>
|
<version>2.3.4-DEV3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
@ -147,9 +147,9 @@
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.destroystokyo.papermc</groupId>
|
<groupId>com.destroystokyo.paper</groupId>
|
||||||
<artifactId>paper</artifactId>
|
<artifactId>paper-api</artifactId>
|
||||||
<version>1.15.2</version>
|
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -161,7 +161,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.15</version>
|
<version>1.16.1</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -22,9 +22,8 @@ public class BiomeManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBiome(Island island, Biome biome) {
|
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()){
|
if(skyblock.isPaperAsync()){
|
||||||
// We keep it sequentially in order to use less RAM
|
// We keep it sequentially in order to use less RAM
|
||||||
|
@ -48,7 +47,13 @@ public class BiomeManager {
|
||||||
private void setChunkBiome(Biome biome, Chunk chunk) {
|
private void setChunkBiome(Biome biome, Chunk chunk) {
|
||||||
for(int xx = 0; xx < 16; xx++){
|
for(int xx = 0; xx < 16; xx++){
|
||||||
for(int zz = 0; zz < 16; zz++){
|
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);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,16 @@ package com.songoda.skyblock.command.commands.island;
|
||||||
import com.songoda.core.compatibility.CompatibleSound;
|
import com.songoda.core.compatibility.CompatibleSound;
|
||||||
import com.songoda.skyblock.command.SubCommand;
|
import com.songoda.skyblock.command.SubCommand;
|
||||||
import com.songoda.skyblock.config.FileManager.Config;
|
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.Island;
|
||||||
import com.songoda.skyblock.island.IslandManager;
|
import com.songoda.skyblock.island.IslandManager;
|
||||||
import com.songoda.skyblock.island.IslandRole;
|
import com.songoda.skyblock.island.IslandRole;
|
||||||
|
import com.songoda.skyblock.island.IslandWorld;
|
||||||
import com.songoda.skyblock.menus.Biome;
|
import com.songoda.skyblock.menus.Biome;
|
||||||
import com.songoda.skyblock.message.MessageManager;
|
import com.songoda.skyblock.message.MessageManager;
|
||||||
import com.songoda.skyblock.sound.SoundManager;
|
import com.songoda.skyblock.sound.SoundManager;
|
||||||
|
import com.songoda.skyblock.world.WorldManager;
|
||||||
import org.bukkit.command.ConsoleCommandSender;
|
import org.bukkit.command.ConsoleCommandSender;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -34,7 +38,7 @@ public class BiomeCommand extends SubCommand {
|
||||||
} else if ((island.hasRole(IslandRole.Operator, player.getUniqueId())
|
} else if ((island.hasRole(IslandRole.Operator, player.getUniqueId())
|
||||||
&& skyblock.getPermissionManager().hasPermission(island,"Biome", IslandRole.Operator))
|
&& skyblock.getPermissionManager().hasPermission(island,"Biome", IslandRole.Operator))
|
||||||
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
|
|| 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);
|
soundManager.playSound(player, CompatibleSound.BLOCK_CHEST_OPEN.getSound(), 1.0F, 1.0F);
|
||||||
} else {
|
} else {
|
||||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.Permission.Message"));
|
messageManager.sendMessage(player, configLoad.getString("Command.Island.Biome.Permission.Message"));
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class FileManager {
|
||||||
configFiles.put("language.yml", new File(skyblock.getDataFolder(), "language.yml"));
|
configFiles.put("language.yml", new File(skyblock.getDataFolder(), "language.yml"));
|
||||||
configFiles.put("settings.yml", new File(skyblock.getDataFolder(), "settings.yml"));
|
configFiles.put("settings.yml", new File(skyblock.getDataFolder(), "settings.yml"));
|
||||||
configFiles.put("upgrades.yml", new File(skyblock.getDataFolder(), "upgrades.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("menus.yml", new File(skyblock.getDataFolder(), "menus.yml"));
|
||||||
configFiles.put("generators.yml", new File(skyblock.getDataFolder(), "generators.yml"));
|
configFiles.put("generators.yml", new File(skyblock.getDataFolder(), "generators.yml"));
|
||||||
configFiles.put("stackables.yml", new File(skyblock.getDataFolder(), "stackables.yml"));
|
configFiles.put("stackables.yml", new File(skyblock.getDataFolder(), "stackables.yml"));
|
||||||
|
@ -102,10 +102,10 @@ public class FileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configFile.exists()) {
|
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;
|
FileChecker fileChecker;
|
||||||
|
|
||||||
if (fileName.equals("config.yml")) {
|
if (fileName.equals("config.yml") || fileName.equals("biomes.yml")) {
|
||||||
fileChecker = new FileChecker(skyblock, this, fileName, true);
|
fileChecker = new FileChecker(skyblock, this, fileName, true);
|
||||||
} else {
|
} else {
|
||||||
fileChecker = new FileChecker(skyblock, this, fileName, false);
|
fileChecker = new FileChecker(skyblock, this, fileName, false);
|
||||||
|
|
|
@ -37,10 +37,6 @@ public class GeneratorManager {
|
||||||
if (configLoad.getString("Generators") == null)
|
if (configLoad.getString("Generators") == null)
|
||||||
return;
|
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)) {
|
for (String generatorList : configLoad.getConfigurationSection("Generators").getKeys(false)) {
|
||||||
if (configLoad.getString("Generators." + generatorList + ".Name") == null)
|
if (configLoad.getString("Generators." + generatorList + ".Name") == null)
|
||||||
continue;
|
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"),
|
generatorStorage.add(new Generator(configLoad.getString("Generators." + generatorList + ".Name"),
|
||||||
IslandWorld.valueOf(configLoad.getString("Generators." + generatorList + ".World", "Normal")),
|
IslandWorld.valueOf(configLoad.getString("Generators." + generatorList + ".World", "Normal")),
|
||||||
oreMaterials[rnd.nextInt(oreMaterials.length)], generatorMaterials,
|
icon, generatorMaterials,
|
||||||
configLoad.getBoolean("Generators." + generatorList + ".Permission")));
|
configLoad.getBoolean("Generators." + generatorList + ".Permission")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
package com.songoda.skyblock.gui.wip;
|
package com.songoda.skyblock.gui.wip;
|
||||||
|
|
||||||
import com.songoda.core.compatibility.CompatibleBiome;
|
import com.songoda.core.compatibility.CompatibleBiome;
|
||||||
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||||
import com.songoda.skyblock.SkyBlock;
|
import com.songoda.skyblock.SkyBlock;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
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.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class BiomeIcon {
|
public class BiomeIcon {
|
||||||
public final CompatibleBiome biome;
|
public final CompatibleBiome biome;
|
||||||
|
@ -19,8 +24,15 @@ public class BiomeIcon {
|
||||||
|
|
||||||
public BiomeIcon(SkyBlock plugin, CompatibleBiome biome){
|
public BiomeIcon(SkyBlock plugin, CompatibleBiome biome){
|
||||||
this.biome = biome;
|
this.biome = biome;
|
||||||
FileConfiguration biomeConfig = plugin.getFileManager().getConfig(new File("biomes.yml")).getFileConfiguration();
|
FileConfiguration biomeConfig = plugin.getFileManager().getConfig(new File(plugin.getDataFolder(),"biomes.yml")).getFileConfiguration();
|
||||||
this.displayItem = null; // TODO
|
|
||||||
|
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();
|
ItemMeta im = displayItem.getItemMeta();
|
||||||
if(im != null){
|
if(im != null){
|
||||||
im.setDisplayName(ChatColor.translateAlternateColorCodes('&', biomeConfig.getString("Biomes." + biome.name() + ".DisplayName", biome.name())));
|
im.setDisplayName(ChatColor.translateAlternateColorCodes('&', biomeConfig.getString("Biomes." + biome.name() + ".DisplayName", biome.name())));
|
||||||
|
@ -45,4 +57,13 @@ public class BiomeIcon {
|
||||||
this.nether = nether;
|
this.nether = nether;
|
||||||
this.end = end;
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import com.songoda.skyblock.island.IslandWorld;
|
||||||
import com.songoda.skyblock.message.MessageManager;
|
import com.songoda.skyblock.message.MessageManager;
|
||||||
import com.songoda.skyblock.sound.SoundManager;
|
import com.songoda.skyblock.sound.SoundManager;
|
||||||
import com.songoda.skyblock.utils.NumberUtil;
|
import com.songoda.skyblock.utils.NumberUtil;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -32,6 +33,7 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@ -46,7 +48,7 @@ public class GuiBiome extends Gui {
|
||||||
private final boolean admin;
|
private final boolean admin;
|
||||||
|
|
||||||
public GuiBiome(SkyBlock plugin, Player player, Island island, IslandWorld world, Gui returnGui, 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.plugin = plugin;
|
||||||
this.island = island;
|
this.island = island;
|
||||||
this.world = world;
|
this.world = world;
|
||||||
|
@ -58,7 +60,7 @@ public class GuiBiome extends Gui {
|
||||||
this.languageLoad = plugin.getFileManager()
|
this.languageLoad = plugin.getFileManager()
|
||||||
.getConfig(new File(plugin.getDataFolder(), "language.yml")).getFileConfiguration();
|
.getConfig(new File(plugin.getDataFolder(), "language.yml")).getFileConfiguration();
|
||||||
setDefaultItem(null);
|
setDefaultItem(null);
|
||||||
setTitle(TextUtils.formatText(languageLoad.getString("Menu.Input.Title")));
|
setTitle(TextUtils.formatText(languageLoad.getString("Menu.Biome.Title")));
|
||||||
paint();
|
paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,56 +73,63 @@ public class GuiBiome extends Gui {
|
||||||
|
|
||||||
if (inventory != null)
|
if (inventory != null)
|
||||||
inventory.clear();
|
inventory.clear();
|
||||||
setActionForRange(0, 0, 1, 8, null);
|
setActionForRange(0, 0, 5, 9, null);
|
||||||
|
|
||||||
setButton(0, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
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);
|
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||||
event.player.closeInventory();
|
event.player.closeInventory();
|
||||||
});
|
});
|
||||||
|
|
||||||
setButton(8, GuiUtils.createButtonItem(CompatibleMaterial.OAK_FENCE_GATE, // Exit
|
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);
|
soundManager.playSound(event.player, CompatibleSound.BLOCK_CHEST_CLOSE.getSound(), 1f, 1f);
|
||||||
event.player.closeInventory();
|
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++){
|
for(int i=9; i<18; i++){
|
||||||
setItem(i, CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem());
|
setItem(i, CompatibleMaterial.BLACK_STAINED_GLASS_PANE.getItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<BiomeIcon> biomes = new ArrayList<>();
|
List<BiomeIcon> biomes = new ArrayList<>();
|
||||||
for(CompatibleBiome biome : CompatibleBiome.getCompatibleBiomes()) {
|
for(CompatibleBiome biome : CompatibleBiome.getCompatibleBiomes()) {
|
||||||
if(biome.isCompatible()
|
if(biome.isCompatible()){
|
||||||
&& player.hasPermission("fabledskyblock.biome." + biome.name().toLowerCase())
|
|
||||||
&& config.getBoolean("Island.Biome." + world.name() + "." + biome.name(), false)){
|
|
||||||
BiomeIcon icon = new BiomeIcon(plugin, biome);
|
BiomeIcon icon = new BiomeIcon(plugin, biome);
|
||||||
switch(world){
|
if(!icon.permission || player.hasPermission("fabledskyblock.biome." + biome.name().toLowerCase())){
|
||||||
case Normal:
|
switch(world){
|
||||||
if(icon.normal){
|
case Normal:
|
||||||
biomes.add(icon);
|
if(icon.normal){
|
||||||
}
|
biomes.add(icon);
|
||||||
break;
|
}
|
||||||
case Nether:
|
break;
|
||||||
if(icon.nether){
|
case Nether:
|
||||||
biomes.add(icon);
|
if(icon.nether){
|
||||||
}
|
biomes.add(icon);
|
||||||
break;
|
}
|
||||||
case End:
|
break;
|
||||||
if(icon.end){
|
case End:
|
||||||
biomes.add(icon);
|
if(icon.end){
|
||||||
}
|
biomes.add(icon);
|
||||||
break;
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(biomes.size() > 0){
|
if(biomes.size() > 0){
|
||||||
|
biomes.sort(Comparator.comparing(m -> m.biome));
|
||||||
|
|
||||||
this.pages = (int) Math.max(1, Math.ceil((double) biomes.size() / 27d));
|
this.pages = (int) Math.max(1, Math.ceil((double) biomes.size() / 27d));
|
||||||
|
|
||||||
if (page != 1)
|
if (page != 1)
|
||||||
setButton(5, 2, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
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) -> {
|
(event) -> {
|
||||||
page--;
|
page--;
|
||||||
paint();
|
paint();
|
||||||
|
@ -128,14 +137,14 @@ public class GuiBiome extends Gui {
|
||||||
|
|
||||||
if (page != pages)
|
if (page != pages)
|
||||||
setButton(5, 6, GuiUtils.createButtonItem(CompatibleMaterial.ARROW,
|
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) -> {
|
(event) -> {
|
||||||
page++;
|
page++;
|
||||||
paint();
|
paint();
|
||||||
});
|
});
|
||||||
|
|
||||||
for (int i = 9; i < ((getRows()-1)*9)+9; i++) {
|
for (int i = 18; i < ((getRows()-2)*9)+9; i++) {
|
||||||
int current = ((page - 1) * 36) - 9;
|
int current = ((page - 1) * 27) - 18;
|
||||||
if (current + i >= biomes.size()) {
|
if (current + i >= biomes.size()) {
|
||||||
setItem(i, null);
|
setItem(i, null);
|
||||||
continue;
|
continue;
|
||||||
|
@ -143,6 +152,10 @@ public class GuiBiome extends Gui {
|
||||||
BiomeIcon icon = biomes.get(current + i);
|
BiomeIcon icon = biomes.get(current + i);
|
||||||
if (icon == null) continue;
|
if (icon == null) continue;
|
||||||
|
|
||||||
|
if(icon.biome.getBiome().equals(island.getBiome())){
|
||||||
|
icon.enchant();
|
||||||
|
}
|
||||||
|
|
||||||
setButton(i, icon.displayItem, event -> {
|
setButton(i, icon.displayItem, event -> {
|
||||||
if (cooldownManager.hasPlayer(CooldownType.Biome, player) && !player.hasPermission("fabledskyblock.bypass.cooldown")) {
|
if (cooldownManager.hasPlayer(CooldownType.Biome, player) && !player.hasPermission("fabledskyblock.bypass.cooldown")) {
|
||||||
CooldownPlayer cooldownPlayer = cooldownManager.getCooldownPlayer(CooldownType.Biome, player);
|
CooldownPlayer cooldownPlayer = cooldownManager.getCooldownPlayer(CooldownType.Biome, player);
|
||||||
|
@ -169,9 +182,11 @@ public class GuiBiome extends Gui {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cooldownManager.createPlayer(CooldownType.Biome, player);
|
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.setBiome(icon.biome.getBiome());
|
||||||
island.save();
|
|
||||||
|
|
||||||
soundManager.playSound(island.getLocation(IslandWorld.Normal, IslandEnvironment.Island),
|
soundManager.playSound(island.getLocation(IslandWorld.Normal, IslandEnvironment.Island),
|
||||||
CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
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)) {
|
if (!islandManager.isPlayerAtIsland(island, player, IslandWorld.Normal)) {
|
||||||
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
soundManager.playSound(player, CompatibleSound.ENTITY_GENERIC_SPLASH.getSound(), 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
|
paint();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setItem(31, CompatibleMaterial.BARRIER.getItem());
|
setItem(31, CompatibleMaterial.BARRIER.getItem()); // TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1137,29 +1137,26 @@ public class IslandManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Location loc = island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor);
|
||||||
Bukkit.getServer().getScheduler().runTaskAsynchronously(skyblock, () -> {
|
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
||||||
Location loc = island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor);
|
Location safeLoc = LocationUtil.getSafeLocation(loc);
|
||||||
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
if(safeLoc != null){
|
||||||
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(loc);
|
loc = safeLoc;
|
||||||
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")));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(loc != null){
|
||||||
|
PaperLib.teleportAsync(player, loc);
|
||||||
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
|
if(!configLoad.getBoolean("Island.Teleport.FallDamage", true)){
|
||||||
player.setFallDistance(0.0F);
|
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);
|
List<String> islandWelcomeMessage = island.getMessage(IslandMessage.Welcome);
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.songoda.skyblock.listeners;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||||
import com.songoda.core.compatibility.CompatibleSound;
|
import com.songoda.core.compatibility.CompatibleSound;
|
||||||
|
import com.songoda.core.compatibility.ServerVersion;
|
||||||
import com.songoda.skyblock.SkyBlock;
|
import com.songoda.skyblock.SkyBlock;
|
||||||
import com.songoda.skyblock.config.FileManager.Config;
|
import com.songoda.skyblock.config.FileManager.Config;
|
||||||
import com.songoda.skyblock.generator.Generator;
|
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)){
|
if(!player.hasPermission("fabledskyblock.bypass.netherplace") && !islandManager.isIslandWorldUnlocked(island, IslandWorld.Nether)){
|
||||||
for(String s : Objects.requireNonNull(configLoad.getConfigurationSection("Island.Restrict.NetherBlocks")).getKeys(false)){
|
for(String s : Objects.requireNonNull(configLoad.getConfigurationSection("Island.Restrict.NetherBlocks")).getKeys(false)){
|
||||||
if(s.equalsIgnoreCase(block.getType().toString())){
|
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"))
|
skyblock.getMessageManager().sendMessage(player, Objects.requireNonNull(skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
|
||||||
.getFileConfiguration().getString("Island.Unlock.NetherBlocksPlace.Message")));
|
.getFileConfiguration().getString("Island.Unlock.NetherBlocksPlace.Message")));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
@ -326,24 +327,31 @@ public class Block implements Listener {
|
||||||
Collection<Entity> entities = block.getWorld().getNearbyEntities(block.getLocation(), 1d, 1d, 1d);
|
Collection<Entity> entities = block.getWorld().getNearbyEntities(block.getLocation(), 1d, 1d, 1d);
|
||||||
if(entities.size() > 0){
|
if(entities.size() > 0){
|
||||||
for(Entity ent : entities){
|
for(Entity ent : entities){
|
||||||
|
|
||||||
boolean witherSkeleton;
|
boolean witherSkeleton;
|
||||||
if (NMSUtil.getVersionNumber() > 10) {
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
||||||
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
|
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
|
||||||
} else {
|
} else {
|
||||||
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
|
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
|
||||||
}
|
}
|
||||||
if (ent.getType().equals(EntityType.PIG_ZOMBIE) ||
|
if((((ent instanceof Blaze || ent instanceof MagmaCube) || ent instanceof Wither) || ent instanceof Ghast) || witherSkeleton){
|
||||||
ent.getType().equals(EntityType.BLAZE) ||
|
event.setCancelled(true);
|
||||||
ent.getType().equals(EntityType.MAGMA_CUBE) ||
|
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
||||||
ent.getType().equals(EntityType.WITHER) ||
|
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
|
||||||
ent.getType().equals(EntityType.GHAST) ||
|
} else {
|
||||||
witherSkeleton) {
|
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){
|
||||||
if(block.getRelative(event.getFace().getOppositeFace()).getType().equals(Material.WATER)){
|
if(((ent instanceof Piglin || ent instanceof Hoglin) || ent instanceof Strider) || ent instanceof Zoglin) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
event.getToBlock().getWorld().playSound(block.getLocation(), CompatibleSound.BLOCK_FIRE_EXTINGUISH.getSound(), 1f, 1f);
|
||||||
event.getToBlock().getWorld().playEffect(block.getLocation(), Effect.SMOKE, 1);
|
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,41 +194,37 @@ public class Move implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void teleportPlayerToIslandSpawn(Player player, IslandWorld world, Island island) {
|
private void teleportPlayerToIslandSpawn(Player player, IslandWorld world, Island island) {
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(skyblock, () -> {
|
Location loc = null;
|
||||||
Location loc = null;
|
if (island.hasRole(IslandRole.Member, player.getUniqueId()) || island.hasRole(IslandRole.Operator, player.getUniqueId())
|
||||||
if (island.hasRole(IslandRole.Member, player.getUniqueId()) || island.hasRole(IslandRole.Operator, player.getUniqueId())
|
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
|
||||||
|| island.hasRole(IslandRole.Owner, player.getUniqueId())) {
|
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
||||||
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Main));
|
||||||
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Main));
|
if(safeLoc != null){
|
||||||
if(safeLoc != null){
|
loc = safeLoc;
|
||||||
loc = safeLoc.join();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loc = island.getLocation(world, IslandEnvironment.Main);
|
|
||||||
LocationUtil.removeWaterFromLoc(skyblock, loc);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
loc = island.getLocation(world, IslandEnvironment.Main);
|
||||||
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Visitor));
|
LocationUtil.removeWaterFromLoc(skyblock, loc);
|
||||||
if(safeLoc != null){
|
|
||||||
loc = safeLoc.join();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
loc = island.getLocation(world, IslandEnvironment.Visitor);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Location finalLoc = loc;
|
} else {
|
||||||
Bukkit.getScheduler().runTask(skyblock, () -> {
|
if (!player.getGameMode().equals(GameMode.CREATIVE) && !player.getGameMode().equals(GameMode.SPECTATOR)) {
|
||||||
if(finalLoc != null){
|
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(world, IslandEnvironment.Visitor));
|
||||||
PaperLib.teleportAsync(player, finalLoc);
|
if(safeLoc != null){
|
||||||
} else {
|
loc = safeLoc;
|
||||||
LocationUtil.teleportPlayerToSpawn(player);
|
|
||||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
|
|
||||||
skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"))
|
|
||||||
.getFileConfiguration().getString("Command.Island.Teleport.Unsafe.Message")));
|
|
||||||
}
|
}
|
||||||
});
|
} 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) {
|
private void teleportPlayerToIslandSpawn(Player player, Island island) {
|
||||||
|
|
|
@ -164,20 +164,18 @@ public class Portal implements Listener {
|
||||||
|
|
||||||
private void teleportPlayerToWorld(Player player, SoundManager soundManager, Island island, IslandEnvironment spawnEnvironment, Tick tick, IslandWorld toWorld) {
|
private void teleportPlayerToWorld(Player player, SoundManager soundManager, Island island, IslandEnvironment spawnEnvironment, Tick tick, IslandWorld toWorld) {
|
||||||
IslandWorld toWorldF = toWorld;
|
IslandWorld toWorldF = toWorld;
|
||||||
Bukkit.getScheduler().runTaskLaterAsynchronously(skyblock, () -> {
|
Bukkit.getScheduler().runTaskLater(skyblock, () -> {
|
||||||
Location loc = island.getLocation(toWorldF, spawnEnvironment);
|
Location loc = island.getLocation(toWorldF, spawnEnvironment);
|
||||||
CompletableFuture<Location> tempSafeLoc = LocationUtil.getSafeLocation(loc);
|
Location tempSafeLoc = LocationUtil.getSafeLocation(loc);
|
||||||
Location safeLoc = null;
|
Location safeLoc = null;
|
||||||
if(tempSafeLoc != null) {
|
if(tempSafeLoc != null) {
|
||||||
safeLoc = tempSafeLoc.join();
|
safeLoc = tempSafeLoc;
|
||||||
}
|
}
|
||||||
if(safeLoc != null){
|
if(safeLoc != null){
|
||||||
loc = safeLoc;
|
loc = safeLoc;
|
||||||
}
|
}
|
||||||
Location finalLoc = loc;
|
Location finalLoc = loc;
|
||||||
Bukkit.getScheduler().runTask(skyblock, () -> {
|
PaperLib.teleportAsync(player, finalLoc);
|
||||||
PaperLib.teleportAsync(player, finalLoc);
|
|
||||||
});
|
|
||||||
}, 1L);
|
}, 1L);
|
||||||
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
soundManager.playSound(player, CompatibleSound.ENTITY_ENDERMAN_TELEPORT.getSound(), 1.0F, 1.0F);
|
||||||
player.setFallDistance(0.0F);
|
player.setFallDistance(0.0F);
|
||||||
|
|
|
@ -8,7 +8,9 @@ import com.songoda.skyblock.permission.PermissionHandler;
|
||||||
import com.songoda.skyblock.permission.PermissionType;
|
import com.songoda.skyblock.permission.PermissionType;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.entity.Projectile;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
|
import org.bukkit.event.block.BlockIgniteEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
|
||||||
public class FirePermission extends ListeningPermission {
|
public class FirePermission extends ListeningPermission {
|
||||||
|
@ -29,7 +31,21 @@ public class FirePermission extends ListeningPermission {
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
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);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,22 +70,20 @@ public class PortalPermission extends ListeningPermission {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private CompletableFuture<Location> getToLocation(Location from, Player player) {
|
private Location getToLocation(Location from, Player player) {
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
IslandManager islandManager = plugin.getIslandManager();
|
||||||
IslandManager islandManager = plugin.getIslandManager();
|
Island island = islandManager.getIslandAtLocation(from);
|
||||||
Island island = islandManager.getIslandAtLocation(from);
|
Location to = island.getLocation(IslandWorld.Normal, IslandEnvironment.Main);
|
||||||
Location to = island.getLocation(IslandWorld.Normal, IslandEnvironment.Main);
|
if(island.hasRole(IslandRole.Visitor, player.getUniqueId())){
|
||||||
if(island.hasRole(IslandRole.Visitor, player.getUniqueId())){
|
Location safeLoc = LocationUtil.getSafeLocation(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor));
|
||||||
CompletableFuture<Location> safeLoc = LocationUtil.getSafeLocation(island.getLocation(IslandWorld.Normal, IslandEnvironment.Visitor));
|
if(safeLoc != null) {
|
||||||
if(safeLoc != null) {
|
to = safeLoc;
|
||||||
to = safeLoc.join();
|
|
||||||
}
|
|
||||||
if(to == null){
|
|
||||||
to = LocationUtil.getSpawnLocation();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return to;
|
if(to == null){
|
||||||
});
|
to = LocationUtil.getSpawnLocation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return to;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.songoda.skyblock.tasks;
|
package com.songoda.skyblock.tasks;
|
||||||
|
|
||||||
import com.songoda.core.compatibility.CompatibleSound;
|
import com.songoda.core.compatibility.CompatibleSound;
|
||||||
|
import com.songoda.core.compatibility.ServerVersion;
|
||||||
import com.songoda.core.utils.TextUtils;
|
import com.songoda.core.utils.TextUtils;
|
||||||
import com.songoda.skyblock.SkyBlock;
|
import com.songoda.skyblock.SkyBlock;
|
||||||
import com.songoda.skyblock.config.FileManager;
|
import com.songoda.skyblock.config.FileManager;
|
||||||
|
@ -19,10 +20,7 @@ import org.bukkit.*;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.entity.Skeleton;
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import java.io.File;
|
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)){
|
if(plugin.getWorldManager().isIslandWorld(world) && plugin.getWorldManager().getIslandWorld(world).equals(IslandWorld.Nether)){
|
||||||
for(Entity ent : world.getEntities()) {
|
for(Entity ent : world.getEntities()) {
|
||||||
boolean witherSkeleton;
|
boolean witherSkeleton;
|
||||||
if (NMSUtil.getVersionNumber() > 10) {
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
||||||
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
|
witherSkeleton = ent.getType().equals(EntityType.WITHER_SKELETON);
|
||||||
} else {
|
} else {
|
||||||
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
|
witherSkeleton = ent instanceof Skeleton && ((Skeleton) ent).getSkeletonType().equals(Skeleton.SkeletonType.WITHER);
|
||||||
}
|
}
|
||||||
if (ent.getType().equals(EntityType.PIG_ZOMBIE) ||
|
if((((ent instanceof Blaze || ent instanceof MagmaCube) || ent instanceof Wither) || ent instanceof Ghast) || witherSkeleton){
|
||||||
ent.getType().equals(EntityType.BLAZE) ||
|
|
||||||
ent.getType().equals(EntityType.MAGMA_CUBE) ||
|
|
||||||
ent.getType().equals(EntityType.WITHER) ||
|
|
||||||
ent.getType().equals(EntityType.GHAST) ||
|
|
||||||
witherSkeleton) {
|
|
||||||
Block block = ent.getLocation().getBlock();
|
Block block = ent.getLocation().getBlock();
|
||||||
removeWater(world, block);
|
removeWater(world, block);
|
||||||
removeWater(world, block.getRelative(BlockFace.UP));
|
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));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,31 +42,29 @@ public final class LocationUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @Nullable CompletableFuture<Location> getSafeLocation(Location loc){
|
public static @Nullable Location getSafeLocation(Location loc){
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
boolean found = false;
|
||||||
boolean found = false;
|
Location locChecked = null;
|
||||||
Location locChecked = null;
|
if(loc != null && loc.getWorld() != null){
|
||||||
if(loc != null && loc.getWorld() != null){
|
locChecked = loc.clone();
|
||||||
locChecked = loc.clone();
|
loc.getWorld().loadChunk(loc.getWorld().getChunkAt(loc));
|
||||||
loc.getWorld().loadChunk(loc.getWorld().getChunkAt(loc));
|
for(int i=loc.getBlockY(); i>=0 && !found; i--){
|
||||||
for(int i=loc.getBlockY(); i>=0 && !found; i--){
|
locChecked = locChecked.subtract(0d, 1d, 0d);
|
||||||
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);
|
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){
|
public static @Nonnull Location getDefinitiveLocation(Location loc){
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class BlockData {
|
||||||
private String skullOwner = "Notch";
|
private String skullOwner = "Notch";
|
||||||
private String skullType = SkullType.PLAYER.toString();
|
private String skullType = SkullType.PLAYER.toString();
|
||||||
private String facing;
|
private String facing;
|
||||||
|
private int charges = 0;
|
||||||
|
|
||||||
private Map<Integer, String> inventory = new HashMap<>();
|
private Map<Integer, String> inventory = new HashMap<>();
|
||||||
|
|
||||||
|
@ -313,4 +314,12 @@ public class BlockData {
|
||||||
public void setExactTeleport(boolean exactTeleport) {
|
public void setExactTeleport(boolean exactTeleport) {
|
||||||
this.exactTeleport = exactTeleport;
|
this.exactTeleport = exactTeleport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCharges() {
|
||||||
|
return charges;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCharges(int charges) {
|
||||||
|
this.charges = charges;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,6 @@ package com.songoda.skyblock.utils.world.block;
|
||||||
public enum BlockStateType {
|
public enum BlockStateType {
|
||||||
|
|
||||||
NORMAL, BANNER, BEACON, BREWINGSTAND, COMMANDBLOCK, CHEST, DISPENSER, DROPPER, HOPPER, SHULKERBOX, CREATURESPAWNER,
|
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
|
||||||
|
|
||||||
}
|
}
|
|
@ -9,6 +9,7 @@ import org.bukkit.*;
|
||||||
import org.bukkit.block.*;
|
import org.bukkit.block.*;
|
||||||
import org.bukkit.block.banner.Pattern;
|
import org.bukkit.block.banner.Pattern;
|
||||||
import org.bukkit.block.banner.PatternType;
|
import org.bukkit.block.banner.PatternType;
|
||||||
|
import org.bukkit.block.data.type.RespawnAnchor;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
|
@ -212,6 +213,14 @@ public final class BlockUtil extends BlockUtils {
|
||||||
|
|
||||||
blockData.setStateType(BlockStateType.BARREL.toString());
|
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();
|
BlockState state = block.getState();
|
||||||
|
|
||||||
if (blockTypeState == BlockStateType.BANNER) {
|
if (blockTypeState.equals(BlockStateType.BANNER)) {
|
||||||
Banner banner = (Banner) state;
|
Banner banner = (Banner) state;
|
||||||
banner.setBaseColor(DyeColor.valueOf(blockData.getBaseColor().toUpperCase()));
|
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())));
|
banner.addPattern(new Pattern(DyeColor.valueOf(pattern[1].toUpperCase()), PatternType.valueOf(pattern[0].toUpperCase())));
|
||||||
}
|
}
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.BEACON) {
|
} else if (blockTypeState.equals(BlockStateType.BEACON)) {
|
||||||
Beacon beacon = (Beacon) state;
|
Beacon beacon = (Beacon) state;
|
||||||
String[] potionEffect = blockData.getPotionEffect().split(":");
|
String[] potionEffect = blockData.getPotionEffect().split(":");
|
||||||
if (!potionEffect[0].equals("null")) {
|
if (!potionEffect[0].equals("null")) {
|
||||||
|
@ -304,17 +313,17 @@ public final class BlockUtil extends BlockUtils {
|
||||||
beacon.setSecondaryEffect(PotionEffectType.getByName(potionEffect[1].toUpperCase()));
|
beacon.setSecondaryEffect(PotionEffectType.getByName(potionEffect[1].toUpperCase()));
|
||||||
}
|
}
|
||||||
state.update();
|
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 brewingStand = (BrewingStand) state;
|
||||||
brewingStand.setBrewingTime(blockData.getBrewingTime());
|
brewingStand.setBrewingTime(blockData.getBrewingTime());
|
||||||
brewingStand.setFuelLevel(blockData.getFuelLevel());
|
brewingStand.setFuelLevel(blockData.getFuelLevel());
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.COMMANDBLOCK) {
|
} else if (blockTypeState.equals(BlockStateType.COMMANDBLOCK)) {
|
||||||
CommandBlock commandBlock = (CommandBlock) state;
|
CommandBlock commandBlock = (CommandBlock) state;
|
||||||
commandBlock.setCommand(blockData.getCommand());
|
commandBlock.setCommand(blockData.getCommand());
|
||||||
commandBlock.setName(blockData.getCommandBlockName());
|
commandBlock.setName(blockData.getCommandBlockName());
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.CHEST) {
|
} else if (blockTypeState.equals(BlockStateType.CHEST)) {
|
||||||
Chest chest = (Chest) state;
|
Chest chest = (Chest) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
for (Integer slotList : blockData.getInventory().keySet()) {
|
||||||
|
@ -323,7 +332,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
chest.getInventory().setItem(slotList, is);
|
chest.getInventory().setItem(slotList, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (blockTypeState == BlockStateType.DISPENSER) {
|
} else if (blockTypeState.equals(BlockStateType.DISPENSER)) {
|
||||||
Dispenser dispenser = (Dispenser) state;
|
Dispenser dispenser = (Dispenser) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
for (Integer slotList : blockData.getInventory().keySet()) {
|
||||||
|
@ -332,7 +341,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
dispenser.getInventory().setItem(slotList, is);
|
dispenser.getInventory().setItem(slotList, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (blockTypeState == BlockStateType.DROPPER) {
|
} else if (blockTypeState.equals(BlockStateType.DROPPER)) {
|
||||||
Dropper dropper = (Dropper) state;
|
Dropper dropper = (Dropper) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
for (Integer slotList : blockData.getInventory().keySet()) {
|
||||||
|
@ -341,7 +350,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
dropper.getInventory().setItem(slotList, is);
|
dropper.getInventory().setItem(slotList, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (blockTypeState == BlockStateType.HOPPER) {
|
} else if (blockTypeState.equals(BlockStateType.HOPPER)) {
|
||||||
Hopper hopper = (Hopper) state;
|
Hopper hopper = (Hopper) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
for (Integer slotList : blockData.getInventory().keySet()) {
|
||||||
|
@ -350,7 +359,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
hopper.getInventory().setItem(slotList, is);
|
hopper.getInventory().setItem(slotList, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (blockTypeState == BlockStateType.CREATURESPAWNER) {
|
} else if (blockTypeState.equals(BlockStateType.CREATURESPAWNER)) {
|
||||||
CreatureSpawner creatureSpawner = (CreatureSpawner) state;
|
CreatureSpawner creatureSpawner = (CreatureSpawner) state;
|
||||||
|
|
||||||
if (blockData.getEntity() != null) {
|
if (blockData.getEntity() != null) {
|
||||||
|
@ -359,7 +368,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
|
|
||||||
creatureSpawner.setDelay(blockData.getDelay());
|
creatureSpawner.setDelay(blockData.getDelay());
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.FURNACE) {
|
} else if (blockTypeState.equals(BlockStateType.FURNACE)) {
|
||||||
Furnace furnace = (Furnace) state;
|
Furnace furnace = (Furnace) state;
|
||||||
furnace.setBurnTime(blockData.getBurnTime());
|
furnace.setBurnTime(blockData.getBurnTime());
|
||||||
furnace.setCookTime(blockData.getCookTime());
|
furnace.setCookTime(blockData.getCookTime());
|
||||||
|
@ -372,21 +381,21 @@ public final class BlockUtil extends BlockUtils {
|
||||||
furnace.getInventory().setItem(slotList, is);
|
furnace.getInventory().setItem(slotList, is);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (blockTypeState == BlockStateType.JUKEBOX) {
|
} else if (blockTypeState.equals(BlockStateType.JUKEBOX)) {
|
||||||
Jukebox jukebox = (Jukebox) state;
|
Jukebox jukebox = (Jukebox) state;
|
||||||
|
|
||||||
if (blockData.getPlaying() != null) {
|
if (blockData.getPlaying() != null) {
|
||||||
jukebox.setPlaying(Material.valueOf(blockData.getPlaying().toUpperCase()));
|
jukebox.setPlaying(Material.valueOf(blockData.getPlaying().toUpperCase()));
|
||||||
}
|
}
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.SIGN) {
|
} else if (blockTypeState.equals(BlockStateType.SIGN)) {
|
||||||
Sign sign = (Sign) state;
|
Sign sign = (Sign) state;
|
||||||
|
|
||||||
for (int i = 0; i < blockData.getSignLines().length; i++) {
|
for (int i = 0; i < blockData.getSignLines().length; i++) {
|
||||||
sign.setLine(i, ChatColor.translateAlternateColorCodes('&', blockData.getSignLines()[i]));
|
sign.setLine(i, ChatColor.translateAlternateColorCodes('&', blockData.getSignLines()[i]));
|
||||||
}
|
}
|
||||||
state.update();
|
state.update();
|
||||||
} else if (blockTypeState == BlockStateType.SKULL) {
|
} else if (blockTypeState.equals(BlockStateType.SKULL)) {
|
||||||
Skull skull = (Skull) state;
|
Skull skull = (Skull) state;
|
||||||
|
|
||||||
skull.setRotation(BlockFace.valueOf(blockData.getRotateFace().toUpperCase()));
|
skull.setRotation(BlockFace.valueOf(blockData.getRotateFace().toUpperCase()));
|
||||||
|
@ -400,7 +409,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
state.update();
|
state.update();
|
||||||
} else {
|
} else {
|
||||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_9)) {
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_9)) {
|
||||||
if (blockTypeState == BlockStateType.ENDGATEWAY) {
|
if (blockTypeState.equals(BlockStateType.ENDGATEWAY)) {
|
||||||
EndGateway endGateway = (EndGateway) state;
|
EndGateway endGateway = (EndGateway) state;
|
||||||
endGateway.setExactTeleport(blockData.isExactTeleport());
|
endGateway.setExactTeleport(blockData.isExactTeleport());
|
||||||
|
|
||||||
|
@ -416,7 +425,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_11)) {
|
||||||
if (blockTypeState == BlockStateType.SHULKERBOX) {
|
if (blockTypeState.equals(BlockStateType.SHULKERBOX)) {
|
||||||
ShulkerBox shulkerBox = (ShulkerBox) state;
|
ShulkerBox shulkerBox = (ShulkerBox) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
for (Integer slotList : blockData.getInventory().keySet()) {
|
||||||
|
@ -427,7 +436,7 @@ public final class BlockUtil extends BlockUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)){
|
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)){
|
||||||
if (blockTypeState == BlockStateType.BARREL) {
|
if (blockTypeState.equals(BlockStateType.BARREL)) {
|
||||||
Barrel barrel = (Barrel) state;
|
Barrel barrel = (Barrel) state;
|
||||||
|
|
||||||
for (Integer slotList : blockData.getInventory().keySet()) {
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.songoda.skyblock.utils.world.entity;
|
package com.songoda.skyblock.utils.world.entity;
|
||||||
|
|
||||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||||
|
import com.songoda.core.compatibility.ServerVersion;
|
||||||
import com.songoda.skyblock.utils.item.ItemStackUtil;
|
import com.songoda.skyblock.utils.item.ItemStackUtil;
|
||||||
import com.songoda.skyblock.utils.version.NMSUtil;
|
import com.songoda.skyblock.utils.version.NMSUtil;
|
||||||
import com.songoda.skyblock.utils.world.block.BlockDegreesType;
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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:
|
Biomes:
|
||||||
BADLANDS:
|
BADLANDS:
|
||||||
DisplayName: 'Badlands'
|
DisplayName: '&6Badlands'
|
||||||
DiplayItem:
|
DisplayItem:
|
||||||
Material: WHITE_TERRACOTTA
|
Material: WHITE_TERRACOTTA
|
||||||
Data: 0
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BADLANDS_PLATEAU:
|
BADLANDS_PLATEAU:
|
||||||
DisplayName: 'Badlands Plateau'
|
DisplayName: '&6Badlands Plateau'
|
||||||
DiplayItem:
|
DisplayItem:
|
||||||
Material: RED_TERRACOTTA
|
Material: RED_TERRACOTTA
|
||||||
Data: 14
|
Data: 14
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BAMBOO_JUNGLE:
|
BAMBOO_JUNGLE:
|
||||||
DisplayName: 'Bamboo Jungle'
|
DisplayName: '&6Bamboo Jungle'
|
||||||
DiplayItem:
|
DisplayItem:
|
||||||
Material: BAMBOO
|
Material: BAMBOO
|
||||||
Data: 0
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BAMBOO_JUNGLE_HILLS:
|
BAMBOO_JUNGLE_HILLS:
|
||||||
DisplayName: 'Bamboo Jungle Hills'
|
DisplayName: '&6Bamboo Jungle Hills'
|
||||||
DiplayItem:
|
DisplayItem:
|
||||||
Material: BAMBOO
|
Material: SCAFFOLDING
|
||||||
Data: 0
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BASALT_DELTAS:
|
BASALT_DELTAS:
|
||||||
DisplayName: 'Basalt Deltas'
|
DisplayName: '&6Basalt Deltas'
|
||||||
DiplayItem:
|
DisplayItem:
|
||||||
Material: BASALT
|
Material: BASALT
|
||||||
Data: 0
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
BEACH:
|
BEACH:
|
||||||
DisplayName: 'Beach'
|
DisplayName: '&6Beach'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SAND
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BIRCH_FOREST:
|
BIRCH_FOREST:
|
||||||
DisplayName: 'Birch Forest'
|
DisplayName: '&6Birch Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BIRCH_SAPLING
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
BIRCH_FOREST_HILLS:
|
BIRCH_FOREST_HILLS:
|
||||||
DisplayName: 'Birch Forest Hills'
|
DisplayName: '&6Birch Forest Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BIRCH_LEAVES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
COLD_OCEAN:
|
COLD_OCEAN:
|
||||||
DisplayName: 'Cold Ocean'
|
DisplayName: '&6Cold Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SEAGRASS
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
CRIMSON_FOREST:
|
CRIMSON_FOREST:
|
||||||
DisplayName: 'Crimson Forest'
|
DisplayName: '&6Crimson Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: WEEPING_VINES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
DARK_FOREST:
|
DARK_FOREST:
|
||||||
DisplayName: 'Dark Forest'
|
DisplayName: '&6Dark Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: DARK_OAK_SAPLING
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DARK_FOREST_HILLS:
|
DARK_FOREST_HILLS:
|
||||||
DisplayName: 'Dark Forest Hills'
|
DisplayName: '&6Dark Forest Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: DARK_OAK_LEAVES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DEEP_COLD_OCEAN:
|
DEEP_COLD_OCEAN:
|
||||||
DisplayName: 'Deep Cold Ocean'
|
DisplayName: '&6Deep Cold Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: COD
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DEEP_FROZEN_OCEAN:
|
DEEP_FROZEN_OCEAN:
|
||||||
DisplayName: 'Deep Frozen Ocean'
|
DisplayName: '&6Deep Frozen Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: ICE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DEEP_LUKEWARM_OCEAN:
|
DEEP_LUKEWARM_OCEAN:
|
||||||
DisplayName: 'Deep Lukewarm Ocean'
|
DisplayName: '&6Deep Lukewarm Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: PUFFERFISH
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DEEP_OCEAN:
|
DEEP_OCEAN:
|
||||||
DisplayName: 'Deep Ocean'
|
DisplayName: '&6Deep Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: GRAVEL
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DEEP_WARM_OCEAN:
|
DEEP_WARM_OCEAN:
|
||||||
DisplayName: 'Deep Warm Ocean'
|
DisplayName: '&6Deep Warm Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: TROPICAL_FISH
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DESERT:
|
DESERT:
|
||||||
DisplayName: 'Desert'
|
DisplayName: '&6Desert'
|
||||||
|
DisplayItem:
|
||||||
|
Material: CACTUS
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DESERT_HILLS:
|
DESERT_HILLS:
|
||||||
DisplayName: 'Desert Hills'
|
DisplayName: '&6Desert Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: RED_SAND
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
DESERT_LAKES:
|
DESERT_LAKES:
|
||||||
DisplayName: 'Desert Lakes'
|
DisplayName: '&6Desert Lakes'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SANDSTONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
END_BARRENS:
|
END_BARRENS:
|
||||||
DisplayName: 'End Barrens'
|
DisplayName: '&6End Barrens'
|
||||||
|
DisplayItem:
|
||||||
|
Material: END_STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: end
|
|
||||||
END_HIGHLANDS:
|
END_HIGHLANDS:
|
||||||
DisplayName: 'End HighLands'
|
DisplayName: '&6End HighLands'
|
||||||
|
DisplayItem:
|
||||||
|
Material: END_STONE_BRICKS
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: true
|
|
||||||
END_MIDLANDS:
|
END_MIDLANDS:
|
||||||
DisplayName: 'End Midlands'
|
DisplayName: '&6End Midlands'
|
||||||
|
DisplayItem:
|
||||||
|
Material: PURPUR_BLOCK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: end
|
|
||||||
ERODED_BADLANDS:
|
ERODED_BADLANDS:
|
||||||
DisplayName: 'Eroded Badlands'
|
DisplayName: '&6Eroded Badlands'
|
||||||
|
DisplayItem:
|
||||||
|
Material: PINK_TERRACOTTA
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
FLOWER_FOREST:
|
FLOWER_FOREST:
|
||||||
DisplayName: 'Flower Forest'
|
DisplayName: '&6Flower Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SUNFLOWER
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
FOREST:
|
FOREST:
|
||||||
DisplayName: 'Forest'
|
DisplayName: '&6Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: APPLE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
FROZEN_OCEAN:
|
FROZEN_OCEAN:
|
||||||
DisplayName: 'Frozen Ocean'
|
DisplayName: '&6Frozen Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: ICE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
FROZEN_RIVER:
|
FROZEN_RIVER:
|
||||||
DisplayName: 'Frozen River'
|
DisplayName: '&6Frozen River'
|
||||||
|
DisplayItem:
|
||||||
|
Material: COD
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
GIANT_SPRUCE_TAIGA:
|
GIANT_SPRUCE_TAIGA:
|
||||||
DisplayName: 'Giant Spruce Taiga'
|
DisplayName: '&6Giant Spruce Taiga'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_LOG
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
GIANT_SPRUCE_TAIGA_HILLS:
|
GIANT_SPRUCE_TAIGA_HILLS:
|
||||||
DisplayName: 'Giant Spruce Taiga Hills'
|
DisplayName: '&6Giant Spruce Taiga Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_LEAVES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
GIANT_TREE_TAIGA:
|
GIANT_TREE_TAIGA:
|
||||||
DisplayName: 'Giant Tree Taiga'
|
DisplayName: 'Giant Tree Taiga'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_SAPLING
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
GIANT_TREE_TAIGA_HILLS:
|
GIANT_TREE_TAIGA_HILLS:
|
||||||
DisplayName: 'Giant Tree Taiga Hills'
|
DisplayName: '&6Giant Tree Taiga Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_WOOD
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
GRAVELLY_MOUNTAINS:
|
GRAVELLY_MOUNTAINS:
|
||||||
DisplayName: 'Gravelly Mountains'
|
DisplayName: '&6Gravelly Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: GRAVEL
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
ICE_SPIKES:
|
ICE_SPIKES:
|
||||||
DisplayName: 'Ice Spikes'
|
DisplayName: '&6Ice Spikes'
|
||||||
|
DisplayItem:
|
||||||
|
Material: PACKED_ICE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
JUNGLE:
|
JUNGLE:
|
||||||
DisplayName: 'Jungle'
|
DisplayName: '&6Jungle'
|
||||||
|
DisplayItem:
|
||||||
|
Material: VINES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
JUNGLE_EDGE:
|
JUNGLE_EDGE:
|
||||||
DisplayName: 'Jungle Edge'
|
DisplayName: '&6Jungle Edge'
|
||||||
|
DisplayItem:
|
||||||
|
Material: JUNGLE_TREE_LOG
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
JUNGLE_HILLS:
|
JUNGLE_HILLS:
|
||||||
DisplayName: 'Jungle Hills'
|
DisplayName: '&6Jungle Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: JUNGLE_TREE_SAPLING
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
LUKEWARM_OCEAN:
|
LUKEWARM_OCEAN:
|
||||||
DisplayName: 'Lukewarm Ocean'
|
DisplayName: '&6Lukewarm Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: KELP
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MODIFIED_BADLANDS_PLATEAU:
|
MODIFIED_BADLANDS_PLATEAU:
|
||||||
DisplayName: 'Modified Badlands Plateau'
|
DisplayName: '&6Modified Badlands Plateau'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MODIFIED_GRAVELLY_MOUNTAINS:
|
MODIFIED_GRAVELLY_MOUNTAINS:
|
||||||
DisplayName: 'Modified Gravelly Mountains'
|
DisplayName: '&6Modified Gravelly Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MODIFIED_JUNGLE:
|
MODIFIED_JUNGLE:
|
||||||
DisplayName: 'Modified Jungle'
|
DisplayName: '&6Modified Jungle'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MODIFIED_JUNGLE_EDGE:
|
MODIFIED_JUNGLE_EDGE:
|
||||||
DisplayName: 'Modified Jungle Edge'
|
DisplayName: '&6Modified Jungle Edge'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MODIFIED_WOODED_BADLANDS_PLATEAU:
|
MODIFIED_WOODED_BADLANDS_PLATEAU:
|
||||||
DisplayName: 'Modified Wooden Badlands Plateau'
|
DisplayName: '&6Modified Wooden Badlands Plateau'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MOUNTAINS:
|
MOUNTAINS:
|
||||||
DisplayName: 'Mountains'
|
DisplayName: '&6Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MOUNTAIN_EDGE:
|
MOUNTAIN_EDGE:
|
||||||
DisplayName: 'Mountain Edge'
|
DisplayName: '&6Mountain Edge'
|
||||||
|
DisplayItem:
|
||||||
|
Material: DIORITE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MUSHROOM_FIELDS:
|
MUSHROOM_FIELDS:
|
||||||
DisplayName: 'Mushroom Fields'
|
DisplayName: '&6Mushroom Fields'
|
||||||
|
DisplayItem:
|
||||||
|
Material: RED_MUSHROOM
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
MUSHROOM_FIELD_SHORE:
|
MUSHROOM_FIELD_SHORE:
|
||||||
DisplayName: 'Mushroom Field Shore'
|
DisplayName: '&6Mushroom Field Shore'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BROWN_MUSHROOM
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
# PRE-1.16
|
# PRE-1.16
|
||||||
NETHER:
|
NETHER:
|
||||||
DisplayName: 'Nether'
|
DisplayName: '&6Nether'
|
||||||
|
DisplayItem:
|
||||||
|
Material: NETHERRACK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
NETHER_WASTES:
|
NETHER_WASTES:
|
||||||
DisplayName: 'Nether Wastes'
|
DisplayName: '&6Nether Wastes'
|
||||||
|
DisplayItem:
|
||||||
|
Material: NETHER_WART
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
OCEAN:
|
OCEAN:
|
||||||
DisplayName: 'Ocean'
|
DisplayName: '&6Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SEA_LANTERN
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
PLAINS:
|
PLAINS:
|
||||||
DisplayName: 'Plains'
|
DisplayName: '&6Plains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: GRASS_BLOCK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
RIVER:
|
RIVER:
|
||||||
DisplayName: 'River'
|
DisplayName: '&6River'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SUGAR_CANE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SAVANNA:
|
SAVANNA:
|
||||||
DisplayName: 'Savanna'
|
DisplayName: '&6Savanna'
|
||||||
|
DisplayItem:
|
||||||
|
Material: GRASS
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SAVANNA_PLATEAU:
|
SAVANNA_PLATEAU:
|
||||||
DisplayName: 'Savanna Plateau'
|
DisplayName: '&6Savanna Plateau'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SHATTERED_SAVANNA:
|
SHATTERED_SAVANNA:
|
||||||
DisplayName: 'Shattered Savanna'
|
DisplayName: '&6Shattered Savanna'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SHATTERED_SAVANNA_PLATEAU:
|
SHATTERED_SAVANNA_PLATEAU:
|
||||||
DisplayName: 'Shattered Savanna Plateau'
|
DisplayName: '&6Shattered Savanna Plateau'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SMALL_END_ISLANDS:
|
SMALL_END_ISLANDS:
|
||||||
DisplayName: 'Small End Island'
|
DisplayName: '&6Small End Island'
|
||||||
|
DisplayItem:
|
||||||
|
Material: PURPUR_PILLAR
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: true
|
|
||||||
SNOWY_BEACH:
|
SNOWY_BEACH:
|
||||||
DisplayName: 'Snowy Beach'
|
DisplayName: '&6Snowy Beach'
|
||||||
|
DisplayItem:
|
||||||
|
Material: RABBIT_FOOT
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SNOWY_MOUNTAINS:
|
SNOWY_MOUNTAINS:
|
||||||
DisplayName: 'Snowy Mountains'
|
DisplayName: '&6Snowy Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SNOW_BLOCK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SNOWY_TAIGA:
|
SNOWY_TAIGA:
|
||||||
DisplayName: 'Snowy Taiga'
|
DisplayName: '&6Snowy Taiga'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_SAPLING
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SNOWY_TAIGA_HILLS:
|
SNOWY_TAIGA_HILLS:
|
||||||
DisplayName: 'Snowy Taiga Hills'
|
DisplayName: '&6Snowy Taiga Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SNOWBALL
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SNOWY_TAIGA_MOUNTAINS:
|
SNOWY_TAIGA_MOUNTAINS:
|
||||||
DisplayName: 'Snowy Taiga Mountains'
|
DisplayName: '&6Snowy Taiga Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SWEET_BERRIES
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SNOWY_TUNDRA:
|
SNOWY_TUNDRA:
|
||||||
DisplayName: 'Snowy Tundra'
|
DisplayName: '&6Snowy Tundra'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SNOW
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SOUL_SAND_VALLEY:
|
SOUL_SAND_VALLEY:
|
||||||
DisplayName: 'Soul Sand Valley'
|
DisplayName: '&6Soul Sand Valley'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SOULSAND
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
STONE_SHORE:
|
STONE_SHORE:
|
||||||
DisplayName: 'Stone Shore'
|
DisplayName: '&6Stone Shore'
|
||||||
|
DisplayItem:
|
||||||
|
Material: CLAY
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SUNFLOWER_PLAINS:
|
SUNFLOWER_PLAINS:
|
||||||
DisplayName: 'Sunflower Plains'
|
DisplayName: '&6Sunflower Plains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SUNFLOWER
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SWAMP:
|
SWAMP:
|
||||||
DisplayName: 'Swamp'
|
DisplayName: '&6Swamp'
|
||||||
|
DisplayItem:
|
||||||
|
Material: LILYPAD
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
SWAMP_HILLS:
|
SWAMP_HILLS:
|
||||||
DisplayName: 'Swamp Hills'
|
DisplayName: '&6Swamp Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SLIME_BLOCK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
TAIGA:
|
TAIGA:
|
||||||
DisplayName: 'Taiga'
|
DisplayName: '&6Taiga'
|
||||||
|
DisplayItem:
|
||||||
|
Material: SPRUCE_WOOD
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
TAIGA_HILLS:
|
TAIGA_HILLS:
|
||||||
DisplayName: 'Taiga Hills'
|
DisplayName: '&6Taiga Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
TAIGA_MOUNTAINS:
|
TAIGA_MOUNTAINS:
|
||||||
DisplayName: 'Taiga Mountains'
|
DisplayName: '&6Taiga Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
TALL_BIRCH_FOREST:
|
TALL_BIRCH_FOREST:
|
||||||
DisplayName: 'Tall Birch Forest'
|
DisplayName: '&6Tall Birch Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BIRCH_LOG
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
TALL_BIRCH_HILLS:
|
TALL_BIRCH_HILLS:
|
||||||
DisplayName: 'Tall Birch Hills'
|
DisplayName: '&6Tall Birch Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BIRCH_PLANKS
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
THE_END:
|
THE_END:
|
||||||
DisplayName: 'The End'
|
DisplayName: '&6The End'
|
||||||
|
DisplayItem:
|
||||||
|
Material: CHORUS_FRUIT
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: true
|
|
||||||
THE_VOID:
|
THE_VOID:
|
||||||
DisplayName: 'The Void'
|
DisplayName: '&6The Void'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BEDROCK
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
WARM_OCEAN:
|
WARM_OCEAN:
|
||||||
DisplayName: 'Warm Ocean'
|
DisplayName: '&6Warm Ocean'
|
||||||
|
DisplayItem:
|
||||||
|
Material: BRAIN_CORAL
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: true
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
WARPED_FOREST:
|
WARPED_FOREST:
|
||||||
DisplayName: 'Warped Forest'
|
DisplayName: '&6Warped Forest'
|
||||||
|
DisplayItem:
|
||||||
|
Material: WARPED_STEM
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: false
|
Normal: false
|
||||||
Nether: true
|
|
||||||
End: false
|
|
||||||
WOODED_BADLANDS_PLATEAU:
|
WOODED_BADLANDS_PLATEAU:
|
||||||
DisplayName: 'Wooded Badlands Plateau'
|
DisplayName: '&6Wooded Badlands Plateau'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
WOODED_HILLS:
|
WOODED_HILLS:
|
||||||
DisplayName: 'Wooded Hills'
|
DisplayName: '&6Wooded Hills'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
||||||
WOODED_MOUNTAINS:
|
WOODED_MOUNTAINS:
|
||||||
DisplayName: 'Wooded Mountains'
|
DisplayName: '&6Wooded Mountains'
|
||||||
|
DisplayItem:
|
||||||
|
Material: STONE
|
||||||
|
Data: 0
|
||||||
Permission: true
|
Permission: true
|
||||||
Normal: true
|
Normal: false
|
||||||
Nether: false
|
|
||||||
End: false
|
|
|
@ -182,10 +182,6 @@ Island:
|
||||||
Type: Plains
|
Type: Plains
|
||||||
Cooldown:
|
Cooldown:
|
||||||
Time: 900
|
Time: 900
|
||||||
# If the Nether/End biomes should be allowed in the overworld
|
|
||||||
AllowOtherWorldlyBiomes:
|
|
||||||
Nether: true
|
|
||||||
End: true
|
|
||||||
Weather:
|
Weather:
|
||||||
Default:
|
Default:
|
||||||
# The weather and time will operate the same weather and time as the world.
|
# The weather and time will operate the same weather and time as the world.
|
||||||
|
@ -355,6 +351,7 @@ Island:
|
||||||
BlazeImmuneToWaterInNether: false
|
BlazeImmuneToWaterInNether: false
|
||||||
Restrict:
|
Restrict:
|
||||||
# Blocks that can be placed only if the island has nether unlocked
|
# Blocks that can be placed only if the island has nether unlocked
|
||||||
|
# You may add/remove as many as you want
|
||||||
NetherBlocks:
|
NetherBlocks:
|
||||||
NETHERRACK: true
|
NETHERRACK: true
|
||||||
SOUL_SAND: true
|
SOUL_SAND: true
|
||||||
|
@ -377,7 +374,63 @@ Island:
|
||||||
NETHER_WART_BLOCK: true
|
NETHER_WART_BLOCK: true
|
||||||
WITHER_SKELETON_SKULL: true
|
WITHER_SKELETON_SKULL: true
|
||||||
WITHER_ROSE: 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
|
# Blocks that can be placed only if the island has The End unlocked
|
||||||
|
# You may add/remove as many as you want
|
||||||
EndBlocks:
|
EndBlocks:
|
||||||
END_STONE: true
|
END_STONE: true
|
||||||
END_STONE_BRICKS: true
|
END_STONE_BRICKS: true
|
||||||
|
|
|
@ -2574,8 +2574,6 @@ Menu:
|
||||||
Item:
|
Item:
|
||||||
Exit:
|
Exit:
|
||||||
Displayname: '&cExit Biome Selection'
|
Displayname: '&cExit Biome Selection'
|
||||||
Barrier:
|
|
||||||
Displayname: '&cSelect a Biome'
|
|
||||||
Info:
|
Info:
|
||||||
Displayname: '&bCurrent Biome'
|
Displayname: '&bCurrent Biome'
|
||||||
Lore:
|
Lore:
|
||||||
|
@ -2589,6 +2587,10 @@ Menu:
|
||||||
Lore:
|
Lore:
|
||||||
- '&7Click to Set!'
|
- '&7Click to Set!'
|
||||||
Displayname: '&aBiome: &e%biome_type'
|
Displayname: '&aBiome: &e%biome_type'
|
||||||
|
Next:
|
||||||
|
Displayname: '&aNext Page >'
|
||||||
|
Previous:
|
||||||
|
Displayname: '&a< Previous Page'
|
||||||
Title: '&8Select a Biome'
|
Title: '&8Select a Biome'
|
||||||
Information:
|
Information:
|
||||||
Categories:
|
Categories:
|
||||||
|
|
|
@ -3,3 +3,4 @@ Stackables:
|
||||||
- IRON_BLOCK
|
- IRON_BLOCK
|
||||||
- GOLD_BLOCK
|
- GOLD_BLOCK
|
||||||
- EMERALD_BLOCK
|
- EMERALD_BLOCK
|
||||||
|
- NETHERITE_BLOCK
|
||||||
|
|
Loading…
Reference in New Issue
Block a user