Skip to content

Commit

Permalink
Cancelled plans for individual jail's allow-escape-area status, updat…
Browse files Browse the repository at this point in the history
…ed version
  • Loading branch information
hoyinm14mc committed Aug 11, 2017
1 parent 46f34c9 commit 245222a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Changelog of Jail

1.2.0 - 01/AUG/2017
1.2.0 - 11/AUG/2017
- Update fetcher now shows update changes of the latest version for Poggit or Github
- Update fetcher now shows download link of the latest version for Poggit or Github
- Update fetcher now has its ability to show info of both channels simultaneously
Expand All @@ -15,6 +15,7 @@ Changelog of Jail
- Fixed capitalized player names not recognizable by the timer #34
- The animated emoji on the timer now shows on both Bail enabled and disabled jails
- Fixed Votes system malfunction due to data storing issues #30
- Cancelled plans for individual jail's allow-escape-area status, updated version

1.1.5 - 31/JUL/2017
- Fixed language initialization error of missing file (Critical fix)
Expand Down
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Jail
main: hoyinm14mc\jail\Jail
api: ["2.0.0", "3.0.0-ALPHA3", "3.0.0-ALPHA4", "3.0.0-ALPHA5", "3.0.0-ALPHA6", "3.0.0-ALPHA7"]
version: 1.1.6
version: 1.2.0
author: hoyinm14mc
description: An advanced jail punishment system for PocketMine servers
load: POSTWORLD
Expand Down
2 changes: 1 addition & 1 deletion resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ update-checker-channel: '*'

### Config version ###
#Do not modify this, otherwise plugin may not work properly
v: 1.1.6
v: 1.2.0
7 changes: 5 additions & 2 deletions src/hoyinm14mc/jail/Jail.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ private function updateSettings(string $oldVersion): bool
if ($no_update !== false) $no_update = false;
$this->getLogger()->info($this->colorMessage("Updating " . $jail . "'s data"));
}
if (isset($j[$jail]["allow-escape-area"]) !== false) {
unset($j[$jail]["allow-escape-area"]);
$this->getLogger()->info($this->colorMessage("Updating " . $jail . "'s data"));
}
}
$this->data1->setAll($j);
$this->data1->save();
Expand Down Expand Up @@ -561,7 +565,7 @@ public function jailedToString(): string
* @param bool $visit
* @param bool $escape
*/
public function setJail(string $jail_name, Position $pos, Position $c1, Position $c2, bool $bail = true, bool $visit = true, bool $escape = false)
public function setJail(string $jail_name, Position $pos, Position $c1, Position $c2, bool $bail = true, bool $visit = true)
{
$j = $this->data1->getAll();
$j[$jail_name]["pos"]["x"] = $pos->x;
Expand All @@ -577,7 +581,6 @@ public function setJail(string $jail_name, Position $pos, Position $c1, Position
$j[$jail_name]["c2"]["z"] = $c2->z;
$j[$jail_name]["c2"]["level"] = $c2->getLevel()->getName();
$j[$jail_name]["allow-bail"] = $bail;
$j[$jail_name]["allow-escape-area"] = $escape;
$j[$jail_name]["allow-visit"] = $visit;
$j[$jail_name]["mine"]["isSet"] = false;
$this->data1->setAll($j);
Expand Down

0 comments on commit 245222a

Please sign in to comment.