Skip to content

Commit

Permalink
Merge pull request #956 from Chronoken/main
Browse files Browse the repository at this point in the history
SilenceSpell filter fix.
  • Loading branch information
Chronoken authored Nov 29, 2024
2 parents fa01913 + a09fe45 commit 66d5dc2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class SilenceSpell extends TargetedSpell implements TargetedEntitySpell {

private final Map<UUID, Unsilencer> silenced;

private final SpellFilter filter;

private final String strSilenced;

private final ConfigData<Integer> duration;
Expand All @@ -44,6 +42,8 @@ public class SilenceSpell extends TargetedSpell implements TargetedEntitySpell {
private final String preventChatSpellName;
private final String preventCommandSpellName;

private SpellFilter filter;

private Subspell preventCastSpell;
private Subspell preventChatSpell;
private Subspell preventCommandSpell;
Expand All @@ -66,8 +66,6 @@ public SilenceSpell(MagicConfig config, String spellName) {
preventChatSpellName = getConfigString("spell-on-denied-chat", "");
preventCommandSpellName = getConfigString("spell-on-denied-command", "");

filter = SpellFilter.fromLegacySection(config.getMainConfig(), internalKey);

if (preventChat) silenced = new ConcurrentHashMap<>();
else silenced = new HashMap<>();
}
Expand Down Expand Up @@ -95,6 +93,8 @@ public void initialize() {
true);
registerEvents(new CommandListener());
}

filter = getConfigSpellFilter();
}

@Override
Expand Down

0 comments on commit 66d5dc2

Please sign in to comment.