diff options
author | Alexander Harkness <bearbin@gmail.com> | 2014-02-15 20:04:13 +0100 |
---|---|---|
committer | Alexander Harkness <bearbin@gmail.com> | 2014-02-15 20:04:13 +0100 |
commit | 584f7bd806d7bd82407a79dc168af3a7b277beb4 (patch) | |
tree | 87f77c395e2dd4cbadf65a68edb7f71c463cccff /src/Entities/Player.cpp | |
parent | Updated Plugin article (diff) | |
parent | If a player is called "Notch" he drops an apple. http://minecraft.gamepedia.com/Notch (diff) | |
download | cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar.gz cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar.bz2 cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar.lz cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar.xz cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.tar.zst cuberite-584f7bd806d7bd82407a79dc168af3a7b277beb4.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 838bbd06c..d568e068d 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -839,6 +839,12 @@ void cPlayer::KilledBy(cEntity * a_Killer) cItems Pickups; m_Inventory.CopyToItems(Pickups); m_Inventory.Clear(); + + if (GetName() == "Notch") + { + Pickups.Add(cItem(E_ITEM_RED_APPLE)); + } + m_World->SpawnItemPickups(Pickups, GetPosX(), GetPosY(), GetPosZ(), 10); SaveToDisk(); // Save it, yeah the world is a tough place ! |