summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2014-02-15 20:04:13 +0100
committerAlexander Harkness <bearbin@gmail.com>2014-02-15 20:04:13 +0100
commit584f7bd806d7bd82407a79dc168af3a7b277beb4 (patch)
tree87f77c395e2dd4cbadf65a68edb7f71c463cccff /src/Entities
parentUpdated Plugin article (diff)
parentIf a player is called "Notch" he drops an apple. http://minecraft.gamepedia.com/Notch (diff)
downloadcuberite-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')
-rw-r--r--src/Entities/Player.cpp6
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 !