mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2025-08-17 00:55:45 +00:00
2.13.0 - Regions Plugin support (worldguard, griefprevention, towny, RedProtect)
This commit is contained in:
parent
211d3609d4
commit
14c276cefb
67
pom.xml
67
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>me.SuperRonanCraft</groupId>
|
<groupId>me.SuperRonanCraft</groupId>
|
||||||
<artifactId>BetterRTP</artifactId>
|
<artifactId>BetterRTP</artifactId>
|
||||||
<version>2.12.2</version>
|
<version>2.13.0</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
@ -56,21 +56,30 @@
|
|||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<!-- PaperMC Repo -->
|
||||||
|
<repository>
|
||||||
|
<id>papermc</id>
|
||||||
|
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||||
|
</repository>
|
||||||
|
<!-- Vault Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>vault-repo</id>
|
<id>vault-repo</id>
|
||||||
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
<url>http://nexus.hc.to/content/repositories/pub_releases</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<!-- Worldguard Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>sk89q-repo</id>
|
<id>sk89q-repo</id>
|
||||||
<url>http://maven.sk89q.com/repo/</url>
|
<url>https://maven.enginehub.org/repo/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<!-- Github based Repos -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>jitpack.io</id>
|
<id>jitpack.io</id>
|
||||||
<url>https://jitpack.io</url>
|
<url>https://jitpack.io</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<!-- ProjectRed Repo -->
|
||||||
<repository>
|
<repository>
|
||||||
<id>papermc</id>
|
<id>redprotect-repo</id>
|
||||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
<url>https://raw.githubusercontent.com/FabioZumbi12/RedProtect/mvn-repo/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -81,30 +90,20 @@
|
|||||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency> <!-- Spigot (this includes Spigot API, Bukkit API, Craftbukkit and NMS) -->
|
<!-- Spigot Stuff -->
|
||||||
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
<version>1.8.8-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Vault -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
<groupId>net.milkbowl.vault</groupId>
|
||||||
<artifactId>VaultAPI</artifactId>
|
<artifactId>VaultAPI</artifactId>
|
||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.sk89q</groupId>
|
|
||||||
<artifactId>worldguard</artifactId>
|
|
||||||
<version>6.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.TechFortress</groupId>
|
|
||||||
<artifactId>GriefPrevention</artifactId>
|
|
||||||
<version>16.7.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- Paper Library for Async Chunk/Teleport -->
|
<!-- Paper Library for Async Chunk/Teleport -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.papermc</groupId>
|
<groupId>io.papermc</groupId>
|
||||||
@ -118,5 +117,39 @@
|
|||||||
<artifactId>particle</artifactId>
|
<artifactId>particle</artifactId>
|
||||||
<version>1.5.1</version>
|
<version>1.5.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- Worldguard (https://dev.bukkit.org/projects/worldguard) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.sk89q.worldguard</groupId>
|
||||||
|
<artifactId>worldguard-bukkit</artifactId>
|
||||||
|
<version>7.0.3</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- GriefPrevention (https://www.spigotmc.org/resources/griefprevention.1884/) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.TechFortress</groupId>
|
||||||
|
<artifactId>GriefPrevention</artifactId>
|
||||||
|
<version>16.15.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- Towny (https://www.spigotmc.org/resources/towny.72694/) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.TownyAdvanced</groupId>
|
||||||
|
<artifactId>Towny</artifactId>
|
||||||
|
<version>0.96.1.11</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- RedProtect (https://www.spigotmc.org/resources/redprotect.15841/) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>br.net.fabiozumbi12.RedProtect</groupId>
|
||||||
|
<artifactId>RedProtect-Core</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>br.net.fabiozumbi12.RedProtect</groupId>
|
||||||
|
<artifactId>RedProtect-Spigot-1.13</artifactId>
|
||||||
|
<version>LATEST</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
@ -28,6 +28,7 @@ public class Commands {
|
|||||||
FileBasics.FILETYPE config = FileBasics.FILETYPE.CONFIG;
|
FileBasics.FILETYPE config = FileBasics.FILETYPE.CONFIG;
|
||||||
delayTimer = config.getInt("Settings.Delay.Time");
|
delayTimer = config.getInt("Settings.Delay.Time");
|
||||||
cooldowns.load();
|
cooldowns.load();
|
||||||
|
rtping.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void commandExecuted(CommandSender sendi, String label, String[] args) {
|
public void commandExecuted(CommandSender sendi, String label, String[] args) {
|
||||||
|
@ -88,7 +88,7 @@ public class CmdInfo implements RTPCommand {
|
|||||||
info.add("&7- &6Overriden: &cFalse");
|
info.add("&7- &6Overriden: &cFalse");
|
||||||
RTPWorld _rtpworld = pl.getRTP().defaultWorld;
|
RTPWorld _rtpworld = pl.getRTP().defaultWorld;
|
||||||
for (RTPWorld __rtpworld : pl.getRTP().customWorlds.values()) {
|
for (RTPWorld __rtpworld : pl.getRTP().customWorlds.values()) {
|
||||||
if (__rtpworld.getWorld().equals(w.getName())) {
|
if (__rtpworld.getWorld() != null && __rtpworld.getWorld().getName().equals(w.getName())) {
|
||||||
_rtpworld = __rtpworld;
|
_rtpworld = __rtpworld;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,15 @@ import org.bukkit.event.inventory.InventoryClickEvent;
|
|||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
import org.bukkit.event.server.PluginEnableEvent;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
public class Listener implements org.bukkit.event.Listener {
|
public class Listener implements org.bukkit.event.Listener {
|
||||||
private Join join = new Join();
|
private final Join join = new Join();
|
||||||
private Leave leave = new Leave();
|
private final Leave leave = new Leave();
|
||||||
private Interact interact = new Interact();
|
private final Interact interact = new Interact();
|
||||||
private Click click = new Click();
|
private final Click click = new Click();
|
||||||
|
//private final PluginEnable pEnable = new PluginEnable();
|
||||||
|
|
||||||
public void registerEvents(Main pl) {
|
public void registerEvents(Main pl) {
|
||||||
PluginManager pm = pl.getServer().getPluginManager();
|
PluginManager pm = pl.getServer().getPluginManager();
|
||||||
@ -53,4 +55,9 @@ public class Listener implements org.bukkit.event.Listener {
|
|||||||
private void click(InventoryClickEvent e) {
|
private void click(InventoryClickEvent e) {
|
||||||
click.click(e);
|
click.click(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*@EventHandler
|
||||||
|
private void enablePlugin(PluginEnableEvent e) {
|
||||||
|
pEnable.enabled(e);
|
||||||
|
}*/
|
||||||
}
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package me.SuperRonanCraft.BetterRTP.player.events;
|
||||||
|
|
||||||
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
|
import org.bukkit.event.server.PluginEnableEvent;
|
||||||
|
|
||||||
|
public class PluginEnable {
|
||||||
|
|
||||||
|
//In the case SoftDependencies plugins load after us!
|
||||||
|
void enabled(PluginEnableEvent e) {
|
||||||
|
String name = e.getPlugin().getName();
|
||||||
|
//System.out.println(name);
|
||||||
|
if (name.equalsIgnoreCase("WorldGuard"))
|
||||||
|
Main.getInstance().getSettings().getsDepends().registerWorldguard();
|
||||||
|
else if (name.equalsIgnoreCase("GriefPrevention"))
|
||||||
|
Main.getInstance().getSettings().getsDepends().registerGriefPrevention();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,14 +1,9 @@
|
|||||||
package me.SuperRonanCraft.BetterRTP.player.rtp;
|
package me.SuperRonanCraft.BetterRTP.player.rtp;
|
||||||
|
|
||||||
import com.sk89q.worldguard.bukkit.RegionContainer;
|
|
||||||
import com.sk89q.worldguard.bukkit.WGBukkit;
|
|
||||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
|
||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
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.*;
|
import me.SuperRonanCraft.BetterRTP.references.worlds.*;
|
||||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -20,18 +15,16 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class RTP {
|
public class RTP {
|
||||||
|
|
||||||
private final RTPTeleport teleport = new RTPTeleport();
|
private final RTPTeleport teleport = new RTPTeleport();
|
||||||
private final RTPSoftDepends softDepends = new RTPSoftDepends();
|
private final RTPPluginValidation softDepends = new RTPPluginValidation();
|
||||||
//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 Default defaultWorld = new Default();
|
public Default defaultWorld = new Default();
|
||||||
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, cancelOnDamage;
|
private boolean cancelOnMove, cancelOnDamage;
|
||||||
@ -125,7 +118,6 @@ public class RTP {
|
|||||||
return disabledWorlds;
|
return disabledWorlds;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
public List<String> getDisabledWorlds() {
|
public List<String> getDisabledWorlds() {
|
||||||
return disabledWorlds;
|
return disabledWorlds;
|
||||||
}
|
}
|
||||||
@ -180,24 +172,11 @@ public class RTP {
|
|||||||
findSafeLocation(sendi, pWorld);
|
findSafeLocation(sendi, pWorld);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void findSafeLocation(CommandSender sendi, PlayerWorld pWorld) {
|
|
||||||
// new BukkitRunnable(){
|
|
||||||
// @Override
|
|
||||||
// public void run() {
|
|
||||||
// f
|
|
||||||
// if (loc != null)
|
|
||||||
// teleport.sendPlayer(sendi, pWorld.getPlayer(), loc, pWorld.getPrice(), pWorld.getAttempts());
|
|
||||||
// else
|
|
||||||
// metMax(sendi, pWorld.getPlayer(), pWorld.getPrice());
|
|
||||||
// }
|
|
||||||
// }.runTaskAsynchronously(getPl());
|
|
||||||
// }
|
|
||||||
|
|
||||||
void findSafeLocation(CommandSender sendi, PlayerWorld pWorld) {
|
void findSafeLocation(CommandSender sendi, PlayerWorld pWorld) {
|
||||||
if (pWorld.getAttempts() >= maxAttempts) //Cancel out, too many tried
|
if (pWorld.getAttempts() >= maxAttempts) //Cancel out, too many tried
|
||||||
metMax(sendi, pWorld.getPlayer(), pWorld.getPrice());
|
metMax(sendi, pWorld.getPlayer(), pWorld.getPrice());
|
||||||
else { //Try again to find a safe location
|
else { //Try again to find a safe location
|
||||||
Location loc = pWorld.generateRandomXZ(defaultWorld, rn.nextInt(4)); //randomLoc(pWorld);
|
Location loc = pWorld.generateRandomXZ(defaultWorld); //randomLoc(pWorld);
|
||||||
CompletableFuture<Chunk> chunk = PaperLib.getChunkAtAsync(pWorld.getWorld(), loc.getBlockX(), loc.getBlockZ());
|
CompletableFuture<Chunk> chunk = PaperLib.getChunkAtAsync(pWorld.getWorld(), loc.getBlockX(), loc.getBlockZ());
|
||||||
chunk.thenAccept(result -> {
|
chunk.thenAccept(result -> {
|
||||||
Location tpLoc;
|
Location tpLoc;
|
||||||
@ -229,71 +208,6 @@ public class RTP {
|
|||||||
getPl().getCmd().rtping.put(p.getUniqueId(), false);
|
getPl().getCmd().rtping.put(p.getUniqueId(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get a random location depending the world type
|
|
||||||
// private Location randomLoc(PlayerWorld pWorld) {
|
|
||||||
// int borderRad = pWorld.getMaxRad();
|
|
||||||
// int minVal = pWorld.getMinRad();
|
|
||||||
// int CenterX = pWorld.getCenterX();
|
|
||||||
// int CenterZ = pWorld.getCenterZ();
|
|
||||||
// int quadrant = rn.nextInt(4);
|
|
||||||
// Player p = pWorld.getPlayer();
|
|
||||||
// World world = pWorld.getWorld();
|
|
||||||
// if (pWorld.getUseWorldborder()) {
|
|
||||||
// WorldBorder border = world.getWorldBorder();
|
|
||||||
// borderRad = (int) border.getSize() / 2;
|
|
||||||
// CenterX = border.getCenter().getBlockX();
|
|
||||||
// CenterZ = border.getCenter().getBlockZ();
|
|
||||||
// }
|
|
||||||
// float yaw = p.getLocation().getYaw(), pitch = p.getLocation().getPitch();
|
|
||||||
// RTP_WORLD_TYPE world_type = pWorld.getWorldtype();
|
|
||||||
// //for (int i = 0; i <= maxAttempts; i++) {
|
|
||||||
// // Get the y-coords from up top, then check if it's SAFE!
|
|
||||||
// Location loc = null;
|
|
||||||
// if (borderRad <= minVal) {
|
|
||||||
// minVal = defaultWorld.getMinRad();
|
|
||||||
// if (borderRad <= minVal)
|
|
||||||
// minVal = 0;
|
|
||||||
// }
|
|
||||||
// switch (world_type) {
|
|
||||||
// case NETHER:
|
|
||||||
// loc = nether(borderRad, minVal, CenterX, CenterZ, quadrant, world, pWorld, yaw, pitch); break;
|
|
||||||
// default:
|
|
||||||
// loc = normal(borderRad, minVal, CenterX, CenterZ, quadrant, world, pWorld, yaw, pitch);
|
|
||||||
// }
|
|
||||||
// pWorld.addAttempt();
|
|
||||||
// //if (loc != null && checkDepends(loc))
|
|
||||||
// return loc;
|
|
||||||
// // quadrant = rn.nextInt(4);
|
|
||||||
// //}
|
|
||||||
// //return null;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //NORMAL
|
|
||||||
// private Location normal(int borderRad, int minVal, int CenterX, int CenterZ, int quadrant, World world,
|
|
||||||
// PlayerWorld pWorld, Float yaw, Float pitch) {
|
|
||||||
// int x, x2, z, z2;
|
|
||||||
// Location loc;
|
|
||||||
// // Will Check is CenterZ is negative or positive, then set 2 x's
|
|
||||||
// // up for choosing up next
|
|
||||||
// z = rn.nextInt(borderRad - minVal) + CenterZ + minVal;
|
|
||||||
// z2 = -(rn.nextInt(borderRad - minVal) - CenterZ - minVal);
|
|
||||||
// // Will Check is CenterZ is negative or positive, then set 2 z's
|
|
||||||
// // up for choosing up next
|
|
||||||
// x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
|
||||||
// x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
|
||||||
// switch (quadrant) {
|
|
||||||
// case 0: // Positive X and Z
|
|
||||||
// loc = getLocAtNormal(x, z, world, yaw, pitch, pWorld); break;
|
|
||||||
// case 1: // Negative X and Z
|
|
||||||
// loc = getLocAtNormal(x2, z2, world, yaw, pitch, pWorld); break;
|
|
||||||
// case 2: // Negative X and Positive Z
|
|
||||||
// loc = getLocAtNormal(x2, z, world, yaw, pitch, pWorld); break;
|
|
||||||
// default: // Positive X and Negative Z
|
|
||||||
// loc = getLocAtNormal(x, z2, world, yaw, pitch, pWorld);
|
|
||||||
// }
|
|
||||||
// return loc;
|
|
||||||
// }
|
|
||||||
|
|
||||||
private Location getLocAtNormal(int x, int z, World world, Float yaw, Float pitch, PlayerWorld pWorld) {
|
private Location getLocAtNormal(int x, int z, World world, Float yaw, Float pitch, PlayerWorld pWorld) {
|
||||||
Block b = world.getHighestBlockAt(x, z);
|
Block b = world.getHighestBlockAt(x, z);
|
||||||
if (b.getType().toString().endsWith("AIR")) //1.15.1 or less
|
if (b.getType().toString().endsWith("AIR")) //1.15.1 or less
|
||||||
@ -311,32 +225,6 @@ public class RTP {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// //NETHER
|
|
||||||
// private Location nether(int borderRad, int minVal, int CenterX, int CenterZ, int quadrant, World world,
|
|
||||||
// PlayerWorld pWorld, Float yaw, Float pitch) {
|
|
||||||
// int x, x2, z, z2;
|
|
||||||
// Location loc;
|
|
||||||
// // Will Check is CenterZ is negative or positive, then set 2 x's
|
|
||||||
// // up for choosing up next
|
|
||||||
// z = rn.nextInt((borderRad) - minVal) + CenterZ + minVal;
|
|
||||||
// z2 = -(rn.nextInt(borderRad - minVal) - CenterZ - minVal);
|
|
||||||
// // Will Check is CenterZ is negative or positive, then set 2 z's
|
|
||||||
// // up for choosing up next
|
|
||||||
// x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
|
||||||
// x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
|
||||||
// switch (quadrant) {
|
|
||||||
// case 0: // Positive X and Z
|
|
||||||
// loc = getLocAtNether(x, z, world, yaw, pitch, pWorld); break;
|
|
||||||
// case 1: // Negative X and Z
|
|
||||||
// loc = getLocAtNether(x2, z2, world, yaw, pitch, pWorld); break;
|
|
||||||
// case 2: // Negative X and Positive Z
|
|
||||||
// loc = getLocAtNether(x2, z, world, yaw, pitch, pWorld); break;
|
|
||||||
// default: // Positive X and Negative Z
|
|
||||||
// loc = getLocAtNether(x, z2, world, yaw, pitch, pWorld);
|
|
||||||
// }
|
|
||||||
// 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) {
|
||||||
//System.out.println("-----------");
|
//System.out.println("-----------");
|
||||||
for (int y = 1; y < world.getMaxHeight(); y++) {
|
for (int y = 1; y < world.getMaxHeight(); y++) {
|
||||||
|
@ -0,0 +1,88 @@
|
|||||||
|
package me.SuperRonanCraft.BetterRTP.player.rtp;
|
||||||
|
|
||||||
|
import br.net.fabiozumbi12.RedProtect.Bukkit.RedProtect;
|
||||||
|
import com.palmergames.bukkit.towny.TownyAPI;
|
||||||
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
|
import com.sk89q.worldguard.WorldGuard;
|
||||||
|
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||||
|
import com.sk89q.worldguard.protection.flags.Flags;
|
||||||
|
import com.sk89q.worldguard.protection.regions.RegionContainer;
|
||||||
|
import com.sk89q.worldguard.protection.regions.RegionQuery;
|
||||||
|
import me.SuperRonanCraft.BetterRTP.Main;
|
||||||
|
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
public class RTPPluginValidation { //Safe locations depending on enabled dependencies
|
||||||
|
|
||||||
|
boolean checkLocation(Location loc) {
|
||||||
|
boolean worldguard = getWorlguard(loc);
|
||||||
|
boolean griefPrevention = getGriefprevention(loc);
|
||||||
|
boolean towny = getTowny(loc);
|
||||||
|
boolean redProject = getRedProject(loc);
|
||||||
|
return worldguard && griefPrevention && towny && redProject;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TESTED on v2.12.3
|
||||||
|
// Worldguard v7.0.4 B1, WorldEdit v7.2.0 B5
|
||||||
|
// https://dev.bukkit.org/projects/worldguard
|
||||||
|
private boolean getWorlguard(Location loc) {
|
||||||
|
boolean result = true;
|
||||||
|
if (getPl().getSettings().getsDepends().isWorldguard())
|
||||||
|
try {
|
||||||
|
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
|
||||||
|
RegionQuery query = container.createQuery();
|
||||||
|
ApplicableRegionSet set = query.getApplicableRegions(BukkitAdapter.adapt(loc));
|
||||||
|
result = set.size() == 0;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TESTED on v2.12.3
|
||||||
|
// GriefPrevention v16.15.0
|
||||||
|
// https://www.spigotmc.org/resources/griefprevention.1884/
|
||||||
|
private boolean getGriefprevention(Location loc) {
|
||||||
|
boolean result = true;
|
||||||
|
if (getPl().getSettings().getsDepends().isGriefprevention())
|
||||||
|
try {
|
||||||
|
result = GriefPrevention.instance.dataStore.getClaimAt(loc, true, null) == null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// NOT TESTED
|
||||||
|
// Towny v0.96.1.11
|
||||||
|
// https://www.spigotmc.org/resources/towny.72694/
|
||||||
|
private boolean getTowny(Location loc) {
|
||||||
|
boolean result = true;
|
||||||
|
if (getPl().getSettings().getsDepends().isTowny())
|
||||||
|
try {
|
||||||
|
result = TownyAPI.getInstance().isWilderness(loc);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TESTED 2.12.3
|
||||||
|
// RedProtect v7.7.2
|
||||||
|
// https://www.spigotmc.org/resources/redprotect.15841/
|
||||||
|
private boolean getRedProject(Location loc) {
|
||||||
|
boolean result = true;
|
||||||
|
if (getPl().getSettings().getsDepends().isRedProtect())
|
||||||
|
try {
|
||||||
|
result = RedProtect.get().getAPI().getRegion(loc) == null;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Main getPl() {
|
||||||
|
return Main.getInstance();
|
||||||
|
}
|
||||||
|
}
|
@ -1,46 +0,0 @@
|
|||||||
package me.SuperRonanCraft.BetterRTP.player.rtp;
|
|
||||||
|
|
||||||
import com.sk89q.worldguard.bukkit.RegionContainer;
|
|
||||||
import com.sk89q.worldguard.bukkit.WGBukkit;
|
|
||||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
|
||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
|
||||||
import me.SuperRonanCraft.BetterRTP.Main;
|
|
||||||
import me.ryanhamshire.GriefPrevention.GriefPrevention;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
|
|
||||||
public class RTPSoftDepends { //Safe locations depending on enabled dependencies
|
|
||||||
|
|
||||||
boolean checkLocation(Location loc) {
|
|
||||||
boolean worldguard = getWorlguard(loc);
|
|
||||||
boolean griefPrevention = getGriefprevention(loc);
|
|
||||||
return worldguard && griefPrevention;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean getWorlguard(Location loc) {
|
|
||||||
if (getPl().getSettings().getsDepends().isWorldguard())
|
|
||||||
try {
|
|
||||||
WorldGuardPlugin plugin = WGBukkit.getPlugin();
|
|
||||||
RegionContainer container = plugin.getRegionContainer();
|
|
||||||
RegionManager regions = container.get(loc.getWorld());
|
|
||||||
// Check to make sure that "regions" is not null
|
|
||||||
return (regions != null ? regions.getApplicableRegions(loc).size() : 0) == 0;
|
|
||||||
} catch (NoClassDefFoundError e) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean getGriefprevention(Location loc) {
|
|
||||||
if (getPl().getSettings().getsDepends().isGriefprevention())
|
|
||||||
try {
|
|
||||||
return GriefPrevention.instance.dataStore.getClaimAt(loc, true, null) == null;
|
|
||||||
} catch (NoClassDefFoundError e) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Main getPl() {
|
|
||||||
return Main.getInstance();
|
|
||||||
}
|
|
||||||
}
|
|
@ -100,7 +100,7 @@ public class RTPTeleport {
|
|||||||
|
|
||||||
private List<CompletableFuture<Chunk>> getChunks(Location loc) { //List all chunks in range to load
|
private List<CompletableFuture<Chunk>> getChunks(Location loc) { //List all chunks in range to load
|
||||||
List<CompletableFuture<Chunk>> asyncChunks = new ArrayList<>();
|
List<CompletableFuture<Chunk>> asyncChunks = new ArrayList<>();
|
||||||
int range = Math.round(Math.min(Bukkit.getServer().getViewDistance() / 2, 5));
|
int range = Math.round(Math.max(0, Math.min(16, getPl().getSettings().preloadRadius)));
|
||||||
for (int x = -range; x <= range; x++) {
|
for (int x = -range; x <= range; x++) {
|
||||||
for (int z = -range; z <= range; z++) {
|
for (int z = -range; z <= range; z++) {
|
||||||
Location locLoad = new Location(loc.getWorld(), loc.getX() + (x * 16), loc.getY(), loc.getZ() + (z * 16));
|
Location locLoad = new Location(loc.getWorld(), loc.getX() + (x * 16), loc.getY(), loc.getZ() + (z * 16));
|
||||||
|
@ -9,16 +9,18 @@ public class Settings {
|
|||||||
public boolean delayEnabled;
|
public boolean delayEnabled;
|
||||||
public boolean rtpOnFirstJoin;
|
public boolean rtpOnFirstJoin;
|
||||||
public String rtpOnFirstJoinWorld;
|
public String rtpOnFirstJoinWorld;
|
||||||
|
public int preloadRadius; //Amount of chunks to load around a safe rtp location (clamped (0 - 16))
|
||||||
//Dependencies
|
//Dependencies
|
||||||
private SoftDepends depends = new SoftDepends();
|
private final SoftDepends depends = new SoftDepends();
|
||||||
|
|
||||||
public void load() { //Load Settings
|
public void load() { //Load Settings
|
||||||
depends.load();
|
|
||||||
FileBasics.FILETYPE config = getPl().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
FileBasics.FILETYPE config = getPl().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
||||||
debug = config.getBoolean("Settings.Debugger");
|
debug = config.getBoolean("Settings.Debugger");
|
||||||
delayEnabled = config.getBoolean("Settings.Delay.Enabled");
|
delayEnabled = config.getBoolean("Settings.Delay.Enabled");
|
||||||
rtpOnFirstJoin = config.getBoolean("Settings.RtpOnFirstJoin.Enabled");
|
rtpOnFirstJoin = config.getBoolean("Settings.RtpOnFirstJoin.Enabled");
|
||||||
rtpOnFirstJoinWorld = config.getString("Settings.RtpOnFirstJoin.World");
|
rtpOnFirstJoinWorld = config.getString("Settings.RtpOnFirstJoin.World");
|
||||||
|
preloadRadius = config.getInt("Settings.PreloadRadius");
|
||||||
|
depends.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoftDepends getsDepends() {
|
public SoftDepends getsDepends() {
|
||||||
|
@ -4,9 +4,19 @@ 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.logging.Level;
|
||||||
|
|
||||||
public class SoftDepends {
|
public class SoftDepends {
|
||||||
|
|
||||||
private boolean worldguard = false, griefprevention = false, savagefactions = false;
|
private boolean respect_worldguard = false;
|
||||||
|
private boolean respect_griefprevention = false;
|
||||||
|
private boolean respect_towny = false;
|
||||||
|
private boolean respect_redProtect = false;
|
||||||
|
//RETURNABLES
|
||||||
|
private boolean worldguard = false;
|
||||||
|
private boolean griefprevention = false;
|
||||||
|
private boolean towny = false;
|
||||||
|
private boolean redProtect = false;
|
||||||
|
|
||||||
public boolean isWorldguard() {
|
public boolean isWorldguard() {
|
||||||
return worldguard;
|
return worldguard;
|
||||||
@ -16,31 +26,48 @@ public class SoftDepends {
|
|||||||
return griefprevention;
|
return griefprevention;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isTowny() {
|
||||||
|
return towny;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRedProtect() {
|
||||||
|
return redProtect;
|
||||||
|
}
|
||||||
|
|
||||||
void load() {
|
void load() {
|
||||||
FileBasics.FILETYPE config = Main.getInstance().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
FileBasics.FILETYPE config = Main.getInstance().getFiles().getType(FileBasics.FILETYPE.CONFIG);
|
||||||
if (config.getBoolean("Settings.RespectWorldGuard"))
|
respect_worldguard = config.getBoolean("Settings.Respect.WorldGuard");
|
||||||
registerWorldguard();
|
respect_griefprevention = config.getBoolean("Settings.Respect.GriefPrevention");
|
||||||
else if (worldguard)
|
respect_towny = config.getBoolean("Settings.Respect.Towny");
|
||||||
worldguard = false;
|
respect_redProtect = config.getBoolean("Settings.Respect.RedProtect");
|
||||||
if (config.getBoolean("Settings.RespectGriefPrevention"))
|
registerWorldguard();
|
||||||
registerGriefPrevention();
|
registerGriefPrevention();
|
||||||
else if (griefprevention)
|
registerTowny();
|
||||||
griefprevention = false;
|
registerRedProject();
|
||||||
if (config.getBoolean("Settings.RespectSavageFactions"))
|
|
||||||
registerSavageFactions();
|
|
||||||
else if (savagefactions)
|
|
||||||
savagefactions = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerWorldguard() {
|
public void registerWorldguard() {
|
||||||
worldguard = Bukkit.getPluginManager().isPluginEnabled("WorldGuard");
|
worldguard = respect_worldguard && Bukkit.getPluginManager().isPluginEnabled("WorldGuard");
|
||||||
|
debug("Registered `WorldGuard` = " + worldguard);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerGriefPrevention() {
|
public void registerGriefPrevention() {
|
||||||
griefprevention = Bukkit.getPluginManager().isPluginEnabled("GriefPrevention");
|
griefprevention = respect_griefprevention && Bukkit.getPluginManager().isPluginEnabled("GriefPrevention");
|
||||||
|
debug("Registered `GriefPrevention` = " + griefprevention);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerSavageFactions() {
|
public void registerTowny() {
|
||||||
savagefactions = Bukkit.getPluginManager().isPluginEnabled("Factions");
|
towny = respect_towny && Bukkit.getPluginManager().isPluginEnabled("Towny");
|
||||||
|
debug("Registered `Towny` = " + towny);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerRedProject() {
|
||||||
|
redProtect = respect_redProtect && Bukkit.getPluginManager().isPluginEnabled("RedProtect");
|
||||||
|
debug("Registered `RedProtect` = " + redProtect);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void debug(String str) {
|
||||||
|
if (Main.getInstance().getSettings().debug)
|
||||||
|
Main.getInstance().getLogger().log(Level.INFO, str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,8 @@ public class PlayerWorld implements RTPWorld {
|
|||||||
private boolean useWorldborder;
|
private boolean useWorldborder;
|
||||||
private int CenterX, CenterZ, maxBorderRad, minBorderRad, price, attempts;
|
private int CenterX, CenterZ, maxBorderRad, minBorderRad, price, attempts;
|
||||||
private List<String> Biomes;
|
private List<String> Biomes;
|
||||||
private Player p;
|
private final Player p;
|
||||||
private World world;
|
private final World world;
|
||||||
private RTP_WORLD_TYPE world_type;
|
private RTP_WORLD_TYPE world_type;
|
||||||
|
|
||||||
public PlayerWorld(Player p, World world) {
|
public PlayerWorld(Player p, World world) {
|
||||||
@ -39,13 +39,11 @@ public class PlayerWorld implements RTPWorld {
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location generateRandomXZ(Default defaultWorld, int quadrant) {
|
public Location generateRandomXZ(Default defaultWorld) {
|
||||||
int borderRad = getMaxRad();
|
int borderRad = getMaxRad();
|
||||||
int minVal = getMinRad();
|
int minVal = getMinRad();
|
||||||
int CenterX = getCenterX();
|
int CenterX = getCenterX();
|
||||||
int CenterZ = getCenterZ();
|
int CenterZ = getCenterZ();
|
||||||
//int quadrant = rn.nextInt(4);
|
|
||||||
Player p = getPlayer();
|
|
||||||
World world = getWorld();
|
World world = getWorld();
|
||||||
if (getUseWorldborder()) {
|
if (getUseWorldborder()) {
|
||||||
WorldBorder border = world.getWorldBorder();
|
WorldBorder border = world.getWorldBorder();
|
||||||
@ -53,40 +51,36 @@ public class PlayerWorld implements RTPWorld {
|
|||||||
CenterX = border.getCenter().getBlockX();
|
CenterX = border.getCenter().getBlockX();
|
||||||
CenterZ = border.getCenter().getBlockZ();
|
CenterZ = border.getCenter().getBlockZ();
|
||||||
}
|
}
|
||||||
float yaw = p.getLocation().getYaw(), pitch = p.getLocation().getPitch();
|
|
||||||
RTP_WORLD_TYPE world_type = this.world_type; //World rtp type
|
//Make sure our borders will not cause an invalid integer
|
||||||
//for (int i = 0; i <= maxAttempts; i++) {
|
|
||||||
// Get the y-coords from up top, then check if it's SAFE!
|
|
||||||
if (borderRad <= minVal) {
|
if (borderRad <= minVal) {
|
||||||
minVal = defaultWorld.getMinRad();
|
minVal = defaultWorld.getMinRad();
|
||||||
if (borderRad <= minVal)
|
if (borderRad <= minVal)
|
||||||
minVal = 0;
|
minVal = 0;
|
||||||
}
|
}
|
||||||
// Will Check is CenterZ is negative or positive, then set 2 x's
|
|
||||||
// up for choosing up next
|
//Generate a random X and Z based off the quadrant selected
|
||||||
////z = rn.nextInt(borderRad - minVal) + CenterZ + minVal;
|
int max = borderRad - minVal;
|
||||||
////z2 = -(rn.nextInt(borderRad - minVal) - CenterZ - minVal);
|
int x, z;
|
||||||
// Will Check is CenterZ is negative or positive, then set 2 z's
|
int quadrant = new Random().nextInt(4);
|
||||||
// up for choosing up next
|
|
||||||
////x = rn.nextInt(borderRad - minVal) + CenterX + minVal;
|
|
||||||
////x2 = -rn.nextInt(borderRad - minVal) + CenterX - minVal;
|
|
||||||
int x = borderRad - minVal;
|
|
||||||
int z = borderRad - minVal;
|
|
||||||
switch (quadrant) {
|
switch (quadrant) {
|
||||||
case 0: // Positive X and Z
|
case 0: // Positive X and Z
|
||||||
x = new Random().nextInt(x) + CenterX + minVal;
|
x = new Random().nextInt(max) + minVal;
|
||||||
z = new Random().nextInt(z) + CenterZ + minVal; break;
|
z = new Random().nextInt(max) + minVal; break;
|
||||||
case 1: // Negative X and Z
|
case 1: // Negative X and Z
|
||||||
x = -new Random().nextInt(x) + CenterX - minVal;
|
x = -new Random().nextInt(max) - minVal;
|
||||||
z = -(new Random().nextInt(z) + CenterZ + minVal); break;
|
z = -(new Random().nextInt(max) + minVal); break;
|
||||||
case 2: // Negative X and Positive Z
|
case 2: // Negative X and Positive Z
|
||||||
x = -new Random().nextInt(x) + CenterX - minVal;
|
x = -new Random().nextInt(max) - minVal;
|
||||||
z = new Random().nextInt(z) + CenterZ + minVal; break;
|
z = new Random().nextInt(max) + minVal; break;
|
||||||
default: // Positive X and Negative Z
|
default: // Positive X and Negative Z
|
||||||
x = new Random().nextInt(x) + CenterX + minVal;
|
x = new Random().nextInt(max) + minVal;
|
||||||
z = -(new Random().nextInt(z) + CenterZ + minVal); break;
|
z = -(new Random().nextInt(max) + minVal); break;
|
||||||
}
|
}
|
||||||
|
x += CenterX;
|
||||||
|
z += CenterZ;
|
||||||
addAttempt();
|
addAttempt();
|
||||||
|
//System.out.println(quadrant);
|
||||||
return new Location(world, x, 0, z);
|
return new Location(world, x, 0, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,16 +4,21 @@
|
|||||||
Language-File: 'en.yml'
|
Language-File: 'en.yml'
|
||||||
|
|
||||||
Settings:
|
Settings:
|
||||||
|
Respect:
|
||||||
|
## Respect WorldGuard areas (https://dev.bukkit.org/projects/worldguard)
|
||||||
|
WorldGuard: false
|
||||||
|
## Respect GriefPrevention areas (https://www.spigotmc.org/resources/griefprevention.1884/)
|
||||||
|
GriefPrevention: false
|
||||||
|
## Respect Towny areas (https://www.spigotmc.org/resources/towny.72694/)
|
||||||
|
Towny: false
|
||||||
|
## Respect RedProtect areas (https://www.spigotmc.org/resources/redprotect.15841/)
|
||||||
|
RedProtect: false
|
||||||
## Output to console some debugging info
|
## Output to console some debugging info
|
||||||
Debugger: false
|
Debugger: false
|
||||||
## Respect WorldGuard areas # IN-PROGRESS
|
|
||||||
RespectWorldGuard: false
|
|
||||||
## Respect GriefPrevention areas # COMING SOON
|
|
||||||
RespectGriefPrevention: false
|
|
||||||
## Respect Faction areas # COMING SOON
|
|
||||||
RespectSavageFactions: false
|
|
||||||
## Must be a positive integer #
|
## Must be a positive integer #
|
||||||
MinRadius: 25
|
MinRadius: 25
|
||||||
|
## Amount of chunks to preload around a safe location
|
||||||
|
PreloadRadius: 5
|
||||||
## Maximum amount of tries before BetterRTP gives up and sends a NotSafeMessage #
|
## Maximum amount of tries before BetterRTP gives up and sends a NotSafeMessage #
|
||||||
MaxAttempts: 15
|
MaxAttempts: 15
|
||||||
RtpOnFirstJoin: # Will execute as console to override delays
|
RtpOnFirstJoin: # Will execute as console to override delays
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&a你花费了&c$%price%&7,被传送到了&7 x=%x% y=%y% z=%z%。共尝试&f%attempts%&7次!'
|
Paid: '&a你花费了&c$%price%&7,被传送到了&7 x=%x% y=%y% z=%z%。共尝试&f%attempts%&7次!'
|
||||||
Bypass: '&a你被传送到了&7 x=%x% y=%y% z=%z%。共尝试&f%attempts%&7次!'
|
Bypass: '&a你被传送到了&7 x=%x% y=%y% z=%z%。共尝试&f%attempts%&7次!'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&c你的钱不够了,&7你至少要有$%price%&7才能随机传送!'
|
Price: '&c你的钱不够了,&7你至少要有$%price%&7才能随机传送!'
|
||||||
NotSafe: '&c由于在%attempts%次尝试内未能找到安全的位置,&7你未被传送!'
|
NotSafe: '&c由于在%attempts%次尝试内未能找到安全的位置,&7你未被传送!'
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&a您花費了&c$%price%&7,被傳送到了&7 x=%x% y=%y% z=%z%。一共嘗試&f%attempts%&7次!'
|
Paid: '&a您花費了&c$%price%&7,被傳送到了&7 x=%x% y=%y% z=%z%。一共嘗試&f%attempts%&7次!'
|
||||||
Bypass: '&a您被傳送到了&7 x=%x% y=%y% z=%z%。一共嘗試&f%attempts%&7次!'
|
Bypass: '&a您被傳送到了&7 x=%x% y=%y% z=%z%。一共嘗試&f%attempts%&7次!'
|
||||||
Loading: '&a已定位安全位置! &7正在讀取區塊...'
|
Loading: '&a已定位安全位置! &7正在讀取區塊...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&c您的資金不夠了!&7您需要有$%price%&7才能嘗試RTP!'
|
Price: '&c您的資金不夠了!&7您需要有$%price%&7才能嘗試RTP!'
|
||||||
NotSafe: '&c由於%attempts%次嘗試內未能找到適合的地方傳送,&7您未被傳送!'
|
NotSafe: '&c由於%attempts%次嘗試內未能找到適合的地方傳送,&7您未被傳送!'
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&aJe bent getp''d naar&7 x=%x% y=%y% z=%z% for &c$%price%&7 in &f%attempts% &7attempts!'
|
Paid: '&aJe bent getp''d naar&7 x=%x% y=%y% z=%z% for &c$%price%&7 in &f%attempts% &7attempts!'
|
||||||
Bypass: '&aJe bent getp''d naar&7 x=%x% y=%y% z=%z%'
|
Bypass: '&aJe bent getp''d naar&7 x=%x% y=%y% z=%z%'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&cKan niet rtpen vanwege onvoldoende saldo! &7Je moet minstens $%price% &7hebben om te rtpen!'
|
Price: '&cKan niet rtpen vanwege onvoldoende saldo! &7Je moet minstens $%price% &7hebben om te rtpen!'
|
||||||
NotSafe: '&cKon geen veilige plek vinden, Probeer opnieuw! &7Je bent niet ge tp''d!'
|
NotSafe: '&cKon geen veilige plek vinden, Probeer opnieuw! &7Je bent niet ge tp''d!'
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&aYou have been tp''d to&7 x=%x% y=%y% z=%z% for &c$%price%&7 in &f%attempts% &7attempts!'
|
Paid: '&aYou have been tp''d to&7 x=%x% y=%y% z=%z% for &c$%price%&7 in &f%attempts% &7attempts!'
|
||||||
Bypass: '&aYou have been tp''d to&7 x=%x% y=%y% z=%z% in &f%attempts% &7attempts'
|
Bypass: '&aYou have been tp''d to&7 x=%x% y=%y% z=%z% in &f%attempts% &7attempts'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&cCould not rtp because of insufficent funds! &7You must have atleast $%price% &7to rtp!'
|
Price: '&cCould not rtp because of insufficent funds! &7You must have atleast $%price% &7to rtp!'
|
||||||
NotSafe: '&cCould not find safe spot within %attempts% attempts! &7You were not RTP''d!'
|
NotSafe: '&cCould not find safe spot within %attempts% attempts! &7You were not RTP''d!'
|
||||||
|
@ -5,6 +5,7 @@ Messages:
|
|||||||
Paid: '&aTu a été téléporté à&7 x=%x% y=%y% z=%z% pour &c$%price%&7 en &f%attempts% &7tentatives!'
|
Paid: '&aTu a été téléporté à&7 x=%x% y=%y% z=%z% pour &c$%price%&7 en &f%attempts% &7tentatives!'
|
||||||
Bypass: '&aTu a été téléporté à&7 x=%x% y=%y% z=%z% en &f%attempts% &7tentatives!'
|
Bypass: '&aTu a été téléporté à&7 x=%x% y=%y% z=%z% en &f%attempts% &7tentatives!'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&cTu n''a pas pu être téléporté; Manque de fonds! &7Tu doit avoir au moins $%price% &7pour te téléporter!'
|
Price: '&cTu n''a pas pu être téléporté; Manque de fonds! &7Tu doit avoir au moins $%price% &7pour te téléporter!'
|
||||||
NotSafe: '&cImpossible de trouver un endroit sûr en %attempts% tentatives! &7Tu n''a pas été téléporté!'
|
NotSafe: '&cImpossible de trouver un endroit sûr en %attempts% tentatives! &7Tu n''a pas été téléporté!'
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&aあなたは&c$%price%&aで&7x=%x% y=%y% z=%z% に&f%attempts%&7回の試行でTPされました!'
|
Paid: '&aあなたは&c$%price%&aで&7x=%x% y=%y% z=%z% に&f%attempts%&7回の試行でTPされました!'
|
||||||
Bypass: '&aあなたは&7x=%x% y=%y% z=%z% に&f%attempts%&7回の試行でTPされました!'
|
Bypass: '&aあなたは&7x=%x% y=%y% z=%z% に&f%attempts%&7回の試行でTPされました!'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&c資金が不十分のためRTPできませんでした! &7RTPには最低$%price%&7が必要です!'
|
Price: '&c資金が不十分のためRTPできませんでした! &7RTPには最低$%price%&7が必要です!'
|
||||||
NotSafe: '&c%attempts%回の試行で安全な場所が見つかりませんでした! &7あなたははRTPされませんでした!'
|
NotSafe: '&c%attempts%回の試行で安全な場所が見つかりませんでした! &7あなたははRTPされませんでした!'
|
||||||
|
@ -4,6 +4,7 @@ Messages:
|
|||||||
Paid: '&aВас телепортировало на&7 x=%x% y=%y% z=%z% за &c$%price%&7, за &f%attempts% &7попыток!'
|
Paid: '&aВас телепортировало на&7 x=%x% y=%y% z=%z% за &c$%price%&7, за &f%attempts% &7попыток!'
|
||||||
Bypass: '&aВас телепортировало на&7 x=%x% y=%y% z=%z% за &f%attempts% &7попыток'
|
Bypass: '&aВас телепортировало на&7 x=%x% y=%y% z=%z% за &f%attempts% &7попыток'
|
||||||
Loading: '&aSafe spot located! &7Loading chunks...'
|
Loading: '&aSafe spot located! &7Loading chunks...'
|
||||||
|
Teleport: '&aTeleporting... &fplease wait while we find a safe location!'
|
||||||
Failed:
|
Failed:
|
||||||
Price: '&cУ вас недостаточно денег для телепортации! &7У вас должно быть хотябы $%price% &7для rtp!'
|
Price: '&cУ вас недостаточно денег для телепортации! &7У вас должно быть хотябы $%price% &7для rtp!'
|
||||||
NotSafe: '&cНе удалось найти безопасное место за %attempts% попыток! &7Вас не телепортировало!'
|
NotSafe: '&cНе удалось найти безопасное место за %attempts% попыток! &7Вас не телепортировало!'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
main: me.SuperRonanCraft.BetterRTP.Main
|
main: me.SuperRonanCraft.BetterRTP.Main
|
||||||
version: '2.12.2'
|
version: '2.13.0'
|
||||||
name: BetterRTP
|
name: BetterRTP
|
||||||
author: SuperRonanCraft
|
author: SuperRonanCraft
|
||||||
softdepend: [Vault, WorldGuard, GriefPrevention, Factions]
|
softdepend: [Vault, WorldGuard, GriefPrevention, Towny, Factions, RedProtect]
|
||||||
api-version: '1.13'
|
api-version: '1.13'
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user