#help-development

1 messages ยท Page 968 of 1

shadow night
#

Damn bro

hushed relic
#

how do u make it so that if a person is on a specific team, the advancements they made do not show up in chat but show in chat for everyone else on that team

lament tree
#

why isnt mongo working if I put it as a dependency in my pom

#

wtf

tepid turret
lament tree
#

I did

tepid turret
#

weird

lament tree
#

and reloaded my idea

#

version is correct to

tepid turret
#

ss?

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

lament tree
#

dang I just got mogged

tranquil glen
#

i mean, he did say what isnt working and what he expects it to do

tender shard
#

where? all I see is "why isnt mongo working"

tranquil glen
#

you forgot the part after that

twin venture
#

are you talking about me xD?

tranquil glen
#

no

lament tree
#

WTF is going on

tranquil glen
#

idk

twin venture
#

i still have the same problem tho xD

tender shard
#

what's the error message

lament tree
#

hold on

twin venture
#

for me it does not load the StatsUser to the SkyUser
so after i load the SkyUser , i set statsUser after that ๐Ÿ™‚
but for some reason it keep create new ones , and never the one i created when player joined

#

why it say no doc found :-: weird ha?

lament tree
#

Oh fixed

tepid turret
#

anyway to remove an entity without having it drop all of its stuff (Boat chest dropping everything inside it)

tall dragon
tepid turret
#

i don't want it to drop everything

tall dragon
#

then just clear the items first

cedar current
#

anybody got an idea now? short tl;dr: sending chunk data packets with water blocks, yet they behave like air (i can fall through them)

tranquil glen
# twin venture

im not sure how mongodb works, but here's a checklist you could run through?

  • Make sure your database connection is properly established and you're connecting to the right one
  • Double check your data retrieval logic. Is usersCollection.find() properly querying the database and returning the document?
  • Make sure the document you're trying to retrieve actually exists, otherwise it will return null and say no doc found
  • Make sure the UUID key is properly formatted to match the database
    *Make sure the documents are inserted properly, and aren't being removed unexpectedly
tepid turret
# twin venture

I just suspect that when the user leaves it saves the data but isn't actually writing to the file

#

like in sql terms

#

U made the prepared statement

#

but never executed it

tranquil glen
#

yeah

#

Cause then it will stay null

tepid turret
#

yea and while the player is on it wont be null during that time

#

because of how saving works with memory

tranquil glen
#

Maybe test to see if the document exists while the player is online

#

And if it does, then that's your problem

tepid turret
tranquil glen
#

Wdym?

tepid turret
#

I have a chest boat right?

tranquil glen
#

Ohhhh

tepid turret
#

and when i do boat.remove()

#

its drops all of its shiz everywhere

twin venture
tepid turret
tranquil glen
tepid turret
#

Have you asked here?

tranquil glen
#

You could loop through it's contents and remove each one

twin venture
#

this is how i have it :

#

yes and no one even answered

#

anything .

tepid turret
tranquil glen
#

Yeah it does seem kinda messy

#

I'm not sure how you'd do it otherwise though

tepid turret
#
ChestBoat chestBoat = (ChestBoat) boat;
for (ItemStack x : chestBoat.getInventory()) {
}
#

i forgor how to clear inventory (its like 3am

#

wait i forgot discord tells me the time

#

its 3:34 am

tranquil glen
#

.getContents()

#

or like

#

you could just set that itemstack to null or something

#

for each iteration

tepid turret
#
ChestBoat chestBoat = (ChestBoat) boat;
for (ItemStack x : chestBoat.getInventory().getContents()) {
     x.setAmount(0);
}
#

would that work?

tranquil glen
#

test it out

tepid turret
#

๐Ÿ‘ will do

#

if i had a penny every time i restarted my test server.

tall dragon
#

or you know...

tepid turret
#

i'd have a bajillion dolars

tranquil glen
#

actually

#

wait

tall dragon
#

geInventory().clear()...

tranquil glen
#

yeah

tepid turret
#

fuck

tranquil glen
#

i just remembered LMAO

#

i was gonna say that

#

avoids the for loop entirely

#

chestBoat.getInventory().clear();

tepid turret
#

I thought there would've been a cleaner way of doing it

tranquil glen
#

yeah, where you wouldn't have to manually do it

tepid turret
#

sad java doesn't allow for skipping failed lines

#

(i know abt try and catch)

lost matrix
#

"skipping failed lines"
Hm?

tepid turret
#

well like

#

I know the "boat" variable could be a boat or a chest boat

#

but just let me right

#

boat.getInventory().clear()

#

and if it doesnt have an inventory

#

skip the line

lost matrix
#

That sounds like something from a dynamically typed language

tranquil glen
tepid turret
#

Yea im pretty sure js has it but i dont touch js so idk

lost matrix
#

Not possible for statically typed languages

tepid turret
tranquil glen
#

you could just check if it's null

tall dragon
#

why dont u just check if the entity is an inventoryholder

#

and cast to that if its the case

#

get the inv -> clear

tranquil glen
#

didn't realize that was a class

tall dragon
#

well it is

#

thats where getInventory comes from

tranquil glen
#

makes sense

lost matrix
#

Best you could do in "one line" is

  public void clearBoat(Entity entity) {
    Optional.of(entity)
        .filter(ChestBoat.class::isInstance)
        .map(ChestBoat.class::cast)
        .map(ChestBoat::getInventory)
        .ifPresent(Inventory::clear);
  }

or

  public void clearBoat(Entity entity) {
    if(entity instanceof ChestBoat chestBoat) chestBoat.getInventory().clear(); 
  }
tranquil glen
#

okay

#

If it exists while the player is online, that means you aren't properly saving it when they disconnect

lost matrix
#

What are we trying to do here?

tranquil glen
#

something with mongodb

lost matrix
#

I meant the boat thing

tranquil glen
#

oh

twin venture
tepid turret
tranquil glen
#

he's trying to kill the chest boat without it dropping everything

tepid turret
#

So basically

stiff sonnet
#

does anyone know if there is a way to get the entity which caused the BlockExplodeEvent? E.g. the tnt or creeper

lost matrix
tepid turret
#
Boat System Advanced Cool

Boats can be claimed
Stowed (Stored in mid air, up to 3 per player)
Spawned (From the storage)
Unclaimed
Upgraded
Etc
tranquil glen
#

yeah it does drop its contents

tepid turret
#

wonder if minecraft chests function the same

eternal oxide
tepid turret
#

would be useful if ingame i could write lines of java and have it work

tranquil glen
#

like

#
public void onBlockExplode(BlockExplodeEvent event) {
        // Get the location of the exploded block
        Location explosionLocation = event.getBlock().getLocation();

        // Define the radius to search for entities
        int radius = 10; // Adjust as needed

        // Iterate over nearby entities
        for (Entity entity : explosionLocation.getWorld().getNearbyEntities(explosionLocation, radius, radius, radius)) {
            // Check if the entity is TNT or a Creeper
            if (entity.getType() == EntityType.PRIMED_TNT || entity.getType() == EntityType.CREEPER) {
                // This entity likely caused the explosion
                System.out.println("Explosion caused by: " + entity.getType());
                return; // Stop further processing if source is found
            }
        }
    }```
#

but

#

that doesn't really work if there are multiple creepers

tepid turret
#

anyone wanna be sent a boat?

tranquil glen
#

sure

tepid turret
#

just give me a minute

#

wait

#

whats ur favourite kinda boat

tranquil glen
#

spruce

tepid turret
#

Boat

#

:)

tranquil glen
#

do i just /summon it?

tepid turret
#

uhm

tranquil glen
#

wait

#

no

tepid turret
#

idk if that would work considering its a serialization

tranquil glen
#

Are you Assailent

tepid turret
#

yes

lament tree
#

phytorboats

tranquil glen
#

idk why my name is JellyPark on spigot

tepid turret
stiff sonnet
tranquil glen
#

ohhhh

#

i didnt even realize

tepid turret
#

cmae up with it years ago

tranquil glen
#

yeah mine too i guess

#

my account is from 2015

#

and i logged into it for the first time probably since then today

#

AngryJellyBean has always been my username, ever since club penguin

twin venture
#

/check ? for example?

tepid turret
#

mines from 2020 but its the name of an email made like 2017 or smth

tranquil glen
#

yeah you could do that

#

however you want @twin venture

tepid turret
tranquil glen
#

ikr

#

my username is like 15/16 years old

tepid turret
#

Ministrater came from back when i played pocket edition

#

and i was on a small factions server

#

and i tried to trick the owner into giving me admin

tranquil glen
#

5002 = 2005?

tepid turret
#

saying i was "Ad ministrater"

tranquil glen
#

That's funny

tepid turret
#

which is still true

#

5002 and sick

#

is sick * Holy shit my english is bad now. its 3:52 am

#

ahh fuck i gotta add oraxen and itemsadder support now

#

sham

#

I'm linking all my old projects to this one project so i can steal my code easy

twin venture
#

something like this in mongodb?

tranquil glen
#

Yeah something like that

#

I'm not sure how the syntax is supposed to look

#

but a method to check if it exists

#

And then however you wanna trigger that method

#

maybe with a command

#

Because the error you were getting before seems like it was because the document was null, aka doesnt exist

#

but it works when the player is online

#

so something like /check ?

#

have it print something in chat like "Exists."

#

or "Does not exist" if its null

twin venture
#

๐Ÿ™‚

#

testing time

tranquil glen
#

nice

#

perfect

tall dragon
#

you know you could also just get something like MongoDBCompass

#

so u can actually see whats being saved

#

in ur db

twin venture
#

sql works fine for loading and saving .. only mongodb

#

i tried but didn't know how to see the database

#

data

tall dragon
#

connect to it?

twin venture
#

tried

tall dragon
#

well then ur doin somethn wrong

tranquil glen
#

Did you see the checklist I sent

twin venture
tranquil glen
#
  • Make sure your database connection is properly established and you're connecting to the right one
  • Double check your data retrieval logic. Is usersCollection.find() properly querying the database and returning the document?
  • Make sure the document you're trying to retrieve actually exists, otherwise it will return null and say no doc found
  • Make sure the UUID key is properly formatted to match the database
  • Make sure the documents are inserted properly, and aren't being removed unexpectedly
twin venture
#

game crashed my pc is running potato ๐Ÿ‘๐Ÿป

tranquil glen
#

I have no idea how to work with mongodb, you probably know a lot better than I do

#

But that checklist should help you figure out the problem

tall dragon
#

you sound like chat gpt

#

you chat gpt'd that shit didnt u

twin venture
tranquil glen
#

No

tardy delta
#

ICommand.., really?

twin venture
tall dragon
twin venture
#

didn't waana have more libs for commands

tardy delta
#

im gonna learn you csharp if you keep doing that

twin venture
#

and this is the loading:

tall dragon
#

replaceone?

#

what if it doesnt exist yet

#

if it doesnt exist u gotta "insertOne"

twin venture
#

oh

#

shot

tall dragon
#

is my guess

tranquil glen
#

Yeah that might actually be it

#

I think the whole problem is just how you're saving it

twin venture
#

i think so yes , let me try

#

like this right?

tall dragon
#

i got it like this @twin venture

twin venture
#

alright thanks ๐Ÿ™‚

tranquil glen
#

Thank you Bert

tall dragon
#

no problem chief

tranquil glen
#

Is that short for Robert?

#

Or just bert

#

i mean you dont have to answer

#

that's personal

tall dragon
#

nope my name is just Bert haha

#

eh, i dont mind

tranquil glen
#

Cool name man

tall dragon
#

is it ? xd

tardy delta
#

that would always do two networking operations, would wanna do one

worthy yarrow
tranquil glen
#

Absolutely @tall dragon

tall dragon
worthy yarrow
#

breh whatttt

#

I've been using intelliJ for 4 years to write code and haven't made my environment pretty?

tall dragon
worthy yarrow
#

thats just sad ๐Ÿ˜ฆ

tall dragon
#

;d

worthy yarrow
#

wowwwww

tranquil glen
#

send your background

worthy yarrow
#

Do you think I could nab one from wallpaper engine?

tardy delta
#

who even needs backgrounds on an ide

tall dragon
tardy delta
#

real people use vim

twin venture
#

something like this i suppsoe?

tall dragon
rotund ravine
#

No insertAndReplqce?

twin venture
#

no didn't find it

tall dragon
#

im not aware of it existing

tranquil glen
#

I don't think he even needed the insertOne

#

he has upsert(true)

#

idk man

#

i don't use this

tall dragon
#

he should just connect to his database to view the changes

slender elbow
#

upsert ๐Ÿ™

twin venture
#

yeah i tried its the same problem .. ๐Ÿ˜ฆ

#

i can't find my database there

#

why?

tall dragon
#

lmfao

tranquil glen
#

does it exist?

twin venture
#

no

tall dragon
#

ur db isnt protected

#

look the top one

#

someone is messing with ur data

twin venture
#

really?

tall dragon
#

happened to me too

twin venture
#

how i can protect the server mongodb?

tranquil glen
#

read__me_to_recover_your_data

tall dragon
#

u need to password protect it

twin venture
#

iam using ubuntu 22

tall dragon
#

did u use docker?

twin venture
#

yes

tall dragon
#

well u can use environment variables to setup the first account iirc

#

those are the 2 variables

twin venture
#

what will happen if i open it ? :() ?

#

i mean the table or database there?

tranquil glen
#

It looks like you were hacked?

tall dragon
twin venture
tranquil glen
#

Yeah I hope nothing important was in there

#

Is it important? Or can you start it over?

twin venture
#

should i just format the entire vps ?

tranquil glen
#

If you can start it over, just don't even open it

tall dragon
#

u could

tranquil glen
#

Yeah it's just a file

tall dragon
#

if theres notinh inportant

tranquil glen
#

but

twin venture
#

yeah would doo ๐Ÿ™‚ it will take weeks to get it back working

#

i mean all my plugins are on my disk

#

hopefully i am not hacked too haha

tranquil glen
#

Probably not

tall dragon
#

doubt it

tranquil glen
#

Probably just the database

#

Since it wasn't protected

twin venture
#

i don't think so , someone tried to enter my email details today

tall dragon
#

these people just have automatic scanners searching the interner for unprotected databases

#

like yourself

tranquil glen
#

Yeah

twin venture
#

and it was wasn't the first time ..

#

yeah

tranquil glen
#

Well that doesn't mean you're hacked

#

It might just mean there was a database leak somewhere

#

and they're trying the password

twin venture
#

my ip was probbly on the databases i guess

tranquil glen
#

just make sure you change all your passwords

twin venture
#

i did change it

tranquil glen
#

Then nothing to worry about

twin venture
#

do you know any good free anti virus?

tranquil glen
#

No :(

tall dragon
#

Windows defender

tranquil glen
#

I don't think it's a virus man

#

I think your username/password was in a database leak somewhere

#

and someone tried to use it to log in

tall dragon
twin venture
#

yeah anyway , how i can fix the database bug?

tardy delta
#

atlas without password?

twin venture
tranquil glen
#

ohhh yeah, he probably just got sniped by bots

twin venture
#

this is my second time

tall dragon
tardy delta
#

what are you using for db 'hosting'

tall dragon
#

so its actually password protected

tranquil glen
#

make it a good password too

#

don't do "password" or "admin"

twin venture
#

imagine xD hahah

#

no ofc

tranquil glen
#

they also attempt a few common passwords

slender elbow
#

i mean, not that a database should be exposed to the internet anyway, the port should be closed on the firewall

tranquil glen
#

yeah but for some reason it wasnt

tall dragon
#

yea. that too but oh well

tranquil glen
#

it's a lesson learned hopefully

#

luckily doesn't seem like anything sensitive was on it

worthy yarrow
#

Ah now this doesn't look too bad ๐Ÿ˜„ ty @tall dragon I would have never known

twin venture
tranquil glen
#

@twin venture do it anyways!!

twin venture
tranquil glen
#

you will get hacked again if you dont use a password

tall dragon
#

bruh its eazy

twin venture
#

i only use docker for pterodactyl panel

tall dragon
#

send me ur vps creds il create one for u xD

twin venture
ocean hollow
#

why I have this problem?

eternal night
#

are you shading protocollib or something

ocean hollow
#

that is all about ProtocolLib

ocean hollow
#

?paste

undone axleBOT
ocean hollow
restive mango
#

Does reading entity variables from an asynchronous runnable have any side effects? Like just reading if entity X .isDead()?

#

Like can that in theory slow the main thread

tender shard
#

although normally paper should fail to load your plugin if softdepend would result in cyclic dependencies, can't hurt to check your startup log

ocean hollow
tender shard
#

you must get the manager in onEnable too

#

your plugin instance gets constructed before PLib gets enabled

#

so your getProtocolManager is still null

#

(my guess)

ocean hollow
tender shard
#

show your onEnable method

#

the full method

ocean hollow
distant wave
#

does anyone have the ImIllusion's bounding box class paste

tender shard
#

bounding box class? spigot includes that?

distant wave
#

yeah i know, i just need it for one thing outsideof spigot

tender shard
ocean hollow
#

I looked at the Git for peopleโ€™s problems, I didnโ€™t find anything there, they said the same guesses, but everything is just so good

distant wave
#

do you atleast know what i mean

echo basalt
#

lmao yeah I know

#

it's called Cuboid

distant wave
#

oh

#

thats right

tender shard
#
public class BoundingBox {
    private Point3D minPoint;
    private Point3D maxPoint;

    // Constructor to create a bounding box with specified minimum and maximum points
    public BoundingBox(Point3D minPoint, Point3D maxPoint) {
        this.minPoint = minPoint;
        this.maxPoint = maxPoint;
    }

    // Getters and Setters for minPoint and maxPoint
    public Point3D getMinPoint() {
        return minPoint;
    }

    public void setMinPoint(Point3D minPoint) {
        this.minPoint = minPoint;
    }

    public Point3D getMaxPoint() {
        return maxPoint;
    }

    public void setMaxPoint(Point3D maxPoint) {
        this.maxPoint = maxPoint;
    }

    // Method to check if a point is inside the bounding box
    public boolean contains(Point3D point) {
        return point.getX() >= minPoint.getX() && point.getX() <= maxPoint.getX() &&
               point.getY() >= minPoint.getY() && point.getY() <= maxPoint.getY() &&
               point.getZ() >= minPoint.getZ() && point.getZ() <= maxPoint.getZ();
    }

    // Method to calculate the volume of the bounding box
    public float volume() {
        return (maxPoint.getX() - minPoint.getX()) *
               (maxPoint.getY() - minPoint.getY()) *
               (maxPoint.getZ() - minPoint.getZ());
    }

    @Override
    public String toString() {
        return "BoundingBox{" +
                "minPoint=" + minPoint +
                ", maxPoint=" + maxPoint +
                '}';
    }

    // Static inner class for a 3D point
    public static class Point3D {
        private float x;
        private float y;
        private float z;

        public Point3D(float x, float y, float z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }

        // Getters and setters for x, y, and z
        public float getX() {
            return x;
        }

        public void setX(float x) {
            this.x = x;
        }

        public float getY() {
            return y;
        }

        public void setY(float y) {
            this.y = y;
        }

        public float getZ() {
            return z;
        }

        public void setZ(float z) {
            this.z = z;
        }

        @Override
        public String toString() {
            return "Point3D{" +
                    "x=" + x +
                    ", y=" + y +
                    ", z=" + z +
                    '}';
        }
    }
}

generic chatgpt boundingbox

#

kek

echo basalt
#

wee

distant wave
#

very well

distant wave
#

i actually needed it for the iterator lol, im too lazy to write it myself(its not a plugin sooo)

tender shard
tall dragon
#

hey i dont hate on it

#

it looks kinda cool

tender shard
#

then here's the same in kotlin

data class Point3D(val x: Float, val y: Float, val z: Float)

data class BoundingBox(val minPoint: Point3D, val maxPoint: Point3D) {
    fun contains(point: Point3D): Boolean =
        point.x in minPoint.x..maxPoint.x &&
        point.y in minPoint.y..maxPoint.y &&
        point.z in minPoint.z..maxPoint.z

    fun volume(): Float =
        (maxPoint.x - minPoint.x) * (maxPoint.y - minPoint.y) * (maxPoint.z - minPoint.z)
}

tall dragon
#

๐Ÿฅฒ

young knoll
#

What did the spigot bounding box do to you

tender shard
#

they wanna use it for sth outside of spigot

tepid turret
#

How to get Material from NMS?

#

So like get a material from "minecraft:iron_ingot"

#

I can't use Material#GetMaterial as it only supports the names of spigot materials

#

I would first need to convert the NMS material to a Bukkit Material

#

how?

echo basalt
#

matchMaterial

tepid turret
#

nevermind

#

U meant

#

Material#matchMaterial

#

fuck

slender elbow
#

Registry.MATERIAL.get(NamespacedKey.minecraft("iron_ingot"))

#

or NamespacedKey.fromString, that takes either namespaced already or if it isn't it'll use the minecraft namespace

tepid turret
#

Thank you

young knoll
#

Thereโ€™s also just Registry#match iirc

tender shard
#

For full snbt itโ€˜s ItemFactory#createItemStack or sth

shell robin
#

With the plugin, I placed the block right in front of the chest as a sign, but it does not connect with the chest. How can I combine them?

young knoll
#

BlockData

tender shard
#

WALL_SIGN > blockdata, probably Attachable or Directional or sth

shell robin
#

Okay

#

Thanks

young knoll
#

Itโ€™s directional

#

Itโ€™s also got its own BlockData, WallSign

tender shard
#

Ah didnโ€™t know

ocean hollow
stiff sonnet
#

if I event.getEntity().getPlayer() is that object always instanceof Player? What if the entity is not a player?

#

how would I find that out after I used .getPlayer()?

rotund ravine
#

What does getEntity return

stiff sonnet
#

an entity?

rotund ravine
#

Whatโ€™s the event?

stiff sonnet
#

you're asking smart question

#

there is no event that isn't triggered by a player that has .getPlayer on the entity

rotund ravine
#

Sys

#

I am sorry to say

#

That ur getEntity is returning a player

stiff sonnet
#

what does sys meant ho

stiff sonnet
rotund ravine
#

Itโ€™s ur name

stiff sonnet
#

ah

#

tragic

rotund ravine
#

Player extends OfflinePlayer which has getPlayer

tender shard
rotund ravine
tender shard
#

well what

#

:p

rotund ravine
#

No

tender shard
#

what no

rotund ravine
#

Or u didnโ€™t undersrand what he meant

tender shard
#

I understood. they're confused about why Player has a getPlayer() method, and you correctly answers it's because Player extends OfflinePlayer.

the confusion although probably comes from the fact that getEntity() returns a player objects in some events, because subclasses / extending interfaces are allowed to narrow down the return type

rotund ravine
#

EntityDeathEvent does not return a class that has getPlayer though

#

PlayerDeathEvent does

tender shard
#

that is correct, but if the entity in EntityDeathEvent it is a player, then getEntity() returns a Player - and that again ofc has a getPlayer method

rotund ravine
#

Not unless ya cast it

tender shard
#

it is a Player no matter whether you cast it or not :p

rotund ravine
#

Well, true. But getPlayer is hidden ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

tender shard
#

that ofc is also true kek. I guess we both know how it works haha

rotund ravine
#

Fist fight

#

Ur wrong

tender shard
#

I'm a pacifist bro

rotund ravine
#

I am not

tender shard
#

I'll send frostalf into this fight for me

wet breach
#

not sure if entitydeathevent is even fired for a player since there is a player specific one

rotund ravine
#

It is

wet breach
#

one of the few that does then

rotund ravine
#

PlayerDeath is just a subevent of entity death

rotund ravine
#

Both should be fired

tender shard
rotund ravine
#

?

#

Why are you yelling

tender shard
#

because this is wrong but also true

rotund ravine
#

Bish

tender shard
#

ofc only one event is fired. but if you register a listener for both PlayerDeath and another one for EntityDeath, then sure, both listeners get called

wet breach
tender shard
#

i yelled because I wasn't sure whether to smart-ass or not

#

sorry, I'm bored

#

and general is dead

rotund ravine
#

I am bored too

#

Just sitting next to a sleeping person in a dark room in full ppe

tender shard
#

let's fight DrVoss in general, he's still a child - so we should easily win

rotund ravine
#

Yeah

#

Pretty much what my 8-hour shift is

#

If he wakes up and does smth stupid I am supposed to guide him into doing smth less stupid yaknow

rotund ravine
#

He terminal so he gets it all

tender shard
#

anesthetist coding:

while(true) {
while(patient.isAwake) {
  patient += 0.1mg Propofol
}
}
rotund ravine
#

We used a nice pump to do propofol infusions in one of my clinicals

tender shard
wet breach
#

are they contagious ?

rotund ravine
wet breach
#

ok, so not really contagious

rotund ravine
#

Enough for full ppe

wet breach
#

no not really

rotund ravine
#

But not the full closed off

#

Yes really

#

Mask, gloves and gown

agile hollow
#

how can i do like everyday at x o'clock somethink appen on the server?

agile hollow
tender shard
rotund ravine
#

So

#

Do u reload ur server or restart it a lot?

wet breach
#

but ok

tender shard
# agile hollow in a plugin

so e.g. you wanna do X every day at 3 am - what if the server gets rebooted twice daily - it shall still just happen at 3 am right? what if the server restarts between 2:59 and 3:01 am? shall it then not run, or run at 3:01?

#

typical "cronjob questions"

rotund ravine
wet breach
#

right

rotund ravine
#

We donโ€™t want to pass it on to other patients or other healthcare providers

#

So we use ppe

wet breach
#

unless you are in a negative pressure room that is going to happen regardless

rotund ravine
#

It is mitigated a lot by ppe

tepid turret
#

Entity entity = (Entity but without spawning it?)

agile hollow
tender shard
young knoll
#

I mean

#

I would just store a timestamp and check against it every once in a while, once itโ€™s in the past do the thing and make a new timestamp

#

That way if the server is off itโ€™ll see the timestamp is in the past as soon as it comes back on

young knoll
#

Yeah I guess that will technically cause issues

tender shard
#

(granted, probably doesn't matter - although they specifically mentioned 3am which is exactly the time where the clocks change)

young knoll
#

Just host the server in a place that doesnโ€™t do daylight savings

#

Kek

tender shard
#

yeah or use 3:01 am instead

agile hollow
tender shard
agile hollow
#

i care if it goes the Nearest to the 24h

#

if its 24h and 1m or 24h and 5m it's not that matter

#

and that is possibile with like smth every 7 days?

#

last question and i will go to bed

#

best way to do the timestamp and best way for check it periodocaly

rotund ravine
#

Instant.now()

#

Duration.between ๐Ÿ‘Œ๐Ÿป

agile hollow
#

and how i can do the cycle for do the check between this 2 var every 5 min ? or 1 min

young knoll
#

?scheduling

undone axleBOT
agile hollow
#

thanks a lot y all have a good night see you tmrw

agile hollow
# young knoll ?scheduling

sorry for bothering you another time but what's the better for my situation ? (changing everyday all the values of a table in a database)

twilit wharf
#

This packet is not going through (or is not showing up clientside) and I dont know why. I am using 1.20.4 remapped, the entity is an armorstand btw:

        ClientboundAddEntityPacket packet = new ClientboundAddEntityPacket(((CraftEntity) entity).getHandle());
        ((CraftPlayer) recipient).getHandle().connection.send(packet); // doesnt work
        System.out.println("sending packet");
        ((CraftPlayer) recipient).getHandle().connection.send(new ClientboundSystemChatPacket(TextComponent.fromLegacyText("sent you the packet"), true)); // works
#

This worked like last week, but now it doesnt, and yes, the location is set

#

Am I being stupid or is it something else?

warm mica
#

What is "this packet", you are showing two

echo basalt
#

Using nms to send messages seems.. pretty dumb

river oracle
# echo basalt Using nms to send messages seems.. pretty dumb

Seems is not correct here I think you mean.

Sending messages with nms is straight up idiotic behavior and you should check with your primary care and get tested for lead poisoning or other possible conditions that could result I the degradation of the brain

echo basalt
#

exactly

twilit wharf
#

I dont normally do that lmao

twilit wharf
warm mica
twilit wharf
#

Ok so, heres the issue. I am trying to have clientside entities, and currently the entity doesnt exist serverside. I am using NMS to create and send it through packets they way I want it to be shown. Currently, I sent the add entity, then the set passenger, and this worked, but for some reason stopped. When I restart the server (since i made the entity, but the packets were never sent intially) the entity shows up, however it is not because of my packets its just that now the server registeres its existence. Does that make sense?

young knoll
#

Not really

#

Packet entities should work fine as long as you send both addEntity packets before the setPassengers one

#

And of course you actually add the entity as a passenger

rotund ravine
#

Might need to delay ur setPassenger a bit btw

#

Delaying always fixes all leโ€™ problems

young knoll
#

Iirc Iโ€™ve done it in the same tick

#

In a bundle packet tho but I doubt that matters

warm mica
grave vale
topaz panther
#

Hey! I'm trying to get into Skript Reflect and I just wanna know from plugin devs if anyone here has used Reflect and, if so, how similar is it to actual plugin development

#

I know one difference is that Reflect literally just. DOESN'T have class files but that's all I know

rotund ravine
#

Ask for skript on the forums

grave vale
#

^

rotund ravine
#

No one here knows it ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

#

Atleast they havenโ€™t the last 50 times someone asked

grave vale
#

Skript is a hellhole and I never ever even want to try learning it

topaz panther
#

I haven't seen talk of Reflect in here through all my checking of the search tab

#

And I did ask in SkUnity

#

They were not very helpful

drowsy helm
#

no one realyl uses skript here

grave vale
drowsy helm
#

and that method works in regular chat?

topaz panther
#

Okay I went through talk to find ANY mention of Reflect (which is what I was asking about and is inherently different from Skript) and the last mention of it was half a year ago they did seem to know about it and it's apparently VERY different from plugin development, so I guess thanks

grave vale
cursive drift
#

if you havent already

grave vale
#

they left asap after you mentioned learning Java

tender shard
#

I didn't even mention ?learnjava ๐Ÿฅฒ

grave vale
#

using the spigot api technically mentions using java though ๐Ÿค”

#

means* not mentions

tender shard
#

skript is just spigot api with extra steps ๐Ÿ˜ฆ

grave vale
#

you mean, a lot of steps

tender shard
#

yeah like, if spigot api is a fully working escalator, skript is like a ladder where every second step is broken

grave vale
#

I don't get how you make a plugin, based on a somewhat easy to use API, to make another layer of API that is somehow harder to learn than the API it was itself coded with

tender shard
grave vale
#

it's a possibility

tender shard
#

I mean - skript is nice to just send a custom join message or sth - but writing actual PLUGINS in it? that makes little sense

grave vale
#

just like how my very first plugin was only meant to be a way to visit other towns faster on a server but ended up released on spigot with almost 1k downloads

grave vale
tender shard
#

exactly! kek

grave vale
#

much better and atleast you can do other fun stuff with java later down the road

tender shard
#

i learnt java through some stupid school IDE called "hamster simulator" lmao

dense raft
#

hamster ? ๐Ÿ˜น

grave vale
#

I learned java from youtube tutorials and worked my way up through trial and error (and being hated by many because of too many help requests)

tender shard
#

you controlled a hamster through java code

#

to guide it through mazes

dense raft
#

yo that's dope actually

grave vale
tender shard
dense raft
#

besides the user interface which is kinda lame but if you can see through it's really fun lol

dense raft
grave vale
#

anyway, it's 3 am and my insomnia is finally letting me feel tired

tender shard
#

I still can only highly recommend actual books ๐Ÿฅฒ

dense raft
grave vale
#

time to go read a book and sleep, have a great night

tender shard
dense raft
dense raft
tender shard
#

nothing helps you better @ falling asleep than a book about german tax law

grave vale
tender shard
#

if it's about personal income tax, then it scales with your income

grave vale
#

also, hi country neighbor

tender shard
dense raft
tender shard
#

95k per year means you pay 32.24% income tax = 30625โ‚ฌ income tax

#

minus the 1200โ‚ฌ you can automatically tax deduct (from the taxable income, not the tax itself)

dense raft
#

32 might sound bad but doesn't look as bad as it sounds

tender shard
#

and if you're employed, it includes 100% of your health care, pension funds etc

dense raft
#

gotta add in the rest though

tranquil glen
#

your guys's taxes go to things that actually help you anyways

tender shard
#

I pay over 40% taxes and I think I should pay more

dense raft
tranquil glen
#

americans have to pay a shit ton in taxes AND pay out the ass for school and medical stuff

grave vale
#

paying more taxes and getting free health care is better than less taxes but expensive medical bills

dense raft
tender shard
dense raft
tender shard
dense raft
tranquil glen
#

same

tender shard
#

~~ none of anybody's business ~~

dense raft
#

You're doing PRETTY well

tender shard
#

that does include sleepless nights

dense raft
tender shard
#

it includes never being on vacation even though you're "free"

tender shard
dense raft
tranquil glen
#

hopefully includes an early retirement tho

dense raft
tender shard
#

and when I fuck up, people sue me

tranquil glen
#

oh okay, so i'm sure the pay somewhat compensates a little

#

brings it back down to a normal 6 figure

dense raft
#

(over a certain time period)

tender shard
#

many people who do the same job as I do are employed and make about 200k (before taxes)

dense raft
#

got any ideas for an entry level job ?

#

surely isn't as high as 200k

tranquil glen
#

you mentioned that you wish you did a computer science degree
do you have the option of saving some money for a while so you can go back to school?

tender shard
#

for what? law or computer stuff?

dense raft
tender shard
#

which country?

dense raft
#

spain

tender shard
#

then no idea

dense raft
#

๐Ÿ˜ญ

tender shard
#

all I know is that there's many german tax consultants living in spain, who are doing taxes for rich german expats who live in spain (e.g. mallorca) lol

dense raft
#

i'll search it up for myself it's all good

tender shard
#

anyway I'd much rather be an airline pilot (got a PPL-A + IFR license anyway) but then I could never be at home with my boyfriend

#

so I stick with my current stupid job

dense raft
#

that does make you a good living

#

but i could understand why you find it stupid

#

i wouldn't be too happy with lawsuits either

tender shard
compact haven
#

๐Ÿ˜ญ

tender shard
# dense raft i wouldn't be too happy with lawsuits either

I don't really have to worry, there's usually two cases:

  1. I sue the tax authority in someone else's name. I gain / lose nothing from that besides normal fees
  2. Someone sues me. If I lose, my professional liablity insurance would have to pay
#

Oh and ofc #3 which #1 reversed

#

anyway, the lawyer gets money no matter whether the client wins or loses

#

that's why bad lawyers always wear the most expensive suits

#

(they talk any client into starting a lawsuit, no matter whether it'll be successful or not)

dense raft
#

damn

#

well that's an interesting job

tender shard
#

if you really think it's interesting - here's a noob paper I had to write during my study in 2016 or sth #general message

twilit wharf
tender shard
dense raft
compact haven
#

I mean that's not always true right?

#

A lot of lawyers take a cut instead, so they'll only pursue suits they believe will win?

twilit wharf
#

Although I did change one piece, which is that I kept it in the NMS form previously, now I go NMS -> Bukkit Entity -> NMS for things since I am using modules and stuff for version support.

tender shard
compact haven
#

brother

#

I swear yall's words get longer and longer

tender shard
#

nah, we just chain words together

#

e.g. "Law about how lawyers get paid" in german would be "LawersChargingAmountLaw" or sth

compact haven
#

thats cool for it to be regulated, tho kinda fucked y'all are stuck to an hourly

tender shard
#

we're not, usually we're paid for the "Streitwert", e.g. the amount about what the lawsuit is worth

compact haven
#

ah okay

tender shard
#

if someone sues you for 500โ‚ฌ, the streitwert is only 500โ‚ฌ and then my fee would be like 150โ‚ฌ or sth (idk, I dont have the calculator open)

compact haven
#

I see

tender shard
#

but it's up to me to accept this or to say "well but I just don't accept this" - only "law assigned lawyers" would have to accept the case for that amount

#

which happens sometimes, if someone doesnt find a lawyer even when they're required to get one

compact haven
#

mm so court appointed

#

yeah we have that here in the US too

#

just not for civil pretty sure

tender shard
#

and people are only required to get one if the case is about 5000โ‚ฌ or higher, or if they did a "verbrechen" = possible sentence of 1 year or more

#

if it'S a civil case, the state pays me to my normal rate, otherwise if it's a criminal case, I can usually find an excuse not to do it (only happened a few times). Once I had to defend someone who got accused of involuntary manslaughter and I got next to nothing for that

#

because as said, state-appointed lawyer makes next to nothing

#

my field is corporate tax law

#

and how to evade them

#

and my "enemy" is usually the tax authority

compact haven
#

yeah that sounds abt right

#

court appointed attorneys paid nothing and tax attorneys for corporations making bank

tender shard
compact haven
#

right

tender shard
#

and you'll need a very good reason to get out of that, e.g. "I went to school with the defendant" is not reason enough

compact haven
#

do they just choose a name off the bar list?

tender shard
compact haven
#

gotcha

tender shard
#

some go by name, others literally roll a dice

compact haven
#

thats messed up tho

#

imagine you've got a real estate attorney defending someone accused of manslaughter

tender shard
#

like for real, they got a list of 128 approved lawyers in their "bezirk" so they roll three dice and see what the number says

#

128 is an example number ofc

compact haven
#

ya

tender shard
#

i dont know the actual number

#

also sometimes I accept cases for very little money (e.g. 50โ‚ฌ because I have to charge at least STH, for insurance reasons) if I'm sure it's literally no work and it's a guaranteed win, or if it's for friends etc). but in 90% of cases, all I do is to give advice and it won't even end up in court. in thouse cases, I can easily charge 450โ‚ฌ per hour

#

e.g. someone faces having to pay negative tax returns of 300,000โ‚ฌ because of "<insert legal reason>" and then for them, 3000โ‚ฌ for my opinion is nothing for them

compact haven
#

right because court is what will really make hours

tender shard
#

oh actually it's the other way around. preparing for an actual lawsuit is the time.

just imagine:
court: takes 2 hours
Preparing for that case: 40 hours

compact haven
#

how does professional liability insurance work? is it expensive to cover?

tender shard
#

if my client wins = great. opponent pays it

#

if the other dude wins = bad luck for my client. I told him the chances beforehand. he now pays 20,000โ‚ฌ. 12,600โ‚ฌ to me, remaining amount for the opposite lawyer + court fees

compact haven
#

๐Ÿ˜ญ

tender shard
#

I'm not a jerk though, I tell people beforehand how high their chances of winning are

#

also 95% of my clients are big corporations

compact haven
#

would be unethical to lie otherwise

tender shard
#

yes and illegal

compact haven
#

exactly

tender shard
#

it's my duty by law to help them and be honest to them

#

still ofc there's a difference between me saying "yeah we're def gonna win" and "hm depends on whether the judge got a good day or not"

#

also judges are people too - I know that some are pro corpors, others are not

compact haven
#

do u tell them their chances of winning after seeing the name of whoever is presiding? lmao

tender shard
compact haven
#

Makes sense

#

tho, say your client files, you see the judge and realize its a hit or miss, and client doesn't want to take a chance

#

they cant really just drop it after that, isnt that contempt or something for undermining the court

tender shard
quiet ice
#

?jd-s

undone axleBOT
quiet ice
#

Ah, NMS. Then you're out of luck with me

#

Though is NMS really needed for that?

tender shard
#

what version are you on? proper API was added in like 1.13 or sth

rough ibex
#

1.12

#

his code references NMS v1_12

merry cove
#

do I have to use keys to find enchantments names now? ๐Ÿ˜

#

why make it difficult ๐Ÿ˜ฆ

#

Enchantment enchantment : Enchantment.values() would save me that headache ๐Ÿ˜ฆ

sullen marlin
#

What's the question

remote swallow
sullen marlin
#

That doc formatting is weird

#

I'll fix it

true oak
#

I love those situations where I start writing a request for help and the act of writing forces me to structure my thinking and consider alternative solutions. Often, and this is how it happened just now, before I send my message I think of a possible solution and then look on the internet and confirm that the alternative solution will work. I come to the point where I no longer need to ask for help.
I wonder how many times this has happened to everyone on this channel.

valid burrow
#

rubber duck

polar forge
#

?paste

undone axleBOT
vague topaz
#

I want to change the burn time of Coal fuel, I thought I can do this by handling "FurnaceStartSmeltEvent" and setting burn time here(setBurnTime()), but it doesn't change anything.
https://sourceb.in/SYsnx5abzy - code

valid burrow
#

im not clicking that random paste link

#

use ?paste please

vague topaz
polar forge
#

?paste

undone axleBOT
eternal oxide
vague topaz
#

only console logs, nothing more

eternal oxide
#

what happens?

vague topaz
#

what do you mean?

eternal oxide
#

Do I really have to do 20 questions. How far through does it go. WHat are you expecting to happen. What actually happens. Does it do anything?

#

Also this is settign the Cooktime, not the fuel consumption rate

vague topaz
#

I except it to set burning time inside furnace to 1 second, while nothing happens. I can see all 3 messages I except in console.

eternal oxide
#

ah I see you are setting burn time

vague topaz
#

Ohh, I see, works now
Thanks!

slim kernel
#

How can I send information between two plugins I made?

valid burrow
#

multiple ways

#

what kind of plugins?

#

is one plugin for example a core?

#

and also what kind of information

slim kernel
# valid burrow is one plugin for example a core?

not rly I got one managing everything about creating a shop and being able to sell things and a different one where I got a bank and everyone has money. So I would need to tell the bank plugin whenever someone buys smth from a shop how much money the bank plugin should deduct from the player bank account

valid burrow
#

well your bank plugin should have an API

#

to hook into

eternal oxide
#

it should also register as a service provider

valid burrow
#

mhm

slim kernel
eternal oxide
#

create your API, then register it with bukkit

#

If you want it compatible with other economies you shoudl implement the Economy.class from Vault

torn shuttle
#

pluginManager#callEvent() should run synchronously at the time it is called right?

eternal oxide
#

depends

#

events support sync and async

torn shuttle
#

damage

eternal oxide
#

yes

torn shuttle
#

hrm

#

and modifications done to it should also be sync right

#

this is weird

eternal oxide
#

yes

sand spire
#

2/3 of my MongoDB shards went down, is this my fault and what do I need to do to get them back online, or do I just need to wait?

inner mulch
#

why is there a arrayindexoutofboundsexcpetion when i call method.getParameterTypes()[0]; even tho the method obviously has 1 param?

glad prawn
inner mulch
#

i do

#

count == 1

#

i check before

#
    at de.mars.event.ListeningMethod.<init>(ListeningMethod.java:17)

public ListeningMethod(Method method) {
        this.method = method;

        this.eventType = null;
        if(method.getParameterCount() != 1) {
            return;
        }

        this.eventType = (Class<? extends Event>) this.method.getTypeParameters()[0].getClass();
    }```
#

how can this be

eternal oxide
#

two different method

#

this.method and method

#

do you have a method field?

dawn flower
#

this.method = method;

inner mulch
#

this.method = method?

eternal oxide
#

only if there is no field

dawn flower
#

try printing this.method.getTypeParameters().length

inner mulch
eternal oxide
#

he's telling you to check the length of getTypeParmeters() not getPeramiterCount()

dawn flower
#

getTypeParameters() returns the generics

#

do getParameters

glad prawn
#

oh he's using getTypeParameters

inner mulch
smoky anchor
#

if not 1 -> return
if 0 -> continue

There's a logical error, no?

inner mulch
#

i checked before creating

tardy delta
#

and i clearly dont read chat

inner mulch
#

umm it seems like now im getting a illegalaccessexception altough im quite sure that the methods are being invoked only by the correct event types

#

?paste

undone axleBOT
inner mulch
#

any thoughts?

quaint mantle
#

Maybe debug through and check

inner mulch
#

there is currently only 1 listener registered

#

with 1 method

#

with 1 param

#

and 1 callevent with the correct param

quaint mantle
#

Why would you do it anyway; is that even needed.

#

Hm okay weird

echo basalt
#

I'd do the check before registering in the map tbh

quaint mantle
#

Good point too

inner mulch
#

it is being checked

#

i dont know why i get a illegalaccessexception

quaint mantle
#

Setaccessible true?

#

Is that maybe needed first

#

On method

inner mulch
#

still doesnt work

quaint mantle
#

Maybe wrong event for wring method?

#

Cant sadly test it by myself since im just on my phone

inner mulch
#

as i said there is only 1 callEvent usage :/

quaint mantle
#

Im just guessing lol

#

Yea I see

#

But if the parameter is correct, its not the parameter part which causes the issue

#

Does the constructor of the method class need any parameters which has to be filled maybe first ?

inner mulch
#

maybe i need to cast before hand

#

cuz its only sending event

quaint mantle
#

Oh

inner mulch
#

and not the extended

quaint mantle
#

Yea this could be a issue

inner mulch
#

still doesnt work

tepid turret
#

Anyone got any idea how to make my maven profile run a .bat file after it packages the plugin?

#

???

drowsy helm
#

but ideally your .bat should be running the mvn package, not the other way around

tepid turret
#

well its for my test server

#

so in this profile

#

i want it so after the compiling the server runs

#

how would i get my .bat to run the maven?

drowsy helm
#

then launch server after its done

tepid turret
#

Where do i find the full command?

drowsy helm
#

what full command?

tepid turret
#

to run the mvn package

#

like what do i put in my .bat

drowsy helm
#

thats it

#

mvn package

tepid turret
#

in what directory tho?

drowsy helm
#

this is a separate .bat from your server start bat fyi

#

same dir as the pom.xml

#

maven should be able to do the rest

#
mvn package
xcopy plugin_jar server_plugin_folder_location
cd ServerDir
call .\start.bat
#

basically that

tepid turret
#
cd C:\<path>\AdvancedBoating 
mvn package
cd C:\<path>\Test Server
java -Xmx16384M -Xms16384M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar --nogui
#

oh wait how do i select the mvn profile?

#

(I have a maven profile that puts the plugin.jar into the plugins folder)

drowsy helm
#

pretty sure its just -P profilename

#

in the arg

tepid turret
#

wow for some reason maven isnt a recognised command outside of intellij>?

drowsy helm
#

yeah just add the system path

#

or just redownload it and itll do it automatically

tepid turret
#

is there a cmd to download or do i ahve to get binaries?

drowsy helm
#

to download maven?

tepid turret
#

eyea

drowsy helm
#

probably is some cmd im not sure

tepid turret
#

ok i downloaded binaries now what

potent ocean
#

does anypne know how to get the length of data from a packet

#

without doing any nms stuff

drowsy helm
#

packets are inherently nms

#

unless you use protocollib

potent ocean
#

like a way to measure the amount of packets being sent, and the data length

#

could i listen in on the websocket?

rapid vigil
#

Yeah do Packet#getDataLength

potent ocean
#

thats still nms

#

tho

#

i wanna get every packet sent

#

and measure it

#

for traffic

drowsy helm
#

you'll have to use a lib like PAcketEvents or something

#

thers no way to do it without using NMS

potent ocean
#

but cant u listen in on the socket

drowsy helm
#

ig you could intercept it, but would be a pain in the ass

potent ocean
#

i guess i'll do that

drowsy helm
#

so you don't care for the data right?

#

just the size?

potent ocean
#

no i dont

#

just the size of data

#

i need to monitor amount of data being transfered to detect players sending unreasonable amounts of network traffic and block it

#

because its a good early sign of a hack client that trys to crash server

drowsy helm
#

you could possibly listen to the socket but im not sure how well that will work

potent ocean
#

it's just messages

#

lol

#

using json

quaint mantle
#

I'm using toml files for translations, any recommendation or suggestion?

polar forge
#

?paste

undone axleBOT
chrome beacon
quaint mantle
chrome beacon
#

I'd use yaml

#

It's what most plugins use and Spigot comes bundled with the required libraries

quaint mantle
#

yeah ill take a look thanks. Also why this is in gray, the lombok dependency is applying to all subprojects

chrome beacon
#

That happens a lot

remote swallow
#

intellij isnt the best for intellisense with groovy+gradle

quaint mantle
chrome beacon
#

It could be

#

it could also not be

quaint mantle
#

Idk, I open the project in other IDE and things not work

chrome beacon
#

Try it and see if it works

quaint mantle
#

the build works fine at intelliJ

short plover
#

how do I store an integer value in a itemstack's persistent data container thing? trying to do so gives me this error
java.lang.IllegalArgumentException: The found tag instance (NBTTagByte) cannot store Integer

eternal oxide
#

?nocode

undone axleBOT
#

Itโ€™s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

quiet ice
#

?jd-s

undone axleBOT
lime narwhal
#

Yo, i cant import my file like this ?

        InputStream input = getClass().getClassLoader().getResourceAsStream("fr/syntrow/dwwm/config.properties");

it return an error "the file doesnt exist" : https://pastebin.com/Uh7uKhmP

quiet ice
#

does the file exist within your jar under the specified path?

short plover
# eternal oxide ?nocode
    @Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        if (!(sender instanceof Player player)) return false;
        ItemStack itemStack = new ItemStack(Material.STICK, 1);
        ItemMeta meta = itemStack.getItemMeta();
        if (args.length == 1) meta.getPersistentDataContainer().set(key, PersistentDataType.INTEGER, Integer.parseInt(args[0]));
        itemStack.setItemMeta(meta);
        player.getInventory().addItem(itemStack);
        return true;
    }```
quiet ice
#

Like "I unzipped the jar" kind of sure or "I put it in "src/main/java" kind of sure?

lime narwhal
quiet ice
#

I would have been surprised if that fixed it

rough drift
lime narwhal
rough drift
#

no clue why

short plover
lime narwhal
#

I'm using maven for compile it, i dont know you guys are talking about, the file "config.properties" is just in my package fr.syntrow.dwwm > config.properties

quiet ice
eternal oxide
#
  1. Use Plugin#getResource (as it's simpler).
  2. Really check yoru jar to be certain the resource exists. Just because it was in your resources folder doesn;t mean it will be copied if you make another mistake.
quiet ice
#

You need to put it in src/main/resources

rough drift
#

put it in the resources folder

quiet ice
#

Not src/main/java

lime narwhal
#

i must reconfigure path ?

#

it changes itself by : InputStream input = getClass().getClassLoader().getResourceAsStream("/config.properties");

quiet ice
#

well depends on what you are trying to achive