#help-development

1 messages · Page 2143 of 1

slim kernel
#

can I update json files? Or do I need to delete it and create it again with the new information?

radiant cedar
#

i did the clean mackage thingy

#

gave this error

tender shard
radiant cedar
#

i did this

#

and gave that error

tender shard
radiant cedar
#

yes it gives the error

#

i tried it again

#

maybe i try deleting the s

#

i added on hhtp

#

doesnt help

#

this is the whole error

lost matrix
#

This is a very simple setup. I only have kt open rn but its not that different in java:

object CombatTag {

    private const val DELTA_MS = 5000
    private val KEY = NamespacedKey.fromString("yourplugin:last-damage-timestamp")!!

    fun getLastDamaged(player: Player): Long {
        return player.persistentDataContainer[KEY, PersistentDataType.LONG] ?: 0L
    }

    fun setLastDamaged(player: Player) {
        player.persistentDataContainer[KEY, PersistentDataType.LONG] = System.currentTimeMillis()
    }

    fun isInCombat(player: Player): Boolean {
        return System.currentTimeMillis() - getLastDamaged(player) < DELTA_MS
    }

}
tender shard
#

oh yeah I see the reason

ivory sleet
#

oo smile you're kotliner now?

tender shard
#

their repository URL is wrong and also insecure lol

radiant cedar
#

loll

#

ok

tender shard
radiant cedar
#

what should I used for nametags above ppls heads then

tender shard
#

oh wait no

#

seems to be fine

#

try to use version 4.5.0

#

instead of 4.1.16

lost matrix
tender shard
#

4.5.0 should be working fine

radiant cedar
#

it works now

tender shard
#

and tell the author to update their docs if they actually told you to use version 4.1.16

#

because that version is so old, they don't even have it in their repo anymore

tardy delta
#

is the package name the group id of a maven project?

tender shard
#

no

tender shard
#

you can use anything you want as group id

#

for example, I always use com.jeff_media as groupid (or de.jeff_media) and my package names also always start with that. but it's not a "law" that you HAVE to do it this way

tardy delta
#

my group id is me.fourteendoggo and my package name is me.fourteendoggo.xkingdoms

tender shard
#

but people do not HAVE to do it like this

#

for example, lombok uses "lombok" as package name but their group and artifactid is "org.projectlombok" and "lombok"

tardy delta
#

ok

#

good

#

i guess this will work

#

for what is a dependency reduced pom btw?

tender shard
#

hm I cannot explain that

#

it's for transient dependencies

tardy delta
#

i always see that file around when i shade

tender shard
#

it's useful if you want to include your current project as dependency in another project

#

but tbh I don't understand enough of this to explain WHY it's useful in this case lol

tender shard
#

just don't worry about it lol

radiant cedar
#

nametagedit didnt work @tender shard can u help use teams for players nametags

tender shard
#

no, I can't help with that

radiant cedar
#

ok

tender shard
#

ask the author of the lib why it "didn't work"

radiant cedar
#

the problem was most likely

#

me

tender shard
#

or better explain what exactly "didn't work"

#

because "didnt work" is probably the most useless explanation in the history of explanations, maybe ever

#

?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.

tardy delta
#

shall i just remove it lol?

tender shard
radiant cedar
tardy delta
#

idk lol i was folliwing the guide on the acf page

radiant cedar
#

these just didnt do anything

tender shard
radiant cedar
#

the last one didnt hide the player nametag and the other ones didnt do anytthing either

tender shard
#

erm

#

by using List#add(T) ?

#

that will add it to the list, yes, BUT

#

it will not save it to the file

#

to also save it to the file again, you also have to call Plugin#saveConfig()

#

oh yeah you also have to do getConfig().set("my-list",myList);

#

sorry I forgot about that

#

yep

lost matrix
#

But usually you dont want to do something like this.
When the server starts -> load your whole config into classes and fields with appropriate names.
During uptime -> Use those objects
When the server stops -> save the objects back into configs
You can also save them every 15min or so just to be safe.

But please: Do not constantly read/write data to files whenever you need it.
It unnecessary, very slow and causes lag really fast if you are not careful.

tender shard
#

and if you decide to save a file, do it async (exxept for in onDisable)

prime kraken
#

Hello all, hope you are good, I've got one question, I've this error in my log when i rightClick on my ATM, I'm using, Vault for the Economy System; ``` at fr.valdara.valdara.VaEconomy.EconomyCore.getBalance(EconomyCore.java:90) ~[?:?]

at fr.valdara.valdara.VaEconomy.BankGUI.atmClick(BankGUI.java:81) ~[?:?]``` and the error is ; ```Could not pass event PlayerInteractEvent to Valdara vBETA

org.bukkit.event.EventException: null```

tardy delta
undone axleBOT
tardy delta
#

my feeling is telling me about a npe

lost matrix
tender shard
tardy delta
#

shh

prime kraken
#

I can't paste

#

To long

#

wait

slim kernel
#

Does anyone know how I can update json files?

sharp flare
lost matrix
#

For very big files you can also stream it.

#

Gson has some utility for both methods.

tender shard
undone axleBOT
slim kernel
tender shard
#

obviously it's a string though

prime kraken
#

Yes it's the amount of money in your bank

tender shard
#

I doubt it

#

noone in the history of bank accounts ever had "27f2b76fc14d€ sur ton compte" in their bank account

#

because it's not a valid number lol

prime kraken
#

XDDD logic

#

Execept me now

tender shard
#

even the part in front of the € sign is not a valid number

vocal cloud
#

Is that hex?

quiet ice
#

Even if we generous 27f2b76fc14d is not a valid number

quiet ice
tender shard
prime kraken
quiet ice
#

perhaps

tender shard
quiet ice
tardy delta
#

they are living in the future

crimson terrace
#

looks like hexcode, could still be a valid number

tardy delta
#

we are too dumb for that

prime kraken
#

Yes i know

tender shard
#

show EconomyCore line 90

quiet ice
#

Also, this is part of an UUID

vocal cloud
#

Crypto numbers look like this lol 0000000000000000000000009f8ccdafcc39f3c7d6ebf637c9151673cbc36b88

quiet ice
#

I think it generally means that the itemstack you are parsing is corrupted

quiet ice
#

At best you do a try-catch and dispose these invalid values

prime kraken
#

But i said that the code work until today, that return me the good money in my account, i never changed the line code Oo i won't change a code who worked, but i changed line code in an other class

quiet ice
#

Yes, but the item/block/whatever could have changed

prime kraken
#

Yes that possible

#

.toString won't work ?

quiet ice
#

okay what

lost matrix
#

"€ sur ton compte" <- This wont ever parse to a number

quiet ice
#

Show source code

tender shard
#

this is the third time: Send EconomyCore line 90

quiet ice
tender shard
quiet ice
#

Look down in the stack

tender shard
#

oh

#

you're right

#

mb

quiet ice
#

Generally, you could do a substring there

#

How good that works is in the air though. But given that UUIDs have a strictly defined size it might just as well work

prime kraken
#

I've aded a .toString and just move next my string and that work

quaint mantle
#

Why does a normal sword show an attack indicator, but my custom sword not?

tender shard
quaint mantle
#

netherite sword?

tender shard
#

hm then idk

quaint mantle
#

I have modified the attack_speed, but even without that it doesn't show

quaint mantle
tender shard
#

yeah sorry I have no idea lol

hexed hatch
#

If it’s not showing, then it must be too fast to display

tender shard
#

but they said "even without" changing the attack speed, it doesn't show up

hexed hatch
#

Yeah well you’re mother

tender shard
#

I am noone's mother

#

I don't even have the required tools for that

hexed hatch
#

Not with that attitude

tender shard
#

also if I ever had any child, I'd just let it die or sell it

quaint mantle
tender shard
quaint mantle
#

lemme try

quaint mantle
#

there is some other thing that is preventing it from showing

tender shard
#

well bruh

#

at first you said it doesn't show up even when you don't change the attack speed 😛

#

then it seems like you simply set the attack speed too high/low/whatever

quaint mantle
#

?

#

I said the indicator didn't show up yes

#

the attribute is there

#

I can set it to the default or not modify it at all

#

but the attack indicator doesn't show up

tender shard
#

I don't get it

#

2 minutes ago you said it does show up when you don't change the attack speed

radiant cedar
#

@tender shard

#

Caused by: java.lang.NullPointerException: Cannot invoke "com.nametagedit.plugin.api.INametagApi.setNametag(org.bukkit.entity.Player, String, String)" because the return value of "com.nametagedit.plugin.NametagEdit.getApi()" is null

#

i think this the problem

quaint mantle
#

-_-

quaint mantle
#

the attack indicator does not show

tender shard
#

2 minutes ago you said it does show up when you do not change the attributes

quaint mantle
#

yeah that's the same thing as not changing the attributes

#

it does not show up however

hexed hatch
tender shard
#

i'm out, I think we have some kind of communication problem lol

quaint mantle
#

D:

quaint mantle
hexed hatch
#

That is not what I asked

#

But it works a little bit differently with attribute modifiers, believe it or not

#

It’s not like modifying the base attack speed of an item

quaint mantle
#

the first attribute sets the value I've heard

#

which does seem to work

hexed hatch
#

Try -3

quaint mantle
#

hm ok

hexed hatch
#

It’s been a while since I played with it, but I recall the default attack speed being 4 and having to use negatives

#

Because 6 is like super fast

quaint mantle
#

ah I see

#

that worked

hexed hatch
#

See? I’m a genius

quaint mantle
#

yes

hexed hatch
#

Never doubt me again

quaint mantle
#

you are

tender shard
#

yesterday I saw someone who had -2.415159125671 or something and they claimed that was the default value IIRC

hexed hatch
#

4 is the unequipped default value I thought

quaint mantle
#

oh lmao I forgot the player has default

#

yeah

hexed hatch
#

But I don’t know, it’s been forever since I messed with it

#

Unfortunately, the lore for your items will have to be ugly

#

Because the naturally occurring lore cannot be set on your own

quaint mantle
#

wdym

hexed hatch
#

So what I usually do is hide attribute modifiers and inject my own lore

quaint mantle
#

I can set flag

#

yes I already do that

hexed hatch
#

Good

quaint mantle
#

I used it to check if the values were correct

#

hmm how would I fix that minus

#

probably add to the default

hexed hatch
#

This is your plugin, right?

quaint mantle
#

hm hm

hexed hatch
#

Just get the attack speed value and subtract it from 4

#

Boom

#

That’ll get you the real value

quaint mantle
#

you sure its 4?

hexed hatch
#

Something like that

radiant cedar
#

Does anyone know how to use NametagEdit

hexed hatch
#

I think there’s an /attribute get command

quaint mantle
#

yeah ill try that

hexed hatch
#

See what the attack speed of a player is without holding an item

tender shard
quaint mantle
#

yeah its exactly 4.0

#

noice

#

ty for the help

hexed hatch
#

See? I’m a complete genius

quaint mantle
#

I know

#

I am too

#

tho

tender shard
#

both of you suck

#

I am the only genius here

quaint mantle
#

I am leaving this discord

tender shard
#

and I disallow any messages stating otherwise

radiant cedar
tender shard
hexed hatch
#

alex we could be geniuses together

tender shard
quaint mantle
#

ok fine

tender shard
#

let's do it

quaint mantle
#

because

#

I did this

#

custom items with config

#

with abilities included

#

also works for armor sets

#

:D :D :D

#

shameless self promo

tender shard
#

btw I just tried NametagEdit and it seems to be working fine

radiant cedar
#

pls help me

#

Caused by: java.lang.NullPointerException: Cannot invoke "com.nametagedit.plugin.api.INametagApi.setNametag(org.bukkit.entity.Player, String, String)" because the return value of "com.nametagedit.plugin.NametagEdit.getApi()" is null
at com.hiprison.prisonplugin.OnJoin.onPlayerJoin(OnJoin.java:36) ~[?:?]

tender shard
#

did you even add "NametagEdit" as "depend" in your plugin.yml?

radiant cedar
#

oh

#

how how

#

like this/

tender shard
#

no

#

wait

#
depend:
- NametagEdit
#

or

depend: [NametagEdit]
radiant cedar
#

if this works ❤️

tender shard
#

this ensures that NametagEdit loads BEFORE your plugin does

radiant cedar
#

.plugin.UnknownDependencyException: Unknown dependency NametagEdit. Please download and install NametagEdit to run this plugin.

#

do i need that jar in my plguins as well

quaint mantle
#

you still need it in your plugins folder

radiant cedar
#

even if im just using the API

#

aight ok

#

Caused by: java.lang.NullPointerException: Cannot invoke "com.nametagedit.plugin.api.INametagApi.setNametag(org.bukkit.entity.Player, String, String)" because the return value of "com.nametagedit.plugin.NametagEdit.getApi()" is null

#

still this

#

thsi gives null for some reason

#

did u not get this @tender shard

tardy delta
#

did you follow their guide on how to use it?

radiant cedar
#

yaa

#

have these as well

tardy delta
#

i mean for using its code

radiant cedar
#

yes

#

this is how to do it

#

but for some reason

#

.getApi() gives null

tardy delta
#

are you depending on it in your plugin.yml?

radiant cedar
#

ye just did

tardy delta
#

or soft depending

radiant cedar
tardy delta
#

its depend: [NametagEdit]

#

dunno if that would work but ye

radiant cedar
#

doesnt fix

tender shard
tardy delta
#

ah

#

is that plugin even installed?

tender shard
#

probably, otherwise they would get ClassNotFoundException or similar

#

I think the problem is:

#

@radiant cedar You accidently shaded that plugin

#

add <scope>provided</scope>

#

to your <dependency>

radiant cedar
#

wait

#

where

tardy delta
#

how can you do that accidentely

tender shard
#

for example below <version>...

radiant cedar
#

like this?

tender shard
#

yes

radiant cedar
#

if this works

tardy delta
#

below he said smh

tender shard
tender shard
radiant cedar
#

this woprked

#

ur a dady

tardy delta
#

ah so it shades those who dont have a scope

tender shard
blazing rune
#

Ayo, does anyone have any idea how to check if what damages you is not a player?

blazing rune
tender shard
#

you can get the "damager"/attacker and then just check if it's "instanceof Player"

blazing rune
tender shard
blazing rune
#

And

#

if (e.getEntity() instanceof Player p) {

#

This is the player that is damaged

#

The problem is that it is registering mobs as the damagers and the targets ( the ones who get damaged )

#

I ain't got any solution so anyone wanna help out?

tender shard
#
    @EventHandler
    public void onDamage(EntityDamageByEntityEvent event) {
        if(event.getDamager() instanceof Player) {
            // The attacker is a player
        } else {
            // The attacker is not a player
        }
    }
maiden briar
#

What is the best way to check if a string value is in a comma separated stringlist in mysql? (string,string2) and need to know of string2 is in: true. And need to know if string3 is in: false

tender shard
maiden briar
#

That should return true

#

I want to check if string2 is in the list, that should return true. If I do the same check for another string it should return false

tender shard
#

oh okay

#

use String.split

maiden briar
#

.. But it is in a database, and need a query

tender shard
#
String list = "firstString,secondString,thirdString";
        String[] split = list.split(",");
        for(String string : split) {
            if(string.equals("thirdString")) {
                // "thirdString" is inside the list
            }
        }
echo granite
#

Any android developers here?

tender shard
#

You cannot just query parts of a string

#

you have to get the full string, then check it yourself

tender shard
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!

echo granite
tender shard
echo granite
#

sorry

maiden briar
tender shard
#

because it would return true for "thirdString" if your list looks like this:
firstString,secondStringthirdString,somethingElse

ivory sleet
#

atho I never worked w/kotlin in android

#

only java

#

when that was still cool

maiden briar
#

Then I would put a , in front and the end?

tender shard
#

then it won't work for the first and last string in your list

lost matrix
maiden briar
#

... Why is this so hard

tender shard
#

just get the full db entry and then use String.split as I said 😛

maiden briar
quiet ice
#

My solution would be to get rid of the db

#

in-memory storage is a viable option these days

maiden briar
#

But after closing theplugin?

tender shard
#

if the db is so big that you cannot query it anymore, you have done something wrong anyway

maiden briar
#

And restarting it is lost

quiet ice
#

Write to disk

quiet ice
#

Especially with ObjectOutputStream (don't) it is pretty easy to write data to something

maiden briar
#

Yes

quiet ice
#

That being said, if I am getting you right, checking if there is a value in such a string does not take that long

#

especially if you work with #startsWith and #indexOf

#

The most expensive thing in java is object allocation, but this does not require any object allocations (except getting the string from the db)

tender shard
quiet ice
#

There are a bunch of more expsive things, but object allocation is underrated

tender shard
#

the most expensive thing is buying a "java management service" subscription

#

oracle is greedy

quiet ice
#

what the hell is that

tender shard
#

I don't know but it's very expensive lol

#

they don't name any prices so it's safe to assume that it's very expensive lol

quiet ice
#

it is aimed at companies however

tender shard
quiet ice
#

Perhaps you shouldn't give out stuff for free?

lavish folio
#

hi, i can get this package ? org.bikkit.craftbukkit.v1_12_R1.block

tender shard
tender shard
#

but if the company would have green numbers, there'd be double tax

#

if a company has green numbers, they're doing sth wrong in germany

tender shard
#

run buildtools for 1.12 and then use spigot instead of spigot-api as dependency

lavish folio
#

and how convert org.bikkit.craftbukkit.v1_12_R1.block.CraftBlockState to org.bukkit.block.BLockState

eternal oxide
#

you don't. they are operationally the same

#

First is the Implementation, second is the API Interface

tender shard
#

no need to "convert" it back to it's interface

lavish folio
#

but how fix this? org.bikkit.craftbukkit.v1_12_R1.block.CraftBlockState cannot be cast to org.bukkit.block.Banner

tender shard
#

don't cast something to a banner that isn't actually a banner

lavish folio
#

Banner is interface extends of BlockState from org.bukkit.block

quiet ice
eternal oxide
#

It has to BE a Banner before you can cast it

lavish folio
eternal oxide
#

Your block is not a banner

#

but a banner IS a Block

tender shard
#

an AG is supposed to actually have green numbers unless you want to scam all the shareholders too

#

I only worked with small companies that "only" want to scam the tax authorities

lavish folio
#

Material.STANDING_BANNER is not a Material.BANNER ?

visual tide
#

no

tender shard
#

obviously not, but both blocks should implement Banner nonetheless

prime kraken
#

Hi there, is it possible to store PDC directly into a block ? I would like when i click on a block to store in this specific block the Uuid of the player, so when another player click on the block that return a message blablabla.. ?

lost matrix
tender shard
lost matrix
#

What you can do is store data in the chunk the block is located in

eternal oxide
#

You could store in the Chunk PDC, the location of the Block and the Player

grand perch
#
                        categoryGui category = new categoryGui("Blocks", fixmc);
                        player.openInventory(category.getInventory());

                        ConfigurationSection blocks = config.getConfigurationSection("shop.blocks");
                        //ConfigurationSection food = config.getConfigurationSection("shop.food");

                        for (String key : blocks.getKeys(false)) {
                            System.out.println("Block name: " + key + ", display: " + config.getString("shop.blocks." + key));
                            player.sendMessage("Block name: " + key + ", display: " + config.getString("shop.blocks." + key));
                        }

isnt sending anything

prime kraken
#

Thanks you i will check that !

tender shard
#

btw if you're going to use my library: it stores the data directly to that "coordinate". so if for example a piston pushes the block that has data, you will have to manually "move" the data to the new block, too

prime kraken
#

but i'm asking that is door work with that

tender shard
#

it'll work with any block, no matter if it's a door, or stone, or air

prime kraken
#

Nice, I will check how to use and try that ! thanks 😉

tender shard
#

np! it's extremely easy to use:

#
PersistentDataContainer customBlockData = new CustomBlockData(block, plugin);
#

just create a new instance of "CustomBlockData" and provide the block and your plugin

prime kraken
#

Omg so easy x)

kindred valley
#

how can i remove an arrays value

tender shard
kindred valley
quiet ice
tender shard
quiet ice
#

At some point it just gets tiring

tender shard
kindred valley
#

then i made it a bit more basic

#

to understand

#

?paste

undone axleBOT
eternal oxide
tender shard
quiet ice
#

Oh so that is what they meant

kindred valley
eternal oxide
#

First is easy, others not so

tender shard
#

that's like twice the size of the code that I sent you

kindred valley
#

lemme try it again

tender shard
#

also why are you calling arraycopy twice o0

#

you could have just used the method that I sent

#
    public static <T> T[] shiftArray(T[] original) {
        if(original.length == 0) return original;
        T[] shifted = (T[]) Array.newInstance(original.getClass().getComponentType(),original.length-1);
        if(shifted.length == 0) return shifted;
        System.arraycopy(original, 1, shifted, 0, shifted.length);
        return shifted;
    }
quiet ice
#

the first one is a NOP anyways

tender shard
#

it's a decent name imho lol

prime kraken
#

@tender shard did i have to serialize with just the name of the player with your api ?

tender shard
#

I have no idea what you're talking about lol

prime kraken
tender shard
#

do you want to store a "player" inside a PDC?

prime kraken
#

Yes the name

#

or uuid nvm

quiet ice
#

I recommend using UUIDs

tender shard
prime kraken
#

Okay i will check that so

tender shard
#

DataType.UUID

radiant cedar
#

how do u send a message like this on screen

#

for all players

tender shard
#

yeah that of course also works

radiant cedar
#

what class is this in

quiet ice
tender shard
quiet ice
#

Ah, close enough

radiant cedar
#

ty

tender shard
#

where "Players" is of course Bukkit.getOnlinePlayers()

prime kraken
# tender shard DataType.UUID

nice but i use, your first library for the block bcs you said that it used the location, did this library used too ?

quiet ice
#

Well, it becomes a bigger challenge once you want to send it to dead players too

tender shard
kindred valley
prime kraken
undone axleBOT
quiet ice
#

Remember that it does not modify the original array

tender shard
#

yeah it returns a new array

quiet ice
#

It just modifies the returned array

tender shard
#

arrays are immutable anyway

#

you cannot change the size of existing arrays

#

they do

quiet ice
#

To protect against certain kinds of errors

eternal oxide
#

dead players are removed from the Online P{layers list

tender shard
#

whut?

eternal oxide
#

but their Player object is valid

tender shard
#

getOnlinePlayers() always returns all online players, doesn't it?

eternal oxide
#

no

tender shard
#

huh

#

I have to check that

olive lance
#

This is news to me

eternal oxide
#

if a player is dead they will not be in there

quiet ice
#

perhaps, not too sure

kindred valley
quiet ice
#

Could also just be a QoL decision by the bukkit devs

brave trellis
#

how would you run a console command in a specific world?

tender shard
#

Bukkit.getOnlinePlayers() also includes dead players

#

everything would make no sense anyway

eternal oxide
#

um, it didn;t a year ago

quiet ice
#

Interesting that they changed it

tender shard
#
    @Override
    public void onEnable() {
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            Bukkit.broadcastMessage("Online Players: " + Bukkit.getOnlinePlayers().size());
        }, 1, 1);
    }
quiet ice
#

But good to know that this behaviour does no longer apply

tender shard
#

I highly doubt that it was different at ANY time tbh

eternal oxide
#

It was, there was a big discussion in trhis channel about it

olive lance
#

Thank god

quiet ice
#

I deeply remember someone having issues with this behaviour a long time ago

tender shard
#

hm

#

weird

#

well but then so be it

#

it definitely works fine in 1.18.2 paper

eternal oxide
#

We found it odd back then, but accepted it as we all tested it.

tender shard
#

does anyone remember the version where this happened?

#

I'd really love to try it out

eternal oxide
#

probably 1.16.5

tender shard
#

very weird lol

quiet ice
tender shard
#

wow spigot takes soooo long to start

quiet ice
#

Starting is okay, stopping is the real deal

#

It takes like 5 minutes to stop last time I tried

brave trellis
#

for example, take a command, take X coords of a world and make it run in that world

quiet ice
#

On an newly created server that is

tender shard
#

I call bullshit

#

on 1.16.5 it also works fine

#

Bukkit.getOnlinePlayers() always returns ALL online players, regardless of whether they are dead or not, in both 1.18.2 and latest 1.16.5

eternal oxide
#

I just tested 1.18.2 and they are included

tender shard
#

it works fine in 1.16.5 too

eternal oxide
#

Yeh it does now and should, but back then it didn;t

tender shard
#

hm maybe it was changed in a specific build in 1.16.5

quiet ice
#

Yeah, that is likely

tender shard
#

but at least in latest 1.16.5, it works fine

quiet ice
#

Given that there are a few months left until the release of 1.17 where it could have changed

eternal oxide
#

I just read back over the conversation. its in the respawn event that the player is no longer in the OnlinePlayers

#

this was his code ```java
public void respawn(PlayerRespawnEvent event){

    Collection<? extends Player> players = event.getPlayer().getServer().getOnlinePlayers();

    event.getPlayer().getServer().broadcastMessage(String.valueOf(players.size()));

}```

waxen plinth
#

That's such a strange way to do that

#

Like what the hell

eternal oxide
#

yep

waxen plinth
#
Bukkit.broadcastMessage("" + Bukkit.getOnlinePlayers().size());```
#

🙃

grand perch
#

Wait

eternal oxide
#

We checked his results, saw it did show zero players and that was that. We didn;t investigate further

last sleet
#

Hi, is there a way to override base item attributes ? I tried setting a hoe to 0.2 attack speed, but it adds it instead of overwriting, so the attack speed stays 4.

eternal oxide
eternal oxide
#

We just assumed it was all dead players

quiet ice
#

Good to know what really happened then

tender shard
#

lol I just googled the doctor my bf went to a few months ago

#

the women is the doctor

#

now I wonder whether the old dude is her husband or just a patient lol

quiet ice
#

is that your IP in the lower corner?

tender shard
#

no that's the website's IP

#

my IPs are 2A02:908:D70:A60:704B:D8C7:895C:8CAE and 5.147.144.118

quiet ice
#

huh

paper falcon
#

how can I suppress typo warnings?

glass mauve
#

I think typo is not a warning

paper falcon
tender shard
#

it's not a warning

#

it only gets underlined and that's it

#

just ignore it?

paper falcon
#

I disabled it now

tender shard
#

weird solution but ok lol

paper falcon
#

😃

tender shard
#

I would simply add that word to the dictionary

paper falcon
#

yeah but that's annoying

#

I gotta add each word when writing in my language

#

it sux

tender shard
paper falcon
#

bit late now 🙂 but thanks

#

I'll use it in the future

glass mauve
paper falcon
#

it's better i

#

ig

hybrid spoke
#

no just keep it disabled

#

nobody needs that

paper falcon
#

ok

#

howererv u want

hybrid spoke
#

whoa

#

i just comboed

paper falcon
glass mauve
#

same

paper falcon
#

niice

glass mauve
#

but its useless

hybrid spoke
#

jff i guess

humble tulip
hybrid spoke
#

but fancy confetti when typing

humble tulip
#

Gonna ask a question now😂

paper falcon
#

lol ik jk

hybrid spoke
#

?ask faster

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!

humble tulip
#

So I'm working on a plugin where I need to keep track of players stats as well as their "score" which is like a currency

paper falcon
#

ok

#

nice

#

gtg bye

humble tulip
#

I'm on mobile so i cant format properly

#

Cyz

#

Cya

#

I'd like admins to be able to reset theor stats and whatnot

#

Problem comes up when they are not online and may be on another server

#

It'll reset on one server at set it in the db being used but on the other server where the player is online, it'll still have the stats thatbwere loaded originally

#

Is it okay to use plugin messages to update the stats?

#

Like to tell the other servers what changes were made?

hybrid spoke
#

i would use redis for that

#

since you can also cache that data over several servers

#

instead for each

humble tulip
#

Yeah ibsaw that in the thread but not all servers have redis

#

I guess for servers that want to use the plugin with bungee redis must be used?

hybrid spoke
#

sounded like your own server at first

humble tulip
#

My bad

hybrid spoke
#

well then PMC should be fine

sterile token
#

Why some anottations are still on code when they only are need when coding?

humble tulip
#

Right now all changes to stats are being done with addition/subtraction only so being out of sync isn't much of an issue except for what is being displayed

sterile token
hybrid spoke
#

but with that scenario: why would an admin or whatever chose to reset the score of a player which is on another server

sterile token
#

🤔

hybrid spoke
#

player stats

radiant cedar
#

why does it send command back

#

anyone have a clue?

hybrid spoke
#

you probably return false

sterile token
radiant cedar
#

oh ye

humble tulip
#

What is a non blocking library?

#

As i said, most servers just use mariadb

hybrid spoke
#

a third party which fails quietly instead of waiting

#

if a server doesnt have any players on it and a PM is sent, it will wait for players before actually receiving the PM

sterile token
#

A non blocking library is part of networking which allow non blocking is the communication between many devices

prime kraken
#

Hi, how can i remove my player from my PDC when he leave ? I use an api who put PDC directly into the block

hybrid spoke
#

elaborate a bit more please

prime kraken
#

I use the API of mfnalex who able me to put in a block, a PDC, here the player name. In my event, when i click on the block, if there are no player in, i put the player with the pdc like door.set(new NamespacedKey(plugin, "playerName"), PersistentDataType.STRING, p.getName()); and i made a condition when if there is a player in that return the player blablabla.. I just want to know how can i delete the player name in the block when he leave the server

hybrid spoke
#

well you would've to keep track of the block

#

and remove the entry onquit

sterile token
#

Wait you should never save data with name, always use UUID

prime kraken
#

Ok, to hard for me i don't know how to do that but i will search thanks

sterile token
prime kraken
#

Yes but no importance if i remove the player name when he leaves ?

sterile token
#

Are you trolling?

prime kraken
#

i just ask

sterile token
#

I told you never use use name as key, always UUID

#

Because if user change the name data goes directly to trash

#

In other words he lost his data...

normal isle
#

how can i install custom breaking speed for custom blocks

#

?

grand perch
#
shop:
  blocks:
    0:
      material: GRASS_BLOCK
      itemName: §7Grass Block
      price:
        buy: 10
        sell: 5
    1:
      material: DIRT_BLOCK
      itemName: §7Dirt Block
      price:
        buy: 5
        sell: 2
  food:
    0:
      material: COOKED_BEEF
      itemName: §6Cooked Beef
      price:
        buy: 1
        sell: 1
tender shard
#

@prime kraken pls do not DM me. I've unblocked you again now but please do not send DMs again. I get so many DMs, it gets annoying

prime kraken
# sterile token In other words he lost his data...

Yes of course, but i don't want to store his data when he leave here, i want to delete, nvm i don't know how to explain that, if the player leaves the server, have a "door" wich is like a house is not important, and i don't want to restore them after

sterile token
prime kraken
tender shard
prime kraken
#

Yes of course

#

Better to ask here if another people have same problems 🙂

proper notch
proper notch
#

Firstly the player will need to have full mining fatigue so they can't actually break the block. You'll then manually send the progress of block breaking and when the block actually breaks for them.

You can use ProtocolLib to listen to PacketType.Play.Client.BLOCK_DIG. From its data you can get the PacketPlayInBlockDig.EnumPlayerDigType and then the important flags ur gonna want from that are START_DESTROY_BLOCK and ABORT_DESTROY_BLOCK.

When handling the packet, you need to store if the player is breaking x block and then send the progress throughout breaking said block. You can notify progress with the PacketPlayOutBlockBreakAnimation packet.

normal isle
#

ok

#

got it

#

question can i ask you something in dms?

proper notch
#

I have my DMs disabled, sorry. You can ask it here tho

normal isle
#

ohh ok

#

you ever made a custom block plugin?>

tardy delta
#

should i downloads java 16 or 17 for mc 1.17.1?

proper notch
#

Yh me and someone else for a server we never released.

quiet ice
normal isle
#

its like custom textures stuff like that??

tardy delta
#

and whats EOL?

proper notch
#

It's not since we were making it 1.8 compatible, so it uses vanilla textures, but it still has custom breaking speeds.

proper notch
proper notch
#

It shouldn't be that hard to identify what block they're breaking then identify that type of block is that position.

quiet ice
normal isle
#

k

tardy delta
quiet ice
#

Isn't eclipse temurin Adoptium?

tardy delta
#

i think ye

#

wait maybe its a better idea to install java17 for the whole system

#

i only got 11 dont ask me why

tender shard
#

java 17 doesn't add anything useful anyway imho

#

it makes no sense for me to require java 17

#

java 7 or java 8, yes those versions really added useful stuff

tardy delta
#

i went from java 8 to 16 so thats when it did

#

well 8 -> 11 -> 16

mellow edge
tardy delta
#

wtf is internet saying how do i install it by commandline

quiet ice
#

J17 has a few APIs, but no large scale APIs that one would miss like .readAllBytes

grand perch
#

Ehat

tender shard
#

maybe records, but tbh they can be easily recreated anyway

mellow edge
#

maybe some performance imporovements?

grand perch
#

Which one

eternal oxide
#

I like Records

tender shard
#

i like them too but lombok's @Data does the same thing and has more customization

eternal oxide
#

I really dislike Lombok

ivory sleet
#

same

grand perch
#

Oh ok

tender shard
#

I don't, it's useful and it doesn't have any disadvantage

#

also the logo is a pepperoni

#

and everyone loves pepperonis

eternal oxide
#

requires special Maven settings to compile. Has to be installed in yoru IDE which causes it to take forever to load

eternal oxide
#

does for me

tender shard
#

it doesn't require anything except adding it as dependency

eternal oxide
#

also requires a <annotationProcessorPaths>

#

err

#

sec, there was a maven thing, just not that

tender shard
#

no

#

it works without that

grand perch
#
    public FileConfiguration getShopConfig() {
        if (shopConfig == null) {
            try {
                reloadCustomConfig();
            } catch (UnsupportedEncodingException e) {
                e.printStackTrace();
            }
        }
        return shopConfig;
    }
ivory sleet
#

if I werent playing valorant Id be flaming you now mfnalex

#

jk

tender shard
#
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <scope>provided</scope>
        </dependency>
#

this is all that's needed

ivory sleet
#

but there are some disadvantages

eternal oxide
eternal oxide
#

startup speed was my main issue though

tender shard
eternal oxide
#

Lombok seems to disagree with you

tender shard
#

I always just add lombok to <depdendencies> with scope "provided" and that's it

grand perch
#

idk which one your asking for

tender shard
#

IntelliJ definitely doesn't require it and compiling it with maven from CLI also works fine without it

grand perch
#
        shopConfig = YamlConfiguration.loadConfiguration(shopConfigFile);
#

??

eternal oxide
#

Possibly, but as I use Eclipse 😉

tender shard
#

hm well anyway. I still don't think that having to add something to your pom.xml makes the library itself shitty 😄

eternal oxide
#

Didn't say it was shitty. I just don;t like it

tender shard
#

okay fair enough

#

I also dislike certain things without a proper reason lol

#

e.g. kotlin

#

I just think the syntax is ugly

#

so I don't like it

eternal oxide
#

I've never used Kotlin but I already dislike it for teh same reasons I dislike .Net

tender shard
#

well .net is easy to dislike:

#

it was made by microsoft

sterile token
left swift
#

can I somehow get list of plugins that use a certain plugin as the dependency?

ivory sleet
#

mye believe thru PluginDescriptionFile, no?

ivory sleet
sterile token
#

Oh you dont have photo

ivory sleet
#

yup

gleaming olive
#

How do I get the raw string from a TextComponent ?

crisp steeple
#

.getText()

gleaming olive
#

wait, I mean Comopnent

#

using the ChatEvent of paper
event.message() gives me the Component

#

can I cast it ? or is there another way

gleaming olive
#

thanks! i'll try

quiet ice
#

Adventure probably has a dedicated method for this I assume

#

But if the component serializer does the job, there is no reason to not use the serializer

clever musk
#

Does remapped mojang 1.16.5 not exist?

eternal night
#

1.16.5 used spigot mappings are tuntime and not reobfuscated spigot mappings

clever musk
#

So theres no mojang mappings?

eternal night
#

I mean, mappings exist for 1.16.5 but spigot did not use them

clever musk
#

RIP

quiet ice
#

Mojmap exists since 1.14.2 or so

clever musk
#

How can I use them?

ivory sleet
eternal night
#

paper exposes its own plain text serializer

ivory sleet
#

ah fair enough thanks for the insight 👍

eternal night
#

Yea so PaperComponents.plainTextSerializer does not delegate

#

mainly because it properly flattens translatables

#

tho why are people asking questions about paper in spigot 🤔

ivory sleet
#

🙌

manic crown
#
public class Spawners {

    public int amount;
    public int amounts;

    public void spawnItems(World world, ItemStack item, Location loc, Material material, int max) {

        for (Entity entity : world.getNearbyEntities(loc, 2, 2, 2)) {
            if (entity instanceof Item) {
                Item entitysItem = (Item) entity;
                if (entitysItem.getItemStack().getType() == material) {
                    amount = entitysItem.getItemStack().getAmount();
                    amounts += amount;
                }
            }
        }
        if (amounts <= max) {
            world.dropItem(loc, item).setUnlimitedLifetime(true);
        }
        amounts = 0;
    }
}

Can you help me please with this?
When i try to setUnlimitedLifeTime, this is Marked red and says "Cannot resolve method 'setUnlimitedLifetime' in 'Item'" but when i put in a variable with an Itemstack, the code works fine, does someone know, how i can fix it?

quaint mantle
manic crown
#

okay

quiet ice
#

there are instances where you can make fields public, but usually that is only for constants or immutable states

manic crown
#

do you know how to fix the problem?

quiet ice
#

?jd-s

undone axleBOT
quaint mantle
quiet ice
#

I'd do world.dropItem(loc, item, x -> x.setUnlimitedLifetime(true)); but really it is the same thing

manic crown
#

i´m using spigot 1.18.2

quiet ice
#

Also for building?

quaint mantle
manic crown
#

forgot to adjust to

<dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.18.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

it was ```java
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.18.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

#

thank you for helping👍

ivory sleet
#

I mean they do as most other crowdin projects

#

set up the set of translations that needs translates

#

once they complete 1 language they deploy

#

they use a similar system to adventure I believe

#

translatable components

#

but they're still translated server side

#

perhaps

#

wym so I wonder

#

they have to be translated server sided

crimson terrace
#

I am trying to remove an entity while it is unloaded. I put "setRemoveWhenFarAway()" to true because I need it to be, now I cant get rid of it when disabling the plugin. Anyone know a solution?

ivory sleet
#

I mean you can still use packets

quaint mantle
#

Sure they can

#

Listen for outgoing packets and translate them

ivory sleet
#

^

quaint mantle
#

ur probs asleep, it works so ty

just curious, apart from players logging out what events do i listen for? i know you mentioned entity deaths but i dont think they'd exist anymore unless you mean i should clear them from the maps that they're contained in withrelease?

and what is the despawn event

crimson terrace
#

might just tag it with something in its pdc in order to remove it on a 5 second timer

lost matrix
quaint mantle
#

would this be harsh on performance or nah

#

im not too sure how to measure performance impacts tbh

lost matrix
crimson terrace
#

disabling to me means onDisable()

glass mauve
#

is there a method to find out in which direction the player looks?for example North, South, West, East

lost matrix
crimson terrace
#

so the chance of the plugin being enabled again after is fairly high

lost matrix
crimson terrace
# lost matrix What are you even trying to do?

I have a boss mob which I want to keep there until it is killed or the plugin is disabled.
I set the mobs removeWhenFarAway to false in order to keep it there and tag it with some special tags in its scoreboardtags and PDC so that I can identify it. I save the mob inside a list aswell so that I can access it later.
Now onDisable() I am turning on the setRemoveWhenFarAway(), doing entity.remove() and teleporting it to y -100.
None of this actually gets rid of the mob when I reload the server while I am far away, so the mob spawns during onEnable() and now I have 2 of them

lost matrix
crimson terrace
#

so I pretty much have to run a timer which removes all mobs I tag for removal as they are duplicates?

crimson terrace
#

every 5 seconds wouldnt be that bad, would it?

lost matrix
#

Why dont you just work with events?
ChunkLoadEvent -> get all entities -> check if one is your custom mob -> if yes you remove it.

prime kraken
#

Hi there, is that possible to access to my PlayerInteractEvent contents in my PlayerQuitEvent, the events are in the same class

crimson terrace
#

then I could work with the list again

#

good idea, thanks

lost matrix
#

As long as the List doesnt contain entities.

crimson terrace
#

it contains livingEntities

lost matrix
#

Dont hold hard references to spigot objects

crimson terrace
#

gotcha

#

uuid it is

lost matrix
crimson terrace
#

may I?

river oracle
crimson terrace
#

?learnjava

undone axleBOT
ivory sleet
#

lol

quiet ice
river oracle
#

In order to balance out all the time I spend coding I came up with this awesome time management idea. For every line of code I write I can play 1 hour of video games

#

so I write 1 line and play 1 hour of video games

#

perfectly balanced

crimson terrace
crimson terrace
lost matrix
crimson terrace
#

Data as in tags which (probably) only your own plugin would use, so you can identify tagged entities with them

lost matrix
#

Yes like in "BOSS_MOB"

crimson terrace
#

ok thanks 😄

mighty pier
#

in an EntityDamageByEntity event - if damage cause is projectile, how do i get the damager?

crimson terrace
#

event.getEntity().getShooter()

mighty pier
#

no

crimson terrace
#

?

quiet ice
#

You need to cast that is

crimson terrace
#

oh sorry

#

event.getDamager().getShooter

#

i get confused with those

quiet ice
#

Oh yeah

#

But you need to cast either way

mighty pier
#

cast to what

crimson terrace
#

projectile

mighty pier
#

e

#

show

#

how

eternal oxide
#
if (event.getDamager() instanceof Projectile projectile) { projectile.getShooter()```
crimson terrace
#

depends on the java version youre using of course, but yeah

#

if its an older one I believe that syntax is not accepted

mighty pier
#

whats Projectile projectile

eternal oxide
#

Java 15/16? creates a local variable called projectile

desert tinsel
#

can i get the consolecommandsender of a subserver with bungeecord?

crimson terrace
#

just ignore that and check for instanceof Projectile, then cast like you always would

quiet ice
#

The alternative would be

Entity e = event.getDamager();
if (e instanceof Projectile) {
   Projectile = (Projectile) e;
   ProjectileSource shooterSrc = projectile.getShooter();
   if (shooterSrc instanceof Entity) {
      Entity shooterEntity = (Entity) shooterEntity;
   }
}
#

I think it was J15

manic crown
#

is it possible to short this code that I have not to have four times the same code ```java
public static void SetSpawners(CommandSender sender, String team) {
Player player = (Player) sender;
int X = player.getLocation().getBlock().getX();
int Y = player.getLocation().getBlock().getY();
int Z = player.getLocation().getBlock().getZ();

    Location loc = new Location(world, X,Y,Z);

    BedWars.instance.getConfig().set(team, loc);
    
    if (team == "Red") {
        Basen.BaseRedLoc = loc;
        return;
    }
    if (team == "Green") {
        Basen.BaseGreenLoc = loc;
        return;
    }
    if (team == "Blue") {
        Basen.BaseBlueLoc = loc;
        return;
    }
    if (team == "Yellow") {
        Basen.BaseYellowLoc = loc;
        return;
    }
}
eternal oxide
#

loc = player.getLocation().clone();

quiet ice
#

^

eternal oxide
#

probably doesn;t need clone unless you are in a movement event

quiet ice
#

unless you do not want floating-point numbers, in that case it becomes more complex

desert tinsel
#
switch (team){
case "Red":
  Basen.BaseRedLoc = loc;
  break;
case "Green":
  Basen.BaseGreenLoc = loc;
  break;
case "Blue":
  Basen.BaseBlueLoc = loc;
  break;
case "Yellow":
  Basen.BaseYellowLoc = loc;
  break;
}```
dense geyser
eternal oxide
#

or if you really need it to the block corner coords loc = player.getLocation().getBlock().getLocation(); I think

desert tinsel
#

or use if (team.equals("Red")){

dense geyser
#

switch case uses .equals() so they should be fine with switch

#

🤞

manic crown
#

okay, thank you very much

dense geyser
#

after looking at the source code of some plugins, they seem to use Lists.newArrayList() a lot, instead of new ArrayList<>(). Is there any actual reason for this or is it just preference? Lists.newArrayList() is a single line method that returns new ArrayList() (no <>)

quiet ice
#
        if (team.equals("Red")) {
            Basen.BaseRedLoc = loc;
        } else if (team.equals("Green")) {
            Basen.BaseGreenLoc = loc;
        } else if (team.equals("Blue")) {
            Basen.BaseBlueLoc = loc;
        } else if (team.equals("Yellow")) {
            Basen.BaseYellowLoc = loc;
        }
dense geyser
quiet ice
#

This code is shorter

desert tinsel
#

is there a method to get ConsoleCommandSender to a subserver from BungeeCord knowing his name?

eternal oxide
#

switch is fine. lots of is else is ugly 😦

desert tinsel
#

uh, ok

dense geyser
#

you could send a bmc packet and tell it to do stuff with that

#

but that requires players online

#

so you might opt for redis instead if you have access to it

quiet ice
#

Or just open a side-channel connection

dense geyser
#

interesting

#

whats what

#

actually I should probably look into what a socket is too

quiet ice
#

Just some fancy words for creating a TCP Connection

dense geyser
#

they seem interesting, so far managed to avoid all that jive

#

interesting

dense geyser
#

a boolean is a person from the planet bool

manic crown
dense geyser
#

yellow, blue, red and green are going to execute exactly the same thing, identical data, is that what you intend?

manic crown
#

yeah, for each color one Location

#

wait, it will handover the color right?

eternal oxide
#

looks fine

manic crown
#

okay, thank you guys

ivory sleet
#

yes

#

there's less of a reason now

#

but basically decoupling creation and instantiation

#

(before it also inferred types passed to type params)

quiet ice
#

I rarely if ever used that method

dense geyser
#

what was the point in decoupling them?

ivory sleet
#

if instantiation changes, creation does necessarily not get affected

#

which can save you from recompiling entire modules by feeble changes

dense geyser
#

so it was created to prepare for changes made to new ArrayList<>()?

quiet ice
#

They probably did not intent on changing the constructor

#

And they certainly do not anymore considering that it hasn't been deprecated for ages

ivory sleet
#

but thats the static factory pattern for you

quiet ice
#

I assume the only real reason to use that method is the absence of the diamond operator, but these days (for a decade or more now) it does exist

sterile token
#

How do you compile 1.18 mc plugin?

dense geyser
#

alright, thank you both

sterile token
#

a tuto please im annoyed

crisp steeple
#

step 1: install java

quiet ice
#

There are 4 ways of doing this that I know of, so you have to be more specific there

dense geyser
#

step 0: buy a computer

quiet ice
#

Probably 6 if you consider JDT, IJ and Netbeans are seperate

crisp steeple
quiet ice
#

So first of all, what build tool is this plugin using?

sterile token
#

Im using Maven for building

crisp steeple
#

mvn package

sterile token
#

I only have on pc Java and JDK 8 installed

quiet ice
#

Then install maven and invoke mvn clean install

sterile token
#

I already done, but then the server shit that im using old java version

#

🤡

#

That was my face lmao

crisp steeple
#

newer mc versions require java 16 i believe

quiet ice
sterile token
#

So do i need to install JAva 16 for compiling?

crisp steeple
#

yes

quiet ice
#

Use J18 to prevent doing this again for 1.19

crisp steeple
#

yea

#

although java 17+ is broken on gradle

#

doesnt really mater tho since ur using maven

eternal night
#

java 17 is broken on gradle since when ?

sterile token
#

My big issue is that i hve a multi module maven project, which contains a common module, plugin 1.12.2 module and plugin 1.18 module. So i dont know how to compile each module with diff java version

quiet ice
#

gradle being gradle

eternal night
#

gradle properly supports java 17

quiet ice
#

Only recent gradle

crisp steeple
#

maybe my version was outdated

eternal night
quiet ice
#

gl updating it then

eternal night
#

what you do you mean good luck xD

crisp steeple
#

gradle updates take ages tho

lethal coral
#

This happens when I try to run this code

    public void attemptBotCreation(){
        new BukkitRunnable() {
            @Override
            public void run() {
                if(bot != null){
                    bot.restart();
                    return;
                }
                //System.out.println(getConfig().getString("token"));
                try{
                    bot = new Bot(getConfig().getString("token"));
                    getLogger().info("Bot has successfully been created!");
                }
                catch (LoginException | IllegalArgumentException | InterruptedException e) {
                    getLogger().log(Level.SEVERE, "Cannot start bot due to invalid/missing token. Please check the config.yml");
                    e.printStackTrace();
                }
            }
        }.runTaskAsynchronously(this);

    }
lethal coral
quiet ice
quiet ice
sterile token
quiet ice
#

As long as you build with an up-to-date JRE/JDK, it will be able to automatically compile even with newer java versions

#

Worst case you'd have to specify sourceVersion & targetVersion or release

crisp steeple
sterile token
#

Because the common module contains common things for 1.12x and 1.18x plugin module, so if i compile it with java 8 plugin 1.18x said old version, but its if i compile it with java 18 plugin 1.12x said me using a recent version

#

So its too much shity

quiet ice
#

You can set the version on a per-module basis you know

lethal coral
#

I'm going to try something that I think will fix it if not I'll go back and show ya

sterile token
#

Not even specific on intellij website

quiet ice
#

This is common knowledge

crisp steeple
#

intellij invented coding

quiet ice
#

(And that guys is why I use recaf as my IDE \s)