PocketMine-MP
5.23.3 git-fbaa125d0ce21ffef98fc1630881a92bedfbaa73
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
g
i
m
n
o
p
r
s
t
Functions
Variables
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Variables
$
a
c
d
e
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Files
File List
▼
PocketMine-MP
PocketMine-MP API Documentation
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
src
►
block
►
command
►
console
►
crafting
►
crash
►
data
►
entity
►
event
►
form
►
inventory
▼
item
►
enchantment
Apple.php
Armor.php
ArmorMaterial.php
ArmorTypeInfo.php
item/Arrow.php
Axe.php
BakedPotato.php
item/Bamboo.php
item/Banner.php
item/Beetroot.php
BeetrootSeeds.php
BeetrootSoup.php
BlazeRod.php
Boat.php
BoatType.php
Book.php
Bow.php
Bowl.php
Bread.php
Bucket.php
item/Carrot.php
ChorusFruit.php
Clock.php
Clownfish.php
item/Coal.php
CocoaBeans.php
Compass.php
ConsumableItem.php
CookedChicken.php
CookedFish.php
CookedMutton.php
CookedPorkchop.php
CookedRabbit.php
CookedSalmon.php
Cookie.php
CoralFan.php
item/DriedKelp.php
Durable.php
Dye.php
item/Egg.php
EnchantedBook.php
item/EndCrystal.php
item/EnderPearl.php
item/ExperienceBottle.php
Fertilizer.php
FireCharge.php
FishingRod.php
FlintSteel.php
Food.php
FoodSourceItem.php
GlassBottle.php
GlowBerries.php
GoatHorn.php
GoatHornType.php
GoldenApple.php
GoldenAppleEnchanted.php
GoldenCarrot.php
Hoe.php
HoneyBottle.php
item/IceBomb.php
Item.php
ItemBlock.php
ItemBlockWallOrFloor.php
ItemCooldownTags.php
ItemEnchantmentHandlingTrait.php
ItemIdentifier.php
ItemTypeIds.php
ItemUseResult.php
LegacyStringToItemParser.php
LegacyStringToItemParserException.php
LiquidBucket.php
Medicine.php
MedicineType.php
item/Melon.php
MelonSeeds.php
MilkBucket.php
Minecart.php
MushroomStew.php
NameTag.php
PaintingItem.php
Pickaxe.php
PitcherPod.php
PoisonousPotato.php
item/Potato.php
Potion.php
PotionType.php
ProjectileItem.php
Pufferfish.php
PumpkinPie.php
PumpkinSeeds.php
RabbitStew.php
RawBeef.php
RawChicken.php
RawFish.php
RawMutton.php
RawPorkchop.php
RawRabbit.php
RawSalmon.php
Record.php
item/Redstone.php
Releasable.php
RottenFlesh.php
Shears.php
Shovel.php
item/Snowball.php
SpawnEgg.php
SpiderEye.php
item/SplashPotion.php
Spyglass.php
Steak.php
Stick.php
StringItem.php
StringToItemParser.php
SuspiciousStew.php
SuspiciousStewType.php
SweetBerries.php
Sword.php
TieredTool.php
Tool.php
ToolTier.php
TorchflowerSeeds.php
Totem.php
TurtleHelmet.php
VanillaArmorMaterials.php
VanillaItems.php
WheatSeeds.php
WritableBook.php
WritableBookBase.php
WritableBookPage.php
WrittenBook.php
►
lang
►
network
►
permission
►
player
►
plugin
►
promise
►
resourcepacks
►
scheduler
►
stats
►
thread
►
timings
►
updater
►
utils
►
wizard
►
world
BootstrapOptions.php
CoreConstants.php
MemoryManager.php
PocketMine.php
src/Server.php
ServerConfigGroup.php
ServerProperties.php
TimeTrackingSleeperHandler.php
VersionInfo.php
YmlServerProperties.php
►
vendor
•
All
Classes
Namespaces
Functions
Variables
Enumerations
Enumerator
Pages
Loading...
Searching...
No Matches
NameTag.php
1
<?php
2
3
/*
4
*
5
* ____ _ _ __ __ _ __ __ ____
6
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10
*
11
* This program is free software: you can redistribute it and/or modify
12
* it under the terms of the GNU Lesser General Public License as published by
13
* the Free Software Foundation, either version 3 of the License, or
14
* (at your option) any later version.
15
*
16
* @author PocketMine Team
17
* @link http://www.pocketmine.net/
18
*
19
*
20
*/
21
22
declare(strict_types=1);
23
24
namespace
pocketmine\item
;
25
26
use
pocketmine\entity\Entity
;
27
use
pocketmine\math\Vector3
;
28
use
pocketmine\player\Player
;
29
30
class
NameTag
extends
Item
{
31
32
public
function
onInteractEntity
(
Player
$player,
Entity
$entity,
Vector3
$clickVector) : bool{
33
if($entity->canBeRenamed() && $this->hasCustomName()){
34
$entity->setNameTag($this->getCustomName());
35
$this->
pop
();
36
return
true
;
37
}
38
return
false
;
39
}
32
public
function
onInteractEntity
(
Player
$player,
Entity
$entity,
Vector3
$clickVector) : bool {
…
}
40
}
30
class
NameTag
extends
Item
{
…
};
pocketmine\entity\Entity
Definition
Entity.php:82
pocketmine\item\Item
Definition
Item.php:60
pocketmine\item\Item\pop
pop(int $count=1)
Definition
Item.php:430
pocketmine\item\NameTag
Definition
NameTag.php:30
pocketmine\item\NameTag\onInteractEntity
onInteractEntity(Player $player, Entity $entity, Vector3 $clickVector)
Definition
NameTag.php:32
pocketmine\math\Vector3
Definition
Vector3.php:36
pocketmine\player\Player
Definition
Player.php:170
pocketmine\item
Definition
Apple.php:24
src
item
NameTag.php
Generated by
1.12.0