PocketMine-MP 5.15.1 git-be6754494fdbbb9dd57c058ba0e33a4a78c4581f
vendor/pocketmine/bedrock-protocol/src/types/entity/Attribute.php
1<?php
2
3/*
4 * This file is part of BedrockProtocol.
5 * Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
6 *
7 * BedrockProtocol is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 */
12
13declare(strict_types=1);
14
15namespace pocketmine\network\mcpe\protocol\types\entity;
16
17final class Attribute{
21 public function __construct(
22 private string $id,
23 private float $min,
24 private float $max,
25 private float $current,
26 private float $default,
27 private array $modifiers
28 ){}
29
30 public function getId() : string{
31 return $this->id;
32 }
33
34 public function getMin() : float{
35 return $this->min;
36 }
37
38 public function getMax() : float{
39 return $this->max;
40 }
41
42 public function getCurrent() : float{
43 return $this->current;
44 }
45
46 public function getDefault() : float{
47 return $this->default;
48 }
49
53 public function getModifiers() : array{ return $this->modifiers; }
54}
__construct(private string $id, private float $min, private float $max, private float $current, private float $default, private array $modifiers)