Skript

Skript

743k Downloads

TPS falling with command with argument offline player

Lennord opened this issue ยท 4 comments

commented

Skript/Server Version

[17:08:06 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[17:08:06 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[17:08:06 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[17:08:06 INFO]: [Skript] Server Version: git-Paper-497 (MC: 1.20.4)
[17:08:06 INFO]: [Skript] Skript Version: 2.9.3 (skriptlang-github)
[17:08:06 INFO]: [Skript] Installed Skript Addons: None
[17:08:06 INFO]: [Skript] Installed dependencies: None

Bug Description

When I use a command argument called "offline player" like the code below, and type the command several times in a row without stopping, it crashes the server (TPS in free fall..)

I only have the Skript plugin (2.9.3) and Java 17

Expected Behavior

This should not lower your speed and should work without issue.

Steps to Reproduce

command /test [<offline player>] [<text>]:
	trigger:
		if arg 1 is offline:
			send "&c&lOFFLINE" to sender
		else:
			send "&c&lONLINE" to sender

Command executable by Ingame or console !

Errors or Screenshots

No errors in the console except this one:

[17:07:46 WARN]: Can't keep up! Is the server overloaded? Running 6274ms or 125 ticks behind

Other

This problem is very annoying because I tested on several VPS and on localhost and it causes exactly the same problem. I hope you fix it as soon as possible.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

This is functionally impossible to fix because it has to request the playerdata from either the server playerdata files (slow) or from mojang servers (really slow). Duplicate of #6979

commented

Okay I understand but how can I use the offline player argument because I need it?

commented

You can either deal with it (aka don't spam it, don't use the names of players that haven't joined) or you can use a text argument and use the offlineplayer() function to not allow lookups

commented

ok thanks for the help, I'll do that.