Skip to content

Commit

Permalink
Config option for BlockLocker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sn0wStorm committed Nov 27, 2020
1 parent 0b9b364 commit 48367ac
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/config/v12/de/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true
useCitadel: true

Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/en/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true
useCitadel: true

Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true
useCitadel: true

Expand Down
1 change: 1 addition & 0 deletions resources/config/v12/it/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true
useCitadel: true

Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/de/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Beim Fass öffnen eine virtuelle Kiste nutzen um Rechte bei allen anderen Plugins abzufragen
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/en/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Use a virtual chest when opening a Barrel to check with all other protection plugins
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/es/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Use a virtual chest when opening a Barrel to check with all other protection plugins
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/fr/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Use a virtual chest when opening a Barrel to check with all other protection plugins
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/it/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Use a virtual chest when opening a Barrel to check with all other protection plugins
Expand Down
1 change: 1 addition & 0 deletions resources/config/v13/zh/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ useWorldGuard: true
useLWC: true
useGriefPrevention: true
useTowny: true
useBlockLocker: true
useGMInventories: true

# Use a virtual chest when opening a Barrel to check with all other protection plugins
Expand Down
2 changes: 2 additions & 0 deletions src/com/dre/brewery/filedata/BConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,11 @@ public static void readConfig(FileConfiguration config) {
if (useBlocklocker) {
try {
Class.forName("nl.rutgerkok.blocklocker.BlockLockerAPIv2");
Class.forName("nl.rutgerkok.blocklocker.ProtectableBlocksSettings");
BlocklockerBarrel.registerBarrelAsProtectable();
} catch (ClassNotFoundException e) {
useBlocklocker = false;
P.p.log("Unsupported Version of 'BlockLocker', locking Brewery Barrels disabled");
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/com/dre/brewery/filedata/ConfigUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,8 @@ private void update30de() {
addLinesAt(new String[]{"# Andere Plugins (wenn installiert) nach Rechten zum öffnen von Fässern checken"}, 1, false,
"# Plugins 'Landlord' und 'Protection Stones' nutzen WorldGuard. 'ClaimChunk' wird nativ unterstützt.");
addLinesAt(new String[]{"useGriefPrevention:", "useLWC:", "useWorldGuard:"}, 1,
"useTowny: true");
"useTowny: true",
"useBlockLocker: true");
addLinesAt(new String[]{"useGMInventories:", "# Plugins 'Landlord' und 'Prote", "# -- Plugin Kompatiblität --"}, 1,
"",
"# Beim Fass öffnen eine virtuelle Kiste nutzen um Rechte bei allen anderen Plugins abzufragen",
Expand Down Expand Up @@ -1988,7 +1989,8 @@ private void update30en() {
addLinesAt(new String[]{"# Enable checking of other Plugins (if installed) for"}, 1, false,
"# Plugins 'Landlord' and 'Protection Stones' use the WorldGuard Flag. 'ClaimChunk' is natively supported.");
addLinesAt(new String[]{"useGriefPrevention:", "useLWC:", "useWorldGuard:"}, 1,
"useTowny: true");
"useTowny: true",
"useBlockLocker: true");
addLinesAt(new String[]{"useGMInventories:", "# Plugins 'Landlord' and 'Protectio", "# -- Plugin Compatibility --"}, 1,
"",
"# Use a virtual chest when opening a Barrel to check with all other protection plugins",
Expand Down

0 comments on commit 48367ac

Please sign in to comment.