Fix of issue 1123

Fix of issue 1123
Didn't check the whole code, but WorldEdit should be loaded when an INSTANCE of FAWE is set. (Since this is a core class, I didn't use the Bukkit API)
This commit is contained in:
xSamagon 2018-09-15 23:46:19 +02:00
parent 671c781a7c
commit 71dedf61d8

View File

@ -201,11 +201,15 @@ public class Fawe {
* @param s * @param s
*/ */
public static void debug(Object s) { public static void debug(Object s) {
if (INSTANCE != null) // Fix of issue 1123 - Didn't check the whole code, but WorldEdit should be loaded when an INSTANCE of FAWE is set. (Since this is a core class, I didn't use the Bukkit API)
{
Actor actor = Request.request().getActor(); Actor actor = Request.request().getActor();
if (actor != null && actor.isPlayer()) { if (actor != null && actor.isPlayer()) {
actor.print(BBC.color(BBC.PREFIX.original() + " " + s)); actor.print(BBC.color(BBC.PREFIX.original() + " " + s));
return; return;
} }
}
debugPlain(BBC.PREFIX.original() + " " + s); debugPlain(BBC.PREFIX.original() + " " + s);
} }