07-11-2012, 04:59 AM
Didn't get a chance to look to closely, but is database storage implemented for plugins?
If we had databases cross plugin communication could be simplified quite a bit.
Also. Is there some way to stop a script from "cancelling" the event by returning a value? I read somewhere returning a true (or false maybe?) from the hook cancels the rest of the plugins.
All plugins should be given a chance to break your server, in my opinion at least.
Say we breed two cows.
We have 2 plugins that work off a breeding event hook.
1. Cancels the spawn if to many npcs exist in 2 chunks. (Just an example)
2. Has a chance to spawn a mooshroom from breeding 2 cows. (Mutations)
Scenario 1
Say plugin 1 detects you have to many animals and cancels the event. However plugin 2 will not attempt to spawn it.
This is fine, maybe not quite desirable, but it works.
Scenario 2
Say plugin 2 runs first and spawns a mooshroom. It would then proceed to cancel the event. Plugin 1 will not limit this spawn because it would not run.
This is a no-go, it should still be able to prevent spawning.
Now these are just examples and may not be 100% realistic, but there is certainly more opportunities for modular plugins where things like this could break.
Speaking of which, do we even get a breed event hook yet?
If we had databases cross plugin communication could be simplified quite a bit.
Also. Is there some way to stop a script from "cancelling" the event by returning a value? I read somewhere returning a true (or false maybe?) from the hook cancels the rest of the plugins.
All plugins should be given a chance to break your server, in my opinion at least.
Say we breed two cows.
We have 2 plugins that work off a breeding event hook.
1. Cancels the spawn if to many npcs exist in 2 chunks. (Just an example)
2. Has a chance to spawn a mooshroom from breeding 2 cows. (Mutations)
Scenario 1
Say plugin 1 detects you have to many animals and cancels the event. However plugin 2 will not attempt to spawn it.
This is fine, maybe not quite desirable, but it works.
Scenario 2
Say plugin 2 runs first and spawns a mooshroom. It would then proceed to cancel the event. Plugin 1 will not limit this spawn because it would not run.
This is a no-go, it should still be able to prevent spawning.
Now these are just examples and may not be 100% realistic, but there is certainly more opportunities for modular plugins where things like this could break.
Speaking of which, do we even get a breed event hook yet?