#help-development

1 messages · Page 565 of 1

quaint mantle
#

Don’t wanna get caught up in the JavaPlugin gang

noble lantern
#

this guy gives me static abuse vibes

kind hatch
#

He has to be trolling

#

There's no way he's not

echo basalt
#

this guy gives me static thoughts

orchid gazelle
#

Hmm

quaint mantle
#

You guys are static variables behind the computer screen

orchid gazelle
#

💀

echo basalt
noble lantern
echo basalt
#

oh god we have a mutual server other than spigot

noble lantern
#

ARE YOu

quaint mantle
#

Shout out lucid

noble lantern
#

IN MY GREGECHS ERVER!??!?

#

HO WARE YOU IN MY GREGECH SERVER!?!?!

#

WTF

#

NAW

echo basalt
#

we're homies

quaint mantle
noble lantern
#

this dudes in my gregtech server what the fuck

#

that shits private xD

#

i dont remember you huh

drowsy helm
#

tf is a gregtech

quaint mantle
#

I am the reason you guys extend JavaPlugin

noble lantern
#

what was your ign?

noble lantern
quaint mantle
echo basalt
quaint mantle
#

I don’t play minecraft

orchid gazelle
#

I love to extend JavaPlugin

quaint mantle
smoky anchor
#

JavaPlugin my beloved 💚

drowsy helm
#

peronally, I extend PavaJlugin

quaint mantle
#

This server is on a list

orchid gazelle
quaint mantle
#

You’ll find out soon enough

subtle folio
#

unfortunately, I prefer to implement java plugin

quaint mantle
deft thistle
#

Question, if I want to make a arena template that would contain various "instances" (arenas) how could I do it without creating a new world every single time? Maybe using structures, but then I'd not know how could I get the cuboids locations as it'd be pasted differently each time.
Or maybe I make a match-only server and setup a bungee network, that's a solution too (but I really don't want to get into networks before I learn spigot propely)
Lmk if I didn't explain myself propely.

noble lantern
#

oh yes i remember now you were the one asking this kek

quaint mantle
#

Yeah I’m not even I dev I was going to exit scam 30 cents

noble lantern
#

i would of too ngl

drowsy helm
quaint mantle
#

And I’m not even Spanish

drowsy helm
#

and handle interactions

quaint mantle
#

Wtf is that even me

drowsy helm
#

then you only ever need 1 arena

noble lantern
#

this guy legitimately concerns me wtf

#

terrifying

deft thistle
drowsy helm
#

oh blocks aswell?

#

damn

#

use SLIME

drowsy helm
#

this is what hypixel uses, it's suepr efficient

deft thistle
#

alright ill take a look

#

I was thinking you'd say to use smth like protocol lib (i never used it on my life) but I'll look at that (I never used that il my life too)
always ready to learn

lilac dagger
#

i'm getting this weird issue

#

anyone else had it?

drowsy helm
quaint mantle
lilac dagger
#

yeah, very helpful

#

i'm using the remaps

drowsy helm
#

show the full error

lilac dagger
#

and the remmaped jar should contain that interface

#

this is the whole error

#

unless you want the line where it happens as well

drowsy helm
#

there will be a maven log

lilac dagger
#

how do i see it?

noble lantern
#

click"compile 1 error"

noble lantern
#

should bring it up

#

one of those 3 red circles should bring up a seperate error msg if its not that specific one

lilac dagger
#

ah

#

i got it

#

weird

#

region accessor should be part of this

#

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier>
</dependency>

#

i'll try to import the spigot api dependency as well

orchid trout
drowsy helm
#

does sql index start at 1?

tardy delta
#

executeQuery -> ResultSet

deft thistle
#

So in order to add async world loading I have to downgrade my server to 1.13
🤕 🔫

tardy delta
#

getResultSet is useless if you didnt tell it you need one

noble lantern
#

"async world loading"

whodafook

#

did i see this right

deft thistle
echo basalt
#

aswm is a thing

noble lantern
#

oh slime world

tardy delta
kind hatch
#

Slime worlds themselves are just a protocol, you should be able to use them regardless of version.

quaint mantle
#

Is there a method to get text cantered in the middle of chat, or are we on our own, if you wrote this before please send me it

quaint mantle
#

Ok

noble lantern
#

i stole one off the internet from 2015 the other day

quaint mantle
#

Ight send

echo basalt
#

so you gotta like

noble lantern
echo basalt
#

play it out

noble lantern
#

i couldnt do it myself ever

#

?paste

undone axleBOT
drowsy helm
#

Ive done it multiple times lol

noble lantern
tardy delta
#

internal cf code

noble lantern
quaint mantle
#

Thanks

#

Shout out to whoever wrote that enum

noble lantern
#

some dude on the spigot forums from 2015

#

codes oudated asf tbh syntax wise

smoky anchor
noble lantern
#

but i cba to use minimessage so it works Shrug

quaint mantle
#

Can you eat bones in Minecraft

#

I swear you could before, why is it not working

#

Did they remove that

noble lantern
#

use NMS and change its properties

kind hatch
echo basalt
#

I remember something with ghast tears

quaint mantle
#

No in survival

echo basalt
#

but I've retextured golden apples to give that effect before

noble lantern
#

second option sounds nicer

#

no one would know too

echo basalt
#

had this plugin that you could eat anything

noble lantern
#

yeah i remember, eating bedrock kek

noble lantern
#

i didnt bother to even review the code

#

someone online said it sent centered text, copied it and pasted, it works

Put it in my core lib and have used it since

quaint mantle
noble lantern
#

its mid

quaint mantle
#

What

noble lantern
#

yeah it extends JavaPlugin

#

so its bad

quaint mantle
noble lantern
#

jesus fuck its rubbing off on me i gotta go

quaint mantle
quaint mantle
deft thistle
#

I gotta downgrade my plugin to java 12 X_X

#

do I use java 12 or 8

noble lantern
#

17

deft thistle
#

its 1.13.2

#

I can't use java 17

#

it was java 17

#

and I can't upgrade either because SWM async worlds are only supported in 1.13.2-

kind hatch
#

Java 8 - 1.8-1.15
Java 16 - 1.16
Java 17 - 1.17+

deft thistle
#

alright I'll use 8 then

#

just hope my plugin wont break

kind hatch
#

As long as you aren't using Java 12 features in your plugin, it'll be fine.

remote swallow
#

Java 17 is 1.18 higher, java 16 is 1.17 and java 8 is lower

deft thistle
#

I mean spigot 1.13.2 does work on java 12

#

so I can just use java 12

kind hatch
#

Yea, but that version the game was still made using java 8 at the time.

royal roost
#

How to make an event BlockBreakEvent cancelled but still drop the items?

deft thistle
#

fuck java versions >:)
giant mess

kind hatch
#

Plus, Java 12 isn't LTS. (At least I don't think)

chrome beacon
#

8 11 17 21

#

^^ lts

echo basalt
#

java 16 is intermediate

onyx fjord
#

is there an event for when a command runs that returns command object?

#

or is about to run*

noble lantern
echo basalt
#

Mostly because the command map is gae

#

there's no way to detect console commands other than to do some funky injection

onyx fjord
#

bentobox has CommandEvent but it doesnt work with all commands lol (just /bentobox)

noble lantern
#

bento box does a lot of whacky stuff

#

reflection wizards over there stg

onyx fjord
#

yea i saw

#

i look at their code and wonder how that even compiles

noble lantern
#

i scraped theyre module loader a few years back, and ngl looking back i think that entire class loader was just a waste of time over maven modules r_baby_cry

echo basalt
#

Yeah you can inject a command map with unsafe

#

doing this sadly breaks shit from what I remember

noble lantern
echo basalt
#

because spigot does hard casting to craftserver in its internals

onyx fjord
noble lantern
#

i used to inject commands into the command map all the time

echo basalt
#

and CraftServer is final and so is its command map

echo basalt
noble lantern
#

i see

echo basalt
#

because this is simple enough

#

injecting it in needs unsafe

noble lantern
#

unsafe is whack asf

#

goofiest java class

tardy delta
#

best class

echo basalt
#

it works

noble lantern
#

best but goofiest

echo basalt
#

and I won't ask

#

it has a hard requirement of knowing reflection to use it

#

which is goofy

noble lantern
#

anyone who uses unsafe just googles it that one time and never touches it again

echo basalt
#

I used it quite a bit when I was doing entire client-sided chunks

noble lantern
#

unless maybe your reverse enginerring something

#

ye

echo basalt
#

had to do deep clones n shit

onyx fjord
#

commands are a mess as a whole

echo basalt
#

and shallow copies of some mutable stuff without side effects

royal roost
noble lantern
noble lantern
#

oh that too

wet breach
#

Otherwise it may spawn inside the block instead and die

tardy delta
#

using unsafe to create an unitialized object is nice

noble lantern
#

oh yeh hes cancelling the event too huh forgot

tardy delta
#

no need for those default constructors

noble lantern
#

maybe 2 if your a bentobox dev

tardy delta
#

depends on what you call once, is 4 times in a week once?

noble lantern
#

menace

wet breach
tardy delta
#

switched to c++ now cuz that gives you more control over the memory

royal roost
noble lantern
wet breach
#

The gc is the only thing that can clear out objects from memory. While programmatically you can reduce the size of the hashmap this doesnt mean the memory is instantly available after doing so

quaint mantle
#

what is bukkit adapter ?

craggy steeple
#

Hi guys, I'm trying to learn how to compile a open source plugin that uses gradlew and I'm watching this video from yt https://www.youtube.com/watch?v=Voi1HOOZQTk&t=32s

What does this things in the begging of the video related to %JAVA_HOME% does?

deft thistle
craggy steeple
deft thistle
#

I believe gradlew is like the thing that gets all of the dependencies and puts them in your java project.
I personally only used maven, never used gradlew so I can't help you there.

wet breach
#

Gradlew is the portable version. Run it and it will gather everything it needs to include additional gradle stuff

quaint mantle
#

what is BukkitAdapter ?

eternal night
#

world edit stuff

#

To be cross-platform, they have their own types for e.g. Location etc

#

BukkitAdapter is responsible for converting a org.bukkit.Location to a world edit location type

#

or whatever they use

craggy steeple
eternal night
#

I mean that looks good ?

#

its running

chrome beacon
#

It's building

wet breach
#

Not entirely sure. I dont use gradle and typically just add maven to use

craggy steeple
#

If I go to Build - Artifacts will use gradew maybe?

wet breach
#

Maven and gradle can coexist in the same project

eternal night
#

you don't build using intellij artefacts

chrome beacon
#

You're already building it

eternal night
#

^

craggy steeple
#

hummm I wanted to just change a line in a Open Source Plugin made from a friend but alone

#

And he used gradlew

eternal night
#

Where is the problem ? xD

#

it is building isn't it

smoky anchor
#

It ain't gonna be done in an instant, just wait a bit

craggy steeple
#

humm confusing, got it. I'll try to figure it out.

eternal night
#

Well, how did the rest of the command look

#

like, has it finished ? what is your console saying

craggy steeple
#

it didn't built the gradew

#

PS C:\Users\BREEZE\Programming\discord-connectivity> .\.gradlew build

eternal night
#

why backslash ?

#

./gradlew build

craggy steeple
eternal night
#

the video has a forward slash

craggy steeple
eternal night
#

perfect xD

#

your jar is in build/libs

craggy steeple
#

so Every time that I want to compile it, I need to use this command lynx?

eternal night
#

Well you can just make a run configuration in intellij

#

to run it for you when you click run

#

but yea

craggy steeple
#

I'll test it, ty so much

eternal night
#

👍

swift dew
#

if i cant create an entity without spawning it with bukkit api, is there any other api or do i need to do it with nms or sth?

eternal night
#

What is the xy ?

#

what are you trying to do

chrome beacon
#

^^

#

The current API requires you to spawn the entity

swift dew
#

i wanna store it in variable and spawn it later

eternal night
#

Ah

#

Yea you'd serialise the entity via NMS

#

and spawn it back in later

#

|| paper has API for that kekw ||

swift dew
#

wait fr?

eternal night
#

fr what ? xD

craggy steeple
#

maven > gradlew?

eternal night
#

pretty subjective question

craggy steeple
swift dew
#

i may do it with nms, but thanks for da help

eternal night
#

Yea, you basically want to save the entity to a CompoundTag

#

with its id

#

and then EntityType.create later

swift dew
#

hm ok

#

tysm

quaint mantle
eternal night
quaint mantle
#

for bukkitadapter

chrome beacon
#

?

eternal night
#

You are probably depending on the wrong dependency

#

share your build.gradle.kts

quaint mantle
eternal night
#

Yea

#

you need bukkit

#

not the core

quaint mantle
#

😢

#

OMGG G

#

R> qq wtr,

#

tq w

#

1 waste my time

#

for this

craggy steeple
#

Lynx, I've got a problem when I tried to turn on the plugin.
Is it something related to Dependencies?

Error occurred while enabling BreezeDiscordConnectivity v1.0.1 (Is it up to date?) java.lang.NoClassDefFoundError: me/saiintbrisson/bukkit/command/BukkitFrame at com.github.eokasta.discordconnectivity.DiscordConnectivityPlugin.onEnable(DiscordConnectivityPlugin.java:45) ~[BreezeDiscordConnectivity-1.0.1.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.jar:git-Paper-4] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.jar:git-Paper-4] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.20.jar:git-Paper-4] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.20.jar:git-Paper-4] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:638) ~[paper-1.20.jar:git-Paper-4] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.jar:git-Paper-4] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.jar:git-Paper-4] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1103) ~[paper-1.20.jar:git-Paper-4] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.20.jar:git-Paper-4] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.ClassNotFoundException: me.saiintbrisson.bukkit.command.BukkitFrame at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:183) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:150) ~[paper-api-1.20-R0.1-SNAPSHOT.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] ... 13 more

eternal night
#

Yea

quaint mantle
#

i did

#

this

eternal night
#

can you share the build.gradle.kts @craggy steeple

craggy steeple
eternal night
#

yes

#

?paste

undone axleBOT
chrome beacon
#

?paste

undone axleBOT
eternal night
#

heh 🥷

eternal night
craggy steeple
#

right here

eternal night
#

okay yea

#

you need to build it again

#

./gradlew shadowJar

craggy steeple
#

K trying here!

#

I need to add a jar file

chrome beacon
#

oh they didn't make the build depend on shadowJar

craggy steeple
#

?

eternal night
#

build it and you should get a BreezeDiscordConnectivity.jar in your build/libs

#

which is the correct plugin jar

craggy steeple
eternal night
#

yea 👍

craggy steeple
#

lemme just ask u this question, why I dont need to add anything here?

#

I was watching some pl tutorials

#

and they always paste a jar file

eternal night
#

with gradle you don't really want to touch that

craggy steeple
#

how u managed to undestand that just this command was missing lynx?

eternal night
#

✨ experience ✨

#

shadowJar is responsible for including the dependencies in the jar file

craggy steeple
#

hahahaaa

#

got it dude!

orchid trout
craggy steeple
#

Worked! Managed to change the .setAuthor(guild.getName(), null, guild.getIconUrl()) to .setAuthor("Breeze Survival", null, guild.getIconUrl())

First time that I modify a plugin, thx guys 🙂

eternal night
#

party nice

craggy steeple
#

:party:

#

we can't use custom emojis 😦

smoky anchor
#

not boosting

craggy steeple
#

😫

craggy steeple
versed canyon
#

Is there any way to determine which slot a player interacted with on a chiseled bookshelf? I did not see a new event for it, and you can't really get that from PlayerInteractEvent.

smoky anchor
#

can you maybe get the past state and the new state and then check what slot changed ?
I don't remember what info the event gives you

eternal night
#

probably would have to do the same thing the internals do

versed canyon
#

Hmm.. didn't think about comparing states. I'll check that out, thank you!

tardy delta
#

or should

orchid trout
#

i remove catch

#

red appears

versed canyon
#

Sadly, the event does not give you access to the new blockstate

tardy delta
#

ah it doesnt specify its functional interface as a throwing one then

#

sad

sinful matrix
#

Does somebody know a good Tutorial or Documentation für a multiple version Plugin with maven?

chrome beacon
#

You'd use maven modules

#

one per version

#

as for a tutorial I'm aware of a good one

orchid trout
orchid trout
#

send good one please

craggy steeple
#

Guys, there is this famous hub open source plugin called DeluxeHub and the new items of the 1.20 version are not working on the GUI's, any tips on what I need to find on IntelliJ to change to make them work?

The erro: https://paste.md-5.net/ogosixokep.sql

eternal night
#

someone seems to already have a PR open to udpate that to 1.20

#

might want to just build that

orchid trout
craggy steeple
#

would you say that the newest version is 3.5.4? Because if it is, they didn't changed it

#

They made the plugin usable for 1.20 these days, but the new items, when added to a GUI, the pl crash 😦

#

items: infobook: material: CHERRY_SAPLING

#

They changed the plugin to gradle, nice I know how to compile it 😎

#

#trusttheprocess

sinful matrix
chrome beacon
#

I meant to say that I wasn't aware of one 💀

#

seems like I missed not in my sentence 👀

night verge
#

Hello, I'm making a custom npc using EntityPlayer and I am wondering how to chage the npc's display name?
This is my code:

EntityPlayer npc = getNPC(index);  //get NPC from a arraylist
npc.getBukkitEntity().setDisplayName(message.split(" ")[0]);

But it only change the name in chat, not the name in tablist.

hushed scaffold
#

hi , im really new to spigot development and i used the minecraft development to create a basic project , but right from the start after setting everyting up in intelij like plugin.yml and pom.xml i instantly get a warning in the main class "Class {mainclassname} is never used"
does it affect anything? and if so how do i get rid of that

smoky anchor
hushed scaffold
#

alr

#

it wont affect anything?

smoky anchor
#

at worst - your mental state

hushed scaffold
#

is there a way to hide ti lol

chrome beacon
#

You should be able to ignore that warning

hushed scaffold
#

but ty

smoky anchor
echo basalt
#

the name on tab is icky

night verge
echo basalt
#

try updating the name on the gameprofile

smoky anchor
#

iirc you have to respawn the entity to change that

night verge
#

I think I didn't respawn the npc.

night verge
echo basalt
#

no

subtle folio
#

how do I customize every players tab username?

smoky anchor
#

in what way ?
Do you just want to add prefix/postfix or change the name entirely

subtle folio
#

like “playernsme Money: 0 - Level: 1”

smoky anchor
subtle folio
#

suffix

remote swallow
#

use TAB

subtle folio
#

am i able to update a suffix with teams similar to scoreboard

smoky anchor
night verge
subtle folio
#

or no ?

remote swallow
smoky anchor
subtle folio
smoky anchor
#

team option suffix
or something

craggy steeple
smoky anchor
craggy steeple
#

PR stands for what steve?

#

the project?

smoky anchor
#

Pull Request

craggy steeple
worldly ingot
#

Pull request. A code change request on the GitHub repository

eternal oxide
craggy steeple
#

I'm already using this one, they just enabled the plugin on the 1.20 version, but still the erro with the items in the GUI

eternal oxide
#

I've not read up to see your issue explained, but is it crashing the client or the server? and is ther a readable error?

craggy steeple
#

items:
infobook:
material: CHERRY_SAPLING

#

The erro occurs when I change to new items of the 1.20

eternal oxide
#

ah ok

#

yeah probably not a difficult fix. It just doesn;t know what to do with new Materials

#

odd they'd hard code something like that

craggy steeple
#

Humm, I don't know things about it, but I really needed this new items in the gui 😦

chrome beacon
#

Try to change the api version in plugin.yml

#

if you haven't already

craggy steeple
chrome beacon
#

Set it to "1.20"

craggy steeple
#

K

eternal oxide
#

api version won;t fix it

chrome beacon
#

oh wait they're using XMaterial

eternal oxide
#

thats a hard coded error trying to match a material name from the config

chrome beacon
#

You need to update XMaterial

craggy steeple
#

I'm here

smoky anchor
#

the hell those are some fancy package icons
how do I get those

eternal oxide
#

Is deluxhub not being updated anymore?

#

it looks active to me

craggy steeple
craggy steeple
#

I don't even know how to share with u

smoky anchor
craggy steeple
#

I'll search here the vid

#

I'll send ya later

smoky anchor
#

ty 💚

remote swallow
#

iirc its atom material icons

craggy steeple
craggy steeple
smoky anchor
#

oooh ty

chrome beacon
chrome beacon
#

It says in the link?

#

src/main/java/fun/lewisdev/deluxehub/utility/universal

craggy steeple
#

K

#

now just compile it Olivo?

remote swallow
#

pretty sure you just needed to modify the classes

orchid trout
remote swallow
#

that already exist

#

so XMaterial, XPotion and XSound

craggy steeple
chrome beacon
#

You used \. again

remote swallow
#

./gradlew build

craggy steeple
craggy steeple
remote swallow
#

in that folder 3 files exist, you probably only needed to update those

chrome beacon
#

You only needed to replace the 3 that were already there

#

The rest can be skipped

eternal oxide
#

the plugin is hosted using maven, why are you trying to use gradle to build?

chrome beacon
#

XMaterial
XPotion
XSound

eternal oxide
#

you can literally import the source, update XMaterial and compile using maven

craggy steeple
#

Too much for a dude that just downloaded IntelliJ, but I'm trying my best right here 😆

eternal oxide
#

I didn;t look that deep but it seems it only uses XMaterial

chrome beacon
#

I wonder why they didn't use maven to shade xmaterial

eternal oxide
#

I also wonder why they copied XMaterial into their project instead of keeping it as a dependency

#

same

deft thistle
#

what does SlimePlugin#getLoader do? I can't seem to find anything on the docs yet it shows on getting started

remote swallow
#

probably returns a class loader

craggy steeple
# remote swallow here, this should work on 1.20

wow that's nice!

But I tried here and found this erro on the console (I removed all the old files)

06:15:48] [Server thread/ERROR]: Error occurred while enabling DeluxeHub v3.5.3 (Is it up to date?)
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:838) ~[?:?]
at java.util.zip.ZipFile.getEntry(ZipFile.java:330) ~[?:?]
at java.util.jar.JarFile.getEntry(JarFile.java:511) ~[?:?]
at java.util.jar.JarFile.getJarEntry(JarFile.java:466) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:159) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:588) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:104) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[?:?]
at fun.lewisdev.deluxehub.DeluxeHubPlugin.onEnable(DeluxeHubPlugin.java:98) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:540) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:454) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:589) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:250) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3801-Spigot-bed8c61-66c5ce4]
at java.lang.Thread.run(Thread.java:1623) ~[?:?]

#

It's funny, because this plugin for hub/wise for noncoders that just want to have a plugin for it, its the best one nowadays

#

there's one called SuperLobby, nice plugin as well

remote swallow
fluid river
#

yeah

#

stop, drop, start

craggy steeple
#

K

#

I'll try again

remote swallow
fluid river
#

crin/ge

#

idk what deluxehub is but

#

sad

craggy steeple
#

I deleted the plugin, added again to the server and got the red color on /pl

#

idk If I'm doing something wrong

fluid river
#

console errors

craggy steeple
#

CraftBukkit version 3801-Spigot-bed8c61-66c5ce4 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)

#

running this version

#

I'll send rn

fluid river
#

bruh what

craggy steeple
remote swallow
#

nbt-api isnt updated

fluid river
#

nbt-api dead

#

💀

craggy steeple
#

LMAO

#

was that it?

#

can you guys tell me where in the code you guys found that?>

remote swallow
#

i just read the stacktrace

craggy steeple
#

[06:22:06] [Server thread/INFO]: [NBTAPI] Found Spigot: v1_20_R1! Trying to find NMS support
[06:22:06] [Server thread/WARN]: [NBTAPI] This Server-Version(v1_20_R1) is not supported by this NBT-API Version(2.10.0-SNAPSHOT) located at fun.lewisdev.deluxehub.libs.nbt.utils.MinecraftVersion. The NBT-API will try to work as good as it can! Some functions may not work!
[06:22:06] [Server thread/INFO]: [NBTAPI] Found Gson: class com.google.gson.Gson

remote swallow
#

right at the top

craggy steeple
#

this?

fluid river
#

fun.lewisdev.deluxehub.libs.nbt.NbtApiException: [?]Error while calling the method

remote swallow
#

ill check if its updated

craggy steeple
#

Oh got it, so there's no way to get around it because its a API thing?

remote swallow
#

nbt api updated just needs to update dthe version

fleet veldt
#

if i buy a plugin and i put in network all me devs can see me license?

craggy steeple
remote swallow
#

2.11.3

craggy steeple
#

or nah

remote swallow
craggy steeple
#

K

remote swallow
craggy steeple
#

there we fucking go

#

Epic could you show me where u updated this api?

#

I really wanted to know how to update a api

remote swallow
#

just change the version in pom.xml

craggy steeple
#

just the string?

remote swallow
#

and for xmaterial i just copied the classes, changed the package and fixed any errors

craggy steeple
#

I dont need to uploud anything?

#

wow

remote swallow
#

maven handles the downloadin

craggy steeple
#

Hummm got it! Now I need to learn how to use this maven that you guys talk about

#

I just know gradlew in the moment

#

dude I just download intellij today 😦

#

Epic, those api things that need to update, is there a way to make this automatic for plugins? Like a plugin detects if there is a new version of the api?

eternal oxide
#

no

remote swallow
#

on the right side bar

somber sequoia
#

Does anyone know if theres a way to change the chances for an ore to spawn? For example set the iron ore spawn rate to 20%

fluid river
#

custom worldgen

somber sequoia
silent steeple
#

worldpainter

somber sequoia
#

i dislike worldpainter

silent steeple
#

ok

fluid river
#

here is the void gen

chrome beacon
#

Just replace the block populator?

#

Assuming ores use that

#

I have no idea

astral scroll
#

whats nms for

#

never understood

chrome beacon
#

net minecraft server

#

The package that mojangs code used to be in

astral scroll
#

oh

chrome beacon
#

(in older versions of Spigot)

astral scroll
#

thought it was something more technical

#

and works for?

eternal oxide
#

do you really mean you want to load a chunk, or do you want to prevent it unloading?

hushed scaffold
#

i want to set a custom join message , but when i try using event.setjoinmessage intelij idea says that it has been depricated. Whats the correct way to change the join message? 1.19.2

eternal oxide
#

You are not using Spigot

hushed scaffold
#

wdym

subtle folio
#

you’re using paper or another variant of it

hushed scaffold
#

oh ye

eternal oxide
#

Its deprecated in paper not spigot

hushed scaffold
#

forgot about that

subtle folio
#

😑

hushed scaffold
#

so i should go to paper discord right

subtle folio
#

yes

hushed scaffold
#

alr

#

ty

eternal oxide
#

or use Spigot

subtle folio
#

use spigot on paper server 🧌

eternal oxide
#

We'll welcome you back to Spigot after you get reamed over there

hushed scaffold
#

tyy

eternal oxide
#

Not in the Spigot discord please

wide steeple
#

This would be the replacement for setjoinmessage

wide steeple
# hushed scaffold tyy

But you should go to paper discord for further help, I would be more than happy to assist you there

eternal oxide
#

add a chunk ticket

#

prevents a chunk unloading

hushed scaffold
#

yeah nope im moving from paper to spigot whatthefuck is happening on paper i dont understand

remote swallow
#

adventure

#

thats what is happening

tardy delta
#

BossBar.bossbar()

#

they cant be serious

chrome beacon
#

getBukkitEntity

#

then cast

#

uuh ignore first part

#

Just cast

eternal oxide
#

If it actually is a player

zenith gate
#

@eternal oxide Just wanna say thank you, my worlds are working perfectly. There are no performance hickups, or anything. Turning off the keepSpawnInMemory helped a huge amount.

eternal oxide
#

np

silent steeple
#

have you attempted it

#

can i see ur code

echo basalt
#

make a set and not a list

#

for unique values

silent steeple
#
public BlockType[] getBlocksInRadius(Location center, double radius) {
    World world = center.getWorld();
    int radiusSquared = (int) (radius * radius);
    int minX = (int) (center.getX() - radius);
    int maxX = (int) (center.getX() + radius);
    int minY = (int) (center.getY() - radius);
    int maxY = (int) (center.getY() + radius);
    int minZ = (int) (center.getZ() - radius);
    int maxZ = (int) (center.getZ() + radius);
    
    // create array
    BlockType[] blockTypes = new BlockType[(maxX - minX + 1) * (maxY - minY + 1) * (maxZ - minZ + 1)];
    int index = 0;

    for (int x = minX; x <= maxX; x++) {
        for (int y = minY; y <= maxY; y++) {
            for (int z = minZ; z <= maxZ; z++) {
                Location currentLocation = new Location(world, x, y, z);
                Block currentBlock = world.getBlockAt(currentLocation);
                BlockType blockType = currentBlock.getType();
                
// store
                blockTypes[index] = blockType;
                index++;
            }
        }
    }
    
    return blockTypes;
}
echo basalt
#

ew wtf

silent steeple
#

it works

#

🤷🏿‍♂️

hazy parrot
#

This code looks good aside from set thingy and little bit of refactoring , what exactly doesn't work

echo basalt
#
public Set<Material> getUniqueTypesInRadius(Location center, int radius) {
  Set<Material> types = new HashSet<>();

  for(int xOffset = -radius; xOffset <= radius; xOffset++) {
    for(int yOffset = -radius; yOffset <= radius; yOffset++) {
      for(int zOffset = -radius; zOffset <= radius; zOffset++) {

        Location target = center.clone().add(xOffset, yOffset, zOffset);
        Block targetBlock = target.getBlock();

        types.add(targetBlock.getType();
      }
    }
  }

  return types;
}
#

easy enough

#

true

#

but in reality no

#

because location mutable

#

if you don't clone it, it'll modify the center and cause all sorts of weird issues

fallen scaffold
#

Does anyone know something changed in itemStack.serialize()? I get java.io.NotSerializableException error now in CraftMetaColorableArmor when i want to serialize enchanted itemstack....


Itemstack is = new ItemStack(Material.IRON_CHESTPLATE);
is.getItemMeta().addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 4, true);
HashMap<String,Object> isSerializd = is.serialize(); // CRASH if Item is enchanted

shy rock
#

Why don't you use gsit?

vast raven
#

Try dismounting the player

#

then teleport on the spawn on your own

#

How to fix the illegal access to ChachedRowSetImpl of com.sun packages?

#

I added some flags on the server start but still doesn't work

#

send code

hazy parrot
#

If you are using impl, you are 100% doing smth wrong

#

You shouldn't touch internal code

vast raven
north hornet
#

Hi, how do i change the API of my plugin? i started it as 1.19 and i want it to be 1.14 i changed the <version> in the pom.xml under the spigot api dependency to 1.14.4-R0.1-SNAPSHOT but it still says unsupported api version 1.19 in the console when loading

vast raven
young knoll
north hornet
#

ah ok ty

river oracle
#

I call an event in PlayerMoveEvent, but it keeps causing stack overflows every time its called what should I do?

young knoll
#

What event are you calling

river oracle
#

my own custom event

young knoll
#

Does it involve moving

river oracle
#

yes

#

heavily involves moving

young knoll
#

You are making an infinite event loop

river oracle
#

ahhhh

young knoll
#

Use a boolean to disable your player move listener while your custom event is being called

river oracle
#

wait so why is it causing a infinite loop

#

I feel like it shouldn't

#

it should just trigger my event once every time the player moves given the conditions are satisified

young knoll
#

Yes but does your even move the player in some way

river oracle
#

no

#

here I'll send code

#

?paste

undone axleBOT
river oracle
young knoll
#

Show the player move listener as well

river oracle
#

its in the paste

#

those are the listeners

young knoll
#

Well I don't see anything that could move the player

#

Other than cancelling the move event

river oracle
#

yeah I haven't the slightest clue why I'm getting stack overflows I feel like the logic is pretty linear

fluid river
#

add debug messages 😉

river oracle
#

I did

#

its giving me a stack overflow on event call

#

there is no where its inherently going wrong,

pseudo hazel
#

does it not give you a stack overflow if you arent calling your event?

river oracle
#

hmmm wait I wonder something

#

I wanna check something I have a suspiscioun

river oracle
pseudo hazel
#

does it have to do with the event bus?

river oracle
#

yeah no I think I know the issue one second

north hornet
#

what does this mean?

[18:17:14 ERROR]: Fatal error trying to convert EliteSpawn v1.2:nl/mnrkaas/elitespawn/EliteSpawn.class
java.lang.IllegalArgumentException: Unsupported class file major version 60
#

its a much longer error but its too big for discord

#

lmk if you need the whole err

river oracle
#

wrong java version

river oracle
#

@young knoll as I figured lol stupid mistake, my DomainMoveEvent was a subclass of PlayerMoveEvent calling PlayerMoveEvent subclass within PlayerMoveEvent caused an event loop that the event system didn't like

remote swallow
#

nerd

north hornet
river oracle
#

EliteSpawn isn't Java 16 or doesn't support it

#

it likely uses Java 17 or something

#

your plugin java version is wrong or your system java version is wrong

#

its one of the two

north hornet
#

but it worked before

river oracle
#

ok

north hornet
#

but what do i do then?

#

i also tried 17

zenith gate
#

What can I do to clean up my main class? it's getting pretty big and hard to follow. Most of it is just recipes with the if statements from the config.

river oracle
#

just put a github link in and people will send tips and things you could improve

zenith gate
#

Ah I would do that, but hears the thing...

#

I cant install git at the moment.

#

its kind of broken. lol

river oracle
#

how

zenith gate
#

I am on the macos 14 beta. for sonoma, I cant install HomeBrew, git, or anything really. I cant even install git from xcode.

river oracle
#

what IDE do you use? if you use something like IntelliJ you shouldn't need it

zenith gate
#

i use intellij ultimate.

#

dont need git ?

#

hm. I'll go see if its available for download.

sharp flax
#

IntelliJ uses git as well of course

zenith gate
#

Yeah that's what i'd normally use. but git broken 😢

#

it works! 😄

#

but like it added a bunch of files called .DS_Store

#

I have no clue what that is.

chrome beacon
#

Those are macos files I believe

zenith gate
#

well i guess they are in there lol

#

thanks for the github desktop i didnt even know it was a thing lmao.

#

I can now update my github with 3 of my other projects.

remote swallow
#

id advise to make a gitignore with the .DS_STORE in

river oracle
#

How do I decide a good pool size for a new ExecutorService

undone axleBOT
remote swallow
north hornet
#

ye somebody told me that but i dunno how to fix it, as it worked before

chrome beacon
#

You need to use Java 17

north hornet
#

like system java or in the pom.xml?

rigid otter
#

I wonder why YamlConfiguration#getKeys() gives me a random order of keys. How can I get keys that order as in the YML file?

chrome beacon
#

pom and IDE

north hornet
#

my system is 19

#

when i change it in the pom it gives me the same error

zenith gate
#

try changing it in your maven configuration. in the Java options tab

#

uncheck inherit from settings and you can set it manually.

north hornet
rigid otter
#

I didn't

#

Since it indicates "deep" instead

shy rock
#

kind confused, setDamage doesn't work with blaze's fireball projectile?

#

blazes deal 0 dmg atm

tall furnace
#

This looks like it's setting the melee damage.

pseudo hazel
#

yes

#

you need to check if its a blaze fireball

shy rock
#

oh, why did fireball dmg get set to 0 tho?

#

if I didn't interact with it

tardy delta
#

clear cache ig

#

dont ask me which one 💀

chrome beacon
#

You need to update maven

#

3.9.2 is the latest

#

mvn install?

#

That installs your project not maven

remote swallow
chrome beacon
#

What bug?

remote swallow
#

there was some bug maven 3.9 had

chrome beacon
#

🤷‍♂️ I'm using 3.8.5

remote swallow
#

looks like it was fixed in 3.9.1

chrome beacon
#

Debian or Ubuntu?

#

Guess you need to do a manual install then

river oracle
north hornet
chrome beacon
#

mmddyyyy 💀

chrome beacon
#

Well the version of ASM that commodore uses

#

Which I assume is the bundled one

remote swallow
chrome beacon
#

We don't actually know if they're running Java 17 on the server or not

north hornet
#

before you said i needed to use 17

remote swallow
#

1.14 should be using java 8

north hornet
#

i am

chrome beacon
#

and only saw that it tried to load a Java 17 class

river oracle
#

why tf are you using 1.14 anyways

#

that version is dogshit performance

north hornet
cinder abyss
#

Hello, how can I make an entity with a custom texture ?

fluid river
river oracle
#

you'd be losing like 2% of the market share or something around that

cinder abyss
#

(any way for an entity @fluid river ?)

chrome beacon
fluid river
#

?

chrome beacon
#

Or force players to use Optifine

cinder abyss
fluid river
#

DisplayEntity is a new feature

chrome beacon
#

Minecraft does not support custom entity models so you need to work around that

fluid river
#

of 1.19.4 or 1.20 snapshot i don't remember

cinder abyss
chrome beacon
#

Armor stands or Display Entities is how it's usually done

robust zenith
#

There could be possible to find a mate to practice coding?

chrome beacon
fluid river
#

I NEED ONE RIGHT FREAKING NOOW

fluid river
#

except one guy...

chrome beacon
cinder abyss
#

Is display entities fightable ?

fluid river
#

hehe

fluid river
chrome beacon
#

You'd usually use a slime for the hitbox

#

It does depend on what mob you're making though

#

and how large it is

cinder abyss
chrome beacon
#

Then just spawn an invisible zombie for the hitbox

#

and ai

cinder abyss
#

well...

cinder abyss
chrome beacon
#

If I recall correctly

cinder abyss
#

okay thanks

chrome beacon
#

Yeah Optifine can do that

fluid river
chrome beacon
fluid river
#

and force players to use resoursepack

cinder abyss
cinder abyss
chrome beacon
#

Don't forget you're forcing every player to use Optifine

cinder abyss
shy rock
#
            Fireball fireball = (Fireball) event.getDamager();
            ProjectileSource shooter = fireball.getShooter();

            if (shooter instanceof Blaze) {
                Blaze blaze = (Blaze) shooter;
                if (blaze.getCustomName() != null && blaze.getCustomName().equals(ChatColor.GRAY + "Blaze (Level 1)")) {
                    event.setDamage(blazeDamage1);
                }
                if (blaze.getCustomName() != null && blaze.getCustomName().equals(ChatColor.BLUE + "Blaze (Level 2)")) {
                    event.setDamage(blazeDamage2);
                }
                if (blaze.getCustomName() != null && blaze.getCustomName().equals(ChatColor.GOLD + "Blaze (Level 3)")) {
                    event.setDamage(blazeDamage3);
                }
            }
        }
    }```
Can anyone help me a bit? Fireballs from blazes deal 0 dmg still.
#

lmao

chrome beacon
#

💀 Detecting entities by their name

cinder abyss
#

Then, I can make a zombie and give it a custom model data and then use the texture pack @chrome beacon ?

chrome beacon
#

It tells you what to do

cinder abyss
shy rock
#

its an easy way

#

put spoilers

shy rock
cinder abyss
chrome beacon
shy rock
remote swallow
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
kind hatch
#

Damn, that's a good anti copy paste method right there.

chrome beacon
#

opens developer tools

cinder abyss
shy rock
chrome beacon
#

Yeah but don't create new key every time

#

You can make that a static final constant

undone axleBOT
naive bolt
#

Anyone know where I can get a 1.19 sound like

[17:44:48 WARN]: [AdvancedModreq] Looks like the sound BLOCK_NOTE_BASEDRUM is not supported in Minecraft version #git-Paper-550 (MC: 1.19.4)

    private void sounds(Player player, String soundStr) {
        try {
            if (!(soundStr.equals("null") || soundStr.equals(""))) {
                Sound sound = Sound.valueOf(soundStr);
                player.playSound(player.getLocation(), sound, 1F, 1F);
            }
        } catch (IllegalArgumentException e) {
            // Nothing if soundStr = null
            if (!(soundStr.equals("null") || soundStr.equals("")))
                getPl().getLogger().warning("Looks like the sound `" + soundStr + "` is " +
                        "not supported in Minecraft version #" + Bukkit.getVersion());
        }
    }
shy rock
#

cpu usage

chrome beacon
#

It's more about not wasting resources

naive bolt
#

but mate its the same thing, question can be answered the same

undone axleBOT
#

SpigotMC maintains the Spigot server. If you are using a fork of Spigot (such as Paper, Airplane, Purpur, or other derivative works), you should seek support in the appropriate Discord servers.

chrome beacon
#

Why spend CPU and RAM making a new object when you don't have to

naive bolt
#

the answer would be the same

chrome beacon
#

Super old shade plugin

#

Update to 3.4.1

shy rock
subtle folio
undone axleBOT
chrome beacon
#

as for the answer it depends on the rest of the code

remote swallow
shy rock
subtle folio
#

java -Xmx2G -jar BuildTools.jar --rev 1.19.3

#

this was my comand

remote swallow
#

why ram limit, and add --remapped

subtle folio
#

idk needs more ram bc faster

#

remamping

#

are mojang mappings the standard now?

shy rock
remote swallow
subtle folio
#

kk

cinder abyss
#

Hello, how can I set custom model data from Entity ?

flint coyote
#

You can't

#

I mean you can but then all entities of that type will look like it

#

you can't have a blue and a normal creeper. What you can do is let a mob wear armor with a custom model

cinder abyss
#

(in a listener)

#
@EventHandler
    public void customZombieEvent(EntitySpawnEvent event){
        Entity entity = event.getEntity();
        if(entity instanceof Zombie){
            main.getLogger().info("Zombie");
            //Do custom model data
        }
    }```
flint coyote
#

You will have to use a resource pack and can't do it dynamically

#

unless you wanna do the gear part

cinder abyss
zenith gate
#

like if a creeper was named 10 could that creeper have a different texture?

flint coyote
#

no

cinder abyss
zenith gate
#

you cant

#

they dont have one

cinder abyss
zenith gate
#

What he was saying you do, is you make textures for armor and apply that armor to the entity

#

then they will have their texture

cinder abyss
#

not a bad idea

flint coyote
cinder abyss
#

thanks 😄

zenith gate
cinder abyss
zenith gate
#

This is actually very interesting.

cobalt thorn
#

Nova is the closest thing to a modded experience, i used it for like 3 years and was always on fire every big update

zenith gate
#

That's what I was looking for. a modded experience without the hastle of mods. because setting up servers with mods is such a pain especially when it comes to updating to later versions.

cobalt thorn
wise mesa
twilit roost
#

can I somehow make Player interact with Interactive entity manually?

or trigger the event somehow in some other way

chrome beacon
#

You can fire events yourself

#

Not sure why you want to do that though

river oracle
#

just a reminder though firing an event wouldn't make the player do that action on their screen

pseudo hazel
#

y2k, you told me a bit earlier today that using getPlugin(class) is bad, but why is that?

#

is it slow?

#

@river oracle

peak jetty
#

so i want to get a players current potion effect, but someone can have multiple ones so i want to filter it by only getting the one with infinite duration. this is what i have so far but its a Collection when it should be a PotionEffect:

#

(please ping me for responce)

peak jetty
#

ok thank you

#

Ok I’ll try that thanks

#

Ye

river oracle
#

it uses reflection under the hood

pseudo hazel
#

I see

#

right now I have just done an ugly private static MyPlugin instance and in onEnable start with instance = this; is that better do you think?

tardy delta
#

di

pseudo hazel
#

wdym

delicate lynx
#

?di

undone axleBOT
tardy delta
#

?di

undone axleBOT
tardy delta
#

fuck

undone axleBOT
pseudo hazel
#

I know what ?di is

#

?di

undone axleBOT
tardy delta
#

youll never see singletons in enterprise code

#

well not that type (not really a singleton technically)

#

static getter thing

pseudo hazel
#

I mean what is enterprise code even

tardy delta
#

code written in an enterprise

pseudo hazel
#

i mean you are right though, I have never seen enterprise java code

tardy delta
#

atleast where i heard of, they were embracing dependency injection

river oracle
#

you just hope you get one who loves DI

pseudo hazel
#

well for some things its just gonna get awkward to keep passing in your plugin instance

tardy delta
#

like utils?

quaint mantle
#

i found TreeType in structuregrowevent can i get this tree types and spawn on custom event ?
i mean can i spawn structures with spigotapi ?
example i do command when player write this command spawn desert pyramid

pseudo hazel
#

or for example I have multiple places where I want to use data from config files

#

right now thats mostly DI

#

but not all

#

programming for the general use case is not hard

#

the exceptions are annoying as fuck

#

im sure you know that

tardy delta
#

when are we getting not null types

trim creek
tardy delta
#

valhalla when

trim creek
#

what is valhalla

tardy delta
trim creek
#

sounds uselessto me

tardy delta
#

its very nice

#

both in terms of code performance and usability

pseudo hazel
#

like the only times i have relied on my plugin instance is when creating objects from bukkit that require a plugin instance

tardy delta
#

just read it

#

true

pseudo hazel
#

and in most cases DI suffices but it doesnt for everything

trim creek
pseudo hazel
#

like shuffle them? yikes

river oracle
#
siegeInfo.getStartTime().minus(Instant.now().getEpochSecond(), ChronoUnit.SECONDS).getEpochSecond()

Does this work for getting the start time and subtracting the current time to get the time left between these two periods in seconds?

tardy delta
#

Period.between

river oracle
#

mmmo kay

tardy delta
#

maybe useful

pseudo hazel
trim creek
#

nani

river oracle
pseudo hazel
#

so I would say some static uses are fine, but like very sparingly and only for specific purposes

#

like reading your files and stuff

#

something at some point needs to be static

trim creek
#

I usually don't use statics

#

only for variables

river oracle
#

mmmm wait no that wouldn't work because Period.between takes LocalDate not LocalDateTime

tardy delta
#

ok that only works for dates 💀

trim creek
#

so I won't need a fucking reference for a different class

tardy delta
#

stupid datetime api

remote swallow
#

Duration

tardy delta
#

but why are you converting epoch time to seconds

river oracle
#

isn't that what it is

#

lol

#

epochsecond

tardy delta
#

epoch is millis