Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.bukkit.knager.commands;
- import me.bukkit.knager.*;
- import org.bukkit.*;
- import org.bukkit.command.*;
- import org.bukkit.entity.*;
- public class CommandExecutor_fly implements CommandExecutor
- {
- private SimpleFly plugin;
- public CommandExecutor_fly(final SimpleFly plugin) {
- this.plugin = plugin;
- }
- public boolean onCommand(final CommandSender sender, final Command command, final String Label, final String[] args) {
- if (!command.getName().equalsIgnoreCase("fly")) {
- return false;
- }
- if (!(sender instanceof Player)) {
- sender.sendMessage(ChatColor.RED + "Je bent geen speler");
- return true;
- }
- return false;
- final Player player = (Player)sender;
- if (player.hasPermission("fly.use")) {
- player.setAllowFlight(!player.getAllowFlight());
- player.sendMessage(ChatColor.GRAY + "Je hebt fly" + ChatColor.GREEN + ChatColor.BOLD + player.getAllowFlight());
- } else {
- player.sendMessage(ChatColor.GRAY + "Hiervoor heb je de rank" + ChatColor.DARK_GRAY + " [" + ChatColor.GOLD + "Wood" + ChatColor.DARK_GRAY + "]" + ChatColor.GRAY + " nodig.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement