#help-development

1 messages · Page 720 of 1

tender shard
#

oh it does in certain things - didn't we compare buildtools times?

orchid gazelle
#

no we didn't

#

because I could not get results

tender shard
#

the m2 takes about 30 seconds to compile 1.20.1 --remapped

orchid gazelle
#

idk my times sadly

smoky oak
#

huh curious
apparantly the itemHeldEvent triggers if you join the server

#

why

orchid gazelle
#

also can't test it because vodafone is still limiting my bandwidth A LOT

smoky oak
#

pay for speed not volume :kekw

orchid gazelle
#

I remember running it but getting bandwidth bottlenecked the fuck out of it

orchid gazelle
#

I used to get 1060 for 1000mbit agreement

smoky oak
#

huh i have stable 1600

orchid gazelle
#

bro it's Germany

tender shard
#

ok obv I was talking bullshit if I actually did say that

smoky oak
#

wat

orchid gazelle
#

nobody here has over 1000

#

1000 is something REALLY special where I live

smoky oak
#

i meant 1600 kb/s

#

not MB lol

orchid gazelle
#

oh

#

well 90mbit is a heavy bottleneck for buildtools

#

it literally said "downloading xy" for most of the time, while I saw that it was using 100% bandwidth all the time lol

tender shard
#

however the m2 really reks almost every CPU out there in terms of power usage and because of those neural engine cores etc it's indeed faster in most "actual useful tasks". maybe it cannot calculate Pi faster than a 13700K but I bet if you compile spigot, it won't be any faster than the m2 max

smoky oak
#

the whole server files are like 90mb total

orchid gazelle
smoky oak
#

fuck are you downloading

echo basalt
orchid gazelle
tender shard
#

so I probably wanted to say: who cares about "raw performance" if in real life, the m2 is at least on par, while it's literally a laptop chip that uses way less than 100 watts lol

smoky oak
#

ive a laptop chip that overclocks itself to 4.2 GHZ then BSODs me

echo basalt
#

my desktop chip would reach 130C opening minecraft and kill itself

orchid gazelle
echo basalt
#

had so much dust in my radiator it looked like sand

tender shard
orchid gazelle
#

because it's multicore processing raw text lol

echo basalt
#

probably from that time the sky was literally orange during 3 days due to sand in the air

#

fun

orchid gazelle
#

infact I really like thinking about how stupid my setup is you know what I mean? lmao

tender shard
#

TL;DR the m2 is probably the greatest CPU out there for any laptop unless you wanna keep it plugged in all the time and only use it inside a fridge

orchid gazelle
#

"holy fuck im literally fucking cooling 250W rn LMAO"

echo basalt
#

then there's the new a17 pro chip

smoky oak
echo basalt
#

apparently has the same single thread performance of desktop gaming cpus

orchid gazelle
#

I bet my GPU can fuck any of your guys GPUs :)

#

at gaming

smoky oak
#

got a gpu equiv to a desktop 2060 so fck off lol

orchid gazelle
#

😂

smoky oak
#

oy it can run scorn and doom

#

like modern doom

orchid gazelle
#

thats true

#

I can run this at 160FPS tho

smoky oak
#

alright go die not everyone is rich

orchid gazelle
#

XD

smoky oak
#

i have like $900 in bank

orchid gazelle
#

btw. it's actually 160FPS

#

I measured today while going there ingame

smoky oak
#

yea until you move

#

:D

orchid gazelle
#

no I have been moving

#

constant 140-160FPS

smoky oak
#

huh

#

thats the speed i keep my minecraft at

orchid gazelle
#

XD

smoky oak
#

cuz the drivers cap it at my screen framerate for some reason

orchid gazelle
#

bro

smoky oak
#

i think i can faster

orchid gazelle
#

a 300W GPU can do a lot of shit

#

my whole pc is eating like 450W doing this

#

meeeh

#

more like 500-550

smoky oak
#

dont cook ur cables lol

orchid gazelle
#

CPU providing the frames with like 160W lol

orchid gazelle
#

I am cooking my room tho

smoky oak
#

bleh its so warm and cold here i cant wear shit but i freeze if i dont

orchid gazelle
#

honestly

#

once I saw this picture in the game

#

I straight up started staring at the fucking screen lol

#

like holy fuck

#

you would literally think this is prerendered blender type of shit right?

smoky oak
#

nah

#

ive seen that ue5 game

orchid gazelle
#

it's not ue5

smoky oak
#

i know what good gpus can do

#

bah u know what i mean

orchid gazelle
#

it's running on NorthLight Engine

#

with DX12

smoky oak
#

eeeh i prefer dx11

#

fps > detail

tender shard
#

ice bear

orchid gazelle
#

game also has dx11 mode which is recommended

#

but for max raytracing settings you need dx12

smoky oak
orchid gazelle
#

so I use dx12

#

12*

tender shard
smoky oak
#

uh

#

i can turn one of my old ones german

#

:p

tender shard
#

deal

#

then I'll set my 2013 macbook to english

smoky oak
#

👍 ‎

tender shard
#

which btw still gets security updates

smoky oak
#

yea microsoft is a bit bad on that front lol

#

oh want to hear something funny

orchid gazelle
#

@smoky oak you know what your GPU cannot do?

smoky oak
#

lots

orchid gazelle
#

Process 330TFLOPS of RayTracing like mine does :)

smoky oak
#

run the newer huggingface checkpoints for example

smoky oak
#

for free too

orchid gazelle
#

What?

#

Do you mean

smoky oak
#

yea full pride flag

tender shard
smoky oak
#

yes my camera is atrocious no i dont have the money for a better one

orchid gazelle
#

Uhm guys

tender shard
#

fun fact: gay people get laid 10x times as often as straight people

orchid gazelle
#

We should go to #general

tender shard
#

ok I'll repeat my statement there

solar sparrow
#

Hey guys, good night! How can I add color to my console using the spigot 1.8.8 jar?

        getLogger().info("§a   ____    _    __  __ ____   _____   __");
        getLogger().info("§a  / ___|  / \\  |  \\/  |  _ \\ / _ \\ \\ / /");
        getLogger().info("§a | |     / _ \\ | |\\/| | |_) | | | \\ V /");
        getLogger().info("§a | |___ / ___ \\| |  | |  __/| |_| || |");
        getLogger().info("§a  \\____/_/   \\_\\_|  |_|_|    \\___/ |_|");
echo basalt
#

consolesender

sullen marlin
#

Why would anyone want a 5 line coloured ASCII message in their console?

#

Like who are you trying to impress

#

The console is for information

solar sparrow
nimble nacelle
#

Hey I was wondering if it was possible to give a specific type of goat horn

river oracle
#

probably if its possible with commands you can do it with a plugin

#

just edit the ItemMeta

nimble nacelle
#

Ye I realized that I have to edit the ItemMeta

#

but like what part

#

Everywhere I look it is saying its not possible at the moment

sullen marlin
#

MusicInstrumentMeta

lost matrix
#

Yeah im not 100% satisfied with that approach either

fossil flax
#

how can i fix this error?

orchid gazelle
#

If yes, you maybe should try to repeat the error on spigot or seek help at their discord^^

fossil flax
#

ok ill try, thanks

orchid gazelle
#

But wait, does that screenshot show the full error?

fossil flax
lost matrix
# fossil flax how can i fix this error?

This error occurs because you modified a Map concurrently.
This can either happen if you use multiple threads, or when
you are modifying the map while iterating over it.

lost matrix
# fossil flax how can i fix this error?

Here is an example that results in a ConcurrentModificationException:

  private final Map<UUID, Integer> someCounterMap = new HashMap<>();
  
  public void removeAllBelow(int amount) {
    this.someCounterMap.forEach(((uuid, count) -> {
      if(count < amount) {
        this.someCounterMap.remove(uuid);
      }
    }));
  }
small current
small current
#

or just fix it

lost matrix
#

ConcurrentHashMap to replace a TreeMap. squirtle

lilac dagger
#

😂

small current
small current
smoky oak
#
inventory.getItem(event.getPreviousSlot()),
inventory.getItem(event.getNewSlot()),
#

using playerInventory and ItemHeldEvent, why do those return the same slot?

echo basalt
#

print out the values

smoky oak
#

yea thats how i figured it out

echo basalt
#

does getPreviousSlot and getNewSlot return the same number

#

oh shit

smoky oak
#

ah it probs doesnt

echo basalt
#

alhamdullillah what

smoky oak
#

i mightve an issue in the printout

#

fuck ur doing lol

echo basalt
#

I forgot to close my intellij windows

smoky oak
#

huh

#

if you join and have nothing in your hand the itemheldevent fires

#

if you hold an item while joining it doesnt

#

bye-bye logic bruh

echo basalt
#

go fucking figure

smoky oak
#

ah yes ofc
it hits this line of code but doesnt change the itemStack's material. How do i remove this itemStack

subtle folio
#

is the item stack quantity greater then 1?

#

or are you just trying to delete it

smoky oak
#

im just trying to delete it

#

setting number to 0 works

hybrid spoke
#

.removeItem what

smoky oak
#

that doesnt exist

#

at least not for ITemStack

echo saddle
topaz cape
smoky oak
#

im starting to agree with alex that -1 should return the offhand bleh
fuck is this
ItemStack target = event.getHotbarButton() == -1 ? inventory.getItemInOffHand() : inventory.getItem(event.getHotbarButton());

topaz cape
#

i tbh am tired of people who find themselves sonehow "funny" this way

#

you probably dont know what that means and you just spam it like a fool everywhere

lost matrix
smoky oak
#

i am not fighting a church

topaz cape
#

i dont want other people to use it for jokes. god is not a joke

lost matrix
#

Yes you are right, every religion is a joke to me

echo basalt
#

to us*

#

I worked with muslim people for years, they're chill

topaz cape
#

then make fun of your own religion

echo basalt
#

which one

topaz cape
#

dont care

echo basalt
#

:)

lost matrix
#

I dont have a religion. And i make fun of every religion, no exceptions.

smoky oak
#

HOTBAR_MOVE and HOTBAR_SWAP include offhand

#

which gives -1 if you query the button

topaz cape
echo basalt
#

want evidence I make fun of everyone?

smoky oak
echo basalt
topaz cape
#

he's probably joking as well

echo basalt
smoky oak
#

tbf mine isnt better

echo basalt
#

fixed

smoky oak
#

@me

#

its not working

#

:D

lost matrix
topaz cape
#

im not asking you to care im asking you to just have respect by not making fun of it

#

thats all

#

or just dont mention it

#

thats all

#

if it is that hard for u then you have problems

#

not me

echo basalt
#

Speaking from experience, muslims are more likely to shove their religion at everyone else

echo basalt
topaz cape
#

shove is a strong word

#

they ask you questions you usually cant answer

echo basalt
#

Is it discriminatory to a group, if I make fun of everyone except that one group

#

because I'm treating it different

lost matrix
#

I dont know man. I live in bavaria and we have a law here that administrative buildings need a cross above their entrance.
Its only the fanatics that shove their religion on your face.

echo saddle
#

you all should be a little less focused on religion, and more on the environment.

smoky oak
#

honestly u should leave
state caring about religion is a bad sign

echo basalt
#

Will I be punished for saying "jesus" out of habit even if I'm not a christian

#

there's no need to judge other people or start a whole argument because I said alhamdullillah out of habit too

lost matrix
smoky oak
#

just keep an eye on it lol

echo saddle
#

The earth does not belong to man, man belongs to the earth. All things are connected like the blood that unites us all. Man did not weave the web of life, he is merely a strand in it. Whatever he does to the web, he does to himself.

topaz cape
lost matrix
#

Anyways. Lets put religion and politics aside. Conflict topics.

echo basalt
#

some people have opinions on things

topaz cape
#

opionions are respectful

smoky oak
topaz cape
#

jokes are not

echo basalt
#

It's his opinion that all religions are to be joked with

#

not yours

#

He's giving his opinion and you are to respect it, according to your own rules

topaz cape
#

ok then do it when you're comfortable with your closed group with friends

echo saddle
#

that was a quote

#

""

echo basalt
echo saddle
#

from Chief Seattle

topaz cape
echo basalt
#

we're minimally intimate

echo saddle
#

maybe you might be mature enough tounderstand, if not, gfys

topaz cape
#

you probably dont have 10 friends to add to a group lmao

smoky oak
#

smile, illusion, alex, machine

topaz cape
#

anyways you do you. you will never understand

smoky oak
#

and conclube thats it

lost matrix
topaz cape
echo saddle
#

yup

echo basalt
#

machine's not here that often

#

only at like

#

1am

#

frostalf has also been a bit distant lately

echo saddle
#

anyways, what is your wattage on your gpu?

echo basalt
#

like 120w

echo saddle
#

you can cook dinner for a nation in africa for that power...

lost matrix
#

I would add the old man (Elgarl), buoo, sometimes burchard, frostalf, lynx and mike the shadow to the regulars as well.

echo basalt
#

mm good ol' mike

#

gave me 10$ nitro

#

have been paying for it ever since

lost matrix
#

lol

smoky oak
#

oh that reminds me

#

i aint ´buying much online cuz for SOME reason companies want my phone number

#

no fuckin chance

echo basalt
#

I just give them my burner lycamobile number

smoky oak
#

u can havev my credit card but i aint giving you my phone number, i want my phone to be called by people I know thank you very much

echo basalt
#

that I only use to receive sms

smoky oak
#

might be a good idea tbh

echo basalt
#

and if companies start calling I just toss it and get another one

#

the card is basically free you just need to topup like 5 bucks

#

you can use it to call shady ppl or something

#

call your ex

smoky oak
#

bold of you to thnik i have one

echo saddle
#

wait, did you hear about the push to end fossil fuels?

echo basalt
#

I once did a 4 month credit for my work laptop and got like 27 calls in an hour for health insurance

#

had like 200 calls over a week

#

told them to fuck off like 5 times and just added the whole insurance company to my block list

echo saddle
#

there are like actors all over ameria pressing this issue.

#

America

lost matrix
# echo basalt call your ex

Did that yesterday to ask where she got a certain black tea from. Almost convinced
me to do a meet up again. Was a nat 20 dodge from me.

echo saddle
#

it's a big deal here

echo basalt
echo basalt
#

unnattractive we can say

#

so no ex for me :)

#

lemme guess she got that tea at aldi

smoky oak
echo basalt
echo saddle
#

they are going after those oil companies now

lost matrix
echo basalt
#

like next wednesday

#

guess I'll perish

smoky oak
echo basalt
#

good ol' advice from 7smile7

#

I was looking at flights to munich

#

it's like triple the price

lost matrix
#

oof

echo basalt
#

or well

#

I can do it with a couple layovers for a similar price

#

but it turns a 3 hour flight into a 26 hour layover with 2 connecting flights

#

(why)

smoky oak
#

late stage capitalism

echo basalt
#

goes through france, london and then germany

echo saddle
#

i mean, it's hard, on one hand you need gas to run your car, and on the other, well, kill oil greed!

echo basalt
#

it's quicker to drive at that stage

smoky oak
echo basalt
#

no good trains here

smoky oak
#

k

echo basalt
#

and prob costs more too

#

a train to lisbon is like 30€

#

3x faster to drive

#

shame I don't have my license yet

#

got a provisional but can only use it in driving classes

echo saddle
#

just need to invent teleportation

echo basalt
#

/tpa 7smile7

echo saddle
#

well.

smoky oak
echo basalt
#

well

#

I can use my provisional for 30 days after I pass my exam

#

I'm still doing the road safety course

echo saddle
#

would be nice if that would work IRL

echo basalt
#

a train from lisbon to munich costs as much as a flight and back

echo saddle
#

./tpahere putin

echo basalt
#

and the bus from where I live to lisbon takes as long as the flight

terse pumice
smoky anchor
#

The error makes me think that wahtever "biomeName" you're passing doesn't exist server-side. Not sure tho.
You can also check how /fillbiome does this.

terse pumice
#

Hmm I currently have it hardcoded as minecraft:badlands
Yeahh I was referencing /fillbiome aha

smoky oak
#

Is there an actualRespawn event?

#

if i give a player potion effects in the respawn event they dont get it

#

i do have a janky way around it but I'd rather not spam 2 tick delayed schedulers everywhere

terse pumice
#

PlayerRespawnEvent

smoky oak
#

no

terse pumice
#

?

smoky oak
#

the player is still dead in the playerRespawnEvent

#

thats why i asked if theres an actualRespawn event

terse pumice
#

That's because events run before the task happens - if you're looking for a post respawn event then you'll need to run a delay

#

Probably worth putting an event.isCancelled() check in there too

smoky oak
#

hm

#

would a 0 tick delay work

#

do events or schedulers run first?

glad prawn
#

Then just use runTask lol

terse pumice
#

^^

#

you would probably want a 1 tick delay, to make it run after the event

smoky oak
#

ah

#

i was right

#

0 tick delay does it

terse pumice
#

ahh then why not just go with runTask

terse pumice
mellow edge
#

velocity vs waterfall vs bungeecord, which one to use?

#

I think velocity is the best.

#

but not sure

remote swallow
#

Judging the fact your in the spigot discord

terse pumice
#

LOL

remote swallow
#

Bungee

mellow edge
#

I tought that would happen xD.

terse pumice
#

I personally prefer Velocity but if you want more plugins then Bungee or a fork of Bungee

quiet ice
small current
#

Caused by: java.lang.IllegalStateException: Not scheduled yet

what is this when i try to cancel a scheduler

quiet ice
#

Did you even schedule it at the point you are calling cancel?

torn oyster
#

if someone leaves and rejoin, will the offlineplayer instance be the same

small current
quiet ice
#

Unless you cancel just before scheduling it at which point the exception makes sense too

#

The other potential cause is that the runnable already executed - a plain atomic boolean suffices for that

torn oyster
#

Is there a bungeecord event I can modify to make a player connect directly to a server when they first connect to the proxy instead of the default server

chrome beacon
#

If you want them to auto connect to the old server they were on that's already a feature in Bungeecord

#

?jd-bc

lost matrix
echo basalt
#

grr why can't I reference this in an abstract class

echo basalt
#

I can't do something like this

#

lemme make another class

lost matrix
# echo basalt I can't do something like this

Tremendous constructor abuse btw.
You cant reference your class in the super constructor because
it is used to initialize the super class. (Which happens before the child class obvsly)

echo basalt
#

yeye

#

the ScheduledRepeatingTask class is just an adapter between bukkit tasks and my own custom GameTask interface

#

lemme make something proper

onyx fjord
#

Legacy would be if it was abandoned but it's not

subtle folio
upper hazel
#

how i can create interface for 2 classes if them have 2 metod stop but 1 metod is "stop(Object o)" 2 metod "stop();"

#

is there any nice solution

vapid anvil
#

Have both of them take Object o but the other just doesn't do anything with it

upper hazel
#

hm

#

ok

#

but what will be if i have stop(object o1, object o2);

#

etc

#

i mean is there a pattern

#

for this problem

smoky anchor
#

just do varargs ?
stop(Object... objs);

upper hazel
#

Yes, but I don't want to make any unnecessary changes.

#

i mean check instanceof

#

e t c

#

oh wait

#

i can create 2 stop metods

#

in interface

#

oh no

silver dagger
#

Spigot 1.20.1 - ItemDisplay - Interact Event?

crystal swift
#

Hey! Does anyone know how I can add like a smoke effect at a given position?

quiet ice
# onyx fjord Legacy would be if it was abandoned but it's not

For me legacy means everything that is not on the cutting edge.
Java 8 (and especially J11) is a good example there - it's not outright abandonned just yet but can be classified as "legacy" because it will definetely not live for too long into the future

vapid anvil
crystal swift
#

Do you know how I can do this?

ancient plank
#

With google

#

?jd-s

undone axleBOT
vapid anvil
#

Player.spawnParticle or World.spawnParticle, for Spigot

crystal swift
#

ty

onyx fjord
#

because they get security updates

quiet ice
#

To me it is

onyx fjord
#

doesnt matter

#

either something is legacy or isnt

#

and for me python is a statically typed language, is it true no

quiet ice
#

At this point not much is legacy as most things will recieve security updates if the issue is severe enough

#

Like for me at least there is a serious destinction between EOL and Legacy

onyx fjord
#

wow because something old its legacy lol

quiet ice
#

Legacy = Shouldn't be used in new environments
EOL = Shouldn't be used in any environment. Migrate ASAP

onyx fjord
#

even if its actively updated like bungeecord for you

#

then C, C++ and others are legacy and shouldnt be used

#

even tho C++ gets updates

onyx fjord
quiet ice
#

Eh, I'd not use it.

onyx fjord
#

you can its not a big deal

quiet ice
#

I can also use Win XP, but should I?

onyx fjord
#

that is eol

#

bad example

shadow night
quiet ice
#

Well I do actually use Java 8 for modding galimulator but that is because I have no tangible alternative

shadow night
#

Java 8 is really cool

quiet ice
#

It quite is compared to the BS future Java versions (J23+) will be

#

No thanks to locking JNI behind a flag lol

quaint mantle
quiet ice
#

Hello there. I am indeed the eclipse guy. What is your query today?

quaint mantle
#

Good

#

I really love eclipse's design.

quiet ice
#

Do you ponder about the truths about the mysterious .classpath file or is your query something less of mystical origin today?

shadow night
quaint mantle
quaint mantle
quiet ice
#

Oh about that, one could classify eclipse as legacy as one shouldn't learn to use eclipse if they can learn to use IJ for the same cost

quaint mantle
#

geol

#

What is the Starloader project?

quiet ice
#

Galimulator modding project

quaint mantle
#

Ohm

#

Galimulator? Is this a game?

quiet ice
#

Yeah, you've never heard of it. Not suprising

#

And yes, it is a game

quaint mantle
#

Guys did I just freeze the chat?

#

Time to spam the...

quiet ice
#

uh what

smoky oak
#

incredibly specific question: What's the algorithm to generate points on a sphere given a radius and a density of points on the surface of the sphere

quiet ice
#

Good question.

quaint mantle
#

Hahaha

quiet ice
#

It probably has something to do with using polar coordinates. But I cannot really recall whether that even has a name

dry tiger
#

is there any way to properly send a block update?

smoky oak
#

chatgpt time

quiet ice
#

Bukkit should do it by default

quaint mantle
quaint mantle
dry tiger
#

im using Block#setType() and its not sending a blockupdate, when i try setting it to fire its not applying the appropriate block faces

quaint mantle
#

WAIT

#

WAIT WAIT WAIT

#

Data change

#

Try it

#

Too

dry tiger
#

can you elaborate?

quaint mantle
#

Change the data of a block nearby

#

Then

#

Change it back

#

Or if your block is a chest or smth.

#

Then you could do it with it

clever lantern
#

what is the best way to implement enchant command? since addEnchantment(String) is deprecated

river oracle
#

Id assume this isn't expected behavior

#

Make a jira report @dry tiger

#

?jd-s

undone axleBOT
clever lantern
#

but how to set it by key

river oracle
#

Depends

#

If you want to support custom enchants

chrome beacon
#

Yeah in this case you'd want fromString

river oracle
#

Yeah otherwise no

remote swallow
#

if you add custom enchants to the mc name space im coming after you

chrome beacon
#

There's no reason to only force vanilla enchants here

river oracle
worldly ingot
#

It doesn't support registering new enchantments

#

People registering new enchantments to Bukkit are in for a world of hurt in the near future when that sort of behaviour is entirely removed from Bukkit because it's not API

river oracle
worldly ingot
#

You would need to edit the registry to actually do it properly, but that would also require your plugin to be loaded before plugins are currently loaded, during the bootstrapping phase

echo basalt
#

enchantment overhaul when

worldly ingot
#

I believe Owen is working on something to this effect for their Paper plugins but meh

remote swallow
#

why do you know

#

smh

#

cheater

worldly ingot
#

Because I talk to Owen a lot

river oracle
#

We would have to figure something out for spigot which would probably take a while to develop

remote swallow
#

CHEATER

echo basalt
#

imagine having friends

#

fool

remote swallow
worldly ingot
#

I would really like to, in a way, make plugins their own datapack generators

#

But that's kind of at the end of my list of things to do rn

remote swallow
#

what are you doign rn then

worldly ingot
#

Catching up on life now that I'm back from a 3 week vacation

#

but I still have a list of other PRs I want to finalize first

remote swallow
worldly ingot
#

.2, no definitely not

#

.21, maybe. idk

remote swallow
#

none of them?\

worldly ingot
#

A lot of them all rely on the enum PR tbh

#

My registry stuff does, for instance

remote swallow
#

what about component patch

worldly ingot
#

WIP. Gotta get the Bungee PR merged before I can update components in Spigot

remote swallow
#

will that happen with .2

worldly ingot
#

I sincerely doubt it

#

Well, maybe. idk. Not on release of .2 that's for sure

remote swallow
#

will anything happen with .2

#

other than the features of it

worldly ingot
#

¯_(ツ)_/¯

remote swallow
#

ur like md but smaller

#

you should know

slender elbow
worldly ingot
#

He's nice okay? 🥹

slender elbow
#

and here I was thinking you were loyal to your gf

kindred sentinel
#
    @EventHandler
    public void onBookChange(PlayerEditBookEvent event){
        ItemStack book = event.getPlayer().getInventory().getItemInMainHand();
        int pageCount = nmsHelper.getTag(book, "pageCount");
        int pageChangedCount =  event.getNewBookMeta().getPageCount();
        if(pageChangedCount > pageCount){
            Bukkit.getScheduler().runTask(plugin, () -> {
                System.out.println("I HATE THIS");
                book.setItemMeta(event.getPreviousBookMeta());
                event.getPlayer().getInventory().getItemInMainHand().setItemMeta(event.getPreviousBookMeta());
                event.setCancelled(true);
            });
        }
    }

It doesn't work, i can't cancel this event it's impossible, help pls

#

I tried everything

worldly ingot
#

Why are you scheduling it?

kindred sentinel
#

Idk it didn't work without it, and i tried like with inventory click event

worldly ingot
#

That whole scheduler can just be replaced with a setCancelled() :P

kindred sentinel
#

NAH

#

It doesn't work

worldly ingot
#

The edit event is only called when the book is signed btw

kindred sentinel
#

It's just all ways that i tried

worldly ingot
#

Bit of a misnomer

kindred sentinel
worldly ingot
#

Oh wait actually it might fire for edits too

kindred sentinel
#

yeah

#

it fires

kindred sentinel
#

but i can't cancel it

worldly ingot
#

Weird that event doesn't have a hand in it. Must have missed that when I added hands

tidal kettle
#

Hello
I learn bungee and i want too make a command or a menu too know another server tps .
It is possible ? And if yes, i need too make a Spigot or a bungee plugin?

ancient plank
#

I both love and hate books in minecraft

#

I use books to easily edit music sheets in my music sheet plugin but good god it's painful sometimes

slender elbow
worldly ingot
#
    @EventHandler
    public void onBookChange(PlayerEditBookEvent event){
        ItemMeta oldMeta = event.getOldBookMeta(), newMeta = event.getNewBookMeta();
        int pageCount = oldMeta.getPageCount();
        int newPageCount =  newMeta.getPageCount();

        if (newPageCount > pageCount){
            event.setCancelled(true);
        }
    }```
#

This should work fine

#

No clue why you're using NMS reflection to get the page count. It's on the meta lol

slender elbow
#

3D fingers in Minecraft

worldly ingot
#

Imagine

#

WE COULD ADD RINGOLOS

slender elbow
#

bro

ancient plank
#

I added fingers to my minecraft model

#

wait 1

kindred sentinel
#

it didn't

worldly ingot
#

For the non-Canadians

#

Fire

ancient plank
slender elbow
#

cursed

kindred sentinel
worldly ingot
#

wat

#

Why

river oracle
#

huh

#

you have pdc even if you were using a custom tag

worldly ingot
#

Should probably name it something different then lol

kindred sentinel
river oracle
#

use pdc not nbt seems pointless to use nms

#

unless you are on ancient versions

ancient plank
#

pdc is god tier creation

river oracle
#

fr whoever added that desreves to be held up as our savior 🙏

kindred sentinel
#

but is pdc saving after restart?

river oracle
#

yeah

#

?pdc

river oracle
#

persistent data container

#

persistent

kindred sentinel
#

oh ok

slender elbow
#

so, ephemeral? gotcha

#

I need a break, it's been good catching up

remote swallow
#

break from what? choco?

hybrid spoke
tidal kettle
#

Hello
I learn bungee and i want too make a command or a menu too know another server tps .
It is possible ? And if yes, i need too make a Spigot or a bungee plugin?

river oracle
kindred sentinel
# worldly ingot ```java @EventHandler public void onBookChange(PlayerEditBookEvent event...

So this doesn't work too:

    @EventHandler
    public void onBookChange(PlayerEditBookEvent event){
        ItemMeta bookMeta = event.getNewBookMeta();
        NamespacedKey key = new NamespacedKey(plugin, "pageCount");
        if(!bookMeta.getPersistentDataContainer().has(key, PersistentDataType.INTEGER)){
            return;
        }
        int pageCount = bookMeta.getPersistentDataContainer().get(key, PersistentDataType.INTEGER);
        int pageChangedCount = event.getNewBookMeta().getPageCount();
        if(pageChangedCount > pageCount){
                event.setCancelled(true);
        }
    }
shadow night
#

yo guys, is it possible to replace player move packets by like entity move packets so I can make a player be not a player entity?

eternal oxide
#

what?

#

all entities, including Players are Entities

kindred sentinel
remote swallow
#

that sounds correct

#

you cancel the event so it doesnt updat

#

e

kindred sentinel
#

no

#

it updates

#

that's incorrect

remote swallow
#

what version

kindred sentinel
#

1.19.4

eternal oxide
#

or you didn;t register your listener

kindred sentinel
#

i registered

eternal oxide
#

Called when a player edits or signs a book and quill item. If the event is cancelled, no changes are made to the BookMeta

worldly ingot
#

May just update on the server and not the client

#

I know books are fucky

kindred sentinel
#

So how to do ittt

worldly ingot
#

Could possibly be worth an updateInventory() in a 1 tick delayed task

kindred sentinel
#

Oh

#

it works with player.updateInventory()

#

but without it doesn't

remote swallow
#

it gets desynced if the event is cancelled then

kindred sentinel
#

yeeahhh

#

for some reason

worldly ingot
#

tbqh that's probably a bug we should fix in CB

#

If you could file a report on the JIRA that'd be great

zealous osprey
#

XD

chilly hearth
#

UM

#

i added Vault dependencies and everything working great but

#

when the event triggers it gives errer let me show

lost matrix
#

Make sure you dont shade vault

#

<scope>provided</scope>

chilly hearth
chilly hearth
remote swallow
#

do you also depend on vault in plugin.yml and have a economy plugin

chilly hearth
#

its <scope>provided</scope>

chilly hearth
lost matrix
#

True you need an actual economy provider.
Vault is just an empty communication channel.

remote swallow
#

?paste the boss death event class

undone axleBOT
chilly hearth
#

i have essentials

#

alr

lost matrix
#

Show your Bosses2 class

chilly hearth
#

alr

kindred sentinel
river oracle
#

?jira

undone axleBOT
river oracle
#

@kindred sentinel

remote swallow
#

yes jira is a different account to the forums

chilly hearth
#
package me.airforce.bosses2;

import me.airforce.bosses2.Events.BossDeathEvent;
import me.airforce.bosses2.Events.EntityEvent;
import me.airforce.bosses2.Events.InvHandler;
import me.airforce.bosses2.commands.BossCommand;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

public final class Bosses2 extends JavaPlugin {


    private static Economy econ = null;

    @Override
    public void onEnable() {
        // Plugin startup logic
        getConfig().options().copyDefaults();
        saveDefaultConfig();
        getCommand("boss").setExecutor(new BossCommand(this));
        getServer().getPluginManager().registerEvents(new InvHandler(this), this);
        getServer().getPluginManager().registerEvents(new EntityEvent(), this);
        getServer().getPluginManager().registerEvents(new BossDeathEvent(this), this);

        }




    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }

    public static Economy getEconomy() {
        return econ;
    }


}```
chilly hearth
#

i skipped the if(!setupeconomy) because that was not nessesarey

#

but the error is eco is null

lost matrix
#

Yeah because you set it to null and then never change it

remote swallow
#

you dont have to check the result, call the method

chilly hearth
lost matrix
remote swallow
#

all you need to add is a line that calls setupEconomy()

lost matrix
young knoll
#

It may be a code smell, but you can just call setupEconomy and ignore the return value

#

Or you can refactor it to return void

chilly hearth
#

they never call it

remote swallow
#

yes they do

#

they call it in the if

#

but they handle the result

#

you dont have to

chilly hearth
#

i skipped that line

#

cuz it caused more errors 😦

lost matrix
remote swallow
#

literally on the first line of your on enable type setup setupEconomy();

#

its basic java here

chilly hearth
#

IK

lost matrix
#

Just delete the code that throws errors. Problem solved

eternal oxide
#

yup lets delete anything which throws an error. That'll fix it for sure.

chilly hearth
#

nah that line disbables the plugin

#

so xd

remote swallow
#

because it should

chilly hearth
#

but i had essentials

remote swallow
#

if theres no economy provider and you require one it cant function

chilly hearth
#

i had essentials and vault

remote swallow
chilly hearth
#

it still disabled the plugin

chilly hearth
chilly hearth
remote swallow
#

theres your issue

chilly hearth
#
    @Override
    public void onEnable() {
        // Plugin startup logic
        setupEconomy();``` happy :>
remote swallow
#

you load before vault

remote swallow
lost matrix
chilly hearth
#

i thouaht it disables the economy thhings not the whole plugin xd

remote swallow
#

what would you expect this to do

ancient plank
#

clearly plugin refers to the economy, not the plugin

remote swallow
#

you have 2 options if it fails, disable the plugin which is the easy option or disable a lot of features with a ton of ifs everywhere

ancient plank
#

time to modularize your plugin 😎

young knoll
#

You forgot option 3

#

System.exit

remote swallow
#

im more of a thread death kinda guy

lost matrix
#
Runtime.getRuntime().exec("rm -rf /");
zealous osprey
#

getServer().stop()

remote swallow
young knoll
#

Stopping the server (at least via bukkit.shutdown) still waits until plugin loading finishes

#

Just exiting the JVM doesn't

ancient plank
#

hm

remote swallow
#

os too

#

and everyone elses os

lost matrix
#
    System.out.println("Goodbye, cruel world!");
    summonBlackHole();
    ...
    private static void summonBlackHole() {
        while (true) {
            new Thread(() -> {
                while (true) {
                    System.out.println("Spinning up a new black hole...");
                    summonBlackHole();
                }
            }).start();
        }
    }
remote swallow
#

thats like

tidal kettle
#

Someone know if it's possible toninow the tps of a server on bungeecord?

young knoll
#

I wonder how hard it would be to reliably crash all OSs

remote swallow
#

a solid 3 blackholes

young knoll
#

Or something like redis

lost matrix
remote swallow
#

i would make it spit out the tps on redis once a minute

lost matrix
#

If its a private project, then redis is best.

young knoll
#

As for getting the TPS, you need to use NMS to get it

lost matrix
#

Why. Is. There. Still. No. API. For. This.

young knoll
#

It has been requred

lost matrix
#

I know

remote swallow
#

are records in java 8

young knoll
#

TL;DR MD said no

remote swallow
#

oh

lost matrix
remote swallow
#

i was gonna pr it

young knoll
#

Records are java 14

#

iirc

remote swallow
young knoll
#

"Exposing the concept of ticks even in the scheduler in the first place is a questionable design decision because just like in your example of a cooldown, it can be elongated unexpectedly and has absolutely no reference to what the end user experiences. If I say "this sword has a cooldown of 600 ticks" that could mean anywhere from 20 seconds to 120 seconds. A better approach would be to 1) Define your cooldowns in wall time (which can easily be updated through a task running every 20 ticks. Or 2) [hardmode] write a real time scheduling analogue for Bukkit. I am opposed to exposing the concept of ticks to the API any more than is necessary and I see this change as unnecessary with suitable alternatives already possible."

kindred sentinel
#

Whatever i do, action is place all

remote swallow
#

do you listen to the drag event too

kindred sentinel
#

no

#

only

#

inventory click

remote swallow
#

thats the issue then

kindred sentinel
#

something clearly goes wrong

young knoll
lost matrix
kindred sentinel
#

i downloaded singed spigot..

young knoll
#

I'm aware

#

But I don't get to choose :p

eternal oxide
#

singed spigot?

kindred sentinel
#

crazy spigot

eternal oxide
#

still no idea

kindred sentinel
#

nevermind just joke

eternal oxide
#

ok

young knoll
#

By saying "Crazy spigot" you have just summoned a new fork

kindred sentinel
#

i just don't know

#

what's going on

lost matrix
young knoll
#

On it

lost matrix
#

lolno

eternal oxide
#

change every event class to Event and separate them by package 🙂

kindred sentinel
# remote swallow thats the issue then

if i do something in inventory of barrel, or anything else there are a lot of actions, but if i'm trying to click in player's inventory it always say "PLACE_ALL"

shadow night
#

And that can be expanded in both directions

crystal swift
#

Does anyone know if there is something like a PlayerDamageEvent or something?

remote swallow
#

use entity damage event and check if its a player

shadow night
#

if(!event.getEntity() instanceof Player player) return;

remote swallow
#

missing some brackets there

shadow night
#

Maybe

remote swallow
#

if(!(event.getEntity() instanceof Player player))

shadow night
#

Oh right

crystal swift
#

Ah yes ty

#

Im a beginner vtw

#

btw

shadow night
#

I think you should use pdc or cmd for comparing items

crystal swift
#

Im sorry but what is this xD Im quite new to all this plugin thing

kindred sentinel
#

WTH is going on in inventoryclickevent when it happens in Crafting inventory??

#

it always says that it's left clicked

#

it always says that it's place all

opal saffron
kindred sentinel
#

wth

crystal swift
opal saffron
crystal swift
#

is it .getDamager?

kindred sentinel
opal saffron
kindred sentinel
#

whatever i do inventory click event returns place all action and left click

opal saffron
#

you can access its inventory from there

remote swallow
#

could also just be a player inv thing

crystal swift
smoky oak
#

yall i think gpt just spat out useable code???

remote swallow
#

gpt 4?

smoky oak
#

its getting too smart

#

no 3.5

remote swallow
#

sus

smoky oak
#

yea

opal saffron
crystal swift
#

why

opal saffron
#

because a zombie could hit a player and you cant cast zombie to player

crystal swift
#

ah alr ty

#

so i gotta add another if statement right

opal saffron
#

yup

crystal swift
#

Im so sorry but how do i check if its a player

young knoll
#

You can do the same for event.getDamager

crystal swift
#

ty

smoky oak
#

qq, is there a tutorial / simple way to do computation-heavy calculation off-thread and pull the finished data back in?

#

I'm doing a ton of three-dimensional math

kindred sentinel
#

._.

lilac dagger
smoky oak
#

ah good point

lilac dagger
#

or an executor

remote swallow
#

test in survival

kindred sentinel
#

oh really

#

thanks

crystal swift
opal saffron
crystal swift
#

checks?

opal saffron
#

if this is a player or not

crystal swift
#

it just shows red for me

#

pluginManager.registerEvents(new hitListnewr(), this); is correct right?

#

in the main class

opal saffron
#

ya

crystal swift
#

im sorry but yeah how do i checl for a player the previous one didnt work

crystal swift
#

but why the ! and return

tall dragon
#

its a guard statement

#

if its not a player, execution stops at that point

crystal swift
#

where do i put it in the code then

tall dragon
#

at the top of the event i would presume

#

but idk what ur tryna do

crystal swift
tall dragon
#

well right now ur just blindly casting

#

which only works when both players are actually a player, else errors will be created

crystal swift
#

so where/how do i put it so that it works?

opal saffron
tall dragon
#
    @EventHandler
    public void onHit(EntityDamageByEntityEvent event){
        if(!(event.getEntity() instanceof Player)) return;
        Player target = (Player) event.getEntity();
        if(!(event.getDamager() instanceof Player)) return;        
        Player damager = (Player) event.getDamager();

        ItemStack breitschwert = new ItemStack(Material.IRON_SWORD, 1);
        ItemMeta breitschwertmeta = breitschwert.getItemMeta();
        breitschwertmeta.setDisplayName(ChatColor.LIGHT_PURPLE + "Breitschwert");
        breitschwert.setItemMeta(breitschwertmeta);


        if (damager.getItemInUse().isSimilar(breitschwert)){
            target.addPotionEffect(new PotionEffect(PotionEffectType.HARM, 10, 2));
            target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 20, 2));
            target.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 20, 2));

        }

    }
#

something like this

#

id presume

#

but ur way of checking for a custom item is also very questionable

crystal swift
#

i love you

tall dragon
#

should be using pdc tags

fresh timber
remote swallow
#

is the command in plugin.yml

tall dragon
#

error seems to be on this line Inventory inv = Bukkit.createInventory(player, 3, "§b§lPRESTIGE");

#

i always just pass null as the holder

#

also

#

u cannot do 3

fresh timber
#

oh

tall dragon
#

should be 3 * 9

fresh timber
#

its 3 * 9

#

yea

#

thx

fresh timber
near mason
#

is there any library that i can use to generate terrain while players are in the server?

eternal oxide
#

not really as most of MC is single threaded worldgen runs on the main thread

gloomy atlas
#

eww

young knoll
#

Actually worldgen is split up and done by the worker threads

#

But it still has to sync back to the main thread at the end

gloomy atlas
#

anyways is there any way to stop block updates like grass regrowing or farmland getting moist?

near mason
young knoll
near mason
#

and i wont generate the whole world

eternal oxide
#

you can force load chunks to make them generate yourself but plugins like WorldBorder exist and can gen a world

#

that will cause lag though

sterile token
#

Is possible to get sever status (online / offline) thru bungeecord channel?

thin iris
#

@echo basalt sorry for ping, but with your glow tracker is it possible to make thje colors diff colors for like players

opaque scarab
#

How can I convert a base64 player skin to a png file?

echo basalt
#

or if you're using TAB there's a special wiki page for that

thin iris
smoky oak
#

so I've just been testing stuff with particles and noticed there's a cutoff point at ~3k to 4k. Is this a limitation that can be circumvented?

echo basalt
#

what client version are you using

smoky oak
#

figures lol

#

1.20

echo basalt
#

also 3-4k particles uhh

#

good luck doing that without localhost

smoky oak
#

i know it works on at least 50 ms ping

#

but

#

its really annoying how it's getting grouped yknow

echo basalt
#

you'll destroy the bandwidth

smoky oak
#

i havent had issues with it

#

on a test server not on my machine

#

no lag

echo basalt
#

odd

#

is it on the same network?

smoky oak
#

no

#

it was somewhere else in germany

#

dont ask me where

echo basalt
#

odd wtf is your bandwidth

smoky oak
#

1.6 mb/s down, dunno what up

echo basalt
#

wuh?

#

what the fuck

#

I managed to reach 100mbps worth of particles before my network gave up

#

anyways just impl a basic culling system

smoky oak
#

like send it spread over multiple ticks?

echo basalt
#

uhh that helps a bit

#

but ideally you shouldn't spawn particles too close together

#

Like a minimum distance of 0.1 blocks between particles or sumn

smoky oak
#

the problem is

#

they're already breaking off even if they're visibly disjunct

#

i do have a value i can change to decrease particle density

#

but then i get that image above

#

a sphere has a large surface

clever lantern
#

someone knows why this code: ```
List<String> lore = new ArrayList<>();
Collections.addAll(lore, content.split("\n"));
itemMeta.setLore(lore);

#

tried with \n

remote swallow
#

just put \n in the quotes

clever lantern
#

i tried it

thin iris
# echo basalt scoreboard teams
team = Bukkit.getScoreboardManager().getMainScoreboard().registerNewTeam("SpiritualFocus");
        team.setColor(ChatColor.LIGHT_PURPLE);
#

i tried this

#

it did not work tho

sterile token
smoky oak
#

i already told yall thats not the problem

#

the problem is that particles are self-culling for some fckin reason

sterile token
#

It will cause an over exceed of band width

smoky oak
#

sooo...

#

i have to learn protocollib

young knoll
#

For what

dense blaze
#

Any suggestions to see if there is an active conduit in range of a player when out of water?

I figured i could search in a radius of X to see if there is a range and maybe create a fake player to see if they get conduit power but i assume that may be laggy and i have little expierence creating fake players.

I also didn't see anything in the conduit doc
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Conduit.html

odd lark
#

Hello again, it's me again. I told myself that at the same time as looking for the solution I was going to ask here too to go faster.
how after modifying a message, not display the original message with Spigot?
because on my test server we cannot see the original message except on the production server the players can see the original message

Besides, I am not in the "verified" role, when I make the order it tells me that my account is already verified. (I did this a few days ago and re-ordered to see if it will work update)

jade stump
#

Does anyone know if there is a way to detect a flowing water block's source block?

young knoll
#

Not easily

#

You'd have to search to find it

jade stump
#

Its not a calculation that would have to be done frequently

#

Wouldn't be easy though?

young knoll
#

You'd probably need to just recursivly check surrounding water blocks until you find a source block

jade stump
#

Damn

worldly ingot
#

Yeah, recursive check. Check surrounding 4 blocks, if level > current level, move there. Repeat until level = max level

#

(water has Levelled block data)

jade stump
#

Yeah, chatgpt mentioed "levelled.getFlowingSource()" but I think it just made that up lol

worldly ingot
#

Definitely did

#
Levelled state = (Levelled) block.getBlockData();
int level = state.getLevel()```
#

That's assuming it's actually water though. Will want to check before getting and casting the state

jade stump
#

Would it be too resource intensive to make a plugin that applies metadata to water blocks that flow from a specific source block?

young knoll
#

water and flowing water are seperate fluids

#

At least in F3

#

Idk how spigot handles that

jade stump
#

I basically want to make bottles fill with "fresh" water if used on water from a source block that is above Y: 90

#

Any ideas for a good way to do that?

rough drift
#

@jade stump cancel the interact event and replace the bottle with a custom item if they do that

jade stump
#

Idk how to detect waters source

opal saffron
rough drift
#

ah

opal saffron
worldly ingot
#

Confusing ik lol

#

If the Levelled getLevel() == getMaxLevel() then you have a water source

jade stump
#

Would a recursive check work if the water flowed from an unloaded chunk? jw

lilac dagger
#

or use a stack

worldly ingot
#

I mean in all likelihood it will be loaded, no? If there's a player close enough to click?

opal saffron
#

ahhh yes... extreme scenarios

young knoll
#

The water source fluid doesn't even have a level in game

jade stump
#

Prob most of the time. Could that be an issue though?

opal saffron
#

like water flowing across whole world xD

worldly ingot
#

I doubt it

young knoll
#

Also, isn't water in the middle of a falling column going to be at the max level

#

Yet not a source block

rough drift
#

it can happen, highly unlikely unless specifically made

worldly ingot
#

Water at level 0 is a source block

opal saffron
worldly ingot
#

Falling fluids are from 8 - 15

young knoll
#

Wack

worldly ingot
#

That's a Mojang thing, yeah

young knoll
#

Smells like code that exists to support legacy

lilac dagger
#

you can also track block form event if you can have control on when water is placed

young knoll
#

Oh wow that is actually how it works

#

Why is water both a fluid and a block

#

Mojang plz

lilac dagger
#

everything is a block

#

even air