Advertisement
JoshTEC

Fly

May 25th, 2015
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. if ((cmd.getName().equalsIgnoreCase("fly")) && (sender.hasPermission("bedrockcore.command.fly"))) {
  2.       if (args.length == 0)
  3.       {
  4.         Player p = (Player)sender;
  5.         p.sendMessage("§c§lStaff §8> §7Args: /fly on:off");
  6.         p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
  7.       }
  8.       else if (args.length == 1)
  9.       {
  10.         if (args[0].equalsIgnoreCase("on"))
  11.         {
  12.           Player p = (Player)sender;
  13.           p.setAllowFlight(true);
  14.           p.sendMessage("§c§lStaff §8> §7Fly mode enabled");
  15.           p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
  16.         }
  17.         else if (args[0].equalsIgnoreCase("off"))
  18.         {
  19.           Player p = (Player)sender;
  20.           p.setAllowFlight(false);
  21.           p.sendMessage("§c§lStaff §8> §7Fly mode disabled");
  22.           p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
  23.         }
  24.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement