Advertisement
NMZCyt

Main.java

Feb 11th, 2020
173
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package me.PizzaBoytjuh.minecraft;
  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. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. import net.md_5.bungee.api.ChatColor;
  10.  
  11. public class Main extends JavaPlugin implements CommandExecutor{
  12. public void OnEnable() {
  13. getCommand("hallo").setExecutor(this);
  14. }
  15. /*
  16. boolean: true or false
  17. string: reeks van character. bevoorbeeld "72jw[s]w026Grwy32{}|-0\"
  18. integer: Heel getal zoals "0" niet een niet heel getal zoals "8.9"
  19. bouble: het zelfde als integer maar ok met niet hele getallen
  20. */
  21.  
  22. @Override
  23. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  24.  
  25. if(!(sender instanceof Player)) {
  26. return false;
  27. }
  28. Player p = (Player) sender;
  29.  
  30. if(cmd.getName().equalsIgnoreCase("hallo")) {
  31. p.sendMessage(ChatColor.BLUE + "Hallo! Welkom op de server!");
  32. }
  33.  
  34. return false;
  35. }
  36.  
  37.  
  38. }
Advertisement
RAW Paste Data Copied
Advertisement