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.SaveConfig();
|
||||||
this.Plugin.ChatGui.Print($"Added {name} to the ban list.");
|
this.Plugin.ChatGui.Print($"Added {name} to the ban list.");
|
||||||
|
|
||||||
this.Plugin.Messages.RemoveVfx();
|
this.Plugin.Framework.RunOnFrameworkThread(() => {
|
||||||
this.Plugin.Messages.Clear();
|
this.Plugin.Messages.RemoveVfx();
|
||||||
|
this.Plugin.Messages.Clear();
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "unban": {
|
case "unban": {
|
||||||
|
|
|
@ -152,10 +152,19 @@ internal class Settings : ITab {
|
||||||
|
|
||||||
if (toRemove > -1) {
|
if (toRemove > -1) {
|
||||||
this.Plugin.Config.BannedTerritories.Remove((uint) toRemove);
|
this.Plugin.Config.BannedTerritories.Remove((uint) toRemove);
|
||||||
|
if (this.Plugin.ClientState.TerritoryType == toRemove) {
|
||||||
|
this.Plugin.Messages.SpawnVfx();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toAdd > -1) {
|
if (toAdd > -1) {
|
||||||
this.Plugin.Config.BannedTerritories.Add((uint) toAdd);
|
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) {
|
if (toRemove > -1 || toAdd > -1) {
|
||||||
|
|
Loading…
Reference in New Issue