#help-development

1 messages · Page 1341 of 1

wet breach
#

I currently make $5k/month as a tire tech. So it would have to be minimum of that

echo river
#

Damn

#

Nice

wet breach
#

and I even have benefits such as taking breaks whenever I want, calling off work whenever

#

guaranteed 40 hours of work

echo river
#

For how long have u been developping stuff ?

wet breach
#

in MC or in general?

echo river
#

In mc

wet breach
#

since pretty much its beginning

echo river
#

Oh wow

wet breach
#

I helped make holograms a thing in MC 😛

echo river
#

W achievment

lilac dagger
#

Wait, the old way?

wet breach
#

this is the first plugin to ever provide holograms

#

holographic displays came out 3 months later I think it was

young knoll
#

What was the old way

wet breach
#

the old way is the horse age bug

young knoll
#

It was like wither skulls or fucked up horses wasn’t it

wet breach
#

once 1.8 hit, it turned into armorstands since mojang patched the horse age bug

echo river
#

Lol what

#

Lmao wtf?

#

Never heard of that

wet breach
#

yeah if you set the horses age to a negative value, it turned invisible and upside down too if I recalled

#

and all that was visible was the name tag

#

which is what is the hologram

echo river
#

Hahaha

#

This is hilarious

wet breach
#

holoapi's devs were not the ones to discover the bug

fierce cipher
#

@wet breach can u do it?

wet breach
#

someone else did that and we credited them for finding it, but we took that info and made it into a plugin 😄

fierce cipher
#

can u do it

#

can u send me the jar file

echo river
#

Omg hes back

wet breach
#

and well, here we are now with mojang making entity displays which is awesome

fierce cipher
#

can u do it gng

wet breach
#

also because of holoapi and holographic displays mojang was forced to keep holograms

#

and the armorstand was chosen for that role

echo river
#

Yeah mojang has been doing good technical stuff recently

wet breach
#

nothing at the time was better suited

fierce cipher
#

@wet breach can u do it like send me the jar file??

echo river
#

Yeah makes sense

#

The api in 1.8 is hideous

fierce cipher
#

was bro playing with me?

echo river
#

Log and Log2

#

Lmao

wet breach
fierce cipher
#

no bro

echo river
#

Sorry

fierce cipher
#

can u do it

#

i rlly need smone to do it

wet breach
#

I was there for the whole debacle of the DMCA stuff. I left BukkitDev shortly after that lmao

echo river
#

Oh yeah

#

Mojang wanted to take bukkit down right ?

wet breach
#

no

echo river
#

Oh

wet breach
#

otherway around. A developer from bukkit dmca'ed Mojang

#

and tried to take down bukkit

fierce cipher
#

yo @wet breach if u can make the jar u get 100 bucks

fierce cipher
#

im dead ass ong no crosses

wet breach
#

Mojang just never responded to the guy, they were upset because they were like one of the only devs to not get hired by mojang and have their rights to code paid off

fierce cipher
#

so can u do it?

wet breach
#

and so they felt cheated due to this and believed mojang was stealing or benefiting from bukkit code

#

so it was done in rage/retaliation

fierce cipher
#

bro i will pay u 100 bicks

#

bucks*

#

ONG

#

can u do it

#

you will also get dev

lilac dagger
#

Yo, if you're in money you can pay me and i'll compile you anything

#

😄

echo river
wet breach
#

Mojang owns bukkit just fyi

#

that was the other thing that developer didn't know

#

even though it wasn't really a secret and by the time they found out mojang had owned bukkit for a few years lol

#

anyways it was crazy XD

echo river
fierce cipher
#

@lilac dagger make me it and i'll pay u

lilac dagger
fierce cipher
#

this is my challenge i doubt u can do it btw, its a yes or no and u have to do it in a week 🙂

Can you make a server that runs Minecraft 26.2 Snapshot 4 by remaking paper to support 26.2, and supports paper & purpur 1.8.8 - 1.21.11 plugins by automatically remapping the plugins? It should support eaglecraft and bedrock edition (Port 19132), and should work with bungeeguard.

its ok if u cant btw

#

that

#

LOL bro def gonna give up

lilac dagger
#

Ah

fierce cipher
echo river
#

"LOL bro def gonna give up"

#

like

#

mmmmmh

fierce cipher
#

bc he stopped typing

lilac dagger
#

You know

fierce cipher
#

@austere cove

#

@vital token

#

@worldly ingot

echo river
#

omfg

lilac dagger
#

This challenge sounds possible if i worked with all of these at once lol

fierce cipher
#

wdym its one thing

lilac dagger
#

But not sure about plugin bit

fierce cipher
#

can you make me the jar file and i pay u $100

lilac dagger
#

They all work differently i can't unify them to work from 1.8.8 to latest

#

Nah man

#

100 is nothing for this

fierce cipher
#

@worldly ingot
this is my challenge i doubt u can do it btw, its a yes or no and u have to do it in a week 🙂

Can you make a server that runs Minecraft 26.2 Snapshot 4 by remaking paper to support 26.2, and supports paper & purpur 1.8.8 - 1.21.11 plugins by automatically remapping the plugins? It should support eaglecraft and bedrock edition (Port 19132), and should work with bungeeguard.

its ok if u cant btw

lilac dagger
#

Only thing i see is a ban tbh

slender elbow
#

@fierce cipher i will do it for $2000 USD

worldly ingot
#

I was generous

slender elbow
#

50% upfront

echo river
#

lol he got banned

lilac dagger
#

Lol

#

Figured

echo river
#

thank mod

worldly ingot
#

I muted him for a week. Might give him an opportunity to learn how we conduct ourselves in this community instead

echo river
#

haha

echo river
#

I dont think he understands why he got muted

#

it might be a bit hard for him

#
        Block block = world.getBlockAt(blockLocation);
        // Updates the block Type first, then changes the state :
        block.setType(material);
        BlockState blockState = block.getState();
        blockState.setData(materialData);
        // If the block is directional, adjusts its facing
        if (this.getDirection() != null && materialData instanceof Directional) {
            Directional directionalData = (Directional) materialData;

            RelativeBlockDirection relativeDirection = this.getDirection();
            AbsoluteBlockDirection absoluteDirection = direction.getAbsoluteWith(relativeDirection);
            directionalData.setFacingDirection(absoluteDirection.toBlockFace());
        }

        // Then updates the block
//        blockState.setRawData(materialData.getData());
        blockState.update();
    }```
#

hum

#

Caused by: java.lang.IllegalArgumentException: Provided data is not of type org.bukkit.material.MaterialData, found org.bukkit.material.Bed

#

at blockState.setData(materialData);

#

I have 2 questions

#

First is why tf is this hapenning ? Like materialData is of type MaterialData

#

and if changing the materialData after using blockFace.setData() actually works

#

(I was using rawdata, which worked fine but I want to understand why this doesnt work)

#

(btw this is a method for placing structures)

#

nevermind I think this is because of block updates

#

I'm using setTypeIdAndData() now and it works

rotund ravine
quaint basin
#

Is it possible to set an entity in a spawner using component data?

thorn isle
quaint basin
#

https://pastes.dev/xlz3F3M9MY I break the spawner and the entity appears on the item lore, but then when I place it on the ground, the spawner is missing the entity

quaint basin
young knoll
#

You need to be opped to place it with entity data

quaint basin
young knoll
#

You may also need to be in creative

quaint basin
young knoll
#

Use the place event to copy data to the placed block

quaint basin
thorn isle
#

they've evolved from screenshots to photos of computer screens

quaint basin
#

I have an /orders plugin that works on multiple servers.

For item collection, I'm doing the following:

Adding an item to a lock in a global Redis server where that order ID cannot be collected if it's already in the lock where the addition has a 5-minute time limit. After successfully adding the item to the lock, then performing the operation on the database, and once the database operation is completed, then giving the items to the player and removing the order ID from the lock (only removing it if successful).

Currently, this has a problem: the server closes before the task in the main thread that distributes the items is finished.

I'm probably overcomplicating this and maybe I don't even need Redis. Does anyone have a better suggestion?

https://pastes.dev/whwHfWhoF9]

#

I'm going to remove the Redis lock and only use the database for this. If it returns 0, it means the operation on the database has already been completed and I won't deliver the items. I had a duplicate in this plugin (that's why I added the lock to Redis) where the person was using a mod called Delay Packets. This only allows sending multiple click packets absurdly fast, right?

https://pastes.dev/MKbLqi8Tko

#

Now I just need to know how to implement the logic for what happens if the server closes before delivering the items to player inventory

echo basalt
#

You can either use a distributed lock + timeout or use the db itself yeah

quaint basin
echo basalt
#

the timeout would expire and the lock would unlock

#

pair that with a db call and you can see if it locked and expired, or if it locked and succeeded

quaint basin
# echo basalt pair that with a db call and you can see if it locked and expired, or if it lock...

I'll only use the database for this:

I'll have two fields in the database: delivery_status and delivery_server_id.

I'll allow item collection only if delivery_status = IDLE and automatically update it to PROCCESSING along with delivery_server_id.

After this database operation is completed, I'll give the items to the player and schedule an update of delivery_status to IDLE.

If the item task isn't executed, then delivery_status will be idle. When a server with this plugin installed starts, I check if there's any row with delivery_status = processing and if server_id matches delivery_server_id, then I update the state to idle

#

What do you think of this approach?

echo basalt
#

I mean yeah that'd effectively use the db as a lock

quaint basin
echo basalt
#

lower latency

#

You're doubling your processing latency by using sql for both

quaint basin
wet breach
#

this way you don't have to create extra queries to do cleanup

quaint basin
#

My world is taking up 200 GB. How many chunks need to be generated to occupy all that space?

echo river
#

Hey, I was just wondering why most of java is using private variables + getters/setters, I feel like this is a bit restricting especially in an api

#

Like if there is a bug in a method to set a variable you have to find a workaround instead of accessing a public variable, because the variable is private

#

(Fireball setDirection hum hum)

chrome beacon
#

but basically it keeps behavior contained so other parts of the code don't directly mess with the internal state of an object in a way that's not intended. A pro for APIs like Spigot is that it helps with maintaining backwards compatability. For example should a value no longer be represented by a primitive field but instead by a component or similar; Spigot can then just add the required conversion logic in to the setter/getter instead of having to check that field every tick for changes

echo river
#

yeah ok makes sense

#

but the bug is in the 1.8.8 api

#

sooo

#

its cooked

#

I found a fix but I barely understand the way its done lol

chrome beacon
#

Well if you're on 1.8.8 you really should be using a maintained fork

#

or be maintaining one yourself

echo river
#

where can I find one tho ?

chrome beacon
#

There are ton of them out there

#

just give it a search

#

Personally I recommend you just stay up to date

echo river
#

I want to do it in 1.8 lol

#

but you are talking about a fork of spigot right ?

#

because I cant really find a repo for spigot

chrome beacon
#

?stash

undone axleBOT
chrome beacon
#

?contribute

chrome beacon
#

^ you can skip account and cla stuff as you're not making a PR

echo river
#

ok

#

what is a pr btw ?

#

public repo ?

chrome beacon
#

Pull Request

echo river
#

oh

#

ok

#

so thats about licensing and legal stuff right ?

chrome beacon
#

The cla you mean?

#

It is yeah

echo river
#

ok ok

#

ty

golden turret
#

yo, how do i change the player name above his head on newer versions?

#

like, make his name rainbow

orchid trout
#

whats the difference between a duck?

buoyant viper
tender shard
orchid trout
mortal vortex
tender shard
umbral ridge
echo river
#

Hello, I want to make a small "NPC" plugin, nothing too complicated, just having fake players that send a message / open a menu when clicked. I want to code it myself, but I'm unsure on how to do it. Should I create a NPC class and then for each different NPC, a subclass, with different actions for each. Or should I add a "type" field to each NPC (maybe via an enum) to differentiate them

#

I find the first option more elegant but im not sure

ivory sleet
drowsy helm
#

not make them configurable?

#

If you want to hardcode it then i would say yeah first option is easiest, just make an NPC class and extend from it

flat folio
#

Hey, I have a problem. My account was hacked and the email was changed. What should I do?

drowsy helm
#

?support

undone axleBOT
drowsy helm
#

probs have to get your account deleted

wet breach
flat folio
#

I have a premium plugin like CMI.

wet breach
#

then I guess you are emailing support and hoping they can do something for you

#

personally I would just buy the plugin again

flat folio
#

😭

quaint basin
#

and i have two files. what should i use to see on app?

tender shard
#

?services

undone axleBOT
haughty pollen
#

mb sry

quaint basin
mortal vortex
#

Is an error normal...

wet breach
young knoll
#

Haven’t seen that one before

quaint basin
thorn isle
#

are you trying to analyze a heap dump

#

did you take a memory allocation sample with spark yet? that's not the same as a heap dump, it's like the cpu time sampler but for allocs

golden turret
sly topaz
#

well, I guess if you're fine with a rainbow limited to a palette of 16 colors

#

though even that might prove difficult due to name length limit

smoky anchor
sly topaz
#

handling disguised entities is a pain in the ass due to entity data expectations

ivory sleet
#

if u can use mannequins, whats stopping u from going the easy route w text displays

golden turret
#

what about packets?

#

but i saw the display name has a cap of 16

sly topaz
#

what do packets have to do with it

#

you can spawn text displays using packets if you want, but you are still going to have to use text displays

echo river
#

genuinely

#

I hate the 1.8 api

#

a stair is facing west, you get its facing, its west. A bed is facing west, you take its facing its... EAST

#

😭

#

And setFacing is reversed

#

Can I modify my spigot so it does things differently ?

thorn isle
#

just use worldedit or something to paste your structures rather than doing it manually

#

or alternatively use nms

echo river
#

lol

thorn isle
#

iirc bukkit also has blockdata (de)serialization methods that you ought to use rather than manually calling getters and setters for each property

echo river
#

well isnt spigot open source ?

#

couldnt I just modify how it behaves ?

#

oh

#

is bukkit the software and spigot just the api ?

#

that would make sense lol

thorn isle
#

kind of but not really

#

you can maybe try forking some 1.8 server project that has already done the legwork for you

#

but don't expect anyone here to handhold you through it

echo river
#

yeah ok

thorn isle
#

also, changing the way how the api behaves will break anything using the changed parts of the api

#

so unless you plan on writing all your plugins yourself, i'd advise against it

echo river
#

that what I was planning to do

#

I want to make a practice map thats a server

#

so it would only be used locally

#

hum

#

this is a bit overwhelming

#

I dont really understand the difference between bukkit, craftbukkit and spigot

#

in the server dir

#
public BlockFace getFacing() {
        byte data = (byte) (getData() & 0x7);

        switch (data) {
        case 0x0:
            return BlockFace.SOUTH;

        case 0x1:
            return BlockFace.WEST;

        case 0x2:
            return BlockFace.NORTH;

        case 0x3:
        default:
            return BlockFace.EAST;
        }
    }```
#

absolute madness

young knoll
#

1.8 moment

echo river
#

😭

#

I dont really know much about licenses and legal stuff, but since this is open source, I assume I can modify it and then publish it on github no ?

#

or are there issue related to the dmca ?

chrome beacon
#

Modify what?

#

Spigot you mean?

echo river
#

yeah

#
 public void setDirection(Vector direction) {
        Validate.notNull(direction, "Direction can not be null");
        double x = direction.getX();
        double y = direction.getY();
        double z = direction.getZ();
        double magnitude = (double) MathHelper.sqrt(x * x + y * y + z * z);
        getHandle().dirX = x / magnitude;
        getHandle().dirY = y / magnitude;
        getHandle().dirZ = z / magnitude;
    }```
normalizing the vector also modifies the speed
#

hahahahaa

#

😭

chrome beacon
#

Yeah

#

This is noted in modern javadoc

echo river
#

soo

#

ig this doesnt really matter for now since this is a personnal project

thorn isle
#

are you doing this for the sake of learning how to do it or are you just aiming to get a "practice server" whatever that is done

chrome beacon
#

I believe it's fine but just keep in mind you cannot share the jar

thorn isle
#

because unless you are specifically in it to learn the grit, forking 1.8 is definitely not the easiest or most effective way of going about doing the latter

echo river
#

like if I recompile a modified version I cannot share the jar ?

echo river
thorn isle
#

doesn't matter

#

you don't have to fork 1.8 to do it

echo river
#

wdym ?

thorn isle
#

write a plugin

echo river
#

yeah ik

#

but the api is broken

thorn isle
#

not really

#

not to mention that you're not allowed to distribute your modified server jar since it will include copyrighted object code

echo river
#

thats weird no ?

#

like

thorn isle
#

so it will at best be a nice personal trophy or a paperweight

echo river
#

ok ok

chrome beacon
echo river
#

ohh

thorn isle
#

the api works fine, and like i said, for pasting your practice map or whatever structure you're trying to paste, just add worldedit as a dependency and use its api; it exists on 1.8

echo river
#

ok ok

thorn isle
#

if you really insist on doing the block properties via setters yourself, just flip the BlockFace direction before setting it

#

that one thing is not worth taking the entire server apart and redoing it

echo river
#

I just dont really understand why I cant modify spigot and oopen source it

buoyant viper
thorn isle
#

you can open source the spigot part probably, but not the jar

#

the spigot codebase is a series of modifications applied on top of mojang code

#

to do anything useful with it, it needs to be whipped with the mojang code

#

which is haram

echo river
#

lmfao

buoyant viper
#

mojang is pork...

echo river
#

I think I dont really understand what bukkit and spigot are

thorn isle
#

this is why to get a runnable spigot jar you need to get buildtools, which will download the mojang code from mojang directly, and then apply the modifications on top of it, and locally produce the jar

echo river
#

oh ok

buoyant viper
#

Bukkit is an API that outlines a way of interfacing with Minecraft

CraftBukkit is the implementation of Bukkit that does the interfacing with Minecraft

Spigot is additions to both

echo river
#

ok

#

I mean I still dont get it but I get that mojang code = no no

#

lol

buoyant viper
#

yeah just dont redistribute mojang code in source or compiled forms and u will be good

echo river
#

yeah ok

buoyant viper
#

waiting for buildtools makes my brain go mush

lilac dagger
#

i just built everything once

#

😄

#

plus i still need to go via build tools to get the local repo things

rugged fulcrum
#

Anyone need a developer?

mortal vortex
thorn isle
#

I have a bunch of pending slave labor that I could use a developer to do for free

mortal vortex
#

Wow vcs… really great comment to make during black history month.

thorn isle
#

just wait until we get to pride month

echo river
#

lmao

umbral ridge
#

can you detect what type of a value is returned when you use select statements? in sql

lilac dagger
#

you can get the column names

umbral ridge
#

yes but can you get column types?

lilac dagger
#

do you need the datatypee?

#

hmm

umbral ridge
#

i could make a converter class but i dont know.. its a mess

#

it feels like it could be done easier but i havent found a solution yet

lilac dagger
#

the result set doesn't have a get type from column index/name

#

but i wonder if there's a query you can run

#

that gets the datatype

#

something like this maybe?

umbral ridge
#

i found this now

#

result set has a metadata

#

bruh

lilac dagger
#

nice

#

getColumnTypeName

#

pretty cool

umbral ridge
#

wish they had some kind of sql -> java data type mapper

#

i still have to manually check string and do something like Int (String) -> Int (data type)

lilac dagger
#

i just do it like this

#

tho it's interesting there's a metadata with column types

umbral ridge
#

yea

#

ill expose the ResultSet in my wrapper class

#

it also contains ResultState and like execution time.. etc..

echo basalt
lilac dagger
#

how do you do it?

echo basalt
#

I'd abstract statistics

#

More of a data structure ick for your case specifically

lilac dagger
#

i mean i could as well make a small orm

#

but this works fine

echo basalt
#

small ORM is fine I just don't like how you're doing stats :)

#

player id | statistic name | statistic value is a bit more flexible

lilac dagger
#

not sure i follow

#

i do have player ids

echo basalt
#

yeah but you also have a column for each statistic type and that's inflexible

lilac dagger
#

oh yeah, because i need to sort by column type

echo basalt
#

For leaderboards?

lilac dagger
#

yes

echo basalt
#

You could just use a WHERE

#

SELECT playerId, statisticValue FROM statistics WHERE statistic_id = "bombs_defused" ORDER BY DESC LIMIT 10 or whatever the query is

#

and that lets you do custom statistics and reuse that code everywhere

lilac dagger
#

so let me understand, you made a statistics table

#

player id'd with statistic value and name

#

and you put everything in there?

echo basalt
#

Yea

lilac dagger
#

what happens if you have 20 statistics times 40k from players

echo basalt
#

Not everyone plays the game and sql is built for large volumes anyways

lilac dagger
#

i guess you could index it

slender elbow
echo basalt
#

worry when it becomes a problem yeah

slender elbow
#

sql engines are built for more than you could ever imagine

echo basalt
#

I mean grocery stores keep all their transactions + receipts for like 2 years at least

#

so

lilac dagger
#

someone has to use columns

#

plus i think you can just add a new column if needed

echo basalt
#

lame

lilac dagger
echo basalt
#

cope

slender elbow
#

cringe

lilac dagger
#

Well, i'd need to pull a lot more queries per joined player

#

It's cool but my schema doesn't change often

slender elbow
#

and what's the problem with that

#

the relational part of relational database is important 😔

umbral ridge
#

what about that?

slender elbow
#

that doesn't look all that different than using jdbc directly

umbral ridge
#

its a little nicer isnt it?

slender elbow
#

the passing of params

#

the rest, ehhh

umbral ridge
#

i like to have things more explicit the way they are by default.. eg.: how do you know if query was successful? if there's no exception thrown? if there's no results? that's why i like things more explicit

lilac dagger
#

Even the current approach is a bit long in 2 of my minigames

umbral ridge
# slender elbow the passing of params

i wanna change that because right now its ok.. but since it's an object, i can pass anything i want in there and thats dangerous.. want to make it specific.. either a String which can be converted from any types like Integer, Boolean and would work fine, but pain in the ass comes from converting these.. so I dont know. because.. I could pass json as a parameter and effectively it's a string, but, I dont know how sql server will accept it

lilac dagger
#

I do have a json string

#

I use the TEXT data type

#

It's pretty cool that it works

slender elbow
#

any mediocre database has built-in json types you can query inside of directly

#

what kind of database do you use lol

lilac dagger
#

Sqlite doesn't as far as i know

umbral ridge
#

i use EmilyDatabase

#

XD

#

jk im on basic mysql

slender elbow
#

sqlite definitely has json operations

#

not specifically a json column type but it lets you operate on them

lilac dagger
#

I don't know, last time i checked i had to use TEXT instead

#

Oh yeah

umbral ridge
slender elbow
#

although, sqlite doesn't really have types to begin with

lilac dagger
#

Yeah, it has very few

slender elbow
#

no i mean

echo basalt
#

every time I try to abstract jdbc into something nicer I end up with a shittier jdbc

slender elbow
#

everything regarding types is a lie

lilac dagger
#

Oh

robust helm
#

every time i try jdbc, i end up liking mongodb

slender elbow
#

there is absolutely 0 type safety offered by sqlite

#

it's all stored equally, you can omit types entirely

lilac dagger
#

I see

slender elbow
#

you can enable some or another pragma directive but, like, it's a waste of time anyway

lilac dagger
#

I'll make an orm in the near future

#

Hopefully the end result will look nice

slender elbow
#

just use jooq lol

#

i mean if you wanna do it for fun go ahead

lilac dagger
#

And where's the fun in not building it from scratch

slender elbow
#

but if you want to save resources then that's going to take you nowhere

umbral ridge
#

wait, does mysql have types that java dont?

#

yes

#

christ, i have to make a mapper still

lilac dagger
#

Jooq seems cool but i was thinking more on the line of hibernate's orm

#

And have like the crud plus some sorting

umbral ridge
#

why are mushrooms growing like crazy everywhere

#

even on crafting tables

#

everywhere with a flat surface

#

inside houses

#

on wood planks

lilac dagger
#

Fungi devour wood if i remember correctly

#

Moist wood plus leaves and that's a perfect place for a mushroom

umbral ridge
lilac dagger
#

Oh

#

Minecraft mushrooms

umbral ridge
#

oh lol

#

XD

#

everywhere

lilac dagger
#

Is this from world generator?

umbral ridge
#

world generator is default

#

no there werent that many mushrooms here when i started but like they grow everywhere

lilac dagger
#

Might be a small bug i dunno if this is intended

thorn isle
#

they do grow and spread in low light conditions, and i think soul fire lanterns or whatever these are called give exactly that level of light

umbral ridge
#

XD

#

fuck

wanton fog
#

guys, can someone help me with my plugin??

#

i have a problem that when i shoot an arrow

#

it goes sideway

#

spigot 1.8

#

pls

#

help me

lilac dagger
#

It's really old tho

#

My guess is it has to do with entity id 0

#

Is there any other entities before you joined?

#

I think i had a similar bug on my 1.8 server

young knoll
#

Setting the velocity too high also breaks things

wanton fog
wanton fog
wanton fog
lilac dagger
#

Rejoining i think?

#

Or panda spigot

#

It's more new it has a download on github

lilac dagger
#

times 10 sounds like a lot

wanton fog
#

double speed = 10.0;

        arrow.motX = dir.getX() * speed;
        arrow.motY = dir.getY() * speed;
        arrow.motZ = dir.getZ() * speed;

        world.addEntity(arrow);
#

i use it

wanton fog
lilac dagger
#

Yeah

#

It's the best thing to run if you're on 1.8.8

#

Probably has some fixes

lilac dagger
#

Does it still go sideways?

wanton fog
#

wit

#

yeah, it still going sideway

#

but a little bit less

lilac dagger
#

Hmm

#

How do you calculate direction?

wanton fog
#

Vector dir = player.getLocation().getDirection().normalize();

#

do u know the problem?

lilac dagger
#

Might still be the entity id 0 i think

#

You can try the player.getEyeLocation().getdirection

#

Not sure it chsnges anything tho

wanton fog
#

it works but if i increase in velocity it goes sideway

lilac dagger
#

Well, find the max spot

wanton fog
#

if i put: double speed = 5; the arrow still going sideway

lilac dagger
#

Whst happens if a friend joins?

#

And tries to shoot

#

Does it go sideways still?

#

Let's see if my issue still exists

wanton fog
lilac dagger
#

@wanton fog does it still happen?

lilac dagger
#

hmm

#

so it's velocity too high then

umbral ridge
#

this happens with fireworks too

#

idk if its intentional or not

lilac dagger
#

might be velocity prediction being messed up on this version

#

is it still the same on newer versions?

young knoll
#

I believe so

#

Iirc it’s only the rendering that’s wrong though, the arrow still lands in the correct place?

marble shoal
#

Is there a Discord bot that can verify if users have purchased any of my plugins, submit reviews, etc.?

lilac dagger
#

I doubt because of cloudflare

mortal vortex
#

yess... scraping + cloudflare = pain in the ass

mortal vortex
#

How do you stop knockback on Mannequins? is it just a matter of events, or is there a setter?

young knoll
#

Are mannequin’s living entities?

#

If so you can use the knockback resistance attribute

mortal vortex
#

u tell me bucko

young knoll
#

Yes

#

They also have a setImmovable

mortal vortex
#

thnx

#

Facepalm i was doing setCollidable lol

golden turret
#

guys, I want to change the player name using packets and teams, this is the closest I could do

#

how should I do it right?

#

im delaying the packets so i can /tp and see if it works

sly topaz
# golden turret

what version are you developing for that you still have obfuscated names

golden turret
#

1.21.10

sly topaz
#

?nms

golden turret
#

gradle

#

i just found out that i need to add the entry to the team with the new name

#

instead of the old one

#

which can cause an issue, since multiple players will have the same empty name

#

i need to confirm that with a 3rd player though

sly topaz
#

sadge, they had useful blogposts

#

this was the popular gradle plugin for remapping with gradle

#

sadly it seems to have been archived recently. Should still work fine though

random grove
#

I want to programmatically open a container block (chest, barrel, etc.) for a player in a way that:

  1. Respects other protection plugins that may want to prevent a player from accessing the container
  2. Plays the chest open animation and sound
  3. Does not require the player to physically click the block

What event(s) do protection plugins (e.g. WorldGuard, GriefPrevention) typically cancel to prevent a player from opening a chest, and how can I check against those programmatically without the player physically clicking the block?

Also, does player.openInventory(container.getInventory()) correctly play the chest open animation and sound, or does that need to be handled separately?

My current best attempt:

// block is the container block, player is the player
PlayerInteractEvent fakeEvent = new PlayerInteractEvent(
    player,
    Action.RIGHT_CLICK_BLOCK,
    player.getInventory().getItemInMainHand(),
    block,
    BlockFace.UP
);
Bukkit.getPluginManager().callEvent(fakeEvent);

if (!fakeEvent.isCancelled()) {
    BlockState state = block.getState();
    if (state instanceof Container container) {
        player.openInventory(container.getInventory());
    }
}

Is this the right approach? Does firing a fake PlayerInteractEvent correctly trigger protection plugin checks? And does player.openInventory() handle the animation/sound, or do we need to do something extra?

#

Actually, to clarify — the code snippet above is just meant to illustrate the intent, not as a serious attempt. I'm aware it has issues (e.g. logging plugins like CoreProtect would record it as a real interaction). I'm more interested in understanding the correct approach from scratch.

thorn isle
#

this is always difficult because bukkit has no first-class concept for "protection"

#

firing an interact event should in principle probably be enough for container access, but your mileage may wary depending on the protection plugin

#

iirc no, opening the inventory like that does not fire the sounds and open the lid, but i'm not 100%; try it and see

#

regarding the fake event, remember to cancel them before the monitor priority, as otherwise e.g. custom item plugins might fire off item use logic for the held item; again whether this works or not depends on which priority those plugins listen to at

#

also be aware that anticheat plugins might kick the player or cancel the event if you fire an interact event for a block that's far away

random grove
#

Is there a smaller subtitle I can send a player? I've done

player.sendTitle("", SUBTITLE, 0, TEMP_TICKS + 20, 20);

But the subtitle still appears very large on the screen. I could have sworn that I have seen other servers show smaller subtitles to players, ones that don't take up the entire screen.

thorn isle
#

there's the actionbar, but it's much lower and much smaller, shown over the hotbar

#

the title itself can be made smaller and moved around the screen with a custom font

random grove
#

thanks

pine forge
#

Is there a known problem where AdvancementDoneEvents dont seem to be emitted on 26.1.2 servers?

rugged fulcrum
#

Can someone help me? I need a developer

orchid gazelle
#

?metaquestion

#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

pseudo hazel
#

if you need a developer to make things for you

#

?services

undone axleBOT
grave abyss
#

How to acually implement shield stunning back in to spigot?

mortal vortex
#

Was that a thing?

thorn isle
#

is it no longer a thing?

#

i assume you the mechanic where hitting a shield with an axe knocks it down and "stuns" it for a bit

slender elbow
#

🤔

mortal vortex
thorn isle
#

i mean yeah it is, a cooldown to using the shield

pseudo hazel
#

yeah the cooldown is only active if it got hit by an axe and there is a kind of breaking sound that plays too

slender elbow
#

yeah but stunning didn't get removed or anything lol

#

unless spigot bug but w/e

thorn isle
#

inb4 "i mean spiggot 1.8"

young knoll
#

1.8 doesn't even have shields :c

slender elbow
#

you'd think

#

but that's how they get ya!

worldly ingot
#

inb4 they backported shields

golden turret
#

yo, any ideas for a concurrent TreeSet?

#

it would be nice if i didnt to manually sync

thorn isle
#

java has a concurrent skip list map which you can iirc use as a tree set

golden turret
#

yea, just found out

thorn isle
#

i recall it being one of the best performing concurrent sorted set implementations in the world

#

beaten only by some arm-specific impl using LL/SC nonsense

golden turret
#

i just found out i actually need a concurrent list 😭

#

because im sorting my stuff by priority and i want to be able insert elements with the same priority

thorn isle
#

consider map<priority, set<T>>

#

there are concurrent linked list implementations i'm certain and i'm pretty sure the jdk has at least one, concurrentlinkeddeque perhaps, but iirc that's not indexable into

#

but a treemap that maps from priority to a bucket of elements all sharing the same priority will work just as well

jagged matrix
#

command /smpstart: permission: vexon-smputil.smpstart trigger: execute console command "/minecraft:tp @a %player%" execute console command "/title @a title [{bold:true ,text:"START!",color:green ,underlined:true }]" execute console command "/minecraft:clear @a" execute console command "/minecraft:give @a golden_carrot 16" execute console command "/essentials:killall drops" execute console command "/minecraft:worldborder set 2500" execute console command "/minecraft:gamrule pvp false" wait 3 seconds execute console command "/title @a title [{bold:true ,text:"30 MINS NO PVP",color:dark_red ,underlined:false }]" execute console command "/minecraft:weather clear" execute console command "/minecraft:time set 1000" wait 30 minutes execute console command "/minecraft:gamrule pvp true" execute console command "/title @a title [{bold:true ,text:"PVP ON!",color:green ,underlined:false }]"

why doesen't it work (the title)

chrome beacon
#

I recommend you ask about Skript in the SkUnity discord

#

but I'm going to assume it's because of the " "

#

Your command contains it so now it's confused to where the command end or starts

winter jungle
sly topaz
#

that's a funny way to use a scripting language

echo river
#

yo guys fun fact, in 1.8.8, the bottom and top part of doors do not behave the same with Facings

#

😄

#

HAHAHA

#

funny right ?

wet breach
#

you mean a known thing?

thorn isle
#

at the risk of repeating myself, have you tried doing this with the worldedit api yet

echo river
#

lol

#

Bed             : getFacing() = same as MC, setFacingDirection = same as MC

Button (stone)         : getFacing() = same as MC, setFacingDirection = same as MC
Button (wood)         : idem

Chest
Ender Chest        : getFacing() = same as MC, setFacingDirection = same as MC
Trapped Chest

Furnace
Dispenser        : getFacing() = same as MC, setFacingDirection = same as MC
Dropper

Repeater        : getFacing() = opposite to MC, setFacingDirection = opposite to MC (same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing)
Comparator : Not Directional

Cocoa             : getFacing() = same as MC, setFacingDirection = same as MC


DOORS : 
All doors behave the same, however the top half of the door is not affected by getFacing() or setFacingDirection(), the raw data is always 8, which translates to the Facing WEST, with getFacing(). The bottom half handles the facing.

            : getFacing() = opposite to MC, setFacingDirection = opposite to MC (same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing) (Only for the lower half of the door)



GATES : 
All gates behave the same
            : getFacing() = the Direction to the left of the Minecraft Direction : SOUTH (Minecraft) = EAST (Spigot), WEST = SOUTH, NORTH = WEST, EAST = NORTH, setFacingDirection = same as getFacing()) => This is a case of the use of "Spigot Facing" instead of "Minecraft Facing, but this time, it is not using the opposite direction, but the direction to the left.


Ladder
Lever
Piston
Sticky Piston
Pumpkin
Jack o' Lantern
Redstone Torch
Torch

Skull

Stairs

Wooden Trapdoor
Iron Trapdoor

Tripwire Hook
sonic sonnet
#

Hi, whats the best way to create bungeecord with multiple hub servers?

Because in the config I need to setup an fallback server for bungeecord to work. But the fallback server can change, bacause lobby-1 can get reboot. And in the meantime the fallback server is offline players can't connect (they get an com.google.common.base.Preconditions.checkArgument(Preconditions.java:145))

And the screenshot code is not working when the fallback server is offline. How can I fix this?

sullen marlin
#

Why not just use the priorities system inbuilt to bungee?

sonic sonnet
#

Because I add/remove servers automatically, we have a lot of instances

#

It would be ideal to have an event before the internal priority server is picked to modify the result and bypass the priority, but that is not possible. Or to change the priorities trough the API.

wet breach
#

second why not make use of transfer packets and move them to another hub?

thorn isle
#

use velocity and the proxy connect event and write your custom logic for selecting which backend a player goes to on join

wet breach
#

but the solution here is quite obvious, stop rebooting the hub so much

#

that shouldn't be a normal everyday thing and if it is you have issues that should be resolved so you don't have to do that

sonic sonnet
wet breach
#

night reboots shouldn't be a thing

sonic sonnet
#

Alright I understand your point. But still I want to look for a solution because in the rare case I do need to reboot the lobbies, I dont want to lose a lot of players...

wet breach
#

well you don't lose them

#

they come back

sonic sonnet
wet breach
#

but yeah I routinely let mc servers run for months before rebooting them. Servers are capalble of that or should be. If you loose the proxy server you are going to lose players regardless where they are at, unless you can move them to another proxy. Since the hub is a mc server itself and instead of moving them to another mc server that may just be another game mode, you can just have them move to a minimal world/server of nothing. IE its an mc server that implements the bare minimum to allow connecting. Once your hub server comes back up, just move them all back. Bungee has api to move players to servers.

umbral ridge
#

and the system

wet breach
#

no

umbral ridge
#

yes

wet breach
#

if you are rebooting you are just ignoring a problem

karmic fossil
#

Good I would like to change my name on the spigot page if possible

wet breach
#

java didn't come out today

umbral ridge
#

if you are not rebooting you are ignoring the problem

wet breach
#

Java is used as a server everywhere

umbral ridge
#

XD

wet breach
#

why is it those places don't need to reboot but MC you must do so?

umbral ridge
#

a lot depends on the system and hardware

wet breach
#

what makes MC more special then any other software out there?

sonic sonnet
#

Sometimes its better not to argue with some people 😂 doesn't make any sense

umbral ridge
#

if we want to discuss this further, i have to tell you how minecraft works

wet breach
umbral ridge
#

you are a fallacy

wet breach
#

Java is simply not new, minecraft is not some revolutionary software either. It doesn't make use of anything different then other servers out there that runs on java.

sonic sonnet
#

Just google "is it good to reboot a minecraft server everyday?" and ALL forum post literally say the same.. lol

wet breach
#

because they don't know java

#

I probably been running servers longer than you been alive or nearly so.

#

and I have been using Java since it came out

sonic sonnet
#

I have colleague it workers who been here for over 50+ years and don't know how to make an excel formula... 😂

wet breach
#

cool, not talking math here

sonic sonnet
#

Just saying that time doesn't say anything. But alright. You win, I don't have time for this 🤓

wet breach
#

if you are rebooting everyday it means you have a plugin that is causing issues and needs to be resolved. Sometimes the mc server code has a flaw in it, mojang isn't always perfect and that should be fixed too. But the fix is not rebooting, all that is doing is just avoiding fixing the problem that causes you to need to reboot to begin with

#

longest I have ran an mc server without rebooting it, is 1 year

#

I had to reboot because the system OS needed to reboot to update the kernel

#

either I am some mystical wizard only capable of running an mc server that long without a reboot or I actually know what I am doing

#

the proxy server needing to reboot is understandable because sometimes you get ghost connections locked up in the system and you can only clear it if the application that originally created it dies.

#

but the mc servers on the other hand not true since its the proxy that handles all the connections

#

this is why profiling your java applications is a thing

#

as well as why JVM arguments even exist

#

so you can tailor your JVM to your needs

thorn isle
rotund ravine
#

Ahh you already said that

wet breach
#

Lol

echo basalt
#

let the dude reboot his stuff damn

echo basalt
#

in any case resilient systems should handle downtime gracefully

buoyant viper
#

u should not need to restart a minecraft server Daily lowk

wet breach
# solid heart Could be a hardware issue?

The only hardware issue that would require rebooting a jvm would be failing ram or failing storage drive which if thats the case you have bigger issues than worrying about rebooting the jvm.

solid heart
wet breach
#

When it comes to servers rebooting should not be an everyday thing or be necessary. That is not how they are designed

solid heart
#

If op is hosting on their own hardware I'd say they should check that out, otherwise their provider's machines are probably pretty good

wet breach
#

If they want to implement graceful reboots to make it more convenient for their players that is fine. But my point has been rebooting daily just should not be necessary and if it is you have plugins or something causing problems and should be looked into to resolve.

solid heart
#

I agree that having to reboot daily is unusual

mortal vortex
#

you’re using a scripting language like a command block

#

Skript has a send title thing. You don’t need to daisy chain commands and hope they work.

soft swallow
#

Please dms me

#

Who would like to help me with the dms server, I will pay? someone who can handle the deluxe menu

undone axleBOT
robust helm
#

handling delux menu is tough 🥀

civic mica
robust helm
#

should have added /s mb

thorn isle
#

shmeluxe shmenu

#

just do chest guis

thorn isle
#

i am interested in receiving money

#

give me money for free

hybrid spoke
lilac dagger
#

Cough give all your money to the house cough

lilac dagger
tender shard
quaint basin
#

And sorry for the delay

thorn isle
#

take an allocation sample with spark also

kind hatch
#

How would I go about adding a patch to spigot directly?
I'm looking to add a configuration option to the spigot.yml, but I don't know how to actually get to that point.

#

I understand how to contribute to/work with bukkit and craftbukkit, but not spigot.

sullen marlin
#

Commit it to Spigot-Server and then run ./rebuildPatches

kind hatch
#

Spigot-Server as in the the folder generated by BuildTools?

#

Or is there something I'm missing on stash?

sullen marlin
#

(buildtools)

mortal vortex
kind hatch
#

I think I have figured it out, but I'm not sure how to send these patches to stash now.

kind hatch
#

Does anyone know what spigot changes when it comes to chunk loading?
Cause I am having trouble with chunks not unloading and I can't seem to pin down why.

#

I also can't find any related settings that would mess with it either

umbral ridge
#

there is a setting in spigot or bukkit.yml that lets you control when the server unloads chunks, maybe you have changed it

kind hatch
#

What setting specifically?

thorn isle
#

Chunk gc iirc, but I don't think it has done anything since mojang reworked the system in 1.13 or 1.14

quaint basin
#

https://pastes.dev/yBX1xTfrmj Here, the CraftPlayer instance remains active even after the player leaves for 12 hours because the lifetime is 12 hours?

#

If this code is executed for the player ofc

thorn isle
#

I think so yes though I'm not 100% sure if the player disconnecting will clear it

#

One would think it would, but reasonable assumptions are off the table in thus ecosystem

quaint basin
thorn isle
#

Have you taken a spark alloc sample yet

quaint basin
#

I have 60 craftplayer instances with 10 onlines

chrome beacon
quaint basin
thorn isle
#

Which craftplayer? I see a bunch of humanentities

quaint basin
#

Actually, this is for searching for items in /ah by a specific name

thorn isle
#

Which line are we talking about

chrome beacon
#

Yeah but what are you doing with the object

quaint basin
quaint basin
chrome beacon
#

The dialog

quaint basin
#

i send all the code

thorn isle
quaint basin
chrome beacon
thorn isle
#

if we're talking about the humanEntity variable which is passed to the lambda, yes, that is strongly referenced by the lambda

chrome beacon
#

What fixes the leak

thorn isle
#

which in turn will be strongly referenced by the action callback system until the dialog gets unregistered from it

thorn isle
#

i doubt that

quaint basin
thorn isle
#

that that has anything to do with a leak that'd be related to the humanEntity variable

#

have you taken an alloc sample yet? i'm not talking about a heap dump

quaint basin
#

I can send you the heap dump if you want

thorn isle
#

spark sampler start --alloc

quaint basin
#

this can crash/lag the server?

thorn isle
#

to the same extent as spark sampler start can crash or lag your server

#

it's a sampler

#

--alloc makes it sample memory allocations instead of cpu time spent

quaint basin
#

spark sampler start --alloc
[21:36:02 INFO]: [⚡] Stopping the background profiler before starting... please wait
[21:36:02 INFO]: [⚡] Starting a new profiler, please wait...
[21:36:02 INFO]: [⚡] Allocation Profiler is now running! (async)
[21:36:02 INFO]: [⚡] It will run in the background until it is stopped by an admin.
[21:36:02 INFO]: [⚡] To stop the profiler and upload the results, run:
[21:36:02 INFO]: [⚡] /spark profiler stop
[21:36:02 INFO]: [⚡] To view the profiler while it's running, run:
[21:36:02 INFO]: [⚡] /spark profiler open

#

when should i stop?

thorn isle
#

it was the first thing i recommended because it's fast and easy and convenient and rules out allocation pressure problems, so it's a good first step

#

but i suppose we are pretty late for the first step by now

#

run it when you're having the issue

quaint basin
#

idk if this is a issue

thorn isle
#

or more ideally, run it when you're not having the issue, to get a baseline; and then also run a separate session when you are having the issue, so you can compare

#

the same best practices as cpu time sampling apply

wet breach
thorn isle
#

in this context since it's a dialog it's almost certainly going to be a player, but the issue is that the Audience and like 10 other references in the class "are probably craftplayer", so just saying craftplayer doesn't really make for an answerable question

#

either way

#

yes, this is almost certainly a memory leak

#

i vaguely remember someone complaining about this at paper

#

the custom click action is basically just a command callback wrapper; the same problem iirc does or did apply to adventure/paper clickable text component callbacks

#

which i find extremely silly, and which is why i just do my own command callbacks with an explicit referent so you can reason about the gc and explicitly clear it if desired

#

i would probably do the same for dialogs; or if you want to keep using this as is, you can wrap the player you pass to the lambda in a weak reference

#

or in this case, since you get an audience of who clicked the button from the callback itself, just cast the audience to player - that's the player you showed the dialog to, there's no need to keep a strong reference to them

#

this will still leak any other references in the lambda, meaning shit like plugin reloads is going to leak like a sieve, but that is not as operationally significant as leaking player references

kind hatch
kind hatch
#

Is there an easy way to revert/not include certain spigot patches when compiling spigot?
Or do I have to revert everything by hand?

buoyant viper
#

u can just delete the patch file i think

#

idk

kind hatch
#

I tried that already. Does not seem to work as I expected it to.

buoyant viper
#

rip

kind hatch
#

Ohhhh wait

#

I had to run applyPatches after deleting the patch files

#

Frickin patch workflows man

buoyant viper
#

F

kind hatch
#

Now for the fun part.

#

I get to binary search the entire patch history to find a little problematic one that I need to fix

#

I love having to do the shotgun blast approach

buoyant viper
#

😭

#

wtf is bro changing...

slender elbow
#

git bisect my beloved

worldly ingot
#

bisect is too complex for my little head

#

I understand it and how it works, I just go stupid mode when I try to use it

slender elbow
#

aw poor baby

mortal vortex
#

?services

undone axleBOT
sterile horizon
#

Can anyone help me with Minecraft server

robust helm
hot temple
#

If anyone want custom plugin or best authentication plugin i can give you for Money

undone axleBOT
hot temple
mortal vortex
undone axleBOT
hot temple
robust helm
smoky anchor
# hot temple Yes dm

Read the effin bot message. This is no place to offer anything.
Also, the best authentication is not running an offline server ;)

fast quarry
#

Hello, i'm on intellij idea ultimate, do anyone know why nothing is imported after i sync gradle changes? I installed 1.21.11 version of spigot via buildtools just before, tried to restart my pc but nothing changed :(

build.gradle:

plugins {
    id 'java'
    id 'com.gradleup.shadow' version '8.3.0'
    id("io.freefair.lombok") version "8.13.1"
}

group = 'me.mingolino'
version = '1.0-SNAPSHOT'

repositories {
    mavenCentral()
    mavenLocal()
}

dependencies {
    compileOnly 'org.spigotmc:spigot:1.21.11-R0.1-SNAPSHOT'
}

targetCompatibility = sourceCompatibility = '21'
compileJava.options.encoding = 'UTF-8'
setLibsDirName('../server3/plugins')

Solution : it's not R0.1 but R0.2 for 1.21.11

buoyant viper
#

?wiki

undone axleBOT
fast quarry
lilac dagger
#

It should still be enough

#

Show dependency

fast quarry
#

where?

lilac dagger
#

Maybe you're using the remapped and haven't clicked it in buildtools

#

From your gradle

fast quarry
lilac dagger
#

Sure

#

Uses 1.21.11 version but he was on R0.1 while he needed R0.2 instead

robust helm
fast quarry
quaint basin
#

I'm getting this error in the playerQuitEvent. Is it because I'm trying to do block #getType on a unloaded world?

thorn isle
#

i don't know, i left my crystal ball at home

quaint basin
#

I have this error when doing block#getType in unloadMinionInternalLogic. The problem is that this method is only called if the world is loaded, so I don't understand why I'm getting this error.

https://pastes.dev/Wtv6sixncM

kind hatch
# kind hatch I love having to do the shotgun blast approach

After a serious amount of time testing, I have found that my issue does not stem from chunk loading, but rather entity activation range.
I spent far too long on this since initially the settings in the spigot config weren't applying, but for some reason, they work today.
I blame this on my hardware. I think I finally understand the need for ECC memory.
-# It's a damn shame it's so fucking expensive

#

Now I can finally move on to what I was originally going to do

meager estuary
#

Hey everyone! I’m currently developing a unique, first-of-its-kind Minecraft project: a 1:1 scale Anime Dungeon RPG.

The project features:

Cyber-style Hub: A mid-sized spawn with a futuristic aesthetic.

Custom NPCs: Fully integrated systems for trading and gear upgrades.

Multiverse Portals: A dedicated zone where each portal leads to a different anime-themed world.

RPG Mechanics: A custom leveling system and unique textures for full immersion.

I’m looking for passionate people to join the team. If you're interested in building something truly new, DM me for details!

undone axleBOT
quaint basin
thorn isle
#

is the server shutting down?

quaint basin
thorn isle
#

is 8b59144e-7bbf-425d-a496-28bd07094e2b the same world the player was in?

quaint basin
#

he can may be or not

thorn isle
#
            World world;

            try {
                world = bukkitMinion.getLocation().getWorld();
            } catch (IllegalArgumentException ignored) {
                minionService.remove(bukkitMinion.getUuid(), false, false);
                plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
                continue;
            }

this doesn't check if a world is loaded

quaint basin
thorn isle
#

on bukkit Location? no

#

Location.world is nullable

quaint basin
#

/**
* Gets the world that this location resides in
*
* @return World that contains this location, or {@code null} if it is not set
* @throws IllegalArgumentException when world is unloaded
* @see #isWorldLoaded()
*/
@UndefinedNullability // Paper

thorn isle
#

World that contains this location, or {@code null} if it is not set

quaint basin
#
World world;

            try {
                world = bukkitMinion.getLocation().getWorld();
            } catch (IllegalArgumentException ignored) {
                Bukkit.getLogger().warning("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
                continue;
            }

            if (world == null) {
                Bukkit.getLogger().warning("Skipping minion unload on player quit because its world is unavailable: " + bukkitMinion.getLocation());
                continue;
            }
thorn isle
#

let me check what the source actually does

quaint basin
#

kk thanks

thorn isle
#

okay yeah it's a Reference now

#

consider using Location::isWorldLoaded for clarity however

quaint basin
#
    /**
     * Gets the world that this location resides in
     *
     * @return World that contains this location, or {@code null} if it is not set
     * @throws IllegalArgumentException when world is unloaded
     * @see #isWorldLoaded()
     */
    @UndefinedNullability // Paper
    public World getWorld() {
        if (this.world == null) {
            return null;
        }

        World world = this.world.get();
        Preconditions.checkArgument(world != null, "World unloaded");
        return world;
    }

        /**
     * Checks if world in this location is present and loaded.
     *
     * @return true if is loaded, otherwise false
     */
    public boolean isWorldLoaded() {
        if (this.world == null) {
            return false;
        }

        World world = this.world.get();
        return world != null && Bukkit.getWorld(world.getUID()) != null;
    }
#

this does not make sense

thorn isle
#

not sure what this is then, since the world is loaded but the chunk system is "shut down"; my only guess is the world is presently being unloaded, but that sounds a bit too coincidental to be true

quaint basin
#

The isWorldLoaded check has one more check which is to use Bukkit#getWorld

thorn isle
#

try using that and see if that helps

#

iunno

quaint basin
#

I believe this is an error in the paper api no?

quaint basin
thorn isle
#

looks fine to me

quaint basin
#

Why does location#isWorldLoaded use Bukkit#getWorld and location#getWorld doesn't, even though getWorld should guarantee that the returned world is loaded?

thorn isle
#

i don't know

quaint basin
#

So it doesn't make sense to you too xd

thorn isle
#

it makes sense in the sense that maybe the world exists in nms but not bukkit, or some such; i could see why that extra check could be there, but since it isn't documented, i don't know why it is there

#

either way, try that and see if it makes a difference

#

right

#

that's a java Reference<World>

#

i assumed it was some nms codec registry bullshit

#

getWorld only throws if the world has been unloaded and garbage collected

#

i.e. the world object no longer exists in the runtime

#

if it still exists in the runtime, because it's for example strongly referenced by some entity, it won't throw and will return the unloaded world

#

isWorldLoaded checks that the world object exists and that the world is actually still registered in the server and loaded

#

so @throws IllegalArgumentException when world is unloaded this is misleading or incorrect

thorn isle
#

it isn't guaranteed to throw if it's unloaded, but it might

quaint basin
#

if (!bukkitMinion.getLocation().isWorldLoaded()) {
  plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
  continue;
}

World world = bukkitMinion.getLocation().getWorld();

(...)

Do I have to change to this then?

thorn isle
#

however strictly speaking the doc doesn't say "if and only if the world is unloaded", so it's not strictly wrong

#

it's just misleading

quaint basin
#

yea

#

but should be more clear

thorn isle
#

myes

#

yeah add the isWorldLoaded check in there

quaint basin
# quaint basin ```java if (!bukkitMinion.getLocation().isWorldLoaded()) { plugin.debug("Skip...

i'll replace all this code:

World world;

            try {
                world = bukkitMinion.getLocation().getWorld();
            } catch (IllegalArgumentException ignored) {
                minionService.remove(bukkitMinion.getUuid(), false, false);
                plugin.debug("Skipping minion unload on player quit because its world is unloaded: " + bukkitMinion.getLocation());
                continue;
            }

            bukkitMinion.getLocation().isWorldLoaded()

            if (world == null) {
                minionService.remove(bukkitMinion.getUuid(), false, false);
                plugin.debug("Skipping minion unload on player quit because its world is unavailable: " + bukkitMinion.getLocation());
                continue;
            }
thorn isle
#

myes

gentle inlet
#

are there any public codebases for the main core plugin for big mc servers, which I could learn and take inspiration from?

mortal hare
#

export const RegisterDataWriteError = {
  USER_ALREADY_EXISTS: "USER_ALREADY_EXISTS",
} as const;
export type RegisterDataWriteError = ValueOf<typeof RegisterDataWriteError>;

export type GenerateUserId = () => UserId;
export type CreateUser = (username: Username) => Promise<UserId>;
export type WriteUser = (id: UserId, username: Username) => Promise<UserId>;
export type FindUserIdByUsername = (username: Username) => Promise<UserId | undefined>;

#

doesnt seem to fit anywhere

ivory sleet
#

probably just apply basic dependency inversion logic to how it fits ur code base layers

#

and I mean, TS has STE and btw ur problem isn't really an FP problem

kind hatch
#

Ayooo, when did spigot get hashes?

{
    "name": "4624",
    "description": "Jenkins build 4624",
    "refs": {
        "BuildData": "1766f29a5430bb246f77e2fe24debb93a26a587d",
        "Bukkit": "330fe805d8a4cdd955b4b8bad51ac9f018732745",
        "CraftBukkit": "6faf826d9bdba7149233ed8eb8e1a4039b933669",
        "Spigot": "566f9723ddc5625b20aaa5f7acee9e8328ba5399"
    },
    "hashes": {
        "CraftBukkit": "ab935aa6306712dab3bd027c90be4bf3207a4a5cd7ca7fb7a5b5c00b97066069",
        "Spigot": "b9387407a71e92f67be5b6dac91b5a633b8d672137945164ce92b1b36906ef7c"
    },
    "toolsVersion": 197,
    "javaVersions": [69, 70]
}
#

Hmmm, these are not the kind of hashes I thought they were.

#

What are they for then?

#

Rather, what are they hashes of?

slender elbow
#

i don't know

young knoll
#

Is it the git commit hash?

slender elbow
#

that would be the ref above

mortal vortex
sullen marlin
#

theyre hashes of the jars produced by Jenkins but unfortunately I dont think the build is 100% reproducible always yet

#

some stupid non reproducibility on some maven plugin or something that I didnt get far enough chasing down

#

but if you can reproduce them, then great job

kind hatch
#

How would one go about checking that?

#

Using our own Jenkins instance?

buoyant viper
#

every copy of spigot is personalized...

sullen marlin
#

they probably wont

#

then use a tool like diffoscope to find out where they don't and try and fix it

#

if they do match, then yay I guess

kind hatch
sullen marlin
#

I think any way

#

I doubt it's jenkins itself introducing the non-reproduceability

#

you'll see it was a year ago I was exploring this

#

CB commits:

#

a4b0b9b255a19c043bd0ad5f20acfd1481635a9c
debf62aecb049be4a6d0bcca3d3644c9d5f1d054
3f33bb772b7fcc83393483a76c6d7f3c37976251

#

shows specialsource and file system permissions were at least two issues that have been resolved

#

idk what's left

kind hatch
#

Wow, I didn't even know file permissions could contribute to the problem.

#

I know hashing is based on how you do it.
I just wouldn't have thought that permissions were involved in it.

sullen marlin
#

it's because .jar files can have file permissions in them

#

so if the permission is different, the .jar is different and so the hash is different

kind hatch
#

Doing a quick look around and I see that maven 4.0 might have a solution

#

Need it to officially release tho

sullen marlin
#

Im sure its possible in Maven 3, I just didn't get there for whatever reason

kind hatch
#

Ahh yea it is, I'm seeing that everything related to it is pointing to a maven-artifact-plugin and even the reproducability page says

There is no Maven version prerequisite. Everything happens at plugin level:

#

I take it I'm just supposed to slap the plugin into the craftbukkit/spigot pom and go from there?

sullen marlin
#

I doubt that is the source of the non reproduciability

#

I would start by identifying the differences --- see above

#

diffoscope is best run in docker due to large amount of dependencies

#

As the Maven page says: " Really checking reproducibility requires to rebuild from a completely different setup: this is harder to do, even if containers may ease the task."

kind hatch
#

Aww man. I hate docker.
-# (Only cause I'm bad at using it)

#

You wouldn't happen to have a docker image for that would you? 👉 👈

#

This ubuntu downtime is really making it hard to install the things I need

mortal vortex
#

u just got ghosted by the big md kek

kind hatch
#

Yea, my fault for askin fr fr

#

But actually, I can't even find a good/working mirror to download from and it's throwing a major wrench in this

#

I might have to revisit this when the ubuntu repos are back up and running

halcyon meadow
#

how do i block putting stuff into bundles

#

pls help

sullen marlin
halcyon meadow
quaint basin
#

If I have multiple backend servers behind a Velocity server, is it possible for the asyncplayerpreloginevent event from multiple backends to be called for the same UUID simultaneously?

young knoll
#

I don’t see how that would happen

#

Unless the backends are exposed directly, but they shouldn’t be

quaint basin
# young knoll I don’t see how that would happen

Do you know why HuskSync lets the player log in and blocks the user from performing any actions until inventory data, playtime, etc. are fetched, instead of blocking the player from logging in until everything is fetched?

young knoll
#

No idea

quaint basin
#

Or the velocity have some validations

robust helm
#

velocity runs in front of your minecraft server

#

asyncplayerlrogin should only be called at the server the player is sent to

#

you could have them connect to server A and in the prelogin event make velocity move the player to server B

#

but i dont see why you would need to do that

quaint basin
#

What I can do is add a lock to AsyncPreLoginEvent and release the lock until the data is fetched, and if another server is locked while processing this event, then set result as not_accepted

thorn isle
halcyon meadow
thorn isle
#

So the player can be briefly connected to multiple backends at a time (though logged into just one at a time)

#

This is why husksync does the hacks it does

quaint basin
#

I think it's a better solution than HuskSync approach

thorn isle
#

Depends

quaint basin
#

of what

thorn isle
#

On what you need the data for and when

quaint basin
#

The data refers to the player's inventory/enderchest data etc and I need it as quickly as possible

#

It's pointless for a player to join the server if they can't do anything

thorn isle
#

Husksync needs to do it the way it does and has no other alternative because it has an api that promises the data is ready on join and only "owned" by one server at a time

#

Inventory sync is a prime example of this

sly topaz
#

if you're fancy, you could mess with configuration phase to add a configuration task specifically for fetching the inventory

young knoll
#

Ah yeah I guess the player would still be connected to backend A while joining backend B

thorn isle
#

I have discussed this problem and possible solutions with others here

sly topaz
#

is the inventory loaded though

thorn isle
#

It can be

sly topaz
#

does the player keep connection on both servers past configuration phase for that to be the case

thorn isle
#

The player joins one server before they leave the previous

#

In practice config usually takes enough for the player to quit the previous server before joining the next, but that is by no means a guarantee

#

And there are no async config prejoin events or such that you can manually delay without blocking the main thread

#

There is prelogin, but that happens before the proxy triggers the quitting on the previous server

sly topaz
#

you have to do some hackery to add your own configuration tasks, yeah

thorn isle
#

This is what I ended up doing as well

quaint basin
thorn isle
#

Well you can't without blocking the main thread

quaint basin
#

If the playerquitevent on server A is called, then the player's inventory can no longer be updated (unless some plugin does it)

thorn isle
#

Because the player won't leave the previous server before logging into the next

sly topaz
#

that's usually how proxies work, you can't avoid it unless you were using something like transfer packet which I assume can work differently

thorn isle
#

There are a few hacks, like kicking the player

#

That makes them quit before velocity sends them to a fallback server

sly topaz
#

that sounds fun