2016-07-09 13:19:56 +02:00
|
|
|
package eu.univento.teamvento.commands;
|
|
|
|
|
2016-08-03 00:28:53 +02:00
|
|
|
import eu.univento.commons.player.Rank;
|
2016-07-09 13:19:56 +02:00
|
|
|
import eu.univento.core.api.AutoCommand;
|
|
|
|
import eu.univento.core.api.languages.Messages;
|
|
|
|
import eu.univento.core.api.player.CustomPlayer;
|
|
|
|
import eu.univento.teamvento.TeamVento;
|
|
|
|
import eu.univento.teamvento.utils.WorldEdit;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class Sel extends AutoCommand<TeamVento>{
|
|
|
|
|
|
|
|
public Sel(TeamVento plugin, String command, String description, String... aliases) {
|
|
|
|
super(plugin, command, description, aliases);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean execute(CommandSender sender, String label, String[] args) {
|
|
|
|
if(sender instanceof Player) {
|
|
|
|
CustomPlayer p = CustomPlayer.getPlayer(sender.getName());
|
2016-08-03 00:28:53 +02:00
|
|
|
if(p.getDatabasePlayer().isAllowed(Rank.Builder)) {
|
2016-07-09 13:19:56 +02:00
|
|
|
WorldEdit.setPos1(p, null);
|
|
|
|
WorldEdit.setPos2(p, null);
|
|
|
|
p.sendMessage(p.getMessages().PREFIX() + "selection cleared");
|
|
|
|
}else{
|
|
|
|
p.sendMessage(p.getMessages().PREFIX() + p.getMessages().NO_PERMS());
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
sender.sendMessage(Messages.Console.NOT_A_PLAYER);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List<String> tabComplete(CommandSender sender, String label, String[] args) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|