浏览代码

Remove summoned entities on server shutdown

nossr50 6 年之前
父节点
当前提交
444edb209c

+ 1 - 0
Changelog.txt

@@ -1,6 +1,7 @@
 Version 2.1.92
     Call Of The Wild (COTW) no longer cares if entities of the same type are nearby when attempting to summon a new entity
     Most COTW messages have been tweaked and new COTW messages have been added
+    COTW Horses now always spawn in as adults
     By default players are no longer allowed to breed COTW summoned animals with other animals, you can turn this off (see the notes)
     Changed the sound effect for COTW (Fireworks -> Pop)
     Fixed a bug where COTW summon limit was global instead of per player

+ 1 - 0
src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java

@@ -456,6 +456,7 @@ public class TamingManager extends SkillManager {
         horse.setColor(Horse.Color.values()[Misc.getRandom().nextInt(Horse.Color.values().length)]);
         horse.setStyle(Horse.Style.values()[Misc.getRandom().nextInt(Horse.Style.values().length)]);
         horse.setJumpStrength(Math.max(AdvancedConfig.getInstance().getMinHorseJumpStrength(), Math.min(Math.min(Misc.getRandom().nextDouble(), Misc.getRandom().nextDouble()) * 2, AdvancedConfig.getInstance().getMaxHorseJumpStrength())));
+        horse.setAdult();
 
         //TODO: setSpeed, once available
 

+ 1 - 0
src/main/java/com/gmail/nossr50/util/player/UserManager.java

@@ -44,6 +44,7 @@ public final class UserManager {
      */
     public static void remove(Player player) {
         McMMOPlayer mcMMOPlayer = getPlayer(player);
+        mcMMOPlayer.cleanup();
         player.removeMetadata(mcMMO.playerDataKey, mcMMO.p);
 
         if(playerDataSet != null && playerDataSet.contains(mcMMOPlayer)) {