SHARE
TWEET

Untitled

a guest Dec 14th, 2019 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Tutorial extends JavaPlugin {
  2.     @Override
  3.     public void onEnable() {
  4.         this.getLogger().info("Wiadomosc przy wlaczeniu");
  5.     }
  6.  
  7.     @Override
  8.     public void onDisable() {
  9.         this.getLogger().info("Wiadomosc przy wylaczeniu");
  10.     }
  11.  
  12.     @Override
  13.     public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
  14.         if (command.getName().equalsIgnoreCase("sprawdz")) {
  15.             if(args.length == 0){
  16.                  if (sender instanceof Player) {
  17.                       sender.sendMessage("§aJestes \ngraczem!");
  18.                   } else {
  19.                  sender.sendMessage("§aJestes\n konsola!");
  20.                   }
  21.             }
  22.             if(args[0].equalsIgnoreCase("siema"){
  23.                 sender.sendMessage("hejka twoj argument to siema");
  24.             }
  25.             if(args[0].equalsIgnoreCase("kozak"){
  26.             sender.sendmessage("havooc to kozak")
  27. }      
  28.         }
  29.         return true;
  30.     }
  31. }
  32.  
  33.  
  34.  
  35. .YML
  36.  
  37.  
  38.  
  39. name: PoradnikPlugin
  40. version: 1.0
  41.  
  42. commands:
  43.   sprawdz:
  44.     description: "Plugin pokazujacy czy jestes graczem"
  45.     aliases: [spr, spraw]
  46.     permission: sprawdz.sprawdz
  47.     permission-message: "§cNie masz\n uprawnien!"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top