#help-development
1 messages Ā· Page 1974 of 1
good š
LOL
I think we need one big meteor this day to strike one place on earth
preferably striking people that want to while loop their list of uuids to prevent collision
not to big
Just move your server to the ukraine, Russia will handle that for you
you'd be actively implementing an O(n) loop to prevent something that would hit 50% possibility after 2.71 quintillion uuid creations
heh
bro why do you thnk im not sabotaging :d
Very interesting results for my Optional vs nullcheck benchmarks.
For single operations a simple null check is ever so slightly faster (~5%) but for
higher throughputs, optionals are somehow faster?
It might have to do something with the single Optional object that is used for every empty Optional...
I need to investigate that further with a more isolated benchmark and more jvm forks. But it clearly shows
that optionals are in no way inferior to null checks. Sadly i dont have any values on the memory consumption
and how much the GC would suffer with so many optionals but its probably nothing significant.
How would I get started with nms, I can't find any good web pages on it
because its not a topic thats supported directly by spigot but there are few threads u'll find on their forums
- You would want to avoid it at almost all costs
- Reverse engineer. Its not supported and undocumented.
or u can ask here and hope someone will not cry about nms because nms makes me cry
ā¹ļø
It does that to me as well
unobfuscated nms has less tears
Sounds daunting
yes
I guess I'll not do anything with that lol
Its more likely that a neutrino flips the wrong bit and makes your jvm crash before you generate colliding UUIDs. 128 bits are no joke.
in all honesty its not that bad but if ur not using unobfuscated nms w mojang mappings u'll have fun /s
i use it for some things, such as finding the shooter of a projectile
https://paste.md-5.net/yukihocayo.bash so last night i got this error and i tried to fix it with code i will show, but i ended up getting this error here: https://paste.md-5.net/nebaqawuna.css, code: https://paste.md-5.net/jenaxesaco.java
(Player) ((CraftLargeFireball) e.getEntity()).getHandle().shooter.getBukkitEntity();
thats for getting a fireball shooter
very usefl
npe?
what does npe mean
NullPointerException
Those are in most cases the easiest exceptions to fix...
bruh how
you read the code
you see what the null is from, track that all the way
and see if it can possibly be null
but... my array is not null.
i don't even get the character it occured on in the line
ItemStackSerializer.java:38
You are trying to serialize a null itemstack. Either dont do that or serialize it properly,
so i have no idea what else could cause it
return ConfigurationSerialization.deserializeObject((Map<String, ?>) map.put("==", ItemStack.class));
i have itemstacks loaded from a json
Holy... how did you butcher that serializer this much?
I would suggest you to just use spigots FileConfigurations.
but i can't access them since if i call a return in a loop i can't use the method
at the time of writing this is fixed
but it caused this problem
Is your backing file a json file or a yml file?
json
why
He uses that
yes but the file i am trying to deserialize has other data
First we need to figure out if this is a xy problem
oh
Why do you use json instead of yml?
two reasons: faster, and doesn't show my package names
yml shows package names??
- Not true
- Why would you want to hide them?
for me it says "== me.magnumsrt.magnificent menus at the top"
wat
He implemented the Serializable interface
o
i will use yml but i would like to get rid of the unnessecary package name
because i am fed up with json
Not if he uses spigots Serializable interface
he still can remove it
by removing it the same as any other text
Menus:
- !!me.magnumsrt.MagnificentMenus.Menu
menuitems:- ==: org.bukkit.inventory.ItemStack
type: REDSTONE_BLOCK
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: red
lore:- coolred
name: placeholder
size: 54
- coolred
- ==: org.bukkit.inventory.ItemStack
So you want to randomly destroy critical data?
when the brain commit die
o
it will autogenerate it
and u can remove it again, thats not the problem here
what 7smile7 said might be the problem though
how is it critical data though
so i say to the users, oh and every time you update the plugin go to the yml and manually remove the messy text?
No
do it with code
Ok you guys have fun fking up your data irreparably. Ill go get something to eat...
no
is the package in a fixed place
i litererally just put: config.set("Menus", MenuStorageUtil.menus);
Make Menu implement serializable
And then implement the serialize method and deserialize method to call a constructor that takes a Map which is made with the serialize method
Hi, is there a way I can get the texture of an item?
The main thing I want to do is get the color of the item, and translate it into a name, like #000000 -> "black"
No, a regular item
Can be anything, a dye, a sword, a pickaxe
People might have different resourcepacks installed. So you will have to chose for which textures you want to do this.
You need to loop over mojangs resources and compute the average color for all pixels.
You cant just do this on your server because it has not access to textures.
Rather write a separate java or python application that generates a yml or json file using the images from the minecraft client jar.
?paste a sec
?learnjava I am typing this for myself btw
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.
how do I "place" a block at a location
get the Block on that Location and set its type.
Location#getBlock()
Block#setType(Material)
here's an inefficient way of doing it, that i made by gathering stuff from google, so not sure if it works
on another note
according to you, it does work with the package removed
in Bukkit, when to use Block and when to use BlockState?
Can you please not encourage him to fk up his data?
I just told you guys that this is crucial information for deserialization.
Block -> Current state of a Block
BlockState -> A state of a block
Blocks represent an Object in the world that can have different states.
BlockStates are snapshots of that state. Usually you need BlockStates for
more specialized actions like filling Beehives or editing spawners.
For type specific actions like rotating Logs or Signs you would use the BlockData.
Yeah, BlockState/BlockData contains more specific metadata of a block
how can i concat a list into a string
Anyone know if there some reason I am missing on why child permissions in plugin-annotations is not repeatable?
with comma separators
I know that there is Arrays#toString, but that includes [ and ]
Use StringBuilder
At worst just go the
StringBuilder builder = new StringBuilder();
boolean first = true;
for (var obj : iterable) {
if (first) {
first = false;
} else {
builder.append(',');
}
builder.append(obj.toString());
}
String stringed = builder.toString();
route
its what Arrays#toString uses internally iirc
how can i get data from the config.yml and put it in an arraylist on enable?
String::join is a thing innit
so players do not lose their data
wdym get data
what sort of data
yes, however it must be a list of string
^
No
well not string only
an arraylist<Class>
Well, there aren't that many char sequences
i didnt ask how to create an arraylist
i said what type of data is ur "Data"
that was more descriptive
yep probably
arraylist<class>
bro
Oh no
arraylist<menu>
ic
You can
JSON > YAML
But jesus, it's stupid to have a List<Class> serialized
json sucks
oh u serialized it
Yaml is a superset of json
So any valid JSON is valid YAML
i can't even serialize fucking itemstacks
Theyāre for different things really
Thereās no objective superiority
yes
And as geolykt said
How did you serialize in the first place
Well, if you were to compare the two you can only come to the conclusion that yaml is better. It's parsers may suck however
At least yaml is just json with cluttered comments that donāt belong anywhere according the yaml specs
(Or that they are both good, forgot about that one)
elaborate?
using config.set("Menus", menus);
True. I do prefer JSON though as I find it easier to manage. Both can theoretically do the same. I'd say that the only thing that JSON doesn't have is comments and the only way of adding/ignoring them is by making your own parser that supports comments. For data storage I'd go for JSON, for settings and configuration I'd still go for JSON although YAML is equally just fine there
WallyTube itās basically a StringJoiner under the hood
But a static method that allows for basic joining of strings
can it join strings together with separators?
do i use config.get?
Does your menu implement config serializable?
Sure however generally speaking having your own parser with special support of certain semantics just make things a bit confusing but yeah
Yes
Thatās the point
(honestly, for arbitrary data I'd recommend well crafted flatfile formats that is totally not going to blow up at some point when something has to change)
Object object = config.getObject("path.path", Class.class);
Object obj = (Object) config.get("path.path");```
uh, don't copy & paste that however
Let's hope he understands it
I believe Jackson's JSON can parse it. Kinda wish Gson did
Can parse what?
parse JSON with comments
If you want comments, HOCON is the way to go
Sponge's configurate even has support for it
Oh well Gson can parse lenient json such as yaml
for instance
Itās just that itās extremely unorthodox
Because it goes away from the specs
ye
So it is bound to confusion
Anyhow I detest comment specs in yaml since theyāre detached from everything, in which parsers and such have to come with their very own ways of handling it
how would i put that in an array?
arrayLIST sorry
did you really just ask that?
yes
wdym
its declarative
you need an else
why
you always need a value
if(){};
^
you don't need an else in regular conditions
its declarative
replace Object
because its not flow control
what
I mean wally, ternary operator is a quick hand of if (blah) assign_value_1 else assign_value_2
how do i replace an object?
I have seen some ridiculous usages of it such as
x = condition ? y : x
nah its like doing
T get(boolean condition, T a, T b) {
if (condition) return a;
return b;
}
var val = get(..., ..., ...);
Nah
what does it compile to
because otherwise you wouldnt need the thrid part
it assumes that you assign something
what is that supposed to mean???
Yeah which just proves my point or what lol
What are you trying to do?
ArrayList<...> list = new ArrayList<>(Arrays.asList( obj ));
?
Even if a high level feature compiles down to some lower level feature the compiler and static analyzer might still perform additional semantic checks
hopefully thatās obvious to anyone
cannot infer type arguments for arraylist
replace ... with Object
wrong reply
What is the beam that appears when reviving the ender dragon?
if i understood correctly, you mean that a ? b : c is kind of the same as doing
var v;
if (a) {
v = b;
} else { // in which case you can easily exclude this
v = c;
}
oh
.
i guess well need to compile it to find out what it actually is
but how do i put it in my ArrayList<Menu>
Some languages allow you to just use inlined if/else as ternary fyi
Yeah true
menu = class
ternary is not exclusive to assignment and has limited value in java
i know
ternaries are a bit more intricate
cast it
@quaint mantle May I suggest learning Java first? These are Java related issues you're having, not Spigot/Bungeecord
if you are 100% sure that obj instanceof Menu then just cast it
Yes of course but generally speaking most people use it as in declarative assignments
It may need to be config serializable
Or well some concise yields
I do not know to what exactly they get compiled to, but I do know that they are not compiled to standard if-else statements as they are a bit more optimized (if you ignore JIT)
Probably
?help
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous names and nicknames of a member.
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
What is the beam that appears when reviving the ender dragon?
depends on the language and what they are being used for
If itād compile down to if-else thatād imply somewhat of an issue when concurrency comes into play
It is likely that we are talking about java here
You mean when the end crystals are being revived?
Cannot cast from ArrayList<ArrayList<Object>> to ArrayList<Menu>
yes
ArrayList<Object> object = new ArrayList<>(Arrays.asList(obj));
menus = (ArrayList<Menu>) new ArrayList<>(Arrays.asList(object));
Thatās a lot of array lists
@quaint mantle what are you trying to achieve?
I do not believe it has a name
getting an arraylist from config.yml and putting it into my arraylist<Class>
Do you have any idea?
Google search it but I don't think it's a particle imo
is Class java.lang.Class
How can I make it so that this wooden axe shows up as wand? In like pink bold letters. I know how to do chat formatting but idk about item formatting.
bro
class
a java class
oh wait
yes it is a class
what do you mean
Do you mean a custom model or a custom name?
Custom, name
Get the ItemMeta from your ItemStack. With the ItemMeta you can change things including the display name. At last, set the itemmeta back to the itemstack
hmm okay
I didn't see it on the list of entities or particles so I am not sure
I found this article that shows how to summon it
https://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/2136915-summon-beacon-beam
You know that shiny beam that the beacon emits that may or may not be radioactive..? Yeah, that thing. Does anyone know how to summon the beam with a command...
ty
If you are trying to have a beacon beam show up to everyone on your server, it wouldn't work because they are client side
.
so the person who made revautosell puts a license on it and also fully obfuscates it to the max š
he's given me a copy and I had to try and work out how the api worked and it's a mess
Yikes
F
Hopefully the api is still an api
one method is called IlIIIlIIllIlllIlIIIlIIlllIIlIllIIlIIllIIIlllIIlllIIIlIIIlIIllIlllIIllIllIIIlllIlIllIIIlllIIlllIlIIllIIIllIlIIlIlllIllIIlIIllIllIlIlIIlIIIllIIllIIlIllIIllIIlIIlllIllIIIllIlllIIllIlllIlIIlIllIIlllIIIllIlllIIIllIIlIIllIlllIIll
wth

:kek:
why make an api if its obfuscated tho
FOR FUCKS SAKE
fuck
Hi, im trying to convert this to a stream
but it isnt returning the hologram on the stream
but how can I make a beacon for the vanilla client? The link doesn't really gave me an answer
i'd reccoment remapping it in recaf then reobfuscated with specialsource
allMatch is probably not what you want
I don't think you can really spawn a real beacon bean but you can summon some particles in a certain way that looks like a beacon beam
thats all i know
are you actually interested in making a client mod to have it work?
@next stratus
I assume that he is just trying to make a beacon beam point at something on his server
Maybe just ask the dude to ship you a jar where it isnāt obfuscated and tell him to make it not obfuscated
Because he said that he wants it to work on Vanilla Client
At least api
that is likely, but if the beam is actually a client-side feature, a mod is likely the only way to make it work
That's facts
Beacon beams can only spawn from a beacon block and only go up vertically. This is done completely client-sided and there's no way for the server to manipulate that
what else should i use? I cant use a filter inside a filter
?paste
Object obj = config.get("Menus");
menus.add((Menu) obj);
https://paste.md-5.net/lojupavava.java i did it and i have no idea where it even happens
eh I want my plugin to work for people with the vanilla client
idk if it got optimized out
anyone know?
a mod is just a plugin for a client
I don't want people to download clients to use my plugin, but thanks
help
Did you out the pure bytecode also?
use 2 .filter() I suppose
how is menu defined
as a class
menus*
public static ArrayList<Menu> menus = new ArrayList<>();
public static ArrayList<Menu> menus = new ArrayList<>();
ArrayList<Menu> menus = new ArrayList<>();
Object obj = new Object();
menus.add((Menu) obj); works so
im doing it in a pure java application so i didnt do serializing shit u did
#help-server if this isnt coding
quick question i want to start making spigot plugins where do I get the spigot thing for intelij from?
Spigot thing? Do you want the dependency or the Minecraft Development plugin?
Also do you know java
let me send a screenshot im not entirely sure what its called
thanks this worked
i get this error when using your solution 2hex
However I do not
show me your code again
basically i need the spigot tab
^
Minecraft Development if so
ah ok
Object obj = config.get("Menus");
menus.add((Menu) obj);
is it just called "minecraft development"
yes
this?
Yes
ya
ty!
how does menus look like
I doubt that get will work very well
lol
that is not gonna work
lol
i think he just decompiled some random plugin by the look of the code lmao
that doesn't explain casting an ItemStack to a player
or the random gson
hey, i have an interface a developer can use to provide a custom implentation to manage power in my plugin. I have a method that decides on what channel (a string) should the energy flow for a machine, and i need to assign that id based on a factor the developer should decide. If he wants to make it player-based, the developer would need a player object in the method, but if he wants to make it location based, it would need a location
I think it's more like they typed "getDisplayName()" then intellij suggested to cast it to player
No
intellij will never do that
how could i make my interface flexible so it accomodates to a developer's needs?
eclipse would
eclipse has the dumbest casts sometimes
prob not but i never used it
i used it for a year or two
is has that method
before switching to intellij
it like defaults to cast to object
for anything
but tbh, this is so whack lol
I hate the Intellij MC plugin
ALWAYS if intelliJ crashes, it was the MC dev plugin
it hates you as well for using light mode
yeah no why light mode
eitherway it only happens for you mfn
@quaint mantle u have "
/**
*
*/
"
in ur code
i assume it had @author someAuthor
but u removed it
or did u make it
ur class has weird stuff tbh
?
i used eclipses suggestion and it put that there
thats a comment sir
for
yes
eitherway so u have smth similar to
ArrayList<Menu> menus = new ArrayList<>();
Object obj = ...;
menus.add((Menu) obj);
and ur eclipse screams about it?
if so, just change to intellij
an error in console?
That is going to error no matter what
yes
lmfao
This
^HAHA
storing objects in yaml š®āšØ
eclipse actualyl suggests to cast itemstack to player
LMAO
so my assumption was right
WHAT THE
bro i tried for a week straight to get json to work with itemstacks and i am at my wits end
i mean the code works for me magn
im on a pure java app though
but it should be the same
as ur trying to cast an object to a class, and adding it to an arraylist of the class
actually
it happens when spigot loads the plugin, i am using a test server from server.pro
idk if that has anything to do with it
it doesnt
java.lang.ClassCastException: java.util.ArrayList incompatible with me.magnumsrt.MagnificentMenus.Menu
it has something to do with the fact that you blindly click on "fix this" in eclipse and then think you can blindly cast things to make them work. A proper IDE wouldn't even suggest this "fix" because as you see, it doesn't fix anything
nah hes talking about something else
eitherway someone help him i brb
Bro please just use ObjectStreams
Theyāre prob much easier than storing objects as gsons
well he's still casting between their custom Menu object and an arraylist, and I guess it's because of eclipse suggested to do this
i will remove the cast but then eclipse freaks out
yeah
wait
it should freka out
yes
Well thereās ur problem
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.
menus.add((Menu) obj);
that's like saying "look at my cat" while pointing at your fridge
public static ArrayList<Menu> menus = new ArrayList<>();
a fridge is a cat if ur brave enough
this is the Menu class
it implements Listener and Serializable, but what a surprise - it does not extend ArrayList š
he didnt cast
bro it was that easy?
arraylist to menu
what?!
and no one told me
wdym
no
...
what
they did, in another class
do not fucking extend ArrayList
ok
no idea, just look at the error message
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.
there is no other way
peace this is making me lose brain cells
you didn't understand the basic concepts of objects
@quaint mantle are you modifying someone elseās plug-in or did you make this on your own?
yeah š¤¦āāļø
you can cast a Cat to a Pet or a Pet to a Cat if it actually is a Cat, but you cannot cast a Spaceshuttle to a Human...
everything is a human if ur brave enough
on my own and for the menu i took reference from this: https://bukkit.org/threads/icon-menu.108342/ (WHICH WAS CONFIRMED TO BE USABLE IN PLUGINS)
do you see any random casts in there? I don't
So you are using other peopleās code
Itās literally a copy paste of what they have
if they allow it, i assume its fine
Yeah but he should atleast understand what heās copy pasting
Not sure why you're using code from 2012 though.
yeah that's why I keep insisting them to read the ?learnjava docs but I get ignored :<
tbh they are using 1.8 which is almost equally old
not sure if someone mentioned it, but why don't you deserialize it?
i tried
he is
oh i thought u were trying to store its aspects one by one
like the name, amount, etc
@quaint mantle bro please just use ObjectStreams to serialize if you canāt get json to work
no, i am done with json
error after error
lombok adds extension methods right
i am done with plugin development as well, this is just unenjoyable
What
that's not how it works sir
ObjectStream arenāt readable by the human eye but is the easiest and simplest way way to save data into a file
well i will make it work, i have been working on this MENU PLUGIN for a month straight
dont think so
i got screamed at to learn java like shit on my first days i still didnt just give up
im nowhere great but i still try to learn
if it does, it's an experimental feature
@ExtensionMethod or smth
tf
what is the plugin about
yeah just checked, it's an experimental feature with current status "hold", so it'll be in stable soon
kotlin extension methods in java woo
opening and saving an inventory basically, i was going to make it really cool and have a lot of features
Are we still talking about the gson serialization?
u wanna save an inventory
?
you can easily serialize a whole inventory in like 5 lines
gosh... ill add the 2 lines to make your damn serializer null safe. -.-
config.set("inventory.inventory1", inventory);
no
don't trouble yourself
i am fucking done
you never tried learning forge on your first days of learning java didn't you š
and on 1.8.9
and on a crappy pc
an amazing experience
@quaint mantle so youāre trying to make a plug-in to add a gui in the form of an inventory?
Where you can click different items to run commands or something?
I wanna make a pokemon plugin tbh
Forge 1.8.9 is suicide
There is no softer word to put it
prob needs nbt
no documentation but ye
ive made some forge mods before on 1.8.9
Did someone know good tutorial about saving hashMaps into a file or maybe can explain this for me, thanks.
check out a mod called
SkyblockAddons
and NotEnoughUpdates
theyre so fucking big
done on forge 1.8.9
Look up CodedRed, heās got a video on that
i don't really understand him video(lol i'm dump?)
You simply iterate over the map and write the key-value pairs in the FileConfiguration.
Yeah he knows his stuff
for nms
he's just writing code and saying "yes this is saving data into file like this" or sth
Storing in what way?
The video stores it in YML
What hashmap data types r u using
Depends. If you just need to use a single field or method which is
rarely used then you can sometimes get away with reflections.
But modules are superior in almost any way. The only benefit that
reflections have is that it will maybe be compatible with the next version.
If itās not serializable by yaml then you have to serialize in a different way
ic
wait, does the bukkit plugin loader support haxe?
String to Mafia
a language i am very good in
What?
i created this class
No what Data types for the hashmap are you using
String as key, Mafia as value
?
What do you mean with haxe?
If Mafia implements Serializable then you can literally call set(String, Object) with the Object being the map
haxe, it is a cross platform language that has a java compiler
coding language
Haxe is an open source high-level cross-platform programming language and compiler that can produce applications and source code, for many different computing platforms from one code-base. It is free and open-source software, released under the MIT License
i don't know how could i check it?
In ur Mafia class just make it implement Serializable
okay i got it
imagine coding plugins in fucking javascript
lmaooooooo
that would be funny
thats like using your own OS
Serializing through yml wonāt make ur mafia class readable but the string key value will be
ur living alone
wait, i need to save HashMap not class
fuck.
anyway it wasn't gonna be a good plugin anyway lmfaoo
For configs it is good
i'm new to spigot
Honestly Iād just use ObjectStreams
do u mind if i take the idea
I wanna make
Much simpler to save data to
a photocopier
being new to java or spigot is like walking into a burning building dude
Only if youāre not prepared to learn in the right ways
If you try to sprint before you can walk youāll fall
i might make bedrock plugins instead
since i actually know c++
Oh god bedrock is such a shit mc version
a way to like
yeah
bedrock is bad
but its my only option
thank you captain obvious
you are welcome
u will end up coming back magnumsrt
why do you guys say learning java is bad though
it is
nah bro im going back to making fnf mods
Itās not
something i was good at
its pain in the beginning ig
lol
learn assembly smh
learn writing bytecode
Learn writing binary
write machine code
it's not that painful in the beginning though
farewell
write binary
Java compared to other languages is complex in the beginning but makes life so much easier in the long run
learn Fortran
nnah
cobol :troll:
c++ š
Like serialization objects in Java is so much easier in Java than C++
GUIs are a lot easier in Java than c++
java is living as a doctor or such
guis in c# lol
You make money
but not as much responsibilities as c++
but ur code slower than some other languages
GUIs in c# are not too bad with WPF but JavaFX scene builder is unmatched
once said
It was me, Iām the wise man
will you say it again
Java best.
any with weak typing
C
:))
Skript
Learning C was annoying as fuck
c++ is better than c
Either C or React
why would u even learn c
bf
arduino š
I had to learn it cause I was helping a friend in college
make piezo go boop
can u make arduino move an object
i wanna make a machine that hits my father's tv
Any language that isnāt OO can suck my nuts
so it works
thats not built into most of them
you'll have to do that yourself š¤·
š„š
what are some advanced topics in java
C++ isnāt bad though, I just havenāt done much w it
Some GUI stuff can get pretty advanced
my list now:
the executor api, java's module system, ClassLoaders and annotation processing api
tommorow
or someday
ill annoy a bunch of you with these topics
so get ready to block me
lul
I tried learning it and it made me wanna die
shoutout to 7smile and frost tbh
Itās not that complicated but I just couldnāt get my head wrapped around it
There used to be another person who was as informative as uninformative from time to time but is now banned afaik
Who was it lol
btw
all names in caps.
what is considered static aboose
public static Mother YourMother = new Father();
what the actual fu-
that hurt my brain
Anyways
hm?
they do abuse
idk set the entitydata?
but like wtf?
Some people think that even typing static is abuse
the person using his password as his account name and the account name as his password
at times
y
most of the times
His humor was dark and offensive (racist)
converting seconds -> ticks is sec * 1000L * 20L, right? or is it 20sec/tick?
oh stupid question
20tick/s
20 * seconds
20 ticks a second
haha get rekt slow typers
lol
140WPM fight me
FOOL
188wpm
imagine sugar cane just isntantly growing back
B)
on my broken keyboard tho
200 wpm if the word is "a"
which was way bigger than the one i use rn
i kinda found him funny
I did
damn!
anyways, anyone knows how to copy an entity completely
well he does arrive with new alts just every so often, I ges informed about it from some people from time to time
cring

coming with alts is just sad imo
when i was banned i didnt go to that low level of desperation
Why were you banned
Half of the fun was seeing how long before he got banned
For 'trolling'
myes Elgar, we got a bit stricter after a while
it was related to you redempt, but i dont rememeber how
nah, it was usually for being offensive
either way idrc anymore
yeah, I mean at some point trolls would get banned 
lol
conclure do u wanna know it
I know it alr prob
keep it for yourself
š
and for ur info it isnt racist
hlw
does Entity implement serializable
nope
fuck how do i serialize it then
I am trying to copy attributes from one item to another
ItemStack n = new ItemStack(Material.NETHERITE_HELMET);
ItemStack item = p.getInventory().getItemInMainHand();
ItemMeta meta = item.getItemMeta();
meta.setAttributeModifiers(n.getItemMeta().getAttributeModifiers());
item.setItemMeta(meta);```
but is not working am I doing something wrong ?
How would I get the values in the number pools? Currently using a for loop, but stuck at accessing it.
uh, use mojangs datafixerupper thingy
wat
how to use it tho
i have no idea
i just saw their github
it doesnt look informative
hmm idk if there are any good tutorials now speaking of which
^
that is the plugin config btw
cant i use Kryo
you can get all keys from a ConfigurationSection
var poolSection = config.getConfigurationSection("pool");
for (String key : poolSection.getKeys(false)) {
var underSection = poolSection.getConfigurationSection(key);
}
or sth
iirc
also be aware its nullable (getConfigurationSection)
so might have to check for null
7smile wdyt
thx
What could be an easy way to add some artificial knocback whenever someone is hit with a fishing rod?
Just set their velocity somehow?
I guess that'd work yeah nvm
Hi !
Do you know why the entity "phantom" are called "zombie" in the EntityTargetEvent event ?
When I get attacked by a phantom and then I do event.getEntity().getName() the phantom name is "zombie"
Is it a bug or may be I do something wrong ?
I'd avoid #getName
gg
anyone know what is wrong with it i can't pick up the result
https://srcb.in/U86vTKOsJL
i accidentally included all my dependencies and now my plugin is 7mb lol
Thanks for your reply
So, what do you recommend me to use ?
I tried #getType but it give me "Spider" x)
Also, do you know what the EntityTargetEvent is?
It's when a mob start chasing you no ?
Yeah, it seems that you confuse EntityTargetEvent with EntityDamageEntityEvent
Or stops chasing you or any other mob
You might want to print the target reason alongside the entity type
It is possible that it falls back to
/**
* When the entity has no target, so the entity randomly chooses one.
*/
RANDOM_TARGET
but I have never used this event so I can only speculate
Oh didn't know that is also when it stops x)
I didn't think about the reason, I will try it, thanks for your help š
hey when i try to run my plugin i made it says Please use your plugin's logger instead (JavaPlugin#getLogger).
how do i fix it?
thats a Paper error
Is there a way to put the first variable into the ChatColor?
Not fixable in a way that you cannot disable a feature, but do not use System.out.println() or System.err.println()
btw after setting up build tools and stuff for nms
i think its because i made a paper server but a spigot plugin
do i remove my spigot-api and replace it with spigot or do i have both
No, it's because you use System.out or System.err somewhere
You need to use your plugin's logger at all times. This is for good reason
geol u changed ur pfp?
Yes
bruh it looks different to my eyes
Eclipse is out of fashion, time to embrace ukranian recaf
eclipse identified u tbh
Java development software pfp fetish
politics bad
yeah literally talking to the eclipse ide. This legacy developer who cares about any byte in his code
Jk
the ide that suggests casting an itemstack to player when invoking ItemStack#getDisplayName()
You have to replace it
Technically you can have both, but this is not really needed as spigot is a superset of spigot-api
Its been a few hours: Anyone else know if there some reason why child permissions in plugin-annotations is not repeatable?
where
in my pc
jdk1777
in your main path? windows or linux?
system->advanced
then you are specifying it to - btw what is "its"?
How does custom model data works?
buildtools
In spigot
Itās just an int
ItemMeta#setCustomModelData
what are you using to call your buildsystem?
you can use it for resourcepacks
Thank you
java -jar BuildTools.jar --rev 1.16.5
C:\Program Files\Java\jdk1.8.0_291\bin\java -jar BuildTools.jar --rev 1.16.5