Skip to content
This repository has been archived by the owner on Oct 21, 2018. It is now read-only.

Commit

Permalink
Merge pull request #20 from LDX-MCPE/bugfix
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
LDX committed Apr 3, 2015
2 parents 324af51 + 453ee91 commit d8789b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: iProtector
author: LDX
version: "3.0"
version: 3.1a
main: LDX\iProtector\Main
load: POSTWORLD
api: [1.9.0]
website: https://github.com/LDX-MCPE/iProtector
website: "https://github.com/LDX-MCPE/iProtector"
commands:
area:
description: "Allows you to manage areas."
Expand Down
4 changes: 2 additions & 2 deletions resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Default:
# Keep players from touching blocks and activating things like chests?
Touch: false

# Settings for individual worlds:
# Settings for unprotected areas in individual worlds:
Worlds:

{DEFAULT}:
DEFAULT:

# Keep players from getting hurt?
God: false
Expand Down
1 change: 0 additions & 1 deletion src/LDX/iProtector/Area.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ public function delete() {
}

}
?>
5 changes: 2 additions & 3 deletions src/LDX/iProtector/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public function onEnable() {
$c = $this->getResource("config.yml");
$o = stream_get_contents($c);
fclose($c);
file_put_contents($this->getDataFolder() . "config.yml",str_replace("{DEFAULT}",$this->getServer()->getDefaultLevel()->getName(),$o));
file_put_contents($this->getDataFolder() . "config.yml",str_replace("DEFAULT",$this->getServer()->getDefaultLevel()->getName(),$o));
}
$this->areas = array();
$data = json_decode(file_get_contents($this->getDataFolder() . "areas.json"),true);
foreach($data as $datum) {
$area = new Area($datum["name"],$datum["flags"],$datum["pos1"],$datum["pos2"],$datum["level"],$datum["whitelist"],$this);
}
$c = $this->getConfig()->getAll();
$c = yaml_parse(file_get_contents($this->getDataFolder() . "config.yml"));
$this->god = $c["Default"]["God"];
$this->edit = $c["Default"]["Edit"];
$this->touch = $c["Default"]["Touch"];
Expand Down Expand Up @@ -367,4 +367,3 @@ public function canGetHurt($p) {
}

}
?>

0 comments on commit d8789b3

Please # to comment.