From c2798cc569caee486a1349a0f9626b58f0d609a8 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Tue, 23 Apr 2019 11:28:40 +0200 Subject: [PATCH] Add debug to BoardColl Try to find out if the extractor is used --- src/com/massivecraft/factions/entity/BoardColl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/entity/BoardColl.java b/src/com/massivecraft/factions/entity/BoardColl.java index ae18d63e..f9a1d412 100644 --- a/src/com/massivecraft/factions/entity/BoardColl.java +++ b/src/com/massivecraft/factions/entity/BoardColl.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.entity; import com.massivecraft.factions.TerritoryAccess; import com.massivecraft.massivecore.collections.MassiveMap; import com.massivecraft.massivecore.collections.MassiveSet; +import com.massivecraft.massivecore.entity.MassiveCoreMConf; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.store.Coll; import com.massivecraft.massivecore.util.MUtil; @@ -47,8 +48,14 @@ public class BoardColl extends Coll implements BoardInterface if (oid == null) return null; if (oid instanceof String) return (String)oid; if (oid instanceof Board) return ((Board)oid).getId(); - - return MUtil.extract(String.class, "worldName", oid); + + boolean debug = MassiveCoreMConf.get().debugEnabled; + String ret = MUtil.extract(String.class, "worldName", oid); + if (ret != null && debug) + { + System.out.println("extracted world name from " + oid); + } + return ret; } // -------------------------------------------- //