use of org.lanternpowered.server.network.vanilla.message.type.play.MessagePlayOutSetDifficulty in project LanternServer by LanternPowered.
the class LanternWorldProperties method setDifficulty.
@Override
public void setDifficulty(Difficulty difficulty) {
checkNotNull(difficulty, "difficulty");
if (this.getDifficulty() != difficulty && this.world != null) {
this.world.broadcast(() -> new MessagePlayOutSetDifficulty((LanternDifficulty) difficulty));
}
this.worldConfig.setDifficulty(difficulty);
}
Aggregations