#help-development

1 messages · Page 1154 of 1

golden turret
#

in all my development times it never happened before

river oracle
#

Making that kitten sad would be enough to make me run away and crime

blazing ocean
#

don't fucking reload

golden turret
#

after some investigation i found out that somehow, calling MineComboPlugin.getInstance() in the MilestonesSupport class still returns the old instance

#

is there a way i could fix that?

river oracle
#

Generally

blazing ocean
#

by not reloading

river oracle
#

Reloading isn't suppoted :>

golden turret
#

if I make MineComboPlugin.getInstance() return a static variable the old one is returned

eternal oxide
#

Plugman will fail to unload static references

blazing ocean
#

just don't reload ffs

golden turret
#

that doesnt fix the problem

eternal oxide
#

do not use anything static if you INSIST on using plugman

golden turret
river oracle
#

Or just don't reload 👍

golden turret
blazing ocean
golden turret
#

btw

eternal oxide
#

There is no work around. Plugman/reload breaks on static reference. There is No fix

blazing ocean
#

there is a fix

#

restarting

golden turret
#

this is how i am detecting the enable and disable

hazy parrot
#

Tf

blazing ocean
#

why are you registering all your listeners manually

#

and just STOP RELOADING

#

it will solve ALL YOUR PROBLEMS

golden turret
#

no

blazing ocean
#

then glhf you're on your own

golden turret
#

it will only make them not to happen

blazing ocean
#

there is literally no fix

remote swallow
#

what in the fuck is that

golden turret
#

everything is fixable

blazing ocean
#

no it isn't

golden turret
#

all it takes is time

blazing ocean
#

okay make a custom jvm then or something

shadow night
#

Brother that is some messed up code

eternal oxide
#

Yes you can fix it. You have to clear the Classloader, which requires restarting Spigot

remote swallow
#

why are they not each there own JavaPlugin

blazing ocean
eternal oxide
#

lol

blazing ocean
#

because restarting takes time !!! not my 20 seconds wasted

remote swallow
#

but muh cpu cycles

blazing ocean
#

so they would rather spend hours on end trying to make working reloading when they could just

#

not

river oracle
remote swallow
#

it takes longer than that

shadow night
blazing ocean
#

skill issue

shadow night
#

But tbf it was a modded server

remote swallow
#

with the amount of things i end up commonly hooking or needing im forced to have about 6 plugins excluding my own

blazing ocean
#

i usually use

#

none

#

except my ones

remote swallow
#

im forced to because thatgs what they work with

blazing ocean
#

F

torn bough
#

I think I confused people with this. I don't want it to be async. I just want to set sign data and then open it in ui right after

eternal oxide
#

call the open in the next tick

remote swallow
#

i could technically make basic af plugins that replicate the features of them so they might be a bit lighter on starter

#

but i dont think i have the effort for that

glossy laurel
#

where is this

torn bough
#

On a inventory click event

#

How will this effect the server? Or is the delay client side?
Bukkit.getScheduler().runTaskLater(Homes.getPlugin(), () -> player.openSign(sign), 3);

river oracle
torn bough
#

But it won't stop everything for 3 ticks right?

#

Everything meaning everything outside the plugin

river oracle
#

Which will throw it within a tick loop and then it will be run after 3 ticks

#

If you wish to pause the entire server use Thread.sleep

sly topaz
#

why do you want to stop everything

#

doing that will start lag compensation mechanisms

blazing ocean
#

lag machines cannot beat the simplicity of Thread.sleep

remote swallow
#

my personal favourite is a ```java

while (true) {
new Thread(() -> {
while (true)
Thread.sleep(1000);
}

#

idk if thats valid java anymore

#

i use kotlin too much

blazing ocean
pliant topaz
#

grrr

#

kotlins nice

#

but java is still better

#

well, personal preference tho

sly topaz
#

don't be a pussy

#

java is still better, and this is a fact, not an opinion

#

yes I said it, bite me

blazing ocean
#

grr

violet blade
#

fake language

torn bough
#

Can you store a collection with PersistentDataType?

sly topaz
#

yes however you have to create the PDT yourself or use MorePersistentTypes or whatever the library was called

quaint mantle
eternal oxide
#

?morepdc

undone axleBOT
sly topaz
#

ultimately, any collection boils down to one or more array of elements

torn bough
#

Or do I just add the src files?

remote swallow
#

most people use a build system, get the jar from central if you dont

torn bough
#

What is central?

remote swallow
#

maven central

worldly ingot
eternal night
worldly ingot
#

PersistentDataType.LIST.integers(), or PersistentDataType.LIST.listTypeFrom(PersistentDataType.WHATEVER)

#

because lynx is cool

sly topaz
#

I thought that was a Paper thing

#

the more you know

eternal night
#

As if I'd ever contribute to paper smhduck

worldly ingot
#

He's famously a never-Paper developer

eternal night
young knoll
#

Paper? Never heard of it

#

Sounds lame

worldly ingot
#

I'm more of a cardboard guy myself, personally

eternal night
#

sturdier NODDERS

young knoll
#

Smh

river oracle
#

He'd never do that

worldly ingot
river oracle
#

Hybrids are great

#

My favorite is mohist

sly topaz
#

I like the multithreaded ones better

#

my fav one was that japanese one

#

I can't remember the name now

remote swallow
remote swallow
sly topaz
#

that's a hybrid, not a multithreaded one

sacred mountain
#

atp yall could just make your own game

#

it would probably be more stable

kindred sentinel
#

why do mojang dont support server cores and plugins by company? Why do it have to do community?

#

🤔

#

they even nms obfuscate

young knoll
#

They also provide mappings for us

kindred sentinel
#

Oh, mappings are mojang-made?

#

I though it too provides community

remote swallow
#

Why else would they be called mojmaps

kindred sentinel
#

?nms

remote swallow
#

Spigot mappings were the community (md) provided ones

kindred sentinel
#

oh

kindred sentinel
sly topaz
#

before mojmap were distributed, yarn was the most popular set of mappings

sly topaz
kindred sentinel
#

I mean, it's a colossal job, and I cant see some obvious ways to get money

#

only from site

sly topaz
#

premium plugins, Spigot gets a cut from it, also sponsors and donations

kindred sentinel
#

I dont think thats enough

golden turret
#

hey

kindred sentinel
#

😔

sly topaz
#

you'd be surprised

#

it is way less than before giving Paper probably takes the bull of it nowadays but should be enough

golden turret
#

the 172.x ips are internal, right?

remote swallow
#

If spigot got a cut spigot could be liable for any issues, the premium plugin purchase I'd entirely between thr buyer and seller

worldly ingot
#

Can confirm. No cut

sly topaz
kindred sentinel
#

I mean, it's a colossal work

remote swallow
#

And afaik md doesn't take anything

slender elbow
#

money laundering

worldly ingot
#

md has a job KEKW

#

And yes money laundering

#

tax evasion too

kindred sentinel
remote swallow
#

No

kindred sentinel
#

😔

sly topaz
remote swallow
#

He's a lawyer/solicitor

sly topaz
#

then again, no one forces them to do this job, so it is mostly out of passion I presume

worldly ingot
#

"solicitor" PES3_HmmSip

kindred sentinel
eternal oxide
#

Hes a pimp

remote swallow
sly topaz
#

you can be both things lol

kindred sentinel
slender elbow
#

he programs lawyers

sly topaz
#

LMAO

slender elbow
#

no

#

he lawyers programs

sly topaz
#

yes, md is multiple persons in one

slender elbow
#

like in that movie with the robots

#

and the black dude

#

Will Smith

remote swallow
#

He has bpd fr

slender elbow
#

mister slap

remote swallow
kindred sentinel
#

Why no one speaks about md_5 he can be enstein 21 century

slender elbow
#

I Robot

kindred sentinel
#

Just thinking that he is working as a lawyer, and was one of the creators of Spigot makes me feel miserable

worthy yarrow
#

You are the dumbest smart person I know

kindred sentinel
sly topaz
remote swallow
#

Some people just don't want to do programming full time and have other things they want to do

kindred sentinel
worthy yarrow
slender elbow
#

bro I would DIE to defend a criminal

slender elbow
#

I mean

worldly ingot
slender elbow
#

what

worldly ingot
#

Yeah that too

sly topaz
remote swallow
worldly ingot
#

Alright

#

Today was a bad day to have eyes

worthy yarrow
remote swallow
kindred sentinel
#

I can't make me reading literature, im procrastinating and understand it

wet breach
#

technically everything is literature to an extent

kindred sentinel
sly topaz
#

go to psychologist and tell them you have troubles concentrating, they can tech you techniques to help you stay focused, goes a long way

kindred sentinel
#

It's just another thing that I will procrastinate

golden turret
#

procrastination is a shit

wet breach
kindred sentinel
#

Yes it is

sly topaz
#

that or they derive you to a psychiatrist for ADHD meds kek

golden turret
#

may God help us 🙏

kindred sentinel
#

The thing is that I should read this literature not in my native language

wet breach
kindred sentinel
young knoll
#

What’s wrong with ADHD meds

#

I love meth lite

kindred sentinel
#

meth?

#

🤨

hybrid spoke
fading beacon
#

how do i refer to a zombified piglin?

#

PIG ZOMBIE?

young knoll
#

Zombified piglin on latest

fading beacon
#

this is confusing me

young knoll
#

The class will be named differently

#

The class is PigZombie

wet breach
quaint mantle
#

thx

quaint mantle
#

plz spoon feed me, how do i check if bungee server is online?

#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

torn bough
#

How do you get uuid? I want to do if (uuid == "32hf")

warm mica
quaint mantle
quaint mantle
warm mica
#

Plugin messenger only works when there are players on your server. If you have players, you know that it's up because otherwise they couldn't join at all

quaint mantle
#

thanks to you both

unkempt peak
#

Anyone know of a clean way to increase player movement speed in lava?

worldly ingot
#

Could have sworn there was a swimming speed attribute

young knoll
#

Does that work in lava

#

Considering you can’t properly swim in it

worldly ingot
#

Oh there is

#

Movement efficiency they call it

#

Oh, wait, no nevermind

#

water_movement_efficiency in 1.21.2

#

No lava_movement_efficiency though

unkempt peak
#

Where is lava movement speed actually calculated?

slender elbow
#

what does "actually" mean

quaint mantle
glossy laurel
novel frost
unkempt peak
quaint mantle
#

how can i cast ServerPlayer to Player?

blazing ocean
#

iirc there's getBukkitEntity method on there but not sure

quaint mantle
#

Yeah there is that method

grim hound
#

Are BungeeCord servers (or just proxy servers in general) started with ROOT perms?

orchid gazelle
#

It's not that bad

slate siren
#

As far as I know, placeholderapi supports it as %rank% but essentialsx supports it as {Rank}, so what should we do about this?

Essentials {}
Placeholderapi %%

🤔

orchid gazelle
#

People make it seem worse than it is

slate siren
#

Or am I wrong?

#

I am trying to show Rank in essentialsx chat format from my own plugin via placeholderapi

sly topaz
#

if a plugin gets compromised/exploited, the whole server is at risk with root perms, instead of just the minecraft stuff

#

even if you were right, which you aren't, that's making light of a security flag, wonder how that's going to help anyone

wraith delta
#

ess should support % tho

#

chat formatting is about 5 lines of code

shadow night
slate siren
#

?paste

undone axleBOT
slate siren
wraith delta
proud badge
wraith delta
# kindred sentinel How to use priorities?

Don’t need it unless another plugin is conflicting with yours. Essentials is the lowest so any other plugin will override its commands.
@EventHandler(priority = EventPriority.HIGHEST) would be a example tho

kindred sentinel
pseudo hazel
#

ideally you would wanna prevent that instead of patch it after the fact

wraith delta
pseudo hazel
#

alright, I feel like thats a better answer, thanks

wraith delta
acoustic pendant
#

Hello, could someone help me? I have a code that works like this:

A player have a tool with custom enchants (Like money booster or essence booster) and you can toggle if you want the autosell mode or not. So sometimes when you are using the autosell (Which displays how much money you got every minute) it says that you have won a crazy high amount of money... It only happens with the money as you can see in the image I sent. (Dinero conseguido = money obtained) Sorry if the code is a bit long but had to do it that way. I cant find what's wrong there.

I would make debug but don't know how to replicate this bug.

The method calculateAutoSellDrops is which manages the amount of money, but inside have onother methods that boost money such as calculateBoostersAdder or CalculateBoostersValue.

https://pastebin.com/bw9hXQ01

grim hound
#

So I asked

vital ridge
#

Has any1 else had problems with loading Multiverse api using maven? I'm following along their github usage guide for including the project but it cant find the jar file in their repo.

#
<dependency>
            <groupId>com.onarandombox.multiversecore</groupId> <!-- Don't forget to replace this -->
            <artifactId>Multiverse-Core</artifactId> <!-- Replace this as well -->
            <version>4.3.1</version> <!-- This too -->
            <scope>provided</scope>
        </dependency>
#
com.onarandombox.multiversecore:Multiverse-Core:jar:4.3.1 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced

charred saddle
#

I'm trying to spawn a BlockDisplay like in this command in my plugin:
/summon block_display ~ ~ ~ {Passengers:[{id:"minecraft:block_display",block_state:{Name:"minecraft:acacia_planks",Properties:{}},transformation:[1f,0f,0f,-0.5f,0f,1f,0f,-0.5f,0f,0f,1f,-0.5f,0f,0f,0f,1f]}]}
so it'll be centered (like it should be).

I discovered I need to use setTransformation() but I have no idea how to use it. please help thanks

drowsy helm
vital ridge
#

Yes.

drowsy helm
#

Send throuh your whole pom

vital ridge
#
<repository>
            <id>OnARandomBox</id>
            <url>https://repo.onarandombox.com/content/groups/public/</url>
        </repository>
#

?paste

undone axleBOT
vital ridge
#

Though, the error shows that its searching the spigot repo

#

Not the Multiverse's repo

#

Dont know why is that

vital ridge
#

Wdym by that

chrome beacon
#

Add the -U flag to your package command

#

Should force it to refetch

vital ridge
chrome beacon
#

Depends on the IDE

vital ridge
#

Intellij

#

Newest

chrome beacon
#

open your run configuration

#

and add the -U to the command

sly topaz
#

Ctrl + Ctrl (Run Anything) then write maven package -U in IJ

chrome beacon
#

That works too

#

Also you are aware that 4.3.1 isn't the latest mv version

#

right

vital ridge
#
The POM for com.onarandombox.multiversecore:Multiverse-Core:jar:4.3.1 is missing, no dependency information available
#

Shiit wait

#

I think i fixed it

#

yeah

#

changed version to 4.3.0

#

But he had 4.3.1 in his example in github and I checked the latest version was also 4.3.1 in spigot version history

#

So I just used 4.3.1

#

My bad

chrome beacon
#

4.3.1 does exist

sly topaz
#

is it in the maven repo

chrome beacon
#

yes

sly topaz
#

publication seems to be fucked up, they have like 5 different multiverse-cores all with different capitalization lol

dawn flower
#

How do I make the world not render to specific players?

dawn flower
#

The whole world

smoky anchor
#

ye I misread

#

Why do you need that ?

#

Do you still need them to be able to walk and interact with the world ?

#

@dawn flower You could theoretically send them a resourcepack with shaders that would just... not render anything.

dawn flower
#

Without a resource pack

dawn flower
smoky anchor
dawn flower
#

I tried exactly that

smoky anchor
#

lmao, how did that work ?

dawn flower
#

But it wouldn't work properly

smoky anchor
#

Why

dawn flower
#

For some reason, they don't want to get properly aligned

smoky anchor
#

Well then you're doing something wrong

dawn flower
#

Maybe

smoky anchor
#

can you elaborate on "properly align" ?

#

You should be able to use the transform to rotate and offset it and have it set to uhhh some render mode

dawn flower
#

It was a mess, not close to a square (I made them ride the player)

#

Even though theoratically it should've formed a square around the player's head

smoky anchor
dawn flower
#

I'll try

dawn flower
#

Yeah I did it again and it's not aligned at all

#

This is how it looks in the studio and ingame

smoky anchor
dawn flower
smoky anchor
#

interesting
Let me try

#

/summon text_display ~ ~1.5 ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,-1f,-0.2f],scale:[20f,10f,1f]},text:'" "',background:-16777216,billboard:"center"}
This works lul
Only one text entity required
I don't think the studio is happy with text display entities.

#

@dawn flower

#

Creates big black ugly screen right in front of the player
The player just sees black

dawn flower
#

If you rotate 180 degrees you don't see it

smoky anchor
#

Yes you do

#

It is translated -0.2 in z, so in front of the player.
it also rotates around its center, which is positioned in the players head

dawn flower
#

Did you make it ride the player?

smoky anchor
#

I just did one command and commands can't make it ride a player

#

You gotta edit it yourself for riding a player

dawn flower
#

True

#

I just need to translate it down abit

#

Works perfectly

#

Thanks

smoky anchor
#

You're welcome

young knoll
#

Huh

#

I could totally use text displays to show a bounding area

dawn flower
#

How do I hide it from other players though?

#

Nvm

young knoll
#

Entity#setVisibleByDefault and Player#showEntity

dawn flower
#

Does setVisibleByDefault hide it from new players that join?

#

Do you need packets to make an entity glow for one player only

grim hound
#

since when is that a thing

slender elbow
#

like 1.19 or so

grim hound
#

is there any convenient way to make certain players invisible in tab

#

to all players

#

and show them again

#

without iterating through all players with hidePlayer

slender elbow
#

i mean, hidePlayer will not only hide from tab, but also from the world if they're near

#

i wonder if setVisibleByDefault works properly on Players

sly topaz
grim hound
#

I send an arm animation packet first

#

and only then I send the keep alive

#

so why

#

does the client always somehow reply to the keep alive first?

#

wtf

sly topaz
#

keep alive is faster to process, so you get the response faster, I guess

grim hound
#

...

#

the client uses 1 netty thread for that

#

it doesn't make sense

#

no race conditions is possibly taking place

grim hound
#

the keep alive response is sent first

grim hound
#

maybe that slows him down?

slender elbow
#

my guess is the arm swing is probably pushed to the main thread but the keep-alive isn't

grim hound
grim hound
#

btw, except keep alives and the arm swing

#

are there any more packets the client needs to respond to?

#

as a way to measure ping by myself

slender elbow
#

ping packet

#

but like, none of that is gonna be reliable

#

the client can send any packets at any time if it wants to, artificially delay responses etc

#

not the vanilla client of course

grim hound
#

but if he reacts to some packets quicker than to the ones meant to measure ping

#

get that boi

sly topaz
grim hound
sly topaz
#

ping packet has been a thing forever

slender elbow
sly topaz
#

wiki.vg has a version history changelog, it is not very complete in terms of detail but works for getting a general idea of what the changes were in the protocol

grim hound
sly topaz
grim hound
#

it's uh

#

1.16.3 and below

#

very much incomplete

blazing ocean
#

check revisions on wvg/Protocol

blazing ocean
#

yup

sly topaz
#

but you can compare with that one so I guess it is more useful

#

wiki.vg used to be way more complete, nowadays it doesn't document the semantics around the packets as much

rotund pond
#

Hello everyone, can I ask about NMS here please ?
I have a performance problem with something I can't tell, and I don't know where I should search for information 😦 (screenshot)

kindred sentinel
#

Just a reminder that 3 hours of debugging can save you 15 minutes of reading documentation

undone axleBOT
rotund pond
shadow night
river oracle
#

Unless they're running some weird fork like cardboard

shadow night
river oracle
#

Yeah ig

shadow night
#

But I believe I have seen spark with unmapped names? Might be false memories or something

grim hound
#

is allocating like

#

100x60KB a lot?

blazing ocean
blazing ocean
grim hound
#

well uh

grim hound
blazing ocean
#

that does not explain anything

grim hound
#

a lot

shadow night
blazing ocean
#

still does not explain anything

just explain WHY you're allocating manually

grim hound
#

about 2k buffers

#

with like 60 KB (when uncompressed)

grim hound
blazing ocean
#

answer my question and not something completely different with no context lmao

grim hound
#

just explain WHY you're allocating manually

#

cuz it's way more optimized compared to storing it not within bytebufs

blazing ocean
#

where are you even allocating manually then

grim hound
blazing ocean
#

is allocating like 100x60KB a lot?

grim hound
#

ah well

#

if 100 players were to be given this captcha

peak depot
grim hound
#

the server would need to manage roughly that amount of data

grim hound
peak depot
#

screenshot => api request to openai

grim hound
peak depot
#

to get the capacha as a pic

grim hound
blazing ocean
#

there's lots of ways to

grim hound
#

like?

peak depot
grim hound
#

uh

#

?

blazing ocean
grim hound
#

well I check for whether the player has a valid protocol like a normal player would

#

and then I also ask for captcha

blazing ocean
grim hound
#

which requires 3 things normal botters don't have

peak depot
#

if you want to bot that server just use MC inbuilt screenshot function ig

blazing ocean
grim hound
#

and what do you think needs to be on that screen?

grim hound
#

yes

peak depot
#

brother you lowkey doing that capacha in minecraft

grim hound
#

now create 3d graphics for 100 players

#

how much would that cost cpu and memory-wise?

blazing ocean
peak depot
#

text capacha is easily bypassable using simple ai

grim hound
blazing ocean
grim hound
peak depot
#

yeah still

ivory sleet
grim hound
blazing ocean
ivory sleet
#

i doubt all those 100 players join at the exact same time triggering the allocation to happen in a spike

grim hound
#

brah, y'all really have no idea what I'm trying to have you think of

peak depot
blazing ocean
#

i mean it'll still only be 600mb which get gc'ed eventually

blazing ocean
# peak depot

which might make it easier for bots to read
clearly it does omegaroll

grim hound
#

brah

blazing ocean
blazing ocean
peak depot
#

Do you want to protect your server with capacha?

grim hound
#

pretty tired when ppl have no idea about what you're trying to say

blazing ocean
blazing ocean
peak depot
blazing ocean
#

You're not explaining ANYTHING

grim hound
blazing ocean
grim hound
#

If you were to host a bot attack

#

you'd want the server to suffer signifcant performance issues

#

not the other way around

#

thus you implement every single one of your bots with minimal protocol

ivory sleet
#

i mean if u ddos hypixel w a large enough of a botnet it will go down

#

like...

grim hound
#

so no 3d generation is taking place

peak depot
grim hound
#

if you wanted to simulate N amount of 3d graphics

#

you'd need a lot of cpu

#

dedicated servers for that

peak depot
#

bro youre server is creating the captcha not the client

grim hound
#

thus making the attacker need to spend a lot resources

peak depot
#

so your just putting load on the server

grim hound
#

more than the server would

#

another thing

#

is that the protocol in botters isn't usually complete

#

so checking for specific patterns (like replying to only certain packets)

#

makes it easier to differentiate

peak depot
#

if you got a good enough bot software it just spoofs them

grim hound
#

another thing is that there'd need to be people willing

#

to write whole botting programs

peak depot
#

wich again isnt realy costing in terms of memory

blazing ocean
#

i mean azalea is somewhat complete and easy to use...

grim hound
#

to actually bypass your very specific captcha

blazing ocean
#

bro is making cloudflare turnstile

grim hound
peak depot
#

then get the response and send that in chat

grim hound
blazing ocean
grim hound
#

come one

#

make a botter that'll bypass my antibot

#

come on

novel frost
grim hound
#

it's so easy isn't it?

peak depot
#

yeah it is

grim hound
#

I'll be waiting

#

I'll ping you in a week to ask for the progress

blazing ocean
#

me when somebody tells me to do it without having an actual server

ivory sleet
#

😭

grim hound
ivory sleet
#

shadow im sure that captcha will stop some players

#

but its obviously not that difficult to bypass

#

i think thats what they were alluding at

grim hound
#

and additionally replaces the captcha with a 3d text instead of a map captcha

novel frost
#

the capuchin kinda cool tho

blazing ocean
grim hound
#

I copied the code off the internet xd

peak depot
# grim hound you better keep your word

brother im gonna send you a snippet to do the screen and one that sends and handles the ai part I am not spending hours doing the whole other part since idk about you but I got a personal life

grim hound
#

like

#

I've been searching for so long

#

on how to make a captcha your average philb would understand

#

and yet the bots wouldn't have the slightest clue on how to do it

grim hound
grim hound
blazing ocean
#

you only need a way to find out where all the armour stands are, which is obviously easy asf, or take a screenshot

and you need openai keys ig

grim hound
blazing ocean
#

?

grim hound
#

read first

#

then reply

#

helps

blazing ocean
#

i have. it's really not worth arguing with you tho, as you're proving again

tidal fog
#

how do i get the object of a block (i need ancient debris), like im trying to check if the block in the blockbreakevent is ancient debris (yes i know i can do event.getBlock().getBlockData().getAsString() == "minecraft:ancient_debris", but that doesnt feel like the right way to do it)

peak depot
sonic goblet
blazing ocean
tidal fog
#

and org.bukkit.Material isnt working

blazing ocean
#

update intellij

sonic goblet
#

^

tidal fog
#

yea thats a good idea im still using 2023

peak depot
#

and btw @grim hound I hate to make rads opinion count but in this case it does

ivory sleet
#

bro actually went through

#

respect

grim hound
#

Why did I even bother talking

blazing ocean
#

real

blazing ocean
grim hound
#

It's just

#

We don't understand to each other's thoughts

grim hound
grim hound
#

@peak depot you on the other hand

#

Well

#

Um

#

To not say the R word

#

There's a command neither spigot nor paper likes that sounds similar to what I'd call you

blazing ocean
grim hound
grim hound
#

It should stop many people

dawn flower
#
for (LivingEntity entity : entities) {
            byte bitmask = 0;
            bitmask |= (byte) (entity.getFireTicks() == 0 ? 0x01 : 0x0);
            bitmask |= (byte) (entity.isSneaking() ? 0x02 : 0x0);
            bitmask |= (byte) ((entity instanceof Player && ((Player) entity).isSprinting()) ? 0x08 : 0x00);
            bitmask |= (byte) (entity.isSwimming() ? 0x10 : 0x0);
            bitmask |= (byte) (entity.isInvisible() ? 0x20 : 0x0);
            bitmask |= (byte) (!stop ? 0x40 : 0x0);
            bitmask |= (byte) (entity.isGliding() ? 0x80 : 0x0);

            List<WrappedDataValue> dataValues = new ArrayList<>();
            dataValues.add(new WrappedDataValue(0, WrappedDataWatcher.Registry.get(Byte.class), bitmask));
            packet.getDataValueCollectionModifier().write(0, dataValues);

            for (Player player : players) {
                manager.sendServerPacket(player, packet);
            }
        }```
No errors, stop is false but doesn't make the entity glow
grim hound
dawn flower
#

bitmask |= (byte) (!stop ? 0x40 : 0x0);

tidal fog
#

how should i go about saving data between launches?

dawn flower
#

Database or config based storage

#

Do the config method if you don't want a headache

worldly ingot
#

They mean absolutely nothing to the reader

tidal fog
restive mango
#

I know this is a dumb question, but how do I get the namespace for a plugin (the name that all of its namespacedkeys are stored under)?

glad prawn
#

key.getNamespace() ?

shadow night
#

getName().toLowerCase(Locale.ROOT) prob

restive mango
#

like where is ti defined

blazing ocean
slender elbow
#

Plugin#getName() in shambles

worthy yarrow
#

When sending block changes to a player I assume ray tracing for collision checks would not work on these blocks?

grim hound
worthy yarrow
#

Wouldn't think so

kindred sentinel
#

Is there a way to use datapack functions with code instead of using console commands?

eternal oxide
#

no

ashen ferry
#

I am asking for help when I made the npc puvodni and then the iaentity Citizens model on the npc. And he sees ten npc with a model. And then when I restart the server or turn it off and then turn it on and the npc model with ia and disappears. I don't see why for a reason? https://ibb.co/74b0B1y

#

And please message

blazing ocean
#

don't crosspost

dawn flower
#

How do I make the text display's rendering priority higher than blocks whilst not rendering mobs? Basically if you set "see through" to true it renders on top of blocks but renders entities behind it

#

Now it doesn't, huh?

river oracle
dawn flower
#

I could've sworn I could see mobs behind it if it was see through

river oracle
#

you could maybe attempt something with a large amount of packet manipulation, but even then you can't actually change the render order you can just lie to the client on a mass scale to attempt to define a rendering order

dawn flower
#

Well can I make mobs behind it render

#

Ok now I can see the mobs behind it

#

This is so confusing

distant basin
#

Yo guys I'm currently developing my first plugin and it's a medium sized one, anyone that could talk 1 on 1 with me in vc and give me some pointers?

chrome beacon
dawn flower
#

Bro the text display's see through is so bugged

vital ridge
#

I'm developing a plugin where each player has their own world with a worldborder that goes 64x64 blocks. I already know how to create the world (its a void world actually) but idk how to load it without blocking the main thread, since rn when I'm loading the world everything stops working for a few seconds. It might be that cuz I'm doing this on my localhost server which is pretty small, but not sure.

#

Maybe I could load just like 5x5 chunks and not the whole world

#
WorldCreator worldCreator = new WorldCreator(p.getName() + "_course" + (amount + 1)).type(WorldType.FLAT).generatorSettings("{\"layers\": [{\"block\": \"air\", \"height\": 1}], \"biome\":\"plains\"}")
                .generateStructures(false);

        World voidWorld = worldCreator.createWorld();
        voidWorld.getWorldBorder().setCenter(0, 0);
        voidWorld.getWorldBorder().setSize(64);

        Location spawnLoc = new Location(voidWorld, 0, 64, 0);
        voidWorld.getBlockAt(spawnLoc).setType(Material.DIRT);
        p.teleport(spawnLoc.add(0, 1, 0));

tawdry echo
#

ChunkGenerator and getFixedSpawnLocation if I good remember

river oracle
#

My suggestion, use the same world give each player their own border within that one world

vital ridge
#

Wdym by that

#

What does it do

young knoll
#

WorldCreator#setkeepSpawnInMemory iirc

vital ridge
#

If i set it to false

young knoll
#

Yes

#

As long as you have a fixed spawn location

vital ridge
#

So when I'll initially create the world it will cause less lag, and only when a player joins the world is when it loads the chunks right?

young knoll
#

Yes

vital ridge
#

The thing is im running world#createWorld() in order to get the World variable

#

Oh you can do it with worldcreator too>?

river oracle
#

Why not use math and just spread out the players in one world though

vital ridge
#

I cant give each player a world border

#

I could use barriers though

#

I'll think about it when all else fails

young knoll
#

You can

#

Player#setWorldBorder iirc

river oracle
#

Yeah Player#setWorldBorder is great

vital ridge
river oracle
#

You need to set it on every login but it's still great

young knoll
#

Custom ChunkGenerator

vital ridge
#

I will try it for sure but I'm just asking, would it make everything noticeably faster or just barely a bit?

#

When it comes to world creation

#

And the main thread

young knoll
#

It takes about 5ms to load a world with a fixed spawn location and spawn chunks disabled

vital ridge
#

Gotchu.

vital ridge
# young knoll It takes about 5ms to load a world with a fixed spawn location and spawn chunks ...
WorldCreator worldCreator = new WorldCreator(p.getName() + "_course" + (amount + 1)).type(WorldType.FLAT).generatorSettings("{\"layers\": [{\"block\": \"air\", \"height\": 1}], \"biome\":\"plains\"}")
                .generateStructures(false);

        worldCreator.generator(new VoidWorldChunkGenerator());
        worldCreator.keepSpawnInMemory(false);

        World voidWorld = worldCreator.createWorld();

        Location spawnLoc = new Location(voidWorld, 0, 64, 0);
        voidWorld.getWorldBorder().setCenter(0, 0);
        voidWorld.getWorldBorder().setSize(64);

        voidWorld.getBlockAt(spawnLoc).setType(Material.DIRT);
        //p.teleport(spawnLoc.add(0, 1, 0));
#

It still seems to take about 5 seconds

#

or like 3-4

young knoll
#

You are setting a block in it

#

That’s gonna force chunk loading

#

Also show the chunk generator class

vital ridge
#

Just setting the spawn location:

public class VoidWorldChunkGenerator extends ChunkGenerator {

    @Override
    public Location getFixedSpawnLocation(World world, Random random) {;
        return new Location(world, 0, 64, 0);
    }

}
young knoll
#

Yeah then it’s the block setting

vital ridge
#

Yep, that was fast lol

#

Under a second

#

@young knoll thanks bro.

#

I'm just wondering does spigot by default just load all the chunks in the world during world creation, and when you do the trick I did, you just load all the chunks yourself when you get close enough?

young knoll
#

It loads the spawn chunks

vital ridge
#

But it must be a lot of chunks then?

young knoll
#

It’s a decent amount

vital ridge
#

Gotchu, well certainly enough to cause a 3 second wait

deep herald
#

how do i disable the creation of end portals?

#

in the portal create event

worthy yarrow
#

Looks like that event is cancellable no?

#

It has a getBlocks method which I guess you could iterate over and check for the materials of the portal

deep herald
worthy yarrow
#

Why would you do that?

deep herald
#

idk

worthy yarrow
peak depot
torn bough
#

Lets say I want to make a cosmetics mod that allows the user to wear a 3d model like glasses using a command

#

How do I attach the model (like you would by putting a helmet on) without actually taking up that inventory slot?

chrome beacon
#

Have an entity riding as passenger

grand flint
remote swallow
#

so change the model

grand flint
#

What

remote swallow
#

its a model with custom model data

grand flint
#

Yeah

remote swallow
#

if it collides with the eyes where it is sat on a passenger, so change the model location

grand flint
#

But what if it needs to be there

#

Like glasses

#

Or a big hat

#

Or a helmet

remote swallow
#

i dont think many helmets collide with the eyes

grand flint
#

The helmet is litearlly on your entire head wdym

remote swallow
#

its not a brick your eyes are out

#

or you can just add clear textures to the inside of it

grand flint
#

Hm

#

Oh tbh textures are one sided

remote swallow
#

you can add a texture to the inside and it makes the whole thing clear from that side afaik

grand flint
#

It's normally just transparent anyways

#

Since it's the inside face

torn bough
#

Yeah I don't want the glasses to be covering the players vision

#

They are just a cosmetic

quaint mantle
#

hey if i do new MyClassName("Hii") in my testClass, then i do some method that modifies some this.variable, if i do new MyClassName("Hii") in a different class, and i do something to get this.variable, will i get the same as i did with testClass?

#

Like if i give same parameters and that

young knoll
#

Each instance has its own copy of all non-static variables

quaint mantle
#

okay

#

so i need statics to do that?

young knoll
#

?di

undone axleBOT
quaint mantle
#

ty

fading drift
#

how do i add prefixes and suffixes in player names to show up in tab?

fading drift
#

do I have to use nms if I want to do it myself

torn bough
#

Since you can't save an ItemStack to PersistentData, and Minecraft removed item IDs, how do I load a ItemStack from a string name?

#

Unless there is a better way instead of string

peak depot
#

Base64 it no?

torn bough
#

Ohhh that's helpful thank you but I meant Material

#

I don't need the whole ItemStack

#

I'm sure there is a easier way to get just the Material?

lilac dagger
summer scroll
#

To get material from string, use Material.matchMaterial

lilac dagger
#

And Material.getMaterial

summer scroll
#

or that one

torn bough
#

Perfect, exactly what I needed

lethal coral
#

You can set their tablist name

#

Or use teams

quaint mantle
#

is there a way to get net.minecraft.world.item.ItemStack by org.bukkit.inventory.ItemStack?

sly topaz
#

but what are you trying to do

quaint mantle
#

sending throught nms

pallid kindle
#

When I want to run a async task on BungeeCord but repeating. Should I create a repeating task and then call runAsync in that task to run code async or is just creating a repeating task enough?

proud badge
#

idk if its the same on bungeecord or not

pallid kindle
proud badge
#

does bungeecord use the bukkitscheduler, or no?

#

it probably uses some other scheduler, since its not bukkit

pallid kindle
#

Nvm I found my answer. Schedule is async. I should've read the javadocs 🤦‍♂️

vital ridge
#

Whats the usual way of modifying persistent data containers? I'm currently just getting the pdc, changing variables around and setting it again.

#

But the thing is, once I do that it somehow breaks it, I can't get it anymore from other parts of my code, deserialization fails.
Ill provide the code

#

?paste

undone axleBOT
vital ridge
#

This is quite a bit of code but if anyone could take a look at it and help me out i'd be grateful asf

#

Basically the issue seems to be that after modifying the PDC with a command, it somehow fks it up and when I try to get the pdc after that it just produces an error

fading drift
#

is there a way to set the number in tablist to health dynamically so it updates automatically or do I have to update it every time a player takes damage

#

through scoreboard shit

chrome beacon
#

Doing automatically is possible

fading drift
#

any guides or like code examples?

chrome beacon
#

Use the Health criteria

fading drift
#

I got it so it shows icons of hearts but i dont know how to make it show numbers

smoky anchor
#

There's a rendertype property for objectives
You should be able to set it to something and display numbers instead of icons
(Not sure if the API has this tho)

chrome beacon
#

It does

fading drift
#
    private static void showTablistHealth(Player playerViewing, Player player) {
        Objective objective = playerViewing.getScoreboard().getObjective(DisplaySlot.PLAYER_LIST);
        if (objective == null)
            objective = playerViewing.getScoreboard().registerNewObjective("playerlist", "health");
        objective.setDisplaySlot(DisplaySlot.PLAYER_LIST);
        objective.setDisplayName(ChatColor.YELLOW.toString());
        objective.getScore(player.getName()).setScore((int) player.getHealth());
        player.setHealth(player.getHealth());
    }```
#

this is what I have

#

I found something

#

EnumScoreboardHealthDisplay.INTEGER

#

looks like I need to use nms I think

chrome beacon
#

no

#

Steve already told you what to do

fading drift
#

I'm on 1.8.8 and dont see the property

chrome beacon
#

._.

fading drift
#

sorry for not specifying earlier

smoky anchor
#

I yearn for the day 1.8 fucking dies
I can't believe some ppl are still stuck in 9+ years old version

sullen canyon
river oracle
smoky anchor
#

Basically that

sullen canyon
sullen canyon
chrome beacon
#

That would require manually updating it

fading drift
#

ive got this far

#
    public static void showTablistHealth(Player playerViewing, Player player) {
        Objective objective = playerViewing.getScoreboard().getObjective(DisplaySlot.PLAYER_LIST);

        if (objective == null) {
            objective = playerViewing.getScoreboard().registerNewObjective("playerlist", "health");

            CraftScoreboard craftScoreboard = (CraftScoreboard) playerViewing.getScoreboard();
            // get field final net.minecraft.server.v1_8_R3.Scoreboard board;
            net.minecraft.server.v1_8_R3.Scoreboard nmsScoreboard = craftScoreboard.getHandle();
            // run method "a" to change the display type
            nmsScoreboard.getObjective("playerlist").a(IScoreboardCriteria.EnumScoreboardHealthDisplay.INTEGER);
        }

        objective.setDisplayName(ChatColor.YELLOW.toString());

        objective.getScore(player.getName()).setScore((int) player.getHealth());
    }```
#

except it just doesn't change to health

#

when running the method a should run handleObjectiveChanged and then

        super.handleObjectiveChanged(scoreboardobjective);
        if (this.b.contains(scoreboardobjective)) {
            this.sendAll(new PacketPlayOutScoreboardObjective(scoreboardobjective, 2));
        }

        this.b();```
blazing ocean
shadow night
#

@orchid gazelle look at this fool

river oracle
#

That'd fuck servers so hard

orchid gazelle
#

everything above 1.12.2 is garbage

#

Mojang should make JE 1.12.2 only

pseudo hazel
#

nah

#

miss me with that shit

#

atleast give me proper swimming

worthy yarrow
#

Whether we go back in time or forwards, we’ll still be asking for component support

orchid gazelle
pseudo hazel
#

too lazy

#

might as well just use the latest version

#

there is no actual difference other than small stuff

#

which is only qol improvements

#

so no reason to keep sticking to a 7 year old version

orchid gazelle
#

it is just 100x better

pseudo hazel
#

?1.12 when

orchid gazelle
#

garbage game-destructing features, all mods got garbage

worthy yarrow
#

You’re not gonna be able to change feist’s mind

#

He’s hard set on 1.12

pseudo hazel
worthy yarrow
#

Cafebabe should interrupt with an ?1.8 or a ?1.12 considering anyone mentions a Minecraft version number

fading drift
#

has anyone ever done this before in 1.8

#

player health in tablist like hypixel

pseudo hazel
#

yes

#

I know a server who did it

#

hypixel

fading drift
#

well I'm not pinging the devs 💀

floral drum
#

hypixel is 1.7.10

#

nerd

slender elbow
#

hypixel is 1.22

floral drum
#

not yet

blazing ocean
#

hypixel is 2.7.10

floral drum
#

frfr

pseudo hazel
#

hypixel is 1.hype

floral drum
#

OMG 2.7.10

#

YOOOO

worthy yarrow
#

Hypixel has actually surpassed a need for versioning

#

They are just hypixel at this point

floral drum
#

Hygot

pseudo hazel
#

dont they have their own server implementation at this point?

floral drum
#

yes it’s called Hygot

#

they did a “hard fork”

worthy yarrow
#

It’s hygote but the e is silent

blazing ocean
#

aka the thing paper will do soon™

pseudo hazel
#

they did what paper could only dream of

worthy yarrow
#

Imagine paper with the funds of hypixe

#

Pixe yes

floral drum
#

pixe

fading drift
#

I am so fucking close

#

its showing up on tablist but didnt update when I ate a golden apple

orchid gazelle
#

1.12.2

#

win

fading drift
#
        Objective objective = playerViewing.getScoreboard().getObjective(DisplaySlot.PLAYER_LIST);

        CraftScoreboard craftScoreboard = (CraftScoreboard) playerViewing.getScoreboard();
        net.minecraft.server.v1_8_R3.Scoreboard nmsScoreboard = craftScoreboard.getHandle();

        if (objective == null) {
            System.out.println("Registering objective");
            nmsScoreboard.registerObjective("tabhealth", new ScoreboardCriteriaInteger("health", EnumChatFormat.YELLOW));
        }

        objective = playerViewing.getScoreboard().getObjective("tabhealth");

        objective.setDisplaySlot(DisplaySlot.PLAYER_LIST);
        objective.setDisplayName(ChatColor.YELLOW.toString());
        objective.getScore(player.getName()).setScore((int) player.getHealth());
        player.setHealth(player.getHealth());```
#

this shows on tablist

#

shows 20 in yellow

#

but doesnt update when I eat

chrome beacon
#

when you eat?

fading drift
#

or take damage

#

basically the health criteria isnt working

fading drift
#

any help would be appreciated

kindred sentinel
#

is it possible to make normal world to hardcore world using plugin?

eternal oxide
#

ie you die you are banned?

#

just set the gamerule

worthy yarrow
hybrid spoke
#

just do some situps and build a hard core yourself

worthy yarrow
#

That was a good one

eternal oxide
#

my core is hard /giggidy

kindred sentinel
kindred sentinel
eternal oxide
#

normal hardcore does not do that either

kindred sentinel
#

Normal hardcore means you die - you become spectator

eternal oxide
#

normal hardcore does not let you respawn

kindred sentinel
#

So it's possible to change world from normal to hardcore?

eternal oxide
#

yes, gamerule

kindred sentinel
#

there is no gamerule

#

to change world to hardcore

eternal oxide
#

ah its a suggestion

#

I see

kindred sentinel
#

it's just a request

eternal oxide
#

in that case, yes you can di it via a plugin

kindred sentinel
#

lol fr, I didn't see that

pseudo hazel
#

wild

mortal hare
#

why kotlin looks like if typescript and java have a child

#

type system is almost 1:1 to TS, not sure which copied whom

slender elbow
#

lol kotlin's type system is nothing compared to typescript's

mortal hare
#

prove

slender elbow
#

kotlin doesn't even have union types or type literals, conditional types

mortal hare
#

variable type declaration is almost the same you use the same syntax, even optionals are defined in the same fashion

#

what i meant is not a type system but more like a type syntax

slender elbow
#

TS's type system is turning complete, you can't do that with kotlin

#

scala's type system is far more similar

mortal hare
#

kt
val foo: String
ts
const foo: string

kt
val foo: String?
ts
const foo: string?

remote swallow
#

you can have a const in kotlin

mortal hare
#

also function declaration types are also kinda similar you have dynamic function types like in typescript, you dont need to define it as a SAM interface (Runnable, Consumer, BiConsumer)

#

instead you can just write declaration type you really expect and not what are predefined and are imported

slender elbow
#

you might wanna review your typescript

#

you can only do foo?: string in parameters, and you can't do string?, you need to specify string | undefined

mortal hare
#

yeah ik, i was just too lazy to initialize the variables

#

yea you're right ? is not allowed in declarations, only in object properties or function parameters

slender elbow
#
type SlotStrings<Tuple extends readonly [...unknown[]]> = {
  [Index in keyof Tuple]: Tuple[Index] extends string ? string : never;
};

:p

mortal hare
#

this is the most complex types i've written in TS

#

i dont even remember how this shit works anymore lol

#

bunch of type mapping which is barely readable

#

i remember i've wanted to make that you can only input known object property keys in such recursive types

#

but the type gotten so complex that ts just threw the error that it too expensive to compute

blazing ocean
mortal hare
#

imma go with

#

in this

distant basin
#

Yo what's up plugin nation

For the last few weeks I've been cooking up a plugin that I'm very passionate about. Within my plugin I have a few GUIs where the user can change settings and stuff, and I have material placeholders for the items you click within the GUI like you see everywhere else.
For example a "return" button is often an arrow or feather, an "exit" button is often a barrier block. You often see this on popular servers.

I would really like to make my plugin look super clean. So I was thinking about having a custom resource pack that comes along with my plugin to change some of the textures of stuff in my GUI.

My question is: would that make sense to do?
Obviously it makes the GUIs look neater, but it comes at a "cost" to of the server having to use my custom resource pack. Do other plugins also do this, or is shipping a resource pack alongside a plugin atypical?

mortal hare
#

you can make the resource pack optional

#

i myself like custom resource packs, especially with something like slimefun

#

it makes the plugins so immersive

worthy yarrow
#

I thought there was some plugin that let you customize gui placeholder items like borders and stuff

#

I thought it was itemsadder or something

distant basin
distant basin
worthy yarrow
#

No I get that, I just thought I did a commission for someone who didn’t need any fancy ui layouts since they were able to just edit it themselves through another plugin, if I had to guess yes it allows custom textures (probably just a plug and play url kinda thing)

remote swallow
#

or the other hundreds that exist

blazing ocean
remote swallow
#

are we able to put olivers mom in one

blazing ocean
#

nah client would crash

blazing ocean
#

you'd effectively just be ddossing yourself

vague dawn
#

hey, can someone have a look, why its not working?

#

i guess there is problem getting the last damager?

smoky anchor
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

smoky anchor
#

Also, nice arrow. Might wanna look into guard clauses.

vague dawn
#

Player is beeing teleported when hit Y level - lets say 0, i have it in config, but i cant get the lasdamager

#

i was trying to use hashmap to put inside it lastdamager and damaged player, after teleport remove the damaged player

#

i have this hashmap: private final Map<UUID, UUID> killerMap = new HashMap<>();

junior pewter
#

i'm trying to call "public GameState getState()" from other class, but it results in null, first image is code from class that is called "GameManager" and other are from class that is called "ProtectionListeners" and that class is where i'm trying to get it to, i have set InventoryClickEvent for now just to get the value in there...

#

what i'm doing wrong?

chrome beacon
#

Not enough information

#

How do you get your gameManager instance? Where does state/gameManager get initialized/set?

junior pewter
chrome beacon
#

Just send the entire classes in a paste

#

?paste

undone axleBOT
chrome beacon
#

I'm suprised it let you compile that

fair rock
#

ooc: He can compile it because gameManager is not final ?

junior pewter
#

i also forgot one class:

#

name is: "GameState.java"

chrome beacon
chrome beacon
#

it is null

#

You need to give it one

junior pewter
#

it has, it is assigned for now by just moving

chrome beacon
#

You are not assinging gameManager in that screenshot