Skip to content

Commit

Permalink
Merge branch 'master' into feature/is-skript-command
Browse files Browse the repository at this point in the history
  • Loading branch information
AyhamAl-Ali authored Apr 27, 2021
2 parents ea3a0ee + 4f5ac2e commit e39e2da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/ch/njol/skript/expressions/ExprDifficulty.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public void change(Event e, @Nullable Object[] delta, ChangeMode mode) {
Difficulty difficulty = (Difficulty) delta[0];
for (World world : getExpr().getArray(e)) {
world.setDifficulty(difficulty);
if (difficulty != Difficulty.PEACEFUL)
world.setSpawnFlags(true, world.getAllowAnimals()); // Force enable spawn monsters as changing difficulty won't change this by itself
}
}

Expand Down

0 comments on commit e39e2da

Please sign in to comment.