#help-development

1 messages · Page 987 of 1

worthy yarrow
#

Trying to get all the opinions on kotlin... not sure if I wanna delve into that or not

ivory sleet
#

I mean its def worth trying

#

trying a "trendy" language usually provides good experience

worthy yarrow
#

usually sure, but I've read through the j8 bible like 3 times and retained nearly nothing D:

ivory sleet
#

j8 bible as in the lang specs?

worthy yarrow
#

Let me get the book

#

I actually don’t remember if this is specifically j8

#

But it’s just a fat book of java concepts

ivory sleet
#

lol

#

looks quite ancient

#

i think the biggest thing w books is to apply it once u learn sth

#

else u forget it rather quicköy

worthy yarrow
#

See that’s the issue is that this book teaches more “from scratch” concepts so to apply it to spigot is a bit more difficult imo, especially since I’ve literally only ever coded with spigot

#

I started doing spigot dev 4 years ago (granted I really can’t even count them since it was heavily on / off) and at this point I’m pretty mediocre I’d say

ivory sleet
#

i mean in regards to books

#

what I found really valuable is design patterns, effective java and concurrency in practice for java at least

#

in case u're a fan of books ^^

worthy yarrow
#

I've been a big fan recently, just went through william james vol1-2 psychology

#

700 pages of monster terminology

#

I've been using the people around me as psychology experiments, is that bad?

blazing ocean
#

yes

slender elbow
#

that write function is for when the game is about to send the packet over the network, the packet is serialised into the buffer and then sent over the socket

it doesn't seem like protocollib has anything for boss bars really, but.. why are you using packets? you can just use the api to create and manage your own boss bars?

worthy yarrow
hot dune
worthy yarrow
#

Sounds like you'll have to replace the boss bar packet with your own, that being said I'm not sure how concurrency really works with packets so you might need a manager that tells the update functions of the bossbar what the remaining health is

worthy yarrow
slender elbow
#

hm

#

I mean protocollib does let you go deeper than the surfacing getCoolThingThatHasSomeWrapper and you can do pretty much anything in that regard, but uhh I've never really used it before

icy beacon
worthy yarrow
icy beacon
hot dune
#

Hmm, I just thought, what if I try to send NMS packet to delete this bossbar and show my own, idk if it works but I have to try xd

worthy yarrow
icy beacon
#

does that work

worthy yarrow
#

Ie: Something from long ago causes you to respond in a certain way to different events

worthy yarrow
#

It's hard to do that with people I don't know

icy beacon
#

more practice for you 😛

#

im just kidding ofc i barely know anything about psychology (well maybe a bit more than an average person but barely) so i have little to no idea what im talking about

#

all im saying is id be down to be a subject of some psychological experiment/terror

#

xd

slender elbow
#

I have one for you

worthy yarrow
#

Well that might come later, like I said I've just been observing

slender elbow
#

listen to baby shark for 10 minutes

icy beacon
slender elbow
#

lmao

worthy yarrow
#

Have you guys ever heard of chinese water torture?

icy beacon
#

is it where they drop a droplet of water on an immobile person's forehead every once in a while and it drives them crazy because of the anticipation of the next droplet and lack of any other sense

worthy yarrow
#

Yes!

icy beacon
#

yay

worthy yarrow
#

The anticipation is less of the torture however, and more of the fact that something so miniscule can drive you to feel that way

icy beacon
worthy yarrow
#

But it's a mixture of immobility and the fact theres a water droplet every so often

icy beacon
#

& the fact that they can't do anything about it

worthy yarrow
#

Well yeah when it's a single drop every time on the same spot

#

Mixed with immobility is enough to craze most people

icy beacon
#

yes that can wear somebody out

#

do you think that'd wear you out

grand flint
#

Is this to do with my gradle version;

Execution failed for task ':compileJava'.
> error: release version 17 not supported
icy beacon
#

or were they just pussies

worthy yarrow
#

Depends on how long, I'm quite claustrophobic so the immobility is what'd get to me imo

icy beacon
#

i'd try to fall asleep and if that's not possible i'd try to count the water droplets and/or the interval between them

#

and think of anecdotes that i know

worthy yarrow
#

There's a difference in mind set when you know what the torture is gonna be vs waking up naked and afraid to water droplets on your forehead

icy beacon
#

because they are rather stupid -> funny

worthy yarrow
#

I think anyone who willingly involves themselves in "torture" tactics really just want to know what it's "like" but tbf you'll never know until you're in a true torture situation

icy beacon
#

you are correct

worthy yarrow
#

#TimeToThreatenNSA

icy beacon
#

cia

worthy yarrow
#

NSA will just send the cia

icy beacon
#

lol

#

i'm off

#

cya

worthy yarrow
#

Like those computer dorks are gonna leave the office

#

Take it easy!

grand flint
#

Is this due to gradle Cause: error: release version 17 not supported

remote swallow
#

use toolchains

dawn flower
#

can u make someone's vision only half?

#

so half of their screen is just black

shadow night
#

Maybe with display entities? Idk

eternal oxide
#

no as you can 3rd person

#

You can change the pumpkin helmet overlay using a resouce pack is all

shadow night
#

Doesn't the pumpkin overlay disappear in 3rd person too

eternal oxide
#

probably

pseudo hazel
#

yeah it does

charred blaze
#

nope

worthy yarrow
grand flint
remote swallow
#

google gradle toolchains

grand flint
#

Plus I think there was already a toolchain, I just added another one

#
def targetJavaVersion = 17
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}
slender elbow
grand flint
#

When I build jar

hot dune
#

Well, I managed to hide default ender dragon boss bar and show my own with my own values. My next question is how do I check if there's an ender crystal that currently healing ender dragon?

grand flint
#

In the terminal

grand flint
hot dune
#

is it location equals to edrag location?

grand flint
#

Wherever it ends I assume

worthy yarrow
#

You'll probably have to cache the location of the dragon every second or something

hot dune
#

hmm... let's try

blazing ocean
#

?tas my beloved

undone axleBOT
grand flint
#

My gradle property; distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip

worthy yarrow
grim hound
#

how do I use unobfuscated nms?

eternal oxide
#

?nms

grim hound
eternal oxide
#

don't

grim hound
#

can I create a module with Maven and attach it

#

somehow

eternal oxide
#

I bwlieve you can set an artifact to run maven

grim hound
#

howww

#

I don't see that option anywhere

eternal oxide
#

no idea I don't use IJ, but i've seen it talked about in here

tranquil glen
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
__**Admin:**__

selfrole Add or remove a selfrole from yourself.

__**Cleanup:**__

cleanup Base command for deleting messages.

__**Core:**__

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

__**Downloader:**__

findcog Find which cog a command comes from.

__**Mod:**__

names Show previous usernames, global display names, and server...
userinfo Show information about a member.

__**ModLog:**__

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

__**Permissions:**__

permissions Command permission management tools.

eternal oxide
#

Nope, I see nothing. Just use teh Maven tab as everyone else does

remote swallow
slender elbow
undone axleBOT
grand flint
#

I fixed it

#

I upgraded everything to 21 then downgraded it to 17 and it fixed

slender elbow
#

lol

#

alright

naive meadow
#

Why I am getting error 429?

obsidian drift
#

Does anyone know the packets I have to send or the way to disguise an entity as a player?

charred blaze
#

how can i automatically change config keys in the config when i change it from config.yml? (intellij)

remote swallow
#

what

#

like change the stuff you use in code?

#

you either have using a code based config system or have a key constants class that you can change the value of and refractor its name

twilit wharf
#

I currently have a system that adds a client side entity to all nearby entities. This is ran through a getNearbyEntities call. This works great, however when an entity is spawned in, like a player, sometimes the plugin gets the player through getNearbyEntities before it is spawned in client side, meaning it tries to set the passenger and stuff with an unspawned entity. How can I know when it is spawned client side?

patent coyote
#

how can i get the block responsible for a block explosion

buoyant jasper
#

how do i remove the join message from essentialsX

patent coyote
#

essentialsX has its own server

buoyant jasper
#

what do you mean

sullen marlin
#

What's triggering the getNearbyEntities call

patent coyote
#

nope

#

returns air

worldly ingot
#

getExplodedBlockState() if you want block information

#

Only just added in 1.20.5 though

patent coyote
#

alr ill try it out

#

how do i update my spigot

worldly ingot
#

You'd have to use BuildTools to build a newer version

#

?bt

undone axleBOT
worldly ingot
#

If you want to update it in your code editor, you only have to update the version in your pom.xml or build.gradle, whichever.

slender elbow
#

ant build files?

quaint mantle
#

for upload the pictures am i verify ?

slender elbow
#

yes

worldly ingot
slender elbow
#

thank you

#

i don't

storm crystal
#

Is it possible to map different textures to same item in server resourcepack?

lilac dagger
#

ant looks similiar enough to maven, what gives?

#

can you have multi module projects?

quaint mantle
#

can i hide health bar and hunger bar ? with any method

young knoll
#

Resource pack

ionic thicket
#

how to build package direcly into plugin folder

#

it only allows me to build it into project folder

lilac dagger
#

mfnalex had something about it

#

something to to do with profiles

sullen marlin
#

Use a symlink

#

Much better

lilac dagger
#
        <profile>
            <id>export-to-test-server</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.3.0</version>
                        <configuration>
                            <outputDirectory>C:\Users\Fr33styler\Documents\Workplace\Minecraft\Servers\BedwarsNew\plugins\</outputDirectory>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles-->```
remote swallow
#

smh

#

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

lilac dagger
remote swallow
#

link the blog smh

ionic thicket
#

ty

lilac dagger
#

i don't remember the blog

#

anyway, i'mma check symlink

remote swallow
lilac dagger
#

i didn't even remember the website name, give me a break 🥲

#

wait, symlink is amazing

#

you can just point to your target

#

thank you md

#

this is actually amazing

#

yas

#

md, you need to share your knowledge with us, i never knew windows came with this

#

wait, i can do symlink for buildtools jars too

#

i use a bat that points to the jar right now

#

hmm

#

ah wait, i have java 8

#

does anyone know how to open java > 8 apps by double clicking?

remote swallow
#

change the thing that it opens with

#

also your a bit weird for wanting a gui

lilac dagger
#

i remember trying it once

#

it was nice, it had some managing commands in the gui

#

well what file is the one that opens?

#

i tried java.exe/javaw.exe

#

neither worked

#

and now it looks like this

remote swallow
#

select the direct path

#

javaw is no console

lilac dagger
#

how would i select that?

#

i have jdk in path on top of jre

#

but that's for console

remote swallow
#

scroll all the way down

wet breach
remote swallow
#

?java17 for me

undone axleBOT
wet breach
#

If you can't find control panel. Just go to run and type control panel

lilac dagger
#

@wet breach i'm here

#

i know about control panel 😄

wet breach
#

Oh this looks different

#

Either in java or advanced if not then maybe has to do with the jar being blocked?

lilac dagger
#

i've been here once

#

i couldn't get it to work

wet breach
#

That window lets you define default jdk

lilac dagger
#

it should be this right?

#

maybe i messed up the path

wet breach
#

Well if you want to use some runtime arga possibly

lilac dagger
#

hmm

wet breach
lilac dagger
#

this is gui

wet breach
lilac dagger
#

yeah, i don't know how to change this

wet breach
#

You change it in that control panel

lilac dagger
wet breach
#

Uncheck enabled for 1.8

lilac dagger
#

same

wet breach
#

And then refresh the desktop

#

Might have to change it in system too

lilac dagger
#

i'll restart

#

restart didn't do it

wet breach
#

That was a quick restart

#

Java seems to not be liking you or its windows 11

lilac dagger
#

well, it's an ssd

#

it seems so

#

i guess i'm stuck to java -jar ing my jdk apps

#

unless md knows something i don't

#

actually

#

i don't even like this

#

for some reason i thought it had more stuff

wet breach
#

Well that is the default java gui window lol

lilac dagger
#

yeah it's bad

#

i'll use terminal

wet breach
#

Lol

#

All that to just see it wasnt worth it

lilac dagger
#

i have my botcreator tool where a dependency was upgraded to a newer java version

#

that i use in testing

#

i wish i could just double click it

#

i guess i can run a bat file

wet breach
#

Have you tried changing the association of the file?

lilac dagger
#

yes

#

i tried setting it to java,exe and javaw.exe

#

neither did it

wet breach
#

That sucks. I am just going to blame windows 11

lilac dagger
#

i remember sometimes in the past i did something in registry

#

-jar file

#

or something like that

wet breach
#

Well there is path environments you can set but java has moved away from it. Handy to set it though for the command line

lilac dagger
#

nvm

#

i think it was this

wet breach
#

Yeah that is the equivalent of running from command line but only shortcuts lets you add args to the target

#

And have an icon

lilac dagger
#

i can't believe java stopped making jres

#

1.8 is ancient now

#

i guess there's forks

wet breach
#

It still has jre. Just shaded into the jdk so you dont need to install two java things just the jdk

#

Or should say its bundled into the jdk installer stuff

lilac dagger
#

i see

remote swallow
#

typing Y2K_ is typing...

river oracle
#

How would one compile a gradle project to java 17 if I have a module (namely NMS 1.20.6) which requires java 21. Legit no clue where to even start. as soon as I compile I get errors galore

#

epic tried fucking with toolchains, but that really does no good

remote swallow
#

hi thats me

river oracle
#

tried setting source compatability etc no go for that to

lilac dagger
#

compile the module to java 21 and the rest to java whatever

#

at least this is how i do it

#

for maven

river oracle
#

yeah idk how to do that with gradle

#

it seems to not be a big fan of changing required source

lilac dagger
#

set the source target to java 17

#

and that's that

#

it should work i think?

patent coyote
river oracle
#

I tried doing that it just like yells

#

that java 21 isn't java 17 something or other

#

compiles fine without the java 21 module

remote swallow
#

@eternal night we need ur nerd brain

eternal night
#

why

remote swallow
#

gradle stuf

eternal night
#

multirelease jar?

river oracle
#

no?

eternal night
#

ah

river oracle
#

genuine question tho

#

idk what we have going on xD

#

trying to get NMS 1.20.6 to actually compile is what I'm doing. Its fighting my entire project cuz java 21

eternal night
echo basalt
#

make it all run java21 ezpz

river oracle
#

Epic told me no

echo basalt
#

sounds like epic's problem then

river oracle
#

@remote swallow

#

I actually need 1.20.4 for a bit longer tho :P

#

would love to get this working

river oracle
#

do you have the magic?

remote swallow
#

1.20.6 isnt stable and i like to stay outdated for like 8 months

young knoll
#

It’s a me, Mario

eternal night
#

Uhh lemme look in my brain

remote swallow
young knoll
#

8 months pepega

river oracle
#

I want to stay outdated for

#

?1.8.8

#

?1.8

undone axleBOT
remote swallow
#

?1.8

undone axleBOT
river oracle
#

8 years and 9 months

potent ocean
#

wrong

remote swallow
#

fym wrong

young knoll
#

Remember when you just yeeted a server to 1.18.2 and broke everything

potent ocean
remote swallow
river oracle
#

okay guys we are getting away from the problem here

#

why tf is java 21 bullying me

remote swallow
potent ocean
river oracle
#

shut up epic literally desolving pineapple and turning it into apple

potent ocean
#

the infrastructure is the best

young knoll
#

I think apple is already taken

river oracle
river oracle
#

I guess we're pine

potent ocean
#

no need to get hostile

#

whats ur question

river oracle
#

why is java 21 bullying me

remote swallow
remote swallow
potent ocean
#

or an animal

#

or a living thing

river oracle
#

you probably can't help since you've been on java 8 for so long you probably haven't actually experienced upgrading java version

potent ocean
#

i can only count to 8

#

no higher

#

but i will assist you

river oracle
#

not surprised. You've probably been in your cave so long you haven't experienced the last 9 years

#

I pitty you

potent ocean
#

Compiling a Gradle project with different Java versions for different modules can be a bit tricky. However, you can use the Gradle Toolchains feature to specify the Java version for each module. Here's a step-by-step guide:

  1. Ensure you have both Java 17 and Java 21 installed on your machine.

  2. In your build.gradle file, you need to specify the Java version for the entire project and for the specific module.

Here's an example of how you can set this up:

plugins {
    id 'java'
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17) // Default Java version for the project
    }
}

project(':moduleThatRequiresJava21') {
    java {
        toolchain {
            languageVersion = JavaLanguageVersion.of(21) // Java version for the specific module
        }
    }
}

Replace :moduleThatRequiresJava21 with the actual name of your module that requires Java 21.

Please note that as of now, Java 21 is not released yet, and the latest stable version is Java 17. The above example assumes that Java 21 is available. If your module requires a version of Java that is not yet released, you may need to check if there's a mistake in the module's requirements or if there's a way to make it compatible with a currently available version of Java.

#

boom @river oracle

remote swallow
#

thats wild

#

we already tried that

eternal night
#

and then set source and target compatibility?

river oracle
#

I've already set source and target compat

eternal night
#

java { disableAutoTargetJvm() }

potent ocean
#

better idea

#

dont use gradle

river oracle
#

lets see

river oracle
#

please go back under your rock

potent ocean
#

gradle is over rated, personally it's just not it

#

dont get why people fan boy it so much

river oracle
#

I'd agree if I didn't actually leverage gradle exlusive features

#

but I do so here we are :(

potent ocean
remote swallow
#

sure they can

#

except thats a 90 step process

potent ocean
#

maybe a 6 step max

river oracle
#

or I can just add buildSrc for my specific project

remote swallow
#

id rather spend 4 seconds writing a method than 9 hours making a plugin

potent ocean
#

lot of cons with using gradle

river oracle
#

I now remember why i had you blocked

#

suddenly

#

?paste

undone axleBOT
eternal night
#

did you do all of this shit on root

#

or on your adapter

river oracle
eternal night
#

rip

river oracle
#

I hate this

eternal night
#

I am off to bed sadly, if you don#t have it fixed I'll have a glance tomorrow

river oracle
eternal night
#

then push your latest ^

river oracle
#

done on branch update/1.20.6

eternal night
#

bruh

remote swallow
young knoll
#

Be nice to lynx he’s apparently sick

#

Probably caught it on the paper discord

remote swallow
#

nah

eternal night
#

@river oracle

#

I s2g

#

I opened the damn link on my phone

#

where are the braincells at

young knoll
#

Wut

eternal night
#

Does not want a multi release jar

#

Does this

#

The whole point is that you run your toolchain on java 21 but define source and target compat to your lowest

#

there, enjoy patch

slender elbow
#

merge conflicts during 3-way merge

#

@eternal night fix

eternal night
#

the paper experience

slender elbow
#

true....

eternal night
#

its how I recruit developers

#

stockholm syndrom them into loving patches

twilit wharf
stone bramble
#

trying to figure out how to deny incoming player interactions until a certain trigger which plays them back all at once

#

would only be at max a 300 ms gap between the start of the window where interactions get denied and the trigger to play them back, all interactions including entity interactions (kills, damage, etc) need to be traced back to the player that was originally denied the interaction

patent coyote
#

how can i make somthing in chat clickable

stone bramble
patent coyote
#

its suprisingly easy

remote swallow
stone bramble
#

how do i deal damage to an entity with a specified damagecause?

stone bramble
#

i was looking at bukkit forum posts from like 2016 thinking it didnt exist im smart

stone bramble
#

i assumed so

river oracle
#

DamageSource is 1.20.4 API

stone bramble
#

oh

#

im using 20.1

river oracle
#

it replaces the primitive DamageCause API which is terrible

#

in which is much less capable

stone bramble
#

i'll just switch my project over to 20.4 server this is intended for is updated anyway

#

ty

arctic monolith
#

Hello, there is a minecraft server that is in 1.8 and I joined it in 1.9.4 and I have the double hand, how could I reproduce that?

arctic monolith
eternal oxide
#

Your English is too broken to understand

nova notch
#

...youre trying to make pvp work like it did pre-1.9 in any version?

summer skiff
#

Hi I am a owner of a server I use login security plugin how can I find those users password which are registered in my smp by /register I have full-acces to console and all

arctic monolith
glad prawn
#

Your server is 1.7-1.9?

arctic monolith
nova notch
#

i think youre better off asking in french tbh i have no clue what "double hands" means

arctic monolith
nova notch
#

oh offhand

arctic monolith
eternal oxide
#

its when MC gained two hands (I think) It used to only display 1

eternal oxide
#

I still have no idea what your question is though

nova notch
#

well i dont think you can make that work considering the server is on 1.8 and has no clue what an offhand even is

eternal oxide
#

via version and via backwards plugins

nova notch
#

that works?

eternal oxide
#

I believe so

arctic monolith
nova notch
#

i guess im wrong then

eternal oxide
#

No clue what he's asking

arctic monolith
nova notch
#

i think they're trying to make a 1.8 server allow players on 1.9+ to use the offhand?

arctic monolith
#

Plugin version à 1.9...

eternal oxide
#

Off hand does not exist in 1.8

quaint mantle
nova notch
#

so i have no clue

eternal oxide
#

Its not a Spigot question

#

its a modding question

arctic monolith
eternal oxide
#

You can not get off hand support in a 1.8 client/server without (heavily) modding both

noble lantern
#

just update lmao

round finch
#

.getBlock().getPersistentDataContainer();
why isn't it a thing
😔

shadow night
#

Because normal blocks don't store any data iirc

round finch
#

only chunk it seems

#

i told chat gpt to stop gaslighting me now it is dying

wraith delta
valid burrow
buoyant viper
#

telling gpt "thank you for the misinformation!"

wraith imp
#

What is the best site to sell my plugins?

buoyant viper
noble lantern
charred blaze
#

senderPlayer.getInventory().getContents();

#

can i use this to save player's inv?

viral temple
charred blaze
valid burrow
#

getContents will return a list of itemstacks

#

you need to save them accordingly

charred blaze
#

i dont need it for a long time

valid burrow
charred blaze
#

yeah

#

my bad

valid burrow
#

well then yh that works

charred blaze
#

what about inv slots

#

will it be set as it was?

valid burrow
#

not with getContents

#

for that you would probably make a hashmap

#

with the inventories contents

#

Hashmap<Integer,Itemstack>

#

Integer being slot if that isn’t obvious

#

alternatively you could probably make a copy of the inv but i dont think that would be very resourceful

charred blaze
valid burrow
#

well as i said you shouldn’t anyways

#

make a hashmap.

#

for (int slot : priorInventory.size()){
hashmap.put(int,priorinventory.get(i) -or what ever the method is to get an item)
}

charred blaze
#

how do i get item's slot

valid burrow
#

i literally just told you

charred blaze
#

oh

#

mb

#

like this?

valid burrow
#

make an advanced for loop lol

#

or wait dont

#

lol im stupid

valid burrow
#

int slot = 0; slot < sender.gerInventory.getSize; i++

charred blaze
#

then slot in the first loop will be 1 wont it be?

hazy parrot
#

first increment is done after first iteration

tardy delta
#
int slot = 0;
for (ItemStack item : senderPlayer.getInventory()) {
  senderInvItems.put(slot++, item);
}```
valid burrow
#

i wouldve send more code but sucks on phone lol

charred blaze
tardy delta
#

iirc yes

charred blaze
tardy delta
#

look at the impl

valid burrow
#

a for loop needs to have these 3 arguments

charred blaze
#

it doesnt?

#

there are no errors

valid burrow
#

oh lol

#

but still just put it there thats just the way its done

charred blaze
#

ill do some testing

valid burrow
#

this will work too

#

its just not the way its done

#

if you want your code to be readable and comprehensible for others and future you

#

its best to hold yourself to the standards

#

at least to some extend

charred blaze
#

mhm

glass inlet
#

Anyone know a good way of making a red border effect per player. I want to enhance the experience of low health by making the corners or player screen red. I know this effect is done by manipulating the border, I'm just wondering is per player border already a thing in Spigot or do I have to use packets and send each player their own borders?

glass inlet
#

wait Player.setWorldBorder exists

valid burrow
#

setWorldBorder is something completely different

glass inlet
#

I'm confused now, is there a simpler way of getting the red effect on screen for a player without having to use worldborders?

valid burrow
#

yeah, packets.

chrome beacon
#

That still uses WorldBorders

valid burrow
#

yh ik

#

but you arent setting world borders for players

chrome beacon
#

also there's no need to send raw packets for it

valid burrow
#

i feel like that would make it 10 times more complicated

#

but sure go with it

chrome beacon
#

Using packets you mean?

valid burrow
#

not using packets

#

i feel like packets are the simplest way here

chrome beacon
#

Why would it be harder to use the api method

valid burrow
#

cause you are actually setting a world border

chrome beacon
#

No

valid burrow
#

instead of sending fake packets

valid burrow
chrome beacon
#

That method is just sending a packet

valid burrow
#

oh okay lol

chrome beacon
#

Not changing the global world border

valid burrow
#

then i didnt say anything

terse ore
#

Did it change something with the 1.20.5 mappings?

chrome beacon
#

?

terse ore
#

im walking with someone and he mentioned that, I didn't understand what was he trying to say

#

talking* lol

grim hound
#

Does someone know registry data stuff

#

is it the chat type being 1 instead of 0?

valid burrow
#

why is that one line like 10k chars

#

lmao

grim hound
icy beacon
#

?paste for code walls

undone axleBOT
icy beacon
#

plz

grim hound
#

use PacketEvents

trail coral
grim hound
#

yes

trail coral
#

im on 1.16.5

grim hound
#

doesn't matter

trail coral
#

also i have no idea how to use packetevents

#

idk about protocollib

#

either

#

but whatever

grim hound
#

very similar

#

but easier

#

and faster

trail coral
#

does it not glitxh on packetevents?

grim hound
#

and doesn't break (usually)

grim hound
trail coral
#

the glitch appears when you put the armor on by rightclicking

#

i think its too fast

#

and thats why it glotches

trail coral
short pilot
#

anyone know why this bossbar code isnt working ? All i want right now is for bossbar to be shown when in the borders of a valid chunk that has a kingdom uuid (already taken care of) and remove the bar when the player exits the territory


public class EggBossBar implements Listener {

    private final Map<UUID, BossBar> kingdomBossBars;
    private final KingdomManager kingdomManager;

    public EggBossBar() {
        this.kingdomBossBars = new HashMap<>();
        this.kingdomManager = KingdomManager.getInstance();
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        ChunkCoordinate playerChunkCoord = new ChunkCoordinate(
                player.getLocation().getChunk().getX(),
                player.getLocation().getChunk().getZ(),
                player.getWorld().getUID()
        );

        UUID kingdomUUID = kingdomManager.getKingdomByChunk(playerChunkCoord);
        if (kingdomUUID != null) {
            displayOrRefreshBossBar(player, kingdomUUID);
        } else {
            removeBossBar(player);
        }
    }

    private void displayOrRefreshBossBar(Player player, UUID kingdomUUID) {
        BossBar bossBar = kingdomBossBars.get(kingdomUUID);

        if (bossBar == null) {
            // Create a new boss bar if it doesn't exist
            bossBar = Bukkit.createBossBar(
                    ChatColor.GREEN + "Kingdom Boss Bar",
                    BarColor.GREEN,
                    BarStyle.SOLID
            );
            bossBar.addPlayer(player);
            kingdomBossBars.put(kingdomUUID, bossBar);
        }
        // Customize boss bar properties as needed
        bossBar.setVisible(true);
    }

    private void removeBossBar(Player player) {
        for (BossBar bossBar : kingdomBossBars.values()) {
            bossBar.removePlayer(player);
            bossBar.setVisible(false);
        }
    }
}
#

all i want right now is for it to show when player in territory, and disappear when player exits territory

icy beacon
#

jesus christ

#

?paste PLEASE use this for code walls

undone axleBOT
icy beacon
#

if 5 people send their code walls only one of them will get help, if even

#

two codew alls in 5 minutes

lost matrix
#

You are not properly handling all items in this packet. If the list contains more than 1 element, then you are completely missing all the other elements.

trail coral
#

how so? im looping thru all the items

lost matrix
#

You are literally only getting the first item from the list. Nothing else.

trail coral
#

oh fuck

#

should i loop thru packet.getSlotStackPairLists() ?

#

and thrn check if its an armor piece and remove the enchant

lost matrix
lost matrix
trail coral
#

thanks a lot

trail coral
# lost matrix

what does packet.getSlotStackPairLists() return? is it like a pair list of all the items?

lost matrix
trail coral
#

so to get the first pair i have to read(0).get(0) right? read the first pair and then get(0) gets the slot

#

or does get(0) get the pair

lost matrix
#

No this will break

trail coral
#

why?

#

sorry im unfamiliar with packets

lost matrix
#

That looks more like a java problem than a packets problem

#

Allocate a variable for the List and iterate it.

trail coral
#

lmao i got confused dude ive never worked with packets idk what i should do with the pair lists

lost matrix
trail coral
#

so would this work? i define the list in a variable, loop thru it and remove the enchants. then i write(0, pair)

lost matrix
#

You are now overwriting the list with a singleton list, for every item. So you will only ever have the last item changed.

lavish shell
#

Wasap. who knows an API (in Java or Python) with which you can track minecraft servers that have just opened

trail coral
#

alr hold up

#

i didnt write this code originally thats why im unfamiliar with it

lost matrix
trail coral
#

so should i create a seperate List of pairs in which i have all the items with removed glints?

#

and then override the old list with the new list

#

old list as in not the variable

#

but the actual list

lost matrix
trail coral
#

alr man sorry damn

#

i was just confused

#

so something like this should work where i iterate thru the items and add them to a new list and then override the old list with this one

#

by using write(0)

lost matrix
#

Yeah looks good.

trail coral
#

thanks and sorry for the stupid questions

lost matrix
#

All good

glass raven
#

hello i'm making a function to send blocks from a player to another, and to do so i make players get their uuids from a command.
the command and the function works fine for offline/cracked players, but for premium players, neither the uuid from the command and the uuid from mojang server works (offlinePlayer.isOnline() returns false)

vital ridge
#
if (SupremeSpawnerBlock.isSupremeSpawnerBlock(bAgainst)) {
            
            // LEVELUP SPAWNER

            SupremeSpawnerBlock supremeSpawnerBlock = SupremeSpawnerBlock.getSupremeSpawnerBlock(bAgainst);
            System.out.println(supremeSpawnerBlock.getLevel());
            supremeSpawnerBlock.levelUp();
            e.getPlayer().playSound(e.getPlayer().getLocation(), Sound.BLOCK_ANVIL_USE, 1.0f, 1.0f);

            e.getItemInHand().setAmount(e.getItemInHand().getAmount() - 1);

            ((CreatureSpawner)bAgainst.getState()).getPersistentDataContainer().set(SupremeSpawnerBlock.SPAWNER_BLOCK_DATA, new SupremeSpawnerBlockDataType(), supremeSpawnerBlock);
            bAgainst.getState().update();
            System.out.println(SupremeSpawnerBlock.getSupremeSpawnerBlock(bAgainst).getLevel());

            e.setCancelled(true);
            return;

        }

For some reason this code fails to level up my spawner. I'm setting the persistent data and everything even twice, but it still remains level 1.
Here is my SupremeSpawnerBlock class.

glass raven
#
if (fromPlayerOffline.isOnline()) {



                                    if (fromPlayer.getInventory().containsAtLeast(item, parseInt(amount))) {



                                        if(hasFreeSpace(material, parseInt(amount), toPlayer)) {
                                            fromPlayer.getInventory().removeItem(item);
                                            toPlayer.getInventory().addItem(item);
                                            fromPlayer.sendMessage(ChatColor.GREEN + "You sent " + amount + " of " + strMaterial.toUpperCase() + " to " + toPlayer.getDisplayName());
                                            toPlayer.sendMessage(ChatColor.GREEN + "You received " + amount + " of " + strMaterial.toUpperCase() + " from " + fromPlayer.getDisplayName());
                                            res.status(Http.Status.OK_200);
                                            res.send("Moved '" + strMaterial + "' '" + amount + "' from " + from + " to " + to);
                                        } else {
                                            res.status(Http.Status.BAD_REQUEST_400);
                                            res.send("Not enough space in inventory");
                                        }




                                    } else {
                                        res.status(Http.Status.BAD_REQUEST_400);
                                        res.send("You don't have enough items");
                                    }

                                } else if (!fromPlayerOffline.isOnline()) {

                                    res.status(Http.Status.BAD_REQUEST_400);
                                    res.send("ammazzati");
                                }
#

and this is the function to send

#

i have no idea why it doesnt work with premium players

#

any help would be appreciated 🙂

lost matrix
vital ridge
#

So how could I work around it?

#

I need to get the state

#

In order to access the persistentdata

lost matrix
dawn flower
#

is it possible to make smooth block moving

#

i want like 3 million blocks so it cant be entities

lost matrix
lost matrix
echo basalt
#

display entities?

dawn flower
#

unless somehow 3 million entities wont lag the server (it will)

young knoll
#

Moving 3 million blocks in general will lag everything

zealous osprey
lost matrix
dawn flower
sullen canyon
vital ridge
lost matrix
dawn flower
#

what abt 100k blocks

lost matrix
vital ridge
#

I see, but how can I access the state without creating a new copy?

zealous osprey
# dawn flower what abt 100k blocks

Are you moving groups or single blocks?
If it's a group, consider using fewer displayentities but transforming them to make them look as if it were more blocks

lost matrix
#

Dont call update() on a completely unrelated copy that wasnt changed in the first place because that doesnt do anything

sullen canyon
dawn flower
#

i want something like this moving smoothly

#

but abit bigger

lost matrix
grim hound
zealous osprey
#

I see a greater issue in making players be able to stand on that thing

dawn flower
#

its just 10k blocks (entities), would that lag the server or players

#

not including the fact that some blocks will just be 1 BIG block display

lost matrix
#

You have to realize that this would result in a metric ton of packets being sent out to a player

dawn flower
#

what if its not smooth

#

with 10k blocks only

lost matrix
#

And throttling will result in some parts simply moving later than others because not all packets will be sent at once.

lost matrix
# dawn flower with 10k blocks only

You can throw the idea of using Blocks in the bin. The most efficient way will always be BlockDisplays as they dont require light updates and are optimized in the render pipeline for such shenanigans. Falling blocks and actual blocks will result in quite a few calculations for both client and server (if not done virtually)

vital ridge
floral drum
#

imagine how many mesh updates it needs to do on the client every single time the world is updated

vital ridge
#

Like if I use getPersistentDataContainer does it create a new copy of the pdc object?

lost matrix
random steppe
#

Is there any way to let the item lore use different translation in client?
i want to let work like this

lore:

The Mat is Diamond Sword

lost matrix
valid burrow
#

u can do that directly

#

but

#

if you figure out a way to know what user speaks what labgu

#

lang

#

you can update it accordingly

young knoll
#

translation components exist

valid burrow
vital ridge
young knoll
valid burrow
lost matrix
random steppe
#

can TranslatableComponent use on the lore?

young knoll
#

Not with the api

#

Blame @worldly ingot

lost matrix
worldly ingot
#

I'M SORRY

random steppe
#

if i use NMS can i use TranslatableComponent on the lore?

worldly ingot
#

I'll update it to 1.20.5 tonight or tomorrow

random steppe
#

hum...

polar forge
#

Hi guys

random steppe
#

question is i know what language they use
but i don't know how to get the translation key with each material

#

should i make a map<Mat, translation-key> file manual?
or?

polar forge
worldly ingot
random steppe
#

hum...

worldly ingot
#

I guess Material#getBlockTranslationKey() or Material#getItemTranslationKey()

#

Depending on which you need

random steppe
#

unfortunately i'm still using 1.12.2

#

is this a new feature?

worldly ingot
#

Relatively. Like 1.18 or something

random steppe
#

oh...

worldly ingot
#

Best you can do is construct it yourself, but worse yet, you're on 1.12 so there's no Material#getKey()

lost matrix
polar forge
#

Why since 01.01.1970? Is there a reason behind it? Just curious

lost matrix
#

We should feed an LLM with a huge context size with the entirety of this discord channel, and then see how good it is with helping others with spigot problems.
The new LLMs will have millions of tokens for their context input. Maybe we would have to do multiple iterations and let it condense the most important parts so that it can have a single context with quality information.

slender elbow
#

does Spigot support 1.21 data driven enchantments ????

lost matrix
#

o.O

#

I should read the new snapshots

lost matrix
young knoll
#

(In minecraft)

lost matrix
#

ingame

eternal night
late sonnet
eternal night
#

KEKW meh

late sonnet
eternal night
#

but we have a lot of time till 1.21

late sonnet
eternal night
#

Given they 'just' introduced another giant set of data components

#

I doubt it

late sonnet
eternal night
#

Yea presumably

slender elbow
lost matrix
eternal night
#

Well even there its meh

#

Another place where Translatable breaks

dawn flower
#

do i just put a display entity inside of the ship with a custom nbt tag?

young knoll
#

I would have a parent entity with a PDC tag

#

And then all the ship parts as a passenger of said entity

dawn flower
#

wait thats genius

#

ur a goddamn genius since display entities have transformation

young knoll
#

mhm

#

Tis what I do

#

I usually have a interaction as the base entity to act as a hitbox

dawn flower
#

but can entities have like 10k passengers..

young knoll
#

yes

dawn flower
#

dead srs?

young knoll
#

mhm

dawn flower
#

thats sick

#

aight thanks

young knoll
#

An entity can have unlimited (in theory) passengers

dawn flower
#

upto 32 bit limit*

#

unlimited doesnt exist in computers theoratically

eternal night
pseudo hazel
#

unlimited does exist theorethically

#

you just need an unlimited amount of memory

dawn flower
#

no computer can handle infinity

dawn flower
pseudo hazel
#

its just not practilly possible

grim ridge
#

anyone know a refund or /lastinv plugin that removes the items refunded from the player that has them currently and returns to player that died to a hacker or bug? Can pay lmk server is 1.9+.

dawn flower
#

is that a block with passengers

young knoll
#

Yes

dawn flower
#

that looks better than microsoft flight sim

#

u def cant do a 360 in microsoft flight sim

pseudo hazel
#

displayentities are like what, 1.19.4 right?

young knoll
#

yes

dawn flower
#

would falling blocks also work

#

(i support older versions)

shadow night
#

They aren't vertically rotatable iirc

dawn flower
#

ah

young knoll
#

They aren't rotateable at all

dawn flower
#

ima just disable anything below 1.19.4

shadow night
young knoll
#

mhm

grim ridge
#

anyone know a refund or /lastinv plugin that removes the items refunded from the player that has them currently and returns to player that died to a hacker or bug? Can pay lmk server is 1.9+. please lmk.

shadow night
#

Didn't know

young knoll
#

They always align to the grid

shadow night
grim ridge
shadow night
#

?services

undone axleBOT
dawn flower
#

wait

#

how long did it take to make that plane in entities...

#

that seems like a nightmare, i dont want 10k lines of code 😭

pseudo hazel
#

well I imagine they wrote some code to convert a building into a display entity thing

#

otherwise it'd be stupid

#

like you wanna be able to add vehicles or whatever without adding more random code to the plugin

dawn flower
#

yeah i thought of that

#

but still 10k lines of code 😭

pseudo hazel
#

how so

dawn flower
#

oh wait i didnt understand what u said

#

thatd prob work

pseudo hazel
#

I can only hope for coll's sake he didnt manually type in every block of that plane

dawn flower
#

creating a method like that would be abit hard ngl

pseudo hazel
#

yeah probably

#

none of this is really easy probably xD

river oracle
#

Colls been working on that system for a while

#

I can only but guarentee its got an API behind it xD

young knoll
#

Yeah it just converts a selection of blocks

dawn flower
#

should i make it check each neighbour to each block and scale it instead of creating more entities (to enhance performance clientside) but that'd make the server basically seek for help trying to do that

#

it's going to check for -x, +x, -y, +y, -z, +z for EACH block which is like 6 extra loops

young knoll
#

I mean that relies on a 2x2 area of blocks being the same

#

Also it'll strech the texture

dawn flower
ruby sable
#

I considered doing that for concrete builds

fossil flax
#

someone know what's the meaning of this error
The SHA1 checksum of the downloaded server jar does not match the BuildData hash.

blazing ocean
charred blaze
#

how do i give items to players that are dead? for example if someone killed someone1 how do i give item to someone1?

#

(respawn screen problem)

valid burrow
#

i dont see what you mean

#

are you trying to automatically respawn players?

eternal oxide
#

when dead (in respawn screen) they do not really exist

valid burrow
#

ik that

#

so his problem is

#

respawning them?

eternal oxide
#

giving the dead person an item it seems

valid burrow
#

wait till they respawn id say

eternal oxide
#

no idea why you would give the dead one a reward

valid burrow
#

trostpreis

eternal oxide
#

someone shoudl make an anti-pvp mode

#

If you kill someone you get a penalty.

#

You'd have players tryign to suicide on others

valid burrow
#

soooo

#

real live?

charred blaze
worldly ingot
eternal night
#

Enchantments in 1.21

worldly ingot
#

Why's that?

eternal night
#

They are now registry based

worldly ingot
#

Sure but it still works fine for vanilla enchantments

eternal night
#

Yea

#

But only for vanilla enchantments

worldly ingot
#

I think that's really all we can reasonably target with a translatable interface

eternal night
#

Ehhhh

carmine mica
#

what's is supposed to do for a non vanilla one

worldly ingot
#

It'll give a (potentially) non-existent key in the standard format

carmine mica
#

just like what is the trim material trim pattern ones

eternal night
#

Idk it's a deprecate and expose name vibe

#

If that happens to be a translatable component, nice

#

If not, oh well

worldly ingot
#

It would give you enchantment.namespace.key

#

Which seems fine to me

#

Whether or not datapacks actually abide by that translation format is up to the datapack

young knoll
#

My favourite biome is minecraft:custom

#

😩

eternal night
#

I mean, sure I guess given spigot doesn't have components yet, people don't really use it

#

Maybe more of a paper problem

worldly ingot
#

We probably will end up adding Enchantment$Components#getName() though

eternal night
#

Yea

worldly ingot
#

I'll throw it into my PR

eternal night
#

Sounds more reasonable

#

It'll land soon COPIUM

worldly ingot
#

I'll update it to 1.20.6 today lol

eternal night
worldly ingot
#

Fuck the whole .5 and .6 thing is confusing KEKW

young knoll
#

Sorry 1.21 is already out

eternal night
#

Might be a vibe to get it in while spigot is still experimental

young knoll
#

Jk it’s 1.21.5 now

worldly ingot
#

tbh the PR is done, I just need to figure out wtf I'm gonna do with books

eternal night
#

Obviously pls deprecate all string based method

charred blaze
#

i dont understand why my code works 💀

worldly ingot
#

That won't happen probably

eternal night
worldly ingot
#

I think those legacy strings will only ever be deprecated if Mojang removes the legacy characters

eternal oxide
eternal night
#

Well, issue is with components in the API

eternal night
#

On spigot

young knoll
#

Deprecate the deprecated annotation

eternal night
#

You'll be in a data loss environment

carmine mica
#

if mojang removed them, spigot would still support them. spigot already just converts them into components, it isn't using the section char directly

worldly ingot
#

Yeah, they'd probably still be supported, but they could at least more reasonably be deprecated

dawn flower
young knoll
#

Yes

river oracle
#

If spigot removed legacy text I'll cut off all my limbs

worldly ingot
#

You don't need those anyways

river oracle
#

That's how confident I am it'll never happen

charred blaze
#

so i set isStartingIn5Seconds to false in a task but i actually forgot to save the object in my hashmap.

i have move event listener that checks isStartingIn5Seconds and doesnt let player move if its true.

problem is it works without resaving object in hashmap? how

eternal night
#

Not even for translatables and shit but iirc current one also emits technically wrong legacy for nested text components

carmine mica
#

yeah, there's an open issue

young knoll
#

Hey everyone lynx volunteered to fix it

worldly ingot
#

On Bungee's GH? Or Spigot's JIRA?

eternal night
#

On spigot

worldly ingot
#

Ah okay

young knoll
#

Hmm… fine you’re off the hook

eternal night
#

Idk if it's a regression, iirc bungee converter is better

young knoll
#

For now

eternal night
#

Spigot ones isn't

eternal night
#

Just hasn't moved anywhere because well, there aren't components in the API

worldly ingot
#

tbh, the component PR I think uses Bungee's converter for all of Bukkit's legacy string methods now

eternal night
#

Ah nice

worldly ingot
#

It might be better after the fact

eternal night
#

Let's hope people are using PDC to identify their shit XD

river oracle
worldly ingot
#

Name/lore identification is so 1.13

eternal night
#

Facts

#

Also miles did my patch end up working for ya

eternal oxide
#

But lore is easier /sarcasm

river oracle
# eternal night Facts

Stop being stupid ypu know full well there is some popular ass plugin using names and lore for comparisson

eternal night
worldly ingot
#

That's why they're popular Kappa

carmine mica
#

bungee chat... show item...

worldly ingot
#

need more... context...

eternal night
#

you are.... Cute....

worldly ingot
#

wtf

#

I'm calling HR

eternal night
#

FUCK FUCK FUCK

river oracle
carmine mica
#

bungeecord chat doesn't support show item

young knoll
#

I thought you were HR

river oracle
eternal night
#

Das a conflict of interest

worldly ingot
carmine mica
#

show item doesn't use nbt anymore

worldly ingot
#

Ah, right, components

eternal night
#

Minor Minecraft update choco

#

Smh

young knoll
#

wtf components in components

river oracle
worldly ingot
#

Great. Now we need an item component serializer/deserializer in Bungee :(

eternal night
young knoll
#

Mojang oughta have one

#

Somewhere

worldly ingot
#

Probably in the game itself. Doubt it's a 3rd party library

river oracle
#

Updating my nms to 1.20.6 is gonna take years.

#

Not because the code but because of java 21

#

Compiling this has me on the brink of tearw already

young knoll
#

Anything is a third party library with enough CTRL C + V

river oracle
#

@eternal night Whatver happened to doing all my gradle for me smh smh

eternal night
#

I literally

#

Sent you a patch

river oracle
#

Oh

#

Kek

worldly ingot
#

Well no, it should work fine, shouldn't it? You can use ItemMeta#getAsString() which should get you a component string

#

You can just pass that straight into bungee's hover event, no?

young knoll
#

Y2Ks brain has 0 wrinkles today

worldly ingot
#

Or does ItemTag#ofNbt() strictly require JSON?

carmine mica
#

getAsString specifically says it should not be used as a serializable value, so...

river oracle