xGinko / AnarchyExploitFixes

Fix exploits on anarchy Minecraft servers
GNU General Public License v3.0
301 stars 53 forks source link

Chunk Limits Not Working #73

Closed blockswerker closed 2 years ago

blockswerker commented 2 years ago

Hello! It appears the block / chunk limiting features are not working. My server is running 1.18.2 and anarchyexploitfixes-1.25.2.2.jar. Players are able to exceed the limits specified here. This is the relevant section of the config:

MaxEnchantmentTablePerChunk: 32
MaxEnderchestPerChunk: 64
MaxContainerPerChunk: 256
MaxSignPerChunk: 100
MaxSlimePerChunk: 128
MaxBeaconPerChunk: 32
MaxHopperPerChunk: 64
MaxPistonPerChunk: 32 # Would allow 64 if sticky pistons are also being used.
MaxGlowstonePerChunk: 99999 # Set to 99999 by default, limit if you wish.
MaxBannersPerChunk: 100
MaxSkullsPerChunk: 50
sqdKaee commented 2 years ago

set OverideConfigChanges: true in config

blockswerker commented 2 years ago

I'll try that. This warning scares the crap out of me though, haha!

# If the server is running a version higher than 1.12.2 there will be a shit ton of errors for some config options. It is not recommended to enable this unless you know they work.
blockswerker commented 2 years ago

The warning was a warning..

[05:50:47] [Server thread/ERROR]: Could not pass event BlockPlaceEvent to AnarchyExploitFixes v1.25.2.2
java.lang.IllegalArgumentException: x out of range (expected 0-15, got 10016)
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:193) ~[guava-31.0.1-jre.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.CraftChunk.validateChunkCoordinates(CraftChunk.java:361) ~[paper-1.18.2.jar:git-Paper-339]
    at org.bukkit.craftbukkit.v1_18_R2.CraftChunk.getBlock(CraftChunk.java:116) ~[paper-1.18.2.jar:git-Paper-339]
    at me.moomoo.anarchyexploitfixes.Main.checkChunk(Main.java:202) ~[anarchyexploitfixes-1.25.2.2.jar:?]
    at me.moomoo.anarchyexploitfixes.patches.ChunkBan.onBlockPlace(ChunkBan.java:41) ~[anarchyexploitfixes-1.25.2.2.jar:?]
    at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:git-Paper-339]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:669) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.event.CraftEventFactory.callBlockPlaceEvent(CraftEventFactory.java:393) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.world.item.ItemStack.useOn(ItemStack.java:383) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:622) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1851) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:33) ~[?:?]
    at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?]
    at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
    at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229) ~[paper-1.18.2.jar:git-Paper-339]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-339]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
sqdKaee commented 2 years ago

ok i will explain: chunk limits doesnt work on non 1.12 servers when OverideConfigChanges: false in config but when you set it on true it will show errors in console. im dont think that moomoo(dev of this plugin) will patch that error since almost all anarchy servers run 1.12.2

xKumorio commented 2 years ago

здарова старик

moom0o commented 2 years ago

I'm pretty sure chunk bans are already patched in newer versions of paper anyway. These patches are for 1.12, which is why they're disabled by default.