Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. public class First {
  2.  
  3.     private ClickAction.RunCommand runCommand(String command){
  4.         return null;
  5.        
  6.     }
  7.    
  8.     @Listener
  9.     public void onCos(ClientConnectionEvent.Join evt){
  10.        
  11.        
  12.        
  13.        
  14.    
  15.         if(evt.getTargetEntity().getName() == "__WolereK__"){
  16.            
  17.            
  18.            
  19.             Text t1 = Text.builder("Click me")
  20.                     .color(TextColors.GOLD)
  21.                     .style(TextStyles.BOLD, TextStyles.ITALIC)
  22.                     .onClick(runCommand("help"))//<--- tutaj tego potrzebuje
  23.                     .build();
  24.             evt.getTargetEntity().sendMessage(t1);
  25.         }else{
  26.            
  27.             Text t = Text.builder("Hey")
  28.                     .color(TextColors.GRAY)
  29.                     .build();
  30.            
  31.             evt.getTargetEntity().sendMessage(t);
  32.            
  33.         }
  34.        
  35.     }
  36.  
  37.        
  38.    
  39.    
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement