#help-development

1 messages · Page 2077 of 1

quaint mantle
#

ah

#

k

#

i understand

golden kelp
#

i hate web 3 because of these people, dont even wnat to learn it

#

they think tis gonna revolutionlize the web

noble lantern
#

i use web -1

golden kelp
#

and then web2 will be of no use

golden kelp
wet breach
#

web 3 won't be used

noble lantern
#

im rly pissed about my spigot name

wet breach
#

you can change it

golden kelp
#

cD

noble lantern
#

my real user is Burchard36 but i made a typo when creating my spigot profile

#

so now its eternally 37

wet breach
#

well not eternally

#

just until you donate to have it fixed

tall dragon
#

u could change it

lavish hemlock
#

what did you do with Burchard35?

noble lantern
#

with my bear fists

lavish hemlock
#

bare*

noble lantern
lavish hemlock
#

unless

noble lantern
#

bear

lavish hemlock
#

you literally mean bear fists

#

yep ok

noble lantern
#

bear, fists

tall dragon
#

hes a werebear

lavish hemlock
#

neat

#

quite rare

#

I'm a cat person

#

although I wish I was a literal cat person

noble lantern
#

zack too

#

ngl

lavish hemlock
#

YEAH THIS WAS CONFIRMED LIKE, A YEAR AGO

noble lantern
#

i need me a cat girl cat dev as a gf

lavish hemlock
#

catgirls don't count as furries

#

also catgirls are overrated anyway

#

catboys on the other hand...

#

a lil overrated but great

noble lantern
#

i would be a catboy for a cat girl cat dev gf

lavish hemlock
#

cat furries are cool though cuz they can purr and it's not weird cuz they're not like, 50% human :)

noble lantern
#

@supple elk you okay my mans

#

you been typing a while

rough drift
lavish hemlock
#

probably just a twitch thot tbh

rough drift
#

tbhhhhhhh devs are just a different kind of species lmao

wet breach
noble lantern
lavish hemlock
noble lantern
#

dont care about the twitch thot part

rough drift
#

lol

noble lantern
#

just need to wear the cat ears

#

and were chillin

#

no tail bullshit

rough drift
#

but why

#

why would you want the ears

wet breach
#

I am just pointing out renting humans is still a thing

supple elk
#
//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
  }
}```
supple elk
rough drift
#

who hurt you

supple elk
#

xd

wet breach
#

that is functional programming style

noble lantern
rough drift
#

kotlin shouldn't be written like that

lavish hemlock
supple elk
#

and second is OOP?

rough drift
lavish hemlock
#

That's Kotlin???

rough drift
#

kotlin is cool

wet breach
#

it loops

supple elk
#

nah it was just meant to be a generic loop

#

not meant to be kotlin

#

I just cba to do a while or smmin

rough drift
#
thread {
  async;
}
sync;
#

that's kotlin

lavish hemlock
#

No I know what Kotlin is like

rough drift
#

there's also a virtual thread thing in kotlin

lavish hemlock
#

I code in it once a blue moon

rough drift
#

lmao

lavish hemlock
#

But that looked nothing like Kotlin

#

looked closer to fuckin' uhh

#

Dart

#

cuz of @override

rough drift
#

ye

#

ye it did

noble lantern
#

that lowercase o huts my brain

rough drift
#

not even annotations xD

noble lantern
#

WTF

rough drift
#

yep

noble lantern
#

yeah naw

#

im out

#

im deleting my discord

#

bye

rough drift
#
override fun onEnable() {

}
lavish hemlock
#

Honestly it makes sense though :p

rough drift
#

ye

noble lantern
rough drift
#

yeah

noble lantern
#

but @override as a keyword why

wet breach
#

just use lolcode

lavish hemlock
#

C# does it like that too actually

rough drift
#

fuck no

lavish hemlock
wet breach
#

@noble lantern you would like lolcode

hybrid spoke
#

override fun with depressions

lavish hemlock
#

@interface

rough drift
supple elk
#

can anyone answer my question 🤔

#

I'm struggling to figure out when to use which method

noble lantern
supple elk
#

or should I be doing something else

rough drift
#

method 3 is useful when you don't want 4k classes of custom components

#

method 2 is the opposite

supple elk
#

which is method 3?

rough drift
#

method 1 i am questioning reality

noble lantern
rough drift
supple elk
wet breach
#

maybe we should worry when there is a method 5

noble lantern
#

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

rough drift
#

Oh

#

then method2 is better

noble lantern
rough drift
#

method1 i don't understand it alot

wet breach
#

check out lolcode yet?

rough drift
noble lantern
smoky oak
#

i hate that i can tell the anime its from

rough drift
#

LMAO

#

ITS HILARIOUS

noble lantern
#

i love it

rough drift
noble lantern
noble lantern
supple elk
#

Ok how about i give the specific example I'm dealing with then

rough drift
#

because its weir dlooking at that

noble lantern
#

sec ill show my full ide ike

#

its lit

supple elk
noble lantern
#

see its cool

supple elk
rough drift
#

that's my ide

supple elk
#

I want to be able to change this

hybrid spoke
#

press delete

#

and then press other buttons

noble lantern
# rough drift

its been so long since ive seen an ide without a picture

supple elk
#

so in this case I think it makes sense to take a predicate in the constructor

hybrid spoke
#

my IDE is lightmode

noble lantern
rough drift
#

my ide is deep ocean from material theme

hybrid spoke
#

and font size 24

supple elk
#

but I also want to be able to change what particles are summoned

rough drift
#

my friends say its literally vsc

wet breach
hybrid spoke
noble lantern
supple elk
rough drift
#

yeah ig

noble lantern
wet breach
#

however Majin Buu is probably my favorite character in DBZ

noble lantern
#

which form

supple elk
noble lantern
#

kid buu, super buu, evil buu, or good buu

supple elk
#

and then between instances I can just pass in a different consumer to change what particle is spawned

wet breach
#

good buu

supple elk
#

which do I usee???

#

making a new class each time seems a little redundant

noble lantern
#

why not just make it take a ParticleEffect argument

supple elk
#

as 90% of the code is the same

supple elk
smoky oak
noble lantern
supple elk
supple elk
noble lantern
#

with nullable args

smoky oak
#

wait

#

how do you do nullable args?

supple elk
supple elk
smoky oak
#

just do if(arg==null) arg = value; ?

noble lantern
smoky oak
#

oh you mean parameter overload

supple elk
noble lantern
supple elk
#

that's literally what I'm asking

#

functional interfaces vs new class

noble lantern
#

tbh

#

its a preferance thing

#

i myself would create a functional interface way of doing it

#

its just more readable to the developer(s)

supple elk
#

mkay

smoky oak
#

on that topic

noble lantern
#

well whats more readable

smoky oak
#

how do you generate those github javadocs?

wet breach
noble lantern
#
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));
tall dragon
#

bottom

#

imo

hybrid spoke
#

builder pattern is pog

noble lantern
#

this way you dont need to have 20 million nulls in a constructor if its not needed

tall dragon
#

indeed

noble lantern
#

and only call functions if that specified data is needed

smoky oak
noble lantern
smoky oak
#

what

#

minecraft is 3d

wet breach
smoky oak
#

the what now

noble lantern
#

wait

#

so your telling me

tender shard
noble lantern
#

someone didnt write the spigot javadocs

tender shard
#
            <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>
noble lantern
#

my whole lifes been a lie

hybrid spoke
#

you really thought someone wrote these?

noble lantern
hybrid spoke
#

would've been a nolifer

wet breach
noble lantern
#

spigot community has plenty of those

wet breach
hybrid spoke
#

i mean idc if im getting paid for it

wet breach
#

I wonder how many other people think someone wrote them XD

hybrid spoke
#

technically they did

wet breach
#

yes and no

tender shard
#

well someone did write them. they just didn't also put it into some html files etc

wet breach
#

and then included some search functionality

#

and all them frames

hybrid spoke
#

dont forget the designs

noble lantern
#

and links to other classes and methods

smoky oak
#

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...)

cold field
#

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?

tender shard
wet breach
hybrid spoke
tender shard
#

i have no idea why people always piss into their hotpants when they see "static" somewhere

noble lantern
#

static abuse would be making everything static to get access to a variable without adding say proper gettings and shit

smoky oak
#

ask two people and you get three answers lol

noble lantern
#

tbh

smoky oak
#

helpful answers

#

i know

#

but still

noble lantern
#

its a preferance thing but sometimes static is harmful

smoky oak
#

noted

hybrid spoke
#

sonarlint always cries at me "hey, this fucker could be static"

#

so i make it static

#

easy as that

wet breach
#

static is harmful because of all things in Java, static can't be GC'ed

noble lantern
#

^

tender shard
noble lantern
#

i 100% support static apis

#

as long as they arent instance based

smoky oak
#

everything temporary (fields inside methods) only exist for the duration that method is executed in unless they're declared outside, correct?

noble lantern
smoky oak
#

even if static?

tender shard
#

it exists until the garbage collector killed it

smoky oak
wet breach
#

statics are permanent, they never go away even if the class isn't fully loaded

noble lantern
#

then what alex says ^

smoky oak
noble lantern
#

GC decides when to clear stuff

#

but eventually it will be cleared

hybrid spoke
#

the reference to the variables is gone if your method ends and the scope closes if you dont hold it somewhere else

noble lantern
#

just sometimes not instantly

smoky oak
#

yea well most of my code looks a lot like spawnEntityAt(location, entity); World world = entity.getWorld()

hybrid spoke
rough drift
#

I believe reflection classes also stop it from being gc'd

wet breach
rough drift
#

or nah?

hybrid spoke
wet breach
#

well what I meant is, there comes a point

#

where for the classloader to be gc'ed the application needs to be closed

grim ice
#

a Child class shouldnt implement Comparable :(

rough drift
grim ice
#

lol

sterile token
#

Why tagging me and them deleting them=

grim ice
#

kinda dramatic but yea]

tardy delta
#

:(

spring minnow
burnt current
#

hey, short question: is it somehow possible to make for example a zombie attacking an other zombie or other mobs?

wet breach
#

yes

#

and its not hard either

burnt current
#

so how does it work?

#

do you have a tutorial or something?

wet breach
#

not sure how much simpler it needs to be

#

or if that requires a tutorial

eternal oxide
#

no, only the events

heavy void
#

What is the better way to make a multi-version plugin using Maven? (1.8 - 1.18)

eternal oxide
#

modules

grim ice
#

it will work for everything above it

#

or modules

#

but idk if i wanna use modules for smth other than nms

onyx fjord
#

Don't

eternal oxide
#

yep, only useful if you are using NMS or disabling parts depending on version

onyx fjord
#

Why put effort into old software

#

When new exists

opal juniper
#

modules are good

opal juniper
heavy void
grim ice
#

just use 1.8 everything else will work

onyx fjord
#

Their problem

eternal oxide
#

if you are creating a NEW plugin make it 1.16+

grim ice
#

the developer problem

opal juniper
#

oh the old software is 1.8 i get it now

grim ice
#

that they wont get money

#

Lol

opal juniper
#

thought that was a maven dig

onyx fjord
#

I always support latest and pre latest

grim ice
#

i support the versions i can support

#

less than 1.8 and 1.18 at the same time plugins

onyx fjord
#

Psst eco enchants has 2k+ buyers with 1.17 and 1.18 only support

heavy void
#

yeah, but so many configurators of minigames servers keeps using 1.8 server version

grim ice
#

it couldve had more if it supported all versions

onyx fjord
#

It is what it is

grim ice
#

more work for more money? Sure

onyx fjord
#

But new API should work on 1.14+

heavy void
#

I think ill try modularisation

onyx fjord
#

Can u even use java 17 on 1.8?

grim ice
heavy void
young knoll
heavy void
young knoll
#

1.8 didn’t have the java version check

onyx fjord
#

Uh

#

I don't think it'll work

#

Old API also has dumb material IDs and stuff

heavy void
#

really

#

but

#

i want to use it o-o

onyx fjord
#

Well then you must use X material or some other library

#

@quaint mantle I think it's deprecated

heavy void
#

i was to use all XLibraries (that ill use)

#

thanks u all guys, ill try to study modularisation o-o

tardy delta
#

fromage

onyx fjord
#

Talking about that, I don't like it in maven

tardy delta
#

chroissant

#

pistolet

#

i am french now

heavy void
#

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?

river oracle
#

Uhm no

#

Not at all

onyx fjord
#

In many ways no

heavy void
#

But that same situation but instead being 1.18 plugin, being 1.8 plugin?

onyx fjord
#

Uh

#

Your sentence doesn't make sense

grim ice
tardy delta
onyx fjord
#

If you want to code on 1.8 API, it's much worse

#

And it's generally poor

tardy delta
#

which makes them not more edible

grim ice
#

une baguette avec fromage est le rêve du tout les francais

summer scroll
grim ice
#

c'est plus delicious que ta mere la derniere nuit

onyx fjord
#

I don't mind natural multi version

#

Without workarounds and shit

#

1.8 API doesn't even have titles

grim ice
#

non

onyx fjord
#

And boss bars I believe

grim ice
#

il a ca

grim ice
#

to say 'it haas that' in french

#

u can say

#

ca a ca

molten hearth
onyx fjord
#

Wow that's crazy hex

molten hearth
#
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

onyx fjord
#

You can also filter it on tab event

molten hearth
#

so I still need to add them to plugin.yml?

onyx fjord
#

Na

grim ice
onyx fjord
#

Dude

river oracle
#

I set up commands so I don't have to add them to my plugin yaml it's so annoying lol

summer scroll
#

wtf am i seeing

onyx fjord
#

Stop speaking Harry Potter

noble lantern
#

oo command stuff

#

tmrw ill be posting a tutorial for functional interface command registration bop

grim ice
onyx fjord
#

I just have a switch that had all commands

grim ice
#

ok i should stop

noble lantern
onyx fjord
#

Idc

#

It's organized

grim ice
#

it aint

noble lantern
#

so clean

grim ice
#

you should have a hashmap

onyx fjord
#

Making each command a different class is overcomplicating

grim ice
#

String, BiConsumer

#

BiConsumer<String[], CommandSender>

noble lantern
onyx fjord
#

Yk what fuck it ima use else ifs

noble lantern
grim ice
#

then u handle all commands and then do commands.get(cmd).apply(args, sender);

onyx fjord
#

I don't like having a milion libs for stuff I can do anyway without them

grim ice
#

the way i said it

onyx fjord
#

Idk what tf that is

noble lantern
#

Functional Interfaces

grim ice
#

functional interface

noble lantern
#

this is the new meta

#

well

#

old meta

onyx fjord
#

I like word functions

noble lantern
#

been around a while

onyx fjord
#

Because I hate oop

noble lantern
#

doing what hex said or the screenshot above isnt too complicated

grim ice
#

je suis desole mais jadore ta mere kacper

#

wheres the screenshot

noble lantern
grim ice
#

yea

vocal cloud
summer scroll
#

I have something similiar like that lol

noble lantern
summer scroll
#

It's a mess but it helps me

grim ice
#

i think my way is cooler

noble lantern
#

its barely 50 lines of code and 5 classes

grim ice
#

instead of reinventing the wheel

vocal cloud
#

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

summer scroll
#

What's your way?

vocal cloud
#

Reflection™️

noble lantern
#

the class for handling the command is small

crisp steeple
#

yeah reflection is my favorite way of registering commands/listeners

#

it’s really annoying otherwise

vocal cloud
summer scroll
vocal cloud
#

Dangerous as hell though

noble lantern
#

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()

vocal cloud
#

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.

noble lantern
#

could you explain a little more about that please?

river oracle
#

You wouldn't put every command in one class

noble lantern
#

^

vocal cloud
#

Then what's the point lol

noble lantern
#

This is how i use the lib i currently have, each command has its own class

vocal cloud
#

The whole point of functional interfaces is to avoid having more classes

#

That seems like more work than it's worth imo

grim ice
#

i would just make a command registration library

#

and use it

crisp steeple
#

yeah

grim ice
#

it sucks

#

dragon ball is so cringe

gleaming grove
#

No it does not

noble lantern
grim ice
#

dragon testicles tbf

noble lantern
#

probably a preferance thing but, i have really enjoyed using this over the past few months

noble lantern
crisp steeple
#

the only thing kind of weird about using annotations for things is that class loading is annoying

#

but otherwise it’s really cool

noble lantern
#

tbf, its all up to preferance for how people want to handle theyre commands

#

theres probably over 20+ different ways to handle commands

vocal cloud
grim ice
#

sussy

crisp steeple
#

shout out to melvin

noble lantern
#

jkjk

vocal cloud
#

I mean annotations are pretty good for auto registration

noble lantern
#

yeah tbh i do like that feature

grim ice
#

i would just make a utils class containing stateless methods and use them in a HashMap<String, BiConsumer<CommandSender, List<String>>>

noble lantern
#

because calling registerCommand is pretty redundant

river oracle
#

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

vocal cloud
#

Well you need to figure out how you're going to load the classes that haven't been loaded yet

noble lantern
#

only time we should flame someones command registration

vocal cloud
#

Cause otherwise you'll still have to call them

noble lantern
#

is if they use 300 lines of if else lmfao

vocal cloud
#

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

noble lantern
#

just vanilla java reflection?

#

or org.reflections lib

vocal cloud
#

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.

noble lantern
#

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

sharp bough
vocal cloud
#

Yeah but it's a heavy lib and people complain about it

sharp bough
#

thats kidna cool

noble lantern
#

i forgot its name

noble lantern
sharp bough
#

k np

#

tag me please

noble lantern
#

file -> settings -> appearence

sharp bough
#

ah thanks

vocal cloud
#

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

noble lantern
#

i see

quaint mantle
#

Goku 👌

noble lantern
#

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

vocal cloud
#

That's what I did. Yeah it's easy but it's also heavy. So it's a trade off more or less

noble lantern
#

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

noble lantern
#

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"

vocal cloud
#

Just stream the jar file and read all the .class files and their locations

noble lantern
#

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

vocal cloud
#

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

noble lantern
#

okay fair enough, ill make sure to do some reaserch on that in the morning

#

thanks for the info mike 🙂

vocal cloud
golden turret
#

how could i check if the block can be interacted by the player?

#

like a door

late stag
#

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

vocal cloud
#

Are you using Google translate

late stag
#

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?

thick tundra
#

Anyone here have an understanding of packet based entities?

grim ice
#

@late stag ur ukrainian?

late stag
#

yeah

sharp bough
#

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?

crisp steeple
#

it’s just some do different things than others

shut solar
#

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

sharp bough
#

show source code

crisp steeple
shut solar
crisp steeple
#

but you could try updateInventory()

shut solar
crisp steeple
#

it’s part of player

shut solar
#

oh

crisp steeple
#

so just e.getWhoClicked().updateInventory()

#

might need to cast to a player or something though because i think it returns something weird like HumanEntity

shut solar
#

ye i know thx

#

looks like it didnt fix it

#

uncool

halcyon mica
#

So how come that special source sometimes just doesn't remap things properly?

#

The compiled artifact still references mojang names

thick tundra
#

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

spiral aurora
#

how does one make it such that a villager gets infected and doesnt die no matter the difficulty

viral crag
#

catch the entity death or damage event and reset/change health

hasty prawn
#

Or cancel it if you don't want him to take damage at all ^

viral crag
#

yeah i suppose that would work too

spiral aurora
#

no like how do i make the zombie villager spawn or sth

ornate mantle
#

how do i removed the circled stuff

crisp steeple
#

itemflags?

ornate mantle
#

hmm

sterile token
#

Because that its parts of item lore i think

ornate mantle
#

lemme check the docs

ornate mantle
rough drift
#

its not part of the lore

sterile token
#

Oh ok sorry

#

My bad

hasty prawn
#

ItemMeta#addItemFlag(ItemFlag.HIDE_ATTRIBUTES)

ornate mantle
#

oh

ornate mantle
#

i just saw that in the docs lmao

#

ty

crisp steeple
#

nvm already solved

sterile token
#

🤔

crisp steeple
#

yeah sorry

waxen plinth
sterile token
#

Beg?

#

Translator moment

waxen plinth
#

I said what I meant

tardy delta
rough drift
hasty prawn
#

I think he's saying he doesn't know what beg means in English so he has to translate it lol

rough drift
#

oh

sterile token
#

Yeah i translate the full sentences into my lang

tardy delta
#

what lang are you speakin

halcyon mica
#

So what are possible reasons why special source could fail?

tardy delta
#

caps

halcyon mica
#

Thank you, I didn't notice until you pointed it out

tardy delta
#

🤔

sterile token
tardy delta
#

ah

#

espagnol

shrewd sentinel
#

How do I find out what the none mojang mappings is

tardy delta
#

ono dos tres

#

quatro

halcyon mica
#

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

shrewd sentinel
halcyon mica
#

What

#

I wasn't answering you

#

I have my own issue

shrewd sentinel
#

Oh okay

hasty prawn
#

How are you using SpecialSource Vatuu

halcyon mica
#

Regular maven setup

hasty prawn
#

With the plugin?

halcyon mica
#

mhm

hasty prawn
#

Ok welp I have no idea then, I don't use that Sadge

#

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.

rough drift
tardy delta
#

is that italian.

rough drift
#

meanwhile, Italian: uno, due, tre, quattro

rough drift
tardy delta
#

wait wha

#

ah

rough drift
tardy delta
#

lol

#

ta madre

rough drift
#

tua madre*

tardy delta
#

thats the same

#

smh

rough drift
#

nopeeeee

tardy delta
#

tua padre

rough drift
#

well

#

what

#

eh

#

tf

#

its tuo padre

undone axleBOT
tardy delta
#

your dad?

rough drift
#

yes

#

madre = feminine
padre = masculine

tua = feminine
tuo = masculine

tua madre
tuo padre

tardy delta
#

😶

shrewd sentinel
#

How do I know what the obfuscated version is for something?

rough drift
#

print the set after the loop

#

and, when is setupArmorStand called

halcyon mica
grim ice
rough drift
grim ice
#

my dad is transsexual

#

and become woman

rough drift
#

alr

grim ice
#

Yeha

#

transgende

#

r

rough drift
#

depends

#

are they still a dad

grim ice
#

yes

rough drift
#

or did they become a mom

grim ice
#

theyre my dad, i have a mom

rough drift
#

so I guess they'd be called tuo padre

#

but padre/madre is really formal

grim ice
#

a feminine father

rough drift
#

normally its papà/mamma

tardy delta
#

😳😳😳😳🤔

#

daddy

grim ice
#

padre just sounds like an indian accent version of father

kindred valley
#

?learnjava bro

undone axleBOT
rough drift
#

what

#

I don't see the problem rn tho

grim ice
#

initialize it in the set constructor

#

the hashset

hasty prawn
#

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

grim ice
#

do what i said

#

or nvm

#

if its what i thought then u would get an npe

hasty prawn
#

LOL

grim ice
#

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

sterile token
#

How would check if an object its either a command sender or player?

sterile token
# grim ice instanceof

Allr so:

public void send(Object entity, String path, Object... replacements) {
    entity instanceof Player ? CommandSender sender = (CommandSender) entity : Player player = (Player) entity;
}
grim ice
#

why would u pass in an object

#

just pass in a commandsender

#

and check if its a player or not

sterile token
#

Oh yeah its better

#

I dont kno why im doing it so diff

#

I dont know why beginner always like to do things diff

#

😂

grim ice
#

lol

viral crag
#

sort of depends if you get the entity in that class or not

tall dragon
#

am i doing somethn wrong?

hybrid spoke
tall dragon
#

simple to filter out any uuids that equal user

hybrid spoke
tall dragon
shrewd sentinel
#

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));
    }
hybrid spoke
#

so it do work

tall dragon
#

yea they are?

hybrid spoke
#

compare them with equals

hybrid spoke
tall dragon
#

omfg

#

rlly

#

thats the problem

#

ty

#

i need sleep

tardy delta
#

remember kids, programmers dont sleep

desert musk
#

Is there a way that i can make an item unrenable or unrepairable?

tender shard
#

you can set the repair cost very high

#

or listen to the anvil event

desert musk
#

does that affect naming it?

tardy delta
#

like 20 dollar paypal

tender shard
tender shard
jagged thicket
desert musk
cosmic pelican
#

You could teleport it in small increments, and it would ignore holes and still play the walking animation.

#

every tick

#

Oh, nvm then

cosmic pelican
#

Ig you could stop teleporting when the block underneath is air, and then see what happens

tardy delta
#

give it ai

cosmic pelican
#

^ 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

jagged thicket
#

yess summon herobrine

cosmic pelican
#

LOL

jagged thicket
#

it is so smooth

cosmic pelican
#

literally what I just told this other guy to do

#

it's only hard if you don't know sin and cos

sterile token
#

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);
}
ivory sleet
#

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

sterile token
#

Oh ok

#

Thanks

ivory sleet
#

but I mean there

#

that looks like you should just use the one with two params

#

^

sterile token
#

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

ivory sleet
#

oh

#

let me provide a simple example then

sterile token
#

So i was trying to understand what do the code and why

#

So them i can explain to my class

crisp steeple
#

you guys actually do useful things in cs?

#

that’s crazy

sterile token
crisp steeple
#

computer science

#

our class is just learning the most obscure js libraries in existence

ivory sleet
#

I dont have cs

#

sadly

#

but I mean I learn about most cs stuff on the internet, and then that becomes useful automatically

crisp steeple
#

yeah lmao

#

i’ve learned 20x more from the internet than any computer science class i’ve took

river oracle
#

Cs class taught me how to use system.out.println for 3 weeks lmao

sterile token
crisp steeple
#

for the first semester they had us doing binary trees in scratch 🙃

river oracle
ivory sleet
#

what exactly r u trying to do there

ivory sleet
river oracle
#

Mine are gren

ivory sleet
#

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

torn shuttle
sterile token
# ivory sleet what exactly r u trying to do there

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

torn shuttle
#

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

ivory sleet
#

oh verano

crisp steeple
#

This pic goes hard

torn shuttle
#

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

desert tinsel
#

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>```
torn shuttle
#

I did

#

just now

#

were you not paying attention

ivory sleet
#

variables.entrySet().stream().reduce(text,(accumulation,entry) -> accumulation.replace(entry.getKey(),entry.getValue().toString()));

@sterile token

#

this ought to be enough

torn shuttle
#

god lambda really makes your code dense huh

ivory sleet
#

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
jagged thicket
#

btw if it is going to be prem resource it won't be approved by staff prob

ivory sleet
#

mye, not a very big fan of those

jagged thicket
#

yea

ivory sleet
#

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

crisp steeple
#

hypixel is pretty dead now

#

relative of course

ivory sleet
#

meh

#

I mean

#

their build battle gamemode is relatively undead imo

crisp steeple
#

none of them are really dead just

#

the community isn’t as active anymore

ivory sleet
#

im not involved into the hypixel community so idk but probably

sterile token
#

Its marked on red, accumulation.reduce() saying it may cause NPE

ivory sleet
#

thats just if you pass null to the identity

sterile token
#

And the code doesnt compile

jagged thicket
ivory sleet
#

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)

tall dragon
#

is it possible to create a skull with a skin belonging to some user. if that user has never been on the server?

crisp steeple
#

yeah

tall dragon
#

how would one do that

crisp steeple
#

what version are you on

tall dragon
#

1.8.8 PepegeHmm

crisp steeple
#

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

tall dragon
#

yeh but that requires u to know the playername no?

#

i only know the uuid

crisp steeple
#

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

tall dragon
#

yeh, but when the player has never played before it will do a request to mojang api right?

crisp steeple
#

it’s going to make a request anyways to get the skull texture

tall dragon
#

i have like 15 heads i need to create in succession im worried about a big delay

#

ah

crisp steeple
#

make getting the textures asynchronous then

tall dragon
#

or maybe even get rate limited

crisp steeple
#

i dont think you will

tall dragon
#

the heads will go into a menu

#

that has to open as fast as possible

crisp steeple
#

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

tall dragon
#

thats also an option yea

crisp steeple
#

and i’m pretty sure it doesn’t even lag most the time

#

at least in my experience

#

they get cached somewhere

tall dragon
#

alright il try that then.

#

thanks

rugged cargo
#

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?

exotic jetty
#
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)
rugged cargo
#

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?

#

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

pliant oyster
#

breh tf

#

my console is saying invalid plugin.yml

#

nvm

#

I did something wrong

rugged cargo
#

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?

muted idol
#

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!

brave sparrow
#

There’s no built in method for it no

rugged cargo
#

ah well that would be nice if there was

brave sparrow
#

@muted idol can you ?paste the stack trace

#

?paste

undone axleBOT
brave sparrow
#

And your code

brave sparrow
#

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

muted idol
rugged cargo
# rugged cargo ah well that would be nice if there was

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
brave sparrow
#

In a spigot plugin

brave sparrow
#

Once it reaches max durability it breaks

rugged cargo
#

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

exotic jetty
#
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?

vast kelp
#

Missing a PlayerInteractManager

rugged cargo
#

is there such thing as am empty itemstack in spigot

tender shard
#

yes

rugged cargo
#

Air?

tender shard
#

amount = 0

#

if you use Material.AIR it automatically sets the amount to 0

granite burrow
#

how can I set a cauldron to be full?

tender shard
#

cast it to Levelled

#

then change the level

granite burrow
#

thank you will try that rn

tender shard
#

only works for cauldrons already containing water though

rugged cargo
#

also is there a way to play the traditional pick breaking sound when my tool breaks?

vast kelp
rugged cargo
#

i feel like im reprogramming the pickaxe mechanics right now.. lol. thanks

rugged cargo
#

:) 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!

severe plume
brave sparrow
#

You’re setting the hover event every time @severe plume

#

You can only have one hover event

severe plume
#

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.

brave sparrow
#

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

severe plume
#

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.

brave sparrow
arctic moth
#

how do you check if a mob is a baby

arctic moth
#

lol

tender shard
#

sorry wrong quote

arctic moth
#

when i do !((Ageable) entity).isAdult() it doesnt do anything

#

when i have a baby zombie

granite burrow
#

Hey is it possible to have a scheduleSyncDelayedTask run in like 1/10 of a tick? or is that not a thing?

rugged cargo
crisp steeple