#help-archived
1 messages Β· Page 145 of 1
?paste
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
?1.16
Spigot and BungeeCord 1.16.1 are now available. Please see https://www.spigotmc.org/threads/447405/ for more information.
Reminder that BuildTools is the only supported means of obtaining the Spigot server jar.
how work bot
Those should be the two relevant links you need for 1.16
(I am running 1.15.2)
So what is it you need then? ;P
...me?
Yes π
Nothing?
ltk_watermelon asking a question, was looking for an available command that sends a link to plugin development tutorials / java tutorials. I guess that kind of works.
spd = spigot development?
yay im the one having the problem with the plugin
Well step one! value.equals(null) is a no-go
You should check for nullability with == π
π
Otherwise you're invoking something on a null pointer. The very definition of an NPE
except if it is a string
Strings can still be null, friend ;P
anyone know of a way to install a jar from maven_central from the command line without specifying the jar and pom?
That is true
equals compares contents, == compares reference unless primitive
Anything can be null
I'd like to just specify the group, artifact and version from the command line and install to the local repo
Except primitives
okay i just changed it @subtle blade and i will see if it worked. thanks
update: it still doesnt work with the offhand.
link work for me
https://paste.md-5.net/pawiroyuvu.sql I also get this error in the console.
not sure if Spigot or essentials related but how can you stop private /msg from logging into the console?
poggers am i right
I feel like || should be &&
@loud jasper clone, edit, compile
I think this is a better question for the forums, watermelon π A bit of a longer-winded one that will require a bit more discussion
You are checking if the item is not null or not air
ok. will throw up a post. thanks for the help @subtle blade and @tender quarry
You probably want to check if itβs not null and not air
@tender quarry i have no idea what that means sorry lol
?spd
π
@loud jasper spigot.yml under commands log = true >> log = false
Clone essentialsX from github, edit it to make it not log to console, then compile it into a jar file and use it.
When bot commands don't exist and make you look stupid, just add them in and pretend nobody saw
got ya thanks π

@lone fog from what i saw on the forums, someone said that it should be or since it can return as air or null
it should be && no?
pretty sure depending on the version
uh logic is logic. it doesn't change per version.
i can try it out and see. second.
if something is not null and it's not air = something that is something but not air
@neon epoch wont that stop ALL commands from logging tho and not just /msg ?
That's why I suggested clone, edit, compile ^^
lol thanks
still doesnt work. the error is on the if statement where it checks if it has lore. (changes depending on which hand you are placing the block with)
so check if it has lore using ItemStack#hasLore
i did
Anyone know what might be causing player health to set to full every second? I cant PvP cause health resets to full constantly
WorldGuard @oak sluice ?
Does anyone knows how to build Residence plugin? I tried to contact Zrips (Maintainer of this plugin + CMI) but seems like he lost interest in Residence.
mvn clean install?
yeah I've been looking. Invincibility is off for my regions though
okay i think i understand.
Heal delay and heal amount?
Hi, after updating from 1.15.2 to the newest release it seems like spigot is ignoring the world-container setting in bukkit.yml and in stead of using my old world just creating new world folders inside the server directory. Maybe something else is happening here and I'm making a dumb assumption... Does anyone know a solution?
use --world-container as a CLI flag
Im surprised that option was used, it was never in the default bukkit.yml
Sigh i tried googling this but google didnt show me a single page containing "1.16"
Will try thanks :)
anyone else using LuckPerms and having trouble with rank colors?
Der, I don't know if I did something wrong, or if this is somethign that I should make a bug report about on the website. But the bukkit.yml doesn;t generate an 'autosave' line for me
its in the ticks-per section
I must have done something wrong. tyty
Hi, I've submitted a Spigot CLA yesterday but have not yet received access to Stash. I've also asked on #spigot-dev with no response. Can anyone here please help? Thanks in advance
They're processed manually π Not sure on the timeline though. I think it's mostly just whenever cindy gets around to it
ah, that makes sense. I read that I should ask on irc after 24h so that's what I did
thanks!
anyone know if world guard is working for 1.16.1?
Should be
the same update as 1.15? i dont see a newer version quite yet
Worldedit has a dev build as well
I've tested it myself
kk ty
yup np
sorry if this is a dumb question, i'm just curious as to why the build tools can't use system wide installed git binaries?
i.e. i have git for windows installed, but it still chose to install git portable or whatever
hold up, i swear i just had to use Β§#Β§aΒ§bΒ§cΒ§dΒ§eΒ§f for scoreboard team prefixes but now... it... is normal again?
nvm now none of them work
Is this a know error ?:)
pretty sure its a vanilla thing when using flat worlds
its harmless afaik
I dont think they ever test the server
all sorts of warningsg pop up all the time
But single player is the server duh...
Did they fix handleDisconnect being called twice when kicked
does team.setPrefix even work with colors now? or is it exclusively team.setColor now?
Has anyone encountered players randomly not being able to pick up items? Particularly in the nether? The fix is opening a chest or loading a new dimension. I have not been able to reliably reproduce it
It probably is, I just can't test what plugin is causing it unless I figure out how to reproduce it. I've also heard it was happening to some spigot servers in 1.15.2
anyone know whats goin on here, this happens when trying to load older worlds (like 1.15)
eh
Looks like any world older than 1.15 breaks
please dont cut off the error
Why does Player#getAttribute(Attribute.GENERIC_MAX_HEALTH) return null 1.16?
because youre outdated
Yeah, but why does it do that? Is there an alternative?
sigh
Yeah, update spigot
So, as you all know, I have the Issue with Scoreboards. So far so good. Joining my lobbyserver is working well. Scoreboard will be displayed properly. I joined another spigot server and it always returned me this: https://prnt.sc/t6nclj -> on my localhost bungeenetwork I wroten basically just a scoreboard plugin and runs on the lobbyserver. the second server doesn't have it. So I don't see a scoreboard on server2. But if I change back to lobby, I get kicked for the same error above.
BungeeCord is telling me this: https://prnt.sc/t6ndn1
Can now help me anyone, because it's for sure not a problem on my side. ( I hope)
I suggest large, red chat messages
I downloaded me the latest bungee from yesterday π
or is there a newer build now? π
and sorry for annoying you, md_5 
There was one literally like 4 hours ago lmao
Could someone help me with a very simple issue? I'm a bit of a scrub, please don't make fun of me lol
How do I update my world to 1.16?
with spigot 1.16.1 ofc
just change the server jar
what does
[Server thread/WARN]: Unable to resolve BlockEntity for ItemStack: minecraft:beehive
mean? console spammed this a bunch when i shut my test server down
I get that over and over again, then it just never starts
is the weird max health attribute stuff known/fixed in the past 16 builds? if not can provide more info
perhaps we can put all the standard responses on a bingo card and have some fun with this?
who me? sorry i thought i did something wrong upgrading
No, vku
I'm not sure about the beehive issue, I saw it on spigotcraft also but idk how to reproduce
buildtools is taxing for my shitbox so asked before building a new D:
ok
it does
it was 3 days
now its a day
1.17 Im gonna make it 6 hours or something
it happens without fail each release
have them enter in the commit hash of the latest before chatting in channel
nvm, nix that idea
for some reason I get a npe when my server shuts down and saves the worlds
are you shutting down with stop?
yes
dunno never seen that
should I give more information, like plugins, server log etc.?
needs a way to reproduce
is that vanilla behavior the threaded storage?
you can try enabling debug in server.properties
okay, I'll do that right now
@inland oxide assume he's talking about the noe down the bottom
Anyone have any idea why anytime a user throws and enderpearl to the outlands it crashes my server? https://pastebin.com/raw/wyCDk3Ja
right
Cool, thanks a ton
yup np
maybe the pin should mention something like please make sure you have tested on latest build
Sorry I think my question from earlier was unclear. I know how to update my SERVER to spigot 1.16, but it has an issue running the world files themselves, they're 1.15.2 world files and I want to know how to update them. I get this error https://pastebin.com/q3wxNfYA
Just copy and paste the common troubleshooting process into the channel then pin it.
its technically a warning not an error and itss a vanilla bug
your server will still run just fine
though I cant speak as to whether there is long term damage
okay so here is my server log: https://paste.md-5.neta/aceyupotes.md
it seems to timeout at the end
this time around
you should increase your timeout time
ah okay
but also the watchdof shouldnt kick in if /stop has been called
looks like it's caused by a plugin, but this same error happened before I had that plugin installed
I can't tell if it's just lag from the errors or what but I gave it like a solid 15 minutes and the server dies every time
no you can see that the server is still trying to save when the watchdog kills it
ah
[19:51:21] [Spigot Watchdog Thread/ERROR]: Current Thread: IO-Worker-14
I'll increase the timeout, thanks
@fleet crane I found this bug where...naw, just kidding dude. :p
but whats odd, is I used /stop
[19:50:10] [Server thread/INFO]: Stopping server```
so turns out in 1.15 we did make the watchdog continue even on /stop because things were hanging the server on stop
ah okay
@coarse solar donβt ping md
maybe a compromise is to allow double time on /stop
but for now Id judt increase your timeout time so it doesnt kill your server while its still saving
though 60s or whatever is a long time to save
yeah, it is really slow
make sure you have an ssd and actually have saving enabled
I have a hard drive π¦
ie didnt run /save-off or change ticks-per.autosave
but the read/write isn't that bad iirc
No M.2 drive? You need top end specs to play MC!
@coarse solar logs?
No M.2 drive? You need top end specs to play MC!
@candid prawn you do, thats the sad thing
mojang still doesnt seem to understand their playerbase is 8 year olds that dont have the latest gaming pc
just increased timeout time to 120, I'll see if that helps
Hello! Why so ?
*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***
*** Server will start in 20 seconds ***```
When I start.bat
Update spigot ?:)
@coarse solar logs?
@frigid ember
13:50:08 [ε΄ι] Exception in thread "main"
13:50:08 [ε΄ι] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
13:50:08 [ε΄ι] at net.md_5.bungee.conf.YamlConfig.getServers(YamlConfig.java:217)
13:50:08 [ε΄ι] at net.md_5.bungee.conf.Configuration.load(Configuration.java:106)
13:50:08 [ε΄ι] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:267)
13:50:08 [ε΄ι] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
13:50:08 [ε΄ι] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
check your config file
I've
Update spigot ?:)
@frigid ember downloaded the latest of it.
maybe run buildtools again @lofty meadow
try making a server with only the last world?
okay. I will do that right now
@coarse solar delete the config and run the .jar and edit the new config
pom.xml in BungeeCord should probably set the maven-site-plugin to 3.7.1 in the build section to allow mvn site to build the javadocs
since the 3.3 version is referring to a version of doxia-site-renderer:1.4 that fails since it's missing the DocumentContent class
Hello! how to connect to database?
I tried :
try {
Class.forName("com.mysql.jdbc.Driver");
Connection connection = DriverManager.getConnection("...");
}...```
It always error.
Connect what to a database ?:)
My plugin
You need to ask the developer of that plugin how to set it up!:)
Hmm, I want to connect it by my own plugin. I don't want/need other plugin.
@coarse solar delete the config and run the .jar and edit the new config
@frigid ember yes, but it works until i add the 1.16 server to the bungee
i tried
and
it only works without 1.16 server
what error you getting @lofty meadow
Ok, wait, I will screenshot it
@coarse solar did you update bungeecord to the latest build ?
yes
oh, not the latest one... sorry
i download it yesturday, and apperenly there is a update 3 hr ago
Try that π might help
what error you getting @lofty meadow
@quartz heron Here ```java
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.ConnectException
MESSAGE: Connection refused: connect
STACKTRACE:
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)```
communications link usually means you cant access the mysql server
Try that π might help
@frigid ember nope
whats your connection string look like?
11:22:02 [ε΄ι] Exception in thread "main"
11:22:02 [ε΄ι] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
11:22:02 [ε΄ι] at net.md_5.bungee.conf.YamlConfig.getServers(YamlConfig.java:217)
11:22:02 [ε΄ι] at net.md_5.bungee.conf.Configuration.load(Configuration.java:106)
11:22:02 [ε΄ι] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:273)
11:22:02 [ε΄ι] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
11:22:02 [ε΄ι] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
help!
whats your connection string look like?
@quartz heron It is"jdbc:mysql://ip-address:3306/database", "username", "password"
you might need to append ?useSSL=false to the end of the connection string also
@coarse solar what you mean add 1.16 to the config?
π€
ok, i have a server in 1.16.1
Ok!
and i add it to the config, by entering
116:
address: localhost:28865
motd: '&1Just another BungeeCord - Forced Host'
restricted: false
and before i add this everything is fine, and after i add this, i got :
11:22:02 [ε΄ι] Exception in thread "main"
11:22:02 [ε΄ι] java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
11:22:02 [ε΄ι] at net.md_5.bungee.conf.YamlConfig.getServers(YamlConfig.java:217)
11:22:02 [ε΄ι] at net.md_5.bungee.conf.Configuration.load(Configuration.java:106)
11:22:02 [ε΄ι] at net.md_5.bungee.BungeeCord.start(BungeeCord.java:273)
11:22:02 [ε΄ι] at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:62)
11:22:02 [ε΄ι] at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
put '116' in quotes
and aside from that, make sure the server is up, make sure the port is open for external traffic
Indeed
oh
cant have the server name as all numbers without quotes
like this?
'116':
address: localhost:28865
motd: '&1Just another BungeeCord - Forced Host'
restricted: false
yes
can you help me md_5?
you posted some variables thats not a question
The way that color text is being handled is different in 1.16 if I'm not mistaken.
maybe run buildtools again @lofty meadow
@pastel condor Solved, thank you!π
Existing usage of coloured text works fine in 1.16
Is there a command to pause --forceUpgrade ?
I know
Idk what u mean by pause then
I have to shutdown my PC. I don't want to lose the progress on the chunks
it's 26% complete for 1.16.1
I think you'd be ok to just kill it tbh
it'll be a bit slower to start up again but not as slow as redoing it all
oh, so site isn't the javadocs
thx
do I need the javadocs for proxy, not sure why it's skipped.
My server crashed and i'm not sure why, I have the crash log below if anyone would mind helping me out:
I'm unable to attach the file
?paste
paste in there and press the save button, then copy the url to here
A plugin?
RAAAAAWWWR
Or the jar itself?
Spigot
Ah, thanks
is anyone else on 1.16.1 getting a server crash when an enderpearl is thrown through a gateway?
java.lang.ClassCastException: class net.minecraft.server.v1_16_R1.EntityEnderPearl cannot be cast to class net.minecraft.server.v1_16_R1.EntityPlayer (net.minecraft.server.v1_16_R1.EntityEnderPearl and net.minecraft.server.v1_16_R1.EntityPlayer are in unnamed module of loader 'app')
at net.minecraft.server.v1_16_R1.TileEntityEndGateway.a(TileEntityEndGateway.java:160)
at net.minecraft.server.v1_16_R1.EntityProjectile.tick(EntityProjectile.java:36)
at net.minecraft.server.v1_16_R1.EntityEnderPearl.tick(EntityEnderPearl.java:93)
at net.minecraft.server.v1_16_R1.WorldServer.entityJoinedWorld(WorldServer.java:659)
at net.minecraft.server.v1_16_R1.World.a(World.java:751)
at net.minecraft.server.v1_16_R1.WorldServer.doTick(WorldServer.java:394)
at net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1104)
at net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:354)
at net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1007)
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:846)
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164)
at java.base/java.lang.Thread.run(Thread.java:834)```
update!
lmao enderperal bug
For kotlinsake
(forgot to paste this log earlier) Here is the log of the server that I created with a world that when saving on server shutdown returned a npe https://paste.md-5.net/oxojinugag.md
But a server with a new world is fine?
ty, updating now
It still kind of seems like your server is slow, but no server should be even close to that slow
Iβd open a bug report with the world if you can
Might be something wrong with it
Dumb question, but to update spigot do I have to completely replace the jar or is there a command I can do? I use apexmc as a host
it's because at the time of running that server, I was launching 3 other servers, and compiling a plugin.
Just repeat what you did to install it
Beng701 or me?
well, i got a coffee, so better go do that first...
When will SPIGOT-5810 be fixed?
I dont think thats a bug
So how do I judge if the player is on the ground?
there api
player.isOnGround() it will become completely inaccurate because the entityplayer#move() method is invoked before PlayerMoveEvent is triggered, which will modify the ground state of the game player and is inaccurate.
wow
Move isnβt invoked before
getLocation in PlayerMoveEvent has always and still does return the OLD location
Youβre asking for it to return the OLD location but the NEW onground status
Which would imo be a bug
Because their location could be in the air but onGround = true
but I can use event.getFrom() and event.getTo()
you might need to append ?useSSL=false to the end of the connection string also
@quartz heron Hey! it still doesn't work. What aboutat com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)?
to.ground = player.isOnGround, from.ground = previousGround
https://pastebin.com/q3wxNfYA could someone help me out with this? The server doesn't ever start properly
maybe check if the block below that location isn't air? @gentle mountain
old bug @real fjord
@pastel condor Sorry Im just getting around to this now, it was the pearl bug. Do I just re-ruin buildtools for the updated one?
yeah
That message does not prevent your server starting
Cool thanks!
Post the whole log
Nice, appreciate the help. That bug hurt hahaha
The weird thing is, the server starts, but it doesn't.. become connectable and console won't take commands
Do the new hex codes work for setting team color for the Scoreboard Team class? I'm getting told it's not applicable and casting won't work
to.ground = player.isOnGround, from.ground = previousGround
@gentle mountain yet to = to, from = player.getLocation. It doesnβt make sense for half the event to be opposite to the other half
The onGround in the event seems of dubious value to me given the client can just spoof it to whatever it wants
So whatβs good Software for a Beginner at coding (to learn).
Just wondering.
@gentle mountain look 10 lines lower
but spigot is java
It gets rolled back for the event call
if you want to code plugins or modifications, java
I know
wait do you mean IDE @fierce briar ?
Like Intelli forgot the name etc xD
got it
A Plugin dev wanted me to take over, But Would have to learn first.
Lots of beginners use Eclipse, idk why. I find it kinda buggy and difficult to use with maven. I use IntelliJ and its very easy to use. NetBrains is also an option. Honestly, for most people, it's just preference
But I thought you were telling me the bug was that onGround was not updated before the event
Now youβre telling me it is updated
I like the IntelliJ style.
yes, it's updated by server, and it's not accurate
The move() method will update the ground state according to the motion collision
The server is not accurate but unvalidated client input is?
A while back i heard itβs good to learn from .txt but I already know the .json a Little from my Point of view, But thanks on the info.
But the client has already calculated the collision, so the server-side player cannot collide with the ground, so the ground state is always false
1.8 spigot also did not update the ground state before PlayerMoveEvent, but it also did not call the move() method before MoveEvent
@lofty meadow can you actually access the mysql server? is it running?
Yes
and still getting a communications link failure
this is 1.8 spigot:
Yes
can you show the code again?
Citizens2 plugin has already been updated as well. Gotta love this community! π
What about 1.8 is incorrect? Events in Spigot are always BEFORE the modification takes place
If the server state is already reflecting what will happen after the event, thats a bug
Anyone know when lightapi or bkcommonlib might get a update sorry if wrong thread
can you show the code again?
@quartz heron Here it is :
Class.forName("com.mysql.jdbc.Driver");
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
Connection connection = DriverManager.getConnection("jdbc:mysql://ip-address:3306/database?useSSL=false", "username", "password");```
in 1.8: from.ground = player.isOnGround
Location has no fromGround field so Iβm not sure what youβre saying
Or you can implement an API in PlayerMoveEvent to judge the ground
And I have done ufw allow 3306/tcp from my vps
i cant see anything inherently wrong with the code.. if you're getting a communications link failure that indicates that your connection to the server isnt successful
does your mysql server allow external connections?
i'm trying to reference it from the code
Ahh
so any code-based way of doing it would be helpful
Iβm replacing the Plugins, That Minecraft let you take over because datapacks.
Easier Update, Less broken servers.(Long run).
i cant see anything inherently wrong with the code.. if you're getting a communications link failure that indicates that your connection to the server isnt successful
@quartz heron Ok, I'm trying to fix it now.
It's really tiring to quibble with you, so how can I check if the player is on the ground in PlayerMoveEvent?
@EventHandler
public void onMove(PlayerMoveEvent event){
Player player = event.getPlayer();
boolean ground = player.isOnGround();// always "false" on 1.16
}
check if the block theyre on isn't air
That being always false is potentially a very different bug than spigot-5810 or whatever
(or lava, water or whatever you constitute as ground)
i thought player#isOnGround was deprecated anyway
because it's unreliable or somethin
The assertion in spigot-5810 is that onGround should be updated with the new status before the event is called
I firmly reject that as wrong and not how any other part of the api is intended to work
π©
If isOnGround is ALWAYS returning false then that is a very different bug
@quartz heron How to get the exact IP of my computer, Windows ? Just make sure if I allow wrong IP when I search "my ip" on google.
I said, because EntityPlayer#move() will update the ground status
Thanks, I'll try
Are you suggesting move is wrong?
you using mysql-server or mariadb-server too sivann?
You either don't call player#move before PlayerMoveEvent, or update the ground state before PlayerMoveEvent
"But the client has already calculated the collision, so the server-side player cannot collide with the ground, so the ground state is always false"
I donβt understand what youβre trying to say
lmao
But it does seem to me like move should only be called after the event
π«
But again thatβs also not the assertion being made in the ticket
But it does seem to me like move should only be called after the event
So it can be cancelled accordingly if requested?
Because removing the move call will still mean onGround returns the previous status
The move() method will calculate the ground state through the collision between the player and the block, but the client has already calculated it, so the player will not collide with the ground, then the ground state will always be false
@frigid ember it currently rewinds it to allow cancellation bit it (seems) that may be slightly bugged
It shouldnβt matter what the client has calculated
Because the client can tell the server its calculating whatever it wants
π
Thatβs a separate issue in anyway
So how do you plan to solve this problem
lol
Which problem
You started by talking about 5810
Now youβre talking about a different issue
This is the same problem
Its not
5810 very clearly says that the event sh already have the new onground status
That is fundamentally wrong
Youβre telling me how the .move call is updating the onground status to a new value, which does indeed appear to be wrong
But is not wrong in a way that fixing it would fix the βissueβ described in 5810
is there any API to set itemframes as invis, have had a poke at javadocs but cant see anything jumpin at me
it is too, thanks π
So there are 3 solutions:
- Do not call the move() method before PlayerMoveEvent is triggered
- Force the player's ground state to be updated after calling the move() method
- Add isFromOnGround() and isToOnGround() methods directly in PlayerMoveEvent
Omfg π
Can you explain how 1. Fixes the issue described in 5810 though?
I agree that change #1 should be made
But I donβt see how it would make the users that reported 5810 happy
then the best way is #3
Because onGround would still be showing the old value
change #3 seems the most logical
You came here talking about 5810
But I fail to see how #1 is conneted to 5810 in any way
I just want to solve the ground status issue
Aside from the factit affects the same method
@frigid ember thats an ipv6 address
#1, so back to what 1.8 spigot did, it is feasible
#2, as you said, this is wrong
#3, this is the best way
You can add a new constructor in PlayerMoveEvent
@frigid ember no idea what multicraft uses FTP for
Why is onGround even set from a client packet with no validation
because it's accurate for legit players
for hackers, some anticheat can detect it
But why does the server need it from the client
because it's accurate
Accurate for what?
Calculating ground state is a very complicated matter
On many special blocks, the collision box is very complicated and it is difficult to calculate the ground state
So directly using the client's ground state is the best choice
But the client is gonna be calculating it off the same information as the server is it not?
yes, it's same, but as I said, the server does not actually calculate the ground state, because the client has already calculated
This is an aside, but surely it would be trivial to move it to the server and therefore prevent malicious clients from using it to screw with the server and plugins (nofall hacks?)
you can read Entity#move(EnumMoveType enummovetype, Vec3D vec3d) method, the ground state is determined by the vertical collision and downward movement trend
As I said, most anticheat did that
π
@quartz heron What about this Client does not support authentication protocol requested by server; consider upgrading MySQL client ?
what jaxk?
haven't personally hit that one before @lofty meadow, stackoverflow seems to suggest altering password... ALTER USER 'user' IDENTIFIED WITH mysql_native_password BY 'password' and then flush privileges;
what ver of spigot you using out of curiosity
Latest, I download the BuildTools #118
no thanks
"best anticheat" "over 1000 purchases" Having alot of purchases doesn't make it the best lol.
^^
if(player.isHacking()) {
Bukkit.ban(player);
}
it's just that simple huh
is it normal for forceUpgrade to repeatedly show 0 / N chunks every second for 15min?
does it upgrade the entire region before showing progress or should I be concerned?
Is it time stamping?
Out of my expertise... but if a plugin is able to check that a client joining the server contains mods why can't it check if the client is vanilla or not?
my favorite was when I got a PM asking for help on an anti cheat plugin. I looked at the plugin and they were checking for fly by doing if(p.isFlying)
Couldn't that client just say it has no mods?
Your world is a lot bigger than my 460143 chunks. But mine at least shows some progress even if it stays at 0%.
Did something change with plugin initialization?
Plugin is not initializing if load: STARTUP, but initializes if load: POSTWORLD
runs before orange cube transforms into big bad greenie...
oh, wait, was looking in the wrong spot for the messages... lol
so i have this in config.yml
Chances:
Coal: 40
Iron: 20
Gold: 20
Diamond: 10
Emerald: 10
and i want to make it so the higher the chances the higher the chance of getting that certain item if that makes sense, how would i do it
chance meaning random number
so if those are percentages, then a random number 1 to 100 is less than that number means they get
wouldnt that select more than 1 if its low enough
random() is defined in java.lang.Math
Is it normal if you go from a vanilla 1.16.0 world to 1.16.1 spigot world, that the nether resets?
random can be 0 to 99 and then < 10 means 0-9 is satisfied so that would be 10%
and if < 100 then means any value from 0-99 will satisfy
random() will be between 0.0 and less than 1.0 so you will have to multiply by 100
im kind of lost
Bad way to do it I know... but I usually put the items in a list when doing calculated items.
List<String> randomizer = new ArrayList<>();
for(String type : types) {
int chance_of_item = 10;
for(int chance = 0; chance <= chance_of_item; chance++;) {
randomizer.add(type);
}
}
Random random = new Random();
String random_From_List = randomizer.indexoOf(random.nextInt(randomizer.size()));
if the random number is low enough couldnt it choose multiple
yes, quick question darth
just for my sake of mind
when a player breaks a block, are you directly saving into the config at that moment
no
random() returns a random number (double) anywhere from 0.0 to a number less than 1.0
ok π
you multiply that by 100 you get a random number from 0.0 to less than 100.0
Bad way to do it I know... but I usually put the items in a list when doing calculated items.
List<String> randomizer = new ArrayList<>(); for(String type : types) { int chance_of_item = 10; for(int chance = 0; chance <= chance_of_item; chance++;) { randomizer.add(type); } } Random random = new Random(); String random_From_List = randomizer.indexoOf(random.nextInt(randomizer.size()));
@pastel arrow dude I used to do it the same way π kinda sucks but you know it's gonna work for sure!!!
yeah lol
@formal jacinth i really only save stuff into files on start and stop of plugin
and would need to test if that number is less than whatever chance value you load from your config
perfect
@pastel arrow String random_From_List = randomizer.indexoOf(random.nextInt(randomizer.size()));
this supposed to be an int?
so lets say you assign a static Integer to a chance like if(fc.contains("Chances.Coal") coal_chance = fc.getInt("Chances.Coal");
and you have setup Random random = new Random();
then when you want to test you would do something like
if (random.nextInt(100) < coal_chance) ....
understand?
not u :p
lol
String random_From_List = randomizer.indexoOf(random.nextInt(randomizer.size()));
this supposed to be an int?
May have missed a step was writing from memory xD
yeah i understand that but wouldnt that select multiple cause if its less than multiple ones it would select those right
sorry, my bad
should be like random()*100 < coal_chance
lemme look at the method
yeh, just random() * 100 < coal_chance
sorry, getting my java and lua mixed
dude.
?
Leave about 8-16gb.
The rest should be fine to use for servers
Intel Xeon E5-1650v4 - 6c/ 12t - 3.6GHz/ 4GHz how many 1 gig serversdo you think it could be split into safely as a 64 gig dedi?
Should be fine yeah.
Should be fine I have never had that many servers online at the same time/
v1 or something, don't recall
1660
don't poke the monkey
I have no idea
As I mentioned, it depends on what spigot version, what server use (hub, survival, creative, mini-game), network bandwidth, plugins, etc.
Might need more disk space though.
its best to run your own numbers to see what performance you get
anyway, this is not the forum to ask about server recommendations/performance
says at the top of the screen "Serious Spigot and BungeeCord Help"
anyway I don't have an answer. you will need to profile your performance to see what you can get.
I always figure 1 or 2 cores, 4GB min, maybe 6 now for 1.15.2/1.6.1 per server
Minigame might be fine for single core
meaning thread
But again memory will depend on plugins installed, and tick performance will depend on CPU vs how many plugins, etc.
too many variables to give a specific answer
I am trying to make a plugin where I wanna display some data on the wbe
with a gui
in java
do you know any gui api that can do this for 100% free?
Similar to the way LuckPerms does, but I wanna display text data.
With colors
I want temporary links geenrated to view this gui.
I believe there may be a glitch with spigot, which causes custom named items (such as heads or selectable items in a gui) with italics instead of normal text
Hi!
Is spigot automatically updating itself upon restarts ?
no, but your host may be
and isnt custom named text always italics by default unless you add a reset code
my question
You'll most likely need to keep track beacons in loaded chunks (that are activated) and simply iterate over them.
Hey, does spigot update itself for a given version of minecraft ? Like if i install spigot on 1.16.1, will it automatically update to newer version of spigot upon restart or is there something to do ?
md answered you already, but to reiterate: spigot does not auto update
to update you must build again from build tools and replace the jar
Can i change version 1.15?
@quartz trench @fleet crane omg i'm so sorry, i forgot i asked... 30min ago π Super tired those days, sorry guys
Hey guys!
Does anyone know a plugin that does so and so
That's the GatherAndCraft plugin but the resource in unavailable
When fishing, how is the loot is picked? Specifically interested in seeing where the loot table is loaded and also how it selects a random enchanted book
how can I send a custom sound? not a vanilla sound
i was making a plugin like that over years ago
but without armorstands
i mean, like rust's gathering
nope, where did you find this images?
Looks like custom plugins tbh
i remembered something
wynncraft was has that copper
@fallen field
but dont know others
hmm looks like different
but one of rpg server was has that copper
im sure
when you find it, pls notice me π
i want to know too, it can help while playing custom modes with my friends
yup, I'll let you know!
hello i am getting this error in my console, but the plugin seems to be working fine. the error (https://paste.md-5.net/ifecuvuvat.sql) points to the line 19 and i am guessing its due to my logic statements. I am new to java and spigot and really dont understand the issue with this code. any help would be appreciate c:
like its a spigot issue or are you talking about some other plugin?
"Could not pass event PrepareItemCraftEvent to CustomRecipes v1.0.0"
the CustomRecipes plugin's issue
and 1.0.0 isn't some old?
no i made this plugin from scratch and have been working on it all day. md_5 i just realized that i was using paper and i will go to their discord. sorry to bug
oh sorry, there was a plugin with same name.
np. thanks for the help c:
never expires in what sense
does it appear on the screen?
or just the max health stays
max health stays
despite a 200 tick expiry
player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 200, 0));
10 minutes later: every time I activate it scales more and more
i might do a quick rollback to 1.15 to see
I need help with a bungeecord server
well its more about how can't make my self a admin on the proxy
added my self with the groups list as admin
Do you have any permission plugins on the proxy that might interfere? and did you spell your name correctly?
@fleet crane https://hub.spigotmc.org/jira/browse/BUILDTOOLS-538
pretty sure i made that on the wrong board
How do you get a material's protocol id? idm if it's through nms. Tag me please
nvm
thanks
Are there any 1.16.1 catagorised plugins in spgot server? Or in.dev.bukkit site?
i mean Are there any 1.16.1 catagorised plugins in spgot site? Or in.dev.bukkit site?
Is it possible to disable authentication requirement on GitHub Packages? I have googled and it doesn't seem so, but though I'd ask here.
No, it's not
whats the auth requirement?
you have to auth when connecting via maven
You have to authentciate before downloading packages
lame
indeed
that's exactly why no one uses gh packages
there isn't any
they're only useful for private orgs
It would be so nice if it were possible, I would use Actions to deploy and Packages as a repo, then the only thing I need to do in order to publish is git push
you can't delete packages either
First link is invalid @proven vale
@fossil shoal - don't have a problem opening the link on mine
please help me
if you can't click the first link, remove the ,? at the end of the link to fix it.
how to create spigot server?
how long till i can pull that change with buildtools md5?
give it another 5 minutes
@fossil shoal no you cant
you need auth for gh packages
one of the main reasons i dont use it
seems like the only reason for that is so msoft can track you tbh
i accepted the eula but i don't create the files i don't get charged just off the launch
definitely a part of why. I think it has to do with being able to track who's dep's are used where
wait
[11:16:30] [Server thread/INFO]: Starting minecraft server version 1.15.1
[11:16:30] [Server thread/INFO]: Loading properties
[11:16:30] [Server thread/INFO]: This server is running CraftBukkit version git-Spigot-2ee05fe-d31f05f (MC: 1.15.1) (Implementing API version 1.15.1-R0.1-SNAPSHOT)
[11:16:30] [Server thread/INFO]: Debug logging is disabled
[11:16:30] [Server thread/INFO]: Server Ping Player Sample Count: 12
[11:16:30] [Server thread/INFO]: Using 4 threads for Netty based IO
[11:16:30] [Server thread/INFO]: Default game type: SURVIVAL
[11:16:30] [Server thread/INFO]: Generating keypair
[11:16:31] [Server thread/INFO]: Starting Minecraft server on *:25565
[11:16:31] [Server thread/INFO]: Using default channel type
[11:16:31] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[11:16:31] [Server thread/WARN]: The exception was: java.net.BindException: Address already in use: bind
[11:16:31] [Server thread/WARN]: Perhaps a server is already running on that port?
[11:16:31] [Server thread/INFO]: Stopping server
[11:16:31] [Server thread/INFO]: Saving players
[11:16:31] [Server thread/INFO]: Saving worlds
and end
you already have a server running on that port
use task manager to kill all java
or just reboot your pc π
@old solar should be ok to update now
ok
thank you for very much
Hi there, I'm struggling to update my local server to the latest version of Spigot. I'm trying to download the latest .jar file on https://getbukkit.org/download/spigot and replacing my old .jar file with it, but for some reason I'm still 31 versions behind... Is this not the way to go?
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Use this instead.
Right... But running that creates a whole new server, right?
Does that site just update once on release and never again
No, it just downloads a jar for you
Youβd think theyβd automatically update frequently tbh
Does that site just update once on release and never again
@fleet crane I have a feeling it does
π¦
So that site is actually unofficial?
Yes
trying to ping everyone
@rotund hemlock I'm a beginner too, but I find this tutorial really helpful https://www.youtube.com/watch?v=wd1FUOT-BJY
fix works good md5 good stuff
does someone know how to make custom enchants
someone already linked a video which should help you.
do some event
EntityDamageEvent
Or EntityDamageByEntityEvent
is enity like a player
Yes ...
you must check
that has this enchant on
well this is new
check lore
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageByEntityEvent.html in 1.16.1 may be you should use this
Diamond Helmet (Upon hitting a player with sword or bow, gain Regen for 2.5 seconds, totals to 1 heart per hit. Regen does not chain)
this is the item i want to make
A question, with the 1.16 update, does spigot removed the player.onGround method/changed the player.onGround method mechanism?
well there is a lot of changes
just update your anti cheat from 1.13-1.15
make a new version from 1.16
well i think this one more time changes everything
i have a packet listener that use reflection
well great
so, if it works with 1.16 i can get flying packets
or you should invoke method
and then get the onGround Value from there!
Or just get the players location, subtract one and check if the block at that location is air
for anticheat purposes thats generally inaccurate
indeed
the isOnGround value is calculated serverside after 1.9 i believe
it was deprecated for a while
Ah I see
Player#onGround* was deprecated
Yeah I think 1.16 removed it
just changed it to isonground
is there a way to wipe all datapacks?
yes
minecraft has a datapack command last i checked
you can disable all of them with it
Anything change with how item lore is stored in 1.16?
I used to be able to do if(itemA.getItemMeta().getLore().equals(Arrays.asList(someArrayOfLore)){
}
going to output this side by side, weird it stopped working
is it colored?
the text is yes
Try removing all the colors
striptColor
Pretty weird though, it must be something I've done
that all i found
oh well guess its time to get hands dirty
Well gl
Anything change with how item lore is stored in 1.16?
I used to be able to do if(itemA.getItemMeta().getLore().equals(Arrays.asList(someArrayOfLore)){
}
@old solar can we like not do this
its not ideal hey
Itβs really bad
Itβs basically impossible to allow hex (json) and have that work reliably
wot 1.16 have a new Color system?
Yeah for full rgb
Given we now have the persistent item meta api I feel like more people will want colours than having that work
im guessing thats why it broke, something related to the hex colouring
i will try new ChatColor system soon
how to i make a enity damage event ?
do you know how to use Listener?
is ItemStack#equals overrided, or if i compare 2 different ItemStack objects with the same values will it return false
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
@rotund hemlock
try ItemStack#isSimilar
ok
.equals may broken
according to docs, same as equals but doesnt consider the amount
so its probably better in my case
how can i do If player hits someone with a bow or a sword it will heal him by 0,5 hearts and it is an armour
check the event
Diamond Helmet (Upon hitting a player with sword or bow, gain Regen for 2.5 seconds, totals to 1 heart per hit. Regen does not chain)
then give player health
Spoon feeding be like
damn, replaced like 5 lines of legacy code with 1 function
great
event.getDamager() returns attacker event.getDamage() returns injured player @rotund hemlock
Chat rather
So far so good with the isSimilar and comparing items
I used to check name, then lore
Worked since like 1.8.9 so i never thought twice about it
I usually use isSimilar
Hi everyone, i try to find a way to generate new UUID Int-Array in Java anyone have a solution for this ?
#ffff00 should be &f&f&f&f&0&0?
int array of UUID?
This UUID type is used for many UUID in Item like Player Head
i don't even know it's exists
You probably want to use https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html#getLeastSignificantBits() and https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html#getMostSignificantBits()
And then bitshift to get the 4 integers from the 2 longs
return this?
Yes but how can i go to Most/Least to Int Array
Did you even read what I said?
^
Now bitshift 32 bits
would this be the channel to go to if my server started locking up after pre-generating a bit of a new nether and now locks up on startup, without plugins
ye, assuming that doesn't just include dev support
Is there a reason why CraftItemStack is missing .getHandle()?
Or has that been fixed and I should recompile?
I generated a bit of the nether, 1.16. after a few hours it locked up. I restarted the server and it instantly locked up
if I remove the nether world, it works again
fresh server?
CraftItemStack has no handle
yup, no plugins
Not the same as other handles
It has static methods to clone/mirror stacks to/from NMS
I was able to use getHandle() in the past
What are you trying to do with an NMS item anyways
It should all be covered with Bukkit
Set the repairCost of an item
Do it in the event
Which isn't, to my knowledge
AnvilPrepareEvent iirc
I don't touch anvil
Something to that degree. I added that method
aight. I'll attempt to generate the nether again I suppose
I don't need to
Youβre setting repair cost...
I'll be back if it locks up again
Thatβs done in an anvil...
you should use Bukkit API
Is there by any chance an unloaded world object?
No
I am not touching anvil
Why? Thatβs literally your solution
There is a setRepairCost() method
I added it
does anyone know/have/know where to get a good spartan anticheat config
When you repair an item, a value in the itemstack, repairCost, increments.
depend on your country hacker/cheater
This makes it so it's more expensive in the future.
I need to essentially reset the item cost
I was just curious about why getHandle() wasn't included
In the meantime, CraftItemStack.asBukkitMirror
You can already set the repair cost - or did I miss something about this conversation?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/Repairable.html#setRepairCost-int-
I would need asNMSCopy
Thank you, drives
I'm curious about why it's a repairable interface when all itemstacks have it; however, this solves my current situation. I still think .getHandle() should be re-added so as not to require creating a new instance of an NMS itemstack to change something, then using CraftItemStack to create another copy that is bukkit.
It wasnβt removed in 1.16 thats for sure
Maybe it was removed in another version idk
Ah. I used it in 1.15, but it might have been a feature from a fork. My bad if it was.
NMS usage is never a reason to change the server code
Isn't CraftItemStack created from an NMS itemstack?
Either way, thank you for helping me
Yes but a method would only be added if it was necessary to support the api
Not just because it makes bypassing the api easier
I think we need the Bukkit#getCoolBeans method (PS: Sorry - just read the topic - this is only for serious things)
Thk @wraith thicket all work :)
I send code here for all have same probleme
That code looks wrong
agree
I made a mistake thinking Repairable was ItemMeta in the help above. Not my day.
Where can I put in a request for getRepairCost and setRepairCost to be added to CraftItemStack?
long least = uuid.getMostSignificantBits();
long most = uuid.getLeastSignificantBits();
return new int[]{(int) (least >> 32), (int) least, (int) (most >> 32), (int) most};
}```
thats the MC code
looks much more reasonable
Just wondering, does full rgb work on motds?
I made a mistake thinking Repairable was ItemMeta in the help above. Not my day.
@heavy violet It's in the inventory.meta package so I'm fairly certain it'll apply to repairable items. You just need to do an instanceof check and cast
Repairable isn't instanceof ItemMeta
So there is an ItemMeta that uses Repairable?
CraftItemMeta implements it
Oh, so ItemMeta should have the repaircost method?
The CraftItemMeta implementation does, the ItemMeta interface does not
You just need to do an instanceof check and cast
Which brings me back to what I said originally
It's not that difficult... You just need to do an instanceof check and cast
Repairable seems to be for Inventories
Then you cast again when setting it
ItemMeta meta = item.getItemMeta();
if (meta instanceof org.bukkit.inventory.meta.Repairable) {
org.bukkit.inventory.meta.Repairable rep = (org.bukkit.inventory.meta.Repairable) meta;
// change
item.setItemMeta((ItemMeta) rep);
}
It's never an instance
Obviously don't need to include the package - but left it there so you don't export a wrong one
It is.
CraftMetaItem implements Repairable - it will always be an instance of it
Unless of course the item is air, in which case the meta will be null.
If it were null, it'd NPE or class cast
In this case, it's not making it past the instanceof check