mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 21:48:43 +01:00
Better error handling for hologram signs; resolves #267
This commit is contained in:
parent
2843c0dfcb
commit
3dad23c216
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.player;
|
package io.github.dre2n.dungeonsxl.player;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.config.MainConfig;
|
import io.github.dre2n.dungeonsxl.config.MainConfig;
|
||||||
import io.github.dre2n.dungeonsxl.util.ParsingUtil;
|
import io.github.dre2n.dungeonsxl.util.ParsingUtil;
|
||||||
import io.github.dre2n.dungeonsxl.world.DInstanceWorld;
|
import io.github.dre2n.dungeonsxl.world.DInstanceWorld;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package io.github.dre2n.dungeonsxl.reward;
|
package io.github.dre2n.dungeonsxl.reward;
|
||||||
|
|
||||||
import io.github.dre2n.commons.chat.MessageUtil;
|
import io.github.dre2n.commons.chat.MessageUtil;
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.config.DMessage;
|
import io.github.dre2n.dungeonsxl.config.DMessage;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package io.github.dre2n.dungeonsxl.sign;
|
package io.github.dre2n.dungeonsxl.sign;
|
||||||
|
|
||||||
import io.github.dre2n.commons.misc.NumberUtil;
|
import io.github.dre2n.commons.misc.NumberUtil;
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.loottable.DLootTable;
|
import io.github.dre2n.dungeonsxl.loottable.DLootTable;
|
||||||
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
||||||
import io.github.dre2n.dungeonsxl.world.block.RewardChest;
|
import io.github.dre2n.dungeonsxl.world.block.RewardChest;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.sign;
|
package io.github.dre2n.dungeonsxl.sign;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.player.DGamePlayer;
|
import io.github.dre2n.dungeonsxl.player.DGamePlayer;
|
||||||
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
||||||
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.sign;
|
package io.github.dre2n.dungeonsxl.sign;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.event.dplayer.instance.game.DGamePlayerEscapeEvent;
|
import io.github.dre2n.dungeonsxl.event.dplayer.instance.game.DGamePlayerEscapeEvent;
|
||||||
import io.github.dre2n.dungeonsxl.player.DGamePlayer;
|
import io.github.dre2n.dungeonsxl.player.DGamePlayer;
|
||||||
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.sign;
|
package io.github.dre2n.dungeonsxl.sign;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
import io.github.dre2n.dungeonsxl.trigger.InteractTrigger;
|
||||||
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.sign;
|
package io.github.dre2n.dungeonsxl.sign;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.github.dre2n.dungeonsxl.sign.lobby;
|
package io.github.dre2n.dungeonsxl.sign.lobby;
|
||||||
|
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.player.DClass;
|
import io.github.dre2n.dungeonsxl.player.DClass;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSign;
|
import io.github.dre2n.dungeonsxl.sign.DSign;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
||||||
|
@ -24,11 +24,11 @@ import io.github.dre2n.commons.compatibility.CompatibilityHandler;
|
|||||||
import io.github.dre2n.commons.compatibility.Version;
|
import io.github.dre2n.commons.compatibility.Version;
|
||||||
import io.github.dre2n.commons.misc.EnumUtil;
|
import io.github.dre2n.commons.misc.EnumUtil;
|
||||||
import io.github.dre2n.commons.misc.NumberUtil;
|
import io.github.dre2n.commons.misc.NumberUtil;
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSign;
|
import io.github.dre2n.dungeonsxl.sign.DSign;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSignTypeDefault;
|
import io.github.dre2n.dungeonsxl.sign.DSignTypeDefault;
|
||||||
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
import io.github.dre2n.dungeonsxl.world.DGameWorld;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -55,6 +55,10 @@ public class HologramSign extends DSign {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInit() {
|
public void onInit() {
|
||||||
|
if (Bukkit.getPluginManager().getPlugin("HolographicDisplays") == null) {
|
||||||
|
markAsErroneous();
|
||||||
|
return;
|
||||||
|
}
|
||||||
getSign().getBlock().setType(Material.AIR);
|
getSign().getBlock().setType(Material.AIR);
|
||||||
|
|
||||||
String[] holoLines = lines[1].split("/");
|
String[] holoLines = lines[1].split("/");
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package io.github.dre2n.dungeonsxl.sign.mob;
|
package io.github.dre2n.dungeonsxl.sign.mob;
|
||||||
|
|
||||||
import io.github.dre2n.commons.misc.NumberUtil;
|
import io.github.dre2n.commons.misc.NumberUtil;
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSign;
|
import io.github.dre2n.dungeonsxl.sign.DSign;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
import io.github.dre2n.dungeonsxl.sign.DSignType;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSignTypeDefault;
|
import io.github.dre2n.dungeonsxl.sign.DSignTypeDefault;
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package io.github.dre2n.dungeonsxl.sign.mob;
|
package io.github.dre2n.dungeonsxl.sign.mob;
|
||||||
|
|
||||||
import io.github.dre2n.commons.misc.NumberUtil;
|
import io.github.dre2n.commons.misc.NumberUtil;
|
||||||
import io.github.dre2n.dungeonsxl.DungeonsXL;
|
|
||||||
import io.github.dre2n.dungeonsxl.mob.ExternalMobPlugin;
|
import io.github.dre2n.dungeonsxl.mob.ExternalMobPlugin;
|
||||||
import io.github.dre2n.dungeonsxl.mob.ExternalMobProvider;
|
import io.github.dre2n.dungeonsxl.mob.ExternalMobProvider;
|
||||||
import io.github.dre2n.dungeonsxl.sign.DSign;
|
import io.github.dre2n.dungeonsxl.sign.DSign;
|
||||||
|
Loading…
Reference in New Issue
Block a user