Right now it's impossible, MCPE doesn't handle air touch (taping the screen where there is no block), so I believe that it will not satisfy your needs
Also, wrong section, you may post things like this on the 'Plugin Requests' Forum, this section (Plugin Development) is just for those who need help with their plugins or while coding
hmmm, ok thanks... I have one more question. It's possible to make explosive snowballs or arrows? Some like this? PHP: public function onProjectileLaunch(ProjectileLaunchEvent $event){ $entity = $event->getEntity(); if($entity instanceof Snowball){//what now? } }
Maybe change from event... That just points when the projectile is launched. I can make the plugin if you want
PHP: public function onDamage(EntityDamageEvent $e){ if($e instanceof EntityDamageByChildEntityEvent){ $child = $e->getChild(); if($child instanceof Arrow){ // explode at $child->getPosition() } }} Refer to https://github.com/PocketMine/Pocke...f9eca7/src/pocketmine/level/Explosion.php#L57 about the explosion. I am not sure that.
Use PlayerInteractEvent with $event->getFace() as 0xFF https://github.com/PocketMine/PocketMine-MP/blob/master/src/pocketmine/Player.php#L1703-1714
I mean, how to center this? PHP: public function playerJoinInfo(PlayerJoinEvent $PJE) { if($this->isInFaction($PJE->getPlayer()->getName()) == true) { $player = $PJE->getPlayer(); $faction = $this->getPlayerFaction(strtolower($PJE->getPlayer()->getName())); $result = $this->db->query("SELECT * FROM motd WHERE faction='$faction';"); $array = $result->fetchArray(SQLITE3_ASSOC); $isMultiWorldPermsEnabled = $this->plugin->getPPConfig()->getValue("enable-multiworld-perms"); $levelName = $isMultiWorldPermsEnabled ? $player->getLevel()->getName() : null; $g = $this->plugin->getUser($player)->getGroup($levelName)->getName(); $nazwa = $player->getName (); $player->setNameTag ( "• [$g] $nazwa •\n $faction" ); }else{ $player = $PJE->getPlayer(); $isMultiWorldPermsEnabled = $this->plugin->getPPConfig()->getValue("enable-multiworld-perms"); $levelName = $isMultiWorldPermsEnabled ? $player->getLevel()->getName() : null; $g = $this->plugin->getUser($player)->getGroup($levelName)->getName(); $nazwa = $player->getName (); $player->setNameTag ( "• [$g] $nazwa •"); } }
I do it! Here is the code!!! PHP: if($this->isInFaction($PJE->getPlayer()->getName()) == true) { $player = $PJE->getPlayer(); $faction = $this->getPlayerFaction(strtolower($PJE->getPlayer()->getName())); $result = $this->db->query("SELECT * FROM motd WHERE faction='$faction';"); $array = $result->fetchArray(SQLITE3_ASSOC); $isMultiWorldPermsEnabled = $this->plugin->getPPConfig()->getValue("enable-multiworld-perms"); $levelName = $isMultiWorldPermsEnabled ? $player->getLevel()->getName() : null; $g = $this->plugin->getUser($player)->getGroup($levelName)->getName(); $nazwa = $player->getName (); $gliczba = strlen($g); $factionliczba = strlen($faction); $nazwaliczba = strlen($nazwa); $liczba = $gliczba + $nazwaliczba + 7; $liczba1 = $liczba / 2; $liczbaf = $factionliczba / 2; $liczbakoniec = $liczba1 - $liczbaf; $spacja = str_repeat(" ", $liczbakoniec); $player->setNameTag ( "• [$g] $nazwa •\n$spacja$faction" ); Now... can sameone help me with gun plugin?
Thanks!!! Pemapmoder, you are awesome! i DONE Gun plugin and it works PERFECTLY! Thread can be closed Thanks !