nether/end support incoming

This commit is contained in:
SuperRonanCraft 2020-07-22 13:12:46 -04:00
parent 2d3fa2691e
commit 75b4e5d32e
6 changed files with 30 additions and 12 deletions

10
pom.xml
View File

@ -38,20 +38,20 @@
<dependency> <dependency>
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId> <artifactId>spigot-api</artifactId>
<version>1.14-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!--Bukkit API--> <!--Bukkit API-->
<dependency> <!--dependency>
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.14-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency-->
<dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) --> <dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) -->
<groupId>org.spigotmc</groupId> <groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId> <artifactId>spigot</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version> <version>1.16.1-R0.1-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -6,10 +6,7 @@ import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.managers.RegionManager;
import me.SuperRonanCraft.BetterRTP.Main; import me.SuperRonanCraft.BetterRTP.Main;
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics; import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
import me.SuperRonanCraft.BetterRTP.references.worlds.Custom; import me.SuperRonanCraft.BetterRTP.references.worlds.*;
import me.SuperRonanCraft.BetterRTP.references.worlds.Default;
import me.SuperRonanCraft.BetterRTP.references.worlds.PlayerWorld;
import me.SuperRonanCraft.BetterRTP.references.worlds.RTPWorld;
import me.ryanhamshire.GriefPrevention.GriefPrevention; import me.ryanhamshire.GriefPrevention.GriefPrevention;
import org.bukkit.*; import org.bukkit.*;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
@ -33,6 +30,7 @@ public class RTP {
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 RTP(Main pl) { public RTP(Main pl) {
this.pl = pl; this.pl = pl;
@ -60,6 +58,14 @@ public class RTP {
for (Map<?, ?> m : map) for (Map<?, ?> m : map)
for (Map.Entry<?, ?> entry : m.entrySet()) for (Map.Entry<?, ?> entry : m.entrySet())
customWorlds.put(entry.getKey().toString(), new Custom(entry.getKey().toString())); customWorlds.put(entry.getKey().toString(), new Custom(entry.getKey().toString()));
try {
List<Map<?, ?>> world_map = config.getMapList("WorldType");
for (Map<?, ?> m : world_map)
for (Map.Entry<?, ?> entry : m.entrySet())
world_type.put(entry.getKey().toString(), RTP_WORLD_TYPE.valueOf(entry.getKey().toString()));
} catch (Exception e) {
//No World Types
}
} }
public List<String> disabledWorlds() { public List<String> disabledWorlds() {

View File

@ -9,7 +9,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class Custom implements RTPWorld { public class Custom implements RTPWorld {
public String world; public String world, world_type;
private boolean useWorldborder = false; private boolean useWorldborder = false;
private int CenterX, CenterZ, maxBorderRad, minBorderRad, price; private int CenterX, CenterZ, maxBorderRad, minBorderRad, price;
private List<String> Biomes; private List<String> Biomes;

View File

@ -5,6 +5,7 @@ import me.SuperRonanCraft.BetterRTP.Main;
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics; import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import java.util.HashMap;
import java.util.List; import java.util.List;
public class Default implements RTPWorld { public class Default implements RTPWorld {

View File

@ -0,0 +1,7 @@
package me.SuperRonanCraft.BetterRTP.references.worlds;
public enum RTP_WORLD_TYPE {
NORMAL, //Default
NETHER, //Nether world has different conditions
//END //End world type, not supported yet
}

View File

@ -24,6 +24,10 @@ Settings:
CancelOnMove: true CancelOnMove: true
DisableUpdater: false DisableUpdater: false
WorldType: # Available types are NETHER, NORMAL
- world: NORMAL
- world_nether: NETHER
Default: Default:
UseWorldBorder: true UseWorldBorder: true
## "Biomes: []" means all biomes are allowed! # ## "Biomes: []" means all biomes are allowed! #
@ -75,6 +79,6 @@ CustomWorlds:
## 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: Override:
#FORMAT <CURRENT>:<OTHER> #FORMAT <CURRENT>:<OTHER>
world_nether: 'world' - world_nether: 'world'
creative: 'world' - creative: 'world'