#help-development

1 messages · Page 774 of 1

meager wolf
#

just a simple ign and int

#

or uuid

rotund ravine
#

And

#

What is it used for

#

What is the ability

meager wolf
young knoll
#

You could easily store that in pdc

rotund ravine
#

^^

meager wolf
#

ok

young knoll
#

If you don’t need it when they are offline

meager wolf
#

um

rotund ravine
#

Might even be more fun to keep it per item

#

Depending on the ability

meager wolf
#

what about the path ? where should i save it

rotund ravine
#

Pdcs

#

Are saved to player data / world data

#

No parh

#

Path

meager wolf
#

oh

#

nbt

rotund ravine
#

Ye

#

?pdc

meager wolf
#

hmmm

rotund ravine
#

?morepdc

undone axleBOT
meager wolf
#

thats big brain

rotund ravine
#

Can be saved to items chunks player etc etc

meager wolf
#

ye

silent slate
#

i guess the chats now free so i can ask again, has anyone got an idea why my

player.setPlayerListHeader("TestTest2");

Does absolutely nothing?
Its registered in an event that i registered and its an onJoin event

young knoll
#

Try delaying it a tick

silent slate
#

how to do that?

shadow night
#

BukkitRunnable

dry hazel
#

run a new task on the scheduler

silent slate
#

well ok

#

is that also possible with a sleep function`?

young knoll
#

No

#

That will hang the main thread

shadow night
#

You only do scheduling

silent slate
#

okay then someone has to explain how bukkit runables work. because i havent scheduled tasks yet

rotund ravine
#

It is, if it’s in another thread. It’ll be wildly inaccurate tho

#

?scheduling

undone axleBOT
shadow night
#

Bukkit runnables are fun, so fun I even implemented my own ones once

silent slate
#

}.runTaskLater(plugin, 20L * 30L /*<-- the delay */);

is 20L+30L the delay and what means L

shadow night
#

20L means 20 ticks in type long iirc

topaz cape
#

L is a cast for long

silent slate
#

okay so this would do 30seconds

topaz cape
#

its not +

#

its 20 x 30

young knoll
#

Yea

silent slate
#

typo

topaz cape
shadow night
#

Yes, 20*30 is indeed 30 seconds in ticks

young knoll
#

30 seconds

peak depot
#

why does it throw Field lengh out of bounds when I join

silent slate
#

so this would do the trick??

new BukkitRunnable() {
@Override
public void run() {
player.setPlayerListHeader("TestTest2");
}
}.runTaskLater(plugin, 20L * 1L /*<-- the delay */);

dry hazel
#

you can do just runTask iirc

shadow night
young knoll
#

Yes

pine sandal
#

I want to assume there is no current api for exploring the NBT of a chunk that isn't NMS? (Got my structure discorver working using an NBT library but want to see if there is a way to do it thru spigot itself.

young knoll
#

runTask will run it on the next tick

shadow night
#

That's cool

silent slate
#

and how do i get the plugin parameter is it just this.plugin or what

dry hazel
#

that's your plugin instance, normally you pass it from your listeners' instantiation point

shadow night
#

I thought runTask was there to run code on the main thread from a seperate thread in case it's needed, like in forge

rotund ravine
#

No

#

Why rho

silent slate
young knoll
#

Sadly there is no api for placed structures yet

#

It’s on my todo list

dry hazel
#

30 seconds is way too long, next tick is just fine

thin iris
#

i still dont understand how to shade the shit in

shadow night
#

Why is the class in camelCase

shadow night
#

1L = 1 tick

silent slate
#

ok

pine sandal
#

Ah, so I will just have to use what I am doing now to read the structures from the MCA files on first load with my plugin. (After first load I can easily use the event to get the data for newly generated structures)

silent slate
#

fixed it

dry hazel
silent slate
#

how do i get the plugin from the listener though?

#
public class PlayerChangedEvent implements Listener {

    @EventHandler
    public void PlayerChangedWorld(PlayerChangedWorldEvent event) {

        Player player = event.getPlayer();
        String world = player.getWorld().getName();

        if(world.equals("lobby")) {
            createScoreboard.createLobbyBoard(player);
        } else {
            createScoreboard.createDefaultBoard(player);
        }

        createTablist.createBoard(event.getPlayer(), this);
    }```

this is marked red
shadow night
#

Do we have an article on dependency injection or whatever it was called

dry hazel
#

?di

undone axleBOT
shadow night
#

Nice

#

It's cool we have such cool people in the server

silent slate
#

ok thanks 👍

smoky oak
#

qq if i want the death message to show the 'killed with magic' which order do i call player.damage and player.setLastDamageCause?

young knoll
#

Yeah good luck with that

smoky oak
#

oy

thin iris
#

how do i shade this fucking thing 😭

young knoll
#

Calling .damage is what kills them

#

But it’ll also set their last damage cause

#

You’d have to use the death event in combination

smoky oak
#

uh

#

Player::damage(double) ?

#

wouldnt that work cuz theres no cause?

silent slate
#

mhh still not showing the tablist header

smoky oak
#

also wtf

#

im fairly certain list aint supposed to be immutable

eternal night
#

list can certainly be immutable

rotund ravine
#

View is?

solar mortar
#

Hey, so I'm getting really close to finishing my clan plugin, i'm working on stats now right. So I have a /global clans - which display all the clans from 1st place to last.

how should I go about calculating which clan has the most kills, what clan is the richest, which clan is the oldest, how many members, and how many deaths, to give the order from 1st to last ?
@worldly ingot @solar musk

eternal night
#

I mean, who the fuck knows wat method they are calling

quaint mantle
#

wtf

#

that's weird

smoky oak
#

im streaming all players near it - which is view, for particle effects - and filter by distanceSquared to the center, then use .toList()

young knoll
#

We need api to damage entities with a specific cause

dry hazel
smoky oak
eternal oxide
#

.toList is immutable use Collect

young knoll
#

I think a damage api is being worked on

smoky oak
#

question. If i cache a player object twice its different concerning == but equal concerning equals, correct?

thin iris
#

how can i shade all my dependencies in maven

smoky oak
#

do i have to compare uuid?

eternal night
#

the player instance remains the same

smoky oak
#

no like

#

i have a 'Player cause' and a List<Player> nearby

#

wouldnt that mean two player objects at different memory locations

eternal night
#

no

#

Player "Moterius" would have the same instances both as the value of cause and in the list

young knoll
#

A player object will be the same the entire time they are online

eternal night
#

which is kind of meh

#

but yea

young knoll
#

A new one will be made if they relog

eternal night
#

I'd still compare using .equals

smoky oak
#

yea this just looks wrong lol

eternal night
#

just use .equals yea

smoky oak
#

welp

#

thx for the help ig, and ill deal with the death thing tomorrow

#

wait 1.0 damage was 1/2 heart right?

tall dragon
#

yes

elfin atlas
#

How can I set the Entity Spawn reason?

young knoll
#

Afaik you can’t

#

Not with the api

elfin atlas
#

Okay

pine sandal
#

Want an opinion. Would it be better to save the structure data I extract / collect ( will be used later) in a database, external file or the Persistent Data for the world that the structure is in? Since I don't want to have to discover the structures every startup.

young knoll
#

Probably a database

echo basalt
#

make an interface

young knoll
#

Depends how big the data is

echo basalt
#

and make all 3 implementations

pine sandal
#

Well, the data per structure is the bounding box, and its structure type.

thin iris
#

i get this error

#

when tryna put my thing on a bungee server

#

does anyone know why

pine sandal
#

It could also be better just to discover them every server start. But that could take a very long time depending on the size of the world.

quaint mantle
#

does this also work with players offhands?

#

theres a huge bug with ExcellentCrates players can put the key in their offhand i'm trying to fix it

young knoll
#

It should work for both, yeah

quaint mantle
#

i don't see why offhand isnt blocked here then

#

this is actually happening with both ExcellentCrates and CrazyCrates

young knoll
#

What’s the bug

#

Do they place the key?

quaint mantle
#

No they put the key in their offhand they can open the crate as many times as they want

young knoll
#

That’s odd

#

Should be unrelated to those options tho, it just involves decreasing the stack size of the item

silent slate
#

If i wanna update the tablist every second how to do that exactly, i tried this but its not working:

BukkitScheduler scheduler = getServer().getScheduler();
scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
@Override
public void run() {
for(Player player : Bukkit.getServer().getOnlinePlayers()) {
createTablist.createBoard(player, LaserServerManager.this);
}
}
}, 0L, 20L);

young knoll
#

That should work

silent slate
#

well its not ..

#

shall i sent the whole file?

young knoll
#

If you add a sysout in the task

#

Is it called

silent slate
#
@Override
    public void onEnable() {
    getServer().getPluginManager().registerEvents(new ServerPingListener(), this);
    getServer().getPluginManager().registerEvents(new PlayerChangedEvent(this), this);
    getServer().getPluginManager().registerEvents(new PlayerJoin(), this);
    getServer().getPluginManager().registerEvents(new PlayerLeave(), this);
    getServer().getPluginManager().registerEvents(new PlayerMove(), this);
    getCommand("lobby").setExecutor(new lobby());
    getCommand("maintenance").setExecutor(new maintenance());

        BukkitScheduler scheduler = getServer().getScheduler();
        scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
            @Override
            public void run() {
                for(Player player : Bukkit.getServer().getOnlinePlayers()) {
                    createTablist.createBoard(player, LaserServerManager.this);
                }
            }
        }, 0L, 20L);
    getLogger().info("registered commands and events");

    }```
short pilot
#

how can you prevent players from doing stuff in a chunk if they don't have perms like breaking blocks

silent slate
#

check their coords and then cancel the breaking block event

#

just create a breaking block event and check the condititons

young knoll
#

You’ll have to cancel various events

silent slate
#

one of them being this

BlockBreakEvent

young knoll
#

And you’ll need some way to mark who has perms in said chunk

silent slate
#

back to the runable

#

what u mean by calleld

#

its in the onEnable

young knoll
#

Yes but the code inside it runs every second

silent slate
#

yes

#

hwo it should

young knoll
#

If a sysout inside it works that means it is running, which means there is an issue with whatever code you have in it

silent slate
#

well the code is working

#

because its also triggered by the onPlayer join event and shows it correctly

young knoll
#

We’d need to see the code for createTablist.createBoard then

grim hound
#

When an ItemStack is let's say passed into another inventory, is another ItemStack object created?

silent slate
#

its just testing for now, ill change the prefixes after it works

#

?paste

undone axleBOT
silent slate
young knoll
grim hound
#

Then excluding the 1.14+ PersistentDataContainer, is there another way to mark an item for it to have a unique identifier?

young knoll
#

You could use NbtAPI

grim hound
#

Which is not runtime-dependent

young knoll
#

Basically pdc but not

grim hound
young knoll
#

What api?

river oracle
#

well Bukkit and NBTAPI just use NMS

young knoll
#

Yeah

grim hound
wooden hearth
#

What’s people up to?

young knoll
#

You don’t

river oracle
young knoll
#

Spigot doesn’t have api for that, you need to use NMS

#

or the aforementioned NbtAPI

river oracle
grim hound
#

Well that's not an issue

grim hound
grim hound
river oracle
#

did you just ask how to do something and then say no to the solution?

river oracle
#

use NBTApi

grim hound
grim hound
river oracle
#

yes

grim hound
#

Then I won't use it

river oracle
peak depot
#

If i use nms can ViaVersion work with that and translate them to the right packets for the version?

river oracle
#

why be so combative against a genuinely good tool

grim hound
#

I'm just asking whether runtime changes to the nms nbt will be saved or is there like a weird system involved?

young knoll
#

They’ll be saved

grim hound
#

I can be illogical

#

But it's because I never actually use the APIs

young knoll
#

Sounds like ur making things harder for yourself

grim hound
#

Either cuz they have no documentation, don't work or I just find it easier to do it by hand

river oracle
# grim hound Experience

I'm just letting you know ahead of time if you do go with NMS you do know you will need a module for every single version you plan to support

young knoll
#

Or a bunch of reflection

river oracle
#

this is no small task with obfuscated mappings

grim hound
river oracle
pine sandal
#

Question Coll1234567, since you have started working on the structure API how hard is it to actually add new stuff like that to Bukkit / Craftbukkit. I know you need PR in both Bukkit and Craftbukkit to do it.

grim hound
eternal night
river oracle
#

I suppose you could also use 1 module and go pure reflection

grim hound
#

Reflections aren't that slow and you can make them really efficient if used correctly

eternal night
#

beyond that, well, its an open source project maintained by someone not paid to do so that is a terrible large project

#

half of contributing is being patient

river oracle
eternal night
#

MethodHandles 🙏

ivory sleet
young knoll
#

Yeah the main thing is just waiting on PRs

river oracle
grim hound
young knoll
#

Once you sign the CLA and have a decent workflow setup making the PRs is easy

river oracle
young knoll
#

JIT will just optimize it anyway

grim hound
#

Yo whaat

young knoll
#

If it gets called enough

river oracle
#

JIT is magical ain't it

grim hound
#

Some static bongers?

ivory sleet
#

reflection is reimplemented with fast method handles

pine sandal
ivory sleet
#

and then jit is gucci also

eternal night
#

Welp, PRs that break stuff are the best

#

keeps owners on their toes

river oracle
pine sandal
#

This was back when Spigot didn't have a discord and only had IRC as well.

eternal night
grim hound
# grim hound Uhh

Well I was looking through the code of reflections and didn't find a MethodHandles call

young knoll
#

It’s extra fun when the owner breaks stuff

#

:p

rotund ravine
#

Reflectasm is good too

eternal night
#

my fav

river oracle
dry hazel
eternal night
#

sorry ?

river oracle
#

paper is going to work you to the bone

eternal night
grim hound
grim hound
sullen marlin
eternal night
#

but yea I'll be at normal blood alcohol levels

young knoll
young knoll
#

What the heck is paper doing this weekend

ivory sleet
#

paper planes maybe?

river oracle
#

yes!!

young knoll
#

Anti-folia? Moves every single thing possible onto 1 thread

eternal night
#

exactly

#

less thread switching

#

more speed

dry hazel
#

removes paper plugins

eternal night
young knoll
#

No

#

Minecraft does plenty on other threads

eternal night
#

finally main thread chat

river oracle
eternal night
#

the thing that coll has been thinking about for like

dry hazel
#

ohio software

eternal night
#

the past couple weeks

young knoll
#

Shut

grim hound
young knoll
#

I was reminded plugins can be disabled at runtime

ivory sleet
eternal night
grim hound
#

Connection handling?

ivory sleet
#

some other stuff also idr

sullen marlin
#

World generation

eternal night
#

a shit load of stuff is offloaded yea

young knoll
#

If a plugin is disabled what they heck am I supposed to do

grim hound
young knoll
#

Unregister it’s stuff

eternal night
#

background executor is worked to the bone

#

yea

#

suffer

young knoll
#

Oh okay suffer

#

Got it

umbral ridge
#

hey how do you use vault and permissionsex and stuff in maven? how to import it from local disk as a jar?

grim hound
young knoll
#

Bukkit.suffer() new method

sullen marlin
#

You can use mvn install-file

river oracle
#

@eternal night actually curious though what is this paper plugin stuff? Did paper make their own plugin loader or something

young knoll
#

Yeah they did

eternal night
#

yea, it sits at a point where it can mutate registries

sullen marlin
#

Or just a system depend scope which everyone does

eternal night
#

and has tighter classloader restrictions

young knoll
#

It’s also good at yelling about circular dependencies

grim hound
eternal night
#

Indeed

dry hazel
eternal night
#

common mojang moment

umbral ridge
#

Ohh awesome

#

thanks

young knoll
#

Technically I could just remove freezing and register/unregister stuff as needed

umbral ridge
#

I just put it as a dependeny in pom.xml?

grim hound
young knoll
#

But like… duke

umbral ridge
#

how about pex, permissionsex?

umbral ridge
#

SP PEESEx

eternal night
#

given config phase

young knoll
#

Eeeee

eternal night
#

they are certainly working on something

young knoll
#

That’s what I’m trying to prepare for

grim hound
young knoll
#

Also I want custom biome api :(

eternal night
#

Well

umbral ridge
#

does PermissionsEx have a repository

eternal night
#

Thing is like, what you setup now can just be fucked down the line kekwhyper

peak depot
#

how can I get the connection of a player with nms to send packets since PlayerConnection connection = ((CraftPlayer)player).getHandle().playerconnection doesnt exist in 1.20.1

umbral ridge
#

xD

young knoll
#

True

eternal night
#

like, if they allow unfreezing and mutating registries down the line (does config phase kinda suggest that ? maybe) you don't need to hook at bootstrap

umbral ridge
#

nvm found it

eternal night
#

and all your shit is useless

sullen marlin
river oracle
grim hound
eternal night
#

given how complete server source code recreations are these days

grim hound
eternal night
#

e.g. papermc/mache

young knoll
#

For now we rely on old faithful

#

public static void unfreezeRegistry(Registry<?> registry) {
        try {
            Field intrusiveHolderCache = getField(MappedRegistry.class, Map.class, 5);
            intrusiveHolderCache.set(registry, new HashMap<>());

            Field frozen = getField(MappedRegistry.class, boolean.class, 0);
            frozen.set(registry, false);
        } catch (ReflectiveOperationException e) {
            e.printStackTrace();
        }
    }```
eternal night
river oracle
eternal night
#

Yea

#

so paper can do snapshot work

#

given spigots is not public 🙃

river oracle
#

interesting

ivory sleet
umbral ridge
#

What is this? i get that when i try to include vault api in maven pom.xml:

river oracle
young knoll
#

Spigots snapshot work isn’t even semi public XD

#

Only md gets to see it

eternal night
#

its sadness

#

xD

#

would reduce our update time a lot to have most patches applied when rcs roll around

river oracle
#

spigot snapshot branch drops when?

sullen marlin
#

Paper contributes to spigot when?

eternal night
#

obvious counter point being

#

CLA removal I think NODDERS

umbral ridge
sullen marlin
#

You know that's not the reason

eternal night
#

meh we have plently people that have yet to sign it and do not seem willing too

#

I don't agree with them

#

I don't mind

slate tinsel
#

Can I teleport an armor stand with a falling block as a passenger or do I have to abort and respawn it instead?

eternal night
#

but that is a rather personal decision

sullen marlin
#

Yet the people that have signed the cla don't contribute either

young knoll
#

👀

eternal night
#

Ehhh

ivory sleet
eternal night
dry hazel
#

xd

young knoll
#

But of a hiatus in there

grim hound
eternal night
ivory sleet
#

@river oracle u promised to teach my how to pr, gonna enjoy once that takes place

eternal night
#

I think machine also signed it ?

#

unsure

young knoll
#

Just get paper as an organization to sign it

#

That’s totally how it works trust me

young knoll
eternal night
#

NODDERS PR comments true

grim hound
slate tinsel
young knoll
#

Yes teleportation ejects passengers atm

#

We actually have a pr for that open :p

grim hound
eternal night
#

infact, a new spigot PR of mine is floating the stash way this very minute

grim hound
#

So there's no need

#

To do it explicitly

eternal night
#

the pdc list one I finished xD

#

my tests are passing

river oracle
#

ah

eternal night
#

now to write ages of javadocs

river oracle
eternal night
#

its my fav

young knoll
#

Tests: Passed
Checkstyle: Passed
Hotel: Trivago

eternal night
#

mostly to then smugly point out "read the docs" when people have obvious questions

river oracle
remote swallow
#

Y2k am i gonna end up in vc untill 5am again today

slate tinsel
ivory sleet
young knoll
#

Choco seems to be the javadoc guy

#

He judges mine at least :p

eternal night
#

well choco is just a great guy in general

#

obviously he writes javadocs

young knoll
#

Idk he’s kinda smelly

rotund ravine
remote swallow
# river oracle RIP

Last time i checked rip does not answer a yes or no question, but idk if thats changed

river oracle
remote swallow
#

Amazing

young knoll
#

Can’t believe vcs are getting used

river oracle
#

we do chat sometimes you must join in its quite fun!

remote swallow
#

Im being held at gun point

ivory sleet
#

once me and smile finishes some business we gonna hop on vc again

river oracle
#

wait I was reminded I need to look at the inventory events for my PR

ivory sleet
#

coll u should join

river oracle
#

Conclube has businesss with the smiley guy 🫢

remote swallow
#

My dog is attacking her bed barking

young knoll
#

Probably discussing a takeover of the server

slate tinsel
# grim hound Yes

But how do I remove a falling block as a passenger on an armor stand, that's why remove doesn't seem to work, should I run eject, that's why I think it didn't work either

young knoll
#

Smh orange people always plotting

ivory sleet
young knoll
#

Ah yes the best language

remote swallow
#

Embed me into it

young knoll
#

How does one embed a human into php

pine sandal
#

Every carefully

young knoll
#

I guess you could probably serialize a human as a giant byte array

remote swallow
#

I will run /help

young knoll
#

How many bytes is the human genome

remote swallow
#

3

young knoll
#

And how long until Marco puts it in a plugin

dry hazel
#

2

pine sandal
#

hm, having something strange happen while trying to setup my dev env to work on craftbukkit.

sullen marlin
#

java -jar BuildTools.jar --dev

peak depot
#

what is PacketPlayOutPlayerInfo in nms 1.20

young knoll
grim hound
#

And before that it was

#

ClientboundPlayerInfoPacket

#

Do it

young knoll
#

He does kill children though

grim hound
peak depot
young knoll
#

I mean it happens

#

Sometimes you gotta break a couple eggs

grim hound
young knoll
#

?mappings

undone axleBOT
young knoll
#

Very useful for checking names

sick ermine
#

I'm trying to transfer chunks to a line in Minecraft. This gui will be a main chunk and surrounding chunks will be visible. I'm making a mathematical mistake on the 63rd line. Can you help me?

grim hound
hazy parrot
#

bit negation

hazy parrot
#

~0100 == 1011

grim hound
young knoll
#

Dang didn’t know that one

#

Neat

ivory sleet
hazy parrot
#

yeah i couldn't remember how its called lol

#

that is the name

grim hound
ivory sleet
sick ermine
grim hound
river oracle
eternal night
#

something something event constructors are not public API something something

grim hound
#

Historical moment

#

Marco is streaming

young knoll
#

I tried to do a LFSR in java the other day

grim hound
#

His java journey

young knoll
#

Didn’t succeed

sick ermine
#

Does anyone have any knowledge about this?

eternal night
#

I mean, its a grey area

#

but I would switch it yea

#

you should not be calling those yourself, if you do it live with the consequences

young knoll
#

Yeah we tend to try to keep them the same

grim hound
river oracle
eternal night
#

¯_(ツ)_/¯

river oracle
#

ig regardless I'll just wait for slime to comment

eternal night
#

I'd "break" it and move to EnchantingView

young knoll
#

Usually we deprecate old constructors but keep them

eternal night
#

Yea I mean

#

you can try that

#

and blind cast

#

and explode if someone fucked up

young knoll
#

Lol

eternal night
#

might be the "nicest" solution

#

instant deprecate(forRemoval=true) on it too (the then blind cast old one)

river oracle
eternal night
#

Well

grim hound
#

Mfo is coding The Bible

eternal night
#

it keeps plugins technically compiling if they are doing okay stuff

#

but yea

young knoll
#

Yeah I say generally but usually we are just adding more args

#

Not changing args

river oracle
#

Its staying until slime says otherwise

eternal night
young knoll
#

I suppose you could have the old one with a preconditions check

#

At least that blows up nicely

river oracle
#

need Commodore in master for merge pepeSobs

young knoll
#

Isn’t it already

river oracle
#

erm not the interface stuff iirc

#

idk how tf to use it

#

though ig that's a good reason to learn

ivory sleet
#

i mean just a nice brig exposure would be nice

#

:>

dry hazel
#

there's never too much bytecode manipulation

river oracle
#

oh

#

Commodore is in master already

ivory sleet
young knoll
#

Yeah commodore has been around a while

river oracle
pine sandal
#

Hm Thinking about how to do this extra work to add getting what structures exist in a chunk since MC does this annoying thing where structures have a start, then a list of structure pieces that can span over multiple chunks. So there is no "good" way to check for a structure in a chunk.

lost matrix
#

?paste

undone axleBOT
grim hound
# sick ermine

Do you wanna just represent base and empty chunks in a gui?

lost matrix
# sick ermine

GuiExcption is a specific exception from the dev of your Gui lib. Ask the dev or rather ensure that you dont pass -1 as a slot.

sick ermine
grim hound
sick ermine
grim hound
lost matrix
grim hound
#

Iterate through the inventory items by x and y with checking their respective chunks like: startX + x

sick ermine
grim hound
#

And you do

#

~offSet

#

Instead of

#

-offSet

grim hound
young knoll
#

Paper only

#

sadge

grim hound
#

Spigot doesn't have

#

A way to invoke a method each tick synchronously

#

I would need ByteBuddy for that

lost matrix
grim hound
#

/\

grim hound
young knoll
#

Invoke a method each tick synchronously

#

Is that not just a respecting task with a period of 1

sick ermine
river oracle
sick ermine
grim hound
young knoll
#

I guess

grim hound
#

Yeaaah

sick ermine
#

what is '~' on java

young knoll
#

But why do you need to reimplement the scheduler

#

When you could use the scheduler

river oracle
#

if you're going to reimplment so much you might as well lol

sullen marlin
#

he's making a holier version obviously

#

gone full templeos

grim hound
river oracle
#

the ultimate experience, reimplment the entire server

slender elbow
#

it got more holes

grim hound
slender elbow
#

uh

#

that's too many questions

river oracle
# grim hound Whatchu meaaan

Belonging to, derived from, or associated with a divine power; sacred.
Regarded with veneration or specified for a religious purpose.
Living or undertaken with highly moral or spiritual purpose; saintly.
Common meanings for holy

grim hound
young knoll
#

I reimplemented something that’s available on spigot and paper using something that’s only available on paper

#

Stonks?

grim hound
#

But let's not exaggerate

grim hound
grim hound
slender elbow
#

no thanks im good

grim hound
#

Mm

#

Seems like a good excuse

glad prawn
grim hound
#

Would switch(packet.getClass().getSimpleName()) be the fastest way to check whether it's a certain packet?

#

We talking 4+ cases

#

@twin venture

#

Show your

storm crystal
grim hound
#

Profile classes

twin venture
grim hound
#

Yes

#

The loadProfile

#

Again

#

Are both of the lists/maps

twin venture
#

as you can see the Profile class

grim hound
#

Concurrent?

twin venture
#

yes

grim hound
#

Uh

#

What about the Set?

twin venture
#

should i edit it?

#

private Set<SWUser> players = Sets.newHashSet();

grim hound
twin venture
#

the profiles map is

sick ermine
twin venture
#

private final ConcurrentHashMap<UUID, SWUser> profiles;

grim hound
storm crystal
#

oh I see thats how it looks like

#

just split into sectors

#

you doing RTS gamemode?

twin venture
grim hound
#

Yeah

sick ermine
grim hound
#

But that shouldn't cause only one first player's data to be loaded

#

Cuz you mean

#

It's for 2 different Players right?

twin venture
#

ofc , each player will have his own profile

#

not only 2

#

for unlimited amount of player's xD

grim hound
#

Got it

#

First make the Set concurrent

twin venture
#

alr

grim hound
#

Send the error

#

That you got

twin venture
#

it does not send any error when it loading the user

#

so it might be something else?

grim hound
#

It did

twin venture
#

yes

grim hound
#

The user is null

twin venture
#

yes

#

its not being added to the hashmap [caching for some reason ..]

grim hound
#

Then show the adding

#

The adding

twin venture
#

alright

grim hound
#

And how do you get it later on?

twin venture
#

getProfile(UUID uuid);

grim hound
#

Show where it's invoked

#

Wait

#

You use a HashMap as well?

#

Man use a ConcurrentHashMap

twin venture
#

yes

#

i changed it for testing

#

when you said it may be the problem ..

grim hound
#

I mentioned the Set

ivory sleet
#

You can use ConcurrentHashMap.newKeySet() to get a concurrent set

grim hound
#

I think it was like PlatformDependant.newConcurrentSet

ivory sleet
#

if u want

twin venture
#

let me try the first one

grim hound
#

It'll work, yeah

#

Just make sure to use a different Map instance

#

It's an instance method

#

I think

#

Or maybe it was a static one?

#

Remove the "new"

twin venture
#

no static

grim hound
#

Just make it a Set

twin venture
#

like that?

grim hound
#

It probably won't fix the issue tho

twin venture
#

tbh i don't use the Set anywhere

grim hound
#

Can you send the code instead?

#

Or wait

#

Debug all of the elements

#

Of the maps

twin venture
#

yeah i will debug it

grim hound
#

Send the error

#

Here

twin venture
#

[23:09:10 ERROR]: Could not pass event InventoryClickEvent to
java.lang.NullPointerException: Cannot invoke "me.dev.mskywars.core.users.SWUser.player()" because "user" is null

grim hound
#

Show the gamejoin

#

Debug UUID at Join

#

And at command invoke

twin venture
#

it works for the first user .

grim hound
#

You sure?

twin venture
#

yes

#

bcz it send him and teleport him

#

so that mean the user is loaded correctly

#

but the problem come for the second user who joins

grim hound
#

See for errors

twin venture
#

?_?

grim hound
#

The error is right in the console, I'mma go

twin venture
#

i saw it ..

worldly ingot
#

Y'all got enough live streams going on over there?

quaint mantle
#

Does an OfflinePlayer have a PDC?

#

Nope

worldly ingot
#

Not presently. I want to say there was an initiative to do this at some point? @young knoll?

quaint mantle
#

but Player's have a PDC so long as they are online

#

I can set a PDC

#

You have to smh load offlineplayer then get the pdc

twin venture
#

for some unkown reason , it only load the first player

remote swallow
young knoll
#

What is he streaming

#

More inventory blasphemy?

remote swallow
#

item stuff i think

eternal night
remote swallow
#

idk its nerd stuff

#

WAIT A FUCKING MINUTe

#

CHOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

worldly ingot
#

Nah I'm doing some work atm

eternal night
worldly ingot
remote swallow
#

SINCE FUCKING WHEN

worldly ingot
#

Uhhh

#

Uhhhhhhh

ivory sleet
#

ooo

worldly ingot
remote swallow
#

@sterile axle GET IN HERE AND LOOK AT UR EX

quaint mantle
remote swallow
#

@river oracle look also

ivory sleet
#

what server version... do you GUYS USE!? (/s)

young knoll
#

He’s actually updating it to 1.20

ivory sleet
#

OooO

river oracle
remote swallow
#

choco when were you going to tel us

worldly ingot
#

Real answer, been interviewing all of October, offered on Monday, signed the contract Wednesday

young knoll
#

Man made it past the 67 interviews

remote swallow
#

also what stuff are you working on

#

or is that nda

worldly ingot
#

I mean I do have two full time jobs, so there's that

eternal night
#

who is gonna do component PR

worldly ingot
#

Still me lol

#

Ready to kms 😎

river oracle
#

choco 2 full times job + spigot

#

wtf

remote swallow
#

just like dont disappear from us

young knoll
#

Man actually made plugin dev into a full time job

#

Bit jealous ngl

remote swallow
#

hes a hypixel dev

sterile axle
#

congrats

worldly ingot
#

I've embraced the pickle

#

Take that how you will

remote swallow
#

are you allowed to talk about what kinda of stuff you work on choco

worldly ingot
#

Not really, but I mean I've also not started on anything quite yet

#

So :p

remote swallow
#

are you just a general developer then

worldly ingot
#

Minigame developer

eternal night
#

Pls give me skyblocks coins

#

thanks

remote swallow
#

skyblock isnt minigame sad

worldly ingot
#

Not my department sorry :(

eternal night
#

¯_(ツ)_/¯

#

xD

remote swallow
#

what does the initive talent person work on

#

or did they leave

worldly ingot
#

She's still there, but not sure

kind hatch
remote swallow
kind hatch
#

Man I miss old school minigames

#

Skyblock really took over everything

young knoll
#

Yeah

remote swallow
#

now choco is gonna leave us

young knoll
#

Tbf that’s not hypixel’s fault

remote swallow
#

he'll only pop in every few weeks

young knoll
#

The masses like idle games

#

Well not quite an idle game

#

Idk what you’d call it

kind hatch
young knoll
#

Yeah I’ll be starting my skyblock plugin tomorrow

remote swallow
#

okay so coll

#

you live in canada

#

choco lives in canada

#

go and steal chocos computer and ip and steal hypixel

#

(in game)

ivory sleet
worldly ingot
#

Interviews? Yeah probably. Just 5. Technically 6, but they had no questions, they just offered there

remote swallow
#

how did you do 5 i thought it was like 10

ivory sleet
#

ahhh I see, congrats! :)

young knoll
#

That’s still kinda ridiculous imo

remote swallow
#

@echo basalt is gonna be jelous of you now choco

kind hatch
#

And here I thought 3 interviews was pushing it

echo basalt
#

:(

young knoll
#

3 interviews is pushing it

remote swallow
#

that was just said in vc lol

#

choco vouch for illusion in like a year

echo basalt
#

lmao

#

one thing I realized now that I'm a lot more experienced in making minigames

#

is that making minigames is fucking depressing

young knoll
#

Why would I go to Chocos pc to steal hypixel smh

#

I’ll just go to Simon

echo basalt
#

I just don't enjoy it

young knoll
#

Fair

#

Idk I haven’t worked on too many mini games

quaint mantle
echo basalt
#

I have been applying once every few months but they haven't been emailing me back

quaint mantle
#

It cost them to educate u maybe

echo basalt
#

it costs them to educate any new hires

young knoll
#

Simon is still the owner

#

How much I involvement he has, idk

timid hedge
#

Dies anyone know where i get the .json file for mcp for a client?

remote swallow
echo basalt
#

welp the hypercompetitive in me is starting to go bonkers

#

time to work

#

and build my portfolio even more

#

if choco did it so can I

#

good

young knoll
#

At least he was, idk if he moved

remote swallow
#

ah hes a french one

young knoll
#

They both were afaik

remote swallow
#

who is both

#

i only know of a simon hypixel

young knoll
#

Hypixel started as 2 friends

#

Making maps

remote swallow
#

was it secretly choco under a different name

young knoll
#

Man I remember playing their maps too

#

Time really does fly

lament slate
#

Question just started the switch ti IntelliJ idea and was wondedring iss gradle or maven better to use just opinions unless there the same

remote swallow
#

they both do pretty much similar things so its personal preference

young knoll
#

Spigot uses maven

#

And so does special source

#

So it’s probably easier

lament slate
#

Kk then maven it is thanks

#

well thats 3 for maven 0 for gradle maven it is thanks guys!

#

does it matter what order I put my attibutes for my plugin.yml like does name need to be first then verison etc?

eternal oxide
#

doesn't matter

#

keys are read by name not order

echo basalt
#

hm m

lament slate
#

thanks!

echo basalt
#

would

metricsDatabase
  .createMetric("player-count")
  .setField("count", 123)
  .push();

be clean think3d

young knoll
#

Oooh shiiii bStats 2

echo basalt
#

no just influx / prometheus

#

for my skyblock stuff

young knoll
#

Sadge

#

Looks fine to me

echo basalt
#

I could just make a bstats adapter

lament slate
#

in inteliJ i have the minecraft plugin does it there a way to auto export it to jar or do I have to do that myself?

echo basalt
#

ah crap I need to make a scheduler interface now

#

I'll just base it off bukkit

lament slate
#

could you be kind enough to maybe show where that button is sorry very new programmer here or tell me

#

thank you

echo basalt
#

both ways work

storm crystal
echo basalt
#

I prefer this one

storm crystal
#

although I do want more of rpg mmo centered approach

lament slate
#

ok

echo basalt
#

guess what I'm working on

lament slate
#

the green trinagle just runs the command

storm crystal
#

without idle stuff

lament slate
#

or the code not downloadws

echo basalt
#

hmm

lament slate
#

ok thank you!

hazy parrot
#

wait till u learn about double clicking ctrl

lament slate
#

well I got everything I wanted and me plugin works which is awesome however how do I install more plugins on intetllij since the homepage I can not get back to like a idiot

hollow lagoon
#

Hello, does anyone know what event is triggered when a structure is saved by a structure block?

lament slate
#

for spoigot idk ther est lol

hollow lagoon
#

I already looked at the doc and saw nothing

hazy parrot
#

and go to plugins

lament slate
#

ok thanks

lament slate
young knoll
#

Don’t think there is an event for that

hazy parrot
#

then without shift

#

or without ctrl

pine sandal
#

Anyone know how what a LongSet is used for in mojangs code? Investigating adding to the API to get structures that exist in a chunk, but other then starts (first part of a structure) eveything else is defined as references which are based somehow around logsets. (Probably to reference the chunk thaT the actual data is in but I haven't foudn where its used yet.)

echo basalt
#

let's see

#

nibbles are used in lighting

#

longs are prob part of the palette

pine sandal
#

Well this is part of the Structure data in the IChunkAccessor class. Its used in the structuresRefences field.

#

structuresRefences is a hashmap of Structure (The mojang class) to LongSet.

fossil flax
#

someone know why in this event the plugin broadcast the message on the third kill and not on the fifth

    public void onPlayerDeath(PlayerDeathEvent e) {
        Player victim = e.getEntity();
        Player killer = victim.getKiller();

        if (killer != null) {
            UUID killerId = killer.getUniqueId();

            int killCount = killCounts.getOrDefault(killerId, 0) + 1;
            killCounts.put(killerId, killCount);

            if (killCount == 5) {
                double bountyValue = generateBountyValue();
                setBountyValue(killerId, bountyValue);
                String formattedBounty = formatBountyValue(bountyValue);

                if (!bounties.containsKey(killerId)) {
                    Bukkit.broadcastMessage(Color("&eE' stata piazzata una taglia di &6&l" + formattedBounty + " &esu &c" + killer.getDisplayName() + "&e."));
                }

                killCounts.put(killerId, 0);
            } else if (killCount > 5) {
                killCounts.put(killerId, 0);
            }
        }
    }```
glad prawn
fossil flax
pine sandal
#

Print it out.

torn oyster
#

how do i disable picking items up through walls

lament slate
#

EntityPickupItemEvent(LivingEntity entity, Item item, int remaining)
maybe this

#

i take it back its when something is picked up

umbral ridge
#

hey what's the latest version of permissionsEx? 1.23.4?

#

or is it 2.0

torn oyster
lament slate
#

1.23.4-3

#

is what it says on the site

#

so that

umbral ridge
#

what is dis

grand flint
#

Literally never heard of addstar

grand flint
torn oyster
#

and thin walls

grand flint
glad prawn
torn oyster
#

i already have the event

#

right now i am cancelling it if they aren't directly on the block

grand flint
#

What event?

#

Okay

torn oyster
#

it works

grand flint
#

Okay

torn oyster
#

but its just annoying since you expect to pick it up from further

grand flint
#

Then check further and check blocks around the item or the player

umbral ridge
#

xD

grand flint
#

Check the position of the item, and the player and the blocks around it

#

If everything is how you want it, then add the item to their inventory

slender elbow
#

it's glorious

umbral ridge
#

I never used in-game commands though

#

But now i wonder if I set the player rank by code is that the same as if I did it with commands?

#

@slender elbow 🤔

#

"PaperSpigot ... Dang it ... I think @zml2008 said something about PaperSpigot either being not supported or badly programmed somehow."

#

Luckily I'm on Spigot

glad prawn
#

i'm no longer a fan of Pex, it's outdated, last time I used it was 4 years ago.

river oracle
#

Making everything data driven is so much work

slender elbow
#

just ask chatgpt

slender elbow
river oracle
#

why even use pex is it even still updated

slender elbow
#

nope

river oracle
#

yeah no pex is dead

slender elbow
#

of course you are free to use whatever permission plugin you want, none either, but for me and for many other thousands of servers pex lacks some arguably fundamental mechanics a permission plugin should provide that lp does

carmine mica
#

like IntSet, ShortSet, CharSet, FloatSet, DoubleSet

#

and the 4000 other fastutil collection types

pine sandal
#

Turns out MC is using it to hold a ChunkPos encoded as a single Long. (Why they are using a LongSet to store a single Long who knows)

umbral ridge
halcyon hemlock
#

Hi spexx

grand flint
#

it has so much weight support

#

like i can link 6 roles to eachother

#

all having permissions from eachother

#

and the editor is insanely nice

warm light
#

many plugin add there custom items. so it can be obtain by /give <P> PluginName:ItemName
how can I make this?
I checked google. but didn't found any solution
also I forgot the plugin name so can't check its src

#

@grand flint if I register own give command. its going to overwrite the orginal command right?

grand flint
#

no you dont need to do that

#

there is another way

#

i forgot though

#

cuz u can do it w biomes and sounds using texturepacks and datapacks

#

just wait for someone else to reply

shadow zinc
#

for spigot, i have listener class that is only used when halted=true, would it make more sense to make every listener in that class check if halted=true or only register the class when halted=true, and then unregister when it equals false

pastel axle
#

Using the Chat Component API for the first time, and I'm a bit confused.

        ComponentBuilder builder = new ComponentBuilder("[Plotty]").color(ChatColor.DARK_BLUE)
            .append("Your Plots:").color(ChatColor.BLUE)
            .append("\n");
            TextComponent plotId = new TextComponent(Integer.toString(plot.id));
            plotId.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/plot tp " + plot.id));
            plotId.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(ChatColor.AQUA + "Click to teleport\nto plot " + plot.id)));
            builder.append(plotId)
                .append(" [x:").color(ChatColor.BLUE);

In the above example, isn't the hover/click event only supposed to apply to plotId? Why does it carry on to the [x: string and onwards?

carmine mica
#

one would think so...

#

except the default is to copy the style of the previously appended component for whatever reason

#

you have to add a second arugment when you append " [x: ", FormatRetention.NONE or smth

pastel axle
#

Ah, well that's not documented on the wiki page

#

I see now. Much appreciated.

#

I do see the usefulness (don't have to keep re-applying the same colour for different snippets) but it's a bit unintuitive.

carmine mica
#

well components are a tree. so ideally you wouldn't repeat the same color like that, you would color the parent component and then that color would be applied to all the children when rendered