PocketMine-MP
5.39.1 git-1be3f83620f013523bb4d35535c6c0f842b54a6a
Loading...
Searching...
No Matches
VanillaArmorMaterialsInputs.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\utils\RegistrySource
;
27
use
pocketmine\world\sound\ArmorEquipChainSound
;
28
use
pocketmine\world\sound\ArmorEquipCopperSound
;
29
use
pocketmine\world\sound\ArmorEquipDiamondSound
;
30
use
pocketmine\world\sound\ArmorEquipGenericSound
;
31
use
pocketmine\world\sound\ArmorEquipGoldSound
;
32
use
pocketmine\world\sound\ArmorEquipIronSound
;
33
use
pocketmine\world\sound\ArmorEquipLeatherSound
;
34
use
pocketmine\world\sound\ArmorEquipNetheriteSound
;
35
40
final
class
VanillaArmorMaterialsInputs
extends
RegistrySource
{
41
public
function
getTargetClassName
() : string{
42
return
"VanillaArmorMaterials"
;
43
}
44
45
public
function
getTargetClassDocComment
() : array{
46
return [
"Allows getting any vanilla armor material implemented by PocketMine-MP"
];
47
}
48
49
protected
function
register
(
string
$name,
ArmorMaterial
$armorMaterial) : void{
50
self::registerValue($name, $armorMaterial);
51
}
52
53
protected
function
setup
() : void{
54
self::register(
"leather"
, new
ArmorMaterial
(15, new
ArmorEquipLeatherSound
()));
55
self::register(
"chainmail"
,
new
ArmorMaterial
(12,
new
ArmorEquipChainSound
()));
56
self::register(
"copper"
,
new
ArmorMaterial
(8,
new
ArmorEquipCopperSound
()));
57
self::register(
"iron"
,
new
ArmorMaterial
(9,
new
ArmorEquipIronSound
()));
58
self::register(
"turtle"
,
new
ArmorMaterial
(9,
new
ArmorEquipGenericSound
()));
59
self::register(
"gold"
,
new
ArmorMaterial
(25,
new
ArmorEquipGoldSound
()));
60
self::register(
"diamond"
,
new
ArmorMaterial
(10,
new
ArmorEquipDiamondSound
()));
61
self::register(
"netherite"
,
new
ArmorMaterial
(15,
new
ArmorEquipNetheriteSound
()));
62
}
63
}
pocketmine\item\ArmorMaterial
Definition
ArmorMaterial.php:28
pocketmine\item\VanillaArmorMaterialsInputs
Definition
VanillaArmorMaterialsInputs.php:40
pocketmine\item\VanillaArmorMaterialsInputs\getTargetClassName
getTargetClassName()
Definition
VanillaArmorMaterialsInputs.php:41
pocketmine\item\VanillaArmorMaterialsInputs\getTargetClassDocComment
getTargetClassDocComment()
Definition
VanillaArmorMaterialsInputs.php:45
pocketmine\item\VanillaArmorMaterialsInputs\setup
setup()
Definition
VanillaArmorMaterialsInputs.php:53
pocketmine\utils\RegistrySource
Definition
RegistrySource.php:51
pocketmine\world\sound\ArmorEquipChainSound
Definition
ArmorEquipChainSound.php:30
pocketmine\world\sound\ArmorEquipCopperSound
Definition
ArmorEquipCopperSound.php:30
pocketmine\world\sound\ArmorEquipDiamondSound
Definition
ArmorEquipDiamondSound.php:30
pocketmine\world\sound\ArmorEquipGenericSound
Definition
ArmorEquipGenericSound.php:30
pocketmine\world\sound\ArmorEquipGoldSound
Definition
ArmorEquipGoldSound.php:30
pocketmine\world\sound\ArmorEquipIronSound
Definition
ArmorEquipIronSound.php:30
pocketmine\world\sound\ArmorEquipLeatherSound
Definition
ArmorEquipLeatherSound.php:30
pocketmine\world\sound\ArmorEquipNetheriteSound
Definition
ArmorEquipNetheriteSound.php:30
pocketmine\item
Definition
Apple.php:24
src
item
VanillaArmorMaterialsInputs.php
Generated by
1.12.0