#help-development
1 messages · Page 975 of 1
You can alter the object if it has some methods for its altering
E.g. for itemstacks it could be setItemMeta
But if you reassign the variable you're just working with a new variable
i mean, how do i handle this like a pointer ```java
public static void foo(String s)
{
s = "LOL";
}
instead of reassigning it
String is immutable
you'd either have to use a StringBuilder (basically a mutable string), return a String, or pass an AtomicReference<String> and mutate that
then how do i change an Integer's value
theyre not immutable id assume
since the data size doesnt change
🤨
so every time i change the value of an integer what the interpreter does is releasing the 8 byte from the heap
and then re-allocate it
for the same size?
i strongly suggest you stop thinking of java as if it was c++
well i mainly know C++ and try to understand what java does
to work with it properly
and not just "by chance it works"
specifically, there is a local variable in the LVT (local vars table, it's an indexed table for local variables), method parameters are assigned to a local variable in the LVT, whatever you pass to the method at call site is copied to there, pass by value (for Object/references, the "pointer" is copied, not a deep copy), when you reassign a local variable, you are changing the value in that table, and when you reassign an Object/reference you are reassigning this "pointer" to the new object's "pointer"
C++ references are not a thing in Java so, unlearn that
yeah you can't really do much with pointers/references in java at all
unfortunately
what does jni mean
oh sorry i thought u were making some sorta abbreviation like btw
^^
im thinking to wrap sqlite with the jni but i dont really feel like using native code for a server
most providers hate that
just use jdbc?
thats based on dll and so files too
i've very rarely had a reason to do native bindings when working in java, unless i'm interfacing with win32/linux kernel that doesn't have an equivalent java api, or doing graphics programming etc
and it's likely you'll find yourself in the same situation
well i want to use serverless sql
for the most part
and jdbc is making use of its own native code to wrap sqlite in turn
and native code isnt really an option
it might not necessarily (depends specifically on the driver used), but jdbc is stable and standardized for all sql engines
i mean it did work i made it work but thats the thing host providers hate native code and block its execution
that is far from true lmao
what
bukkit already provides with the sqlite jdbc driver anyway
^ both mysql driver and sqlite
not sure why people implement their own
what i want
if you want orm like behaviour you can key a uuid and have a string datatype that's a json that got base64'd
i'm not saying to have just these 2
i have a project that has this + normal sql columns
it's just nice to store options in such a table
so just put everything in a json string and serialize that? xD
most dbs even have a json datatype nowadays
text is just text
Just make sure to sanitize it
ill sanitize you
plus it's too late, i don't wanna break compat now
why is java so cocky with converting unicode to byte array and back to a string?
some bytes are negative cause everything is signed
and then when i want to convert it back to a string the characters are broken
thats what i did
String str = "Hello World!好X";
byte[] arr = str.getBytes(StandardCharsets.UTF_8);
for (byte b : arr)
{
System.out.print(b + " ");
}
System.out.println(new String(arr, StandardCharsets.UTF_8));
``` output is ```txt
72 101 108 108 111 32 87 111 114 108 100 33 -27 -91 -67 88 Hello World!?X
but it probably makes sense
you don't wanna waste half of your values right?
you use them all
wdym
in java everything is signed
in java everything is signed yes
i think chars are maybe?
but bytes by nature are unsigned
sounds like you aren't compiling with utf8 encoding
wait
the fact that everything is signed doesn't matter here
yeah, sign is just another value in char context
iirc javac has a -encoding flag? you'd pass "UTF-8", I'm assuming you aren't using maven/gradle at this stage
im using maven but to debug im running the code without maven rn
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>
```ill compile it with maven sec
yeah that property should do it
although if you're using java 21 it should already use utf8 i think
still
Hello World!?X
72 101 108 108 111 32 87 111 114 108 100 33 -27 -91 -67 88 Hello World!?X
but maybe the terminal is ascii too
sec
i do
zsh + oh my zsh 🫀
changing it to utf8 changed the way its displayed
but its still poorly displayed
Hello World!ÕÑ¢X
whats the best way to store temporary data?
like
lets say im making a grapple hook and I just want to store stuff like if a player is currently grappling or not
pdc
map, object
or just a map ye
still pdc? isn't that slow?
just a map
map's are very fast if uuid is the key
ill try to redirect the default output pipe to a txt file, the windows text editor is by default able to interpret utf8 encoded strings properly xD
or any object can be fast if the key is hash efficient
cant be that hard to get the leading bits to work
you instantiate a hashmap
hash map
not a map
it's a hashmap
(quick tip)
ohh ok
?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! 🎉
because thats not a method
so anyways, the leading bit making the numeric representation of a byte negative should not affect the byte's integrity right?
did you confirm it wasnt a method first
in multibyte characters*
i double checked after
Are you asking chatgpt?
No I’m following an old tutorial
Player#ban
Should I change that into that
I don’t understand what u mean
guess what
it doesn't
MemeGPT
So, player.ban(true);?
and atomic operations since we are at it!
the only problem is when you perform math, print it as a byte
U woke up and chose violence 😭
nah, you should go learn the basics of java
Guess what
damn
I’m learning
do a course
no
like you've been told for a week now
im a language teacher
declaration: package: org.bukkit, interface: OfflinePlayer
synchronized
```🤣
i mean if you're down to pay an arm and a leg, hmu @polar forge
or maybe a toe
or a finger
up to you
For what
tutoring
I could give u my love <333
No
what the hell
concurrency in java is actually easy lol literally just smash synchronized before everything that you suspect will be accessed from multiple threads xD
har har har
folia ™️
I actually don’t understand the docs so, it’s not useful
huh?
what do you mean you don't understand the docs
ok If I wanted to do something like change velocity every tick what could I do
It doesn’t explain anything useful
it tells you there is a method called ban
and that it takes a string, a date and another string
the problem with this is that all thereads wait until the block completes
and explains what each of those parameters is
Yes, but where does it tell me how I would need to use it?
it still has to be small
ngl spigots javadocs is actually rather well maintained xD
do you know how to call a method on an object?
Thing = thing I guess
ooof
my man
wow
it's been a week
yea but my statement stands true, if u understand the general concept of concurrency java has one of the easiest implementations for it. not like C's atoms and the winapi's mutex
damn
Do u still remember me from last year?
When I got a time out for 1 week 😭
👀
👅
you have been told countless times to do a java course
you are clearly not learning this way
if you're able to sell your love to pay 10 bucks an hour, that's tutoring
yeah, i don't struggle with concurency in java, i like it infact
do a java course
I could give u 10 V bucks
calling a method is a very basic thing, you should know before you even start spigot
hookers
gotta say concurrency, serialization and design patterns are very easily realizeable in java which is one of the few reasons i start to favor it over C++ xD
you're a h||aha||
calling a method is literally day 1 of java class
ever heard of milking
in my class thats a week
Yes guys, continue with saying how easy it is
annotations are op for serialization
anyway
Java is easier than html (html is already easy)
i used to tutor my friends for free
back in the day
was kinda fun
if someone would genuinely pay id tutor
never tried to write my own tbh
it isn't too hard
The only issue is that you are comparing a markdown lang with a programming lang lol
erm, it's actually a markup language 🤓
tbh im thinking if i should write my own gui in swing or javafx for the server
superior to microsofts hahaha
since its so easy to synchronize it with the main thread
so many servers running in an environment where a java UI makes sense 
html is not even a deterministic language
true
is yaml a markdown langage
Root servers dont even support ui
no
But guys, could anyone tell me how I can do it? instead of setBanned
they told u 5x
Not true
have you ever called a method on an object?
player#ban
I guess
how have you done it?
Yes but how can I implement it?
ain't no way you're still going this is wild
We really did. You need the most basic of Java knowledge to understand what I wrote
YAML Ain't Markup Language
by implementing the player class?
If you make the mistake to install Windows or a linux server with gui it can. You're wasting resources then.
It’s already implemented?
so its a markdown language
doesnt yaml mean yaml is not a markup language xD
Don;t confuse him
Can anyone of u make an example so that I can understand it well?
🥄
object.method() ?
for the love of whatever god you pray to do target.ban() and be done with it
You got a target, which is a player. setBanned does not exist as a method of Player so use what i told you
It’s not spoonfeeding, it’s something called learning
object.method(param1, param2, param3)
your ass markup language = yaml
methods and parameters are LITERALLY day 1 of any java course
target.ban(true);?
i can assure you what comes out of it is pure code
calling a method is day 0 java learning, we shouldnt need to tell you
you've been hindering your own ability to do this for over a year apparently
target.ban(param1, param2, param3)
Well I learn it on day 12000, u got any problems?
tbh i hate saying "learn java" but you should learn how to read the javadocs you can dive through most of it
and spigots api is provided as source too
allowing to browse through everything
how it works to the core
Yea but, it’s not the same usage as I wrote, I wrote true
ask chatgpt
Why does it change to parameters?
theres no issue when you learn it, its just when you continue to not learn it, when we've told you for a week straight
im sure it will say something like 2 years
ask chatgpt
xD
I’ll learn it step by step
yes by doing a course
32.877
Wow very helpful
mf you on step 0 rn 😭
roughly equivalent to 32 years and 313 days.
is there an updated custom entities tutorial? the 1.18 one is out of date
Who told u so? Are u counting my steps?
get power toys run with the conversion plugin
Y'all learn calling methods? The first thing I did with Java is break an log and craft a crafting table
doing a single day of any course is gonna be more helpful than begging for a week how to call a method
it says nullable for all parameters, which means you can literally call ```java
player.ban();
\
no it's 32.876
what
he wants to know how to ban a player
im sorry english is not my main language
Bro can’t round off 😭
why would you make confident claims when you don't know how it works
why is there 2 emilies
we dating
Yes but what if I put a parameter? Does something change?
No its 32,876712
congrats
What do those parameters do
Send hewlp there's too many of them
wow
read teh javadoc for the method
this
read the javadoc
oh im so sorry that its not overloaded i better end my coding carrer
Do they print out in chat?
you can specify a custom message or it uses the default in spigot/bukkit.yml
for expires it lets you say when to unban them, eg null to ban forever or a date to ban them till them
I know, but we don’t have temp bans
source lets you say what banned them, eg console, a player etc etc
so pass null
which it is
use ur eyes and READ
but not what i thought
Yea by the player
Me
so pass your player name to the last param
I am convinced this man is blind and using a narrator thing to read it out
sender.getName() right?
sure
Correct way to do is
player.ban(null, null, null);
not
player.ban();
Ok nice
its not overloaded in the way i thought it is

it is implemented
That if I ban a player, it prints out in chat a message like sender.getName() + “Has Banned “ + target.getName()
How is that possible?
yeah
good question
Bukkit.broadcastMessage()
Thx <333
Yes but
How could u implement it
(╯°□°)╯︵ ┻━┻
Hmmm, good questions
you pass exactly what you want to send
Are you a cmarco alt
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! 🎉
literally a method call just like every other method you've ever called
Starting with plugins is not correct
is there a good tutorial for nms out
Seems to be like you skipped 10 steps
No you clearly aren't
wow
and now you're having problems
you are clearly not learning
Yes but how does the plugin know when I banned someone genius
this is kinda rest of the fucking owl me (aka how do I decompile? what does that mean?)
if you were, you would know how to call a method after a week
you should just leave this channel and kiss me instead
...
true
because you call the method
what do you expect me to say
Wdym?
#handholding wtf
woah
Open a thread
you are the one calling player.ban, you know when you banned a player
this channel is busy
Its almost as if calling Player#ban you ban the player and know it happened
thats absolutely crazy that happened
read through the source files, if youre bold enough you can decompile java class files back to source🤣 not that id ever endorse such a behavior
cuuuteee
Damn i used .ban and it actually banned the player
Crazy i didnt believe it would happen
Buildtools already does that for you
once again i dont really have a firm grasp what this means
?nms
@proven musk
ty!!
wait so in theory buildtools should've already done this for me
Yes
yeah
well yes and no
Buildtools will decompile for you
Guys, what do I write instead of reason if I want a reason section?
you pass a string of what you want the reason as
if you say how
You want a reason section but not a reason?
you pass 3 nulls
Why?
you replace the first null with the reason you want as a string
Like “You Have Been Banned For:”
pass a string using \n for new lines
you pass your reason string in the reason parameter yes
Player.ban("REASON HERE (Example: Hacking)", null, null)
🥄
nah, their variable isn't called Player
I just did what the javadoc say
there is no way they get this

They shouldnt do plugins if they dont know basic java anyway
what do you think weve been trying to get them to do
Why hacking? If it is greasing?
bro
Greafing?
I'm happy to read and listen to update stream later this week. 🫀
you pass whatever string you want
nah you need a different method if they are banned for griefing
okay now your going on the no help list
it can be anything
emily is lying actually
"banned for pooping in public"
Emily stop lying
it's player.banForGriefing() if its for griefing
Bruh
Its called Player.banForStealing() for stealing
please learn the basics @polar forge. Stop what your coding now and go right the way back to step one and learn
?basics
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
real
pretty sure this is trolling xD before i wasnt sure
✨Help development ✨
yea, I think we'd help with development
It isn’t?
we can't help you if you can't help yourself
What you are doing is using this as chatgpt
It's help development not do it for you development
#spoonfeeddevelopment
do a java tutorial. Ask here if you have questions about a specific java tutorial
don't start with plugins
You're confused because you skipped too much
and you're refusing to take a step back
this is not #learning-java channel, there are courses for that
I should start piping the problem to chat gpt and piping the answer back into this channel.
You can start plugins if you get to Manifest files, but until then dont start plugins

"bad", literally told you what methods to call
:c
aight, tired enough of trolls today. Time to do other things
family friendly
Learning from a java tutorial isn't bad, especially when you're writing Java
we are not here to teach java
@proven musk Change of topic, do you still need help with nms?
Help understanding, it sounds better to me
sorry people are clowning on you, but you should really know basic programming before you come here
yes lol
understanding what? how to call a method? that is teaching java
i should connect a chatgpt userbot to this channel
What do you need help with
guys, About nms i have a doubt, when I should be using them? I mean, in which cases is it useful?
im trying to find the screenshots
Understanding how to put Griefing and Hacking (since those are the rules of my server ) in the space of reason
1st hows that fair for legitimate questions and 2nd u gonna pay alot
I mean, in cases where there is no API for it
im def missing something but idk
or you need it at such high speeds that the extra work the API has to do is not acceptable
Could you give me an example? apart from npcs
The images you're looking at are quite old and won't work right on modern versions
Yea I mean, anything packet related that isn't in the API
that's not the case lol
i wish spigot would support custom and more importantly persistent pathfindergoals
As I said earlier open a thread and I can help you
Not spigot-api
this channel is busy
Well generally just, stick to the API if you can
hmm well thats been there forever
yeah, but the only that I have seen is npcs
makes your life a lot easier on minecraft updates
that's why i'm asking
idk how to do that but for a moment there was literally nothing else going on
Remove the "-api" for nms to work @proven musk
oh ok
I mean, spigots goal is to allow you to do everything you want without needing NMS
oh right lol
what about pathfindergoals🤨 i miss them for years
so to that degree, yea, great if you only need to use NMS for NPCs
oh, right, spigot does not have a goals api
📰
nor does vanilla
I'm not saying needing
i'm saying the options it have
Well technically…
vanilla does
Technically they do
as the API has almost anything
what?
You can inject new blocks into the registry
Ambiguous?
why are u doing ban(null, null, null) xd
ggwp, you need to translate them back
That’s what they told me to do
i would not call that "support in vanilla"
Well maybe the client should just sync them smh
cast
Sync all registries
the client really should 
Every single one
trolled xd

What should I write then?
disguise api should be a good addition for 1.20.5 🙂

That was an example for something else
I mean, what do you expect to happen if its null
supply the args as teh javadocs tell you. Not 3 null
the error is telling you what to do dude. If you have spigot questions then ask but this is a java question
Would spigot custom blocks be possible with the new "Compontents" in 1.20.4
no
1.20.5*
default, forever, default lol
but what if i have paper questions🐒
custom blocks aren't a thing unless the client can handle custom blocks defined on the server
?
read the doc
if you dont know how to look at a doc and figure out how to call a method then your question isn't for here
So either way a mod will be required until mojang codes it in?
I’m trying to add a reason thing there
yea pretty much
But how do I do it?
you can always "emulate" it
via e.g. the block states on noteblocks + resource packs
get the args and change the string with that
Item displays + custom item model ez
pass in a string bro we told you
yea. But real custom blocks will need mojang to support them
they are on their way there tho
I hope so
I’ve done that, but it tells me cannot resolve method ban(string string string)
?basics
Here are some links to get you started on learning Java:
- https://www.codecademy.com/learn/learn-java
- https://www.sololearn.com/learning/1068
- https://www.learnjavaonline.org/
- https://programmingbydoing.com/
- https://docs.oracle.com/javase/tutorial/java/index.html
The last one is the only official one, however some of those concepts assume that you already know a bit about programming.
Lynx has contacts with John Mojang
Just dont help this guy man
Dm him for all the leaks
yeah 1.20.5 is looking real promising
learn java first

prob stupid question but can(better say should) i outsource resource heavy tasks to an actual thread and start a bukkitrunnable awaiting the thread to reach its exit point?
CF woohooo
you can't give 3 strings lol
If only people would listen and look at java basics
what am I doing wrong 😅
did you run buildtools with --remapped
wait
What should I place in date?
buildtools copies its libs into the local maven repo right?
Yes
im so confused idk if im just dumb or if this tutorial is confusing
the duration 😭
hm? If you take it step by step it should work
Yeah the second parameter needs to be cast to one of the options.
There is no duration, it’s perma
Are you having troubles with running BuildTools?
-1 then i guess
Can’t I decide it with the command? Why should I write it here already?
No
or just read the docs
Read the docs
idk if -1 works
null = infinite
so then null
can we just ignore this guy at this point
Can anyone ping the docs?
?jd
?jd-s
...
a
this conversation will continue for a while which is why I recommended opening a thread
It's not the first time I've seen this happen sadly
whats actually the first class implementing Player?
CraftPlayer
ty
It's Craft + the interface
yea, didn't see that xd
for many things, so usually you start looking for that
not found?
Every class extends Object, but what does Object extend 🤔
Yes
It’s in craftbukkit
Yes
It's part of CraftBukkit which you get access to by depending on Spigot (and not just the API)
Same way you get nms access
nothing
wait do you need nms for custom entities
Guys last question
lmao
Depends on what you want to do with those entities
I feel like I shouldn't unless I need to actually use api methods
how do I create a new ItemFrame, which I can then place?
yeah avoid it when possible
I basically just want an arrow that has some extra special code it runs every tick
Just use a scheduler
How do u add a counter? Like Dude Has Been Banned By Dude! (1 bans)
Do you plan on modifying the item frame? or do you just want an item frame
isnt the only reason nms is so shit to use because microsoft wants to obfuscate their code as much as possible?
just create a file where you store the amounts of bans
No?
or a database
They literally give us mappings
do you need nms for that?
pdc
just an itemframe which i can teleport, etc, Im working on a furniture plugin.
but the naming has version numbers in it
thats what im asking
Minecraft is really nice for giving us mappings 🙂
i don't think so
Whats md? Markdown?
just an itemframe which i can teleport, etc, Im working on a furniture plugin.
world#spawnEntity
md_5
Entity type being ItemFrame
and that returns the class too?
Yes
i mean the original file names are just incrementing ascii chars... a.class, b.class
true, itemframe is an entity xd
at least when i last checked it
It does return the entity but keep track of the UUID
to prevent unexpected issues
but why if not to keep ppl out of the code by discouraging reverse engineering
Game is easier to hack without obfuscation
Legal reasons I believe
but u have mods for that
any one has clue how would I prevent this &id001
It also saves space
Not that the game is particularly big compared to like, COD but still
but then second item wont have degfault lore but will pull them off item 1
Depends on the obfuscation method
oh nice it created an anchor
Not sure how you manged that
Some obfuscation methods add useless functions so it actually uses more space
btw i heard rumors that the combat rework is the last update the java edition will get but did not find sources to confirm it? is there any truth to it or did some trolls just talk too much?
What combat rework
they also change what axes can be enchated with and iirc how dmg is calculated
Don’t think so
anyways is that the end of java updates or is it a lie?
How would I make it loop? I only know how to make it run once. Would I have to schedule the next one within the running one?
I don't see why it would be
When did they do that? I never heard of axe enchantments changing
runTaskTimer
and existing sword enchantments
oh slay ty
There are no new axe enchantments
cleaving?
New enchants are dor mace
That’s from the combat snapshot
how can i set its position?
imagine minecraft changing from java
Which was a long time ago
That would be the first argument
but its changing
Ew fandom wiki
Also, notice how it says combat snapshot 6 and not 1.20.5
yea
If you want to move it you can use the teleport method
mcLifePlayer.placing.itemFrame.teleport(event.getPlayer().getEyeLocation());
The combat snapshots are dead
I believe they’ve decided to just slowly implement stuff from them over time
will that work
?tas
meh
anyways as I said earlier keep track of the UUID instead of the entity instance
im the only one online so
ill do that later
it'll break and leak memory whenever that chunk is unloaded
btw are uuids truely unique or just unlikely to be occuring multiple times? xd
Depends on the UUID version
the chance of an asteroid hitting you on the head right now is higher than a UUID collision
hm
These UUIDs are mostly randomly-generated 36-character strings. Technically, a few characters from each string are generated from datetime values, but most of them are random or pseudo-random. See this paper for specific details. Because the generation is entirely random, they are extremely likely to be unique.
So date also determines, so yes they are unique
UUIDs are just 2 longs
Pretty sure minecraft uses uuid v4
but theres no table to track which uuids have been issued?
Which is fully random
It does
No?
Unless you save em yourself?
bros out here spawning 10^304 entities
so hypothetically they could have collisions
hey, if i send player message in "ServerConnectedEvent" (BungeeAPI)
it simply sends player message before join message
any event which triggers after server joining ? or in general i can use a different approach ?
just check if ones already in use if so regen it?
im just wondering if it is feasible to use uuids for non stackable items to prevent duping
hypothetically your server and the github server all your code is stored on blows up and dies
Apparently if you generate 1 billion UUIDs per second, you will get a collision after 86 years.
So you really shouldn't worry about it lol
Sure
its virtually impossible
You don’t even technically need UUIDs for that
just add a char to it
Just shove random bytes in the pdc
or that
Or just wait for 1.20.5 and set the stack size to 1
i would use pdc but with something that prevents my players going like "why did my stuff disappear"
Why are you always so excited for 1.20.5 :p
so id say items have to be exactly the same incl uuid to trigger
Because it has great new features
yea
Leaks?
like custom max stack size
tho then names are a problem
thats gonna be athing?
Yes
yeah but there is no API snapshots how can you tell what's new in the API
You can set an item to have a stack size between 1 and 99
didnt think my plugin would work first try
thats nice
it did
any idea ?
tho doesnt the game technically support -128 to +127?
PlayerJoinEvent?
Someone will probably add it
if not just use NMS
1.20.5 is coming out in a few days right
will it be available to use in spigot immediately? Or do we have to wait for an update
🤷♂️ the game supports it
asking about Bungee
?eta
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
and that's what matters
not Spigot API
ik that too many items could generate item stacks up to 127 back in 2011
please format local time on TAB
so we have to wait for spigot to update too
yes
not possible, its server side
Yeah item stacks can technically be up to 127
the user could define their timezone and it can then be calculated
But the game doesn’t render above 64 (99 soon)
great idea
or just let the user define +-12h from UTC
that would be manual, instead we can do just what olivo said. detect from the IP of player
how can i give ?
Then you need to include that in the privacy policy
I'm assuming you're just a user and not a developer. Move to #help-server
Minecraft already logs all ips and such
so it's nothing new really
Privacy Policy:
"We will be using your IP to determine the location you are at and calculate the local time accordingly"
Stack sizes below 0 are treated as air
wouldnt that be part of minecraft policy ?
that what i always wondered the GDPR is not coverered with minecraft servers
so technically all servers are illegal cause they store user data without consent by default
xD
at least in the EU
lmfao
Not all, there are some servers who actually have a privacy policy and ask for consent
Which is why larger servers like Cubecraft have GDPR popup when you first join
EU be whoppin ases of mc servers one day
i wrote my own too
and erase all data on leave
if not confirmed
but thats best i can do without modifying the server itself
Technically as an European i can ask for deletion of data at any server
as a european ur not even allowed to store it in the first place without expressed consent
Oooh free lawsuits
thats the problem
Free money
Yep I deleted all your data, honest. No need to look behind the curtain.
server still logs the IP of player even if they dont accept
Every server in the world is forced to save ips for govermental reason
So that the fbi can use information
the question is if its absolutely neccesseary to store the data without consent for normal operation like banned ips, but until theres a precidence case saying its cool for minecraft servers im rather careful what i do
Depends on how much they've modified it
You really cannot say without having access to their internals
well if all servers by default log ip, it would be part of minecraft's privacy policy
Btw when will the Randar exploit be patched in spigot??
You can disable ip logging now
how
Server.properties iirc
that would be absolutely wyld
tho i would still want to differentiate between someone who has agreed and someone who did not / refuse
then uuid ban them xD
EHHH
except for laywers lingering for free money
You may want to reconsider that statement
you sould like a child predator
Yea....
Ayo not like that
Bro
xD
wording 🙂
I meant in terms of ip logging in mc servers
"No one cares about consent", is the first thing i read, out of context, that sounded.... rather....
Dont use strawman fallacy on me
ikr
it was fun while it lastest but that statement also doesnt need to be exploited now common
💀
ok uhm how could I move a player to a position while still respecting collision?
is there an easy way
🙏
Velocity
You could check for another entity at the location?
blocks
Then do a raycast
if u want to stop
I want to maintain veloicty
Check if the player is being teleported into a solid
then u need to interpolate
a box cast
or thru
Take the players bounding box, move it to where you want to place them, and then check for collisions
simply check if player's location block and above it is not null
damn
yeah but thats not a perfect solution
I would need to make a whole goddamn custom physics system
no
I want to move the player to a location but if theres stuff in the way they will stop
i guess velocity is my best bet
So the entire path?
yes I said no before they asked that
You should just be able to use velo and launch them in the direction
but idk how to do that while perserving their original veloicty
you can loop through all locations between start and end location and check if theres a block
blocks have different collisions
You can check that
so like if its a slab player wont stop right ?
without a client side mod
you can make a list for such materials
headache mode
basically im trying to make a grappling hook lmao and if the player is further away from the hook than the original distance then they will be pulled into the distance
which probably wont work
since any server lag will make it super jank
Best to just use velocity for that
you can launch player with velocity
Believe that’s all Mojang did in the potato snapshot
Yea, just calculate the velo, and then launch em
it will handle collisions itself
mhmm
since its basically a bungee cord
probably have to settle for removing gravity and pulling them towards the point
are there any good spigot thread that are about procedual generating structres/caves?
if youre planning to update location constantly
it will look super laggy
yeah ill use velocity for that
but ill freeze their velocity when the hook hits
wdym?
basically the deep rock galactic grapple hook
No idea what that is sorry
basically they will jump, shoot the hook, and then move linearly towards the hook point and not swing
why not just add the velocity to existing velocity ?
Yea, use velo for that
they wont swing
I dont like how that feels
I will

