Hello. Could you might add view distance option?
Its useful option to reduce the lags on server.
Might could also work with on join e.g: 'set players render distance to 3' to let player join succesfull without lagging others and ownself
1) I do like this idea. Someone a while back asked me to add it to Skript-Paper (Since its only available on Paper and not Spigot) and it works like a charm. It would be cool to see Skript add it
2) For the time being you can just do this with skript-mirror
3) In all honesty, I just recommend setting your server view distance to whatever you need it to be. Do players really need to have different view distances from each other? Should really just be a global setting.
@ShaneBeee personally I see a great opportunity to make people donate $100 per chunk of view distance
@ShaneBeee personally I see a great opportunity to make people donate $100 per chunk of view distance
Im not sure if you're being sarcastic or serious ;) haha, but yeah I guess that would totally make sense, I didn't think of it that way!
I would still be cool to have this in skript but people could make Pay To See (P2S).
But however a java dev could make this too without skript.
Just for less lags ( for me less lags, not P2S lol). Plugin 'BestViewDistance' is not too fast like Skript. The 'set view distance for player' or 'set players view distance to 4' "to be reminiscent" with Skript. I cannot even join my server because the chunks are too large but might Skript could do something with events like on join... With Skript view distance could be easier than doing with skript-mirror. Searched here and found that https://github.com/SkriptLang/Skript/issues/1655 so...
if you have Skript-mirror its very simple (you will need to be using Paper not Spigot)
on join:
player.setViewDistance(4)
At least this is something you can do for the time being
Wow really? I was thinking if that would need something like on the skUnity (import: java.lang.System java.lang.String as JavaString java.lang.Math org.bukkit.Location) Hmm. But the 'set players view distance to 4' also too useful, easy to write and nice to read...
You don't need any imports because the player object is already there.
I do agree with this
"But the 'set players view distance to 4' also too useful, easy to write and nice to read..."
Here is how I did it in Skript-Paper
Im just saying for the time being
I'll add it later. Meanwhile, you can use the alternatives suggested here.
They will most likely do a whole set/get/add/remove thing, as with many other expression, but just a heads up, the way it would be written would be exactly what you are doing.
Internally it would most likely be something like
player.setViewDistance(player.getViewDistance() + value)
so at the end of the day, internally it would the same thing as if doing it with skript-mirror
[13:18:52 ERROR]: [Skript] 14 log handlers were not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1602)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
[13:18:52 INFO]: [PlaceholderAPI] 124 placeholder expansions are available on the cloud.
[13:18:56 ERROR]: [Skript] 5 log handlers were not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1596)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
[13:18:56 ERROR]: [Skript] 1 log handler was not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1602)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
[13:18:56 ERROR]: [Skript] 522 log handlers were not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1523)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
[13:19:05 ERROR]: [Skript] 2829 log handlers were not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:253)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
what is it? I have force loaded 2k or more chunks in 1.13.2 by command /forceload
That has nothing to do with this issue nor is something caused by Skript, ask for support in the forums/discord server.
Not sure but you might need update skript mirror to 2.0.0 because these errors are like the same that happens on 1.0.0
Sorry. Just reinstall needed. And how to do this.. I'm getting lag when I try join and getting t...: 21:54:04 WARN]: [Skript] No matching method: CraftPlayer#getViewDistance called with (3 (Long))
Getters don鈥檛 take parameters.
Most helpful comment
Getters don鈥檛 take parameters.