Mixing up positions when using //pos1 & //pos2 from console
bobhenl opened this issue ยท 5 comments
Server Implementation
Paper
Server Version
1.18.2
Describe the bug
Hello, so I've tried using plugin CommandTimer & MyCommand to create scheduled task where I want to reset the inner place of area where players can build. The reset is planned every 15 minutes and I have two arenas. With one arena everything was OK, but when I'm setting two different selections from console it's mixing up.
Images of arenas
First arena selection:
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
Second arena selection: - '//pos1 10,69,18'
- '//pos2 44,71,36'
In MyCommand file I'm using this sequence of commands with delay variable (1 minute delay) to be sure that it cannot combine, but it's still combined somehow.
ResetArena:
command: /resetarena
type: RUN_CONSOLE
runcmd:
- '//world world'
- '$delay$'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '$delay$'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '$delay$'
- '//cut'
- '$delay$'
- '$delay$'
- '$delay$'
- '//world world'
- '$delay$'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '$delay$'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '$delay$'
- '//cut'
cost: 0
delaytimer: 60
delaytimer_format: SECONDS
permission-required: true
register: true
As you can see I've even tried to set multiple pos1 & pos2 same selections to solve this issue, but it still isn't. So, this is what's happening:
LOOK AT THE beginning on the coords of the first selection and second selection and it's POS1 & POS2.
POS1 of the first selection is combined with the POS2 of the second selection
AND POS2 of the first selection is combined with the POS1 of the second selection
Why is this happening? In the log I've noticed different numbers in ().
Second position set to (44, 71, 36) (5760).
Second position set to (44, 71, 36) (1995).
And sometimes as it should it shows this:
01.09 03:44:14 [Server] INFO Position already set.
01.09 03:44:14 [Server] INFO Second position set to (44, 71, 36) (1995).
01.09 03:44:14 [Server] INFO First position set to (10, 69, 18) (1995).
01.09 03:44:14 [Server] INFO Position already set.
BUT sometimes is shown this, that position is set multiple times but it probably still isn't set when it's written multiple times! And it isn't probably even set when it's written for the second time so then it combines. 2 times second position set in same time instead of "Position already set".
[10:28:10] [ForkJoinPool-8-worker-592/INFO]: Second position set to (44, 71, 36) (1995).
[10:28:10] [ForkJoinPool-8-worker-594/INFO]: Second position set to (44, 71, 36) (1995).
Any idea how to solve this issue? I've tried increasing delay, there's 1 minute between it... then I've tried as you can see double POS1 & POS2 of selections, and even more doubles but it still doesn't work.
To Reproduce
Not sure may you can just try using //pos1 & //pos2 from console to see when it won't happen.
BUT maybe you can use MyCommand with the exact command I've created & schedule it in your multicraft / pterodactyl panel / using CommandTimer
Commandtimer part (command named PvPArena_Timer.json in /plugins/CommandTimer/timers
{"name":"PvPArena_Timer","commands":[{"uuid":"fe165f61-7974-4388-bc44-5d26019f8403","command":"resetarena","gender":"CONSOLE"}],"interval":{"days":0,"hours":0,"minutes":15,"seconds":0},"times":[],"random":1.0,"days":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"],"executionLimit":-1,"timesExecuted":787,"lastExecutedCommandIndex":0,"lastExecuted":"Sep 1, 2022, 12:22:17 PM","commandExecutionMode":"ALL","commandExecutionInterval":{"days":0,"hours":0,"minutes":0,"seconds":1},"active":true,"resetExecutionsAfterRestart":false,"condition":{"conditionType":"SIMPLE","conditions":[],"simpleCondition":{"conditionParamFields":[]}}}
MyCommand part from /plugins/MyCommand/commands:
ResetArena:
command: /resetarena
type: RUN_CONSOLE
runcmd:
- '//world world'
- '$delay$'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '$delay$'
- '//pos1 13,74,80'
- '//pos2 -13,65,43'
- '$delay$'
- '//cut'
- '$delay$'
- '$delay$'
- '$delay$'
- '//world world'
- '$delay$'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '$delay$'
- '//pos1 10,69,18'
- '//pos2 44,71,36'
- '$delay$'
- '//cut'
cost: 0
delaytimer: 60
delaytimer_format: SECONDS
permission-required: true
register: true
Expected behaviour
It shouldn't mix up the positions of first and second selection. Every selection has it's own positions and it shouldn't be combined like now that it cuts the area outside the pvp arena.
- it shouldn't probably show two times set, there should be that position is already set.
WRONG
[10:28:10] [ForkJoinPool-8-worker-592/INFO]: Second position set to (44, 71, 36) (1995).
[10:28:10] [ForkJoinPool-8-worker-594/INFO]: Second position set to (44, 71, 36) (1995).
RIGHT
01.09 03:44:14 [Server] INFO Position already set.
01.09 03:44:14 [Server] INFO Second position set to (44, 71, 36) (1995).
01.09 03:44:14 [Server] INFO First position set to (10, 69, 18) (1995).
01.09 03:44:14 [Server] INFO Position already set.
Or I'm not sure what to look after in log, you can look yourselves I've provided it.
Screenshots / Videos
Provided in description.
Error log (if applicable)
You can look (btw there are some errors by other plugins that I'm trying to solve) https://paste.gg/p/anonymous/d25612dfa9d64b8ca78e402523410dd6
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/e977c54411bf47e1a2b6c47263073571
Fawe Version
FastAsyncWorldEdit version 2.4.5-SNAPSHOT-271;a51863c
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response
I cannot see how this is remotely related to FAWE. It seems almost certain to be an issue of both "scripts" running at the same time. It's also possible that the commands are sent at exactly the same time, causing issues on the server-side, and FAWE will place commands into a "queue" itself if commands overlap in their execution time.
[10:28:10] [ForkJoinPool-8-worker-592/INFO]: Second position set to (44, 71, 36) (1995).
[10:28:10] [ForkJoinPool-8-worker-594/INFO]: Second position set to (44, 71, 36) (1995).
I'd think this is rather a synchronisation issue with the command plugin? Is it possible to run all of those command on the same thread and not multiple? And maybe a delay of a few ms between each command call