jasonw4331 / MyPlot

Plot and protection plugin for PocketMine-MP
https://discord.gg/Qqcpp9Q
MIT License
101 stars 90 forks source link

Add EntityTeleportEvent to trigger MyPlotPlayerEnterPlotEvent #322

Closed AngelliaX closed 4 years ago

AngelliaX commented 4 years ago

Introduction

I found that MyPlotPlayerEnterPlotEvent is only be called from player moving (PlayerMoveEvent) but teleporting (EntityTeleportEvent) So i add that event into Eventlistener.php and from these 2 events,me calling one private function onEnterPlotCheck() like the onEventOnBlock() one

Changes

-Add onPlayerTeleport(),onEnterPlotCheck() into EventListener.php -Change code inside onPlayerMove() function

Tests

Tested