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,10 +1876,14 @@ import java.util.regex.Pattern;
|
||||
eventType = PlayerBlockEventType.TELEPORT_OBJECT;
|
||||
break;
|
||||
default:
|
||||
int blockId = ((LegacyPlotBlock) PlotSquared.get().IMP.getLegacyMappings()
|
||||
.fromStringToLegacy(blockType.name())).id;
|
||||
if (blockId > 197) {
|
||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||
LegacyPlotBlock legacyPlotBlock =
|
||||
(LegacyPlotBlock) PlotSquared.get().IMP.getLegacyMappings()
|
||||
.fromStringToLegacy(blockType.name());
|
||||
if (legacyPlotBlock != null) {
|
||||
int blockId = legacyPlotBlock.id;
|
||||
if (blockId > 197) {
|
||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user