#help-development

1 messages · Page 1169 of 1

river oracle
#

That's like the whole point of spigot 😭

glossy laurel
#

yeah I just realised

#

😭

blazing ocean
blazing ocean
#

mojank moment

glossy laurel
#

oh shi its from another server

austere cove
#

?

remote swallow
glossy laurel
#

read this guys like last 5 mins of messages

#

@austere cove

#

I think thats why you were pinged

trail coral
#

this guy was rude to me first and hten started crying when i matched the energy ^

#

and i lef thim alone, just typed something in chat and he again replied to me saying no one asked me

#

and is now crying again

#

yall can do whatever you want but im not in the wrong lmao

blazing ocean
glossy laurel
#

"But you started first!!"

trail coral
#

how old are you genuienly

glossy laurel
#

nevermind that

#

am I cooked?

remote swallow
#

?paste ur pom

undone axleBOT
glossy laurel
remote swallow
#

smh

trail coral
#

ik the "syntax" for group id's are something like net.zeradris.blabla if you have that domain but what if i just dont have any domain? what then

#

whats the correct thing to put

remote swallow
trail coral
#

thx

glossy laurel
austere cove
#

ive seen com.github.user too

eternal oxide
glossy laurel
remote swallow
glossy laurel
#

uhm

#

tutorial? 😭

river oracle
#

MenuType.SMITHING.create

#

Player.openInventory

glossy laurel
river oracle
#

That's just my quick tutorial

#

Nope an InventoryView

#

So mist be associated with a player

glossy laurel
#

or?

remote swallow
#

most inventories should be player based

river oracle
#

I also have more really bad news for you

glossy laurel
glossy laurel
river oracle
#

With a side of bad news for you

glossy laurel
#

ill start with the bad news first

#

tf is this?? 😭

river oracle
#

Bad news 1 Bukkit.createInventory is on its way out

remote swallow
#

chest inventories

glossy laurel
#

DAMN

#

NO

#

NOONO

remote swallow
#

9x1 is a 1 row inventory

river oracle
#

Bad news 2 InventoryType is next

glossy laurel
#

ONONONONON

glossy laurel
#

not that bad

river oracle
#

Bad news 3 they'll be replaced by better alternatives

glossy laurel
#

NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

river oracle
#

Bad news 4 you have to cope some menus only work with players

#

E.g. smithing anvil etc

glossy laurel
#

bro everything is yellow 😭

#

Guys, does spigot actually remove anything it deprecates?

eternal oxide
#

rarely

glossy laurel
#

@river oracle it worked, thx

river oracle
glossy laurel
#

?howold 1.21.1

undone axleBOT
blazing ocean
#

?howold 1.21.3

undone axleBOT
glossy laurel
blazing ocean
#

?howold 24w45a

undone axleBOT
glossy laurel
#

?howold 2.0

undone axleBOT
glossy laurel
#

ig not that hard to remember

blazing ocean
#

Yeah

glossy laurel
#

?howold 1.21.4

undone axleBOT
blazing ocean
#

it's just the calendar week

glossy laurel
#

yeah

#

ik

blazing ocean
#

<year>w<week><id>

glossy laurel
#

ik

#

I watch canman 😉

river oracle
blazing ocean
#

No use for it

river oracle
#

Wait till you realize inventories don't have titles

#

You'll fucking lose it

glossy laurel
#

names?

blazing ocean
#

b-but I need to identify my own inventory!11!!!eleven

blazing ocean
glossy laurel
#

ohh

blazing ocean
#

I believe they have IDs

glossy laurel
#

they have inventory views

#

which have titles?

river oracle
glossy laurel
#

I laughed at that

blazing ocean
remote swallow
#

minecraft in a nutsheel

glossy laurel
blazing ocean
remote swallow
#

slowly

blazing ocean
#

They're also writing somewhat decent code nowadays

remote swallow
#

i love the ai mechanics

glossy laurel
blazing ocean
glossy laurel
remote swallow
#

i loved 4j studios mc

glossy laurel
#

lets face it, glide was the best part of it

remote swallow
#

frrrrr

glossy laurel
#

cavern record?

remote swallow
#

dont remember

glossy laurel
#

me neither

#

but it was 1:20ish

blazing ocean
#

terra swoop force tho

glossy laurel
#

im actually so dedicated I bought giants map pack

#

in 2024.

glossy laurel
#

10 minutes of gameplay

#

NOTHING surpasses og glide

#

change my mind

blazing ocean
#

never played 4j studios

remote swallow
#

it was xbox 360

#

xbox 250 kekw

glossy laurel
blazing ocean
#

Yeah fuck consoles

remote swallow
#

you had no childhood

blazing ocean
glossy laurel
blazing ocean
remote swallow
#

true

glossy laurel
remote swallow
#

you are always very angry

#

how was ur october fest rad

glossy laurel
blazing ocean
glossy laurel
blazing ocean
remote swallow
#

did you drink many beer

blazing ocean
glossy laurel
remote swallow
glossy laurel
#

lmao

glossy laurel
remote swallow
#

its something

#

i can tell you something worse

glossy laurel
#

ill take it

glossy laurel
remote swallow
#

"its as useful as anne franks drumset"

glossy laurel
#

brb

#

gotta google

glossy laurel
#

but sure

remote swallow
#

do you know who anne frank was

glossy laurel
#

yes

remote swallow
#

how would she have used a drumset without being caught

glossy laurel
#

Oh.

#

that was a bit too dark for me

glossy laurel
#

@river oracle how do I get a generic inventory of N rows from an int

blazing ocean
glossy laurel
glossy laurel
river oracle
#

Views are locked to a player

glossy laurel
#

?? 😭

glossy laurel
#

how do I work with inventoryviews in InventoryClickEvent

glossy laurel
#

and not inventory view

river oracle
glossy laurel
#

thx

#

hold up now

river oracle
#

A view is just a combination of top and bottom inventory

river oracle
#

And it's associated with a player

glossy laurel
#

NO

#

YOURE JOKING

#

PLEASE

#

FUUUUUUUU

#

dang it

river oracle
#

Well views also have specific data

glossy laurel
river oracle
#

Yeah I mean you could I think

glossy laurel
river oracle
#

Could do that too

glossy laurel
#

is there a way to define a "locked" hashmap? cuz final doesnt do that

#

immutable is the word I think

zealous osprey
#

Maybe Collections#unmodifiableMap if that exists or create your own wrapper that overrides all modifying funcs

glossy laurel
#

wait, Map.of() is immutable appearantly

zealous osprey
#

didn't know that existed, but yeah.
Most (maybe all, if the std lib is consisten) that use <Some collection>#of is immutable. Just like List.of and Set.of

glossy laurel
#

dont you love it when your code turns yellow

vagrant stratus
#

Ya'll a bunch of nerds so help me w/ something batch related.

To echo a blank line on the screen, type:

echo.

This makes sense and so does echo Hello World and echo "Hello World"

but wtf is the point of the dot in echo.Found cURL

blazing ocean
#

Batch concern

blazing ocean
vagrant stratus
#

This isn't a variable, why the fuck are they using a dot

blazing ocean
#

Average Batch user

vagrant stratus
#

Average random github repo

blazing ocean
#

real

vagrant stratus
#

good thing I'm having ChatGPT do all the hard work 😎

glossy laurel
#

tf is this about

violet blade
#

thats a... very badly cropped screenshot that doesnt really provide any context?

north nova
#

hello; does anyone know if it's possible to change how fast villagers collect crops?

chrome beacon
#

Yes that's possible

#

but you might need to use some nms

north nova
#

I saw somewhere that EntityChangeBlockEvent covers that so I thought I could just cancel the event if it's a crop & have a chance of it being added to its inventory

#

to nerf it; that's what I'm trying to achieve

sullen marlin
#

That sounds fine

north nova
#

cool thanks

runic kraken
#

hey, I have a question: how can I hide players on the server using protocollib version 1.21.1?

blazing ocean
#

Player#hidePlayer(Plugin, Player)

mellow edge
#

idk where else to post that to not spam, but... I want to ask something. I've always been strictly server-sided, but I want to know how in practice is the server related to the client, like is the same code shared or "taken" out of the main code just for the server. Because I saw DedicatedServer (that are probably localhost/lan?) classes and that got me thinking whether the server (MinecraftServer, other classes) code is actually just taken out of the main (client+server) code. Is there any concept / diagram of that the internal structure? Understanding that is basically a key to modding mc both-sided.

blazing ocean
chrome beacon
#

^^

mellow edge
#

and I assume most of the classes are just reused on both-sides?

#

or what?

blazing ocean
#

I believe IntegratedServer is client-only

river oracle
blazing ocean
#

Yeah it's a client class

river oracle
#

I wonder how mojang has it setup internally

#

like 3 projects, shared server client?

#

or just different modules?

blazing ocean
#

I'd guess monorepo and some ugly mess of a buildscript

mellow edge
#

ok so most of the code is basically reused and then it has this categories
net.minecraft.all_common_code
net.miencraft.server
net.minecraft.client?

river oracle
blazing ocean
#

net.minecraft is common, nms is server and nmc is client only

young knoll
#

I think they just yeet the entire net.minecraft.client package for the server

blazing ocean
river oracle
#

oh fair

mellow edge
#

and then for server just shade 2 out of three modules into a server jar

#

(probably there is internally more modules? but 3 main)

remote swallow
#

i am once again asking a question

mellow edge
#

I don't see what they could be using other than modular projects

remote swallow
#

do i use special source public or convert to tiny and use tiny

blazing ocean
#

ask @shadow night instead smh

remote swallow
#

nah

blazing ocean
#

wait he's prob sleeping now

mellow edge
#

do you think having mc server as a complete separate project would be a bad thing or a good thing (yes we wouldn't have integrated server)?

#

beacuse I think it would actually be much better and cleaner

shadow night
blazing ocean
#

what

runic kraken
blazing ocean
#

table

#

but yeah there isn't API for doing that without hiding from tab

mellow edge
#

I actually LOVE that they are hidden from tab, thus I can easily just make multi-instance game in a single server

blazing ocean
#

n-no 😭

blazing ocean
#

there is a reason networks exist

young knoll
#

It meant bugs existed on one but not the other

mellow edge
young knoll
#

Nah there’s a flag to show them on the tab list now

#

Iirc

mellow edge
#

flag? at least for hidePlayer I don't remember it existing, except if you mean something else

river oracle
#

Otherwise you have to use proguard and whatever you need for csrg

remote swallow
#

i could use special source

#

but ill prob use tiny

blazing ocean
#

my source is special

mellow edge
#

ooooh 😦 I tought I could workaround things this easily

#

probably just a call to nms tho so it doesn't metter that much anyway

hushed spindle
#

anyone know of a way to get the normal vector off of an entity hit by a raytrace

#

making custom projectiles and i wanna have it so these things can bounce off of entities

young knoll
#

Bounding boxes are always axis aligned

#

Which should help

hushed spindle
#

i dont know how to check which face of a bounding box is hit though

eternal oxide
#

Why do custom when you can just modify a normal projectile?

#

Arrow -> setItem

hushed spindle
#

making a magic plugin

#

such entities wont do

#

need their behaviors to be very specific

mellow edge
lost wolf
#

Does someone how can I modify/display exeption messages similar to this? I've seen some plugins use them

remote swallow
#

its brigadier

#

its on the mojang github org

#

theres other command frameworks that support it like cloud

slender elbow
#

you can't modify that exact message where it's showing

#

that one is entirely client sided

lost wolf
#

Can they be sent for custom commands?

#

Is it possible to send those messages without the use of brigadier?

remote swallow
#

its easier to just use brigadier or a command api that uses it

lost wolf
#

I'm aware

#

I'm doing some experiments and I'm trying to see if it is possible

olive vault
violet blade
violet blade
olive vault
#

Any way around that? I really don’t feel like shading

violet blade
#

add it as a dependency ?

olive vault
#

I want my plugin to automatically download all dependency’s so people can easily set up the server

#

Shading would mean bigger file size, I really don’t want that either

rough ibex
#

well if they download the dependency in the end

#

does it really matter

olive vault
#

Manual labor < automatic genius

rough ibex
#

its not manual labor since its shaded in your plugin though

olive vault
#

Oh that

#

Doesn’t spigot have a file size limit

violet blade
rough ibex
#

yes

chrome beacon
#

4MB

olive vault
#

Nbt api is 127 kb

#

My other library’s are around 700 kb total

rough ibex
#

easy fit

chrome beacon
#

Also if you're on a modern version you shouldn't need nbtapi?

#

Just use PDC

rough ibex
#

inb4 1.8

olive vault
#

I want to make the display name of a item invisible

cedar saffron
#

Duarte clocking in another 9-5 in help development, nice to see good people doing good stuff

olive vault
#

I can only really do that with packets or nbt

chrome beacon
#

What are you setting in the nbt?

olive vault
#

displayname

chrome beacon
#

To what value

olive vault
#

#

olive vault
#

And or if that doesn’t work I’ll use the hide item tooltip thingy item edit used

cedar saffron
#

speak yo shit!

chrome beacon
#

If you just want to set it to an empty string you can do that with the api?

olive vault
#

When I do that it renames the glass back to default

#

and I cant do this
if (meta != null) meta.setDisplayName("\u200D");

as it just returns a weird string

chrome beacon
#

Just set it to a space

chrome beacon
#

" "

olive vault
#

let me get a ss, olivo ill try that again in a minute

chrome beacon
#

Hide tooltip is also an option in the api

olive vault
#

gotta remove the nbtapi dependency

chrome beacon
#

So you can just go with that

violet blade
olive vault
#

if (meta != null) meta.setDisplayName("");
ill try this

olive vault
#

that worked 😛

chrome beacon
#

Yeah the name can't be empty

olive vault
#

so with a player without any options/mods enabled it would look like :

violet blade
#

pretty sure that can be achieved with the regular itemmeta api

olive vault
#

that is without it

#

that is with ChatColor.GRAY

#

omg i did this already

#

im having memory loss

#

blackMeta.setDisplayName(String.valueOf(ChatColor.RESET));

#

god damnet

violet blade
#

💀

olive vault
#

2023

#

the good ol days

chrome beacon
#

Hm? Why do you need to PDC tag if every egg has it

#

Could probably listen to the entity drop item event

#

Try the LootGenerateEvent

rotund cape
#

test, who need minecraft server (java & crossplatform) developer ? dm me

rough ibex
#

no one does

wraith delta
olive vault
#

again, setDisplayName("") just defaults to the item name in minecrafts code

#

ive tested it

wraith delta
nova notch
#

does it really matter

olive vault
#

chatcolor.reset is just §r

wraith delta
nova notch
#

ok sure maybe less performant by half a nanosecond

#

who cares

#

if it works it works

wraith delta
#

Sometimes its good to be aware of options. doesnt mean you have to use them.

nova notch
#

yeah but looking for the section symbol and copy pasting it is annoying

#

enum is easier

wraith delta
#

ChatColor.RESET + "" 😁

nova notch
#

exactly

late quarry
#

Im trying to make a gun that uses rayTraceEntities to get what the player hits but because of lag I think and that the raycast is server side even if my cursor is right on a player that's just moving side to side, I "miss", but if I aim slightly in the future i.e. predict where they will be in a few milliseconds, it hits.

is there a way to make it more accurately reflect a hit in accordance with where players are on the shooting player's client somehow

worthy yarrow
#

imho I'd rather fps games follow this sort of tracing logic

worthy yarrow
#

Take battlefield for example, this how their gun physics work which is more realistic

#

I'm not being very helpful because I'm not too sure how to go about that issue but I like the realism in fps

late quarry
#

Well, yeah but they do that intentionally by simulating bullet travel/drop and such, in this case, its just a byproduct of client-server lag which is not ideal,

For example, if I had really bad ping the amount of predictive aiming I would have to do would be vastly different than if I had good ping which is a bad experience as it's not standardized for all players yk?

worthy yarrow
#

Like I said I'm not sure how to go about this, if it's a latency issue then I'm not even sure that's fixable

late quarry
#

Fair enough. I recall popular servers having games that emulate CSGO (mineplex comes to mind a few years ago) and they seemed to solve this problem decently well if I remember correctly, so just curious if anyone here with more experience has some thoughts.

worthy yarrow
#

Perhaps, hopefully someone has

agile berry
#

so, i'm making a map display plugin, but now i have an issue of sending map packets to new player / after server restart. Now i tried to do that using .dat, and saving each MapDisplay pixel data and mapId to it, and on join just sending all of that to the player. In the console packets are sent, and they are correct, tho maps remain the same - default ones...

#

I'm using protocol lib for sending packets

mellow edge
worthy yarrow
agile berry
# mellow edge Provide some actual code

I'm not at home rn, but in short:

  • MapDisplay contains mapIs and a byte array of colors ( 128x128 )
  • When i save it, i just write the whole array as a value to the .dat file, with key being mapId.
  • Stored data, and data plugin loads after restart do match.
  • Method that sets map data also works, but map just doesn't update.
#

bruh i thought i pushed the code to git, but i just commited it

gleaming musk
#

any update on ConsumableComp?

eternal oxide
#

Thats not spigot

hushed spindle
#

does anyone know of an efficient way to get the closest face relative to a point on a bounding box

eternal oxide
#

block or entity ray trace?

hushed spindle
#

entity

eternal oxide
#

not possible with api

hushed spindle
#

i mean surely you can do some math to figure it out right

#

i just dont know what the best method is

#

it essentially just boils down to finding out the closest face to a rectangular block

mellow edge
#

You can make your own raycastr algorithm

hushed spindle
#

i will still need to know how to do this

#

a custom raytracing algorithm wont fix that

hushed spindle
#

i want custom projectiles to bounce off hit entities and i'd like this to be done based on their bounding box

#

but im thinking instead im going to bounce these projectiles from a normal vector from the entity's center isntead

spiral light
#

wasnt there a problem when getting the position of the projectile ? the position is mostly not where it rly hits i think

hushed spindle
#

im pretty sure raytraces are pretty accurate in where they hit

#

if not a custom raytrace algorithm will be necessary yeah

mellow edge
#

So you want the projectile to bounce off vertically of where it hit or in the opposite direction of the raycast dir.?

fading drift
#

has anyone actually ever written a multi server communication with sockets

#

I'm writing my own but I'm not sure if I'm even going about it in the right way

spiral light
fading drift
#

why code just feels really fucked

thorn crypt
#

Hey, how can I disable the farmland to become grass again if there is no water ? 🤔

hushed spindle
#

ah nevermind

#

BlockFadeEvent might be of use

thorn crypt
#

Okay thank you :D

orchid iron
#

does anyone know if its possible to move a textdisplay entity by using the EntityRelativeMove packet?

spiral light
#

why would you ? but probably yes

orchid iron
#

wym with why would i? its packet based

fading drift
#

what would be the reasons for a world unable to being deleted

#

after running Bukkit.unloadWorld

spiral light
orchid iron
spiral light
spiral light
fading drift
#

never had this issue before with waiting no time

orchid iron
spiral light
#

you could try to set the interpolation and then use teleport instead if it is not working currently

orchid iron
spiral light
#

yes (maybe?)

orchid iron
fading drift
#

and then after an autosave it gives me this

#
[22:36:41 ERROR]: Couldn't save chunk; already in use by another instance of Minecraft?
net.minecraft.server.v1_8_R3.ExceptionWorldConflict: Failed to check session lock for world located at .\matches\match-1, aborting. Stop the server and delete the session.lock in this world to prevent further issues.
        at net.minecraft.server.v1_8_R3.WorldNBTStorage.checkSession(WorldNBTStorage.java:80) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.World.checkSession(World.java:3123) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.ChunkRegionLoader.a(ChunkRegionLoader.java:121) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.ChunkProviderServer.saveChunk(ChunkProviderServer.java:280) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.ChunkProviderServer.unloadChunks(ChunkProviderServer.java:386) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.WorldServer.doTick(WorldServer.java:236) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:944) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:412) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:808) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:641) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.lambda$spin$0(MinecraftServer.java:132) ~[patched_1.8.8.jar:git-PandaSpigot-"b0ab6d0"]
#

even tho I ran Bukkit.unloadWorld

spiral light
fading drift
#

impossible

pure dagger
#
public static void give(Player player, ItemStack item) {

        if (item == null || item.getAmount() < 1) return;
        
        HashMap<Integer, ItemStack> leftovers = player.getInventory().addItem(item);
        
        if (leftovers.isEmpty()) return;
        
        for (ItemStack leftover : leftovers.values()) {
            player.getWorld().dropItemNaturally(player.getLocation(), leftover);
        }
    }

if item stack amount is > 64 then it just gives the player a stack of items bigger than 64, the maximum is 99, what do i do to fix it so it splits when its more than 64?, should i do it manually, clonning the itemstack and setting the amounts to be <= 64 ?

young knoll
#

You shouldn’t really need to do packet based for display entities

#

They are so light

orchid iron
young knoll
#

There’s a separate interpolation for teleporting

orchid iron
pure dagger
# pure dagger ```java public static void give(Player player, ItemStack item) { if (it...
public static void give(Player player, ItemStack item) {
        give(player, item, item.getAmount());
    }

    public static void give(Player player, ItemStack item, int amount) {
        if (item == null || amount < 1) return;

        while (amount > 0) {
            ItemStack splittedItem = item.clone();
            splittedItem.setAmount(Math.min(amount, 64));
            amount -= Math.min(amount, 64);

            HashMap<Integer, ItemStack> leftovers = player.getInventory().addItem(splittedItem);
            if (leftovers.isEmpty()) continue;
            for (ItemStack leftover : leftovers.values()) {
                player.getWorld().dropItemNaturally(player.getLocation(), leftover);
            }
        }
    }

okay i made this

#

i hope thats ok and it works

worldly ingot
#

I'm not sure why you're doing that though. You can do this instead:

ItemStack itemStack = // whatever
itemStack.setAmount(128); // You're allowed to set amounts above the stack limit
World world = player.getWorld();
Location location = player.getLocation();
player.getInventory().addItem(itemStack).values().forEach(remaining -> world.dropItemNaturally(location, remaining));
#

addItem() always returns the items that couldn't be added, regardless of whether stack size is > max. And if all could be added, it returns an empty map

slender elbow
#

thanks choco, you're very helpful

#

you should get the helpful role

spiral light
#

isnt Staff better ?

worldly ingot
#

Oh! Okay! I mean I don't think so but like if you think so then like I guess that'd be really cool PeepoFlushed

#

BUT LIKE I DON'T HAVE TO

#

but Emily thinks so, so like I mean I'm not opposed to it

pure dagger
worldly ingot
#

I don't think that's the case. I'm like 99% certain is breaks it up into stacks

#

Did you verify that that was the case?

pure dagger
#

yes i didnt expect that

#

but it gave me 99

worldly ingot
#

Weird. I was certain it split them up

kindred sentinel
#

What interesting features were added to spigot 1.20.1-1.21?

#

Like Player.addResourcePack

#

(Before it was impossible)

spiral light
chrome beacon
#

1.20.5 added a lot of cool stuff

kindred sentinel
kindred sentinel
spiral light
kindred sentinel
#

oh thanks

#

I should check everything after 1.21.1? to understand what was added in 1.21.1?

spiral light
#

for example yes... but some stuff was added after 1.21.1 but still was already in vanilla MC in 1.21.1 (and not in spigot api)

kindred sentinel
#

are you about new attributes and commands?

spiral light
#

what ?

kindred sentinel
#

Wdym by stuff that was added after 1.21.1 but still was already in vanilla MC in 1.21.1

spiral light
#

for example the PlayerInputEvent was added after release 1.21.3 but could have been added in 1.19 for example

kindred sentinel
#

oh

#

(I still dont know what do this event even do)

spiral light
kindred sentinel
#

Yeah, I looked, but didn't understand

#

Which input?

spiral light
#

? its just an event which gets called when a player presses WASD oder SPACE ...

kindred sentinel
#

Ohhh

#

I understood

#

thanks

glossy laurel
#

Can I somehow make the armor stand in a smithing table wear more than 1 armor piece

spiral light
#

i dont think so... its just a visual for the current item

glossy laurel
#

F

kindred sentinel
#

I guess it's client-side

pseudo hazel
#

why use packets

agile berry
#

more optimized than bukkits api

glossy laurel
#

😭

agile berry
#

💀

#

but it is, feels like night and day lol

glossy laurel
#

going through packets cuz its more optimized is wild though

hushed spindle
agile berry
#

but its not that different from just using bukkits api, and i use protocol lib, so it is not that hard lol

agile berry
#

if animationparts for some reason is empty

hushed spindle
#

how can it be null if its final and i instantiate it like that

#

empty is fine, it just returns an empty set then

#

this is throwing a NPE

glossy laurel
agile berry
#

well it shouldt throw npe if you initialized it.

hushed spindle
#

yeah but its actually throwing an npe

agile berry
#

rip

#

maybe it doesn't initialize properly

#

you tried adding an if with checking != null?

hushed spindle
#

i mean its fine then but if im doing something wrong i'd rather fix that

agile berry
#

where do you set animationParts?

hushed spindle
#

first screenshot, at the top of the file

agile berry
#

so its just an empty hashmap?

hushed spindle
#

yeah

river oracle
#

I just ignore intellij it's got such stupid inferences sometimes

hushed spindle
#

no, animationparts itself is null

#

and it actually is throwing an NPE

#

it should not be complaining about looping through a potentially empty map

river oracle
#

Show the stacktrace

hushed spindle
pseudo hazel
#

even then the code wouldnt crash if an element was null

river oracle
pseudo hazel
#

it would only crash if the actual datstructure was as null

hushed spindle
#

oh

#

no i get it

#

im calling the method before its instantiated

river oracle
#

How is that even possible unless you're using unsafe

pseudo hazel
#

yeah wth

hushed spindle
pseudo hazel
#

also its a final

river oracle
#

Lol

#

Yep that would do it

hushed spindle
#

the map is instantiated on line 26 xdd

river oracle
#

This is why you should use constructors

hushed spindle
#

myea

pseudo hazel
#

oh

#

oof

ancient plank
#

that was my assumption tbh

hushed spindle
#

it does help to have people walking through possible steps to let me know im an idiot

river oracle
#

Constructors>>> Inline field initialization

pseudo hazel
#

based

jovial schooner
#

how can I make the /tab nametag toggle work if I disabled it so that the name is no longer visible in the players, the command /tab nametag toggle no longer works?

#

so the command works, but nothing happens when I give the /tab nametag toggle command, when I disable it, the name is no longer visible in the players above the head, but if I re-enable it, the name is visible and I give the /tab nametag toggle command, it works, the name is disabled, and if I and the command is activated back

#

that I have a roleplay server and I want to make the /tab nametag toggle work even if I disabled a config so that the name is no longer visible and if you give the command the name will appear only to that person who gave the command

#

I use tab V5.0.3

spiral light
#

this is for spigot help and not for plugin directly help... you should ask the owner of the plugin directly

jovial schooner
#

ok, sorry to bother you

river oracle
#

If it's not you it's malware you need to wipe your pc

orchid brook
#

Hi, I'm using the player.getInventory().addItem() method every time a player breaks a crop, as I want to add the harvested item (e.g., wheat) directly into the player's inventory without dropping it on the ground. However, it seems that this method is quite resource-intensive. I was alone on the server, and after profiling it with Spark, I noticed that Spark reports high resource usage for this function.
does anyone have suggestions for optimizing it?

river oracle
#

You can't do much about that blame bukkit for doing deep copies

spiral light
#

you could try to teleport the item to the player ... but thats not safe for in lava and i dont know if this is faster because its using NMS

orchid brook
#

Is creating a queue of all items to add to the inventory and then using a Bukkit.getScheduler().runTaskTimer to process the queue at regular intervals a good approach? My idea is to batch the items from multiple crop breaks and add them to the player’s inventory in bulk every few ticks, rather than adding items immediately on each break event.

worldly ingot
#

I think you're overthinking. I am not at all convinced that this is overloading your server. I think you're misreading your Spark profiler

orchid brook
#

yeah maybe

worldly ingot
#

If you're looking at the percentage mode, then yeah, it might have a higher percentage than anything else on your server if you're doing nothing on it but the one thing you're actually doing

#

What matters most is the time taken in milliseconds. If it exceeds 50ms/tick, you're in trouble

orchid brook
worldly ingot
#

Yeah it can be misleading at best

kindred sentinel
#

does saveResource works like this?

worldly ingot
#

You'll often see the server sleep take up like 90% of the server tick, but that's because your server is performing well and doing what it's meant to be doing - sleeping while not processing any logic lol

orchid brook
#

Ok can i do a spark and send the spark here ?

worldly ingot
#

Sure

pure dagger
worldly ingot
#

You can't do saveResources("languages/") though because it doesn't work recursively

kindred sentinel
ancient plank
#

typing in one message is hip and cool with the kids

worldly ingot
#

Though now that I think about it, ./languages/langs.yml might not work. languages/langs.yml would though

worldly ingot
#

And yes, you would have to save them all individually

#

Or make a method to save them recursively

orchid brook
kindred sentinel
pure dagger
#

oh, yeah

worldly ingot
#

Oh yeah. Your average MSPT is < 1ms lol

orchid brook
#

Ok so i need to look the ms and not % thx

worldly ingot
#

The thing taking the most amount of time in your plugin is ProtocolLib, but you can't fix that. That's just what ProtocolLib does

#

Your ms would half if you took it out

orchid brook
#

yeah it's because i use packet to display fake crops for each player, like every player didn't see the same crops and can change the crops that they see with /betterhoe changecrops wheat for example.

#

So every time I break a wheat, I cancel the break event and send a fake packet to the player to display AIR like this only the player sees the broken crop, not everyone else. so i can't realy delete it

worldly ingot
#

Makes sense to me

#

Plugin is performing fine though in the grand scheme of things

spiral light
#

i mean isnt there a Player#sendBlockChange ?

orchid brook
#

i didn't change it didn't have the time

spiral light
#

the only problem is that block updates destroy everything

orchid brook
#

I cancel all packet that is a block updates

spiral light
#

for that you need protocollib always right ? there is no api i think

orchid brook
#

yep

#

At how many milliseconds should I be worried? Actualy its take 344ms

spiral light
#

one tick normally has 50ms

#

max

summer scroll
summer scroll
#

Oh cool, thank you so much!

kindred sentinel
#

Constructions like that have sense? Or I can use just

            saveResource("languages/langs.yml", false);
            saveResource("languages/players.yml", false);

?

worldly ingot
#

Yes those are fine

kindred sentinel
#

Which one?

#

Yes have sense or yes I can use just saveResources?

worldly ingot
#

Oh, sorry, you're asking which is preferred

kindred sentinel
#

yes

worldly ingot
#

saveResource(), when passed false, will not overwrite existing files. So you only really need the top snippet

remote swallow
#

but it does send a message

worldly ingot
#

It will also make any directories necessary

remote swallow
#

cant be having messages in my logs

worldly ingot
#

It does send a message in console, which is annoying, but it's fine lol

kindred sentinel
#

So this constructions have sense?

worldly ingot
#

Yes. You can just have the saveResource() calls and you're fine

kindred sentinel
#

does
playersConfigFile.getParentFile().mkdirs();
have sense?

worldly ingot
#

saveResource() does that for you already

kindred sentinel
#

got it, thanks

worldly ingot
#

You can see the whole implementation if you'd like, but that's the mkdirs call :p

thorn crypt
# hushed spindle BlockFadeEvent might be of use

Just tried now (was not here for the day sorry couldn't try before, the event doesn't seem to stop transforming back in dirt

@EventHandler
   public void onBlockFadeEvent(BlockFadeEvent event) {
       Block block = event.getBlock();
       if (block.getType().toString().contains("FARMLAND")) {
           event.setCancelled(true);
           Bukkit.getLogger().info("Farmand tried to change");
       }
   }

and yes my class is registered

violet blade
worldly ingot
#

There are multiple events

#

Though one of them definitely should be BlockFadeEvent

#
public static void turnToDirt(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
    // CraftBukkit start
    if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) {
        return;
    }
    // CraftBukkit end
    IBlockData iblockdata1 = pushEntitiesUp(iblockdata, Blocks.DIRT.defaultBlockState(), world, blockposition);

    world.setBlockAndUpdate(blockposition, iblockdata1);
    world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(entity, iblockdata1));
}
#

The block check is weird though. Not sure what's wrong with block.getType() == Material.FARMLAND

violet blade
#

yeah, contains its more for multiple blocks with similar names

worldly ingot
#

Even then, use a Set or a Tag if necessary

kindred sentinel
#

Is it possible to create really worth parkour tricks plugin?

violet blade
paper viper
#

Quick question, do I need to use an nbt api if i want to add item components right now because they aren't implemented into api yet

thorn crypt
violet blade
#

nah, you opened an interesting debate

fair rock
thorn crypt
#

fixed code if you want

@EventHandler
    public void onBlockFadeEvent(BlockFadeEvent event) {
        Block block = event.getBlock();
        Material material = event.getNewState().getType();
        if (material == Material.DIRT && block.getType() == Material.SOIL) {
            event.setCancelled(true);
        }
    }
fair rock
agile berry
#

so i made a map display plugin using protocol lib, and the issue im facing is that new player / players after restart dont see custom maps, so i made this code to save tand load them:

private void loadMapDisplays() {
  File file = new File(plugin.getDataFolder(), "map_displays.dat");
  if (!file.exists()) return;
  
  try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))) {
      Map<Integer, byte[]> loadedData = (Map<Integer, byte[]>) ois.readObject();
      for (Map.Entry<Integer, byte[]> entry : loadedData.entrySet()) {
          int mapId = entry.getKey();
          byte[] pixels = entry.getValue();
          mapDisplays.put(mapId, new MapDisplay(mapId, pixels, player -> {}));
      }
  } catch (IOException | ClassNotFoundException e) {
      plugin.getLogger().severe("Could not load map displays");
      e.printStackTrace();
  }
  plugin.getLogger().info("Loading maps...");
  }
  
  public void saveMap(int mapId) {
  File file = new File(plugin.getDataFolder(), "map_displays.dat");
  Map<Integer, byte[]> existingData = new HashMap<>();
  
  if (file.exists()) {
      try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))) {
          existingData = (Map<Integer, byte[]>) ois.readObject();
      } catch (IOException | ClassNotFoundException e) {
          plugin.getLogger().severe("Could not load map displays for saving");
          e.printStackTrace();
      }
  }
  
  MapDisplay display = mapDisplays.get(mapId);
  if (display != null) {
      existingData.put(mapId, display.getPixels());
  }
  
  try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file))) {
      oos.writeObject(existingData);
  } catch (IOException e) {
      plugin.getLogger().severe("Could not save map displays");
      e.printStackTrace();
  }
  plugin.getLogger().info("Saving map: #" + String.valueOf(mapId) + ".");
  }

Problem is, that it still just a default map after loading and sending packets for players

fair rock
#

!paste

#

?paste

undone axleBOT
agile berry
agile berry
#

bump

kindred sentinel
#

is it possible to make player spin like with trident but without trident

violet blade
#

Pose#SPIN_ATTACK?

mellow edge
#

idk whether there is a spigot approach

kindred sentinel
kindred sentinel
violet blade
#

nvm there is not a direct way to set the player's pose without relying on hacky methods

meager wolf
#

asked this a long time ago but didn't receive a response. I implemented a feature where players get a sign UI to write messages, which I can then use elsewhere. The sign isn't actually placed in the world; it's just a ghost block that is sent to the specific player I want to open the UI for. However, my problem is that the player can see the sign behind them when they are in F5 mode. I attempted to prevent this visibility, but I couldn't figure it out. I noticed that Hypixel, which inspired my work, doesn't allow players to see the sign placed anywhere. How do they achieve that?

By the way, I can't place the sign thousands of blocks away, as it needs to be within 12 blocks of the player in order for the UI to open on the client side.

sullen marlin
#

Maybe they destroy the sign after the GUI is opened?

#

Or place it underground

slender elbow
#

or inside 😳

late quarry
solar adder
#

I get this error:

        at org.solenxia.minecraft.pojo.CrateInfo.fromYaml(CrateInfo.java:42) ~[?:?]```
#

when the method is literally built in the plugin why does it not exist

sly topaz
#

instead use a wrapper class

solar adder
#

I'm not sure what that means, extending ItemStack.

#

It has been fixed by renaming the class, another plugin has the same class name and same method name on the same server, which caused this.

sly topaz
#

how could that be possible

#

I guess if it is a common lib across your plugins

worldly ingot
#

It's just 6 blocks below the player. You just can't see it most of the time because you're looking forwards, not down at your feet while flying 10 blocks in the air :p

meager wolf
#

oh

#

i didnt see that :b

#

thanks

pseudo hazel
#

anvil on top

lilac dagger
#

i thought you just sent an edit sign packet and the client just sends back what's written when you click done

sullen marlin
river oracle
#

Hypixel source code leaked :O

sly topaz
#

you can still send the open sign packet I believe, just not get the text inside of it when finished

pliant topaz
#

does the gui close when updating the sign block to be non-existent like a tick later? or would it just not be possible for the text to be retrieved?

lilac dagger
#

it makes sense

orchid iron
#

hello, what is the best way to get a mobs size?

#

*height

pliant topaz
#

probably by checking their boundingbox size

#

or height in this case

orchid iron
#

how can i access that?

pliant topaz
#

i think its just Entity#getBoundingBox? not sure

#

try looking in the docs

worldly ingot
earnest girder
#

if I need to spawn in permanent entities such as NPCs and TextDisplays for my server, where should I put the code? Should the code check if the entities exist every time the server starts, and then spawn them in accordingly? Should I make a command to spawn each one in, so I can do it manually and then replace them manually if they get deleted?

meager wolf
# worldly ingot

well, that was definitely worth the 2 hours of striving through minecraft's source code, apparently, 1.8.9, unlike ~1.20, doesnt have the limit to how far the sign can be, and i joined hypixel to check if i can see it on that version cause i always use it there, so i wasnt seeing the sign, and it messed up my life

#

i spent days trying to make the sign invisible 🥲

vital ridge
#
public void updateScoreboard(Player p) {

        Scoreboard scoreboard = p.getScoreboard();

        for (Team team : scoreboard.getTeams()) {

            String suffix = ColorUtils.translateString(applyPlaceholders(p, team.getSuffix()));

            team.setSuffix(suffix);

        }

    }
#

I'm updating my scoreboards like this, but it doesnt work.

#

It doesnt get updated.

#

This function is running in every 10ms

#

every 10 ticks*

lilac dagger
#

This is not the best way to run a scoreboard

vital ridge
#

My first time doing it.

#

Never rly worked with scoreboards.

#

I just have a bunch of teams which contain strings that have placeholders

#

so I'm the point of updating is getting all the teams and replacing all the placeholders in them

vital ridge
lilac dagger
#

Have each player hold the team they are in and then just update the team they are in

vital ridge
#

Players aint in no teams, Teams are actually used so I can have values that I can update, its a weird name ik, tf should a team mean? Its kinda something Minecraft came up with I think, but actually I just use teams so I can have prefixes and suffixes, which I can update whenever I want, so the scoreboard wont flicker.

#

A pretty shitty explanation I just gave rn tbh, if I had to guess you probably know what Teams are in Scoreboards and their usage etc., you probably just wonder what I'm trying to achieve.

meager wolf
lilac dagger
#

Just have 15 teams

#

In an array

#

Along with score for each

#

And then just display text based on the requirements

vital ridge
#
public void updateScoreboard(Player p) {

        Scoreboard scoreboard = p.getScoreboard();

        
        for (Team team : scoreboard.getTeams()) {

            String prefix = team.getPrefix();
            prefix = ColorUtils.translateString(applyPlaceholders(p, prefix));

            ConsoleManager.message(team.getName());

            scoreboard.getTeam(team.getName()).setPrefix(prefix);

        }
    }

I just dont understand why this is not working

#

it should work

#

im getting the team

#

and adding a new prefix

#

Ive printed out the prefix in console and its exactly what Id like it to be

#

It just doesnt update

lilac dagger
#

To have it show in the side bar you need to set a score with the same name as you used to register the team

astral oracle
#

someone help me make a script from scratch?

#

I wanted to make an NPC that spawns another NPC.

#

@vital token do you help me?

nova notch
#

why are you pinging some random person whose last message was 4 months ago

grand flint
quaint mantle
echo basalt
#

No clue when it changed but I recall at least up to like 1.16 you could just put it at 0,0,0 and it'd work

sullen marlin
#

Damn Mojang ruining everything

echo basalt
#

Probably a 1.19 thing tbf

quaint mantle
quaint mantle
#

i love you

#

lmao

sullen marlin
quaint mantle
echo basalt
#

md can i have purple name

sullen marlin
#

Idk

quaint mantle
#

md can i have purple name too

sullen marlin
#

Are you eligible

echo basalt
#

up to you

#

you make the rules here

quaint mantle
#

he literally does

sullen marlin
#

🔨

echo basalt
#

yes ill bob the builder

sullen marlin
#

No you may not have a purple name

echo basalt
#

:(

#

can u make black role for me

quaint mantle
echo basalt
#

for making goated content

sullen marlin
#

No

echo basalt
#

lame smh

#

imma tell daddy papermc

quaint mantle
sullen marlin
quaint mantle
sullen marlin
#

Why is there a @worldly ingot sticker set

late quarry
quaint mantle
echo basalt
#

imma profess my love for kotlin

sullen marlin
echo basalt
#

or generate a second hitbox so you don't have any wonky cornering

sullen marlin
#

Isn't the gun gonna be basically like an arrow though?

echo basalt
#

uH

sullen marlin
#

Or is it different because people adjust for arrows but you want guns to be instant

late quarry
#

its like a hitscan gun so no projectile simulation

echo basalt
#

ever heard of hitscan?

sullen marlin
late quarry
#

basically, if u click on them and they're in range they die instantly lmao

sullen marlin
#

Otherwise no

echo basalt
#

cool approach to guns (computationally expensive): when clicked it shoots a projectile from the barrel which travels at a certain speed and has projectile falloff at certain distance ranges, with a damage falloff formula

lame approach (very fast): when click raycast and damage the target entity and maybe shoot a particle

late quarry
#

But now that you mention it I dont think ive ever observed that happen with arrows, like it always seems like if the arrow on my screen "hits" a player they take damage. Does the arrow mechanics also expand the hitbox to account for lag or something

echo basalt
#

arrows have a hitbox

#

hitbox is large enough to account for that

late quarry
#

Ahh ok

sullen marlin
#

I guess you just need to make your hitbox bigger

echo basalt
#

make your ray size bigger yeah

sullen marlin
#

Yeah raySize argument I assume

obtuse hedge
#

Hi, were you able to do this in a previous version & with proof?

#

I was talking in the Mojira discord about this, and apparently this was never possible?

long ocean
#

They are taking away .setLastDamageCause() and i can't find a replacement or other way to set the damage cause. Any ideas? Something im missing?

sullen marlin
#

?xy

undone axleBOT
long ocean
#

My xy is i want to set a damage cause when i manually give damage damagable.damage() to a player (by command is one way) and i don't want the wrong reason for damage or death given.

sullen marlin
#

.damage(amount, source)

long ocean
#

But source doesn't include damagecause, it only has damagetype.

#

and type is a subset of cause

sullen marlin
#

what reason are you passing in

long ocean
#

You mean the cause? Sometimes suicide, or custom, or fire, or fall, etc.

sullen marlin
#

type should get translated to the right cause

#

suicide doesn't look like its used at all by the server anymore, it should be removed.

#

fire, fall, etc will come from using the respective source

long ocean
#

So finial answer is find an equivalent type for cause?

sullen marlin
#

yes, and the further answer is stop using cause at all

long ocean
#

Why you hating on cause 🙂

sullen marlin
#

cause is only an API thing, it won't change anything in the server

long ocean
#

ok

sullen marlin
#

whereas source is a server thing and will make everything work properly - death messages, advancements, etc

long ocean
#

What is generic and generic_kill?

#

Could that replace custom and suicided?

sullen marlin
#

yes, I think that's how it works in vanilla

long ocean
#

Thx

long ocean
#

I don't see how to assign the damage type to the DamageSource object. Docs say builder(DamageType) but im not seeing how to use it. new DamageSource(DamageType) didn't work and DamageSource.builder() isn't valid.

obtuse hedge
#

you said damagetype extends damagesource right

remote swallow
#

DamageSource.builder(DamageType)

#

read the javadocs

long ocean
#

End goal is using the damageable.damage(amount, damagesource). So im trying to create the damagesource to pass to it.

long ocean
remote swallow
#

you are using a constructor for damage source that does not exist, builder takes in a paraamter

#

it then returns a builder where you can add more info then call build on to get the DamageSource back

buoyant viper
#

i tried to use custom damage source once and fucked it up so bad minecraft didnt even have a translation for it

alpine urchin
#

new experimental api for it is sick

blazing ocean
trail coral
#

how do i repeat a task every X amount of ticks?

spiral light
#

?scheduler

#

hmm

trail coral
#
 new BukkitRunnable() {
        @Override
        public void run() {
            // Code to run every second

        }
    }.runTaskTimer(plugin, 0L, 5L); // 0L delay, 20L ticks interval

this doesnt work for some reason

spiral light
#

Bukkit.getScheduler.runScheduler....

trail coral
#

Bukkit.getScheduler() isnt a function

#

it says at least

#

i can do it in my main file but

spiral light
#
 Bukkit.getScheduler().runTaskTimer(plugin, ()->{
           
}, 10, 1);

i use this for a 10tick delay at start and run each tick

trail coral
#

i dont wanna do it there i have a seperate file for this specific task

#

and the code works in the main file but not in there

spiral light
#

do you call the seperate class ?

trail coral
#

i mean i will but i havent implemented it yet i literally cant import Bukkit.getScheduler()

#

like it says that function isnt a thing

spiral light
#

if you create another class where your scheduler code is you need to run the Method or whatever in the onEnable for example

quaint mantle
#

what happens if you do new Bukkit()?

trail coral
#

i fixed it now nvm

#

it was cause i wasnt doing it in a object

#

cause java is oop

blazing ocean
undone axleBOT
blazing ocean
trail coral
#

alr fixed it thanks

quaint mantle
#

Yeah js ssaw that

quaint mantle
blazing ocean
hazy parrot
#

Nothing

blazing ocean
#

everything is static

quaint mantle
#

alr

sonic goblet
#

Does the BuildTools experimental profile generate the latest 1.21.3 jar? And is there a way to view what its going to generate (so i dont have to keep asking :p)

sullen marlin
#

No,dev is latest. Experimental is the experimental branch (can view on stash)

wraith dagger
#

?mappings

undone axleBOT
ionic pebble
blazing ocean
chrome beacon
ionic pebble
#

He loves that name I promise.

bold plume
#

30% in processing usage on a server with 35 people and 45% if I count velocity and lobby. Do you think processing usage will limit how many people I can host?

kindred sentinel
#

How to create components like FoodComponent etc.

#

or jukebox playable component

pseudo hazel
#

use item meta i dont think there is api for the components

kindred sentinel
#

I dont really understand how. For example I want to add food component to the gold ingot
ItemStack a = new ItemStack(Material.GOLD_INGOT);
a.setItemMeta(a.getItemMeta().setFood(<FoodComponent>))
but how to create this food component?

slender elbow
#

getFood, modify, setFood

kindred sentinel
#

oh

worldly ingot
kindred sentinel
#

ty

quaint mantle
#

wow!

#

you zcan do that im pretty sure

kindred sentinel
#

Is it possible to change item in general? Like all items of this material?

#

Only by changing all loot sources of getting this item?

#

And how to change drop of block by BlockBreakEvent?

young knoll
#

BlockDropItemEvent

#

Or just ItemSpawnEvent

#

EntitySpawnEvent? Idk something like that

kindred sentinel
kindred sentinel
young knoll
#

addEffect

kindred sentinel
young knoll
#

It doesn’t take a food effect

#

It takes a potion effect and a float

kindred sentinel
#

OHH

#

Yes, potion effect

#

thanks

young knoll
#

Also rip 1.21 compatibility

#

Dangit Mojang

kindred sentinel
#

You mean that most of the plugins wont work in 1.21?

young knoll
#

With regards to the food component, yes

kindred sentinel
#

why there is no food effect in 1.21.3?

#

what happening mojang

#

its not funny funny

sonic goblet
#

You mean adding potion effect when you eat food?

kindred sentinel
#

yes

#

there is this thing in 1.21 but not in 1.21.3

#

WTH

young knoll
#

They changed it to a separate component

kindred sentinel
#

ohh

young knoll
#

And I don’t think spigot has added api for it yet

kindred sentinel
sonic goblet
#

I did it manually listening to the PlayerItemConsumeEvent

kindred sentinel
kindred sentinel
sonic goblet
worldly ingot
#

Doc has a PR open for the comsumable component

bold plume
split gyro
#

How do i send redstone particles in 1.21? the names are changed and i need to use BlockData? I dont understand

lilac dagger
#

Of course

#

Caching your messages is a good thing

#

I see you're already doing it with the hashmap

#

Just move it in a field and register the messages in there

split gyro
#

thats why asked here

lilac dagger
#

Instead of registering them based on the need, just register them once

chrome beacon
bold plume
lilac dagger
split gyro
# chrome beacon What part are you having troubles with

nvm that could you help me with this

    public void createHelix(Player player) {
        Location loc = player.getLocation();
        double radius = 2;
        for(double y = 0; y <= 30; y+=0.05) {
            double x = radius * Math.cos(y);
            double z = radius * Math.sin(y);
//            PacketPlayOutWorldParticles packet = new PacketPlayOutWorldParticles(EnumParticle.BARRIER,true, (float) (loc.getX() + x), (float) (loc.getY() + y), (float) (loc.getZ() + z), 0, 0, 0, 0, 1);
//            for(Player online : Bukkit.getOnlinePlayers()) {
//                ((CraftPlayer)online).getHandle().playerConnection.sendPacket(packet);
//            }

            float locx=(float) (loc.getX() + x);
            float locy=(float) (loc.getY() + y);
            float locz=(float) (loc.getZ() + z);
            player.spawnParticle(Particle.FLAME,new Location(loc.getWorld(), locx,locy,locz),1,0,0,0,0);
        }}

This is a function I made (stole the math) for a helix that goes up from a player, but i want it to go in the direction a players looking, Im making like a shooting thing and its gonna be 2 helix's combined with different colors and once they reach a player or a block the particles no longer appear

split gyro
#

im bad with vectors and that stuff and i dont wanna just yoink code (couldnt even find any to steal ngl)

bold plume
#

the logic is right

lilac dagger
#

Ah, I read it as the player from the loop

hushed spindle
#

can i change the rotation of an item display without teleporting it

remote swallow
#

apply a transformation

hushed spindle
#

alright, what does the left rotation and right rotation mean in the Transformation constructor

bold plume
#

Should I in any case use stringbuilder.append for performance? I have a method that is called every 5 ticks and I am doing several concatenations

#

Internal error

com.intellij.ide.plugins.EssentialPluginMissingException: Missing essential plugins: com.intellij.java, com.intellij.java.ide
at com.intellij.ide.plugins.PluginManagerCore.checkEssentialPluginsAreAvailable(PluginManagerCore.kt:614)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.kt:682)
at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invokeSuspend(PluginManagerCore.kt:899)
at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invoke(PluginManagerCore.kt)
at com.intellij.ide.plugins.PluginManagerCore$initializeAndSetPlugins$2.invoke(PluginManagerCore.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.sta

eternal oxide
#

in the IDE or at runtime?

#

bad kotlin is my guess

spiral light
#

why do i get the jar outdated info waiting for 20s after building and using the newest ?

river oracle
#

Are you sure you're on newest? If so it's a bug pretty sure that's a manual date time thing

spiral light
#

yes ... thats why i am wondering ... didnt changed anything .... always worked before with: java -Xms512M -Xmx2024M -jar BuildTools.jar --dev --remapped

bold plume
eternal oxide
#

-dev is not release so out of date would be correct

river oracle
spiral light
#

its the default

river oracle
#

I didn't even know BT had a --dev build not sure what that is

spiral light
#

(i am using 1.21.3 all the time)

spiral light
young knoll
#

--dev isn't a build, it's a flag

#

--dev
Disables BuildTools version checking, Java version check, and MC version lookup.
Just builds the actual build environment.

spiral light
#

what O.o

#

hmmm i was growing up with this and will stick to it :9

river oracle
#

You should ask them

bold plume
river oracle
#

I know the search engine is intimidating but I believe in yoh

bold plume
#

their support should take weeks

smoky anchor
#

try to reinstall

bold plume
#

unfortunately arch linux prevents me from doing this

river oracle
#

If you can't figure out how install and reinstall something you probably shouldn't be on arch

bold plume
#

the partition has no space and I can't modify it in arch linux

river oracle
#

If your partition is full you have bigger problems than intellij

#

Maybe you should pick an OS that is easier for you

bold plume
#

I just have this space problem, this shit OS doesn't have a way to modify the partition sizes when formatting

river oracle
#

You honestly just have a skill issue and probably shouldn't be using arch linux switch to an easier distro if you're going to stick with linux trust me it saves a lot of time

bold plume
#

I've been using Arch Linux for a few months now

kind hatch
bold plume
#

Well, that's why I wanted to do it when I formatted it, but when I formatted it, I couldn't change the partition sizes.

#

I went to restart the PC and it doesn't turn on anymore. Can anyone help me?

eternal oxide
#

if power button does nothing, reset cmos

bold plume
#

Linux isnt boot

smoky anchor
#

💀

eternal oxide
#

you said it didn't turn on anymore

bold plume
#

linux does not boot

eternal oxide
#

pressing Enter does nothing?

bold plume
#

No 😦

eternal oxide
#

it must do something

#

it can't do nothing

kind hatch
#

You should at least have a tty

runic kraken
#
    private void setupScoreboard(Player admin) {
        ScoreboardManager manager = Bukkit.getScoreboardManager();
        scoreboard = manager.getNewScoreboard();
        Objective objective = scoreboard.registerNewObjective("EventSidebar", "dummy", ChatColor.RED + "Zabij Admina!");
        objective.setDisplaySlot(DisplaySlot.SIDEBAR);

        objective.getScore(ChatColor.GREEN + "Admin: " + admin.getName()).setScore(3);

        new BukkitRunnable() {
            @Override
            public void run() {
                if (!eventActive || targetAdmin == null || !targetAdmin.isOnline()) {
                    this.cancel();
                    return;
                }

                Location loc = admin.getLocation();

                // Usuń stare wartości przed ich aktualizacją, aby zapobiec duplikacji
                scoreboard.resetScores(ChatColor.YELLOW + "X: " + (loc.getBlockX() - 1));
                scoreboard.resetScores(ChatColor.YELLOW + "Y: " + (loc.getBlockY() - 1));
                scoreboard.resetScores(ChatColor.YELLOW + "Z: " + (loc.getBlockZ() - 1));

                objective.getScore(ChatColor.YELLOW + "X: " + loc.getBlockX()).setScore(2);
                objective.getScore(ChatColor.YELLOW + "Y: " + loc.getBlockY()).setScore(1);
                objective.getScore(ChatColor.YELLOW + "Z: " + loc.getBlockZ()).setScore(0);

                for (Player player : Bukkit.getOnlinePlayers()) {
                    player.setScoreboard(scoreboard);
                }
            }
        }.runTaskTimer(plugin, 0, 20L);
    }

hey, I have a problem, every time the player moves, there are duplicate lines in the slidebar instead of updating, how can I fix it?

eternal oxide
#

So its hanging

kind hatch
#

Looks like you're going to need a recovery drive

bold plume
#

If the startup continues, it returns to the same screen

eternal oxide
#

broken boot

bold plume
eternal oxide
#

you need a recovery drive

kind hatch
#

No, you just boot from the recovery drive and move the data to another one.

bold plume
#

How can i solve it?

kind hatch
#

Or try and fix the boot issue with the recovery disk

eternal oxide
#

use a linux recovery usb

#

bootable usb