Cuberite Forum
cPlayer function - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: cPlayer function (/thread-1892.html)



cPlayer function - Sources - 04-28-2015

So, I'm updating a plugin called: Battle of Minecraft.

The documentation doesn't really explain things clearly.

I'm asking about the AddEntityEffect function for cPlayer.
The problem is that I have put the thing correctly, but I don't know its parameters.
On the documentation it says, EffectType and then cEntityEffect. I don't know what EffectType is.

Can anyone help? Thanks.


RE: cPlayer function - worktycho - 04-28-2015

An effectType is one of the constants from cEntityEffect. There listed here: http://mc-server.xoft.cz/LuaAPI/cEntityEffect.html


RE: cPlayer function - xoft - 04-28-2015

Another problem could be that the current API doesn't seem to allow creating the cEntityEffect class from Lua, so you can't really use the AddEntityEffect function. I guess we'll need to change this API somewhat. I think it would be better to leave out the cEntityEffect class from it, and just pass all the needed info to AddEntityEffect() directly as parameters.


RE: cPlayer function - Sources - 04-28-2015

The required parameter is EffectType. This is no documentation for EffectType.

[u]EDIT:[/uI just saw what you said. Smile
Thanks! I'll start testing it.