Guest User

Untitled

a guest
Jan 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. function execute(player) {
  2. chat_message(player, "You have successfully logged in.");
  3. wait(5);
  4. chat_message(player, "Five ticks have passed since you logged in.");
  5. }
  6.  
  7. private static class WaitFunction implements Function<Integer, Boolean> {
  8.  
  9. @Override
  10. public Boolean apply(Integer ticks) {
  11. Future<?> result = World.singleton().schedule(new Runnable() {
  12. @Override
  13. public void run() {
  14.  
  15. }
  16. }, ticks);
  17. try {
  18. result.get();
  19. } catch (InterruptedException | ExecutionException exception) {
  20. exception.printStackTrace();;
  21. }
  22. return true;
  23. }
  24. }
Add Comment
Please, Sign In to add comment