Advertisement
Stellrow

Untitled

Jul 2nd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. package main;
  2.  
  3. import org.bukkit.command.CommandExecutor;
  4. import org.bukkit.command.CommandSender;
  5. import org.bukkit.entity.Player;
  6.  
  7. public class Command implements CommandExecutor{
  8. public final main plugin;
  9. public Command(main plugin) {
  10. this.plugin = plugin;
  11. }
  12.  
  13. @Override
  14. public boolean onCommand(CommandSender sender, org.bukkit.command.Command arg1, String arg2, String[] arg3) {
  15. Player player = (Player) sender;
  16. if(sender instanceof Player) {
  17. player.getDisplayName();
  18. player.setDisplayName(arg2);
  19.  
  20. }
  21. return false;
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement