mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2026-01-04 15:31:38 +00:00
Add warning if failed to find world for region
This commit is contained in:
@@ -24,6 +24,7 @@ import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemFlag;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -270,6 +271,12 @@ public class DiscoveryGUI extends RPGRegionsGUI {
|
||||
&& hasDiscovered) {
|
||||
if (!account.getCooldowns().contains(RPGRegionsAccount.AccountCooldown.TELEPORT)) {
|
||||
if (configuredRegion.getWorld() == null || !finalRequirements) {
|
||||
if (configuredRegion.getWorld() == null) {
|
||||
plugin.getLogger().warning("Can't find world for region " + configuredRegion.getId());
|
||||
for (World world : Bukkit.getWorlds()) {
|
||||
plugin.getLogger().info("valid worlds are: " + world.getName() + ":" + world.getUID());
|
||||
}
|
||||
}
|
||||
Translations.CANNOT_TELEPORT.send(player);
|
||||
} else if (getEcoOrNull() != null && getEcoOrNull().getBalance(player) < teleportCost) {
|
||||
Translations.TELEPORT_NO_MONEY.send(player);
|
||||
|
||||
@@ -10,7 +10,7 @@ libraries:
|
||||
- "org.xerial:sqlite-jdbc:3.47.2.0"
|
||||
- "org.flywaydb:flyway-core:11.3.0" # db migration
|
||||
- "org.flywaydb:flyway-mysql:11.3.0"
|
||||
softdepend: [Hyperverse, Multiverse-Core, UltraRegions, WorldGuard, PlaceholderAPI, HeadDatabase, Residence, Plan, GriefPrevention, GriefDefender, Vault, MythicMobs, AlonsoLevels, dynmap, ProtocolLib, Quests, BetonQuest, Lands, MMOCore, CustomStructures]
|
||||
softdepend: [Hyperverse, Multiverse-Core, ASPaperPlugin, UltraRegions, WorldGuard, PlaceholderAPI, HeadDatabase, Residence, Plan, GriefPrevention, GriefDefender, Vault, MythicMobs, AlonsoLevels, dynmap, ProtocolLib, Quests, BetonQuest, Lands, MMOCore, CustomStructures]
|
||||
authors: [SamB440]
|
||||
description: Utilise your protection plugin to create discoverable regions
|
||||
website: https://fortitude.islandearth.net
|
||||
|
||||
Reference in New Issue
Block a user