EnderPearl privilege is never checked due to an impossible null check and thus returns SUCCESS even if the player doesn't have the privilege on the island where he launched the enderpearl
code below shows the null check, but its impossible due to handleInteractionInternal never returning null,
line 348-358 should be replaced with a
return handleInteractionInternal(superiorPlayer, destination, island, IslandPrivileges.ENDER_PEARL, 0, true, false);
like most of the methods in that class
the code above should also use the ProtectionHelper to send the message as right now it always sends a message as if the player is trying to teleport outside of his island
Minecraft's Version
pufferfish 1.19.4
Plugin's Version
SuperiorSkyblock 2023.3
Describe the bug
EnderPearl privilege is never checked due to an impossible null check and thus returns SUCCESS even if the player doesn't have the privilege on the island where he launched the enderpearl
code below shows the null check, but its impossible due to handleInteractionInternal never returning null, line 348-358 should be replaced with a
return handleInteractionInternal(superiorPlayer, destination, island, IslandPrivileges.ENDER_PEARL, 0, true, false);
like most of the methods in that classhttps://github.com/BG-Software-LLC/SuperiorSkyblock2/blob/3fda1dd374bd941340f286ca739c9c4fc1c25ec8/src/main/java/com/bgsoftware/superiorskyblock/service/region/RegionManagerServiceImpl.java#L340-L359
Side note: the message shown when the regionmanagerservice returns anything but success is also wrong
https://github.com/BG-Software-LLC/SuperiorSkyblock2/blob/f6bebe95ddf13e73f66f83e8a2a2ff39e012757a/src/main/java/com/bgsoftware/superiorskyblock/listener/ProtectionListener.java#L371-L389
the code above should also use the ProtectionHelper to send the message as right now it always sends a message as if the player is trying to teleport outside of his island
To Reproduce
Additional Information
No response