mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56:45 +01:00
Fix NPE when right-clicking a >1.13 block
This commit is contained in:
parent
3e8308ecd7
commit
8710f2f83b
@ -1876,11 +1876,15 @@ import java.util.regex.Pattern;
|
|||||||
eventType = PlayerBlockEventType.TELEPORT_OBJECT;
|
eventType = PlayerBlockEventType.TELEPORT_OBJECT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
int blockId = ((LegacyPlotBlock) PlotSquared.get().IMP.getLegacyMappings()
|
LegacyPlotBlock legacyPlotBlock =
|
||||||
.fromStringToLegacy(blockType.name())).id;
|
(LegacyPlotBlock) PlotSquared.get().IMP.getLegacyMappings()
|
||||||
|
.fromStringToLegacy(blockType.name());
|
||||||
|
if (legacyPlotBlock != null) {
|
||||||
|
int blockId = legacyPlotBlock.id;
|
||||||
if (blockId > 197) {
|
if (blockId > 197) {
|
||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lb = new BukkitLazyBlock(PlotBlock.get(block.getType().toString()));
|
lb = new BukkitLazyBlock(PlotBlock.get(block.getType().toString()));
|
||||||
|
Loading…
Reference in New Issue
Block a user