Guest User

Untitled

a guest
Jan 18th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. public class CommandSignsPlayerProxy implements Player {
  2.  
  3. private Player proxy;
  4. private boolean silent;
  5.  
  6. public CommandSignsPlayerProxy(Player targetPlayer) {
  7. this.proxy = targetPlayer;
  8. }
  9.  
  10. public boolean isSilent() {
  11. return silent;
  12. }
  13.  
  14. public void setSilent(boolean silent) {
  15. this.silent = silent;
  16. }
  17.  
  18. @Override
  19. public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
  20. proxy.abandonConversation(conversation, details);
  21. }
  22.  
  23. // This function is basically the only one that NEEDS overriding
  24. @Override
  25. public void sendMessage(String message) {
  26. if (!silent)
  27. proxy.sendMessage(message);
  28. }
  29.  
  30. @Override
  31. public void setFlySpeed(float arg0) throws IllegalArgumentException {
  32. proxy.setFlySpeed(arg0);
  33. }
  34.  
  35. }
Add Comment
Please, Sign In to add comment