mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Merge commands with their tab completers
This commit is contained in:
37 files changed
+470
-512
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package me.william278.huskhomes2.commands;
|
||||
|
||||
import me.william278.huskhomes2.HuskHomes;
|
||||
import me.william278.huskhomes2.messageManager;
|
||||
import me.william278.huskhomes2.settingHandler;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class SetspawnCommand extends CommandBase {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (sender instanceof Player) {
|
||||
Player p = (Player) sender;
|
||||
if (HuskHomes.settings.doSpawnCommand()) {
|
||||
settingHandler.setSpawnLocation(p.getLocation());
|
||||
p.getLocation().getWorld().setSpawnLocation(p.getLocation());
|
||||
messageManager.sendMessage(p, "set_spawn_success");
|
||||
} else {
|
||||
messageManager.sendMessage(p, "error_command_disabled");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user