Skip to content

Commit

Permalink
attempt to prevent duplicated messages
Browse files Browse the repository at this point in the history
  • Loading branch information
anvorgesa committed Jul 8, 2022
1 parent 2ae48e4 commit adbb570
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>eu.mcdb</groupId>
<artifactId>ban-announcer</artifactId>
<version>2.6.2</version>
<version>2.6.3</version>
<name>BanAnnouncer</name>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ private void onSpicordLoad(Spicord spicord) {

this.announcer.loadExtensions(new File(getDataFolder(), "extensions"));

if (pm != null) {
pm.stopAllListeners();
}

pm = new PunishmentListeners(getLogger());

// General punishments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ private void onSpicordLoad(Spicord spicord) {

this.announcer.loadExtensions(new File(getDataFolder(), "extensions"));

if (pm != null) {
pm.stopAllListeners();
}

pm = new PunishmentListeners(getLogger());

// General punishments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@Plugin(
id = "ban_announcer",
name = "BanAnnouncer",
version = "2.6.1",
version = "2.6.3",
authors = { "Sheidy" },
dependencies = {
@Dependency(id = "spicord", optional = false),
Expand Down Expand Up @@ -61,6 +61,10 @@ private void onSpicordLoad(Spicord spicord) {

this.announcer.loadExtensions(new File(getDataFolder(), "extensions"));

if (pm != null) {
pm.stopAllListeners();
}

pm = new PunishmentListeners(getLogger());

pm.addNew("LibertyBans", "libertybans", () -> new LibertyBansListener(this), true, "space.arim.libertybans.api.LibertyBans");
Expand Down

0 comments on commit adbb570

Please sign in to comment.