From bf70a42f6a0acb9e60e0ba6d443c90f752839586 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 2 Jul 2019 12:45:25 -0700 Subject: [PATCH] Fix breeding sending incorrect messages --- Changelog.txt | 3 +++ pom.xml | 2 +- .../com/gmail/nossr50/listeners/EntityListener.java | 11 +++++++---- src/main/resources/plugin.yml | 3 --- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 4e2a1aaed..0da17bf62 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,6 @@ +Version 2.1.93 + Fixed a bug where players would be told they could not breed summoned animals when the animals weren't summoned (bug didn't actually do anything besides send you a message) + 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 Fixed a bug where COTW summon limit was global instead of per player diff --git a/pom.xml b/pom.xml index 918e67c92..efde8132c 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.92 + 2.1.93-SNAPSHOT mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index b232f18c0..ec004949a 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -744,14 +744,17 @@ public class EntityListener implements Listener { Animals mom = (Animals) event.getMother(); Animals father = (Animals) event.getFather(); + //Prevent love mode spam mom.setLoveModeTicks(0); father.setLoveModeTicks(0); + + //Inform the player + if(event.getBreeder() instanceof Player) { + Player player = (Player) event.getBreeder(); + NotificationManager.sendPlayerInformationChatOnly(player, "Taming.Summon.COTW.BreedingDisallowed"); + } } - if(event.getBreeder() instanceof Player) { - Player player = (Player) event.getBreeder(); - NotificationManager.sendPlayerInformationChatOnly(player, "Taming.Summon.COTW.BreedingDisallowed"); - } } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index ae9061bcc..e29bef197 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -616,14 +616,11 @@ permissions: children: mcmmo.ability.taming.callofthewild.horse: true mcmmo.ability.taming.callofthewild.ocelot: true - mcmmo.ability.taming.callofthewild.renamepets: true mcmmo.ability.taming.callofthewild.wolf: true mcmmo.ability.taming.callofthewild.horse: description: Allows players to summon Horses with Call of the Wild mcmmo.ability.taming.callofthewild.ocelot: description: Allows players to summon Ocelots with Call of the Wild - mcmmo.ability.taming.callofthewild.renamepets: - description: Allows players to rename pets with Call of the Wild mcmmo.ability.taming.callofthewild.wolf: description: Allows players to summon Wolves with Call of the Wild mcmmo.ability.taming.environmentallyaware: