mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
Setting for disabling the physics limiter
This commit is contained in:
parent
9e6c90430d
commit
50504a0fe5
@ -13,16 +13,18 @@ import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
|
||||
public class ChunkListener implements Listener {
|
||||
public ChunkListener() {
|
||||
Bukkit.getPluginManager().registerEvents(ChunkListener.this, Fawe.<FaweBukkit>imp().getPlugin());
|
||||
TaskManager.IMP.repeat(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
physicsFreeze = false;
|
||||
itemFreeze = false;
|
||||
physicsLimit = Settings.TICK_LIMITER.PHYSICS;
|
||||
itemLimit = Settings.TICK_LIMITER.ITEMS;
|
||||
}
|
||||
}, 1);
|
||||
if (Settings.TICK_LIMITER.ENABLED) {
|
||||
Bukkit.getPluginManager().registerEvents(ChunkListener.this, Fawe.<FaweBukkit>imp().getPlugin());
|
||||
TaskManager.IMP.repeat(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
physicsFreeze = false;
|
||||
itemFreeze = false;
|
||||
physicsLimit = Settings.TICK_LIMITER.PHYSICS;
|
||||
itemLimit = Settings.TICK_LIMITER.ITEMS;
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private int physicsLimit = Integer.MAX_VALUE;
|
||||
|
@ -230,6 +230,8 @@ public class Settings extends Config {
|
||||
|
||||
@Comment("Generic tick limiter (not necessarily WorldEdit related, but still useful)")
|
||||
public static class TICK_LIMITER {
|
||||
@Comment("Enable the limiter")
|
||||
public static boolean ENABLED = true;
|
||||
@Comment("Max physics per tick")
|
||||
public static int PHYSICS = 500000;
|
||||
@Comment("Max item spawns per tick")
|
||||
|
Loading…
Reference in New Issue
Block a user