From d4d95b5642dddadad9ce6386d37d82ca2d2679a6 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Wed, 18 May 2016 09:41:42 +0200 Subject: [PATCH] Mixin active message for the to mixing only --- .../massivecraft/massivecore/mixin/Mixin.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/com/massivecraft/massivecore/mixin/Mixin.java b/src/com/massivecraft/massivecore/mixin/Mixin.java index 5b97407f..002d5833 100644 --- a/src/com/massivecraft/massivecore/mixin/Mixin.java +++ b/src/com/massivecraft/massivecore/mixin/Mixin.java @@ -136,6 +136,11 @@ public class Mixin extends Engine @Override public void setActive(boolean active) + { + this.setActiveVerboose(active, true); + } + + public void setActiveVerboose(boolean active, boolean verbose) { // NoChange if (this.isActive() == active) return; @@ -147,20 +152,23 @@ public class Mixin extends Engine after.setPluginSoft(this.getPlugin()); // Deactivate Before - if (before != this) before.setActive(false); + if (before != this) before.setActiveVerboose(false, false); // Set Instance this.setInstance(after); // Activate After - if (after != this) after.setActive(true); + if (after != this) after.setActiveVerboose(true, verbose); // This if (after != this) return; // Inform - String message = Txt.parse("Mixin %s set to %s", this.getBaseName(), this.getName()); - after.getPlugin().log(message); + if (verbose) + { + String message = Txt.parse("Mixin %s set to %s", this.getBaseName(), this.getName()); + after.getPlugin().log(message); + } // Super super.setActive(active);