Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e094a1e934 | ||
|
|
26c07a20e7 | ||
|
|
ad68e1efef | ||
|
|
d8c3a3befa | ||
|
|
aa52dcdf94 | ||
|
|
9d3ba7ea88 |
@@ -150,7 +150,6 @@ public class Display {
|
||||
* @param player The player.
|
||||
* @param args The args.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:FinalParameters")
|
||||
@ApiStatus.Internal
|
||||
public static void callDisplayModule(@NotNull final DisplayModule module,
|
||||
@NotNull final ItemStack itemStack,
|
||||
|
||||
@@ -336,10 +336,14 @@ public class StringUtils {
|
||||
* @return The JSON String.
|
||||
*/
|
||||
@NotNull
|
||||
public String legacyToJson(@NotNull final String legacy) {
|
||||
public String legacyToJson(@Nullable final String legacy) {
|
||||
String processed = legacy;
|
||||
if (legacy == null) {
|
||||
processed = "";
|
||||
}
|
||||
return GsonComponentSerializer.gson().serialize(
|
||||
Component.empty().decoration(TextDecoration.ITALIC, false).append(
|
||||
LEGACY_COMPONENT_SERIALIZER.deserialize(legacy)
|
||||
LEGACY_COMPONENT_SERIALIZER.deserialize(processed)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ dependencies {
|
||||
compileOnly 'com.github.TechFortress:GriefPrevention:16.14.0'
|
||||
compileOnly 'com.massivecraft:Factions:1.6.9.5-U0.5.10'
|
||||
compileOnly 'com.github.cryptomorin:kingdoms:1.10.14'
|
||||
compileOnly 'com.github.TownyAdvanced:Towny:0.96.2.0'
|
||||
compileOnly 'com.github.TownyAdvanced:Towny:0.97.1.0'
|
||||
compileOnly 'com.github.angeschossen:LandsAPI:4.7.3'
|
||||
compileOnly 'fr.neatmonster:nocheatplus:3.16.1-SNAPSHOT'
|
||||
compileOnly 'com.github.jiangdashao:matrix-api-repo:317d4635fd'
|
||||
|
||||
@@ -2,9 +2,7 @@ package com.willfp.eco.spigot.integrations.antigrief
|
||||
|
||||
import com.palmergames.bukkit.towny.TownyAPI
|
||||
import com.palmergames.bukkit.towny.TownyUniverse
|
||||
import com.palmergames.bukkit.towny.`object`.Town
|
||||
import com.palmergames.bukkit.towny.`object`.TownyPermission
|
||||
import com.palmergames.bukkit.towny.`object`.WorldCoord
|
||||
import com.palmergames.bukkit.towny.utils.PlayerCacheUtil
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefWrapper
|
||||
import org.bukkit.Location
|
||||
@@ -67,22 +65,8 @@ class AntigriefTowny : AntigriefWrapper {
|
||||
true
|
||||
}
|
||||
}
|
||||
if (victim is Player) {
|
||||
try {
|
||||
val town: Town = WorldCoord.parseWorldCoord(victim.getLocation()).townBlock.town
|
||||
return town.isPVP
|
||||
} catch (ignored: Exception) {
|
||||
// If exception, no town was found, thus return true.
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
val town: Town = WorldCoord.parseWorldCoord(victim.location).townBlock.town
|
||||
return town.hasMobs()
|
||||
} catch (ignored: Exception) {
|
||||
// If exception, no town was found, thus return true.
|
||||
}
|
||||
}
|
||||
return true
|
||||
val townBlock = TownyAPI.getInstance().getTownBlock(victim.location) ?: return true
|
||||
return townBlock.permissions.pvp
|
||||
}
|
||||
|
||||
override fun getPluginName(): String {
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version = 6.8.1
|
||||
version = 6.8.3
|
||||
plugin-name = eco
|
||||
Reference in New Issue
Block a user