9
9
import javax .annotation .Nonnull ;
10
10
import javax .annotation .ParametersAreNonnullByDefault ;
11
11
12
+ import io .github .bakedlibs .dough .protection .modules .*;
12
13
import org .bukkit .Location ;
13
14
import org .bukkit .OfflinePlayer ;
14
15
import org .bukkit .block .Block ;
18
19
import io .github .bakedlibs .dough .common .DoughLogger ;
19
20
import io .github .bakedlibs .dough .protection .loggers .CoreProtectLogger ;
20
21
import io .github .bakedlibs .dough .protection .loggers .LogBlockLogger ;
21
- import io .github .bakedlibs .dough .protection .modules .BentoBoxProtectionModule ;
22
- import io .github .bakedlibs .dough .protection .modules .BlockLockerProtectionModule ;
23
- import io .github .bakedlibs .dough .protection .modules .BoltProtectionModule ;
24
- import io .github .bakedlibs .dough .protection .modules .ChestProtectProtectionModule ;
25
- import io .github .bakedlibs .dough .protection .modules .FactionsUUIDProtectionModule ;
26
- import io .github .bakedlibs .dough .protection .modules .FunnyGuildsProtectionModule ;
27
- import io .github .bakedlibs .dough .protection .modules .GriefPreventionProtectionModule ;
28
- import io .github .bakedlibs .dough .protection .modules .HuskTownsProtectionModule ;
29
- import io .github .bakedlibs .dough .protection .modules .HuskClaimsProtectionModule ;
30
- import io .github .bakedlibs .dough .protection .modules .LWCProtectionModule ;
31
- import io .github .bakedlibs .dough .protection .modules .LandsProtectionModule ;
32
- import io .github .bakedlibs .dough .protection .modules .LocketteProtectionModule ;
33
- import io .github .bakedlibs .dough .protection .modules .PlotSquaredProtectionModule ;
34
- import io .github .bakedlibs .dough .protection .modules .PreciousStonesProtectionModule ;
35
- import io .github .bakedlibs .dough .protection .modules .RedProtectProtectionModule ;
36
- import io .github .bakedlibs .dough .protection .modules .ShopChestProtectionModule ;
37
- import io .github .bakedlibs .dough .protection .modules .TownyProtectionModule ;
38
- import io .github .bakedlibs .dough .protection .modules .WorldGuardProtectionModule ;
39
22
40
23
/**
41
24
* This Class provides a nifty API for plugins to query popular protection plugins.
@@ -80,7 +63,6 @@ private void loadModuleImplementations(Plugin plugin) {
80
63
81
64
// We sadly cannot use ModuleName::new as this would load the class into memory prematurely
82
65
registerModule (pm , "WorldGuard" , worldGuard -> new WorldGuardProtectionModule (worldGuard ));
83
- registerModule (pm , "Towny" , towny -> new TownyProtectionModule (towny ));
84
66
registerModule (pm , "GriefPrevention" , griefPrevention -> new GriefPreventionProtectionModule (griefPrevention ));
85
67
registerModule (pm , "LWC" , lwc -> new LWCProtectionModule (lwc ));
86
68
registerModule (pm , "PreciousStones" , preciousStones -> new PreciousStonesProtectionModule (preciousStones ));
@@ -98,6 +80,13 @@ private void loadModuleImplementations(Plugin plugin) {
98
80
registerModule (pm , "HuskClaims" , huskClaims -> new HuskClaimsProtectionModule (huskClaims ));
99
81
registerModule (pm , "Bolt" , bolt -> new BoltProtectionModule (bolt ));
100
82
83
+ // If Quarters is installed, the QuartersProtectionModule must be enabled instead of the Towny module.
84
+ if (pm .isPluginEnabled ("Quarters" )) {
85
+ registerModule (pm , "Quarters" , quarters -> new QuartersProtectionModule (quarters ));
86
+ } else {
87
+ registerModule (pm , "Towny" , towny -> new TownyProtectionModule (towny ));
88
+ }
89
+
101
90
/*
102
91
* The following Plugins work by utilising one of the above listed
103
92
* Plugins in the background.
0 commit comments