Lua hooks needed!
I think the client sends the Move packet about once a second even when the player is not moving at all; MCServer updates position upon receiving that packet and thus calls PLAYER_MOVED-hook every tick. You'll need to work around that, I don't think we'll be changing that behavior.
Reply
Thanks given by:
can you add a HOOK_COMMAND that will be called whenever a player uses a command?
Reply
Thanks given by:
and if you have return true the player wont be able to use a command, but also a way that he can use a command. i need that for a login plugin i am making. that someone only can use /login and /register when he logs in.
Reply
Thanks given by:
The problem with commands is, no-one besides the plugin knows if the text specified really is a command or not.
Each command handler returns true if the command is handled, false if not; and only after handler returning true does MCServer know that it has really been a command.

Yes, we can plug something in that would fire on anything that *looks* like a command. But that feels wrong.
Reply
Thanks given by:
can't you do somthing that it respons to everything with a / before it? if not how would you forbid a player to use a command?
Reply
Thanks given by:
Yes, that's possible, but if a plugin registers a command without the slash, that command will still be usable because the hook wouldn't fire for it. That's the "feels wrong" I was talking about.
Reply
Thanks given by:
so then, whats the best way to refuse a command exept for a few? maybe you can do something like Player:RemovePermissions() and that he has no permissions left and that you can do Player:AddPermission("login.register") to make him able to use some other commands. after he did /login i can do Player:LoadPermissionsFromDisk() so he has his normal permissions again.
Reply
Thanks given by:
Hmm, there may be a way, let me check it first Smile
Reply
Thanks given by:
thanks Smile
Reply
Thanks given by:
For what reason do you want to forbid a player to use any commands?

If it's some kind of login system you should just make sure all players start out in a group with no permissions, that way they can only use commands that do not need permissions (these are most likely harmless anyway)
Reply
Thanks given by:




Users browsing this thread: 17 Guest(s)