Compare commits

..

7 Commits

Author SHA1 Message Date
Will FP
bde705dbf5 Updated to 6.75.2 2025-02-01 16:10:24 +00:00
Will FP
48ca42211d Merge remote-tracking branch 'origin/master'
# Conflicts:
#	eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/antigrief/AntigriefHuskClaims.kt
2025-02-01 16:10:17 +00:00
Will FP
af5a325527 Fixed Entity lookup throwing errors when passing in 'unknown' 2025-02-01 16:10:07 +00:00
Will FP
eb0d6b2d27 Optimised imports 2025-02-01 16:09:54 +00:00
Will FP
69d21550b3 Merge pull request #386 from Exanthiax/husktowns
Updated HuskClaims/HuskTowns Integration
2025-01-31 11:40:38 +00:00
Exanthiax
0bcd688345 fix oopsie 2025-01-26 18:43:51 +00:00
Exanthiax
25de30142b Updated HuskClaims/HuskTowns Integration
Updated API versions and classes to newest versions.
2025-01-25 21:12:29 +00:00
38 changed files with 52 additions and 111 deletions

View File

@@ -37,8 +37,6 @@ import org.jetbrains.annotations.Nullable;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;

View File

@@ -6,7 +6,6 @@ import com.willfp.eco.core.tuples.Pair;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;

View File

@@ -111,6 +111,11 @@ public final class Entities {
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
return new EmptyTestableEntity(); return new EmptyTestableEntity();
} }
if (type.getEntityClass() == null) {
return new EmptyTestableEntity();
}
entity = new SimpleTestableEntity(type); entity = new SimpleTestableEntity(type);
} else { } else {
String namespace = split[0]; String namespace = split[0];

View File

@@ -11,7 +11,6 @@ import org.bukkit.entity.Raider;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@@ -7,9 +7,6 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.Set;
/** /**
* Class to handle antigrief integrations. * Class to handle antigrief integrations.
*/ */

View File

@@ -3,9 +3,6 @@ package com.willfp.eco.core.integrations.customitems;
import com.willfp.eco.core.integrations.IntegrationRegistry; import com.willfp.eco.core.integrations.IntegrationRegistry;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.Set;
/** /**
* Class to handle custom item integrations. * Class to handle custom item integrations.
*/ */

View File

@@ -5,9 +5,6 @@ import org.bukkit.block.Block;
import org.bukkit.event.Event; import org.bukkit.event.Event;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.Set;
/** /**
* Class to handle mcmmo integrations. * Class to handle mcmmo integrations.
*/ */

View File

@@ -3,10 +3,7 @@
package com.willfp.eco.core.entities package com.willfp.eco.core.entities
import com.willfp.eco.core.entities.ai.EntityController import com.willfp.eco.core.entities.ai.EntityController
import com.willfp.eco.core.items.Items
import com.willfp.eco.core.items.TestableItem
import org.bukkit.entity.Mob import org.bukkit.entity.Mob
import org.bukkit.inventory.ItemStack
/** @see EntityController.getFor */ /** @see EntityController.getFor */
val <T : Mob> T.controller: EntityController<T> val <T : Mob> T.controller: EntityController<T>

View File

@@ -4,8 +4,6 @@ import com.willfp.eco.core.entities.args.EntityArgParseResult
import com.willfp.eco.core.entities.args.EntityArgParser import com.willfp.eco.core.entities.args.EntityArgParser
import org.bukkit.attribute.Attribute import org.bukkit.attribute.Attribute
import org.bukkit.entity.LivingEntity import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Phantom
import org.bukkit.entity.Slime
object EntityArgParserScale : EntityArgParser { object EntityArgParserScale : EntityArgParser {
override fun parseArguments(args: Array<out String>): EntityArgParseResult? { override fun parseArguments(args: Array<out String>): EntityArgParseResult? {

View File

@@ -9,7 +9,6 @@ import com.willfp.eco.core.packet.PacketPriority
import org.bukkit.Bukkit import org.bukkit.Bukkit
import org.bukkit.event.HandlerList import org.bukkit.event.HandlerList
import org.bukkit.event.Listener import org.bukkit.event.Listener
import java.lang.Exception
private class RegisteredPacketListener( private class RegisteredPacketListener(

View File

@@ -2,9 +2,7 @@ package com.willfp.eco.internal.items
import com.willfp.eco.internal.items.templates.ValueArgParser import com.willfp.eco.internal.items.templates.ValueArgParser
import com.willfp.eco.util.StringUtils import com.willfp.eco.util.StringUtils
import org.bukkit.inventory.ItemStack
import org.bukkit.inventory.meta.ItemMeta import org.bukkit.inventory.meta.ItemMeta
import java.util.function.Predicate
object ArgParserName : ValueArgParser<String>("name") { object ArgParserName : ValueArgParser<String>("name") {
override fun parse(arg: String): String { override fun parse(arg: String): String {

View File

@@ -1,7 +1,6 @@
package com.willfp.eco.internal.items.templates package com.willfp.eco.internal.items.templates
import com.willfp.eco.core.items.args.LookupArgParser import com.willfp.eco.core.items.args.LookupArgParser
import com.willfp.eco.util.StringUtils
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
import org.bukkit.inventory.meta.ItemMeta import org.bukkit.inventory.meta.ItemMeta
import java.util.function.Predicate import java.util.function.Predicate

View File

@@ -1,7 +1,6 @@
package com.willfp.eco.internal.spigot.proxy.common.ai.target package com.willfp.eco.internal.spigot.proxy.common.ai.target
import com.willfp.eco.core.entities.ai.target.TargetGoalNearestAttackable import com.willfp.eco.core.entities.ai.target.TargetGoalNearestAttackable
import com.willfp.eco.core.lookup.matches
import com.willfp.eco.internal.spigot.proxy.common.ai.TargetGoalFactory import com.willfp.eco.internal.spigot.proxy.common.ai.TargetGoalFactory
import com.willfp.eco.internal.spigot.proxy.common.toBukkitEntity import com.willfp.eco.internal.spigot.proxy.common.toBukkitEntity
import net.minecraft.world.entity.LivingEntity import net.minecraft.world.entity.LivingEntity

View File

@@ -14,29 +14,22 @@ import com.willfp.eco.util.StringUtils
import com.willfp.eco.util.toComponent import com.willfp.eco.util.toComponent
import com.willfp.eco.util.toLegacy import com.willfp.eco.util.toLegacy
import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component
import net.kyori.adventure.text.format.Style
import net.kyori.adventure.text.format.TextColor
import net.kyori.adventure.text.format.TextDecoration import net.kyori.adventure.text.format.TextDecoration
import net.minecraft.core.Holder
import net.minecraft.core.component.DataComponentType import net.minecraft.core.component.DataComponentType
import net.minecraft.core.component.DataComponents import net.minecraft.core.component.DataComponents
import net.minecraft.core.registries.Registries import net.minecraft.core.registries.Registries
import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.CompoundTag
import net.minecraft.util.Unit import net.minecraft.util.Unit
import net.minecraft.world.item.component.CustomData import net.minecraft.world.item.component.CustomData
import net.minecraft.world.item.component.CustomModelData
import net.minecraft.world.item.component.ItemLore import net.minecraft.world.item.component.ItemLore
import net.minecraft.world.item.enchantment.ItemEnchantments import net.minecraft.world.item.enchantment.ItemEnchantments
import org.bukkit.Bukkit
import org.bukkit.craftbukkit.CraftRegistry import org.bukkit.craftbukkit.CraftRegistry
import org.bukkit.craftbukkit.CraftServer
import org.bukkit.craftbukkit.enchantments.CraftEnchantment import org.bukkit.craftbukkit.enchantments.CraftEnchantment
import org.bukkit.enchantments.Enchantment import org.bukkit.enchantments.Enchantment
import org.bukkit.inventory.ItemFlag import org.bukkit.inventory.ItemFlag
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
import org.bukkit.persistence.PersistentDataContainer import org.bukkit.persistence.PersistentDataContainer
import kotlin.math.max import kotlin.math.max
import kotlin.math.min
private val unstyledComponent = Component.empty().style { private val unstyledComponent = Component.empty().style {
it.color(null).decoration(TextDecoration.ITALIC, false) it.color(null).decoration(TextDecoration.ITALIC, false)

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_17_R1
import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.data.ExtendedPersistentDataContainer
import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.item.ContinuallyAppliedPersistentDataContainer
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.craftbukkit.v1_17_R1.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_17_R1.inventory.CraftItemStack

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_18_R1
import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.data.ExtendedPersistentDataContainer
import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.item.ContinuallyAppliedPersistentDataContainer
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_18_R2
import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.data.ExtendedPersistentDataContainer
import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.item.ContinuallyAppliedPersistentDataContainer
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack

View File

@@ -3,7 +3,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_19_R1
import com.willfp.eco.core.items.TestableItem import com.willfp.eco.core.items.TestableItem
import com.willfp.eco.core.recipe.parts.EmptyTestableItem import com.willfp.eco.core.recipe.parts.EmptyTestableItem
import com.willfp.eco.internal.spigot.proxy.SNBTConverterProxy import com.willfp.eco.internal.spigot.proxy.SNBTConverterProxy
import com.willfp.eco.internal.spigot.proxy.common.toMaterial
import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.CompoundTag
import net.minecraft.nbt.SnbtPrinterTagVisitor import net.minecraft.nbt.SnbtPrinterTagVisitor
import net.minecraft.nbt.TagParser import net.minecraft.nbt.TagParser

View File

@@ -5,7 +5,6 @@ import com.willfp.eco.internal.spigot.proxy.CommonsInitializerProxy
import com.willfp.eco.internal.spigot.proxy.common.CommonsProvider import com.willfp.eco.internal.spigot.proxy.common.CommonsProvider
import com.willfp.eco.internal.spigot.proxy.common.packet.PacketInjectorListener import com.willfp.eco.internal.spigot.proxy.common.packet.PacketInjectorListener
import com.willfp.eco.internal.spigot.proxy.common.toResourceLocation import com.willfp.eco.internal.spigot.proxy.common.toResourceLocation
import io.netty.channel.Channel
import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer
import net.minecraft.core.registries.BuiltInRegistries import net.minecraft.core.registries.BuiltInRegistries
@@ -13,7 +12,6 @@ import net.minecraft.nbt.CompoundTag
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import net.minecraft.resources.ResourceLocation import net.minecraft.resources.ResourceLocation
import net.minecraft.server.level.ServerPlayer import net.minecraft.server.level.ServerPlayer
import net.minecraft.server.network.ServerGamePacketListenerImpl
import net.minecraft.world.entity.PathfinderMob import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.item.Item import net.minecraft.world.item.Item
import org.bukkit.Bukkit import org.bukkit.Bukkit

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_19_R2
import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.data.ExtendedPersistentDataContainer
import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.item.ContinuallyAppliedPersistentDataContainer
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftItemStack

View File

@@ -4,7 +4,6 @@ import com.willfp.eco.core.packet.Packet
import com.willfp.eco.core.packet.sendPacket import com.willfp.eco.core.packet.sendPacket
import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy
import com.willfp.eco.internal.spigot.proxy.common.toNMS import com.willfp.eco.internal.spigot.proxy.common.toNMS
import io.papermc.paper.adventure.PaperAdventure
import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component
import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket
import net.minecraft.network.syncher.EntityDataAccessor import net.minecraft.network.syncher.EntityDataAccessor

View File

@@ -4,16 +4,13 @@ import com.willfp.eco.core.packet.Packet
import com.willfp.eco.core.packet.sendPacket import com.willfp.eco.core.packet.sendPacket
import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy
import com.willfp.eco.internal.spigot.proxy.common.toNMS import com.willfp.eco.internal.spigot.proxy.common.toNMS
import io.papermc.paper.adventure.PaperAdventure
import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component
import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket
import net.minecraft.network.syncher.EntityDataAccessor import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.SynchedEntityData import net.minecraft.network.syncher.SynchedEntityData
import net.minecraft.world.entity.Entity import net.minecraft.world.entity.Entity
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftLivingEntity import org.bukkit.craftbukkit.v1_20_R2.entity.CraftLivingEntity
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftMob
import org.bukkit.entity.LivingEntity import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Mob
import org.bukkit.entity.Player import org.bukkit.entity.Player
import java.util.Optional import java.util.Optional

View File

@@ -4,16 +4,13 @@ import com.willfp.eco.core.packet.Packet
import com.willfp.eco.core.packet.sendPacket import com.willfp.eco.core.packet.sendPacket
import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy import com.willfp.eco.internal.spigot.proxy.DisplayNameProxy
import com.willfp.eco.internal.spigot.proxy.common.toNMS import com.willfp.eco.internal.spigot.proxy.common.toNMS
import io.papermc.paper.adventure.PaperAdventure
import net.kyori.adventure.text.Component import net.kyori.adventure.text.Component
import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket
import net.minecraft.network.syncher.EntityDataAccessor import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.SynchedEntityData import net.minecraft.network.syncher.SynchedEntityData
import net.minecraft.world.entity.Entity import net.minecraft.world.entity.Entity
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftLivingEntity import org.bukkit.craftbukkit.v1_20_R3.entity.CraftLivingEntity
import org.bukkit.craftbukkit.v1_20_R3.entity.CraftMob
import org.bukkit.entity.LivingEntity import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Mob
import org.bukkit.entity.Player import org.bukkit.entity.Player
import java.util.Optional import java.util.Optional

View File

@@ -5,7 +5,6 @@ import com.willfp.eco.internal.spigot.proxy.DummyEntityFactoryProxy
import org.bukkit.Location import org.bukkit.Location
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld import org.bukkit.craftbukkit.v1_20_R3.CraftWorld
import org.bukkit.entity.Entity import org.bukkit.entity.Entity
import org.bukkit.entity.EntityType
import org.bukkit.entity.Zombie import org.bukkit.entity.Zombie
class DummyEntityFactory : DummyEntityFactoryProxy { class DummyEntityFactory : DummyEntityFactoryProxy {

View File

@@ -2,7 +2,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_20_R3
import com.willfp.eco.core.data.ExtendedPersistentDataContainer import com.willfp.eco.core.data.ExtendedPersistentDataContainer
import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy import com.willfp.eco.internal.spigot.proxy.ExtendedPersistentDataContainerFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.item.ContinuallyAppliedPersistentDataContainer
import net.minecraft.nbt.Tag import net.minecraft.nbt.Tag
import org.bukkit.Material import org.bukkit.Material
import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack import org.bukkit.craftbukkit.v1_20_R3.inventory.CraftItemStack

View File

@@ -3,13 +3,8 @@ package com.willfp.eco.internal.spigot.proxy.v1_21
import com.willfp.eco.core.fast.FastItemStack import com.willfp.eco.core.fast.FastItemStack
import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack
import net.minecraft.core.Registry
import net.minecraft.core.component.DataComponents import net.minecraft.core.component.DataComponents
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import net.minecraft.world.item.component.CustomModelData import net.minecraft.world.item.component.CustomModelData
import org.bukkit.Bukkit
import org.bukkit.craftbukkit.CraftServer
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
class FastItemStackFactory : FastItemStackFactoryProxy { class FastItemStackFactory : FastItemStackFactoryProxy {

View File

@@ -3,10 +3,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_21_3
import com.willfp.eco.core.fast.FastItemStack import com.willfp.eco.core.fast.FastItemStack
import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack
import net.minecraft.core.Registry
import net.minecraft.resources.ResourceKey
import org.bukkit.Bukkit
import org.bukkit.craftbukkit.CraftServer
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
class FastItemStackFactory : FastItemStackFactoryProxy { class FastItemStackFactory : FastItemStackFactoryProxy {

View File

@@ -3,7 +3,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_21_3
import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.packet.PacketListener import com.willfp.eco.core.packet.PacketListener
import com.willfp.eco.internal.spigot.proxy.PacketHandlerProxy import com.willfp.eco.internal.spigot.proxy.PacketHandlerProxy
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketAutoRecipe
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketHeldItemSlot import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketHeldItemSlot
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketSetSlot import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketSetSlot
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketWindowItems import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketWindowItems

View File

@@ -3,11 +3,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_21_4
import com.willfp.eco.core.fast.FastItemStack import com.willfp.eco.core.fast.FastItemStack
import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy import com.willfp.eco.internal.spigot.proxy.FastItemStackFactoryProxy
import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack import com.willfp.eco.internal.spigot.proxy.common.modern.NewEcoFastItemStack
import net.minecraft.core.Registry
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import org.bukkit.Bukkit
import org.bukkit.craftbukkit.CraftServer
import org.bukkit.inventory.ItemStack import org.bukkit.inventory.ItemStack
class FastItemStackFactory : FastItemStackFactoryProxy { class FastItemStackFactory : FastItemStackFactoryProxy {

View File

@@ -3,7 +3,6 @@ package com.willfp.eco.internal.spigot.proxy.v1_21_4
import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.packet.PacketListener import com.willfp.eco.core.packet.PacketListener
import com.willfp.eco.internal.spigot.proxy.PacketHandlerProxy import com.willfp.eco.internal.spigot.proxy.PacketHandlerProxy
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketAutoRecipe
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketHeldItemSlot import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketHeldItemSlot
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketSetSlot import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketSetSlot
import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketWindowItems import com.willfp.eco.internal.spigot.proxy.common.packet.display.PacketWindowItems

View File

@@ -57,8 +57,8 @@ dependencies {
exclude(group = "*", module = "*") exclude(group = "*", module = "*")
} }
compileOnly("com.iridium:IridiumSkyblock:4.0.8") compileOnly("com.iridium:IridiumSkyblock:4.0.8")
compileOnly("net.william278.huskclaims:huskclaims-bukkit:1.0.1") compileOnly("net.william278.huskclaims:huskclaims-bukkit:1.5")
compileOnly("net.william278:husktowns:2.6.1") compileOnly("net.william278.husktowns:husktowns-bukkit:3.0.8")
compileOnly("com.github.jojodmo:ItemBridge:b0054538c1") compileOnly("com.github.jojodmo:ItemBridge:b0054538c1")
compileOnly("de.oliver:FancyHolograms:2.4.0") compileOnly("de.oliver:FancyHolograms:2.4.0")

View File

@@ -18,9 +18,12 @@ import com.willfp.eco.core.placeholder.context.PlaceholderContext
import com.willfp.eco.internal.EcoPropsParser import com.willfp.eco.internal.EcoPropsParser
import com.willfp.eco.internal.command.EcoPluginCommand import com.willfp.eco.internal.command.EcoPluginCommand
import com.willfp.eco.internal.command.EcoSubcommand import com.willfp.eco.internal.command.EcoSubcommand
import com.willfp.eco.internal.config.* import com.willfp.eco.internal.config.EcoConfigSection
import com.willfp.eco.internal.config.EcoLoadableConfig
import com.willfp.eco.internal.config.EcoUpdatableConfig
import com.willfp.eco.internal.config.handler.ReflectiveConfigHandler import com.willfp.eco.internal.config.handler.ReflectiveConfigHandler
import com.willfp.eco.internal.config.handler.SimpleConfigHandler import com.willfp.eco.internal.config.handler.SimpleConfigHandler
import com.willfp.eco.internal.config.toMap
import com.willfp.eco.internal.drops.EcoDropQueue import com.willfp.eco.internal.drops.EcoDropQueue
import com.willfp.eco.internal.drops.EcoFastCollatedDropQueue import com.willfp.eco.internal.drops.EcoFastCollatedDropQueue
import com.willfp.eco.internal.events.EcoEventManager import com.willfp.eco.internal.events.EcoEventManager

View File

@@ -1,39 +1,34 @@
package com.willfp.eco.internal.spigot.integrations.antigrief package com.willfp.eco.internal.spigot.integrations.antigrief
import com.willfp.eco.core.integrations.antigrief.AntigriefIntegration import com.willfp.eco.core.integrations.antigrief.AntigriefIntegration
import net.crashcraft.crashclaim.CrashClaim import net.william278.huskclaims.api.BukkitHuskClaimsAPI
import net.crashcraft.crashclaim.permissions.PermissionRoute
import net.william278.huskclaims.api.HuskClaimsAPI
import net.william278.huskclaims.libraries.cloplib.operation.Operation import net.william278.huskclaims.libraries.cloplib.operation.Operation
import net.william278.huskclaims.libraries.cloplib.operation.OperationPosition
import net.william278.huskclaims.libraries.cloplib.operation.OperationType import net.william278.huskclaims.libraries.cloplib.operation.OperationType
import net.william278.huskclaims.position.Position import net.william278.huskclaims.position.Position
import net.william278.huskclaims.position.World
import org.bukkit.Location import org.bukkit.Location
import org.bukkit.block.Block import org.bukkit.block.Block
import org.bukkit.entity.LivingEntity import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Monster import org.bukkit.entity.Monster
import org.bukkit.entity.Player import org.bukkit.entity.Player
import kotlin.jvm.optionals.getOrElse
class AntigriefHuskClaims : AntigriefIntegration { class AntigriefHuskClaims : AntigriefIntegration {
override fun canBreakBlock( override fun canBreakBlock(
player: Player, player: Player,
block: Block block: Block
): Boolean { ): Boolean {
val api = HuskClaimsAPI.getInstance() ?: return true val api = BukkitHuskClaimsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player.uniqueId) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
user, user,
OperationType.BLOCK_BREAK, OperationType.BLOCK_BREAK,
Position.at( Position.at(
block.x.toDouble(), block.location.x,
block.y.toDouble(), block.location.y,
block.z.toDouble(), block.location.z,
api.getWorld(block.location.world.name) api.getWorld(block.world)
), ),
true true
) )
@@ -44,9 +39,9 @@ class AntigriefHuskClaims : AntigriefIntegration {
player: Player, player: Player,
location: Location location: Location
): Boolean { ): Boolean {
val api = HuskClaimsAPI.getInstance() ?: return true val api = BukkitHuskClaimsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player.uniqueId) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
@@ -56,7 +51,7 @@ class AntigriefHuskClaims : AntigriefIntegration {
location.x, location.x,
location.y, location.y,
location.z, location.z,
api.getWorld(location.world.name) api.getWorld(location.world)
), ),
true true
) )
@@ -67,19 +62,19 @@ class AntigriefHuskClaims : AntigriefIntegration {
player: Player, player: Player,
block: Block block: Block
): Boolean { ): Boolean {
val api = HuskClaimsAPI.getInstance() ?: return true val api = BukkitHuskClaimsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player.uniqueId) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
user, user,
OperationType.BLOCK_PLACE, OperationType.BLOCK_PLACE,
Position.at( Position.at(
block.x.toDouble(), block.location.x,
block.y.toDouble(), block.location.y,
block.z.toDouble(), block.location.z,
api.getWorld(block.location.world.name) api.getWorld(block.world)
), ),
true true
) )
@@ -90,9 +85,9 @@ class AntigriefHuskClaims : AntigriefIntegration {
player: Player, player: Player,
victim: LivingEntity victim: LivingEntity
): Boolean { ): Boolean {
val api = HuskClaimsAPI.getInstance() ?: return true val api = BukkitHuskClaimsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player.uniqueId) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
@@ -103,10 +98,10 @@ class AntigriefHuskClaims : AntigriefIntegration {
else -> OperationType.PLAYER_DAMAGE_ENTITY else -> OperationType.PLAYER_DAMAGE_ENTITY
}, },
Position.at( Position.at(
victim.x, player.location.x,
victim.y, player.location.y,
victim.z, player.location.z,
api.getWorld(victim.location.world.name) api.getWorld(player.world)
), ),
true true
) )

View File

@@ -1,9 +1,10 @@
package com.willfp.eco.internal.spigot.integrations.antigrief package com.willfp.eco.internal.spigot.integrations.antigrief
import com.willfp.eco.core.integrations.antigrief.AntigriefIntegration import com.willfp.eco.core.integrations.antigrief.AntigriefIntegration
import net.william278.husktowns.api.HuskTownsAPI import net.william278.husktowns.api.BukkitHuskTownsAPI
import net.william278.husktowns.claim.Position import net.william278.husktowns.claim.Position
import net.william278.husktowns.listener.Operation import net.william278.husktowns.libraries.cloplib.operation.Operation
import net.william278.husktowns.libraries.cloplib.operation.OperationType
import org.bukkit.Location import org.bukkit.Location
import org.bukkit.block.Block import org.bukkit.block.Block
import org.bukkit.entity.LivingEntity import org.bukkit.entity.LivingEntity
@@ -15,14 +16,14 @@ class AntigriefHuskTowns : AntigriefIntegration {
player: Player, player: Player,
block: Block block: Block
): Boolean { ): Boolean {
val api = HuskTownsAPI.getInstance() ?: return true val api = BukkitHuskTownsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
user, user,
Operation.Type.BLOCK_BREAK, OperationType.BLOCK_BREAK,
Position.at( Position.at(
block.location.x, block.location.x,
block.location.y, block.location.y,
@@ -38,14 +39,14 @@ class AntigriefHuskTowns : AntigriefIntegration {
player: Player, player: Player,
location: Location location: Location
): Boolean { ): Boolean {
val api = HuskTownsAPI.getInstance() ?: return true val api = BukkitHuskTownsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
user, user,
Operation.Type.EXPLOSION_DAMAGE_ENTITY, OperationType.EXPLOSION_DAMAGE_ENTITY,
Position.at( Position.at(
location.x, location.x,
location.y, location.y,
@@ -61,14 +62,14 @@ class AntigriefHuskTowns : AntigriefIntegration {
player: Player, player: Player,
block: Block block: Block
): Boolean { ): Boolean {
val api = HuskTownsAPI.getInstance() ?: return true val api = BukkitHuskTownsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player) ?: return true val user = api.getOnlineUser(player) ?: return true
return api.isOperationAllowed( return api.isOperationAllowed(
Operation.of( Operation.of(
user, user,
Operation.Type.BLOCK_PLACE, OperationType.BLOCK_PLACE,
Position.at( Position.at(
block.location.x, block.location.x,
block.location.y, block.location.y,
@@ -84,7 +85,7 @@ class AntigriefHuskTowns : AntigriefIntegration {
player: Player, player: Player,
victim: LivingEntity victim: LivingEntity
): Boolean { ): Boolean {
val api = HuskTownsAPI.getInstance() ?: return true val api = BukkitHuskTownsAPI.getInstance() ?: return true
val user = api.getOnlineUser(player) ?: return true val user = api.getOnlineUser(player) ?: return true
@@ -92,9 +93,9 @@ class AntigriefHuskTowns : AntigriefIntegration {
Operation.of( Operation.of(
user, user,
when(victim) { when(victim) {
is Monster -> Operation.Type.PLAYER_DAMAGE_MONSTER is Monster -> OperationType.PLAYER_DAMAGE_MONSTER
is Player -> Operation.Type.PLAYER_DAMAGE_PLAYER is Player -> OperationType.PLAYER_DAMAGE_PLAYER
else -> Operation.Type.PLACE_HANGING_ENTITY else -> OperationType.PLACE_HANGING_ENTITY
}, },
Position.at( Position.at(
player.location.x, player.location.x,

View File

@@ -9,7 +9,6 @@ import java.io.DataOutputStream
import java.io.File import java.io.File
import java.io.InputStreamReader import java.io.InputStreamReader
import java.net.URI import java.net.URI
import java.net.URL
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import java.util.UUID import java.util.UUID
import java.util.concurrent.Executors import java.util.concurrent.Executors

View File

@@ -1,13 +1,13 @@
package com.willfp.eco.internal.spigot.integrations.customitems package com.willfp.eco.internal.spigot.integrations.customitems
import com.denizenscript.denizen.objects.ItemTag
import com.denizenscript.denizen.scripts.containers.core.ItemScriptHelper
import com.willfp.eco.core.integrations.customitems.CustomItemsIntegration import com.willfp.eco.core.integrations.customitems.CustomItemsIntegration
import com.willfp.eco.core.items.CustomItem import com.willfp.eco.core.items.CustomItem
import com.willfp.eco.core.items.Items
import com.willfp.eco.core.items.TestableItem import com.willfp.eco.core.items.TestableItem
import com.willfp.eco.core.items.provider.ItemProvider import com.willfp.eco.core.items.provider.ItemProvider
import com.willfp.eco.util.NamespacedKeyUtils import com.willfp.eco.util.NamespacedKeyUtils
import com.denizenscript.denizen.objects.ItemTag
import com.denizenscript.denizen.scripts.containers.core.ItemScriptHelper
import com.willfp.eco.core.items.Items
import org.bukkit.event.Listener import org.bukkit.event.Listener
class CustomItemsDenizen : CustomItemsIntegration, Listener { class CustomItemsDenizen : CustomItemsIntegration, Listener {

View File

@@ -7,7 +7,7 @@ import com.willfp.eco.core.price.PriceFactory
import com.willfp.eco.util.toSingletonList import com.willfp.eco.util.toSingletonList
import me.qKing12.RoyaleEconomy.MultiCurrency.Currency import me.qKing12.RoyaleEconomy.MultiCurrency.Currency
import org.bukkit.entity.Player import org.bukkit.entity.Player
import java.util.* import java.util.UUID
class PriceFactoryRoyaleEconomy(private val currency: Currency) : PriceFactory { class PriceFactoryRoyaleEconomy(private val currency: Currency) : PriceFactory {

View File

@@ -1,3 +1,3 @@
version = 6.75.1 version = 6.75.2
kotlin.daemon.jvmargs=-Xmx2g -XX:+UseG1GC -XX:MaxMetaspaceSize=512m kotlin.daemon.jvmargs=-Xmx2g -XX:+UseG1GC -XX:MaxMetaspaceSize=512m
org.gradle.parallel=true org.gradle.parallel=true