[INACTIVE] NoCivilSpawns v1.4.7 - allow/deny mob spawns in areas + world specific opts +whitelist

Discussion in 'Inactive/Unsupported Plugins' started by Sleaker, Apr 6, 2011.

  1. Offline

    Sleaker

    NoCivilSpawns:
    Version: v1.4.7
    Cancels spawning of creatures on trees, or inside player-made areas like CivilizedSpawns.

    WARNING: Because of Minecraft's Architecture and how it creates entity spawns, this plugin is highly discouraged for Production-Level servers and those which regularly run more than 15 users online at a time. Using NoCivilSpawns on high pop servers will most likely result in massive Tic degradation and an unstable server. You have been warned.

    Download: See Warning!
    Source Code
    Install:
    Download the NoCivilSpawns.jar and place it in your /plugins/ directory.

    See source code page for the readme on configuration options​
     
  2. Offline

    Sleaker

  3. Offline

    trigger281

    Code:
    08:44:04 [SEVERE] Could not pass event CREATURE_SPAWN to NoCivilSpawns
    java.lang.NullPointerException
            at com.sleaker.NoCivilSpawns.NoSpawnCreatureSpawnEvent.onCreatureSpawn(NoSpawnCreatureSpawnEvent.java:42)
            at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:516)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:228)
            at net.minecraft.server.World.a(World.java:1790)
            at net.minecraft.server.Chunk.addEntities(Chunk.java:470)
            at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:75)
            at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:344)
            at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:296)
            at com.onarandombox.Rigby.MultiVerse.MultiVerse.loadWorlds(MultiVerse.java:415)
            at com.onarandombox.Rigby.MultiVerse.MultiVerse.onEnable(MultiVerse.java:158)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
     
  4. Offline

    Sleaker

    @trigger281 Just posting the error doesn't do much for me. When did you get the error? Was it during a /reload (this doesn't always work well). Was it on the base world, a multiworld? More information please!
     
  5. Offline

    Jake Rees

    @Sleaker pigs and spiders and sheep are still spawning and this is my blacklist


    Code:
    Brotopia:
        cubeRadius: 10
        diamondEnabler: true
        monstersOnly: false
        blacklistMobs:
        - Spider
        - pig
        - Chicken
        - Creeper
        - Zombie
        - Slime
        - Skeleton
        - Pig Zombie
        - Cow
        whitelistMobs:
        - Wolf
        goldBlocker: false
        quickTest: true
        cubeHeight: 5
        ironBlocker: false
     
  6. Offline

    Sleaker

    @Jake Rees
    pig should have a capitol P. - mob names are case sensitive. also Pig Zombie is one word, should be PigZombie -

    not sure about Spiders, I added a log checker to it to debug and it is definitely canceling spider spawns every time.

    I'll just mention right now. Setting everything on blacklist and only allowing wolves can potentially cause huge amounts of lag. MC Server will continually attempt to spawn over and over regardless of how the event is canceled. If you don't want monsters to spawn but want to allow wolves you shouldn't use a spawn cancelling plugin. You should disable monster/creature spawns completely via the server.properties and then use another plugin to Spawn in wolves - I think there are a couple plugins that can do this.

    Here's the order of checking once an event triggers
    Whitelist -> Allow Immediately
    Blacklist -> Deny Immediately
    Diamond/Spawn Block -> Allow Immediately
    QuickTester(shortlist + gold/iron) -> Deny Immediately
    Tree Check -> Deny if 4 tree blocks found
    Main Check -> Deny if 15 blocks or Immediately if Gold/Iron found
     
  7. Offline

    Jake Rees

    @Sleaker sorry i was totally confused. so adding nothing to the blacklist or whitelist, makes it so that only monsters will no spawn in civilized areas??
     
  8. Offline

    Sleaker

    @Jake Rees - if you want just monsters (Spiders, Skeles, Zombies etc) to be blocked in player made areas simply set:
    monstersOnly: true

    This adds all 'creatures' (Pigs, Cows, Chickens etc) to the whitelist (which makes it so they aren't blocked by my plugin).
     
    maxicus likes this.
  9. Offline

    Jack Bartlett

    How do I use this?
     
  10. Offline

    Novae7

    after i installed the addon i was killed by invisible slimes?!

    after disable the addon the slime was visible and i killed him...

    Any ideas?

    Bukkit 740
     
  11. Offline

    Sleaker

    @Novae7 - that's either a bukkit bug or a MC client bug. I know slimes used to be horribly buggy for clients, it's possible that one of the slime bugs creeped back in.. Simply reconnecting used to fix this. My plugin has no functionality except to set events as cancelled if conditions are met, I'd suggest asking in the bukkit forums about this.
     
  12. Offline

    Novae7

    Reconnect and Server-restart didnt work ;(

    the slime didnt move he stand invisible at the same place the whole time
    killing was impossible and i didnt see any ID with F3

    but if me or another player moved in the 2x2x2 square we was damaged....

    after disabling the addon and restart the server i have seen the slime and killed him...
     
  13. Offline

    ENDG4MER

    Hello, I've been noticing a bug since 1.4.1 of NoCivilSpawn, which I love by the way. What will happen is that, when trying to place a block, at times the block cannot be placed; it disappears instantly and is returned to my inventory. No matter what block I place, this happens. Restarting the server did not alleviate the problem, and no other player could place a block in that location either. Removing NoCivilSpawn and restarting the server resulted in a spawned mob appearing where the block could not be set, making me think that perhaps the spawn cancel might have become 'stuck', rendering that block space unusable until it terminated.

    I am using stock NoCivilSpawn options aside from a whitelisting of Wolves, to prevent friendly wolves from despawning in towns. I am running the recommended CraftBukkit 733, and confirmed this issue remained with other mods, with no other mods, and did not remain in a clean server nor CraftBukkit. When other plugins were installed, removed one at a time until NoCivilSpawns was the only plugin available, and the problem persisted. Only once this plugin was removed did the spawn appear and the problem go away.

    For other relevant information, I'm running CraftBukkit alongside SimpleServer Wrapper 7.2 on a Windows 7 x64 machine. Please let me know if there's a fix for this issue.
     
  14. Offline

    Indyhouse

    Do I just remove a world from the config.yml file if I don't want any protection in it at all?
     
  15. Offline

    Sleaker

    to turn off protection for a world add all mobtypes to a whitelist (Yah I know kind of sucky, but I didn't think about not having it enabled on a world haha). I'll update it with a new enabled option that defaults to true for the next version.

    After talking with a dev on the bukkit team and looking at this it just seems like it's one of those minecraft oddities.

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

    ENDG4MER

    So nothing can be done, and no matter what kind of despawner is used, this can happen? Somewhat depressing, but it can be fixed by disabling the plugin temporarily, so I suppose it doesn't matter too much. Pain in the butt, though.
     
  17. Offline

    Sleaker

    @ENDG4MER Yup can potentially happen with anything that sets the spawns as canceled anything that lets them spawn then kills them would work, but that'd be more intensive.
     
  18. Offline

    Nitnelave

    I've got the same error as @trigger281 , but on multiworld with the plugin Nethrar (I checked, it's only when there's multiworld). It shows up on server load, bukkit #740, Nethrar 1.4, NoCivilSpaws 1.4.2
    Also, I don't know why, but it did work before, with multiworld, but since I changed the server port (or the config for civilspawns, I'll put it at the end), it broke.
    Code:
    10:20:59 [SEVERE] Could not pass event CREATURE_SPAWN to NoCivilSpawns
    java.lang.NullPointerException
        at com.sleaker.NoCivilSpawns.NoSpawnCreatureSpawnEvent.onCreatureSpawn(NoSpawnCreatureSpawnEvent.java:42)
        at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:516)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:228)
        at net.minecraft.server.World.a(World.java:1790)
        at net.minecraft.server.Chunk.addEntities(Chunk.java:470)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:75)
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:344)
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:296)
        at org.akrieger.Nethrar.Nethrar.onEnable(Nethrar.java:96)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    10:20:59 [SEVERE] Could not pass event CREATURE_SPAWN to NoCivilSpawns
    java.lang.NullPointerException
        at com.sleaker.NoCivilSpawns.NoSpawnCreatureSpawnEvent.onCreatureSpawn(NoSpawnCreatureSpawnEvent.java:42)
        at org.bukkit.plugin.java.JavaPluginLoader$51.execute(JavaPluginLoader.java:516)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:228)
        at net.minecraft.server.World.a(World.java:1790)
        at net.minecraft.server.Chunk.addEntities(Chunk.java:470)
        at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:75)
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:344)
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:296)
        at org.akrieger.Nethrar.Nethrar.onEnable(Nethrar.java:96)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    Code:
    World2:
        diamondEnabler: false
        monstersOnly: true
        blacklistMobs: null
        whitelistMobs: Wolf
        goldBlocker: true
        quickTest: true
        ironBlocker: true
        cubeRadius: 10
        cubeHeight: 5
    netherWorld:
        diamondEnabler: false
        monstersOnly: false
        blacklistMobs: null
        whitelistMobs: null
        goldBlocker: false
        quickTest: true
        ironBlocker: false
        cubeRadius: 10
        cubeHeight: 5
     
  19. Offline

    Plague

    you need to keep latest 2 changes outside a spoiler, edited
     
  20. Offline

    Sleaker

    @Nitnelave - just tested with a new nether and a world named MythWeaves that I already had for testing by installing nethrar and swapping the first worldname - the only error I got was A WG error similar to yours. removing WG and restarting/reloading etc did not produce any errors.

    Your whitelistMobs may be improper. try returning and putting - Wolf indented one extra space.
    other than that, delete your config and try again.
     
  21. Offline

    soloman981

    What do you think about mob limit like in moblimiter plugin ?
     
  22. Offline

    Sleaker

    @soloman981 - if you mean a plugin that limits the total number of mobs on the server or total number in a chunk. I think at this time they cause almost as much server strain as just letting the mob spawn because of how minecraft continually attempts to spawn mobs to 'replace' canceled spawn events. This wont be an issue if we get api access to World.setSpawnFlags so when that happens I'll happily add a setting that hard caps mob spawns on a given world.
     
  23. Offline

    Nitnelave

    I thought it worked like a charm, but actually it's only on reload. On server startup, the errors show up (WG activated, doesn't display any error of its own). but on reload not. I haven't tested if the plugin works correctly (any good way?), but if it works I can do a reload after each startup. Thanks for the support. (BTW, I indented the Wolf one notch more than whitelist, but it keeps indenting it back to the same level. Anyway, it gets accounted for)
     
  24. Offline

    Shortee

    I noticed some strange things on our server.
    We had some small places (most times a few (air)blocks on the surface) where nobody could build. I disabled your plugin, reloaded and monsters appeared at this places. So they somehow where invisible and inactive but influenced these spots.
    (i hope i discribed it understandable, english is not my native language)
     
  25. Not generating config file :/
     
  26. Offline

    Sleaker

    right, this is a MC issue with how spawn cancellations happen. nothing I can do about it right now.
     
  27. Offline

    Nitnelave

    I don't want to be annoying, but I still get the same error, a whole bunch of times on server startup (but not on reload) :
    error (open)
    2011-05-17 01:44:37 [SEVERE] Could not pass event CREATURE_SPAWN to NoCivilSpawns
    java.lang.NullPointerException
    at com.sleaker.NoCivilSpawns.NoSpawnCreatureSpawnEvent.onCreatureSpawn(NoSpawnCreatureSpawnEvent.java:42)
    at org.bukkit.plugin.java.JavaPluginLoader$54.execute(JavaPluginLoader.java:560)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:289)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:228)
    at net.minecraft.server.World.a(World.java:1798)
    at net.minecraft.server.Chunk.addEntities(Chunk.java:470)
    at net.minecraft.server.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:75)
    at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:393)
    at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:345)
    at org.akrieger.Nethrar.Nethrar.onEnable(Nethrar.java:96)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:676)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:249)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:131)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:218)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:205)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:145)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:260)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

    If it is a conflict with WG, can you work out a solution with them? or maybe it is because your plugin starts before theirs and it is problematic, in which case you could make it load later on? Please help, it is awfully spamming my log... apart from that, your plugin seems to work (no spawn on trees as far as I can tell)
     
  28. Offline

    trigger281

    I can not change the options cubeRadius: 10 because after I changed the reload value without interruption for 10
     
  29. Offline

    Sleaker

  30. Offline

    rabidkitty4

    Any way to stop the Server log from being filled with nothing but NoCivilSpawn cancellations? I don't need to be told every time a creeper's spawn is cancelled. Especially if there are thousands of them.
     
  31. Offline

    Sleaker

    @rabidkitty4 - fixed in 1.4.4 - sorry bout that, missed a message from previous logging :)
     
    rabidkitty4 likes this.

Share This Page