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