summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
index fab7076..eb228f9 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/SetLobbyLocation.java
@@ -22,19 +22,15 @@ 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 SetLobbyLocation implements ICommand {
- public void execute(CommandSender sender, String[] args) {
- if (!(sender instanceof Player)) return;
- Player player = (Player) sender;
-
- LocationUtils.setLocation(player, Locations.LOBBY, vector -> {
- lobbyWorld = player.getLocation().getWorld().getName();
+ public void execute(Player sender, String[] args) {
+ LocationUtils.setLocation(sender, Locations.LOBBY, vector -> {
+ lobbyWorld = sender.getLocation().getWorld().getName();
lobbyPosition = vector;
});
}