mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-29 14:06:30 +01:00
Remove old MVCoord
This commit is contained in:
parent
2ea45c8219
commit
f2b9b95dc9
@ -1,42 +0,0 @@
|
|||||||
package com.onarandombox.MultiverseCore.commands;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.onarandombox.MultiverseCore.MVCommandHandler;
|
|
||||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
|
||||||
import com.onarandombox.utils.LocationManipulation;
|
|
||||||
|
|
||||||
public class MVCoord extends MVCommandHandler {
|
|
||||||
|
|
||||||
private LocationManipulation locMan = new LocationManipulation();
|
|
||||||
|
|
||||||
public MVCoord(MultiverseCore plugin) {
|
|
||||||
super(plugin);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean perform(CommandSender sender, String[] args) {
|
|
||||||
// Check if the command was sent from a Player.
|
|
||||||
if (sender instanceof Player) {
|
|
||||||
// If this command was sent from a Player then we need to check Permissions
|
|
||||||
if (!(plugin.ph.has(((Player) sender), "multiverse.coord"))) {
|
|
||||||
sender.sendMessage("You do not have access to this command.");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
Player p = (Player) sender;
|
|
||||||
|
|
||||||
p.sendMessage(ChatColor.RED + "World: " + ChatColor.WHITE + p.getWorld().getName());
|
|
||||||
p.sendMessage(ChatColor.RED + "Compression: " + ChatColor.WHITE + plugin.worlds.get(p.getWorld().getName()).compression);
|
|
||||||
p.sendMessage(ChatColor.RED + "Coordinates: " + ChatColor.WHITE + locMan.strCoords(p.getLocation()));
|
|
||||||
p.sendMessage(ChatColor.RED + "Direction: " + ChatColor.WHITE + locMan.getDirection(p.getLocation()));
|
|
||||||
p.sendMessage(ChatColor.RED + "Block: " + ChatColor.WHITE + Material.getMaterial(p.getWorld().getBlockTypeIdAt(p.getLocation())));
|
|
||||||
} else {
|
|
||||||
sender.sendMessage("This command needs to be used from a Player.");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user