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

Commit

Permalink
ItemCasePE-1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroliu committed Sep 19, 2015
1 parent aea76ff commit ef1b97b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ItemCasePE/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ItemCasePE

* Summary: An implementation of Bukkit's ItemCase
* Dependency Plugins: n/a
* PocketMine-MP version: 1.4 - API 1.10.0
* PocketMine-MP version: 1.4 - API 1.10.0, 1.6 - API 1.13.0
* OptionalPlugins:
* Categories: General
* Plugin Access: Tile Entities, Items/Blocks
Expand Down Expand Up @@ -62,6 +62,8 @@ wave** mode is experimental and has not been fully tested.
Changes
-------

* 1.0.6 : Update for PM1.6dev
- changed isPlaceable for canBePlaced
* 1.0.5 : BugFix
- Fixed a small bug related to new wave mode.
* 1.0.4 : new wave vs classic
Expand Down Expand Up @@ -92,4 +94,3 @@ Copyright

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

4 changes: 2 additions & 2 deletions ItemCasePE/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
main: aliuly\itemcasepe\Main
api: 1.10.0
api: [1.10.0, 1.13.0]
load: POSTWORLD

name: ItemCasePE
description: An implementation of Bukkit's ItemCase
version: 1.0.5
version: 1.0.6
author: aliuly

commands:
Expand Down
9 changes: 7 additions & 2 deletions ItemCasePE/src/aliuly/itemcasepe/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,13 @@ public function onPlayerInteract(PlayerInteractEvent $ev){
}
unset($this->touches[$pl->getName()]);
$ev->setCancelled();
if ($ev->getItem()->isPlaceable())
$this->places[$pl->getName()] = $pl->getName();
if (version_compare(\pocketmine\API_VERSION,"1.13.0")>=0) {
if ($ev->getItem()->canBePlaced())
$this->places[$pl->getName()] = $pl->getName();
} else {
if ($ev->getItem()->isPlaceable())
$this->places[$pl->getName()] = $pl->getName();
}
}
public function onBlockPlace(BlockPlaceEvent $ev){
$pl = $ev->getPlayer();
Expand Down

0 comments on commit ef1b97b

Please sign in to comment.