#help-development
1 messages Β· Page 2031 of 1
the amount of IP packets sent in the last 10 minutes
their ping
how you moved your mouse
the amount of porn in your homework folder
etc etc
exactly
it is a popular research project for masters and doctorate thesis, no shortage of data on it
anyway I'm going to bath in a few minutes, so prepare to get some weird videos
you can feed those videos to your random number generators to gain some entropy
on randomness?
yeah I am good. I had enough cryptography training and learning in the Army
frostalf is like "oh no"
yeah the problem with RNG and PRNG
and bishop wants to get some NSFW videos
well there is problems but most of the time they are not problems for everyday people
even for most enterprises as well
it's actually a philosophical topic
like what is really truly random?
no
is it random that LM reacted after 9.8273 seconds to my message while frostalf reacted after 2.333382 seconds?
or would have somebody be able to calculate how many seconds everyone of you take to react to my last message?
the only thing we know of to be truly random at the moment is DNA. Everything else we have seen in the world isn't really truly random
if NOONE is able to calculate it, in ANY means possible, I consider it to be "truly" random
but even DNA might not be truly random, because it could just be because we don't fully understand it enough
exactly
I'm random π€ͺ
if we know everything about how every brain works, we could totally predict the future
but we can't
so it's random
everything is random until we exactly know on how to predict the outcome
pretty sure the ex-president is the apex of random
Trump? The stuff he did wasn't random at all lol
I loved him for his use of the military in getting rid ISIS π
well the majority of ISIS anyways
cept he didnt do anything
yes he did
that was leftovers
No it wasn't
We did a fake out on ISIS
Trump came up with it and approved it
we stated we were leaving an area
started packing up
and then they came out, and we bombed them with drones because we didn't leave yet. We didn't lie in that we were leaving, we just didn't give accurate time line π
Gonna write that one down for my next military operation
you can put it on the fake news page
it's called "Rump" or "tRump"
but such things require the president to be involved though π
and yeah trumps actions really weren't random. you basically had to predict what was the worst possible thing be for him to do and bam, you knew that that was the thing he'd be going to do next lol
Epic roast
Well, he didn't do very bad things
yeah let's not engange into that
I mean look at the current potus
he only killed hundreds of thousands of americans by ignoring all the corona stuff
HI, how are you?
You do realize a president can't dictate what the states do right?
I enganged into politics although I didnt want to, smh, my bad
I dont know every detail
I know all the details
all I know is that he basically removed the whole pandemics task force a year before a pandemic happened
Also governors are free to perform their own quarantines despite if the President does anything
so if you want to hate on the president for it, then hate all 50 states Governors as well
for doing exactly nothing as well
I don't wanna hate on anyone besides the Rump
Could do with a steak right now
"obama played too much golf" continues to play golf the whole time
Congress also doesn't have to wait on the President either, so that includes all your Senators and Representatives as well π
"I hate immigrants" continues to marry not one, but two illegal immigrants
"grab her by the pussy"
etc
the Rump is a jerk and everyone knows that
What means that?
tRump was proud of sexually assaulting women
so to blame just a single person, when you have multiple others more responsible and could have done something or said something is just quite ludicrous
just google "the rump grab her by the pussy"
Oh i just translated
tRump basically said "i am so rich, I can touch women's vaginas and they won't complain because I am rich"
well that's not his exact words
but that's basically what he said
I will have to look this up, but this isn't just a Trump specific problem though
Yeah i agree. I hate that too
You know how many people just get a slap on the hand because guess what they are rich lol
oh no, lets not punish the rich person
they didn't know better
but hey if you are poor you should have known better though
because you could afford all that stuff being poor π
hm
I don't know what you're arguing about. But I am against rich people being able to do illegal things without being punished.
you being against something wont do anything but thats cool
life is unfair, u cant change it
You can change it lmao
Do it then
I don't like that people think that nothing can be changed. For example, why do you think that in the United States they fine you for anything? This is how countries should be. You do something wrong and it's fine, it's the only way people really learn.
reborn me somewhere not in africa, give me parents that dont cheat on each other, ones mature enough and "change it"
Life is unfair and you cant change it, if you were born strong you can change the weaker though
Please send me your gth url. Thanks
gth?
github?
i call it gth
Im interest on your lib
I just realized i was looking smth like that
π
my github is connected to my account
Oh allright thanks
eitherway its not like I like trump
I dont defend someone that wont defend me, exception is when it would not harm me to do so
it is true that he's an asshole, that's the least
as far as doing things as a President he did the majority of things he said he would do. If that is considered bad then that makes sense why people love having a President that does nothing
but you also have to remember, the President does not dictate the laws in States and what States can or can not do. That is the President does not have Total control over the US
this is the case in some other Countries where their President or whatever name they go by, actually does
The german president for example has next to no power
He has vetoing capabilities but that is about it
Hello ! i try to change a block client side for a player
i used Player#sendBlockChange but all player see the block change
it's very weird
it depends to who you talk to
alright, something we can agree on. I do not like his personality for the most part
Sexist, racist, supports sexually assaulting females
I am not sure about the racist part
I think that is just an implementation flaw. Trump 2.0 might have resolved it
However, do keep in mind people have been wanting Trump to run for president for many years as well since like the 70's or 80's
he was alive back then??
yeah, trump is like 75
It shouldn't surprise me tbh
I mean Trump's platinum plan is 10x better than any policy Biden's put forth so either Biden is more racist than Trump or you're falling for the "I heard it from someone else" fallacy
Politicians are pretty old
or you could tell me in what way he was racist?
if you are going to infer about the wall, then that isn't racist at all lol
The wall was a propaganda tool. Big words, but not that much action behind it. While sure, some sections were completed most are not due to cost concerns
most are not because of Congress
we have the money to do it
The issue with any policy is mostly opposition
Most people don't even know that the border in the south largely has nothing there, not even a fence, and if you do see a fence it is like 3ft high XD
I would much rather there be something even if it is a wall, then there to be nothing
but, again most people don't do their research or actually ever been to the southern border π
Does the wall even have an economic benefit for it to be able to make economic sense (I know that not everything needs to make economic sense, but let's suppose they have to be)
The wall makes sense in regards to security and also prevents trafficking of people and drugs merely just know where you can just walk through just fine
in other words it forces them to actually use the other methods
other methods being flying or boats which is far easier to spot then some people walking in the desert
digs under the fence
well the wall extended some feet underground, I don't remember the specifics, while you technically could do this, it isn't going to happen in a single day
Yeah I do not think that anyone is going to be mad enough
Though it was certainly attempted with the berlin wall, so probably will happen from time to time
I think this was done for in Iran
There was along one of there borders 3 or 4 tunnels
they have since closed them up, but it is something that people will do
politicians claim we don't need a wall yet live in houses with high fences and tight security in communities with gates and walls.
How i can add local repository to maven dependency in plugin ?
Maven or gradle?
haha you lured geol in to replace mfnalex ?
gradle project to maven
What?
oof size large
they are converting a gradle project to a maven one. I guess the gradle project uses local maven repo
Not
Yeah, maven uses maven local by default
With a few exceptiions as some will say just about now
I have maven plugin and need depednecy from dynmap
was going to, but you covered it π
Oh, then just declare the dynmap repo as a maven repo and add it as a dependency?
yep that is the best way
just add its repo info into the pom and add it as a dependency and it should work out just fine π
To be honest a wall does not make much sense to me, but as an European I probably don't understand the problem at all
Minecraft logic
diamond shovel time
Well most people assumed the wall was only for stopping immigration and while it is also for that purpose because there is a ton of people migrating from the south, it has other benefits too in terms of security. As I previously stated most people in the US actually do not know there is no barrier at all in many parts of the southern border and if there is, it isn't stopping anyone because you could literally just walk over it. We don't have enough people to patrol the border 100% all the time.
The EU doesn't have very visible borders either, so what is the difference there?
well what the EU decides is on them. Generally some EU countries share a border with another EU country
and passage between them is allowed without anything being required
a better comparison is EU to US states
I can travel between any state in the US without being stopped to show ID or a passport
yeah
and the US states are not about to put up walls either around their state border when passage is allowed already lol
however, the southern border is an issue because of immigrants not just from Mexico but all the way from other countries in South America
like Brazil
or Venezuela
we can't just accept 100% of all immigrants without it having a negative impact on our economy
makes sense
I don't blame immigrants for wanting to enter the US either
whether to work or just permanently stay
Is the player mining?
quality of life is generally better then any country in SA
If not then you can't
not spigot
Oh
pure java
Well, do you need to know when the player is NOT holding left clock button for 1 second?
Ah
there is usually button events
also you might be able to capture mouse inputs directly
Yeah, probably
https://github.com/kwhat/jnativehook perhaps something like this
how do i check if its holding, not a click
Oh you mentioned it already
ive actually used it before, but for keyboard related stuf
There's mouse up and mouse down events
check for mouse down event or whatever it's called store the time compare to mouse up
voila
This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components
Check for mousePressed, schedule a task and check if there has been a mouseReleased after it
Probably can just store it globally since unless you're using an external api a mouse up will always follow a mouse down
U mean that (sorry for ping)
that is the dependency, now you just need to add the repository information so maven knows where it can find dynmap
Yes, something like that, just with the repository
is there a way i can check for a player's client minecraft version in spigot?
or would i have to use like ProtocolSupport/Viawhatever's apis?
yep, you'd have to do it that way
The minecraft server just thinks that it is accepting clients from the latest version I assume
this is what is assumed by default and spigot doesn't change this
server automatically checks the client version if its acceptable for the version of server that is running
things like viaversion however aim at removing this
so, if you need to know client version you would have to listen for the packet yourself or use protocollib
why are you checking client version?
probably using something like viaversion and allowing older clients to play
however depending on the client version, dictates what you could show or not show
just want to send a message to players joining on older versions that not all features are guaranteed compatible
since protocolsupport almost always has bugs
vulcan queries clients for version and which client
what
if I wanna set the player to full life with player.setHealth, do I need to pass in 20
ok π
Hello, I got this error on start, and I don't want to make a .yml in resources of my plugin, so how can I fix pls?
https://paste.md-5.net/nebajarisu.bash
there was someone that had a similar issue not long ago...
Yeah i rember too
Either way give use the code and I'll show what you can do to resolve this
If you don't want it. Then don't try to access it?
Well it's pufferfish which is a fork of paper
Have you tried it on base spigot?
yes that is not related to pufferfish
I made it
You can skip the config.load(file); if the file does not exist
Then just remove the plugin.saveResource(name, true); given that it is not needed at all
Plugin#saveResource() its causing the exception in this case
Alternatively, instead of plugin.saveResource you create a file
Yes, that is why I am proposing to remove that call
File file = new File(path, name);
file.createNewFile();
File creation
But technically creating a file is very much useless there
Idk what he want to do
A simple
config = new YamlConfiguration();
if (file.exists()) {
try {
config.load(file);
} catch (Exception e) {
e.printStackTrace();
}
}
is enough
Because you can use for 2 pupuses. As a config file (whe i load it from the plugin jar) or storage file (where i just create an empty file)
the #save call will create the file either way
Really?
It should
Oh i always learn smth new here
?jd-s lemme look at the api sepc
If the file does not exist, it will be created. If already exists, it will be overwritten. If it cannot be overwritten or created, an exception will be thrown.
This behaviour is the only logical behaviour as requiring the file to exist if you are going to overwrite it either way is bogus
And if you aren't overwriting the file with a #save call there is something really wrong
What?
thanks
So this is wrong?
what are you trying to do
why would it be wrong?
show your full shit gradle file
?paste
Send full error there
What does this.save(this.file) do?
chances are it overwrites
just save the fille calling the default method from YamlConfiguration
I done because my FileHandler extends YamlConfiguration
So it overwrites, thus making the save call adhere to my logical assumptions I proposed earlier
@tender shard
Patient.... You are not paying for instant support
ok
why do you use those tags?
what tags
He might be at sleep considering it is midnight for him
compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0'
the ones its complaining about
the format compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0' is what it should be as far as i know
why can't you debug pluginsπ«
You can
setup a server to run it in debug mode

oof
where do I need to setup server
pings person
oops I figured it out
a tale as old as time
Localhost or in a hosting? Hmn
ok, I have it and how can I debug the plugin now
Just debug your plugin adding console out message?
horrable
How do I pick a random item from a ItemStack array
I mean there is this but idk if it's up to date https://bukkit.fandom.com/wiki/Plugin_debugging
I miss you
use a random and get via index from array
What?
I miss debug button lol
although in the end, usually you still need to launch a clinet to do something
wonders who martin is talking to
good luck, he will cry from the lack of punctuation and line breaks
You have to load the file again
dunno what you are doing in the first part, but yes you have to set it after editing
When you edit a file, you have to do it manually or via cofig#set(path, value). And them save (config#save()) it or just load it again (confi#load())
@pliant oyster here you have:
List<String> array = new ArrayList<>();
array.add("banana");
array.add("apple");
array.add("orange");
Random random = new Random();
int integer = random.nextInt();
if (integer < array.size() && array.get(integer) != null) System.out.println(array.get(integer));
what do i have to change in my spigot lib info to go from spigot api -> spigot server
What? Explain again i didnt understand
i wanna access nms and craftbukkit shits in my plugin
i know what to change in maven to get it
but idk what to do in gradle
You have to use Spigot-Jar instead of api
Cannot just change the dependencies of your project?
i could
i just dont know what to change it to
do i just remove the -api like normal?
the option to import CraftPlayer isnt popping up
do i have to get 1.18 buildtools on my computer?
Hello, I have a problem with my plugin. I just updated to 1.18 except that there are modifications with the "java.sql.Connection.prepareStatement()" and I don't know what I have to change ^^'
Can you help me ?
getConnection is null
you are not connected to the database make sure you have a valid connection before calling a statement
Yeah, iβve a valid connection but no commands works. Do u have a tutorial to update plugins ?
i installed 1.18.2 buildtools and changed my dependency to this org.spigotmc:spigot-jar:1.18-R0.1-SNAPSHOT and my ide still isnt reading CraftPlayer
been awhile since I messed with NMS but from what I recall you want to use the full jar or source from BuildTools
add the jar as a dependency to the project
so i stick the jar into the resources folder?
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
please read the post and the following posts it mentions in regards to NMS related things and how to setup the pom
post doesnt have gradle stuff
thanks frostalf
maybe not so you will have to translate to gradle the proper way
so still helpful to read it
the bootstrap bot answer needs to be updated
how do i translate to gradle
I don't use gradle so you will need to wait for someone who is a gradle expert to help with that lol
translate what to gradle
NMS jar dependency stuff
oh
there are two rules:
- If you don't know on how to it in gradle, use maven
- See rule 1
For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.
it is the most easiest thing to do in Maven, so not sure what you are talking about o.O
I don't have anything against gradle besides the fact that I don't like it. But, and THIS IS VERY IMPORTANT:
If you do not know how to do something in gradle, use maven instead
gradle is like the complicated, and a tiny bit more powerful version of maven
I can show you how to shade in maven without it being complex π
gradle is like 300% more complicated than maven while providing 7% of extra features
if you don't need the 7% of extra features, just stick to maven
inb4 someone says maven is slow >>
the code surround line 241 of your Main.java file would help in diagnosing the potential issue
what's slower?
- waiting 3 seconds longer for something to "compile"
- spending 8 and a half hour on a forum or discord to make gradle work
I don't argue on the half that says it is, I am on the opposite side
as said, gradle definitely is good. but it's also soooo much more complicated than maven
I would never use gradle unless I absolutely have to
I would much rather use maven
I am just pointing out usually someone comes around and says as an argument that maven is slow XD
which irritates me because maven is not slow
yeah people always claim that, while forgetting how many hours is needed to get gradle running π
in my opinion, both gradle and maven are awesome tools. but one can'T deny that maven is just waaay more straight forward
sure, if you're an expert in gradle, you don't have problems. but if you're not, gradle ist just 10 times more complicated than maven is
well no one bothers reading documentation, out of the box maven is conservative on resource usage. Which means, if you want to speed up maven on a system that has the resources to give it. Then you need to tell Maven it is ok to use more resources. Also Maven can build concurrently as well π
so the 3 seconds you save in compiling doesn't really add up with the 3 hours you need on stackoverflow to make your shadowJar compile
so if maven is taking like 5-10 minutes to build and you have resources to give it. Giving it more resources to use will turn that build time into something more like under a minute XD
I mean
forget Maven and Gradle, just go back to the OG....
ANT
even spigot compiles within 5 minutes using maven
so if a project needs 5 minutes in amven, it must be SOOOOO HUGE
that using gradle wouldnt make a difference anyway
even so, you can speed up maven is my point. People just choose to not learn how to do so and just assume maven sucks XD
I'm not an md5 fanboy, but if gradle really is so much better, I am sure md5 would use it
exactly
I 100% agree with you on this one
also the main reason for md_5 probably not switching to gradle
would probably because before gradle came along he had already made maven plugins for specialsource
and the sorts
the reason he doesn't switch is because he doesn't need to
so easier to just stick with maven then try to import special source to gradle
well yeah its not needed
just pointing out that he has created maven plugins for spigot
although I have never made out with md_5, I can probably safely assume he's not stupid, so he sticks to one of the main rules that every decent admin sticks to, which is to "never change a running system"
oh you mean the don't fix what isn't broken rule
Thx for ur help ^^
what do you mean?
yep
And yes md_5 is quite knowledgeable himself π
he definitely knows more than 10x as I do about java and stuff
but so does choco, I guess
... its almost exactly the same for gradle as it is for maven to get nms access ...
π
funny that you think this
you're probably on 1.16.5 and below? or not using NMS at all?
if you know on how to run the special source plugin, I'd love to see your build.gradle
use the ComponentBuilder
you cant just concat strings and components
either go full component, or don't use them at all
I don't use much components but if I recall based on your code. you are sending a string and not a full Text Component
i go the cursed route if needed
TextComponent.fromLegacyText(...)
(although you will NEVER need this unless you wanna have configurable messages, and it seems like you don't need them)
so i rewatched the kody simpson video for nms, and he essentially just changed spigot-api to spigot and was able to import CraftPlayer and whatnot into his code. so why isn't this the case for me?
you still need to use buildtools as well and have it in teh right location
I have seen some of Kody's stuff in the past but found that CodedRed has a little better explanation behind stuff. Try this one https://www.youtube.com/watch?v=K6-deuw4N_o he has some troubleshooting stuff about 4 and a half minutes in
Another IntelliJ video! In this video, I go over how to use NMS with Maven in IntelliJ! It is super easy but can be confusing to new devs. This will be the last IntelliJ video for a while, the next videos will be all about CODE!
------ Links ------
JetBrains Toolbox: https://www.jetbrains.com/toolbox-app/
Java 16 Download: https://www.oracle.c...
Well, sir, you're depending on 1.18, not 1.18.2
lol
compileOnly 'org.spigotmc:spigot:1.18.2-R0.1-SNAPSHOT'
did you run buildtools for 1.18.2?
Well if it's still not importing then I'd (1) make sure your project has been refreshed, and (2) re-run BuildTools to be certain
i did latest
because I'm looking at my local repository and it's installed automatically for me
also, what part of spigot do you need? you want to use the remapped mojang .jar in 99% of cases
looks like i got 1.18.1
you have to specify --rev 1.18.2
changed it to 1.18.1 but still doesnt work
yes
because if yes, you must use the remapped .jar
otherwise you'll have a very bad time
hm
did you not read the post?
why do people not read the post
it was a whole bunch of text
How can I pick a random item from ItemStack array using Random(), idk how randoms work
I don't know how to use remapped in gradle, I only know how to do it in maven
maybe choco or someone else knows
I can only help you when you decide to switch to maven π
it basically answers what jar you need to depend on
oh so i just throw this Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar in there?
no
remapped is what you are needing, but getting closer I suppose
org.spigotmc1.18-R0.1-SNAPSHOT:jar:remapped-mojang
jesus discord is stupid
org.spigotmc:spigot:1.18-R0.1-SNAPSHOT:jar:remapped-mojang
player.getInventory().addItem(emeraldCrateRewards[randomItem]);
ItemStack item = emeraldCratesRewards.get(randomItem);
if (item == null) return;
player.getInventory().addItem(item);
this should do it π
Did you add your local maven to the Gradle repositories??
im guessing no since idk what you're talking about
declare mavenLocal() inside repositories block
in gradle.build add mavenLocal() right under mavenCentral()
1.18.2 no?
1.18.2-R0.1
my buildtools is 1.18.1
add the .2 to the version
Then use 1.18.1
then add .1
Or run bt for 1.18.2 
i thought thats what the -R0.1
nope
Oh thatβs just, the revision which is always there
R0.1 refers to the api version it is implementing if I am not mistaken
and going back to the Gradle vs Maven conversation.....
Is completely meaningless since both work fine
I know gradle so much better, but like, the choice is quite insignificant since swapping between the two doesnβt take that much effort and they pretty much achieve the equivalent
inset code?
insert
Idk exactly what you mean by insert code π
the code snippets for chat
This worked for me on a fresh project
You donβt need remapped unless youβre using nms afaik
well im tryna use nms
Then you will need it lol
And youβll also need to use the thing that unmaps your code at compile time
Since the server wonβt have stuff deobfuscated for you
thats above my gradle expertise
there is no gradle example for spigot remapping nms stuff
so, you are on your own there, or you use paperweight, which means you'll have to be careful to avoid using paper only methods and initial setup takes a bit longer as it downloads and applies patches
so ig it's time to switch back over to maven
would someone be able to show me how to shade w/ relocation in maven then?
I mean paperweight userdev isnβt that hard to setup?
i'd rather not
well it's the same thing as spigot basically but easier, just with paper methods, just add the gradle plugin and build dependon reobfjar and done
I mean itβs possible to remove paper api from compile time classpath
can you use paperweight with spigot?
i have issue with deprecated sendMessage methods paperweight adds
they do not work on spigot the new net.kyori.adventure.text.Component methods kyori
but paperweight is soooooooooooo much better than spigot specialsource
it fucks all my synthetic methods
specialsource
just ignore those deprecations, or add the adventure api inside your plugin so you can use audiences (read their docs), or do what conclure said
or, consider whether you need nms in the first place
i also want to avoid using paper added nms
no I do need nms, for nbt and setting blocks fast in palette
maybe i just make my plugin papermc only π
it will make everything so much easier
As said itβs possible to remove paper api from your compile time classpath
is there a guide for this?
Thus combining paper userdev with merely spigot
Well youβd need to know how to use gradle and then look at the paper userdev example I suppose
ok I will try
also new question, is it possible for spigot to add ItemStack#serializeAsBytes api from paper?
because I need nms for this now
it is very good api, highly recommended 10/10
.
Spam
Perhaps you could make use of ConfigurationSerializable::serialize
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<relocations>
<relocation>
<pattern>org.bstats</pattern>
<shadedPattern>com.myplugin.whatever.org.bstats</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
there is better example @patent horizon
you could use the lucko helper thing to make itemstack serialisation
Why would that be spam
yes thank u
idk isnt spam?
No, don't use this, it removes a ton of itemstack data afaik
i will try to use userdev with spigot, and maybe write guide
yes that serialization is SUPER bad
this is why I serialize with nms, bukkit serialization sucks
Itβs a bit special but it doesnβt suck
"special"
it removes things like names and enchants
in a bad way
Thereβs no data loss as far as I am concerned
basically it just fails entirely for custom items
But thatβs not bukkitβs fault
Maybe it's gson specific since that's the only thing I've tried it for
raw byte api (i just copy from paper to my plugin) makes it work
Thatβs because developers constantly fail to use api such as pdc api
essentialsx plugin do the same thing, this is where I find it
But I would name an item and save it, and it would just remove that
Thatβs strange, hasnβt ever happened to me
i will get repro code
or maybe essx issue is more simple, they have good one with repro
maybe my and essx code is bad
ok time to sleep
Good night
jacksyyy itβs your fault alone if you use implementation such as nbt, of course normal serialization api wonβt be able to recognize that, but thatβs why people should use the api spigot provides such as persistent data containers. Saying that the serialization api sucks is untrue and just you in principle spreading fud.
it is not me using nbt, users input nbt items and I must serialize it
users can not access pdc with /give command
but yes, I understand
Yes but thatβs still not api, nbt implementation can change at any second thus why thereβs an api abstracting over said thing
I know it is not api, this is why I use nms
Yes the issue with item stack versions was a problem tho Iβm fairly certain that has been addressed by now
oh ok, maybe I try again
but maybe because net.minecraft.server is not relocated anymore it is safe to use and APi π
idk
wat
I mean sure I do see your point, just donβt think itβs far to say the serialization api is trash or that it sucks
do you think spigot will ever have the kyori api? it is just question. i might break down and shade bukkit-platform
it does work, to shade
I am asking if there is plan to ever include in spigot, because it is much more integrated and nicer
net.md5.bungee.chat works but kyori is a lot nicer
Ahh now i understand
You are wondering if Spigot api can include the Kyori api chat?
That what you are asking?
You have to shade and relocate it
Maybe peek at how luckperms addresses it
Both
Probably not
my plugin only support the last 2 version anyways so if it comes now I can use in 2 years
ok
Because when im using org.maven.plugins:maven-shade-plugin it shade all dependencies. Not just the one i want
Its really engorrous
use scope provided
on the dep
but really gradle is nicer, just use gradle if you are already knowing
<scope>provided</scope>
on each dep you want not shaded ^
could someone link me to the docs for this? i dont have the dependency installed
Myeah scope provided is for compile time dependencies whilst scope compile iirc is for unprovided runtime dependencies
Then i have to be like a crazy, opnening the jar with winrar and taken out the dependencies i dont want inisde the jar
That why
How wondering to dont have errors? if the dependency is not installed
π€
tysm
why would it be looking in spigot
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>kotlin-stdlib-jdk8</version>
</dependency>```
how do i change the blocks of a player head meta data so its a diffrent player?
something horrible happened with this version of spigot
and some materials are missing
and other things wont import correctly
yeah it seems like all 1.17+ items arent registered
Is there a script or smth to generate usernames like this?
theres a thing in skript for it
?
skript minecraft plugin
send?
the function or the plugin
function
Color Utils
By Mr. Darth and Sorbon
03.02.2022 Update
Decreased parsing time, increased performance by a little
Please note that the script currently...
There's a website as well to do it with Essentials colour codes
omg there's like multiple things in my project that worked in the other one that just cant be imported anymore
https://rgb.birdflop.com is one such example
public void onPlayerQuit(PlayerQuitEvent event) {
event.setCancelled(true);
}
what
would that actually work LMAO
definitely
totally
wdym
anyone know hot to color code your messages when you message a Player
.... was literally about to ask that^^^ I need help too
I looked it up and they told me to do ChatColor.RED + "message here" but for some reason that seems to return An internal Error occurred while attempting to perform this command
I did that, but I'm getting an internal error occurred....
Also I reccomend using ChatColor#translateColorCodes or something along those lines
Full stack trace that's not very descriptive
oh shoot... i was looking at mineacraft chat, not server logs
Also use Google :P
i did
then joined here once i saw this server existed
Caused by: java.lang.ClassNotFoundException: net.md_5.bungee.api.ChatColor
this is the error
is that the wrong import
What I've never seen that error before lol. Anyways I reccomend using chatcolor that isnt md5s api
Yea wrong import
org.bukkit.ChatColor right
That import should work
i'm doing 1.18.2
What kind of server are you running @upper crater
craftbukkit 1.18.2
There's your issue
You need to be running spigot
Or alternatively something like paper
If you want to use the md5 chat
oh
If you want to stick with craftbukkit then just use org.bukkit
I didn't even know people still used craft bukkit
i had searched it up and the first tutorial that worked used craft bukkit
Spigot has the md5 stuff so I figured it had to be
it's still maintained considering it supports newer versions
I always forget craft bukkit exists
lol i'm using spigotmc in pom.xml
if you're wondering, i was using the tutorial on bukkit's fandom
depend on spigot-api not craftbucket
They are
But the server is craftbukkit
So they got an error using a spigot dependency that CB doesnβt have
ah, no one shoudl be using CB these days
What does this mean?
?paste
Looks like a deadlock of some kind
i dont'r emember how i installed craft bukkit...
i assume that for spigot i just install the server.jar from the website and java -jar it and it will make the entire server?
Whats that
To install spigot you use buildtools.jar
?bt
In concurrent computing, deadlock is any situation in which no member of some group of entities can proceed because each waits for another member, including itself, to take action, such as sending a message or, more commonly, releasing a lock. Deadlocks are a common problem in multiprocessing systems, parallel computing, and distributed systems,...
my server crashed because i was making a deathswap plugin that would tp me 10000 blocks away from spawn
This happened right after I cleared my github cache
Unrelated
Unlikely
idk lol
If itβs a deadlock itβs likely not something you can reliably reproduce
Itβll just randomly happen when the right set of circumstances occur
i love jat files
Itβs a poorly designed concurrent system and thereβs a specific set of conditions that cause a deadlock
Hm
It has nothing to do with a dependency in your maven
Itβs not a compile error
Itβs a runtime issue
Mk
Okay, its happening again. It seems to be originating here: Since its awaiting ready, and it never gets ready, it gets a "deadlock"
config.yml looks like that
its actually the opposite
but related
I have no idea what the problem is
^
basically it is timing out because it couldn't get a lock on a resource or thread
in a specified time period
My best guess is that two threads are dead locking and one is just killing itself
But I guess if thereβs severe resource starvation it could be that
How does this config call create a deadlock?
for a discord bot correct?
It looks like youβre using a third party dependency and theyβre probably doing something shitty
Yes
Lol
Aight il ask them
ok so I have seen this before with discord bot
Thanks
Essentially this can happen when using an incorrect token
and the bot shuts down when you are trying to login
But when I copy paste the token right into the box, it connects
sysout the token you are getting from teh config. make sure it's what you are expecting.
what you pasted and how you are retrieving are two separate things
k il try that
So they are doing something shitty
Lol
It is related to the dependency they are using, not sure why it does that though
JDA
lol
Great way to indicate invalid credentials
yeah, basically your intuition is spot on tonight π
It doesnt usually do this, ive seen the error "Token Invalid" before
If the error is βlock took too longβ thereβs very few choices to pick from lmao
lol
Either thereβs a deadlock or theyβve done something shitty
better then the lock
The fact that it happens at all is absurd
yAS
just use a more sane discord lib π
Classic example of someone going βooo threadsβ and just chucking them in without a clue as to what theyβve done
If I saw that shit Iβd be running away from that library as fast as my legs can carry me
You know there has to be more less-visible crap just waiting to bite you in the ass
I know what you are using
just because there is a lot of people who use it, doesn't make it the best
a decent lib where you don't need to interact with JDA yourself
Yeah there's like only JDA and Discord4j and JDA has more support
is DiscordSRV
You could just make your own lib don't necessarily need JDA or Discord4J
Im too noobish
all you need to know is the endpoints
If the situation you sent us is happening then clearly so are they
Lmao
xd
I want to feel accomplished
well discord doesn't hide the endpoints or the documentation
although their documentation can be a bit vague at times
Sorta Offtopic: Is there a ratelimit to resetting discord tokens? I had to do it like 7 times in a row rn and now its saying its invalid.
Do they have swaggerdocs?
dont ask
Discord rate limits almost everything, so probably
Not that I am aware of, they could by now. But esssentially everything is listed on the left hand side and then you have to go through to see which you want and then it has documentation on the right supposedly explaining stuff
which for the most part it does, it is just when you get into something specific that it starts to not really answer anything XD
oh that is handy
but because of discord not quite documenting things in a fashion that explains when you should do something or watch out for something we have libs like JDA doing crazy things
Lovely
for instance, removing messages applies to the rate limit of the discord server just like messages being sent to it do
but this isn't really explained
Amazing
yeah I hate the Discord API if you could call it that
at least it has an api
Sounds like they did the very bare minimum to call it an API and went
βOk good enoughβ
Also, it doesn't explain that half the permissions are client side as well, so you might think your channel being hidden can't be seen, really can be seen. Now fortunately while although you could still see a channel, you can't see inside it without the appropriate perm which is the other half from the server π
You used to be able to see inside it lol
The modded discords could see people so they changed it
used to yeah, but like its stuff like that, where it isn't really documented to point out to you
it is just something you either know or someone tells you or you get in a situation where you magically figure it out
I am just surprised Discord has managed to continue XD
even with a half baked API lol, reminds me of one of those older protocol API stuff really
SOAP
Lol
that is what it reminds me of
from buildtools, where do i find the server.jar
should be in the same directory as buildtools
anyone know how to spawn a chest in with specific items inside (that are located in a specific spot in the chest)
is if (sender instanceof CommandBlock) right?
search the forums and ask here if u didn't found one
the answer is no, I neede if(sender instanceof BlockCommandSender){
Not sure if this is the right place to ask but I'm making a tool using Spiget (API for viewing Spigot resources) but it doesn't seem to return the resource URL with the resource details. Is it safe to assume all resource URLs can just be https://spigotmc.org/resources/RESOURCE_ID_HERE ? If not, how should I go about producing the resource URL with the details given by Spiget?
how can i post images? I got an error that crashes the server when trying to use ChatColor
actually nvm```
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$GroupHead.match(Pattern.java:4789)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$GroupHead.match(Pattern.java:4789)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$Branch.match(Pattern.java:4734)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$GroupHead.match(Pattern.java:4789)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$Branch.match(Pattern.java:4734)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Pattern$StartS.match(Pattern.java:3641)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Matcher.search(Matcher.java:1728)
[22:36:58 ERROR]: java.base@17.0.2/java.util.regex.Matcher.find(Matcher.java:745)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.util.CraftChatMessage$StringMessage.<init>(CraftChatMessage.java:70)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.util.CraftChatMessage.fromString(CraftChatMessage.java:180)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.util.CraftChatMessage.fromString(CraftChatMessage.java:176)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.util.CraftChatMessage.fromStringOrNull(CraftChatMessage.java:168)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.util.CraftChatMessage.fromStringOrNull(CraftChatMessage.java:164)
[22:36:58 ERROR]: org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer.sendTitle(CraftPlayer.java:1689)
[22:36:58 ERROR]: com.gmail.groupid.DeathSwapPlugin.DeathSwapPlugin.startDeathSwap(DeathSwapPlugin.java:111)
[22:36:58 ERROR]: com.gmail.groupid.DeathSwapPlugin.DeathSwapPlugin.onCommand(DeathSwapPlugin.java:50)
please help
?paste errors in pastebin to format them better
Gonna need the start of the stacktrace. Also, you need to be verified to post images.
I use the command, the connection to server freezes but i can move around like normal... (nothing else but awsd)
where would the error be (i'm currently looking through)
That usually happens when the server is crashing. Are you sure it's your plugin that's causing it? What other plugins do you have installed? Also, how much ram are you dedicating to the server?
that is the only plugin and it's the only one that pops up in the stack
idk how much ram.... i'm running it on my computer though
Can you share your code for the command class?
generally plugins cause the server to crash
if it is their plugin which I assume it is since they mark out their email, odds are they have a memory leak
Generally yea, but I've seen people put like 1GB of ram on a 1.18 server and they wonder why it crashes.
you can run mc with 1GB of ram, generally recommended to have 2GB minimum though
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
Player player;
if (sender instanceof Player) {
player = (Player) sender;
} else {
sender.sendMessage(ChatColor.RED + "You are not a Player.");
return true;
}
if (cmd.getName().equalsIgnoreCase("dsstart")) {
if (this.shouldSwap) {
sender.sendMessage(ChatColor.RED + "Death Swap has already started");
} else {
if (sender.hasPermission("DSPlugin.default")) {
this.shouldSwap = true;
this.startDeathSwap(player.getWorld());
} else {
sender.sendMessage(ChatColor.RED + "You don't have the permissions needed.");
}
}
return true;
}
return false;
}
public void startDeathSwap(World world) {
List<Player> players = world.getPlayers();
this.sinceStart.reset();
this.sinceStart.start();
this.sinceSwap.reset();
this.sinceSwap.start();
Random random = new Random();
for (Player player: players) {
player.resetTitle();
String subTitle = ChatColor.GREEN + sinceStart.toString() + ChatColor.RED + " | " + ChatColor.BLUE + this.sinceSwap.toString();
player.sendTitle("DeathSwap Started", subTitle, 10, 70, 20);
}
while (this.shouldSwap) {
players = world.getPlayers();
for (Player player: players) {
player.resetTitle();
String subTitle = ChatColor.GREEN + sinceStart.toString() + ChatColor.RED + " | " + ChatColor.BLUE + this.sinceSwap.toString();
player.sendTitle("", subTitle, 10, 70, 20);
}
}
}
```I'm using StopWatch from `org.apache.common.lang3.time`
however, I think this is a case of memory leak though unless they are doing something to tip off watchdog
oops sorry for wall
That's why, while loop
can you put in the entire crash log into the paste site?
Update the value for the while loop inside it somehow.
wdym
[10:28:37 WARN]: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
[10:28:37 WARN]: at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[10:28:37 WARN]: at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
[10:28:37 WARN]: at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
[10:28:37 WARN]: at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:448)
[10:28:37 WARN]: at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
[10:28:37 WARN]: at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
[10:28:37 WARN]: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
[10:28:37 WARN]: at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
[10:28:37 WARN]: at UtilsPlus-1.0.jar//com.wonkypigs.utilsplus.UtilsPlus.mySqlSetup(UtilsPlus.java:64)
[10:28:37 WARN]: at UtilsPlus-1.0.jar//com.wonkypigs.utilsplus.UtilsPlus.onEnable(UtilsPlus.java:26)
[10:28:37 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[10:28:37 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[10:28:37 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501)
[10:28:37 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:562)
[10:28:37 WARN]: at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:476)
[10:28:37 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:736)
[10:28:37 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:503)
[10:28:37 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:313)
[10:28:37 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1211)
[10:28:37 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317)
[10:28:37 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
anyone know why this is happening? the database information is correct in the code
?stash
So, you know that while loops run forever if the value that you put in is true? You need to update that same value inside the loop somehow in order to change it's value so that you don't make an infinite loop.
first and foremost shouldn't be using root, but to answer why it is happening is because localhost isn't a valid domain for root to login in from, instead it should be 127.0.0.1 or add localhost to the user DB info
It's up to you how you do it, but you can't just expect a while loop to change it's check on its own.
but i need to update the loop every second minimm
and there is a command that can stop the while loop if needed
you are better of using tasks for this
ok will try
then you are with some while loop
You could use a runnable.
especially if you don't know how to stop a while loop lmao
i do
Also, your command will never run to stop the while loop as long as the while loop is running.
if you do, you wouldn't be having an issue like you are right now
Code is executed in order. So if you are in a while loop, then run a command. The while loop needs to finish first.
I recommend using tasks for this however
i hadn't realized that this would happen when writing it
with tasks you can run once off tasks which would seem more appropriate
then some while loop
setConnection(DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database, username, password));
I did this right, right?
There's multiple ways to make a task that repeats every second. Runnables, Timers, etc, but a while loop is used very rarely.
host = getConfig().getString("database.host");
port = getConfig().getInt("database.port");
database = getConfig().getString("database.database");
username = getConfig().getString("database.username");
password = getConfig().getString("database.password");
table = getConfig().getString("database.table");
assuming host is the loopback device then it seems fine
I have it so I can change info in config
so I have this
I changed it to 127.0.0.1 in config and it still shows the same error
but the issue as I pointed out is specifically the host name being localhost after the @
then it is quite possible then that root login is disabled
I dont have much experience with using xampp, could you tell me how I could enable it?
if it isn't, I recommend logging into the DB manually
and checkout the user table
see what you have there
should be in the mysql.ini file
consult the documentation, it is why these software have one usually
uhhh I have the mysql module turned on
but, either you have root login disabled, which means never set one up, in which case you need to run the mysql command
recommend using a console to log into the DB
generally xampp installs a mysql DB tool
for you to do so
k
also recommend doing some more research on the things you are using as well
or learning how to use them
otherwise you are just going to constantly encounter problems as well as use bad practices
IE using root for the DB
should never do that, should instead setup a user with the minimum privileges necessary for it
On the 1.18 version of Paper PlayerDeathEvent#getDeathMessage() is deprecated. What would be the correct way to retrieve the string of the death message? I tried looking into PlayerDeathEvent#deathMessage() but couldnt find a way to convert the Component Object to the death message string. This is the same with Player#getDisplayName()
It's not deprecated in Spigot.
This is spigot discord, not paper
is there a way to listen to every spigot event and call other method with the event as an argument, without create event handler for each event?
well, i want to convert the spigot's event system to guava's EventBus (don't ask why)
The main issue with yoru idea is that not all Spigot events can be listened to
you would have to list the events you want to forward
yes
Any idea on how to make a mob pathfind towards an ore? the default methods are kinda shit, if there's something in the way or its just above it, it will register as done
the problem is, how would i register a listener for event which i have only a Class<? extends Event> instance
yeah, but what method should i put in Listener if i have a Class<? extends Event> and what is EventExecutor?
you mean
class EventListener implements Listener {
@EventHandler
public void onEvent(PlayerQuitEvent /*For Example*/ event) {
/*...*/
}
}
```?
is this for a server you run or something?
cuz in this case i would still have to create handler manually for each event which i want to avoid
Sorry I was remembering registering events not listeners
I did see some code a few months back about hooking into all events
If I can just remember why it was being done
i think it is possible to register event listener directly into the HandlerList but i didn't get how RegisteredListener is created because the method in JavaPluginLoader is complete mess
can i inherit the base class of minecraft items server sided build them up from scratch(e.g build my own custom sword not inherited from wooden_sword but from like the base class and build it up from there)
and send the clients packages of the item being "vanilla"
no you cannot
to create actual new items
you have to have an item that the client already knows, and then add a texture and custom behavior to it yourself
yea thats what ive done
but then i also have to deal with the pesky task of nulling its vanilla behavior
and as time progresses
use a... stick
more features might get added