#help-development

1 messages · Page 451 of 1

sterile token
#

So you having the issue i told

#

Your server is not having enough resources to process the chunks generating

#

🤔

wary mauve
#

um

#

Well I think the issue is that the memory keeps going up. Didn't know if people knew how to avoid that with generating chunks

sterile token
#

From what you trying to explain

#

Your ram usage is increasing while your chunks are being generated. It get a points where it doesnt enough ram so its crashes?

wary mauve
#

Yes I think thats whats happening

sterile token
#

Right, what i explained before

eternal oxide
#

How many worlds are you generating?

wary mauve
#

1

sterile token
eternal oxide
#

just one, lots of chunks?

sterile token
#

Yeah i think

wary mauve
#

yeah

sterile token
#

Because if server crashes he must be loading huge amounts of chunks

#

That why you should use work distribuitors while working with worlds or chunks

wary mauve
#

Okay sigh

eternal oxide
#

generate x chunks, save, then force unload them.

sterile token
wary mauve
#

okay. the load and unload methods mess with generation. What Im doing is generating specific chunks so that I get a square of generated chunks. load and unload cause more than what I try to generate to generate

eternal oxide
#

It would be best to, but to test you can do a simple repeating task/queue

charred blaze
#

any idea why i cannot tab players?

eternal oxide
#

it sounds like there is natural world gen happening

#

in yoru generate square does it simply replace blocks?

#

if your chunks save/load affects the chunks it doesn;t sound like they are using a generator

wary mauve
#

No it uses a ChunkGenerator. It is the natural way world gen happens

eternal oxide
#

link me to teh plugin you are using

eternal oxide
#

saving/loading shoudl not change the chunk

#

it only gens once

sterile token
wary mauve
#

World#load generates surrounding chunks

charred blaze
sterile token
charred blaze
#

i coded that plugin

sterile token
#

okay

sterile token
eternal oxide
sterile token
#

?paste

undone axleBOT
charred blaze
#

you mean command class? because i dont really know whats causing it

wary mauve
#

World#getChunkAt() doesn't generate surrounding chunks. World#load() does

sterile token
#

Have you implemented a tab completer for your command?

charred blaze
#

no

#

not really

sterile token
#

Okay thats the issue i think

charred blaze
#

do i need one?

#

isnt tabbing players default tab completer?

sterile token
#

Yes its, but maybe another plugin its overriding it

#

Mainly caused by protection plugins from

charred blaze
#

none of my other plugins use command /msg

charred blaze
sterile token
sterile token
charred blaze
#

its on bungee and spigot server too

#

but i havent added /msg command in it

sterile token
#

It should be reason of not default completation

#

Those protections plugin listen to tab completation

#

So try adding a completer to your msg command

charred blaze
#

well when my msg plugin was on spigot it was working fine but when i moved on the network with a lot minigames and recoded msg plugin to bungee tab completion broke

#

i use same command blocker plugin on spigot

sterile token
#

right, that why i prefer spigot side plugins working against Redis

#

So then i can do cross server communication, even communicate multiple proxies

#

In my case im obcess with redis haha

charred blaze
#

how do i add tab completer? (if its not already added(?))

sterile token
#

Let me find it i dont remeber

charred blaze
#

so what do i do now?

#

okay

sterile token
charred blaze
#

implement what

sterile token
#

I remember it

#

Your command class should implements TabExecutor*

charred blaze
#

ah so i just need to add implements TabExecutor?

sterile token
#

And return a list of player names in the method

#

Yes but he has a protection plugin

#

So its overrind the default completation

charred blaze
#

but why isnt it workinggg then

sterile token
#

Its what i explained to him, commonly protection plugin blocks default tab completation

#

For security reasons

#

Security reasons, they wanna block proxy commands

charred blaze
#

if i didnt register the command it shouldnt even be working now. tabbing players is the only thing that isnt working

sterile token
#

So most of those plugins listen to tab completation too

charred blaze
#

implement what

charred blaze
young knoll
#

Commands have default tab completion?

#

What

charred blaze
#

what

#

player names

young knoll
#

That's a uhh

#

:paper: feature

sterile token
#

He is using Bungee

young knoll
#

I swear they replace null returns with player names

charred blaze
#

anyway. my command class looks like this

young knoll
#

And spigot doesn't

sterile token
wise mesa
#

@young knoll but if you don't add any tab complete at all

#

i think it does player names

young knoll
#

Huh

#

TIL

charred blaze
wise mesa
#

oh

#

nvm

#

im trippin

young knoll
#

TIU

#

Today I unlearned

charred blaze
sage patio
#

does InventoryOpenEvent work?

charred blaze
#

:/

tender shard
tender shard
charred blaze
young knoll
#

Yes the event works

sterile token
tender shard
#

InventoryOpenEvent does work fine, but it won't trigger for the player's own inventory

charred blaze
#

remote intelij? whats that

young knoll
#

(Nor will the close event)

sage patio
# tender shard wdym

i read a thread in spigotmc about it, somebody tried to prevent players from opening their inventory using this event and he failed, he used Packets instead.

young knoll
#

I don't think that even sends a packet

#

Hence why the event doesn't fire

sage patio
#

actually lemme try and see

tender shard
#

the player's own inventory is client sided and you cannot detect whether it's being opened in new versions

young knoll
#

Which is a bit unfortunate but makes sense

#

Why would the server need to know if the client has their inventory open

sterile token
#

How are you setting up items data? For example used to tell itemstack the glass color

#

Because in newer versions its totally different

tender shard
#

by using the proper Material?

#

also it hasnt changed since forever

charred blaze
#

anyway... can anyone help me fixing issue?

sterile token
tender shard
#

it's been Material.GREEN_STAINED_GLASS_PANE since at least 7 years now

river oracle
tender shard
young knoll
#

Since 1.13

sage patio
#

no it does not

young knoll
#

1.13 was the flattening

sage patio
#

maybe i have to get open inventories every tick and close them

sterile token
#

IJ Gatway is fully IDE like IJ community

tender shard
young knoll
#

Yes

#

Bukkit made their own impl called MaterialData

#

But that is also now deprecated

sterile token
#

So?

tender shard
#

anyway, materials are used for colors since at least 5 years now

sterile token
#

Im really mixed right now?

young knoll
#

If you are on 1.13+

tender shard
young knoll
#

It's all just different materials

tender shard
#

Material.GREEN_WOOL, GREEN_STAINED_GLASS_PANE, etc

sterile token
#

Why didnt make it like that, from the start? Just to learn tho

tender shard
#

ask mojang

young knoll
#

Because that isn't how it used to work

#

All wool was WOOL internally

#

And the color was based on the data value

sterile token
icy beacon
#

use xseries if you are supporting multiple versions

young knoll
#

An API to check if an area is claimed

sterile token
young knoll
#

Well

#

Is trusted just a yes no

sterile token
#

Im opening for args

young knoll
#

Or can you give trusted only certain perms

#

Can I make my own ranks for my claim with specific perms

sage patio
sterile token
#

Using World Guard is useful for those small servers, but for big ones ofc not. Because the plugin its resource intensive ass fucking

young knoll
#

Pretty sure hypixel still uses a fork of worldguard

sage patio
#

is the Pause menu an inventory? lol

young knoll
#

No

sage patio
#

yes it is

#

closes that too

young knoll
#

Really?

#

Tf

sage patio
#

yea

#

i can't pause

young knoll
#

Wack

icy beacon
sterile token
#

Is your claiming api open? Or just a private api?

charred blaze
#

can anyone look into my issue

icy beacon
#

perfect plugin for server owners who want high online

icy beacon
charred blaze
#

tab completion isnt working on my command

#

i mean i cant tab players on my command

icy beacon
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

icy beacon
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

sage patio
#

the chat is an inventory too lol

icy beacon
charred blaze
#

?paste

undone axleBOT
ivory sleet
#

Result objects huh

sage patio
charred blaze
charred blaze
charred blaze
tardy delta
#

with how many constants?

ivory sleet
#

Ah, well I’d have used exceptions personally morice

sterile token
# icy beacon where is it?

He is not having default bungee tab completation done. So i asked if he has any protection plugin, were he answered yes. And i told him that may be the cause because commonly command protection plugins block commands and also tab completation

ivory sleet
#

But yea

tardy delta
#

returning or throwing them?

icy beacon
sterile token
#

Because you have to compare them and make you to use more code

icy beacon
#

so?..

ivory sleet
#

Well because that’s the convention usually, if a method is not able to fulfill its contract then an error should be yielded

tender shard
sterile token
#

Not if you use proper exceptions ?

ivory sleet
#

You compromise usability too much when you go for result objects

#

The first example from that article is stupid, because it catches exceptions that obviously are handled by your average dev

sage patio
sterile token
ivory sleet
#

How

icy beacon
#

?cba i saw it the first time

undone axleBOT
#

Pluggg#0001 definitely regrets to for the most part inform you that unfortunately, they essentially are unable to definitely assist with definitely your enquiry, which essentially is fairly significant. Please simply really ask again later or possibly kind of ask someone else about this enquiry, demonstrating that the person that ran this command generally regrets to kind of inform you that unfortunately, they for the most part are unable to generally assist with actually your enquiry in a subtle way. Thank you very sort of much for kind of your time and the person that ran this command specifically wishes you a really good day, so the person that ran this command really regrets to actually inform you that unfortunately, they literally are unable to definitely assist with very your enquiry, or so they particularly thought.

charred blaze
#

:(

ivory sleet
#

You can still do that??

sterile token
ivory sleet
#

Whether you use result objects or exceptions doesnt dictate that

ivory sleet
#

yes, but thats good

#

Because then you see that the plugin didn’t handle all cases of the command outcome

sterile token
tender shard
sterile token
icy beacon
#

because the ide will tell them

ivory sleet
#

The problem with result objects is that they dont leave behind a stacktrace, and you its less visually enforceable. Im not saying result objects are always bad, just look at Optional and CompletableFuture

#

but the convention is that if a method is not able to fulfill its contract, an exception should be thrown

icy beacon
#

kinda like a fail fast vs fail safe type of argument is going on

#

😛

ivory sleet
#

Wut

#

Problem with enum regarding result objects is that you cannot encapsulate context specific data to the result regarding the result’s outcome success

#

Anyway that’s another design debate

#

My point is just that you heavily compromise usability for design right now

#

It has a lot of benefits also, so its not all bad

#

Yea

#

Indeed

tender shard
#

Or Optional<Boolean>

icy beacon
ivory sleet
#

Optional<Boolean> might make sense if you have some generic shit, where a type implementation is boolean

#

but yeah, see little reason to have it

#

Also a usability compromise for design

tender shard
remote swallow
#

yes

icy beacon
tender shard
#

sry mb

remote swallow
#

!!!!!!Logic.UNTRUE

icy beacon
#

probably something like this could be added to the BooleanFactory

ivory sleet
#

AbstractAbstractBooleanFactory

tender shard
#

implements AbstractFactory<Boolean>

ivory sleet
#

extends FinalizableBaseBooleanSupplierGeneratorAbstractAlex

tender shard
#

and it needs at least 27 unit tests

ivory sleet
#

Lmao

zenith crescent
#

Alright so i just got a chance to try this but im getting this error now.

tender shard
#

?paste your code

undone axleBOT
zenith crescent
#

HeadUtils.getHead("https://textures.minecraft.net/texture/366ff9319776ff3aa48109882f0fce8fa6f499475bd258284948e5c6e1da308b")

tender shard
#

try to call setTextures after doing setSkin

zenith crescent
#

that fixed it thank you

tender shard
#

alrighty, np. gotta update my blog post then

#

IIRC it wasnt required in 1.18.1

#

updated

icy beacon
#

alex

#

what would you charge for 70 hours of work

tender shard
#

70*105€

lost matrix
buoyant viper
#

at least $500 ezpz

icy beacon
#

yep, and for some reason i ended up charging 115

tender shard
#

wtf

icy beacon
#

precisely

tender shard
#

child soldiers make more money

#

lol

icy beacon
#

i'm 15 😭

lost matrix
#

Thats... eh

icy beacon
#

that's a fucking ripoff

tardy delta
#

105 euros for an hour kek

#

i want to get paid that way too

icy beacon
#

same

#

and not 1.65 eur per hour

echo basalt
#

25/hr at least

lost matrix
#

Bust honestly i would go for minimum wage for a free time project.
So 12€ * 70 = 840

echo basalt
#

I used to charge 15/hr when I was 15

buoyant viper
#

thats my pay with irl job now lelebCry

icy beacon
#

well this took me 10 days of 6-8 hour long days after school

echo basalt
#

it's all about experience and confidence

icy beacon
remote swallow
icy beacon
#

the lower the price, the lower my desire to work is

buoyant viper
icy beacon
#

the higher the price, the less chance i get a buyer is

echo basalt
#

I started charging 20/hr around when I turned 17

tender shard
# tardy delta 105 euros for an hour kek

well I could do my main job during that time instead, so it makes little sense to charge less. and if people say "that's too expensive", then they'll just look for someone else

buoyant viper
#

or well, my lack of confidence makes me think i probably lack experience

#

brain is bad

signal kettle
#

hello, how I can make from this a function that I can call anytime in code?

        if (item.getAmount() == 1) {
            item.setAmount(0);
        } else {
            item.setAmount(item.getAmount() - 1);
        }
undone axleBOT
icy beacon
#

make a function and pass the item as an argumemnt

torn merlin
#

Hey,
I want to disable that the player can enter a bed and also prevent to set a new respawn point.
It should still be possible to place blocks on the bed.

So I can´t cancel the full interact event.
I have tried this with the BedLeave and BedEnter events, but the new spawnpoint message is still displayed on the first bed interact

`@EventHandler
public void onBedEnter(final PlayerBedEnterEvent event) {
event.setUseBed(Event.Result.DENY);
}

@EventHandler
public void onBedLeave(final PlayerBedLeaveEvent event) {
event.setSpawnLocation(false);
}`

Has anyone an idea what I can do to prevent the new respawn point to be set?

tender shard
signal kettle
echo basalt
#

like making web APIs

icy beacon
#

same

#

but i'm increasing my prices as we speak

#

i don't wanna get ripped off again lkmao

tender shard
#

if you charge anything less than 40€ or so, people assume you have no clue what you're doing

#

if you start with an extremely high price, they immediately assume you must know your shit

echo basalt
#

well

icy beacon
#

in my country shit is less expensive but in return shit is less paid for

tender shard
#

ofc it helps if you can send your spigot resources list and if it's all 5 stars, or not, lol

icy beacon
#

so if i asked for example 105 euros an hour i'd probably get flipped off instead of ripped off

echo basalt
#

here in this industry you charge 30-40$/hr if you have the experience required to run a multi-server network from scratch

tender shard
icy beacon
#

yeah

#

i'm increasing them rn ofc

echo basalt
#

I live in Portugal, where people make less than 1k/mo working full-time

icy beacon
#

same wage here on average

echo basalt
#

and I believe I have the knowledge required to just... make the same amount by working 10h/week

#

or in my case, average around 18 hours and live a bit better

#

I'd charge more if I actually lived by myself or quite really needed the money

tender shard
#

yeah it always depends ofc. I sometimes can make over 1000€ per hour on simple cases (stuff like being around during a company audit), but for spigot plugins, I just always do 105€ and say "take it or leave it". about 50% take it, 25% try to negotiate, and 25% never reply again

lost matrix
echo basalt
#

but I'm at a stage where I get to eat out every day, buy whatever I want, whenever I want

#

and that's all I need

#

sure I'm not buying a car every day because I don't even have a license

#

and instead of spending mad money with cars or bikes or something I just pay 3€ for an uber and stop worrying

icy beacon
#

well now this is my required pay
translation:

Commented source code - 2.26 eur (well shit i always comment my code anyway so it doesn't hurt to get some extra money)
Average complexity - 125 eur (3-15 hours on WakaTime)
High complexity - 260 eur (15-30 hours on Wakatime, anything higher means extra pay)
Minigame complexity - 730 eur (if it takes no longer than 24 days, otherwise extra pay)
All plugin strings translated into English - 7 eur (literally free money)

lost matrix
icy beacon
#

and now take like 20% off of this and that's the amount of money i'll ACTUALLY get

signal kettle
icy beacon
#

because this freelancing website takes a huge cut off of my pay

buoyant viper
echo basalt
#

ehh freelance websites

#

also > complexity

tender shard
icy beacon
#

unfortunately this is the best i can do

echo basalt
#

I'd rather charge for my time than actual complexity

buoyant viper
echo basalt
#

because you're paying me to do work, regardless of how complex it is, it's still work

lost matrix
tender shard
buoyant viper
#

?jd-s maybe its documented on what negative does

undone axleBOT
echo basalt
#

Punishing me for writing filler code rather than actual interesting stuff is a waste of time

remote swallow
icy beacon
#
  1. the total amount of these options is approaching the limit (80000 rub) i can't make it any higher
  2. there are no good russian freelancing websites that allow for per-hour pay
  3. this website allows for end-to-end security (i'll get the money, they'll get the product)
lost matrix
buoyant viper
#

nvm its desc is just sets amount

tender shard
#

for a few weeks

regal scaffold
#

How can I optimize pasting schematics with fawe?

remote swallow
#

how did you get 2

tender shard
#

he apparently had 2

#

you know, you can have more than one disease at a time lol

remote swallow
#

lies

echo basalt
regal scaffold
#

Or does anyone know a queue system implementation to prevent multiple stuff from happening at the same time?

echo basalt
#

yet online people call me the "rizzard of oz"

lost matrix
remote swallow
icy beacon
tender shard
icy beacon
#

living in russia, if i get paid in foreign currency and take one wrong step, i might earn myself the title of a "foreign agent"

#

rather would not take the risk

buoyant viper
remote swallow
#

you live in russia?

icy beacon
#

unfortunately

echo basalt
#

move.

remote swallow
#

move

icy beacon
icy beacon
#

unable due to no financial stability and being a minor

remote swallow
remote swallow
icy beacon
#

ty for the hint actually

#

didn't think of that

#

my bad

young knoll
#

Age++

buoyant viper
#

maybe if u explain to Putin that u write code for Minecraft servers he'll give u a government job

remote swallow
#

jsut run that twice

icy beacon
#

oh right

buoyant viper
#

just dont get on his bad side

icy beacon
#

i literally developed a game plan

#

when i graduate hs i enroll into a uni immediately as an IT student

#

that way i avoid serving in the mil

young knoll
#

Putin official minecraft server

buoyant viper
#

i think for legal reasons and human safety u should not continue typing

echo basalt
#

muscles attract other guys

icy beacon
#

i love russia so much!!!

buoyant viper
icy beacon
#

my favorite country!

#

while in the uni i DO NOT seek an IT job that allows to not enroll into a uni

native summit
#

I have a question how to change the nametag above the player's head

icy beacon
#

and then i DO NOT move to another country

buoyant viper
#

viva la vladimir

lost matrix
icy beacon
#

because that would not be patriotic

#

i WILL NOT do that

#

ofc

echo basalt
#

I told my coworker I hit the gym and he now spends all his time talking about how he uses steroids and how 35g of protein for 80 cents is a bargain

young knoll
#

gotta have that HGH

buoyant viper
#

we got whey at my job and it smells like ass

echo basalt
#

it smells like ass if you don't wash the cup properly

#

you gotta wash with hot water, immediately

#

and tons of soap

buoyant viper
#

no its the powder itself

echo basalt
#

ah

#

well it comes from cow milk

buoyant viper
#

like not even out of the packaging container DogJA

icy beacon
#

breast milk 😳

lost matrix
echo basalt
#

I've had this whey on my room for the past 3 years

young knoll
#

International standards organization comes in clear?

buoyant viper
echo basalt
buoyant viper
#

i already got like 7 different distros saved

echo basalt
#

we got 2 music festivals back to back

#

like in early july

echo basalt
#

it's gonna be so wack

buoyant viper
#

everybody wants to go to the fuckin beach

echo basalt
#

tiny ass town with like 30k people

#

gonna have 300k

#

just because 50 cent is coming

#

and travis

#

and cardi b

#

and meek mill

lost matrix
#

So its gonna be 250k of trash

remote swallow
#

just go to america or canada while its happening

echo basalt
#

and a bunch of other irrelevant people that live in their own lil bubble

echo basalt
young knoll
#

Try not to get crushed when travis is around

remote swallow
#

go sooner

regal scaffold
#

Where can I find info on setting up a task queue, I want to prevent some tasks from overlapping and make sure they are added to a queue so it can do them 1 by 1

echo basalt
#

it's a trip paid by the guy at work, I can't really pick dates

young knoll
#

You can if you kill him

echo basalt
#

I was meant to actually be on a bus to the airport rn but I told my mom I'd spend easter at home

regal scaffold
#

Thanks smile

#

Jesus you have guides for everything wtf

young knoll
#

What

echo basalt
#

7smile7 is the goat

tender shard
young knoll
#

Going to the airport in April for a trip in September

#

How long is the flight

#

Geez

tender shard
#

Lol

echo basalt
#

clown

#

mom's going back to her village until may

#

thing is... my "internship" starts in may

buoyant viper
#

the internet is where u ask a question and find out it was answered 11 years ago

echo basalt
#

and I have classes before that

tender shard
echo basalt
#

I got a 2 week easter break, then 2 weeks of classes

#

and then internship

#

aka early holidays for me

tender shard
#

Why do IT students always go to classes but they never go to interfaces

regal scaffold
#

Uhhhh smile, so your guide is to not have to use fawe

#

But if I use fawe I wouldn’t need your guide?

lost matrix
#

Its not a task chain perse but it will achieve the same consecutive workload execution

regal scaffold
#

Why am I getting overlapping problems with fawe then

#

I thought that did the same thing

lost matrix
#

The guide is about doing what fawe does but for everything.

young knoll
regal scaffold
#

Yeah I assumed that

tender shard
#

lmao

regal scaffold
#

But I’m using fawe to paste stuff and still having issues

lost matrix
echo basalt
echo basalt
regal scaffold
#

Hmmmm

#

I wonder if then I’d be better off using your implementation for everything

#

To make sure stuff doesn’t go haywire

echo basalt
#

how the fuck is my mom on facebook right now she has no wifi

regal scaffold
#

Instead of just pasting

ancient plank
#

Otherwise the beach is pretty cool

echo basalt
#

beach is nice

#

especially at night

#

I spent my 18th birthday drinking at the beach

#

me n my homie downed like 2 bottles of champagne and like 4 beers

#

he was struggling to go down the stairs while I was just vibin

tender shard
#

and then not tell anyone why

#

everyone mark this in your calender: apr 12th is goat pfp day

ancient plank
#

Spring break is so bad here that they have ordinance laws on the beach for spring break

regal scaffold
#

Smile so you’re sayin with your implementation I could have something like:

Player 1 joins: Starts doing stuff for player 1…
Player 2 joins: waits until next in queue
Player 1: finished stuff
Player 2: start stuff

young knoll
#

Pretty sure the population here drops during spring break

regal scaffold
#

That’s the concept right?

echo basalt
#

also I was drinking at like 9pm, doubt there'll be anyone patrolling

#

we had a few couples just "chilling" around, too

young knoll
#

Drinking in public

#

Can't do that in freedom land

echo basalt
#

it was 9:30pm on a tuesday afternoon in late march

#

just 2 guys chilling and talking

torn merlin
tender shard
echo basalt
#

I had to go to a vape shop to buy a lighter to light my candles

#

got my cake cut at a borger chain and the cashier stole a slice

glossy venture
#

is there a more optimal way to create an if-else statement in jvm bytecode?

young knoll
#

Idk America doesn't like public drinking

tender shard
#

in germany, some cities banned public drinking but courts always said "nah bs you cannot do that"

#

I wonder who the fuck actually goes to court for sth like that lol

#

but apparently there's many people who do it

young knoll
#

I think you just get a fine in murica

#

Idk

mighty pier
#

i will get staff to kick all of you because this is not general chat 😠

echo basalt
#

you must be fun at parties

echo basalt
#

or you can do that yes

young knoll
#

🔫

lost matrix
glossy venture
#

idk

lost matrix
#

Or at least dont let it set the spawn point

torn merlin
#

I tried that but it still setting the spawnpoint

young knoll
#

I think you have to use the spawnpoint event

tender shard
#

yo bb guys, I gotta meet my stupid neighbour

young knoll
#

Or maybe the bed leave event

glossy venture
#

idk how

young knoll
#

Even though I swear spawnpoint is set when you click the bed not when you leave

regal scaffold
#

Smile

#

I don’t think your guide is what I need

#

Player 1 joins: Starts doing stuff for player 1…
Player 2 joins: waits until next in queue
Player 1: finished stuff
Player 2: start stuff

torn merlin
torn merlin
regal scaffold
#

Fawe is pasting my stuff correctly but the issue I have is when multiple players join at the same time because of the other stuff going on, so that’s why I need what I explained

lost matrix
regal scaffold
#

I think what I need is just a List as a queue, it might be that simple

regal scaffold
#

I just need to make sure a bunch of stuff is done for a specific player before it goes into the max

#

Next

#

I wanna be like, “your data is #whatever is queue” and make sure stuff loads 1 by 1. It’s not for everything just for specific actions

lost matrix
#

What is this for

regal scaffold
#

Schematic paste + region assignation + other stuff

#

Happens only first time player joins, after that I have no issues

lost matrix
#

And why does it overlap?

regal scaffold
#

Only when multiple players join for the first time*

lost matrix
regal scaffold
#

I assume cause I’m using async

remote swallow
#

async is painful

regal scaffold
#

The thing is

#

Hear me out

#

I make a paste with a player UUID

#

Like, the UUID of the paste is the exact player UUID, so it’s completely unique

#

But if players join at the same time, somehow, the data is literally mixed, and 2 players can share the same schematic UUID when it’s literally a player UUID

eternal oxide
#

bad code

lost matrix
#

Sounds like a you problem

#

yeah what elgarl said

regal scaffold
#

I thought it was a queue problem

#

Like, stuff is happening at the same time and overlapping somehow

#

Which is why I was asking for advice

eternal oxide
#

nothing actually happens at the same time, even when async

lost matrix
#

What does overlapping mean?

regal scaffold
#

Like, when I paste a schematic for UUID1. Somehow if a player joins at the same time he will somehow br linked to the same UUID1 even though stuff like Bukkit.getPlayer(UUID) actually is unique

#

And it applies to multiple players

#

It’s not in the data itself

lost matrix
#

What do you mean by linked?

regal scaffold
#

Cause I checked the output. The UUID only corresponds to 1 player, yet both share stuff like a teleport point

lost matrix
#

What does overlapping even mean?

regal scaffold
#

If I teleport a player from the unique UUID data, it will somehow teleport both players to the same

#

When Bukkit.getPlayer(UUID) is unique

lost matrix
#

Show your code

echo basalt
#

you might have 2 instances

#

or some stupid thing

#

makes no sense

regal scaffold
lost matrix
#

Maybe a UUID field XD

regal scaffold
#

But I had a fail safe

#

If it already existed

#

I don’t add it

#

But yeah, let me do some checking for a bit

#

Thanks

regal scaffold
lost matrix
#

Uhm... if you want to map data to players then you should always use a Map<UUID, Data>
A field will just correspond to one player at all times.

regal scaffold
#

Well

#

I’m using List<UUID>

#

But I get what you mean actually

#

That’s actually smart

#

Gonna do that change rn

remote swallow
#

oh 7smile while ur here, is it possible to run a task async, wait for it to be done then return the value sync with completeable futures

regal scaffold
#

I used your Cache implementation and you use Hashmap<UUID, Object>

eternal oxide
remote swallow
#

isnt there an isDone on futures

regal scaffold
#

What happens if I try to add a key that already exists in a hashmap

young knoll
#

replaces

regal scaffold
#

Interesting

#

Ok

eternal oxide
#

better to not poll and run code sync when done

echo basalt
#

caps

#

uh

#

you can make an executor that delegates to the main thread

#

Even just

#

Bukkit.getScheduler().getMainThreadExecutor(plugin)

#

might be paper specific

#

yeah it's paper

#

but you can make your own

remote swallow
#

i was thinking if i need call join on bukkit scheduler async task, but i then have no way to return that stuff sync

echo basalt
#

no

#

you make an executor

#

and then call

#

thenWhatever(lambda, executor)

echo basalt
#

ignore the shitty conventions but we do this

remote swallow
#

update role runs any completeable future imguessing

echo basalt
#

it returns a future

remote swallow
#

you know what i mean

mighty pier
#

eric barrac

remote swallow
echo basalt
#

thenApply

#

or thenAccept

remote swallow
#

that wouldnt run async though would it

echo basalt
#

I mention it here

remote swallow
#

huh

summer zodiac
#

Hi is there a way to modify the name tag above a player's head without using packets?

echo basalt
#

scoreboard

weak meteor
#

Caused by: java.lang.NullPointerException
at volt.dev.vcore.utility.utility.replacePrefix(utility.java:15) ~[?:?]
at volt.dev.vcore.commands.GodCommand.onCommand(GodCommand.java:39) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[Spigot.jar:git-Spigot-21fe707-741a1bd]

Utility 15 (1st image)
GodCommand (2nd Image)

#

Config.yml

echo basalt
#

your config is null

weak meteor
#

Why is this happening, everything is ok

echo basalt
#

because you probably never initialized it

weak meteor
#

what

#

it is ok

remote swallow
#

just tried it, still cant return the value sync

echo basalt
remote swallow
#

ah

#

i just used the thing i got off paper

weak meteor
#

thats true

#

i never initialized it

#

lol

simple merlin
#

Hello, I am making a plugin to use inside the proxy (at the moment I am using waterfall 1.19), the code looks good, no errors but the plugin won't load because I get this error:
java.lang.IllegalAccessError: failed to access class net.md_5.bungee.api.plugin.PluginClassloader from class net.minplay.proxy.pluginmanager.PluginUtils (net.md_5.bungee.api.plugin.PluginClassloader is in unnamed module of loader 'app'; net.minplay.proxy.pluginmanager.PluginUtils is in unnamed module of loader net.md_5.bungee.api.plugin.PluginClassloader @25ffd826)

buoyant viper
#

is the command also in plugim.yml

weak meteor
#

register the command in plugin.yml

simple merlin
golden turret
#

how could I kill an entity that is on a unloaded chunk?

lost matrix
golden turret
lost matrix
golden turret
#

and I need it to despawn a vehicle

remote swallow
#

why did no one tell me i can just call #get on completable future to get it when it returns

young knoll
#

Because that blocks

lost matrix
remote swallow
young knoll
#

get also blocks

lost matrix
remote swallow
#

not according to its docs

#

im gonna sue

golden turret
remote swallow
#

why cant i run my sql async and return a value sync pepejamsad

golden turret
#

or he can teleport

young knoll
#

Because a return value must be returned right away so execution can continue

lost matrix
young knoll
#

A future will not complete right away

remote swallow
#

exactly

#

i dont want to recode this just to support mysql

lost matrix
# golden turret or he can teleport

3 options:

  • load the chunk -> delete the vehicle.
  • invalidate the vehicle ID and destroy when the chunk loads
  • always unload the vehicle when the chunk unloads and only load it again if its valid when the chunk loads again
young knoll
#

You should have made all your data sources async from the start

remote swallow
#

but they dont need to be

young knoll
#

File io can still take time

remote swallow
#

thread safety scarey

lost matrix
young knoll
#

I'm fairly sure you're safe to read from a collection even if another thread is modifying it

#

You just may get outdated data

#

Multiple writes is the problem

remote swallow
#

coll make my storage async for me

young knoll
#

Yeah loops can be an issue

#

But iterator should be good

lost matrix
remote swallow
#

one sec

#

7smile is boutta ratio me so hard

lost matrix
#

Copilot also suggested adding those:

public interface DataLoader<K, V> {

  CompletableFuture<V> loadData(K key);

  CompletableFuture<Void> saveData(K key, V value);

  CompletableFuture<Void> deleteData(K key);

  CompletableFuture<Collection<V>> loadAllData(Collection<K> keys);

  CompletableFuture<Void> saveAllData(Collection<Map.Entry<K, V>> values);
}
sage patio
#

Player in server always has an Inventory open called CRAFTING (the type), also it depends on his game mode for creative its CREATIVE
when you close the CRAFTING inventory also Pause Menu, Chat and anything alse gets closed too
i just want to prevent the player to open his inventory, does player send a packet when he opens hes inventory or what? is there any way to close the inventory when he opens it?

lost matrix
# remote swallow https://github.com/The-Epic/SimpleChatGames/blob/master/src/main/java/me/epic/ch...
public class AsyncStorageHandler {

  private final Executor executor;
  private final StorageHandler delegate;

  public AsyncStorageHandler(Executor executor, StorageHandler delegate) {
    this.executor = executor;
    this.delegate = delegate;
  }

  CompletableFuture<Integer> getPlayerData(OfflinePlayer player) {
    return CompletableFuture.supplyAsync(() -> delegate.getPlayerData(player), executor);
  }

  CompletableFuture<Void> incrementPlayerData(OfflinePlayer player) {
    return CompletableFuture.runAsync(() -> delegate.incrementPlayerData(player), executor);
  }

  CompletableFuture<List<PlayerData>> getTopPlayerData(int start, int count) {
    return CompletableFuture.supplyAsync(() -> delegate.getTopPlayerData(start, count), executor);
  }

  CompletableFuture<PlayerData> getPlayerDataAtPosition(int position) {
    return CompletableFuture.supplyAsync(() -> delegate.getPlayerDataAtPosition(position), executor);
  }

}

Problem solved

simple merlin
#

How can I send a plugin message from a spigot server to proxy? I have registered the channel inside the proxy but I still get the error when I am trying to send a plugin message from spigot, that the channel doesn't exist

remote swallow
lost matrix
young knoll
#

Only one thread

#

Lame

lost matrix
#

*For example

young knoll
#

It needs a threadpool of 324545345 threads

remote swallow
#

that reminds me

#

i need to make my sqlite handler cache data

#

so i run sql for every placeholder

ivory sleet
#

Very good

lost matrix
ivory sleet
young knoll
#

Not enough code for a single class

#

Lameeee

raw crow
#

can someone please help me? what is wrong with my code:

public boolean setAndSave(MinigameData data) {
    Lock lock = RepositoryPlugin.getLock();
    lock.lock();
    try {
        set(data);
        RepositoryPlugin.save(); // This just does a simple saveConfig()
        return true;
    } catch(Exception e) {
        return false;
    } finally {
        lock.unlock();
    }
}

private void set(MinigameData data) {
    FileConfiguration config = RepositoryPlugin.config();
    String path = "temp_database.minigames." + data.getMinigameName();
    for(MinigamePlayer player : data.getMinigamePlayers()) {
        String subpath = path + "." + player.getId();
        config.set(subpath + ".wins", player.getWins());
        config.set(subpath + ".losses", player.getLosses());
    }
}

it runs fine and returns true, but does not create the section; there is no section temp_database.minigames in config.yml

lost matrix
remote swallow
ivory sleet
#

Yes

#

The async one can sometimes expose an accessor to its delegate

lost matrix
remote swallow
#

uhhh thats a lotta effort

ivory sleet
#

Alternatively you write a new facade class epicebic

young knoll
#

Doesn't thenAccept already sync back to the calling thread

echo basalt
#

oh no man wants to multithread and use futures but doesn't want to work

#

anything that deals with concurrency ends up being overly complex

ivory sleet
lost matrix
ivory sleet
#

it uses even the same thread

young knoll
#

So you don't need to wrap it with the runTask

lost matrix
young knoll
#

Oh

#

Brain hurt

lost matrix
#

Alternatively you can also do this

    future.thenAcceptAsync((data) -> {
      System.out.println("Data: " + data);
    }, Bukkit.getScheduler().getMainThreadExecutor(yourPlugin));
ivory sleet
#

paper only

lost matrix
#

Ah

young knoll
#

So wait

ivory sleet
#

iirc spigot doesnt have the main thread executor sadly :(

young knoll
#

Future.acceptAsync.thenAccept will run the thenAccept on the same thread that handles acceptAsync

ivory sleet
#

Yes

lost matrix
young knoll
#

Then what thread does thenAcceptAsync run on

raw crow
young knoll
#

Oh you specify which one

#

I see i see

ivory sleet
#

Not sure tho

raw crow
#
public static void save() {
    instance.saveConfig();
}
lost matrix
ivory sleet
#

Can be an Executor e = runnable -> new Thread(runnable).start() also coll

lost matrix
ivory sleet
#

if the parallelism of the common pool is like 1 or 2 or 0

raw crow
#

hmmm

ivory sleet
#

🥲

young knoll
#

Got it

#

I don't think my class on concurrency touched futures at all

ivory sleet
#

99% of times its gonna B common pool

#

A poor you

raw crow
#

oh thanks, the set is empty and i didn't check it '-.-

ivory sleet
#

And we have so much more you probably didn’t touch then

glossy venture
#

how tf do i do this in jvm bytecode
even worse the value could be either a type 1 or 2 computational type

#

oh wait isnt everything on the stack 64-bit

young knoll
#

Yeah my college kinda cringe

#

¯_(ツ)_/¯

lost matrix
#

You writing a compiler?

glossy venture
#

so basically yeah

#

wait maybe

dup_x2
swap

but idk wtf dup_x2 does

ivory sleet
glossy venture
final monolith
#

How to check if a ProxyServer is running (listening)?

echo basalt
#

well just like

#

there's no easy direct way iirc

#

but you can check some things

#
  • online mode?
  • does it have bungeecord: true on the spigot.yml
young knoll
#

A lot of SQL

ivory sleet
#

Ah thats nice

echo basalt
#

school doesn't teach much

#

I'm in a 3 year programming course

#

we learned a bit of sql

ivory sleet
#

Altho sadly sql is becoming a bit obsolete, from what I can perceive

young knoll
#

Lot of web dev stuff too

echo basalt
#

we also learned how to use microsoft access

#

and php

#

and c#

ivory sleet
#

Oo

remote swallow
glossy venture
#

why cant java constructors just push back the instance to the stack

echo basalt
#

I'm about to finish school in about 2 weeks

glossy venture
#

why no invokeconstructor

echo basalt
#

so yeah you just learn that

#

you also learn about scrum

ivory sleet
#

Constructors are just methods kek

lost matrix
#

Ugh, finally -.-

ivory sleet
echo basalt
glossy venture
ivory sleet
#

i mean they could, but are they gonna do it? Probably not Sadge

glossy venture
#

and would otherwise to the same as invokespecial

echo basalt
#

meanwhile at work

glossy venture
#

theres dup_x2 which dupes the top 3 things down

#

but how do you do

1 2 3 4 5 6 instance
instance instance 1 2 3 4 5 6
ivory sleet
#

Im no jvm bytecode expert sorry

glossy venture
#

i should look at generated bytecode

ivory sleet
#

Yea thats smart

lost matrix
echo basalt
final monolith
#

Wanna do some things before the bungeecord initialization

echo basalt
#

createCustomGoal("whatever-123", (queue) -> { whatever });

ivory sleet
final monolith
#

bungee

ivory sleet
#

I mean

lost matrix
white root
#

Hey, I have probably a dumb question, but I have some questions about how I should design my plugin/plugins

I currently just duplicate code between one project and the next, which probably isnt the best idea, since it makes updating code that I use between each project more difficult to maintain between plugins.

Should I use a gradle multi-module project (I have literally no idea how to do this, I just have seen it recommended in similar stack-overflow questions)
Or should I make like a libs.jar then just make each of my plugins depend on that?

If I understand the multimodule project concept, it is essentially the same as having a libs.jar, but gradle shades the libs for you (Maybe? I don't really understand it tbh)

final monolith
ivory sleet
#

You can probably just run stuff in the init block of ur plugin

final monolith
young knoll
#

Isn't bungee cross version

lost matrix
final monolith
young knoll
#

You can also shade and minimize your own little library

ivory sleet
#

Ah

young knoll
#

Tis what I do

glossy venture
#

oh ofc it just uses locals

#

im stupid

ivory sleet
#

MrMcYeet look at luckperms for instance, it has a common module which both the bungee and bukkit module shade in when building a jar for respective platform

lost matrix
ivory sleet
#

^

#

Library is when you have common code for different plugins of same platform

#

(Mostly)

#

At least in terms of spigot

wary mauve
#

@lost matrix Hey, I just used your simple linear distribution example for workload distribution for this world gen stuff. It worked fine before when the generation was all happening in a single tick, but now that it is spread out this is happening:

  • 2 extra chunks are generated surrounding the chunks that I called for
  • the furthest chunk out doesnt get decoration
white root
wary mauve
lost matrix
wary mauve
#

damn

#

Btw, I wanna say thank you so much. I would not have figured out this far without you 🙂

dim adder
#

@young knoll

it has a lore:

        inventory.setItem(15, ItemStack(Material.SANDSTONE).apply {
            itemMeta = itemMeta.apply {
                displayName = "Block Clutches"
                lore = listOf("Type: Block")
            }
        })```
tardy delta
#

what was i doing

young knoll
#

I mean

#

"org.bukkit.inventory.meta.ItemMeta.getLore()" is null

#

Evidently the item does not have lore

lost matrix
# wary mauve

Ah decoration might happen one tick later. Try to simply wait a few ticks.

wary mauve
wary mauve
#

because I think it takes around 150ms to generate one

jagged bobcat
lost matrix
jagged bobcat
#

Or you could see if the message channel is running

wary mauve
#

its a lot slower

final monolith
jagged bobcat
#

You using bungee as proxy? // or forks

final monolith
#

waterfall

jagged bobcat
lost matrix
# final monolith anyone?

Try getting ther ServerInfo from ProxyServer#getServerInfo(String)
After that you could even ping it.

final monolith
#

oh no

#

its a bungee plugin

#

i have the ProxyServer instance

#

i just wanna get the moment of the proxy initialization (listening)

final monolith
lost matrix
#

Not a mc server

dim adder
#

Hello guys why do i get this error?

"org.bukkit.inventory.meta.ItemMeta.getLore()" is null

if (event.getCurrentItem().getItemMeta().getLore().contains("Type: NPC") == true)```
lost matrix
jagged bobcat
lost matrix
final monolith
dim adder
final monolith
#

i need it before the listening

#

Before this Listening on /0.0.0.0:25577

#

after all plugins get enabled

lost matrix
dim adder
jagged bobcat
#

No

if (item.getItemMeta().hasLore){
if (item.getItemMeta().getLore().contains("string")
}
}
lost matrix
final monolith
jagged bobcat
young knoll
#

hasLore.contains isn't even valid

final monolith
#

not works for me :,C

lost matrix
#

What are you even trying to do?
Some janky ass stuff

final monolith
#

I'm creating an API, i'm planning to MyAPI#load it after server loading

lost matrix
final monolith
#

all plugins loaded

final monolith
#

?paste

undone axleBOT
lost matrix
lost matrix
#

But before they have been enabled

final monolith
#

no

lost matrix
final monolith
#

want to load my api after every plugins has enabled***

#

sorry

lost matrix
#

Why

dim adder
lost matrix
#

I cant think of a single good reason for that

final monolith
#

allowing to the server load their custom apis

lost matrix
#

*Since i dont think BungeeCord has service providers

final monolith
#

it may fail in some cases, and produce some warns either

lost matrix
dim adder
lost matrix
undone axleBOT
final monolith
#

and it will produce the classic warn that said you are using plugin classes without the softdepend or depend

#

no?

lost matrix
final monolith
#

but how about the second one?

dim adder
final monolith
#

i'd prefer my design

lost matrix
final monolith
#

you need to verify before using hasLore()

lost matrix
final monolith
#

looks more simply and bukkit friendly for me

lost matrix
final monolith
#

i will test it, thanks 🙂

river oracle
jagged bobcat
#

^

river oracle
#

you could do some magic things to see if the last plugin has loaded

final monolith
lost matrix
lost matrix
final monolith
#

but anyways, you're right, sorry.

dim adder
final monolith
#

what the

lost matrix
dim adder
final monolith
#

oh, that makes sense

dim adder
ivory sleet
#

Most of us understand that code dw

lost matrix
# dim adder yessir

Dont use kotlin if you are startled by a simple null pointer exception.
You dont understand the biggest selling point of it.
Use Java instead.

river oracle
#

but kotlin looks fancy guys

ivory sleet
#

plushTeddy if sth is nullable you can always do

lost matrix
ivory sleet
#

nullableStuff?.let {
//if not null run
}

#

Ye

#

Think same goes for ur apply blocks

#

(:

final monolith
dim adder
chrome ferry
#

then you're doing it wrong

lost matrix
final monolith
dim adder
#

look:

code:


        if (event.currentItem.itemMeta.hasLore()) {
            Bukkit.broadcastMessage("I ${event.currentItem.itemMeta.lore.toString()}")
        }```


the message pops up


error:

```Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.contains(Object)" because the return value of "org.bukkit.inventory.meta.ItemMeta.getLore()" is null
lost matrix
#

The code he posted should work. The problem is something else.

final monolith
#

let us see whats the result

dim adder
river oracle
#

I don't think thats valid kotlin code wouldn't it be like val or sum

ivory sleet
#

Cant you send the entire class?

#

Instead of just snippets

river oracle
#

send entire class

#

?paste

undone axleBOT
final monolith
#

bro what te fuck

lost matrix
#
        inventory.setItem(10, ItemStack(Material.STONE_BUTTON).apply {
            itemMeta = itemMeta.apply {
                displayName = "Standard"
                lore = listOf("Type: NPC")
            }
        })

This is not the problem

final monolith
#

xD

#

how is it happening

lost matrix
#

You are checking an ItemStack which you didnt anticipate

tardy delta
#

im feeling like i should get that insertDefaultFunctions() out of there

final monolith