Merge pull request #1131 from xSamagon/master

Fix of issue #1123
This commit is contained in:
Jesse Boyd 2018-09-16 11:57:45 +10:00 committed by GitHub
commit b7f1ee30c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -201,11 +201,15 @@ public class Fawe {
* @param s
*/
public static void debug(Object s) {
Actor actor = Request.request().getActor();
if (actor != null && actor.isPlayer()) {
actor.print(BBC.color(BBC.PREFIX.original() + " " + s));
return;
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();
if (actor != null && actor.isPlayer()) {
actor.print(BBC.color(BBC.PREFIX.original() + " " + s));
return;
}
}
debugPlain(BBC.PREFIX.original() + " " + s);
}