creative.txt 721 B

12345678910111213141516171819202122232425262728293031
  1. event.load("block_place");
  2. event.load("player_pre_respawn");
  3. event.load("player_post_respawn");
  4. crea_respawn = set.new();
  5. msg("dev", "§bCreative §rloaded.");
  6. @wait
  7. wait();
  8. ignoreGoto(event);
  9. goto("wait");
  10. @block_place
  11. if(block_type == "minecraft:end_portal_frame" && !loc.isInSurvWorld(block_loc)) {
  12. cancel = true;
  13. }
  14. goto("wait");
  15. @player_pre_respawn
  16. if(loc.isInCreativeWorld(entity.getLocation(player))) {
  17. set.add(crea_respawn, player.getUuid(player));
  18. }
  19. goto("wait");
  20. @player_post_respawn
  21. player_uuid = player.getUuid(player);
  22. if(set.contains(crea_respawn, player_uuid)) {
  23. set.remove(crea_respawn, player_uuid);
  24. entity.teleport(player, world.getCreativeSpawn());
  25. }
  26. goto("wait");