Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4aeeac570 | ||
|
|
33515aa5f7 | ||
|
|
047b535a40 | ||
|
|
ef8093ec7f | ||
|
|
9d0f95617d | ||
|
|
183b18c0ec | ||
|
|
e026a767d9 |
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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>()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = 6.17.5
|
||||
version = 6.17.7
|
||||
plugin-name = eco
|
||||
kotlin.code.style = official
|
||||
Reference in New Issue
Block a user