Guest User

command

a guest
Apr 13th, 2020
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. package me.serhat.test.commands;
  2.  
  3. import com.google.inject.Inject;
  4. import me.serhat.test.GuiceTest;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandExecutor;
  7. import org.bukkit.command.CommandSender;
  8.  
  9. public class GuiceTestCommand implements CommandExecutor {
  10.  
  11. @Inject
  12. private GuiceTest plugin;
  13.  
  14. @Inject
  15. public GuiceTestCommand( GuiceTest plugin ) {
  16. this.plugin = plugin;
  17. }
  18.  
  19. @Override
  20. public boolean onCommand( CommandSender sender, Command command, String label, String[] args ) {
  21.  
  22. sender.sendMessage( "worked well, mate: " + this.plugin.getTestNumber() );
  23.  
  24. return true;
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment