#help-development

1 messages · Page 1149 of 1

noble flume
#

Or do you have to do it through the json

drowsy helm
#

uuh not sure how to do in blockbench but yeah you can just manually do it in the json

#

im sure theres a button somewehre in blockbench for it

noble flume
#

Gotcha

#

Aight thnx

noble flume
#

I’m trying to display items as particles

#

And swapping out the custom model data to simulate animations

#

Is there a better way to do this

#

They’re custom particles of course

zealous moat
#

Please let me know if you have time.

worthy yarrow
zealous moat
worthy yarrow
#

mhm

#

iirc it's attackspeed?

#

Actually I think that just modifies pvp stuff

#

I don't actually remember how it's done

#

And I don't think there is an attribute that modifies break speed now that i am looking through the docs

zealous moat
#

I want to do this instead of attack speed (what is on now is enchantment).

zealous moat
worthy yarrow
#

I looked, but this seems internal, I swore there was api for this stuff now

#

better api

#

Ah the uh

#

Just add some sort of pdc element to the tool and check whenever they interact with it, if it's breaking a block & your tool, then modify the players break speed

pliant topaz
#

ah nvm, misread the rest of your msg, sorry 🥲

zealous moat
#

I've made it this far, but it won't register.

pliant topaz
#

if OP wants to change it dynamically while breaking blocks, updating it on block interact can be a bit weird as it tends to stop and start again because on the clients side the speed is changed after breaking afaik, atleast thats what i experienced so I now update it on every movevent when either position or facing direction change combined with a work distro system and a very optimized calculation, even though there wasnt much to optimize for me

pliant topaz
zealous moat
#

So how do I set it up?

#

The NBT column looks like this

zealous moat
#

How do I register in this case?

quaint mantle
#

Rules empty because you didn't add anything to it?

#

Also idk why you implemented methods in your anonymous class because no one can access it later.

zealous moat
pliant topaz
#

just do ItemMeta#getTool

#

on that toolcomponent the methods should be self explanetory, if not use the docs, they explain it pretty well

#

and then ItemMeta#setTool to set ur new tool component with rules etc

zealous moat
#

I have set up the tool, but the list of rules is empty, so I would like to know how to register it in the list.

chrome beacon
#

You've added methods to it that you will never be able to use

#

Add things to the list instead

chrome beacon
#

Yeah that should work too

#

if you don't want to override all the rules

pliant topaz
#

yep

#

kinda dislike the api with that atm, its not really intuitive for most and the docs just explain the minimum of the minimum

#

but its still really nice to just have it

pliant topaz
chrome beacon
#

?contribute

chrome beacon
#

Should explain it

pliant topaz
#

oh, ty, ill look into it :)

zealous moat
chrome beacon
#

uh?

#

That doesn't make much sense

pliant topaz
zealous moat
chrome beacon
#

Just use addRule

quaint mantle
#

what can i do to like, optimize bukkit runnables? i use alot of em and cant literally use less , i already optimized it as much as possible but i have to, for example, update scoreboard every 2 ticks, and i'm making cosmetics that r done with bukkit runnables, for like sending particles and that

chrome beacon
#

Do you have a performance problem

quaint mantle
#

yep, im the only one in server and sometimes tps drops and ram usage goes to 16gb ☠️

#

and i'm currently solving that

chrome beacon
#

Did you tell Java to use 16GB

#

if so that's why it's using 16GB

quaint mantle
#

last time it happened was like a week ago and i could optimize it to just drop to 18 tps and go to 4 gb max

quaint mantle
chrome beacon
#

Don't be suprised when Java uses the ram you give it

quaint mantle
#

-Xmx16G -Xms10M -jar

chrome beacon
#

Get spark and run some timings

quaint mantle
chrome beacon
quaint mantle
#

it js doesn't run lol

quiet ice
#

chrome beacon
quiet ice
#

are we referring to the same spark here?

quaint mantle
#

it appears in red and when i try to like load it with plugman (i know it isn't secure, i don't use it)

chrome beacon
#

It's marked as supporting 1.21

#

Plugman 🔫

quaint mantle
quaint mantle
#

js used it for that

pliant topaz
quaint mantle
#

i know the risks

quiet ice
#

isn't 1.21.1 and 1.21 pretty much synonymous?

quaint mantle
pliant topaz
#

we talking major versions

chrome beacon
quaint mantle
#

it's obviously not the same if it doesn't run

chrome beacon
#

1.21.1 is very small

pliant topaz
#

paper has it in its 1.21.1 so it definitely does work on it

quiet ice
#

What is the error?

chrome beacon
#

Like 2 bug fixes

pliant topaz
#

yea

quaint mantle
#

last spark version

#

doesn't work

chrome beacon
#

Send the error

#

?paste

undone axleBOT
quaint mantle
#

wait i have to reboot

#

bro ☠️

#

i didn't know paper had it default

chrome beacon
#

...

quaint mantle
#

i feel like total dumb

quiet ice
#

let me guess … it didn't work because it was already loaded into mem?

quaint mantle
#

wdym?

chrome beacon
#

Paper has spark

quaint mantle
#

[FileProviderSource] The spark plugin will not be loaded as this server bundles the spark profiler.

chrome beacon
#

^^

#

You should really read the error messages

#

before complaining "it doesn't work"

quaint mantle
#

yeah ik

#

im sorry

quiet ice
#

95% of all issues with programming can be resolved via reading errors

pliant topaz
#

mostly yea

#

and then theres like this 0.1% occasion you run in where the resource itself has a bug

quaint mantle
#

i now js send link here?

pliant topaz
#

(which i sadly encountered once, took a month to be fixed 🥲 )

quaint mantle
#

is it allowed?

chrome beacon
#

is what allowed

#

?

quaint mantle
#

from spark

chrome beacon
#

if you want

quaint mantle
#

but i won't get punished or smth

#

?

chrome beacon
#

I recommend adding the ticks over 50 to only capture lagging ticks

#

and yes it's fine

quaint mantle
chrome beacon
#

it's a flag

quiet ice
#

You'll get the ?whereami people, but those are often safe to ignore

quaint mantle
#

?wherami

chrome beacon
#

?whereami

quaint mantle
#

?whereami

quaint mantle
#

bruh

quiet ice
#

as I said, often safe to ignore

quaint mantle
quiet ice
#

there are always other people looking the other way and as long as you don't piss off the staff team it's okay

chrome beacon
#

a spark flalg

#

flag*

#

read their docs

quaint mantle
#

tickmonitor?

chrome beacon
#

timing

quiet ice
#

that'd be a command or uh - subcommand

quaint mantle
#

argument

quiet ice
#

/spark profiler start --only-ticks-over <milliseconds> would be what is looked for

quaint mantle
#

wait what ☠️

#

my plugin consuming 230%?

#

when i did at first it didn't consume that much

chrome beacon
quaint mantle
#

yeah im gonna delete that and program it myself

chrome beacon
#

other than that it looks fine

quaint mantle
#

my plugin is skyblock core btw

chrome beacon
#

Wait don't get stats from lore

#

🔫

quaint mantle
#

wait what

chrome beacon
#

Use a PDC tag to store such data

quaint mantle
#

oh yeah, its js for life

#

im makin that

#

mana and defense is from pdc

#

damn bro it says everything there

#

yeah placeholderapi is the thing that is causing that lag

#

ill take a look at their code

#

of js extension

chrome beacon
#

Passing data from the JVM to the Nashorn engine and back

#

isn't exactly free

#

Not much you can do about that

quaint mantle
#

and that's from papi too?

chrome beacon
#

Nashorn is the JavaScript engine

quaint mantle
#

yeah js engine

#

yeah i wanna kill js extension creator rn

#

(not literally)

chrome beacon
#

why though

#

It's not their fault it's slow

quaint mantle
#

ik lol

#

im kiddin

#

but

#

why does

#

it

#

even

#

do it in server thread

tender shard
#

because that's where you call setPlcaeholders from

chrome beacon
#

because it needs to be sync for PAPI to work?

#

^^

#

You're not getting a completable future from set placeholders

quaint mantle
#

but i mean

#

im too lazy to look at their code

#

but

#

it looks like it doesn't use async for nashorn

chrome beacon
#

They can't

#

You would have to change your code

quaint mantle
#

oh damn i see now

chrome beacon
#

Otherwise the return value could be undefined

quaint mantle
#

okok

torn shuttle
#

I am losing it

#

somehow when I change a rotation to be negative the logic works for -90 and -270 but somehow it breaks 0 and 180

#

like how would changing it modify what a 0 or 180 rotation would be

#

it shouldn't matter if something rotates by -0 or -180 vs 0 and 180

quaint mantle
#

now it's flying

#

i can't believe it

zealous moat
fair rock
#

Can you use paste?

#

?paste

undone axleBOT
zealous moat
fair rock
#

Can you look into meta.getTool()

#

Im on smartphone im sorry

I know that ItemMeta is a copy. But i see you set the ItemMeta but if getTool would be the same you need setTool as well

chrome beacon
#

No Actually nvm you might be right

#

Make sure to modify tool before you set the item meta

zealous moat
#

I don't understand the argument after “settool”.

pseudo hazel
#

what argument?

#

the ToolComponent?

zealous moat
#

yes

pseudo hazel
#

thats the tool you get from getTool

#

that you can make changes to

#

and then set it with settool

zealous moat
#

Can I delete a rule added with addrule?

eternal oxide
#

yes

#

There is a search box on the javadocs

zealous moat
#

If possible, but what would an example sentence look like?

pseudo hazel
#

well

#

you would use removeRule

#

addRule returns the tool rule it has added

#

which can be used to remove it again

torn shuttle
#

finally

#

this thing was not cooperating

#

pro tip simpler is better

#

even a bit of added complexity makes this impossible to debug and fix

fair rock
#

Is that your infinite ... generator?

torn shuttle
#

it's starting to look like something

fair rock
#

How did you save, read and place the blocks?

WorldEdit would be cruel
So saving blocks like minecraft:stone and relative coordinates?

Im interested ^

#

I have send you a dm if ya want to accept it👀🤝

#

Friend request*

wet breach
#

its not that complex really

#

you can either use the API, use NMS, or alternative file methods

lilac dagger
#

infinite town generator?

#

that's so cool

pseudo hazel
#

looks like just an infinite structure generator

#

which is even better

lilac dagger
#

it's great

#

but you need better builders i think

pseudo hazel
#

lol

#

p sure the end product will be the generator, not the buildings xD

lilac dagger
#

oh definitely

#

still, makes me wonder how much work is to generate worlds

#

like how many buildings you have to make

wet breach
lilac dagger
#

but they'll still be the same

#

unless you can slice the buildings and make configurations of those

zealous moat
lilac dagger
#

like an inside generator

wet breach
#

Coll I think it was has made something like that

pseudo hazel
#

like idk what other information you would need

pseudo hazel
#

they already got sent that page

zealous moat
pseudo hazel
#

wdym required state

#

addrule returns a rule

#

thats the one you would remove

#

or maybe getrules and pick the one you wanna delete from it

zealous moat
#

If you want to delete all rules attached to a tool
tool.removeRule(tool.getRules.removeALL())
is correct?
If not, please give me an example.

young knoll
#

use setRules and an empty list

zealous moat
young knoll
#

setRules(new ArrayList())

#

Or setRules(Collections.emptyList());

pseudo hazel
#

List.of() my beloved

wet breach
#

seems someone needs to learn more java

fair rock
#

Who has the most terrifying way to create a list?

floral drum
#

Collections.synchronizedList(new CopyOnWriteArrayList<>());

pliant topaz
#

just

#

no

#

;-;

blazing ocean
#

Why are there cow lists 😭

floral drum
blazing ocean
#

java Arc when

winter jungle
#

Hey guys, im working in the 1.21 right now, and someone knows why this doesn't work anymore:

 meta = (SkullMeta) arrowRight.getItemMeta();

meta.setOwningPlayer(Bukkit.getOfflinePlayer("MHF_ArrowRight"));

It still a normal head

lilac dagger
chrome beacon
winter jungle
#

Nop

eternal night
#

😼

slender elbow
#

also there is no need to do reflection to use a profile, there is PlayerProfile API for head textures

winter jungle
ivory cloak
#

is there someone who is a pluginner/devoper with experience in minecraft? Yes/or no

eternal oxide
#

None here

ivory cloak
#

I have this package called Cakes and Pinata Birthday V1, which is a plugin with Oraxen, and other plugins, the problem is that I managed to load them and also load the textures, but now I don't see the objects in the game/not me makes them place I have a huge problem, even with Kazoo sound effects and confetti, would anyone be kind enough to help me? I think I did something wrong during the configuration, sound effects are missing and I can't place the objects (im desperate)

worthy yarrow
#

I was almost a devoper but I’m just not good enough

slender elbow
#

it sounds like you are passing the uuid as a String, and the method that takes a String is for the name

winter jungle
# slender elbow it sounds like you are passing the uuid as a String, and the method that takes ...

I used UUID:fromString for this. Anyway, I changed something and the error is gone, probably a mistake on my part.

I tried it now with this code

OfflinePlayer player = Bukkit.getOfflinePlayer(UUID.fromString(“93444fbc-2aef-4a09-bf3d-23becbcd9802”));
PlayerProfile profile = player.getPlayerProfile();

meta.setOwnerProfile(profile);

It seems that it only works with players who are online on the server.

eternal night
#

You'd have to update() that profile

#

given it may involve a network request, that means you are in completable future land

slender elbow
#

i complete lynx's future 🫶

winter jungle
#

I see, thank you!

eternal night
#

(this isn't romantic, I am trying to escape /s)

eternal oxide
#

get a room you flirts

rough drift
#

Emi first 3 letters

l common letter

ynx last 3 letters

eternal oxide
#

Ely for a girl but the boy sucks with Lem

quiet ice
#

wha

slender elbow
#

i love how the y isn't common letter as well

quiet ice
#

Ah I see

rough drift
quiet ice
#

reality can be whatever we want

glossy laurel
#

Not exactly a minecraft question, how do I clone someone's folder from github into a folder(packege) in my project on intellij

valid burrow
#

clone the project from github and move it there? xd

glossy laurel
#

Makes sense

hazy parrot
#

You cant just clone the folder afaik, you have to clone the whole project

wet breach
#
mkdir <repo>
cd <repo>
git init
git remote add -f origin <url>
git config core.sparseCheckout true
Now you need to define which files/folders you want to actually check out. This is done by listing them in .git/info/sparse-checkout, eg:

echo "some/dir/" >> .git/info/sparse-checkout
echo "another/sub/tree" >> .git/info/sparse-checkout

Last but not least, update your empty repo with the state from the remote:

git pull origin master
#

@hazy parrot in case you are interested in that you can

glossy laurel
vast ledge
#

He explained it dumbass

floral drum
hazy parrot
#

Til ig

valid burrow
sonic goblet
#
version: 2.0.0
author: [PillBox_]
main: me.pillbox.core.Main
api-version: 1.21
depends: [WorldEdit, WorldGuard, Votifier]```
Is there any reason why WorldGuard would load AFTER my ServerCore plugin? I just switched back to Spigot from Paper and running into this issue
eternal oxide
#

what makes you think it is loading after?

inner mulch
sonic goblet
#

I thought I did that with "depends"? Does that delay/rearrange the startup order?

inner mulch
#

im pretty sure there was a loadbefore or loadafter or something, i might be wrong

#

im gonna google real quick

eternal oxide
#

don't mess with loadbefore etc, thats for worlds

#

what makes you think its loading after?

sonic goblet
eternal oxide
#

do you have a field reference to worldguard in yoru class?

#

?paste your main class startup

undone axleBOT
eternal oxide
#

code

sonic goblet
#

onEnable

            wgPlugin = (WorldGuardPlugin) getServer().getPluginManager().getPlugin("WorldGuard");
        }```
onLoad
```if (wgPlugin == null) {
            wgPlugin = (WorldGuardPlugin) getServer().getPluginManager().getPlugin("WorldGuard");
        }```
eternal oxide
#

you can;t get a WG reference in onLoad

paper viper
#

^

#

Delete that and remove it to onEnable

#

Or actually

#

It’s there already

sonic goblet
#

0 Changes have been made to any of this/wg in months, only thing that has changed is switching from paper to spigot today. Plugin functioned and behaved 99% normally (except for Paper's AI remappings)

sonic goblet
#

I've had no issues with that for the last 2 years lol

slender elbow
#

full stack trace?

sonic goblet
#

Sure 1 sec

eternal oxide
#

its also depend not depends

#

Your depends line has never worked. You have just been lucky

slender elbow
#

lol that'd be why probs

sonic goblet
#

^^^ Ya that was it lol, 2 years without noticing that and just so happen to have everything load in the correct order xd ty

sterile breach
#

hi guys, Im making a land claiming plugin, I've asked several people and on several servers the best way to optimize the loading of chunks and lands, I'm hesitating between 2 things:
load everything on server startup from the db and save everything on stop

set up a cache system that loads when necessary and unloads when no longer needed

which is the most otptimized?

eternal oxide
#

it all depends on your implementation

#

you should save/update on any change

#

not only on shutdown

#

save via an async queue

sterile breach
#

yes, it would seem more logical to do this, but saving in db is just for storage, so saving while the server is running is useless, I think, isn't it?

eternal oxide
#

With land protection its usually best to hold all relevant data in memory

#

if your server crashes after a player claimed an area...

sterile breach
#

...

#

with periodicly saving yes

eternal oxide
#

when you startup again your data is only valid upto your last save

#

no need for periodic

#

push to saave on any change

sterile breach
#

good idea yes

#

but do I have to load everything at start-up?

#

or just what I need?

eternal oxide
#

I'd recomend it

#

land protection is not going to require much data, so not that much memory use

#

even across three world with 50 players

sterile breach
#

okay and for memory storing whats the best?

my first idea was
<chunk, land> (chunk just contain location)

but I was advised this

<chunk, land uuid>
<landuuid, land>

eternal oxide
#

it would be worse having to wait to fetch data when a player teleports to see if they are allowed in teh area they travel to

sterile breach
#

yes, that's what I thought too

eternal oxide
#

what is land?

sterile breach
#

to claim a chunk you claim it in a land context (or territory) you define rules that apply to land chunks, e.g. prevent breaking in your chunk

#

eg, I create a land named house and claim all in a 3 chunks radius

#

and define some rules

eternal oxide
#

rules apply to the whole land? or to each chunk?

sterile breach
#

whole land its all chunks

#

let me give you an example

eternal oxide
#

no need

sterile breach
#

okay

eternal oxide
#

if you disallow breaking in x land it applys to all chunks in x land

sterile breach
#

yes

#

one of the advantages of lands is that they can authorize players on some chunks but not on all, as well as rules

eternal oxide
#

ok, each land should have a UUID

sterile breach
#

probably yes

eternal oxide
#

ah, then no what you said is wrong

#

rules can apply to individual chunks

sterile breach
#

the uuid could do without it I think

sterile breach
eternal oxide
#

all lands should have a UUID if you want then to be able to change the lands name

sterile breach
#

you have reason

eternal oxide
#

reason?

sterile breach
#

but

<chunk, land> (chunk just contain location)

or

<chunk, land uuid>
<landuuid, land>?

sterile breach
#

per lands

eternal oxide
#

yes

#

just a random UUID assigned when the land is created

sterile breach
#

yes its not a problem

eternal oxide
#

you reference by UUID so every other piece of data in teh land can be changed

sterile breach
#

you mean that <chunk, land> with land instance is not a good idea?

eternal oxide
#

I'd do a (Set) of lands and a Set of chunks

#

the chunk object holds a field indicating the land it belongs to

sterile breach
#

no because chunk just contain x z and world (so I can a get a chunk from this coo directly)

#

without looping it

eternal oxide
#

you also want to be able to assign different permissions to certain chunks

sterile breach
#

no

#

all chunks are grouped

#

if you want to set different permission, create a new lands for that

copper spade
#

Any ideas why

    public void launchShockwaveGrenade(Player player) {
        WindCharge windCharge = player.launchProjectile(WindCharge.class);
        windCharge.setCustomName("Shockwave Grenade");
        windCharge.setCustomNameVisible(false);
        Vector direction = player.getLocation().getDirection().normalize().multiply(1.0); // Increase speed
        windCharge.setVelocity(direction);
    }

Doesn't hide the custom name, i still see it in the air

sterile breach
# eternal oxide ^

yes because you can create a new land to set different permission I mean

eternal oxide
#

ok

#

I'd still do seperate Sets or Maps for lands and chunks

sterile breach
#

like I show it with land uuid?

eternal oxide
#

you don;t need to loop, you only need to fetch the relevant "chunk" for teh block you are testing

sterile breach
#

okay okay i see

#

but maybe to be more rigorous I'd do better to make a cache system that caches and unloads? (loading all can be a bad idea if you have to load 10 000 chunks for example?)

eternal oxide
#

if you map by land/chunk, you would first have to see which land owns teh block you are testing, then fetch its data from teh lands index

#

no 10,000 chunk data in your context of protects is small

sterile breach
#

could a server with more than 1000 members at the same time afford to charge everything to the startup?

eternal oxide
#

all of your tests are for "can player x break a block in chunk x,y"

sterile breach
#

more or less yes

eternal oxide
#

so the quickest lookup you want is to find that data, which is a simle grab chunk from chunk coords

#

read for that chunk what land owns it (UUID), pull the land and read permission

#

the only reference you have when the player tries to break a block is its location

sterile breach
#

yes so

A<chunk, uuid>
b<uuid, land>

b.get(a.get(mychunk))

eternal oxide
#

yes

sterile breach
#

cool

eternal oxide
#

yes

#

you cna start loading your data in onLoad

sterile breach
#

okay okay seem to be the best way so

#

thanks for your help 🙂

eternal oxide
#

np

#

one piece of advice, create a permissions cache

#

for teh last tested permission

#

but you can add that when you are further along

#

I did it in Towny and it improved performance by a HUGE leap.

worldly ingot
#

Because I still, 10 years later, fuck this up

blazing ocean
quaint mantle
#

i am trying to add ability to plant a fern, everything is going alright but when the plant would grow the fern breaks. I tried to delay it but even after 1 sec delay it stills break.

I am using BlockGrowEvent (Paper 1.21)

                Block below = block.getRelative(0, -1, 0);
                below.setType(Material.GRASS_BLOCK);

                BukkitRunnable task = new BukkitRunnable() {
                    @Override
                    public void run() {
                        block.setType(Material.LARGE_FERN);

                        Block above = block.getRelative(0, 1, 0);
                        above.setType(Material.LARGE_FERN);
                        BlockData upperFernData = above.getBlockData();
                        if (upperFernData instanceof Bisected) {
                            ((Bisected) upperFernData).setHalf(Bisected.Half.TOP); // Set to upper half
                            above.setBlockData(upperFernData);
                        }
                    }
                };
                task.runTaskLater(plugin, 20);

https://www.flexclip.com/share/7016887397383460d3dc834221e41e2f23eb338.html

When there wasnt the delay. It only worked with bonemeal.
but when growing naturaly it would break. Then I tried add the delay and evem with the bonemeal it broke.

Does anyone knows what I am doing wrong?

sterile breach
# eternal oxide one piece of advice, create a permissions cache

what do you mean in "permissions"? land concept permission? org spigot permissions?

conventionally how to sort my classes and my plugin? just a land manager with all nedded methods? a cache manager with some methods like addchunk, removechunk etc.... and a land maanger with methods like claim# unclaim# ?

fair rock
#

Try setType(type, false);

#

The only thing i could think of

#

Good night

cedar flume
#

Anyone know which event I need to block to stop end crystals destroying blocks? 👀
I assumed BlockExplodeEvent but seems not

slender elbow
#

end crystals are entities, not blocks

#

so they'd call the entity explode event

#

idk if they actually do, but that's a sane line of reasoning

cedar flume
#

ah gotcha, thank you, that'll be it

grand flint
#

Guys can you not edit the player's name tag?

#

Like if they had a nickname, could the name tag not be changed to that nickname?

worthy yarrow
#

I just use a text display with a slight offset after adding it as a passenger to the player

#

From what I’ve seen and tested, if the text display overlaps with the player name it removes the original and will display your text

#

@grand flint

#

iirc whenever I removed my text display the original nametag came back

grand flint
#

What about on 1.8

#

Armor stands? @worthy yarrow

worthy yarrow
#

Not sure if the same properties will apply

#

They might just overlap

grand flint
worthy yarrow
#

Because hypixel is open source

grand flint
#

LMAO

#

i meant like

remote swallow
#

probably armor stands

grand flint
#

i assume its armor stands

worthy yarrow
#

More than likely yeah

remote swallow
#

or they modify the game profile

grand flint
#

how do u hide the nick?

grand flint
remote swallow
#

ye

grand flint
#

u cant use an existing account though

remote swallow
#

you can still modify the game profile

grand flint
#

ah alr

#

i think i see what u mean

worthy yarrow
#

I wonder if minimessage would work in the game profile for fancy colors and what not

remote swallow
#

but beware i wouldnt recommended doing that unless you know stuff doesnt rely on that name

grand flint
#

LMAO

#

a youtuber came to me

#

and helped me test it in hypixel

hard socket
#

wdym?

grand flint
#

i was asking mvp++ to nick for me

#

but instead a nicked youtuber came and helped me

#

he doesnt have an armor stand so i assume its game profile

hard socket
#

can't you just use setCustomName?

#

I have a feeling that would work

quaint mantle
#

bro

#

Player doesn't implement Nameable

sullen canyon
grand flint
#

@remote swallow text display or edit player profile

remote swallow
#

either

worthy yarrow
#

If you’re doing it for 1.8 then use the profile

grand flint
#

its on 1.21 though

worthy yarrow
#

?

#

Then do what you want

sly topaz
grand flint
#

does that change when u press tab?

worthy yarrow
#

no

grand flint
#

awe i didnt check that on hypixel 😭

sly topaz
#

you can change that with Player#setPlayerListName or whatever the method was called

grand flint
#

ohhhhhh

sly topaz
#

I got it right

grand flint
#

good job

worthy yarrow
#

You got it exactly right lol

grand flint
#

well

#

so its either

#

that method + text display

#

or just game profile right?

worthy yarrow
#

Can't imagine the game profile to be easier

sly topaz
#

why are you even considering game profile, doing it with that requires sending a bunch of packets which is just annoying

grand flint
#

well what if none of my plugins utilize players name?

worthy yarrow
#

dawg

sly topaz
#

what do you mean

grand flint
#

idk how hard is it i never messed with game profile

sly topaz
#

I mean, if you want to do it for the fun of it, go right ahead, I'm sure you can make-do with the resources in the forums

#

you've already been advised against it so, you can do whatever you want now

worthy yarrow
#
public void displayTitle(Player player, Title title) {
        World world = player.getWorld();
        Location location = player.getEyeLocation();
        String titleContents = ColorUtil.parsePlaceholders(player, title.getTagContents());

        TextDisplay textDisplay = world.spawn(location.clone(), TextDisplay.class);

        Vector3f offset = new Vector3f(0, 0.15f, 0);
        AxisAngle4f rotation = new AxisAngle4f();
        Vector3f scale = new Vector3f(0.75f, 0.75f, 0.75f);
        Transformation transformation = new Transformation(offset, rotation, scale, rotation);

        textDisplay.setText(titleContents);
        textDisplay.setBillboard(Display.Billboard.CENTER);
        textDisplay.setBackgroundColor(Color.fromARGB(0x80333333));
        textDisplay.setCustomNameVisible(false);
        textDisplay.setPersistent(false);
        textDisplay.setSeeThrough(false);
        textDisplay.setShadowed(false);
        textDisplay.setInvulnerable(true);

        textDisplay.setTransformation(transformation);

        this.activeTextDisplays.put(player.getUniqueId(), textDisplay);
        this.activeTitles.put(player.getUniqueId(), title);
        player.sendMessage(ChatColor.GREEN + "You have just equipped the " + ColorUtil.convertLegacyColorCodes(title.getDisplayName()) + ChatColor.GREEN + " title!");
        player.addPassenger(textDisplay);
    }```

This + the list name method
#

Or have fun with packets kek

grand flint
#

i had enough packets with minestom

#

ok thx <3

sly topaz
#

I still hate how it is called minestom and not minestorm

#

I know it is supposed to be minecraft + custom but still

grand flint
#

why would it be called minestorm

river oracle
#

😭

sly topaz
grand flint
#

i like minstom :D

sly topaz
#

it is a storm in the minecraft source code kek

worldly ingot
#

I mean it has no relation to the Minecraft source code at all so 👀

zealous moat
quaint mantle
#

itemstack.setItemMeta(yourmeta)

zealous moat
#

Why can't I just usemeta.setTool(tool);

quaint mantle
#

You need to update the itemstack

eternal oxide
#

getItemMeta is ALWAYS a clone. you have to modify and put it back after

zealous moat
obtuse hedge
#

What are Billboards

worthy yarrow
#

bill·board
/ˈbilˌbôrd/
noun
a large outdoor board for displaying advertisements.
"the display of suggestive advertisements on billboards"

young knoll
#

It determines how a display entity rotates client side

obtuse hedge
#

Ah

obtuse hedge
#

Is there a way to get the translation/rotation value of a thing after applying scale rotation and translations

worldly ingot
#

Of a display entity? Yes, absolutely. You can get its transformation and each component can be pulled out individually

#

Or as a Matrix if that's what you want

#

Oh you can't actually get it as a matrix, interestingly enough. You probably should be able to turn a Transformation into a Matrix4f

obtuse hedge
quaint mantle
quaint mantle
gusty sapphire
#

Anyone have any advice on where to start a reset vault for each individual player I think I have a way of doing but I feel like I’m making it more difficult than it should be any ideas?

twilit coral
#

also what is a reset vault

gusty sapphire
#

But a vault which open up on a set period of time maybe once a week and you can only put specific items in there

#

Your see it on a lot of big servers but unfortunately there isn’t anybody who has a prebuilt I can look at and then code from there

#

I might just make my own and then sell it

twilit coral
#

wym you can only put specific items, like it's not generated by the server?

#

do you have an example

gusty sapphire
twilit coral
#

idk, if that's what it is, should be fairly simple

#

just have each entry be associated with a player id, and the command to get the item

#

does it need to be a gui or is it like a claim command every reset

#

then you need some flag to represent that the player has executed the command or taken the items from the gui

#

and reset the flag for hte player on reset

gusty sapphire
#

Yeah all what you said with a gui is needed for this just like a private vault tbh but I wonder if there was any suggestions in creatingvit was going to use maybe zmemu/deluxmenu with script

#

But thought maybe someone might know better way

umbral flame
#

hi im new to spigot and im having trouble hooking Vault into my plugin can someone help

i have the dependency set and have verified that vault and my econ plugin are functioning but for some reason my plugin cant see vault

floral drum
#

Ensure you have a softdepend in your plugin.yml

#

softdepend:
- Vault

#

Also what do you mean “can’t see vault”?

floral drum
umbral flame
#

i do have a soft depent for vault

#
[04:52:12] [Server thread/ERROR]: [SwearJar] Vault not found! Economy features will be disabled.
[04:52:12] [Server thread/ERROR]: [SwearJar] Vault is not installed! Disabling plugin...
[04:52:12] [Server thread/INFO]: [SwearJar] Disabling SwearJar v1.1
[04:52:12] [Server thread/INFO]: [SwearJar] SwearJar disabled!```
floral drum
#

What does your code look like?

umbral flame
#
        if (!setupEconomy()) {
            this.getLogger().severe("Vault is not installed! Disabling plugin...");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }

        // Load config
        saveDefaultConfig();
        loadConfigValues();

        // Register the chat listener
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
        this.getLogger().info("SwearJar enabled!");
    }```
floral drum
#

And the setupEconomy method too

umbral flame
#
        if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) {
            getLogger().severe("Vault not found! Economy features will be disabled.");
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            getLogger().severe("No economy provider found! Economy features will be disabled.");
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }```
floral drum
#

Hm that is strange, and when you do /pl can you see vault in the plugins list?

umbral flame
#

yes i see vault and gemecon

floral drum
#

Can I see your plugin.yml

umbral flame
#
version: '1.16.5-1.1'
main: com.fennekfoxy.swearjar.SwearJar
api-version: '1.16'
author: FennekFoxy
softdepend:
  - Vault```
#

idk why it cant see it ik its loading because when i take off the depend i get
[SwearJar] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin.

#

but it still disables the plugin

eternal oxide
#

What economy plugin do you have?

umbral flame
#

gemseconomy

eternal oxide
#

is it supported by vault?

#

it will show in your log if it is

#

Vault will say that its hooked

umbral flame
#

lemme load it up

eternal skiff
#

Can i get texture value from image url, to set this on the player?

eternal oxide
#

all texture values/signatures come from Mojang

eternal skiff
#

It can set skin from url

eternal oxide
#

the URL is a link to mojang for the client to fetch the skin

umbral flame
#

i dont see anywhere that it says its hooked but i know a server running this plugin with vault as their main econ plugin

eternal oxide
#

In the correct format you set it as a Texture Property in the profile

#

it says it has Vault support, however it does say discontinued too

#

?paste your server latest.log

undone axleBOT
umbral flame
torn shuttle
#

hot take this syntax is stupid orientedNeighbours.values().forEach(ChunkData::updateGeneratedNeighborCount);

#

I really don't like Class::method

#

feels like it doesn't belong in java

eternal oxide
#

I see no injection into Vault for gems eco

umbral flame
#

what econ plugin do you recommend i use ill try a different one and see if that does anythign

eternal oxide
#

I don't use any but essentialsx core has a built in eco

#

good for testing

umbral flame
#

...

#
[05:19:20] [Server thread/INFO]: [SwearJar] SwearJar enabled!
[05:19:20] [Server thread/INFO]: [Essentials] Enabling Essentials v2.21.0-dev+115-6157668```
#

it was the econ plugin this whole time ...

#

thank you for your help

eternal oxide
#

did you setup an economy in gems?

#

it looks like you have to /gcur

#

to setup a currency

umbral flame
#

i did

fading drift
#

anyone know off the top of their head how I can stop the ability for players to pickup arrow entities

merry cove
#

gemcurrency supports til 1.16.4 and u run 1.16.5

umbral flame
#

oh well im making this for a friend and they already have all the econ stuff set up

#

oh

merry cove
#

last update doesn't mention any support for higher.

umbral flame
#

well thanks everyone for the help

fading drift
#
    @EventHandler
    public void onArrowPickup(PlayerPickupArrowEvent event) {
        event.setCancelled(true);
    }```
#

this literally does nothing

floral drum
ivory sleet
#

like purple

#

Just having a lambda?

torn shuttle
#

honestly I'd prefer class::method()

ivory sleet
#

Fair, although that does imply invocation

torn shuttle
#

your mom implies invocation

ivory sleet
#

That’s rude

torn shuttle
#

my right to free speech requires invocation

ivory sleet
#

Yea well you do you

eternal skiff
#

And it fetch skin

#

I want do the same

eternal oxide
#

the URL will at some point point to Mojang

eternal skiff
#

Can i do this like in this plugins?

eternal oxide
#

ALL skins teh client sees are pulled from Mojang

#

yes

eternal skiff
fading drift
#

I've got a dynamic scoreboard system that shows playercount, ping, etc. should I sent packets to the player only when neccessary to update the scoreboard, but have to make sure I account for everything in my code, or do I send them an update every tick or a certain interval, maybe async?

eternal oxide
#

PlayerProfile#getTextures#setSkin(URL... or somethign close

#

apply the player profile to the NPC

fading drift
#

just wanting to hear thoughts

eternal oxide
#

depends how often the data changes

#

often every 5 ticks is fine

fading drift
#

should I run it async?

eternal oxide
#

you can as you are doing packets, but remember you need to read the data you are sending

#

not many Bukkit methods are safe async

fading drift
#

I see

#

whats the downsides to sending it every 5 ticks vs only when I need

eternal oxide
#

um

#

if you know you can send only when you need to than do that

fading drift
#

okay thank you

lusty yacht
#

Hi, is there anyway to have projectile only pvp in a region when regular pvp is disabled?

fair rock
#

Coding

#

Ask in #help-server or on the worldguard discord (if they have one)

harsh ruin
#

I'm using SQLite to store uuid's & chunk coordinates to claim a chunk. However, how would I be able to store multiple chunks for one user?

#
    public static void claimChunk(Player p, int chunkX, int chunkZ, String claimChestLocation) throws SQLException {
        if (chunkClaimed(chunkX,chunkZ)) { return; }
        try (PreparedStatement preparedStatement = connection.prepareStatement("INSERT INTO claims (uuid,username,chunkX,chunkZ,claimChestLocation) VALUES (?,?,?,?,?)")) {
            preparedStatement.setString(1, p.getUniqueId().toString());
            preparedStatement.setString(2, p.getName());
            preparedStatement.setInt(3, chunkX);
            preparedStatement.setInt(4,chunkZ);
            preparedStatement.setString(5, claimChestLocation);
            preparedStatement.executeUpdate();
        }
    }``` I'm unsure wether or not this is necesarry code
merry cove
harsh ruin
#

Because I can't have a duplicate string

#

uuid can only be stored once

#

I can't store 2 of the same uuids

merry cove
#

of course you can, you just need to use multiple ids to find the correct one later.

remote swallow
#

have an id with auto increment as primary key and uuid isnt unique

harsh ruin
#

That's the limitation I have with sqlite, they provide their own ROWID as Auto increment, but I can't make a auto increment row myself.

remote swallow
#

use the type they provide?

#

you get the id

#

insert into table (x,y,z) values (?,?,?) returns id or smth similar

harsh ruin
merry cove
#

can you show your table query where you generate it

harsh ruin
#

Sure thing!java try (Statement statement = connection.createStatement()) { statement.execute("CREATE TABLE IF NOT EXISTS claims (" + "uuid TEXT," + "username TEXT NOT NULL," + "chunkX int NOT NULL," + "chunkZ int NOT NULL," + "claimChestLocation TEXT NOT NULL)"); }

merry cove
#

username is a bit redundant but you could do something like

CREATE TABLE IF NOT EXISTS claims (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    uuid VARCHAR(36),
    username TEXT NOT NULL,
    chunkX INT NOT NULL,
    chunkZ INT NOT NULL,
    claimChestLocation TEXT NOT NULL
);```
harsh ruin
#

I only store username for the server admin to see what uuid is what username

remote swallow
#

you can get that by getting the player instance

merry cove
#

ah, you can just fetch the username from uuid instead of having stuff in the database.

fair rock
#

If you do uuid varchar(36) do please username VARCHAR(16) too instead of TEXT xd

harsh ruin
slender elbow
#

varchar for uuid 💀

merry cove
#

why not lol

fair rock
#

Im curious too

remote swallow
#

its always gonna be 36 so char afaik

slender elbow
#

blobs

#

uuid types

merry cove
#

welp, uuid types aren't that supported yet is it?

#

but blob might be good havnt used it

slender elbow
#

there is no reason to waste so much space by using a varchar for something as binary as a uuid

merry cove
#

you mean store it as a UUID in the database? ran into issues with support not being up todate on platforms yet

clever lantern
#

if a player places an itemstack with a pdc does it stay there? ( player gets an item (block) with pdc, now i need to check if the player clicks on the block (check if pdc is there))

river oracle
river oracle
#

You'll definitely need to keep track of the block

#

I'd do it with

#

?blockpdc

undone axleBOT
river oracle
#

Just copy the pdc over to the block and vise versa

clever lantern
#

ok thanks

river oracle
#

I should note the exception to this is block entities so be careful

#

Block entities hold pdc

#

And it's copied over

merry cove
slender elbow
#

yes

river oracle
#

Yeah like SQLite

slender elbow
#

the point is the storage format

#

there is no reason to waste 36 bytes in something that is 16 anyway

#

therefore, blob is a perfectly reasonable thing to use

#

and the engines that support uuid types natively like mariadb or postgresql will use the binary format rather than the textual format

merry cove
#

yea, 16 bytes it better

fair rock
# river oracle I should note the exception to this is block entities so be careful

Idk if im stupid but the api is saving the block pdc in the chunk
https://github.com/mfnalex/CustomBlockData/blob/c95092df3d32a7ec2d58043018ef19d5f2fb082b/src/main/java/com/jeff_media/customblockdata/CustomBlockData.java#L284

So it could work with normal blocks too

GitHub

Provides a PersistentDataContainer for every Block location - mfnalex/CustomBlockData

river oracle
#

Do you not understand anything I say?

fair rock
#

"I should note the exception to this is block entities so be careful"

river oracle
#

I'm simply pointing out the redundancy of storing pdc 2 times

fair rock
#

i thought you mean TileBlocks

#

💀

river oracle
#

It's a wate of data

fair rock
vernal owl
#

just be aware that it MIGHT be false, so i rather would use other naming, like lastUsername

young knoll
#

Is there some magical way to get the servers external ip or am I best off just querying checkip.amazonaws.com

blazing ocean
#

nope there isn't

#

I always use eth0.me

willow robin
molten hearth
#

?paste

undone axleBOT
orchid trout
glad prawn
#

nvm

daring lark
#
public class HavenChunkGenerator extends ChunkGenerator {
  @Override
  public void generateNoise(@NotNull WorldInfo worldInfo, @NotNull Random random, int chunkX, int chunkZ, @NotNull ChunkGenerator.ChunkData chunkData) {
    for (int x = 0; x < 16; x++) {
      for (int z = 0; z < 16; z++) {
        var blockX = chunkX * 16 + x;
        var blockZ = chunkZ * 16 + z;
        chunkData.setBlock(blockX, (int) PerlinNoiseGenerator.getNoise(blockX, blockZ), blockZ, Material.DIAMOND);
      }
    }
  }
}```
does anyone knows why this code doesn't work and crashes my server?
#
    at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.unrecoverableChunkSystemFailure(ChunkTaskScheduler.java:336) ~[paper-1.21.1.jar:1.21.1-98-9b1ee0d]
    at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder.lambda$setGenerationTask$4(NewChunkHolder.java:1622) ~[paper-1.21.1.jar:1.21.1-98-9b1ee0d]
    at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkProgressionTask.complete0(ChunkProgressionTask.java:91) ~[paper-1.21.1.jar:1.21.1-98-9b1ee0d]
    at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkProgressionTask.complete(ChunkProgressionTask.java:74) ~[paper-1.21.1.jar:1.21.1-98-9b1ee0d]
    at ca.spottedleaf.moonrise.patches.chunk_system.scheduling.task.ChunkUpgradeGenericStatusTask.run(ChunkUpgradeGenericStatusTask.java:143) ~[paper-1.21.1.jar:1.21.1-98-9b1ee0d]
    at ca.spottedleaf.concurrentutil.executor.standard.PrioritisedThreadedTaskQueue$PrioritisedTask.executeInternal(PrioritisedThreadedTaskQueue.java:351) ~[paper-1.21.1.jar:1.21.1-98-9b```
part of my error message
nova rock
#

Did you ask ChatGPT maybe he knows

torn shuttle
#

does mc shade joml in?

daring lark
blazing ocean
#

And don't

#

also

#

?whereami

blazing ocean
#

this is a paper issue

eternal oxide
slender elbow
#

z - the z location in the chunk from 0-15 inclusive

#

you are attempting to set to the absolute location (chunk + block offset)

#

it's a relative coordinate, 0 to 15

eternal oxide
#

^ long version

daring lark
#

i'm so dump

remote swallow
#

i doubt chunkX and z what you want either

daring lark
#
 @Override
  public void generateNoise(@NotNull WorldInfo worldInfo, @NotNull Random random, int chunkX, int chunkZ, @NotNull ChunkGenerator.ChunkData chunkData) {
    var noiseGenerator = new PerlinNoiseGenerator(worldInfo.getSeed());
    for (int x = 0; x < 16; x++) {
      for (int z = 0; z < 16; z++) {
        var blockX = chunkX * 16 + x;
        var blockZ = chunkZ * 16 + z;
        var blockY = (int) noiseGenerator.noise(x, z);
        System.out.println(blockY);
        chunkData.setBlock(x, 0, z, Material.DIAMOND);
      }
    }
  }```
still the same error
eternal oxide
#

still multiplying

#

0-15 nothing else

daring lark
eternal oxide
#

oh you are not using blockX and blockZ anymore

#

confusing you left them in

daring lark
#

chunkData.setBlock(x, 0, z, Material.DIAMOND);

when iremove this line it works

eternal oxide
#

what works?

daring lark
#

code

#

chunkData.setBlock(x, 0, z, Material.DIAMOND);
this is caouseing the error

eternal oxide
#

also, why are you generating a noise for Y and not using it?

#

nothing wrong with the new code

daring lark
#

i'm just testing

eternal oxide
#

unless you have an altered min height

daring lark
#

no way

#

i was using block material not diamon_block xDDDD

eternal oxide
#

doh

#

yeah, not a block 🙂

nova rock
#

Hey does anyone know how to put more broad letters on my Minecraft server?

#

Like this ones

eternal oxide
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

nova rock
#

Oh ok

#

Like this one

remote swallow
#

thats just small caps

nova rock
#

Yes but how do I put small caps

remote swallow
nova rock
#

Oh thanks you saved my life

torn shuttle
#

finally

#

I think the core of this is fully done

vast ledge
torn shuttle
vast ledge
#

??

rose cairn
#

Does any1 knows a Plugin that tps a Player to his latest coords when hes leaving the World?
Its on a Server, but they spawn in the Lobby, and can Join the survival world via npc. But then they get tped to the worldspawn

#

Any way to fix this?

#

I tried Multiverse but this mv keeps tping on spawnpoint

torn shuttle
#

hehehe

lilac dagger
#

so pretty

#

did you finish the inside yet?

torn shuttle
#

none of this is final, they're what we call graybox prototypes

#

basically just shells

#

also this isn't even what won the poll as it turns out

#

the vote changed so we're not even going to be doing villages yet

#

nor the city

#

there's one optimization I'm keen to add early on I think

#

but it's mildly tricky

#

I sort of want to dump calcified chunks into some temporary file thing so I can clear memory as I go

#

this takes straight up whacky amounts of ram to do really big worlds

#

this nightmare is what won

worthy yarrow
torn shuttle
#

basically a bunch of underground rooms and corridors, right now it's completly untweaked so it's mostly just tunnels which is not accurate to what it will end up as

worthy yarrow
#

Is this still apart of that maze generation project or whatever that was?

quaint mantle
#

does anyone know is using block.setType(); does trigger BlockBreakEvent?

if yes how I can disable it for that case?

slender elbow
#

no it doesn't

#

Player#breakBlock(Block) however will

#

so uh, just don't use that lol

torn shuttle
#

wave function collapse generation

#

they're just different tilesets for it

#

well, a twist on the wave function collapse generation

#

I don't know if my special blend has been used before but I am pretty happy with it

spice oasis
#

is there a way to make a bow that shoots multiple arrows horizontally? i've tried it with vectors, but it seems not to work properly, because it depends on where the player is facing. looking diagonally, it works fine. but looking for example west, it doesn't work because the positions adapt themselves to the other one

proper cobalt
#

anyone here used inventory framework by stefvanschie

#

how do i update the title of a gui

sturdy sand
quaint mantle
#

You update the titles in inventory views

remote swallow
#

its IF

remote swallow
proper cobalt
#

can y show example

#

im calling it in a clickevent on a guiitem

#

but nothing happens

remote swallow
#

show ur code

#

You need the Gui

eternal oxide
#

open the inventory again after setting the title

proper cobalt
#

thats extends ChestGui

proper cobalt
#

aha good job

#

thanks elgarl

proper cobalt
#

what about updating items in the gui

#

if i call Gui#show it just removes all the items from the gui

#

Gui#update does nothing

worthy yarrow
#

Add the items and then reopen the inventory again

proper cobalt
#

or something

#

cuz idk what u mean

worthy yarrow
#

Set contents -> reopen gui

proper cobalt
#

aight ill try it i guess

#

nah didnt work @worthy yarrow

#

what about open gui -> set contents

worthy yarrow
#

Maybe that framework is just bad then, that’s how it’s done without one so I’m not sure

#

I’ve never used that lib before is

proper cobalt
#

yeah framework is trash

worthy yarrow
#

So*

proper cobalt
#

its acc so bad

#

barely documented

worthy yarrow
#

Maybe it’d be better to make your own :p

proper cobalt
#

na

worthy yarrow
#

Usually what I end up doing lol

proper cobalt
#

being forced to use it

grand flint
#

When does the setPlayerListName or whatever that method is needs to be called?

slate siren
#

I need a little help on something, think of a chest, there are many items and the items drop according to the chance rate, what method can be used for this chance rate? To give items according to chance

kindred valley
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

slate siren
proud badge
#
org.bukkit.plugin.InvalidPluginException: Cannot find main class `dev.nedhuman.dupedetect.DupeDetect'``` why could this be happening? the class is right here
drowsy helm
#

Decompile the jar and see if it’s named correctly

proud badge
#

ok weird its dupeDetect in the decompiled jar

drowsy helm
#

Are you obfuscating or smth?

proud badge
proud badge
#

ok I restarted intellij and issue resolved now

river oracle
slate siren
#

?paste

undone axleBOT
harsh ruin
#

I can't seem to find EntityPlaceEvent in the spigot javadocs? Anyone got information about this?

eternal oxide
#

its there

#

search box - place

obtuse hedge
worldly ingot
#

It's an affine transformation

slender elbow
#

affine deez nuts

worldly ingot
#

wtf

grand flint
#

does it need to be set at a certain time for it to work?

lilac dagger
#

how does playerlogin event work if a player is banned or the server is full

#

does it show the result as kicked/banned server full?

grand flint
#

or is that for later versions

grand flint
lilac dagger
#

it's not async

#

talking about this one

molten hearth
grand flint
molten hearth
#

wait

grand flint
molten hearth
#

if you change a player name dont u have to despawn and respawn them

grand flint
#

what name

#

its listname

molten hearth
#

yes thats the player name

grand flint
#

what does that got w spawning

#

well shouldn't it be already set when i join as a nicked player

molten hearth
#

i dunno i believe player lists suffer from autism

grand flint
#

look;

#

its not mine but sunlight does this

#

but when i tab, i see my username not my nick

molten hearth
#

peculiar

#

yeah nvm it should work

#

whats ur code

grand flint
#

i suggested him to use that yday and he said he is using it already and sent me this piece of code

molten hearth
#

oh

grand flint
#

so idk why it still displays my username when i tab

#

like by tab yk what i mean right?

molten hearth
#

also my bad i was thinking about player profiles with respawning not setPlayerListName

#

yeah

grand flint
#

when i press tab with the chat open

#

the auto com0lete

molten hearth
#

OH

#

thats not

#

lmao

#

setPlayerListName is just when u press tab

grand flint
#

thats what i asked yesterday D:

#

yeah that works

molten hearth
#

LOL

grand flint
#

😔

#

can i just not send the auto complete names?

molten hearth
#

💀

#

i think u gotta change their player profile

#

and respawn them

grand flint
#

no i swear there is a config for it

#

to not send the auto complete names

molten hearth
#

¯_(ツ)_/¯

grand flint
#

ill see if i can find it

#

for the nametag ima just use text displays

#

i cant bother dealing w player profile

#

then tryna make sure no plugin uses the usernams

wraith delta
grand flint
#

thxx

wraith delta
# grand flint yeahh thought i saw it somewhere

This is because for it to be empty, the tab complete code would require setting “” empty string for anything that’s supposed to be empty, which most devs overlook.
Otherwise follows vanilla behavior that always needs a username.

grand flint
#

are u talking about tab complete cuz u replied to sum else

quaint mantle
#

hey if i execute a function in runTaskAsync, will the entire function run asynchronously?

#

like

Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
    myFunction();
}
eternal oxide
#

yes, but remember much of Spigot is not safe to call async

quaint mantle
#

im using paper

#

is it safe_

#

?*

eternal oxide
#

Don;t ask about paper in spigot

quaint mantle
#

okay sorry

wraith delta
# quaint mantle is it safe_

It’s not safer. The issue is minecaft runs on the main thread, async can sometimes skip functionality or not reach the values you are looking for

#

If used correctly, async can be good. Just need to be careful

quaint mantle
#

i'm using it to make http requests

#

but i'm using the value of something of the http request

#

i'm making the http request in the onEnable because i don't need it to update every time

paper viper
quaint mantle
#

oh okay

#

thxx

indigo frost
#

hi so im currently making a gui in my plugin and I want to be able to identify each item in the gui not using the name or meta data or anything like that or even the placement in the gui. What part of the meta data can i use to set a unique identifier that cannot be seen ingame. I was thinking of using the setLocalizedName() but apparently it is going to be removed in the future. What can I use?

#

Please ping for response

eternal oxide
#

?pdc

echo basalt
#

mm nothing better than mapping a toml table to a tree because kotlin serialization sucks

#

tbf my goofy ass approach with 2 methods recursing on each other might crash at some point

quaint mantle
#

hey! maybe it's a dumb question, but is there any difference between (int) and Math.round()?

#

or it's the same?

quaint mantle
#

what's the difference?

wet breach
#

When you convert by first way it does no rounding. It simply removes those digits as if they never existed

ancient ibex
#

Health bar example syntax

wet breach
#

The rounding method lets you specify if you want to round up or down. By default i believe it rounds down

quaint mantle
#

Ohhh

#

So like

compact haven
#

it rounds based on value

quaint mantle
#

Round could be instead of 25.2, 26?

ancient ibex
#

Floating point health bar syntax

compact haven
#

so .5 ^ is ceil

quaint mantle
#

Yeah i understand

#

Like shops round the value of smth from .99$ to 1$ (dumb example ik)

wet breach
quaint mantle
#

Oh okay okay thanks

wet breach
#

Sometimes this is fine other times you might want to round up first

quaint mantle
#

Okay i understand now

#

Thank you for the help

wet breach
quaint mantle
#

Lol