浏览代码

Update changelog and fix bug

NuclearW 13 年之前
父节点
当前提交
3552b756e0
共有 2 个文件被更改,包括 14 次插入2 次删除
  1. 8 0
      Changelog.txt
  2. 6 2
      src/main/java/com/gmail/nossr50/Combat.java

+ 8 - 0
Changelog.txt

@@ -1,6 +1,14 @@
 Changelog:
 Changelog:
 #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
 #Versions without changelogs probably had very small misc fixes, like tweaks to the source code
 
 
+Version 1.2.09-dev
+ - Fixed issue with Repair Mastery (Issue #47)
+ - Made Arcane Forging fully configurable (Pull Request #52)
+ - Changed timer to be a bit more efficient (Issue #19)
+ - Changed to fire EntityDamageEvents for all damage done by mcMMO
+ - New custom event for developers McMMOPlayerLevelUpEvent
+ - New custmo event for developers McMMOItemSpawnEvent
+
 Version 1.2.08
 Version 1.2.08
  - Changed Bukkit events to new event system
  - Changed Bukkit events to new event system
  - Changed aliasing to send both the mcmmo command and the command used.
  - Changed aliasing to send both the mcmmo command and the command used.

+ 6 - 2
src/main/java/com/gmail/nossr50/Combat.java

@@ -361,8 +361,7 @@ public class Combat
      * @param dmg Amount of damage to attempt to do
      * @param dmg Amount of damage to attempt to do
      */
      */
     public static void dealDamage(LivingEntity target, int dmg){
     public static void dealDamage(LivingEntity target, int dmg){
-    	EntityDamageEvent ede = new EntityDamageEvent(target, EntityDamageEvent.DamageCause.CUSTOM, dmg);
-    	Bukkit.getPluginManager().callEvent(ede);
+    	dealDamage(target, dmg, EntityDamageEvent.DamageCause.CUSTOM);
     }
     }
     
     
     /**
     /**
@@ -375,6 +374,9 @@ public class Combat
     public static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
     public static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
     	EntityDamageEvent ede = new EntityDamageEvent(target, cause, dmg);
     	EntityDamageEvent ede = new EntityDamageEvent(target, cause, dmg);
     	Bukkit.getPluginManager().callEvent(ede);
     	Bukkit.getPluginManager().callEvent(ede);
+    	if(ede.isCancelled()) return;
+    	
+    	target.damage(ede.getDamage());
     }
     }
     
     
     /**
     /**
@@ -387,6 +389,8 @@ public class Combat
     public static void dealDamage(LivingEntity target, int dmg, Player attacker) {
     public static void dealDamage(LivingEntity target, int dmg, Player attacker) {
     	EntityDamageEvent ede = new EntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
     	EntityDamageEvent ede = new EntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
     	Bukkit.getPluginManager().callEvent(ede);
     	Bukkit.getPluginManager().callEvent(ede);
+    	
+    	target.damage(ede.getDamage());
     }
     }
     
     
     public static boolean pvpAllowed(EntityDamageByEntityEvent event, World world)
     public static boolean pvpAllowed(EntityDamageByEntityEvent event, World world)