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

Commit

Permalink
Fix for Tesseract users
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Apr 14, 2017
1 parent e7cb72b commit 5ddda9b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: PiggyAuth
main: PiggyAuth\Main
version: 3.0.0.04
version: 3.0.0.05
api: [2.0.0, 3.0.0-ALPHA1, 3.0.0-ALPHA2, 3.0.0-ALPHA3, 3.0.0-ALPHA4, 3.0.0-APLHA5]
load: POSTWORLD
author: MCPEPIG
Expand Down
4 changes: 3 additions & 1 deletion src/PiggyAuth/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,9 @@ public function onReceive(DataPacketReceiveEvent $event)
$pk->slot = $packet->slot;
$pk->hotbarSlot = $packet->hotbarSlot;
$pk->item = Item::get(Item::AIR);
$pk->selectSlot = $packet->selectSlot;
if(isset($pk->selectSlot)) {
$pk->selectSlot = $packet->selectSlot;
}
$player->dataPacket($pk);
$event->setCancelled();
}
Expand Down
2 changes: 1 addition & 1 deletion src/PiggyAuth/Tasks/AutoUpdaterTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public function onCompletion(Server $server)
$pluginversion = $plugin->getDescription()->getVersion();
$pluginversionwithoutbuildnumber = explode(".", $pluginversion);
unset($pluginversionwithoutbuildnumber[3]);
$pluginbuildnumber = explode(".", $pluginversion)[3];
if (is_array(unserialize($this->result))) { //Over api rate-limit protection
$release = str_replace("v", "", unserialize($this->result)[0]->tag_name);
$releasewithoutbuildnumber = explode(".", $release);
unset($releasewithoutbuildnumber[3]);
$pluginbuildnumber = explode(".", $pluginversion)[3];
$releasebuildnumber = explode(".", $release)[3];
$features = unserialize($this->result)[0]->body;
if ($pluginversion < $release || ($pluginversionwithoutbuildnumber == $releasewithoutbuildnumber && ($pluginbuildnumber < $releasebuildnumber || $pluginbuildnumber !== "00" && $releasebuildnumber == "00"))) {
Expand Down

0 comments on commit 5ddda9b

Please sign in to comment.