Fix flawed logic in verbosity enable method
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9f52e8747c
commit
06b28aac70
@ -98,20 +98,16 @@ public class Cache
|
|||||||
{
|
{
|
||||||
verbose = v;
|
verbose = v;
|
||||||
|
|
||||||
|
if(verbosityLogger != null)
|
||||||
|
{
|
||||||
|
HidekoBot.getAPI().removeEventListener(verbosityLogger);
|
||||||
|
verbosityLogger = null;
|
||||||
|
}
|
||||||
|
|
||||||
if(v)
|
if(v)
|
||||||
{
|
{
|
||||||
if(verbosityLogger == null)
|
verbosityLogger = new MessageLogger();
|
||||||
{
|
|
||||||
verbosityLogger = new MessageLogger();
|
|
||||||
}
|
|
||||||
|
|
||||||
HidekoBot.getAPI().addEventListener(verbosityLogger);
|
HidekoBot.getAPI().addEventListener(verbosityLogger);
|
||||||
} else {
|
|
||||||
if(verbosityLogger != null)
|
|
||||||
{
|
|
||||||
HidekoBot.getAPI().removeEventListener(verbosityLogger);
|
|
||||||
verbosityLogger = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user