diff options
author | Alexander Harkness <me@bearbin.net> | 2018-01-05 12:28:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 12:28:06 +0100 |
commit | b4aa19f329b06e42eb2591fc488b70dc0df41940 (patch) | |
tree | 5b18f7bde0b3129310d273f63b68151850c43ea7 /src/Entities/Player.h | |
parent | Add the fmt library (#4065) (diff) | |
download | cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.gz cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.bz2 cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.lz cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.xz cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.tar.zst cuberite-b4aa19f329b06e42eb2591fc488b70dc0df41940.zip |
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r-- | src/Entities/Player.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h index f56841613..32a4b0348 100644 --- a/src/Entities/Player.h +++ b/src/Entities/Player.h @@ -5,6 +5,7 @@ #include "../Inventory.h" #include "../Defines.h" #include "../World.h" +#include "../Items/ItemHandler.h" #include "../Statistics.h" @@ -413,7 +414,13 @@ public: If the player is not riding a horse or if the horse is untamed, does nothing. */ void OpenHorseInventory(); - void UseEquippedItem(int a_Amount = 1); + /** Damage the player's equipped item by a_Damage, possibly less if the + equipped item is enchanted. */ + void UseEquippedItem(short a_Damage = 1); + + /** Damage the player's equipped item by the amount of damage such an item + is damaged by when used for a_Action */ + void UseEquippedItem(cItemHandler::eDurabilityLostAction a_Action); void SendHealth(void); |