#development

1 messages · Page 84 of 1

narrow pivot
#

this is gv in the obfuscated version correct? its also default

dusky harness
#

🤔

#

Maybe try with reflection 🥲

split juniper
#

I am looking for developers who can develop a paid server according to my requests.

narrow pivot
ruby vale
#

Anyone able to help with marketing and advertising on my Minecraft server network? If so dm me asking for the price (commission based)

ruby vale
torn heart
#

set a price

#

at least a range or a budget

ruby vale
torn heart
ruby vale
#

Like 10%

torn heart
#

and set that as the range

#

and put a + at the end of you're really not sure

ruby vale
#

Erm

torn heart
# ruby vale Erm

at least mention that it's commission based in the request lol

#

and a range for percentage

ruby vale
#

Alright

#

I better get some dms 😅

worn jasper
#

Any ideas how I make it so when copying a clipboard with WE (API), it doesn't copy entities?

#

forwardExtentCopy.setRemovingEntities(true); doesn't appear to do the trick

noble hemlock
#

Which code can I use to edit the EssentialsX sound effects?
on the developer version uses sound: but on the stable version isn't using the same command.

dense drift
unborn dust
#

Is there any way to help the CheckItem expansion be updated? I desperately need it to take the minecraft:custom_data component in 1.20.6+ and it doesn't seem to do that. v2.7.5 does handle item components, just seemingly not the custom data one

stuck hearth
#

oh ig I could look

dense drift
#

I did not change anything, someone sent this to me shrug so I'm confused

pulsar ferry
#

Classic not relocating kotlin problem most likely

stuck hearth
#

I've had this issue when I relocate Kotlin stuff. My guess is another plugin on the server also uses kotlin.

#

There's also an issue somewhere about Kotlin's Any type not relocating correctly, idk what the status of that is or recall if the context is relevant.

dense drift
pulsar ferry
#

Something wrong with the relocation then

#

Also 1.6.21 despair

dense drift
river solstice
#

old ancient

dense drift
#

Smh

#

2022

drifting granite
#

can i paste an error here?

dusky harness
drifting granite
#

its not a plugn error

#

its from server software...

dusky harness
dusky harness
drifting granite
dusky harness
drifting granite
#

ok...

atomic trail
#

Is this inefficient? It says that the tree function is made for debugging

        String newMessage = MiniMessage.miniMessage().deserializeToTree(format,
                Placeholder.parsed("group", group),
                Placeholder.parsed("prefix", prefix),
                Placeholder.parsed("suffix", suffix),
                Placeholder.parsed("world", player.getWorld().getName()),
                Placeholder.component("username", nameComponent),
                Placeholder.parsed("message", TextUtil.applyColor(message, chatColor)),
                TextUtil.papiTag(player)).input().trim();

        return MiniMessage.miniMessage().deserialize(newMessage);
#

I use it because I need to trim the message before returning it

river solstice
#

why not just append

#

or a list of components

atomic trail
atomic trail
#

The format is format: '<prefix> <username>:<reset> <message>'

#

But if the player doesnt have a prefix it will addd a space before the username, which it shouldn't

#

Anyone got an idea?

dense drift
#

I think you can use text replace config, and replace \s+ (one or more space) with (space)

atomic trail
#

But that wouldn't fix the first space if the player doesn't have a prefix

#

Then it would have a space before the username which looks weird

dense drift
#

Two text replacements? kek
^\s+ (space at the beginning of the text) > space

atomic trail
dense drift
#

It matches all spaces at the beginning of the text, and then you can replace them with whatever you want

atomic trail
#

Ohhh nice

#

Do you know if it can have multiple matches per replacement?

        return MiniMessage.miniMessage().deserialize(format,
                Placeholder.parsed("group", group),
                Placeholder.parsed("prefix", prefix),
                Placeholder.parsed("suffix", suffix),
                Placeholder.parsed("world", player.getWorld().getName()),
                Placeholder.component("username", nameComponent),
                Placeholder.parsed("message", TextUtil.applyColor(message, chatColor)),
                TextUtil.papiTag(player))
                .replaceText(TextReplacementConfig.builder()
                        .match(Pattern.compile("^\\s+"))
                        .match(Pattern.compile("\\s+"))
                        .replacement("")
                        .build()
                );
atomic trail
clear nexus
atomic trail
#

I need help from someone experienced with NMS. I'm trying to create a copy of the anvil menu to move the slots around but I don't understand how the inventory is created.

This is what I currently have https://paste.helpch.at/kohesukumo.kotlin

torn heart
#

you can't move those slots around

#

not without a clientside mod, right?

atomic trail
torn heart
#

but idk

dense drift
atomic trail
#

Currently getting this error tho https://paste.helpch.at/zaqelexivi.css

I'm using NMS and it's working on my local pc but not on external server. Both are on exact same 1.19.4 version, anyone got an idea why?

#

Using the dev bundle paperweight.paperDevBundle("1.19.4-R0.1-SNAPSHOT")

wise nest
#

is it possible to make damage be handled as if the player is wearing a set of armor that they aren't wearing? a simple armor damage multiplier isnt sufficient because explosion damage needs to be accurate

torn heart
#

copy Minecraft's code

worn jasper
#

Isnt there an attribute or smt that gives armor ?

marsh scaffold
#

READ whole before you start typing about me skidding ty.

does anyone know of a good generator plugin (SRC)? I'd like to steal take ideas from how they handle the schedule related stuff & chunks (loaded/unloaded) to increase performance; or it would be good if you guys could actually give me an idea on how to handle these, I've been more or less unable to solve this issue myself without causing performance issues to the server.

worn jasper
#

Instead of looking for what others did right, look what you did wrong.

stuck hearth
#

Generators would only cause more problems I imagine since it's a blunt force approach Did not think this was about chunks

worn jasper
#

Tell us how YOU did it, and what's the performance problems

#

I have done generator plugins in 2 ways, both always seemless performance with thousands and millions of generators, but it took me 2 other tries to achieve it.

#

Figuring out what you did wrong is way more helpful than finding something that already works

dense drift
marsh scaffold
#

I've absolutely 0 clue on how to improve / fix this and want either some help or at least something I could take reference to, to improve my knowledge.

dense drift
#

Is not enough to run things on a different thread, you still need optimization

marsh scaffold
dense drift
#

You could load the generators when the chunks are loaded for example, is not worth to pre-load 100 chunks for 100 gens if only 5 are active

marsh scaffold
#

I've absolutely no idea on how to optimize this, at first I was thinking of getting the 4 borders of the loaded chunk and not check again if it's loaded or not and remove once done with that chunk but idk how to do that pretty much so yeah I'm gonna have to dig into it more unless I get a better suggestion

marsh scaffold
dense drift
#

There is a chunk load event, that gives you the chunk that was loaded

worn jasper
#

Then get all gens in that chunk

#

And cache them

#

That might help a bit

#

There are also other things that can help

dense drift
#

There is also a ChunkUnload event, you can use that to stop the generator (and resume on next ChunkLoad event) or unload it at all

worn jasper
#

If you are dropping items, might help to stack them

#

Less user friendly, but better is to also just get a count of generators placed of each type, then only cache a single generator of that type at that chunk, and drop the item times the amount of gens in that chunk, at that single generator

#

Removes the fact you have to loop through all of them

#

There are also some other things you can do, but that depends on how you want your gens to work.

#

Some people do the so called Vaults, which store all drops into them digitally

#

That's even more optimized

#

And then even more optimized is being able to stack gens in a single block

#

But again, these last 2 modify gameplay quite a bit, and most servers opt out of it and it usually is alright

tawny bear
#

Does anyone know how to make separate worldborder for different worlds?

#

I have this issue where the worldborder is being shared

#

I used

World world = Bukkit.getWorld(worldName);
        if (world != null) {
            WorldBorder border = world.getWorldBorder();
            border.setCenter(initialX, initialZ);
            border.setSize(initialSize);

this to set the worldborder,

#

And I am assuming that this saves the data into the level.dat in the world's folder

#

but the real problem is when a player joins the non native world, the worldborder is not what it should be

#

like, in server.properties, my level is named 'world' but my other world is named world2 for example

#

and even if i set the worldborder for world2 200 in the plugin, the server will only load the worldborder from 'world''s level.dat

marsh scaffold
worn jasper
#

What mod are you trying to recreate?

marsh scaffold
#

tho I doubt I'll be able to recreate it 1:1 with the villagers, plants, etc being like that even with armor stand/npcs but I'm trying my best to replicate as much as I possibly can

dense drift
marsh scaffold
#

I appreciate what you've provided me ❤️ this will make things easier for me, thank you.

worn jasper
marsh scaffold
dense drift
#

Display entities were added in 1.19 or something, the scale attribute is newer but you might have luck

#

Although, I don't see any reason to support anything but major releases and at most the latest patch (e.g. 1.19.4 is the latest patch of 1.19)

leaden sinew
stuck hearth
#

ping mb

dense drift
#

Ye and I was talking about living entities. If you open that link to the mod, in the pictures you will see some tiny villagers and other entities inside blocks

worn jasper
#

You just have to calculate the between now and last opened

#

And ofc the amount already stored

leaden sinew
#

You could also pick a random amount every time and tell the user they’re wrong if they say something about it

worn jasper
#

Lol

#

Me: puts 32 items

#

Also me: gets 13 back

#

Server owner: that's right!

wise nest
torpid raft
#

ez, spawn a fake player with various levels of armor on and measure the damage dealt

torpid raft
#

honestly you could probably generate a lookup table of all the combinations

#

woah buddy

torn heart
#

or just COPY A FUNCTION

torpid raft
#

nah

torn heart
#

cmd c cmd v

torpid raft
#

cringe

torn heart
#

you can't have a lookup table for damage and armor

tight junco
#

does Papers entity#damage not respect the damage with armour

torn heart
tight junco
#

oh

torpid raft
torn heart
#

he wants to deal damage as if a player has armor

torn heart
#

you'd need literally like a million values in it

stuck hearth
#

Why

torpid raft
#

ok and?

torn heart
tight junco
#

so player has no armour but it........ the damage they receive is reduced by invisible armour

torn heart
#

so I'm saying like. just copy the damage function

#

and handle it like that

tight junco
#

question

torn heart
tight junco
#

couldn't you just set an attribute to the player

torn heart
tight junco
torn heart
#

all due respect

torpid raft
#

lookup tables?

torn heart
torpid raft
#

bro all people used from the 1970s to the 90s are lookup tables

torn heart
stuck hearth
#

That's how we used to do math 👴

tight junco
#

calculating stuff by finding it on a times table square is insane work

torn heart
#

people use lookup tables for fast bit manipulation, for trig function lookup, maybe for log shit idfk but definitely not for multiplication

#

things with a defined small range of values

stuck hearth
torn heart
#

not a continuous function for which one needs to have 2 continuous inputs

#

and handle hundreds of damage

torpid raft
#

you can have discrete values and interpolate

#

20 different armor values x 1000 damage values

torn heart
torpid raft
#

toughness is fake

torn heart
#

400x1000

#

and linear interpolation

#

instead of just. copying a function

torpid raft
#

byeah

torn heart
#

so instead of copy pasting you would

  • have a non negligible error in your result
  • have a map of at least 400,000 inputs
  • have to do all the work to get those inputs in the first place
#

index into that map of 400,000 every time a player takes damage

torpid raft
#

the benefit being that you dont have to maintain your code for every single change to how damage through armor is calculated

stuck hearth
#

One map for allat?

torn heart
torpid raft
#

ok?

torn heart
#

the benefit is. you don't have to copy and paste. one extra time.

torpid raft
#

oh no 8mb of memory

torn heart
#

1.5 gB

#

ah yes 1562 megabytes of memory for an inaccurate damage calculation

#

or wait

#

fuck I'm stupid

torpid raft
#

yes

torn heart
#

that's kilobytes

torpid raft
#

you are

torn heart
#

okay fine 1.5 MB

torn heart
#

which is slower and less accurate

torpid raft
#

yeah, if it means my code doesnt have to be updated in a few years

torn heart
#

I didn't realize developers were this lazy

#

this is why everything runs slow

torpid raft
#

😏

torn heart
#

objectively bad solution to save 5 seconds of work

stuck hearth
#

If you cared about perf, you'd use Rust

torpid raft
#

sorry damage calculation takes 5000ns instead of 50

#

my bad

torn heart
stuck hearth
#

Objectively bad solution compared to Rust really

torn heart
#

just

#

are we talking about the same numbers

#

I'm out here trying to optimize my code down from 200 microseconds to 50 with SIMDs

torpid raft
#

seems like a waste of time to worry about microseconds for a mc plugin

torn heart
torpid raft
#

ok

torn heart
#

🩷

stuck hearth
#

0.2 ms vs 0.05 ms

0.0002 seconds vs 0.00005 seconds

Yeah idk man, seems like you're working too hard

torn heart
#

the microsecond measurements are when I benchmark with JMH

#

but it's significantly slower on an actual server

#

taking milliseconds

torn heart
#

and even though it's asynchronous it's obviously unacceptable

#

or at least unacceptable by my standards??

#

but apparently my standards are significantly higher than most because how the fuck does one suggest indexing into a 400k hashmap every damage event as a legitimate suggestion

torpid raft
#

oh no 5 microseconds

#

we will never financially recover from this

dusk spruce
torn heart
#

and move on

worn jasper
torn heart
worn jasper
#

L

dusky harness
worn jasper
dusky harness
worn jasper
#

yeah

wise nest
dusky harness
worn jasper
#

^^

dusky harness
#

i forget what they're called

wise nest
dusky harness
marsh scaffold
#

if you notice one spawns an iron golem then damages it, the second makes a crop grow

marsh scaffold
# worn jasper You just have to calculate the between now and last opened

true, but same issue as above; in other words: can't be made like that
I also thought at first to make it like that since I could then easily just edit the DB and check when it was last open and what the data was but that doesn't solve the IronGolem spawning & getting damaged and the Crop Growth

#

just noticed mentioned both of u mb

dense drift
#

Tbh I think you can also make a custom 3d model for the animation and just spawn the item.

leaden sinew
#

And even if not, you could tick those and not the other types

marsh scaffold
#

yeah.. except I'm using packets but idk how to do a proper schedule without performance issues

leaden sinew
#

Unless you have a lot of them, you really shouldn't have to worry about it

dense drift
#

Send the packets only to players that are in a radius to the generator

marsh scaffold
#

I've been using packetevents + EntityLib for this, my code rn was more or less ArmorStand creation but at one point I just started slowly moving to entities.
But still, I'm unsure how I will be able to handle the schedule as to when I should be spawning X iron golem in Y iron farm

leaden sinew
#

You can just do what Minecraft does and tick the blocks, or something like

Map<Integer, Collection<YourBlock>> blockTicks;

void scheduleTick(int tick, YourBlock block) {
  // put into map
}

void tickBlocks() {
  Collectiom<YourBlock> toTick = blockTicks.remove(currentTick);
  // tick blocks
}
marsh scaffold
#

soo pretty much listen to a tick and update on each tick // see when was the last tick and compare to new tick if it's X ticks away it would run the "schedule" for that farm?
Wouldn't this cause issues on restart tho? as far as I remember when I was testing ArmAnimation per tick I noticed the tick id being reset on restart

leaden sinew
#

Well you're going to have to save your data

#

If you don't use packets you can just use persistent data containers, but if you use packets you're going to have to store the locations somewhere

marsh scaffold
marsh scaffold
dense drift
#

Hold on, you don't cache data from db??

#

On every BlockBreakEvent you query the db to see if the block is a custom block ☠️

marsh scaffold
gleaming nacelle
#

I'm using AlessioDP's fork of libby to download dependencies at runtime (I know that Spigot now has a feature which solves this problem but that wouldn't work in Bukkit and other servers unrelated to Spigot). Someone has any idea on how to use this library? I can't find much detailed information on how to use it and looking at the code of other plugin which use this confuses me

dusky harness
#

also AlessioDP is in here so you can probably ping them as well

gleaming nacelle
# dusky harness https://github.com/AlessioDP/libby/tree/gradle#usage are there certain questions...

I struggle with the libraries once they are loaded (supposedly). I've put them on the onLoad method, following that usage guide you just sent. On first place, my IDE does not aknowledge libby for some reason, probably a VSCode bug, as I had set that up on my maven project and the lib is getting bundled in the jar as expected.
I also have some questions:
Should I still import the packages as I did before? If I do I get an error that says it couldn't find the library and if I don't it simply just fails to resolve to a type.
When I relocate a package (such as libby itself, the readme instructs to do it) both the IDE and the server can't import it. Import cannot be resolved. This may be probably my fault, but I don't seem to find out what's wrong so I would appreciate some help with this.
Lastly, should I set up Libby in the same class which imports the requested libraries? The readme file does not menction how to use the loaded libraries, so I'm a bit confused on that

@long gust sorry for the ping, but I would be so grateful if you could help me out

dusky harness
#

Lastly, should I set up Libby in the same class which imports the requested libraries?
I'm not sure what you mean by this

gleaming nacelle
dusky harness
gleaming nacelle
neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

gleaming nacelle
dusty frost
dusky harness
#

oh yeah that too
I don't think Bukkit by itself exists anymore as a server jar?

dusty frost
#

So I would seriously recommend looking at that or just shading your libraries

dusty frost
dusky harness
#

hm

gleaming nacelle
dusky harness
#

☠️

dusty frost
#

I would say that CraftBukkit is not supported lmao

#

In the year 2024, it is unbelievable that someone is still using CraftBukkit

#

Because all the dependency downloaders have basically stopped development since Spigot and especially Paper now both have their own native ones

gleaming nacelle
dusky harness
dusky harness
gleaming nacelle
dusty frost
#

Look at this graph of server software usage

dusky harness
dusty frost
#

Less than 1 thousand servers yeah

#

Compared to 90 thousand paper, 32 thousand Spigot, and the dozens of thousands of compatible forks

#

So all in all, it is 100% not worth your time to redo your whole dependency setup for one of the 0.01% of CraftBukkit users

dense drift
#

Lol CB pepe_kek

minor summit
#

yeah even spigot themselves stopped supporting it or distributing it for production use

lyric gyro
#

Anyone know how to make a plugin

#

I got code

#

But I don't know how to make it to plugin

torn heart
lyric gyro
#

I mean I have the code

#

I don't know how to make it into a plugin

#

@lyric gyro

#

@torn heart

#

Yo

#

Ixume

#

You now how to

torn heart
#

Google it

#

plenty of YouTube tutorials about how to make and compile plugins

craggy stump
#

In this channel, can I ask for help with anything that's not related to PlaceHolderAPI?

dusty frost
#

For development topics, yeah!

craggy stump
#

Hi! I'm trying to set an item to an ItemDisplay via packets, and it works fine, but when I try to set AIR, it doesn't work. It only works when I set a material that isn't air. I assign the ItemStack this way and then send a PacketPlayOutEntityMetadata to update the entity. Does anyone know why this is happening?
code:

@Override
        public void setItemStack(ItemStack itemStack) {
            net.minecraft.world.item.ItemStack nmsgItemStack = CraftItemStack.asNMSCopy(itemStack);
            itemDisplay.a(nmsgItemStack);
            Bukkit.broadcastMessage("set ItemStack: "+CraftItemStack.asBukkitCopy(itemDisplay.t()).getType());

            PacketPlayOutEntityMetadata metadata = new PacketPlayOutEntityMetadata(itemDisplay.an(), itemDisplay.ar().c());
            players.forEach(player -> ((CraftPlayer)player).getHandle().c.b(metadata));
        }
torn heart
#

since you're using obfuscated methods you should probably say which version you're working with

#

I can't help you rn but that might increase the odds of someone knowing the issue

dusty frost
#

what does an item display of air even look like? is it just invisible?

#

and, for "it doesn't work", how? does it just not change the item display at all? does it throw an error or something?

craggy stump
craggy stump
dusty frost
#

Yeah I wouldn't be surprised if this was a limitation somewhere on purpose to stop you setting it to air

#

either like ProtocolLib, Spigot, or the client

dusty frost
#

man I gotta say, just recreating your example, Paperweight/Mojang Mappings are so nice man

#
                        val itemDisplay = ItemDisplay(EntityType.ITEM_DISPLAY, (clickEvent.player.world as CraftWorld).handle)
                        val itemStack = ItemStack(Material.AIR)
                        val nmsItemStack = CraftItemStack.asNMSCopy(itemStack)
                        itemDisplay.itemStack = nmsItemStack
                        val metadata = ClientboundSetEntityDataPacket(itemDisplay.id, itemDisplay.entityData.packDirty()!!)
                        clickEvent.player.world.players.forEach { (it as CraftPlayer).handle.connection.send(metadata) }
#

so readable!

#

the Kotlin highlighting in Discord does leave a lot to be desired, though

craggy stump
#

xD

craggy stump
dusty frost
#

Might be client-related honestly, not sure

craggy stump
#

I hate not being able to post an image here >.<

dusty frost
#

?imgur

neat pierBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

dense drift
narrow pivot
#

hi!!! Does anyone know the best way to create an inventory back button? The behavior I'm looking for allows a player to go from a container back into their default inventory screen (the one with the 2x2 crafting square)

dense drift
#

You can not open a player's inventory sadly

narrow pivot
#

ah ok

#

not even with nms?

dense drift
#

Probably not, the inventory is client side I think

narrow pivot
#

oki, thank you for the info

mellow musk
stuck hearth
#

The crafting box and equipment is not

narrow pivot
#

yeah

mellow musk
#

good point.

lyric gyro
#

Anyone know how to install blisssmp

dusky harness
neat pierBOT
dusky harness
#

because if so, note that they have a discord server for support, and also they have a "How to Install" section - did you follow those steps?

lyric gyro
#

Uhh I don't even know how to

#

Install it

dusky harness
#

they have a discord server for support, and also they have a "How to Install" section - did you follow those steps?

lyric gyro
#

Can you

#

Send me. The discord

dusky harness
#

I can't send invite links here, but it's on the spigot page

lyric gyro
#

Dm me privately

dusky harness
#

...ok

molten kestrel
#

Hey

public void onPlayerDropItem(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemDrop().getItemStack();
        ItemMeta meta = item.getItemMeta();
        if (meta != null) {
            String displayName = meta.getDisplayName();
            if (MAGIC_WAND_NAME.equals(displayName) || CHEST_OPENER_NAME.equals(displayName)) {
                event.setCancelled(true);
                player.sendMessage("You cannot drop this item!");
                
            }
        }
    }```

i have this code which cancels the item dropping of 2 items and it works. but if i open my inventory than go to the item with my mouse and click q to drop it i recive the message taht i cant drop it but it just dissapears from my inv and is not on the ground.
Can some1 help me?
#

please ping me when you answer me

merry knoll
#

you just need to cancel the inventory event as well then

lyric gyro
#

Anyone knows how to make a plugin

dusky harness
sleek basin
#

Is this only Minecraft related or is it also Discord related?

pulsar ferry
sleek basin
#

Bet

#

Does anyone have codes for music system for Java?

#

Discord Bot

sleek basin
#

I need a template I’ve already tried this, but didn’t get it to work properly

worn jasper
sleek basin
#

Exactly

dusky harness
sleek basin
#

I just need its codes for the music, so I can implement it into my bot

dusky harness
#

um

dusky harness
#
  • JDA Discord server
#

which can be found on the link that matt said as well

sleek basin
#

They wont feed me with a template 🙄

pulsar ferry
#

If you want to get fed ask chat gpt or something like that

sleek basin
#

already tried 😂

sleek basin
leaden sinew
#

I'm having some trouble with display entity rotations, specifically item displays.
I'm trying to rotate an item to face the same direction as a Vector (for ex. the direction a mob is looking at).
I figure out how to do it, and for some items like swords I also need to take into account their default rotation because they are tilted.
Has anyone done anything similar/know how I can go about it?

#

Also if you could ping when you reply that would be greatly appreciated.

torn heart
leaden sinew
#

That might work for making it straight, but I also need it to face a specific direction

torn heart
#

just do both

leaden sinew
#

That's what I'm trying to do lol

torn heart
#

yea just do both rotations

#

what isn't working exactly?

leaden sinew
#

Yeah I don't know how to rotate the Quaternion

#

With the vector direction

torn heart
#

are you using org.joml

leaden sinew
#

Yes

torn heart
#

do that then also rotate by 45 or -45 degrees around x or z axis, I forgot

leaden sinew
#

rotateTo expects two vectors as inputs, a fromDir and toDir, I'm not really sure what the fromDir is though

torn heart
#

just choose one of the unit vectors

#

it doesn't really matter

#

you just account for each one in different ways

#

I think I used Y for my thing

leaden sinew
#

Okay I'll try that, thank you

torn heart
#

or (1,0,0)

#

or (0,0,1)

leaden sinew
#

Thank you very much, that worked

torn heart
#

Nice

lyric gyro
#

hi

#

how to make Executable Items premuim to allow defaout players to get the item

#

how to change change the op to default in executable items premuim

spiral prairie
#
  1. permission plugin
  2. ask in EI Discord
dense drift
dusty frost
#

much easier to work with, and lets you actually do programming lang stuff like that easily

dense drift
#

Yeah, fair.

river solstice
#

just pump it into chatgpt

#

problem solved

dense drift
#

Ye that doesn't work D:

icy shadow
#

try converting it to json and use jq instead? maybe it's just a bug with that project

#

or yeah you could do it easily with a python script

#

oops 12 hours late

dense drift
#

yq or jq seem nice, but is too much work to learn how to use them so Ill just make a script pepe_kek

narrow pivot
#

whats the event for a dropper dropping an item? BlockDispenseEvent isn't working

narrow pivot
#

nvm!! figured it out

#

needed to use getItem() not getBlock()

dark garnet
#

anyone know of a documentation viewer that can like combine openapi (for rest API) and asyncapi (for websockets) specifications

#

ping if reply

robust flower
#

Does anyone here know what machine learning model format is this?

sharp star
#

How can i use YouTubeAPI in my plugin?

river solstice
#

idk

#

i havent used it

robust flower
sharp star
#

i'm stucked about Jackson library

#

its not working

#

so, server couldnt see jackson library

robust flower
robust flower
sharp star
#

gradle

robust flower
sharp star
sharp star
robust flower
#

What do you mean? Aren't you developing the server ATM or something?

sharp star
sharp star
robust flower
robust flower
sharp star
#

there's no .kts

#

just build.gradle

robust flower
#

That's fine

robust flower
robust flower
# sharp star Okay thank you so much.

Ok, so the possible fix is:

Replace

implementation 'com.google.api-client:google-api-client:2.0.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.apis:google-api-services-youtube:v3-rev20230123-2.0.0'
implementation 'com.google.http-client:google-http-client-gson:1.42.3'

With

implementation platform("com.google.api-client:google-api-client-bom:2.6.0")
implementation "com.google.api-client:google-api-client"
implementation "com.google.oauth-client:google-oauth-client-jetty:1.36.0"
implementation "com.google.apis:google-api-services-youtube:v3-rev20240514-2.0.0"

Let me know if that doesn't fix your issue.

sharp star
#
    compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
    implementation 'com.google.api-client:google-api-client:2.0.0'
    implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
    implementation 'com.google.apis:google-api-services-youtube:v3-rev20230123-2.0.0'
    implementation 'com.google.http-client:google-http-client-gson:1.42.3'
    implementation 'org.yaml:snakeyaml:1.30'
}```
#

What should i change?

sharp star
orchid otter
#

he literally gave u what u have to replace

robust flower
sharp star
#

Oh okay

sharp star
# robust flower Just replace the lines I told with the content I sent.

i did it. but still same error:

java.lang.NoClassDefFoundError: com/google/api/client/json/JsonFactory
        at uk.foudre.youtubeToMinecraft.YoutubeToMinecraft.onEnable(YoutubeToMinecraft.java:12) ~[YoutubeToMinecraft-0.1.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-196]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:642) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: com.google.api.client.json.JsonFactory
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:142) ~[paper-1.20.1.jar:git-Paper-196]
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:103) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
        ... 13 more
[14:15:59 INFO]: [YoutubeToMinecraft] Disabling YoutubeToMinecraft v0.1```
#

building:


> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE

BUILD SUCCESSFUL in 124ms
3 actionable tasks: 3 up-to-date
17:14:52: Execution finished 'build'.```
robust flower
#

Now that I saw, you have another issue, don't you?

#

You're missing shadow plugin...

sharp star
robust flower
sharp star
#

i mean

#

I was having the same problem with the first code I posted, that is, before I changed it.

robust flower
#

But basically, this plugin will include the library files on your plugin JAR so that the classes are present in runtime, this way your plugin will work.

sharp star
robust flower
robust flower
sharp star
#

Yes, now I need to figure out how to use this plugin.

robust flower
# sharp star Yes, now I need to figure out how to use this plugin.

It's pretty basic. The gist is that you add it to your plugins block, and a new Gradle task called "shadowJar" will appear. You'll use it instead of the normal build task. After you run this new task, a new file called your-plugin-name-all.jar will appear in your build/libs directory. This jar will be your "fat jar"/"uber jar", that is, the jar with all your plugin dependencies embedded in it.

#

That's it, I'm going for now, but you should be able to figure out the rest using the official guide, ChatGPT, stackoverflow and other useful websites, good luck ma man!

low gate
#

Guys

#

my dns does not recognize it

#

what can I do?

worn jasper
low gate
#

ty

#

Just mirrored the com.extendedclip.deluxemenus 1.14.0
and me.clip.deluxetags to my repo to work with

worn jasper
#

👍

misty light
#

My placeholders randomly break, like they just stop parsing completely and at random times

#

I have two placeholder classes and they both have the persist overrided to true

#

any idea?

proud pebble
misty light
#

I wanted to separate them a bit

dense drift
#

Are they listed on /papi list installed? @misty light

misty light
misty light
#

it's breaking a ton of stuff, any ideas?

#

papi version 2.11.5

#

like it works for a few hours then breaks

misty light
#

I tried making is a separate papi expansion and it still broke

#

like one that goes in /papi/expansions folder

minor summit
sterile hinge
#

🤨

pure crater
#

I figured it out using a "work around"

#

lmfao

#

in other words checker framework sucks

#

final Object object = new Object[] {game};

#

it doesnt let me just pass game into varargs automatically so i have to define a stupid Object variable for it

sterile hinge
#

well it's not even a varargs method

#

it only looks like one

pure crater
#
    @IntrinsicCandidate
    public final native @PolymorphicSignature Object invoke(Object... args) throws Throwable;
#

i can't pass game directly because it isn't annotated with @Nullable

#

and game could be null

#

And some weird schenanigans, idk

#

This is the only stuff i dislike about checker, cause when the weird platform specific stuff goes back and bites your ass and it doesn't help but just waste time

sterile hinge
#

have you tried what happens with a regular varargs method (i.e. one without the annotations but otherwise equal)?

pure crater
#

Yeah

#

it doesn't work still

#

I'm not sure why tbh

sterile hinge
#

welp

pure crater
#

but whatever

dense drift
teal parcel
#

Someone can make a texture for rank

pulsar ferry
#

Someone definitely can

pure crater
#

yea

#

oh they wrote that for that method but on the methodhandle i didnt see it

misty light
#

it's a lot of crap 😭 but unoptimized code shouldnt be completely breaking it

dusky harness
#

to see if onRequest is being called

misty light
#

hurr, it's a production server with up to 100 players on, I don't wanna spam console either 😭

#

I'm never able to recreate the bug on my local testing, only happens hours into the server being up

#

but Ima say no

#

because

#

when I do /papi parse me %stringutils_tjoidwjaiod_djwaij%, normally, it throws an error, but when the issue happens, it just returns that

worn jasper
#

create a small dev server

#

and test it there

worn jasper
#

meant in his ptero

#

unless he doesn't have a dedi

#

lol

dusky harness
#

the issue shouldn't be machine-specific

worn jasper
#

I usually create a copy of my exact server for dev

worn jasper
dusky harness
#

ah

worn jasper
#

it appears the issue only happens after hours

dusky harness
#

leave the computer for a couple hours 😎

river solstice
#

Anyone ran into discord command registering issues?
I can't seem to register my commands.
I tried PUT https://discord.com/api/v10/applications/<app-id>/guilds/<guild-id>/commands
for like 3 days now, I get an error message:
"Max number of daily application command creates has been reached (200)"
I only have like 20 commands.

For some reason I can create a single command via the POST method. (Not all of them one-by-one, but I picked one random command I have and for some reason it worked)

dense galleon
#

Does it make sense to create a gradle.properties to hold variables such as dependency versions etc.?

#

It's a standard for mods, though I have never seen it being done for plugins hence I am asking

pulsar ferry
#

Better to use version catalog for that

dense galleon
#

Ah I see it allows to easily share dependencies between different projects

#

Though how would I do that with plugins? If I have say 6 plugins that depend on one other dependency

pulsar ferry
# dense galleon How come? In that case why does Fabric/Neoforge use gradle.properties?

Version catalog is a fairly new gradle feature so it hasn't been adopted by a lot of the older projects
And you're mistaking gradle projects with projects, think of them more like modules, but that's not really the best usecase for it, just a single project benefits from it too since you'd have all dependencies on a single file
If you want a quick example, version catalog https://github.com/TriumphTeam/nova/blob/master/gradle/libs.versions.toml
Usage https://github.com/TriumphTeam/nova/blob/master/core/build.gradle.kts

dense galleon
pulsar ferry
#

A few, you'd be setting group and artifact in the catalog as well, while on properties most just do version
Bundles, allows you to bundle dependencies and add them all as one
Works a bit nicer on kts, getting property values on kts is a bit more ass
That's all I can think about right now but still good enough

#

You can also publish version catalogs to share with other projects, you'd have to copy and paste with properties

#

But at the end of the day it's up to you, use what you find best, i personally love having everything in a file that is easy to import

dense galleon
#

Is triumph cmd still up to date? I saw the latest push was about two years ago

dense galleon
dense galleon
#

How does that work then? How does the toml know what artifact I am referencing

dusky harness
dense galleon
#

Ah I am blind clearly

#

Haha

#

for artifact names, is the standard not to have capital letters at all

#

and have dashes where spaces would go?

dense galleon
#

What about repositories? Where do those go when using a libs.version.toml?

#

The example that Matt gave they are not defined anywhere

#

Or do you define them in the settings.gradle?

dusky harness
#

uh

#

ah

#

I forget what its called

#

but I think he just has it defined there?

#

like a build script "template"

dense galleon
#

What's that though

#

Riight

dusky harness
#

idk what its officially called since I haven't used that feature myself

dense galleon
#

Where should I be defining the repositories then in my case? Can I have them in the toml file?

dusky harness
dense galleon
#

Ah just in the build.gradle?

dusky harness
#

yeah

dense galleon
#

Wait am I mistaken or can I have the repositories in the project build.gradle, no need to repeat it in each module?

#

It seems redundant to repeat the repository in each build.gradle

dusky harness
#

but I would try it out

dusky harness
dense galleon
#

Would you define that function in the project's build.gradle and then call it in each build.gradle?

dusky harness
#

only in the base build.gradle.kts (shouldn't be too hard to adapt to groovy/build.gradle?)

dense galleon
#

Oh yeah allprojects

#

That seems simple enough

#

Sorry for asking so many questions haha

dusky harness
dense galleon
#

Is having the versions for each of the modules inside of the libs.version.toml wise? That way I have a single file where I can define the versions of my plugins instead of having to always dig up the build.gradle every time

dusky harness
#

yes
I think this would actually be a really nice usecase for libs.versions.toml bc for ex if you have dependency x in only modules x and y but not z, then you don't have to remember to update the versions twice etc

dense galleon
#

Yeahhh exactly

dusky harness
dense galleon
#

The more I do this whole change the more I think it's a good idea to have a monolithic repo for this whole thing lol

dusky harness
#

ohh wait I think I misunderstood what you meant

dense galleon
#

Since I think that my own plugins will always be using the latest version of my other plugins?

#

I can't think of an instance where they wouldn't

dusky harness
#

I'm trying to see where matt defines his version but it's nowhere to be found

#

🥲

#

or actually it might be this idk

#

idk

dense galleon
#

will have to hope n pray that matt makes a comeback

#

For now I'll try doing it this way

#

In my project build.gradle, should I have group and version?

#

If so, what would they be used for?

dense galleon
dusky harness
#

although I would just keep it all in that

#

since there isn't any harm in having a repo that isn't being used by that module

dense galleon
#

Fair enough

#

I also wrote an addPlugins() method:

void addPlugins(Project project) {
    // Add common plugins to the project
    project.pluginManager.apply(alias(libs.plugins.java.library))
    project.pluginManager.apply(alias(libs.plugins.maven.publish))
}``` you recon this should work?
dusky harness
#

hmm

#

theres gotta be a way to do it more cleanly

dense galleon
#

Yeah maybe, no clue though :/

dusky harness
#

I know the libs.versions.toml supports plugins

#

1 sec

dense galleon
#

Yeah

#

that's how I am doing alias(libs.plugins.maven.publish)

#

I saw that on the documentation

#

also, inside the allprojects{} I am doing other things like project.group = "it.klynet" for other things that I know will be the same for all modules

#

Is that alright?

dense galleon
#

I tried doing project.java.sourceCompatibility = JavaVersion.VERSION_21 but the IDE complains that there is no candidates for java

#

Also another thing, is this block necessary?

tasks.withType(JavaCompile) {
    options.encoding = 'UTF-8'
}
tasks.withType(Javadoc) {
    options.encoding = 'UTF-8'
}```
I don't remember if I added it myself while trying to troubleshoot something or if it's something that should be there
dusky harness
dusky harness
dense galleon
#

Sorry for having pinged you btw, you seem to have done something similar to what I am trying to do

#

I'm also getting a warning about changing that to project.tasks.withType(Javadoc).configureEach instead wht

dusky harness
#

should migrate to kts sometime :)

dense galleon
#

First I gotta do this haha

dusky harness
#

lol fair

dense galleon
#

I can probably get ChatGPT to do the migration for me tbh, it should be capable of at least that, for how shit it is

#

Have you tried adding a addDependencies function?

dusky harness
#

so you can just do the project.dependencies {} directly inside of the subprojects {}

#

wait

#

wait

dense galleon
#

yeah I suppose so but it's easier to just add the paper dependency through the project build.gradle right?

#

inside of allprojects

dusky harness
dense galleon
#

All of my build.gradles will need paper-api as a dependency right

dusky harness
#

oh if you only do it in the base dependencies {} then it won't go through to the submodules

dense galleon
#

Can't I just add that in the allprojects block, to avoid repetition?

dusky harness
#

yeah

#

or in my case I just did kts subprojects { dependencies { compileOnly("org.jetbrains:annotations:24.1.0") } }

#

annotations 😎

dense galleon
#

Ah wait

#

instead of allprojects i am better off doing subprojects right

#

Since I don't want the project build.gradle to also get all this stuff, instead only the subprojects

dusky harness
#

yeah || although tbh it probably won't really matter it'd be the correct thing to do :)) ||

dense galleon
#

This feels a bit too straight forward to be true haha

#

Rip I wanted to also add publishing in the subprojects part but there is no project.publishing I can use there

dense galleon
pulsar ferry
#

build-logic is where I have my convention plugins, these plugins act like gradle configuration, you configure them the way you want and apply to your project, meaning you don't need to repeat code

dense galleon
#

Is it possible to add publishings in the subprojects block in my project build.gradle? to be applied to all modules in my IntelliJ project?

pulsar ferry
dense galleon
#

But I'm curious to know if that is a possibility

dense galleon
#

Just this publishing thing I wanna try sorting out

pulsar ferry
#

What I do is create a publishing convention plugin and add to each project that needs it

dense galleon
#

Isn't there a way to just have it in my subprojects block?

#

I'm not sure how I'd do that way you said

pulsar ferry
#

Yeah you can probably do it in the subprojects block, not sure how though, haven't used it in a while, but just doing tasks { publishing... } should work

dense galleon
#

you mean to do tasks { publishing { ... } }?

pulsar ferry
#

Make sure you're applying the maven publish plugin to the root build.gradle

dense galleon
#

ah

#

Is this not good enough?

subprojects {
    apply plugin: 'maven-publish'
    apply plugin: 'java-plugin'
    ...
pulsar ferry
#

Something like

plugins {
  `maven-publish`
}

subprojects {
  apply {
    plugin("maven-publish")
  }

  tasks {
    publishing {  
      // configure here
    }
  }
}  
dense galleon
#

yeah that's what I'm doing

pulsar ferry
#

No idea how that'd be in groovy gradle

dense galleon
#
plugins {
    id 'java'
    alias(libs.plugins.java.library)
    alias(libs.plugins.maven.publish)
}``` I got that
#

Yeah I don't see publishing being a thing

dense galleon
#

Though when I try doing tasks { publishing { ... } } it doesn't appear to be a valid option

orchid otter
#

Idk if im having a smooth brain moment or what but, im creating a countdown placeholder, that counts even fater the time has been passed as the %server% one just shows 0 after that
aka if its 9pm and countdown is at 8pm it will show that 8pm will be in 23h

            int targetHours = Integer.parseInt(args[0]);
            int targetMinutes = Integer.parseInt(args[1]);
            int targetSeconds = Integer.parseInt(args[2]);

            LocalTime now = LocalTime.now();
            LocalTime targetTime = LocalTime.of(targetHours, targetMinutes, targetSeconds);

            // Calculate the duration between now and the target time
            Duration duration;
            boolean isBefore = targetTime.isBefore(now);
//            boolean isBefore = false;
            duration = Duration.between(now, targetTime);

            long hours, minutes, seconds;
            if (isBefore) {
                hours = duration.toHours() + 24;
                minutes = Math.abs(duration.toMinutes()) % 60;
                seconds = Math.abs(duration.getSeconds()) % 60;
            } else{
                hours = duration.toHours();
                minutes = duration.toMinutes() % 60;
                seconds = duration.getSeconds() % 60;
            }


            // Format the string as XXh XXm XXs
            return hours + "h " + minutes + "m " + seconds + "s";```

i have this right now
#

but it doesnt count the hours correctly

orchid otter
#

Nvm stopped hating myself and used dates :p

#
            int targetHours = Integer.parseInt(args[0]);
            int targetMinutes = Integer.parseInt(args[1]);
            int targetSeconds = Integer.parseInt(args[2]);

            Calendar currTime = Calendar.getInstance();
            Calendar targetTime = Calendar.getInstance();

            targetTime.set(Calendar.HOUR_OF_DAY, targetHours);
            targetTime.set(Calendar.MINUTE, targetMinutes);
            targetTime.set(Calendar.SECOND, targetSeconds);

            Duration duration;
            if (targetTime.before(Calendar.getInstance())){
                targetTime.add(Calendar.DATE, 1);
            }
            duration = Duration.between(currTime.toInstant(), targetTime.toInstant());

            long hours = duration.toHours();
            long minutes = duration.toMinutes() % 60;
            long seconds = duration.getSeconds() % 60;

            return hours + "h " + minutes + "m " + seconds + "s";```
#

for anyone that might need or just wondering ;)

proud pebble
#

i wonder how your expected result and before you fixed it result diffelr

sterile hinge
river solstice
#

I'm having some issues with GitLab, using it as a package registry.
We use it kinda as a "proxy", to access maven packages.
Locally, I have no problems building the project and the dependencies are found correctly.
If I deploy it to one of our servers, it can't seem to find the required deps:

* What went wrong:
Execution failed for task ':update'.
> Could not resolve all dependencies for configuration ':detachedConfiguration1'.
   > Could not find org.springframework.boot:spring-boot-dependencies:2.7.15.
     Searched in the following locations:
       - https://[redacted]/api/v4/groups/1653/-/packages/maven/org/springframework/boot/spring-boot-dependencies/2.7.15/spring-boot-dependencies-2.7.15.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :
   > Could not find org.springframework.cloud:spring-cloud-dependencies:2021.0.8.
     Searched in the following locations:
       - https://[redacted]/api/v4/groups/1653/-/packages/maven/org/springframework/cloud/spring-cloud-dependencies/2021.0.8/spring-cloud-dependencies-2021.0.8.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :

I checked and can verify, that these do exist, ex.:
https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-dependencies/2021.0.8/

#

Could this be a network issue?

orchid otter
sterile hinge
#

Calendar is just a terrible and outdated API

minor summit
#

so true

#

java.time api 😌

orchid otter
#

Welp, ill refactor it if i get to it :D

#

i feel like theres like 3 implementations for time in java

minor summit
#

Calendar and Date are YUCK

#

java.time is unyuck

pure crater
#

Instant 😍

oblique goblet
#

hey guys i need help, so when im adding an a icon to my game rich presence there is no "save changes" button
if anyone can help you can hop in dms!

grave sky
#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

runic quartz
#

Hey everyone I was starting a new spigot plugin project (the first one i do on 1.21 yet) and i dont really understand what happened with the Materials enum ? has it been separated in two enums (Itemtype BlockType) ? does anyone have specific documentation on that ?

dusky harness
#

huh wait what happened??

runic quartz
# dusky harness huh wait what happened??

well you know the change they made in the experimental branch quite a long time ago ? to replace the material enum with two enums ItemType and BlockType ? well i have that without using the experimental branch, the Material class isnt there anymore it might be an error tho because the itemstack class still requires a material argument

#
    public void onEnable() {
        // Plugin startup logic
        ItemStack item = new ItemStack(ItemType.PAPER.asMaterial(), 7);
        BlockType.AIR;
        Material.AIR;
    }````

Here is the only valid way i found to create an itemstack that doesnt make my ide scream out even tough its very ugly, below that Blocktype air exists
material air doesnt

and i cant import the org.bukkit.Material class
#

maybe spigot has been imported the wrong way even tough i dont know how that could be possible, I also use the Minecraft Development plugin on intelliJ to create my projects and Maven as a build tool heres my spigot dependency btw : <dependencies> <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.21-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> </dependencies>

it's the normal one

dusky harness
#

While this API is in a public interface, it is not intended for use by plugins until further notice. The purpose of these types is to make Material more maintenance friendly, but will in due time be the official replacement for the aforementioned enum. Entirely incompatible changes may occur. Do not use this API in plugins.

runic quartz
runic quartz
#

apparently I need to update IntelliJ, I'll try that out when Im home
Update it worked

royal hedge
#

how should i be writing tests for spi with the module system

#

from my understanding gradle patches the modules for tests so theyre also in the module

#

so i cant exactly add a provides declaration to the module

#

and i also cant create the META-INF/services file cuz its not an unnamed module

#

should i js be doing a black box test?

#

and create another gradle project for that?

sterile hinge
#

It’s probably enough to have an additional source set and I‘d assume you can configure gradle to not patch modules for that

dense drift
#

What was the option for gradle to use paper api, which requires java 17, and compile for java 8?

dusty frost
dense drift
#

Is for papi player expansion 🥲

dusty frost
#

i mean at this point, i say we just drop older versions

#

they can use a past version of the expansion

#

not like they need updates or anything lol

dense drift
#

I'm all for it, but we need to discuss this with the others shrug

minor summit
#

why can't you just depend on an older api?

dusty frost
#

new features i'm guessing

dense drift
#

hmm, I was using the paper api, but it seems like I don't use anything paper specific, so I just switched to spigot you_think_about_that

#

It is all good now! But I would still like to know how to accomplish that muttley I know someone sent a message here about that but I can't find it 😢

dense drift
#

What so I have to do for client side entities to be moved by water, pistons, etc.? I know I need to handle stuff by myself, but how? XD
For more context: we want to allow players to create mob farms with spawners, but big farms usually cause performance issues shrug so I was wondering if I could do something about that by using client side entities. Entities don't have AI, they just need to interact with water and take damage from fire, magma blocks, w/e else + players.
Let's say I manage to do all these, would I be able to call a fake EntityDeathEvent, EntityDamageByEntityEvent, etc. with these entities to let other plugins do their job? E.g. to drop random items or add skills experience.

cinder vine
#

Hello

#

Why does VoteParty run socket on main thead?

#

When a large number of players logged in, it started consuming 13% of the main thread

dense drift
#

What socket?

cinder vine
#

For connections.

dense drift
cinder vine
#

@craggy inlet

dense drift
#

Ask them to link their account. In the mean time, do you have a spark report? Idk what sort of socket it would use

pulsar ferry
#

Unable to load the data. Perhaps it expired? Are you using a recent version?

cinder vine
#

Oh it works for me

craggy inlet
#

asd

craggy inlet
#

@cinder vine its my dev

dense drift
#

GOD I HATE IMGUR ON MOBILE, IT ALWAYS OPENS RANDOM POSTS WHEN I ZOOM IN

dense drift
#

Welp, getOfflinePlayer strikes back again

cinder vine
#

I understand that the plugin is open source right?

cinder vine
#

Will VoteParty fix it?

dense drift
#

I'm not sure when, Glare is busy with life, if you are a dev the fix should be easy to implement.

cinder vine
#

The patch is already working on my side, I just came to ask why it was working like that.

dense drift
#

Because

pulsar ferry
#

Only God and Glare probably knows, and at this point it might just be God 😔

cinder vine
#

I see..

#

Also the plugin "Votifier" seems to have similar issues

#

t tries to get player uuid via mojang api using socket connection in the main thread

dense drift
#

Good thing they are both OS ❤️

cinder vine
dense drift
pulsar ferry
cinder vine
dense drift
#

There's a saying.. pr or shut up jeb_shrug

dense drift
#

Realistic

cinder vine
dense drift
#

Probably

dusky harness
cinder vine
dusky harness
#

Whereas with executor or thread it wouldn't delay

neon pewter
#

erm any1 know how to check the dpath or the classpath of the project in intellij, my project is loading from some other build library else where that run lwjgl 3.3.3 instead of the 3.3.4 i setup.

cinder vine
#

It is specifically designed to work within the Bukkit ecosystem. When you use this feature it takes care of the thread handling which is safer.

#

It is already a big change not to run it in the main thread, it was tested and indeed it is going well with more than 200 players using votes system

minor summit
#

what

minor summit
worn jasper
#

what

neon pewter
cinder vine
minor summit
#

windows moment

#

.\gradlew.bat

neon pewter
#

cant either, maybe I forgot to add gradle home to environment path ...

minor summit
#

oh

#

you aren't on the project dir

#

you're on your user home folder lol

neon pewter
#

ops

#

?

#

wait what do you mean project directory? because the termial current cd is the project file...

minor summit
#

I can't read

#

do you have gradlew.bat anywhere in the project files?

dusty frost
#

yeah should be able to just use the wrapper

#

no gradle home necessary

neon pewter
#

oh

#

those 2 file is missing......

dusty frost
#

oh yeah, you should probably include the gradle wrappers lol

#

especially in like git, so that other people can just use it straight up

neon pewter
#

i think i mess up the project creation process....

dusty frost
#

you should be able to just run the wrapper task in like IntelliJ to generate the wrappers

#

then you can easily use from the command line and figure out what's going on

sullen geyser
#

what does PlaceholderAPI.setPlaceholders(string, player) do. does it really return the same as /papi parse player %server_online% for example?

dusty frost
#

also it probably has something to do with implementation fileTree('library') { include '*.jar' }

dusty frost
#

so if you have like four placeholders in one string, it'll do them all in one go

neon pewter
neon pewter
dusty frost
#

do you have it installed on your actual computer? or do you just use the IntelliJ one?

neon pewter
#

yes i have 8.5 and 8.7 installed

#

i tried add it to the environment path (again) already

dusty frost
#

but not in your PATH?

#

yeah

#

if you can't call it from the command line then your PATH is messed up

neon pewter
#

is this correct ?

dusty frost
#

why is your gradle not installed in like Program Files?

#

but i mean theoretically maybe? might need to do a bin subfolder

minor summit
#

(also, all the jdks lol)

neon pewter
dusky harness
#

nice

dusky harness
#

whereas with executor it'd only take 1

dusky harness
pulsar ferry
#

Tbf I can't see why VoteReceivedEvent isn't just async by default, there is no reason for anything voting related to be on the main thread lol

cinder vine
#

Another option would be to simply use UUID since the getOfflinePlayer method is deprecated and is not recommended.

dusky harness
#

|| but "jokes" aside bukkit uses executor anyways, just delays it by a tick ||

#

but 1 extra tick isn't that big of a deal

cinder vine
dense drift
#

I dont think it matters that much for a vote if it is delayed by 1-2 ticks

river solstice
#

It will matter, I want to see the message that I voted at the EXACT moment when I did, not some 1-2 ticks after, such bs

stuck hearth
#

1/20th of a second killed my father

pure crater
#

What the hell ?!?! I’m lagging my message came 2 ticks after !!!

near ore
#

whats the requirement for oraxen item material?

minor summit
# cinder vine Yeah, i think its just fine? Since it manages properly the threads

it doesn't really manage anything, in fact the BukkitScheduler implementation is hot garbage unfortunately, the only real reason to use it is to jump back to the server thread, for anything that should run on a separate thread I strongly suggest using one of java's built-in ScheduledExecutorServices from the Executors class

drowsy edge
#

So im trying to load structure files that ive generated with a structure block and ive tried a few ways of actually getting and reading the file in the code, putting it in the resources folder and putting it in the main source code. When I try to build with it in my resources folder it throws this error: https://paste.helpch.at/jexudejuri.css and all the methods I have found on looking in the jar file can't actually see the nbt file. Is there any way for me to be able to put the structure file in the resources folder or another way?

#

Im using Intellij

dense drift
#

I assume you have a maven/gradle task that replaces some placeholders in all your resources, such as the version. Limit that to only .yml files and other types.

drowsy edge
#

does <filtering> affect that?

royal hedge
#

gradle doesnt even patch iirc

drowsy edge
#

thanks for the help though i probally would not have found that out

dense drift
#

np

#

been there, done that kek

tulip cairn
#

my issue is it goes straight diagnal you can see how that does not look natural because the mob is clipping into the block getting to the next location how can i fix that to make it natural https://paste.helpch.at/gibuzohiqe.java

cinder vine
dense galleon
#

For some reason, even though I am configuring the processResources task, the version and description in the plugin.yml of my plugin don't get filled in. This is what the relevant section in the build.gradle looks like: https://paste.helpch.at/uxobujiqux.js

the plugin.yml fills in everything but the description and the version, though I provide those in each subproject like such:

version = "1.1.0c"
description = "Some description"```
dense drift
dense galleon
#

got it, it was a weird issue with functions in the build.gradle

#

Either way: how do you guys recommend going about automating back ups for my paper worlds within my Velocity network? It's all done through Docker as of right now.

dusty frost
#

yeah I mean my server network just uses Pterodactyl panel and we use the automated backups from that

#

pretty solid

dense galleon
#

I am hosting everything on my own linux server

dusty frost
#

like just raw, with just Docker compose or something?

#

if you're using iztg/minecraft-server or whatever that docker image is called, i think that has backup stuff

dense galleon
#

I am making my own image

dense galleon
#

I did register the incoming plugin channel

dense drift
#

I guess you can not detect the messages sent from the same server?

atomic trail
#

This stream will only contain an object which class matches the attribute class right?

        Optional<AttributeData> optionalAttribute = attributes.stream().filter(predicate -> 
                attribute.getClass().isInstance(predicate)
        ).findAny();

attributes is a set of AttributeData which attribute also is. However I need to check if the subclass is an exact match

dense drift
#

Yes

atomic trail
pure crater
#

well they're completely different things

#

one checks for equality (reference or object depending on if it was overrided or not), and the other checks if its assignment compatible

flint pecan
#

Hey, does anyone know why the instance returned from PlaceholderAPIPlugin#getInstance() is null?
java.lang.NullPointerException: Cannot invoke "me.clip.placeholderapi.PlaceholderAPIPlugin.getLocalExpansionManager()" because the return value of "me.clip.placeholderapi.PlaceholderAPIPlugin.getInstance()" is null

dense drift
#

You shade papi

river solstice
#

dont be a shade to your papi

flint pecan
#

What?

torn heart
#

shaded jars

dusky harness
neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

flint pecan
#

I have fixed it a while ago, thanks. I had to exclude it from my shade configuration.

river solstice
tawny wedge
#

Hi! I have coded a plugin for manage Minecraft"s Glow as a cosmetic.

Deluxe Tags manage scoreboard teams too. That generate issues while both plugins are being used.

Is there anything that I can do to hook my plugin with Deluxe Tags?

dense drift
#

Delixe tags doesnt do that @tawny wedge

shrewd hatch
# dense drift Delixe tags doesnt do that <@718002603073601577>

Deluxe Tags was overriding the minecraft team color. I found this on my own through attempting to manually change team colors through the vanilla commands. Each player was given their own "personal team" labeled with their username. Upon attempting to remove the player from said team, the tag disappeared then the player was re-added to the team less than a second later, putting the tag back as a result.

dense drift
#

I HIGHLY doubt deluxe tags uses teams since you use a placeholder for the tag and players are not grouped by tag or anything

#

Ive just checked the code, it doesn't 🙂

lethal inlet
#

hi, im trying to make a placeholderapi expansion in my plugin, but it doesnt seem to work. i dont understand why. It doesnt seem to even try to pass the placeholders to my plugin, am i doing something wrong?
When i do /papi parse me %telecominfo_ping% i just get %telecominfo_ping% back. Other plugin's placeholders work fine
Heres my class for the extension

package me.kardoskevin07.telecominfo.addons;

import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.kardoskevin07.telecominfo.TelecomInfo;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;

public class PapiAddon extends PlaceholderExpansion {
    private final TelecomInfo plugin;
    public PapiAddon(TelecomInfo plugin) {this.plugin = plugin;}
    @Override
    public @NotNull String getIdentifier() {return "telecominfo";}
    @Override
    public @NotNull String getAuthor() {return "008kevin";}
    @Override
    public @NotNull String getVersion() {return "1.0.0";}
    @Override
    public boolean persist() {return true;}

    public String onRequest(OfflinePlayer player, @NotNull String s) {
        if (s.equalsIgnoreCase("ping")) {
            return "pong";
        }
        return null;
    }
}
#

and my main class onEnable method: (sorry didnt fit in one)

public void onEnable() {
        instance = this;
        FileConfiguration config = this.getConfig();
        saveDefaultConfig();

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new PapiAddon(this).register();
            getLogger().info("PAPI extension has been enabled");
        } else {
            getLogger().info("PAPI is not installed");
        }
        getLogger().info("Loaded successfully");
        if (config.getBoolean("debug")) {
            getLogger().warning("!!! Debug mode is enabled !!!");
        }
        this.getCommand("listCarriers").setExecutor(new ListCommand());
        this.getCommand("carrierInfo").setExecutor(new InfoCommand());
    }
dusky harness
lethal inlet
neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

lethal inlet
#

oh i cant post images

neat pierBOT
lethal inlet
dense drift
#

Override canRegister and return true
Also, make sure you add papi as softdepend to your plugin

lethal inlet
#

overriding canRegister fixed it, already was a softdepend

#

thanks for the help, appreciate it a lot

dusky harness
#

oh nice
sorry, forgot to check back 😖

hardy sonnet
#

i have a question

neat pierBOT
#

There is no time to wait! Ask your question @hardy sonnet!

hardy sonnet
#

how to command in delux menus
open chat
exemple
left_click_commands:

'[suggest_command] gamemode 1

orchid otter
#

Is there a painless way to store a Mob in one of the PersistentDataType's

minor summit
#

as a blob

#

UnsafeValues#serializeEntity/deserializeEntity

acoustic osprey
#

hello gushs

river solstice
#

hello gush

orchid otter
#

My initial idea was just to base 64 that bish

minor summit
#

spigot trollsad

orchid otter
minor summit
#

you can store a byte[] in the PDC without having to b64 it

orchid otter
#

Im having a smooth brain moment, where can i get a instance of UnsafeValues

#

as the method isint static

#

@minor summit :)

minor summit
#

yeah

#

or from the Server instance if you're a DI nerd

icy shadow
#

that's awesome dude

neon pewter
#

any1 happened to know what this check item is call ?

dense drift
#

What even is that?

neon pewter
#

ImGui

dense drift
#

And you want to know the name of that element? Can you not check the code?

neon pewter
#

I just look around tho, it seem to be a normal menuItem that contain a boolean pointer
And for your question to check the code, for some reason searching the code on github does not return this demo window for some reason

dense drift
neon pewter
#

oh, i was searching the java fork, thanks for it.

hazy junco
grim oasis
#

from what I see, this is what your message will be after the replacements
§a§lcj89898 §fHello %%clantag%%

hazy junco
# grim oasis which one? the clantag?

It is its own placeholder because I coded via placeholderapi and, for example, the placeholder does not work on the scoreboard but with chat events

grim oasis
#

clantag is not a PlaceholderAPI placeholder though, fyi

#

papi placeholders are %identifier_placeholder% format

#

so %clantag% would not be correct

#

I'm curious as to what the purpose of replacing a single % with two %% is, but I could just not be seeing it

#

Also, just thinking about it

#

you might want to parse placeholderapi placeholders BEFORE replacing the %player% and %message% internal placeholders

#

otherwise, users could then type a placeholder into their message and have it parsed

orchid otter
#

Im just gonna hook into the plugins, only 2 of em

high sigil
#
    @Override
    public String onRequest(String identifier) {

        return switch (identifier.toLowerCase()) {
            case "domain" -> configManager.getConfig().getString("general-settings.server-domain");
            case "prefix" -> configManager.getConfig().getString("general-settings.server-prefix");
            default -> null;
        };

        return null;
    }
#

C:\Users\ddeni\Documents\GitHub\sheduxdev\Lobbyleyici\src\main\java\shedux\dev\lobbyleyici\PlaceholderAPI.java:37: error: method does not override or implement a method from a supertype
@Override
^

#

whats wrong with that code bro

dusky harness