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;
|
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()
|
||||||
if (blockId > 197) {
|
.fromStringToLegacy(blockType.name());
|
||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
if (legacyPlotBlock != null) {
|
||||||
|
int blockId = legacyPlotBlock.id;
|
||||||
|
if (blockId > 197) {
|
||||||
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user