Skip to content

Commit

Permalink
- Handle knock-off Essentials plugins fooling TownyChat into hooking
Browse files Browse the repository at this point in the history
the real EssentialsX.
  • Loading branch information
LlmDl committed Jun 5, 2023
1 parent a1c7e9f commit e36fdb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion resources/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,4 +463,5 @@ v0.106:
- Fix version check, courtesy of Warrior with PR #48.
- Update min. Towny version to 0.99.1.0.
v0.107:
- Remove usage of Version, using new Towny version checker instead.
- Remove usage of Version, using new Towny version checker instead.
- Handle knock-off Essentials plugins fooling TownyChat into hooking the real EssentialsX.
3 changes: 2 additions & 1 deletion src/com/palmergames/bukkit/TownyChat/Chat.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.palmergames.bukkit.towny.scheduling.impl.BukkitTaskScheduler;
import com.palmergames.bukkit.towny.scheduling.impl.FoliaTaskScheduler;
import com.palmergames.util.FileMgmt;
import com.palmergames.util.JavaUtil;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
Expand Down Expand Up @@ -174,7 +175,7 @@ private void checkPlugins() {
}

test = pm.getPlugin("Essentials");
if (test != null) {
if (test != null && JavaUtil.classExists("com.earth2me.essentials.Essentials")) {
this.essentials = (Essentials) test;
}

Expand Down

0 comments on commit e36fdb9

Please sign in to comment.