#help-development

1 messages · Page 2168 of 1

iron glade
#

xDD

fallow violet
#

who

slate mortar
#

still wish you could make it 3-digit

iron glade
#

that could be a good tag on me

slate mortar
#

asked

#

imagine trying that

iron glade
#

since my birthday is on 6.9

slate mortar
#

in 2022

fallow violet
slate mortar
#

my bd is on 13.12
is it random? nobody knows

iron glade
#

oh no like my ex's

slate mortar
#

honestly, thats so rigged

iron glade
#

ikr

#

gtfo

fallow violet
#

=ß?

slate mortar
#

talking about killing policemen

#

having bd on 1312

iron glade
#

hahahaha

slate mortar
#

fuck my life

iron glade
#

2001 I guess?

slate mortar
#

stalking again

#

knew it

fallow violet
#

you just did

iron glade
#

I just remembered reading you were 20 lul

#

imagine not being born in 2000

#

^.^

fallow violet
iron glade
#

IKR

slate mortar
iron glade
#

I will turn 69 on 6.9.2069

fallow violet
slate mortar
#

it was meant like "i don't know who that was"

fallow violet
#

mmh

slate mortar
#

while yours was obv a "who cares" joke

#

but tbf

#

i recently fell for candice

fallow violet
#

?

iron glade
#

candice d fit in jo mouth

slate mortar
#

^

iron glade
#

good one

slate mortar
#

got me so bad

iron glade
#

: P

fallow violet
#

omg im so dumb

slate mortar
#

agree

fallow violet
#

you are dumb

slate mortar
#

yes

fallow violet
#

fuck

slate mortar
#

still smarter than you tho

fallow violet
#

negative

iron glade
#

you 2 seem like you know each other

fallow violet
#

no

slate mortar
#

luckily not

fallow violet
#

xd

slate mortar
#

lol

iron glade
#

or at least for some time already

#

xd

fallow violet
#

HOW DARE YOU

slate mortar
#

well

#

-_-

fallow violet
#

you are rude

iron glade
#

poor help-development channel has to take our bs xd

slate mortar
#

yes 👿

fallow violet
#

noooo

#

dont be rude

slate mortar
fallow violet
#

^

slate mortar
#

funny that the desc says "serious"

fallow violet
#

its general chat here

slate mortar
#

this is really serious, yes

fallow violet
#

yes

#

you are really rude

slate mortar
#

that's me

#

hello

fallow violet
#

:c

slate mortar
#

maybe that's why i don't have friends? :o

#

beeing rude is funny tho

iron glade
#

we can be your friends

#

if you pay

#

enough

slate mortar
#

how

#

much

iron glade
#

hmm

fallow violet
#

100 for start?

iron glade
#

what's @fallow violet saying?

fallow violet
#

or more?

iron glade
#

sounds good

slate mortar
#

well

#

sounds fair

fallow violet
#

alright

iron glade
#

I think she's tricking us

slate mortar
#

hell no

fallow violet
#

yes

slate mortar
#

i'm serious

iron glade
#

you don't even wanna spend 5 bucks on nitro

slate mortar
#

this sounds like a good opportunity for me

lethal python
#

how do i close an open inventory

slate mortar
#

why would i not accept that offer

fallow violet
#

fuck me

iron glade
#

.close()

slate mortar
iron glade
#

xd

humble tulip
#

Should i use BiMap<Integer, Inventory> or List<Inventory>

lethal python
#

ok so you ahve to use player

#

not inventory

iron glade
#

can you show more context?

humble tulip
iron glade
#

u can also kill the player

#

when he respawns his inventory is closed

slate mortar
#

-_-

fallow violet
humble tulip
eternal oxide
slate mortar
#

what did i expect anyway

humble tulip
#

But they also have a gui

iron glade
#

sry was just a joke

humble tulip
#

So i wanna be able to lookup which page was clicked

eternal oxide
#

For what reason?

slate mortar
#

i mean, list's are sorted ig

humble tulip
fallow violet
#

can you store inventory as a variable. Let a player open them and check the inventory in the click event?

humble tulip
#

Lookups*

maiden vapor
#

Don't ArrayList have O(1)? Or are you using a LinkedList?

fallow violet
#

its not in your case

slate mortar
#

i think he has multiple inventories as pages

eternal oxide
#

Not sure why you need to know an arbitrary index of an inventory

humble tulip
eternal oxide
#

I see no reason to know the "page"

humble tulip
#

Next and previous???

eternal oxide
#

You have the inventory, which is the only thing you shoudl need

slate mortar
#

the inventory is basically the page lol

eternal oxide
#

still no need, you have the stored so goign forwards/back is simple

humble tulip
#

How do i know its page 23?

eternal oxide
#

?paste

undone axleBOT
slate mortar
#

depends

#

by the title for example?

humble tulip
#

I dont wanna rely on anything specifically

#

Since i want it to be configurable

eternal oxide
#

no index needed

humble tulip
#

Yes but I'm using the inventories for storage as well

#

So there are storage slot and gui slots

fallow violet
slate mortar
eternal oxide
humble tulip
#

int index = pages.indexOf(inven);

spare marsh
#

I just created a new project and none of my maven dependencies will work. I went to past projects and even there it won't work... Not even just the spigot jar

humble tulip
#

Lol u use indexof

#

My question was whether i should use a bimap or list

#

Bimap would mean faster lookups

eternal oxide
#

you don;t need fast lookups

humble tulip
#

Since i have to lookup on each click

#

I do

#

Lots of pages and possibly lots of clicks

eternal oxide
#

You will never need a faster lookup when using a GUI than indexof

slate mortar
#

could it be that spigot or mc servers are down or have some problems today?

#

so many people having problems with retrieving dependencies

humble tulip
#

I'm probably trying to prematurely optimize so I'm not sure if indexof is sufficient

fallow violet
#

guys

Should i go to sleep or not?

slate mortar
#

sleep is for the weak

fallow violet
#

alright captain

slate mortar
#

🦜

#

god it's so sad i can't use my own server's emoji anymore

fallow violet
#

🏴‍☠️

fallow violet
slate mortar
#

🦆 this is now the only duck i can use

iron glade
#

lmao

fallow violet
slate mortar
#

knuff

#

you have bt installed right?

fallow violet
#

ja

spare marsh
#

Not BT

fallow violet
slate mortar
#

can you try deleting the cached stuff from it, and try to run 1.18.2?

#

i feel like it's broken

fallow violet
#

on my way

slate mortar
#

smart as i always said

fallow violet
#

youre the captain of the ship

slate mortar
#

yessir

fallow violet
#

only the .jar and the .cmd left

slate mortar
#

youre the one

slate mortar
#

i feel like that's not normal

fallow violet
#

lmao i deleted git

slate mortar
#

-_-

spare marsh
#

Thats weird

slate mortar
#

bt will install it afaik

spare marsh
#

oh well

#

I'll try tomorrow

fallow violet
#

what celina says

slate mortar
#

even my buildtools isnt working

iron glade
#

What is this bt for?

#

never used it

slate mortar
#

buildtools

#

decompiling/deobfuscating mc code

fallow violet
#

^

eternal oxide
#

?bt

undone axleBOT
iron glade
#

what would I want to decompile?

slate mortar
#

it's what paper does automatically when starting

fallow violet
#

So far the bt run is still going

slate mortar
#

thats why many people never head of it

fallow violet
slate mortar
#

i got no idea how

fallow violet
#

first warnings so far

slate mortar
#

i straight up get this:

[ERROR] Failed to execute goal net.md-5:specialsource-maven-plugin:1.2.3:remap (remap-members) on project spigot: Error creating remapped jar: Failure to find org.spigotmc:minecraft-server:csrg:maps-spigot-members:1.18.2-R0.1-SNAPSHOT in https://libraries.minecraft.net/ was cached in the local repository, resolution will not be reattempted until the update interval of minecraft-libraries has elapsed or updates are forced
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR]     mvn install:install-file -DgroupId=org.spigotmc -DartifactId=minecraft-server -Dversion=1.18.2-R0.1-SNAPSHOT -Dclassifier=maps-spigot-members -Dpackaging=csrg -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR]     mvn deploy:deploy-file -DgroupId=org.spigotmc -DartifactId=minecraft-server -Dversion=1.18.2-R0.1-SNAPSHOT -Dclassifier=maps-spigot-members -Dpackaging=csrg -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

etc etc

#

cant send ss because yea....

fallow violet
#

what is your start.cmd?

slate mortar
#

i dont have one

fallow violet
#

._.

#

then the command

slate mortar
#

i start it manually iwth java -jar BuildTools.jar --rev 1.18.2

#

as always

eternal oxide
slate mortar
#

i did try that as well

#

no difference

fallow violet
#

what java version?

#

idk if this make a diff

slate mortar
#

17

fallow violet
#

same

eternal oxide
#

are you SURE you used --remapped?

fallow violet
#

same command

fallow violet
#

Mine for example is "C:\Program Files\Java\jdk-17\bin\java.exe" -jar BuildTools.jar --rev 1.18.2 --remapped (DONT SAY ANYTHING ABOUT THE JAVA THING)

slate mortar
#

to test it out

#

same error

fallow violet
#

you pc

#

is trash

slate mortar
#

lmfao

#

so

#

does it work for you?

fallow violet
#

still running ._.

slate mortar
#

i see

eternal oxide
#

then your error makes no sense

#

or your buildtools run failed

slate mortar
#

i can run it and send you the log if you like

#

one sec

dark arrow
#

I am having Hardtime using NMS packages so is there any well defined documentation of it like spigot-api has?

fallow violet
#

my oπnion: Celina broke her pc

dark arrow
#

also why all the functions are of one or 2 letters its really annoying in nms

earnest forum
#

o pi nion?

#

ahahaha

#

i get it

eternal oxide
fallow violet
#

seconds warn block but still working @slate mortar

slate mortar
#

i hate dc

#

cant send files as well

fallow violet
#

you are lost

#

buy money to buy nitro

#

to boost

dark arrow
#

because of that i am unable to understande anything

fallow violet
slate mortar
#

my man

fallow violet
#

it worked btw

#

my bt

slate mortar
#

tf

eternal oxide
slate mortar
dark arrow
#

special source?

eternal oxide
#

BT ran fine here with --remapped

slate mortar
#

is it even complete tho?

eternal oxide
undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

slate mortar
#

so elgar... do you have any idea about this error

dark arrow
#

hmm

fallow violet
slate mortar
#

i never had this

slate mortar
#

my name change process

fallow violet
#

double lol

slate mortar
#

the old acc isnt even on this server anymore tho

fallow violet
#

xd

slate mortar
#

why does it say so

#

odd

fallow violet
#

maybe because the dm?

slate mortar
#

ah that was your dms

#

nvm

fallow violet
#

xd

slate mortar
#

thought from this server

#

why is my other acc online tho

#

WTF IS THIS

fallow violet
#

wait

#

what

#

@sullen dome

#

now its offline

#

weird

slate mortar
#

i'm confused

sturdy reef
#

i made this thread if anyone can help me out

eternal oxide
#

spigot-1.18.2-R0.1-SNAPSHOT-remapped.jar was built in my Spigot/Spigot-Server/target folder

fallow violet
#

same for me xd everything works

#

celina's pc just broken

eternal oxide
undone axleBOT
slate mortar
#

i did

#

well

#

knuff did

#

because i'm not verified

fallow violet
slate mortar
eternal oxide
#

use the paste site I linked

fallow violet
#

smart

eternal oxide
#

I want to see YOUR log

fallow violet
#

paste 5GB log

slate mortar
#

it was my log

#

i sent it per dm to him

#

so he can send it for me

eternal oxide
#

ok

fallow violet
#

you cannot update the log btw

slate mortar
#

i'm runningi t again rn after deleting all bt files

#

maybe it works? who knows

fallow violet
#

hopefully

slate mortar
#

apparently it does

#

i'm so confused

fallow violet
#

it works?

slate mortar
#

apparently

#

it says so

fallow violet
#

imagine not removing the cached data first

slate mortar
#

i'm just confused

slate mortar
#

when i never had to

#

in years

fallow violet
#

if i would have an error i would remove them

iron glade
#

What would be the death cause when I do

target.setHealth(target.getHealth() - 1);```

until the target dies?
slate mortar
#

CUSTOM

iron glade
#

fr?

slate mortar
#

or VOID

#

one of them

fallow violet
#

+1 on void

iron glade
#

aight will try

#

ty

#

Base Health of a player is 20?

#

If I remove 1 it removes half a heart?

slate mortar
#

yea

#

health is always in hp

#

where 1 hp is half a heart

iron glade
#

oki ty

eternal oxide
#

Your log says it was unable to find teh minecraft-server.jar from minecraft.net

slate mortar
#

i have no idea why

fallow violet
#

bro

eternal oxide
slate mortar
#

works now after deleting everything from the bt folder

eternal oxide
#

ok

iron glade
#

How would I go on teleporting everyone to a single player, but like not INTO him but, let's say, in a small radius of 5 blocks around him randomly?

slate mortar
# iron glade How would I go on teleporting everyone to a single player, but like not INTO him...
        for (Player player : Bukkit.getOnlinePlayers()) {
            if (player.getUniqueId() != targetPlayer.getUniqueId()) {
                int i = ThreadLocalRandom.current().nextInt(-5, 5);
                int x = targetPlayer.getLocation().getBlockX() + i;
                int z = targetPlayer.getLocation().getBlockZ() + i;
                int y = targetPlayer.getWorld().getHighestBlockYAt(x, z) + 1;
                player.teleport(new Location(targetPlayer.getWorld(), x, y, z));
            }
        }

out of my head, might work, might not work, idk

#

calculating the y in caves and with blocks above the location will need more calculations

iron glade
slate mortar
#

in caves and with blocks above, it'll teleport them to the highest block

iron glade
#

hm

#

I also don't know how I can test it as I dont have like 10 accounts

slate mortar
#

also out of my head, might work, might not

    private int getNextAirBlockYAbove(World world, int x, int y, int z) {
        Block b = world.getBlockAt(x, y, z);
        for (int i = 0; i < world.getMaxHeight(); i++) {
            if (b.getRelative(BlockFace.UP, i).getType() == Material.AIR)
                return y + i;
        }
    }```
#

you can set your server into offline mode for testing, and use MultiMC to launch into an offline account

#

if you dont own multiple accounts

iron glade
#

I wish there was like a tool that spawns like 10 dummies so that developers can test stuff

slate mortar
#

i mean

#

for fabric servers, there's Carpet

#

dunno if there exists similar stuff for spigot

iron glade
#

haven't seen anything yet

slate mortar
#

idk if those npc plugins would work for this

iron glade
#

Guess I'll use the offline thingy

slate mortar
#

that's the most efficient thing yea

#

i used that myself before i got myself a 2nd account for development tests

iron glade
#

I'm gonna try it out and report to you soon

slate mortar
# slate mortar also out of my head, might work, might not ```java private int getNextAirBlo...

this does include single-layer blocks tho, but i dont think this is a HUGE problem
but would be fixable with java private int getNextAirBlockYAbove(World world, int x, int y, int z) { Block b = world.getBlockAt(x, y, z); for (int i = 0; i < world.getMaxHeight(); i++) { if (b.getRelative(BlockFace.UP, i).getType() == Material.AIR && b.getRelative(BlockFace.UP, i + 1).getType() == Material.AIR){ return y + i; } } }

quaint mantle
#

use brackets my boi

slate mortar
#

why

quaint mantle
#

google code style requirements

slate mortar
#

-_-

#

edited, so you don't get angry

quaint mantle
#

Yay!

slate mortar
#

won't the compiler add those brackets automatically anyway?

iron glade
#

I'll try it out in a sec

#

currently busy getting like 4 launchers to start

slate mortar
#

lmfao

#

you can just test it with 2 players

#

lol

iron glade
#

I need at least 3

slate mortar
#

why

iron glade
#

I excluded the one executing the command

#

and the victim

#

doesn't make much sense teleporting him to himself xd

slate mortar
#

._.

#

you execute the command with player1, and teleport player2 to player1

#

whats wrong with this for testing

iron glade
#

idk

#

nothing

#

but it's too late anyway

#

lmfao

slate mortar
#

-_-

#

speedrunners be like

iron glade
#

people without friends be like

#

okay it seems to work

#

but haven't implemented the cave fix so far

dark arrow
#

is it possible to make a command which turns of and on the plugin

slate mortar
#

you can't turn on a plugin from itself while it's disabled obviously

iron glade
#

the command can't turn it back on as the plugin containing the command is off

#

you'd need something external I guess

slate mortar
#

you can technically just run the reload command, alltho that'd be kinda hacky

dark arrow
#

but i have seen many plugins with that command

#

we can toggle the plugin

slate mortar
#

they don't disable the plugin

#

they most likely disable certain features

dark arrow
#

it does not disables it but it makes the plugin useless

slate mortar
#

you can just have a boolean somewhere
set it to false to disable the plugin, true to enable it

and make features depend on it

iron glade
#

@slate mortar Next thing for the teleport thing would be that there can't be 2 player's on the same "random location" in the radius to the target

slate mortar
#

i don't

#

also i'm tired

slate mortar
#

you can make it calculate a double instead for x and y, which would include decimals

#

that's probably the easiest

#

so just double d = ThreadLocalRandom.current().nextDouble(-5.0D, 5.0D);

iron glade
#

I think that has to do it

#

Would be a bit more work to really get them an individual random spot I guess

slate mortar
#

depending on the player count, that'll make it less likely

slate mortar
#

my code was just a quick easy way

#

if you really want to make it efficient and ignore walls, ceilings etc, you'd need some math calculations that i can't provide myself

#

my math brain goes as far as this

drawTexture(matrices, this.x + this.width - (10 * scale), this.y - this.height, 0, flag ? 128 : 0, 8 * scale, 8 * scale, 256, 128);```
iron glade
#

there's another problem I found

#

let's say the radius is 5

#

and there are like 80 players

#

that wouldn't even be close to enough blocks for an individual block spot for everyone

slate mortar
#

increase the radius -_-

iron glade
#

ye ye but if it depends on the radius

#

so there has to be some clashing of people

golden kelp
#

eyo eminem pfp

slate mortar
#

you cannot really prevent that in a 100% rate

#

there is always the possibility of people clashing inside

iron glade
#

ye

slate mortar
#

that's how random factors work lol

iron glade
#

ikik

#

just saying

slate mortar
#

else i'd gamble the shit out of the world

iron glade
#

it's tbh not even that important that they don't clash

#

I think I'll leave it as it is

#

I'll make sure to credit you and everyone else who's gonna help me in the process of finishing it ^.^

slate mortar
#

may i ask in which context it'll be used? the teleport

iron glade
#

It's code is so trashy cause I just kept adding stuff since 2014

slate mortar
#

lol

iron glade
#

And I'm currently redoing the popular command where every player is teleported to a target

#

and I didn't want to have like 20 people standing inside each other

slate mortar
#

would be easier tho

iron glade
#

true

#

but the thingy with a small radius seems to work pretty good

#

I'll keep it

slate mortar
#

it'll, until youre in a cave, and the random pos is inside a wall

#

which will make them teleport way higher up

iron glade
#

Hm

#

There's gotta be a way to implement like a failsafe

#

that in that case those people just get tp'd to the target

slate mortar
#

sure

#

more math tho

iron glade
#

can't i just check

#

if their y value is bigger than y of target + radius

#

or smth like that

slate mortar
#

sure

#

but

iron glade
#

then they got tp'd to some nasty high position cause of walls or stuff

slate mortar
#

i'll send you an image in dm

west crag
#

how can i change world loot and world generation using plugin?(is it even possible? is yes then how?)

iron glade
quaint mantle
#

any way to make health appear like this?
1.5M and not like 1,60,000

slate mortar
quaint mantle
# slate mortar if i get it right ```java double d = 15.123456789; // hp example ...

I did something like this

if (tag.containsKey(boss)) {
                        if (!(boss.isDead())) {
                            Location l = boss.getLocation().add(0, 0.3, 0);
                            if (Math.round(boss.getHealth()) > 800000) {
                                name.setCustomName("§c☠ §bRevenant Horror §a" + Math.round(boss.getHealth() / 2) + "§c ❤");
                            } else if (boss.getHealth() >= 800000) {
                                name.setCustomName("§c☠ §bRevenant Horror §a" + Utilities.formatValue(Math.round(boss.getHealth()) / 2) + "§c ❤");
                            }```
#

will it work?

slate mortar
#

thanks discord

mortal hare
#

wtf is wrong with intellij

slate mortar
#

invalidate caches

mortal hare
#

i literally compiled dev build

#

5 mins ago

#

i did invalidate caches

slate mortar
#

intellij moment

mortal hare
#

it reindexed and it still persists

slate mortar
#

hm

mortal hare
#

its not spigot's problem for sure

#

i use paperweight-userdev, so its not really an issue from spigot

slate mortar
#

i dont use the paper-api, so no idea

mortal hare
#

its not about paper-api i use paper's nms

#

but it worked like 5 minutes ago

slate mortar
#

even less idea

slate mortar
mortal hare
#

i guess paper's repo fucked up smth

#

ok that's even more interesting

#

Intellij somehow ejected the gradle project from itself

#

and that's why import issues are happening

#

fixed.

quaint mantle
#

bro

quaint mantle
#

how do I add something like that?

#

the Slayer Quest
Sven Packmaster IV
Number of kills/ xp required to spawn da boss

tardy delta
#

if i'm using the h2 database dependency, do users have to download this themselves or should i shade it in the jar?

eternal oxide
#

use the libraries entry in the plugin.yml

mortal hare
#

iirc this is 1.16 api feature

quaint mantle
#

coding in version 1.1

#

👍

tardy delta
#

so these will be loaded from maven when enabling the plugin?

mortal hare
#

yes

eternal oxide
#

yes

#
libraries:
    - com.h2database:h2:1.3.159```
#

or whatever version you want to use

#

Thats just what iConomy5 uses. Its older

#

and simpler to use

wintry oxide
#

Hello, i'm trying to load a world here is the code:

String[] worldNames = { "", "_end", "nether"};
            World.Environment[] worldType = {World.Environment.NORMAL, World.Environment.THE_END, World.Environment.NETHER};

            for (int i = 0; i < worldNames.length; i ++) {
                int finalI = i;
                new Thread(() -> {
                    World world = new WorldCreator(game.getId()+worldNames[finalI])
                            .environment(worldType[finalI]).createWorld();
                    Bukkit.getServer().getWorlds().add(world);
                }).start();
                
                System.out.println(game.getId()+worldNames[i]);
            }

The proble is that when i load the world it take a lot of time and lags the whole lobby

eternal oxide
#

I do not believe you can load Worlds in a seperate Thread

#

but you will lag

#

and this line Bukkit.getServer().getWorlds().add(world); does nothing

#

um, are you trying to load vanilla worlds?

iron glade
#

Are comments with # still removed if added to config?

quaint mantle
#

bro is it me

eternal oxide
#

if you call save yes, unless you use config.options().copyDefaults().save

quaint mantle
#

or intellij

#

is taking forever

#

to check the maven dependcy

#

thing

iron glade
eternal oxide
#

yes

#

its a recent addition though

#

not back ported

#

its available in 1.17, not sure if 1.16

iron glade
#

so basically everytime I edit someting in the config I have to safe it via config.options().copyDefaults().save ?

eternal oxide
#

probably

#

teh copyDefaults copies over the comments

iron glade
#

hm I'll try it out and let you know

#

If it works as I expect

#

I'm quite unfamiliar with config stuff

mortal hare
iron glade
#

Good that they added it, was quite unhandy back in the day to keep those comments alive after changing stuff in the config

tardy delta
mortal hare
#

Man I'm often in existential crisis like Hamlet Shakespeare's — "To throw exception or not to, that's a question?"

eternal oxide
tardy delta
#

hmm thats not what i want then

eternal oxide
#

if you shade it its going to be there anyway

tardy delta
#

ill probably go with that

eternal oxide
#

shading seems pointless for a library

#

it is downloaded once. The first time the plugin loads

tardy delta
#

dunno if i'm actually shading it in my pom, i just added a dependency

#

or are dependencies without scope shaded automatically?

eternal oxide
#

if that depend is not "provided" then you are shading

tardy delta
#

ah

#

theres not really a difference then as both ways load the library anyway

eternal oxide
#

The biggest reason to use libraries is to keep your jar size small

snow compass
#

should #getExp() return 9.753487E-8 seams little broken to me.

#

i mean it should be from 1.0 and down

tardy delta
#

lets shade it i guess lol

snow compass
tardy delta
#

its only 3 MB with the shaded stuff included

snow compass
tardy delta
#

ye

quaint mantle
#

i needed a simple npc code

eternal oxide
#

citizens is simple to implement

quaint mantle
#

🤢🤢

#

guys anyone help?

#

I needed code no plugin

#

I create own npc

west crag
#
Bukkit.getScheduler().runTaskLater(this, () -> {
            Bukkit.createBossBar("Second", BarColor.RED, BarStyle.SOLID);
            event.getPlayer().setHealth(20);
            Location location = event.getBlock().getLocation();
            EntityType entityType = EntityType.values()[new Random().nextInt(EntityType.values().length)];
            event.getPlayer().getLocation().getWorld().spawnEntity(location, entityType);
        }, 100L);
#

why bossbar isnt working?

eternal oxide
#

you didn;t add any players to the bossbar

#

you actually did nothing with the boss bar after creating it

west crag
#

ummm
i want something like this :- when ever player break any block bossbar should be visible and show a countdown of 5 second and then random mob will spawn

#

so any tips?

#

how can i make this?

west crag
eternal oxide
#

I'd not use a bossbar

west crag
#

using flag?

eternal oxide
#

I'd just count down in a title

west crag
#

yea

eternal oxide
west crag
#

i want countdown using title

eternal oxide
#

each player would need their own bossbar

west crag
#

bossbar is for design only xD

west crag
#

countdown should display on bossbar title

eternal oxide
#

um, title and bossbar are separate things

west crag
#

okay lemme see this

eternal oxide
#

use one or the other

west crag
#

:/

eternal oxide
#

if BossBar you use a repeating timer with a counter. Update teh bossbar progress each time it fires

#

when it reaches zero you spawn the mob and cancel the task

rotund pond
snow compass
#

it will compile everything in hide path. I think every dependency you added.

iron glade
eternal oxide
#

call save separately

#

saveConfig()

celest nacelle
#

How do I get the JavaPlugin class of another plugin?

eternal oxide
#

Bukkit.getPlugin("pluginname")

#

well close

iron glade
eternal oxide
#

getPluginManagager() I think

tardy delta
#

ye and then .getPlugin()

eternal oxide
#

look it up 😉

celest nacelle
#

That returns the Plugin class though?

flat leaf
#

is there a master list of class name differences between the spigot mappings and mojang mappings?

eternal oxide
#

Well actually it returns the Plugins class which implements JavaPlugin

#
GroupManager gm = (GroupManager) Bukkit.getPluginManager().getPlugin("GroupManager");
JavaPlugin jp = Bukkit.getPluginManager().getPlugin("GroupManager");```are both valid
wintry oxide
eternal oxide
#

vanilla worlds are loaded by default

wintry oxide
#

i mean it is a vanilla world but is not the default one

eternal oxide
#

ah ok

wintry oxide
#

i need to create a world when a user issue a command

#

without any lag

eternal oxide
#

well, I'm 99% certain you can;t do it in a Thread

#

its unsafe

#

and you will not do it without lag

wintry oxide
#

tps goes down to 15

eternal oxide
#

Its mostly down to the power and performance of teh PC its running on

iron glade
wintry oxide
#
new WorldCreator(game.getId() + worldNames[i])
                        .environment(worldType[i]).createWorld();
``` is this way correct then?
eternal oxide
#

yes

wintry oxide
eternal oxide
#

Can;t help you on Paper. This is Spigot and paper does all kinds of Async funky stuff with worlds

wintry oxide
#

mm ok thanks

west crag
#

how to get location of block where player was standing while breaking another block

eternal oxide
#

Player.getLocation()

west crag
#

like this?

#

right?

eternal oxide
#

yes

west crag
#

its getting location of new block(where player is standing right now)

eternal oxide
#

it will get teh Location the player is at when the Block was broken

west crag
#

but then why mobs are spawning on players head?

eternal oxide
#

Do yoiu want teh block they were stood on?

west crag
#
Location location = event.getPlayer().getLocation();
            EntityType entityType = EntityType.values()[new Random().nextInt(EntityType.values().length)];
            event.getPlayer().getLocation().getWorld().spawnEntity(location, entityType);
eternal oxide
#

nope, your code is correct

west crag
#

but its spawning mobs on player head

#

like ender dragon ;-;

#

how can we survive that xD

eternal oxide
#

it will, because mobs collide

west crag
#

ah...

#

i havent tried this in survival but i have tried this in creative

#

and yea

#

fadeIn - time in ticks for titles to fade in. Defaults to 10. stay - time in ticks for titles to stay. Defaults to 70. fadeOut - time in ticks for titles to fade out. Defaults to 20.

#

defaults to 10 is what?

#

10 second or what?

#

i didnt get it

eternal oxide
#

10 ticks, It says ticks

sage dragon
eternal oxide
#

20 ticks to a second

west crag
#

ticks means?

#

ah..

#

ok...

#

thanks

#

and what about 100L?

#
Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("5 Seconds",null,);
        }, 100L);
#

like here

sacred mountain
west crag
#

100L delay

sacred mountain
#

20L ≈ 1s

west crag
sacred mountain
#

and you want the mob tos pawn in the block?

west crag
#

no

#

on the block

#

nvm i am very bad at explaining

#

thanks btw

#

i will try this by my own

#

:)

sacred mountain
#

or at the player

#

sorry my internet died

west crag
#

i want to spawn mob on block where player was standing before while breaking a block

sacred mountain
#

oh well then your code is right

#

as long as you have the blockbreakevent listener registered it will work

west crag
#

the block where player is standing

west crag
#

but where to add 1?

#

Y level right?

sacred mountain
#

LOL

iron glade
#

I'm editing the config of the plugin with

plugin.getConfig().options().setHeader(Arrays.asList("Header.."));
plugin.getConfig().addDefault("Path", "String");
plugin.getConfig().setComments("Path", Arrays.asList("Comments", "etc."));
plugin.getConfig().options().copyDefaults();
plugin.saveDefaultConfig();

But when I change one of the values it changes it in the file but doesn't update it ingame, even after reloading?

sacred mountain
#

yeah that should work, nice drawing btw

west crag
#

lol

proper notch
#

i come into this channel and all i see is a paint drawing of a dude on a block mining a block 😆

west crag
#

thanks

sacred mountain
#

just spawn the mob at the player.

west crag
#

but how can i add 1 in Y lvl?

#

Location location = event.getPlayer().getLocation();

iron glade
#

location.add(0, 1, 0);

west crag
#

0 will affect coords?

iron glade
#

0 adds nothing to x and z coordinates

west crag
#

ok.. lemme try

#

btw

#
    public void onBlockBreak(BlockBreakEvent event){
        event.getPlayer().setHealth(20);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("2 Seconds",null,0,20,0);
        }, 20L);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("1 Seconds",null,0,20,0);
        }, 20L);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("0 Seconds",null,0,20,0);
        }, 20L);

            Location location = event.getBlock().getLocation();
            location = location.add(0,1,0);
            EntityType entityType = EntityType.values()[new Random().nextInt(EntityType.values().length)];
            event.getPlayer().getLocation().getWorld().spawnEntity(location, entityType);

    }
#

is this good?

proper notch
#

Bear in mind all those tasks are going to run after 20 ticks, not 20 then 40 then 60.

Scheduling a task will not lock the current thread so they will all schedule immediately, not once the previous is finished.

iron glade
#

You can just do java Location location = event.getBlock().getLocation().add(0, 1, 0);

west crag
#

okay..

west crag
proper notch
#

yh

west crag
#

ok

#

ah...

#

when i break block then mob spawn then seconds start

#

;-;

iron glade
#

The code to spawn the mobs is outside of the scheduler

west crag
#

right?

proper notch
#

Yh so only the runnable of the task is what's run later as Minesuchti said.

#

You need to put the rest of your code inside of the runnable, otherwise it'll just run when the event happens.

iron glade
#

You have to put the spawn mob code inside of the last scheduler

west crag
#

ah....

#

ig i got it

#

and what about setTitle color?

#

can i use ChatColor?

#

or minecraft color codes

#
Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("\u00A703 Seconds",null,0,20,0);
        }, 20L);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("2 Seconds",null,0,20,0);
        }, 20L);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("1 Seconds",null,0,20,0);
        }, 40L);
        Bukkit.getScheduler().runTaskLater(this, () -> {
            event.getPlayer().sendTitle("Spawn!!!",null,0,20,0);
            Location location = event.getBlock().getLocation();
            location = location.add(0,1,0);
            EntityType entityType = EntityType.values()[new Random().nextInt(EntityType.values().length)];
            event.getPlayer().getLocation().getWorld().spawnEntity(location, entityType);
        }, 60L);
chrome beacon
#

Why so many schedulers

#

You only need one repeating task

proper notch
#

yh if you've got this many u should just repeat.

chrome beacon
#

?scheduling

undone axleBOT
west crag
vale delta
#

hello I have a question since last night we are on it how to put the faction name that we left with the animated name plugin thank you for your answer

proper notch
# west crag is it bad?

you can quite easily end up polluting the scheduler with too many tasks if you get used to doing it.

chrome beacon
vale delta
vale delta
chrome beacon
#

You will have to resend the entire chat to the player every time a color changes. This isn't good for performance

chrome beacon
west crag
#

i have to practice this

proper notch
#

so basically instead of having 4 tasks (1 for every 20 tick increment), have 1 repeating task that happens every 20 ticks and then cancel that task after 4 executions.

vale delta
chrome beacon
#

?

#

Better than what

#

Also this is the channel where you make plugins

vale delta
#

animated names

tardy delta
#

wondering whats wrong with the syntax

proper notch
#

could be that stuff is a keyword

#

Also holup you don't close the SQL statement

#

You're missing a ) at the end.

tardy delta
#

oh bruh

#

i hate write sql in strings

tall dragon
#

ur not the only one

rose marten
#

I wonder did someone make an object oriented sql wrapper?

tall dragon
#

yes

tardy delta
#

there are some libraries ye

proper notch
#

ORMs exist

tall dragon
#

but im not sure thats rlly better

#

its easier to understand

#

but more work

rose marten
proper notch
#

If you work with SQL in a framework like Spring ur gonna be working 100% through an orm and likely not writing most of your queries in SQL (unless you use something like flyway for db versioning + updates).

tardy delta
west crag
#

Thanks all of you for helping :)

proper notch
#

np gl :)

west crag
#

Hey the plugin I made was in 1.18.2

#

So if I tried to run that in other version so will it work?

tardy delta
#

should i save a location as a string in the database?

#

hmm thats probably going to give issues with the length

quaint mantle
#

so I was planning to remake hypixel slayers, and I need help with the score board, where the boss name and the amount of mobs killed required to spawn the boss will appear as well as the health showing in 1,65,000 and not in 1.5m format

#

the part below Slayer quest

#

is the counter thing

#

help pls 😔

earnest forum
#

like you want to make 3,000 3k?

#

google number abbrevations java

quaint mantle
#

from 400,000

#

to 400k

earnest forum
#

yes thats literally what i just said

#

just not the same example

quaint mantle
#

I dont see any tuts

earnest forum
#

or number formatting

tardy delta
#

does anyone knows what the max length for a world name is?

quaint mantle
# earnest forum or number formatting
if (!(boss.isDead())) {
                            Location l = boss.getLocation().add(0, 0.3, 0);
                            if (Math.round(boss.getHealth()) > 800000) {
                                name.setCustomName("§c☠ §bRevenant Horror §a" + Math.round(boss.getHealth() / 2) + "§c ❤");
                            } else if (boss.getHealth() >= 800000) {
                                name.setCustomName("§c☠ §bRevenant Horror §a" + Utilities.formatValue(Math.round(boss.getHealth()) / 2) + "§c ❤");
                            }
                            boss.getWorld().playEffect(boss.getLocation(), Effect.MAGIC_CRIT, 3);
                            name.teleport(l);
                            boss.getWorld().playEffect(boss.getLocation(), Effect.HEART, 2);```
#

will dis work?

#

only till / 2

#

so?

earnest forum
#

never done it before cant help ya

#

just wanted to give you some pointers

mortal hare
#

are the minecraft's NMS inventories stored in some kind of registry

#

or are the removal of the inventories handled by garbage collector after no references to that particular inventory exist

quaint mantle
#

I got ghost pinged

mortal hare
#

it should be platform dependant

#

at least in theory

tardy delta
#

ah

#

i was wondering how to save them in db

mortal hare
#

use VARCHAR

#

it is an indeterminate length string data type.

vocal cloud
#

I would cap it if you're storing in a db just in case

tardy delta
#

cap it?

#

what does that mean

quartz ember
#

Setting an upper limit to the string length.

tardy delta
#

ah

#

lets just use a varchar(20)

#

also whats the best way to create all tables in the database, im creating multiple preparedstatement rn?

vocal cloud
#

Do you need to use a prepared statement if you know what the statement is beforehand?

echo granite
#

Any android developers?

west crag
#

Can we get more hearts? Like this?

#

if yes then how? can we do this?

west crag
#

What kind of effect?

vivid hill
#

how do I add custom textures as ranks to the server?

vocal cloud
west crag
#

Okay...

#

Thanks

vivid hill
#

yeah I now but I cant give a player the rank then

static hollow
#

Why it is working on 1.16, but on 1.8 it can teleport player to water

Location searchingLoc = searchLocation(p.getWorld());

while (searchingLoc.getBlock().isLiquid())
{
    searchingLoc = searchLocation(p.getWorld());
}

searchingLoc.add(0, 1, 0);
vocal cloud
vivid hill
#

can I also code this ? Like when I do a command it gives a player this custom texture?

vocal cloud
#

Yes the name aspect at least

tardy delta
#

i saw people replacing weird chinese symbols

vivid hill
#

oh okey Like is there a server where I can get help with texture packs haha

sage patio
#

@distant basin

#

he mean how to wait 5 seconds between 2 tasks

eternal needle
humble tulip
#

You only do them once

#

You can even use regular statements

burnt terrace
humble tulip
#

Preparedstatements for getting and setting

tender shard
tardy delta
humble tulip
half bone
#

Is it possibile to access my plugin classes inside of patched spigot jar?

humble tulip
#

Statement.executequery(sql)

tardy delta
#

i have multiple queries for each table to generate

eternal needle
vocal cloud
#

Oh man that code could use some heavy optimization

tardy delta
#

time to create a gui class with clickevent consumers for eeach slot

#

@eternal needle why not using a switch in a switch?

#

kekw

eternal needle
#

i think at least

midnight shore
#

how can i make an item entity immune to lava burn?

harsh totem
#

if I have an itemStack that it's material is Enchanted_book does it glow or do I need to enchant it and hide it?

midnight shore
harsh totem
#

ok

midnight shore
#

however if you don't have any enchants it will translate to normal book ig

harsh totem
midnight shore
#

so i add the effect?

midnight shore
harsh totem
echo granite
#

any android developers?

midnight shore
harsh totem
#

ok

tardy delta
echo granite
#

@tardy delta It's a general development forum

harsh totem
echo granite
#

nope

harsh totem
#

??????

echo granite
#

Most people think that, it's false

harsh totem
#

k dude

tardy delta
echo granite
#

any android developers?

echo granite
harsh totem
echo granite
harsh totem
#

this server is for spigot

echo granite
#

lol

#

you can't counter what I said

harsh totem
#

????????????

#

well not my problem

#

bye

echo granite
#

when people spam "?" even though they know the opposite side is correct

#

this is literally so funny to see every time

vocal cloud
#

I mean you can ask if there are android devs here but it seems like there isn't

harsh totem
#

because it was dumb

echo granite
harsh totem
#

thats why i sent the ????

echo granite
#

I just need to wait

echo granite
harsh totem
#

you mock me to make yourself feel good and strong because you know you're not so you try to be toxic to make the illusion that you're not a loser

vocal cloud
#

Y'all need to chill

echo granite
harsh totem
#

I was chill until that

humble tulip
#

Does lava cause damage or does being on fire because of lava cause damage?

harsh totem
#

@vocal cloud you're right he's not worth it

#

bye

echo granite
#

the kids here must vanish

humble tulip
river oracle
#

He is indeed a horrendousentity

#

Hopefully he despawns

eternal oxide
#

You'll have to move far away for his chunk to unload

midnight shore
#

com.mongodb.MongoSocketReadException: Prematurely reached end of stream | Does anyone know how can i fix this error when i try to connect to MongoDB?

crimson scarab
#
public class Deaths_Acolyte {

    public static final Color COLOUR = Color.fromRGB(36, 40, 52);

    public ItemStack helmet() {
        ItemStack item = SkullCreator.itemFromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjU5MWM4OGY1OTc4ZmZiY2NkMjcyMDM5NmM3NTM0ZTBkNGVkMWI0NzViNmRmOGRhYjdjN2VjODFjZmE3NDA0ZSJ9fX0=");
        ItemMeta meta = item.getItemMeta();
        return item;
    }

    public ItemStack chestplate() {
        ItemStack item = new ItemStack(Material.LEATHER_CHESTPLATE);
        LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
        meta.setColor(COLOUR);
        item.setItemMeta(meta);
        return item;
    }

    public ItemStack leggings() {
        ItemStack item = new ItemStack(Material.LEATHER_LEGGINGS);
        LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
        meta.setColor(COLOUR);
        item.setItemMeta(meta);
        return item;
    }

    public ItemStack boots() {
        ItemStack item = new ItemStack(Material.LEATHER_BOOTS);
        LeatherArmorMeta meta = (LeatherArmorMeta) item.getItemMeta();
        meta.setColor(COLOUR);
        item.setItemMeta(meta);
        return item;
    }

}
#

i have some common operations that apply to all pieces such as colour, or other properties

#

how could i do this efficiently

ivory sleet
#

?kick @harsh totem inappropriate behavior

undone axleBOT
#

Done. That felt good.

tardy delta
#

heh

kindred valley
#

Hello, how can i place a a player's Perm to the scoreboard

#

i dont know how to use placeholder

ivory sleet
#

I mean COLOUR there is pretty much a constant tho

midnight shore
crimson scarab
#

for future use really i plan to add itemlore + enchantments

#
   final Color COLOUR = Color.fromRGB(36, 40, 52);

this better?

ivory sleet
#

Nah

#

Keep it static final

tardy delta
#

why is const still a reserved keyword but still not in use 🤷

harsh totem
#

🤨

ivory sleet
harsh totem
#

Ok dude

tardy delta
#

🤦

#

you were kicked lol

robust zenith
#

Do you have some tips to learn java for beginners? Some paths or advices

ivory sleet
#

Yeah, don’t dive to deep into stuff at first, focus on learning object orientation and its concepts as well as Java first

harsh totem
tardy delta
#

fun

undone axleBOT
robust zenith
ivory sleet
#

That’s a very good question

kindred valley
ivory sleet
#

It doesn’t have an absolute answer

harsh totem
ivory sleet
#

But once you can understand how for instance spigot api works then you pretty much know the sufficient knowledge @robust zenith (with that being said, also being able to create something similar to spigot api in addition)

left swift
#

Im trying to publish my library using github packages, but I have some errors
build gradle publishing

publishing {
    repositories {
        maven {
            name = "GitHubPackages"
            url = uri("https://maven.pkg.github.com/TheTuso/xCore")
            credentials {
                username = "TheTuso"
                password = "token here"
            }
        }
    }
    publications {
        register<MavenPublication>("gpr") {
            from(components["java"])
        }
    }
}```error```fix
Execution failed for task ':publishGprPublicationToGitHubPackagesRepository'.
> Failed to publish publication 'gpr' to repository 'GitHubPackages'
   > Could not PUT 'https://maven.pkg.github.com/TheTuso/xCore/pl/tuso/core/xCore/1.0/xCore-1.0.pom'. Received status code 422 from server: Unprocessable Entity```info from the link```fix
maven package "pl.tuso.core.xCore" does not exist under owner "TheTuso"```
kindred valley
# robust zenith What is NECESSARY to understand?

(Beginning) Understanding of Object Oriented, Lists, Methods, Inheritence and Polymorphism, Class Types, Packages, JRE
(Functional) Lambda Functions, Threading and Concurrency
(Corporate) You actually being god in this phase.

crimson scarab
#

how can i check if LeatherArmorMeta meta = (LeatherArmorMeta) piece.getItemMeta(); is not null

tardy delta
#

god: you own this discord

ivory sleet
#

Md5 sunglasso

kindred valley
tardy delta
#

also why are people thinking that there are funny by not having a pfp

#

alex will see a black circle on his light mode lol

summer scroll
#

ItemStack#getItemMeta is nullable iirc

crimson scarab
harsh totem
tardy delta
#

some items dont have a meta but iirc leather armor has a meta

summer scroll
#

Yup they do

kindred valley
#

to being not dmed

harsh totem
summer scroll
#

only air maybe

tardy delta
#

air

harsh totem
#

Air is null

#

Iirc

tardy delta
#

air is new ItemStack(Material.AIR)

harsh totem
#

Yeah but you can use null instead of that in many cases

tardy delta
#

i 1.16 i sometimes got air and sometimes null from empty slots

summer scroll
#

it's pretty incosistent

chrome beacon
#

^

#

Internally AIR is an ItemStack wrapped around null

crimson scarab
#
public class Deaths_Acolyte {

    private static final Color COLOUR = Color.fromRGB(36, 40, 52);
    public static ArrayList<ItemStack> pieces = new ArrayList<ItemStack>();

    public ItemStack helmet() {
        ItemStack item = SkullCreator.itemFromBase64("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjU5MWM4OGY1OTc4ZmZiY2NkMjcyMDM5NmM3NTM0ZTBkNGVkMWI0NzViNmRmOGRhYjdjN2VjODFjZmE3NDA0ZSJ9fX0=");
        pieces.add(item);
        return item;
    }

    public ItemStack chestplate() {
        ItemStack item = new ItemStack(Material.LEATHER_CHESTPLATE);
        pieces.add(item);
        return item;
    }

    public ItemStack leggings() {
        ItemStack item = new ItemStack(Material.LEATHER_LEGGINGS);
        pieces.add(item);
        return item;
    }

    public ItemStack boots() {
        ItemStack item = new ItemStack(Material.LEATHER_BOOTS);
        pieces.add(item);
        return item;
    }

    static void properties() {
        for (ItemStack piece : pieces) {
            LeatherArmorMeta meta = (LeatherArmorMeta) piece.getItemMeta();
            if (meta != null) {
                meta.setColor(COLOUR);
                piece.setItemMeta(meta);
            }
        }
    }
}

where should properties be called?

tardy delta
#

ah i thought it was fixed in later versions

harsh totem
#

Does anyone know how to make custom enchants or has a good tutorial? I haven't found one

misty current
#

is it "safe" to store entity instances or can they change while the server is running?

summer scroll
distant fern
#

Just a simple question.

Inventory CzarnaMateria = Bukkit.createInventory(null, 9, "§d§lSKLEP ZA ANTYMATERIE");
                        ItemStack elytra = new ItemStack(Material.ELYTRA);
                        ItemMeta meta1 = elytra.getItemMeta();
                        List<String> lore = new ArrayList<>();
                        lore.add("§dTajemnicza elytra dająca Uzbrojenie Klaty");
                        lore.add("   ");
                        meta1.setLore(lore);
                        meta1.setDisplayName("§d§lELYTRA Z ANTYMATERI");
                        elytra.setItemMeta(meta1);

When I have an elytra i want to give her an armor stats: =+8
How to do it?

tardy delta
chrome beacon
crimson scarab
#

but where do i call properties?

distant fern
#

ho to set Armor stat to elytra?

misty current
#

iirc metadata can implement Attributable

#

run an instanceof check

#

and cast

#

then you can use its methods

#

to get and set attributes

tardy delta
#
public class DeathsAcolyte {
  private static final List<ItemStack> pieces = Arrays.asList(
  SkullCreator.fromBase64(/* bla bla*/),
  createArmor(Material.LEATHER_HELM),
  createArmor(MATERIAL.LEATHER_BOOTS),
  // etc
)

  private static void createArmor(Material armour) {
    var stack = new ItemStack(armour);
    var leatherMeta(LeatherArmorMeta)armour.getItemMeta();
    leatherMeta.setColor(Color.fromRGB(36, 40, 52));
    armour.setMeta(leathermeta);
    return armour;
  }
}```
misty current
#

also, use ChatColor instead of § and don't use TitleCase for variable names

distant fern
#

Just a simple question.

Inventory CzarnaMateria = Bukkit.createInventory(null, 9, "§d§lSKLEP ZA ANTYMATERIE");
                        ItemStack elytra = new ItemStack(Material.ELYTRA);
                        ItemMeta meta1 = elytra.getItemMeta();
                        List<String> lore = new ArrayList<>();
                        lore.add("§dTajemnicza elytra dająca Uzbrojenie Klaty");
                        lore.add("   ");
                        meta1.setLore(lore);
                        meta1.setDisplayName("§d§lELYTRA Z ANTYMATERI");
                        elytra.setItemMeta(meta1);

When I have an elytra i want to give her an armor stats: =+8
How to do it?

misty current
#

nefefer read what i wrote just 2 seconds ago

distant fern
#

pffff

#

i dont get what you wrote

misty current
#

then ask for explainations

misty current
#

cast the itemmeta of the elytra to Attributable

tardy delta
#

i was too lazy to type it out