JimiIT92 / UniverseGuard2

An easy to use world protection plugin for Sponge
https://ore.spongepowered.org/Francesco_Jimi/Universe-Guard
GNU General Public License v3.0
19 stars 3 forks source link

ban on the use of bows in the region #146

Closed Howe251 closed 3 years ago

Howe251 commented 3 years ago

While trying to block the use of bows with command /rg itemuse false minecraft:bow it ran with error that is attached at the bottom

[17:48:26] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'rg itemuse false minecraft:bow' for source EntityPlayerMP['howe251'/506, l='world', x=127.41, y=63.00, z=2392.14]: No value present

java.util.NoSuchElementException: No value present at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_45] at com.universeguard.command.RegionItemUseExecutor.execute(RegionItemUseExecutor.java:34) ~[RegionItemUseExecutor.class:?] at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) ~[ChildCommandElementExecutor.class:1.12.2-2838-7.2.1-RC4011] at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) ~[CommandSpec.class:1.12.2-2838-7.2.1-RC4011] at org.spongepowered.common.command.SpongeCommandDispatcher.process(SpongeCommandDispatcher.java:355) ~[SpongeCommandDispatcher.class:1.12.2-2838-7.2.1-RC4011] at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:360) [SpongeCommandManager.class:1.12.2-2838-7.2.1-RC4011] at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:665) [dh.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:962) [pa.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:941) [pa.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?] at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket(PacketPhaseUtil.java:219) [PacketPhaseUtil.class:1.12.2-2838-7.2.1-RC4011] at net.minecraft.network.PacketThreadUtil$1.redirect$zla000$impl$redirectToPhaseTracker(SourceFile:540) [hv$1.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45] at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?] at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:308) [SpongeImplHooks.class:1.12.2-2838-7.2.1-RC4011] at net.minecraft.server.MinecraftServer.redirect$zje000$onRun(MinecraftServer.java:4682) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]

JimiIT92 commented 3 years ago

Can you share a Region file where this is happening? I've just tested it in the overworld global region with default values and got no issue. Also that error comes up if you don't complete the command, like if you type /rg itemuse false minecraft: and press enter. Sometimes it looks like you typed the item correctly while indeed it doesn't, so also make sure the command has been fully typed

Howe251 commented 3 years ago

If I understand correctly, you requested this file. I am almost sure that I entered the command correctly, and in the logs it is displayed correctly 88642a4c-4804-47bf-91d7-a668dc296c3f.zip

Howe251 commented 3 years ago

On server i have * permissions so, do not pay attention to the fact that there is no members in the region

Vulant commented 3 years ago

Howe251 did you actually give yourself the universeguard. permission or did you just give yourself the universeguard.all perm? For sponge especially, using the perm can mess with things so I just want to make sure. Even though the universeguard.all perm is essentially the perm, it doesn't hurt to swap out your universeguard. perm with universeguard.all

Try that and see if the issue still replicates, that is my only guess so far.

Howe251 commented 3 years ago

i have universeguard.* permission. I'll change it to all and write whether it helped or not изображение

Howe251 commented 3 years ago

changing the access rights helped. thanks