#dev-general

1 messages Β· Page 610 of 1

obtuse gale
#

you're not gonna get one-to-one live chat support with Discord HQ unless it's a matter of utmost importance

#

that doesn't mean you shouldn't reach out to them

#

classic dkim

oblique heath
#

we found dkims alt

obtuse gale
static zealot
#

speaking of dkim

#

hi @half harness how you doin?

timber oak
#

Is there no meta flag for hiding the "dyed" or "color id" from leather armor? It seems client sided

distant sun
#

d;fields spigot itemflag

ruby craterBOT
#
Fields:
org.bukkit.inventory.ItemFlag%HIDE_DESTROYS
org.bukkit.inventory.ItemFlag%HIDE_POTION_EFFECTS
org.bukkit.inventory.ItemFlag%HIDE_PLACED_ON
org.bukkit.inventory.ItemFlag%HIDE_UNBREAKABLE
org.bukkit.inventory.ItemFlag%HIDE_ATTRIBUTES
org.bukkit.inventory.ItemFlag%HIDE_ENCHANTS
org.bukkit.inventory.ItemFlag%HIDE_DYE```
distant sun
#

HIDE_DYE

timber oak
distant sun
#

No

#

Hide_enchantments remove the glow and the other flags remove the text from lore

timber oak
#

Ah yeah, btw paper plugins works for geyser right?

distant sun
#

Idk

#

I'm not a fan of crossplatform shit

#

Especially if it isn't official

timber oak
distant sun
#

Is geyser a server software?

#

Unless it is based on paper api, paper specific stuff wont work

timber oak
#

Still not perfect though

brittle leaf
#

That wouldnt work as i remove from the db if the block was created by a cobblegen or added if the block was moved by a piston.

#

im not using it as a lnockoff core protect as i only need to tell if it the block has been modified by the player to prevent people from just placing and breaking the block to gain skill xp or tools that give more items back if they broke a non player modified block

#

its only for duplicate xp protection

#

im not sure if hooking into coreprotect would be a better option

jolly thorn
#

hello I have a question what is the use of having a lot of cores on your minecraft server if it is not possible to do multi-threading for the generation of the world

oblique heath
#

heart?

jolly thorn
#

cores *

oblique heath
#

ah

#

well you noticed correctly, there isnt really a point in having a lot of cores for a single minecraft server instance

#

even paper can only take advantage of around 4 vcores at most for some async stuff, and only 1 is responsible for the main server tick / bottleneck

#

so tldr there is no point in having a lot of cores for one server

jolly thorn
#

OK, so why do some hosts offer services greater than 4 cores if it's not useful?

oblique heath
#

because bigger numbers sell

jolly thorn
#

is it just to have a more sales aspect?

oblique heath
#

also if you're getting a dedicated machine you may be able to run more than one minecraft server instance on what they provide you

#

which would be a valid reason to need more cores

#

since more cores = more total servers than can be run on the dedi

jolly thorn
#

that just to doing a VM ?

oblique heath
#

but yes if you're just buying a single server then anything above 4 cores is just a sales tactic

oblique heath
cinder flare
#

well if you are getting a dedicated machine, you can run multiple servers on the same thing and not overlap CPU cores

jolly thorn
#

okay so in my case I have a dual xeon server so what will be the optimal configuration?

cinder flare
#

that's what I do for my server, we run a proxy and four Paper servers

ocean quartz
oblique heath
jolly thorn
#

okay so it will be more useful to connect several servers with bungeecord in this case

oblique heath
#

that would make better use of the hardware yes

#

you can also take advantage of those extra cores and run an sql server or other services on your machine

jolly thorn
#

ok thank's and I have one last question, do you know what will be the best OS to install on my server so that it is specially made for Minecraft servers?

oblique heath
#

any linux distro

#

i would recommend ubuntu server 20.04 because of the large community base

#

but you can do whatever you like

jolly thorn
#

ok thank's πŸ™‚

#

and does the type of hard drive have a big difference for servers?

oblique heath
#

if you're running a single server then the type of drive isn't super relevant

#

but if you are running multiple servers off of a single drive iops will start to matter

jolly thorn
#

ok and in this case I can use NVME ?

oblique heath
#

if you have nvme you're golden

#

nvme is better in all categories compared to any other drive type

#

(except by cost)

jolly thorn
#

yeah but I already have it so this is the best way to use it?

oblique heath
#

what do you mean by 'the best way to use it'

cinder flare
#

I'm personally a Debian gamer myself, but Ubuntu will be fine yeah

jolly thorn
#

NVME is the best way to doing a lot server

cinder flare
#

I'd recommend doing docker stuff to make it easy to run multiple things

oblique heath
#

yes nvme is the best

cinder flare
#

Pterodactyl panel is so freaking good I can't believe it's free

#

so might want to look into that

jolly thorn
#

Star do you know Unraid ?

ocean quartz
#

21.10 latest smh

cinder flare
oblique heath
#

actually i guess the new lts for ubuntu is coming out soon isnt it

cinder flare
#

I presume it lets you do docker stuff eh?

jolly thorn
oblique heath
#

yea, 3 more months

cinder flare
#

might be worth looking into Ptero still though

#

free, open source, really really good at game stuff

#

much more lightweight

oblique heath
#

agones πŸ₯²

cinder flare
#

πŸ₯Ά

oblique heath
#

what is that

cinder flare
#

pricing for unraid

oblique heath
#

yikes

#

is that per year

#

or per month πŸ’€πŸ’€πŸ’€

jolly thorn
#

no that just 1 time

#

this is a one-time purchase license

oblique heath
#

oh ok

jolly thorn
#

Do you know of any other software that allows you to have a docker management interface?

cinder flare
#

Pterodactyl Panel

jolly thorn
#

that a free OS ?

brittle leaf
#

would it be a good idea to load data from sqlite async when chunks are loaded and save when they unload and save every couple of minues async or should i load all the data from sqlite all at once?

prisma wave
#

depends really

#

lazy loading is probably the smart thing to do if you have loads of data

brittle leaf
#

i would have to load the data asap but unloading can be done later. maybe queuing would be better

obtuse gale
#

lazy evaluation😌

brittle leaf
#

i dont really want to load each chunk seperately, more group the chunks together and load the data for those chunks at once

#

atleast thats the idea of how to run very few queries from the database without killing the servers tps in the process

obtuse gale
#

I mean if it runs async, TPS is unaffected

urban sleet
#

So why not do everything async? /j

prisma wave
#

BASED

obtuse gale
#

Why not run the server thread in another thread then?

#

Dumb Mojang

prisma wave
#

Bukkit.getScheudler.runAstyncTask ({
() -> new MinecraftSrrvrr(run).run()
}

brittle leaf
#

i want to protect against people placing the block and breaking it to get xp

prisma wave
#

well

#

There's always nbt tags

brittle leaf
#

i cant store nbt on blocks that arent tile entities

#

i have a hashset of locations (world,x,y,z) which is what i would rather query then directly from the database

prisma wave
#

okay then do that

brittle leaf
#

if the database gets quite large then it would ultimately make it not possible to pull the entire database and load it into the hashset

prisma wave
#

yes it would, just load it async

#

or load chunk by chunk

brittle leaf
#

which is what i wanted to do

#

load on a chunk by chunk basis

#

or queue multiple chunks

#

im just not sure the right method for it

#

not the code, the idea.

prisma wave
#

honestly, even if the entire chunk is filled, it'll probably not take much more than a second to query & load, so just go for loading chunk by chunk

#

i doubt you'll need a queue

brittle leaf
#

so should i query when i break a block in the chunk or query when the chunk is loaded?

prisma wave
#

hmmmmmmmm

#

probably chunk load

#

block break could actually have a noticeable delay

obtuse gale
#

You'd have to wait for the data to be loaded

prisma wave
#

indeed

#

or make every block take as long as obsidian to break so you have time to load troll

oblique heath
#

so this system

#

is basically storing a boolean value for every coordinate that has ever had a block broken

brittle leaf
#

basically.

#

and only once

#

i dont need to store who broke the block or when it was broken

oblique heath
#

you could try some funky logic to reduce the footprint of all these coordinates

#

like right now your worst case scenario is if every coordinate in a chunk has had a block be broken

#

instead of storing each block individually, maybe there's an algorithm to detect cuboid patterns in the broken blocks - then you can just store the 2 corners of the cuboid

#

it seems a little complex but it can greatly reduce the impact of the worst case, as well as the chances of the new worst case happening

#

you can also consider straight up compressing the coordinates somehow and storing that blob, then loading that in on the chunk being loaded - instead of storing each coord in the db

brittle leaf
#

cause i could probably figure out a way to convert that blob of data back into location and coordinate

oblique heath
#

that shouldnt be hard

#

just serialize the chunk data and compress it to make the blob

#

then decompress and deserialize to get the data back

#

each block is a single bit, and you only need the relative coordinate within the chunk

#

then it's just 3 nested loops for x y z for the offset of the bit in your binary blob

#

and if almost the entire chunk is either 0 or 1 the compression ratio should be really good

#

(which is very likely)

brittle leaf
#

Set<World<Pair<X,Y>,Set<relative coords>>>

oblique heath
#

huh

oblique heath
brittle leaf
#

o wait i couldve just converted the blob back into locations

oblique heath
#

it's easy to get the locations from the blob

#

the offset of each bit within the blob is the location

brittle leaf
#

now to actually realize this

oblique heath
#

by my math the size of each blob uncompressed is ~12kb

brittle leaf
#

a blob would be a chunk right

#

the entire chunk

oblique heath
#

yes

#

16 x 16 x 384

timber gust
#

guys does anyone can help me with a code in java?

oblique heath
#

i think it's 384 at least

brittle leaf
#

384 for overworld

#

256 for nether and end?

oblique heath
#

then if you're lucky you can get an average compression ratio of 90-95%

#

so that brings it down to about ~1kb

#

per chunk

#

which is very tantalizing

brittle leaf
#

imagine

oblique heath
#

you could even consider immediately saving the blob back to file as soon as the chunk is unloaded

brittle leaf
#

async ofcourse

oblique heath
#

yeah

#

might not be required though, idrk and it'll be easy for you to figure out what's more convenient when you get around to deciding that

brittle leaf
#

tbh i just need something that wouldnt lag the server every time i break a block and wont hog memory with large amounts of data

oblique heath
#

honestly your original idea would have been fine for that criteria

#

the only way mine is better is it uses less space on disk

#

but the memory usage is about the same

#

if you really want to save memory you'll need to unload / save the block data on chunk unload

#

or at least not hold onto it for as long as the server is up

#

again you can figure out better rules down the line, like maybe waiting X minutes before saving to file

oblique heath
timber gust
#

@oblique heath

#

13 lines lmao

#

Ivan8or

oblique heath
#

@timber gust

timber gust
#

wait so can u?

oblique heath
#

just ask the question

#

and i or someone else will probably maybe answer

timber gust
#

the question is how im supposed to add a timer or smth like that

#

that was my try to do that

#

and its failed

oblique heath
#

do you want the task to run multiple times

timber gust
#

yes

#

but in delay

oblique heath
#

Bukkit.getScheduler().runTaskTimer(...)

#

this accepts an extra parameter; the interval between each additional execution of the task

#

and you can still set the initial delay

timber gust
#

ty

#

cya

worn whale
#

hello good I have a problem because I want to put a texture to a menu but I don't know why I always have the gap at the beginning of the menu as if it detected the character that is placed in the deluxemenu itself in the title menu

static zealot
jolly thorn
#

I have a question what will be the amount of ram recommended to support about 10 players with Paper

obtuse gale
#

44 GB

#

game's hungry af man

jolly thorn
#

44GB ?

#

you are generous x)

#

4GB is ok ?

wind patio
#

why the fuck people at EngineHub discord are so passive aggressive

#

who hurt them

half harness
half harness
distant sun
#

Does anybody know what this is?

  1. RAM 32Kx2
  2. RAM 14Kx2
  3. ROM 14Kx2
half harness
#

finally

obtuse gale
#

I'd say D0 and D1 are data lines but.. only two?

distant sun
#

it is from a test, don't question 🀣

obtuse gale
#

CS is prolly clock signal?

#

why tf are there two data lines only lmao

distant sun
#

:))

#

idk, this class is stupid, so is the teacher

#

all semester we did arduino simulation and now we have this shit at the final test

obtuse gale
#

☠️

distant sun
#

also, do you know what 8kx16 represents for a ROM 8kx16 memory?

obtuse gale
#

8k is the amount of memory, 16 would be the number of data lines for each address?

obtuse gale
distant sun
#

the answers are
a) 13 adresses, 16 data bits
b) 8 adresses, 16 data bits
c) 8000 words with 16 bits each
d) 8k adresses, 8 data bits

Trying to translate what the teacher translated from english, and it makes no sense

obtuse gale
#

yeah c)

#

er

#

no

distant sun
#

id say b) 🀣

obtuse gale
#

yes

#

it's c)

distant sun
#

ok em

obtuse gale
#

8k words, each word is 16 bits wide

distant sun
#

and RAM 2kx8 means 2k adresses, 8 data bits?

wind patio
#

time to get lazy and let copilot do everything for you

half harness
wind patio
#

took me like 2-3 weeks, idrm

#

😎

distant sun
#

I see it was very worth

half harness
wind patio
#

does recommend some good stuff sometimes

distant sun
#

yeah, incredible good

wind patio
#

apart from the vid you sent

half harness
#

lol

#

it doesn't want to make code for me ☹️

wind patio
#

tell him to

obtuse gale
#

Because Kotlin bad

wind patio
#

😎

half harness
wind patio
#

and it suggests based on what you previously wrote

#

but yeah, this happens too

#

and that's only part of the screenshot
there's like 50 more lines with the same if statement

half harness
#

hmm

wind patio
#

😎

prisma wave
#

it's somewhat profound

obtuse gale
#

ay that's quite ironic nah innit bruv?

prisma wave
#

shut your face

obtuse gale
long dagger
#

yo can you guys consider adding a collaboration channel? it would be meant for people who arent hiring, but are devs who want to collab on a project, and they can post in there to get other devs?

sly sonnet
long dagger
clear remnant
#

Ok guys i want your thoughts...... So i hired this dude months ago to make me a plugin, this plugin was so broken and was missing key elements, so i messaged the dude and said that it had to be fixed cause it was unuseable, firstly he blocked me and then i threatened to report him here.... He then said he would fix it, i am still yet to receive the plugin, he keeps saying that he will send me the finished plugin, but hes been saying that for nearly 2 weeks.... Keep in mind, ive been waiting nearly 2 months after he said he would fix it.... What should i do?

timber oak
#

Is BSON better than YAML for performance?

#

Or the other way around

long dagger
#

not worth your time

timber oak
long dagger
clear remnant
clear remnant
clear remnant
#

That really sucks though, hes been saying over and over that he would fix it

long dagger
#

yeah, it is hard to know if you have found a good dev

#

some just want the money but dont want to put the effort

#

I know a few

#

like that

timber oak
long dagger
#

Senior Team has a few of them

clear remnant
#

I payed this dude on october 10th

long dagger
#

woah

clear remnant
#

But honestly i think that he doesnt know how to fix the plugin

long dagger
#

lol

clear remnant
#

Cause hes now posting on mc market like hes moving on

long dagger
#

report him there too lol

clear remnant
#

I only found his mc market page today

long dagger
#

how much did you pay him and what did he complete?

#

you dont have to answer

#

just curious

clear remnant
#

So the plugin was supposed to be a brackets plugin that outputs the brackets to a discord bot

long dagger
#

brackets?

clear remnant
#

It also auto started the brackets event every day

clear remnant
long dagger
#

ah, he didnt code the actual tournament right? he just made it connected to discord with the auto start?

clear remnant
#

So he coded most of this, but in the worst way, instead of it supporting the unlimited players like i asked, he made it to be a even number which you had to set

#

Now this was a problem

long dagger
#

yeah

clear remnant
#

So there was no stop command

#

No force start command

long dagger
#

oh wow

clear remnant
#

And the auto events stayed open if noone joined it

clear remnant
long dagger
#

yeah...

#

not good

clear remnant
long dagger
#

ummm....

#

that is a issue

#

anybody in the right mind would have seen that as problematic from the start

clear remnant
#

Also the outputs to the bot was completly wrong, instead of it showing who would go against who, it would show it AFTER the round LOL

#

So that made the bot useless

long dagger
#

yeah

clear remnant
#

So i came back to him and asked for it all to be fixed

#

He simply blocked me

#

So i got my brother to message him

#

He agreed to fix it, then just gave me broken code that did nothing except flood my console.... He did this over and over

#

Then he judt left the dm group and blocked us both

#

Thats when i pinged him here like last month.....

#

Now he just comes up with excuses and says "ill send it tommorrow" "oh sorry, ill send it tommorrow" "ill send it in a couple of hours"

long dagger
#

did you send the money through like PayPal friends where you cant revoke it?

clear remnant
#

We sent it by paypal normal bussiness thing

#

But its been so long that we probably cannot charge back

#

I documented half of it onto a google docs

clear remnant
long dagger
#

honestly if I were you, I would try and revoke the money through paypal

#

they typically side with the person who paid the money

clear remnant
#

πŸ‘ Ill have to ask my friend, as he was the one who payed the dude for me....

#

But yeah

long dagger
#

for like $5 or $10 I can fix it for you, maybe even free, depends on the amount of work left

clear remnant
#

πŸ‘

#

Ill send you over the source code tommorrow, maybe you can tell me if its a massive job to fix

long dagger
#

alright, thanks, good luck on the paypal thing

pastel imp
#

Yo, anyone knows any good both MySQL and SQLite lib which is preferably good and easy to use. (Only find ones that either only have SQLite or only MySQL, not both)

wind patio
#

why not just use the java one?

oblique heath
#

^ just use jdbc

agile galleon
reef maple
#

Hi there. Can someone explains me why nobody can access my maven packages on github despite the fact I can deploy them ?

https://github.com/Rosstail/Karma (here, the latest version is 1.9.5 with both package and release with latest commit).

solar tusk
#

anyone know the plugin that makes adding people to groups and removing easy with LuckPerms?

obtuse gale
#

luckperms

solar tusk
#

Anyone know any useful API's?

reef maple
#

vault

solar tusk
#

like integration

ocean quartz
#

Which language?

humble silo
# reef maple Hi there. Can someone explains me why nobody can access my maven packages on git...

Dont use github packages, i tried the same thing a while back and theres just no good solution... In the end the reason it doesnt work well is because you need an access token to access(even public) packages... Heres a gradle plugin for it if you really want to: https://github.com/jarnoharno/gradle-github-packages-plugin Or this: https://stackoverflow.com/questions/57373192/how-to-add-github-package-registry-package-as-a-gradle-dependency

oak coyote
rancid gazelle
#

whats the place holder to put someone's xp on a scoreboard?

#

I use animated scoreboard if that makes a dif

oak coyote
topaz tree
#

where can I get help

potent nest
#

depends on what you need help with

timber oak
#

Best API for loading in schematics?

obtuse gale
#

worldedit?

timber oak
#

is it just WorldEdit API by sk89q? Is that the fastest?

#

Or well most efficient

obtuse gale
#

I mean it's the only one that I know of that fully implements the schem specification

#

and it's the only one that i know of

#

and it's the most used plugin if not the second most used lmao

wintry plinth
#

You've got FastAsyncWorldEdit is another

#

But honestly usually me pasting in schematics with -a (to ignore air) works wonders for me

timber oak
#

Hmm

wintry plinth
#

//paste <schematic> -a

#

pastes the schematic but ignores air blocks

obtuse gale
#

FAWE bad

wintry plinth
#

really? :o

timber oak
#

Oh yeah, but it runs through a command then

#

I assume

wintry plinth
#

oh you mean paste via java basically

obtuse gale
#

what are you trying to do? just load a schem and paste it in the world?

#

or what

wintry plinth
#

whats bad with FAWE also :o

#

ive been out the server loop for ages

obtuse gale
#

most if not all non-user issues in worldedit support is because they're actually using FAWE/AWE OMEGALUL

timber oak
obtuse gale
#

(also its lighting update system sucks)

timber oak
#

To generate maps

obtuse gale
#

and it tends to do very funky stuff between updates, there was this funny thing once that it just randomly filled chunk sections with lava

#

I'd rather be on the safe side and use good old and stable worldedit, no reason not to

wintry plinth
#

haha thats so funny

obtuse gale
#

my personal experience with it was disastrous but some issues may have been fixed since then, years ago

wintry plinth
#

Yeah I've been out the loop so long so wsn't sure

obtuse gale
wintry plinth
#

LOOOL wtf

#

how do you manage to fuck that up

#

this happens with every player

pastel imp
#

yo anyone knows in which java version single line variable initialization got added? (private String x, y, z;)

wind patio
#

fawe good

#

πŸ§”

ocean quartz
wind patio
#

wait java 13 has text blocks? the fuck

#
String html = """
              <html lang="en">
                  <body>
                      <p>Hello, world</p>
                  </body>
              </html>
              """;

first time I see this

ocean quartz
#

15 iirc

wind patio
ocean quartz
#

I think it was experimental in 13 but only added in 15, but i could be wrong

wind patio
#

and I was writing json in single lines

#

πŸ’€

pastel imp
wind patio
pastel imp
#

k ty

wind patio
#

or just go through all the versions manually and find it out yourself it it compiles

#

πŸ€“

ocean quartz
#

Ah yeah

This is a preview language feature in JDK 13.

wind patio
#

ah, it says here too

leaden crag
#

Is the syntax correct?
I can't manage to apply the nbt on the stick in DeluxeMenus, which according to the documentation should work fine.

  'air':
    material: STICK
    nbt_int: CustomModelData:2
    slot: 1
    display_name: '&8&Ltest'```

Are there any appropriate help channels?
#

Thanks for any help πŸ‘

cinder flare
dim rampart
#

When I do %player_exp%, I have 2500 xp points but in the scoreboard it says 0.7542857 what do I do?

urban sleet
#

Question, would it be possible to create a chat filter which uses machine learning to detect different variations of blocked words?

pseudo lagoon
#

hey im trying to create a custom javascript placeholder and when i try to use it in game it says my function is not defined even thouhg it is, this is my code
`var region = %worldguard_region_name_capitalized%
function regionspaced() {
return region.replace("_"," ");
}

regionspaced();and this is error i getCaused by: com.koushikdutta.quack.QuackException: ReferenceError: 'regionspaced' is not defined
at <javascript>.<eval>(?:6) ~[?:?]`

stoic plover
#

hello

sly sonnet
pseudo lagoon
oblique heath
pseudo lagoon
distant sun
#

Add "" around the placeholder

urban sleet
mental trench
#

Most likely

#

it probably gets the blocked words and create regex for many options

restive ravine
#

Blocking that last one is outrageous, at a glance it's not a word. Tbf blocking the word stupid is outrageous in the first place

mental trench
distant sun
#
  • instead of {0,} but ye
mental trench
#

true, was trying with +, but it requires at least 1, so i just used {0,} xd

prisma wave
old wyvern
#

Does it block s-chew-pid

pastel imp
#

Hi. Anyone knows the benefits of using enums for configurations for example compared to other methods?

#

To be more precise, why are enums good? And where can they be used inside the spigot api.

pastel imp
#

Never personally used it for filters but maybe who knows

distant sun
#

You mean, to use them for paths?

#

I personally use enums for messages because I can just define a field, put there the path and other info and then use Message.SOME_MESSAGE.send(player)

pastel imp
#

yes, that's technically the idea

#

but I also wanted to know where else I could use them

static zealot
#

where else you could use enums? or where else you could use configurations?

sly sonnet
#

Material.SAND

pastel imp
#

(sorry for late response)

cinder flare
#

Any time you have a set of symbols you want to refer to

#

It also helps in more functional languages with limiting pattern matching and stuff

#

But yeah, Materials, messages, I use an enum for the possibilities of a Vote in a voting plugin I made, so yea, abstain, nay, and not yet voted

#

Any time you have a choice really

obtuse gale
#

Materials isn't particularly a good example tbf

obtuse gale
#

how to I get my custom domain to wor

cinder flare
#

In what context, exactly?

#

Like, point your domain to your server?

obtuse gale
#

like have it connect

#

i have the doamin

#

and i have the server

#

the just dont work

cinder flare
#

You need a DNS SRV record pointing to the port of the server and an A record pointing to the ip

obtuse gale
#

i have those

cinder flare
#

Are they correct and have you waited for your DNS cache to flush?

#

It takes a while for DNS changes to apply

obtuse gale
#

wait

#

i didn;t wait for anythign

cinder flare
#

Usually takes like an hour for DNS updates to happen

obtuse gale
#

@cinder flare

#

i got invalid

#

host name

#

tcpshield

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

cinder flare
#

ah do that actually

glossy crane
#

Friend me if you can help me make a battle royale server

static zealot
#

Yo. so I dual boot windows and popos and I was wondering, is there a way to add windows to popos' boot loader? so I don't have to go into the boot menu, set windows as first and then restart and then do the same when I want to switch back to pop?

obtuse gale
#

Yo Yoooo

#

Are you Discord devs ?

static zealot
compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

obtuse gale
#

that's a shame

pastel imp
#

uh trying to explain to friend why adding a static getter to get the Main instance AKA the plugin, is a bad way of doing it...

#

how can I explain it to him lol

old wyvern
#

Adds an unmockable dependency which makes the consuming class not unit testable. Exposes what isnt needed to be exposed to any consumer class.

agile galleon
#

static things should be constants, that are always the same
the plugin class instance changes on every reload/restart

wintry plinth
#

I mean let’s be real, nearly nobody unit tests mc plug-ins as far as I’ve seen haha

static zealot
#

its not about mc plugins chazza. is about understanding what the fuck you do

static zealot
#

you'll see those guys call themselves programmers and all they do is copy paste. (yes I know its part of being a developer but understanding also is)

sly sonnet
#

use di lol

safe lily
#

I have a kinda random question:
Should you avoid having a lot of Runnables, doing more inside the same Runnable, or doesn't it really matter?

#

I mean every Runnable is a new Thread so

half harness
#

wdym? BukkitRunnable? runTaskAsynchronously?

potent nest
#

a Runnable isn't a Thread, so you need to be more precise

safe lily
#

Sorry, to clarify I meant BukkitRunnables

#

I want to make entities look at near by players, but I surely won't be using the PlayerMoveEvent

#

so I was asking myself, whether I should have a separate Runnable for each and every Entity, or have one, which handles it all

half harness
#

just have one

safe lily
#

the facing

#

aight, thanks

half harness
#

wait

#

if you're teleporting

#

you should be running that sync

safe lily
#

not teleporting, packets

half harness
#

ah

safe lily
#

just rotation

#

so, async is prolly the best bet here

forest pecan
#

What's the best way to explain the difference between .equals and == to a beginner? Like they barely know about classes or anything like that

#

(I am trying to explain the usage of String#equals, and why using == might not produce the expected result)

#

im thinking of using this as some guide too

distant sun
#

With equals() you can check if all properties of an object are equal with the ones of another object, while == does some very basic checks that are mostly good for stuff like numbers

ocean quartz
#

Trying to think of an analogy that would work but can't come up with anything

prisma wave
#

== is "are they in the same place in memory"
.equals is "do they have the same value"

#

memory = box, string = a thing in the box, == checks if they're the same box, .equals checks if the contents of the box is the same

steel heart
timber oak
#

For big plugins, should I have a config class for each yaml file? There will be like 3-4 files but a lot of configuration

#

Just not sure how it would be best structured

#

Right now I think one manager to save and load everything, and then a class for every yaml file?

agile galleon
#

If you already have a few yaml files, a class for each file is probably the best way

timber oak
agile galleon
#

Yep

haughty matrix
#

hey i need help getting a hacked account back

#

can anyone assist me

compact perchBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

old wyvern
little hamlet
#

Hello i was wondering if any common plugins like essentials have the ability to change the player's NameTag

hot hull
#

/nickname

little hamlet
#

Yes but above the player's head

#

not nick on chat

hot hull
#

use a plugin like TAB to change that, and just use essentials nickname placeholder instead of player name

little hamlet
#

Theres this plugin NameTagEdit but im looking for if i can do it already without getting to many pl in my server

distant sun
#

TAB has such function, and you can also use it for Tab

regal moon
#

Hi, i need to spawn an npc or an zombie that has noAI but he can hit me, Is it possibile to do if yes how? Thnx

crisp berry
#
        if (p.hasPermission("trail."+trail)) {
            BukkitScheduler scheduler = Bukkit.getServer().getScheduler();
            final ParticleEffect effect = ParticleEffect.valueOf(trail);
            scheduler.scheduleSyncRepeatingTask(this, new Runnable() {
                public void run() {
                    if (!proj.isOnGround() && !proj.isDead())
                        effect.display(0.0F, 0.0F, 0.0F, 10.0F, 1, proj.getLocation(), 15.0D);
                }
            }, 0L, 1L); } else {
            p.sendMessage(ChatColor.RED+"You do not have permission for this trail!");
        }
    }```
my problem here is ``if (p.hasPermission("trail."+trail)) ``dont work 
if I remove the`` + trail`` and in the ``""`` I put ``"trail.lava"`` it goes with all the trails when I would like to do it one by one the plugin however consists in creating a GUI where inside I can choose the particles but as you can see it didn't work for me Thanks in advance
forest pecan
#

im so annoyed lol

#

i completely forgot that string interning exist

#

so when i tried to make an example that == and .equals are different, i forgot abt string interning and it kept returning true for ==

#

XD

#

kinda embarrassing

obtuse gale
#

yeah lol

#

that's why you should use lists thinksmart

mystic cradle
rancid gazelle
#

I need help with luck perms thingy p-q

#

if anyone can help pls dm

potent nest
forest pecan
#

i try to avoid the word pointer cause it might be a bit confusing

#

cause they aren't really pointers

hot hull
#

how is it going to hit you if it has no ai

potent nest
forest pecan
#

?

regal moon
hot hull
#

Well yea just make the entity not move, there's lots of ways to do that

regal moon
#

Can you tell me one way?

#

Plz

#

I am new

#

?

hot hull
regal moon
#

Thanks i appriciate it

potent nest
forest pecan
#

I don't want my students to go around and say that it's a pointer or something because that isn't true.

#

In other words, it's references, not pointers

potent nest
#

what's the definition of a pointer in your opinion?

prisma wave
#

a pointer is just a memory location, whereas a reference is a pointer that has to reference a valid value

#

rust and go have references, c++ has pointers

#

and probably references too idk

sly sonnet
ocean quartz
#

I pinged you before about it

sly sonnet
#

ah yeah sorry

#

forgot about it

static zealot
#

smh

safe lily
#

soo, I am spawning an Entity like this:

this.entity = (LivingEntity) location.getWorld().spawnEntity(location, EntityType.ARMOR_STAND);

and I need to get its entityId, in a different class, before the Entity actually spawns
idk if this is just horrible code design, or if this is possible

help is appreciated!

#

inside #spawnNpc() I need to run the register method before spawning the entity, but for this I need to get the entityId, which doesn't exist yet https://pastie.io/pexmld.groovy

plain belfry
#

Hello, does anyone have time to help me with a crash and optimization of a survival server?

brittle leaf
#

just rewrote some code and now it does what i need it to do in 10 line instead of 50

#

feeling good

sweet cipher
#

Nice

ruby dew
#

any servers actually use custommodeldata?
I feel like only super rpg-oriented servers would use this custommodeldata thing

#

cuz most of the servers would be quite reluctant to make resourcepack for this

distant sun
ruby dew
distant sun
#

On #showcase you can find a lot of stuff that are most likely done with CustomModelData and aren't related to RPG

ruby dew
#

oh ok wait i get what you mean now

#

oh ok thx a lot

#

thats cool

distant sun
#

np

ruby dew
#

lmao you can basically make anything with custommodeldata and custom font

distant sun
#

CustomModelData is nothing more than just a numeric identifier for items

#

so you no longer have to depend on stuff like display name

ruby dew
#

Yeah it’s just a simple nbttag

pastel imp
#

Thoughts about licensing systems / anti-leak systems?

#

Isnt it more worth to just make it open source and those who want to pay, pay, since most people dont know how to compile a plugin anyways

#

You usually pay for support and updates, sooo

#

Or am I wrong?

static zealot
#

no you are not wrong. I like freemium

haughty lion
#

can I get placeholders with discord.js?

#

like for a bot

#

which shows some placeholders

urban sleet
prisma wave
#

DRM bad licensing bad

#

Freemium good

pastel imp
#

Pog champ then

#

I mean its not that Freemium

#

Since it takes some knowledge to compile a plugin

#

But lets hide that.

urban sleet
#

Our plugin includes a texture pack, so paying for the plugin instead of compiling gives you those default assets

wintry plinth
#

I don't see the issue with licensing, it all comes down to what the product is, the same thing with obfuscation. Of course, I've became much more pro-open source from last year, which is why I always laugh when clips stuff isn't open sourced (because everyone here preaches it so much).

Even for my own project, the spigot plugin/adapter will be open sourced, but the dashboard itself wouldn't be (for obv reasons).

urban sleet
#

I think the choice should be up to the individual (except when there is some license which overrides your choice, in the case of bukkit plugins, that would be the bukkit license)

static zealot
prisma wave
remote goblet
#

gamered i guess

pastel imp
#

Ye makes totally sense

#
  • default assets depending on the plugin
civic cairn
#

lol i think i start understanding the benefit of dependency injection libraries

#

now my ClanManager depends on WorldGuard which is only used in a single place

steel heart
#

Yeah they’re quite nice, altho they insinuate themselves into the code base so it was somewhat painful to switch.

long dagger
#

I am attempting to create a massive network, with a multitude of super complicated features. How practical would it be to make my own fork of Spigot, and make everything in the server jar, having everything directly edited, without a plug-in?

mental trench
#

Can someone make it shorter?

#
r=readline;f=r().split(" ");s=r().split(" ");a=[];for(i in f)a.push(+f[i]+~~s[i]);print(f.length!=s.length?"Invalid":a.join(" "))```
#

i hate py so much :c

I=input
a=I().split()
b=I().split()
d=len(a)
if(d!=len(b)):I("Invalid")
print(*(int(a[i])+int(b[i])for i in range(d)))
mental trench
#

My code:js s=readline().split("") e=[...new Set(s)] print(s.map(l=>l==e[0]?e[1]:e[0]).join(""))Ruby:

k=gets.chars.uniq
puts$_.tr k*"",k[1]+k[0]```what the hell ![mike](https://cdn.discordapp.com/emojis/669413853406298115.webp?size=128 "mike")
long dagger
#

I wouldn’t make everything that way, I just thought it might be more efficient if some of core stuff was on the server jar

obtuse gale
#

tbh I'd just use Fabric

#

with mixins you can do pretty much anything you want with a mod, no forking, no patches, no hacky brittle workarounds

humble silo
eternal compass
# obtuse gale tbh I'd just use Fabric

I've been brainwashed into this too :p
if I ever make a public server again, I'm building everything in fabric
There's even APIs for custom items server-side, but vanilla client-side

obtuse gale
#

I like how the API is just a collection of pre-made events and utilities really to facilitate its usage

#

Rather than a fully fledged server API

eternal compass
#

yeah

#

because at the end of the day an API is almost never enough

#

unless it gets tons of additions

#

as people find features they want

safe lily
#

What conclusions can I make, if teleporting an entity asynchronously (#teleportAsync()) takes 2 seconds of laggy teleporting? Like the entity teleports to random positions between old and new location

#

Is this just the way async teleportation works or is the Thread literally at its limits?

potent nest
#

What

#

The entity won’t be teleported ansychronously

#

But it won’t cause sync chunk loading this way

distant sun
#

I think it also depends on the hardware, before we changed the server, teleporting took like 3 seconds and a lot of falling

distant sun
distant sun
#

yeah idk

winged mica
#

what's the best way to convert the armorstand headpose y to a yaw?

(I'm rotating the head by setting the eulerangle y but I also need to do the same thing with the full body)

distant sun
#

I mean, yaw and pitch are rotations

#

while x y and z are coordinates

winged mica
old wyvern
#

armorstand headpose y to a yaw

winged mica
#

Already googled for like two hours

old wyvern
#

nvm, I missunderstood the question

#

HeadPose seems to store the angle in radians

#

Location -> yaw needs it in degrees

#

so its
yaw = y * (180/PI)

winged mica
#

ok thank you

distant sun
ruby dew
#

so relateable

pastel imp
#

Actually relatable

hot hull
#

@ocean quartz your repo still down or?

ocean quartz
hot hull
#

Ah okay gucci

reef maple
#

[java]
Hi there, I would like to know why the first regex doesn't work when I try to check matches. What shall I must change on my regex ?

"\\{#[a-fA-F0-9]{6}}" //Doesn't work with "{#FF00FF}"
"#[a-fA-F0-9]{6}" //Works on it with "#FF00FF"
winged mica
obtuse gale
#

how are you testing it?

#

yeah it works fine

distant sun
#

If your string has other characters besides that hex, you want to use find()

ocean quartz
obtuse gale
#

Don't you have to Matt Matt of Matt?

ocean quartz
#

True

winged mica
ocean quartz
#

Then setBodyPose?

reef maple
reef maple
#
            Pattern hexPattern = Pattern.compile("\\{#[a-fA-F0-9]{6}}");
            Matcher matcher = hexPattern.matcher(message);
            while (matcher.find()) {
                try {
                    String color = message.substring(matcher.start(), matcher.end());
                    message = message.replaceAll(color, String.valueOf(ChatColor.of(color)));
                    matcher = hexPattern.matcher(message);
                    System.out.println("HEX");
                } catch (Exception e) {
                }
            }
//doStuff etc.

My code actually

distant sun
#

you dont need to reassign the matcher

reef maple
#

bad habit of one of my old code, i didn't see it. Thanks

distant sun
#

if you want to get the color from the matcher, use \\{#([a-fA-F0-9]{6})} and then String color = matcher.group(1)

reef maple
#
            Pattern hexPattern = Pattern.compile("\\{#([a-fA-F0-9]{6})}");
            Matcher matcher = hexPattern.matcher(message);
            while (matcher.find()) {
                try {
                    String color = matcher.group(1);
                    message = message.replaceAll(color, String.valueOf(ChatColor.of(color)));
                } catch (Exception e) {
                }
            }

I'm a bit bad with regex, should the parenthesis be written ? {(#FFFFFF)} or does this means it's a group ?

distant sun
#

your code most likely doesn't work because of that ^ your substring will also contain the {# and } and ChatColor#of will throw an exception which you ignore

#

No, Rosstail, the parenthesis are used for groups

#

group() or group(0) will be the entire thing {#FFFFFF} while group(1) will be just the hex FFFFFF

static zealot
distant sun
#

that's the 'api' for SuperVanish

static zealot
#

oh is it?

#

wait then this literally only supports SuperVanish?

distant sun
static zealot
#

oh IC

distant sun
#

No, you need to use group(1)

reef maple
#

Oh, it needs to use only the RGB.

#

Thanks

distant sun
#

np

reef maple
#
Pattern hexPattern = Pattern.compile("\\{(#[a-fA-F0-9]{6})}");
Matcher matcher = hexPattern.matcher(message);
while (matcher.find()) {
    try {
        String matched = matcher.group(0); //Trying to replace the whole {#XXXXXX}, works well
        String color = matcher.group(1); //Gets #XXXXXX, works well
        message = message.replaceAll(matched, String.valueOf(ChatColor.of(color))); //Replace matched by value in message, ERROR on replaceAll, not in the ChatColor
    } catch (Exception e) {
        e.printStackTrace();
    }
}

I got an IllegallRepetitionNearIndex pointing at the matched when I want to do the replaceAll. does it means my pattern/match/replaceAll is illegal ?

#

(And yes, I need the # inside {})

obtuse gale
#

As a side note, you should put the Pattern as a private static final field inside the class, compiling regex patterns is sort of expensive so it should be done only once

That aside, this is how it should be done #development message

midnight ruin
#

at first glance, it appears like you just need to replace the {} with ()
i have never used {} as a group operator
Pattern hexPattern = Pattern.compile("\(#([a-fA-F0-9]{6}))");

#112233
group 0 = #112233
group 1 = 112233

obtuse gale
#

that's because they aren't using it for grouping

#

the color pattern is {#rrggbb}

#

and the parenths capture the #[a-fA-F0-9]{6}

reef maple
obtuse gale
#

That's not a proper solution, the one linked is

naive ingot
#

Anyone here good with nms?

#

Im having some issues with ghost blocks, and the block being set via NMS

edgy drum
static zealot
#

Yooo the shirt is here. Just need to go get it from the post office

quiet depot
#

mine finally got shipped a few days ago

#

did you get one last year blitz?

dusky drum
distant sun
#

custom TypeAddapter probably

quiet depot
#

@dusky drum with the ip's you'll want a map of some sort

#

problem is with that the status will get bundled into the map (unless you use a custom type adapter)

#

so you can either separate the status & ips into different objects, bundle them into the same map, or use a type adapter

#

for the map I recommend making an object to represent the objects those ips correspond to

dusky drum
#

i'll just try with JsonObjects ig, cause i have the ips already

quiet depot
#

so it'd be Map<String, YourObject>

#

String = ip

#

lame

dusky drum
#

wa

#

im only sending 1 ip

#

so its like this

{
    "status": "ok",
    "1.10.176.179": {
        "proxy": "yes",
        "type": "SOCKS",
        "port": "8080"
    }
}
quiet depot
#

if there's only one ip why don't you just change the json

dusky drum
#

i cant

quiet depot
#

then I'd use a type adapter to map it to an object like this:

#
String status; // boolean/enum might be better depending on what statuses are available
String ip;
String proxy; // boolean/enum?
ProxyType type; // enum
int port;```
dusky drum
#

i'll see, just trying to make simple antivpn for private server

quiet depot
#

it's a cleanliness/quality thing

#

if you use json objects you'll probably end up parsing the structure (albeit through gson's api) at the same time you use the data - to do otherwise would be more effort than just using a type adapter

#

whereas if you use a type adapter, you're guaranteeing that the parsing is done before

#

you're putting the data in a ready to use format before hand

dusky drum
quiet depot
#

I'd just implement JsonDeserializer & JsonSerializer

dusky drum
#

ok

#

i need to figure out how to get ip to the deserializer tho

quiet depot
#

you'll need to loop through embedded objects

#

of which there'll be only one according to your json schema

dusky drum
#

ah, i never actually played with json so i have no idea what is what, ig i should read that before doing anything with iot

quiet depot
#

here's an easy way

#

first convert the JsonElement to JsonObject via #getAsJsonObject

dusky drum
#

ya but then

quiet depot
#

you can then get the status, via retrieving that property

dusky drum
#

i know his part but then how do i get what that object contains?

quiet depot
#

then remove the status property

#

so the only property remaining is your ip one

#

you can find the ip with #entrySet

#

that'll give you a Set<Map.Entry<String, JsonElement>>

#

there'll only be one element in the set

#

the String the ip, JsonElement is a JsonObject containing the other stuff

dusky drum
#

ahhh

#

quality i love pterodactyl, they dont even show full errors anymore

cinder flare
#

bro ptero is amazing

#

best panel i've ever used

static zealot
#

because I've only ever used Ptero and Multipanel or whatever the shitty one was xD

dusky drum
#

i like it but i dont understand why they made console not print full errors anymore

static zealot
#

pretty sure its always had a limitation

#

too many lines too fast or something like that

cinder flare
#

i mean it literally just connects to the std out of the java container

#

it doesn't really do much else

distant sun
#

DON'T PANIK panik

foggy pond
#

I finally learned how to use predicates

#

And oh my god they are amazing

steel heart
#

very indeed cool stuff

ruby dew
#

java functional interface sucks
c++ function pointers > all

potent nest
#

You should avoid sarcasm an irony on the internet

cinder flare
#

lol, I'm having quite a bit of good fun with Consumers and such

#

Using some spicy callbacks in a complex GUI I'm building

ruby dew
#

Not sarcasm at all
Java is just rubbish so unnecessary

onyx loom
#

ok

pure glacier
#

So um...
Im writing a batch file, or a bat file, And I want to ask the user for the filename and then create the file with the users filename... How do I do this?

7z a "C:\%name%" "-file to compress here-"```
This dosent seem to work...
pastel imp
#

Thoughts on module/extension based plugins?

pastel imp
obtuse gale
#

@obtuse gale Can you accept my friend request?

split spear
#

Any way to update linked accounts? the account that was previously linked to spigot account no longer exists?

#

and im desperately trying to get a hold of a Dchat dev build for 1.17.1 upsidedown_cry

#

pls someone ping if they have the solution

steel heart
#

~~Yo if anyone feels kind enough, I'd appreciate a thumbs up on the feature req https://youtrack.jetbrains.com/issue/IDEA-287959

which is that we can through intellij change the default gradle wrapper version (without having to change Use Gradle from in Settings)~~

nvm this is alr a feature req oopsie

humble silo
pastel imp
viral grove
#

What should I use instead of '&' for adventure api?

obtuse gale
#

just components

#

Component coolio = Component.text("foo", TextColor.color(0x123456), TextDecoration.ITALIC);
add static imports for extra style points

#

if you're talking about configuration or general user input, minimessage is the (modern) way to go

primal crystal
#

Hey...just a doubt,

    public void broadcast(@NotNull final List<String> messages, int delay){
        if(messages.isEmpty())
            return;

        for(int i = 0; i<messages.size();i++){
            int finalI = i;
            manager.getPlugin().getServer().getScheduler().runTaskLater(manager.getPlugin(), new Runnable() {
                @Override
                public void run() {
                    audiences.all().sendMessage(MessageFormatter.transform(messages.get(finalI)));
                }
            },40);
        }
    }

What it should do is send each message with a delay of 40 ticks right...but for some unknown reason..its having an intial delay of 40 and after that its all gets send together

#

i tried with forEach() first then with the pure forloop...both resulted the same

mental trench
#
  1. Loop is called "at the same time"
#

you are not telling the code to wait 40 ticks, you are scheduling the messages to run after 40 ticks

#

you'd better use runTaskTimer with an interval of 40 ticks

#

or try a different approach

primal crystal
primal crystal
primal crystal
pure glacier
#

So um, I am a complete beginner on building mods.
I decided to take a easy project as my first,

  1. Turn off auto-save
  2. Zip/tar 'world' folder
  3. Upload it to Google Drive/Dropbox/Outlook
  4. Delete older backups.

Can someone guide me? Get me started?

pure glacier
agile galleon
#

when you are in a singleplayer world?

cinder flare
# primal crystal Both are apparently the same right?

Nope. Imagine you had 10 people lined up, each with a different message memorized. Then, you walked along the line of them, telling each of them to go tell someone a message 100 ft away, but to wait 2 seconds before going. Then, right after one another, they ran up to the person and told them their message all at the same time. That's what your code is doing

#

It's not doing a message at a time, it's queueing all of those runners at basically the same time and giving them a starting delay

primal crystal
primal crystal
cinder flare
#

Well, there are many ways to address this, and honestly none of them are great. My idea would be a queue that you have a scheduled repeating task for that just gets the first thing in the queue and broadcasts it, or doesn't do anything if the queue is empty

primal crystal
# cinder flare Well, there are many ways to address this, and honestly none of them are great. ...
    public void broadcast(String message){
        manager.getPlugin().getServer().getScheduler().runTask(manager.getPlugin(), new Runnable() {
            @Override
            public void run() {
                audiences.all().sendMessage(MessageFormatter.transform(message));
            }
        });
    }

    public void queueBroadcast(@NotNull final List<String> messages, int delay){
            if(messages.isEmpty())
                return;

            manager.getPlugin().getServer().getScheduler().runTaskTimerAsynchronously(manager.getPlugin(), new Consumer<BukkitTask>() {
                @Override
                public void accept(BukkitTask bukkitTask) {
                    if(messages.isEmpty())
                        bukkitTask.cancel();

                    final String message = messages.get(0);
                    messages.remove(message);
                    broadcast(message);
                }
            },delay,delay);
    }

Well how about this...I haven't tested it yet...

#

Apart from having a new list object for each message, I am not seeing any major drawbacks for it

cinder flare
#

That actually doesn't look terrible, besides the fact that you have to have the entire queue before you broadcast any messages, and that removing the message from messages before sending it might do something weird

primal crystal
#

i haven't worked with bukkitTask...is this how it should be done

cinder flare
#

maybe this.cancel()?

#

cause cancelling the bukkittask just cancels the brodacast method before you even run it, so it won't cancel anything

primal crystal
#

its a consumer right? it shouldn't have that

#

let me try with runnable

distant sun
#

isn't the consumer method deprecated?

cinder flare
#

i mean, even just returning instead of cancelling bukkittask would probably work

primal crystal
#

Runnable interface doesn't have a cancel method

primal crystal
#

it wouldn't get out of the scheduler right?

distant sun
#
new BukkitRunnable() {

    @Override
    public void run() {
      //code
      cancel();  
    }

}.runTaskTimerAsynchronously(manager.getPlugin(), delay, delay);```
This should work
cinder flare
#

^

distant sun
#

if you have a condition like if something then cancel() make sure you add a return; after

cinder flare
#

except pretty sure it's @Override not Overwrite

distant sun
#

Yeah xD

primal crystal
cinder flare
#

lol

distant sun
#

yes

primal crystal
cinder flare
#

😌

distant sun
#

it doesn't cancel the method in that moment, but after the run() method reaches the end

quiet depot
#

🌞

primal crystal
#
    public void queueBroadcast(@NotNull final List<String> messages, int delay){
            if(messages.isEmpty())
                return;

            manager.getPlugin().getServer().getScheduler().runTaskTimerAsynchronously(manager.getPlugin(), new Consumer<BukkitTask>() {
                @Override
                public void accept(BukkitTask bukkitTask) {
                    if(messages.size() <= 0) {
                        bukkitTask.cancel();
                        return;
                    }
                    final String message = messages.get(0);
                    broadcast(message);
                    messages.remove(message);
                }
            },delay,delay);
    }

Finally this worked... thanks Gaby & Star for the help

distant sun
#

np

#

btw you can use an Iterator

quiet depot
#

and a lambda

distant sun
#

on that if you check if !iterator.hasNext() and then to get the message, iterator.next()

quaint isle
#

Do you know any spigot plugins that host their own webserver, ideally combined with a react frontend?

Would like to look at some code for inspiration πŸ˜…

distant sun
#

maybe dynmap, Plan, BlueMap

quaint isle
#

Oh true, my small brain didn't think of all these map plugins. That's a good start πŸ‘

distant sun
#

yea

cinder flare
#

awe no, not the integrated web servers

#

way to tax my server resources lol

quiet depot
#

because web servers use so much resources

#

just bundling nanohttpd or something will use fuck all

cinder flare
#

damn piggy why you gotta do me like that

quiet depot
#

yes

cinder flare
#

they feel expensive okay

#

and dynmap certainly actually is

quiet depot
#

I mean the big java ones probably are

cinder flare
#

but that's probably because it does a shit ton more

quiet depot
#

probably the rendering

#

doubt the actual web server uses much

distant sun
#

yeah, im not a fan of those webservers hosted on the game server xd

quiet depot
#

dynmap uses jetty

#

idk how much jetty uses

#

probably way more than necessary but probably still not a huge amount overall

cinder flare
#

it's okay, my poor oracle server can probably handle it

quiet depot
#

i thought the oracle servers were pretty good

cinder flare
#

just kidding, don't run big servers on oracle ARM lol

quiet depot
#

are they bad?

cinder flare
#

learned that lesson the hard way

quiet depot
#

I was able to run some intense modpack servers on it

cinder flare
#

well, for 75 players with a bunch of heavy plugins, they ain't that good

quiet depot
#

oh

cinder flare
#

migrated to OVH dedi, now we coast at 20 TPS with 100 players with even more heavy plugins

#

NOT ORACLE

quiet depot
#

yes

#

I was confused

#

why would someone willingly use oracle

cinder flare
#

my brain likes to swap them because they both start with O

#

OVH is cool, is the point I'm getting at

#

and they just provide a no-frills setup too

#

no web panel, no stupid network stuff

quiet depot
#

a what

#

oh

cinder flare
#

just raw SSH into a server 😌

quiet depot
#

I can see oracle's fluff being useful

#

it's just the ux sucks

cinder flare
#

it really does

quiet depot
#

and there's some really questionable design choices

cinder flare
#

but I mean, I had all the same fluff on Azure, AWS, and DigitalOcean and they all were useless

quiet depot
#

but if it wasn't implemented so shit, all of that fluff would probably be useful

cinder flare
#

just made me have to implement firewall rules twice lmao

quiet depot
#

well it's not just the firewall

#

it's just the stupid things like how you can't reinstall an operating system

#

that's such a trivial, but essential functionality

cinder flare
#

yeah, you gotta like have a volume and shit

#

so weird

primal crystal
pastel imp
#

uh question, if I have a proxy (bungee) and I have 2 servers in it, let's say a lobby and prison, is it possible to make a /lobby in prison that sends the player to the lobby without needing a bungee plugin?

agile galleon
#

No

cold prawn
#

Just was wondering, how did they add the ----- here in the category names in a way where they scale well on mobile etc

inner umbra
#

Bold and a specific font

#

IDK which font

cold prawn
#

font?

inner umbra
#

Yes

cold prawn
#

and categories are forced to be bold ish i think

inner umbra
#

I think so. Not sure though.

cold prawn
#

so how would they use bold

#

and you cant change the font, its probably a special character

#

but my question is still how it scales so well with with mobile, cause ud imagine it would cut it off and do the ... thing

inner umbra
tranquil crane
#

copilot be like

agile galleon
#

Good

ocean quartz
# tranquil crane copilot be like

You type something then start scrolling down and suddenly your code shifts down and you don't know why, then you scroll back up to see the giant suggestion from copilot

obtuse gale
#

item loot item

half harness
#

rn using nginx, but is there a faster way to edit the html file(s) without having to use cmd all the time?

Or maybe a batch file that can sync my folder on windows to the machine in linux?

#

filezilla won't work bc it requires sudo/root

#

i'm not even sure if I can ssh with a batch file

#

so

#

maybe i can put some cmds on sticky note

#

and paste them in ssh

#

butttttttttttt im cli noob

cinder flare
#

is that someone's real code???

oblique heath
#

you can scp the html over after editing it on your windows machine

oblique heath
#

scp is a way to copy files over using ssh

cinder flare
#

sftp also does that

#

also have you considered git?

half harness
#

uh

cinder flare
#

also scp is poopy no use

oblique heath
#

scp isnt poopy ur poopy

half harness
#

o.o

cinder flare
# oblique heath scp isnt poopy ur poopy

According to OpenSSH developers in April 2019, SCP is outdated, inflexible and not readily fixed; they recommend the use of more modern protocols like sftp and rsync for file transfer.[3] A near-future release of OpenSSH will switch scp from using the legacy scp/rcp protocol to using SFTP by default.[4]

oblique heath
#

slander

cinder flare
#

literally from the wikipedia page lmao

half harness
#

Β―_(ツ)_/Β―

cinder flare
#

k, so ssh into the box and use vim

#

ya weirdo

tranquil crane
half harness
#

vim?

#

is vim hard

#

i just use nano

#

lol

cinder flare
#

oh i guess you could use nano

#

look into vim though

#

it'll change your life

half harness
#

o

#

okay

#

πŸ‘€

cinder flare
#

bit of an initial hurdle, but once you get over it, it's all straight up improvements to editing speed and ability

obtuse gale
half harness
#

speed?

obtuse gale
#

it's really funny

half harness
#

πŸ‘€

cinder flare
#

that just looks so insane

cinder flare
#

which is what you spend most of your time doing when coding anyways

obtuse gale
cinder flare
#

that's sick

#

ivan what was the raised eyebrow for

cinder flare
#

i know i personally spend most of my time not directly inserting text

half harness
#

that i want to use intellij

#

😌

#

webstorm*

cinder flare
#

hey dkim guess what

#

IdeaVim exists

oblique heath
#

i dont think most people spend time coding actually typing

half harness
cinder flare
cinder flare
#

changed my life