[FIX/ADMN/MECH] EntitySuppressor v3.0- Limit Mobs, Reduce Lag! [1.4.7-R1.0]

Discussion in 'Archived: Plugin Releases' started by Fishrock123, Oct 3, 2011.

  1. Offline

    Fishrock123

    [​IMG]

    Moved to BukkitDev

    Features!
    Downloads [CB 1.2.5-R1.0]
    Changelog
    Source


    [​IMG]
     
    strontkever and FlamingArmor like this.
  2. Offline

    Justin Quach

    Well I herpderped. S: woops!
    Thanks, works like a charm now ;D
     
  3. Offline

    Fishrock123

    First off, ES does not remove any animals so as to avoid removing animals from people's farms.
    For it to work fully and properly, you may want to use /es remove all. (This is limited to removing animals for only the loaded chunks, however.)

    Secondly, if you have Chunk-Calculated maximums enabled, it will calculate the current maximum dynamically based off the the number of loaded chunks. See this.

    Really? Even if you change around the values? (I need to know that I'm not the only one who it actually works for.)
     
  4. Offline

    Mercury

    How do I disable 'Chunk-Calculated' ? Use zero ?
     
  5. Offline

    Fishrock123

    Just remove all worlds and associated values from those sections from the config.
     
  6. Offline

    Boby

    Can you please make this plugin stop monsters from spawning in a certian area? like i could use WE to select my points and then mobs (configurable preferablly) wont spawn in that certian area. if you can do this THANK YOU VERY MUCH! also if there is a plugin like this that already exists can you please tell me which one. i have searched all over bukkit to find one like this and i can find anythign. again THANK YOU
     
  7. Offline

    Fishrock123

    Obviously you haven't searched very far. Try towny, I think?
     
  8. Offline

    Fishrock123

    Updated to 2.0.2, this should fix the multiworld NPE.

     
  9. Offline

    CubieX

    After some more testing, it seems like the variable for the entity count runs full and then after all monsters has been removed regularly they are not replaced any more, because the pluign "thinks" the maimum number of monsters is allready reached. (or something like that...)

    I start out with let's say 80 Monsters and 120 animals.
    After a couple of minutes the monsters vanish. But as soon as I enter /es remove all
    the monsters reappear.
    This only works when using "remove all".
    Using "remove monsters" oder "remove animals" let no monsters reappear.

    Strange thing is, that monsters reappear from time to time without using /es remove all.
    But I could not pinpoint this to a certain game event.

    Could you please have a look at this?
    This can't be a general issue, just a false sign value, wrong assignment or perharps a messed up equation or condition. :/

    My Config (open)

    Code:
    LimitMonsters: true
    LimitSquid: true
    LimitAnimals: false
    MonsterMaximums:
      world: 128
      world_nether: 128
    ChunkCalculatedMonsterMaximums:
    SquidMaximums:
    ChunkCalculatedSquidMaximums:
    AnimalMaximums:
    ChunkCalculatedAnimalMaximums:
    ScanInterval: 100
    UseMonsterDistanceRemoval: true
    RemoveAtDistance: 128
    CancelSpawnAtDistance: 92
     
  10. Offline

    Fishrock123

    Are you using 2.0.2?

    Edit:

    Code:
    LimitSquid: true
    SquidMaximums:
    ChunkCalculatedSquidMaximums:
    You know that it doesn't limit them (the squid) unless you have atleast one world listed with a value, right?

    Edit2: Add the config node "UseSpawnFlags: false" And see if it works properly.
     
  11. Offline

    CubieX

    Yes, it's version 2.0.2

    Yes, I tested alot of things with the config. But I also used it with the
    "SquidMaximums:
    world: 128"
    entry. ;)

    Now I added the mentioned node. Well, this actually does something...!
    I tested a while with a few players on different locations on the map, and by using this node,
    monsters definately do not completely disappear over time. Very nice!
    When changing it to "true", they vanish again.

    So as far as I can say, it seems this one did the trick. ;)
    We will try this on our public server. If it works, I'll owe you something. ;)
     
  12. Offline

    Fishrock123

    Bizarre. That really shouldn't do that. Are you using spout or something weird?
     
  13. Offline

    CubieX

    Well, the Server has Spout installed. Some Plugins are using it.
     
  14. Offline

    strontkever

    It works now :) nice

    is there any way to make it ignore the mobspawners?
     
  15. Offline

    Fishrock123

  16. Offline

    strontkever

    Hmm i seem to get this error now when i start the server:

    Code:
    2012-01-14 20:58:53 [INFO] ES: Loading Config File...
    2012-01-14 20:58:53 [INFO] Use "end" to stop the server
    2012-01-14 20:58:53 [INFO] ES: Maximum monsters in `strontkever_nether` is currently: 97
    2012-01-14 20:58:53 [INFO] ES: Maximum squid in `strontkever_nether` is currently: 0
    2012-01-14 20:58:53 [INFO] ES: Maximum animals in `strontkever_nether` is currently: 0
    2012-01-14 20:58:53 [SEVERE] java.lang.NullPointerException
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getESWorld(ESMethods.java:21)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:39)
    2012-01-14 20:58:53 [INFO] [CraftProxy-Lite] Server console disabled
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:27)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.initialize(EntitySuppressor.java:65)
    2012-01-14 20:58:53 [INFO] Server listening on port: 20000
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.onEnable(EntitySuppressor.java:44)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:977)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:356)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:343)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-14 20:58:53 [INFO] ES: Maximum monsters in `guest` is currently: 0
    2012-01-14 20:58:53 [SEVERE] java.lang.NullPointerException
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getESWorld(ESMethods.java:21)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:39)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:27)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.initialize(EntitySuppressor.java:66)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.onEnable(EntitySuppressor.java:44)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:977)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:356)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:343)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-14 20:58:53 [INFO] ES: Maximum squid in `guest` is currently: 0
    2012-01-14 20:58:53 [SEVERE] java.lang.NullPointerException
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getESWorld(ESMethods.java:21)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:39)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.ESMethods.getCurrentMax(ESMethods.java:27)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.initialize(EntitySuppressor.java:67)
    2012-01-14 20:58:53 [SEVERE] 	at Fishrock123.EntitySuppressor.EntitySuppressor.onEnable(EntitySuppressor.java:44)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:230)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:977)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190)
    2012-01-14 20:58:53 [SEVERE] 	at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:356)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:343)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:175)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
    2012-01-14 20:58:53 [SEVERE] 	at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-14 20:58:53 [INFO] ES: Maximum animals in `guest` is currently: 0
    2012-01-14 20:58:53 [INFO] ES: Maximum monsters in `strontkever` is currently: 122
    2012-01-14 20:58:53 [INFO] ES: Maximum squid in `strontkever` is currently: 24
    2012-01-14 20:58:53 [INFO] ES: Maximum animals in `strontkever` is currently: 73
    2012-01-14 20:58:53 [INFO] ES: Maximum monsters in `strontkever_the_end` is currently: 200
    2012-01-14 20:58:53 [INFO] ES: Maximum squid in `strontkever_the_end` is currently: 0
    2012-01-14 20:58:53 [INFO] ES: Maximum animals in `strontkever_the_end` is currently: 0
    2012-01-14 20:58:53 [INFO] EntitySuppressor version 2.0.2 TEST (1M2) is enabled! {66 ms}
    2012-01-14 20:58:53 [INFO] ES Disclaimer:
    2012-01-14 20:58:53 [INFO] You are running a Testing version of EntitySuppressor!
    2012-01-14 20:58:53 [INFO] This version may contain unwanted bugs,
    2012-01-14 20:58:53 [INFO]  and new features may not be fully functioning.
    
    are they being limited by default? since i havent touched the advanced settings

    [edit]
    and what do the spawnflags do? explain please

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  17. Offline

    Fishrock123

    Spawners are limited by default.

    The SpawnFlags are your server.properties' AllowMonsters/Animals: <true/false>. (Defaults to use them.)
    You shouldn't need this unless something goes terribly haywire. (Such as CubieX above.)

    Also, Turning on that stuff should have no such errors, since that error stems from my methods class not being initiated properly; does it keep doing that?
     
  18. Offline

    strontkever

    thnx!

    can i disable:
    ChunkCalculatedMonsterMaximums

    etc?

    im trying to get as many monsters to spawn, but only around players

    or should i just make it a very high value?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  19. Offline

    Fishrock123

    If you would like it off, simply remove all worlds from those sections.
     
  20. Offline

    Fishrock123

    Updated:

    Also, the Multiworld NPE was fixed in v2.0.2
     
  21. Offline

    Mathew Alden

    So... this would allow me to remove all hostile mobs from one of my worlds but not the others?

    Cause I need to do that...
     
  22. Offline

    Fishrock123

    Remove them? Umm.. do you need to wipe them from the world's data files or just keep them from spawning?

    "/es remove" Only works in loaded chunks due to technical reasons...

    Updated (Bugfix patch)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  23. Offline

    Mathew Alden

    Keep them from spawning. At all. Everywhere.

    Like peaceful.

    Is there anything that does that?
    Anything that lets me have monsters on but puts one world as if the monsters were off?
     
  24. Offline

    Fishrock123

    Totally, did you look at the config link?

    Set that world's MonsterMaximum to 0.

    Remove all other world entries.
     
  25. Offline

    Mathew Alden

    K. Thanks. :)
     
  26. Offline

    Fishrock123

  27. Offline

    Mike L

    Hello, I am having a bit of a problem on my server and I am trying to figure out if this plugin will actually help.
    Problem:
    I run a survival/pvp server and my players are often building "mob farmers" to gain XP for enchanting. Basically these mob farmers damage (without killing) the mobs and store them in an area for easy killing later. I don't have a problem with people acquiring XP this way, but my players are also building "afk machines" so they can afk there, without being kicked. People who heavily abuse this may let hundreds, possibly thousands of mobs build up and it has the potential to cause server lag.
    Questions:
    1:Does this plugin monitor mobs on a chunk by chunk basis? or is it world wide?
    If it is world wide, I'd imaging these mob spawners would just cause more problems by limiting real world spawns when people afk at them.
    2:Does anyone have any suggestions on ways I can fix this problem I'm having?

    Thanks for reading!

    ~TSG
    mc.fatfreesmp.com
     
  28. Offline

    Fishrock123

    1:Per-world. Per-chunk would probably cause more lag than it would fix, I think?
    I can try making a per-chunk version, but I don't guarantee anything.

    2:Make a rule and ban stupid people who do that? I can make an on-command detector for it.
     
  29. Offline

    Mike L

    That would be AMAZING! An idea for this "detection command" would be to scan chunks around every player and report any that are above a certain threshold for mobs, that would be awesome, if possible :)

    Also this could even be automated to scan player nearby mobs once every 30 minutes or something?

    I'm sure this is much easier said then done, but if it was possible it would be very much appreciated. Thanks so much for your quick reply, keep up the great work!

    ~TSG
    mc.fatfreesmp.com
     
  30. Offline

    Fishrock123

    Maybe I will add this to ES...

    Something tells me a full-server scan would cause split-second lag.

    It's actually very easy code-wise to scan for single chunks that have high monsters.

    Code:java
    1. for (World w : Bukkit.getWorlds()) {
    2. for (Chunk c : w.getChunks()) {
    3. if (c.getEntities().length > THRESHOLD) {
    4. //Do stuff
    5. }
    6. }
    7. }
    8.  
    9. //Similarly
    10. if (Player.getChunk().getEntities().length > THRESHOLD) {
    11. //Do stuff
    12. }
     
  31. Offline

    strontkever

    Hello, great plugin :)
    --
    im mainly using this to remove distant monsters (why would we need em there ;))
    and it works fine
    --
    i also used the perchunkcalculatedmonstermaximums, but theres something wrong with it
    at start it works fine, but after a while (minutes-hour),
    /es count:
    monsters max: eg. 150
    counted monsters: 1

    so 150 monsters can spawn but for some reason it will end up only with 1 monster in the whole world

    if i type /es reload then
    and count monsters again, they all start spawning again

    disabling this feature fixes the problem, monsters just spawn with large armounts

    strontkever

    and another thing,

    your plugin also counts npc's from citizens as players, is there a something u can do about this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016

Share This Page