Add nullcheck on signline
This commit is contained in:
@@ -95,6 +95,8 @@ public class PlayerListener extends EventListener {
|
|||||||
if (shopHandler.isShopMaterial(bRelative)) {
|
if (shopHandler.isShopMaterial(bRelative)) {
|
||||||
Sign signBlock = (Sign) b.getState();
|
Sign signBlock = (Sign) b.getState();
|
||||||
Component signLine = event.line(0);
|
Component signLine = event.line(0);
|
||||||
|
if (signLine == null)
|
||||||
|
return;
|
||||||
String signLineString = PlainTextComponentSerializer.plainText().serialize(signLine);
|
String signLineString = PlainTextComponentSerializer.plainText().serialize(signLine);
|
||||||
if (!signLineString.equalsIgnoreCase(Config.shopCreationWord))
|
if (!signLineString.equalsIgnoreCase(Config.shopCreationWord))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user