Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. package de.moritz;
  2.  
  3. import org.bukkit.command.Command;
  4. import org.bukkit.command.CommandExecutor;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7.  
  8. public class Fly_Command implements CommandExecutor{
  9.  
  10. @Override
  11. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  12. if(sender instanceof Player);
  13. Player p = (Player) sender;
  14. if(p.hasPermission("server.fly")) {
  15.  
  16. p.sendMessage("§aDu kannst nun Fliegen!");
  17. p.setAllowFlight(true);
  18. p.setFlying(true);
  19.  
  20. }else{
  21. p.sendMessage("§cDu kannst nun nicht mehr Fliegen!");
  22. p.setAllowFlight(false);
  23. p.setFlying(false);
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. return false;
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement