Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyutsuki committed Dec 13, 2018
2 parents 1d16b75 + 529c056 commit 9ed5a4d
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 26 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@
"ext-yaml": ">=2.0.0",
"ext-zip": "*",
"ext-zlib": ">=1.2.11",
"pocketmine/pocketmine-mp": "^3.0",
"pocketmine/pocketmine-mp": "^3.5",
"pocketmine/raklib": "^0.12.0",
"pocketmine/spl": "^0.3.0",
"pocketmine/binaryutils": "^0.1.0",
"pocketmine/nbt": "^0.2.0",
"pocketmine/math": "^0.2.0",
"pocketmine/snooze": "^0.1.0",
"daverandom/callback-validator": "dev-master",
"fuyutsuki/libform": "^0.4"
},
"autoload": {
Expand Down
73 changes: 58 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Texter
main: tokyo\pmmp\Texter\Core
version: 3.0.4
version: 3.0.5
api: 3.0.0 # pmmp/PocketMine-MP
softdepend:
- DEVirion
Expand Down
5 changes: 2 additions & 3 deletions src/tokyo/pmmp/Texter/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function onEnable(): void {
FormApi::register($this);
$listener = new EventListener;
$this->getServer()->getPluginManager()->registerEvents($listener, $this);
}else {
$this->getServer()->getPluginManager()->disablePlugin($this);
}
}

Expand Down Expand Up @@ -179,7 +181,6 @@ private function checkPackaged(): bool {
}else {
$message = $cl->translateString("error.on.enable.not.packaged");
$this->getLogger()->critical($message);
$this->getServer()->getPluginManager()->disablePlugin($this);
return false;
}
}else {
Expand All @@ -189,13 +190,11 @@ private function checkPackaged(): bool {
}else {
$message = $cl->translateString("error.on.enable.not.found.libform");
$this->getLogger()->critical($message);
$this->getServer()->getPluginManager()->disablePlugin($this);
return false;
}
}else {
$message = $cl->translateString("error.on.enable.not.packaged");
$this->getLogger()->critical($message);
$this->getServer()->getPluginManager()->disablePlugin($this);
return false;
}
}
Expand Down
10 changes: 4 additions & 6 deletions src/tokyo/pmmp/Texter/text/FloatingText.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,10 @@ public function asPacket(int $type = Text::SEND_TYPE_ADD, bool $owned = false):
$pk->entityUniqueId = $this->eid;
$pk->position = $this;
$pk->item = Item::get(Item::AIR);
$flags =
1 << Entity::DATA_FLAG_CAN_SHOW_NAMETAG |
1 << Entity::DATA_FLAG_ALWAYS_SHOW_NAMETAG |
1 << Entity::DATA_FLAG_IMMOBILE;
$flags |= $this->isInvisible ?
1 << Entity::DATA_FLAG_INVISIBLE : 1;
$flags = 1 << Entity::DATA_FLAG_IMMOBILE;
if ($this->isInvisible) {
$flags |= 1 << Entity::DATA_FLAG_INVISIBLE;
}
$pk->metadata = [
Entity::DATA_FLAGS => [Entity::DATA_TYPE_LONG, $flags],
Entity::DATA_SCALE => [Entity::DATA_TYPE_FLOAT, 0]
Expand Down

0 comments on commit 9ed5a4d

Please sign in to comment.