12345678910111213141516171819202122232425262728293031 |
- event.load("block_place");
- event.load("player_pre_respawn");
- event.load("player_post_respawn");
- crea_respawn = set.new();
- msg("dev", "§bCreative §rloaded.");
- @wait
- wait();
- ignoreGoto(event);
- goto("wait");
- @block_place
- if(block_type == "minecraft:end_portal_frame" && !loc.isInSurvWorld(block_loc)) {
- cancel = true;
- }
- goto("wait");
- @player_pre_respawn
- if(loc.isInCreativeWorld(entity.getLocation(player))) {
- set.add(crea_respawn, player.getUuid(player));
- }
- goto("wait");
- @player_post_respawn
- player_uuid = player.getUuid(player);
- if(set.contains(crea_respawn, player_uuid)) {
- set.remove(crea_respawn, player_uuid);
- entity.teleport(player, world.getCreativeSpawn());
- }
- goto("wait");
|