#help-development

1 messages · Page 789 of 1

storm crystal
#

Why do you need class then

tender shard
#

?learnjava

undone axleBOT
wet breach
#

this is actually wrong

eternal oxide
#

Most people abuse static because they don;t understand it and their IDE suggested to make a field static so they can access it outside the instance.

wet breach
#

a Specification governs but it doesn't dictate everything

slender elbow
#

lol

storm crystal
#

Lol

tacit thistle
#

the JLS clearly specifies how an enhanced for loop has to work under the hood

slender elbow
#

it literally says how it is compiled

#

but sure believe what you want to believe

wet breach
#

its like the yaml spec for example, you can implement yaml yourself, but it only has to adhere to certain rules. Here is an example. Lets say the spec says that for something to be considered an Integer it must be a number. Cool, itt doesn't say Integer can't provide other methods other then those used for numbers. That is, you could add a convienient add method to Integer if you wanted, just as long as it returns what the spec deems as an Integer.

#

no where in the spec does it say it can't have an add method

#

nor does it say it must have one

#

This is implementation detail

slender elbow
#

because Integer is neither a language nor a VM feature

wet breach
#

hence, implementation can be different then spec

tacit thistle
#

you're mixing up weird things about the language spec and the Java SE API spec

lost matrix
#

So you create a new instance of a class every time you want to call a method?
And then the entire object gets discarded again.

tacit thistle
#

whenever they interact, it is clearly written how they have to interact

tender shard
storm crystal
wet breach
tender shard
#

lol

tender shard
#

but once again you lack to understand basic principles of java and ignore all the docs people send you

#

you don't even comprehend the difference between classes and instances

lost matrix
tacit thistle
wet breach
#

sure, which strictly speaking an implementation is free to deviate

slender elbow
#

I mean yeah if I write a java compiler that doesn't compile java it just slightly deviates from the language specification

tacit thistle
#

no, implementations can not deviate, otherwise they are implementations of something else

storm crystal
wet breach
#

oh guess kotlin isn't real

storm crystal
#

Just like someone told me to

slender elbow
#

kotlin is not java

wet breach
#

could have sworn it was a derivative of Java

slender elbow
#

so it does not have to follow the language specification

storm crystal
#

Good to know people give me terrible tips in that case

tacit thistle
slender elbow
#

and the java virtual machine has absolutely nothing to do with the java langauge

tacit thistle
#

even lombok isn't java, it is a different language

eternal oxide
#

So much 🧂 today.

storm crystal
slender elbow
#

i don't understand how frostalf can be so confidently wrong

wet breach
lost matrix
wet breach
#

I am going back to playing my games, I will check the implementation this weekend

tender shard
fluid river
#

whats goin on lol

pseudo hazel
#

noone knows anything

lost matrix
storm crystal
tender shard
#

because you keep ignoring ?learnjava links

pseudo hazel
#

I think we did leave a few links to help you learn those

storm crystal
wet breach
#

?learnjava

undone axleBOT
wet breach
#

the last link is the Java API

storm crystal
#

How can they be certain that thry do contain everything needed if they haveng seen them

storm crystal
#

Lol

wet breach
#

because the bot was setup by the staff

lost matrix
eternal oxide
#

The fundamentals are everything you are talking about, things you would learn from ?learnjava. Things like what is a class, what is an interface, what is static etc

fluid river
wet breach
#

or some kind of API

tender shard
wet breach
#

not sure why you wouldn't, it won't necessarily teach you super advanced methods

#

but it will teach you proper methods

fluid river
#

me when opened alex profile banner

storm crystal
pseudo hazel
#

well its not just a single paragraph

lost matrix
wet breach
#

oh here we go again with Dusk wanting to argue about learning fundamentals and pretending to not know them when they claim they are learning python -.-

#

in order to use python you would agree there are certain things you would have to know first right?

#

such as, how to declare variables, where you can declare them, how to assign them, unassign them etc

fluid river
#

isn't python also OOP so fundamentals of java == fundamentals of python

wet breach
#

those are fundamentals and they don't strictly apply to a specific language

storm crystal
#

I didnt even weaponize it

#

Lol?

fluid river
#

i skipped 99% of dialogue tho

storm crystal
#

That they are talking about something irrelevant

wet breach
#

I distinctly remember you saying you are taking courses in python because your uni is requiring it

fluid river
#

and it's kinda hard to read cuz most of it was blaming frostalf for not knowing java

storm crystal
#

I just mentioned it

#

Did I say that python is better than java or what

fluid river
storm crystal
#

You said you missed 99% of convo

fluid river
#

yeah and also said it's kinda hard to find where it started

wet breach
fluid river
#

so can you just ask and stop arguing in dev chat

storm crystal
#

Your first paragraph uses the fact that I mentioned python once

wet breach
#

my point is, is that python is a programming language, which also requires at the very least of knowing the fundamentals in order to use it

#

otherwise you will just have gibberish

fluid river
#

maybe move to dms or random text channel not related

wet breach
#

All programming languages require knowing the fundamentals and each language has a slightly different fundamentals needing to be learned but for the most part they are all relatively similar

#

some more so then others

storm crystal
#

Nobody needs help with anything rn

wet breach
#

so if you learned some of the fundamentals of Python, why is it so hard to understand that you need to know the fundamentals of Java?

fluid river
wet breach
#

and what those may be or how to even look them up

storm crystal
fluid river
#

🤔

#

yo guys you wanna look at what shit i made in unity3d

tender shard
#

why not

fluid river
#

it's currently loading...(it's taking kinda too long for some reason)

#

i'm in verified

lost matrix
#

@storm crystal Here are your "relevant" questions with answers

What is this static with {}
A static initializer block to initialize classes when they are loaded
Why is there separate thing like that
Cant you just use constructor
No
And why you cant do it in constructor
Because it doesnt initialize statically
Why method needs to be static to access static shit
Fundamental java question. (They exists in different scopes)
Well people here told me to not make shit static
Rightfully so. Dont touch it for now as you dont seem to appreciate its importance.

tender shard
#

good summarization

fluid river
#

tho method doesn't need to be static to access static no?

lost matrix
wet breach
#

lol

#

I don't think we need to get into technicals with it

fluid river
#

i mean

#

it doesn't need to

wet breach
#

well he did say static exists in different scopes

fluid river
#

alr my unity booted up

#

@tender shard come join

lost matrix
#

Test

slender elbow
#

passed

eternal night
lost matrix
storm crystal
#

If i alr got answered

hazy parrot
#

Tf

tender shard
#
    /**
     * Tests whether the tests run
     */
    @Test
    public void test() {
        System.out.println("Test");
    }
eternal night
glossy venture
#

idk why but i often declare a test method and then dont run a test but rather just execute code and print results

#

which is probably stupid

lost matrix
tender shard
#

i wish toolchains would support source/target. this feels so bad

java {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
    if (JavaVersion.current() < JavaVersion.VERSION_17) {
        throw RuntimeException("Java 17 or higher is required to build.")
    }
}
slender elbow
#

wat

tender shard
#

I said

#

(see message above)

slender elbow
#

why is java 17 required to build if you're gonna target java 8?

rotund ravine
#

u still on about that alex smh

slender elbow
#

but afaik you can have both anyway?

tender shard
slender elbow
#

you should use the release flag regardless

slender elbow
tender shard
#

and how is that called?

slender elbow
#

autoTargetJvm or whatever, uh, i don't remember where

#

let me check

dry hazel
#

java.disableAutoTargetJvm()

#

iirc

tender shard
#

thx I'll check that later

slender elbow
#

ideally toolchain should be set and release flag used instead of source/target (that is kind of "deprecated", release flag ensures some api availability things)

bitter rune
#

What fish types are actually catchable? I have cod, puffer, salmon, and tropical

slender elbow
#

keep in mind that anything regarding loot tables can be modified with data packs and plugins, that's showing the default things

tender shard
#

i love how in every game you can fish random junk like leather boots but in reality it never happens

#

fishing must be so disappointing in real life

rotund ravine
#

Magnet fishing

#

Bombs stonk

slender elbow
#

beat me to it

tender shard
#

imagine you wanna fish a rotten leather boot but all you get is a salmon

slender elbow
#

lol

tender shard
#

dynamite fishing

rotund ravine
#

Scuba diving

tender shard
rotund ravine
#

Yes

#

Didn’t know it existed?

slender elbow
#

you'd think it would be different in swamps too but i guess not xd

#

they should add mosquitoes and swamps are absolutely swarmed with them

tender shard
#

yeah and they'll give you malaria potion effect

slender elbow
#

💀

tender shard
#

then you have to find a black priest to give you malaria vaccine like in far cry 2

slender elbow
tender shard
#

but they only spawn in desert temples

#

desert villages*

bitter rune
#

thanks

storm crystal
#

Can I give pdc to item in gui

chrome beacon
#

yes an item stack is an item stack

#

it doesn't matter where it is

storm crystal
#

Can I edit its lore while its in this gui as well?

glad prawn
#

the same

storm crystal
#

How do I make gui that can store items for each player and let him take them out like enderchest

lost matrix
storm crystal
#

Whats delegate

storm crystal
pseudo hazel
#

this would be for anything gui related specific to a player

rotund ravine
#

IF by stefvanschie 💪🏻

lost matrix
storm crystal
#

Is there no other way

rotund ravine
#

There is plenty of ways

fluid river
#

map<uuid, inv> for example...

#

@lost matrix

storm crystal
#

Like if I want to open inventory and have an itemstack that would tell players experience, cant I just make its lore formatted with value of that player's stat taken from config?

fluid river
#

it's better if you use PDC

#

And after PDC use lore

rotund ravine
#

What

storm crystal
#

That shit is just confusing as hell

lost matrix
storm crystal
#

So i dont need them to have pdcs

#

Or do i

lost matrix
fluid river
# rotund ravine What

save exp to pdc, and add placeholder to lore %exp% which would take the value and show it

#

so well, if you decide to rewrite how your lore looks, you don't need to recode logic ig

#

well, pdc should be on the player, not on itemstack as i think about it

#

cuz saving exp for each player to config is kinda 💩

rotund ravine
#

The item

#

Is not an item until the inventory open?

fluid river
#

of that player's stat taken from config?

#

that's what i mean

rotund ravine
#

Yes a player stat

#

Not an item stat

fluid river
#

but isn't item supposed to show player's stat

#

not item stat

rotund ravine
#

It’s supposed to represent it in the invetory

#

It’s a menu

#

The item doesn’t exist until he wants to show it

fluid river
#

yeah so well, each time you open the gui, you just add an item to it

rotund ravine
#

Yes, and pdc is useless there

fluid river
#

yeah, but when you build itemstack

#

before you place it to inv

rotund ravine
#

Pdc is still useless

fluid river
#

you need to set it's lore to player's stat value

rotund ravine
#

Unless you save their experience to the player pec

proud badge
#

aight so im trying to use the scheduler seperate threads thingy to do a database lookup for the coreprotect API. Any way instead of just running the command for me to send it back to the main thread with information so I can do some if statements?

fluid river
#

which should probably be in pdc

fluid river
#

set player exp to pdc

rotund ravine
#

No you said items prc

fluid river
#

not to config

rotund ravine
#

Pdc

fluid river
rotund ravine
#

Oh

#

Woops

fluid river
#

np

#

i guess i just wasn't clear enough

bitter rune
#

if i add variables to an arraylist is that data persistent?

eternal oxide
#

persistent over a restart? no

bitter rune
#

I already have things being saved to file... just a pain I need to just redo how i save things and use procedures with parameters so i dont have to add so much every time i want to save a new variable

lost matrix
clear elm
#

some1 now how can i allow teleport with ender pearls combat +

bitter rune
#

I added a fishing skill and made the sneaking skill ive been working one have xp and levels, along with a monster hunting skill. my first skill was mining and it took me 6 months to do, these three skills were just a few hours

proud badge
#

Hi, I'm using a seperate thread for my DB lookup. How could I pass information back to my main thread/class?

young knoll
#

CompletableFuture + runTask

slender elbow
#

D + N

ivory depot
#

What is the best way to manage sql connections in plugin?

rotund ravine
#

Hikari?

austere cove
#

Hot take, hikari is overkill for most plugins

rotund ravine
#

Wpuld rather overkill than underkill haha

austere cove
#

Imagine how much storage space of spigot resources is used up by the same few third-party artifacts shaded in in every other resource

worldly ingot
slender elbow
#

yeah probably like 7 gigabytes

rotund ravine
#

Woah

worldly ingot
#

that's a lot of gigabytes

rotund ravine
#

That’s more than 1 gb

worldly ingot
slender elbow
#

it's more than 6.8

worldly ingot
#

And interestingly enough, more than 6.9

#

nice

lost matrix
slender elbow
#

no sorry

#

dog ate it

worldly ingot
#

Just truss

rotund ravine
#

7 - 6.8 = 1. Oh i guess it isn’t more than 6.8

worldly ingot
#

Well now hold on...

#

okay

#

lol

ivory depot
rotund ravine
#

Ask choco

young knoll
#

It's really simple

worldly ingot
#

Depending on your use case you probably don't need Hikari tbf

young knoll
#

One sec

worldly ingot
#

Steel is very right in saying that it's overkill in a lot of situations :p

rotund ravine
#

Coll

#

Evil

#

Paste

young knoll
#

fineeee

#

?paste

undone axleBOT
rotund ravine
#

Good boy

ivory depot
#

I'm making statistics plugin, integrated with discord, so basic java sql will be enought?

young knoll
#

Very simple connection pool class

remote swallow
#

or the config then source

near night
#

so uh i want to make a custom items name localized so i can add my item name to the en_us.json for example. how would i do this?

austere cove
#

Ah yes pooling on sqlite where writes are sequential anyways

worldly ingot
#

Right, SQLite is one of those situations where it's not at all necessary :p

young knoll
remote swallow
#

simple is not always better

young knoll
#

Yes I know it does nothing for SQLite but it's easier to just use it for all database options in a plugin :p

near night
young knoll
#

You would set the items name to a TranslationComponent

#

butttt you need NMS for that on spigot

remote swallow
#

not for long

young knoll
#

Blame @worldly ingot

near night
near night
young knoll
#

He is working on the PR for components :p

near night
#

ohhh lol

#

sooo set the items display name to a TranslationComponent?

slender elbow
remote swallow
slender elbow
#

(i can't change it the client demands it that way )

dry hazel
#

just cope harder

austere cove
wintry umbra
#

Which plugin is responsible for plots or what is the best plugin for plots or, so to speak, plots so that each player has their own plots and another cannot build and dismantle on them

shadow night
#

Like any plot plugin probably if you don't repeat the same message over all the channels

slender elbow
#

thanks

river oracle
glossy venture
#

it scales better than mysql i think

#

horiizontal scaling

lost matrix
lost matrix
grizzled sable
#

How can I create a config for my plugin in 1.20 (bungeecord)? can someone give me a little code snippet or explain how to do this ?

rotund ravine
#

Have u tried google?

#

No 🥣

grizzled sable
grizzled sable
#

has nothing changed since 1.8 ?

#

because the video is from 2017

rotund ravine
#

Why did u go directly to a video lol

eternal oxide
#

only watch videos as a last resort

proud badge
#

?paste

undone axleBOT
grizzled sable
rotund ravine
#

I mean

#

Together with

#

?jd

undone axleBOT
rotund ravine
#

Bungeecord javadoc

storm crystal
#

?learnjava

undone axleBOT
lost matrix
#

sigh

rotund ravine
lost matrix
#

You can take an educated guess

rotund ravine
#

Elgar?

pseudo hazel
#

clearly the bot

quaint mantle
#

can someone tell me the args for running a forge 1.12.2 client with its mods

upper hazel
#

I tested note blocks and their connection with textures and realized that there are not 800 states, but 24....

pseudo hazel
quaint mantle
#

ok

pseudo hazel
#

this is for plugins mostly, im sure forge has a discord server as well

quaint mantle
#

ok thanks

rotund ravine
#

Probably toxic

storm crystal
#

so all in all is oracle tutorial useful or not really

rotund ravine
#

Yes

dry hazel
#

if you already know some programming concepts

storm crystal
#

idk it just looks the most professional out of forementioned ones

#

w/o unnecessary shit like "create an account" or "buy our pro version" type deal

slate tinsel
#

What can I do to remove the leads that are dropped in EntityUnleashEvent?

young knoll
#

I think it fires EntityDropItemEvent

bitter rune
#

So I tried getting the entity from fishing but it doesn't call entity until you catch the fish, instead I just put all the fish in an array list and used random, cancelled the normal fishing event and just have fish being caught

young knoll
#

You want to replace the items with the fish entity?

lost matrix
storm crystal
upper hazel
#

good idea save List<World> list

#

or better use worldName?

bitter rune
lost matrix
storm crystal
#

?xd

#

Elaborate?

lost matrix
upper hazel
lost matrix
upper hazel
#

in list

lost matrix
# upper hazel in list

Ah i see. The general rule is:
Dont have references to live game objects like Player, Entity, World, Chunk etc.

storm crystal
#

Why is it actually on list if its not liked

lost matrix
upper hazel
#

but why so many people do this?

remote swallow
#

give options to see what people want to do

storm crystal
lost matrix
upper hazel
#

i mean "player" and "world" this a big difference

#

or is it related to hash?

remote swallow
storm crystal
#

I asked if that java tutorial is fine, you said no and didnt want to elaborate, so Id assume you talk nonsense and proceed

lost matrix
eternal oxide
#

When a client joins a NEW Player Object is created.
If the client disconnects and rejoins another NEW Player Object is created.

remote swallow
lost matrix
eternal oxide
#

If you hold a reference to the first Player Object it will be invalid after a relog

upper hazel
#

I understand that the extra data is saved in the sheet?

eternal oxide
#

Player of second login will not equal Player of first login

upper hazel
#

this means that it is bad to store references to temporary objects

#

then i think need use id

eternal oxide
#

As 7smile7 said, if you hold a reference to an Object Bukkit tried to discard you are forcing it to be held in memory and not removed.

#

yes, id is perfect

upper hazel
#

but for some reason this rule is not followed by many people. Because of this, the problem of leakage is relevant, as I understand it?

eternal oxide
#

yes

upper hazel
#

And it’s also impossible to pass as input to methods?

eternal oxide
#

generally holding a reference to the 3 base worlds is fine, as they can't be unloaded. But it's good practice to never hold a reference.

#

you can pass to a method, just don;t retain a reference

upper hazel
#

As I understand it, storing temporary data in a list prevents the memory from being cleared and prevents it from being used?

eternal oxide
#

yes

upper hazel
#

oh

#

time to refactor 👍

glossy venture
#

for some reason gradle is using an old version of my project and i cant seem to fix it ive been trying for like 2 days now

#

no matter what i set as the version in the dependency

#

it seems to always use the same version

#

the JAR hosted on jitpack has all classes

upper hazel
glossy venture
#

yet im missing recent ones when i try to use them in my project
its not an intellij issue either, it doesnt compile
ive deleted ~/.gradle/, project/.gradle/ and invalidated caches multiple times but im still having the issue
if i go to .gradle/caches/modules-2/files-2.1 and i find my dependency, it has the old version downloaded instead of the one i specified in my build.gradle
ive tried both gradle version 7.3 and 8.3

eternal oxide
upper hazel
#

cool

upper hazel
eternal oxide
#

They do, but also objects are not the same in C++

#

Java Garbage Collector does the job of the memory management you have to do yourself in C++

tardy delta
#

smart pointers 😉 (basically for people who are afraid of normal pointers)

upper hazel
hazy parrot
#

Nah

#

Smart pointers are cpp thing

upper hazel
#

this mini garbage collector?

tardy delta
#

raii container

hazy parrot
#

I wouldn't call it like that

upper hazel
#

then why dev call this "smart"

whole lintel
upper hazel
#

By the way, are there garbage collectors based on AI?

#

or java use it?

whole lintel
#

it just automatically frees memory addresses

#

when the object is destroyed

#

so its semi automatic

whole lintel
#

java was made before AI

upper hazel
whole lintel
wet breach
#

doesn't get updated or new ones come out

whole lintel
#

probably wont happen

wet breach
#

It has happened

whole lintel
#

as most users are stuck on old versions

wet breach
#

G1GC is a major improvement and it began in 1.8

#

now we have ZGC I think it is

#

so not sure what makes you think the GC's are not being updated or added to

storm crystal
#

is there any comparison to spigot vs paper in plugin making?

wet breach
#

at this point you probably can't really say paper is proper fork of spigot

#

too much is different about it at this point

whole lintel
#

at least

#

in the next 5 years

lofty badge
#

guys, i know, it's offtop, but who can make 3d models using art reference?

#

idk where i can ask about this

upper hazel
#

is it worth overriding hash and equals for classes that are not used in List?

wet breach
#

point is though GC does routinely get updates

#

and we do every once in while get a new GC to play around with

#

so just because something came out later then java, doesn't mean java can't or won't include it

#

it all depends how Oracle feels

whole lintel
#

IC

storm crystal
#

im asking what each has to offer

knotty aspen
#

you got a reply to that on the Paper discord as well, at this point just look what API Paper adds and changes and make your own decision

smoky oak
#

hey @river oracle how long am i supposed to be patient for lol

lofty badge
storm crystal
dry hazel
undone axleBOT
wet breach
#

lol

smoky oak
#

yea ive gotten no response from spigot(staff) and github is like 'were overworked we aint doing this'

#

im so tilted

wet breach
storm crystal
smoky oak
#

i wasnt aware spigot changes any mechanics

#

what is affected?

wet breach
#

there is configs that affect mob spawn limits, and by default spawn rate is reduced

#

for example

#

you can also mess with the ticking of some things such as how far or close entities activate and do stuff

young knoll
#

Spigot defaults are mostly vanilla

#

Aside from item/xp merging iirc

wet breach
#

yeah for the most part its vanilla defaults

smoky oak
#

isnt the xp merge limit already a stupid high number in vanilla?

#

eh, not important ig

wet breach
#

occcasionally spigot will fix some bugs if its necessary too

storm crystal
#

what is vanilla default

wet breach
#

but if its not detrimental spigot leaves it alone for Mojang to fix

#

if its a mojang bug

knotty aspen
#

Not really Spigot, Craftbukkit originally. Lots of advanced redstone contraptions don't work as they should

lofty badge
knotty aspen
#

Paper has alternative current as a redstone implementation you can use that will improve some of those things, but not everything

smoky oak
#

cuz mojang is owned by microsoft

knotty aspen
#

Some of that was done to allow for events and other plugin stuff

#

Some of that is just old 2012 code that nobody wants to touch

wet breach
#

because technically some of the redstone stuff is bugs and some of those bugs actually caused memory leaks or other problems

storm crystal
wet breach
#

and then what Malfrador said too

storm crystal
#

why does it stop spigot devs from fixing stuff

knotty aspen
#

Breaking compatibility, mostly

smoky oak
#

oh thats true too

knotty aspen
#

People somehow ended up expecting their plugin last updated in 2015 to still work in 2023

smoky oak
#

ton of legacy stuff

#

legacy materials

#

and methods rarely get remoed

#

usually they just get deprecated

wet breach
#

until one day you find out they no longer work

smoky oak
#

but at that point it really is out of date

storm crystal
#

whats the point of making plugin if itll get outdated either way

wet breach
#

ideally you would maintain it

knotty aspen
#

you can always update it

lost matrix
eternal oxide
#

You realize we'd all be dead with that attitude

storm crystal
eternal oxide
#

Why bother making a steam engine as it's going to be outdated soon

eternal oxide
#

I'll be in my cave not bothering to discover fire.

storm crystal
#

I mean steam engine did kill a ton of people

knotty aspen
#

fire too

storm crystal
#

so yeah kinda sucks to invent something so dangerous

wet breach
smoky oak
lost matrix
#

The steam engine also made the lives of millions easier

dry hazel
smoky oak
#

eeeh

wet breach
#

that is because advertising here for services and the related is against the rules 🙂

#

and the only acceptable place is the forums

storm crystal
wet breach
#

14 hour shifts are not that bad

storm crystal
#

okay

untold mauve
#

how would it be possible to "wait to load" the players inventory?
like for example when the player joins, their inventory is blank and then after the player runs a command their sever inventory is loaded

do i just copy the inventory to a hashmap, clear it, and set it later? how do i prevent the player losing their inventory if the server crashes
or is there a better way to do it

storm crystal
#

then go and work in one

wet breach
#

I work 10 hour shifts 4 days a week 🙂

#

I am a tire technician. I do nothing but lift tires for 10 hours 💪

storm crystal
#

youd work twice as much in a week

eternal oxide
storm crystal
#

for most likely half your current wage

untold mauve
wet breach
lost matrix
storm crystal
#

pre tax or post tax

wet breach
#

obviously that is pre-tax. Who posts hourly wage as post tax?

eternal oxide
storm crystal
#

positng ur wage pre tax is like posting ur private area length but counting spine

#

lol

#

you are living with post tax money

wet breach
#

Sure, everyones taxes are different though

smoky oak
#

my income is $0

wet breach
#

where I live, I don't have state income tax

#

just federal

smoky oak
#

cuz i work in europe

wet breach
#

but I make about $24/hr and am guaranteed 40 hours a week 😄

#

I can work more then 40 hours however, just have no real need to

#

unless I just want a bit extra money

smoky oak
#

i wish i could find a job that pays that much

wet breach
#

and I am about to get a promotion, which guarantees a raise 😄

wet breach
#

🙂

storm crystal
smoky oak
#

AH HELL NAW

#

im not dumb enough for that

storm crystal
#

or where food quality is beyond trash

smoky oak
#

yall just want my life insurance payout

storm crystal
#

also that

#

lmao

wet breach
#

yep that was the secret plan all along XD

storm crystal
#

cant wait to see your small business get raided by protesters trying to excuse themselves with good intentions

smoky oak
#

bleh i just wish Github would have enough staff to process DMCA's timely

#

this whole week (read last 7 days) has been crap

wet breach
#

business I work for is not small, and it will never be raided by protestors 🙂

storm crystal
#

lol

river oracle
#

Food quality is fine here

storm crystal
#

US is like pinnacle of processed food

wet breach
#

ah forgot steak was processed

#

guess I should return it from the cow it came from XD

river oracle
#

Fr

eternal night
#

unprocess the cow rn kirbygun

river oracle
lost matrix
# storm crystal US is like pinnacle of processed food

It is driven by capitalism. You can choose what to eat.
If you wanna eat processed food, then you can do that.
If you wanna live as a vegetarian, only eating organic stuff, you can do that as well.
Its literally a choice.

storm crystal
#

accessibility

wet breach
#

I will say yes the US has a variety of processed foods. Not all of them are healthy as well as unhealthy, but this assumes that some how magically the US just has no food that is not processed either. Like, what did the livestock that the US has just dissappear ? lmao

#

there is also vegetables and fruits and the sorts that still get sold

#

so there is plenty of everything

#

not just processed foods

lost matrix
wet breach
#

Lol I am glad its not in everything, or at least not the stuff I get anyways

lost matrix
#

Anyways. Wrong channel for this discussion.

storm crystal
#

you said yourself that its basically general2 when no one needs help

#

or maybe it was someone else

#

you get the point

lost matrix
#

No i dont

wet breach
lost matrix
#

Ah there it is, thx

storm crystal
# lost matrix No i dont

not the end of the world if its off-topic as long as there is no actual channel related discussion going on

#

lol

river oracle
#

someone is being very combative today

wet breach
#

maybe not but in general, what the staff says is final and goes else risk the severe penalties

#

says so in the rules

storm crystal
#

i havent seen no one get punished for driving off topic there yet

eternal night
#

you can always be the first if you try hard enough

wet breach
#

that is because they vanished

#

one of the nice things of discord is, no one ever really knows if someone gets forcefully removed except for staff lmao

#

not like its going to send the rest of us some kind of notification

#

maybe one day you will just see md5 pop in here and just like randomly ban someone

storm crystal
clever lantern
#

how can i disable redstone

wet breach
#

sure, but you never get your blue name back 🙂

knotty aspen
storm crystal
#

lol

wet breach
#

forgetting your discord name here is linked to your spigot account

storm crystal
#

yeah but nothing stops you from making another one theoretically

wet breach
#

yes its against the rules and if its found out, its just a never end of cat and mouse with you never knowing when your account gets banned

clever lantern
smoky oak
#

i dont care so much if staff bans people as that they dont seem to respond to me lol
have i really annoyed em that much?

knotty aspen
smoky oak
wet breach
smoky oak
#

wait seriously?

#

so that green mark is just for show

#

gotcha

storm crystal
#

I want to plan plugin part that would manage inventory GUIs and make them functional (something like in hypixel skill levels and such), what classes should I think of to make it scalable?

smoky oak
#

use interfaces basically

#

itll help

smoky oak
#

like, if you have a class that displays the GUI or smth, the initializator should be like guiDisplay(guiInterface)

lost matrix
young knoll
#

Uhh

lost matrix
#

But one thing is for sure: You want a manager class

young knoll
#

These ones

storm crystal
smoky oak
#

well, interfaces or superclasses would probably be really helpful here

wet breach
storm crystal
lost matrix
storm crystal
glossy venture
# glossy venture yet im missing recent ones when i try to use them in my project its not an intel...

bro wtf
gradle debug log:

2023-11-13T21:22:27.836+0100 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.builder.NodeState] dependency: com.github.slatepowered.veru:veru-java8:26c299753a from-conf: api to-conf: null is filtered.
...
2023-11-13T21:22:27.972+0100 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Resolve veru-java8-7631c74.jar (com.github.slatepowered.veru:veru-java8:7631c74)' started

it recognizes the dependency version as 26c299753a, and then it just starts using version 7631c74 for some fucking reason

wet breach
young knoll
glossy venture
#

no i told it to use exactly version 26c299753a

inner mulch
#

how could i log previous bans / mutes or whatever to a mysql database player? or maybe a ressource?

glossy venture
#
VERU_COMMIT = "26c299753a"
api "com.github.slatepowered.veru:veru-java8:${project.VERU_COMMIT}"
wet breach
glossy venture
#

yes it is

#

jitpack supports them

#

idk why it starts using the short commit

storm crystal
#

like if you click it does stuff?

wet breach
#

what I mean is, is that short commit id the same id that points to the long form id?

glossy venture
#

but it looks like it completely ignores the version parameter

#

and just uses a previous value

wet breach
#

oh ok

storm crystal
#

but what if I want 2 buttons to have different mechanics when clicked

glossy venture
#

the long id is 26c299753a of which the short one is 26c2997 im pretty sure

young knoll
storm crystal
#

I cant make method that would take entire function as an input

young knoll
#

You kinda can

wet breach
glossy venture
#

i have

#

but ill try again

#

ig

young knoll
#

Functional interfaces ftw

wet breach
#

it was cool and nice when it started, but has since gone downhill

glossy venture
#

you've had this exact issue?

storm crystal
glossy venture
#

oh k

wet breach
glossy venture
#

well its very convenient for this when it works

wet breach
#

jitpack is ironically picky

remote swallow
storm crystal
#

yeah Ive got no idea how to read it correctly

glossy venture
#

what the fuck does this arrow mean

#

it just blatantly states "well fuck your declared version ima use this one"

#

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

haughty granite
#

is there a way to do a stress test on a minecraft server to see if the dedicated server runs correctly with a certain number of players connected?

smoky oak
#

grab a cracked client and run the server with multiple cracked instances?

#

thats the only idea i have

haughty granite
#

no I'm not doing this for >200 instances

#

I've seen something to do that but I can't remember the name.

smoky oak
#

try spark?

fallen lily
#

Spark is a profiler

#

I don’t think it supports stress testing

#

Well, connects other clients to the server

lost matrix
slender elbow
#

i think you might be confusing god with 7smile7

remote swallow
#

arent they the same thing

#

or is that choco

slender elbow
#

the father, choco and 7smile7

#

the trinity

remote swallow
#

whos the father

#

md?

#

the md the choc and the 7smile

slender elbow
river oracle
#

An .ar domain that's either a Argentina domain or an assult rifle domain and I'm not sure which it is

slender elbow
#

certainly not a rifle

river oracle
#

Hmhm okay okay

dry hazel
#

interesting

knotty aspen
#

I thought its because emily is a pirate, arrr

slender elbow
#

you might be onto something now

storm crystal
#

and well, does manager have utility methods that you just invoke that create lets say 9x4 GUI thats filled with unnamed glass panes etc,?

storm crystal
inner mulch
#

how do i properly log player related stuff like bans in a mysql database?

lost matrix
lost matrix
inner mulch
lost matrix
storm crystal
inner mulch
lost matrix
storm crystal
#

im pretty confused on what to work at in my plugin right now to be honest

shut shoal
#

is it normal wait more than 14 days to upload a premium resource?

storm crystal
#

if I should implement new stuff or rewrite old stuff to look better for future

inner mulch
lost matrix
inner mulch
#

wait what??

lost matrix
#

In events or anything run by spigot. Never read files or access a databse etc.
It will lag out your server really quickly.

#

It usually looks like this

inner mulch
#

(of the player that joins)

lost matrix
wet breach
#

probably shouldn't use offline player objects for it

#

should just store the uuids and then grab offline player objects as you need them

inner mulch
#

no im not loading all of them

wet breach
#

well you said loading all previous bans into a cache

#

not sure what you think a cache is o.O

inner mulch
wet breach
#

that shouldn't be an issue then because I would imagine there wouldn't be many previously banned

lost matrix
# inner mulch .

Well in that case its fine. But you still need to be able to unban players which are not online.
Or lookup data for offline players etc.

inner mulch
#

okay, thanks

plush sluice
#

Anyone knows how could i fix "Connection refused" error on mysql? getting that when accessing database from other vps

lost matrix
plush sluice
wet breach
#

by default mysql listens on the loop back

plush sluice
#

you mean this

#

im dumb as fuk

#

when i moved files i forgot to change mysql adress so it was set to localhost:3306

glossy venture
#

why tf does it say this

lost matrix
#

Generic array creation. Always fun.

lost matrix
glossy venture
#

it works so i dont really care

#

the warning is judt snnyoing

#

ill prob mive away from streams later

grim hound
brisk jetty
#

is there a cleaner way to check if a button is currently depressed other than event.getClickedBlock().isBlockIndirectlyPowered()

#

cause that also means that if i run a power source into this button it will no longer work

#

idk when that would ever happen

#

but im just wondering if theres a way to check if the button in depressed other than indirect power or a cooldown

smoky oak
#

i believe you can check the state of the button

#

but you probs need to cast it to button first

#

wait what

#

@brisk jetty

brisk jetty
#

ahh ok
Ty

#

i was trying to figure out what a button was classified as

#

for some reason its "Switch"
huh

smoky oak
#

bukkit api names are NOT consistent with english in game

#

for example potion effects or enchantments are also fuccked

brisk jetty
#

Yeahh
im learning it all slowly 😅

glossy venture
storm crystal
#

anyone know java site that has exercises, not necessarily theory?

rotund ravine
#

Jetbrains academy

lost matrix
#

If you want coding challenges then you can take a look at code-wars

#

Otherwise Jetbrains academy for learning exercises

storm crystal
river oracle
#

@ivory sleet you free to talk now?

#

also wtf

young knoll
#

Yo skibidi toilet in java?

compact haven
#

Does crafting regular shaped recipes allow for items with PDC data?

#

like if I want to prevent a custom item nether star from crafting a beacon, would I use a PDC key or do I need to intercept PreCraft?

river oracle
tardy mist
#

provides more understandable and expressive code, which makes it simpler to comprehend and update

young knoll
brisk jetty
restive mango
#

whats the longest string you can have as a persistentdatacontainer

young knoll
#

As the key or value?

#

Actually it doesn’t really matter

#

There’s no defined limit on either

#

Strings are capped at 2,147,483,647 bytes

#

And NBT values will eventually become overloaded if they get too big, tho I have no idea when that happens

#

I think for chunks it’s 4mb?

restive mango
#

ah

#

yeah

#

it's actually 65535

#

if (utflen > 65535)
throw new UTFDataFormatException(
"encoded string too long: " + utflen + " bytes");

#

F

#

just tryna see

#

if theres a way to store large number of block locations

#

in some easy way

#

like a hundred thousand locations

young knoll
#

I would use a database

restive mango
#

yeah ur prob right

#

oh well ill do that on the next go

slender elbow
#

I just found out that Windows has an HTTP server API built into it and it goes all the way back to Windows XP

#

It feels so weird lol

#

And client too ofc

molten hearth
#

is it possible to cast blocks to TileState s? specifically ntoeblocks

young knoll
#

No

#

Blocks are not states

#

And noteblocks are not tile entities

molten hearth
#

what da hell

#

how does one convert a block to a tile entity then

#

or is there a better alternative for some sort of PDC for in-world blocks

compact haven
#

why is the default of EventHandler to call the method regardless of cancelled?

#

isnt that so counterintuitive?

slender elbow
#

tell that to {{git blame}} 11 years ago

compact haven
#

also does BlockExplodeEvent not work for tnt explosions? I'm positive I'm registering it and it's not being invoked

undone axleBOT
molten hearth
#

THANKS G

slender elbow
compact haven
#

but if it explodes a block?

slender elbow
#

no, it's the entity itself that explodes

compact haven
#

gotcha

#

makes sense

slender elbow
#

blockexplode is for things like respawn anchors and beds in nether/end

#

don't think there are other cases but yeah

compact haven
#

appreciate it, ty

slender elbow
#

np

#

the blocks destroyed are in a list in the event iirc

compact haven
#

they are,

#

is that list mutable by any chance?

slender elbow
#

pretty sure it is

compact haven
#

ill find out, ty again

#

btw ur far from lucko's server

#

ello

slender elbow
#

oh his personal one? i never joined back after the doomsday

#

i should do that one day

compact haven
#

oh uh, LuckPerms is what I meant

#

my bad lmao

slender elbow
#

oh yeah

young knoll
#

World.createExplosion also fires the block explode event

remote swallow
#

epic hax

molten hearth
#

would firing NotePlayEvent not play the sound for nearby players?

young knoll
#

Events are generally not tied to the stuff that causes them

#

Ie firing block break event doesn’t break the block

molten hearth
#

so do you have any idea what alternative i have to play a noteblock sound at a position

#

because only players have the playNote method

#

not blocks

#

x-x

#

or am i with my hands tied behind my back and forced to do the funni getNearbyEntities

#

(i dont think the performance will find it funny)

young knoll
#

Probably just regular playSound

molten hearth
#

oh i didnt know playSound supported notes lmaoo

#

thanks

young knoll
#

Idk if it does

#

But I assume so

molten hearth
#

yeah it kinda just fucks me up

#

because now i cant pass Instrument, Note to it

#

reflection here i come

#

💯

young knoll
#

Alternatively world#getPlayers and some distanceSquared checks

#

Or a map/table of instrument/note -> sound

molten hearth
#

yeah thanks i will

#

im trying to figure out

#

how the fuck

#

the notes work

#

when i use playSound

#

im guessing its the pitch but

#

bit confusing

young knoll
#

I believe so

molten hearth
young knoll
#

Might be nice to add that to Note or Tone

molten hearth
#

PR? 😳 👉 👈

young knoll
#

Maybe™️

quaint needle
molten hearth
quaint needle
#

Bruh it take me longer to fix ChatGPT code then to actually code it myself

#

Use black box or something it’s easier

#

Idk

grand flint
#

i just saw these

#

how cute

rotund ravine
quaint needle
#

But ChatGPT code isn’t always right

rotund ravine
#

Obv not hha

wraith star
#

Load Priority Issue

molten hearth
#

ChTgpt gave me a formula that was broken past 12 (the formula was actually the same for everything, but both me n chatgpt didn't know)

molten hearth
#

I was under the impression 0-12 and 13-24 used different formulas

wet breach
#

Why would there need to be formulas for pitch?

molten hearth
#

I mean idk they have a formula for calculating it

echo basalt
#

2 ^ ((12 - pitch) / 12)

molten hearth
#

ya

echo basalt
#

type deal

molten hearth
#

Do you know how long that took me to achieve

#

Sheesh

echo basalt
#

how sleep deprived do you need to be in order to not achieve that

molten hearth
#

yeah about that LMFAO

echo basalt
#

because I'm pretty damn sleep deprived and managed to do it

wet breach
molten hearth
#

bro sees math where there mathn't be math

echo basalt
#

nah because the first few numbers are negative

wet breach
#

If you go to 132 to 136 it has a dramatic drop lmao

molten hearth
#

well minecraft note IDs only go up to 24

#

for noteblocks at least

echo basalt
#

here technically if you want to be fancy

wet breach
#

I meant -12 to 36

#

Using any number in that range for pitch gives a nice slow down pitch in terms of graph

echo basalt
#
private static final int NOTEBLOCK_RANGE = 24;
private static final int HALF_RANGE = NOTEBLOCK_RANGE / 2;

private static float calculatePitch(int step) {
  return Math.pow(2, (HALF_RANGE - step) / HALF_RANGE);
}
wet breach
#

Instead of like a steep drop

wraith star
#

love it!

wet breach
#

Progress

wraith star
#

not really

echo basalt
#

oh yeah frosty the conference "starts" today

wraith star
#

the exact same thing is broken

echo basalt
#

got my badge n shit

wraith star
#

still load priority issue

wet breach
#

So its something

wraith star
#

nullpointerexception

#

instead of lateinit property hasnt been initialized

wet breach
#

At least that is easy to fix

wraith star
#

nope

#

because its the exact same issue as i had before

#

except yall made me remove lateinit

#

so its the exact same issue but in a different way

wet breach
#

Just use the server load event before doing stuff

wraith star
#

i do

#

thats where i initialize it

wet breach
#

This should ensure plugins have initialized. But what are you initializing ?

#

Typically plugins dont require you to initialize them

#

Or even some libs

molten hearth
wet breach
#

Hmm

molten hearth
#

(it in fact did not work)

wet breach
#

That last one might be interesting

orchid gazelle
#

F

molten hearth
#

ur telling me it was here whe whole time

#

smhsmh

#

not me copy and pasting every single formula, putting it into chatgpt and asking it for a formula that produces such formulas

bitter rune
#

i can see documentation great documentation of code places, but is there any website that also shows examples of the code being used? some things i just dont understand just by reading what inputs they can take

waxen ledge
#

tabnine provides code snippets

quasi flint
#

tabnein

shell robin
#

how can i cancel player turning head

spare hazel
#

?paste

undone axleBOT
spare hazel
#

none of this stacktrace is releated to my plugin. what is the problem

eternal night
#

There should be more to this exception below

quaint mantle
#

is there a Good way to get all connected slime blocks

quaint mantle
#

Recursion idk

eternal oxide
#

yes ^

#

Create a EnumSet of cardinal BlockFaces and tree search recursively.

inner mulch
#
    public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        for (Rank rank : Rank.values()) {
            player.sendMessage(rank.rankName);
        }
    }
public enum Rank {
    ADMIN ("ADMIN", "ADMIN | ", 1, ""),
    DEV ("DEVELOPER", "DEV | ", 2, ""),

    public String rankName;
    public Component rankPrefix;
    public int rankPriority;
    public String rankPermission;
    Rank (String rankName, String rankPrefix, int rankPriority, String rankPermission) {}

}```

why is rank.rankName null if i try to send it to the player?
drowsy helm
#

Because you never set it

inner mulch
#

isnt an enum always set?

eternal oxide
#

Rank (String rankName, String rankPrefix, int rankPriority, String rankPermission) {}

drowsy helm
#

Not if you never assign the variable

dry hazel
#

you need to set it in the constructor

drowsy helm
#

You are just declarinng the params

inner mulch
#

ok, wait i will try

#

wait how do i set the params?

drowsy helm
#

Same as you would in a class

#

this.rankName = rankName

inner mulch
#

okay, thank you

hushed spindle
chrome beacon
#

Looks good but see if you can get rid of the overlapping numbers

#

also the arrows bouncing off does look a bit weird

hushed spindle
#

the plugin has custom arrows so i figured them bouncing off was do you dont have to spend them to test your damage

#

ill give em a little more space so they dont overlap

chrome beacon
#

You could make them stick to the armor stand