mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Re-added many HuskHomes commands
This commit is contained in:
1 parent
d20baa41d1
commit
1b8254d46a
34 files changed
+1485
-47
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package me.william278.huskhomes2.Commands;
|
||||
|
||||
import me.william278.huskhomes2.Objects.TeleportationPoint;
|
||||
import me.william278.huskhomes2.dataManager;
|
||||
import me.william278.huskhomes2.messageManager;
|
||||
import me.william278.huskhomes2.teleportManager;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class backCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (sender instanceof Player) {
|
||||
Player p = (Player) sender;
|
||||
TeleportationPoint lastPosition = dataManager.getPlayerLastPosition(p);
|
||||
if (lastPosition != null) {
|
||||
teleportManager.queueTimedTeleport(p, lastPosition);
|
||||
} else {
|
||||
messageManager.sendMessage(p, "error_no_last_position");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user