sports_football_world: debug: false type: world events: ## ball click on player damages entity bukkit_priority:low: - ratelimit 10t - if !: - stop - if !: - stop - if !: - stop - define arena_id - if !<[arena_id].starts_with[sports_football]>: - stop - if ]> != normal: - stop - define min_y - if <[min_y]> < 0: - define min_y 0 - define velo - define kick ].add[0,0.25,0].add[<[velo]>]> - if : - define kick - if !: - define kick - run ball_vector_add def.ball: def.vector:<[kick]> ## out of bounds & ball collision on player walks: - if !: - stop - define arena_id - if !<[arena_id].starts_with[sports_football]>: - stop - if ]> != normal: - stop # ball collision - define ball ]> - if > <[ball].location.y>: - if ]> < 0.5: - run ball_vector_add def.ball:<[ball]> def.vector:<[ball].location.sub[].normalize.mul[0.5].add[0,0.05,0]> - ratelimit 10t ## goal scoring on custom event id:ball_move bukkit_priority:low: - if !: - stop - define arena_id - if ]> != normal: - stop - define extra ].get[extra_data]> - if <[extra].get[red_goal].contains[]> || <[extra].get[red_goal].contains[]>: - run sports_football_score_goal def.id:<[arena_id]> def.team:blue - else if <[extra].get[blue_goal].contains[]> || <[extra].get[blue_goal].contains[]>: - run sports_football_score_goal def.id:<[arena_id]> def.team:red