Implements some Java 14 code migrations

This commit is contained in:
2021-10-09 23:41:19 +02:00
parent 3a8943baef
commit 7a9dbb8046
3 changed files with 3 additions and 6 deletions

View File

@ -980,14 +980,13 @@ public class Portal {
*/
public final void drawSign() {
BlockState state = getSignLocation().getBlock().getState();
if (!(state instanceof Sign)) {
if (!(state instanceof Sign sign)) {
Stargate.logger.warning(Stargate.getString("prefix") + "Sign block is not a Sign object");
Stargate.debug("Portal::drawSign", "Block: " + getSignLocation().getBlock().getType() + " @ "
+ getSignLocation().getBlock().getLocation());
return;
}
Sign sign = (Sign) state;
SignHelper.drawSign(sign, this);
}