Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function execute(player) {
- chat_message(player, "You have successfully logged in.");
- wait(5);
- chat_message(player, "Five ticks have passed since you logged in.");
- }
- private static class WaitFunction implements Function<Integer, Boolean> {
- @Override
- public Boolean apply(Integer ticks) {
- Future<?> result = World.singleton().schedule(new Runnable() {
- @Override
- public void run() {
- }
- }, ticks);
- try {
- result.get();
- } catch (InterruptedException | ExecutionException exception) {
- exception.printStackTrace();;
- }
- return true;
- }
- }
Add Comment
Please, Sign In to add comment