浏览代码

Vampirism fix

nossr50 12 年之前
父节点
当前提交
c1d6e79a41
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      Changelog.txt
  2. 1 1
      src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java

+ 1 - 0
Changelog.txt

@@ -12,6 +12,7 @@ Version 1.3.11
  + Added compatibility for pvp-prevention plugins for Serrated Strikes
  = Fixed bug where mcMMO could throw NPE errors if trees cut down were from a custom mod and had an id of 17
  = Fixed dupe bug where mcMMO would ignore other block-protection plugins for various abilities
+ = Fixed NPE with hardcore mode's vampirism
  
 Version 1.3.10
  + Added 1.3.1 compatibility

+ 1 - 1
src/main/java/com/gmail/nossr50/listeners/HardcoreListener.java

@@ -22,7 +22,7 @@ public class HardcoreListener implements Listener {
         Player player = event.getEntity(); //Note this returns a Player object for this subevent
 
         if (!Permissions.getInstance().hardcoremodeBypass(player)) {
-            if (Config.getInstance().getHardcoreVampirismEnabled()) {
+            if (player.getKiller() != null && Config.getInstance().getHardcoreVampirismEnabled()) {
                 Hardcore.invokeVampirism(player.getKiller(), player);
             }