#help-development
1 messages · Page 1160 of 1
and if you have to ask that question it probably means you dont
You can use minimessage and adventure within spigot if you use a certain serializer to convert it to a string @quaint mantle
why are you soo aggressive
Or use the adapter
I said dont answer because I would have to elaborate too much to make it worth asking.
Sorry, platform
You see Adventure had an interface named Audience
So it means I don't really have to write too much code twice
I was just looking for similar thing for Events too
so yeah, about that, i went to sleep without testing to compile it. It turns out this cannot be done due to type erasure collisions between generic types
do u by chance know how to add a repository as depedency in gradle?
sorry I didnt mean to sound aggressive
I know its the other end of what I was asking.
what do you mean “repository as a dependency”, they’re two different things
you know like how we can import spigot or paper into our projects
Yea
I wanted to report a github repository into my project
Use the repository of jitpack
oh okay
And google “github repository as dependency”
Jitpack
and gradle after
😩
Do you like jitpack coll?
No
F
What github repo are you trying to use as a dependency? Just incase it’s published anywhere to any public repos
true
but i think i may have found another way to construct them implictly. Extension factory methods:
operator fun Vector1D.Companion.invoke(component1: Int): Vector1D<Int> = IntVector(component1)
because kotlin allows to overload function invocation syntax, i can fake the constructor
var vector = Vector1D(5) // Produces Vector<Int>, because it implicitly calls IntVector(5) constructor
True and this is cursed
sneaky but it works, i can probably make an Vector object factory class which constructs dimension types implicitly too
object Vector {
operator fun invoke(component1: Int): Vector1D<Int> = IntVector1D(component1)
operator fun invoke(component1: Int, component2: Int): Vector2D<Int> = IntVector2D(component1, component2)
operator fun invoke(component1: Int, component2: Int, component3: Int): Vector3D<Int> = IntVector3D(component1, component2, component3)
}
now i can do:
val vector1d = Vector(1) // Produces Vector1D<Int>
val vector2d = Vector(1, 5) // Produces Vector2D<Int>
val vector3d = Vector(1, 5, 4) // Produces Vector3D<Int>
seems to be way cleaner and aligns with java interop a bit more
i swear best ideas come after sleep
real
which is why I trick my brain, I just get up and write the ideas down and then repeat
i just attempt to remember them think, "What the fuck was i thinking before" and repeat
How to edit resource in spigotmc?
does anyone else get that pinkish-red youtube playing status bar?
yeah im a bit confused of why its like that
ye fr
looks like something Instagram would do
i thought it was a sponsor block segment when i first saw it
it doesnt fit Youtube's redness
wait that's awesome
Hey, how can I use a private repository as a dependency with jitpack? I can't find that
Oh
Wdym?
Could just make the repo not private
It's premium
I remembered having a private resource in jitpack, but maybe i'm confused
you need a subscription
and why would you want to do that anyway
An API
Keep the API in a public repo
and the rest of the plugin in a private one
or you know open source premium 
could be
I wanna run this api in my minecraft server to profanity check. Ive never worked with java api before and tried running it with curl because im sitting here for 2 hours and dont understand shit
Now this is what ive got. I just wanna contact that api and get the results as a string
public static String determineOffensiveness(String text) {
String command =
"curl -X POST 'https://api.sightengine.com/1.0/text/check.json' \\\n" +
" -F 'text=" + text + "' \\\n" +
" -F 'lang=en' \\\n" +
" -F 'models=general,self-harm', \\\n" +
" -F 'mode=ml' \\\n" +
" -F 'api_user=256010994' \\\n" +
" -F 'api_secret=key'";
ProcessBuilder processBuilder = new ProcessBuilder(command.split(" "));
processBuilder.directory(new File("/plugins"));
try {
Process process = processBuilder.start();
InputStream inputStream = process.getInputStream();
int exitCode = process.exitValue();
return process.getOutputStream().toString();
} catch (IOException e) {
throw new RuntimeException(e);
}```
yeah
i use a normal array of words but sometimes where may be mistakes and i want to make a automated check for these mistakes
Is their any reason you can't use http client
It's pretty not smart to rely on a system library that may or may not be present
i dont know how to use it
Then learn it!
ive been through 5 apis
your wallet does
kinda contraversial but true
just look at Citizens plugin
everybody just downloads dev builds instead of paying
Just don't provide support
there's a reason the second result in google for citizens plugin is jenkins pipeline 😄
Check out how I do my http stuff
which line?
huh
how do i get the result?
see
empty code that i dont understand
i made a small util method to download from url
178-186
whats a inputstream?
it's the data coming in
you can write it to a file, read sequences with a datainputstream or scanner
thats the code in javascript? how to use that util method with this
const res = await fetch('https://vector.profanity.dev', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message }),
})```
host is just the website?
ye
what is scheme, post and timeout
scheme is https
or sftp
or some other protocol
and path is the /some/path
after the host
ye or null
not sure
null works
you can also get the uri as the whole link
URI.create("link here")
InputStream Stream = getUrl("https", "https://vector.profanity.dev", null, 1000);
now i have this
how do i send the message in json
and the method and headers?
ok
InputStream input = getUrl("https://vector.profanity.dev/", 1000);
oh, you're trying to send
then you can scrap this oof
i sent what i wanna do in javascript
HTTPClient
do exactly this
const res = await fetch('https://vector.profanity.dev', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message }),
})
I'm not spoon feeding you code check out the article above
whats a completeablefuture, a https response, what does it mean to use "::", what is that -> method, what do i map and what is stream
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
that is a coding for 4 years problem
how can i code java for 4 years already and write minecraft plugins and this is so hard
Considering you already know a programming language it'll be faster for you
If you've coded for 4 years you've failed
if you’ve been coding for 4 years you should at the very least understand completablefutures, using ::, what is ->, and what stream is…
what you been doing for 4 years
thanks for letting me know, really motivating
It should be
idk. coding
coding what?
How you've run into none of this stuff in 4 years is insanity
basically conding a minecraft server myself
yeah like player managers and stuff
what have you been doing for 4 years
i just said
how did you not get experience with any of these
what apis do you know
You’ve never used a lambda in your managers?
I've been coding java for 3 years and I ran into all.of that shit with in the first few months just how...
spigot, luckperms, worldguard, and a few
I’ve been doing it for approx 6-7 years
isnt that this () -> shit
yeah
only heard from it, never understood it
3 years for me no clue how not running into lambda in that long
think of lambdas, as a math function - f() ->, or f(x)->
ok..
what does inlining mean
basically lambdas are a shorthand method with no name, no defining. It’s just () -> or whatever args need to be provided
ok
Wait… have you done bukkit runnables?
Does c# have lambdas?
yes
yeah p sure
kinda
How did you do bukkit runnables without lambdas
idk copy pasted the code from spigots website
..
why are we attacking him?
Coding isn’t copy and pasting lol
please learn the proper way, don’t just copy and paste please
You can make anonymous classes, implement Runnable, or extend BukkitRunnable. All valid ways to do it :p
Yeah this, but honestly people shouldn’t just copy and paste code without learning what each of it means.
You definitely did it too
better copy it and have it done the proper way instead of me making it super janky
I'd actually argue otherwise
When I'm editing Gradle files I definitely do 
Copy and pasting code you don’t understand is buns
Better to make it super janky than copy and paste
i mean
I mean but now that we’ve had the experience and time to learn, we know what it does under the hood. After looking into it.
then the servers just gonna crash and be instable
Isn't that how you learn? By making a mess
That’s apart of the learning process
That’s not the point, get something working and expand on it later
How to optimize it and make your code better yoursef
i often come back to stuff ive coded when i began coding and correc tthat
See your problems you made, relearn on them, and get better over time
stuff like a nick system where it say String -> Player not Player -> String, etc.
i correct that
@silent slate https://stackoverflow.com/questions/7181534/http-post-using-json-in-java i found this that's just what you need
I would like to make a simple HTTP POST using JSON in Java.
Let's say the URL is www.site.com
and it takes in the value {"name":"myname","age":"20"} labeled as 'details' for example.
How would ...
Okay let me tell you one thing, never store the player object inside of a map/list. Only use the UUID of the player.
Even better
An entire article on http post
I loce Baeldung
By baeldung
love
again
Hey @floral drum do you think you could do me a huge favor and try to mess with directional params for the physics? (If you’re willing and have time that is <3)
i dont understand the 2nd link
But it's not of use if they don't know basic java features
So they need to go learn some more java
I do too :3
i care that it works good
Learning is very fun what
i dont care how i get there
Okay let me ask you a few questions about Java.
Do you know what abstraction is?
Do you know when you should use abstraction?
Do you know how to work with other threads?
Just to see where you are
You can't say coding is fun and learning isn't the two co exist they can't be mutually exclusive
I know it’s only 3 questions but yeah
i think abstraction is that implements and expands thing
extends
and threads is with runables
Abstraction can be best described as abstraction 🤓
Threads are parallelism. Basically allowing multiple tasks to be executed at the same time.
i got some background in pc building / hardware
Right
thats why i know threads
Threads within programming concept is different tbh. It’s more about being able to make sure all of your threads can see updates to objects. Knowing good thread-safety practices. And knowing how and where to multi-thread your software.
So, a completablefuture is an object that can allow you to execute a task on a different thread. Essentially not locking/pausing the main server thread to do a specific task. Which is your HTTP post request, which you want to do. You never want to execute that on the main thread of the server because it will cause lag, especially if the website isn’t responsive or the ping is too much. @silent slate
i mean
it checks if there is profanity, if the player gets the info 1 second later or earlier doesnt matter
use illusions post
It’s not the player that gets the information though. It’s the server. Which is why it can cause the server to freeze
read this
theoretically its not too different
@fickle spindle that site you tried to send is not offical and shouldnt be used
like JS Promise and Java CompletableFuture kinda go hand in hand
ok
oh okay but i neeed an help with buildtools
we just dont have the async await luxary in java
juava
ask away
what is Json.Stringify in java?
bros thinking of guava
puarple
idk why but on the exe doesn't load the version and if i try to use the bash it don't build the craftbukkit and spigot
@river oracle get in here
ehm well java doesn't have a std way of dealing with json, so people tend to use 3rd party libraries like gson, moshi or jackson
There are a few libraries to do this. Gson, Jackson, JSONSimple
Can't help you without an actual error
Bukkit provides you with Gson if you'd like
wait check 5 secs dms if u can
I don't take dms
seeing that swear filter reminded me to work on mine
?paste
Gson.of("String")?
no
restart the app
i tried it a lot of time
i tried to dowload an older version too
is this fine?
Gson gson = new Gson();
JsonElement element = gson.fromJson(text, JsonElement.class);
JsonObject jsonObj = element.getAsJsonObject();
StringEntity params = new StringEntity(jsonObj.getAsString());```
i can replicate this, versions dont load. Exe or jar and no errors in console if running the jar with -gui
Is your internet really slow
What tf
What broke
something™️
nope it isn't
Gson gson = new Gson();
JsonElement element = gson.fromJson(text, JsonElement.class);
JsonObject jsonObj = element.getAsJsonObject();
StringEntity params = new StringEntity(jsonObj.toString());
😭 what did you do md it was working so well
choco can you wake md up he needs to update spigot
Not sure what the StringEntity is for, but yes, that looks fine. You can just use fromJson(text, JsonObject.class) though
You don't need to getAsJsonObject(), you can just pass the object class itself
so it'snt a my problem right?
I also think JsonParser still exists so you can skip the Gson instance?
im guessing its something in buildtools so for now just run buildtools through cli
There is. JsonObject object = JsonParser.parseString(text).getAsJsonObject()
same stuff it builds me the buildtools
Although I'm realizing... you're just parsing the JSON to then get it back as JSON?
Why use the gui
that whole thing is useless
yeah
🙃
?
¿
!
%
¡
oh now it's working with the cli thx a lot
(  ̄ー ̄)\(^^)/
Yay guess I gotta fix that
im going back through versions on jenkins to see which broke it
just dont care and tell shadow to fix it
Okeeee
i tried another version and the problem was still there
Shadows busy I thinks
smh
uh , minecraft is 1.21.3 now?
yup
Hotfixes
not even 24 hours more like
take down the app and tell everyone to use command line instead.. a buggy app isnt helpful XD
thats why its gonna get fixed
Did you find which build breaks it
so far no
its gotta be something blocking a query
Yeah maybe cloudflare or something??
is /versions cloudflared?
how do i make this method with the promise stuff
public static String determineOffensiveness(String text) {
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
try {
HttpPost request = new HttpPost("https://vector.profanity.dev");
Gson gson = new Gson();
JsonElement element = gson.fromJson(text, JsonElement.class);
JsonObject jsonObj = element.getAsJsonObject();
StringEntity params = new StringEntity(jsonObj.getAsString());
request.addHeader("content-type", "application/json");
request.setEntity(params);
HttpResponse response = httpClient.execute(request);
return response.toString();
} catch (Exception ex) {
ex.printStackTrace();
}
return "not working / no reply from website";
}```
the element should already be a String, no need to create a string entity.
Do not recreate the http client and gson, make them variables in the class
you can also use standard java to do this instead of whatever library this is
which would be easier
guys why it say Unresolved dependency: 'org.bukkit:bukkit:jar:1.8.8-R0.1-SNAPSHOT'
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<systemPath>${project.basedir}/src/main/resources/spigot-1.8.8-R0.1-SNAPSHOT.jar</systemPath>
<type>jar</type>
<scope>system</scope>
</dependency>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<systemPath>${project.basedir}/src/main/resources/craftbukkit-1.8.8-R0.1-SNAPSHOT.jar</systemPath>
<type>jar</type>
<scope>system</scope>
</dependency>
this is my pom
and this is my resources https://imgur.com/a/ftHGGbp
?1.8
Too old! (Click the link to get the exact time)
but the string is raw, its not in the json format
- 1.8 is ancient
- run buildtools
- use spigot not bukkit
?maven
?spigot
Wow 1.8 is young
?howold 1.8.8
Minecraft 1.8.8 is 9 years, 2 months old.
Pretty young tbh
?howold 1.21.3
not compared to 1.21
New born
?howold 1.21.4
rip
:<
now i have an error on the compiling
?pastebin
?paste
Remove craftbukkit from your resources folder
rad why are you always hating on 1.8
I wish 1.9 never switched combat so we wouldn't have to deal with the amount of brain dead people who stay on that ancient ass version
I just hope that an actual combat update will fix some of the issues
i wish they did it over about 8 versions
it slowly changed and you couldnt escape it
i bet that would make people not care either
Hey, so I'm trying to upload a proyect to jitpack so I can use it as an API, however, using gradle I cannot use this proyect
the jar hasnt built for it
I already made a tag which is called 1.0
What?
Hmm
How can I make that? Should I upload it myself?
the compilation failed is the issue
Sorry, I'm not too used to github
It could be because the protects has modules
But how could I solve that?
read the build log and look at the error
Okay
Uhh
Found the error but don't really understand it
It says invalid target release: 16
Is that java versión or am I confused?
ye
what's wrong here?
Java 16
💀
Looks fine to me just make sure the version is correct for whatever java version you use
anyone know what to do with BuildTools on 1.21.1/1.21.2 ?
run it in an empty folder
I think i'm actually using 21, don't remember rn
Let me change that maybe
show more of the error
what's the jdk you're using?
Let me check de jdk
I think 21
Which version included records? That's the one i'm using
Why are you trying to target Java 16
there has to be more to this
Let me send you the link
But I mean, I can compile the plugin with no problem
Why github can't?
You need to tell jitpack to use a newer java version
Oh
Sorry if its basic, but how?
jitpack.yml
When making a release it doesn't say anything about java version
Hmm, is there a resource i can check?
how are you running it?
jdk:
- openjdk17
before_install:
- sdk install java 17.0.3-tem
- sdk use java 17.0.3-tem
- sdk install maven
- mvn -v
install:
- mvn install -DskipTests```
java -jar BuildTools.jar --rev 1.21.2 --remapped
(Windows)
worked find before 1.21.1
in cmd, git bash or something else
Is here located correctly?
yes
Okay, i'll try thanks
does the folder you ran buildtools in contain a PortableGit-2.45.2 folder
The first one - yes. When you suggested to run it in empty folder - not
PortableGit-2.30.0-64-bit
@river oracle does bt break on specific git versions
as a quick fix, make sure you run it in cmd not gitbash or powershell and it should install the correct portable git version
I run it using default windows cmd.exe and it does not work
I have start.bat file with that command and it runs under cmd.exe
What git version should I use? 2.45.2? I can try to update if you think an issue caused by git version
Not that I'm aware of
It should use the one on your system and work fine given you're not wildly out of date
The issue came from 1.21.1 (1.21 compiles/builds well)
BuildTools started failing on 1.21.1 and still not work on 1.21.2
Maybe there is a maven repo with remapped all versions without BuildTools requirement
Uhh, what about this error? Do i need to provide the spigot jar?
It is using nms
then you need remapped as you are remapping
What?
you need jitpack to build the remapped jar
Do you mean to add that in jitpack.yml or?
if you are getting this error when tryign to get from jitpack
Jitpack is trying to compile
if its local you need -remapped in buildtools
I downloaded remapped if that's what you are saying
How could i make jitpack to download buildtools first?
the buildtools stuff should be in your pom
it would probably be easier to just use something like repsy
I relocate the jars but getting that error
That's how i relocate it
the issue is jitpack doesnt run buildtools, so you would need to make it run it, and it would have to run it for every version
so it would be easier to sign up for a free repo on repsy and just publish it from your machine onto it
That's what i'm trying here
But I didn't know how to make jitpack to download buildtools first
^^ youd have to make maven run bt
(its probably easier to just use repsy)
takes like 5-10 min to sign up and set up then you publish a version + everything from your pc which means you dont have to wait for bt to run everytime
hmm
I'll try then
No more ideas about that problem?
Maybe there is a maven repo with remapped all versions without BuildTools requirement?
there wouldn't be a repository with remapped jars, since that'd be sharing Mojang's code
for that error, what does the buildtools log say?
use gitbash to run buildtools
what about just using the gui
you probably could, but not everyone wants a gui
worked well, thank you
with gui same error

I created a banner and in the lore description there are lore like
White Per Pale
Whit Fess
Red Border Indented
Red Chief Fess
Red Base Fess
Red Roundel
Is it possible to remove these? I tried but couldn't
ItemFlags
Anyone know a tool to diff mc versions
I was using https://github.com/clabe45/shulkr but it's been pretty much abandoned
declaration: package: org.bukkit.inventory, enum: ItemFlag
Is it broken?
yes
it's been broken for a long time on recent versions now
like since 1.20.5
or 1.19.4 was broken too I think
and I can't find any alternatives
I see
i dont get it?
add this item flag to your item
moved today from eclipse to InteliJ
does anybody know why it doesn't recognize the net.md_5.bungee.api.ChatColor.of?
check the maven/gradle dependencies tab on the right, it should be below the dropdown for tasks/goals
if you see a squiggly line on a dependency, it means it couldn't resolve the dependency in question
if there are no squiggly lines, try pressing the sync button on the top side of the same tab
this?
uh, did you not import your project as a maven/gradle project?
doesnt work
what does it say?
hm that's weird, it should automatically detect your pom
try adding it manually I guess, in the maven tab click the + button and add your pom file
Anyone know how I can retrieve the top most bounding box of an anvil? VoxelShape spits out a collection, but no way to identify what each bb represents?
Sort
Is there someone who created a plugin that made it possible to have your custom motd centered?
This channel is for developing plugins
Ask in #help-server
Yeah, I meant also in my own plugin
resource packs :clueless:
Not much you can do about that
I tried but i cannot get it working. i have to use java 8 because my plugin supports 1.8 untill 1.21.* and the .repeat is not a thing in java 8
i did it in my old version of my plugin that supported 1.18+ but that was also in java 21
ah alr
you should just not support 1.8
Hey guys general development question I am trying to send a bunch of packets and since update 1.21.2 stuff is not working properly in the client. It seems update light is what I am receiving, based on wikivg thats 0x2A but I have no packet with that ID. I suspect the packet id changed but it isnt available yet on wikivg. How I can get the new ids?
or 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20 too
This is on my custom bungeecord fork, I am trying to update the protocol
I know. but i wanted to try it as a project
i love writing nms for 50 versions
Why not 1.19 and 1.20?
My plugin don't use so mutch of diffrend nms code. just 2 or 3
not latest
I checked bstats and a lot of servers are running also older versions like 1.12.2, etc...
ok almost 50% does use 1.21 but you know what i mean
Gotta have that 3% market share from 1.12.2
nah i want that 3% from 1.4.2
@zinc lintelEvery version that is abandoned will lack updates and lacking updates will break your server. Not exactly to "stop using that version" but rather do not use versions that are outdated. Mojang is trash doing server updates and often messes up the game, so if you have some good fork maintained by reputable develpers thats ok. But probably because this is a Spigot community and the mindset is to keep up with mojang the most common recommendation will be to update.
Ah yes all those trash updates
?howold 1.12.2
Minecraft 1.12.2 is 7 years, 1 month old.

7 years wowee
This is also not relevant, as most people could use any version, but the most played server is still 1.8
or that fucking shit ass chunk loading improvements
fuck those tbh
not as many people play 1.8 as you think do
Just because the most played server is 1.8 doesn’t mean the majority is
all i want is a clouds update
Vocal Minority != Majority
And hypixel isn’t going to use your plugin
Does someone knows if wikivg updated the protocol numbers? I am looking to update my thing to 1.21.3... Now that we talk about updates
did .3 have protocol changes
Unless ur choco
It seems like some stuff is broken
.3 should be the same as .2
This works fine on 1.21.1
Yes I meant 2
But I dont know what id is light_update on 1.21.2
that's such a slippery slope before you know it you'll try to convince me -.15 is the same as .3
I will not fall for slippery slope falacy
Not sure how to get that information, seems wikivg is outdated and showing light_update as one that is never sent by my server
I havent say many people plays it client-side, but most people plays servers that have a 1.8 base. Also this servers pay more to developers because they actually have players. The only thing I saw 1.21 or newer versions being used for at the moment is to make mods and youtube videos on private servers. Making a server out of new versions had been unprofitable since so long, I don't have any close friends that host profitable 1.13+ servers.
Not denying new versions are fun, but hard to balance between server costs and profits.
there are heaps of servers that have thousands of players and are on either latest or recent versions
and they are very much profitable
I don't have any close friends that host profitable 1.13+ servers.
That's a relatively small scope lol
If you're only looking at your friends who prefer 1.8 servers, then yes, you're going to get confirmation bias
you just have to be original instead of making pvp server number 864145
What if I make hypixel skyblock server number 864145
I don't have any close friends that host profitable servers
Guess Minecraft is a dead game, clear evidence
I am friends with the top servers from latin america, most of them have players coming from games like bedwars or skywars, while the survival servers have to be limited in player counts because of high resource usage.
but for some actual stats, there are server scanners bots, that have like all servers that are reachable with an IPv4 address. 90% of servers are on latest. 1.8 is dead
ofc that includes vanilla and modded, but that does not matter. nobody except some vocal minority cares for a ten year old version
Also making Survival server number 843487 is also not a great idea, you can use any version as long as you are original. You dont have to be updated or outdated, just make it good for your idea. No reason to use 1.9+ for a bedwars or pvp minigame, also not a wise idea to use 1.8 if you aim for survival, but also not a great idea if you have no income.
Thats known, but most of players are currently playing networks that have atleast one 1.8 server inside
you have bigger problems if you have no income and want to host a server for income
a server is an investment
With 1.8 you dont need that much money
you do if you want to be original
👀 I feel like you'd need just as much if not more money
Why?
what
who is gonna play on a server that has no players, has no fancy new features and has nothing original to offer?
You can host a small server with 1GB and support a decent amount of players to start generating an income
You can offer original stuff
I am asking why you need money?
I dont think you have to be rich to host a good and nice original server
you need to sustain yourself while you develop and design your ideas
resources don't grow on trees
they actually do if you use 1.8
Thats right, also not going to put $100 on a 1 player server
Maybe start with something small instead, right?
it's only gonna have one player if you don't have anything to offer
what about 1.9.4 where is my free 1.9.4 server
Its gonna have 1 player if it lags
why do you need 1gb?
you don't need to throw a million dollars to run modern versions
There is barely any host that gives you only 1GB
eh, the cheap ones give you the option
whether that serves one anything at all, is a different story though
You can literally run a 1.21 server on a raspberry pi, yes I did do it
I use my own linux machine with more than that, but host multiple 1.8 servers with different minigames using 1gb each. Each could hold 80 players. Not sure if 1.21 could handle that.
Newer versions don't run THAT bad. Sure they aren't as good as 1.8, but it'd be idiocracy to ignore the fact mojang continues to rewrite large portions of their code to improve performance
I do not believe you
when I tried to host a survival server I needed 12gb to host 80 players
I don't think you want 80 people all on one server but okay
- this
with 80 players, even for a minigame 1gb is way too low
even with the server itself, Imagine how well plugins would have to be written to not exceed that
Its a small count for starting a small server, how much would i like "all day" then?
@worldly ingot leak how much memory mega skywars servers use
?
I have never been able to host survival with 80 players not having to assign 12gb in the long term or making the server restart each 6 hours
sure but comparing Survival to Skywars is inherently unfair.
What amount you expect okay for a server to have all day? I am not understanding.
again you're cherry picking for the sake of bias
I'm saying that you don't want 80 players on one minigame server instance
I am not cherry picking, what do you mean? I also worked with many other guys and tried to host it with same results.
if you have to restart the server every 6 hours, brother you have a memory leak
You want it on single map games like ctw
I usually cap to 80
You lose the fun otherwise
It works fine tho, so why would I not want it?
a modern server with 80 players can run fine with 6gb of RAM, given a good processor
1GB is still not enough for that
I would love to have a guide about this
For what?
for anything really
discord takes more ram than that lol
I was running a capture the wool server with 1GB, running all day
if you're using some server impl written in rust maybe
Custom fork and custom plugin everything made by me obviously
but not a vanilla derivative lol
You wont expect a random plugin from spigotmc to work
yeah, I believe you even less now
^^
I still have the files
I could send them to you
Me when I remove 80% of the server and wonder why it's more lightweight
Does anyone knows where I can see latest 1.21.3 protocol changes so I can update?
the usual someone wanting 1.8 support I do believe
Wouldn't count that as working then
You dont need that much features on ctw
minecraft source
You can just open your IDE and take a look
1.21.3 didn't introduce any changes to the protocol
or give it a bit for wiki vg to update if it hasn't already
I havent asked for that, I explained to someone why he wont get 1.8 support here, because he was asking
and yeah .3 is a tiny hotfix
.3 is a hotfix
Seems some of the packets are being read as light_update
that would be 1.21.2 not 3
.3/.2
Did they add a packet to grow salmons again
.2 is a packet change
.3 is not
Does someone knows where to see the updated protocol ids?
and wiki vg should be up to date no?
It isnt
Then open the source and take a look
anything related to the protocol is pretty much at https://wiki.vg/Protocol
you havent looked up the entire conversation it seems, I asked where I could get it because wikivg is not updated yet.
i mean the ids are dynamically generated depending on the order in which packets are registered, so if you can't rely on someone else's work, looking at the source is the way to go
It’s a DFU
I know
Can’t wait for ClientboundGrowSalmonPacket
It was a joke as they were insisting 1.21.3 had proto changes
I think you mean cooking
bro got the 2010 Justin Bieber haircut
💀 that's just too mean
ig that's the price of being attractive 😭
i'm sorry but i'm not wrong tho https://www.youtube.com/watch?v=kffacxfA7G4
abs not
if the sides grow to long my side burns grow into my ear
its annoying asf
Loser aint got the locks like me
How can I play custom sounds from resource packs? For example when you join a game of TurboKartRacers on Hypixel it plays a "Welcome to Turbo Kart Racers!" sound and in the server resource pack it has it's own custom sound named "announcer.welcome". How would I go about doing custom sounds in 1.20.4 so I don't need to use other built in sound paths?
have u tried with the playSound api method?
I have
it should be able to play it since it accepts strings
tried:
player.playSound(player.getLocation(), "minecraft:announcer.welcome", SoundCategory.MASTER, 10F, 1F);
and
player.playSound(player.getLocation(), "announcer.welcome", SoundCategory.MASTER, 10F, 1F);
the player does have the resource pack with sound file too
also tried the /playsound and still nothing
Custom sounds aren’t going to be in the Minecraft namespace
thought so, but from a post someone did before it seemed to have worked for them
Wut teh?
but yeah, tried the /playsound announcer.welcome master ign method too and it still doesn't seem to work
this is what's in the sounds.json:
"category": "master",
"sounds": [
"announcer/welcome"
]
},```
just using the TKR sounds as a example since I can test out the resource pack on hypixel and on my server
and it works on hypixel, just not my server
That’s because the sound is coming from the announcer folder and not the custom folder.
Hypixel is apparently using a different directory to store their sound files.
so how could hypixel play the noise?
Cause they point to the correct folder.
Where does your sound file reside?
What’s the full path?
huh, tried on 1.20.4 and it worked, so it might be a viaversions issue
I was trying on a 1.8.9 client while the server is 1.20.4
which didn't work, but once you go onto 1.8.9 it then decide to work
well a lot has changed since so yeah, dont test like that
fair
now just need to figure out how I could play audio on all versions
since they can somehow do it
maybe
ig I could use placeholderapi and send the packets required
thanks for the help, hopefully using packets work
When dealing with sound packets in ProtocolLib 5.1.0, I can't use packet.getSoundEffects() due to it requiring a sound from the Sound class, and using getMinecraftKeys() or getStrings() doesn't work due to Field index 0 is out of bounds for length 0 (just writing to 0 with the sound name). How would I go about fixing this? Not too great with packets and I am out of ideas
(this is for custom resource pack sounds to support multiple versions)
[--nogui, --rev, 1.8.8, --remapped, --output-dir, C:\Users\charlie\Desktop, --final-name, spigot-1.8.8-buildtools.jar]
Loading BuildTools version: git-BuildTools-5411f5b-186 (#186)
Java Version: Java 8
Current Path: C:\Users\charlie\Desktop
*** Using downloaded git PortableGit-2.45.2-64-bit\PortableGit ***
*** Please note that this is a beta feature, so if it does not work please also try a manual install of git from https://git-for-windows.github.io/ ***
git version 2.45.2.windows.1
Error occurred during initialization of VM
Unable to allocate 261568KB bitmaps for parallel garbage collection for the requested 8370176KB heap.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Could not successfully run Java.Error running command, return status !=0: [C:\WINDOWS\system32\cmd.exe, /D, /C, C:\Program Files\Java\jre1.8.0_202/bin/java, -version]
getting this error with buildtools
Unfortunately 1.8.8 isn't supported
I reccomend If you're going to use such an out dated version you atleast use a public fork that patches known issues
If you still refuse to listen to me and do this very stupid thing anyways I've hear a decent work around is downloading a latest version than download 1.8.8
Also looks like you're allocating not enough memory to BT as well
*fortunately
Fortunate for us unfortunate for him xD
1.8 issues L
who told you that
i have a problem while running buildtools on ubuntu: my java-version is openjdk 21.0.4 2024-07-16 and the error while running is: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project bukkit: Fatal error compiling: error: release version 17 not supported
when i switch to java 17 the error shows this: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project craftbukkit: Fatal error compiling: error: release version 21 not supported
apt install openjdk-21-jdk
(you just have the jre installed, you need the jdk)
ah ok thanks ... it showed me the JDK in the environment variable selection for "java" ...
I'm trying to showcase an item in chat in 1.21 but it shows me the item without the custom name or the lore or the enchantments, does anybody know why and how to make it work?
Is minecrafts crafting system O(1)?
no
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
ItemTag itemTag = ItemTag.ofNbt(i.getItemMeta() == null ? null : i.getItemMeta().getAsString());
String[] parts = message.split("\\[item\\]");
String before = "";
String after = "";
String itemName = i.getItemMeta().hasDisplayName() ? i.getItemMeta().getDisplayName() : messageManager.format(i.getType().name());
int itemAmount = i.getAmount();
// for (String s : parts) Bukkit.broadcastMessage("s: " + s)
if (parts.length > 0) before = parts[0];
if (parts.length > 1) after = parts[1];
String tag = mainClass.tu.getPlayerTag(p).equalsIgnoreCase("") ? "" : " " + mainClass.tu.getTagTitle(mainClass.tu.getPlayerTag(p));
TextComponent main = new TextComponent(TextComponent.fromLegacyText(messageManager.translateHexColorCodes(mainClass.gm.getGroupPrefix(mainClass.gm.getGroup(p)) + mainClass.su.getPlayerNickname(p) + tag + " &f&l: &r" + before + "&8&l► ")));
TextComponent item = new TextComponent(TextComponent.fromLegacyText(messageManager.ChatColor(itemName + " &7(x" + itemAmount + ")")));
TextComponent afterCom = new TextComponent(TextComponent.fromLegacyText(messageManager.ChatColor(" &8&l◄&r" + after)));
item.setColor(ChatColor.AQUA);
// item.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, )));
item.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new Item(i.getType().getKey().toString(), i.getAmount(), itemTag)));
main.addExtra(item);
main.addExtra(afterCom);
for (Player online : Bukkit.getOnlinePlayers()) {
online.spigot().sendMessage(main);
}
pls put java after the 3 ```
so it has pretty colors
```java
code-here```
version?
1.21
item.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new Item(i.getType().getKey().toString(), i.getAmount(), itemTag)));
Could be this ?
oh wait it has the tag
sry its hard to read
ItemStack stack = new ItemStack(Material.DIAMOND_SWORD);
// stuff about modifying stack
TextComponent component = new TextComponent();
String nbt = itemStack.hasItemMeta() ? itemStack.getItemMeta().getAsString() : "{}";
Item contents = new Item(stack.getType().getKey().toString(), stack.getAmount(), ItemTag.ofNbt(nbt));
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, contents));
Bukkit.spigot().broadcast(component);
That’s what choco said to use on the forums
You may need to use getAsComponentString in new versions? Not sure
@young knoll
I am not entirely sure but this feels a bit sussy
or do I tag green ppl
I don't fricking remember this
coll is fine to ping for that
?kick @rose thunder No advertising
Done. That felt good.
A for loop
You can't make O(1) crafting it's quite literally impossible
weeeeeeeeeeeeell you can make it O(1) at the cost of a bit of memory
Shaped recipes for example can be O(1)
shapeless recipes would require storing the permutations if you want O(1)
@inner mulch
Ye, have fun storing permutations of all possible dying recipes :D
i thought minecraft actually had some sort of hash table to do recipe lookups
that sounds like its possible
given it should only care about the material in most cases
and the slot ofc
you can hash the shaped recipes, and for shapeless recipes you can hash the combination of materials :P
I mean even with shaped recipes you have to consider all positions on the crafting grid
No you can't kekw what are you on about
you totally can
Okay let's say you use a hashing algo don't you still have to hash every item
While it's technically capped at 9 it does grow linearly
it doesn't if you hash all 9 items :^)
skipping some is an optimisation :thinksmart:
Does big O just ignore the actual hashing algorithm?
like a crafting grid is nothing but a Map from all 9 items -> one result (or, multiple, cuz remainder)
all big O concerns itself about is how a function responds to differently sized inputs
9 items are 9 items
rather, n items are n items
I mean if you ignore the possible growth of the amount of items you'd have to hash given an infinitely sized crafting table sure it's O(1) I suppose
Because 9 is a constant it's technically negligible
it'd be O(1) because 9 is a constant
if you have multiple crafting grids, 2x2, 3x3, 4x4 etc .... then each one would have its own map if you absolutely must have it for amortized O1
I mean valid sure ig 🤷 I just modeled it against some form of infinitely scaling table that could contain N items which is flawed because that's not really how it is
We've now explored why BigO kind of sucks as a notation for performance
Because O(1000000) is still O(1)
Yep!
it doesn't tell you how slow or fast something runs, it just tells you how it responds to differently sized inputs
crafting can totally be O1
My favorite sorting algo is O(N)
bogo sort
Stalin Sort>>>>>>
It is O(N) because it kindly eliminates every number that isn't already sorted
Many times the list sorts itself out of pure fear prior to Stalin sort even running
O(N) worst case when everyone is already in order
nvm
its O(1) best case because everyone else will run away after the first death
OS reassigns the memory locations to save it after the first element
O(1) is constant time, it can take 3 years every time but it is constant
Mine is O(1), it always assumes the list is sorted
Does anyone know how to fix gson not importing as a dependency in some versions of minecraft?
error: pastebin
i mean, that just wasn't a method in whatever gson version 1.17 used
so either don't depend on newer versions (depend on the lowest version you intend to run the plugin on), update the server, or just avoid using new methods
hmm k
bogosort 🔛🔝
Sleep sort is cool also
lucky sort is the best
bogo sort is always O(n) for the lucky ones
and all other sorts will get the best case scenario
Why is this sort taking so long? Oh we just got unlucky this time we got bogo sort instead of shell sort
Schrödinger Sort is my favourite sorting algorithm
O(random(log n))
(log n is the seed)
It's a ridiculous thing, but when I give op permission to 1 out of 100 people on the server, No one except the op can do anything, right clicking on the enderchest chest does not open, the enchantment table is still the same
But when we get op everything is normal
Warum
spawn protection I assume
Im making a server for me and my friends but i dont know anything about making plugins and i want to add custom stuff can anyone help?
How? What does this have to do with granting OP
OPs bypass spawn protection
All the ballot boxes open normally, but when you give op authority to even one person, no one can do anything.
Waa
oh wat
Where do we turn this off? I've never done anything like that
server.properties
Look now, 10 normal players can open chests without any problems and the enchantment table, but when I give op authority to one person, the remaining 9 people cannot do anything except op.
Download existing plugins
Wa
I would but i havnt found quite what i want
cannot do anything except op
what
wha
Then you'll have to pay someone
huh??
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
I COULDN'T FIND WHERE WE CLOSE IT
Nothing makes sense here 💀 Google translate moment
^^
Excuse me, but bitte where do we turn it off
"bitte" lol
spawn protection is in the server.properties spawn-protection
I removed exactly 78 plugins from the file and checked them one by one to fix them
Scheiße
why wouldn't you just remove half at a time
I have so much time that's why
sehr viel
By the way, isn't there a way to disable damage in the player's spawn area in Worldguard, so that if the player is burning in the fire, the spawn won't burn either?
I couldn't find
Hello, I dont find with which method has been replaced the method setEatSeconds from the FoodComponent
/**
* Sets the time in seconds it will take for this item to be eaten.
*
* @param eatSeconds new eat time
*/
void setEatSeconds(float eatSeconds);
Someone know ?
nothing rn I think ✨
Okay yeah I see, a new ConsumableComponent will probably arrive soon
Can't wait for consumable component!!!
I love eating lava
"I want help" but doesn't give the details on what he needs help with
Would recommend that you explained ur problem, and without a doubt someone will help you eventually
How do I prevent a player from burning if he is in a certain area? guys
water is generally effective against fire
does someone know why when i build the project with gradle (shadow jar) it does not have the polish letters (for example 'ą') also, when the message comes from config the letters are displayed correctly
i tried to fix it but i cant guess why it happens
must target utf-8 encoding
how can i make a totem pop by clicking on it?
Come let me water you
what bat
you have to set it in your build.gradle.kts
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
//options.release = 21
}
tasks.withType<Javadoc>().configureEach {
options.encoding = "UTF-8"
}
like explode
how can i use a totem with a PlayerInteractEvent
i'm not sure there's an API method for it
Guys guys
I'll make some adjustments for PvP
For example, reducing recoil during pvp.
What can I do for this? Should I code it myself or are there other methods?
Hey, is there a way I can retrieve from my spigot plugin all servers on my proxy ? using the channel or idk smth like this
?pmc
thx
Anyone know where I can find the spigot mappings?
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
Thanks