Prevent getting engine when disabled

This commit is contained in:
CocoTheOwner 2020-12-20 20:48:05 +01:00
parent 68214cf16f
commit 5003f69e8e

View File

@ -36,15 +36,22 @@ public class EnginePlayer {
{ {
for(IrisEffect j : region.getEffects()) for(IrisEffect j : region.getEffects())
{ {
try {
j.apply(player, getEngine()); j.apply(player, getEngine());
} catch (NullPointerException e) {
player.sendMessage("Unable to play Engine");
e.printStackTrace();
}
} }
} }
if(biome != null) if(biome != null)
{ {
for(IrisEffect j : biome.getEffects()) try {
{
j.apply(player, getEngine()); j.apply(player, getEngine());
} catch (NullPointerException e) {
player.sendMessage("Unable to play Engine");
e.printStackTrace();
} }
} }
}); });