#help-development

1 messages Β· Page 424 of 1

winged anvil
#

?paste

undone axleBOT
winged anvil
#

jumpscare

icy beacon
#

text wall 😭

quaint mantle
#

Sorry

echo basalt
#

mans making his own CompletableFuture

#

fuck is this

quaint mantle
#

immediately just sweeped my post away lol.

quaint mantle
#

πŸ’€

signal kettle
#

.

winged anvil
#

wait i got you

quaint mantle
#

Let me move mine to a thread

#

Sorry

#

its fine.

echo basalt
quaint mantle
#

how do i run mysql??

#

Making an event wait for a task

winged anvil
#

i actually dont have you

#

cause i use my mac and i do brew services start mysql

quaint mantle
#

lol.

#

okay.

signal kettle
livid dove
#

What exactly do you want in dumb dumb list form,

halcyon hemlock
#

what you trying to do lmao

#

tell me ill make it for u

signal kettle
#

Okay so I want to make that if grass_block is on fire then change this grass_block on to another one after certain of time, like the BlockBurnEvent make but BlockBurnEvent will not work with blocks that not already with that future

pseudo hazel
#

it seems like getblock should return the block you clicked but you think its the fire block itself?

subtle light
#

anyone know how to make an item look enchanted but its not

#

so like it has the glint but has no enchanment lore thing

halcyon hemlock
#

add enchant and itemflag

#

ItemStack item = ...
ItemMeta meta = item.getItemMeta();
meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);

livid dove
subtle light
halcyon hemlock
# subtle light where do i do this
        ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
        ItemMeta meta = item.getItemMeta();
        meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
        meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
#

where you want to want glint

#

or maybe when u give player an item

subtle light
#

like in a command?

#

should i paste that in a command or what

signal kettle
# pseudo hazel it seems like getblock should return the block you clicked but you think its the...

yes getblock take fire of block not the one under it change the fire not block under, I get how to change location of that:

    @EventHandler
    public void OnBlockIgnite(final BlockIgniteEvent event) {
        Block block = event.getBlock();
        Location location = block.getLocation();
        location.subtract(0, 1, 0);


        if (event.getCause() != BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL) return;
        OraxenBlocks.place("ash_block", location);
    }
}

But can't get idea how now I can check if that block under that fire is a dirt

remote swallow
halcyon hemlock
#

yes

halcyon hemlock
#

u figure the rest out

subtle light
#

ok

tender shard
#

I just use a custom enchantment for glow

#

So it doesnt conflict with any additional actual enchantments

halcyon hemlock
#

true

subtle light
#

is it in server file configs or smth

halcyon hemlock
#

how do you create custom enchantments nowadays? didn't it get deprecated (old way)

pseudo hazel
tender shard
winged anvil
#

ok so i really have to close my server, drag over the remapped jar and then boot the server back up?

remote swallow
#

my brain isnt working fully, so i just need someone to confirm this
Immutable is the thing where you can pass something, modify it and not need to return it right? and then ItemMetas are immutable

halcyon hemlock
#

with plugin manager

winged anvil
#

i am not using intellji

halcyon hemlock
#

then u can compile and then reload the plugin

halcyon hemlock
winged anvil
#

i just got away from it tho 😦

livid dove
#

*-1 y

signal kettle
#

srry for time consum

remote swallow
icy beacon
#

is there a way to completely hide an entity's name

#

i'm trying to flip an entity by making it dinnerbone

#

but when i hover over the entity i can see its name

#

entity.setCustomNameVisible(false); only makes it so that it's not shown when it's not hovered

livid dove
#

Only a smidge though

quiet ice
#

Enchantments are crazy hard to do right

icy beacon
#

yeah

#

they are fucking disgusting

#

can i promote my custom enchantment plugin now

pseudo hazel
#

yeah I was about to say, if its hard there is usually a library for it

quiet ice
#

Although I myself got out lucky due to the CE plugin I am maintaining is a bit cheating in this regard

icy beacon
#

i don't want to work on my ce plugin but it's gone too far i can't stop

quiet ice
#

The only "bug" I have is some claim protection plugins not working properly

And the anvil, oh the anvils.

icy beacon
#

imo the anvil was the hardest to get right

quiet ice
#

But just not registering the enchantments to bukkit works nicely

icy beacon
#

i had to rewrite it like 5 times

pseudo hazel
#

yeah no f anvils

icy beacon
quiet ice
#

Yep - the enchantments don't really exist

icy beacon
#

do you just lore-pdc them

quiet ice
#

Yeah ... mainly the former because the plugin stems from 1.8 days

icy beacon
#

i have so many obs videos of me making progress on that plugin back when i was coding it in 1.8

quiet ice
#

I did look into just slowly converting everything into PDC but opted not to

icy beacon
#

but even before i released it i recoded it in 1.17 lmao

quiet ice
#

I only forked the plugin after spigot broke how lores are stored back in 1.15.0

icy beacon
#

damn yours has almost 30k downloads

#

mine looks sad now lmao

undone yarrow
#
        ItemStack item = pHandler.LootBlock(p, blockLoc);
        Random r = new Random();
        p.sendMessage(LootMessages[r.nextInt(LootMessages.length)] + item.getItemMeta().getDisplayName() + "!");

Why does this send an empty item?
The string is just "You looted !"

#

The random string works

#

but the item doesn't

icy beacon
#

are you coding in c# somehow

#

what are these naming convs

#

but other than that the item might just not have a display name ig

quiet ice
#

there is just one inaccuracy when it comes to naming conventions

icy beacon
#

but it hurts the eyes instantly

undone yarrow
quiet ice
#

Well perhaps 2 inaccuracies and one blunder if I put it more bluntly

haughty storm
#

Would it be possible to give any mob the ai of a wolf, meaning it fighs for you and follows you. I'm trying to give the player the ability to basically turn every mob into a marionette and make that marionette behave like a wolf would

icy beacon
icy beacon
undone yarrow
icy beacon
quiet ice
undone yarrow
undone yarrow
#

Well

quiet ice
undone yarrow
#

What do you mean with custom name

quiet ice
#

Well I take it as a no.

undone yarrow
#

As in, custom name via anvil, or custom name via lang file

quiet ice
#

Ugh - I am afraid I have to tell you something

#

I really hoped it would never come to it, but I guess some things have to happen: You need to use bungee-chat.

undone yarrow
#

No

quiet ice
#

Then adventure it is!

#

Otherwise you are out of options

#

You can't send translateable components that [Player#sendMessage] way

undone yarrow
#

Ill just ask AI

quiet ice
#

AI will not be aware of your issue

#

Your issue is that you want to send a translation component @undone yarrow

undone yarrow
#

Or Ill just look it up

quiet ice
#

Therefore you need to use components: So either use Bungee-chat or Adventure

#

of course you can encode the json yourself but please don't.

#

And Adventure is off the table judging by the spigot's paper police that will come knocking any moment now...

undone yarrow
#

How can it be so difficult to get the name of an item

quiet ice
#

Languages?

undone yarrow
#

Fuck languages

#

Only English language

#

People who join the server'll have to switch to en_us anyways as that's what the resource pack uses

quiet ice
#

The server only knows the I18N name .. so it'll be something like itemstack.name.diamond_sword (I made that up)

undone yarrow
#

Hmm

quiet ice
#

Although to be honest, providing I18N to plugins is not that hard...

#

It's just something you need to do from day 1

undone yarrow
#

I'll just say they found an item

quiet ice
#

Alternatively you can just hard-code the name in the loot table

undone yarrow
#

True, but Im also working with custom model data and custom items

#

so it's just going to get harder

quiet ice
#

by setting a custom name and resetting the chat colors or the name before (so it'll not be cursive)

undone yarrow
#

Plus it's going to be a lot of different items eventually

#

Oh crap, now that I think of it, I need my plugin to use custommodeldata. How can I specify custom model data when using a command to specify an item?

#

Currently Im using this to add a particle and item to a block, though how would I also include custommodeldata when specifying an item?

 case "add" -> {
                if (args.length == 4) {
                    // convert args[1] to particle
                    Particle particle = validParticles.contains(args[1].toUpperCase()) ? Particle.valueOf(args[1].toUpperCase()) : Particle.ASH;
                    // convert args[2] to int
                    int cooldown = Integer.parseInt(args[2]);

                    // convert args[3] to List<ItemStack>
                    List<ItemStack> items = new ArrayList<>();
                    String[] itemStrings = args[3].split(",");
                    for (String itemString : itemStrings) {
                        Material material = Material.matchMaterial(itemString.trim());
                        if (material != null) {
                            ItemStack item = new ItemStack(material);
                            items.add(item);
                        }
                    }
                    ChestObject chest = new ChestObject(false, blockLoc, particle, cooldown, items);
                    pHandler.AddLoc(chest, sender);
                    return true;
                }```
#

The command looks something like /sc add SCRAPE 5 sand,dirt,orange_dye

#

and it needs to become /sc add SCRAPE 5 sand{CustomModelData:4},dirt{CustomModelData:200},orange_dye

winged anvil
#

import org.bukkit.craftbukkit.v1_19_R2.CraftServer the R2 is means this is 1.19.2?

eternal oxide
#

no

#

R2 is the revision of the code base

winged anvil
#

ok well i think ive messed up my versions or something cause my nms is not working as intended

#
        ServerGamePacketListenerImpl connection = ((CraftPlayer) player).getHandle().connection;
        connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc));
        connection.send(new ClientboundAddPlayerPacket(npc));
        connection.send(new ClientboundRotateHeadPacket(npc, (byte) (npc.getBukkitYaw() * 256 / 360)));
}``` I'm not sure if ClientboundAddPlayerPacket is the correct packet for sending the physical player
eternal oxide
#

1.19.1 = R1, 1.19.2 & 1.19.3 = R2, 1.19.4 = R3

winged anvil
#

ok perfect

young knoll
#

Are you telling me you didn't rewrite the entire anvil code for custom enchants?

haughty storm
#

I am creating a team and putting the player and an entity inside, but the entity still can and will attack the player

ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getNewScoreboard();
team = board.registerNewTeam(getPlayer().getName() + " -- " + getPlayer().getUniqueId());

team.addEntry(getPlayer().getUniqueId().toString());
team.setDisplayName("display name");
team.setCanSeeFriendlyInvisibles(true);
team.setAllowFriendlyFire(false);
team.addEntry(entity.getUniqueId().toString());
eternal oxide
#

teams do not prevent agro

pseudo hazel
#

afaik entities don't give a shit about teams

eternal oxide
#

you alkso have to set them to the same team

haughty storm
eternal oxide
#

thats between players, pvp

haughty storm
haughty storm
pseudo hazel
#

yeah , normal entities like monsters dont follow team logic

haughty storm
#

Then how could I make them not being able to attack the player

pseudo hazel
#

I have no clue srry

analog thicket
#

Yo, i need some thinking juice from someone. So i'm trying to make multiple lines in a "Hologram", any idea how i would start of?

pseudo hazel
#

make multiple armor stands under each other

tawdry parcel
pseudo hazel
#

iirc spacing them out by 0.25 will make them fit perfectly as though they are 2 lines together

#

check if its null before you ban them?

#

also if you read the error you will know what is null specifically

ancient plank
#

I've never met anyone named null in my life

pseudo hazel
#

exactly

tall dragon
pseudo hazel
#

well

tall dragon
#

if i ever have them modCheck

pseudo hazel
#

then he will always be returned early

tall dragon
#

PepeLaugh yea true

winged anvil
#

the blank text above the head

tardy delta
#

is chatgpt broken?

pseudo hazel
#

when is it not

tardy delta
#

cant submit anything

tall dragon
#

ye i cant either

pseudo hazel
#

they are at capacity

#

try to relog

#

it will show that its full

#

just buy the upgrade 🀷

smoky oak
#

can someone explain to me how to depend on a plugin using maven? There's no explicit <dependency> tags in the readme but it does have specific api events

quaint mantle
smoky oak
hazy parrot
#

don't use system scope, its deprecated

quaint mantle
hazy parrot
#

use jitpack (if on github) or mvn install it

quaint mantle
smoky oak
# hazy parrot use jitpack (if on github) or mvn install it

the project is on github hence me being a bit annoyed about this message
Could not find artifact com.github.nulli0n:ExcellentCrates-spigot:jar:master-SNAPSHOT in jitpack.io
The website says using 'master-SHAPSHOT' just grabs latest but apparantly it doesnt

compact haven
#

system scopes aren’t meant for what you are using it for, guaranteed

quaint mantle
#

That synchronizes with his github project

#

It's a paid service

smoky oak
#

srsly

quaint mantle
#

Yes

smoky oak
#

alright let me rephrase my question

#

how do i maven install a plugin as dependency

#

@hazy parrot

#

you said using system is deprecated

compact haven
#

There’s an install-file command

smoky oak
#

i mean the issue i have is importing it in the pom

hazy parrot
compact haven
#

Since when was jitpack a paid service btw

hazy parrot
compact haven
#

because it’s literally been free and available for any public GitHub repo since I knew of it

quaint mantle
smoky oak
#

and i do have the repo jitpack thing if that matters

hazy parrot
smoky oak
#

couldnt find

quaint mantle
smoky oak
#

the frustrating thing is that to the best of my knowledge jitpack does find the user, and i did everyhting as described

#

plus theres no requirement for it to have a release

#

so why isnt master-SNAPSHOT as version working?

humble tulip
smoky oak
#

what do u think ive been tryina do here

#

im here cuz that aint working

humble tulip
#

@smoky oak the jitpack build is not building

tardy delta
#

jitpack is nice to pull from github

smoky oak
#

how do i fix that

winged anvil
quaint mantle
#

Instead of ExcellentCrates-spigot

smoky oak
#

auth faile

quaint mantle
smoky oak
#

where

#

couldnt find artifact

#

whats the repo?

remote swallow
#

might need to mvn install it urself

smoky oak
#

i mean the repo i have to put into <repositories>

remote swallow
#

yeah i dont see a repo

#

the api or the plugin isnt hosted anywhere that you can download it/add it to ur project easily

smoky oak
#

how would i shade that locally then? Yall said i shouldnt use system scope

#

i mean

remote swallow
#

one moment

smoky oak
#

the plugin is on spigotmc

smoky oak
#

lol ofc its alex blog again

quaint mantle
smoky oak
#

query

#

where do i run mvn

#

cmd doesnt have it

remote swallow
#

cmd, gotta install maven first

smoky oak
#

?maven

undone axleBOT
smoky oak
#

bruh ive been scammed

#

the link saying install leads to spigot

remote swallow
#

if u give me like 5 min i can stick it on a repo

quaint mantle
smoky oak
#

can i make it spit out the local maven repo path?

#

to make sure it points to .m2?

#

nvmind found it

#

.........uuuummm
I installed the jar file with maven. It's now telling me that a dependency of the file im trying to install couldn't be obtained

remote swallow
#

how is the plugin so decent but the code is so bad

remote swallow
smoky oak
#

like in the blog

#

mvn install:install-file -Dfile=D:\Server\plugins\ExcellentCrates-4.1.6.jar -DgroupId=com.github.nulli0n -DartifactId=ExcellentCrates -Dversion=4.1.6 -Dpackaging=ja

#

dont tell me i need to do this for every dependency

remote swallow
#

check in USERHOME/.m2/com/github/nulli0n/ExcellentCrates

#

see if the jar exists

smoky oak
#

sometimes i hate windows

#

'cant find userhome'

remote swallow
#

make it whatever ur userhome is

#

saw the D:\ and didnt know if anything else was different

smoky oak
#

its complaining about not able to access the dependency now

quaint mantle
#

Userhome is not a path variable

#

Try using HOMEPATH

#

Or USERPROFILE

patent socket
#

I have this code in my command trigger. However, the p is red in @p: Bukkit.selectEntities(sender, β€œ@p”);

smoky oak
torn shuttle
#

real quick which updated added the ability to add comments to configuration files again?

#

was it 1.19?

smoky oak
#

like

#

with spigot api

torn shuttle
#

with spigot

#

yeah

quaint mantle
#

I don't think it's possible, I think you can only use the header comment

smoky oak
#

idfk, i just did comments manually

#

even if

#

i/o still exists

torn shuttle
#

it's possible as of recently

#

I'm using it

#

I just forgot it isn't there for older versions

#

I think 1.18.2 has it at the very least

quaint mantle
#

Are you realling telling me that yml of spigotmc now supports comments?

torn shuttle
#

yep

quaint mantle
#

No way

#

Gotta see it

torn shuttle
quaint mantle
#

πŸ’€

limpid nexus
#

pets magma's beard.

torn shuttle
#

bro

torn shuttle
smoky oak
torn shuttle
#

there it is

#

there's my boy

limpid nexus
quaint mantle
#

We finally got

#

COMMENTS ON YAML

torn shuttle
#

she's a beaut

#

look at this puppy it can write so many comments

worldly ingot
limpid nexus
#

I think magma is having a slight moment.

#

Next version of elite mobs is going to have yaml comments up the wazoo

torn shuttle
#

you mean the version from a week ago

limpid nexus
#

hahah

torn shuttle
#

I'm just patching the fact I forgot older versions don't have it

quaint mantle
# torn shuttle she's a beaut

I've found you can actually use FileConfiguration#parseComments which parses a boolean as argument and by default is true

#

πŸ’€

torn shuttle
#

love me some comments boys

remote swallow
#

i cannot lie

torn shuttle
#

you'll be happy to know that's one file of

limpid nexus
#

Jesus magma, comments much?

smoky oak
# torn shuttle she's a beaut

can i assume that it wont throw exceptions if run on older software cuz of that version checker? When was that introduced?

torn shuttle
#

16

#

and not the largest

#

nor even the whole file

#

good

#

now let me flip this switch

#

I should find a way to count how many files this plugin has anyway

#

I have no clue

quaint mantle
#

Now it will make sense to shade spigotmc in your plugin so you can use configuration comments

#

😈

#

Plus standalone plugin

#

All pluses

smoky oak
torn shuttle
cobalt thorn
#
           FileConfiguration storage = it.zerotwo.moneyprinter.MoneyPrinter.getStorage();

            storage.set("moneyprinter." + moneyPrinter + ".UUID", moneyPrinter.toString());
            try {
                storage.save("storage.yml");
                event.getPlayer().sendMessage("Registred");
            } catch (Exception e) {

            }

Hi, i don't know why but it doesn't save

quaint mantle
#

The purple devil smiling face is the best emoji an human could have ever create

torn shuttle
#

alright i'm downloading from remote

#

quick

#

everyone place your bets, how many files are in the configuration folder of my plugin?

limpid nexus
torn shuttle
#

I'm going to guess 2k

limpid nexus
#

42

torn shuttle
#

this is good, it's still calculating the size

#

ok huh the transfer says it's going to take 1h

limpid nexus
#

The number 42 is, in The Hitchhiker's Guide to the Galaxy by Douglas Adams, the "Answer to the Ultimate Question of Life, the Universe, and Everything," calculated by an enormous supercomputer named Deep Thought over a period of 7.5 million years.

torn shuttle
#

yes

quaint mantle
torn shuttle
#

ok maybe more than 2k

limpid nexus
#

Dont you have a full version set up on matecraft?

torn shuttle
eternal oxide
torn shuttle
#

there's something like 50+ subfolders

#

actually come to think of it

#

there's probably over 100 subfolders

limpid nexus
torn shuttle
#

probably

limpid nexus
#

Also I cant type for beans tonight

torn shuttle
#

yo vert did you see my latest amazing top tier video

limpid nexus
#

link?

torn shuttle
#

ok we're about 1/3 done according to the preview and there's already 411 files

limpid nexus
#

I try and keep up where i can but get a bit bogged down.

torn shuttle
#

wow I can't believe you haven't seen it, it's the only thing worth seeing

#

you'll be pulling your eyes out of your sockets after you see it because you'll be done with seeing in general, there will be no point to it

#

just look my name up I don't want to self-promote

#

we are up to 69 folders

limpid nexus
#

Nice

haughty storm
#

How can I make it thundering in a world. World#setThundering(true) doesn't seem to work for me

limpid nexus
#

OMG THE BEARD.

torn shuttle
#

that's what they all say

torn shuttle
smoky oak
#

deserts dont get rain

haughty storm
#

I was in a plains biome

limpid nexus
#

The random events from Rs were so janky

torn shuttle
#

true + real

#

they were actually just antibot measures, fun fact

tawny remnant
eternal oxide
#

set teh weather first

torn shuttle
#

mana.mana oh no

tawny remnant
#

what?

torn shuttle
limpid nexus
torn shuttle
#

and they were rare enough that they weren't that much of an issue anyhow

limpid nexus
torn shuttle
#

I even recreated the ent one specifically

tawny remnant
#

so do you know why it aint work or no?

limpid nexus
torn shuttle
#

I think it's a 1/10000 chance of spawning two vexes

limpid nexus
#

build it out of iron bars

torn shuttle
#

when destroying log blocks

tawny remnant
#

WHAT DOES THIS ALL MEAN?!?! πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯

tardy delta
#

satan's wishes are granted

torn shuttle
limpid nexus
#

My answer to everything

#

haha give a scrap about

ancient plank
#

I brute force everything I do

torn shuttle
limpid nexus
#

How hard are the enchantment bosses?

torn shuttle
#

tbh I find them very enjoyable and rarely die to them so... probably quite hard for the average non-chad gamer

ancient plank
#

Me, a perfectionist who enjoys stupidly difficult challenges

torn shuttle
ancient plank
#

I played a multiplayer rogue like which had runes that amplified my damage but only when I wore no armor or anything defensive

#

So the whole time I played like an elden ring player

torn shuttle
#

glass cannon builds can be fun

#

risk of rain 2 has a few ways of doing it that are a lot of fun

#

there's a cursed item that doubles your damage and halves your health

#

and it stacks as much as you want

ancient plank
#

Ye

#

Blue items go brrrr

torn shuttle
#

not all blue items are that fun unfortunately

patent socket
#

When I use Bukkit.selectEntities, can I use something like @a[tag=foo]?

#

If not, how can I?

undone axleBOT
tardy delta
#

yes

golden turret
#

how can I create hitboxes like this?

terse ore
#

mods

golden turret
#

I dont think it is a mod

terse ore
#

it is create mod iirc

golden turret
#

it cant be

#

nooooooooooo

#

I always see this with vanilla blocks

#

I dont think it is a mod

terse ore
golden turret
#

I need it to make the player walk in water

worldly ingot
#

Yeah, that's the create mod

terse ore
golden turret
#

noooooooooooooooooooooooooooooooo

terse ore
#

i think that is not a vanilla block

golden turret
#

btw

#

this is my code

#

It makes me float in the water

terse ore
#

?

golden turret
#

but I can barely move

#

I want the player to be able to walk in water

terse ore
patent socket
tardy delta
#

uhh

patent socket
#

Im confused

hazy parrot
#
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
        at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:316) ~[?:?]
        at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:258) ~[?:?]
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:327) ~[?:?]
        at java.util.jar.JarVerifier.update(JarVerifier.java:239) ~[?:?]
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:767) ~[?:?]
        at java.util.jar.JarFile.getInputStream(JarFile.java:852) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:173) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:381) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:224) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
        at java.lang.Thread.run(Thread.java:829) [?:?]

What is this ?

worldly ingot
limpid nexus
#

?paste

undone axleBOT
limpid nexus
#

paste it in pastebin

delicate lynx
#

are you coding a plugin yourself?

rough bear
#

?

delicate lynx
#

don't send us a word document

#

copy and paste the error into a paste site

#

?paste

undone axleBOT
limpid nexus
#

?paste

undone axleBOT
rough bear
#

but what need is there of a photo when you can see perfectly in a world

#

and with respect who are you?

#

and in a photo the fault would not be seen exactly

limpid nexus
#

I am a developer with other 10 years experience and have done and dealt with more projects then i care to count. I suggest you learn to follow the rules and also upload images so people can see them with out downloading a file. As that is sketchy as hell.

delicate lynx
#

you also didn't answer me, are you creating a plugin or are you a server owner?

#

please give context

limpid nexus
#

Context doesnt matter

#

they need help they need to follow the rules simple as.

tender shard
#

why the heck are you sending stacktraces in docx files lmao

limpid nexus
#

You opened it?

rough bear
tender shard
#

why wouldn't I?

limpid nexus
#

Macros and viruses?

tender shard
#

I'm on macOS and opening it with pages in read only mode

rough bear
delicate lynx
#

if you want support you should post the issue in a format that is not awful

tender shard
#

wait what even is %p

#

in String.format

rough bear
winged anvil
#

major coding beef

rough bear
quiet ice
tender shard
smoky oak
#

how do i check if a plugin is installed i put into softdepend? I'm about 95% certain it crashed if its not present and i check if an instance of the softdepend plugin's main class is loaded

tender shard
#

PluginManager.getPlugin

quiet ice
#

Whatever It is far too late for me. I should go to sleep

rough bear
# limpid nexus Yeah whatever.

Well, if you think what you do is fine, but I ask that if you do not intend to help, please do not interfere. If you say you have experience, realize that complaining and not cooperating in helping is very unethical

smoky oak
tender shard
#

yeah, if it's != null it's installed

limpid nexus
limpid nexus
smoky oak
#

um

#

can someone translate this?

#

The POM for <library> is invalid, transitive dependencies (if any) will not be available

limpid nexus
#

paste the pom file?

tender shard
#

<library> published a broken pom file

tardy delta
smoky oak
#

i thought alex was the german guy

#

not geol

tardy delta
#

arent they both?

tender shard
rough bear
#

Good afternoon, I want a moment of someone's time who can help me solve 2 problems that I have for my server. These 2 plugins give some messages that show errors. Unfortunately, I cannot include it in a photo since the code that shows the error It's something big and I need someone to know if purpur and protocollib is possible
(with all due respect, if you are going to answer my message and it is only with the intention of annoying, please do not screw up existence to maintain due respect)

tender shard
#

why do you keep sending it as docx file

smoky oak
round finch
#

oh my gosh

smoky oak
#

?paste

undone axleBOT
tardy delta
#

uh oh

round finch
#

tell that person to use paste

tardy delta
#

atleast use paste thing or make a gist

tender shard
#
java.util.UnknownFormatConversionException: Conversion = 'p'
        at org.bukkit.event.player.AsyncPlayerChatEvent.setFormat(AsyncPlayerChatEvent.java:105) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at Clans.ClientListener.chat(ClientListener.java:193) ~[Clans-0.4.5.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor319.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1934]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1934]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1934]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:414) ~[purpur-1.19.4.jar:git-Purpur-1934]
        at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:100) ~[purpur-1.19.4.jar:git-Purpur-1934]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2476) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2632) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$18(ServerGamePacketListenerImpl.java:2311) ~[?:?]
        at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
#

that's their weird doxx file

smoky oak
#

?whereami too

limpid nexus
#

Clearly my messages are being ignored, I am tired and off to bed

tender shard
#

?paste

undone axleBOT
tardy delta
#

what did i say about sleep again?

tender shard
#

this is the other file

tardy delta
#

i take that back, nearly fell asleep in business class

#

5 hours sleep go brrt

rough bear
delicate lynx
#

it's a docx file?!?!

smoky oak
#

i know what a word file is

#

i ALSO know that that doesnt mean anything

#

fucking macros that dont need to be enabled

#

i dont trust shit that aint in .txt exactly

delicate lynx
#

again please give context, are you coding a plugin or are you just getting this error?

#

like what is this from

tender shard
smoky oak
#

fuck r u doing with ebook files

tender shard
#

sending you my code

#

still better than docx, right?

tardy delta
#

i wish i never joined this chat

smoky oak
tardy delta
#

only this channel is unmuted

smoky oak
#

im starting to question ur sanity

#

lol

tardy delta
#

u better dont

remote swallow
#

i only have trivia muted

rough bear
remote swallow
#

i have the server muted too but no other channels

round finch
tender shard
remote swallow
tender shard
#

but do you actually expect people to download your docx files?

#

why don't you just paste it

winged anvil
#

is this not valid reflection?

tardy delta
#

yes

tender shard
#

that's pretty shitty

winged anvil
#

yes like yes no or yes yes

tardy delta
#

nobody actually sets it back inaccessible

winged anvil
#

ok so lets fix it

tardy delta
#

so just return in the try

tender shard
#
  1. you return null. you should rather rethrow the exceptioN
  2. you make public fields private by using setAccessible(false)
  3. you don't cache the fields anywhere
gleaming vine
#

Hey so you probably get it way too much, but is there a faster way to build jars with buildtools?

rough bear
#

This is the error that I have and I hope that another supposed gentleman with 10 years of experience does not come to bother

round finch
#

more ram maybe hahah?

tardy delta
#

get an amd epic

smoky oak
gleaming vine
#

Surely doing it one-by-one can't be the answer

gleaming vine
rough bear
tender shard
smoky oak
remote swallow
#

alex how does this actually work

tender shard
#

you can also get the line numbers etc like that

remote swallow
#

im not saying "how does this work its jank as hell" more of how does it even work it even work

tender shard
#

it just uses the stacktrace

tardy delta
#

does it get the callers stacktrace elements? wait no thats not from the caller

remote swallow
#

it looks like getting a stack trace from thin air and then using some regex syntax then getting th class name

tender shard
#

wdym from thin air? Thread.currentThread().getStackTrace() is clearly visible in the screenshot lol

remote swallow
#

yeah but whats generated the stacktrace

worldly ingot
#

Nothing

tender shard
#

Thread.dumpThreads

#

native method

worldly ingot
#

Every method has a stack

tender shard
#

yeah, otherwise it couldn't be called lol

tardy delta
#

every thread has one

remote swallow
#

til

worldly ingot
#

Rather, every method adds a new scope to the stack

#

It's the reason your local variables get deleted after your method terminates

smoky oak
#

@gleaming vine

array = ( "1.18" , "1.18.1", "1.18.2" )
for i in "${array[@]}"
do
  java -jar BuildTools -jar --rev $i
done
worldly ingot
gleaming vine
#

You are expecting way too much of me but I appreciate the time you took to create that

#

im doing a batch script

smoky oak
#

paste in file, replace 'array' with versions you want to build, make file ending .sh

#

double click

#

wait hour

tender shard
smoky oak
#

done

tender shard
worldly ingot
#

It just looks like it should break lol

#

2 is an undocumented magic number

#

You're throwing a RuntimeException

tardy delta
#

hoping that the caller is very sure about that number uwu

worldly ingot
#

That too

smoky oak
worldly ingot
#

Calling it getCurrentClass() but requiring an offset

#

Cursed aPES3_GeKek

remote swallow
#

i have even more cursed stuff

smoky oak
#

you have nothing on my item serializer

worldly ingot
#

Wow I sincerely hate that

tender shard
smoky oak
#
private static byte[] stackToByte(ItemStack[] stack){
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            BukkitObjectOutputStream oos = new BukkitObjectOutputStream(bos);

            oos.writeInt(stack.length);

            for (ItemStack itemStack : stack) {oos.writeObject(itemStack);}

            oos.close();
            return bos.toByteArray();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
tardy delta
#

whats bad about that

tender shard
remote swallow
#

just looks it

tender shard
#

ok

worldly ingot
#

You know what else prints MyTest?

#

getClass() KEKW

winged anvil
worldly ingot
#

I dunno why you're walking the stack for it

smoky oak
#

doesnt that print memory address?

tender shard
worldly ingot
#

...#getName()

#

You know what I mean

smoky oak
#

im a very literate ass

tender shard
winged anvil
#

ok i will cache them

smoky oak
#

i take you literally

worldly ingot
tardy delta
#

isnt there Reflection.getCaller() or smth?

remote swallow
#

how else am i meant to automatically get my plugin

smoky oak
#

i do a singletron

#

if you have two instances of my main class you have other problems

remote swallow
#

im trying as hard as i can to not need an init method

tardy delta
#

if you instantiate it twice you'll get an exception anyways

tardy delta
smoky oak
#

actually

remote swallow
#

dont remind meof that

smoky oak
#

if your only constructor is the empty one

tender shard
smoky oak
#

you only need to do this

tender shard
remote swallow
#

thats exactly where i stole it from

#

well

#

not stealing

#

borrowing

tardy delta
#

whats @DoNotRename

smoky oak
#
public class MyClass(){
  {
    System.out.println("I'm a constructor!");
  }
}
remote swallow
#

obsfucator

rough ibex
#

do not rename

tender shard
#

an annotation to tell allatori to not rename this method

winged anvil
#

this is your chance to link the blog post

tender shard
#

which blog post

winged anvil
#

the one about allatori

tender shard
#

I rather send the one about constructors and init blocks

winged anvil
#

oh ok

smoky oak
#

i want to hear the one about allatori

#

at least that one might get a good laugh out of me

tender shard
smoky oak
#

i heard 'do not rename' and knew itd be good

tender shard
#

yeah annotations are funny

patent socket
#

Args[0] is @a[tag=test]

worldly ingot
#

Yeah so you’re just assuming there’s an entity selected

#

It may not have selected any. What if no entity has that tag? (Which clearly seems to be the case)

patent socket
worldly ingot
#

size()

smoky oak
#

wtf

#

is there a stream foreach

#

that returns the modified stream

#

oh wait does map work

tender shard
#

foreach doesn't modify anything

#

yeah you probably mean map

#

foreach takes a consumer, it doesn't return anything.
map takes a function

smoky oak
#

uh

#

do u have an example

tender shard
#

what are you trying to do?

smoky oak
#

im doing this as an example

patent socket
#

So in my command I have this code: player.sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word)); Player is an Entity variable so it can be @p or MyName. I get this error message for the code. How can I resolve it? no suitable method found for sendMessage(net.md_5.bungee.api.ChatMessageType,net.md_5.bungee.api.chat.TextComponent)

smoky oak
#

rn im just trying to access the items

tender shard
smoky oak
#

goddammit

tender shard
#

addUnsafeEnchantment doesn't return anything

smoky oak
#

ye

#

this just makes things more annoying

tender shard
#

a map is e.g. to turn a List<ItemStack> into a List<ItemMeta>

#
List<ItemMeta> = itemStackList.stream().map(ItemStack::getItemMeta).collect(Collectors.toList());
#

this is e.g. what map is for

patent socket
#

Also how can I make my command runnable in an execute command?

tender shard
#

lists are always ordered

smoky oak
#

so i can do a 1:1 mapping

#

perfect

#

actually

#

is there a 'modify if CONDITION with FUNCTION' for streams?

tender shard
#
List<String> newList = oldList.stream().map(name -> {
  if(name.equals("")) {
    return "<empty name>";
  }
  return name;
}).collect(...)

you mean sth like this?

smoky oak
#

ye kinda

#

functions a bit bigger tho

#

so ill probs do it extra

rough bear
#

This is the error that I have and I hope that another supposed gentleman with 10 years of experience does not come to bother

tender shard
#

can you guys stop your childish contest about who dislikes the other person more?

tender shard
# rough bear

well have you done what the error says in the first line?

gleaming vine
#

Ive been trying to do buildtools manually cause i only need a few specific versions and now its telling me I need a specific java version that I have, and i dont know how to set a specific version.

tender shard
#

you can enter the path to the java version to use

#
/opt/java/jdk1.8/bin/java -jar BuildTools.jar --rev 1.12.2

for example

#

ofc you need to have that version of java installed already

gleaming vine
#

but the buildtools jar wouldnt be in there so would i have to put it in that folder?

tender shard
#

no, you are supposed to run this in your buildtools folder

#

but instead of using "java" you use "/Path/To/Your/Java/java"

gleaming vine
#

oh.

rough bear
tender shard
#

guess then you gotta wait until they answer you there

gleaming vine
smoky oak
#

alex do u know if there's a bistream

#

like

tender shard
#

yeah but you gotta quote the java path because it contains spaces

smoky oak
#

(1,2,3) (a,b,c) -> (1,a) (2,b) (3,c)

gleaming vine
#

absolute life saver thanks

tender shard
#
"C:\Program Files\Java\jre1.8......\bin\java.exe" -jar BuildTools.jar ...
smoky oak
#

cuz i need to reapply the modified itemmeta

tender shard
smoky oak
#

wouldnt work cuz, you know, list

#

thats why im asking

#

that was my thought and then i was like 'how to index'

tender shard
#
myItemStackList.stream().forEach(item -> {
  ItemMeta meta = item.getItemMeta();
  meta....
  item.setItemMeta(meta);
  }
).collect...
smoky oak
#

im a idiot

#

thats what ive been doing already

#

wait

#

no its not

#

i can edit it to that though hopefully

tender shard
#

is there a reason why you need a stream?

smoky oak
#

seems simpler than casting it to arrays

tender shard
#

a List implements Iterable

#

you can do a normal for loop

rough bear
#

Anyway, what can I do with the error I have from protocolib

tender shard
#

report it to them

rough bear
smoky oak
#

its been this simple all the damn time lol

for(ItemStack stack : resultList)
            stack.setItemMeta(modMeta(stack.getItemMeta()));
#

well im clearly doing something wrong but its no longer the iterations fault

tender shard
eternal oxide
#

beaten

tender shard
#

I never understood why this got moved into the Player.Spigot class

quaint mantle
#

how do i get the inventory name

tender shard
#

from the inventory view

quaint mantle
#

the inventory interface doesnt have

#

getname method

tender shard
#

get the inventory view, then call getName() on that

#

or getTitle(), sth like that

#

but erm

#

why would you ever need that?

quaint mantle
#
        Inventory inventory = view.getTopInventory();
        if (inventory != null && view.getTitle().equals("My GUI"))```
quaint mantle
tender shard
#

you shouldnt detect your GUIs by their title

#

but rather store the inventories you open in a set or map

quaint mantle
#

then what

#

not that advanced

#

idk how to do that

tender shard
#

you create a Set<Inventory> as field somewhere

#

then whenever you do player.openInventory(myInventory), you add myInventory to that Set

#

then in the InventoryClickEvent, you can check if the set.contains(event.getClickedInventory())

#

if yes, it's your GUI

#

otherwise you'll be in trouble when another plugin uses the same title. Although unlikely, it's just very bad practice to rely on the name

quaint mantle
#

i understand

#

but its going to be a core, i dont need any other plugins

tender shard
#

well okay, just wanted to mention the proper way

#

oh wait

quaint mantle
#

thank you i appreciate it

tender shard
#

people could rename a shulker box to "My GUI"

#

soooo

quaint mantle
#

yea i sppose your right

tender shard
#

yeah I mean you could use color codes to prevent players using the same name in an anvil, but I guess just using the Set is the only proper way

quaint mantle
#

yea im doing that

#

ChatColor.BOLD + "" + ChatColor.DARK_GREEN + "ZOMBIE SHOP"

tender shard
#

ok then it should work as long as you don't allow color codes in anvil

quaint mantle
#

ok

dry yacht
rough bear
tender shard
#

but yeah, using the title still is a bad idea

tender shard
dry yacht
quaint mantle
#

why is this string ChatColor.BOLD + "" + ChatColor.DARK_GREEN + "ZOMBIE SHOP" showing up as

#

oh i dont have image permissions

#

well its not showing up as bold

hazy parrot
#

I think you have to put color first

#

Then bold

tender shard
#

first color, then formatting, yes

#

if you wanna send images:

hazy parrot
#

Yeah I mixed up

tender shard
#

-verify

#

!verify

undone axleBOT
#

Usage: !verify <forums username>

quaint mantle
#

!Sainte

#

! Sainte

hazy parrot
#

! verify username

tender shard
#

it's !verify Sainte

quaint mantle
#

!verify Sainte

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

quaint mantle
#

alright

#

it was showing up like that

tender shard
#
ChatColor.DARK_GREEN + "" + ChatColor.BOLD
#

first color, then bold

quaint mantle
#

got it

dry yacht
sick edge
#

What is the easiest way to create an ItemStack (NMS)?
(Are NMS questions alright in this channel?)

dry yacht
tender shard
#

^

sick edge
dry yacht
tender shard
quaint mantle
#

whats the difference between a normal itemstack and a NMS one

dry yacht
tender shard
wary harness
#

anyone can help me with this problem
I want to make custom logger so whole line is red with timestamp

        // Create a console handler
        ConsoleHandler handler = new ConsoleHandler();
        handler.setFormatter(new CustomFormatter());

        // Add the console handler to the logger
        LOGGER.addHandler(handler);

    }

    public static Logger getLogger() {
        return LOGGER;
    }



    public static class CustomFormatter extends Formatter {
        private static final String ANSI_RED = "\u001B[31m";
        private static final String ANSI_RESET = "\u001B[0m";

        private Date date = new Date();

        @Override
        public synchronized String format(LogRecord record) {
            StringBuilder builder = new StringBuilder();

            // Format the timestamp and log level in red for SEVERE messages
            if (record.getLevel() == Level.SEVERE) {
                builder.append(ANSI_RED);
                builder.append(String.format("[%1$tT] [%2$s/%3$s]: ", date, record.getLoggerName(), record.getLevel()));
                builder.append(ANSI_RESET);
            } else {
                builder.append(String.format("[%1$tT] ", date));
            }

            // Append the log message
            builder.append(formatMessage(record));
            builder.append("\n");

            return builder.toString();
        }
    }
}```
dry yacht
quaint mantle
#

Isn't the text being red good enough...

tender shard
#

color codes don't belong into the console anyway imho

#

every proper log viewer can handle to only show and/or highlight warnings and errors

wary harness
#

Some people don't read

#

so I would like to make it more red for them

tender shard
#

also why would you print is warning only to then again say it's SEVERE

dry yacht
tender shard
#

why not just use error in the first place

quaint mantle
#

^

tender shard
#

myPlugin.getLogger().severe("bla bla")

wary harness
#

but from some reason it outputting warning

tender shard
#

I meant this

wary harness
#

here

tender shard
#

BeastLogger != JavaPlugin#getLogger()

sterile token
#

What can cause to the warp section being null?

#

If the section are there, i dont know what im missing

#

If you see the debug, the of the keys, none of them is null. So the warp section cannot be null

hazy parrot
#

You are basically getting Warp.Warps.Warp.Warps

#

You are calling warp.warps on warps config section

sterile token
#

oh

sterile token
inland siren
#

you are calling Warp.Warps on the config section Warp.Warps w the line warps.getConfigurationSection(Warp.Warps." + key)

#

which p much is asking for something like Warp.Warps.Warp.Warps.store etc.

sterile token
#

oh ok

#

i thout you have to tell the path + key

inland siren
#

you are

sterile token
#

πŸ€¦β€β™‚οΈ

inland siren
#

with the warps object

sterile token
inland siren
#

warps already gives you the path

sterile token
#

oh its a parent

inland siren
#

calling getConfigurationSection on warps is calling whatever path you give + warps path

#

yes

sterile token
#

I just realize, im really dumb

#

My bad

#

thanks i will try it

native gale
#

Hello!

strange quarry
native gale
#

Does anyone knows what events are fired in the next scenario: ```

  1. The player dies
  2. Instead of reviving, they disconnect from the server
  3. They Join the server again <- what events are fired here?```
hazy parrot
#

Why don't you ?tas

inland siren
#

i'd assume just no playerrespawnevent is filed

young knoll
#

Same events as when they normally join the server

strange quarry
hazy parrot
strange quarry
#

ah sorry

sterile token
strange quarry
dry yacht
sterile token
native gale
#

It should handle some events on the death and on join

#

But for some reason in this scenario the user bugs out and switches to spectator mode

#

Which is not really intended

#

I suspect some events are fired not in the order I expect them to happen

#

And my plugin shoots itself into the leg

inland siren
#

death - (no respawn event!!) - quit - joinsequence

#

best guess

dry yacht
native gale
#

Logging etc

#

It's difficult to explain, I am just curious about event sequence

dry yacht
#

It's also very difficult to spot the issue, as I have next to no information about your system, sorry, :-:

native gale
#

I mean, I didn't ask to debug my system, I just need some info about how Spigot works

#

Eh, whatever, nevermind

dry yacht
#

Well, it works as expected. You're gonna get the death event, then the quit event, then join event, and then - likely - the respawn event, as the player has to respawn. That's about it, I'd say.

native gale
#

Hmm, okay

native gale
dry yacht
echo basalt
#

I just rewrote a whole big system and can't bother remaking 3 basic files

bold vessel
echo basalt
#

So

#

arrays in java start from 0

#

args[1] will be out of bounds

#

on line 49

bold vessel
#

So what should i do

#

I want args 0 for the mobs and args 1 in optional for the player name (if we want to give it to som1)

#

should i reverse mobs array and username array

wet breach
#

Just check the size of the array

#

If the size is 1 then there is no username and thus can skip that check

#

If there is 2 args check the second arg for username

winged anvil
#

hello wise people who know much more than i do

#

what is logger, why use it

quaint mantle
#

a logger logs things

#

you use it when you want to log things

winged anvil
#

lowkey

bold vessel
#

what is wrong now ?

#

What this mean

#

Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R2.inventory.CraftMetaBlockState cannot be cast to class org.bukkit.inventory.meta.SpawnEggMeta (org.bukkit.craftbukkit.v1_19_R2.inventory.CraftMetaBlockState and org.bukkit.inventory.meta.SpawnEggMeta are in unnamed module of loader java.net.URLClassLoader @2e5d6d97)
at fr.worldorder.wospawner.WOSpawner.onCommand(WOSpawner.java:99) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]

young knoll
#

Wrong meta type

#

SpawnEggMeta is for spawn eggs

drowsy helm
#

doesnt extend BlockState

young knoll
#

You want BlockStateMeta

bold vessel
#

So what should i use for set the spawner "eggs"

#

Isnt supposed to be this ?

late sonnet
bold vessel
#

okk

bold vessel
# late sonnet you need the BlockStateMeta mentioned and in there use the CreatureSpawner for s...
ItemStack spawner = new ItemStack(Material.SPAWNER);
ItemMeta spawnerMeta = spawner.getItemMeta();
spawnerMeta.setDisplayName("Β§rΒ§eSpawner Β§6" + entityType.toString());
if (entityType == null) {
    player.sendMessage("Β§cLe mobs spΓ©cifiΓ© n'existe pas.");
    return true;
}
spawnerMeta.getPersistentDataContainer().set(new NamespacedKey(this, "mob"), PersistentDataType.STRING, entityType.toString().toLowerCase() + "spawner");

// crΓ©er un CreatureSpawner Γ  partir du bloc spawner associΓ© Γ  l'ItemStack
BlockStateMeta blockStateMeta = (BlockStateMeta) spawnerMeta;
BlockState blockState = blockStateMeta.getBlockState();
if (blockState instanceof CreatureSpawner) {
    CreatureSpawner creatureSpawner = (CreatureSpawner) blockState;

    // dΓ©finir le type d'entitΓ© souhaitΓ© sur le spawner
    creatureSpawner.setSpawnedType(entityType);

    // mettre Γ  jour le BlockStateMeta avec le BlockState mis Γ  jour
    blockStateMeta.setBlockState(creatureSpawner);
    spawner.setItemMeta(blockStateMeta);
} else {
    player.sendMessage("Β§cL'objet spawner est invalide.");
    return true;
}
#

working

#

!

bold vessel
#

(In the server console)

kind hatch
tawdry parcel
quaint mantle
#

hi.

#

what's the difference in absolute path, canonical path and just path?

#

i dont need like "C:/some folder/some path/"

#

i just need the relative path.

#

like "./../another folder" or "./some folder/yet another folder".

rotund ravine
#

Which filetype are you using

#

Also you can create another file in relation to your file.

pure dagger
#

please

quaint mantle
#

hi.

#

how do i create an index in mysql only if an index with the name does not already exist like in sqlite?

#

so

#

i can do CREATE INDEX IF NOT EXISTS index_name on table_name (columnA, columnB); in sqlite but the same statement does not seem to run on mysql though.

#

um, can someone help?

mental nymph
#

how to check is block is flowing water?

tender shard
#

check if the block is Material.WATER. If yes, cast the BlockData to Levelled and check the level

pseudo hazel
tender shard
#

the source block is 0, every further block is 1,2,3 etc until it falls down where it starts again at 8, then continues with 1,2,3 again

viral temple
#

does anyone know how to make jitpack run buildtools?

tender shard
#

which versions?

#

however getting jitpack/actions to work is a pain, I'd rather just build it locally and then deploy it to a proper repo

torpid blaze
#

Hey,
Anyone any Idea on how to open a enchanting inventory to the player, where he can enchant his items and if possible even open a enchanting inventory with a specific enchantments level, like 10/20/30?

mental nymph
#

how to check is block is flowing water?

tender shard
mental nymph
tender shard
tender shard
#

then you can listen to PrepareItemEnchantEvent, and change the EnchantmentOffer[] returned by getOffers()

torpid blaze
tender shard
#

you can send a block change to make the client think there's an enchantment table at the given location

#

on 1.19.4 though, the block actually has to be an enchantment table

native gale
#

What is the equivalent of plugin.getServer().getPluginManager().getPlugin("SomePlugin") for bungee api?

eternal oxide
#

?jd-bc

tender shard
#

ProxyServer.getInstance().getPluginManager().getPlugin(String name)

eternal oxide
#

probably want a getInstance() in there