mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-08-17 17:15:47 +00:00
Full Cave support - 2.11.0
This commit is contained in:
parent
75b4e5d32e
commit
bf62655925
@ -25,12 +25,12 @@ public class RTP {
|
|||||||
//Cache
|
//Cache
|
||||||
public HashMap<String, RTPWorld> customWorlds = new HashMap<>();
|
public HashMap<String, RTPWorld> customWorlds = new HashMap<>();
|
||||||
public HashMap<String, String> overriden = new HashMap<>();
|
public HashMap<String, String> overriden = new HashMap<>();
|
||||||
public me.SuperRonanCraft.BetterRTP.references.worlds.Default Default = new Default();
|
public Default Default = new Default();
|
||||||
private Random rn = new Random();
|
private Random rn = new Random();
|
||||||
private List<String> disabledWorlds, blockList;
|
private List<String> disabledWorlds, blockList;
|
||||||
private int maxAttempts, delayTime;
|
private int maxAttempts, delayTime;
|
||||||
private boolean cancelOnMove;
|
private boolean cancelOnMove;
|
||||||
private HashMap<String, RTP_WORLD_TYPE> world_type = new HashMap<>();
|
public HashMap<String, RTP_WORLD_TYPE> world_type = new HashMap<>();
|
||||||
|
|
||||||
public RTP(Main pl) {
|
public RTP(Main pl) {
|
||||||
this.pl = pl;
|
this.pl = pl;
|
||||||
@ -44,26 +44,66 @@ public class RTP {
|
|||||||
delayTime = config.getInt("Settings.Delay.Time");
|
delayTime = config.getInt("Settings.Delay.Time");
|
||||||
cancelOnMove = config.getBoolean("Settings.Delay.CancelOnMove");
|
cancelOnMove = config.getBoolean("Settings.Delay.CancelOnMove");
|
||||||
blockList = config.getStringList("BlacklistedBlocks");
|
blockList = config.getStringList("BlacklistedBlocks");
|
||||||
|
//OVER-RIDES
|
||||||
try {
|
try {
|
||||||
for (String s : config.getConfigurationSection("Override").getKeys(false))
|
overriden.clear();
|
||||||
overriden.put(s, config.getString("Override." + s));
|
List<Map<?, ?>> override_map = config.getMapList("Overrides");
|
||||||
|
for (Map<?, ?> m : override_map)
|
||||||
|
for (Map.Entry<?, ?> entry : m.entrySet()) {
|
||||||
|
overriden.put(entry.getKey().toString(), entry.getValue().toString());
|
||||||
|
if (pl.getSettings().debug)
|
||||||
|
pl.getLogger().info("- Override '" + entry.getKey() + "' -> '" + entry.getValue() + "' added");
|
||||||
|
}
|
||||||
|
//for (String s : config.getConfigurationSection("Override").getKeys(false))
|
||||||
|
// overriden.put(s, config.getString("Override." + s));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//No Overrides
|
//No Overrides
|
||||||
}
|
}
|
||||||
customWorlds.clear();
|
|
||||||
|
|
||||||
List<Map<?, ?>> map = config.getMapList("CustomWorlds");
|
//CUSTOM WORLDS
|
||||||
|
|
||||||
//Find Custom World and cache values
|
|
||||||
for (Map<?, ?> m : map)
|
|
||||||
for (Map.Entry<?, ?> entry : m.entrySet())
|
|
||||||
customWorlds.put(entry.getKey().toString(), new Custom(entry.getKey().toString()));
|
|
||||||
try {
|
try {
|
||||||
|
customWorlds.clear();
|
||||||
|
List<Map<?, ?>> map = config.getMapList("CustomWorlds");
|
||||||
|
for (Map<?, ?> m : map)
|
||||||
|
for (Map.Entry<?, ?> entry : m.entrySet()) {
|
||||||
|
customWorlds.put(entry.getKey().toString(), new Custom(entry.getKey().toString()));
|
||||||
|
if (pl.getSettings().debug)
|
||||||
|
pl.getLogger().info("- Custom World '" + entry.getKey() + "' registered");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
//No Custom Worlds
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
world_type.clear();
|
||||||
|
for (World world : Bukkit.getWorlds())
|
||||||
|
world_type.put(world.getName(), RTP_WORLD_TYPE.NORMAL);
|
||||||
List<Map<?, ?>> world_map = config.getMapList("WorldType");
|
List<Map<?, ?>> world_map = config.getMapList("WorldType");
|
||||||
for (Map<?, ?> m : world_map)
|
for (Map<?, ?> m : world_map)
|
||||||
for (Map.Entry<?, ?> entry : m.entrySet())
|
for (Map.Entry<?, ?> entry : m.entrySet()) {
|
||||||
world_type.put(entry.getKey().toString(), RTP_WORLD_TYPE.valueOf(entry.getKey().toString()));
|
if (world_type.containsKey(entry.getKey())) {
|
||||||
|
try {
|
||||||
|
RTP_WORLD_TYPE type = RTP_WORLD_TYPE.valueOf(entry.getValue().toString().toUpperCase());
|
||||||
|
world_type.put(entry.getKey().toString(), type);
|
||||||
|
} catch(IllegalArgumentException e) {
|
||||||
|
StringBuilder valids = new StringBuilder();
|
||||||
|
for (RTP_WORLD_TYPE type : RTP_WORLD_TYPE.values())
|
||||||
|
valids.append(type.name()).append(", ");
|
||||||
|
valids.replace(valids.length() - 2, valids.length(), "");
|
||||||
|
pl.getLogger().severe("World Type for '" + entry.getKey() + "' is INVALID '" + entry.getValue() +
|
||||||
|
"'. Valid ID's are: " + valids.toString());
|
||||||
|
//Wrong rtp world type
|
||||||
|
}
|
||||||
|
}/* else {
|
||||||
|
if (pl.getSettings().debug)
|
||||||
|
pl.getLogger().info("- World Type failed for '" + entry.getKey() + "' is it loaded?");
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
if (pl.getSettings().debug)
|
||||||
|
for (String world : world_type.keySet())
|
||||||
|
pl.getLogger().info("- World Type for '" + world + "' set to '" + world_type.get(world) + "'");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
//No World Types
|
//No World Types
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,7 +224,7 @@ public class RTP {
|
|||||||
p.playSound(p.getLocation(), sound, 1F, 1F);
|
p.playSound(p.getLocation(), sound, 1F, 1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compressed code for MaxAttempts being meet
|
// Compressed code for MaxAttempts being met
|
||||||
private void metMax(CommandSender sendi, Player p, int price) {
|
private void metMax(CommandSender sendi, Player p, int price) {
|
||||||
if (p == sendi)
|
if (p == sendi)
|
||||||
pl.getText().getFailedNotSafe(sendi, maxAttempts);
|
pl.getText().getFailedNotSafe(sendi, maxAttempts);
|
||||||
@ -194,12 +234,13 @@ public class RTP {
|
|||||||
pl.getEco().unCharge(p, price);
|
pl.getEco().unCharge(p, price);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Get a random location depending the world type
|
||||||
private Location randomLoc(PlayerWorld pWorld) {
|
private Location randomLoc(PlayerWorld pWorld) {
|
||||||
int borderRad = pWorld.getMaxRad();
|
int borderRad = pWorld.getMaxRad();
|
||||||
int minVal = pWorld.getMinRad();
|
int minVal = pWorld.getMinRad();
|
||||||
int CenterX = pWorld.getCenterX();
|
int CenterX = pWorld.getCenterX();
|
||||||
int CenterZ = pWorld.getCenterZ();
|
int CenterZ = pWorld.getCenterZ();
|
||||||
int posOrNeg = rn.nextInt(4);
|
int quadrant = rn.nextInt(4);
|
||||||
Player p = pWorld.getPlayer();
|
Player p = pWorld.getPlayer();
|
||||||
World world = Bukkit.getWorld(pWorld.getWorld());
|
World world = Bukkit.getWorld(pWorld.getWorld());
|
||||||
if (pWorld.getUseWorldborder()) {
|
if (pWorld.getUseWorldborder()) {
|
||||||
@ -209,10 +250,10 @@ public class RTP {
|
|||||||
CenterZ = border.getCenter().getBlockZ();
|
CenterZ = border.getCenter().getBlockZ();
|
||||||
}
|
}
|
||||||
float yaw = p.getLocation().getYaw(), pitch = p.getLocation().getPitch();
|
float yaw = p.getLocation().getYaw(), pitch = p.getLocation().getPitch();
|
||||||
boolean normal;
|
RTP_WORLD_TYPE world_type = RTP_WORLD_TYPE.NORMAL; //World rtp type
|
||||||
try {
|
/*try {
|
||||||
//1.13+
|
//1.13+
|
||||||
normal = !world.getBiome(0, 0).equals(Biome.valueOf("NETHER"));
|
normal = !world.getBiome(0, 0).equals(Biome.valueOf("NETHER")));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//1.8-1.12
|
//1.8-1.12
|
||||||
try {
|
try {
|
||||||
@ -220,28 +261,33 @@ public class RTP {
|
|||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
normal = true;
|
normal = true;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
if (this.world_type.containsKey(world.getName()))
|
||||||
|
world_type = this.world_type.get(world.getName());
|
||||||
for (int i = 0; i <= maxAttempts; i++) {
|
for (int i = 0; i <= maxAttempts; i++) {
|
||||||
// Get the y-coords from up top, then check if it's SAFE!
|
// Get the y-coords from up top, then check if it's SAFE!
|
||||||
Location loc;
|
Location loc = null;
|
||||||
if (borderRad <= minVal) {
|
if (borderRad <= minVal) {
|
||||||
minVal = Default.getMinRad();
|
minVal = Default.getMinRad();
|
||||||
if (borderRad <= minVal)
|
if (borderRad <= minVal)
|
||||||
minVal = 0;
|
minVal = 0;
|
||||||
}
|
}
|
||||||
if (normal)
|
switch (world_type) {
|
||||||
loc = normal(borderRad, minVal, CenterX, CenterZ, posOrNeg, world, pWorld, yaw, pitch);
|
case NETHER:
|
||||||
else
|
loc = nether(borderRad, minVal, CenterX, CenterZ, quadrant, world, pWorld, yaw, pitch); break;
|
||||||
loc = nether(borderRad, minVal, CenterX, CenterZ, posOrNeg, world, pWorld, yaw, pitch);
|
default:
|
||||||
|
loc = normal(borderRad, minVal, CenterX, CenterZ, quadrant, world, pWorld, yaw, pitch);
|
||||||
|
}
|
||||||
pWorld.addAttempt();
|
pWorld.addAttempt();
|
||||||
if (loc != null && checkDepends(loc))
|
if (loc != null && checkDepends(loc))
|
||||||
return loc;
|
return loc;
|
||||||
posOrNeg = rn.nextInt(4);
|
quadrant = rn.nextInt(4);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location normal(int borderRad, int minVal, int CenterX, int CenterZ, int posOrNeg, World world,
|
//NORMAL
|
||||||
|
private Location normal(int borderRad, int minVal, int CenterX, int CenterZ, int quadrant, World world,
|
||||||
PlayerWorld pWorld, Float yaw, Float pitch) {
|
PlayerWorld pWorld, Float yaw, Float pitch) {
|
||||||
int x, x2, z, z2;
|
int x, x2, z, z2;
|
||||||
Location loc;
|
Location loc;
|
||||||
@ -253,18 +299,16 @@ public class RTP {
|
|||||||
// up for choosing up next
|
// up for choosing up next
|
||||||
x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
||||||
x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
||||||
if (posOrNeg == 0)
|
switch (quadrant) {
|
||||||
// Positive X and Z
|
case 0: // Positive X and Z
|
||||||
loc = getLocAtNormal(x, z, world, yaw, pitch, pWorld);
|
loc = getLocAtNormal(x, z, world, yaw, pitch, pWorld); break;
|
||||||
else if (posOrNeg == 1)
|
case 1: // Negative X and Z
|
||||||
// Negative X and Z
|
loc = getLocAtNormal(x2, z2, world, yaw, pitch, pWorld); break;
|
||||||
loc = getLocAtNormal(x2, z2, world, yaw, pitch, pWorld);
|
case 2: // Negative X and Positive Z
|
||||||
else if (posOrNeg == 2)
|
loc = getLocAtNormal(x2, z, world, yaw, pitch, pWorld); break;
|
||||||
// Negative X and Positive Z
|
default: // Positive X and Negative Z
|
||||||
loc = getLocAtNormal(x2, z, world, yaw, pitch, pWorld);
|
loc = getLocAtNormal(x, z2, world, yaw, pitch, pWorld);
|
||||||
else
|
}
|
||||||
// Positive X and Negative Z
|
|
||||||
loc = getLocAtNormal(x, z2, world, yaw, pitch, pWorld);
|
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,12 +321,13 @@ public class RTP {
|
|||||||
b = world.getBlockAt(x, y - 1, z);
|
b = world.getBlockAt(x, y - 1, z);
|
||||||
}
|
}
|
||||||
//System.out.println(b.getType().isSolid() + " " + b.getType().name());
|
//System.out.println(b.getType().isSolid() + " " + b.getType().name());
|
||||||
if (!badBlock(b.getType().name(), x, z, pWorld.getWorld(), pWorld.getBiomes()))
|
if (b.getY() > 0 && !badBlock(b.getType().name(), x, z, pWorld.getWorld(), pWorld.getBiomes()))
|
||||||
return new Location(world, (x + 0.5), b.getY() + 1, (z + 0.5), yaw, pitch);
|
return new Location(world, (x + 0.5), b.getY() + 1, (z + 0.5), yaw, pitch);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location nether(int borderRad, int minVal, int CenterX, int CenterZ, int posOrNeg, World world,
|
//NETHER
|
||||||
|
private Location nether(int borderRad, int minVal, int CenterX, int CenterZ, int quadrant, World world,
|
||||||
PlayerWorld pWorld, Float yaw, Float pitch) {
|
PlayerWorld pWorld, Float yaw, Float pitch) {
|
||||||
int x, x2, z, z2;
|
int x, x2, z, z2;
|
||||||
Location loc;
|
Location loc;
|
||||||
@ -294,28 +339,33 @@ public class RTP {
|
|||||||
// up for choosing up next
|
// up for choosing up next
|
||||||
x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
||||||
x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
||||||
if (posOrNeg == 0)
|
switch (quadrant) {
|
||||||
// Positive X and Z
|
case 0: // Positive X and Z
|
||||||
loc = getLocAtNether(x, z, world, yaw, pitch, pWorld);
|
loc = getLocAtNether(x, z, world, yaw, pitch, pWorld); break;
|
||||||
else if (posOrNeg == 1)
|
case 1: // Negative X and Z
|
||||||
// Negative X and Z
|
loc = getLocAtNether(x2, z2, world, yaw, pitch, pWorld); break;
|
||||||
loc = getLocAtNether(x2, z2, world, yaw, pitch, pWorld);
|
case 2: // Negative X and Positive Z
|
||||||
else if (posOrNeg == 2)
|
loc = getLocAtNether(x2, z, world, yaw, pitch, pWorld); break;
|
||||||
// Negative X and Positive Z
|
default: // Positive X and Negative Z
|
||||||
loc = getLocAtNether(x2, z, world, yaw, pitch, pWorld);
|
loc = getLocAtNether(x, z2, world, yaw, pitch, pWorld);
|
||||||
else
|
}
|
||||||
// Positive X and Negative Z
|
|
||||||
loc = getLocAtNether(x, z2, world, yaw, pitch, pWorld);
|
|
||||||
return loc;
|
return loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location getLocAtNether(int x, int z, World world, Float yaw, Float pitch, PlayerWorld pWorld) {
|
private Location getLocAtNether(int x, int z, World world, Float yaw, Float pitch, PlayerWorld pWorld) {
|
||||||
for (int y = 0; y < world.getMaxHeight(); y++)
|
for (int y = 0; y < world.getMaxHeight(); y++) {
|
||||||
if (world.getBlockAt(x, y, z).getType().equals(Material.AIR)) {
|
Block b = world.getBlockAt(x, y, z);
|
||||||
|
if (b.getType().equals(Material.AIR) || !b.getType().isSolid()) {
|
||||||
String block = world.getBlockAt(x, y - 1, z).getType().name();
|
String block = world.getBlockAt(x, y - 1, z).getType().name();
|
||||||
|
if (!b.getType().isSolid()) { //Block is not a solid (ex: lava, water...)
|
||||||
|
String block_in = b.getType().name();
|
||||||
|
if (badBlock(block_in, x, z, pWorld.getWorld(), pWorld.getBiomes()))
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!badBlock(block, x, z, pWorld.getWorld(), pWorld.getBiomes()))
|
if (!badBlock(block, x, z, pWorld.getWorld(), pWorld.getBiomes()))
|
||||||
return new Location(world, (x + 0.5), y, (z + 0.5), yaw, pitch);
|
return new Location(world, (x + 0.5), y, (z + 0.5), yaw, pitch);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,8 @@ public class CmdHelp implements RTPCommand {
|
|||||||
pl.getText().getHelpWorld(sendi, label);
|
pl.getText().getHelpWorld(sendi, label);
|
||||||
if (pl.getPerms().getReload(sendi))
|
if (pl.getPerms().getReload(sendi))
|
||||||
pl.getText().getHelpReload(sendi, label);
|
pl.getText().getHelpReload(sendi, label);
|
||||||
|
//if (pl.getPerms().getInfo(sendi))
|
||||||
|
// pl.getText().getHelpInfo(sendi);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> tabComplete(CommandSender sendi, String[] args) {
|
public List<String> tabComplete(CommandSender sendi, String[] args) {
|
||||||
|
@ -3,6 +3,7 @@ package me.SuperRonanCraft.BetterRTP.player.commands.types;
|
|||||||
import me.SuperRonanCraft.BetterRTP.Main;
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand;
|
import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand;
|
||||||
import me.SuperRonanCraft.BetterRTP.references.worlds.RTPWorld;
|
import me.SuperRonanCraft.BetterRTP.references.worlds.RTPWorld;
|
||||||
|
import me.SuperRonanCraft.BetterRTP.references.worlds.RTP_WORLD_TYPE;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldBorder;
|
import org.bukkit.WorldBorder;
|
||||||
@ -15,25 +16,27 @@ public class CmdInfo implements RTPCommand {
|
|||||||
|
|
||||||
public void execute(CommandSender sendi, String label, String[] args) {
|
public void execute(CommandSender sendi, String label, String[] args) {
|
||||||
List<String> info = new ArrayList<>();
|
List<String> info = new ArrayList<>();
|
||||||
info.add("&6BetterRTP Info");
|
info.add("&e&m-----&6 BetterRTP Info &e&m-----");
|
||||||
|
Main pl = Main.getInstance();
|
||||||
for (World w : Bukkit.getWorlds()) {
|
for (World w : Bukkit.getWorlds()) {
|
||||||
info.add("&aWorld: &7" + w.getName());
|
info.add("&aWorld: &7" + w.getName());
|
||||||
if (Main.getInstance().getRTP().getDisabledWorlds().contains(w.getName())) //DISABLED
|
if (pl.getRTP().getDisabledWorlds().contains(w.getName())) //DISABLED
|
||||||
info.add("&7- &6Disabled: &bTrue");
|
info.add("&7- &6Disabled: &bTrue");
|
||||||
else {
|
else {
|
||||||
info.add("&7- &6Disabled: &cFalse");
|
info.add("&7- &6Disabled: &cFalse");
|
||||||
if (Main.getInstance().getRTP().overriden.containsKey(w.getName()))
|
if (pl.getRTP().overriden.containsKey(w.getName()))
|
||||||
info.add("&7- &6Overriden: &bTrue");
|
info.add("&7- &6Overriden: &bTrue");
|
||||||
else {
|
else {
|
||||||
|
info.add("&7- &7WorldType: " + pl.getRTP().world_type.getOrDefault(w.getName(), RTP_WORLD_TYPE.NORMAL).name());
|
||||||
info.add("&7- &6Overriden: &cFalse");
|
info.add("&7- &6Overriden: &cFalse");
|
||||||
RTPWorld _rtpworld = Main.getInstance().getRTP().Default;
|
RTPWorld _rtpworld = pl.getRTP().Default;
|
||||||
for (RTPWorld __rtpworld : Main.getInstance().getRTP().customWorlds.values()) {
|
for (RTPWorld __rtpworld : pl.getRTP().customWorlds.values()) {
|
||||||
if (__rtpworld.getWorld().equals(w.getName())) {
|
if (__rtpworld.getWorld().equals(w.getName())) {
|
||||||
_rtpworld = __rtpworld;
|
_rtpworld = __rtpworld;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_rtpworld == Main.getInstance().getRTP().Default)
|
if (_rtpworld == pl.getRTP().Default)
|
||||||
info.add("&7- &6Custom: &cFalse");
|
info.add("&7- &6Custom: &cFalse");
|
||||||
else
|
else
|
||||||
info.add("&7- &6Custom: &bTrue");
|
info.add("&7- &6Custom: &bTrue");
|
||||||
@ -54,7 +57,7 @@ public class CmdInfo implements RTPCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
info.forEach(str ->
|
info.forEach(str ->
|
||||||
info.set(info.indexOf(str), Main.getInstance().getText().color(str)));
|
info.set(info.indexOf(str), pl.getText().color(str)));
|
||||||
sendi.sendMessage(info.toArray(new String[0]));
|
sendi.sendMessage(info.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
package me.SuperRonanCraft.BetterRTP.references.settings;
|
package me.SuperRonanCraft.BetterRTP.references.settings;
|
||||||
|
|
||||||
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
|
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
|
||||||
|
|
||||||
public class Settings {
|
public class Settings {
|
||||||
|
|
||||||
|
public boolean debug = false;
|
||||||
|
|
||||||
private SoftDepends depends = new SoftDepends();
|
private SoftDepends depends = new SoftDepends();
|
||||||
|
|
||||||
public void load() { //Load Settings
|
public void load() { //Load Settings
|
||||||
depends.load();
|
depends.load();
|
||||||
|
debug = Main.getInstance().getFiles().getType(FileBasics.FILETYPE.CONFIG).getBoolean("Settings.Debugger");
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoftDepends getsDepends() {
|
public SoftDepends getsDepends() {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package me.SuperRonanCraft.BetterRTP.references.worlds;
|
package me.SuperRonanCraft.BetterRTP.references.worlds;
|
||||||
|
|
||||||
public enum RTP_WORLD_TYPE {
|
public enum RTP_WORLD_TYPE {
|
||||||
NORMAL, //Default
|
NORMAL, //Normal world type finds the tallest safe block
|
||||||
NETHER, //Nether world has different conditions
|
NETHER //Nether world types finds the lowest safe block
|
||||||
//END //End world type, not supported yet
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
Language-File: 'en.yml'
|
Language-File: 'en.yml'
|
||||||
|
|
||||||
Settings:
|
Settings:
|
||||||
|
## Output to console some debugging info
|
||||||
|
Debugger: false
|
||||||
## Respect WorldGuard areas # IN-PROGRESS
|
## Respect WorldGuard areas # IN-PROGRESS
|
||||||
RespectWorldGuard: false
|
RespectWorldGuard: false
|
||||||
## Respect GriefPrevention areas # COMING SOON
|
## Respect GriefPrevention areas # COMING SOON
|
||||||
@ -24,9 +26,10 @@ Settings:
|
|||||||
CancelOnMove: true
|
CancelOnMove: true
|
||||||
DisableUpdater: false
|
DisableUpdater: false
|
||||||
|
|
||||||
WorldType: # Available types are NETHER, NORMAL
|
WorldType: # Available types are NORMAL, NETHER and END
|
||||||
- world: NORMAL
|
- world: NORMAL
|
||||||
- world_nether: NETHER
|
- world_nether: NETHER
|
||||||
|
- world_the_end: NORMAL
|
||||||
|
|
||||||
Default:
|
Default:
|
||||||
UseWorldBorder: true
|
UseWorldBorder: true
|
||||||
@ -44,7 +47,9 @@ BlacklistedBlocks:
|
|||||||
- stationary_water
|
- stationary_water
|
||||||
- stationary_lava
|
- stationary_lava
|
||||||
- water
|
- water
|
||||||
|
- flowing_water
|
||||||
- lava
|
- lava
|
||||||
|
- flowing_lava
|
||||||
- cactus
|
- cactus
|
||||||
- leaves
|
- leaves
|
||||||
- leaves_2
|
- leaves_2
|
||||||
@ -77,7 +82,7 @@ CustomWorlds:
|
|||||||
- 'forest'
|
- 'forest'
|
||||||
|
|
||||||
## Override a world and rtp a player executing the command in one world, to another
|
## Override a world and rtp a player executing the command in one world, to another
|
||||||
Override:
|
Overrides:
|
||||||
#FORMAT <CURRENT>:<OTHER>
|
#FORMAT <CURRENT>:<OTHER>
|
||||||
- world_nether: 'world'
|
- world_nether: 'world'
|
||||||
- creative: 'world'
|
- creative: 'world'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
main: me.SuperRonanCraft.BetterRTP.Main
|
main: me.SuperRonanCraft.BetterRTP.Main
|
||||||
version: 2.10.0
|
version: 2.11.0
|
||||||
name: BetterRTP
|
name: BetterRTP
|
||||||
author: SuperRonanCraft
|
author: SuperRonanCraft
|
||||||
softdepend: [Vault, WorldGuard, GriefPrevention, Factions]
|
softdepend: [Vault, WorldGuard, GriefPrevention, Factions]
|
||||||
api-version: 1.13
|
api-version: '1.13'
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
betterrtp:
|
betterrtp:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user