more remove and on framework only
This commit is contained in:
parent
91e8d1d722
commit
b6c8978acc
|
@ -40,8 +40,10 @@ internal class Commands : IDisposable {
|
|||
this.Plugin.SaveConfig();
|
||||
this.Plugin.ChatGui.Print($"Added {name} to the ban list.");
|
||||
|
||||
this.Plugin.Messages.RemoveVfx();
|
||||
this.Plugin.Messages.Clear();
|
||||
this.Plugin.Framework.RunOnFrameworkThread(() => {
|
||||
this.Plugin.Messages.RemoveVfx();
|
||||
this.Plugin.Messages.Clear();
|
||||
});
|
||||
break;
|
||||
}
|
||||
case "unban": {
|
||||
|
|
|
@ -152,10 +152,19 @@ internal class Settings : ITab {
|
|||
|
||||
if (toRemove > -1) {
|
||||
this.Plugin.Config.BannedTerritories.Remove((uint) toRemove);
|
||||
if (this.Plugin.ClientState.TerritoryType == toRemove) {
|
||||
this.Plugin.Messages.SpawnVfx();
|
||||
}
|
||||
}
|
||||
|
||||
if (toAdd > -1) {
|
||||
this.Plugin.Config.BannedTerritories.Add((uint) toAdd);
|
||||
if (this.Plugin.ClientState.TerritoryType == toAdd) {
|
||||
this.Plugin.Framework.RunOnFrameworkThread(() => {
|
||||
this.Plugin.Messages.RemoveVfx();
|
||||
this.Plugin.Messages.Clear();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (toRemove > -1 || toAdd > -1) {
|
||||
|
|
Loading…
Reference in New Issue