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

Commit

Permalink
Armor and inventory split pmmp fix v1.1.9 (#53)
Browse files Browse the repository at this point in the history
* v1.1.9

* Update Kit.php
  • Loading branch information
Infernus101 authored Jan 27, 2018
1 parent 079646d commit 1f4a3cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: KitUI
author: Infernus101
api: [3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-ALPHA5, 3.0.0-ALPHA6, 3.0.0-ALPHA7, 3.0.0-ALPHA8, 3.0.0-ALPHA9, 3.0.0-ALPHA10]
main: Infernus101\KitUI\Main
version: 1.1.8
version: 1.1.9
permission: # kit permissions - kit.<kit name>
kit.command:
description: kit command!
Expand Down
9 changes: 5 additions & 4 deletions src/Infernus101/KitUI/Kit.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getName() : string{

public function add(Player $player){
$inv = $player->getInventory();
$arm = $player->getArmorInventory();

if($this->pl->config->get("clear-inventory")){
$inv->clearAll();
Expand All @@ -64,10 +65,10 @@ public function add(Player $player){
}
}

isset($this->data["helmet"]) and $inv->setHelmet($this->loadItem(...explode(":", $this->data["helmet"])));
isset($this->data["chestplate"]) and $inv->setChestplate($this->loadItem(...explode(":", $this->data["chestplate"])));
isset($this->data["leggings"]) and $inv->setLeggings($this->loadItem(...explode(":", $this->data["leggings"])));
isset($this->data["boots"]) and $inv->setBoots($this->loadItem(...explode(":", $this->data["boots"])));
isset($this->data["helmet"]) and $arm->setHelmet($this->loadItem(...explode(":", $this->data["helmet"])));
isset($this->data["chestplate"]) and $arm->setChestplate($this->loadItem(...explode(":", $this->data["chestplate"])));
isset($this->data["leggings"]) and $arm->setLeggings($this->loadItem(...explode(":", $this->data["leggings"])));
isset($this->data["boots"]) and $arm->setBoots($this->loadItem(...explode(":", $this->data["boots"])));

if(isset($this->data["effects"])){
foreach($this->data["effects"] as $effectString){
Expand Down

0 comments on commit 1f4a3cd

Please sign in to comment.