Advertisement
Legt_Gaming1

Untitled

Dec 20th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. package me.LegitGaming1.PlayerJoinMessage;
  2.  
  3. import org.bukkit.ChatColor;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandSender;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.plugin.java.JavaPlugin;
  8.  
  9. public class ServerFunctions extends JavaPlugin {
  10.  
  11. @Override
  12. public void onEnable() {
  13. new JoinListener(this);
  14. }
  15.  
  16. @Override
  17. public void onDisable() {
  18.  
  19. }
  20.  
  21. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  22.  
  23. if (cmd.getName().equalsIgnoreCase("totalexp") && sender instanceof Player) {
  24.  
  25. Player player = (Player) sender;
  26.  
  27. player.sendMessage(ChatColor.GOLD + "Total Exp: " + player.getTotalExperience());
  28.  
  29. return true;
  30.  
  31. } else if (cmd.getName().equalsIgnoreCase("Exp") && sender instanceof Player) {
  32.  
  33. Player player = (Player) sender;
  34.  
  35. player.sendMessage(ChatColor.GOLD + "Exp To Next Level: " + player.getExpToLevel());
  36.  
  37. return true;
  38.  
  39. }
  40.  
  41. return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement