Browse Source

Only grant taming XP once when taming a horse

Fixes #1651
TfT_02 11 years ago
parent
commit
f94343f13b
2 changed files with 2 additions and 0 deletions
  1. 1 0
      Changelog.txt
  2. 1 0
      src/main/java/com/gmail/nossr50/listeners/EntityListener.java

+ 1 - 0
Changelog.txt

@@ -27,6 +27,7 @@ Version 1.4.08-dev
  = Fixed bug which caused the backup cleanup to delete old backups while it should have kept those
  = Fixed bug where party chat broke if the display name contained special characters
  = Fixed bug where `/addlevels all` and `/skillreset all` didn't work
+ = Fixed bug which made it possible to gain XP by taming the same horse multiple times, if a player "untamed" that horse
  ! Updated localization files
  ! Changed AxesCritical to CriticalHit in config file
  ! Changed several secondary ability permissions(deprecated versions still exist)

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

@@ -561,6 +561,7 @@ public class EntityListener implements Listener {
             return;
         }
 
+        entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
         UserManager.getPlayer(player).getTamingManager().awardTamingXP(entity);
     }