CloudNet-v2 icon indicating copy to clipboard operation
CloudNet-v2 copied to clipboard

Added Line 90

Open bnt4 opened this issue 4 years ago • 1 comments

Added the line 90 null check to fix a NullPointerException when a player is disconnecting.

This pull request includes:

  • [0] breaking changes
  • [0] no breaking changes (?) I don't know what to do here

Changes made to the repository:

I added line 90 to CloudPermissible.java to fix a null pointer exception when disconnecting. It is now returning if the player to recalculate the permissions is not existent.

Documentation of test results:

I did not test it after the change, but I'm very confident that this will fix it. Error:

Stack Trace [23:09:42] [Server thread/INFO]: TaskID lost connection: Disconnected [23:09:42] [Server thread/ERROR]: Could not pass event PlayerQuitEvent to FastAsyncWorldEdit v1.16-449;cc5b3ec java.lang.NullPointerException: null at de.dytanic.cloudnet.bridge.internal.util.CloudPermissible.recalculatePermissions(CloudPermissible.java:90) ~[?:?] at org.bukkit.permissions.PermissibleBase.removeAttachment(PermissibleBase.java:161) ~[patched_1.16.4.jar:git-Paper-318] at org.bukkit.craftbukkit.v1_16_R3.entity.CraftHumanEntity.removeAttachment(CraftHumanEntity.java:236) ~[patched_1.16.4.jar:git-Paper-318] at com.sk89q.worldedit.bukkit.BukkitPermissionAttachmentManager.removeAttachment(BukkitPermissionAttachmentManager.java:31) ~[?:?] at com.sk89q.worldedit.bukkit.BukkitPlayer.unregister(BukkitPlayer.java:416) ~[?:?] at com.boydti.fawe.bukkit.FaweBukkit.onPlayerQuit(FaweBukkit.java:271) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1920.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.4.jar:git-Paper-318] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.4.jar:git-Paper-318] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.4.jar:git-Paper-318] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.PlayerList.disconnect(PlayerList.java:513) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1677) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.NetworkManager.handleDisconnection(NetworkManager.java:500) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.ServerConnection.c(ServerConnection.java:165) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1381) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:377) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1209) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:997) ~[patched_1.16.4.jar:git-Paper-318] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[patched_1.16.4.jar:git-Paper-318] at java.lang.Thread.run(Thread.java:834) [?:?]

bnt4 avatar Dec 12 '20 22:12 bnt4

Thank you for contributing to CloudNet. In order to merge your Pull Request, please rebase your changes onto the latest commit in the development branch.

(?) I don't know what to do here

Do your changes break existing APIs?
As far as I can see, they to not, so you can mark (with an x) the bracket for no breaking changes

GiantTreeLP avatar Dec 14 '20 16:12 GiantTreeLP