Fix ClassCastException in runEntityTask

This commit is contained in:
dordsor21 2019-02-06 16:38:01 +00:00
parent e41060ad65
commit 6711788dd0

View File

@ -365,8 +365,12 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
if (meta.isEmpty()) { if (meta.isEmpty()) {
continue; continue;
} }
Plot origin = (Plot) meta.get(0).value(); PlotId originPlotId = (PlotId) meta.get(0).value();
if (!plot.equals(origin.getBasePlot(false))) { if (originPlotId == null) {
iterator.remove();
entity.remove();
}
if (!plot.getId().equals(originPlotId)) {
if (entity.hasMetadata("ps-tmp-teleport")) { if (entity.hasMetadata("ps-tmp-teleport")) {
continue; continue;
} }