Multiverse / Multiverse-Portals

MV2's implementation of MV1 style portals.
BSD 3-Clause "New" or "Revised" License
121 stars 90 forks source link

Fix teleport to nether even if portalsdefaulttonether is false. #625

Closed benwoo1110 closed 3 years ago

benwoo1110 commented 3 years ago

See my comments at https://github.com/Multiverse/Multiverse-Portals/pull/584#issuecomment-831842373

nicegamer7 commented 3 years ago

Is the permission check used anywhere?

benwoo1110 commented 3 years ago

Do you mean for getPortal method? It is used in PlayerMoveEvent as well

benwoo1110 commented 3 years ago

Or do you mean if permission is checked later on in the PlayerPortalEvent? 😅

https://github.com/Multiverse/Multiverse-Portals/blob/882b29f2cf40eeaacb07bf8e4d846aef6c5ca227/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java#L271-L277

nicegamer7 commented 3 years ago

Yeah I mean getPortal with the permission check.

My question is: Is there any use for checking permission in getPortal?

benwoo1110 commented 3 years ago

In events such as PlayerBucketFillEvent, it looks like it's useful there. Bcu only ppl with access perms should be able to change its fill

https://github.com/Multiverse/Multiverse-Portals/blob/882b29f2cf40eeaacb07bf8e4d846aef6c5ca227/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerListener.java#L67-L89

nicegamer7 commented 3 years ago

Ah okay, sounds good then.

benwoo1110 commented 3 years ago

Oh btw this fix will only work when you combine it with fix from #584. But can merge this first