123456789101112131415161718192021222324252627282930313233343536373839 |
- package me.km.commands;
- import me.kt.api.Utils;
- import me.kt.api.GlobalText;
- import me.kt.api.Module;
- import me.kt.api.ModuleCommand;
- import org.bukkit.Location;
- import org.bukkit.block.Block;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- public class CommandPosition extends ModuleCommand
- {
- public CommandPosition(Module m)
- {
- super("position", m);
- this.setDescription("Zeigt deine Position an");
- this.setUsage("/position");
- this.setPermission("kt.position");
- }
- @Override
- public boolean execute(CommandSender cs, String string, String[] arg)
- {
- if(!(cs instanceof Player))
- {
- this.getModule().send(cs, GlobalText.onlyPlayer());
- return true;
- }
- Player p = (Player) cs;
- Module m = this.getModule();
- m.send(cs, "Welt: " + p.getWorld().getName());
- Location l = p.getLocation();
- m.send(cs, "Koordinaten: " + l.getX() + " | " + l.getY() + " | " + l.getZ());
- m.send(cs, "Yaw: " + l.getYaw());
- m.send(cs, "Pitch: " + l.getPitch());
- return true;
- }
- }
|