#development

1 messages · Page 50 of 1

sonic nebula
#

so if player wasnt teleported it wont execute next code bloock

dark garnet
#

i think u do, at least i had to (i think)

sonic nebula
#

didnt think of fixing it

#

fr?

dark garnet
#

u mean spigot?

sonic nebula
#

when you spectate other player which is 500 blocks away in mc it dont work

#

it does

#

you dont have to do teleport then...

#

because server dont teleport u first and then does the other thing

sonic nebula
dark garnet
#

you'd be surprised lmao

sonic nebula
#

also what r u trying to do?

sonic nebula
dark garnet
#

ok

dark garnet
#

i also didnt add a delay, but i think ive been experiencing issues with it, havent touched it in a while

dark garnet
# sonic nebula also what r u trying to do?

i was trying to apply the shadow plugin with a specific version via my own plugin, but im not gonna do it cause just makes more sense for the user to apply it like any other plugin

sonic nebula
#

apply?

#

its a library

#

or you want to use other plugin via ur plugin?

#

so it will beocme like 1 package

#

becuase if thats the case im sorry to tell you but it just doesnt work like that

#

just add it as dependency and thats it

#

also shadow the lib into the resource

dark garnet
#

but its fine, im not gonna do it...

sonic nebula
#

i dont think i want to help you using other resource va your resource

#

kinda big red flag

#

piracy

dark garnet
#

what... its apache license...

sonic nebula
#

r u a pirate?

#

anyways out.

minor summit
dark garnet
#

im so confused

brisk mango
#

shading a jar into your own jar is definitely not piracy..

dark garnet
brisk mango
#

what are you trying to do?

minor summit
#

you can 100% apply other gradle plugins from your own

sonic nebula
#

not a library

minor summit
#

not spigot plugins

#

gradle plugins

dark garnet
#

and still thats not piracy

minor summit
#

^

sonic nebula
#

using other resource via your own

brisk mango
#

you're not going to shade a gradle plugin, but you can apply a plugin

sonic nebula
#

its piracy tbh

minor summit
#

it's not piracy lmao

dark garnet
#

its just not

brisk mango
#

the unauthorized use or reproduction of another's work.
"software piracy"

#

keyword: unauthorized

sonic nebula
#

ok so ill get an paid plugin and shade it into my plugin like the guy wants so my plugin launches other plugin also

sonic nebula
#

and claim that both of those are my job its piracy sorry to say

minor summit
#

who ever said anything was paid

dark garnet
#

?????????????

minor summit
#

so long as you comply with the license it's fine lmfao

#

you've got to be the lamest troll i've seen this year

sonic nebula
#

srynx its off topic since it i didnt get u correctly

brisk mango
#

@dark garnet what are you trying to do with gradle

#

apply a build script plugin?

minor summit
#

apply shadow plugin to the project from his own gradle plugin

dark garnet
#

^

brisk mango
#

oh right, I can't help too much there

dark garnet
#

yeah its fine im not doing it anyways

brisk mango
#

you might have some luck looking at tasks provided by shadow plugin

dark garnet
#

realized it'd just be too messy in my case

#

i definitely thought this would work but it screamed at me saying it couldnt find the com.github.johnrengelman.shadow plugin, oh well! 🤷‍♂️

minor summit
#

in your plugin you declare it as a regular dependency, and in your apply(Project) method, there's a method in Project you use to apply other plugins

dark garnet
#

yeah i got the actually dependency part down so that i can use the classes and such from it
but the issue is that if i use what i declared in my plugin's dependencies to apply shadow, then it'll be locked to the version i used for my plugin, y'know?

#

like i think i could do apply<ShadowPlugin> or something, but then it'll be locked to using version 6.1.0 (what my plugin has in dependencies)

minor summit
#

then you're adding it as a dependency wrong

dark garnet
#
repositories {
    gradlePluginPortal()
}
dependencies {
    compileOnly("com.github.jengelman.gradle.plugins", "shadow", "6.1.0")
}
brisk mango
pulsar ferry
#

Tip, look for the plugin on the gradle portal, and the "real" artifact details will be in the legacy area for the class path

minor summit
#

it's true

pulsar ferry
#

Then how did you get com.github.jengelman.gradle.plugins? thonk

pulsar ferry
#

Oh outdated I see

dark garnet
#

thats why i have ShadowVersion:

BELOW_7_0_0("com.github.jengelman.gradle.plugins"),
BELOW_7_1_0("gradle.plugin.com.github.jengelman.gradle.plugins"),
BELOW_8_1_0("gradle.plugin.com.github.johnrengelman"),
REST("com.github.johnrengelman");
dark garnet
spiral prairie
#

yeah but do you use multiple gradle versions?

dark garnet
spiral prairie
#

and whats that then?

#

like an intellij plugin or wat

pulsar ferry
#

why? why not keep your projects up to date?

dark garnet
spiral prairie
dark garnet
#

i think theres an open issue on shadow's github page for it

minor summit
#

skill issue

pulsar ferry
#

Is the gradle version compatible with the shadow version?

dark garnet
dusky harness
#

Almost

dark garnet
dusky harness
#

34

#

Close tho

pulsar ferry
#

Yes, I'm asking about the projects where you are having issues, if it's all up to date
I have never encoutered an issue with shadow not working

#

Because I feel like it's easier to solve what ever issue you have than to over engineer multiple version support

minor summit
#

oh dear

dark garnet
#

well i'd want it to support multiple versions, and to not force a particular one on people that may use my plugin

#

i thought that was like a programming guideline or something

pulsar ferry
#

In that case I'd recommend depending on shadow and making people apply it on their own instead

dusky harness
#

I agree

dark garnet
#

yeah thats what im just gonna do

grim oasis
#

how would i be able to grab the version from the pom.xml and use it in a class?

neon bear
#

howdy howdy howdy

#

so if i want to include my plugin.yml and any maven dependencies in my plugin how do i do that

bright pier
bright pier
grim oasis
#

working on mcmmo lol

bright pier
#

Sounds fun haha

grim oasis
#

cleaning up the papi expansion

neon bear
#

with maven-shade-plugin?

bright pier
#

Yeah

neon bear
#

awesome

stuck hearth
#

Oh hi Omega

bright pier
#

Hi

grim oasis
#

in anybody else happened to need to know for the future fingerguns

neon bear
#

i wanna do custom hud with my plugin

#

tellraw with custom textures works but if someone writes in chat its all messed up
actionbar with custom textures works but you can only do one at a time and theres no up or down offset

spiral prairie
#

You can just intercept the chat packets and send them correctly-ish

#

I highly recommend doing actionbar hud

#

And you can move up and down

flint kernel
#

could it be related to the fact the other item would already be dropped

#

maybe when the event is called tho it's not considered as being part of your inventory

frigid copper
#

But the slot is being cleared right? Or am I just dumb

flint kernel
#

try also clearing event.getDrops or whatever it's called

neon bear
brisk mango
#

although if you need line breaks, consider scoreboards or boss bars instead

neon bear
neon bear
#

ironically the correct name shows up in the text chat when it says "boss bar[

]" has been renamed but in the actual thing they show up as boxes

upper jasper
neon bear
#

yeah that sounds like it

dense drift
#

Does anyone know if Server#getTickTimes is all I need to get the MSPT?

[16:21:57 INFO]: Server tick times (avg/min/max) from last 5s, 10s, 1m:
[16:21:57 INFO]: ◴ 5.2/3.6/19.3, 5.0/2.6/19.3, 5.4/2.1/53.3
robust flower
#

Is possible to pass an imported SVG to a inner component in React using some mechanism (I thought in using props)? Because I did an attempt but couldn't figure out what type I was supposed to inform in the prop so it would work, and how to use the passed SVG in the inner component's HTML.

This is the children, a button with text and an image on its left side.

function ActionButton(props: { imageSource: any, btnText: string, isFilledColor: boolean }) {
  return (
    <button className={props.isFilledColor ? "btn-filled" : ""}>
      <div>
        <img src={props.imageSource} alt="Button icon"/>
        <label>{props.btnText}</label>
      </div>
    </button>
  );
}

This is the parent component

import ActionButton from "../../ActionButton/ActionButton.tsx";
import addFileSvg from "../../../assets/svg/add_file_icon.svg"

function MainWindowActions() {
  return (
    <div className="horizontal-div">
      <ActionButton imageSource={addFileSvg} btnText="Add File" isFilledColor={false}/>
      <ActionButton imageSource="../../../assets/svg/add_folder_icon.svg" btnText="Add Folder" isFilledColor={false}/>
      <ActionButton imageSource="../../../assets/svg/undo_icon.svg" btnText="Undo" isFilledColor={false}/>
      <ActionButton imageSource="../../../assets/svg/confirm_rename_icon.svg" btnText="Rename" isFilledColor={true}/>
    </div>
  );
}

I'm branch new to React, I was just trying to figure out how to pass either the SVG path or itself (by importing it first) and somehow informing it to the children component ActionButton so it could get the image dynamically.

dusty frost
#

yeah that should work

#

i would recommend not using the props: in front, just destructuring the props directly

#

some reading 😌

robust flower
#

OBS.: I'm not using Node.js, so I don't have the require thing that I saw some guides in the internet recommending, I'm using Vite to deploy my application, and this code will be transpiled into WebAssembly by Tauri/WRY/Whatever the name of the library that Tauri uses.

robust flower
neon bear
#

i love wasm!

stuck hearth
#

Wasm will replace html as a security layer

rancid bronze
#

Would it be heavy on the server to save a couple hundreds files that contain not too much data each every 5-10 minutes asynchronously?

#

I am thinking not but I want to be sure

tired olive
#

also r u a sunblock dev?

#

if u rly need it, the best way to see is to benchmark it

rancid bronze
tired olive
#

anyway i wouldnt be worried abt perf

#

unless u notice its being slow in prod then maybe id profile it

#

but using a database will solve all ur problems

hazy nimbus
#

Databases are very good at databasing

tired olive
#

real

tired olive
hazy nimbus
#

Even if it were thousands of files every few seconds, it would probably handle it

hazy nimbus
tired olive
#

people underestimate their hardware

hazy nimbus
#

Indeed

tired olive
rancid bronze
tired olive
#

lmao

#

u should quit

hazy nimbus
#

I see

rancid bronze
#

lol what

#

Why would I

hazy nimbus
#

Servers these days don't have any standards smh

tired olive
#

ik the one of the owner guys and hes bad

rancid bronze
#

Which one

tired olive
#

average

hazy nimbus
#

Source: trust me bro

tired olive
#

or smth

stuck hearth
#

I rub sand in my hard drives

hazy nimbus
#

Fr, when a server has multiple owners (especially if more than 2), you know the management will be garbage

rancid bronze
#

How do you think a business works?

hazy nimbus
#

Educate me

tired olive
#

cant be that good of a server

rancid bronze
#

How does owner being a dev influence the quality of a server?

stuck hearth
#

hierarchies aren't mandatory for function.

rancid bronze
#

Just because theres 8 guys named owner doesnt mean anything

rancid bronze
#

Huh?

#

How even

tired olive
rancid bronze
#

Im talking about how it influences scalibility

tired olive
#

because if the owner is doing development it makes it harder for them to also do things that help the server grow

rancid bronze
#

You know that

#

Owner

#

In discord

tired olive
#

yes

#

yes

rancid bronze
#

Doesnt actually reflect ownership or their job

#

Its just a title

river solstice
tired olive
#

🤯

river solstice
#

crazy innit

rancid bronze
#

But you know that just because an owner is a developer it doesnt prevent more devs being hired?

#

And again, owner doesnt mean he actually takes on all roles

tired olive
rancid bronze
#

Huh

#

What are you even on about

tired olive
#

whats the point of an owner title if it has no meaning

rancid bronze
#

It means he gets a share I assume?

tired olive
#

you cant be a developer and get a share?

rancid bronze
#

You can, but you can also be owner and get a share

tired olive
#

so its pointless

rancid bronze
#

Why do you care if a developer gets an owner title

#

Like why do you care if its pointless

#

A good way to be happy is to not let things that dont affect you make you upset. (not meant to be rude genuine advice)

tired olive
#

it means that theyre doing a lot of bike shedding and not a lot of work

rancid bronze
#

What do you mean by bike shedding

tired olive
#

making bike sheds instead of making a nuclear power plant

rancid bronze
#

I dont get still how a role on discord influences the work you do?

river solstice
#

what are you trying to prove

rancid bronze
#

Me or him?

tired olive
#

they shouldnt be spending time sorting out meaningless discord roles

tired olive
tired olive
river solstice
#

why would you be given a role if you don't do <something required for the role>

hazy nimbus
#

This is getting spicy

rancid bronze
#

Ok so thats why they arent busy sorting out roles on discord

#

Because they are busy doing other things

tired olive
#

huh

leaden sinew
#

This is the dumbest argument

tired olive
#

but they made a pointless owner role

tired olive
rancid bronze
#

Uh okay

tired olive
#

lmao

rancid bronze
#

Sorry for defending him?

leaden sinew
tired olive
#

you should be.

leaden sinew
tired olive
#

mb

tired olive
#

server doesnt even have consistent branding

rancid bronze
#

I’m fine where I am

tired olive
#

thats what u think now

rancid bronze
#

Also back to the development question

#

The reason I dont want a database for this is because I am loading in the data entirely whenever I need it

#

And I believe a local json file will yield less of a hassle and good performance if I’m doing only that

leaden sinew
#

What type of data?

rancid bronze
#

Properties of an object

leaden sinew
#

What's the object?

rancid bronze
#

it just a json representation of the object

tired olive
rancid bronze
#

I know

tired olive
#

What's the object?

leaden sinew
#

If it's JSON anyways than you might as well just save it to a file

rancid bronze
#

I mean the data itself can be easily represented in JSON

leaden sinew
#

So your're loading all of the data at once?

rancid bronze
#

Yeah its mapped per uuid

#

So I load in the whole object when I need it for the uuid

leaden sinew
#

I guess if you never really need individual properties than that would be easiest

tired olive
rancid bronze
#

Performance wise a local json file that you load when its needed is maybe even better than multiple sql queries

leaden sinew
#

Yeah it probably is because you don't need to lookup the data by key, though I guess it depends on the database implementation

rancid bronze
#

Though I have a single thing I want to query without needing to load in the whole object

#

Which is whats making me doubt it

#

But I also considered specifically moving that value to an SQL database

leaden sinew
#

How big is the object?

rancid bronze
#

Pretty small, about 10 keys and some of them lists that are not that hig

#

big

leaden sinew
#

You could always just wrap it in another object like

Wrapper {
specificProperty: property
wholeObject: object
}

rancid bronze
#

Right but that would still require me to load in the object no?

leaden sinew
#

Well it would prevent having to parse the whole thing

rancid bronze
#

Yeah but then you might as well have it seperate since you still read the file

#

and at that point why not just load in the whole object

leaden sinew
#

If you're going to put one thing in a database you might as well put the whole thing in it

rancid bronze
#

Exactly

#

The one key is only needed to be loaded in separately when performing queries on offline players

#

Like we dont need the whole object when doing that

#

but i think switching over to SQL will result in worse performance when needing to save and load the whole object which occurs a lot more often

leaden sinew
#

You said you're only saving a few hundred objects at a time though right?

rancid bronze
#

Yup

leaden sinew
#

I can't imagine that having any significant impact on performance

#

You can use batches too

rancid bronze
#

I thought so too

#

I plan on doing a save all every 10 minutes or so

leaden sinew
#

If you really needed to you could split it up and do half of the objects every 5 minutes

#

How often does the data change?

rancid bronze
#

I plan on having a variable that says if the object was modified

#

And then saving the object only if it was modified

leaden sinew
#

Do you think the data is going to be edited often?

rancid bronze
#

So for example for offline operations, i’d load it in and then I’d save every 10 minutes, and if the object is not needed than invalidate it and save if it was modified

rancid bronze
leaden sinew
#

Can you say what the data is / what it's used for?
Like is it for a minigame?

rancid bronze
#

Less so right now

leaden sinew
#

Or something else like quest progress?

rancid bronze
#

But the value that I want to query gets updated every second AT LEAST

#

if the player is online

leaden sinew
#

So every second per player?

leaden sinew
rancid bronze
#

So what I plan on doing right now:
Load in to memory when a player logs on, load in to memory when wanting to modify an offline player, every 10 minutes go over all loaded in stuff, check if player is offline and if yes then invalidate, and then check if it was modified and save

#

I was considering doing a save whenever a player logs off

leaden sinew
#

Will offline data ever be edited?

rancid bronze
#

But

rancid bronze
#

if we want to modify the value for the player we need to load it in

#

Though i’ll probably never have over 1000 objects loaded

#

So i think itll be fine

leaden sinew
#

If it's a value like a number you could just use an SQL query

rancid bronze
#

True but that means going to SQL

leaden sinew
#

It would help if I knew what the object was lol, or the general idea of what it is

rancid bronze
#

@leaden sinew dms

cerulean birch
#

new user of adventure's component system for text here, how do i go about making an item's name and lore not italic by default

tired olive
dusky harness
#

(also in the future I'd recommend posting in the kyori adventure discord server)

neon bear
#

is there a good way to detect left/right click in a plugin

#

and similar keyboard keys n mouse buttons

dense drift
#

Keyboard keys no, sadly we dont have access to those through spigot
For mouse left/right there's PlayerInteractEvent#Action

neon bear
#

so for shift our only option is detect sneak

#

?

dense drift
#

Ig

neon bear
#

is there a way to cancel sneak, so like fire an event when a player sneaks and do .cancel()

dusky harness
neon bear
#

the last time i was working with plugins it was 6 years ago, tnt explosions and cancelling them apologies if im a bit out of date

neon bear
dusky harness
#

and for keyboard keys the most you can do are things like offhand detection and movement

neon bear
#

alr ill experiment

dense drift
dark garnet
stuck hearth
#

Transitive deps prolly, you can mark transitive false when you're depending on things.

west socket
#

Didn’t know that even sent a packet

#

Wait doesn’t the interact event have a RIGHT_CLICK_AIR action

minor summit
minor summit
west socket
#

Ah, requires an item

dark garnet
stuck hearth
#

Does it not compile?

dark garnet
# stuck hearth Does it not compile?

it does, but now it also excludes dependencies from the implemented dependency that r marked as compileOnlyApi, which i dont want, i only want to exclude dependencies marked as implementation

stuck hearth
#

How are you doing it right now...?

#

code?

dark garnet
# stuck hearth How are you doing it right now...?

dependency being implemented:

dependencies {
    compileOnlyApi("org.jetbrains", "annotations", "23.0.0") // i want this
    implementation("org.bstats:bstats-bukkit:3.0.0")// i dont want this
}
```my plugin:
```kts
dependencies {
    implementation("xyz.srnyx:annoying-api:3.0.1")
}
stuck hearth
#

So why can't you mark bstats as not providing transitive deps?

#

Or is that outside of your project?

dark garnet
stuck hearth
#

Oh, so sometimes you would want it. (just not for this plugin)

#

Gotcha

dark garnet
#

nono i would never need it

#

cause its just duplicating it basically

stuck hearth
#

In this plugin, but other plugins would use it

#

right?

dark garnet
#

its putting it in both org.bstats (incorrect) and xyz.srnyx.annoyingapi.libs.bstats (correct)
it should never be put in org.bstats as i can always just access it via xyz.srnyx.annoyingapi.libs.bstats

stuck hearth
#

I think I get what you're getting at, sec

#
implementation("foo") {
  exclude("org.bstats...")
}```
I think that should work
dark garnet
stuck hearth
#

Yeah

dark garnet
#

hmmm thats what i was afraid of

stuck hearth
#

?

dark garnet
#

cause then i either gotta add that to all my plugins
or add it to my gradle plugin, which means if i ever add a new library to my api, i'll have to update the gradle plugin

#

is there a way to do it from the api's side? cause before (when i had a broken publication), it wasnt including the implementation dependencies in the pom, which was perfect, cause then my plugins werent installing them too

stuck hearth
#

Why are you providing bstats at all if you're not planning on using it though?

stuck hearth
#

Do you not manage the api?

dark garnet
dark garnet
stuck hearth
#

Then why are you providing it to plugins?

#

If you're just replacing it anyway

dark garnet
#

wdym?

#

some plugins may have custom charts or such which requires bstats

#

i shouldve said that first FLOOSH

stuck hearth
#

So not all of your plugins replace the api's version of bstats?

dark garnet
dark garnet
stuck hearth
#

Wait, then why are you trying to exclude it then?

dark garnet
stuck hearth
#

So either relocation is messing up, or something is providing bstats transitively right?

#

Is your API the only dependency that provides bstats?

dark garnet
stuck hearth
#

This is making more sense then, sounds like the (I assume shadow) gradle plugin is doing something weird then maybe?
What does your relocation look like?

dark garnet
# stuck hearth This is making more sense then, sounds like the (I assume shadow) gradle plugin ...

its all because of this:

    <dependency>
      <groupId>org.bstats</groupId>
      <artifactId>bstats-bukkit</artifactId>
      <version>3.0.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>de.tr7zw</groupId>
      <artifactId>item-nbt-api</artifactId>
      <version>2.11.3</version>
      <scope>runtime</scope>
      <exclusions>
        <exclusion>
          <artifactId>functional-annotations</artifactId>
          <groupId>de.tr7zw</groupId>
        </exclusion>
      </exclusions>
    </dependency>
```in the pom
dark garnet
#

sry for slow response, playing fortnite 💀

pulsar ferry
#

It doesn't relocate published things, it only relocates things you build with shadow
(haven't fully read the problem btw, just thought i'd mention this)

stuck hearth
#

Oh that's good to know actually, I didn't realize that (never really tried though I don't think)

dark garnet
dark garnet
#

so anyone know? Sadge

pulsar ferry
#

I still don't understand exactly what you want and what the problem is, so it's a bit hard to help ugh

minor summit
#

yeah no clue tbh

dark garnet
#

right now, my plugins will have both org/bstats and xyz/srnyx/annoyingapi/libs/bstats (which have exactly the same classes), but i only want them to have xyz/srnyx/annoyingapi/libs/bstats

pulsar ferry
#

So set the org/bstats as compileOnly on the api

dark garnet
pulsar ferry
#

I'm so confused, if you want it to be on both then set it to api on the api and don't declare it in the plugin

dark garnet
dark garnet
pulsar ferry
#

You'll need to show some build.gradle, because if api has it set as api and plugin is relocating it then the original shouldn't be there

dark garnet
pulsar ferry
#

Then how aare you getting the xyz/srnyx/annoyingapi/libs/bstats?

dark garnet
pulsar ferry
#

So you're publishing a fat jar?

dark garnet
pulsar ferry
#

That's most of your problem, publishing fat jars
But anyways, if that's the case then you shouldn't declare bstats in your plugin, since you'll be getting it from your api
And if you are getting both from the api then you have your publishing configured wrong, which is pretty easy to do because publishing far jars is not a great idea most of the times

dusky harness
#

skinny jars >

dark garnet
neon bear
#

how does one provide particle effects to only one player

#

im guessing protocollib?

pulsar ferry
#

Player#spawnParticle should only show it to the player

neon bear
#

very nice

dark garnet
#

should i just do a skinny jar or whatever and use transitive dependencies? would that accomplish the same thing?

dark garnet
neon bear
#

how to attach data to a player?

#

so that if, for example, an event is triggered, and i do event.getPlayer(), i can find one of my own properties i want to set

dusky harness
#

some things might be difference since thats paper docs

#

but it should mostly be the same

neon bear
#

i originally thought nbt .. shows how old i am

#

thank you

dusky harness
#

🥲 np

dark garnet
dusky harness
#

nope

#

skinny jar >

dark garnet
#

so u do just use transitive?

dusky harness
#

just wanted to point that out

#

before u started using it

dark garnet
dusky harness
#

im getting confused between what transitive is now

#

if i do compileOnly or implementation, is that considered transitive? Since it's still being passed on to the plugin using the library

#

aaaaaaaaaa

#

ok i think they are not transitive

#

there are still reasons to use implementation in a library though without a fat jar

neon bear
#

if i want to trigger an event on player sneak, and then make the player not sneak, how do i do that? i did a cancel on the sneak event and also do set sneaking to false but it still happens

#

i basically want something else to happen instead

#

basically, player hits shift, do something else instead of crouching, wait until user stops holding shift, continue doing whatever else

minor summit
dark garnet
dusky harness
#

is compileOnly transitive?

#

yeah

#

i think

#

it just won't be in the runtime classpath either

#

but it's there so that u can exclude the dependency for ex

#

i think?

#

wooo emily's back

minor summit
#

well no, compile only isn't, doesn't make sense

dusky harness
#

oh

#

lol

#

ok

minor summit
#

yeah I was taking about implementation

dark garnet
#

cause im pretty sure compileOnly isnt added to the classpath

dusky harness
#

ya but its in the pom

#

i think

dark garnet
#

at least not with our setup

dusky harness
#

oh

#

yeah

#

makes sense ig

dark garnet
#

yeah

dusky harness
#

wait but when opening source (like ctrl click) then how does it reference the code or would it just error

dusky harness
#

so it'd be shaded into the result plugin

dusky harness
dark garnet
dusky harness
#

wheres that?

dusky harness
#

oh interesting, i never really paid attention to that file

dark garnet
# dusky harness oh interesting, i never really paid attention to that file

in pom file:

  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
```which i assume is referring to the module file
minor summit
#

compile only is not exposed in neither compile nor runtime classpath of the consumer

dusky harness
#

ig it'd only be useful when looking in the source
artifact.source.pom 🙃 🙃 🥴 🥴

#

do ur dailies everyone!!!

minor summit
#

that's out of the scope of a build tool

dusky harness
#

ik but theres also -sources and -javadoc which the build tool doesn't need either

#

¯_(ツ)_/¯

dark garnet
dusky harness
#

it's basically runtimeOnly in the plugin

minor summit
dusky harness
#

wdym offline linking?

minor summit
#

javadoc generation stuff

dusky harness
#

oh

#

okaaaaaaay

minor summit
#

but the build tool won't download those two without you telling it to

#

intellij (not gradle) does it automatically because it, a dev environment, does benefit from having them

#

you can with gradle add extra metadata to that module file to do what you're suggesting anyway

#

and configure your script as a consumer to read said metadata

fading stag
#

What is the difference between NBT tags and PDC?

dusky harness
# fading stag What is the difference between NBT tags and PDC?

NBT is the raw data (technically a data format) that requires NMS
PDC is an api that allows you to store custom stuff on items, entities, and tilestates using nbt

NBT itself stores lots of things - much more than just PDC, such as player data (ex inventory) and worlds

#

things like lore are also in nbt

mortal scaffold
#

How i can a auto reload my placeholder? My code is:

    @Override
    public String onRequest(OfflinePlayer player, String params) {
        if (params.equalsIgnoreCase("serveronline")) {
            for (Player p : Bukkit.getOnlinePlayers()) {
                if (isVanished(p)) {
                    int i = 0;
                    i += 1;
                    return String.valueOf(Bukkit.getServer().getOnlinePlayers().size() - i);
                } else {
                    return String.valueOf(Bukkit.getServer().getOnlinePlayers().size());
                }
            }
        }
        return null;
    }

i'm need to check if (isVanished(p)) { for example every 3 seconds

sterile hinge
#

doesn't really matter as long as isVanished doesn't do stupid things

#

however the rest of the method looks just wrong

prisma briar
#

So it should be like this:
int i = 0;
for loop…
i++

#

i’m on my phone 🥲

#

But I suggest just use stream

#

stream filter

mortal scaffold
west socket
#

I don't think that method is quite right

#

Also I don't think you determine how often the placeholder refreshes from where the request is handled

#

It needs to be done from wherever the placeholder is actually being displayed

nova minnow
#

Hey, I want to make a command that spawns particle on the border of a chunk that you are in. However I don't know how to work with the chunk coordinates... How can I use them as a block location?

Here's my code for reference:

        Chunk chunk = p.getLocation().getChunk();

        if(sender instanceof Player) {

            int x = chunk.getX() * 16;
            int z = chunk.getZ() * 16;
            
            Location loc = new Location(p.getWorld(), x, p.getLocation().getY(), z);
                        new BukkitRunnable() {
                            @Override
                            public void run() {
                                if(counter <= 0) {
                                    this.cancel();
                                } else

                                    for(int x = 0; x < 17; x ++) {
                                        for(int y = 0; y < 6; y ++) {
                                            for(int z = 0; z < 17; z++) {
                                                loc.add(x, y, z);





                                                p.getWorld().spawnParticle(Particle.COMPOSTER, loc, 1, 0, 0, 0, 0);
                                                p.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, loc, 1, 0, 0, 0, 0);
                                            }
                                        }
                                }




                            }
                        }.runTaskTimer(Hideandseek.getMain(), 0, 5L); ```
#

Okay never mind. Found my mistake. I forgot to subtract the variables x, y, z from the location after the for loop was being triggered

neon bear
#

ive got

public void onPlayerToggleSneak(PlayerToggleSneakEvent event) {
    if (event.isSneaking()) {
        event.setCancelled(true);
        event.getPlayer().setSneaking(false);
    }
}

but no dice

proud pebble
#

i dont believe you can force the player to not sneak

hoary scarab
#

You can just won't display to the player being forced

#

Maybe you can use a packet to cancel sneak now but you weren't able to in the past if I remember correctly.

neon bear
#

also thank you two

river solstice
#

Tho the client will still be sneaking, server would think he is not iirc

neon bear
#

ah alr thank

#

i thought there was a packet you could send to the client to disable sneak on clientside

dire flint
#

how i can "update" text in chat without send it again

spiral prairie
#

i dont think you can

#

maybe there has been a new packet in newer versions idk

dire flint
#

i saw some plugins update text when creating something to show summary what you need to set

spiral prairie
#

yeah the just resend it

#

store everything that was sent and is being sent, don't send it to the player, and once they leave the mode just flush everything stored

dire flint
#

i want if player set spawnpoint message updates with spawnpoint - set

#

so player know what need to set if he forgot

spiral prairie
#

i dont understant

dire flint
#

OP setting up dungeon so i have this to show summary of creation to OP but when he set someting then change "Nenastaveno" to "Nastaveno" but all in 1 message not resending message with changed data
add("");
add("&7-------- &cDungeon &7--------");
add(" &e> &7Name - &a" + args[1]);
add(" &e> &7Min Players - &a" + args[2]);
add(" &e> &7SpawnPoint - &cNenastaveno");
add(" &e> &7Boss - &cNenastaveno");
add(" &e> &7Enemies - &cNenastaveno");
add("&7------------------------");

spiral prairie
#

nope doesnt work

#

you have to send a bunch of empty lines and then resend

dire flint
#

ooh ok

#

thanks

spiral prairie
#

np

dire flint
#

and what is effecient and easy method to update custom inventor

#

y

spiral prairie
#

wdym by custom inventory?

tired olive
dire flint
#

why not?

tired olive
#

Because that creates a subclass of arraylist

#

You should use java.util.Arrays.asList(element1, element2, ... or java.util.List.of(element1, element2, ...)

dire flint
#

public List<String> compatibleVersions = new ArrayList<>(){{
add("1.13");
add("1.14");
add("1.15");
add("1.16");
add("1.17");
add("1.18");
add("1.19");
add("1.20");
add("1.21");
}}; => public List<String> getCompatibleVersions = List.of(
"1.13",
"1.14",
"1.15",
"1.16",
"1.17",
"1.18",
"1.19",
"1.20",
"1.21"
);

#

?

tired olive
#

ye

dire flint
#

and its thing we doing ("standards") or for better performance

tired olive
#

both

#

i'd make the field static and final so its a constant as well

stuck hearth
#

Immutability is based

tired olive
#

real

icy shadow
#

now take that idea and multiply it by 1 million

minor summit
#

@icy shadow what now?

icy shadow
#

now we wait

minor summit
#

oh

#

okay

icy shadow
#

that is your personal problem

minor summit
#

but

icy shadow
#

sorry

#

no buts

idle mountain
river solstice
barren mantle
#

hello guys!
I try to create a hologram with a rotative item below it but i can't make it work like it should..
I mean i created an armorstand with a diamond on his head but the item rotates around armorstand's axis.
How can i make the item to rotate around it's own axis?

stuck hearth
river solstice
#

Just woke up, only read the first part 🥴

storm sail
barren mantle
storm sail
#

cannot really help if you created it without seeing the code 🤷🏻‍♂️

barren mantle
# storm sail can you share the code?

The hologram it'self

public Hologram (String name, Location loc) {
        this.name = name;
        this.loc = loc;
    }

    public ArmorStand createHologram() {
        hologram = (ArmorStand) loc.getWorld().spawnEntity(loc, EntityType.ARMOR_STAND);
        hologram.setGravity(false);
        hologram.setCanPickupItems(false);
        hologram.setCustomName(name);
        hologram.setCustomNameVisible(true);
        hologram.setVisible(false);
        hologram.setPersistent(true);
        hologram.setInvulnerable(true);

        plugin.setMeta(hologram, "hologram.custom", true);
        plugin.setMeta(hologram, "hologram.location", loc.getX() + "|" + loc.getY() + "|" + loc.getZ() + "|" + loc.getWorld());

        return hologram;
    }

    public void removeHologram() {
        hologram.remove();
    }

    public String getHologramName() {
        return hologram.getName();
    }

How i try to create the rotative item (one of my tries at least)

// Create the rotating diamond item below the hologram
Location itemLocation = hologramLocation.clone().subtract(0, 4, 0); // Adjust the offset as needed

FallingBlock fallingBlock = Bukkit.getWorld(holoLocDetails[3]).spawnFallingBlock(itemLocation, Material.DIAMOND_BLOCK.createBlockData());
fallingBlock.setGravity(false);
fallingBlock.setHurtEntities(false);
fallingBlock.setDropItem(false);

// Start the rotation task
int rotationTaskId = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, () -> {
     rotateItem(fallingBlock);
}, 0L, 1L); // 1 tick = 1/20th of a second


private void rotateItem(FallingBlock fallingBlock) {
        Location location = fallingBlock.getLocation();
        float yaw = location.getYaw(); // Customize the rotation speed here
        if (yaw >= 360) {
            yaw = 0;
        }
        location.setYaw(yaw);
    }
barren mantle
#

no

#

java

storm sail
#

there you go

dense drift
storm sail
dense drift
#

Look at how HD does it ig Brosky

barren mantle
#

HD does rotative items too?

#

didnt know that

dense drift
#

Iirc you can add items to holograms, idk if they rotate or not

storm sail
dense drift
#

Though they might be rotated manually

barren mantle
#

this is what i'm trying to do 😄
I created another armorstand below the initial one and i tried to rotate it but the problem is that the item rotate around armorstand's axis instead of it's own axis

storm sail
#

or put in any item name you want

dense drift
#

Great

barren mantle
#

hmm
Ok then, i'll look at HD's api

#

thanks guys!

storm sail
dense drift
#

If you want an api I think there' better plugins

#

DecentHolograms or smth like that

storm sail
#

DecentHolograms

#

yeah

barren mantle
#

alrighty, thanks!

worn jasper
#

think HD and DH drop an item mid air to make that effect.

storm sail
odd heron
barren mantle
#

thanks again for help!

storm sail
odd heron
#

1.19.4

#

Paper version git-Paper-550 (MC: 1.19.4

#

to be exactly

#

2.11.3 Api version

neat pierBOT
#
Placeholderapi - Version List
Spigot:

1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
1.16.5
1.17.1
1.18.2

Version:

v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest
v2.11.1 - Latest

storm sail
odd heron
#

Plugin version also 1.19.4

#
api-version: 1.19
depend: [PlaceholderAPI]

Paper-Plugin.yml

storm sail
odd heron
#

yup

#
public class Joinlistener implements Listener {

    @EventHandler(priority = EventPriority.HIGHEST)
    public void onJoin(PlayerJoinEvent event) {
        String joinText = "%player_name% &ajoined the server! He/she is rank &f%vault_rank%";

        /*
         * We parse the placeholders using "setPlaceholders"
         * This would turn %vault_rank% into the name of the Group, that the
         * joining player has.
         */
        joinText = PlaceholderAPI.setPlaceholders(event.getPlayer(), joinText);

        event.setJoinMessage(joinText);
    }

}
storm sail
#

strange 🤔
well i dont really know why the error is being shown to you, maybe wait for Gaby or someone else to help you out

odd heron
#
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            
            getServer().getPluginManager().registerEvents(new Joinlistener(), this);
        } else {
            getLogger().warning("Could not find PlaceholderAPI! This plugin is required.");
            Bukkit.getPluginManager().disablePlugin(this);
        }
storm sail
#

apologies

odd heron
#

👍

dense drift
odd heron
#

its just plugin.yml but got changed littlebit

#

nvm

#

got changed few weeks ago xd

#

Yupp, that was the problem

dense drift
#

😉

mortal scaffold
# mortal scaffold How i can a auto reload my placeholder? My code is: ```java @Override p...

after ~5 minutes the placeholder doesn't use method if (isVanished(p)) {
here's my code:

    @Override
    public String onRequest(OfflinePlayer player, String params) {
        if (params.equalsIgnoreCase("serveronline")) {
            for (Player p : Bukkit.getOnlinePlayers()) {
                int i = 0;
                if (isVanished(p)) {
                    i += 1;
                    return String.valueOf(Bukkit.getServer().getOnlinePlayers().size() - i);
                } else {
                    return String.valueOf(Bukkit.getServer().getOnlinePlayers().size());
                }
            }
        }
        return null;
    }
dense drift
#

Your code will return after the first player

#

you need to return outside the loop, after you have checked all players

mortal scaffold
sterile hinge
#

no

#

don't return from inside the loop

#

otherwise you won't check all players

dense drift
#

this is what you have already @mortal scaffold

dense drift
#

look at your code and what you sent, it is the same thing

odd heron
#
public String pch(String string, Player player) {

        FileConfiguration autobroadcast = Filemanager.getInstance().getAutobroadcastSettings();
        DecimalFormat df = new DecimalFormat("#,###");


        string = ChatColor.translateAlternateColorCodes('&', string);
        string = string.replace("{username}", player.getName());
        string = string.replace("{online}", df.format(Bukkit.getServer().getOnlinePlayers().size()));



        return string;

    }

How to replace with this {target} from a other command

radiant jolt
#

Hey guys i need help with creating a placeholder, currently i am trying to create a placeholder that will return information about n position as i am trying to create a simple "leaderboard" placeholder to showcase like
%parkour_name_<position>% and %parkour_score_<position>% but on wiki i found only basic placeholder setup how would i assign these custom values if there is a wiki page i missed or any guide i would appreciate
In the meantime i created something like this i don't know yet if it is going to work but this would return bot name and score

            return query.getDataForPosition(position).toString();
        }
#

i defined the position variable at the top of the class and by default i gave it 0 as value

dark garnet
#

anyone know of a website that will present the user with a choice of the mc version to view when going to a javadoc link?
that way instead of putting https://helpch.at/docs/MC_VERSION/org/bukkit/enchantments/Enchantment.html in my docs i could just put https://helpch.at/docs/select/org/bukkit/enchantments/Enchantment.html (example) and then when they go to that link, it'll give them a list of available versions, when they choose, it'll take them to org.bukkit.enchantments.Enchantment

dark garnet
dense drift
#

well, it doesn't work with spigot api, but with your own library if that's what you want

shell moon
#

afaik there isnt a site like that (that already ccontains all versions available of spigot, paper, etc)

dark garnet
dense drift
#

damn

odd heron
#

I made a .yml file & and i want to add more sections to it without deleting the file & breaking other sections, how to do that?

#

or should i have to first get the old sections & replace them with new sections etc

dense drift
#

Andross#5254

dark garnet
#

ye

minor summit
#

although for friend requests the old username should keep working

dense drift
#

that's what I've found on their website shrug

#

but yeah, it works

dark garnet
dense drift
#

yeah I've used inspect kek

#

If anyone use configurate, is intended for Records to not be null? I try to read a Config object from config.yml and when the file is empty, it is not null 😵

dense drift
#

java records

dark garnet
#

oh, yeah not sure, never used records with configurate

#

i do know that an empty file will just return an empty ConfigurationNode, not null

#

configurate creates an empty node then attaches any data it loads to that node and returns it
so if there isnt any data to load, it'll just return an empty node
it'll also return an empty node if the file doesnt exist

dense drift
#

yeah it behaves like that with normal classes, idk why not with records as well

dense drift
#

I meant to say that normal classes are null, but records are not

dark garnet
#

oh, i thought it was never supposed to return null, at least based on the source code

dense drift
#

hmm

#

I might remember wrong then

dark garnet
#

whats the proper use-case for EventPriority.MONITOR? cause im not modifying the event, but i am doing stuff to the player (damaging/killing). does MONITOR have the highest priority?

icy shadow
#

yes

#

as the name suggests it should be for things that dont modify the event

#

player stuff is a little vague but i'd say that counts as modifying

#

it's definitely not monitoring, at least

dark garnet
west socket
#

Isn’t the naming for high/low reversed

dark garnet
west socket
#

That doesn’t make much sense

dark garnet
west socket
#

In my head it makes more sense for it to be reversed

dusky harness
dusky harness
#

So highest priority allows those plugins to change those values last

west socket
#

Yeah that makes sense

#

I still always mess it up though lol

dusky harness
#

🥲

dark garnet
#

not modifying = monitoring

dusky harness
#

Typo

#

Fixed it

#

Oops

dark garnet
#

no... 💀

#

ok there

dark garnet
dusky harness
#

What r u changing about the player?

dark garnet
dusky harness
#

Oh wow I got it correct

#

Lol

#

It was just a random example

#

I can read your mind :))

dark garnet
dusky harness
#

NVM

#

YEA I'M DUMB

#

Hi Srnyx how's it going

#

My battery's on 75 rn

dark garnet
#

bruh i thought the trip was over

dusky harness
#

3 hrs left

#

Well now I'm going somewhere to pick someone up

#

And go back home

#

Lol

#

So this one's not a trip

dark garnet
dusky harness
#

We need my stats cmd back

#

It showed u ur most used emoji

#

But cube removed it in favor of slash commands but forgot to add it back or smth D:

dark garnet
#

L

neat pierBOT
dark garnet
#

seems fine to me

dusky harness
#

Can't add multi-line tho

#

Unfortunately

dark garnet
#

L

dusky harness
#

Srnyx

dark garnet
#

this is #development dkim u r breaking the rules and making me too

dusky harness
#

Omg

minor summit
dense drift
#

Haha

robust crow
dusky harness
#

Who

robust crow
minor summit
#

he LAUGHED at my idea

#

gaby is a TERRIBLE example

robust crow
#

better get to work bribing him then

minor summit
river solstice
#

I'll do it for 1 robux

dense drift
#

🤣

oak vessel
#

If I have a Block block = event.getBlock().

  1. If it's a blockbreakevent, would block.getMaterial() == Material.AIR
  2. If the block was later change to a different block, would the material change?
spiral prairie
#

Why doesn't everybody have access to PR?

river solstice
#

PR?

dense drift
#

Because

oak vessel
#

Poorness

#

Not everyone is rich 🤣

dusky harness
spiral prairie
#

That's the most stupid reason

pulsar ferry
#

That is not the reason lol

dusky harness
#

Idk then

#

What's the reason?

spiral prairie
#

Yeah

dusky harness
#

I remember someone telling me for papi3

#

Smth related to that

spiral prairie
#

I believe people here are smarter than that

dusky harness
#

Idk if that's the reason now but

pulsar ferry
#

Because Barry is not open sourced

dusky harness
#

I remember someone telling me thay

#

OH

spiral prairie
#

Level system?

dusky harness
#

I was thinking deluxe menus from a previous message

#

Ok

hushed badge
#

theres only like 3 people with access 🙃

dusky harness
#

Cube, piggy, gabe
That's my guess

#

:)))

hazy nimbus
dusky harness
#

Indeed

timid kindle
#

Is there a way to simulate a player placing a block so all of the blockdata is correct? Stuff like what way the block is facing relative to what surface was clicked/direction the fake player was facing, and getting things like walls to be attached correctly?

river solstice
#

Prob

odd heron
#

Hi!, how to check if a section in a yml dont exits that the plugin will create that section again?

odd heron
#
if (!getMessageSettings().isConfigurationSection("Motd_disabled_log")) {
     // Do this          
            }
``` Something like this
unborn perch
#

does anyone know how i can draw a text with a custom font (.ttf file) in MCP-Reborn? is there any template?

river solstice
#

To draw a text with a custom TrueType font (.ttf file) in MCP-Reborn, you'll need to follow these steps:

Prepare the TrueType font file: Make sure you have the .ttf file of the custom font you want to use. If you don't have one, you can find free fonts online or create your own using font creation tools.

Import the font file: Place the .ttf file in the appropriate directory of your MCP-Reborn project. Usually, fonts are stored in a "fonts" folder within the project's directory structure.

Register the font: Open the code file where you want to use the custom font. At the beginning of your code, you'll need to register the font with MCP-Reborn using the registerFont() function. Provide the path to your font file as the argument.

registerFont("fonts/your_custom_font.ttf")

Replace "fonts/your_custom_font.ttf" with the relative path to your font file from the code file you're editing.

Set the font for drawing: Before drawing the text, you need to set the custom font using the setFont() function. Pass the font name (usually the same as the filename without the extension) and the font size as arguments.

setFont("YourCustomFont", 24)

Replace "YourCustomFont" with the name of your custom font, and 24 with the desired font size.

Draw the text: Use the appropriate drawing function in MCP-Reborn to draw the text on the screen or canvas. For example, if you're using the drawString() function, you would pass the font settings and the text string as arguments.

drawString("Hello, World!", x, y)

Replace "Hello, World!" with your desired text, and x and y with the coordinates where you want to draw the text.

By following these steps, you should be able to draw text with your custom TrueType font in MCP-Reborn. Remember to adjust the specific function names and syntax based on the programming language you're using within MCP-Reborn.

icy shadow
#

what a kind soul

#

typing that all by yourself

river solstice
unborn perch
#
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.geom.Rectangle2D;
import java.io.File;
import java.io.IOException;

public class RenderManager {
    private Graphics2D graphics;
    private Font font;

    public RenderManager(Graphics2D graphics) {
        this.graphics = graphics;
        initializeFont();
    }

    private void initializeFont() {
        try {
            Font customFont = Font.createFont(Font.TRUETYPE_FONT, new File("fonts/FONT.ttf"));
            customFont = customFont.deriveFont(12f); 
            this.font = customFont;
        } catch (FontFormatException | IOException e) {
            e.printStackTrace();
        }
    }

    public void setFont(Font font) {
        this.font = font;
    }

    public void drawString(String text, int x, int y, int color) {
        graphics.setColor(new Color(color));
        graphics.setFont(font);

        FontRenderContext frc = graphics.getFontRenderContext();
        Rectangle2D bounds = font.getStringBounds(text, frc);

        graphics.drawString(text, x, y);
    }
}

i have generated some code. where can i get an instance of Graphics2D?

river solstice
#

In order to get an instance of Graphics2D, you typically obtain it from a java.awt.image.BufferedImage or from a java.awt.Graphics object. Here are two common approaches:

Approach 1: Obtaining Graphics2D from a BufferedImage:

int width = 800;  // Width of the image
int height = 600; // Height of the image

BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = image.createGraphics();

// Now you can use the 'graphics' object to draw on the image
RenderManager renderManager = new RenderManager(graphics);

Approach 2: Obtaining Graphics2D from a Graphics object:

// Assuming you have a component such as a JPanel
Component component = new JPanel();

// Get the Graphics object from the component
Graphics graphics = component.getGraphics();

// Create a Graphics2D object from the Graphics
Graphics2D graphics2D = (Graphics2D) graphics;

// Now you can use the 'graphics2D' object to draw on the component
RenderManager renderManager = new RenderManager(graphics2D);

In both approaches, you can see that an instance of Graphics2D is obtained either from a BufferedImage or a Graphics object. You can then pass this instance of Graphics2D to your RenderManager class to initialize it and perform text rendering using the custom font.

Note: Make sure that you perform the text rendering within the appropriate painting/rendering method of your application, such as paintComponent() for Swing components or paint() for AWT components. This ensures that the rendering is done at the appropriate time during the component's lifecycle.

pulsar ferry
#

Who needs to work on apis or integrations with AI when you can just hire this man to copy pasta some chatgpt

pulsar ferry
#

BarryAI is lagging behind this technology

storm sail
#

😂😂

worn jasper
worn jasper
river solstice
# worn jasper <@168302501181915137>AI help out here then

The error message you provided indicates that there is a ClassNotFoundException for the class net.crashcraft.crashclaim.apache.commons.lang.Validate. This means that the class loader is unable to find the specified class.

Here are a few possible reasons for this issue:

Missing dependency: The class net.crashcraft.crashclaim.apache.commons.lang.Validate is not present in the classpath or is not included as a dependency in your project. Double-check your project's dependencies and make sure you have the necessary libraries available.

Incorrect class name or package: Ensure that the class name and package are specified correctly. It's possible that there might be a typo or a mismatch in the class name or package declaration.

Version mismatch: It's possible that the version of the library you're using is different from the one expected by the code. Check the documentation or the source code to verify the correct version of the library required.

Class relocation: If you're using a build tool or a plugin that performs class relocation or shading, it's possible that the class has been relocated or renamed. In such cases, you'll need to use the relocated or renamed class name instead.

To resolve the issue, you can try the following steps:

Check your project's dependencies and ensure that the required library containing the class net.crashcraft.crashclaim.apache.commons.lang.Validate is included.

Verify the class name and package declaration to ensure they are correct.

If you are using a specific version of the library, make sure it matches the version expected by the code.

If class relocation or shading is being used, check the documentation or the build configuration to determine the correct class name to use.

By resolving these potential issues, you should be able to fix the ClassNotFoundException and successfully use tab completion with ACF.

worn jasper
sterile hinge
#

have you checked your jar if the class exists at the given location?

river solstice
# worn jasper Well, I am pretty sure I implementating and relocating the right thing so what e...

There are a few more possibilities to consider:

Build or compilation issue: Ensure that you have successfully compiled your project after including the required dependencies. Sometimes, if the build process fails or if the dependencies are not properly included during compilation, it can result in class loading issues at runtime. Make sure to clean and rebuild your project to ensure that all the necessary classes are compiled and packaged correctly.

Classpath configuration: Check the classpath configuration of your project or application. It's possible that the classpath is not set up correctly, preventing the class loader from locating the required class. Verify that the necessary dependencies are being included in the classpath and are accessible to the runtime environment.

Conflicting libraries or versions: There might be a conflict between different versions of the same library or a conflicting library with a similar class name. This can cause confusion for the class loader and result in the ClassNotFoundException. Check for any conflicting dependencies and ensure that you are using compatible versions throughout your project.

Runtime environment configuration: If you are running your code in a specific runtime environment (e.g., a server or container), there could be configuration issues related to class loading. Verify the runtime environment's configuration and make sure it is set up correctly to load the necessary classes.

Jar file corruption: It's possible that the jar file containing the required class is corrupted or incomplete. Try re-downloading or reacquiring the jar file from a reliable source and replace the existing one.

Custom class loading: If you have implemented custom class loading mechanisms in your application, there could be an issue with the class loading logic. Review your custom class loading code to ensure that it is correctly locating and loading the required classes.

sterile hinge
#

so much text for literally zero useful information

river solstice
# sterile hinge so much text for literally zero useful information

I apologize if the previous response did not provide the specific solution you were looking for. Resolving class loading issues can be complex and require detailed analysis of your specific code and environment.

To further troubleshoot the issue, here are some additional steps you can take:

Double-check the dependencies: Ensure that you have correctly added the required libraries to your project. Verify the version and compatibility of the library you are using. Check if there are any additional dependencies that need to be included.

Review the package structure: Validate that the package and class name you are referencing in your code match the actual structure of the library you are using. Check for any typos or inconsistencies in the package names.

Check the class relocation configuration: If you are using class relocation or shading, review the configuration to ensure that the necessary classes are properly relocated and accessible at runtime. Verify that the relocated class name matches the one you are referencing in your code.

Examine the runtime environment: If you are running your code in a specific runtime environment or framework, investigate any relevant configuration files or settings. Look for any class loading-related configurations that could impact the availability of the required class.

Enable verbose class loading: Enable verbose class loading output, if available, in your runtime environment. This can provide additional information about which classes are being loaded and help identify any issues with class resolution.

Seek help from the library or framework community: If you are using a specific library or framework like ACF, reach out to their support channels or community forums. They may have encountered similar issues before and can provide guidance specific to their tooling.

#

Without access to your complete codebase and environment, it is challenging to pinpoint the exact cause of the issue. However, by carefully reviewing your code, dependencies, configurations, and seeking assistance from relevant communities, you should be able to identify and resolve the problem you are facing.

pulsar ferry
#

Alright it's getting a bit too spammy, let's get back to normal here

river solstice
worn jasper
#

me need help from real human

minor summit
#

humans went extinct

#

so McDonald's is closed

#

@icy shadow

icy shadow
#

not again

#

a terrifying image

worn jasper
worn jasper
#

relocate("org.apache.commons", "net.crashcraft.crashclaim.apache.commons") this is right, right?

dark garnet
#

how can i convert a YamlConfiguration into a Map<String, Object> that consists only of normal objects (strings, maps, lists, etc...)?

dark garnet
icy shadow
#

me when i answer the question

#

anyway i dont think there's a super easy way of doing what you want

dark garnet
icy shadow
#

you could use ConfigurationSection#getValues(false) and just recursively loop over that

#

little messy though

hoary scarab
#

YamlConfiguration.getConfigurationSection("") is closest to it. The rest you do yourself.

dark garnet
icy shadow
#

c.getConfigurationSection("") == c

dark garnet
hoary scarab
icy shadow
#

even if there was it'd be redundant lol

hoary scarab
dark garnet
#

is it possible to "combine" 2 ConfigurationSections? more specifically, a MemorySection into ConfigurationSection

hazy nimbus
#

I'm starting to smell an xyproblem

icy shadow
icy shadow
icy shadow
#

mutable combination obviously

#

sadly

hazy nimbus
#

at this point, you may consider using configurate

#

It supports exactly what you're seeking

dark garnet
#

yeah i use configurate in my discord bots

icy shadow
hazy nimbus
#

🙃

dark garnet
#

but i can deal with bukkit, just need to make some adjustments

icy shadow
#

not sure we need a whole ass extra library just to load a map

dark garnet
#

yeah its also only for 1 feature FLOOSH

hazy nimbus
#

I was talking about the merging

icy shadow
#

yeah again

#

you can do it with bukkit's library in like 4 lines

dark garnet
#

im just switching my Map<String, Object> stuff to ConfigurationSection, no biggie

hazy nimbus
#

whatever

icy shadow
#

configurate has its uses but i dont think it's super valuable in this case

dark garnet
hoary scarab
#

Didn't simpleyaml add an option to make a map?

icy shadow
#

if you say so

#

idk but bukkit definitely doesnt have that option built-in

loud sorrel
#

does anyone know how i could detect an inventory change and run the code after it happens? i need to detect whether or not a horse has a saddle after the event finishes

icy shadow
#

schedule a task that checks for a saddle 1 tick later?

loud sorrel
#

yeah but i dont like using those kids of timers. theres always so many bugs and loopholes for players to take advantage of. is there any other way

icy shadow
#

i dont think there are many possible loopholes here

#

even with some client side script the server wont acknowledge the change until the next tick, and it'll be after the task runs

#

best alternative is using EventPriority.MONITOR or whatever

#

but i dont think theyre really equivalent

stuck hearth
#

Waiting a tick isn't uncommon in parts of Minecraft.
Also the exploit would need to take place in 1/20th of a second, which is pretty unrealistic

icy shadow
#

I don’t think that’s so unrealistic, you can do that very easily with scripts / mods

#

but I’m fairly sure that scheduled tasks run very early on in the tick before any actual packets get processed

stuck hearth
#

I imagine it's unrealistic for software designed around your software to exploit 1/20th of a second.
It's obviously not literally unrealistic

#

Uncommon might be the better word

icy shadow
#

Oh yeah definitely not trivial to pull off

#

But also it’s how a lot of mc duplication glitches work, and various other exploits - someone with a lot of experience could potentially find a flaw pretty easily

#

Assuming such a flaw existed

stuck hearth
#

I suppose that is true.
Really a matter of weighing the potential for exploit vs how much you care/want to spend time "fixing"
I think this edges the same line that premature optimization hits

leaden sinew
loud sorrel
#

either inventoryinteract or inventoryclick, i dont remember and im not home. its to detect when a horse is given a saddle

#

@leaden sinew

leaden sinew
#

You can check if a player clicks the slot with a saddle, or if they shift click and the saddle slot is empty

proud pebble
#

also use eventpriority either highest or monitor

signal grove
#

you don’t need a timer if that’s your purpose, regular inv events should do

dark garnet
#

chatgpt is the most useless thing ever
i want a glob that will catch 1 but not 2 or 3

  1. api/build/libs/AnnoyingAPI-3.0.1.jar
  2. api/build/libs/AnnoyingAPI-3.0.1-javadoc.jar
  3. api/build/libs/AnnoyingAPI-3.0.1-sources.jar
    so i just want the normal jar, how
#

chatgpt keeps suggesting api/build/libs/AnnoyingAPI-*.jar like the idiot it is and its explanation is the stupidest thing ever ("2 & 3 wont be detected cause they have additional suffixes" like what????)

dense drift
#

maybe AnnoyingAPI-*.*.*.jar ?

minor summit
#

i'd go for AnnoyingAPI-[^-]*?\.jar

dark garnet
dense drift
#

Ah true

minor summit
#

oh glob, not regex

#

derp

dark garnet
#

yeah i wish it was regex

#

api/build/libs/*-@(sources|javadoc).jar does the opposite btw (catches -javadoc and -sources but not normal)

#

i think api/build/libs/!(*-@(sources|javadoc)).jar should be working but it just dont

dense drift
#

AnnoyingAPI-[0-9].[0-9].[0-9].jar

dark garnet
#

but what happens if i release 3.10.2 or something 💀

dense drift
#

Welp

minor summit
#

api/build/libs/AnnoyingAPI-*[!-a-z].jar seems to work

dark garnet
#

glob is so weird

minor summit
#

i'll give you my paypal later

dark garnet
#

uhm heh yeah... sure... totally...

minor summit
#

honestly i have no idea what that abomination is

#

uh

#

it'll probably break if you look at it funny

dense drift
#

It feels like a cheap regex implementation 🤣

dark garnet
#

yeah still have no idea how this doesnt work lol: api/build/libs/AnnoyingAPI-*!(-javadoc|-sources).jar

#

by definition that should work

#

!(ab|cd|ef) matches anything that does not directly match any of the patterns in the parentheses.

dense drift
#

My guess is you need to add it in between ${{ }}

dark garnet
#

ok trying that, if that doesnt work, ill try environment variables

#

ill try https://github.com/srnyx/annoying-api/releases/tag/${{ github.event.release.tag.name }}

dense drift
dark garnet
#

aka just https://github.com/srnyx/annoying-api/releases/tag/

#

which one do u think i should be using?

#

o there is github.event.release.tagName

dark garnet
dense drift
#

release.html_url gives you that

dark garnet
#

oh

dense drift
#

No, thats where the event page redirects you to see the structure of the release object

dark garnet
#

i see

dark garnet
dense drift
#

Great

sonic nebula
#

its justt me or PlayerInteractEvent executes only once 4 ticks?

#

and not every tick?

hoary scarab
vagrant yoke
#

Hey everyone, is there a way to remove enchantment glint whilst maintaining the enchantment effects and lore?

vagrant yoke
#

how can I do it with the resourcepack

#

not by removing the texture completly, I want it to glow normally, just not on some items

hoary scarab
#

I'm not sure you can do it any other way

sonic nebula
#

u can

#

by writing custom damage system according to itemlore

#

actually completely sperate system from mc

#

includng armor

#

and then use glow when ever u want

#

think out of box

sonic nebula
#

ill probably write a custom event that fires on packet player sent

hoary scarab
#

Look how crackshot checks for holding interact

sonic nebula
#

i did

#

it does nothng

#

fr

#

just interactEvent

hoary scarab
#

Not sure then lol

sonic nebula
#

now i did same

#

but shit didnt work

#

so i debug and it works only every 4 ticks

#

crackshot code is so poor and ew

hoary scarab
#

Try other plugins then?

sonic nebula
#

nah not gonnna decompile others

#

not into decompiling

#

from some reason it works

#

maybe because it upgrades the itetmstack in player hand

#

i do not upgrade the itemstack

hoary scarab
#

Try it

sonic nebula
#

nah i dontt upgrade itemstack

#

itt players annoying animation.

#

...

worn jasper
#

what does <T> mean again?

tired olive
hoary scarab
worn jasper
#

oki thx

sterile hinge
#

Its meaning depends on its use case

worn jasper
#

bruh

#

Uhm another question, I suppose I am unable to "regenerate" a record from a method inside itself lol

sterile hinge
#

What do you mean?

icy shadow
#

return new TheRecord(this.x, this.y, newZ)

worn jasper
#

ah ignore, already know what to do

#

btw in a library, for error handling, is System.err good?

icy shadow
#

stdout / stderr directly are generally not a good idea

#

actual loggers >

#

particularly in libraries

worn jasper
#

any recomendations?

icy shadow
#

slf4j & logback is the de-facto standard afaik

#

or even the java logging library if you dont want any more deps

worn jasper
#

hmm oki, ty

#

also do records allow default values?

#

cant recall

icy shadow
#

define "allow"

#

theres no special syntax for them

#

but you can overload constructors soooo

worn jasper
#

whats overloading a constructor?

icy shadow
#

🤔

worn jasper
#

not familiar with these terms