on sign edit: if player have permission "plotmarket.signs": line 1 is "[PM]": if line 2 is set: if line 3 is set: set line 1 to "&4[PM]" send "&7Utworzono tabliczke kupna dla regionu %line 2%" add "%line 2%" to {pm.regions::*} on rightclick on sign: if line 1 is "&4[PM]": set {region.%player%} to line 3 parsed as money set {_econ} to player's money send "%{_econ}%" if {_econ} is greater than or equal to {region.%player%}: remove {region.%player%} from player's balance execute console command "/rg addowner %line 2% %player% -w %world of player%" set line 1 to "&6[Kupiony]" set line 4 to "%player%" drop sign send "&7Kupiles dzialke za %{region.%player%}%" remove "%line 2%" from {pm.regions::*} add "%line 2%" to {regions.%player%::*} else: send "&6Za malo kasy!" command /pm [] [] []: description: PlotMarket main command usage: /pm trigger: if arg 1 is not set: send "&6PlotMarket @^" send "&9/pm list - &6Lista wolnych regionow" send "&9/pm add - &6Dodaj gracza do dzialki (moze otwierac skrzynki, uzywac ale nie budowac/nisczyc)" send "&9/pm perm - &6Dodaj gracza do dzialki (moze robic wszystko)" send "&9/pm remove - &6Usun gracza z dzialki" send "&9/pm autor - &6Informacje o pluginie" if arg 1 is "list": if player have permission "plotmarket.list": send "&3Wolne regiony: &7%{pm.regions::*}%" send "&3Twoje regiony: &7%{regions.%player%::*}%" else: send "&6Nie masz dostepu do tej komendy.." if arg 1 is "add": if {regions.%player%::*} contains "%arg 2%": execute console command "/rg addmember %arg 2% %arg 3% -w %world of player%" send "&7Dodales gracza %arg 3% do regionu %arg 2%" if arg 1 is "remove": if {regions.%player%::*} contains "%arg 2%": execute console command "/rg removemember %arg 2% %arg 3% -w %world of player%" execute console command "/rg removeowner %arg 2% %arg 3% -w %world of player%" send "&7Usunieto gracza %arg 3% z regionu %arg 2%" if arg 1 is "perm": if {regions.%player%::*} contains "%arg 2%": execute console command "/rg addowner %arg 2% %arg 3% -w %world of player%" send "Gracz %arg 3% dostal PELNE uprawnienia do regionu %arg 2%"