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

Could not pass event PlayerTeleportEvent to BentoBox #131

Open
BerndPixel opened this issue Jul 30, 2024 · 5 comments
Open

Could not pass event PlayerTeleportEvent to BentoBox #131

BerndPixel opened this issue Jul 30, 2024 · 5 comments
Assignees
Labels
bug Something isn't working in progress task is actively being worked on

Comments

@BerndPixel
Copy link

BerndPixel commented Jul 30, 2024

Expected behavior

No more error messages

Observed/Actual behavior

An error message appears when entering the island (/is).

Steps/models to reproduce

  1. Player enters the command “/is” on the world “spawn”.
  2. Player is teleported to the island (world name skyblock_world)
  3. Error appears in the console

BentoBox version

Ausführen von PAPER 1.21.
(1.21-119-100d75a (MC: 1.21))
BentoBox version: 2.4.0
Datenbank: JSON
Geladene Spielewelten:
skyblock_world (Skyblock): Oberwelt, Nether, End
Geladene Addons:
Bank 1.8.0-SNAPSHOT-b94 (ENABLED)
Biomes 2.2.0-SNAPSHOT-b268 (ENABLED)
Border 4.3.0-SNAPSHOT-b205 (ENABLED)
BSkyBlock 1.18.0 (ENABLED)
ControlPanel 1.13.1 (ENABLED)
DimensionalTrees 1.7.0 (ENABLED)
ExtraMobs 1.13 (ENABLED)
FarmersDance 1.1.0-SNAPSHOT (ENABLED)
Level 2.14.1 (ENABLED)
Limits 1.21.1-SNAPSHOT-b330 (ENABLED)
Visit 1.7.0-SNAPSHOT (ENABLED)

Plugin list

AdvancedOreGen, BentoBox, BentoBox-Bank, BentoBox-Biomes, BentoBox-BSkyBlock, BentoBox-FarmersDance, BentoBox-Level, BentoBox-Limits, BentoBox-Visit, Citizens, CMI, CMILib, DeluxeMenus, EconomyShopGUI-Premium, FastAsyncWorldEdit, NBTAPI, PlaceholderAPI, ProtocolLib, Quests, UpgradeableSpawners, WorldGuard

Other

[10:47:47 ERROR]: Could not pass event PlayerTeleportEvent to BentoBox v2.4.0
java.lang.NullPointerException: Cannot invoke "org.bukkit.Location.getWorld()" because "to" is null
        at world.bentobox.border.listeners.PlayerListener.onPlayerTeleport(PlayerListener.java:113) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1404.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:1.21-119-100d75a]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.jar:1.21-119-100d75a]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.jar:1.21-119-100d75a]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.level.ServerPlayer.changeDimension(ServerPlayer.java:1383) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.Entity.handlePortal(Entity.java:3273) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.Entity.baseTick(Entity.java:875) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.LivingEntity.baseTick(LivingEntity.java:442) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.Entity.tick(Entity.java:848) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:3132) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.world.entity.player.Player.tick(Player.java:288) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:835) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:346) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.network.Connection.tick(Connection.java:638) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:242) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1823) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:473) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1598) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1304) ~[paper-1.21.jar:1.21-119-100d75a]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-119-100d75a]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
@tastybento tastybento transferred this issue from BentoBoxWorld/BentoBox Jul 31, 2024
@tastybento tastybento self-assigned this Jul 31, 2024
@tastybento tastybento added bug Something isn't working in progress task is actively being worked on labels Jul 31, 2024
tastybento added a commit that referenced this issue Jul 31, 2024
* Version 4.3.1

* Add defensive code for null to's #131
@tastybento
Copy link
Member

The error is caused by the To location of the teleport being null. I am not sure why that would be the case in what you explain as the steps, but maybe there is some kind of intermediate teleport happening. Anyway, I've added defensive code to skip everything if the To location is null. See https://ci.codemc.io/job/BentoBoxWorld/job/Border/ for a snapshot you can try.

@BerndPixel
Copy link
Author

In the latest snapshot now this error:
https://pastebin.com/0SSa65qG

@tastybento
Copy link
Member

Okay. That error is thrown by BentoBox.

However, the root cause is that the To world is null. That shouldn't normally be the case. I can patch for that error but I don't understand why the server would have a null for the world you are going to.

Has this ever worked for you? If so, what changed before these errors started?

@BerndPixel
Copy link
Author

The only thing I have done is to update the server from 1.20.6 to 1.21. Nothing more

@tastybento
Copy link
Member

Does this error always happen? Or just occasionally? I can't replicate on my server.

tastybento added a commit that referenced this issue Nov 17, 2024
* Version 4.2.2

* Added protection against console error spam if island size is zero.

If the protection range is 0 then the caluclations to teleport players
back into the border will result in infinite values and other
strangeness so this prevents that. This is an edge case and only really
happens when the island size has been set wrongly.

* Update README.md

* Fix perm issue #120 (#121)

* feat: detect mounted players on entity (#88)

* Version 4.3.0

* Changes to work with 1.20.6. Has backwards compatibility. (#125)

* Fix imports

* Update zh-CN.yml (#127)

* Latvian translationa (#128)

* Translate lv.yml via GitLocalize

* Translate lv.yml via GitLocalize

---------

Co-authored-by: mt-gitlocalize <[email protected]>
Co-authored-by: tastybento <[email protected]>

* Add explicit bordertype command (#130)

* Add explicit bordertype command

* Add perm to addon.yml and make it default to off

* Remove unused method.

* 131 null to location (#132)

* Version 4.3.1

* Add defensive code for null to's #131

* If border is off, then don't move player back.

* Update to MC 1.21.3 and codemc updates (#134)

---------

Co-authored-by: evlad <[email protected]>
Co-authored-by: Minecraft_15 <[email protected]>
Co-authored-by: gitlocalize-app[bot] <55277160+gitlocalize-app[bot]@users.noreply.github.com>
Co-authored-by: mt-gitlocalize <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress task is actively being worked on
Projects
None yet
Development

No branches or pull requests

2 participants