#help-development

1 messages · Page 533 of 1

orchid gazelle
#

So, if I understand that correctly, I can just run that one on plugin start and be able to run the JavaAgent injecting literally in the same start?

young vine
#

It's literally modifying pointers in the jvm

#

It's playing with fire

tardy delta
#

what are you doing with javaagents in plugins

tender shard
#

damn my pulse is 123

young vine
#

Nothing good

tender shard
solemn dome
young vine
#

Wtf are you doing, am vibing at 65

tardy delta
#

at that point id just fork the plugin

young vine
tender shard
young vine
#

Which is why I hope that should never be allowed

solemn dome
tardy delta
#

who said anything about uploading

tender shard
orchid gazelle
#

Man I love insane people that are smart

solemn dome
tardy delta
#

arent you allowed to use your own fork of something as a dependency?

solemn dome
#

idk, can you?

young vine
tender shard
#

yeah but I was not so smart and started again. this time I wanna do long-term therapy but unfortunately the waiting time is 6 months

young vine
#

Sucks

tender shard
#

yeah. as said I'll do detox again on tuesday, takes about 2 weeks, and after that my plan is to never drink anything again, not even a beer or something. I'm quite confident that I'll succeed this time

orchid gazelle
shadow night
#

Isn't this getting a little bit off-topic

tender shard
orchid gazelle
#

Ah ok

tender shard
young vine
#

I don't understand how people fall back, just came back from a vacation to Fuerteventura and often spend time with this girl that I met there, she didn't smoke in 6 months, but when we were out parting somebody offered her a cig and then she smoked multiple a day again. I tried to stop here but would have to use force, one somebody I barely know, so had to stop

#

Just sad to see

solemn dome
#

So for those that were concerned about compatibility with the enum thing: you can do a plugin like mine, re-compile others'

tender shard
orchid gazelle
#

How are those seizures gonna go away with therapy?

young vine
tender shard
# orchid gazelle How are those seizures gonna go away with therapy?

the body is used to be "slowed down" by alcohol. during detox, alcohol is replaced by benzodiazepines, e.g. Diazepam. This is then slowly reduced, e.g. first day 20mg, second day 15mg, third day 10mg, and so on. The body then slowly learns to not "need" alcohol anymore. After 10-14 days, you're basically "clean" again

young vine
#

I mean, she didn't manage to quit fully, she had snus, lol

tender shard
tender shard
orchid gazelle
#

Im happy that alex does not care if somebody else talks about alcohol tho, otherwise I would have triggered him like 20 times

young vine
#

Alcoholics can be triggered pretty quickly

#

When we changed caterers at work our workers council got them to stop using red wine in sauces because they knew we have people working here that get triggered by even that

tender shard
orchid gazelle
#

I mean I used to call alex "The Jäger Guy" all day

tender shard
#

yeah relatable, I got a jägermeister right next to me rn

shadow night
young vine
#

I drank so much on Friday, cause it was the last night on Fuerte for me and that girl, we went home at like 5am, I have to chill for a few days now, just physically, lol

#

Couldn't be drunk that often

orchid gazelle
#

"Help-development" more like "Lets talk about addictions"

tender shard
#

maybe I should take a look at Antabus - it's a drug you can take every day that makes your body "incompatible" with alcohol, so that even if you only drink a small bit it makes you sweat, vomit, etc so that you know "even if I'd drink right now, all it'd do is make me feel bad"

young vine
#

We didn't know anybody there

tender shard
#

face tattoo "don't gimme a cig"

orchid gazelle
young vine
#

And like, I told here, are you sure you wanna do that, you gonna regret it, etc

#

But we were both drunk 🤷

visual laurel
#

im trying to update meta data of a smithing table result with InventoryInteractEvent but its not changing the data, any ideas?

@EventHandler
    public void onInventoryInteract(InventoryInteractEvent event) {
        Inventory inventory = event.getInventory();

        if (inventory instanceof SmithingInventory) {
            SmithingInventory smithingInventory = (SmithingInventory) inventory;
            ItemStack outputItem = smithingInventory.getResult();

            ItemMeta meta = outputItem.getItemMeta();
            if (meta.hasCustomModelData() && meta.getCustomModelData() == 6) {
                if (outputItem.getType() == Material.NETHERITE_SWORD) {
                    outputItem.setItemMeta(BenTechItem(3).getItemMeta());
                    smithingInventory.setResult(outputItem);
                }
                if (outputItem.getType() == Material.DIAMOND_SWORD) {
                    outputItem.setItemMeta(BenTechItem(2).getItemMeta());
                    smithingInventory.setResult(outputItem);
                }
                if (outputItem.getType() == Material.IRON_SWORD) {
                    outputItem.setItemMeta(BenTechItem(1).getItemMeta());
                    smithingInventory.setResult(outputItem);
                }
            }
        }
    }```
young vine
#

Well, she was still addicted to nicotine, it doesn't change much I guess

#

And if she would have been a friend I would for sure taken more control

young knoll
#

It’s abstract

#

Use InventoryClickEvent

visual laurel
#

ah alright

young vine
#

But we only spend a couple days together, she's an adult, I did what I felt being responsible to do, that ought to be enough

hazy parrot
#

I wonder why you can't listen to abstract events in spigot, what's different then normal observer pattern with adapters

young vine
#

Event handlers are stored in a static list in the event class

#

Not all events have such a handlerlist tho

#

So you can't listen to them

hazy parrot
#

Oh, right, thanks

tender shard
# orchid gazelle How does it work chemically? Or biologically?

benzodiazepines are slowing down the body's GABA system, just like alcohol. diazepam got a very long half-time, I think it's 20 or 50 hours or something. during that time the body slowly recognizes "ah yes, I don't need alcohol". the general idea is simply, replace alcohol with other drugs haha

orchid gazelle
#

So you get the symptoms of alcohol but it is not alcohol

tender shard
#

kinda, yeah

orchid gazelle
#

Interesting

tardy delta
#

so you basically have to keep taking those things..

#

lowering the dose every time

#

then hoping you dont do alcohol again

#

wont work for me 💀

tender shard
orchid gazelle
#

Bro its literally not possible to not drink alcohol and live a normal life where I live

tender shard
#

same here but I'll manage that this time

#

this time I'm serious, the last times I was too uncareful

orchid gazelle
#

Good luck then

tender shard
#

I will do long-term therapy and inbetween that time, I know "I must not drink, I got therapy to do" so yeah this time I have a goal so I know WHY i shouldnt drink again

tender shard
tardy delta
#

time to clean the alcohol closet

tender shard
#

also the food at the LWL clinic is quite good

orchid gazelle
#

I mean you still gotta be careful after therapy

tender shard
#

UKV gotta pay 6000€ for 10 days again haha

orchid gazelle
#

Especially since iirc you said that you are gonna drink on special occasions

tender shard
#

my*

tender shard
#

that was my last idea and it didnt work

orchid gazelle
#

Fair

tender shard
#

when others celebrate new year's eve w/ booze and hookers, I'll just stick to water or ice tea

visual laurel
#

this is executed when right clicking on a sword and its supposed to deal damage to entities in its path but it sometimes doesnt deal any damage

    private void shootParticleLaser(Player player, double damagePerTick, double maxDistance, int tickDelay) {
        int numIterations = (int) (maxDistance / 0.1);

        new BukkitRunnable() {
            int iteration = 0;
            final int particleTicks = 0;
            final int particleDuration = 4;

            public void run() {
                if (iteration >= numIterations || particleTicks >= particleDuration) {
                    this.cancel();
                    return;
                }

                double distance = iteration * 0.1;
                Location particleLocation = player.getEyeLocation().add(player.getLocation().getDirection().multiply(distance));

               
                player.getWorld().spawnParticle(Particle.REDSTONE, particleLocation, 1, 0, 0, 0, 0, new Particle.DustOptions(Color.GREEN, 1));

                
                for (Entity entity : particleLocation.getWorld().getEntities()) {
                    if (entity != player && entity.getLocation().distance(particleLocation) < 1 && entity instanceof LivingEntity) {
                        // Apply damage to hit entity
                        LivingEntity livingEntity = (LivingEntity) entity;
                        livingEntity.damage(damagePerTick);
                    }
                }

                iteration++;

                if (particleTicks >= particleDuration) {
                    this.cancel();
                }
            }
        }.runTaskTimer(this, 0, tickDelay);
    }```
tender shard
visual laurel
#

alright

tender shard
#

also can't hurt if you show us the code where you call this method

orchid gazelle
#

Im kinda happy that my dream of mixining into spigot is still reality

tender shard
#

it will never happen, trust me

tardy delta
#

its called a dream for a reason

orchid gazelle
#

It will.

tender shard
#

I got deep insights into how md's brain works, and he'll say "no, that's an implementation detail" haha.

#

or sth like that

orchid gazelle
#

No I mean

#

I'll just JavaAgent it

tender shard
#

it won't ever happen, maybe on paper, idk. but definitely not on spigot

young knoll
#

Bribe MD

orchid gazelle
#

Run Unfixer, Hook JavaAgent and Mixin-Loader, inject with Mixins, Reload Classes

young knoll
#

Give him $500

orchid gazelle
#

I just do it myself, no need for anything done by md

tender shard
#

I spent it all on blackjack and hookers property

#

and mascara

young knoll
#

Well then no mixins for you

orchid gazelle
#

Why not

tender shard
#

what do you even need mixins for?

orchid gazelle
#

I want to be able to do shit in the future

tender shard
#

so you don't really know yet

orchid gazelle
#

So I can remove shit I don't want to get performance

#

And maybe do some stuff with Ticking

tender shard
#

I will now try to behave like Verano:
"bro why mixin not needed performance, just kitchen chicken, why not consumer yes?"

orchid gazelle
#

What

tender shard
#

usually he doesn't know himself what he tries to say

#

but he's a very nice guy

orchid gazelle
#

I do not understand anything of that sentence lmao

tender shard
#

that's the idea, when verano talks it's usually some very weird stuff haha

orchid gazelle
#

You successed then

visual laurel
orchid gazelle
#

I mean I can have the power to keep such MixinLoader to myself, or unleash the ultimate chaos and publish it

#

So everyone can destroy compatibility with everything

tender shard
visual laurel
#

yeah the damage does

tender shard
#

please show the code where you are calling this method from

visual laurel
#

but the particles are supposed to disappear after 4 ticks which they don't

tender shard
visual laurel
#
if (event.getAction().toString().contains("RIGHT_CLICK")) {
            if (itemInHand.getType() == Material.NETHERITE_SWORD && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 6) {
                shootParticleLaser(player, 1, 15, 0);
            }
        }```
tender shard
#

full code

#

the whole event handler method

ocean hollow
#

if I clean the player's inventory, does it clean everywhere?

visual laurel
# tender shard the whole event handler method
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        ItemStack itemInHand = player.getInventory().getItemInMainHand();
        ItemStack DefenestratorPickaxe = new ItemStack(Material.NETHERITE_PICKAXE);
        ItemStack DefenestratorAxe = new ItemStack(Material.NETHERITE_AXE);
        ItemStack DefenestratorSword = new ItemStack(Material.NETHERITE_SWORD);

        ItemMeta DefenestratorSwordMeta = DefenestratorPickaxe.getItemMeta();
        ItemMeta DefenestratorPickaxeMeta = DefenestratorPickaxe.getItemMeta();
        ItemMeta DefenestratorAxeMeta = DefenestratorAxe.getItemMeta();


        List<String> lore = new ArrayList<String>();
        lore.add(ChatColor.WHITE + "Tier: " + ChatColor.RED + "1");
        DefenestratorPickaxeMeta.setCustomModelData(4);
        DefenestratorPickaxeMeta.setLore(lore);
        DefenestratorPickaxeMeta.setDisplayName("§5Dig Dug");
        DefenestratorPickaxe.setItemMeta(DefenestratorPickaxeMeta);

        DefenestratorAxeMeta.setCustomModelData(4);
        DefenestratorAxeMeta.setLore(lore);
        DefenestratorAxeMeta.setDisplayName("§8Toothless");
        DefenestratorAxe.setItemMeta(DefenestratorAxeMeta);

        DefenestratorSwordMeta.setCustomModelData(4);
        DefenestratorSwordMeta.setLore(lore);
        DefenestratorSwordMeta.setDisplayName("§5§lDefenstrator");
        DefenestratorSword.setItemMeta(DefenestratorSwordMeta);

        if (event.getAction().toString().contains("RIGHT_CLICK")) {
            if (itemInHand.getType() == Material.NETHERITE_SWORD && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 6) {
                shootParticleLaser(player, 1, 15, 0);
            }
        }

        if (player.isSneaking() && event.getAction().toString().contains("RIGHT_CLICK")) {
            if (itemInHand.getType() == Material.NETHERITE_AXE) {
                if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
                    PlayerInventory inventory = player.getInventory();
                    inventory.setItemInMainHand(DefenestratorPickaxe);
                    event.setCancelled(true);
                }
            }
            if (itemInHand.getType() == Material.NETHERITE_PICKAXE) {
                if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
                    PlayerInventory inventory = player.getInventory();
                    inventory.setItemInMainHand(DefenestratorSword);
                    event.setCancelled(true);
                }
            }
            if (itemInHand.getType() == Material.NETHERITE_SWORD) {
                if (itemInHand.getItemMeta() != null && itemInHand.getItemMeta().hasCustomModelData() && itemInHand.getItemMeta().getCustomModelData() == 4) {
                    PlayerInventory inventory = player.getInventory();
                    inventory.setItemInMainHand(DefenestratorAxe);
                    event.setCancelled(true);
                }
            }
        }
    }```
tender shard
#

okayyy that doesn't look very good in the first place, why do you create a ton of items in that listener on every interaction? why don't you just create them once, then reuse the existing objects?

visual laurel
visual laurel
tender shard
#

tbh I do not know many things about particles, maybe someone else has an idea, but I don't

worldly ingot
tender shard
#

I also do not understand why you got 3 if statements with exactly the same checks

#

isnt this all the same?

orchid gazelle
#

Is it good that my battery is on 50° C right now?

tender shard
ocean hollow
orchid gazelle
#

Phone

tender shard
#

I guess it's fine

worldly ingot
#

Yes, the PlayerInventory instance is backed by an internal inventory

orchid gazelle
#

My phone is stupidly hot

worldly ingot
#

It doesn't create a copy

orchid gazelle
#

My fingers are burning while touching it

tender shard
worldly ingot
#

You can use Inventory#getContents() if you'd like to create a copy of the stacks

tender shard
#

the QUora app e.g. can make my iphone way too hot too

orchid gazelle
#

I have 0 running apps besides discord lol

#

Its just very hot outside

tardy delta
#

make it wet

tender shard
#

that's why I love my kindle

orchid gazelle
#

Then it dies

#
  • I cannot write messages anymore then
#

Thats what you want huh?

tender shard
#

not even I can fill it out and I studied tax law

#

if not even I can do it, how is anyone else supposed to do that

orchid gazelle
#

Lol

quaint mantle
#

i need help

tender shard
#

?ask

undone axleBOT
#

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

tardy delta
#

i need help too

tender shard
#

I need help too, that's why I made an appointment in a psychiatric clinic

orchid gazelle
#

I need help too

tender shard
#

but did you make an appointment

young knoll
#

I like pie

orchid gazelle
#

Not with alcohol

quaint mantle
tender shard
quaint mantle
#

with cooldowns

tardy delta
#

i recommend using the datatime api instead of longs

tender shard
quaint mantle
#

deferent cooldowns use same cooldown time

#

link to img

#

screen shot

quaint mantle
#

@tender shard

vast ledge
#

So whats the issue, i dont see one witht the screenshot

tender shard
#

me neither

vast ledge
#

Like pls

#

explain

quaint mantle
#

All sets for some unknown reason have the same cooldown despite a different click time

#

@vast ledge @tender shard

vast ledge
#

In the screenshot tho, gracz has 9min
vip has 8

tardy delta
#

thats because he clicked later ig

#

cuz youre using the same map for every click?

quaint mantle
quaint mantle
#
  private HashMap<String,Long> graczcooldown = new HashMap<String, Long>();
    private HashMap<String,Long> vipcooldown = new HashMap<String, Long>();
    private HashMap<String,Long> svipcooldown = new HashMap<String, Long>();
    private HashMap<String,Long> sponsorcooldown = new HashMap<String, Long>();```
tardy delta
#

oh god

vast ledge
#

Well the just do

enum KIT {
 VIP, VIP+
}
public Long getRemainingTime(KIT kit){
 switch(kit):
 case VIP:
  return lastclaim - cooldownVip;
 case VIP+:
  return lastclaim - cooldownVipPlus;
 case default:
  return 0;
}
#

the spacing on that is terrible

quaint mantle
#

?

#

How can I use it in my code?

vast ledge
#

First off, just for scalability, i would create a PlayerData class, that contains the rank, the last claim time, and other important stuff

#

Because then you dont gotta deal with hashmaps

#

You can also save that data to a database

tardy delta
#

id use Instants

vast ledge
#

or a local file

vast ledge
tardy delta
#

idk

quaint mantle
#

i must add to code lastclaim - cooldown?

vast ledge
#

@quaint mantle Where are you saving the player rank

quaint mantle
#

Right now, nowhere

vast ledge
#

Well how are you planning on doing that?

#

u going to implement an existing rank plugin?

quaint mantle
#

for now

tardy delta
#

waiting till java supports case 'A'...'Z'

quaint mantle
#

but i don't understand how to fix my code

vast ledge
tardy delta
#

so many cool stuff that c++ has and java doesnt and the other way around

vast ledge
#

So all cooldowns no longer exist

#

Like @tardy delta and I said, you should save the data somewhere

#

So you have a refence point to the last time the player claimed the kit

quaint mantle
#

?

vast ledge
#

You have to decide, either Database or a Local file

quaint mantle
#

local file

tardy delta
#
BukkitWiki

The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...

worldly ingot
vast ledge
#

Then take a look at what @tardy delta just sent

#

it should hlep you with the basics of generating new files

tardy delta
#

but ye

#

if you want to use one switch and not a bunch of code underneath it

vast ledge
#

Several people are Typing...

worldly ingot
#

You'll see a pretty negligible difference between that switch statement and if (value > 'a' && value < 'z')

rough drift
vast ledge
tardy delta
#

but ye i care about microseconds in that project, bit overkill 💀

quaint mantle
#

how can i open a book displaying text

worldly ingot
#

There should be a Player#openBook() method iirc

#

Pass in an ItemStack with book meta and what not

quaint mantle
#

okay thx

vast ledge
#

My Epic MongoManager

tardy delta
#

theres so much syntax sugar in java so 'A'...'Z' would be a nice addon

worldly ingot
tardy delta
#

you coding in a cinema or smth?

vast ledge
vast ledge
tardy delta
#

man hired the whole room

#

heehee did that work for you?

vast ledge
#

NO

#

I DONT KNWo

#

HOW

tardy delta
#

i tried everything to disable the mongodb loggers

vast ledge
#

I KILL

#

Ive just given up after 2 days of trying to stab it

tardy delta
#

same

orchid gazelle
#

I don't like mongodb

vast ledge
#

My best screenshot

tardy delta
#

docs make stuff always so bloat

vast ledge
#

docs?

#

You mean my comments

#

scream at myself?

tardy delta
#

oh ye those arent javadocs

vast ledge
#

Yea

#

thats me getting angry at myself

#

i should probably remove that before production release

#

Oh my, my best comment so far

tardy delta
#

record wait that exposes collection

#

are you one of those people that does ArrayList<T> on declarations

vast ledge
#

Wait

#

i have code

#

that will make everybodys eyes bleed

#

HERE

#

MAY YOUR EYES

#

BLEED WITH ME

tardy delta
#

only thing that looks good is the font

vast ledge
#

Here, a close look

tardy delta
vast ledge
#

haha

#

ik

#

i do be like that

rough drift
tardy delta
#

something that my classmates would do

vast ledge
#

This is also old code

#

i dont do that

#

anymore

#

luckily

tardy delta
#

well they would probably do throws NullPointerException but anyways

orchid gazelle
#

Can't read that one

#

On my phone, sun shouting at my phone so its dark as shit

vast ledge
#

you can see that

#

should*

orchid gazelle
#

🌞 📢 📱

#

Yes I do now

tardy delta
#

i hope you realize that i dropped something at your front door

vast ledge
#

at my

orchid gazelle
#

Mine?

vast ledge
#

or who

tardy delta
#

yours

vast ledge
#

Theres nobody called yours

#

here to my knowlege

orchid gazelle
#

He means us both probably

vast ledge
#

oh

#

maybe

#

who knows

orchid gazelle
#

Well, good that the location im currently sleeping at is not my home

vast ledge
#

noice

#

he went all the way to antarctica to deliver something to me

orchid gazelle
vast ledge
#

Was it worth it?

#

Or this one?

hazy parrot
#

how are you calling it

vast ledge
#

Not yet

#

It just in my playerdata

hazy parrot
#

if you are gonna use that player later its pointless, mongo will fetch it from database 2 times

orchid gazelle
#

Stop using mongo lmao

#

It hurts my eyes

vast ledge
orchid gazelle
#

I don't

hazy parrot
#

embrace binary files

vast ledge
tardy delta
#

at that point id static import Filters.eq

orchid gazelle
#

I use MariaDB c;

vast ledge
#

why binary

smoky anchor
#

Heyo, any non-NMS way to fire a vanilla GameEvent ?

hazy parrot
#

/j

vast ledge
orchid gazelle
#

MariaDB best

vast ledge
#

you can fire ur own event tho

#

Better @hazy parrot

tardy delta
#

who so many blank lines

vast ledge
#

What it acctually looks like

#

I just had inlays telling me the number of usages

#

i put a space between each function

tardy delta
#

now i know why you arent posting ide pics, too many warnings

#

got you man

vast ledge
#

No

#

i dont got warnings

#

i have 2, because of unused functions

orchid gazelle
#

I have 1000000000 in eclipse

vast ledge
#

ew

tardy delta
#

"fields may be final"

orchid gazelle
#

Eclipse >>

vast ledge
#

Intellij >>>>> Eclipse

flint coyote
orchid gazelle
#

Why would I make my fields final lmao

tardy delta
#

i like that one

vast ledge
#

I just supress them cus theyer pointless

flint coyote
#

I don't. It always tells that on all my fields that are accessed by reflection. I mean sure it can't know for sure but there's a runtime annotation over it

orchid gazelle
vast ledge
#

Dies

icy beacon
tender shard
vast ledge
#

Passes away

tender shard
#

kerosine > diesel

vast ledge
#

cocain > meth

icy beacon
#

This article explains the concept of the final keyword in Java and its impact on JVM memory. The final keyword in Java is used to declare a constant or to restrict the subclassing of a class or the overriding of a method. When a variable is declared as final, its value cannot be changed once initialized. The article explains that using the final keyword can have a positive impact on JVM memory usage, as it allows the JVM to optimize memory usage by reusing objects that are no longer being modified. ChatSonic (requested a TL DR)

tender shard
#

green olives > black olives. Yes, I'm an olive racist

#

@chrome beacon Sorry

vast ledge
tender shard
#

100% true

#

same for cherries

orchid gazelle
#

Thanks

vast ledge
#

Seedless watermelon >= Norm Watermelon

tender shard
#

youre welcome

tender shard
hybrid spoke
#

watermelons shouldnt be too soft

vast ledge
#

Bro, theyre friggin water

#

what are you expecting

#

its in there name

tender shard
#

I once planted a water melon "tree" in turkey, it's still alive today

vast ledge
#

WATERMelon

tender shard
#

yeah it was last year. It'll be dead next year

#

haha

tardy delta
#

apart from that, the article is shit 💀

tender shard
#

"final" in java is pretty useless for most things, and for classes it's actually harmful

tardy delta
#

jvm can inline final fields so it guantantees faster execution time in most of the cases

tender shard
#

yeah for fields it can make sense

hybrid spoke
#

final helps to properly design your application

tender shard
#

but for everything else, it's pretty much pointless

orchid gazelle
#

How hard is the impact on a HUGE application?

#

0.000001ns?

vast ledge
#

🍿

tender shard
#

I do use final everywhere too but it's pretty pointless

tardy delta
#

that time unit is probably not even used in computers

tender shard
#

contracts > making parameters final

orchid gazelle
#

I never use final

#

It looks ugly for arguments imo

vast ledge
#

Smth like that

tardy delta
#

0.000001 ns

tender shard
orchid gazelle
#

Ofc

vast ledge
hybrid spoke
#

final is important for several things, but i agree on the parameters thing

#

never used it there

compact haven
#

I use kotlin most of the time so it’s second-hand to think whether a field is final or not

hybrid spoke
vast ledge
#

Dayum

#

The suicide prevention hotline can be found online if you need gelp

compact haven
#

thanks, it’s 988 and you could use it too

compact haven
ivory sleet
tender shard
#

kotlin is shit. fun fact, "Kot" means "shit" in german

vast ledge
#

Ja

#

das stimm sogar

ivory sleet
#

Sometimes having final parameters reduce amount of bytecode instructions compiled

vast ledge
#

Kot, anderes wort für Tier Kacke

tardy delta
tender shard
#

okay I gotta rectify my previous statement. Kotlin is not "shit", but it's definitely just java in worse

tender shard
compact haven
#

anyways the point of me saying that is for two reasons 1) in Kotlin you need to think about mutability and 2) that sometimes carries to Java and so I put a lot of final in Java code

tardy delta
#

and imagine having mutable stuff

vast ledge
#

@mutable

ivory sleet
#

final is like a safety precaution

vast ledge
#

woops

#

just pinged sombeody

tender shard
#

Talking about mutability. Just spam random links here and choco will mute you. That means, everyone here besides md_5 is mutable

#

muteable

vast ledge
#

i dont wanna be muted

ivory sleet
#

Muteability

vast ledge
#

i cant talk

tender shard
#

md once muted me for 30 minutes because I kept talking about paper haha

ivory sleet
#

Understandable

tender shard
#

yeah

vast ledge
#

Dont talk about Paper he wont be happy

compact haven
#

Not to mention it’s not really necessary for reducing code execution or compile time, that impact is small, but it helps developers understand that xyz is not part of the objects mutable state while other things are likely to change

tardy delta
hybrid spoke
#

since when there is a mute

vast ledge
#

Always?

compact haven
#

and is also really helpful when auto generating getters and setters in Java

hybrid spoke
#

i just always get banned unreasonable

flint coyote
tender shard
#

anyway, no class should ever be final, it adds nothing useful and only restricts other people

ivory sleet
tardy delta
#

mutable String class 🤔

tender shard
ivory sleet
#

Cuz if your functions are so big you need to use final to maintain the state of variables

#

Then probably sth else is an issue also

tender shard
#

contracts are way better, they tell the outside user that this object won't be changed

vast ledge
#

Just set it on fire

tardy delta
#

need to rethink some life choices then

vast ledge
#

You can brun all of your problems

#

Indebt? Burn the bank
Didnt write something, burn it

ivory sleet
tardy delta
#

mutation of parameter variables? not like putting final in front would do anything?

#

in c++ it will but not in java

tender shard
#

my usual way of thinking is: If the return is void, it's allowed to change object's states, if not, then not

#

e.g. Collections.sort

compact haven
#

it means you can’t reassign the parameter’s reference

tardy delta
#

its a copy

compact haven
#

yes, and you can’t change the reference of the copy

orchid gazelle
#

Stop putting final in your code. It makes it harder for me to transform your classes ;)

compact haven
#

there’s an actual effect of final in front of parameters, idk why u don’t know that

tender shard
ivory sleet
#

Void implies stateful behavior

#

;)

tardy delta
#

🤔
not like this would do anything to o

  Object o = new Object();
  y(o);
}

void y(Object y) {
  y = new Object();
}```
compact haven
#

Obviously not

orchid gazelle
tardy delta
#

what are you saying then

tender shard
ivory sleet
compact haven
#

but if you put final in front f Object y then you can’t reassign it inside of the method body

tender shard
#

jk, I'd never block conclure. he already banned me once

orchid gazelle
#

Alex are you fine with ^^ ?

compact haven
#

Which to be honest I can’t remember when I’ve had to, but there’s an actual case for it

tardy delta
#

uh ye i think you should consider going to a doctor if you do that

ivory sleet
#

Like fourteen sure that void function doesnt change state

tender shard
#

^^ is the german version of uwu

ivory sleet
#

But it doesn’t do anything meaningful also

compact haven
#

Not necessarily, could be helpful to default variables when you don’t overload

tardy delta
#

i get it but its useless

orchid gazelle
compact haven
#

Like if y is null, y equals SomeEnum.X

tender shard
compact haven
#

are you gay or something lmao

orchid gazelle
#

^^

compact haven
#

he’s “fucking gay,” he advanced in class

orchid gazelle
#

Real

tardy delta
#

more social credit

#

or less

orchid gazelle
#

Damn how much I like alex for being so open

compact haven
orchid gazelle
#

Most people would be tilted if someone used something like "you are gay" as an insult or just for fun, but alex uses it himself

tardy delta
#

saw that one already

tender shard
orchid gazelle
#

Thats great

tender shard
#

I also love everyone here ❤️ you are all such friendly people, I don't know what I'd do without this discord, but I'd definitely be at least 10 % less happy

orchid gazelle
#

Would you stop that any people use gay as an insult if you could right now?

vast ledge
#

This code is epic isnt it

tardy delta
#

wait

#

this discord client is weird

vast ledge
#

Is that a fucking cat

#

with wings

#

staring up

#

IS THAT A DEAD CAT

orchid gazelle
ripe flint
tender shard
# orchid gazelle Would you stop that any people use gay as an insult if you could right now?

I actually also used that as insult years ago. Not understandable to me right now. It's basically the same as using "behindert" / r-word to insult people. It happens automatically, but when one thinks about it, it's a shitty insult. If you truly insult someone, you have to get more real, e.g. say something like "you're a very lonely and sad person". that hits much more than using any standard phrase anyway

vast ledge
#

<Ö>-<Ö>

tardy delta
tender shard
#

If someone says "Your mother's a bitch", people just laugh it off. But if someone says to you "You are a very lonely, sad person" then you actually start to think about your life choices

vast ledge
#

did u chang ethe name?

#

its should be Hyperion.java

ripe flint
#

I think

#

As my main class

#

Alright lemme look

tardy delta
#

ah shit that renders as an image i have been scammed

vast ledge
#

It sohuld look somethign like this

#

should**

orchid gazelle
ripe flint
#

that?

vast ledge
#

no

#

show me the files in ur project

tender shard
ripe flint
tender shard
vast ledge
#

yea

vast ledge
#

move Hyperion into org.example

ripe flint
#

i dont really know what that means im kinda new

vast ledge
#

drag the Hyperion file onto the org.example folder

tender shard
#

packages are like folders. your classes should always have a package. usually something like "me.bananabutt76.myawesomeplugin"

ripe flint
#

then do i rename that folor to something or

orchid gazelle
#

bananabutt76 ICANT

ripe flint
#

org.example seems a bit strange

tender shard
#

at the top of the class, write this:
"package me.bananabutt76.myplugin;"
then IJ will complain and you can right-click it and tell it to "move this class to the specified package/folder"

ripe flint
#

also bananabutt76 was my old old user i just cant change nickname lol

orchid gazelle
#

I use de.dafeist everywhere but dafeist.de is not reachable anymore because I cannot just randomly afford a server anymore so I stopped it but yeah

hybrid spoke
#

your package structur nearly always represents a domain

#

dev.luzifer
org.patheloper
com.github

orchid gazelle
#

The domain dafeist.de is still registered to me, so don't bother claiming it lmao

hybrid spoke
#

trust me, nobody would

ripe flint
#

if i dont have a domain will this just not work then

vast ledge
#

no

#

its fine

orchid gazelle
#

Is it legal to have a domain below 18 years old?

tardy delta
ripe flint
hybrid spoke
vast ledge
#

yea

ripe flint
#

this is what its at

#

alright

hybrid spoke
vast ledge
#

if youve never created anything before you shoudl startout with

#

?learnjava

undone axleBOT
ripe flint
#

i dont know i had chat gpt make some java sort of copying a sword from a game i like and i wanted to see if i could get it to work

orchid gazelle
#

Actually it would be REALLY bad if someone else claimed my domain, since autoupdaters refer to it

vast ledge
ripe flint
#

you'd be correct

#

i just thought id be interesting to see if it would work

vast ledge
#

Yea, it require a bit of code to get custom items working

ripe flint
#

hmm i just started the server again

#

and the message is still there

vast ledge
#

yea idk wat u did

#

create a new project

#

download

#

the intellij plugin called mc development tho

#

its create the base files for

#

you

ripe flint
#

how do i download plugins for it

hybrid spoke
#

?bing

undone axleBOT
ripe flint
#

lmao

#

there's no mc development plugin on the marketplace

#

should i just change that to like me.senbler?

vast ledge
hybrid spoke
#

?commonsense

#

why doesnt that exist

quaint mantle
vast ledge
#

somebody didnt have commonsense

orchid gazelle
#

?common

vast ledge
#

why

orchid gazelle
#

?sense

vast ledge
#

WHY

#

WHYYYY

hybrid spoke
#

we need that

orchid gazelle
#

WHYYYYYYYY

vast ledge
orchid gazelle
#

TELL ME WHY

ripe flint
#

so would it work i mean i really dont know anything it aint common sense to me

vast ledge
#

Download the intellij plugin, and create a new project

ripe flint
#

yes i did

vast ledge
#

then create a new class and paste what ChatGPT told you

ripe flint
#

but its telling me to change org.example

vast ledge
#

just do org.banana

orchid gazelle
#

But yeah

#

We also need a command for that lmao

vast ledge
#

i a one time thing cant be bothered

#

yea

#

isnt it in

#

?links

#

?link

orchid gazelle
#

?namingconventions

#

?naming

#

?conventions

vast ledge
#

I swear theres a command that gives links

#

there

orchid gazelle
#

No

#

Its for Java, not maven

#

?groupid

#

?alex

vast ledge
#

whats it for this one again, it got wiped

#

is it compile or

#

package

orchid gazelle
#

package puts it in a jar iirc

#

I usually use clean package for my plugins I think

vast ledge
#

thanks

orchid gazelle
#

It generates one with deps shaded and one without

ripe flint
#

i put it ther?

vast ledge
#

yea

#

just leave the default generated way

#

Then paste ur code

#

Ayy, it passed my checks

orchid gazelle
#

Nice

#

Its weird. I am in vacation for 2 days now but I really want to continue coding rn

vast ledge
#

The Core system is finished, player data can be sent and recieved, ranks can be generated a pulled

orchid gazelle
#

I am addicted

tardy delta
#

the mongodb spam 🙏

ripe flint
#

it has 40 errors lmao

ripe flint
vast ledge
orchid gazelle
#

Gotta get my HoldDownEvent done

tender shard
vast ledge
#

Oh

#

yea

ripe flint
#

like just all those

vast ledge
#

ChatGPT is good with that

orchid gazelle
vast ledge
orchid gazelle
#

Yo alex is it legal to own a domain without being 18?

vast ledge
#

Good question

#

lemme check

vast ledge
#

Yep

#

you can own one

ripe flint
#

these errors wer'nt there before

orchid gazelle
#

Nice

#

I am legally an owner of a domain

tender shard
#

you either need permissions from you rparents, or you have to have enough money to pay for it yourself

vast ledge
orchid gazelle
#

I am too

#

Lol

vast ledge
#

Ayyy

tender shard
vast ledge
compact haven
#

He can’t even do his own taxes

vast ledge
tender shard
#

sure, for 115€ per hour I can do your income tax returns

compact haven
#

just don’t ask him to do your property taxes

tender shard
vast ledge
#

Youll get it eventually

ripe flint
#

anyone know how to fix these errors?

tender shard
vast ledge
ripe flint
#

i can pastebin it if you want

tender shard
#

?paste

undone axleBOT
tender shard
#

paste it there pls

vast ledge
ripe flint
tender shard
orchid gazelle
#

Wait really?

#

Thats great

tender shard
#

on average

#

yes

orchid gazelle
#

Only have to give alex 40 Euros and he gives you 700 Euros lmao

tender shard
ripe flint
#

actualkly wait

vast ledge
tardy delta
#

free hugs

ripe flint
vast ledge
tender shard
ripe flint
#

thats from intellij

compact haven
vast ledge
#

BRO

#

MOFO

#

WTF

#

HELP

#

WHY

#

WAHT

#

CONFUSED

#

HELP ME

tender shard
compact haven
#

😭

ripe flint
#

ok

compact haven
#

even Germans know what the fuck is happening here

tender shard
#

desantis is quite present in german news

vast ledge
#

@ripe flint You commited 3rd defree murder on my eyes

ripe flint
#

why lol

vast ledge
#

Because

#

this

#

is no

#

just no

#

I dont know what to say

#

i want to cry

#

i want to die

#

help

ripe flint
#

im confused

#

blame gpt

vast ledge
#

no

tender shard
vast ledge
#

you can copypaste

ripe flint
#

😳

vast ledge
#

Yes

#

ik

#

JAOISDHOUI)WA

ripe flint
#

idk

#

probably not

vast ledge
#

Remove everything

#

in that file

#

and replace it with chatgpts

#

code

#

then rename "HyperionPlugin" to "HyperionTest"

ripe flint
#

"missing package statement: 'org.banana.hyperiontest'

vast ledge
#

insert it

ripe flint
#

i have no idea what that means 💀

vast ledge
#

add "org.banana.hyperiontest" to the very top of ur file

ripe flint
#

what that?

vast ledge
#

infront put package

ripe flint
#

alright

#

perhaps this works

vast ledge
#

it should say

package org.banana.hyperiontest;
ripe flint
#

yeah

vast ledge
#

ok

#

then build

#

put on server

ripe flint
#

yeah

#

i need to try and figure out some java so i have the slightst clue what im doing

vast ledge
#

?learnjava

undone axleBOT
vast ledge
#

use that

#

itll help

ripe flint
#

welp

vast ledge
#

Theres also wiki articles

ripe flint
#

the plugin is in but the command does not work lmao

vast ledge
#

theres no command in ur code

#

thats why

ripe flint
#

what?

#

erm

#

gpt is such an idiot

#

i guess i rewrote it so many times it just got rid of it

#

alright

#

public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (command.getName().equalsIgnoreCase("hyperion")) {
if (!(sender instanceof Player)) {
sender.sendMessage(ChatColor.RED + "This command can only be executed by a player.");
return true;
}

vast ledge
ripe flint
#

it added that

vast ledge
#

yea just put that in ur main class

ripe flint
#

alright starting the server hopefully it works

#

still did not work lol

tardy delta
#

maybe you should actually learn how to make a plugin instead of copying chatgpt

vast ledge
#

probably should

ripe flint
#

believe me i want to

ancient plank
#

No excuses

compact haven
#

this is not how you use GPT to learn

orchid gazelle
#

Aight im back

tardy delta
#

hi back

smoky anchor
#

ok who tf wrote this 🤣

sour folio
#

Is there a way to check when a spercifc block ie. dirt is right clicked on, and then if that is true it does p.sendmessage("message);

strange rain
tardy delta
#

PlayerInteractEvent and Block#getType

hollow birch
#

is there a good way to set the max stack size of an item stack

sour folio
smoky anchor
tardy delta
#

also check action

sour folio
sour folio
#

getAction() isnt working

vast ledge
#

or smth like that

sour folio
#

ty

sour folio
vast ledge
#

ye

worldly ingot
tardy delta
#

discord ig

worldly ingot
#

Nah that's a user formatting error

#

Someone probably put a space in front of subsequent entries in that list lol

tardy delta
#

ah someone changed it 💀

restive mango
#

solved this

#

basically

#

the problem is that the client is 'deccelerating' a block that has a setentitymotion packet applied to it

#

over 50ms

#

so in the time between ticks

#

the block is deccelerating

#

it's subtle

eternal oxide
#

MC has air resistance

restive mango
#

yeah i know i was reapplying motion every tick

#

but the resistance is applied in the client between ticks

opal carbon
#

yeah

#

client side physics does things

restive mango
#

sadly i need to do the analytical math now to solve these equation sug

sour folio
#

what is wrong here?

vast ledge
#

get title

#

got removed

hybrid spoke
#

inventoryview has it

remote swallow
#

you have to get the view

vast ledge
#

ye

remote swallow
#

and you shouldnt be checking by name

sour folio
remote swallow
sour folio
#

wdym

storm scaffold
#

If you setDropItems to false in a BlockBreakEvent, it stops stuff like buttons and levers being supported by a block from dropping, but if you run getDrops on the broken block it will not include stuff like buttons and levers - is there a way to find player-accurate block drops, including doors and beds when breaking either part, and the drops of supported blocks?

I'm trying to make a telekinesis enchantment, but disabling the drops and giving the player event.getBlock().getDrops(event.getPlayer().getInventory().getItemInMainHand()) does not work because it doesn't give the player things dropped by supported blocks, or sometimes beds and doors if broken on the wrong block, but still stops them dropping.

river oracle
#

Where could I find a list of java versions corresponding to server versions?

#

preferably the numeric value of the java version

eternal oxide
#

java 8 to 11.

#

over 11 breaks reflection in some plugins

river oracle
#

doesn't 1.19+ require Java 17? or is 16 fine for that

#

strange that they'd use a non LTS for 1.17+, but 🤷‍♂️

#

ahhh

#

time to make some shitty UI front end for my server panel 😈

#

I'll just force 17+ for everything past 1.17 as there is no reason you should be using java 16 past that anyways

daring lark
#
ShapedRecipe recipe = new ShapedRecipe(
                new NamespacedKey(DCakeLibrary.getPlugin(), "spawner_shard_recipe"),
                new ItemStack(Material.SPAWNER)
        );

        recipe.shape("sss", "s s", "sss");
        recipe.setIngredient('s', new RecipeChoice.ExactChoice(CustomItem.SPAWNER_SHARD.clone()));

        plugin.getRecipesManager().registerRecipe(recipe, recipe.getKey());```
Why i can't craft spawner? Recipe is registered and i can see it in my recipe book.
vast ledge
#

The player has to learn it

daring lark
#

wtf

grim hound
#

what tf does my spigot from the BuildTools not work as a library

river oracle
#

don't use it as a library that'd be stupid

#

just use maven

#

or gradle ofc

grim hound
#

no

river oracle
#

if you want to depend on nms, it will put it in your .m2

#

you can see further on how to use nms here

#

?nms

grim hound
#

nah

#

I just want the 1.19

river oracle
#

using a build system is the way to go now adays

grim hound
#

to see how Bukkit.reloadCommands is implemented

river oracle
#

you don't need the jar for that

#

spigot is open source

#

?stash

undone axleBOT
grim hound
#

man

#

am begging you

#

just give me the goddamn file

river oracle
#

lmfao

#

its open source

grim hound
#

Chill

#

Why the fuck do you have to be so toxic?

#

Family issues?

river oracle
#

you are just simply unwilling to look at the open source code

#

also Bukkit#reloadCommands isn't a method

grim hound
#

e

vast ledge
#

I think hes looking for the command reload

#

on bukkit

grim hound
#

I wanna like

vast ledge
#

Then what u lookin for

grim hound
#

reload the commands

grim hound
#

so that the aliases apply

vast ledge
#

restart the server

#

or run /reload

#

which isnt recommened

#

but works

grim hound
#

Men

#

That reloads the whole server

river oracle
grim hound
river oracle
#

you can access command map like so

grim hound
#

added them as if they were commands but using the same executor?

#

but only one command executor can be registered, right?

#

Damn

#

How so?

#

ye

#

ye

#

so for aliases it should be the same

#

mm

#

so I have to reload the file?

wary harness
#

looking for good lib for custom guis any recomendations?

grim hound
#

what?

#

I'm looking for a way to reload the aliases so that they're visible even if added in the runtime

rotund ravine
#

So setAliases returns a copyOnWrite?

#

Why is it named newCommand

grim hound
#

BRO

#

Disrespect

#

:C

#

also, you made nothing clear by this code

#

I can certainly tell yours by this code

#

suuuure

#

anyways

#

what would replacing the command object in the command map serve?

eternal oxide
grim hound
eternal oxide
#

You can overwrite a command by calling setExecutor again.

grim hound
#

yeah, but that's not what I'm trying to do

#

I want to set the aliases in the runtime

#

and also have them take effect

eternal oxide
#

simple, when you call getCommand() you are given a Command instance. Set aliases, then set executor should do it

grim hound
#

I tried simply setting aliases

compact haven
#

will brigadier even update if you don’t also manually send that packet, or does the Command API do that?

grim hound
#

but it doesn't work

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.

wary harness
# grim hound but it doesn't work
        Method getCommandMap = pl.getServer().getClass().getMethod("getCommandMap", new Class[0]);
        SimpleCommandMap cmdMap = (SimpleCommandMap)getCommandMap.invoke(pl.getServer(), new Object[0]);
        List list = cmdMap.getCommand(cmdName).getAliases();
        for (String s : aliases) {
            list.add(s.toLowerCase());
        }
        Command cmd = cmdMap.getCommand(cmdName).setAliases(list);
        cmdMap.register(cmdName, cmd);```
#

here u go

eternal oxide
#

did you register an executor after setting the aliases as I explained?

grim hound
#

I am telling you exactly what I'm trying to achieve and what doesn't work

eternal oxide
#

Not really, you are being vague

compact haven
#

and you were just spoon fed working code

#

so go use it

quaint mantle
#

someone give me a guide for plugin with sql

#

but no kodysimpson

#

video

grim hound
#

the fuck is wrong with ppl

quaint mantle
#

how can i learn save minecraft stats to sql ?

#

at this guide ?

compact haven
#

Because people are trying to help you and you insulted them

#

that jab about skill on the other person really annoyed me

wary harness
compact haven
#

anyways for your question about the command map

#

Yes you need to re register it otherwise it won’t send the updated command list for brigadier to the client, among other things, pretty sure

#

even though the object likely mutated, the command map part is important

grim hound
remote swallow
#

but for mysql you should do that async

young knoll
#

You should do it async anyway

#

spoon

worldly ingot
#

Yeah. SQLite is still IO

ornate mantle
#

when using LivingEntity#damage(double amount, Entity source) does it just damage the entity by the source?

#

like if i pull up a entitydamagebyentityevent

#

will it show source as the damager and the livingentity as target?

#

and will that affect passive entities like iron golem and endermen as the LivingEntity?

eager jacinth
#

Guys, is it bad idea to load data from database on server startup?
Even if there are 30-100 pieces of data

worldly ingot
#

Depends on the data you're loading, what you're doing with it, whether or not it's important to have in memory, etc.

#

You can't really have a straight forward answer to that question

quiet ice
#

Kinda unrelated to #help-development , but does anyone know a stronger version of kill -9 <pid>? I have an unresponsive task (i.e. steam) that doesn't even flinch with kill -9

lavish wing
simple mica
#

i'm trying to make a custom world generator but im finding that ChunkData.setBlock() is very slow. Is there an nms (or any) alternative that has better performance for placing blocks?

raw prairie
#

Is ditching Java for kotlin a good idea

#

For making plugins