Parkour

Parkour

570k Downloads

Interaction with Redstone isn't working

Peda1996 opened this issue ยท 7 comments

commented

I had just set up a parkour arena which is containing pressure plates, which activates redstone mechanism, but sadly, when I have joined the Arena, the player isn't able to interact with anything.

Could you possibly add an interaction point in the config?

commented

Hi Peda, I've just replied to you on spigot.
Inside the config.yml property file, find "OnCourse.PreventPlateStick" and set this to false, then enter "/pa reload".
The purpose of this property is to stop afk players from preventing other players from achieving the checkpoint on that pressure plate. I'm not sure which path to take for this because either way people have difficulties whether this is defaulted to on or off.

commented

Thanks for the fast answer :)

One possible solution would be, to save all Locations of the pressure plates into a set. Only, when the event x, y, and z coordinates are inside the set, the onCheckpointEvent() (file: ParkourListener.java) Method is setting event.setCancelled(true);. Otherwise not.

Other method would be, to just prevent it on the next checkpoint.

commented

Yes this would be an idea, but the main purpose was performance and a simple boolean scenario works for most servers. I can see this being a resource intensive solution, i.e. 50 players on a course each with 20 checkpoints would be a drain. If you want to try it out and record the performance impact I could consider it.
Every solution I've thought of has a side effect, if I put a countdown of 1 second before the pressure plate cancels the event, then that might break redstone that requires the player to stand on it for a while etc.
If you want to create a solution yourself and make a pull request I'll be happy to look into it, but for now as there is already an option to resolve this and there are more pressing things to look at, I'll close this ticket for now but feel free to reopen it if you'd like to work against it.
Thanks

commented

Found a Solution, pull request is online in a second.
The easiest way of solving this problem is, in only using one pressure plate block type. So the other pressure plates can be used for redstone mechanisms.

commented

Okay, I agree this is a nice feature to have, and I will approve it; it isn't really going to fix the original issue, a user could have the checkpoints as stone blocks and for the redstone mechanisms also?

For the pull request there is another possible option I've seen related is by making the pressure plate ParkourKit specific, so each kit could have a different checkpoint type.

commented

Is nearly fixes the problem, due to the fact that nearly no redstoner uses golden and silver pressure plate ^^.

And yea you're right, maybe this should be inside the kit. Then there is only the creation thing is the createCheckpoint() method. From where does this thing knows what pressure plate type to use?

And where is the Invalid block for checkpoint: coming from?

Maybe doing a refactorCheckpoints() (has to be written) when the arena is set to done?

commented

I'm happy with the improvements made.