Any better way to cancel CreatureSpawn in 1.8?

Discussion in 'Plugin Help/Development/Requests' started by nj2miami, Feb 8, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    nj2miami

    OK, so I have read many threads on the topic of cancelling CreatureSpawn as a bad idea citing memory consumption. My question would be, with the number of servers running WorldGuard, which DOES cancel the CreatureSpawnEvent, how accurate could this statement regarding lag / memory leaks be?

    Aside from BKCommonLib, which does not work under 1.8 (to my knowledge), to utilize the CreaturePreSpawnEvent logic, is there a discrete way to cancel the event? Is there really much truth in the "memory leak" discussion at all? Is cancelling the event not as bad as they make it seem?

    I guess I cannot find it that believable that the event would cause so much chaos, lag and memory leaks in such a widely used plugin without countless cries of lag and TPS hits if that was the case. Instead, I find a handful of reiterated comments describing the likely effect of cancelling the event causing lag.

    I'll be honest that I have not run any considerable testing to counter the statement, but I would guess the forums would be full of TPS/lag related questions all pointing to WorldGuard as the culprit if that were the case. Minecraft calls the CreatureSpawnEvent countless times, every tick of every second.

    Won't garbage collection clean up the mess left behind from a few hundred, or even a few thousand orphan cancelled entities? Even a few thousand strays could only possible account for a few MEGS of memory usage which would simply be collected, no?

    Just some food for discussion, because I'm just not convinced cancelling the CreatureSpawnEvent is as devastating as it has been discussed. At least not without some tangible proof and not rhetoric or hearsay.
     
  2. Moved to Bukkit Alternates.
     
Thread Status:
Not open for further replies.

Share This Page