mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-23 18:45:17 +01:00
Merge branch 'develop' of https://github.com/BentoBoxWorld/Level.git
into develop
This commit is contained in:
commit
cdd4366a2a
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -11,21 +11,22 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.sonar/cache
|
path: ~/.sonar/cache
|
||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
- name: Cache Maven packages
|
- name: Cache Maven packages
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ~/.m2
|
path: ~/.m2
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
||||||
|
2
pom.xml
2
pom.xml
@ -237,7 +237,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.songoda</groupId>
|
<groupId>com.songoda</groupId>
|
||||||
<artifactId>UltimateStacker</artifactId>
|
<artifactId>UltimateStacker</artifactId>
|
||||||
<version>2.3.3</version>
|
<version>2.4.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -126,32 +126,42 @@ public class Level extends Addon {
|
|||||||
// Check if WildStackers is enabled on the server
|
// Check if WildStackers is enabled on the server
|
||||||
// I only added support for counting blocks into the island level
|
// I only added support for counting blocks into the island level
|
||||||
// Someone else can PR if they want spawners added to the Leveling system :)
|
// Someone else can PR if they want spawners added to the Leveling system :)
|
||||||
stackersEnabled = Bukkit.getPluginManager().isPluginEnabled("WildStacker");
|
if ( !settings.getDisabledPluginHooks().contains("WildStacker") ) {
|
||||||
if (stackersEnabled) {
|
stackersEnabled = Bukkit.getPluginManager().isPluginEnabled("WildStacker");
|
||||||
log("Hooked into WildStackers.");
|
if (stackersEnabled) {
|
||||||
}
|
log("Hooked into WildStackers.");
|
||||||
// Check if AdvancedChests is enabled on the server
|
|
||||||
Plugin advChest = Bukkit.getPluginManager().getPlugin("AdvancedChests");
|
|
||||||
advChestEnabled = advChest != null;
|
|
||||||
if (advChestEnabled) {
|
|
||||||
// Check version
|
|
||||||
if (compareVersions(advChest.getDescription().getVersion(), "23.0") > 0) {
|
|
||||||
log("Hooked into AdvancedChests.");
|
|
||||||
} else {
|
|
||||||
logError("Could not hook into AdvancedChests " + advChest.getDescription().getVersion() + " - requires version 23.0 or later");
|
|
||||||
advChestEnabled = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if AdvancedChests is enabled on the server
|
||||||
|
if ( !settings.getDisabledPluginHooks().contains("AdvancedChests") ) {
|
||||||
|
Plugin advChest = Bukkit.getPluginManager().getPlugin("AdvancedChests");
|
||||||
|
advChestEnabled = advChest != null;
|
||||||
|
if (advChestEnabled) {
|
||||||
|
// Check version
|
||||||
|
if (compareVersions(advChest.getDescription().getVersion(), "23.0") > 0) {
|
||||||
|
log("Hooked into AdvancedChests.");
|
||||||
|
} else {
|
||||||
|
logError("Could not hook into AdvancedChests " + advChest.getDescription().getVersion() + " - requires version 23.0 or later");
|
||||||
|
advChestEnabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if RoseStackers is enabled
|
// Check if RoseStackers is enabled
|
||||||
roseStackersEnabled = Bukkit.getPluginManager().isPluginEnabled("RoseStacker");
|
if ( !settings.getDisabledPluginHooks().contains("RoseStacker") ) {
|
||||||
if (roseStackersEnabled) {
|
roseStackersEnabled = Bukkit.getPluginManager().isPluginEnabled("RoseStacker");
|
||||||
log("Hooked into RoseStackers.");
|
if (roseStackersEnabled) {
|
||||||
|
log("Hooked into RoseStackers.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if UltimateStacker is enabled
|
// Check if UltimateStacker is enabled
|
||||||
ultimateStackerEnabled = Bukkit.getPluginManager().isPluginEnabled("UltimateStacker");
|
if ( !settings.getDisabledPluginHooks().contains("UltimateStacker") ) {
|
||||||
if (ultimateStackerEnabled) {
|
ultimateStackerEnabled = Bukkit.getPluginManager().isPluginEnabled("UltimateStacker");
|
||||||
log("Hooked into UltimateStacker.");
|
if (ultimateStackerEnabled) {
|
||||||
|
log("Hooked into UltimateStacker.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package world.bentobox.level.config;
|
package world.bentobox.level.config;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -126,6 +127,12 @@ public class ConfigSettings implements ConfigObject {
|
|||||||
@ConfigEntry(path = "include-shulkers-in-chest")
|
@ConfigEntry(path = "include-shulkers-in-chest")
|
||||||
private boolean includeShulkersInChest = false;
|
private boolean includeShulkersInChest = false;
|
||||||
|
|
||||||
|
@ConfigComment("")
|
||||||
|
@ConfigComment("Disables hooking with other plugins.")
|
||||||
|
@ConfigComment("Example: disabled-plugin-hooks: [UltimateStacker, RoseStacker]")
|
||||||
|
@ConfigEntry(path = "disabled-plugin-hooks")
|
||||||
|
private List<String> disabledPluginHooks = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the gameModes
|
* @return the gameModes
|
||||||
@ -404,4 +411,12 @@ public class ConfigSettings implements ConfigObject {
|
|||||||
public void setIncludeShulkersInChest(boolean includeShulkersInChest) {
|
public void setIncludeShulkersInChest(boolean includeShulkersInChest) {
|
||||||
this.includeShulkersInChest = includeShulkersInChest;
|
this.includeShulkersInChest = includeShulkersInChest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getDisabledPluginHooks() {
|
||||||
|
return disabledPluginHooks;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisabledPluginHooks(List<String> disabledPluginHooks) {
|
||||||
|
this.disabledPluginHooks = disabledPluginHooks;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user