From 90b99235257770e39a96f4d54293e4ebd7f6256c Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sat, 14 May 2022 21:12:27 -0400 Subject: debug menu and 1.8/1.14 fixes --- .../hideAndSeek/command/location/SetExitLocation.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java index abe6f69..93c0d8c 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetExitLocation.java @@ -22,18 +22,14 @@ package net.tylermurphy.hideAndSeek.command.location; import net.tylermurphy.hideAndSeek.command.ICommand; import net.tylermurphy.hideAndSeek.command.location.util.LocationUtils; import net.tylermurphy.hideAndSeek.command.location.util.Locations; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import static net.tylermurphy.hideAndSeek.configuration.Config.*; public class SetExitLocation implements ICommand { - public void execute(CommandSender sender, String[] args) { - if (!(sender instanceof Player)) return; - Player player = (Player) sender; - - LocationUtils.setLocation(player, Locations.EXIT, vector -> { - exitWorld = player.getLocation().getWorld().getName(); + public void execute(Player sender, String[] args) { + LocationUtils.setLocation(sender, Locations.EXIT, vector -> { + exitWorld = sender.getLocation().getWorld().getName(); exitPosition = vector; }); } -- cgit v1.2.3-freya