#help-development
1 messages · Page 2077 of 1
i hate web 3 because of these people, dont even wnat to learn it
they think tis gonna revolutionlize the web
i use web -1
and then web2 will be of no use
"OG in the game"
web 3 won't be used
im rly pissed about my spigot name
you can change it
cD
my real user is Burchard36 but i made a typo when creating my spigot profile
so now its eternally 37
u could change it
what did you do with Burchard35?
i slaughtered 0-35
with my bear fists
bare*
i could but im broke
unless
hes a werebear
maow furry confirmed
zack too
ngl
YEAH THIS WAS CONFIRMED LIKE, A YEAR AGO
i need me a cat girl cat dev as a gf
eh
catgirls don't count as furries
also catgirls are overrated anyway
catboys on the other hand...
a lil overrated but great
i would be a catboy for a cat girl cat dev gf
cat furries are cool though cuz they can purr and it's not weird cuz they're not like, 50% human :)
but is she a dev
great point
probably just a twitch thot tbh
tbhhhhhhh devs are just a different kind of species lmao
just fyi you can pay to rent a human as a furry....anyways
i only specified cat girl cat dev
Most software devs are furries
dont care about the twitch thot part
lol
no no furries
just need to wear the cat ears
and were chillin
no tail bullshit
I am just pointing out renting humans is still a thing
//Method 1
class MyClass {
private Something var;
public MyClass(Consumer<Something> func) {
loop {
func.accept(var);
}
}
}
new MyClass(func -> {//my code});
//Method 2
class MyClass {
private Something var;
public MyClass() {
}
}
new MyClass{
@override
public MyClass() {
//my code
}
}```
What are the pros/cons of each of these approaches?
why did you write it like this
who hurt you
xd
that is functional programming style
method one looks like your trying to replicate functional interfaces
kotlin shouldn't be written like that
Ok excuse me what the fuck is loop
and second is OOP?
kotlin
That's Kotlin???
kotlin is cool
it loops
nah it was just meant to be a generic loop
not meant to be kotlin
I just cba to do a while or smmin
No I know what Kotlin is like
there's also a virtual thread thing in kotlin
I code in it once a blue moon
lmao
But that looked nothing like Kotlin
looked closer to fuckin' uhh
Dart
cuz of @override
that lowercase o huts my brain
bro kotlin uses a keyword for override
not even annotations xD
WTF
yep
override fun onEnable() {
}
Honestly it makes sense though :p
ye
oh thaats fine
yeah
but @override as a keyword why
just use lolcode
C# does it like that too actually
You say this but...
@noble lantern you would like lolcode
override fun with depressions
@interface
lmao
can anyone answer my question 🤔
I'm struggling to figure out when to use which method
I like all of them lmao
lemme good it
or should I be doing something else
method 3 is useful when you don't want 4k classes of custom components
method 2 is the opposite
which is method 3?
method 1 i am questioning reality
you should look into Functional Interface classes for method 1 but idk maybe kotlin handles it different
check your comments
it's not kotlinnn
there's only 2
maybe we should worry when there is a method 5
im doing a forum post on functional interfaces, ill link you when its done
its really neat
and looks similar to method one in a sense
method1 i don't understand it alot
check out lolcode yet?
why do you have an image there??????
sec
i hate that i can tell the anime its from
why not!?!!?
ultra instinct goku
Ok how about i give the specific example I'm dealing with then
because its weir dlooking at that
sure
sec ill show my full ide ike
its lit
there's my code, it makes a custom projectile
I want to be able to change this
its been so long since ive seen an ide without a picture
so in this case I think it makes sense to take a predicate in the constructor
my IDE is lightmode
you monster
my ide is deep ocean from material theme
and font size 24
but I also want to be able to change what particles are summoned
my friends say its literally vsc
then
do that?
never been much of a DBZ fan
i like to torture myself
i use One Dark personally
yes but do I do by making a new class each time and overriding
yeah ig
i love it, only anime i watch
however Majin Buu is probably my favorite character in DBZ
which form
or do I do it by taking a consumer as a parameter?
kid buu, super buu, evil buu, or good buu
and then between instances I can just pass in a different consumer to change what particle is spawned
good buu
why not just make it take a ParticleEffect argument
as 90% of the code is the same
cause what I want to change the count?
yeah i love good buu especially in the new anime
particle summoning takes more than just a particle effect
agree in case of #961533327435788348
so couldnt you just make a class with a constructor that takes in all needed data to spawn particles?
with nullable args
that would result in a huge constructor
multiple constructors
just do if(arg==null) arg = value; ?
functional interfaces
oh you mean parameter overload
exactly
if null & isNeeded
tbh
its a preferance thing
i myself would create a functional interface way of doing it
its just more readable to the developer(s)
mkay
cough cough 'self explanatory' cough cough
on that topic
well whats more readable
how do you generate those github javadocs?
github javadocs?
new MyParticle(Particle.THING, 0.5D, new Location(stuff), Color.SHIT, More.SHIT, EvenMoreShit.NULL);
// or
new MyParticle()
.setParticleType(Particle.THING)
.setLocation(new Location(shit));
builder pattern is pog
this way you dont need to have 20 million nulls in a constructor if its not needed
indeed
and only call functions if that specified data is needed
this shit
[][][] go brrrt
just use the maven javadoc plugin in the pom
the what now
THE JAVADOC PLUGIN
someone didnt write the spigot javadocs
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<!-- <additionalOptions>-->
<!-- <additionalOption>-Xdoclint:none</additionalOption>-->
<!-- </additionalOptions>-->
<links>
<link>https://hub.spigotmc.org/javadocs/bukkit/</link>
<link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
<link>https://javadoc.io/doc/org.yaml/snakeyaml/1.30/</link>
<!--<link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link>-->
</links>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
my whole lifes been a lie
you really thought someone wrote these?
damn right
would've been a nolifer
spigot community has plenty of those
lol
i mean idc if im getting paid for it
I wonder how many other people think someone wrote them XD
technically they did
yes and no
well someone did write them. they just didn't also put it into some html files etc
dont forget the designs
and links to other classes and methods
huh...
Anyways, on a different topic... I'm using a class and a method within sorely to forward events to their proper EventHandler classes (for example interaction with specific blocks to classes which handle everything resulting from that). Should I make that method static in that case?
(Also someone explain static abuse if possible...)
If I build 1.18.1 with build tools, is the source code of craftbuikkit already de-obfuscated or do I need to use a flag?
everything should be static that doesn't need any instance methods / fields
if you don't know what static abuse is, probably should stay away from the statics 🙂
make it static if its not bound to the instance and stands in a global context
i have no idea why people always piss into their hotpants when they see "static" somewhere
static abuse would be making everything static to get access to a variable without adding say proper gettings and shit
ask two people and you get three answers lol
tbh
its a preferance thing but sometimes static is harmful
noted
sonarlint always cries at me "hey, this fucker could be static"
so i make it static
easy as that
static is harmful because of all things in Java, static can't be GC'ed
^
just read the TL;DR part at the bottom lol
everything temporary (fields inside methods) only exist for the duration that method is executed in unless they're declared outside, correct?
or you hold a referance to it
even if static?
no
it exists until the garbage collector killed it
nah it's values in values out, no references
statics are permanent, they never go away even if the class isn't fully loaded
then what alex says ^
but it does get GC'd
the reference to the variables is gone if your method ends and the scope closes if you dont hold it somewhere else
just sometimes not instantly
yea well most of my code looks a lot like spawnEntityAt(location, entity); World world = entity.getWorld()
they do go away when the respective classloader is GCed
yes
I believe reflection classes also stop it from being gc'd
to a point yes, but I mean depends which classloader you are talking about lol
or nah?
the overlying classloader of the class as the JLS states
well what I meant is, there comes a point
where for the classloader to be gc'ed the application needs to be closed
a Child class shouldnt implement Comparable :(
A Child class will implement Dead in a future version
lol
Why tagging me and them deleting them=
i just made a wallpaper out of this
kinda dramatic but yea]
:(
that's the funniest programming thing i ever seen in my whole life
hey, short question: is it somehow possible to make for example a zombie attacking an other zombie or other mobs?
declaration: package: org.bukkit.entity, interface: LivingEntity
not sure how much simpler it needs to be
or if that requires a tutorial
no, only the events
What is the better way to make a multi-version plugin using Maven? (1.8 - 1.18)
modules
use 1.8 spigot api
it will work for everything above it
or modules
but idk if i wanna use modules for smth other than nms
Don't
yep, only useful if you are using NMS or disabling parts depending on version
modules are good
what?
Because most configs keeps using 1.8 server version
just use 1.8 everything else will work
Their problem
if you are creating a NEW plugin make it 1.16+
oh the old software is 1.8 i get it now
thought that was a maven dig
I always support latest and pre latest
Psst eco enchants has 2k+ buyers with 1.17 and 1.18 only support
yeah, but so many configurators of minigames servers keeps using 1.8 server version
it couldve had more if it supported all versions
It is what it is
more work for more money? Sure
But new API should work on 1.14+
I think ill try modularisation
Can u even use java 17 on 1.8?
tu est francais?
nop
Yes
I think most of the multi-version plugins uses Java 8, 1.17 and 1.18 supports Java 8 PLUGINS yet.
1.8 didn’t have the java version check
Well then you must use X material or some other library
@quaint mantle I think it's deprecated
i was to use all XLibraries (that ill use)
thanks u all guys, ill try to study modularisation o-o
Talking about that, I don't like it in maven
Wait, if i make a 1.18 plugin, it keeps working in 1.8 if i specify in plugin.yml and dont make a error in code?
In many ways no
But that same situation but instead being 1.18 plugin, being 1.8 plugin?
a baguette is so tasty tho
baguettes are dry after a day
which makes them not more edible
une baguette avec fromage est le rêve du tout les francais
Usually when you want to add multi version support you code on the latest api
c'est plus delicious que ta mere la derniere nuit
I don't mind natural multi version
Without workarounds and shit
1.8 API doesn't even have titles
non
And boss bars I believe
il a ca
btw
to say 'it haas that' in french
u can say
ca a ca
is there a way to have just the command without /pluginprefix: using https://github.com/aikar/commands/
Wow that's crazy hex
I think plugin.yml does it
Oh and did I mention you no longer need to use plugin.yml to define commands?
All commands registered with ACF are 100% programmatic. No plugin.yml definitions needed.```
I have been bamboozled
You can also filter it on tab event
so I still need to add them to plugin.yml?
Na
non, tu peux faire ca en faisant avoir une vie
Dude
I set up commands so I don't have to add them to my plugin yaml it's so annoying lol
wtf am i seeing
Stop speaking Harry Potter
oo command stuff
tmrw ill be posting a tutorial for functional interface command registration 
tu regarde ta mere
I just have a switch that had all commands
ok i should stop
oh no
it aint
you should have a hashmap
Making each command a different class is overcomplicating
so just make a new object for commands like one above
Yk what fuck it ima use else ifs

then u handle all commands and then do commands.get(cmd).apply(args, sender);
I don't like having a milion libs for stuff I can do anyway without them
BiConsumers
the way i said it
Idk what tf that is
Functional Interfaces
functional interface
I like word functions
been around a while
Because I hate oop
doing what hex said or the screenshot above isnt too complicated
this
yea
Looks like quite a lot of bulk to fit into a functional interface.
I have something similiar like that lol
its not too long beileve it or not
It's a mess but it helps me
i think my way is cooler
its barely 50 lines of code and 5 classes
instead of reinventing the wheel
Yeah but you're going to need a class for the command handling anyways so you're not really saving on much. If you don't the class with all this will be huge
What's your way?
Reflection™️
not realy meant to save on anything, its more or less to just make the overall creating of commands really fast and easy
the class for handling the command is small
yeah reflection is my favorite way of registering commands/listeners
it’s really annoying otherwise
I'm talking more about when your command has a lot of code in it having it's own class is better. Rather than trying to register them all in one giant file.
dam, that is some cool shit
Dangerous as hell though
ApiLib.registerCommand(new ApiCommand());
and have the class for the command with constructor needing any data you need
call registerCommand in the constructor of said class
use reflection to call the constrctor of said class if you want to not call a bunch of new Classes()
I'm just saying if you have a bunch of commands with code in them where ever you're declaring these you're going to have a very long file and it'll be harder to read.
maybe im understanding this wrong
could you explain a little more about that please?
You wouldn't put every command in one class
^
Then what's the point lol
This is how i use the lib i currently have, each command has its own class
The whole point of functional interfaces is to avoid having more classes
That seems like more work than it's worth imo
yeah
Beautiful background
No it does not
https://github.com/Burchard36/BurchAPI/tree/main/src/main/java/com/burchard36/command
Not a lot of work to create something like i made above tbh
dragon testicles tbf
probably a preferance thing but, i have really enjoyed using this over the past few months
thanks :))
Mine's pretty simple too. Although way more dangerous
https://github.com/MikeTheShadow/AutoRegisterLib/tree/master/src/main/java/com/miketheshadow/autoregister
the only thing kind of weird about using annotations for things is that class loading is annoying
but otherwise it’s really cool
tbf, its all up to preferance for how people want to handle theyre commands
theres probably over 20+ different ways to handle commands
Cause you just use an annotation like so and all you have to do is create the class and annotate it and it auto registers it entirely. https://github.com/MikeTheShadow/AutoRegisterLib/blob/master/src/main/java/com/miketheshadow/autoregister/annotations/RegisterFullCommand.java
sussy
shout out to melvin
might yoink your annotation for my api no lie
jkjk
I mean annotations are pretty good for auto registration
yeah tbh i do like that feature
i would just make a utils class containing stateless methods and use them in a HashMap<String, BiConsumer<CommandSender, List<String>>>
because calling registerCommand is pretty redundant
I've never understood how your supposed to parse annotations at runtime
Ik you do it with reflection but was never sure where to make those calls at
if it works it works 🙂
Well you need to figure out how you're going to load the classes that haven't been loaded yet
only time we should flame someones command registration
Cause otherwise you'll still have to call them
is if they use 300 lines of if else lmfao
I just read through the jar file and find all the classes within the users package. It's not the best way but it's extremely lightweight
My lib only uses built in stuff. So no external libraries. Some people complained I was using large reflection libraries so I spent 8h figuring out the best way to load all classes without using one.
ahh nice 🙂
for my tinkers port i wanted to auto register blocks extending a class so i just imported org.reflections for the ability to search through the package for blocks lmao
couldnt be bothered with doing it all myself
how do you set the background to an image??
Yeah but it's a heavy lib and people complain about it
thats kidna cool
Couldnt i just use that one feature that wont shade in the unused parts of the lib
i forgot its name
sec
ah thanks
See the issue with it (I read through a lot of their code to figure it out which didn't work for me) is that they use external libs like bytebuddy and javassist to read the jar file. So those are also included and it weighs it down regardless
i see
Goku 👌
so im better off learning how to just scan a package myself and getting it that way
i really liked how short and simple this was tbh
That's what I did. Yeah it's easy but it's also heavy. So it's a trade off more or less
yeah i just compiled my jar and didnt even realize its 1mb already lmao
and it doesnt even have any heavy code added on my end yet
maybe i can yoink code from there project
and hope it doesnt use any external shit for that
i know its very doable with normal reflection but any solutions i found online were janky lmao
felt like people were way over complicating it but maybe they werent
:))
so weird i send my ide in here and different times of the day lead to different responses
i either get people saying oh thats neat
or
"wheres the code i cant read that shit"
Well I mean mine is janky but it seems to work https://github.com/MikeTheShadow/AutoRegisterLib/blob/master/src/main/java/com/miketheshadow/autoregister/util/ReflectionBase.java#L39#L88
Just stream the jar file and read all the .class files and their locations
damn so ide have stream a jar no matter what
alrighty ill have to look into this tmrw
maybe i can implement this into BurchAPI too somehow before i post my spigot thread
and remove some overhead from it like the registerCommand bit
as i find that the only real annoyance of it all
Well you either stream it or use bytebuddy and javassist the way org.ref does. Which I couldn't figure out a simple way to copy theirs without makin a tonne of classes
okay fair enough, ill make sure to do some reaserch on that in the morning
thanks for the info mike 🙂

Hi Guys
for(int z = this.config.getArenaArea().getVector1().getZi(); z < this.config.getArenaArea().getVector2().getZi(); z += 16) {
int i0 = x >> 4;
int i1 = z >> 4;
if(!this.world.isChunkLoaded(i0, i1)) {
this.world.loadChunk(i0, i1);
}
this.world.getChunkAt(i0, i1).setForceLoaded(true);
for (Entity entity : this.world.getChunkAt(i0, i1).getEntities()) {
if(entity instanceof Player)
continue;
entity.remove();
}
}
}```
I need that after ending of game Arena restarts and reload all chunks on map and delete items/entities/block from last game
What I did false in that
becouse it isn`t works
Are you using Google translate
yeap
I need that after the mini-game is over, the arena will completely reboot, clear items and blocks from the old session. What is wrong with this code?
Anyone here have an understanding of packet based entities?
@late stag ur ukrainian?
yeah
lets say theres
point A [40 chunks] point B
and i want to make a line of blocks from A to B, after getting an array of locations, i was thinking on checking if the chunk is loaded, if not load it and once it moves to another chunk unload it, is that a good idea? is there some other way to place blocks in a line between two large distances?
any block can be interacted with
it’s just some do different things than others
hi, i created this menu item, when i click on it (in inventory) it opens menu but after i close the menu and open inventory again it creates a ghost item on my cursor, any idea how to fix it
show source code
not sure if that’s fixable since tons of servers like hypixel have that same problem
but you could try updateInventory()
damn
wheres that function
it’s part of player
oh
so just e.getWhoClicked().updateInventory()
might need to cast to a player or something though because i think it returns something weird like HumanEntity
So how come that special source sometimes just doesn't remap things properly?
The compiled artifact still references mojang names
I am currently creating packet based armorstands, but when they get too far from the player they dont spawn in again, anyone know how to fix it
?
how does one make it such that a villager gets infected and doesnt die no matter the difficulty
catch the entity death or damage event and reset/change health
Or cancel it if you don't want him to take damage at all ^
yeah i suppose that would work too
no like how do i make the zombie villager spawn or sth
how do i removed the circled stuff
itemflags?
hmm
Maybe setting the item lore to an empty string?
Because that its parts of item lore i think
lemme check the docs
no
nope its not
its not part of the lore
ItemMeta#addItemFlag(ItemFlag.HIDE_ATTRIBUTES)
oh
it’s not
nvm already solved
yeah sorry
Beg for our forgiveness
I said what I meant
google translate be like
#help-development message
I think he's saying he doesn't know what beg means in English so he has to translate it lol
oh
Yeah i translate the full sentences into my lang
what lang are you speakin
So what are possible reasons why special source could fail?
caps
Thank you, I didn't notice until you pointed it out
🤔
I speak spanish
How do I find out what the none mojang mappings is
Special source's remap and obfuscate targets are executed and built just fine, however it still attempts to load mojang mapped data upon load
As indicated by this
Yea but how do I know which is which. Hard to know
Oh okay
How are you using SpecialSource Vatuu
Regular maven setup
With the plugin?
mhm
Ok welp I have no idea then, I don't use that 
I had that same issue when I wasn't adding all the necessary classes to it, but I can't imagine that being an issue with the plugin.
s p a n i s h
is that italian.
meanwhile, Italian: uno, due, tre, quattro
no that's spanish
what I sent here is Italian
tua madre*
nopeeeee
tua padre
your dad?
yes
madre = feminine
padre = masculine
tua = feminine
tuo = masculine
tua madre
tuo padre
😶
How do I know what the obfuscated version is for something?
Also @shrewd sentinel https://minidigger.github.io/MiniMappingViewer/#/mojang/server/1.18.2
MiniMappingViewer
what if my dad is trans to woman
Explain better
alr
yes
or did they become a mom
theyre my dad, i have a mom
a feminine father
normally its papà/mamma
padre just sounds like an indian accent version of father
lol
?learnjava bro
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.
The code is running right
Are you making a new instance of that class by chance?
Like, 2 instances of it.

Should be being added then
LOL
shouldnt u just make it static
and return a hashset instead of void
why not
there should only be one instance of it then why not maake it static
How would check if an object its either a command sender or player?
instanceof
Allr so:
public void send(Object entity, String path, Object... replacements) {
entity instanceof Player ? CommandSender sender = (CommandSender) entity : Player player = (Player) entity;
}
why would u pass in an object
just pass in a commandsender
and check if its a player or not
Oh yeah its better
I dont kno why im doing it so diff
I dont know why beginner always like to do things diff
😂
lol
sort of depends if you get the entity in that class or not
am i stupid or whats going on here. this should filter out
Set<UUID> recipients = clan.getMembers().stream().filter((member) -> request.getUser() != member).collect(Collectors.toSet());
getUser is equal to: https://gyazo.com/9e72105fc6d244353aa41c36de2a69e7
the list i end up with: https://gyazo.com/69528232b2aa6de0748eb94799810561
am i doing somethn wrong?
we cant tell you without knowing what you are trying to achieve
simple to filter out any uuids that equal user
rn you filter out any uuids that are not member
well that deosnt work either then does it
my custom mob is really bad at pvping, any tips how I would make it better. Here is my goals
@Override
protected void registerGoals() {
this.goalSelector.addGoal(1, new LookAtPlayerGoal(this, ServerPlayer.class, 4.0F));
this.goalSelector.addGoal(2, new MeleeAttackGoal(this, 1.0D, true));
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<ServerPlayer>(this, ServerPlayer.class, true));
this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 1.0D));
}
as you can see, the UUID objects you are comparing are not the same
so it do work
yea they are?
compare them with equals
they are equal but not the same
remember kids, programmers dont sleep
Is there a way that i can make an item unrenable or unrepairable?
does that affect naming it?
like 20 dollar paypal
not sure
lol yes
yes
nice
You could teleport it in small increments, and it would ignore holes and still play the walking animation.
every tick
Oh, nvm then
hire people to control it
Ig you could stop teleporting when the block underneath is air, and then see what happens
give it ai
^ the better solution
but if you want to do it with teleporting get the start vector, and the end vector and the rest is up to you. I'm not going to spoonfeed you on that, but it's really simple. With some googling you should find out how
Looks nice
yess summon herobrine
LOL
it is so smooth
yeah he's just teleporting in small increments
literally what I just told this other guy to do
it's only hard if you don't know sin and cos
Can someone explain me the part, (a, b) -> a, because github copilot recommend me the method and i didnt understand that part of code
public String format(String text) {
return this.placeholders.entrySet().stream().reduce(text, (string, entry) -> string.replace(entry.getKey(), entry.getValue().toString()), (a, b) -> a);
}
its the combiner
since the identity is of another type, the (string,entry) -> will be the one who's turning each element + your identity into the "another" type instance, then the combiner combines those elements with the identity
My teacher tell us try to do a foreach + return in one java line and github copilot recommend that code
And my teacher was surprised, so please explain me how did you do that for next class
So i was trying to understand what do the code and why
So them i can explain to my class
cs?
computer science
our class is just learning the most obscure js libraries in existence
I dont have cs
sadly
but I mean I learn about most cs stuff on the internet, and then that becomes useful automatically
yeah lmao
i’ve learned 20x more from the internet than any computer science class i’ve took
Cs class taught me how to use system.out.println for 3 weeks lmao
So what part doesnt be needed¡?
for the first semester they had us doing binary trees in scratch 🙃
Lol I don't even know what a binary tree is
well
what exactly r u trying to do there
do u know what a tree is?
Yea it's something you plant then it grows and it's got green leaves and it's a pine type because I live for up north
Mine are gren
a binary tree is a tree where each branch point to either none or two other branches, given this branches cannot point back to other branches as that would result in a graph/relation
I believe a binary tree also must be irreducible
wow u shitlord are you telling me trees have to conform to ur world view of what an ideal tree is
Our teacher give us a:
Map<String, Object> variables; // Where String="the name" and Object="the value"
So he tell i will give you a text with the variables, so you have to replace each var from the text using in-line code
my binary trees exist in the quantum computing spectrum where they have an infinite amount of branches between 0 and 1
wut u goin 2 do aboot it?
wow
oh verano
This pic goes hard
hate crimes on spigot
stop trying to make roulette tables in minecraft
yes
I'm going to get the EU to control your plugin for encouraging kids to gamble
Why I have that problem when I try to "run" pom.xml: Cannot resolve com.github.MilkBowl:VaultAPI:1.7
The dependencies what I used is:
<dependency>
<groupId>com.github.MilkBowl</groupId>
<artifactId>VaultAPI</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>```
variables.entrySet().stream().reduce(text,(accumulation,entry) -> accumulation.replace(entry.getKey(),entry.getValue().toString()));
@sterile token
this ought to be enough
god lambda really makes your code dense huh
sure does
myes
but the entire server became a grotesque fiasco once they merged with xfun
which now got completely ruined when people like enzo took over

idk
I dont play mc that much anymore apart from my own mods Ig lol
lets say you have the map:
{
"epic": 1,
"dodo": true
}```
and the text "epic is dodo if and only if dodo is epic"
so it would start with
`"epic is dodo if and only if dodo is epic".replace("epic",Integer.valueOf(1).toString())`
then
`"1 is dodo if and only if dodo is 1".replace("dod",Double.TRUE.toString())`
and the result would be
"1 is true if and only if true is 1"
@sterile token
Oh ok i will test
from this that is
btw if it is going to be prem resource it won't be approved by staff prob
mye, not a very big fan of those
yea
I mean the concept is all cool and that
mye
I mean every once in a blue moon I might play some hypixel
but thats bout it
im not involved into the hypixel community so idk but probably
No doesnt work
Its marked on red, accumulation.reduce() saying it may cause NPE
thats just if you pass null to the identity
But still on red
And the code doesnt compile
exactly like fortnite , there are A LOT of players till a lot to queue in seconds just that the OG "community" that is really mature and into the game is dead
oh
myeah I messed it up a little, you probably need to pass an entry to the identity
let me rewrite it again ig lol
or actually nvm in this case you one you got from before is more suitable
but it works the same way
Performs a reduction on the elements of this stream, using the provided identity, accumulation and combining functions. This is equivalent to:
U result = identity;
for (T element : this stream)
result = accumulator.apply(result, element)
return result;
but is not constrained to execute sequentially.
The identity value must be an identity for the combiner function. This means that for all u, combiner(identity, u) is equal to u. Additionally, the combiner function must be compatible with the accumulator function; for all u and t, the following must hold:
combiner.apply(u, accumulator.apply(identity, t)) == accumulator.apply(u, t)
This is a terminal operation.
API Note:
Many reductions using this form can be represented more simply by an explicit combination of map and reduce operations. The accumulator function acts as a fused mapper and accumulator, which can sometimes be more efficient than separate mapping and reduction, such as when knowing the previously reduced value allows you to avoid some computation.
@sterile token
(the javadoc)
is it possible to create a skull with a skin belonging to some user. if that user has never been on the server?
yeah
how would one do that
what version are you on
1.8.8 
hm
think it’s more complicated on that
let me check
you need to make a new game profile from the uuid
then you can either use reflection or use skull meta to get the texture
SkullMeta.setOwner() might work as well
you can get a player name from uuid
Bukkit.getOfflinePlayer() only causes issues when you use a name pretty sure
the uuid method isn’t deprecated
yeh, but when the player has never played before it will do a request to mojang api right?
it’s going to make a request anyways to get the skull texture
make getting the textures asynchronous then
or maybe even get rate limited
i dont think you will
well yeah
you could set them in the menu
then change their texture asynchronously
worst that could happen is that they show up as a steve head for a few seconds
thats also an option yea
and i’m pretty sure it doesn’t even lag most the time
at least in my experience
they get cached somewhere
is there a function to check if a block is harvestable with a certain tier of tool in spigot?
im familiar ish with isPreferredTool(ItemStack) but thats not what im looking for
i could technically just use a list for this, i just was wondering if there was a built in way of doing this
^^Solved it
if (world.getBlockAt(originx + i, originy + j, originz + k).isPreferredTool(tool)) {
world.getBlockAt(originx + i, originy + j, originz + k).breakNaturally(tool);
}```
also i feel like damaging a tool shouldn't be as hard as it seems it is
ok, so i was on the right track
my issue was actually retrieving the Damageable
Damageable damageable = ((Damageable) tool.getItemMeta());
i found this, but it seems kind of hacky. am i wrong?
package com.test;
import com.mojang.authlib.GameProfile;
import javafx.beans.property.Property;
import net.minecraft.server.v1_16_R3.EntityPlayer;
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
import java.util.UUID;
public class corpseentity {
public static void execute(Player player){
EntityPlayer craftplayer = ((CraftPlayer)player).getHandle();
Property textures = (Property) craftplayer.getProfile().getProperties().get("textures").toArray()[0];
GameProfile gameProfile = new GameProfile(UUID.randomUUID(), player.getName());
gameProfile.getProperties().put("textures", new com.mojang.authlib.properties.Property("textures", textures.getValue(), textures.**getSignature**));
}
}
```why doesnt getSignature not work here? (markt with stars to make more clear)
damageable.setDamage(damageable.getDamage() - 1);
i think a more dynamic method is better, but this currently doesn't work
ooh
i forgot it works weirdly
ok, that makes sense.
ill come back when i test it
also doesn't the math work weirdly
where you need to add instead of subtract?
int damage = itemdmg.getDamage() - DamageDealt;
from https://www.spigotmc.org/threads/apply-damage-to-item.380871/
quite old now, but still
wait that is what im doing.... ok im dumb
Damageable damageable = ((Damageable) tool.getItemMeta());
if (damageable != null) {
damageable.setDamage(damageable.getDamage() - 1);
tool.setItemMeta(damageable);
}
else {
System.out.println("Damageable is null");
}```
i think i am
Im surprised World#breakNaturally doesn't do that by default
but this isn't working properly
somebody? 😭
its working fine in my world on 1.18.2
ooh
im goofed
Block#breakNaturally(ItemStack)
but it doesn't handle the durability i guess
it would be ideal if i could utilize a core function to handle the damage, because that would most likely handle having the unbreaking enchantment for example
its gotta exist right?
Hey there, I've been following this tutorial: https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
And written this code:
ProxiedPlayer proxiedPlayer = (ProxiedPlayer) event.getPlayer();
proxiedPlayer.connect(ProxyServer.getInstance().getServerInfo("SMP"));
But for some reason it is not working, though i am getting a stacktrace! (https://imgur.com/a/05nbUkq).
Though i have imported net.md_5.bungee.api.connection.ProxiedPlayer correctly. (Spigot server on Bungeecord)
Any help on this is appreaciated!
There’s no built in method for it no
ah well that would be nice if there was
And your code
Stacktrace: https://paste.md-5.net/xigakotoma.sql
Code: https://paste.md-5.net/wucigekuje.cs
You’re trying to run a bungee plugin on spigot
You can’t do that
You have to make a spigot plugin to run on your spigot server
Oh, how would i then go about sending player between spigot servers on bungeecord
well that's frustrating. apparently to damage an item you need to add to the damage, rather than subtract.. doi
Damageable damageable = ((Damageable) tool.getItemMeta());
if (damageable != null) {
System.out.println("Damaging item");
damageable.setDamage(damageable.getDamage() + 1); //add to decrease the durability, subtract to increase it
tool.setItemMeta(damageable);
}```
for anyone else doing this
Use the messaging channel
In a spigot plugin
Yeah, damage goes up
Once it reaches max durability it breaks
yeah, well i guess now i know that. lol
works great now
lol. it goes negative... umm what
🤣
well thats a new problem i didn't expect. hehe
EntityPlayer corpse = new EntityPlayer(
((CraftServer) Bukkit.getServer()).getServer(),
((CraftWorld)player.getWorld()).getHandle(),
gameProfile);
imports:
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.minecraft.server.v1_16_R3.EntityPlayer;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_16_R3.CraftServer;
import org.bukkit.craftbukkit.v1_16_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
error = 'EntityPlayer(net.minecraft.server.v1_16_R3.MinecraftServer, net.minecraft.server.v1_16_R3.WorldServer, com.mojang.authlib.GameProfile, net.minecraft.server.v1_16_R3.PlayerInteractManager)' in 'net.minecraft.server.v1_16_R3.EntityPlayer' cannot be applied to '(net.minecraft.server.v1_16_R3.DedicatedServer, net.minecraft.server.v1_16_R3.WorldServer, com.mojang.authlib.GameProfile)'
what did i do wrong?
is there such thing as am empty itemstack in spigot
yes
Air?
how can I set a cauldron to be full?
thank you will try that rn
only works for cauldrons already containing water though
also is there a way to play the traditional pick breaking sound when my tool breaks?
World#playEffect or World#playSound
i feel like im reprogramming the pickaxe mechanics right now.. lol. thanks
You are
Lol
:) kind of funny, but i guess if i have to ill do it
working pretty good thanks to some help here and google. thanks guys!
Hihi, i try to make a hover event that get a stringlist. But, my hover event gets 1 string from my stringlist. How can i fix it?
You’re setting the hover event every time @severe plume
You can only have one hover event
How should it be then?
And the hover event has to be called multiple times because all ranks have to come up with a hover event.
Then you need to send multiple messages
You can’t have multiple hover events on one message
You can have multi line text I imagine, but not multiple hover events
That's what I want too. I want to have multiple lines instead of 1 line.
If I do it hard code with \n then it works.
But I want to have it softcode so that I can modify it at any time.
getStringList().stream().collect(Collectors.joining(“\n”));
how do you check if a mob is a baby
isn't there isBaby()
oh
lol
sorry wrong quote
when i do !((Ageable) entity).isAdult() it doesnt do anything
when i have a baby zombie
Hey is it possible to have a scheduleSyncDelayedTask run in like 1/10 of a tick? or is that not a thing?
lol. no worries :)
that wouldn’t be synchronous then