mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Added mySQL support, RTP command and bStats metric collection
This commit is contained in:
1 parent
3d4e14d420
commit
18b244ed65
21 files changed
+941
-314
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package me.william278.huskhomes2.Commands;
|
||||
|
||||
import me.william278.huskhomes2.Main;
|
||||
import me.william278.huskhomes2.messageManager;
|
||||
import me.william278.huskhomes2.teleportManager;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class rtpCommand 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.doRtpCommand()) {
|
||||
if (p.getWorld().getEnvironment() == World.Environment.NORMAL) {
|
||||
teleportManager.queueRandomTeleport(p);
|
||||
} else {
|
||||
messageManager.sendMessage(p, "error_rtp_invalid_dimension");
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(p, "error_command_disabled");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user