Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ((cmd.getName().equalsIgnoreCase("fly")) && (sender.hasPermission("bedrockcore.command.fly"))) {
- if (args.length == 0)
- {
- Player p = (Player)sender;
- p.sendMessage("§c§lStaff §8> §7Args: /fly on:off");
- p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
- }
- else if (args.length == 1)
- {
- if (args[0].equalsIgnoreCase("on"))
- {
- Player p = (Player)sender;
- p.setAllowFlight(true);
- p.sendMessage("§c§lStaff §8> §7Fly mode enabled");
- p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
- }
- else if (args[0].equalsIgnoreCase("off"))
- {
- Player p = (Player)sender;
- p.setAllowFlight(false);
- p.sendMessage("§c§lStaff §8> §7Fly mode disabled");
- p.playSound(p.getLocation(), Sound.NOTE_PLING, 3.0F, 3.0F);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement