#help-development

1 messages · Page 1014 of 1

young knoll
#

You have to extend PathfinderMob

#

Which extends mob

merry cove
#

yea, my dumb ass couldn't find puppetMob.getTarget(); sorry 😛

grim hound
#

And this happened to me before, but then the packets were sent without compression

#

But now I do compress them

#

So no idea what's going on

#

So basically you do everything the channel handlers would do so that you can write it directly

dense geyser
#

if a command executed from a player gives a Player commandsender, and the console gives a ConsoleCommandSender, then what does a command block give?

sullen marlin
#

Funnily enough, BlockCommandSender

shadow night
#

Damn this is the best question with the best response

dense geyser
#

lmao

pseudo hazel
#

sad, couldve been CommandBlockCommandSender

short plover
#

how to detect block getting powered by another block

short plover
fervent void
#

pls help spigot1.20.6 why does not it work import org.bukkit.Material;

sterile sapphire
#

cannot access org.bukkit.plugin.java.JavaPlugin

#

how do i fix?

chrome beacon
fervent void
#

This works in spigot 1.16.5
import org.bukkit.Material;
ItemStack gameSelector = new ItemStack(Material.CHEST);
ItemMeta gameSelectorMeta = gameSelector.getItemMeta();
gameSelectorMeta.setDisplayName("§aGame Selector");
gameSelector.setItemMeta(gameSelectorMeta);

why not in spigot 1.20.6

fair rock
#

Wanna explain what didnt work?

fervent void
#

Material in the item slot is displayed in red and when I try to import it it doesn't exist

sullen marlin
#

is your intellij outdated....

alpine urchin
#

use netbeans

#

like md5

fervent void
grim hound
#

does anyone know why this doesn't work?

#

as of: the player that gets a packet compressed with this disconnects with DataFormatException

#

I make sure to write it directly

chrome beacon
#

Was about to ?notworking you

grim hound
chrome beacon
#

So why are you making it hard for yourself by directly working with the channels that way

grim hound
#

this is the server src

grim hound
#

don't question it

#

I've already made up my mind

chrome beacon
#

Oh well

#

Compare your packet with a vanilla packet

#

And see what the diff is

grim hound
#

ok

fluid cypress
#

im trying to do shadow relocation, bc its good, apparently, it avoids conflicts and stuff, and im getting weird errors like NoClassDefFound on classes that definitely are inside the fat jar, checked with jar -tf, but they only happen sometimes, not always. anyways, im getting errors every time a relocated class is used (i guess). for example:

java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
$ jar -tf build/libs/MispleaseEconomy-0.1.0-SNAPSHOT.jar | grep Intrinsics
io/github/misdocumeno/mispleaseeconomy/relocated/kotlin/jvm/internal/Intrinsics.class
more stuff...

i tried using a coroutine tho and it does works, apparently

runBlocking {
    println("hello from coroutine")
}

so idk what could be the problem, i dont even know if im doing the relocation properly. this is the build.gradle.kts file
https://pastes.dev/izWbsWxlPZ

tardy delta
#

why are you relocating kotlin?

#

uhh

fluid cypress
#

bc its an implementation? idk, should i?

#

should i remove org.jetbrains.kotlin too from the relocate thing?

tardy delta
#

dunno, i only know you need the kotlin runtime included at runtime

fluid cypress
#

yea, and thats implementation(kotlin("stdlib"))

#

which its groupid is kotlin, isnt it?

#

btw someone said to use the "bukkit's kotlin library loader", but i didnt find anything online about that. i also remember someone saying to use another shadow plugin, bc the one im using will stop being supported soon or something like that

young knoll
#

Libraries is a feature in plugin.yml

#

There should be some documentation on the wiki for it

fluid cypress
#

uhh

#

where is that

rotund ravine
#

Sigh

fluid cypress
#

it reuses the same library for multiple plugins somehow if it can?

young knoll
#

Yes

eternal oxide
#

It loads the libs into the plugins classpath

fluid cypress
#

mmm

young knoll
#

It downloads and caches the library from central and then injects it into the plugins classloader

fluid cypress
#

then, i change implementation(kotlin("stdlib")) to compileOnly(kotlin("stdlib")), add the groupid + artifactid + version of kotlin stdlib to plugin.yml

#

and thats it

#

?

fluid cypress
#

cool, i guess i should add the serialization and exposed libraries too, right?

rotund ravine
#

You can if you want to

fluid cypress
#

ok, so after doing that, i dont have to relocate kotlin and org.jetbrains.kotlin, right?

mellow hazel
#

Anyone can help me? I can't import the plugins file java in the plugins folder mc server

fluid cypress
#

but i still have problems with exposed

#
java.util.ServiceConfigurationError: org.jetbrains.exposed.sql.DatabaseConnectionAutoRegistration: Provider org.jetbrains.exposed.jdbc.ExposedConnectionImpl not found
    at java.util.ServiceLoader.fail(ServiceLoader.java:593) ~[?:?]
    at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1219) ~[?:?]
    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1228) ~[?:?]
    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]
    at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]
    at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]
    at io.github.misdocumeno.mispleaseeconomy.relocated.kotlin.collections.CollectionsKt___CollectionsKt.firstOrNull(_Collections.kt:277) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at org.jetbrains.exposed.sql.Database.<clinit>(Database.kt:111) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at io.github.misdocumeno.mispleaseeconomy.database.Database.init(Database.kt:20) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at io.github.misdocumeno.mispleaseeconomy.MispleaseEconomy.onEnable(MispleaseEconomy.kt:58) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]

Database.kt

fun init(dataFolder: File) {
    economyDb = Database.connect("jdbc:sqlite:${File(dataFolder, "economy.db")}", driver = "org.sqlite.JDBC") // this is line 20

    transaction(economyDb) {
        SchemaUtils.create(Balances)
        SchemaUtils.create(Transactions)
    }
}
#

i removed it from the relocation, i changed it to compileOny, and i added it to libraries in plugin.yml, and now i get a different error

java.util.ServiceConfigurationError: org.jetbrains.exposed.sql.DatabaseConnectionAutoRegistration: org.jetbrains.exposed.jdbc.ExposedConnectionImpl not a subtype
    at java.util.ServiceLoader.fail(ServiceLoader.java:593) ~[?:?]
    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1244) ~[?:?]
    at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1273) ~[?:?]
    at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1309) ~[?:?]
    at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1393) ~[?:?]
    at kotlin.collections.CollectionsKt___CollectionsKt.firstOrNull(_Collections.kt:277) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at org.jetbrains.exposed.sql.Database.<clinit>(Database.kt:111) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at io.github.misdocumeno.mispleaseeconomy.database.Database.init(Database.kt:20) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
mellow hazel
worthy yarrow
#

?ask

undone axleBOT
#

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

fluid cypress
mellow hazel
#

I can't import the plugins file java in the plugins folder mc server

#

The amount inside the plugins folder but it still gives me plugins 0 in the console

fluid cypress
#

copy pasting the same question wont do it. it depends on your host provider. you should ask on #help-server tho

brittle geyser
#

join to voice and share your screen

#

maybe i help you

fluid cypress
#

im stupid, i forgot to change implementation to compileOnly in one of the three exposed dependencies, but now i get again a different error

java.lang.LinkageError: loader constraint violation: when resolving method 'org.jetbrains.exposed.sql.Database org.jetbrains.exposed.sql.Database$Companion.connect$default(org.jetbrains.exposed.sql.Database$Companion, java.lang.String, java.lang.String, java.lang.String, java.lang.String, kotlin.jvm.functions.Function1, org.jetbrains.exposed.sql.DatabaseConfig, kotlin.jvm.functions.Function1, int, java.lang.Object)' the class loader 'MispleaseEconomy-0.1.0-SNAPSHOT.jar' @331f68f3 of the current class, io/github/misdocumeno/mispleaseeconomy/database/Database, and the class loader java.net.URLClassLoader @59b6eab1 for the method's defining class, org/jetbrains/exposed/sql/Database$Companion, have different Class objects for the type kotlin/jvm/functions/Function1 used in the signature (io.github.misdocumeno.mispleaseeconomy.database.Database is in unnamed module of loader 'MispleaseEconomy-0.1.0-SNAPSHOT.jar' @331f68f3, parent loader java.net.URLClassLoader @1ed6993a; org.jetbrains.exposed.sql.Database$Companion is in unnamed module of loader java.net.URLClassLoader @59b6eab1, parent loader java.net.URLClassLoader @1ed6993a)
    at io.github.misdocumeno.mispleaseeconomy.database.Database.init(Database.kt:20) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
    at io.github.misdocumeno.mispleaseeconomy.MispleaseEconomy.onEnable(MispleaseEconomy.kt:58) ~[MispleaseEconomy-0.1.0-SNAPSHOT.jar:?]
#

according to this, could be bc im shadowing it https://www.spigotmc.org/threads/linkageerror-loader-constraint-violation.539644/
but im pretty sure im not, this is the build.gradle.kts file now after all the changes
https://pastes.dev/8IN4ZV56Nv

and this is the libraries section in plugin.yml

libraries:
  - org.jetbrains.kotlin:kotlin-stdlib:2.0.0
  - org.jetbrains.exposed:exposed-core:0.50.1
  - org.jetbrains.exposed:exposed-jdbc:0.50.1
  - org.jetbrains.exposed:exposed-java-time:0.50.1
molten hearth
#

does anyone have good networking experience with linux? im trying to create a dummy network interface where all the traffic is actually redirected to eth0

fluid cypress
# fluid cypress according to this, could be bc im shadowing it https://www.spigotmc.org/threads/...

ok so uhhh, i added all the serialization dependencies to the bukkit library loader too, and apparently everything works fine now, for some reason. so, now if i make another plugin using the same dependencies, there wont be any conflicts bc of loading the same class twice, right? meaning i dont need to relocate stuff, and i also reduce the jar size, right? its all benefits? there are no cons to this?

blazing ocean
#

i don't even need to include all that 🤔

fluid cypress
#

is there a way to prevent all the [SpigotLibraryLoader] spam in the console?

blazing ocean
#

i have it as an impl in gradle, as well as the gradle plugin

fluid cypress
#

yea but that can cause conflicts if two plugins shadow the same dependency and the same version

#

in theory

blazing ocean
#

shouldn't each plugin supply its own libs

#

(except for libs that are plugins)

fluid cypress
#

yea, but you need to relocate to prevent conflicts, right?

#

do you relocate?

blazing ocean
#

i don't relocate anything

#

i have like 16 depends

fluid cypress
#

well idk, some people here may have something to say about that i guess

#

unless i didnt understand correctly, you have to shadow your dependencies, obviously, to make them exist during runtime, but you also have to relocate them, bc if two plugins shadow the same dependency, the jvm will do weird stuff when loading the same thing twice, or something like that

#

but shadowing everything, including libraries that are quite common, like the kotlin stdlib, increases the fat jar size, thats why the spigot library loaded exists

blazing ocean
#

tbf idc about my jar size

#

i have like 20mbs lol

fluid cypress
#

yea, that jar is pretty fat

shadow night
blazing ocean
fluid cypress
#

but also, i was having problems with relocating stuff, so it just works now, and the shadow plugin will supposedly stop being supported soon

#

or so i been told

blazing ocean
fluid cypress
#

but there is a newer replacement

#

yea

blazing ocean
#

goooler/shadow

fluid cypress
#

whats the new one?

blazing ocean
#

works for j21

eternal night
#

The spigot classloader shenanigans are a bit all over the place

blazing ocean
#

id("io.github.goooler.shadow")

shadow night
fluid cypress
#

ok, but im on java 17

eternal night
fluid cypress
#

i really hate those

eternal night
#

plugin A can load/access plugin B's classes without issue

blazing ocean
#

🤔

shadow night
eternal night
blazing ocean
#

have you tried

shadow night
#

Paulem has

blazing ocean
#

oh right

shadow night
#

Two plugins - one main class, what a beauty that would be

fluid cypress
eternal night
#

Well you generally would want to shade and relocate if possible, especially with shit like the kotlin standard library

fluid cypress
#

but why

#

in my sv there seems to be only one plugin that uses that

[07:06:23] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loading 1 libraries... please wait
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/openjdk/nashorn/nashorn-core/15.4/nashorn-core-15.4.jar
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/ow2/asm/asm/7.3.1/asm-7.3.1.jar
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/ow2/asm/asm-commons/7.3.1/asm-commons-7.3.1.jar
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/ow2/asm/asm-analysis/7.3.1/asm-analysis-7.3.1.jar
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/ow2/asm/asm-tree/7.3.1/asm-tree-7.3.1.jar
[07:06:24] [Server thread/INFO]: [SpigotLibraryLoader] [SuperiorSkyblock2] Loaded library /mnt/2tb/misplease/server/libraries/org/ow2/asm/asm-util/7.3.1/asm-util-7.3.1.jar

idk why would a skyblock plugin need to anaylze an abstract syntax tree

eternal night
#

asm is a dependency of nashorn

fluid cypress
#

right, i see

#

idk what is that tho

eternal night
#

a javascript runtime

fluid cypress
#

then again, why would a skyblock plugin need that

#

anyway, so back to relocation then?

#

i was having some errors, i never did shadow relocation

eternal night
#

Well the library loader is iirc isolated to the specific plugins?

#

which is going to be a whole mess if you write in kotlin and have plugin dependencies

shadow night
eternal night
#

so you'd need to declare a dependency between the plugins

fluid cypress
#

is this how you relocate the kotlin stdlib? and everything else https://pastes.dev/WbgrBxWm7b
i get this error when trying to connect to the db with exposed
https://pastes.dev/3UtFJNyU5H
if i dont relocate exposed, so there is no db error, and i join the server, then i get another error, ClassNotFound with kotlin/jvm/internal/Intrinsics.class or something like that iirc

fluid cypress
eternal night
#

tbf, I doubt that is even going to remotely work

#

kotlin is such a fucking mess with its dependency

fluid cypress
#

i miss npm install

eternal night
#

you have your one library that is written in kotlin that uses one version of kotlin

#

you have your own plugin that uses a different version of kotlin

#

so now its just fucked

shadow night
#

How great it is to be a java user

fluid cypress
#

so, to avoid errors with all of that

#

i should shadow and relocate

#

even if it ends up being a 50mb fat jar

#

right? tbh i dont care about size

#

i just care about

#

not having errors

eternal night
#

Well you can give it a go

#

idk if you actually have a kotlin version missmatch

#

or if the library loader is just doing funsies

fluid cypress
eternal night
#

Well the question is more, what do the kotlinx dependencies rely on

#

which, I do not code in that script language much, I don't know

fluid cypress
#

mmm

#

so you mean there could be a difference in kotlin versions between

#

my plugin and the dependencies

#

is that what you mean? im not sure if i follow

eternal night
#

Well the error you posted at least implies that your plugins classloader loaded a kotlin class somehow (which would imply you shaded it?) and then your library loader also loaded the Function1 class from its kotlin stdlib

fluid cypress
#

and can anyone give me an example of a working plugin written in kotlin, so i know how you add and shadow and relocate the stdlib properly

eternal night
#

you are not running shadowJar are you?

fluid cypress
#

you mean ./gradlew shadowJar?

eternal night
#

Yea

fluid cypress
#

yea i do that

eternal night
#

:/

fluid cypress
#

but what error are you looking at?

eternal night
#

okay then the error is just on your end

fluid cypress
eternal night
#

like, if you define kotlin standard lib as a dependency to be loaded by the library classloader

fluid cypress
eternal night
#

you cannot also shade it

fluid cypress
#

the spigot library loader

#

and i already fixed that

#

by adding all dependencies to libraries in plugin.yml

#

but you said that could be

#

a problem

#

so im back with shadow relocating stuff

#

and now im back to the previous error

eternal night
#

you added the stlib to the libraries no?

fluid cypress
#

is the error i have now

fluid cypress
#

thats literally already working

#

but now im not sure about using the spigot library loader, so i want to fix the shadow thing

#

the problem with the spigot library loader was that i was adding exposed and stdlib to libraries in plugin,yml, but i was still shadowing kotlinx-serialiation

#

thats all fixed now

blazing ocean
eternal night
#

Ehhh, I mean I'd guess that you are missing a relocation somewhere there

#

presumably they use some service discovery that fails post relocation

fluid cypress
#

ok, yea

#

im probably missing something

#

bc i also got a ClassNotFound on kotlin/jvm/internal/Intrinsics.class or something like that

#

so im pretty sure the relocation is wrong somehow

#

it all worked fine before the relocation

eternal night
#

idk if the missing service relocation is a gradle shadow plugin thingy

fluid cypress
#

uhh

#

i remember seeing something

#

about that

#

and chatgpt said it was fine

#

let me check

eternal night
#

chatgpt is rather useless KEKW

fluid cypress
#

yea pretty much

#

this

#
$ jar -tf build/libs/MispleaseEconomy-0.1.0-SNAPSHOT.jar | grep DatabaseConnectionAutoRegistration
META-INF/services/org.jetbrains.exposed.sql.DatabaseConnectionAutoRegistration
io/github/misdocumeno/mispleaseeconomy/relocated/org/jetbrains/exposed/sql/DatabaseConnectionAutoRegistration.class
worthy yarrow
#

ChatGpt is fun to play with like siri

fluid cypress
#

the META-INF/services

#

points to the previous location

#

and chatgpt said that was normal, i assume it isnt?

fluid cypress
#

its like gambling idk

royal heath
#

Can't rely on it all the time if you don't give it enough context

worthy yarrow
#

Gpt def needs you to be precise for any worth while result

fluid cypress
#

yea totally, if you give it enough context, and its not biased to agree with you in everything, even when you are not sure and you are just asking

#

then its useful

royal heath
#

It's best as an SQL generator when needed imo, however the more advanced shit gets you're basically coding it yourself in english

#

Wait lul I was looking up why is the skyblock plugin using nashorn

fluid cypress
#

i see its a fork of john rengelman, so i asume i dont have to change any config about it?

eternal night
royal heath
#

You can always shade it to get rid of it if that is what you are trying to do

eternal night
fluid cypress
#

well, i changed the plugin and everything is the same. the service inside META-INF is still the same

fluid cypress
eternal night
#

I mean yea the fork is just like 70 commits on top

#

its not going to fix every issue lol

fluid cypress
#

i was hoping it was a totally separated project or something

eternal night
#

nah it is a straight fork mainly for java 21 support

fluid cypress
#

now the service is being relocated apparently

$ jar -tf build/libs/MispleaseEconomy-0.1.0-SNAPSHOT.jar | grep DatabaseConnectionAutoRegistration
io/github/misdocumeno/mispleaseeconomy/relocated/org/jetbrains/exposed/sql/DatabaseConnectionAutoRegistration.class
META-INF/services/io.github.misdocumeno.mispleaseeconomy.relocated.org.jetbrains.exposed.sql.DatabaseConnectionAutoRegistration
eternal night
#

noice

fluid cypress
#

ok, now i get a different error

eternal night
#

progress stonks

fluid cypress
#

yay

#

something about the service

#

id love to know what a service is

eternal night
#

might wanna yank minimize()

fluid cypress
#

ill try that

eternal night
#

Services are a way to discover implementations of interfaces

fluid cypress
#

i guess thats how exposed magically knows when im declaring a table

eternal night
#

like in this case ExposedConnection is an interface, but what actual implementation is loaded is configured via a service

fluid cypress
#

its working

#

no error now

#

great

eternal night
fluid cypress
#

that was the problem

#

thanks a lot

eternal night
#

just don't depend on that plugin with another

fluid cypress
#

so, things that i learned today

eternal night
#

that woulkd explode

fluid cypress
#

there is something called services

fluid cypress
#

and this is an economy provider, i plan to make other plugins depend on it

eternal night
fluid cypress
#

besides the vault interface

eternal night
#

just don't expose kotlin then

fluid cypress
#

uhh

#

what would that be

#

i dont get it

eternal night
#

like don't write your API in kotlin

#

or if you do, you cannot really relocate it

fluid cypress
#

you mean the thing that has to be included as a dependency to other projects?

eternal night
#

Well if you are writing an economy provider

fluid cypress
#

should they all add it as compileOnly?

eternal night
#

and other plugins use its API types that are written in kotlin

#

no

#

but your plugin now has kotlin relocated to your package

#

so they'd expect to get a kotlin type at the normal kotlin package

#

and boom

fluid cypress
#

mmm

#

ok but

#

in theory, if i want to make the api accessible to java projects too

#

then

eternal night
#

Yea then you'd write the API without kotlin anyway

fluid cypress
#

i wouldnt add kotlin types to the api, right?

#

is that what you mean

eternal night
#

yea

fluid cypress
#

ok

#

yea, sure

eternal night
#

👍

fluid cypress
#

i know kotlin is not that adopted yet here, idk why

#

i dont plan to make it public tho, so

eternal night
#

I mean, dependencies are already a mess

fluid cypress
#

but its open source, so idk

fluid cypress
eternal night
#

kotlin stdlib is fucking annoying to work with between plugins

fluid cypress
#

suck a shame

#

its a nice language

#

i think i like it

worthy yarrow
eternal night
#

Well, you can just properly keep your API and impl separated

#

write your java interfaces in the API

#

and then you can implement that in kotlin as much as you want

#

just the API/nterface to other plugins are best off in java to not get absolutely hammered with dependency issues

fluid cypress
#

yea yea, sure, that was the idea in the first place, i didnt even think about making a kotlin api, didnt think that could be possible

worldly ingot
#

That and the overwhelming majority of plugins are written in Java so you're immediately closing off access to your API in doing so

eternal night
#

I mean it is and it can make some kotlin consumers feel a lot nicer

chrome beacon
#

I had to hook a mod written in scala

#

That was pain

worldly ingot
#

I'm so sorry

fluid cypress
#

well thanks again 👍

eternal night
#

ah don't start the kotlin vs java discussion KEKW it happens every other week, its boring

worthy yarrow
#

^

worldly ingot
#

Yeah. So long as we all agree that Java is better and that Kotlin smells

torn shuttle
#

mr choco you're so stinky

fluid cypress
#

i dont use kotlin or java enough to have a strong opinion about it, but i can be sure i hate java

#

tho most of the reasons about why i hate java, like the way it handles dependencies, are also present in kotlin, so 💁‍♀️

#

at least i can stop using semicolons

royal heath
#

I mean I'm not much for debating languages as everyone has their reasoning for using one over the other, however if you're getting into programming semicolons are really something you need to get used to

#

It's like second nature at this point for me

chrome beacon
pseudo hazel
#

i mean its the same as using punctuation when writing normally

chrome beacon
#

not writing semicolons just feels wrong

royal heath
#

legit. In JS you don't really need them, but I use them anyways because the code looks naughty asf without it

#

Just best practice imo. I get at the start its annoying to remember, but once you start doing it, it gets to a point where you don't even realize you're using them

twin venture
#

Hi , so iam back again with more questions so iam working on skywars plugin (big plugin) , and i used redis and sql , idk if its the best setup

1- player login to bungee (bungee load his data from sql and it send it to redis)
2- when player change server it will request the data from redis
3- after player quit the network (it will save his data) .. such as kills , deaths , cosmtics .. , killeffect

#

or is there a better aproch?

#

iam at work rn , and i have nothing to do i wana waste time xD (9 hours till i get back home)

royal heath
#

I mean it sounds like a normal caching approach besides maybe instead of grabbing from redis when chnanging server it should save into the db then load into redis once joined again

#

the concern is what if he has data, the server crashes between joins

#

that data is gone

drowsy helm
#

It can do both. I don’t see why you would want to reload it into redis though

maiden wave
chrome beacon
#

Are you logged in

drowsy helm
#

What error

chrome beacon
#

Probably the not logged in error

twin venture
#

hmmm so ,

no reids

1- player joins lobby or skywars games servers (it load his data from sql )
2- player leave it will save his data to sql from cache system

maiden wave
chrome beacon
#

You need to be logged in to see premium plugins

maiden wave
#

i see

#

thanks

drowsy helm
worthy yarrow
twin venture
#

how about having cosmetics loaded on lobby server only and it send the cosmrtics data to all sub servers

#

not player data but cosmetics data

chrome beacon
drowsy helm
chrome beacon
#

nothing is guaranteed to run during a crash

worthy yarrow
#

That’s what I thought ok

twin venture
#

i will send how i do the cosmetics loading for games + lobby server

drowsy helm
twin venture
#

hmm?

drowsy helm
#

Have a management application detached from a minecraft instance

#

More robust

#

Unless im misunderstanding what you’re saying

twin venture
#

well i wanted to make it good but not too complex

mellow snow
maiden wave
chrome beacon
#

It does

#

which is why you need to be logged in

maiden wave
chrome beacon
#

TAB

chrome beacon
#

and what you're getting isn't a hashmap

maiden wave
drowsy helm
chrome beacon
#

Guessing that tells gson to read it as a map

mellow snow
drowsy helm
#

Can just pass the map class then cast it

chrome beacon
mellow snow
#

What changes should I make to the code?

drowsy helm
#

Your map is <String, Object> and your token is <String, String>

#

Not sure if java will like that

fluid cypress
#

everytime i add a dependency, i get a problem for some reason

#

far more often than in other languages

chrome beacon
#

You mean the kotlin problem

#

?

fluid cypress
#

everything

#

but yea

#

kotlin, the shadow plugin, having to manually add a dependency to a config file, jvm target version

#

compilation stages, or lifecycles, maven vs gradle, kts, groovy, etc etc

chrome beacon
#

I mean you don't have to do all of that to get things working

#

Gradle can be a pain though

fluid cypress
#

yea i know, but there isnt much abstraction to all of that

chrome beacon
#

? what do you want it to be

fluid cypress
#

for example in javascript, there are a lot of frameworks, a lot of build tools, but generally they are abstracted enough to just run a command or two and thats it, without even having to open a single config file

#

but yea, i know its a me problem, bc i code stuff on java or kotlin for a few weeks, then i leave it for months and i forget everything

chrome beacon
#

I'd say js frameworks and build systems are far worse

fluid cypress
#

i made my own boilerplate tool bc of that

chrome beacon
#

also it's just one command or two with Java as well

fluid cypress
#

but you can do npx frameworktool init

chrome beacon
#

That's loading a template

fluid cypress
#

npm run dev

#

and thats it

chrome beacon
#

There are templates available for Java projects too

#

Alex has a great one for Spigot

slender elbow
#

me when copy/pasting a string in a text file is too much

chrome beacon
fluid cypress
#

what about adding a dependency

chrome beacon
#

Just paste it to the file

fluid cypress
#

implementation, compilyOnly, runtimeOnly, provided, shadowing, relocating, etc etc

chrome beacon
#

again that's a gradle problem

fluid cypress
#

you gotta check the last version manually

chrome beacon
#

just use maven if it's too complex

fluid cypress
#

xml 🤢

#

but again, its a me problem, i know, bc i understand the pain of non js devs using javascript

#

so i guess its the same thing

#

and their pain is probably greater than mine

#

but the thing is, i dont know how the build tools work in js, and i can still use them

#

thats not the case with gradle/java in general

chrome beacon
#

again maven

#

Gradle is a lot more complex

fluid cypress
#

this is literally the first plugin i make using gradle

#

but yea, maybe maven was easier

chrome beacon
#

I wouldn't recommend anyone to start with Gradle

fluid cypress
#

yea, i made like 10 plugins with maven and java, so i guess im ready to use gradle and kotlin

#

i never used this many dependencies tho

worthy yarrow
#

Shoot for more 😛

fluid cypress
#

and i wanted to start using the kotlin ecosystem, exposed instead of raw sql for example

fluid cypress
#

back to the errors again, im not sure where the error is being originated, there is something that hasnt been properly relocated
https://pastes.dev/xYLUep5sOT
the stdlib has been properly relocated

$ jar -tf build/libs/MispleaseEconomy-0.1.0-SNAPSHOT.jar | grep Intrinsics
io/github/misdocumeno/mispleaseeconomy/relocated/kotlin/jvm/internal/Intrinsics.class
more stuff...

the event

class MispleaseEconomyEvents : Listener {
    @EventHandler
    fun onPlayerJoin(event: PlayerJoinEvent) {
        EconomyProvider.createPlayerAccount(event.player)
    }
}
#

wait

#

thats not even the same plugin

chrome beacon
#

yeah

shadow night
#

lol?...

chrome beacon
#

Your other plugin was depending on kotlin not being relocated ig

fluid cypress
#

i spent too much time with this

#

i should go do something else

fluid cypress
fiery hinge
#

can i use the vault on 1.20.4

fluid cypress
#

yes

chrome beacon
#

inside of this plugin

#

to work before

shadow night
#

why is there a plugin inside of a plugin

fluid cypress
#

but that plugin doesnt have anything to do with this plugin

fiery hinge
fluid cypress
shadow night
#

wth

chrome beacon
shadow night
fiery hinge
#

and there is no 1.20.4 for the vault

undone axleBOT
fluid cypress
chrome beacon
#

This is why we relocate so you don't accidentally end up using code from other jars

fluid cypress
shadow night
fluid cypress
#

just use it

shadow night
#

Even my phone is better

fiery hinge
fluid cypress
#

the other plugin tried to use

#

my plugins

chrome beacon
#

yes

fluid cypress
#

kotlin stdlib

#

wtf

chrome beacon
#

the kotlin lib in your plugin

fluid cypress
#

but its relocated

shadow night
chrome beacon
#

and the error you're seeing is that it can't find the kotlin stdlib

river oracle
#

@fickle mantle never asked but did you get everything working?

chrome beacon
shadow night
#

Nowadays I use my own hardware

#

Or a paid hosting provider

fiery hinge
#

how do you use your own pc

shadow night
chrome beacon
fluid cypress
chrome beacon
#

It's looking for the kotlin stdlib

#

anywhere in the runtime

#

and no it's not finding anything

fluid cypress
#

then it doesnt have anything to do with the economy plugin? and why isnt it finding anything if the stdlib is shadowed in that plugin jar, just not relocated?

chrome beacon
#

it's not shadowed

#

nor relocated

#

so it can't find anything

chrome beacon
tardy delta
#

whats the dif between shading an relocating again?

#

c doesnt have that stuff

fluid cypress
chrome beacon
#

if it was shadowed that error wouldn't be happening

shadow night
fluid cypress
#

and how can that happen given that build.gradle.kts?

chrome beacon
#

🤷‍♂️ I avoid gradle when possible

#

always causing issues

fluid cypress
#

and yea, its doesnt show up when doing jar -tf and grep

#

i was having problems with shadow not shadowing stuff

shadow night
slender elbow
#

you need to run the shadowJar task

#

instead of build

fluid cypress
#

i fixed it by removing the dependencies block inside of the shadowJar task

#

what is the use of the dependencies block in shadowJar then?

fluid cypress
#

and in fact, i am using that plugin right now

slender elbow
#

oh yeah you pretty much never want to explicitly add dependencies there, shadow will take care of 'em

fluid cypress
#

and it was working

slender elbow
#

just in the regular dependencies block, implementation the dependencies you want to shade, compileOnly the ones you don't (like the spigot api) 👍

fluid cypress
#

ok so, to relocate kotlin stdlib, i need to relocate both "kotlin" and "org.kotlin.jetbrains", right?

shadow night
slender elbow
fluid cypress
#

again, chatgpt told me to, so im not sure if its right

#

and relocating doesnt seem to be a popular thing to do in general

#

outside of minecraft plugins

#

so i didnt find much online

slender elbow
#

yeah that's because it isn't something that is really needed in the real world

#

it's more of an ugly hack

fluid cypress
#

yea, pretty much

#

it feels wrong to do too

#

maybe i could look at the most popular plugin thats written in kotlin? any idea which one is it?

lament ferry
#

in 1.20.6 the method ItemFactory#hoverContentOf(ItemStack) no longer works, is there an alternative?

eternal night
#

waiting pretty much if that is ever going to come back

lament ferry
#

hmm ok

fluid cypress
#

im tired of randomly getting this error, i dont know why it happens, it only happens sometimes, most of the time it doesnt
https://pastes.dev/yu8qK4L5sp
it doesnt make sense, why does it say class not found on a method? and on a method of a class of my own plugin? from a class that is clearly used all the time. it has something to do with coroutines? it has to
the method:

import kotlinx.coroutines.*

object Database {
    private val job = Job()
    private val coroutineScope = CoroutineScope(Dispatchers.IO + job)

    // stuff... other methods

    fun waitToComplete() {
        runBlocking {
            job.complete()
            job.join()
        }
    }
}

its called from onDisable

override fun onDisable() {
    QuickShop.insertPendingLogs()
    Database.waitToComplete()
}

basically the idea was to wait for every database transaction to finish before shuting down the server

hazy parrot
#

Are u using reload

fluid cypress
#

i even tried adding a Thread.sleep on db insertion methods, and it is working fine, it waits, all as expected

#

that error just happens randomly sometimes

fluid cypress
hazy parrot
#

Disabling with plugman or anything like that ?

fluid cypress
#

i have plugman installed tho, idk if that matters, and im using purpur

hazy parrot
#

Well if it's happening sometimes, something is messing with classpath

fluid cypress
#

and what could that be?

#

and can that be changed during runtime?

#

well im not even sure what classpath is

chrome beacon
#

Did you do a full server restart after changing code in the plugin

fluid cypress
#

yes

eternal oxide
#

plugman really breaks static classes

fluid cypress
#

i alwas do

chrome beacon
#

Remove plugman then

fluid cypress
eternal oxide
#

no, if you reload

fluid cypress
#

bc im not doing plugman reload

#

then its not that

#

im not using it bc it causes problems with exposed, the orm library

chrome beacon
#

Using plugman is generally a bad idea

fluid cypress
#

well, it depends i guess

worthy yarrow
torn shuttle
#

I just can't figure out this transformation matrix math problem

#

I got the entire thing working but because the bones are individually rotated 180 degrees away from where they should be by mojang I just can't figure out a solution

worthy yarrow
#

MEG?

torn shuttle
#

no, my own model plugin

worthy yarrow
#

Oh how lovely

fluid cypress
#

but what does the error implies? that the class stopped existing during runtime? like, "unloaded"? if thats even possible. that the method never existed? is it normal to get that error on a method?

torn shuttle
#

everything works and it works for the versions before mojang changed the default rotation of these display entities

#

but them rotating the display entities is just messing me up

tardy delta
#

that it cannot find a generated lambda class

#

so something really fucked up

worthy yarrow
fluid cypress
#

wait, can the error be caused bc of changing the jar file in disk while the server is running?

torn shuttle
#

has nothing to do with that, I got that part down

worthy yarrow
#

Ah gotcha

fluid cypress
#

i sometimes get the error on SuspendLambda too, and that is definitely included in the jar

tardy delta
eternal oxide
fluid cypress
#

what is that

fluid cypress
#

you asked about the reload command and plugman, right?

tardy delta
#

a folder where to put in plugins, a reload will unload the current version of the plugin and start the one in the update folder

eternal oxide
#

Olivo asked if you did a full restart, but it didn;t include replacing teh jar live

worthy yarrow
torn shuttle
#

I do

fluid cypress
#

bc im dumb

eternal oxide
#

not good

fluid cypress
#

i would assume the jar would be just copied entirely to memory at server start

worthy yarrow
fluid cypress
eternal oxide
#

copy your jar to a folder called update

#

teh server will copy from there to teh plugins folder at startup

fluid cypress
#

great, didnt know that

tardy delta
#

it also works for reloads no?

eternal oxide
#

it shoudl but who knows with reload

fringe yew
#

i have multiple "items" (that are all structure blocks), how do I give each one a different texture?

chrome beacon
#

are they blocks or actually items

fringe yew
#

item since you can't place structure blocks in survival

chrome beacon
#

You could probably use the custom model data tag then

fringe yew
#

how would i do that?

chrome beacon
#

setCustomModelData

#

as for the resourcepack it depends so check the mcwiki

fringe yew
#

alr

#

ty

#

also

#

how would I around letting players apply enchant books (i.e. efficiency) to the item (which is a structure block) via an anvil?

#

or is that even possible?

chrome beacon
#

you can probably use the anvil event

fringe yew
#

any docs?

chrome beacon
fringe yew
#

how would I use that to modify the behaviour then?

floral field
#

is it possible to replace a chat messaage with a base component in spigot using eaither protocol lib or adventure api??

chrome beacon
#

yeah

#

you can replace messages

chrome beacon
#

I believe

gaunt moss
#

Hi, does anyone know how to block experimental releases on Renovate in PR?

granite cloud
#

Cannot get ID for packet class net.md_5.bungee.protocol.packet.LoginSuccess how to fix this error

late sonnet
granite cloud
#

how to disable auto merge ?

short drift
#

I've been trying to modify a vanilla Minecraft shader in a resource pack to detect when the first pixel is pure red -> do stuff. But I can't seem to be able to get it working.
I've tried that the shader does work by coloring all objects indiscriminately red from the fragment shader.
But when I try to be more picky about which objects I colorred, that's where it fails.

late sonnet
gaunt moss
granite cloud
#

[16:18:25 ERROR]: Could not pass event BlockFromToEvent to WorldGuard v7.0.10+d9424b1 how to fix this

tardy delta
#

?paste whole error

undone axleBOT
tardy delta
#

also seems to be a wrldguard issue

late sonnet
# gaunt moss I already searched but I can't find it

hmm if you define the packages rules you can check this https://docs.renovatebot.com/configuration-options/#matchupdatetypes
i found this thread in github maybe can help you.
https://github.com/renovatebot/renovate/discussions/13652

GitHub

I have the following scenario: The project has two branches, one is called develop where actual code changes happen. I want to have all dependencies updated there. Another branch, stable, has the l...

granite cloud
#

it is spamming

#

in my console

granite cloud
short drift
late sonnet
granite cloud
#

paper

late sonnet
tardy delta
#

looks like version mismatch issue

granite cloud
#

whole plugins en aLL

late sonnet
quaint mantle
#

what does MSPT stand for ?

granite cloud
#

server works properly but spam in console only

tall dragon
late sonnet
granite cloud
granite cloud
tardy delta
#

oh god

late sonnet
# granite cloud 1.20.4

you need downgrade the plugin then.. the changelog show the last version only support 1.20.5 and 1.20.6
or upgrade your server to 1.20.6

granite cloud
#

oh but it is not any problem there so is it ok spam in console only ?

late sonnet
granite cloud
#

if i change server jar i have to reset my world locations en all ?

late sonnet
granite cloud
#

ohk i am downloading paper 1.20.5

blazing ocean
#

but there's also barely any places that know about shaders

#

?whereami

short drift
late sonnet
blazing ocean
short drift
#

Thanks.

granite cloud
late sonnet
short drift
#

Plugins are pretty broken on 1.20.6. Stick to 1.20.4 if you can.

granite cloud
granite cloud
short drift
late sonnet
granite cloud
#

Cannot get ID for packet class net.md_5.bungee.protocol.packet.LoginSuccess how to fix this error what will be solution here ?

#

when play try to join this error comes

worldly ingot
#

WorldEdit always needs updates between versions

#

So that's pretty unsurprising

alpine urchin
#

howcome @worldly ingot

worldly ingot
#

I dunno. Do I look like a W/E maintainer? KEKW

visual tide
#

Smells like NMS 🧐

slender elbow
#

I mean yeah, they avoid the api abstractions at all costs lol

wise mesa
#

is there an easy way to get a plugin object if I have the name of its jar file

granite cloud
#

how to fix whenever i type something in text like hi it shows hihi means double

icy beacon
#

the name of the jar file itself does not necessarily match the plugin name

wise mesa
#

makes sense

#

appreciate it

tardy delta
#

sounds like an xy problem

wise mesa
#

i have a plugin that I use for development that updates plugins

wet breach
#

why do you need a plugin to update plugins

alpine urchin
#

so it automates

#

the updating

wraith delta
# alpine urchin so it automates

That won’t work well. There are a lot of plugins that update removing support for previous server versions, in the future you’ll gradually have issues. As well as when a plugin dev makes big changes and you wonder why this and that is happening

#

Keeping up to date relies on you to be there and test things

alpine urchin
#

I'm aware.

#

I just answered his question.

wraith delta
#

Oh ok I didn’t read past that sorry.

wet breach
analog mantle
#

How can I send a commandsender a formatted message with clickevents n such?

#

I have a BaseComponent with the text I wanna send

alpine urchin
#

But it has the possibility of coming with convenience if you truly trust the plugins you use.

wet breach
#

it is not convenient

#

it requires starting the server to simply update

#

and then restart

#

when you could just update the plugins before the server even starts

analog mantle
blazing ocean
alpine urchin
wet breach
#

no

analog mantle
wet breach
#

still requires a restart

alpine urchin
#

Ok. Idc.

blazing ocean
wet breach
#

of course you don't

alpine urchin
#

Go tell him, it's not my server.

wet breach
#

I am just pointing out it is inferior

alpine urchin
#

I never denied.

#

I just said there is a possibility of it being convenient in some cases.

wet breach
#

ok, something inferior can't be convenient

#

and I already pointed out the one scenario where it would work

wise mesa
#

im aware of the problems

#

it only updates my plugin

#

for faster development

#

its on a remote server

#

it currently restarts the server to update

analog mantle
wise mesa
#

im testing to see if reloading the plugin is a viable option

eternal night
#

how do you have a "paper" TextComponent

wet breach
#

if you want it more faster

wise mesa
#

we had this exact discussion about a year ago

#

my current setup is

#

i commit change

#

jenkins server builds plugin

#

the updater plugin auto downloads any changed plugins from jenkins on restart

wet breach
#

jenkins could just upload wherever you want it to go

wise mesa
#

I'm happy with my current setup

#

however the dev server has a large number of plugins and takes a significant amount of time to start up

#

so I'm trying to see if reloading the plugin without restarting the server is a viable option

wet breach
#

right....an yet you want faster but don't take the approach that would be faster

wise mesa
#

especially when im debugging stuff and am only making small changes like adding a few debug messages

wet breach
#

seems about right

wise mesa
#

???

eternal night
#

reloading is generally not that much of a vibe

wise mesa
#

im aware of that

#

however since its only my plugin

eternal night
#

if you are live coding, run it using jetbrains runtime and hot reload

wise mesa
#

i figured i could deal with the drawbacks

eternal night
#

¯_(ツ)_/¯

wise mesa
#

i do that when i run locally

#

but i've been running into issues remote debugging

#

it only lets me hotswap once

#

and then spams the console with errors

#

and since there's multiple people developing at the same time its not super feasible

#

this is the best solution we've found for the team since we're all working on different parts of the plugin at once

#

you just commit your changes and then run /stop to see them

#

im just testing to see if this might be an improvement to my development time

wise mesa
eternal night
#

I mean, you can try ™️ Not that spigot has the ability to just reload a single thing

wise mesa
#

its downloading from itself, the time difference would be negligible

tardy delta
#

whats this even about

#

who runs a ton of plugins on a dev server

wise mesa
#

many dependencies

#

we have a weird setup

#

i wouldn't say its a ton of plugins but the ones we have take a while to start up

#

like libsdisguises and mythicmobs

wise mesa
#

can you not pluginManager.disablePlugin(plugin)

#

and then load the plugin?

tardy delta
#

thats what the update folder is for

eternal night
#

Yea but you'd need a plugin for that

wise mesa
#

right

#

my updating plugin

eternal night
#

idk what plugman all does

#

if there is more

wise mesa
#

that updates stuff

eternal night
#

¯_(ツ)_/¯

wise mesa
#

would do that

tardy delta
#

put your new plugin in plugins/update, reload server and it will swap the jars

wise mesa
#

but i don't want to reload every plugin

tardy delta
#

completely disabling old one

#

uhhhh

wise mesa
#

because of the drawbacks

#

i just want to reload my plugin

#

i feel like this isn't that crazy idk

#

anyways back to what I was doing

#

i am going to read the jar file to see what the plugin name is so i can get the old plugin instance from the plugin manager

wet breach
#

you can even at the same time have that ci invoke a script to restart your server as well

#

so in one build action, everything is done for you

wise mesa
#

so

#

I would prefer for that to not happen

#

because sometimes people are in the middle of things and don't want the server to be updated/restarted immediately

#

im okay with the current approach

#

also ive given up on the reloading nonsense just gonna stick to the current setup of restarting the server

proud badge
#

Is there no NMS for 1.12.2?

eternal oxide
#

Not if you didn't build it

proud badge
#

nvm I got it working

#

okay epic I got it working

storm crystal
#

whenever I restart my server I get this issue

#

I tried looking for a fix but all I found was that its something related to maven dependencies

#

?paste

undone axleBOT
storm crystal
ivory sleet
#

looks like you're not shading jackson

storm crystal
#

that's my maven config

ivory sleet
#

you said restart, does that mean on initial start it works just fine?

storm crystal
#

Yes, the only case in which I get this exception is when I restart server while I build a new plugin version

#

it then erases all .json files

#

that I have stored in server directory

#

Im also getting this warning

#

I tried shading jackson but I cant figure it out

eternal oxide
#
  1. Don't use Plugman to reload.
  2. Don't replace the jar with the server running.
storm crystal
#

What's a Plugman?

eternal oxide
#

then your issue is number 2

storm crystal
#

okay I understand

eternal oxide
#

if it only happens on a restart

storm crystal
#

so dont rebuild plugin while server is open

#

rebuilding and then just reloading was very convenient

eternal oxide
#

its not safe. Place new jar in an update folder and then restart

storm crystal
eternal oxide
#

no

storm crystal
#

where should I place update folder?

eternal oxide
#

I believe it goes in teh server root

#

just create one called update

storm crystal
#

and change this path to the update directory?

eternal oxide
#

it could be /plugins/update though

#

yes

storm crystal
#

works

eternal oxide
#
BukkitWiki

This guide explains how to install most basic plugins on your server. You must already have a running CraftBukkit server set up and have knowledge of how to use the Minecraft server console. If you do not have a server set up please go to Setting up a server and follow the instructions there. This guide does not cover setting up an SQL database ...

storm crystal
#

setting up plugins/update solved the issue

#

thanks

kindred sentinel
#

how to make plugins with nms work with other versions?

eternal oxide
#

multi module

kindred sentinel
eternal oxide
#

?nms go there and look at posts. one is about modules

kindred sentinel
#

Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...

eternal oxide
#

yes

kindred sentinel
#

thanks!

analog mantle
#

Why does my text have a click event on all of it when I only specified a click event on a single component?

chrome beacon
#

does that happen to be the parent component

analog mantle
#

no

chrome beacon
#

Show your code

analog mantle
#

!paste

#

!!paste

#

whats the link

#

/paste

#

?paste

undone axleBOT
eternal oxide
#

you were running out of prefixes to try 🙂

analog mantle
wise mesa
#

I'm having a strange issue in intellij idea

#
Could not find artifact org.spigotmc:spigot:jar:remapped-mojang:1.20.4-R0.1-SNAPSHOT in dmulloy2-repo (https://repo.dmulloy2.net/repository/public/)
#

i have run build tools for that version with --remapped

#

idk

#

i checked and its in my local repo

#

idk why it can't find it

#

i see the problem is that the dmulloy2-repo has spigot publicly, for some reason??

eternal oxide
#

it searches repos in the order you define them

#

maven or gradle?

wise mesa
#

maven

#

but this is spigot so I would like it to use the local repo

eternal oxide
#

shoudl be fine then, so long as you did actually build that version

wise mesa
#

i did!!!!!

#

lol

#

its in my local repo

eternal oxide
#

1.20.4 remapped

wise mesa
#

yes

#

but for some reason 1.20.4 appears to be in the dmulloy2-repo

#

like i was just scrolling through the nexus

eternal oxide
#

no, its just looking there for it, and its not found

wise mesa
#

oh okay idk

#

this is what I see

#

¯_(ツ)_/¯

eternal oxide
#

look in your local .m2

wise mesa
#

its in there

eternal oxide
#

screenshot

wise mesa
#

ill just delete the folder and rebuild

#

who knows what happened

eternal oxide
#

there is no remapped jar there

wise mesa
#

????? ur right

#

how did this happen

#

i built with --remapped

#

im just going to rebuild and not use the gui this time

storm crystal
#

How can I manipulate with black heart particles after hitting entity?

sage patio
#

Hey, I've a few async tasks in my plugin and async stuff doesn't show up in profilers, any idea how can I see the usage of those tasks?

wet breach
#

what profiler are you using that can't see a method being invoked?

sage patio
#

I use Spark

wet breach
#

that explains it

quiet ice
#

under spark you'd need to instruct it which thread it needs to profile. that can be a bit difficult to pull off if you aren't manually naming your threads

wise mesa
#

¯_(ツ)_/¯

quiet ice
#

blame async-profiler for how it works, but really that design decision makes sense

sage patio
#

does Timings report show it by default?

#

or it's same as Spark

hard badge
#

I am trying to make a tab in paper spigot but I cant make it so the name in tab for a player is diferent from the display name for a player

#

anyone know how i could make players name different from name in tab

eternal oxide
#

?fork

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.

upper hazel
#

Is it possible to make blocks floating on the surface without lags and friezes?

quiet ice
#

They should be removed in this day and age.

eternal oxide
upper hazel
#

water

quiet ice
#

They may tell you how long your code blocks in a given task, but that knowledge would be useless as you would not know which exact piece of code that is (which spark can tell you with better accuracy)

eternal oxide
#

spawn an item without gravity or use ItemDisplay

storm crystal
#

how to correctly add protocolLib for 1.20.4 server?

sage patio
quiet ice
#

it could? Frankly, it has been a LONG while since I used spark - so I don't know if wildcards are supported or if they even have an intended effect

#

but it never hurts to try

sage patio
#

yea sure

#

tnx

hard badge
#

elgar can you join call

#

please i need help with it

#

it dosent let me send code so i can show you

eternal oxide
#

My mom told me not to speak to strangers, or take candy

#

?paste

undone axleBOT
hard badge
#

ill friend you so we not strangers

young knoll
#

But I like candy

hard badge
#

can somone else join call with me

#

please

#

I am trying to make a tab in paper spigot but I cant make it so the name in tab for a player is diferent from the display name for a player
anyone know how i could make players name different from name in tab

quiet ice
#

for what?

young knoll
#

?whereami

quiet ice
#

and that does not seem like one need to be in VC for that

young knoll
#

Isn’t there setPlayerListName

hard badge
#

i already checked there isnt

#

and i need vc because dont let me send code

quiet ice
#

well paperspigot would be 1.8 minecraft - so chances are the method was not available back then (which would explain why they ask here and not in papercord)

eternal oxide
#

only way would be packets/nms then

#

but this is stil not for paperspigot

turbid flame
#

What might be the cause of player walking super slow?

I made proxy with build in limbo, when i connect player -> proxy -> server everything is just fine, when i connect player -> proxy -> limbo -> server player walk superrr slow. But i can fly normally. On limbo i don't send any other packets then JoinGame packet

quiet ice
#

you can set the walking speed differently from flying speed - but idk how that would be something that randomly happens

turbid flame
#

Version 1.18

turbid flame
#

But i don't know which ones XD

storm crystal
#

I tried filtering damage indicator packets but they dont seem to be filtered

#

is there any other way to remove or reduce number of damage indicator particles from event?

wise mesa
#

has protocolsupport been abandoned?

eternal oxide
#

protocol support?

#

has never been a thing in Spigot

wise mesa
#

omg im silly

#

i meant uh

#

protocollib

#

but i was looking at protocolsupport

#

🤦‍♂️

misty ingot
#

hey um is there an annotation for an optional argument in CommandAPI?

#

nvm

analog mantle
#

How can I reset the clickevent on text?

hollow vessel
#

Hi! I have problem, my player interact event is calling twice, I've already have check ```java
if (event.getHand() != EquipmentSlot.HAND) {
return;
}


but it doesn't change anything, I got registered this event once.
blazing ocean
#

?interact

#

which one was it

#

?hand

#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
worthy yarrow
#

He’s already got a check for the hand

blazing ocean
#

oh im blind

undone axleBOT
hollow vessel
dawn flower
#

how do i get the signature of a message in AsyncPlayerChatEvent

eternal night
#

you don't

dawn flower
#

how do u get it then

eternal night
#

not on spigot at all

dawn flower
#

breh

#

how then

eternal night
#

paper has some API

dawn flower
#

uh no it doesnt?

eternal night
#

if that is an option

eternal oxide
#

lol, he told you lynx

eternal night
#

I guess I was wrong then

hollow vessel
dawn flower
#

?

eternal night
#

paper has API on AsyncChatEvent

dawn flower
#

it doesnt

eternal night
#

AsyncChatEvent

dawn flower
#

oh crap

eternal night
#
@EventHandler
public void on(final AsyncChatEvent event) {
    final SignedMessage.Signature signature = event.signedMessage().signature();
}
#

the paper snippet ^

#

(if you need this for deletion, paper has Player#deleteMessage too)

eternal night
#

whats the issue?

eternal night
#

Hmm, I mean, have ya attached a debugger?

#

Beyond that, make sure you are on a vanilla mc client and on latest

#

the interact events are at the mercy of what the client sends

hollow vessel
dawn flower
#

when did the signature thing get added