translation fixes + HuskTowns/SaberFaction support + region validation recode

This commit is contained in:
RonanCraft
2022-10-10 11:22:07 -04:00
parent 8a0b8f60ae
commit 7ddfb2c2c3
32 changed files with 313 additions and 302 deletions

View File

@@ -7,6 +7,7 @@ import me.SuperRonanCraft.BetterRTP.player.events.EventListener;
import me.SuperRonanCraft.BetterRTP.player.rtp.RTP;
import me.SuperRonanCraft.BetterRTP.references.WarningHandler;
import me.SuperRonanCraft.BetterRTP.references.database.DatabaseHandler;
import me.SuperRonanCraft.BetterRTP.references.depends.DepPlaceholderAPI;
import me.SuperRonanCraft.BetterRTP.references.rtpinfo.QueueHandler;
import me.SuperRonanCraft.BetterRTP.references.Permissions;
import me.SuperRonanCraft.BetterRTP.references.web.Updater;
@@ -50,6 +51,11 @@ public class BetterRTP extends JavaPlugin {
loadAll();
listener.registerEvents(this);
queue.registerEvents(this);
try {
new DepPlaceholderAPI().register();
} catch (NoClassDefFoundError e) {
//No placeholder api :(
}
}
@Override

View File

@@ -18,8 +18,6 @@ import java.util.*;
public class RTP {
final RTPTeleport teleport = new RTPTeleport();
final RTPPluginValidation softDepends = new RTPPluginValidation();
//public final WorldPermissionGroup permConfig = new WorldPermissionGroup();
//Cache
public final HashMap<String, String> overriden = new HashMap<>();
@Getter List<String> disabledWorlds, blockList;

View File

@@ -133,7 +133,7 @@ public class RTPPlayer {
}
public static boolean checkDepends(Location loc) {
return BetterRTP.getInstance().getRTP().softDepends.checkLocation(loc);
return RTPPluginValidation.checkLocation(loc);
}
// Bad blocks, or bad biome

View File

@@ -25,32 +25,10 @@ import org.bukkit.Location;
public class RTPPluginValidation {
boolean checkLocation(Location loc) {
boolean plugin_worldGuard = RTP_WorldGuard.check(loc);
boolean plugin_griefPrevention = RTP_GriefPrevention.check(loc);
boolean plugin_towny = RTP_Towny.check(loc);
boolean plugin_redProtect = RTP_RedProtect.check(loc);
boolean plugin_factionsUUID = RTP_FactionsUUID.check(loc);
boolean plugin_lands = RTP_Lands.check(loc);
boolean plugin_residence = RTP_Residence.check(loc);
boolean plugin_kingdomsx = RTP_KingdomsX.check(loc);
boolean plugin_hClaims = RTP_hClaims.check(loc);
boolean plugin_griefDefender = RTP_GriefDefender.check(loc);
boolean plugin_ultimateClaims = RTP_UltimateClaims.check(loc);
boolean plugin_pueblos = RTP_Pueblos.check(loc);
boolean plugin_saberFactions = RTP_SaberFactions.check(loc);
return plugin_worldGuard
&& plugin_griefPrevention
&& plugin_towny
&& plugin_redProtect
&& plugin_factionsUUID
&& plugin_lands
&& plugin_residence
&& plugin_kingdomsx
&& plugin_hClaims
&& plugin_griefDefender
&& plugin_ultimateClaims
&& plugin_pueblos
&& plugin_saberFactions;
public static boolean checkLocation(Location loc) {
for (REGIONPLUGINS validators : REGIONPLUGINS.values())
if (!validators.getValidator().check(loc))
return false;
return true;
}
}

View File

@@ -0,0 +1,38 @@
package me.SuperRonanCraft.BetterRTP.references.depends;
import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.player.HelperPlayer;
import me.SuperRonanCraft.BetterRTP.references.player.playerdata.PlayerData;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
public class DepPlaceholderAPI extends PlaceholderExpansion {
@NotNull
@Override
public String getIdentifier() {
return BetterRTP.getInstance().getDescription().getName().toLowerCase();
}
@NotNull
@Override
public String getAuthor() {
return BetterRTP.getInstance().getDescription().getAuthors().get(0);
}
@NotNull
@Override
public String getVersion() {
return BetterRTP.getInstance().getDescription().getVersion();
}
@Override
public String onPlaceholderRequest(Player player, String request) {
PlayerData data = HelperPlayer.getData(player);
if (request.equalsIgnoreCase("count")) {
return String.valueOf(data.getRtpCount());
}
return null;
}
}

View File

@@ -0,0 +1,39 @@
package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins;
import lombok.Getter;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
public enum REGIONPLUGINS {
FACTIONSUUID("FactionsUUID", "Factions", new RTP_FactionsUUID()),
GRIEFDEFENDER("GriefDefender", new RTP_GriefDefender()),
GRIEFPREVENTION("GriefPrevention", new RTP_GriefPrevention()),
HCLAIMS("hClaims", "hClaim", new RTP_hClaims()),
HUSKTOWNS("HuskTowns", new RTP_HuskTowns()),
KINGDOMSX("KingdomsX", "Kingdoms", new RTP_KingdomsX()),
LANDS("Lands", new RTP_Lands()),
PUEBLOS("Pueblos", new RTP_Pueblos()),
REDPROTECT("RedProtect", new RTP_RedProtect()),
RESIDENCE("Residence", new RTP_Residence()),
SABERFACTIONS("SaberFactions", "Factions", new RTP_SaberFactions()),
TOWNY("Towny", new RTP_Towny()),
ULTIMATECLAIMS("UltimateClaims", new RTP_UltimateClaims()),
WORLDGUARD("WorldGuard", new RTP_WorldGuard()),
;
@Getter private final SoftDepends.RegionPlugin plugin = new SoftDepends.RegionPlugin();
@Getter private final String setting_name, pluginyml_name;
@Getter private final RegionPluginCheck validator;
REGIONPLUGINS(String all_name, RegionPluginCheck validator) {
this(all_name, all_name, validator);
}
REGIONPLUGINS(String setting_name, String pluginyml_name, RegionPluginCheck validator) {
this.setting_name = setting_name;
this.pluginyml_name = pluginyml_name;
this.validator = validator;
}
public boolean isEnabled() {
return plugin.isEnabled();
}
}

View File

@@ -7,14 +7,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_FactionsUUID {
public class RTP_FactionsUUID implements RegionPluginCheck {
// NOT TESTED (2.13.2)
// FactionsUUID (v1.6.9.5-U0.5.16)
// https://www.spigotmc.org/resources/factionsuuid.1035/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isFactionsUUID())
if (REGIONPLUGINS.FACTIONSUUID.isEnabled())
try {
Faction faction = Board.getInstance().getFactionAt(new FLocation(loc));
result = faction.isWilderness() || faction.isSafeZone();
@@ -23,8 +23,4 @@ public class RTP_FactionsUUID {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -8,14 +8,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_GriefDefender {
public class RTP_GriefDefender implements RegionPluginCheck {
// NOT TESTED (3.1.0)
// GriefDefender (v1.5.10)
// https://www.spigotmc.org/resources/griefdefender.68900/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isGriefDefender())
if (REGIONPLUGINS.GRIEFDEFENDER.isEnabled())
try {
for (Claim claim : GriefDefender.getCore().getAllClaims())
if (claim.contains(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())) {
@@ -27,8 +27,4 @@ public class RTP_GriefDefender {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import me.ryanhamshire.GriefPrevention.GriefPrevention;
import org.bukkit.Location;
public class RTP_GriefPrevention {
public class RTP_GriefPrevention implements RegionPluginCheck {
// TESTED (v2.13.0)
// GriefPrevention (v16.15.0)
// https://www.spigotmc.org/resources/griefprevention.1884/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isGriefprevention())
if (REGIONPLUGINS.GRIEFPREVENTION.isEnabled())
try {
result = GriefPrevention.instance.dataStore.getClaimAt(loc, true, null) == null;
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_GriefPrevention {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -0,0 +1,23 @@
package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins;
import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import net.william278.husktowns.HuskTownsAPI;
import org.bukkit.Location;
public class RTP_HuskTowns implements RegionPluginCheck {
// NOT TESTED (3.4.5)
// HuskTowns (v1.8.1)
// https://www.spigotmc.org/resources/husktowns.92672/
public boolean check(Location loc) {
boolean result = true;
if (REGIONPLUGINS.HUSKTOWNS.isEnabled())
try {
result = !HuskTownsAPI.getInstance().isClaimed(loc);
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
}

View File

@@ -4,14 +4,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_KingdomsX {
public class RTP_KingdomsX implements RegionPluginCheck {
// NOT TESTED (3.0.2)
// KingdomsX (v1.10.5.2)
// https://www.spigotmc.org/resources/kingdomsx.77670/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isKingdomsx())
if (REGIONPLUGINS.KINGDOMSX.isEnabled())
try {
org.kingdoms.constants.land.Land land = org.kingdoms.constants.land.Land.getLand(loc);
result = land == null || !land.isClaimed();
@@ -20,8 +20,4 @@ public class RTP_KingdomsX {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import me.angeschossen.lands.api.integration.LandsIntegration;
import org.bukkit.Location;
public class RTP_Lands {
public class RTP_Lands implements RegionPluginCheck {
// NOT TESTED (2.14.3)
// Lands (v5.0.5)
// https://www.spigotmc.org/resources/lands.53313/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isLands())
if (REGIONPLUGINS.LANDS.isEnabled())
try {
result = !(new LandsIntegration(BetterRTP.getInstance()).isClaimed(loc));
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_Lands {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_Pueblos {
public class RTP_Pueblos implements RegionPluginCheck {
// NOT TESTED (3.1.0)
// Pueblos (v2.0.1)
// https://www.spigotmc.org/resources/pueblos.91255/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isPueblos())
if (REGIONPLUGINS.PUEBLOS.isEnabled())
try {
result = Pueblos.getInstance().getClaimHandler().getClaimMain(loc) == null;
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_Pueblos {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_RedProtect {
public class RTP_RedProtect implements RegionPluginCheck {
// TESTED (2.13.0)
// RedProtect (v7.7.2)
// https://www.spigotmc.org/resources/redprotect.15841/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isRedProtect())
if (REGIONPLUGINS.REDPROTECT.isEnabled())
try {
result = RedProtect.get().getAPI().getRegion(loc) == null;
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_RedProtect {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -10,14 +10,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_Residence {
public class RTP_Residence implements RegionPluginCheck {
// NOT TESTED (2.14.3)
// Residence (v4.9.1.9)
// https://www.spigotmc.org/resources/residence.11480/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isResidence())
if (REGIONPLUGINS.RESIDENCE.isEnabled())
try {
result = Residence.getInstance().getResidenceManager().getByLoc(loc) == null;
} catch (Exception e) {
@@ -25,8 +25,4 @@ public class RTP_Residence {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -6,25 +6,21 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_SaberFactions {
public class RTP_SaberFactions implements RegionPluginCheck {
// NOT TESTED (3.4.5)
// SaberFactions (v2.0.1)
// https://www.spigotmc.org/resources/saberfactions.69771/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isSaberFactions())
if (REGIONPLUGINS.SABERFACTIONS.isEnabled())
try {
FLocation fLoc = new FLocation(loc);
Faction faction = Board.getInstance().getFactionAt(fLoc);
result = faction == null;
result = faction == null || faction.isWilderness() || faction.isSafeZone();
} catch (Exception e) {
e.printStackTrace();
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_Towny {
public class RTP_Towny implements RegionPluginCheck {
// NOT TESTED (2.13.0)
// Towny (v0.96.1.11)
// https://www.spigotmc.org/resources/towny.72694/
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isTowny())
if (REGIONPLUGINS.TOWNY.isEnabled())
try {
result = TownyAPI.getInstance().isWilderness(loc);
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_Towny {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -6,14 +6,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_UltimateClaims {
public class RTP_UltimateClaims implements RegionPluginCheck {
// NOT TESTED (3.1.0)
// UltimateClaims (v1.6.1)
// https://songoda.com/marketplace/product/ultimateclaims-the-ultimate-claiming-plugin.65
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isUltimateClaims())
if (REGIONPLUGINS.ULTIMATECLAIMS.isEnabled())
try {
result = UltimateClaims.getInstance().getClaimManager().getClaim(loc.getChunk()) == null;
} catch (Exception e) {
@@ -21,8 +21,4 @@ public class RTP_UltimateClaims {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -9,14 +9,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_WorldGuard {
public class RTP_WorldGuard implements RegionPluginCheck {
// TESTED (v2.12.3)
// Worldguard (v7.0.4 B1), WorldEdit (v7.2.0 B5)
// https://dev.bukkit.org/projects/worldguard
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isWorldguard())
if (REGIONPLUGINS.WORLDGUARD.isEnabled())
try {
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
@@ -30,8 +30,4 @@ public class RTP_WorldGuard {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -5,14 +5,14 @@ import me.SuperRonanCraft.BetterRTP.BetterRTP;
import me.SuperRonanCraft.BetterRTP.references.settings.SoftDepends;
import org.bukkit.Location;
public class RTP_hClaims {
public class RTP_hClaims implements RegionPluginCheck {
// NOT TESTED (3.1.0)
// hClaims (v1.1.1)
// https://www.spigotmc.org/resources/hclaims.90540/ (Local Repo)
public static boolean check(Location loc) {
public boolean check(Location loc) {
boolean result = true;
if (getDepends().isHClaims())
if (REGIONPLUGINS.HCLAIMS.isEnabled())
try {
result = ClaimAPI.getInstance().isClaimed(loc);
} catch (Exception e) {
@@ -20,8 +20,4 @@ public class RTP_hClaims {
}
return result;
}
private static SoftDepends getDepends() {
return BetterRTP.getInstance().getSettings().getsDepends();
}
}

View File

@@ -0,0 +1,9 @@
package me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins;
import org.bukkit.Location;
public interface RegionPluginCheck {
boolean check(Location loc);
}

View File

@@ -22,7 +22,13 @@ public class FileBasics {
}
public enum FILETYPE {
CONFIG("config"), ECO("economy"), SIGNS("signs"), EFFECTS("effects"), LOCATIONS("locations");
CONFIG("config"),
ECO("economy"),
SIGNS("signs"),
EFFECTS("effects"),
LOCATIONS("locations"),
PLACEHOLDERS("placeholders")
;
private final String fileName;
private final YamlConfiguration config = new YamlConfiguration();

View File

@@ -59,16 +59,19 @@ public class LangFile {
"cht.yml", //Chinese (OasisAkari & kamiya10)
"cs.yml", //Czech (Lewisparkle)
"da.yml", //Danish (Janbchr)
"nl.yml", //Dutch (QuestalNetwork) (GeleVla)
"de.yml", //German (IBimsDaNico#8690)
"en.yml",
"es.yml", //Spanish (emgv)
"fr.yml", //French (At0micA55 & Mrflo67)
"he.yml", //Hebrew (thefourcraft)
"it.yml", //Italian (iVillager)
"ja.yml", //Japanese (ViaSnake)
"nl.yml", //Dutch (QuestalNetwork) (GeleVla)
"no.yml", //Norwegian (Fraithor & Janbchr)
"pl.yml", //Polish (Farum & TeksuSiK)
"ro.yml", //Romanian (GamingXBlood)
"ru.yml", //Russian (Logan)
"vi.yml", //Vietnamese (VoChiDanh#0862)
};
private void generateDefaults() {

View File

@@ -1,6 +1,8 @@
package me.SuperRonanCraft.BetterRTP.references.settings;
import lombok.Getter;
import lombok.Setter;
import me.SuperRonanCraft.BetterRTP.references.depends.regionPlugins.REGIONPLUGINS;
import me.SuperRonanCraft.BetterRTP.references.file.FileBasics;
import me.SuperRonanCraft.BetterRTP.BetterRTP;
import org.bukkit.Bukkit;
@@ -9,143 +11,26 @@ import java.util.logging.Level;
public class SoftDepends {
private boolean
respect_worldguard = false,
respect_griefprevention = false,
respect_towny = false,
respect_redProtect = false,
respect_factionsUUID = false,
respect_lands = false,
respect_residence = false,
respect_kingdomsx = false,
respect_hClaims = false,
respect_griefDefender = false,
respect_ultimateClaims = false,
respect_pueblos = false,
respect_saberFactions = false;
//RETURNABLES
@Getter private boolean
worldguard = false,
griefprevention = false,
towny = false,
redProtect = false,
factionsUUID = false,
lands = false,
residence = false,
kingdomsx = false,
hClaims = false,
griefDefender = false,
ultimateClaims = false,
pueblos = false,
saberFactions = false;
void load() {
for (REGIONPLUGINS plugin : REGIONPLUGINS.values())
registerPlugin(plugin);
}
public void registerPlugin(REGIONPLUGINS pl) {
FileBasics.FILETYPE config = BetterRTP.getInstance().getFiles().getType(FileBasics.FILETYPE.CONFIG);
String pre = "Settings.Respect.";
respect_worldguard = config.getBoolean( pre + "WorldGuard");
respect_griefprevention = config.getBoolean( pre + "GriefPrevention");
respect_towny = config.getBoolean( pre + "Towny");
respect_redProtect = config.getBoolean( pre + "RedProtect");
respect_factionsUUID = config.getBoolean( pre + "FactionsUUID");
respect_lands = config.getBoolean( pre + "Lands");
respect_residence = config.getBoolean( pre + "Residence");
respect_kingdomsx = config.getBoolean( pre + "KingdomsX");
respect_hClaims = config.getBoolean( pre + "hClaims");
respect_griefDefender = config.getBoolean( pre + "GriefDefender");
respect_ultimateClaims = config.getBoolean( pre + "UltimateClaims");
respect_pueblos = config.getBoolean( pre + "Pueblos");
respect_saberFactions = config.getBoolean( pre + "SaberFactions");
registerWorldguard();
registerGriefPrevention();
registerTowny();
registerRedProtect();
registerFactionsUUID();
registerLands();
registerResidence();
registerKingdomsX();
registerClaimAPIPandomim();
registerGriefDefender();
registerUltimateClaims();
registerPueblos();
registerSaberFactions();
pl.getPlugin().setRespecting(config.getBoolean(pre + pl.getSetting_name()));
if (pl.getPlugin().isRespecting())
pl.getPlugin().setEnabled(Bukkit.getPluginManager().isPluginEnabled(pl.getPluginyml_name()));
if (pl.getPlugin().isRespecting())
debug("Respecting `" + pl.getSetting_name() + "` was " + (pl.getPlugin().enabled ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerWorldguard() {
worldguard = respect_worldguard && Bukkit.getPluginManager().isPluginEnabled("WorldGuard");
if (respect_worldguard)
debug("Respecting `WorldGuard` was " + (worldguard ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerGriefPrevention() {
griefprevention = respect_griefprevention && Bukkit.getPluginManager().isPluginEnabled("GriefPrevention");
if (respect_griefprevention)
debug("Respecting `GriefPrevention` was " + (griefprevention ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerTowny() {
towny = respect_towny && Bukkit.getPluginManager().isPluginEnabled("Towny");
if (respect_towny)
debug("Respecting `Towny` was " + (towny ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerRedProtect() {
redProtect = respect_redProtect && Bukkit.getPluginManager().isPluginEnabled("RedProtect");
if (respect_redProtect)
debug("Respecting `RedProtect` was " + (redProtect ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerFactionsUUID() {
factionsUUID = respect_factionsUUID && Bukkit.getPluginManager().isPluginEnabled("Factions");
if (respect_factionsUUID)
debug("Respecting `FactionsUUID` was " + (factionsUUID ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerLands() {
lands = respect_lands && Bukkit.getPluginManager().isPluginEnabled("Lands");
if (respect_lands)
debug("Respecting `Lands` was " + (lands ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerResidence() {
residence = respect_residence && Bukkit.getPluginManager().isPluginEnabled("Residence");
if (respect_residence)
debug("Respecting `Residence` was " + (residence ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerKingdomsX() {
kingdomsx = respect_kingdomsx && Bukkit.getPluginManager().isPluginEnabled("Kingdoms");
if (respect_kingdomsx)
debug("Respecting `KingdomsX` was " + (kingdomsx ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerClaimAPIPandomim() {
hClaims = respect_hClaims && Bukkit.getPluginManager().isPluginEnabled("hClaim");
if (respect_hClaims)
debug("Respecting `hClaims` was " + (hClaims ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerGriefDefender() {
griefDefender = respect_griefDefender && Bukkit.getPluginManager().isPluginEnabled("GriefDefender");
if (respect_griefDefender)
debug("Respecting `GriefDefender` was " + (griefDefender ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerUltimateClaims() {
ultimateClaims = respect_ultimateClaims && Bukkit.getPluginManager().isPluginEnabled("UltimateClaims");
if (respect_ultimateClaims)
debug("Respecting `UltimateClaims` was " + (ultimateClaims ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerPueblos() {
pueblos = respect_pueblos && Bukkit.getPluginManager().isPluginEnabled("Pueblos");
if (respect_pueblos)
debug("Respecting `Pueblos` was " + (pueblos ? "SUCCESSFULLY" : "NOT") + " registered");
}
public void registerSaberFactions() {
saberFactions = respect_saberFactions && Bukkit.getPluginManager().isPluginEnabled("Factions");
if (respect_saberFactions)
debug("Respecting `SaberFactions` was " + (saberFactions ? "SUCCESSFULLY" : "NOT") + " registered");
static public class RegionPlugin {
@Getter @Setter private boolean respecting;
@Getter @Setter private boolean enabled;
}
private void debug(String str) {

View File

@@ -29,8 +29,10 @@ Settings:
UltimateClaims: false
## Respect Pueblos regions (https://www.spigotmc.org/resources/pueblos.91255/) (My Favorite :D)
Pueblos: false
## Respect SaberFactions areas (https://www.spigotmc.org/resources/saberfactions.69771/)
## Respect SaberFactions areas (https://www.spigotmc.org/resources/saberfactions.69771/) (Added in 3.4.5)
SaberFactions: false
## Respect HuskTowns areas (https://www.spigotmc.org/resources/husktowns.92672/) (Added in 3.4.5)
HuskTowns: false
## Output to console some debugging info
Debugger: false

View File

@@ -0,0 +1,64 @@
# German, Translated by IBimsDaNico#8690 on Discord
Messages:
Prefix: '&7[&6BetterRTP&7] '
Success: # # Placeholders! %x% %y% and %z% are the x, y, and z ist du Position wo der Spieler telelportiert würde! ##
Paid: '&aDu wurdest zu &7 x=%x% y=%y% z=%z% für &c$%price%&7 in &f%attempts% Versuchen &7attempts!'
Bypass: '&adu würdest zu &7 x=%x% y=%y% z=%z% in &f%attempts% &7'
Loading: '&aSicherer Spot gefunden! &7Lade chunks...'
Teleport: '&aTeleportiere... &fbitte Warte bis wir einen Sicheren Spot gefunden haben!'
Failed:
Price: '&cDu konntest nicht teleportiert werden daher du weniger als $%price% &7 hast für für das rtp!'
NotSafe: '&cKonnte keinen sicheren Spot finden bei %attempts% Versuche! &7Du wurdest nicht rtp!'
Hunger: '&cDu könntest nicht telepotiert werden weil zu zu hungrig bist , Esse etwas um dich zu teleportieren'
Other:
Success: '&a%player% wurde zu &7 x=%x% y=%y% z=%z% bei &f%attempts% &7Versuchen teleportiert!'
NotSafe: '&cKönnte keinen sicheren Ort finden bei %attempts% ! &7%player% würde nicht teleportiert'
Biome: '&cDas Biome &7 %biome%&c würde nicht gefunden '
Reload: '&eConfig erfolgreich neu geladen!'
NoPermission:
Basic: '&cUnzureichte Rechte'
World: '&cDu hast keine Rechte um hier RTP nutzen zu können!'
DisabledWorld: '&cIn Welt %world% würde RTP Deaktiviert'
Cooldown: '&c&7Du kannst erst in &c%time% Sekunden &c den Befehl wieder nutzen!'
Locked: '&cEs tut uns leid! &7Sie haben alle Ihre RTPs aufgebraucht!'
Invalid: '&cFalsches Argurment. Versuche ''/%command% help'''
NotOnline: '&c &7%player% &cist nicht online'
Delay: '&aDu wirst in &f%time% &Sekunden teleportiert! Nicht bewegehen'
Moved: '&cWeil du dich bewegt hast würde die RTP Anfrage zurückgezogen!'
NotExist: '&cSieht so aus als ob die Wlet &7%world% &cnicht existiert!'
Already: '&cHoppla! &7Sieht so aus, als würden Sie bereits rtpen, haben Sie etwas Geduld!'
# Sign: '&7Command sign has been created! &7Command is... ''&f/rtp %command%&7'''
Edit:
Error: '&cError! &7Falscher Input ausgewählt!'
Set: '&bErfolgreich! &7%type% würde zu %value% gesetzt'
Remove: '&cGelöscht! &7Du hast die %world% gelöscht'
Help:
Prefix: '&e&m-----&6&l Manticore &8| Hifle-Menü &e&m-----'
Main: ' &7- &e/%command% &7- Teleportiert dich zu einener zufälligen Position!'
Biome: ' &7- &e/%command% biome <biome1, biome2...> &7- Teleportiert dich in zu einer Position in diesen Biome'
Edit: ' &7- &e/%command% edit <default/world> [args...] &7- Bearbeite Plugin Einstellungen'
Help: ' &7- &e/%command% help &7- Zeigt diese Liste hier'
Info: ' &7- &e/%command% info [world/particles/shapes/potion_effects] &7- Spezifisch ansehen Informationen zu Plugin-Parametern'
Player: ' &7- &e/%command% player <player> [world] [biome1, biome2...] &7- Teleportiere einen anderen Spieler zufällig'
Reload: ' &7- &e/%command% reload &7- Lade das Plugin neu (nicht empfohlen)'
Settings: ' &7- &e/%command% settings &7- Öffne das Eistellungs GUI'
Test: ' &7- &e/%command% test &7- Testen Sie Plugin-Effekte nach einem Teleport ohne bewegung'
Version: ' &7- &e/%command% version &7- Zeige die aktulle Version'
World: ' &7- &e/%command% world <world> [biome1, biome2...] &7- Teleportiere dich zufällgi in einer anderen Welt'
Location: ' &7- &e/%command% location <location_name> &7- Rtp sucht eine bestimmte Stelle aus'
Usage:
Player: '&cRichtige Form&7: /%command% player <player> [world] [biome1, biome2]'
World: '&cRichtige Form&7: /%command% world <world> [biome1, biome2...]'
Biome: '&&cRichtige Form&7: /%command% biome <biome1, biome2...>'
Location: '&cRichtige Form&7: /%command% location <location_name>'
Edit:
Base: '&cRichtige Form&7: /%command% edit <default/world> [args...]'
Default: '&cRichtige Form&7: /%command% edit default <max/min/useworldborder/center> <value>'
World: '&cRichtige Form&77: /%command% edit customworld <world> <max/min/useworldborder/center> <value>'
PermissionGroup: '&cRichtige Form&7: /%command% edit permission_group <group> <world> <max/min/useworldborder/center> <value>'
Location: '&cRichtige Form&7: /%command% edit location <location_name> <max/min/useworldborder/center> <value>'
Worldtype: '&cRichtige Form&7: /%command% edit world_type <world> <NETHER/NORMAL>'
Override: '&cRichtige Form&7: /%command% edit override <world> <world_to>'
BlacklistedBlocks: '&cRichtige Form&7: /%command% edit blacklistedblocks <add/remove> <block_id>'

View File

@@ -1,7 +1,7 @@
# Help translate this file into more languages!
Messages:
Prefix: '&7[&6BetterRTP&7] '
Success: # # Placeholders! %x% %y% and %z% are the x, y, and z coordinates that the player is being teleported to! #
Success: ## Placeholders! %x% %y% and %z% are the x, y, and z coordinates that the player is being teleported to! #
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'
Loading: '&aSafe spot located! &7Loading chunks...'
@@ -61,4 +61,4 @@ Usage:
Location: '&cUsage&7: /%command% edit location <location_name> <max/min/useworldborder/center> <value>'
Worldtype: '&cUsage&7: /%command% edit world_type <world> <NETHER/NORMAL>'
Override: '&cUsage&7: /%command% edit override <world> <world_to>'
BlacklistedBlocks: '&cUsage&7: /%command% edit blacklistedblocks <add/remove> <block_id>'
BlacklistedBlocks: '&cUsage&7: /%command% edit blacklistedblocks <add/remove> <block_id>'

View File

@@ -1,22 +1,18 @@
# Help translate this file into more languages!
# Hebrew, Translated by thefourcraft on GitHub (https://github.com/SuperRonanCraft/BetterRTP/pull/108)
Messages:
Prefix: '&7[&6BetterRTP&7] '
Success:
Paid: '&aשוגרתם ל&f x=%x% y=%y% z=%z% במחיר &c$%price%&7 המערכת עשתה זאת ב &f%attempts%
&7נסיונות!'
Paid: '&aשוגרתם ל&f x=%x% y=%y% z=%z% במחיר &c$%price%&7 המערכת עשתה זאת ב &f%attempts% &7נסיונות!'
Bypass: '&aשוגרתם ל&f x=%x% y=%y% z=%z% המערכת עשתה זאת ב &f%attempts% &7נסיונות'
Loading: '&aמקום בטוח נמצא! &fטוען צ''אנקים...'
Teleport: '&aמשגר... &fבבקשה להמתין מחפש מקום בטוח לשיגור!'
Failed:
Price: '&cלא היה לכם מספיק כסף בשביל להשתגר! &fצריך שיהיה לכם לפחות $%price% &7בשביל
להשתגר!'
Price: '&cלא היה לכם מספיק כסף בשביל להשתגר! &fצריך שיהיה לכם לפחות $%price% &7בשביללהשתגר!'
NotSafe: '&cמערכת לא הצליחה, לקח למערכת %attempts% נסיונות! &fלא שוגרתם לשום מקום!'
Hunger: '&cלא שוגרתם בגלל. &fשאתם רעבים מידי&c, בבקשה לאכול משהו ואז נשגר אתכם!'
Other:
Success: '&a%player% שוגר ל &f x=%x% y=%y% z=%z% המערכת עשתה זאת ב &f%attempts%
&7נסיונות!'
NotSafe: '&cמערכת לא הצליחה למצוא מקום בטוח ב %attempts% נסיונות! &f%player% לא
שוגר לשום מקום!'
Success: '&a%player% שוגר ל &f x=%x% y=%y% z=%z% המערכת עשתה זאת ב &f%attempts% &7נסיונות!'
NotSafe: '&cמערכת לא הצליחה למצוא מקום בטוח ב %attempts% נסיונות! &f%player% לאשוגר לשום מקום!'
Biome: '&cהסביבה שהוגדרה לשיגור &f %biome%&c לא קיימת! &fנסו להשתמש ב TAB!'
Reload: '&eהמערכת עשתה הפעלה מחדש בהצלחה!'
NoPermission:
@@ -36,40 +32,33 @@ Messages:
Error: '&c&lהיי! &cנתונים שגויים הוקלדו!'
Set: '&bהצלחה! &c%type% שונה ל %value%'
Remove: '&cנמחק! &fמחקתם את העולם %world%'
Help:
Prefix: '&e&m-----&6&l המשגר &f| עזרה &e&m-----'
Main: ' &7- &e/%command% &7- משגר אתכם רנדומלי!'
Biome: ' &7- &e/%command% biome <biome1, biome2...> &7- משגר אתכם רנדומלית לסביבות
שבחרתם'
Biome: ' &7- &e/%command% biome <biome1, biome2...> &7- משגר אתכם רנדומלית לסביבותשבחרתם'
Edit: ' &7- &e/%command% edit <default/world> [args...] &7- לערוך הגדרות פלאגין'
Help: ' &7- &e/%command% help &7- מראה את הדף הזה(עזרה)'
Info: ' &7- &e/%command% info [world/particles/shapes/potion_effects] &7- מציג מידע
ופרמטרים ספציפיים על הפלגאין'
Player: ' &7- &e/%command% player <player> [world] [biome1, biome2...] &7- משגר
שחקן אחר רנדומלית'
Info: ' &7- &e/%command% info [world/particles/shapes/potion_effects] &7- מציג מידעופרמטרים ספציפיים על הפלגאין'
Player: ' &7- &e/%command% player <player> [world] [biome1, biome2...] &7- משגרשחקן אחר רנדומלית'
Reload: ' &7- &e/%command% reload &7- מפעיל את המערכת מחדש'
Settings: ' &7- &e/%command% settings &7- פותח תפריט בשביל לערוך הגדרות'
Test: ' &7- &e/%command% test &7- בודק את המערכת ללא שיגור של אף אחד'
Version: ' &7- &e/%command% version &7- מראה את גרסאת המערכת'
World: ' &7- &e/%command% world <world> [biome1, biome2...] &7- שיגור לעולם\שרת
אחר רנדולמלית'
World: ' &7- &e/%command% world <world> [biome1, biome2...] &7- שיגור לעולם\שרתאחר רנדולמלית'
Location: ' &7- &e/%command% location <location_name> &7- שיגור לתווח\איזור מסויים'
Usage:
Player: '&cשימושים&f: /%command% player <player> [world] [biome1, biome2]'
World: '&cשימושים&f: /%command% world <world> [biome1, biome2...]'
Biome: '&cשימושים&f: /%command% biome <biome1, biome2...>'
Location: '&cשימושים&f: /%command% location <location_name>'
Edit:
PermissionGroup: '&cUsage&7: /%command% edit permission_group <group> <world>
<max/min/useworldborder/center> <value>'
Location: '&cUsage&7: /%command% edit location <location_name> <max/min/useworldborder/center>
<value>'
PermissionGroup: '&cUsage&7: /%command% edit permission_group <group> <world> <max/min/useworldborder/center> <value>'
Location: '&cUsage&7: /%command% edit location <location_name> <max/min/useworldborder/center> <value>'
Base: '&cשימושים&f: /%command% edit <default/world> [args...]'
Default: '&cשימושים&f: /%command% edit default <max/min/useworldborder/center>
<value>'
World: '&cשימושים&f: /%command% edit world <world> <max/min/useworldborder/center>
<value>'
Default: '&cשימושים&f: /%command% edit default <max/min/useworldborder/center> <value>'
World: '&cשימושים&f: /%command% edit world <world> <max/min/useworldborder/center> <value>'
Worldtype: '&cשימושים&f: /%command% edit world_type <world> <NETHER/NORMAL>'
Override: '&cשימושים&f: /%command% edit override <world> <world_to>'
BlacklistedBlocks: '&cשימושים&f: /%command% edit blacklistedblocks <add/remove>
<block_id>'
BlacklistedBlocks: '&cשימושים&f: /%command% edit blacklistedblocks <add/remove> <block_id>'

View File

@@ -1,15 +1,13 @@
# Translated by Vo Chi Danh, Discord is VoChiDanh#0862
# Vietnamese, Translated by Vo Chi Danh, Discord is VoChiDanh#0862
Messages:
Prefix: '&7[&6BetterRTP&7] '
Success:
Paid: '&aBạn đã được dịch chuyển tới &7 x=%x% y=%y% z=%z% với giá &c$%price%&7 trong &f%attempts%
&7lần!'
Paid: '&aBạn đã được dịch chuyển tới &7 x=%x% y=%y% z=%z% với giá &c$%price%&7 trong &f%attempts% &7lần!'
Bypass: '&aBạn đã được dịch chuyển tới&7 x=%x% y=%y% z=%z% trong &f%attempts% &7lần'
Loading: '&aVị trí an toàn được định vị! &7Tải địa hình...'
Teleport: '&aDịch chuyển... &fVui lòng đợi trong khi chúng tôi tìm thấy một vị trí an toàn!'
Failed:
Price: '&cKhông thể rtp vì các quỹ không chính thức! &7Bạn phải có ít nhất
$%price% &7để dịch chuyển!'
Price: '&cKhông thể rtp vì các quỹ không chính thức! &7Bạn phải có ít nhất $%price% &7để dịch chuyển!'
NotSafe: '&cKhông thể tìm thấy vị trí an toàn trong %attempts% lần tìm kiếm! &7Bạn không được dịch chuyển'
Hunger: '&cKhông thể dịch chuyển vì bạn... &7quá đóii&c, ăn 1 chút gì đi!'
Other:

View File

@@ -0,0 +1 @@
betterrtp_count: 'Get total amount of rtp''s done'

View File

@@ -4,21 +4,26 @@ name: BetterRTP
author: SuperRonanCraft
softdepend:
- Vault
- WorldGuard
- GriefPrevention
- Towny
- WorldGuard #Respect WorldGuard areas (https://dev.bukkit.org/projects/worldguard)
- GriefPrevention #Respect GriefPrevention areas (https://www.spigotmc.org/resources/griefprevention.1884/)
- Towny #Respect Towny areas (https://www.spigotmc.org/resources/towny.72694/)
- RedProtect #Respect RedProtect areas (https://www.spigotmc.org/resources/redprotect.15841/)
##Saber Factions And FactionsUUID have the name plugin.yml name!##
#Respect SaberFactions areas (https://www.spigotmc.org/resources/saberfactions.69771/)
#Respect FactionsUUID areas (https://www.spigotmc.org/resources/factionsuuid.1035/)
- Factions
- RedProtect
- Lands
- Residence
- Lands #Respect Lands areas (https://www.spigotmc.org/resources/lands.53313/)
- Residence #Respect Residence areas (https://www.spigotmc.org/resources/residence.11480/)
- Kingdoms #Respect KingdomsX areas (https://www.spigotmc.org/resources/kingdomsx.77670/)
- hClaims #Respect hClaims areas (https://www.spigotmc.org/resources/hclaims.90540/)
- GriefDefender #Respect GriefDefender areas (https://www.spigotmc.org/resources/griefdefender.68900/)
- UltimateClaims #Respect UltimateClaims areas (https://songoda.com/marketplace/product/ultimateclaims-the-ultimate-claiming-plugin.65)
- Pueblos #Respect Pueblos regions (https://www.spigotmc.org/resources/pueblos.91255/) (My Favorite :D)
# Convince
- ProtocolLib
- Kingdoms
- hClaims
- GriefDefender
- UltimateClaims
- Pueblos
- Multiverse-Core #Forcing Multiverse to load BEFORE BetterRTP
- Essentials #adds `/back` support
- PlaceholderAPI
api-version: '1.13'
commands: