#help-development

1 messages · Page 688 of 1

glossy venture
#

but the wrapper is set to 8.3

echo basalt
#

Is there a collection that lets us do get(key) and get(index) in O(1)?

#

I'm thinking binary tree or something

hybrid spoke
#

there isnt

#

but you can just use 2 collections

#

or hope for best case in linkedhashmap

glossy venture
echo basalt
#

yea

tender shard
#

no wait

#

wrong one - why the hell does it not change the commit shown when you choose another branch

#

jitpack is so stupid, why are you even using it? just publish to maven central

glossy venture
#

dont want to make releases

#

jitpack is nice if it works

eternal valve
#

I'm quite new, I'm going to make a plugin, but with which program do I open .jar and .class

tender shard
#

idk I've never seen it work properly

eternal valve
#

😄

tender shard
#

that's compiled code

echo basalt
#

mans looking for an IDE

#

if you want to play with compiled code there are tools for that

tender shard
#

why do you think you need to open a .jar file?

eternal valve
#

Now I'm confused where to start to make the plugin, can you send me a wiki or a tutorial video?

#

😄

tender shard
glossy venture
#

k

#

their example does work

#

which is like

#

the exact same as what i have

#

but it uses the correct gradle

#

ima try w gradle 7.3.3 as that works for their example project

#

but im so confused

tender shard
#

whyyyyyyy does String.split not work on chars D:

#
    public static final String CHAR_NEGATE = "!";
    public static final String CHAR_KEY_VALUE_SEPARATOR = "=";
    public static final String CHAR_CONDITIONS_SEPARATOR = ",";

this just feels wrong

#

I want it to be chars

simple schooner
#
public class HologramManagerv1 {

    private HashMap<String, ArrayList<String>> hologram = new HashMap<>();

    public void registerHologram(TextDisplay hologram, ArrayList<String> text){
        //this.hologram.put(hologram.getUniqueId().toString(), text);
        ConfigFile.setUp(hologram.getUniqueId().toString());
        ConfigFile.getCustomFile().addDefault(hologram.getUniqueId().toString(), hologram.getText());
    }
}``` The config file class is not writing a new file everytime a hologram is created
#
public class ConfigFile {

    public static File file;
    public static FileConfiguration customFile;

    public static void setUp(String name){
        file = new File("holograms/"+name+".yml");

        if (!file.exists()){
            try {
                file.createNewFile();
            }catch (IOException e){
                System.out.println("Error occured");
            }
        }

        customFile = YamlConfiguration.loadConfiguration(file);
    }

    public static FileConfiguration getCustomFile(){
        return customFile;
    }

    public static void save() throws IOException {
        customFile.save(file);
    }

    public static void reload(){
        customFile = YamlConfiguration.loadConfiguration(file);
    }

}``` Heres the config file
glossy venture
#

lmao what

glad prawn
simple schooner
#

yeah

hazy parrot
simple schooner
#

I thought having holograms/ would create a new folder

tender shard
hazy parrot
#

char + "" :3

shell robin
#

I reset Intellij IDEA and even hello world doesn't work even though SpigotAPI is installed 🤦🏻

quaint mantle
shell robin
#

but plugin is enabled

quaint mantle
#

.toString is so bad

shell robin
#

the interface is ridiculously broken so I pressed "restore default settings" as it says on the internet

#

and everything was reset including my old projects..

lilac dagger
#

The projects don't get deleted

#

Probably your workspace and jdk has changed paths

shell robin
#

anyway

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.

shell robin
#

anyway as a said

#

This is the second time I've posted here today and I don't want people to say "trying to code others" for me

native bramble
#

i want to make mention in chat. can i use tab completer without command? like player type in chat @ and then appears tab with nicknames

smoky anchor
#

aight, who dared to delete my message in the review thread :D

smoky anchor
#

oh it's just a cute dog
I can't be mad at you

simple schooner
echo basalt
#

static aboose

simple schooner
#

static abuse?

#

oh

half bane
#
    @EventHandler
    public void onEntityPickupItem(EntityPickupItemEvent e){
        plugin.getLogger().info("pickup");
    }
    @EventHandler
    public void onEntityDropItem(EntityDropItemEvent e){
        plugin.getLogger().info("drop");
    }

All other events are firing, why these aren't?

simple schooner
#

try to print debug

half bane
#

I'm doing that already

smoky anchor
#

are you sure you registered them ?

half bane
#
getServer().getPluginManager().registerEvents(playerEvents, this);
tender shard
#

does any gradle expert know why gradle cannot find my script from buildSrc/...?

half bane
#

but drop still doesn't

#

I have no idea how

tender shard
glad prawn
half bane
#

ah you mean logging

glad prawn
#

U logging to console, i mean send to entity on that event.

half bane
#

how do i do that?

smoky anchor
#

Thrown when an entity creates an item drop.
What a weird description

glad prawn
half bane
#

i think this fires when the entity dies

#

oh there's PlayerDropItemEvent

#

ill see if it works

smoky anchor
#

Called when sniffer digs out item
when mushroom gets sheard I think
When cat gifts item to player
when entity dies by wither and drops wither rose

young knoll
#

Probably when villagers throw food around too

half bane
smoky anchor
#

I guess that event should get better description...
Wasn't there someone who was editing the docs or something ?

young knoll
#

@kind hatch

hybrid spoke
#

@young knoll

tender shard
# tender shard here's the whole repo if it helps https://github.com/mfnalex/lightpermsx

I got it working myself. Additionally to declaring the actual script in buildSrc/src/main/groovy/lightpermsx.java-conventions I also had to declare a build.gradle in buildSrc/ with the following content:

plugins {
    id 'groovy-gradle-plugin'
}

I could then apply my "lightpermsx.java-conventions" script file using plugins { id 'lightpermsx.java-conventions' } in my subproject. However gradle was also angry that i declared the lombok plugin like this in my buildSrc/src/main/groovy/lightpermsx.java-conventions.gradle file:

plugins {
    id "io.freefair.lombok" version "8.2.2"
}

I had to replace this with just id "io.freefair.lombok" (so without the version). Obviously it then complained about this plugin not being specified anywhere, which I fixed by creating a build.gradle file in the root project that consists of nothing but this:

plugins {
    id "io.freefair.lombok" version "8.2.2" apply false
}
orchid trout
#

wow that makes me really not want to try gradle

muted dirge
#

And try again

tender shard
#

and the worst thing is the docs always only explain 50%

#

e.g. it explains how to write the buildsrc script but it totally ignores that you need the groovy-gradle-plugin in the buildSrc's build.gradle

#

you really cannot read just one part of the gradle docs, you have to read literally EVERYTHING to make something work

tender shard
orchid trout
#

idk if its good that my quest and my user both know they exist, but i cant think of another way to implement it

#

i want quests to be really flexible and i dont know how

tribal venture
#

this is a loot table from a hunger game plugin. How do I make enchanted books that are usable in anvils?

echo basalt
#

I had to do something similar at work

orchid trout
#

where

#

i want to skid please

echo basalt
#

And while I don't have to display stuff in a menu so it changes the code structure a bit

tribal venture
orchid trout
#

woah

#

thats pretty cool

#

i try to replicate

hybrid spoke
#

until you have 10k lines of addStep

orchid trout
#

i probably will use it once

#

actuially id otn ting i want to im-[lement it like tat

hybrid spoke
#

having a seizure?

orchid trout
#

woah i spelt 5 words correctly

#

new pr

simple schooner
scenic zenith
#

I'm trying to determine if a player would have to turn left or right to face the target. (for a boss bar compass plugin) I guess would need the angle between the player and the location, but how could I do that?

half bane
#

How do I get the player's inventory in PlayerLoginEvent?

e.getPlayer().getInventory().getContents()

Returns an array full of nulls while the player has items

#

Nvm I replaced it with PlayerJoinEvent.
(I thought I'll need PlayerLoginEvent instead of PlayerJoinEvent for a specific task)

north trench
pseudo hazel
#

?notworking

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.

smoky anchor
#

oh fuck that's a lot of ads on that website

#

implements Listener, ok

north trench
smoky anchor
#

what is "ok"

#

That's probably the worst interface name I have ever seen

hazy parrot
#

👌

orchid trout
#

with ok replace ok

smoky anchor
#

I don't remember but can events be static ?

tender shard
#

the listener? yes

smoky anchor
#

you'd have to register it differently then no ?

tender shard
#

no

smoky anchor
#

oh ok

tender shard
#

that's why it makes little sense to make the method static, the registerEvents thingy wants a class instance

#

but it'd ofc work nonetheless

kindred sentinel
#

As far as I know, apart from MythicMobs, there are no good custom mob creators for plugins, but what if use datapacks and animated java together with the plugin, is it possible to somehow create a system with it?

smoky anchor
#

I would assume yes, you'd just have to dispatch the commands to control the entities.
But performance would probably die (compared to plugin)

kindred sentinel
#

hm

smoky anchor
#

I have heard of ModelEngine (tho that one is paid but has demo with 6 models)

half bane
#

What event is used to detect when an item is added to the player's inventory (via drop, /give, creative)?

kindred sentinel
#

I think /give and drop it's OnPickedUpItem event

#

but with creative... i'm not sure but i think that you can compare inventory before giving item and after with OnInventoryClick event but i'm not sure

smoky anchor
#

I would say the same
Since form what I know, the create inventory is special, more client controlled.

pseudo hazel
#

tgere is not a single event

half bane
#

thats bad

pseudo hazel
#

/give does not fire pickupitemevent

kindred sentinel
#

I think you could do something like...

    @EventHandler
    public void onPickedUpItem(EntityPickupItemEvent event){
//        code that you need
    }
    @EventHandler
    public void onInventoryClick(InventoryClickEvent event){

        if(event.getWhoClicked() instanceof Player){
            Player player = (Player) event.getWhoClicked();
            Inventory beforeInv = event.getInventory();
            Bukkit.getScheduler().runTask(plugin, comparingInventories(beforeInv, player));
        }
    }
    public void comparingInventories(Inventory beforeInv, Player player){
        Inventory afterInv = player.getInventory();
        if(!beforeInv.equals(afterInv)){
//        Code
      }
    }
paper cosmos
#

what is the correct way of doing setCursor()?

kindred sentinel
warm mica
#

Yes, pretty sure that pickupitemevent only gets called if you actually pick an entity item up

kindred sentinel
#

i think you could try to check if the command that was sent is /give or something like this

smoky anchor
#

give someoneelse diamond 1

would be.. non-trivial

kindred sentinel
smoky anchor
#

execute as someoneelse run give @s diamond 1

kindred sentinel
#

oh

#

idk

#

then

sand lion
#

Is it possible to make a shapelessrecipe that just returns the ingredient that was put in? For example, if I put in a diamond sword with sharpness 3, the output would be the same exact item? I'm trying to do this with every tool.

muted dirge
pseudo hazel
#

does it?

muted dirge
#

Yes

smoky anchor
pseudo hazel
#

okay, I guess I am checking wrong then

half bane
#

oh thanks

kindred sentinel
#

hmm

half bane
#

ill test it later

kindred sentinel
#

but comparing is checks when the item is added or removed from inventory..

strong parcel
#

It can be destroyed by pickup or do they have to do something with it?

#

Does that trigger an event like despawn?

viscid egret
#

is there a server for the spiget api

#

not the spigot api, but the spiget api

chrome beacon
#

An api for fetching resource information

opal carbon
#

its on their website

#

in the about section i believe

rigid otter
#

An arrow, Projectile.getShooter get i.e. Player. How about the Bow or Crossboss that use to shoot that arrow?

eternal oxide
#

not possible, unless you do it in teh launch event

rigid otter
#

If impossible, how Minecraft's enchantment work? Since the enchantment is in the Bow, and not in the Arrow.

subtle folio
#

oh wait you’re asking how to get the shooter of a projectile?

#

just listen to the shoot event and store a uuid player to uuid entity hashmap

quaint mantle
#

actually, sword with fire i think on second hand can make the arrow fire

#

even if bow doesnt have any enchantments

rigid otter
rigid otter
subtle folio
#

don’t think that’s true on java edition @quaint mantle

#

sounds like a bedrock moment

simple schooner
#

How would I load the properties of a hologram everytime the plugin starts, do I have to loop through all of the entities and check if the entity is a textdisplay?

steady rapids
#

More like a Java question but still: can I extend my "User" class which contains all methods like user.isOnSlimeBlock() to the Player interface? so I can use all the basic Player methods like: user.getName() without having to re-write all of them in my User class?

subtle folio
rigid otter
subtle folio
#

As in you would store the object yourself in a class rather than extending it. Spigot doesn’t handle the implementation of all the functions.

subtle folio
young knoll
#

Yes enchantment swapping is a thing in java

#

At least it was, may have been partially patched

subtle folio
#

Not since like ages ago

young knoll
#

I mean we can test it right now

subtle folio
#

go for it, i’ll be incredibly shocked if 1.20.1 has enchantment swapping to the extent of holding fire aspect in my offhand making my bow arrows flammable

young knoll
#

Nah of course not

#

Arrow fire is applied on shoot

subtle folio
#

Right, that’s what i thought

rigid otter
young knoll
#

Yep enchant swapping still works

#

Killed a sheep and swapped to a looting 200 sword, got a ton of meat

rigid otter
#

Why don't they store all necessary properties inside the Projectile? So that it will be independent from the player, which is the shooter.

young knoll
#

¯_(ツ)_/¯

#

Not worth the effort I guess

subtle folio
tender shard
#

anybody know if I can disable this specific warning?

#

"More actions" doesn't show anything useful

young knoll
#

Remove lombok

tender shard
#

that'd be a pain, I need it for equals and hashcode all the time

subtle folio
#

why are you using lombok warnings?

tender shard
#

well my question is how to disable them lol

#

so don't ask me

lost matrix
subtle folio
#

i believe in IJ you can disable a certain type of warning in the code settings

#

hunt around a bit

young knoll
#

I don't understand the point of the lombok code gen stuff

young knoll
#

It takes like 2 clicks to actually generate the methods

tender shard
#

thx found it

subtle folio
#

right but some argue it would be more readable to know at a glance of a member variable if it has a getter or smt else

tender shard
#

and then forget that and wonder why my hashsets aren't working anymore

#

sounds pretty lame

#

as I said, I'm using it for equalsAndHashCode and if you forget a field there, you're fucked

#

also lombok's hashcode and equals methods are better than IJ's one

quaint mantle
#

what is lombok

tender shard
#

does anyone know how I can achieve sth like this using gradle, but only for one submodule's shadow artifact?

If you’re using maven for your Spigot plugins (which you should do), it’s easy to make maven automatically save your plugin’s .jar in your plugins folder. There’s two ways of doing this: 1. The lazy way (not recommended) If you only work alone on one computer, you can just directly declare the output location in...

tender shard
#

it's java annotations on crack

quaint mantle
#

Is any way to change vanilla sounds to different one without using any nms/packet manipulation?

young knoll
#

Resource pack?

tender shard
#

yeah just use a resource pack with custom namespaced sounds

quaint mantle
#

I also want to change sound with conditions.

tender shard
hybrid spoke
#

woah

#

since when

tender shard
#

Recently

hybrid spoke
#

discord w

tender shard
#

A week or two?

lost matrix
#

Im always struggling with translations because they are a lot of work.
What would you guys think about an annotation processor which generates
translations. For example this method:

  public void someAction(Player target) {
    if(!this.combatManager.isInCombat(target)) {
      @Translated("combat.not_in_combat")
      String msg = "You are not in combat!";
      target.sendMessage(msg);
      return;
    }
    // Do something
  }

Would be replaced by

  public void someAction(Player target) {
    if(!this.combatManager.isInCombat(target)) {
      String msg = Translations.translate("combat.not_in_combat");
      target.sendMessage(msg);
      return;
    }
    // Do something
  }

While also generating a class containing all translation keys and default values.

public class Translations {

  private static final Map<String, String> translations = new HashMap<>();

  // generated
  static {
    translations.put("combat.not_in_combat", "You are not in combat.");
  }
  // end generated

  public static String translate(String key) {
    return translations.get(key);
  }
  
  public static void load(FileConfiguration configuration) {
    // Some generated code to load translations from a config file
  }
  
  public static void save(FileConfiguration configuration) {
    // Some generated code to save translations to a config file
  }

}

Resulting in a default yml when calling save the firtst time.

combat:
  not_in_combat: "You are not in combat."

This would make translatable Strings really easy to use everywhere, without having
to switch to another class and add a key/value somewhere.

Thoughts?

quaint mantle
hybrid spoke
tender shard
hybrid spoke
#

just that we named it Messages

#

and messages pulls its messages out of the translation file

tender shard
#

maybe there are and I don't know them. But still, lombok can be nice. It can also be shitty if someone is obsessed with using it all the time

#

it has its usecases sometimes

quaint mantle
lost matrix
#

That would be an interesting project for me because i've never written something that generates code
at compile time. I think ill try to tackle this when i get back.

tender shard
hybrid spoke
#

i dont think that will be useful

lost matrix
#

Hm, why?

hybrid spoke
#

looks like an extra step to me

#

you could just write the generated code

#

comes out the same

lost matrix
#

Ok, but the point here is to not having to write the generated code because its a bunch of boilerplate.

hybrid spoke
#

you could write annotations for dtos, daos and converter

#

that would be useful 🤔

hybrid spoke
#

its oneliner "boilerplate"

lost matrix
lost matrix
#

And if you want to change a key, you would have to change it in the Translations class + every instance where the key is used.

hybrid spoke
#

the keys are pre-set

#

and you just load in the different translations from different files

lost matrix
#

Ok but someone has to write this file.
I dont want to do that.

hybrid spoke
#

and then an easy peasy method #translate(Language, key)

lost matrix
#

Thats hundreds of lines of boilerplate i dont want to deal with.

hybrid spoke
lost matrix
#

Doesnt mean i cant create something that takes potentially hours of work off my chest 🙂

hybrid spoke
#

never said that, just that it wouldnt be really useful

lost matrix
#

I find having to write less boilerplate and not having to worry about keys in random
translation files having to match keys in my code, to be very useful.

shadow night
hybrid spoke
lost matrix
#

Not having to interrupt my code flow by switching to some config files is always a big plus in my books.

lost matrix
hybrid spoke
#

yeah well i dont get the point of that. you do you

lost matrix
#

The point, as stated before, is not having to write hundreds of lines in random ymls and making sure the
keys match up with the keys in my code. It would save me literally hours of work. I dont see whats not to
get there...

hybrid spoke
hybrid spoke
lost matrix
#

You must be working on tiny projects if translations only take up that little time.
-> Someone has to write the translation file. Why would i interrupt my coding by
going in a translation file, adding keys there, adding a default value, making sure
the key ive added is also used in the code, instead of simply adding an annotation
above a String? How is that not an insane improvement?

tender shard
lost matrix
#

Anyways im doing this. Maybe im wrong and its useless.
Will still learn a lot 😄

ivory sleet
#

Crowdin peepoBlush

hybrid spoke
lost matrix
#

Sounds like hundreds of manhours could be saved with my method here...

hybrid spoke
#

nope, your method would grief it actually

#

its pointless tbh

lost matrix
#

I think you dont understand it tbh.

echo basalt
#

automatically translate keys

#

At a packet level

lost matrix
#

This is an implementation detail. They still need to write the key-value translations somewhere.

#

I want to generate them from my code.

ivory sleet
#

Yea nothing wrong with that

round finch
#

yo quick question how do you make so cooldown is off when hitting?
what do i need?

ivory sleet
#

I prefer data generation if possible, tho regarding translations just fallback to crowdin noot

lost matrix
ivory sleet
lost matrix
#

Not sure i would want to do that on comile time tho

#

Anyways gtg

ivory sleet
#

Yeah cya

hybrid spoke
round finch
hybrid spoke
ivory sleet
#

Think you can manipulate just the entity no?

round finch
#

i want player attack like 1.7.10

eternal night
ivory sleet
#

Ah ye, i mean getting the identical mechanics might be a bit hard but I think just manipulate attack speed attribute somewhere

#

Either api level, if that doesnt work maybe at nms or even packet level

round finch
#

can the attribute be hidden?

ivory sleet
#

I think on items yea

round finch
ivory sleet
#

Thats an item flag iirc

hybrid spoke
#

anyways, i stated my points, i find it useless & creating circumstances. good that you try to learn with that but you will def. walk into dead ends, little spoiler.
and just like my spigot signature says: "If You Have an Idea that You Genuinely Think is Good, Don’t Let Some Idiot Talk You Out of It.”"

round finch
ivory sleet
#

Lol good luck apprentice?

round finch
#

i learned most of my stuff from this discord thb 🙂

ivory sleet
#

(:

glossy venture
#

anyone know how to display an image and text side by side in a gh readme

tender shard
# eternal night just a plain Copy task ?

yep! emily already suggested that, at first I had issues with that because I used the git bash /c/path notation and that just failed silently lmao. got it working with this

tasks.register("exportToTestServer", Copy) {
    dependsOn build
    from shadowJar.archiveFile
    into 'C:\\mctest\\plugins'
}
eternal night
#

don't even need to dependsOn

#

gradle should already infer that

shadow night
#

Wait, you can launch a testing server from IDE?

eternal night
#

why groovy tho Sadge

#

with gradle pretty easy yes

tender shard
slender elbow
#

lynx stfu

tender shard
#

yeah lynx stfu

eternal night
#

build task is a idk what the name is task

#

it does nothing

tribal quarry
eternal night
#

it is just there to depend on other tasks

small current
#

agreed stfu

ivory sleet
#

Kotlin dsl supremacy uwu

eternal night
#

so when people run "build", they get the expected result

slender elbow
#

yeah there are two kinds of tasks, uh, the ones that actually do the things, and the ones that like collect other tasks

#

actionable and uh

eternal night
#

something something

#

I miss octy

slender elbow
#

true..

tender shard
slender elbow
#

lifecycle tasks i think?

eternal night
#

oh yes

#

smart emily

slender elbow
#

definitely didn't google that one

tender shard
ivory sleet
round finch
#

java-custom-annotation aMindBlown

tender shard
ivory sleet
#

Fairs

slender elbow
#

gradle java dsl when

ivory sleet
#

Fr

eternal night
#

but yea, don't need specify it I think. Gradle should notice that you need shadowJar contents, so you automatically depend on shadowJar

tender shard
#

everytime I want to give kotlin a try, I get overly aggressive after 5 minutes and switch to java again

#

so yeah, no, I will not use kotlin for gradle

slender elbow
eternal night
#

your doubts in me

#

it's wild

tender shard
#

well my shadowJar config currently looks like this. let's comment out the dependsOn part quickly and see if it still runs shadow

eternal night
#

what

#

no no no

#

not on the build task

#

the build task needs it

#

its a lifecycle task

#

the copy task does not need a depends on build

#

its gonna depend on shadowJar implicitly via calling the output on the shadowJar task

slender elbow
#

also 🤓 techzksnically you'd use assemble, not build

eternal night
#

fuck off

slender elbow
#

not like it really matters but gradle enthusiasts wi

#

wow

#

okay

eternal night
#

payback for my stfu earlier

slender elbow
#

you want me to do as octy as well?

tender shard
#

wellso you mean I shall just declare exportToTestServer without dependsOn?

tasks.register("exportToTestServer", Copy) {
    from shadowJar.archiveFile
    into 'C:\\mctest\\plugins'
}
eternal night
#

yee

tender shard
#

NEVER

#

I could never reconcile this with my conscience

slender elbow
#

lol

tender shard
#

I want to explictly tell it that it should run after it build all the stuff

eternal night
#

off to submitting my ESTA I go

tender shard
#

it shall not work just because I randomly called shadowJar.archiveFile

eternal night
#

emily can help ya with the rest

#

I am sure

tender shard
#

what's an ESTA

slender elbow
#

esta dn or something

#

probablyt

eternal night
#

Electronic System for Travel Authorization

tender shard
#

Einkommensteueranmeldung

eternal night
#

so US border controll doesn't fuck me

#

for thanksgiving

tender shard
eternal night
#

no

tender shard
#

where they asked you if you were responsible for 9/11

eternal night
#

you fill it out before

tender shard
#

yeah but 15 years ago you did it on the plane

#

I remember how they asked if I prepared the 9/11 attacks becauuuse

#

if you lie on that form they can prohibit you from entering

echo basalt
#

I had to do security stuff at an airport in kiev a couple years ago

#

wasn't fun

tender shard
#

ok just to understand, so I wanna have the logic right instead of just making it work (everything works btw, thanks!)

/buildSrc/src/main/groovy/lightpermsx.shade-all.gradle

plugins {
    id 'com.github.johnrengelman.shadow'
}

build {
    dependsOn shadowJar
}

shadowJar {
    archiveClassifier = ''
}

/bukkit/build.gradle

plugins {
    // ...
    id 'lightpermsx.shade-all'
}

// ...

tasks.register('exportToTestServer', Copy) {
    dependsOn build
    from shadowJar.archiveFile
    into 'C:\\mctest\\plugins'
}

This means that when I run "exportToTestServer" it MUST run build beforehand, right? And through build { dependsOn shadowJar } in my buildSrc script, I tell it that it MUST also run shadowJar when i run build, is that correct?
And if I were to remove the dependsOn build, then it would still work, but I don't want that because I want to explicitly mark it as dependsOn - is this all correct / did I understand this right?

#

because this is confusing, what does shadowJar depend on? what if I were to run this alone?

tender shard
#

most people just throw everything into allprojects { }and call it a day

#

or blindly copy/paste other people's code

#

usually noticble if they sometimes use ' quotes, sometimes " quotes, sometimes (syntax) and sometimes not, etc

tribal quarry
#

repositories like paper, spigot

tender shard
#

yeah that's discouraged in the gradle docs

#

you should do that in a custom script in buildSrc and then include that as plugin in the modules where you need it

tender shard
#

why does it say all tasks are up to date even though I changed a class and now the tests wouldn't compile? 🥲

#

seems like I manually have to do build { dependsOn test } too?

opal juniper
#

sounds about right

opal carbon
north trench
#

Does any one know who to add a cooldown on a right click?

hybrid spoke
solemn meteor
#

if I get a value from a FileConfiguration (YamlConfiguration) but the option doesnt exist, will it error or just return null?

echo basalt
#

null

hybrid spoke
#

null

solemn meteor
hybrid spoke
#

because its a stringlist

echo basalt
#

getStringList is an exception and returns an empty list

hybrid spoke
#

that one will be empty

solemn meteor
#

yep, it goes away when I just use getString

#

thanks

echo basalt
grim hound
#

yooo I just found out that switch statements with the class name are like 250 times faster than checking the exact same amount of cases by using instanceof

rotund ravine
#

Source?

pseudo hazel
#

trust them bro

round finch
#

So custom annotion is a thing

#

Does that involve interface

#

🤨shrug

#

?

tender shard
round finch
#

Idk how do that or nor do I get it

#

😅

#

Fx like @mfnalexEvent

echo basalt
#

public @interface mfnalexEvent {

#

in theory it works

#

but idk I don't play with annotations

#

they're a gimmick

round finch
#

Can you do like spigot/bukkit way of doing it?

#

Over method

tender shard
#

what

echo basalt
#

mans not making one ounce of sense

paper venture
#

My plugin loads a lot of different worlds and then it takes about 9 GB. (-Xmx12G). Will my permormance fall significantly if I set it to -Xmx4G?

echo basalt
#

uhh

tender shard
#

try it

echo basalt
#

You might run into OOM issues

#

but fuck it, try and see

#

you only live once

round finch
#

@mycustomeevent
Public something(){}

#

Like that

paper venture
#

okay

round finch
solemn meteor
#

how will this cause a null pointer exception? It says if its unresolved, itll be null. Are there instances that the player's address might be unresolved?

tender shard
tender shard
tender shard
solemn meteor
tender shard
#

i'd at least do a null check

round finch
#

That looks weird to me public @interface something()

#

🤣

tender shard
#

yeah that's also wrong

tribal quarry
tender shard
#

if at all you'd be using { }

round finch
#

I'm on phone lol

#

I like annotion better over the method

#

🤣

#

But thanks guys for sharing and guidance

smoky oak
#

what's the default behaviour if given wrong arguments? Returning without doing anything, or throwing an exception? The description in the javadocs doesnt say
Here, AttributeInstance#remove(AttributeModifier), I'm wondering if it causes an error if the instance doesnt have the named modifier applied

lilac dagger
#

but instance of actually checks if they are in common rather than their bottom class being the same

slender elbow
#

goofy ahh System.currentTimeMillis "benchmark"

quaint mantle
#

wait no

#

check for null

#

lol

river oracle
slender elbow
#

not with that attitude :^)

river oracle
#

📈

lilac dagger
#

what exactly are you supposed to use if not those 2? 🤔

#

pretty sure libs a the core use those too

#

with warmup and all to prevent bad data

grim hound
twilit roost
#

has anyone made auto update configs?

e.g.: v1.0 has typo in some naming:

insuficient-permisions: ...

and they fixed it in v1.1 but want to transfer the previous setting to the current naming:

insufficient-permissions: ...

how could I make something like this, but without having to manually add what I want to be transfered due to change or sum

subtle folio
#

the way you would create a config based on how you want to do it is manually storing alterations of one variable and using file objects inside of java

hasty prawn
#

Why not just add the new row with whatever value is set to the old one, then delete the old one?

twilit roost
subtle folio
subtle folio
twilit roost
#

afaik spigot api also removes comments when you use Configuration#set
soo maybe I should make my compeltely own config system?

subtle folio
vital sandal
#

is there anyway to reset the data of a player completely?

subtle folio
vital sandal
#

hmm like

#

like they log out and log in

tender shard
vital sandal
#

I want them to have fresh data after login (just need to clear advancement cache)

twilit roost
tender shard
#

no, the bungeecord config system is horrible

subtle folio
twilit roost
#

cries in bungeecord

vital sandal
#

hmm I'm doing something about advancements

tender shard
#

on bungeecord I usually just use SnakeYaml

vital sandal
#

I need the advancement needed to be reseted

tender shard
subtle folio
#

that’s the player data folder

subtle folio
vital sandal
subtle folio
#

a casting nightmare

river oracle
vital sandal
#

when player log out it is in the file

subtle folio
vital sandal
#

I need to reset it without making player log out

subtle folio
#

east method right i’m there

#

easy*

vital sandal
#

but I need it to not showing the toast

#

so I'm using the PacketPlayOutAdvancement

subtle folio
#

what?

#

not showing the toast ?

vital sandal
#

yeh

#

advancement toast

subtle folio
#

Iterator<Advancement> iterator = Bukkit.getServer().advancementIterator();
        while (iterator.hasNext())
        {
            AdvancementProgress progress = event.getPlayer().getAdvancementProgress(iterator.next());
            for (String criteria : progress.getAwardedCriteria())
                progress.revokeCriteria(criteria);
        }```
#

this doesn’t work for you?

vital sandal
#

nope

subtle folio
#

error?

vital sandal
#

now it is this for me

vital sandal
#

like :l

#

I got a customer

#

who doesn't like bungeecord

#

so he decide to do it this way

subtle folio
vital sandal
#

he save everything player have and load it back on another profile 😄

subtle folio
#

i’m not sure i understand

twilit roost
vital sandal
#

hmm

vital sandal
#

you have diffirent inventory for each worlds

subtle folio
#

alright

#

and what about that stops resetting advancements from working?

vital sandal
#

what?

subtle folio
#

what is your issue

vital sandal
#

I got it working now

alpine urchin
#

he has a personal one with you

#

@vital sandal nice

vital sandal
#

but the issue come when I load it

subtle folio
#

oh so loading a players advancements is not working?

alpine urchin
vital sandal
#

it is kinda hard to display

subtle folio
#

send some code

vital sandal
#

I got something better

subtle folio
#

this is normal minecraft behavior

#

i’m not sure what packet would disable that

#

you could listen for them and stop them from being sent butzz

vital sandal
#

you could?

smoky oak
#

if(!speedUpdater.isCancelled()) speedUpdater.cancel();
java.lang.IllegalStateException: Not scheduled yet
?

slender elbow
# lilac dagger with warmup and all to prevent bad data

it's not that simple, if you simply run something in a loop to "account for warmup" that eventually isn't going to yield anything useful, first you need a wide set of varied data to actually benchmark (pick random classes from a set etc), so the jit doesn't get clever and is like "this entire tree of checks is useless if the same one is being picked all the time". then you have the whole gc thing and the fact that you have to put the result of your things somewhere so that the jit doesn't literally throw everything away because "it doesn't really do anything", blackhole it
jmh takes care of and accounts for those and many more things and it is very easily parameterisable too

lilac dagger
#

oh i see

#

i gotta learn jit and gc

slender elbow
#

the JVM is wild

#

or, well, hotspot is

smoky oak
vital sandal
#

hmm about advancement

#

I could change the Advancement Data from shouldShowToast to false with reflection right?

smoky oak
#

oooh it's not scheduled to run in the first place

#

is there a way to query if a task is scheduled without getting an exception?

#

cuz this also throws one

lost matrix
# hybrid spoke also this is wrong. it takes 2 secs to add a new line

Sounds like a serious over-exeggeration.
Switching from class to config -> 2s+
Finding right position -> 2s+
Writing proper key & default value -> ~10s
Switching from config to class -> 2s+

So at the very least 16s for all of that.
Then add an average of 4s per line because of runtime
conflict debugging (cant ensure key match on compile time with your method).
And you claimed 10k+ lines.
Thats 200k seconds or ~55h of simply writing translations into
a config file.

quaint mantle
#

Is it possible to modify NMS/Spigot source in plugins using Instrumentation?

#

Or something like JVMSelfAttach

lost matrix
hybrid spoke
#

and you should too

lost matrix
#

Yeah

quaint mantle
hybrid spoke
#

but they gave up on smth not sure what it was

slender elbow
#

you can't really modify a class that's already loaded without a proper JVM prepared for hotswapping like the jbr

chrome beacon
lost matrix
chrome beacon
quaint mantle
grim hound
pseudo hazel
#

what would the point of that even be though

pseudo hazel
#

you just compile your plugin with the library

slender elbow
#

not really possible, to properly do mixins you need to wrap the entire server classloader for mixin support and read the mixins from plugins at, like, psvm lol

quaint mantle
#

Can't java agents modify bytecode on runtime?

slender elbow
#

modify a clasa that is being loaded, but not one that's already been loaded, unless again you're using a hotswapping prepared jvm etc

smoky oak
#

Very Terrible Solution ™️

public abstract class VoidRunnable extends BukkitRunnable {
    private boolean isScheduled = false;

    public synchronized boolean isScheduled() {
        return isScheduled;
    }
    
    @Override
    public synchronized void cancel() throws IllegalStateException {
        isScheduled = false;
        super.cancel();
    }

    @Override
    public synchronized BukkitTask runTask(Plugin plugin) throws IllegalArgumentException, IllegalStateException {
        isScheduled = true;
        return super.runTask(plugin);
    }
  ...
}
lost matrix
slender elbow
#

and even then with the jetbrains runtime you are limited to changing method bodies, not really adding/removing methods or fields

quaint mantle
#

I was able to add bytecode to the start of FriendlyByteBuf#writeId

slender elbow
#

that is changing method body yes

quaint mantle
#

Yeah

#

Thats basically all I need

chrome beacon
#

or you could just use Protocollib?

quaint mantle
chrome beacon
#

Intercepting the packet is much easier

lost matrix
#

Currently reading up on annotation processors. I did not know that you can
annotate types since java8?

#
// Class instance creation expression
new @Interned MyObject();

// Type cast
myString = (@NonNull String) str;

// implements clause
class UnmodifiableList<T> implements @Readonly List<@Readonly T> {...}

// Thrown exception declaration
void monitorTemperature() throws @Critical TemperatureException {...}

TIL

silent cove
#

sorta development related, but if any of ya'll use gitbook with a custom domain -- how do you make your custom domain point to the root /. mine always appends a default /some-page route to the url and i can't figure out how to not do that

carmine mica
#

it also fixes nullability for arrays

#
public @Nullable String @NotNull [] getStrings() {
}
remote swallow
#

i would love a better way that double annotating but it works

carmine mica
#

ofc spigot api doesn't use java 8 nullability stuff, so the array annotations in spigot api are broken

lost matrix
#

Readability wise i like the former more

hybrid spoke
smoky oak
carmine mica
#
public @NotNull List<@Nullable String> getStrings() {
}

you can't do that with the first

#

and if you want to annotate the generics, they should be in the same place

#

and if you want to be consistent, you should annotate the type rather than the method

lost matrix
lilac dagger
#

i wish intellij had a @Empty and @NotEmpty

hybrid spoke
#

he wanted to look into annotations anyways

eternal night
#

the fuck is empty and not empty gonna do KEKW

carmine mica
#

yeah, im curious about that too

lilac dagger
#

it's for some strings

lost matrix
lilac dagger
#

like a Path class

smoky oak
eternal night
#

what string would be useful for annotate with not empty

lilac dagger
#

i mean blank for path

#

like this

lost matrix
lilac dagger
#

it's a very specialized issue

#

so not really worth

eternal night
#

I mean

lilac dagger
#

but would be cool to have

smoky oak
# lost matrix Ok but why do you need to check if a runnable is queried?

because said runnable might run and operate on a no longer existent value throwing a NPE
The runnable has to wait two ticks cuz minecraft is dumb and events fire before the actual event gets processed said two ticks later
So if the state the runnable depends on changes in those two ticks -.-

eternal night
#

none of the annotations are enforced at runtime

#

unless you use intellij to compile that stuff

#

you can use like, @Pattern from the jetbrains lib if you want to prevent empty strings I guess

slender elbow
#

"none of the annotations are enforced at runtime"
"unless..." something that has nothing to do with runtime

ivory sleet
#

🥲

slender elbow
#

tsk tsk

lost matrix
eternal night
#

unless you send them fox tail pictures

slender elbow
#

ha

eternal night
#

but yea, usually annotations don't save you from still calling preconditions/validate

#

they just make the developer experience a shit load nicer

#

because even thicc skulled people like emily get a nice warning when they pass null into their fav method

ivory sleet
#

Lmaoo

lost matrix
#

But there are some annotations that can be used for checks. This is only usefull if your IDE actually understands the logic
behind those annotations tho.

eternal night
#

Well, "can be used for checks" depends on your compilation chain tho

#

May we just all hope jspecify saves us

lost matrix
#

Static code analysis is hard. And i dont see a nice way to enforce the "Empty" and "NotEmpty" annotations for collections...

smoky oak
lost matrix
#

What prevents you from prepending your runnable with something like

if(!stillHasState(player)) {
  this.cancel();
  return;
}
// Do the usual
#

Simply dont run it if the player doesnt have the desired state later on.

ivory sleet
# eternal night May we just all hope jspecify saves us

Yeah well isn’t that just @NonNullByDefault followed by @Nullable upon explicit declaration of it. I think I saw this project a year ago or two when they still had a couple of problems to solve (which they may still have)

smoky oak
#

because the marker for said state gets removed after the handlers and runnables are supposed to be removed, not before

ivory sleet
eternal night
#

would be nice tho to have a joined annotation collection

ivory sleet
#

Absolutely

eternal night
#

so I don't have to pick between three different projects

ivory sleet
#

🥲

lost matrix
# smoky oak Alright, i formulated that wrong. If a player loses a certain state, I need to c...

But i would suggest doing this:

public class SomeSpecialRunnable extends BukkitRunnable {

  private final List<UUID> players;

  public SomeSpecialRunnable() {
    this.players = new ArrayList<>();
  }

  public void addPlayer(UUID playerId) {
    this.players.add(playerId);
  }

  public void removePlayer(UUID playerId) {
    this.players.remove(playerId);
  }

  @Override
  public void run() {
    players.stream().map(Bukkit::getPlayer).forEach(this::someSpecialAction);
  }

  private void someSpecialAction(Player player) {
    // Do something special
  }

}

Simply schedule this runnable when the server starts. Then add/remove players to/from it when their state changes.

#

Or if you want the player to be automatically be dropped when they are offline or not valid anymore

public class SomeSpecialRunnable extends BukkitRunnable {

  private final List<UUID> players;

  public SomeSpecialRunnable() {
    this.players = new LinkedList<>();
  }

  public void addPlayer(UUID playerId) {
    this.players.add(playerId);
  }

  @Override
  public void run() {
    this.players.removeIf(playerId -> {
      Player player = Bukkit.getPlayer(playerId);
      if (!this.stillValid(player)) {
        return true;
      }
      this.someSpecialAction(player);
      return false;
    });
  }

  private boolean stillValid(Player player) {
    if(player == null) {
      return false;
    }
    // Other checks
    return true;
  }

  private void someSpecialAction(Player player) {
    // Do something special
  }

}
quaint mantle
#

hey can i delete my spigot account?

remote swallow
#

cant you use a WeakList, or is that not a thing

lost matrix
#

You can use a List<WeakReference<Player>> if you really want to

#

WeakList would be a bit weird because you have no idea what this list is backed by.

#

For example a LinkedList here makes the removeIf operation O(1) which is really nice.

lost matrix
smoky oak
#

actually

#

can you set the reference to a runnable to null from inside itself?

#

cuz if i just do that when it runs i can null check it, and if it's null its no currently scheduled

lost matrix
#

Aromic 🍒 lol

lost matrix
smoky oak
#

I'm convinced i can do this without try/catch

lost matrix
#

You are doing something that will break or be really hard to work with later on.

#

Where do you need a try catch?

smoky oak
#

to check if its scheduled, to cancel it if it is

#

there's no way to check that without potentially throwing IllegalStateException

lost matrix
#

How about you dont cancel your tasks?
Just start a single task when the server starts.
Inside this task you keep a List<UUID> for all players that need to be ticked by the task.
If a player leaves or loses his state -> simply remove him from the List.

Scheduling repeating tasks for each player is a management nightmare.

smoky oak
#

it's not a repeating task

lost matrix
#

Aahhh. I see what you are doing.

#

Its for switching the main hand, right?

smoky oak
#

almost

#

its for everything changing the focus item

#

which for SOME reason takes 2 ticks to properly update item held and generic attack speed

lost matrix
#

Ok, i see the problem. Let me think of something nice for this...

eternal oxide
#

you can;t cancel a non repeating task

smoky oak
#

uh

#

wrong

#
BukkitRunnable testRunnable = new BukkitRunnable() {
            @Override
            public void run() {

            }
        };
        testRunnable.runTaskLater(Echo.getInstance(),200);

        testRunnable.cancel();
#

i specifically tested that

remote swallow
#

why do you want to cancel it

smoky oak
#

this doesnt throw an error

remote swallow
#

just return in it

quaint mantle
lost matrix
smoky oak
#

wym schedule a new task?

#

like an empty one?

#

but that still wouldnt get rid of the task if its already scheduled would it?

lost matrix
#

But you dont need to get rid of the task. It will be executed like normally
and then 2 ticks later the new calculation will be ran.

smoky oak
#

well the problem is, that task manipulates a player object

#

one of the ways the state can be lost is by quitting

#

NPE

lost matrix
#

If you pass a Player to the task then it wont be null, even when the player quits.

#

If you switch to an item and then back, does your system clean up the stats this item provided?

smoky oak
#

yesnt

#

it just calls another runnable

#

so it gets set wrong and then set correctly one or two ticks later

lost matrix
#

Ok so if you switch to an item for one tick, then after 2 ticks you have the item effects and after 4 ticks you lose them again.
I dont see a problem.

#

Unless you want to prevent players from achieving the effects for 1 tick.

smoky oak
#

thats not really an issue, the problem is that under certain circumstances it causes exceptions

#

I have one 'clean up' method, which sets everything back to default

#

but that leaves the runnable

ocean hollow
#

How do I create my dependency? I posted it on github. Next, I added the repository:

        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>```
what's next?
```        <dependency>
            <groupId>org.gt</groupId>
            <artifactId>HeadHunter-Locations</artifactId>
            <version>1.0.0</version>
        </dependency>```

the dependency is red and writes that nothing was found in the OTHER repository
lost matrix
#

Then dont run it if the player is no longer online. No NPE then 🙂

ocean hollow
lost matrix
remote swallow
#

that dep is wrong

#

its going to always be io,github.youraccount

lost matrix
#

true

ocean hollow
#

so what should I do?

remote swallow
#

send ur repo

ocean hollow
lost matrix
#

Isnt it com.github.YourName.YourRepo or something

remote swallow
#

^^

ocean hollow
#

still doesn't work

remote swallow
#

not a valid version

#

it failed to compile too

ocean hollow
#

so I need to do this?

remote swallow
#

no, v1 just failed to build

#

you need to fix that first

eternal oxide
#

jitpack will default try to compile using java 8 unless you tell it otherwise in a jitpack.yml

ocean hollow
remote swallow
#

it also failed to build

#

paper api wants java 17, you build with java 16

ocean hollow
#

seems to be selected 17

quaint mantle
#

what about gradle build config or whatever

ocean hollow
#

and they seem to be the same, if you download resources from them, then this repository will be there

autumn cave
#

Where can I find that pull request?

ocean hollow
remote swallow
#

?stash

undone axleBOT
autumn cave
#

I need to login

remote swallow
#

u signed the cla yet?

autumn cave
#

Idk what is cla?

undone axleBOT
remote swallow
#

contributing license agreement

#

you have to sign it to access stash prs

carmine mica
#

gotta give your first born child, etc. address and stuff

#

although that's the full patch, not the diff

young knoll
#

You don't

remote swallow
#

they will

eternal night
#

should deprecate them 😏

lost matrix
autumn cave
eternal night
#

i just hope we can all happily move on from API level format methods once string templating hits 🙏

river oracle
#

10,501 years

remote swallow
lost matrix
autumn cave
#

xd, fair

eternal night
#

preferably we get string templating soon

autumn cave
eternal night
#

then people can just use the component methods with something like sendMessage(LF."§aHi there")

lost matrix
eternal night
#

in 21

lost matrix
#

I should start reading JEPs again...

slender elbow
#

it entered in preview directly

eternal night
#

yea

#

so hopefully landing sooner than later

#

and people can stop sobbing about needing api level format support (for incomplete formats)

carmine mica
#

legacy, will-be-removed, jank section char color codes are bad.

#

components are good, more powerful. and if you still want strings you got minimessage (or some other string-based format)

slender elbow
#

like legacy :^)

river oracle
#

&4Mini Message is the greatest!

eternal night
#

minedown at least

#

if you wanna remember random codes

carmine mica
#

§x§f§6§8§3§8§3hi is great right?

river oracle
remote swallow
#

yes

river oracle
#

I use MineDown

eternal night
#

I am sure it will also provide a nice string template processor

river oracle
#

got my sweet BaseComponent 🙂

carmine mica
#

ah yes, BaseComponent[]. super nice to work with

river oracle
#

I use BaseComponent

#

I removed the array

eternal night
#

and then we are in the beautiful world where the API can leave behind the legacy trash, people just use like MD."" or MM."" in their methods

river oracle
#

I couldn't wait for choco's PR

eternal night
#

and the server side can be happy

river oracle
eternal night
#

👀

river oracle
#

real question guys why does it matter hard coding strings is sinful repent from your ways

eternal night
#

the JEP is rather nice, dunnon what you are on about orbyfied

north nova
#

imagine u have to change it at some point

north nova
#

u have to replace it everywhere

eternal night
#

I mean

#

but then you are already in component only land

#

so w/e

carmine mica
#

also, basecomponent isn't immutable which is jank

#

makes it hard to work with from an api consuming input. have to clone it in order to not screw with plugins

river oracle
#
    public static BaseComponent unarray(final BaseComponent[] components) {
        TextComponent base = new TextComponent();
        base.setExtra(List.of(components));
        return base;
    }
#

totally valid and safe 😎

eternal night
young knoll
#

Everything is mutable with enough memory jank

river oracle
lost matrix
eternal night
#

doesn't baeldung have something nice on this

quaint mantle
eternal night
#

i recall playing around with their tutorial

river oracle
lost matrix
#

Not sure if it goes deep enought for me. Ill take a look.

quaint mantle
#

xml is weird html

eternal night
#

iirc they made a full builder from annotations

river oracle
eternal night
#

which should get you most of the shit you need for basic code gen

north nova
#

gradle is more powerful than maven

quaint mantle
#

i rather would use yaml or json lol

lost matrix
quaint mantle
north nova
#

groovy-based\

#

u can do a lot of shit with it

quaint mantle
#

not groovy only

north nova
#

ktl

quaint mantle
#

kotlin is also here

north nova
#

same shit

naive loom
#

I have a system right now where I'm adding vectors to a map because I'm trying to seperate this into a sort of "model" to be able to be copied, right now the origin is setting at the block of jungle wood. (the one to the left of the white wood) and I would like the origin to start at the bottom instance of amethyst, how could I do that?

quaint mantle
#

no same shit

#

gradle uses kotlin by default

#

and kotlin and groovy is two different things

north nova
#

:\

quaint mantle
#

the syntax is whole different lol

lost matrix
north nova
#

it's syntax, yeah

lost matrix
#

Kotlin DSL needs to be explicitly used. Groovy is the default.

north nova
#

ktl is type safe

#

which is

#

why would u care

quaint mantle
north nova
#

for gradle

quaint mantle
#

look at latest updates to gradle

lost matrix
#

Let me check

quaint mantle
#

8.2 gradle uses different language by default

north nova
#

LOL

#

months old

quaint mantle
#

yeah

north nova
#

cool

subtle folio
#

😳

lost matrix
#

I like this

quaint mantle
#

kotlin is way better tho, way better intellij support and looks better than groovy

subtle folio
#

groovy has better support

quaint mantle
#

nah

north nova
#

i would argue it's "better"

subtle folio
#
  • fuck kotlin
quaint mantle
#

kotlin best
groovy is just dynamic typed shit

#

also kotlin is null safe by default

lost matrix
#

groovy has that nasty js smell on it.
imo kotlin is way nicer

quaint mantle
#

yeah

smoky oak
#

is a horse a vehicle? I'm trying to determine if a player's attack is a crit

quaint mantle
#

groovy is weird dynamic typed language with java syntax

subtle folio
#

only argument for kotlin is null safety,

north nova
#

find parent classes

quaint mantle
#

kotlin also have properties

north nova
#

and see

quaint mantle
#

and auto generates huge amount of useful code

#

and many syntax short cuts

slender elbow
quaint mantle
#

and JavaScript is bad

#

php has better features than JavaScript

slender elbow
#

also have you seen the groovy runtime

#

it scares children

quaint mantle
#

no, no body uses it

slender elbow
#

and adults alike

north nova
#

this keyword in javascript >>>>>>>>.

#

:3

eternal night
#

which is why we should move to php

quaint mantle
#

JavaScript is weird

#

lol

worldly ingot
slender elbow
#

lynx you need to learn the ways of java applets

dry hazel
worldly ingot
#

Will finalize Spigot's chat API afterwards

slender elbow
#

the groovy runtime is cruel to groovy yes

worldly ingot
#

Then looking into better hover events

#

Then looking into either adopting MiniMessage syntax, or MineDown

remote swallow
#

i will smack you

worldly ingot
#

Still wish y'all didn't drop MiniMessage support for BungeeChat

#

That's going to waste my time

lost matrix
#

Fk i cant modify existing files with an annotation processor unless i modify the AST via some internal compiler APIs cryngpepe

quaint mantle
#

actually, does spigot support the message securities added in 1.19.2+

#

or something like that

worldly ingot
#

Yes, but BungeeCord doesn't iirc

#

Or at least it's difficult to

#

Velocity's struggled with similar issues

slender elbow
#

the update that killed proxies

river oracle
#

doesn't chat securities break if you use any chat plugins though

quaint mantle
#

yeah

river oracle
#

kinda lame addition if it breaks the second I want to make my chat look cool 🆒

quaint mantle
#

most chat plugins just replace your message with system message type anyways

#

so there is no point

#

Does serverbound mean its sent to the server?

river oracle
#

oh yeah 😎

quaint mantle
#

Thanks

river oracle
#

lol

remote swallow
#

i was trying to find duff man

#

but that was the only subtitles

smoky oak
#

player.getAttackCooldown() <= 84.8f
Why's this false on a fully charged attack?

quaint mantle
#

intellij just crashed on me 😭

#

and it keeps crashing

subtle folio
smoky oak
tender shard
#

best clazz

opal juniper
#

for tests?

tender shard
#

yes

subtle folio
opal juniper
#

lol

tender shard
subtle folio
#

biggest issue with spigot is no test

#

you could follow the Mockito pattern

tender shard
#

if I call it Player I'll have import issues in the bukkit module

subtle folio
#

and do MockPlayer

tender shard