command /kweather []: executable by: players trigger: if arg 1 is "setworld": set {_hasPermissions} to kWeatherHasPermissions(player, "kweather.admin") if {_hasPermissions} is false: send "&cNie posiadasz wystarczających uprawnień (&ekweather.admin&c)!" to player else: set {kweather::world} to the player's world set {kweather::last} to now set {kweather::type} to weather in the player's world send "&aStatystyki pogody będą od teraz mierzone w świecie &e%{kweather::world}%" to player else: send "" function kWeatherHasPermissions(p: player, n: text) :: boolean: if {_p} is op: return true else if {_p} has permission {_n}: return true else: return false on weather change: if {kweather::world} is event-world: set {_time} to difference between {kweather::last} and now add {_time} to {kweather::time::%{kweather::type}%} set {kweather::type} to weather in world "%{kweather::world}%"