mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Add ability to define cooldowns for actions (#437)
This commit is contained in:
1 parent
fb052340c0
commit
fc8d3b0098
52 files changed
+1140
-619
No files matched your search
@@ -108,13 +108,13 @@ public class BukkitUser extends OnlineUser {
|
||||
// Ensure the world exists
|
||||
final Optional<org.bukkit.Location> resolvedLocation = BukkitAdapter.adaptLocation(location);
|
||||
if (resolvedLocation.isEmpty() || resolvedLocation.get().getWorld() == null) {
|
||||
throw new TeleportationException(TeleportationException.Type.WORLD_NOT_FOUND);
|
||||
throw new TeleportationException(TeleportationException.Type.WORLD_NOT_FOUND, plugin);
|
||||
}
|
||||
|
||||
// Ensure the coordinates are within the world limits
|
||||
final org.bukkit.Location bukkitLocation = resolvedLocation.get();
|
||||
if (!bukkitLocation.getWorld().getWorldBorder().isInside(resolvedLocation.get())) {
|
||||
throw new TeleportationException(TeleportationException.Type.ILLEGAL_TARGET_COORDINATES);
|
||||
throw new TeleportationException(TeleportationException.Type.ILLEGAL_TARGET_COORDINATES, plugin);
|
||||
}
|
||||
|
||||
// Run on the appropriate thread scheduler for this platform
|
||||
|
||||
Reference in new issue
Block a user