luca28pet / PortalsPE

A PocketMine-MP plugin.
GNU Affero General Public License v3.0
13 stars 16 forks source link

When deleting a world, no error appears #6

Closed inxomnyaa closed 6 years ago

inxomnyaa commented 7 years ago

This is an theoretical issue

When you have a portal going to a level, that can not be loaded because no level with that name exists (anymore), no error is issued and the console (should) spam either ticking issues or some other stuff related to Level can not be loaded, or teleport on null

To prevent this, a true/false check could be executed at this line: https://github.com/luca28pet/PortalsPE/blob/master/src/PortalsPE/Main.php#L59

if false, simply cancel the teleport/Event and probably warn in console/delete the portal