mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2025-01-24 17:11:55 +01:00
Fix NPE if class sign uses an unknown class
This commit is contained in:
parent
bdf5b54975
commit
5b77ab4e8c
@ -59,13 +59,17 @@ public class ClassesSign extends DSign {
|
||||
|
||||
@Override
|
||||
public void onInit() {
|
||||
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();
|
||||
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());
|
||||
|
||||
getGameWorld().getClassesSigns().add(getSign());
|
||||
} else {
|
||||
markAsErroneous();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user