Skip to content

Commit 4c852af

Browse files
committed
Fixed massivecore factions detection.
1 parent 1a9e2e3 commit 4c852af

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

ChunkBusterPlugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<artifactId>ChunkBusterPlugin</artifactId>
1010
<packaging>jar</packaging>
1111
<name>ChunkBusterPlugin</name>
12-
<version>2.1.3</version>
12+
<version>1.2.3</version>
1313

1414
<repositories>
1515
<repository>
@@ -77,7 +77,7 @@
7777

7878
<build>
7979
<directory>../target</directory>
80-
<finalName>ChunkBuster-v${version}</finalName>
80+
<finalName>ChunkBuster-${version}</finalName>
8181
<resources>
8282
<resource>
8383
<targetPath>.</targetPath>

ChunkBusterPlugin/src/main/java/codes/biscuit/chunkbuster/hooks/HookUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package codes.biscuit.chunkbuster.hooks;
22

33
import codes.biscuit.chunkbuster.ChunkBuster;
4-
import org.bukkit.Bukkit;
54
import org.bukkit.Location;
65
import org.bukkit.Material;
76
import org.bukkit.entity.Player;
@@ -22,15 +21,16 @@ public HookUtils(ChunkBuster main) {
2221
this.main = main;
2322
PluginManager pm = main.getServer().getPluginManager();
2423
if (pm.getPlugin("MassiveCore") != null &&
25-
pm.getPlugin("Factions") != null) {
24+
pm.getPlugin("Factions") != null &&
25+
pm.getPlugin("Factions").getDescription().getDepend().contains("MassiveCore")) {
2626
main.getLogger().info("Hooked into MassiveCore Factions");
2727
enabledHooks.put(HookType.MCOREFACTIONS, new MCoreFactionsHook(main));
2828
} else if (pm.getPlugin("Factions") != null) {
2929
main.getLogger().info("Hooked into FactionsUUID/SavageFactions");
3030
enabledHooks.put(HookType.FACTIONSUUID, new FactionsUUIDHook(main));
3131
}
3232
if (pm.getPlugin("WorldGuard") != null) {
33-
String pluginVersion = Bukkit.getServer().getPluginManager().getPlugin("WorldGuard").getDescription().getVersion();
33+
String pluginVersion = main.getServer().getPluginManager().getPlugin("WorldGuard").getDescription().getVersion();
3434
if (pluginVersion.startsWith("7") && pm.getPlugin("WorldEdit") != null) {
3535
enabledHooks.put(HookType.WORLDGUARD, new WorldGuard_7());
3636
main.getLogger().info("Hooked into WorldGuard 7");

ChunkBusterPlugin/src/main/java/codes/biscuit/chunkbuster/utils/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void checkUpdates(Player p) {
137137
if (newestVersionNumbers.get(i) > thisVersionNumbers.get(i)) {
138138
TextComponent newVersion = new TextComponent("A new version of ChunkBuster, " + newestVersion + " is available. Download it by clicking here.");
139139
newVersion.setColor(ChatColor.RED);
140-
newVersion.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.spigotmc.org/resources/chunkbuster-1-8-1-12-clear-any-chunk-area.60057/"));
140+
newVersion.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://www.spigotmc.org/resources/chunkbuster-1-8-1-13-clear-any-area-of-land.60057/"));
141141
p.spigot().sendMessage(newVersion);
142142
break;
143143
} else if (thisVersionNumbers.get(i) > newestVersionNumbers.get(i)) {

ChunkBusterPlugin/src/main/resources/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ chunkbuster:
2828
# chunkbusters with 5+ radius, it may lag the server.
2929
blocks-removed-per-tick: 600
3030

31-
# Change this to false if you don"t want to be able to destroy wilderness chunks.
31+
# Change this to false if you don"t want to be able to destroy wilderness chunks. (factions)
3232
can-place-in-wilderness: true
3333

3434
# The time you must wait before using another chunkbuster, in seconds. Set this to 0 for no cooldown.
@@ -86,7 +86,7 @@ confirm-gui:
8686
confirm-sound: "random.levelup"
8787
confirm-volume: 1.0
8888
confirm-pitch: 1.0
89-
# Sound when the cancel block is clicked
89+
# Sound when the cancel block is clicked or chunk buster is not found in player's inventory
9090
cancel-sound-enabled: false
9191
cancel-sound: "mob.villager.hit"
9292
cancel-volume: 1.0
@@ -112,10 +112,10 @@ ignored-materials:
112112
- "BEDROCK"
113113

114114
hooks:
115-
factions: true
115+
factions: true # Check faction territories
116116
coreprotect: false # Whether CoreProtect should log all removed blocks or not. Will have no effect if coreprotect is not installed.
117-
worldguard: true
118-
towny: false
117+
worldguard: true # Check for block-break flag in regions
118+
towny: false # Check land build permissions
119119

120120
# The minimum factions role for using chunkbusters
121121
# For FactionsUUID/SavageFactions, set this to either "leader"/"admin", "coleader", "moderator", "member"/"normal", "recruit"/"any"

0 commit comments

Comments
 (0)