mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Added /spawn and dynmap integration
This commit is contained in:
1 parent
36e3756f9c
commit
d5f534296d
13 files changed
+424
-34
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package me.william278.huskhomes2.Commands;
|
||||
|
||||
import me.william278.huskhomes2.Main;
|
||||
import me.william278.huskhomes2.messageManager;
|
||||
import me.william278.huskhomes2.settingHandler;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class setSpawnCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (sender instanceof Player) {
|
||||
Player p = (Player) sender;
|
||||
if (Main.settings.doSpawnCommand()) {
|
||||
settingHandler.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