mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-21 12:32:24 +00:00
Following the (game)rules
Make the baubles inventory only drop when the vanilla gamerule of keepInventory is set to false. :)
This commit is contained in:
1 parent
04f63db028
commit
26264d0da7
1 file changed
+1
-1
@@ -30,7 +30,7 @@ public class EventHandlerEntity {
|
||||
|
||||
@SubscribeEvent
|
||||
public void playerDeath(LivingDeathEvent event) {
|
||||
if (event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote) {
|
||||
if (event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote && !event.entity.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory")) {
|
||||
EntityPlayer player = (EntityPlayer)event.entity;
|
||||
PlayerHandler.getPlayerBaubles(player).dropItems(player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user