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

Make player ride entity SETS passengers, does not ADD them (distinction?) #6390

Open
1 task done
bergerkiller opened this issue Feb 2, 2024 · 2 comments
Open
1 task done
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question

Comments

@bergerkiller
Copy link

Skript/Server Version

User reported version 2.8.0

Bug Description

[Disclaimer: this is from another user that had this problem]

User had the following skript:

on right click on minecart:
    make player ride entity

This resulted in a strange bug when used with TrainCarts (or I guess boats too): since traincarts supports multiple seats per cart (custom carts), existing players get ejected when players enter the cart.

I assume that instead of adding the player as passenger, it set the passengers of the cart to this one player.

This might be intentional if the idea of this was to 'swap' passengers when entering, but as a plugin dev this behavior is not predictable, and it's not exactly clear from the statement that this is what it does.

Expected Behavior

Only add the player as passenger to the minecart. Not eject existing, other, players when using "make player ride entity"

Steps to Reproduce

Install skript + traincarts, configure a cart with multiple seats.

Can probably also reproduce using a boat.

Errors or Screenshots

No response

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@sovdeeth sovdeeth added enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question labels Feb 2, 2024
@sovdeeth
Copy link
Member

sovdeeth commented Feb 2, 2024

I think we could do it such that it adds the entity if there's an open passenger slot, else it ejects the first passenger and adds the new entity to the vehicle's passengers.
I don't think we should get rid of the behavior of ejecting the current passenger if the vehicle is full, but I suppose that's up to debate. I'd like other opinions!

@AyhamAl-Ali
Copy link
Member

Usually this is supposed to be handled using passengers of entity instead of using Ride effect. There is a PR improving Passengers and it also has a good choice stating this subject.

If we really need to do this for ride effect then we can add an extra option to the syntax like make player ride event-entity without ejecting others (just PoC, proposed syntax should better be improved)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question
Projects
None yet
Development

No branches or pull requests

3 participants