1234567891011121314151617181920212223242526272829303132333435363738394041 |
- msg("dev", "§bProtect §rwurde geladen.");
- event.load("block-break");
- event.load("block-place");
- event.load("command");
- setVar("lowestpos", read.location("games:2000:0:-4000:0:0"));
- setVar("highestpos", read.location("games:2200:255:-3800:0:0"));
- list.new("fremdallowed");
- //list.add($fremdallowed, "_Low_Key_");
- @wait
- wait();
- if(list.contains($fremdallowed, $player-name)) goto ("specialhandling");
- goto("wait");
- @cancel
- setVar("cancel", true);
- goto("wait");,
- @specialhandling
- if(or(equal($event, "block-break") equal($event, "block-place"))) goto("blockaction");
- if(equal($event, "command")) goto("command");
- goto("wait");
- @blockaction
- if(notequal($world-name, "games")) goto("cancel");
- if(or(less(loc.getCoord($player-loc, "x"), loc.getCoord($lowestpos, "x")), less(loc.getCoord($player-loc, "y"), loc.getCoord($lowestpos, "y")), less(loc.getCoord($player-loc, "z"), loc.getCoord($lowestpos, "z")))) setVar("cancel", true);
- if(or(greater(loc.getCoord($player-loc, "x"), loc.getCoord($highestpos, "x")), greater(loc.getCoord($player-loc, "y"), loc.getCoord($highestpos, "y")), greater(loc.getCoord($player-loc, "z"), loc.getCoord($highestpos, "z")))) setVar("cancel", true);
- goto("wait");
- @command
- if(notequal(list.getSize($args), 2)) goto("wait");
- if(and(equal(list.getIndex($args, 0) "/warp"), equal(list.getIndex($args, 1), "hungergame"))) {
- setVar("cancel", false);
- goto ("wait");
- }
- if(notequal($world-name, "games")) goto("cancel");
- if(or(less(loc.getCoord($player-loc, "x"), loc.getCoord($lowestpos, "x")), less(loc.getCoord($player-loc, "y"), loc.getCoord($lowestpos, "y")), less(loc.getCoord($player-loc, "z"), loc.getCoord($lowestpos, "z")))) setVar("cancel", true);
- if(or(greater(loc.getCoord($player-loc, "x"), loc.getCoord($highestpos, "x")), greater(loc.getCoord($player-loc, "y"), loc.getCoord($highestpos, "y")), greater(loc.getCoord($player-loc, "z"), loc.getCoord($highestpos, "z")))) setVar("cancel", true);
- goto("wait");
|