Fixes a potential exception when a portal with an invalid gate type is missing a sign
This commit is contained in:
parent
4b34ea3cf5
commit
27b964837f
@ -293,7 +293,10 @@ public class PortalSignDrawer {
|
||||
* @param lineIndex <p>The index of the line the invalid portal was found at</p>
|
||||
*/
|
||||
public static void markPortalWithInvalidGate(PortalLocation portalLocation, String gateName, int lineIndex) {
|
||||
Sign sign = (Sign) portalLocation.getSignLocation().getBlock().getState();
|
||||
BlockState blockState = portalLocation.getSignLocation().getBlock().getState();
|
||||
if (!(blockState instanceof Sign sign)) {
|
||||
return;
|
||||
}
|
||||
sign.setLine(3, errorColor + Stargate.getString("signInvalidGate"));
|
||||
sign.update();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user