Mixin active message for the to mixing only

This commit is contained in:
Olof Larsson 2016-05-18 09:41:42 +02:00
parent b78417b48b
commit d4d95b5642
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474

View File

@ -136,6 +136,11 @@ public class Mixin extends Engine
@Override @Override
public void setActive(boolean active) public void setActive(boolean active)
{
this.setActiveVerboose(active, true);
}
public void setActiveVerboose(boolean active, boolean verbose)
{ {
// NoChange // NoChange
if (this.isActive() == active) return; if (this.isActive() == active) return;
@ -147,20 +152,23 @@ public class Mixin extends Engine
after.setPluginSoft(this.getPlugin()); after.setPluginSoft(this.getPlugin());
// Deactivate Before // Deactivate Before
if (before != this) before.setActive(false); if (before != this) before.setActiveVerboose(false, false);
// Set Instance // Set Instance
this.setInstance(after); this.setInstance(after);
// Activate After // Activate After
if (after != this) after.setActive(true); if (after != this) after.setActiveVerboose(true, verbose);
// This // This
if (after != this) return; if (after != this) return;
// Inform // Inform
String message = Txt.parse("<i>Mixin <h>%s<i> set to <h>%s", this.getBaseName(), this.getName()); if (verbose)
after.getPlugin().log(message); {
String message = Txt.parse("<i>Mixin <h>%s<i> set to <h>%s", this.getBaseName(), this.getName());
after.getPlugin().log(message);
}
// Super // Super
super.setActive(active); super.setActive(active);