Skip to content

Commit

Permalink
[CORE] Hotfix - Protections not detecting Plugins Enabled Correctly. C…
Browse files Browse the repository at this point in the history
…loses #120

Signed-off-by: Wolfieheart <[email protected]>
  • Loading branch information
Wolfieheart committed Sep 10, 2022
1 parent 16f14b8 commit 5aa6915
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class GriefDefenderProtection implements Protection {

public GriefDefenderProtection() {
gdEnabled = Bukkit.getPluginManager().isPluginEnabled("GriefDefender");
if(!gdEnabled) return;
}

public boolean checkPermission(Block block, Player player) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public LandsProtection() {

if (landsEnabled)
lands = new LandsIntegration(ArmorStandEditorPlugin.instance());
else
return;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public SkyblockProtection(){
//IF YOU WANT YOUR SKYBLOCK ADDED, PLEASE SUBMIT A FEATURE REQUEST!

skyblockEnabled = Bukkit.getPluginManager().isPluginEnabled("SuperiorSkyblock2");
if(!skyblockEnabled) return;
}

public boolean checkPermission(Block block, Player player) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class TownyProtection implements Protection {

public TownyProtection(){
tEnabled = Bukkit.getPluginManager().isPluginEnabled("Towny");
if(!tEnabled) return;
}

public boolean checkPermission(Block block, Player player){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class WorldGuardProtection implements Protection {

public WorldGuardProtection(){
wgEnabled = Bukkit.getPluginManager().isPluginEnabled("WorldGuard");
if(!wgEnabled) return;

RegionContainer regionContainer = WorldGuard.getInstance().getPlatform().getRegionContainer();
regionQry = regionContainer.createQuery();
Expand Down

0 comments on commit 5aa6915

Please sign in to comment.