Fix NPE if class sign uses an unknown class

This commit is contained in:
Daniel Saukel 2016-07-28 16:13:37 +02:00
parent bdf5b54975
commit 5b77ab4e8c

View File

@ -59,13 +59,17 @@ public class ClassesSign extends DSign {
@Override
public void onInit() {
if (dClass != null) {
getSign().setLine(0, ChatColor.DARK_BLUE + "############");
getSign().setLine(1, ChatColor.DARK_GREEN + dClass.getName());
getSign().setLine(2, "");
getSign().setLine(3, ChatColor.DARK_BLUE + "############");
getSign().update();
getGameWorld().getClassesSigns().add(getSign());
} else {
markAsErroneous();
}
}
@Override