Compare commits
2 Commits
53fcde6a13
...
b6c8978acc
Author | SHA1 | Date |
---|---|---|
Anna | b6c8978acc | |
Anna | 91e8d1d722 |
|
@ -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": {
|
||||
|
|
|
@ -20,12 +20,18 @@ public class PluginUi : IDisposable {
|
|||
this.ViewerButton = new ViewerButton(this.Plugin);
|
||||
|
||||
this.Plugin.Interface.UiBuilder.Draw += this.Draw;
|
||||
this.Plugin.Interface.UiBuilder.OpenConfigUi += this.OpenConfig;
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
this.Plugin.Interface.UiBuilder.OpenConfigUi -= this.OpenConfig;
|
||||
this.Plugin.Interface.UiBuilder.Draw -= this.Draw;
|
||||
}
|
||||
|
||||
private void OpenConfig() {
|
||||
this.MainWindow.Visible = true;
|
||||
}
|
||||
|
||||
private void Draw() {
|
||||
this.MainWindow.Draw();
|
||||
this.ViewerButton.Draw();
|
||||
|
|
|
@ -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