diff --git a/plugin.yml b/plugin.yml index 4eaad60..36ff043 100644 --- a/plugin.yml +++ b/plugin.yml @@ -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." diff --git a/resources/config.yml b/resources/config.yml index bf6cb60..e786389 100644 --- a/resources/config.yml +++ b/resources/config.yml @@ -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 diff --git a/src/LDX/iProtector/Area.php b/src/LDX/iProtector/Area.php index a79f9ef..8756e8a 100644 --- a/src/LDX/iProtector/Area.php +++ b/src/LDX/iProtector/Area.php @@ -118,4 +118,3 @@ public function delete() { } } -?> diff --git a/src/LDX/iProtector/Main.php b/src/LDX/iProtector/Main.php index 165eb41..89828a6 100644 --- a/src/LDX/iProtector/Main.php +++ b/src/LDX/iProtector/Main.php @@ -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"]; @@ -367,4 +367,3 @@ public function canGetHurt($p) { } } -?>