mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-08-17 17:15:47 +00:00
nether/end support incoming
This commit is contained in:
parent
2d3fa2691e
commit
75b4e5d32e
10
pom.xml
10
pom.xml
@ -38,20 +38,20 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.14-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--Bukkit API-->
|
||||
<dependency>
|
||||
<!--dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.14-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependency-->
|
||||
<dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) -->
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.15.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -6,10 +6,7 @@ import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||
import me.SuperRonanCraft.BetterRTP.Main;
|
||||
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
|
||||
import me.SuperRonanCraft.BetterRTP.references.worlds.Custom;
|
||||
import me.SuperRonanCraft.BetterRTP.references.worlds.Default;
|
||||
import me.SuperRonanCraft.BetterRTP.references.worlds.PlayerWorld;
|
||||
import me.SuperRonanCraft.BetterRTP.references.worlds.RTPWorld;
|
||||
import me.SuperRonanCraft.BetterRTP.references.worlds.*;
|
||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.block.Biome;
|
||||
@ -33,6 +30,7 @@ public class RTP {
|
||||
private List<String> disabledWorlds, blockList;
|
||||
private int maxAttempts, delayTime;
|
||||
private boolean cancelOnMove;
|
||||
private HashMap<String, RTP_WORLD_TYPE> world_type = new HashMap<>();
|
||||
|
||||
public RTP(Main pl) {
|
||||
this.pl = pl;
|
||||
@ -60,6 +58,14 @@ public class RTP {
|
||||
for (Map<?, ?> m : map)
|
||||
for (Map.Entry<?, ?> entry : m.entrySet())
|
||||
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() {
|
||||
|
@ -9,7 +9,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class Custom implements RTPWorld {
|
||||
public String world;
|
||||
public String world, world_type;
|
||||
private boolean useWorldborder = false;
|
||||
private int CenterX, CenterZ, maxBorderRad, minBorderRad, price;
|
||||
private List<String> Biomes;
|
||||
|
@ -5,6 +5,7 @@ import me.SuperRonanCraft.BetterRTP.Main;
|
||||
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
|
||||
import org.bukkit.Bukkit;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public class Default implements RTPWorld {
|
||||
|
@ -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
|
||||
}
|
@ -24,6 +24,10 @@ Settings:
|
||||
CancelOnMove: true
|
||||
DisableUpdater: false
|
||||
|
||||
WorldType: # Available types are NETHER, NORMAL
|
||||
- world: NORMAL
|
||||
- world_nether: NETHER
|
||||
|
||||
Default:
|
||||
UseWorldBorder: true
|
||||
## "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:
|
||||
#FORMAT <CURRENT>:<OTHER>
|
||||
world_nether: 'world'
|
||||
creative: 'world'
|
||||
- world_nether: 'world'
|
||||
- creative: 'world'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user