PHP: function freezePlayers( EntityMoveEvent $event) { if( $event->getEntity instanceof Player ) { $event->setCancelled(); }}
Depends when you want it to be unfrozen. Add a conditional that suits your needs, and it should work.
If I use PlayerMoveEvent would it still be onPlayerMove? I want to fix that annoying simple auth bug.
These are the player events @iJoshuaHD PlayerAchievementAwardedEvent PlayerAnimationEvent PlayerChatEvent PlayerCommandPreprocessEvent PlayerDeathEvent PlayerDropItemEvent PlayerEvent PlayerGameModeChangeEvent PlayerInteractEvent PlayerItemConsumeEvent PlayerItemHeldEvent PlayerJoinEvent PlayerKickEvent PlayerLoginEvent PlayerPreLoginEvent PlayerQuitEvent PlayerRespawnEvent
the docs is kinda outdated. refer the github instead: https://github.com/PocketMine/Pocke...c/pocketmine/event/player/PlayerMoveEvent.php
when you make the event function, it looks something like this: PHP: public function someName(Event $eventVariable) The name of the function (someName) and the $eventVariable don't matter. What matters is the Event, so as long as you're using the same Event, the function name can be different and it would do the same thing. SimpleAuth bug?
yes partially. but its buggy. it teleports player to void. thats why I made a temporary solution to that on my server.
I wish I knew that earlier xD Yes, SimpleAuth is really messed up right now, Sometimes /login and /register permissions fail & players can move without authentication.
if u still can't find it in jenkins, here: http://jenkins.pocketmine.net/job/PocketMine-MP-doc/doxygen/
Uh, hehe, just fyi, my plugin can do this. If you wanna look at the code I used, look here. Though, that code hasn't been used yet for my plugin (That's updated code, I haven't implemented it in my plugin, as I haven't got what I've been trying to do yet.)