Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nether Portal flag not working #2320

Closed
HatzulMagic opened this issue Mar 11, 2024 · 7 comments
Closed

Nether Portal flag not working #2320

HatzulMagic opened this issue Mar 11, 2024 · 7 comments
Assignees
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug

Comments

@HatzulMagic
Copy link

Expected behavior

When setting the nether portal flag in /is settings the players that are not in the list should not teleport trough the player porta

Observed/Actual behavior

The actual feature doesn't work, even if i set the flag only for the island members , everyone including visitators that are no trusted/cooped can teleport trough the nether portal from the player's island

Steps/models to reproduce

A portal to the nether in the island, and using /is settings to change the flag.

BentoBox version

[14:54:14 INFO]: Running PURPUR 1.20.4.
[14:54:14 INFO]: (git-Purpur-2148 (MC: 1.20.4))
[14:54:14 INFO]: BentoBox version: 2.1.0-SNAPSHOT-b2564
[14:54:14 INFO]: Database: MYSQL
[14:54:14 INFO]: Loaded Game Worlds:
[14:54:14 INFO]: skyblock (SkyBlock): Overworld, Nether, The End
[14:54:14 INFO]: Loaded Addons:
[14:54:14 INFO]: BSkyBlock 1.17.1 (ENABLED)

Plugin list

No response

Other

No response

@tastybento tastybento added the Status: Under investigation Investigating the interest and the feasability of the issue. label Mar 12, 2024
@tastybento
Copy link
Member

Hmm, I can' replicate this yet.
Screenshot 2024-03-11 at 7 33 10 PM
Screenshot 2024-03-11 at 7 32 20 PM

What you can do is use the bsb why <player_name> command to turn on logging of protection. It'll tell you why the player can do something or not. e.g. this is what I get:

[02:35:57] [Server thread/INFO]: BoxManager issued server command: /bsb why tastybentotoo
[02:36:22] [Server thread/INFO]: [BentoBox] Why: PlayerPortalEvent in world bskyblock_world at 810,85,792
[02:36:22] [Server thread/INFO]: [BentoBox] Why: tastybentotoo NETHER_PORTAL - NOT_ALLOWED_ON_ISLAND

@tastybento tastybento self-assigned this Mar 12, 2024
@HatzulMagic
Copy link
Author

HatzulMagic commented Mar 12, 2024

hmm, strange
i get no console report when trying to teleport via nether portal in the player island
i must specify that overworld nether is disabled in the server config files, so this must be the issue?

@tastybento
Copy link
Member

If you get not report, then the event is not being fired and that's why it cannot be trapped and stopped.

Can you share any config regarding the nether? What did you do specifically to disable the nether in the other world? I'll try and copy that and see if I can replicate the same thing.

@HatzulMagic
Copy link
Author

in the server.properties

allow-nether=false

@tastybento
Copy link
Member

Yes, that's the issue. Unfortunately, if nether is switched off, then Bukkit doesn't fire an event for th nether portal, but the nether world does exist in the BSkyBlock world so the server teleports you there. I don't see a way around this unfortunately.

@HatzulMagic
Copy link
Author

i see, so there's no fixing in this

@HatzulMagic
Copy link
Author

HatzulMagic commented Mar 13, 2024

found a bug, when in the overworld and not in the bskyblock world, and trying to disable a flag is /is settings or modify one this happens

[11:17:01 ERROR]: Could not pass event InventoryClickEvent to BentoBox v2.1.1
java.lang.UnsupportedOperationException: null
        at java.util.AbstractList.add(AbstractList.java:153) ~[?:?]
        at java.util.AbstractList.add(AbstractList.java:111) ~[?:?]
        at world.bentobox.bentobox.api.flags.clicklisteners.CycleClick.leftShiftClick(CycleClick.java:154) ~[BentoBox-2.1.1.jar:?]
        at world.bentobox.bentobox.api.flags.clicklisteners.CycleClick.lambda$onClick$0(CycleClick.java:94) ~[BentoBox-2.1.1.jar:?]
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at world.bentobox.bentobox.api.flags.clicklisteners.CycleClick.onClick(CycleClick.java:84) ~[BentoBox-2.1.1.jar:?]
        at world.bentobox.bentobox.listeners.PanelListenerManager.lambda$onInventoryClick$0(PanelListenerManager.java:56) ~[BentoBox-2.1.1.jar:?]
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at world.bentobox.bentobox.listeners.PanelListenerManager.onInventoryClick(PanelListenerManager.java:54) ~[BentoBox-2.1.1.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor789.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:git-Purpur-2148]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3176) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.4.jar:git-Purpur-2148]
        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:1488) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1465) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1388) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1366) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1255) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.4.jar:git-Purpur-2148]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]

@tastybento tastybento added Type: Bug Status: Done This issue has been completed or answered. This pull request has been merged. and removed Status: Under investigation Investigating the interest and the feasability of the issue. labels Mar 16, 2024
tastybento added a commit that referenced this issue Mar 16, 2024
…world

Fix #2320. Enables hiding of flags when in another world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done This issue has been completed or answered. This pull request has been merged. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants