Updated SimpleLocations

This commit is contained in:
bluefireoly
2020-10-16 23:45:46 +02:00
parent 2c1d08e58e
commit d9720d90cf
2 changed files with 37 additions and 12 deletions

View File

@@ -0,0 +1,11 @@
package net.axay.kspigot.extensions.bukkit
import org.bukkit.Location
import org.bukkit.World
/**
* Assumes that this Location has world data.
* If not, an exception will be thrown.
*/
val Location.worldOrException: World get() = world
?: throw NullPointerException("The world of the location is null!")