Compare commits

...

7 Commits

Author SHA1 Message Date
Auxilor
b4aeeac570 Added tree growth to PlayerBlockListener.kt 2022-01-05 16:22:52 +00:00
Auxilor
33515aa5f7 Updated to 6.17.7 2022-01-05 13:44:47 +00:00
Auxilor
047b535a40 Merge remote-tracking branch 'origin/master' into develop 2022-01-05 13:44:22 +00:00
Auxilor
ef8093ec7f Updated to 6.17.6 2022-01-05 13:42:24 +00:00
Auxilor
9d0f95617d Fixed CrashClaim integration 2022-01-05 13:42:14 +00:00
Auxilor
183b18c0ec Updated to 6.17.6 2021-12-29 18:47:44 +00:00
Auxilor
e026a767d9 Fixed v1_18_R1 bugs 2021-12-29 18:47:33 +00:00
6 changed files with 19 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ class VillagerTrade : VillagerTradeProxy {
for (ingredient in recipe.getIngredients()) {
newRecipe.addIngredient(Display.display(ingredient.clone(), player))
}
getHandle(newRecipe).specialPriceDiff = getHandle(oldRecipe).specialPriceDiff
getHandle(newRecipe).setSpecialPriceDiff(getHandle(oldRecipe).getSpecialPriceDiff())
return newRecipe
}

View File

@@ -16,6 +16,7 @@ import org.bukkit.enchantments.Enchantment
import org.bukkit.inventory.ItemFlag
import kotlin.experimental.and
@Suppress("UsePropertyAccessSyntax")
class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemStack<ItemStack>(
itemStack.getNMSStack(), itemStack
) {
@@ -176,7 +177,7 @@ class NMSFastItemStack(itemStack: org.bukkit.inventory.ItemStack) : EcoFastItemS
}
override fun hashCode(): Int {
return handle.tag?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.item))
return handle.tag?.hashCode() ?: (0b00010101 * 31 + Item.getId(handle.getItem()))
}
private fun apply() {

View File

@@ -40,7 +40,7 @@ dependencies {
compileOnly 'world.bentobox:bentobox:1.17.3-SNAPSHOT'
compileOnly 'com.google.guava:guava:31.0.1-jre'
compileOnly 'com.iridium:IridiumSkyblock:3.1.2'
compileOnly 'com.github.WillFP:CrashClaim:1.0.19'
compileOnly 'com.github.WhipDevelopment:CrashClaim:f9cd7d92eb'
compileOnly 'com.wolfyscript.wolfyutilities:wolfyutilities:1.7.8.1'
compileOnly 'com.github.decentsoftware-eu:decentholograms:2.1.2'

View File

@@ -12,6 +12,7 @@ import org.bukkit.event.block.BlockMultiPlaceEvent
import org.bukkit.event.block.BlockPistonExtendEvent
import org.bukkit.event.block.BlockPistonRetractEvent
import org.bukkit.event.block.BlockPlaceEvent
import org.bukkit.event.world.StructureGrowEvent
import org.bukkit.persistence.PersistentDataType
class PlayerBlockListener(
@@ -40,6 +41,15 @@ class PlayerBlockListener(
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
fun onGrow(event: StructureGrowEvent) {
val block = event.location.block
this.plugin.scheduler.run {
removeKey(block)
}
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
fun onExtend(event: BlockPistonExtendEvent) {
val locs = mutableListOf<Location>()

View File

@@ -14,7 +14,7 @@ class AntigriefCrashClaim : AntigriefWrapper {
block: Block
): Boolean {
val api = CrashClaim.getPlugin().api ?: return true
val claim = api.getClaim(block.location).getNow(null) ?: return true
val claim = api.getClaim(block.location) ?: return true
return claim.hasPermission(player.uniqueId, block.location, PermissionRoute.BUILD)
}
@@ -23,7 +23,7 @@ class AntigriefCrashClaim : AntigriefWrapper {
location: Location
): Boolean {
val api = CrashClaim.getPlugin().api ?: return true
val claim = api.getClaim(location).getNow(null) ?: return true
val claim = api.getClaim(location) ?: return true
return claim.hasPermission(player.uniqueId, location, PermissionRoute.EXPLOSIONS)
}
@@ -32,7 +32,7 @@ class AntigriefCrashClaim : AntigriefWrapper {
block: Block
): Boolean {
val api = CrashClaim.getPlugin().api ?: return true
val claim = api.getClaim(block.location).getNow(null) ?: return true
val claim = api.getClaim(block.location) ?: return true
return claim.hasPermission(player.uniqueId, block.location, PermissionRoute.BUILD)
}
@@ -41,7 +41,7 @@ class AntigriefCrashClaim : AntigriefWrapper {
victim: LivingEntity
): Boolean {
val api = CrashClaim.getPlugin().api ?: return true
val claim = api.getClaim(victim.location).getNow(null) ?: return true
val claim = api.getClaim(victim.location) ?: return true
return when (victim) {
is Player -> false
else -> claim.hasPermission(player.uniqueId, victim.location, PermissionRoute.ENTITIES)

View File

@@ -1,3 +1,3 @@
version = 6.17.5
version = 6.17.7
plugin-name = eco
kotlin.code.style = official