sports_volleyball_world: debug: false type: world events: ## ball click on player damages entity bukkit_priority:low: - ratelimit 10t - define ball - if !<[ball].has_flag[ball]>: - stop - if <[ball].type> == armor_stand: - define ball ]> - if !<[ball].flag[ball].starts_with[sports_volleyball]>: - stop - if !: - stop - define arena_id - if !<[arena_id].starts_with[sports_volleyball]>: - stop - define status ]> - if <[status]> == normal: - if ].distance_squared[<[ball].location>]> > 22: - stop - define y - if <[y]> < 0.45: - define y 0.45 - if <[y]> > 0.95: - define y 0.95 - define kick ]> - if : - define kick - if !: - define kick - define kick <[kick].add[]> - define kick <[kick].add[]>]> - run ball_vector_add def.ball:<[ball]> def.vector:<[kick]> - flag <[ball]> sports_volleyball_delay_score:! - else if <[status]> == blue_start || <[status]> == red_start: - run sports_arena_set_status def.id:<[arena_id]> def.status:normal - define kick - run ball_vector_add def.ball:<[ball]> def.vector:<[kick]> - playsound <[ball].location> sound:BLOCK_STONE_BREAK pitch:1.8 ## point scored on custom event id:ball_move bukkit_priority:low: - if !: - stop - define arena_id - if ]> != normal: - define status ]> - if <[status]> == blue_start || <[status]> == red_start: - determine cancelled - stop - if !: - if !: - stop - flag sports_volleyball_delay_score: - stop - else: - if ]> < 300: - stop - define extra ].get[extra_data]> - define red_start <[extra].get[red_start]> - define blue_start <[extra].get[blue_start]> - if ]> < ]>: - run sports_volleyball_score_goal def.id:<[arena_id]> def.team:blue - else: - run sports_volleyball_score_goal def.id:<[arena_id]> def.team:red