#development

1 messages · Page 82 of 1

carmine scroll
pulsar ferry
#

Not sure if you edited it before sending but the flatDir is not being closed, which will mess up the entire file

carmine scroll
#

I did edit it

#

I removed something, I’m on my phone now. Before on my pc it was different so I had to edit it on my phone.

#

For every maven there it says “unresolved reference.” When trying to build.

pulsar ferry
#

Unresolved reference is referring to the maven method, not the link you're passing to it, so that syntax error I pointed out could be the cause of it

carmine scroll
dusty frost
#

You also have two tasks blocks, and it looks like some extra squiggly brackets at the bottom, but that might be related to your removal

lyric gyro
lyric gyro
carmine scroll
#

Is there documentation or anything for me to setup a local repository? I feel as though that is part of the reason because I removed a Val in my kotlin gradle for a repo that no longer exists. It was referenced multiple times in the original build.gradle.kts

pulsar ferry
#

Will be very hard if you don't show the unaltered script, but anyways, make sure there is no syntax error, surely your IDE tells you what is wrong
If that doesn't work try updating your Kotlin version or something

carmine scroll
pulsar ferry
#

That's not on the paste you sent, so no idea Shruge

pulsar ferry
#

You don't declare that variable anywhere, you're probably looking for version instead

#

Or project.version

carmine scroll
#

Okay let me see

#

Can I declare that variable? Like is it worth doing it or no?

pulsar ferry
#

Depends on what you intend to do with it, if it's just project.version then no not really

carmine scroll
#

Unfortunately project.version is now throwing a different error.

pulsar ferry
#

What error?

carmine scroll
#

None of the following functions can be called with the arguments supplied: public abstract fun set(value: String?): Unit defined in org.gradle.api.provider.Property public abstract fun set(provider: Provider<out String!>!): Unit defined in org.gradle.api.provider.Property

#

I am going to val myVersion for the variable, see if it likes that more.

#

Fixed it

#

It's building 😄

pulsar ferry
#

Nice

carmine scroll
#

Thank you for the help. Addding just the variable fixed it.

#

`val myVersion = "1.0.0"

named<ShadowJar>("shadowJar") {
archiveBaseName.set("PrisonAPI")
archiveClassifier.set("shadowed")
archiveVersion.set(myVersion)
mergeServiceFiles()
}`

#

As simple as that

pulsar ferry
#

The issue was that it needed a string, so you'd have to do project.version.toString() if you wanted to use the project version, but if that works that's good

carmine scroll
#

Nvm now it's throwing repo errors during the building. This is going to be fun.

#

Could not find com.sk89q.worldedit:worldedit-bukkit:6.1.9.

#

How is it not able to find WE?

pulsar ferry
#

That version probably doesn't exist

carmine scroll
#

Indeed it does not exist. Maybe removed? I could just implement 6.1.4 instead?

carmine scroll
#

Gradle JVM: Coretto-1.8

stuck hearth
#

Looks right at a glance, are you getting an error?

carmine scroll
stuck hearth
#

Any error I guess? Why are you asking if it's correct? Is there an issue?

carmine scroll
stuck hearth
#

What are the errors

carmine scroll
#

A lot 😂

stuck hearth
#

!?paste

#

Idk how this vot works. Paste your errors

carmine scroll
#

I don't know how to upload errors to paste

stuck hearth
worn jasper
neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

carmine scroll
#

I don't know to copy whole gradle error log.

worn jasper
#

you select it?

stuck hearth
#

Ctrl+A

worn jasper
#

copy it

#

and paste it

stuck hearth
#

Afonso has a crush on me, so if it seems like they're talking over me it's because he's in love.

carmine scroll
#

Fixed the rest

#

Cubed:main: Could not find com.destroystokyo.paper:paper:1.12.2-R0.1-SNAPSHOT

#

Last error

#

That's latest

worn jasper
carmine scroll
#

I can't seem to find it

worn jasper
#

also why you use legacy versions

#

💀

carmine scroll
#

appears to be gone

carmine scroll
worn jasper
#

💀

#

how

#

1.20.5/1.21 are literally the best updates in years, specially regarding development and performance

carmine scroll
#

Being a server owner? 1.8 is the best version there is. Pvp etc. I have even talked to massive devs in comm and they said that 1.20 and such has horrible exploits. It's called via version? Like no point in converting my entire core to be 1.20...

worn jasper
#

uh

#

yeah I won't have this conversation again

#

too busy to do it

#

I will just yeet myself out of this channel

stuck hearth
#

I saw one where you could use whisper to track a player down, was very cool

carmine scroll
stuck hearth
#

I mean you're just silly

carmine scroll
#

PVP on 1.20? Comedic

worn jasper
stuck hearth
#

Just made it like 1.8 combat then

carmine scroll
worn jasper
#

You came here for help, I help IF I want to.

stuck hearth
#

Then leave the channel if you want lmao

#

You're the one causing discourse here

carmine scroll
#

Afonso, you dogged on me for using 1.8... Stop playing the victim. I said nothing to you prior to that lil bro.

stuck hearth
#

Afonso just has a crush on us

carmine scroll
#

ong

#

"Don't ping me" who are you again?

stuck hearth
#

I'd laugh but that's me

carmine scroll
#

I did laugh

worn jasper
#

You remind me of that zodd guy, anyways, bye

carmine scroll
#

Afonso name a server you've ran that was successful, I'll wait.

stuck hearth
#

See I told you he had a crush!!!

carmine scroll
#

I can name plenty I was on leadership team of

pulsar ferry
#

Hoplite and MCC Island both have quite a large player base and both have pvp games Shruge

stuck hearth
#

Do you use the new combat mechanics?

carmine scroll
#

Hypixel is

pulsar ferry
#

I can guarantee you they do not

carmine scroll
#

Hypixel is 1.8

#

Promise you

pulsar ferry
#

Not talking about Hypixel lol

pulsar ferry
carmine scroll
#

Also I have never heard of Hoplite or MCC

stuck hearth
#

Youtube brain 🧠

carmine scroll
#

Complex gaming is the biggest factions server rn, 1.8

#

Honestly I just don't know why he said anything about being on java 8, like it's perfectly stable server wise. It was just unnecessary

stuck hearth
#

So are you just copying the "biggest" and hoping success will windfall to you?

worn jasper
#

xd saying mcc islands is 1.8 to a mcc islands dev is wild

stuck hearth
#

True

carmine scroll
#

@stuck hearth I can name plenty of successful projects I was apart of 😂

#

No clue why you flipped on me but all good

stuck hearth
#

That actually wasn't my question

#

And it was genuine, not an attack.

carmine scroll
#

Also the current project I am working on is completely unique... Wouldn't be working on a jar rn if I was gonna "copy" every server. I would go download every plugin off spigot and config them if that was the case.

stuck hearth
#

So you're just copying some things from big servers, but the rest is unique?

carmine scroll
#

😂

#

Bro where did you get that from?

#

I never once said that nor implied it

stuck hearth
#

Well you're taking note from large servers to inform your design decisions

carmine scroll
carmine scroll
stuck hearth
#

Yeah

#

Not really pertinent

carmine scroll
#

I hope you know almost all servers use aspects of others and tweak them to their likings plus add unique features.

stuck hearth
#

Okay? So your answer is yes?

carmine scroll
#

Why tf would someone recode essentials and such just to be "custom"

#

Bro you're dumb

#

like you clearly have no experience with successful servers. I am just wasting my time now. Have a good one.

stuck hearth
#

Do you just not liking me calling it copying?

carmine scroll
#

As I said this convo is done, you clearly lack the knowledge.

stuck hearth
#

Lmao, ok

#

You're the one not pointing to the correct repo fella

#

Read the docs :^)

carmine scroll
#

lol

stuck hearth
#

Do you find yourself making enemies with everyone you talk to, or just here?

carmine scroll
#

Cuz 1.12.2 no longer has one online? Already researched it after checking repo... I'll have to import it locally to build the jar.

carmine scroll
#

👍

grave sky
#

is there any way to prevent player's from dropping the items from gui? i tried PlayerItemDropEvent, it does trigger but i'm able to still drop the item from the gui

https://streamable.com/7566bq

dusky harness
#

Paper used 3 (at least) repos

#

So 1.12 might be on a different one than the latest

dusky harness
#

I'm confused on why you need 1.12 api for a 1.8 server (assuming based on convo) but 🤷‍♂️

stuck hearth
#

I'm not sure they even know

carmine scroll
carmine scroll
dusky harness
#

So why were you arguing for 1.8

#

Idk whatever as long as you're intending it to be 1.12 it's fine

carmine scroll
stuck hearth
#

Holy shit

#

Dude confused java 8 with 1.8

#

Understandable but funny

torpid raft
#

fair tbh

stuck hearth
#

It was a weird versioning scheme to be sure

#

And then swap it up in the middle too

#

Not that MCs versioning is much better recently :p

dusty frost
#

well in like 1996, i think the idea was to have a java 2.0 and 3.0 at some point lol

#

then it was like 2017 and they were like "damn maybe we're never gonna break backwards compat"

stuck hearth
#

Yeah I'm sure it made sense for the time

dusty frost
#

is kinda funny though

#

i wonder when they officiall stopped

#

was it 1.9 and 1.10 too?

stuck hearth
#

9 I thought

#

1.8 -> 9

dusty frost
#

ah seems to be that mostly, but gradle apparently didn't swap until 11

stuck hearth
#

Next major lts?

#

Makes sense I guess

stuck hearth
#

Oh I wonder why that breaks?

dusty frost
#

yeah i dunno, kinda interesting though

royal hedge
#

its a click event iirc

royal hedge
grave sky
#

thanks, so i should check for ClickType.DROP and cancel it right?

royal hedge
#

no you should obviously check for the ClickType.LEFT and do nothing

grave sky
#

but i dont want to cancel the click event for that items in the gui but i have to cancel the drop event (ClickType.DROP)

royal hedge
#

then do that

#

i was joking

grave sky
#

oh lol 💀 alright thanks

dusty frost
#

bro's a little mean

royal hedge
#

itll probably be better if you try things urself before asking

royal hedge
#

🥰

#

or her

dusty frost
#

nice

#

gotta cover your bases

grave sky
#

i already did try player item drop event and inventory drag event but they did not work so i thought asking in helpchat would he nice 🤦‍♂️

royal hedge
#

no thats fine

royal hedge
dusty frost
#

bro just wanted to clarify

#

and you had to come at them

royal hedge
#

yes 🙂

stuck hearth
#

I'd never be mean like that fr

royal hedge
#

too bad i responded quicker than u

stuck hearth
#

I didn't know the answer 😦
Bukkit is a silly api

royal hedge
#

what api isnt

#

(except ones authored by sparky)

stuck hearth
#

Sponge

#

Nooo

royal hedge
#

cant remember using it but there was prob smth silly

stuck hearth
#

Data api was weird in 7, 8+ has been pretty good.

#

It's also a sane approach to forge support with plugins

random atlas
#

Hello everyone , i have a question for mythicmobs pl ,im gonna make a custom zombie mob but I can't do something for his abilities for example how can I create zombie to if players place a block in front of themselves that zombie break a block ?

reef sluice
#

So there is a code in my plugin which after a win increases by 1 and gets added to a yml file, though the placeholder's value of the win doesn't update until the server restarts.

grave sky
#

😔 ClickType.DROP didnt work, it only cancelled the item drop if i use Q to drop the items, the same is written in javadoc as well

DROP
public static final ClickType DROP
The "Drop" key (defaults to Q).
            if (e.getClick() == ClickType.DROP || e.getClick() == ClickType.CONTROL_DROP) {
                e.setCancelled(true);
            }
void orchid
grave sky
#

oh

#

thanks, i will try that!

grave sky
#
    @EventHandler
    public static void onClick(InventoryClickEvent e) {
        if (XyrisKits.getPlayerKits().isEditing((Player) e.getWhoClicked())) {
            if (e.getClickedInventory() == null) {
                if (e.getCursor() != null) {
                    e.setCancelled(true);
                }
            }
        }
    }

this works, thanks alot

frosty silo
minor summit
#

@mods

grave sky
#

@admin

tight junco
#

i kinda want to download it

#

ohhh

#

it downloads a crypto miner e

#

how funny

#

wait maybe it doesnt i dont know what it does

dusk spruce
#

i wish 3 year old me bought crypto

#

why tf was i so stupid as a toddler

river solstice
dusk spruce
#

@cunning kraken yo whats bad about the pistols / what could be improved

carmine scroll
#

import com.google.gson.stream.JsonWriter; error: Cannot resolve symbol 'gson'

#

It's like all over this project.

carmine scroll
#

Anyone? I am gonna lose my shit

torpid raft
carmine scroll
torpid raft
#

in your project dependencies

#

are you using gradle?

carmine scroll
torpid raft
#

maybe your gradle install step isnt working right, if you are using intellij you should see the logs for it in the 'run' tab, should run when you hit the 'refresh' button that appears after editing the build.gradle in any way

#

if nothing went wrong there then id make an empty main file and try to use gson there as a sanity check

torpid raft
#

gson is a library that parses json files

carmine scroll
#

Yes

torpid raft
#

make a main file that attempts to use gson to parse a json file

#

or at least imports it to recreate the error

carmine scroll
#

I am just over it. Been trying to fix this stupid plugin for like 5 hours... It was developed by someone else but it's a depend for a custom plugin I have... The code is a mess.

#

I fixed the plugin 👍

vagrant needle
#

Hey, I'm trying to do something in my plugin, let me explain
So I would like players to show in the tab with the color of a relation they have with the player seeing the tab on his client.
So I tried something like %country_color-%player_uuid%%,but that doesn't work. Anyone knows how to make double Placeholders like this, or has another solution for me?

worn jasper
#

ah

worn jasper
#

np

vagrant needle
#

@worn jasper which player is which?

sour crescent
#

Did anyone know why my code is not working?

    public String onPlaceholderRequest(OfflinePlayer offlinePlayer, String identifier) {
        DataUser dataUser = new DataUser(offlinePlayer.getUniqueId().toString());
        if (identifier.startsWith("balance_")) {
            String currencyName = identifier.substring("balance_".length());

            return String.valueOf(dataUser.getcurrency(currencyName));
        }
        if(identifier.equals("currency_")) {
            String currencyName = identifier.substring("currency_".length());

            return dataUser.getCurrency(currencyName).currency();
        }
        if(identifier.equals("currency_value_")) {
            String currencyName = identifier.substring("currency_value_".length());
            return String.valueOf(dataUser.getCurrency(currencyName).cost());
        }
        if(identifier.equals("currency_symbol_")) {
            String currencyName = identifier.substring("currency_symbol_".length());
            return dataUser.getCurrency(currencyName).symbol();
        }
        return null;
    }
        new PlaceholderAPI().register();
loadbefore:
  - "PlaceholderAPI"
depend:
  - "PlaceholderAPI"
worn jasper
vagrant needle
#

I'll test anyways

worn jasper
sour crescent
sour crescent
#

maybe give me logs

worn jasper
#

yes, me neither

#

it was sarcastic....

sour crescent
#

i know

worn jasper
#

my point being, "is not working" can mean 2000x things

#

be more specific

#

lol

sour crescent
worn jasper
#

is it not replacing the placeholder?

#

wrong return?

sterile hinge
#

the fact that you create a new DataUser object is sus

sour crescent
#

%xoeconomy_balance_dolar%

#

and dolar is good currency

worn jasper
#

(dollar takes 2 l) btw

worn jasper
worn jasper
sour crescent
sterile hinge
worn jasper
sour crescent
worn jasper
#

so, getcurrency is requesting to a mysql db?

sour crescent
# worn jasper so, `getcurrency` is requesting to a mysql db?
    public double getcurrency(String currency) {
        try {
            Statement statement = connection.createStatement();
            ResultSet resultSet = statement.executeQuery("SELECT bank FROM " + tableUsers + " WHERE UUID = '" + uuid + "';");

            if (resultSet.next()) {
                String bankJson = resultSet.getString("bank");
                JSONObject bank = new JSONObject(bankJson);

                if (bank.has(currency)) {
                    return bank.getDouble(currency);
                }
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return 0;
    }
#

and its working fine but not with placeholders

worn jasper
#

from where does that connection come from?

#

(please don't say plugin instance)

sour crescent
worn jasper
#

it is an instance lol, since there is no DI in your class, which means it must be an instance but welp

#

not the point of the question

sour crescent
#

but in normal messages it is replacing everything but not in placeholderapi plugin

worn jasper
#

can you send the whole PlaceholderAPI class?

dusky harness
#

also did you try with /papi parse %placeholder% command?

sour crescent
worn jasper
sour crescent
#

i mean

#
package pl.xomc;

import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.OfflinePlayer;
import org.jetbrains.annotations.NotNull;
import pl.xomc.database.DataUser;

public class PlaceholderAPI extends PlaceholderExpansion {

    @NotNull
    @Override
    public String getIdentifier() {
        return "xoeconomy";
    }

    @NotNull
    @Override
    public String getAuthor() {
        return "piotrkociakx";
    }

    @NotNull
    @Override
    public String getVersion() {
        return "1.0";
    }

    public String onPlaceholderRequest(OfflinePlayer offlinePlayer, String identifier) {
        DataUser dataUser = new DataUser(offlinePlayer.getUniqueId().toString());
        if (identifier.startsWith("balance_")) {
            String currencyName = identifier.substring("balance_".length());

            return String.valueOf(dataUser.getcurrency(currencyName));
        }
        if(identifier.equals("currency_")) {
            String currencyName = identifier.substring("currency_".length());

            return dataUser.getCurrency(currencyName).currency();
        }
        if(identifier.equals("currency_value_")) {
            String currencyName = identifier.substring("currency_value_".length());
            return String.valueOf(dataUser.getCurrency(currencyName).cost());
        }
        if(identifier.equals("currency_symbol_")) {
            String currencyName = identifier.substring("currency_symbol_".length());
            return dataUser.getCurrency(currencyName).symbol();
        }
        return null;
    }
}
worn jasper
#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

worn jasper
#

next time ^^

sour crescent
dusky harness
#

can you add some System.out.println?

#

to see if the code is running
like in the line right below public String onPlaceholderRequest etc for ex

sour crescent
#

give me an minute

worn jasper
worn jasper
sour crescent
#

wait

#

there is no sign of life

#

in any placeholder request

#

from this plugin

#

I added

    public String onPlaceholderRequest(OfflinePlayer offlinePlayer, String identifier) {
        DataUser dataUser = new DataUser(offlinePlayer.getUniqueId().toString());
        System.out.print(identifier);
        if (identifier.startsWith("balance_")) {
            String currencyName = identifier.substring("balance_".length());
            System.out.print(currencyName);

            String balance = String.valueOf(dataUser.getcurrency(currencyName));

            System.out.print(balance);

            return balance;
        }
#

and there is no logs

worn jasper
#

lol cause it's wrong

#

just noticed it now

sour crescent
#

what is wrong

worn jasper
#

It should fix your current issue and a future issue you would have

#

lol

worn jasper
#

then just change the name

#

and you good

sour crescent
#

let me check

#

yeah its working

#

thank you guys

worn jasper
#

np

dusky harness
#

ohh boy

#

@sour crescent lesson learned - always put @Override over the methods you're overriding

#

🙃

#

look in the persist method for example

#

if you change it to canPersist or smth, it errors out

sour crescent
dusky harness
#

it tells you if you messed it up

sour crescent
#

wait

#

here is whritten

#

onPlaceholderRequest(Player, String)

#

did i am stupid or something?

dusky harness
#

OfflinePlayer is different from Player so it errors

sour crescent
#

a

#

make sens

minor summit
#

that doesn't look like much of an error to me

#

imgur

#

?imgur

neat pierBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

minor summit
#

no you dont

#

anyway there are like a thousand other image hosting websites

#

are you making a plugin, running a server, or just a player?

#

you are using paper api but you are not running paper (or a very old version of paper)

#

prolly

dusky harness
#

what is model engine?

worn jasper
#

hehe

#

^^

#

furniture, etc

dusky harness
#

oh

worn jasper
#

loads models

#

etc

dusky harness
#

ic I thought he was making his own plugin so I was confused 🥲

dusky harness
#

ah yep

worn jasper
#

fuck spigot

dusky harness
#

paper wouldn't exist without it tho

#

so gotta give it credit

worn jasper
#

fair

#

fuck spigot, the only good thing of it is that paper exists because of it

dusky harness
#

🥲

worn jasper
#

imagine using spigot in 2024 though

#

#

aren't like over 90% of 1.20.x servers using paper?

#

lol

dusky harness
#

im not sure
I think there was some site by a paper dev but I don't remember

worn jasper
#

there is, but kinda rigged on newer version

#

lol

dusky harness
#

whats the full error?

#

that's the whole error?

#

nothing below it?

#

can you send it in

#

?paste

neat pierBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

worn jasper
#

lol seems like a java version issue

#

but maybe report it to paper

dusky harness
#

27503 is a bit high

worn jasper
#

it is weird yes

#

realllyyyy weird

dusky harness
#

yeah ig maybe try asking in paper server

#

or paper github issue

stuck hearth
#

Jdk from the future

#

My guess is a wonky gradle config where someone stuck a port where the java target should be.

But I'm also not sure how it built

pulsar ferry
#

Glad to see Java thriving in the future, can't wait for Java 27459
(yes reposting the joke, had the wrong java version :))

royal hedge
#

whatever youre using is probably trying to read a different file as a class file

#

but thats weird cuz iirc there should be a magic number at the start

carmine scroll
pulsar ferry
lusty lava
#

I have a question about spigot. Id like to make a command where I can easily change an items name and lore. Ussage /edit "name here" "lore here". Now I am struggling to get the arguments to split only if there is no " so that "name here" is a single argument and "lore here" is also a split argument.

torpid raft
carmine scroll
#

Must have IntelliJ plugins?

carmine scroll
#

God I’m too stupid for coding

dusky harness
#

oops

dusky harness
carmine scroll
dusky harness
#

probably yeah

carmine scroll
# dusky harness probably yeah

well... Do I have to put anything in build.gradle or will it automatially just compile it into jar? I am pretty sure I can just comment it out yeah?

dusky harness
carmine scroll
#

compileOnly("com.comphenix.protocol:ProtocolLib:4.5.0") compileOnly("com.github.MilkBowl:VaultAPI:1.7") compileOnly("us.myles:viaversion:2.1.3") compileOnly("com.sk89q.worldedit:worldedit-bukkit:6.1.4") compileOnly("com.destroystokyo.paper:paper-api:1.12.2-R0.1-SNAPSHOT") // compileOnly("com.destroystokyo.paper:paper:1.12.2-R0.1-SNAPSHOT")

#

If I don't comment it out then it tries to pull from repo

dusky harness
#

try putting mavenLocal() before all the other repos

carmine scroll
#

I did

#

mavenCentral()
mavenLocal()

lusty lava
carmine scroll
dusky harness
#

and you have it in maven local?

#

it searches in the order that u define it so if u put maven local first and its getting from repo

#

that means that you don't have it in maven local

#

i think

carmine scroll
#

I have it in libs in build

dusky harness
#

oh

#

then you have to do smth else

#

hold on

#

remove maven local and try ```gradle
implementation(files("libs/paper.jar"))

#

and rename it to what the file is called

carmine scroll
#

There is a lot more files in mavenlocal than just paper would be

dusky harness
#

wdym

#

also thats not maven local

#

just want to clear that up

carmine scroll
#

`avenCentral()
mavenLocal()

flatDir {
    dirs("libs")
}

}

dependencies {
implementation("org.apache.commons:commons-lang3:3.9")
implementation("mkremins:fanciful:0.4.0-SNAPSHOT")
implementation("com.squareup.okhttp:okhttp:2.7.5")

compileOnly("com.comphenix.protocol:ProtocolLib:4.5.0")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("us.myles:viaversion:2.1.3")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:6.1.4")
compileOnly("com.destroystokyo.paper:paper-api:1.12.2-R0.1-SNAPSHOT")
compileOnly("com.destroystokyo.paper:paper:1.12.2-R0.1-SNAPSHOT")

// Dependencies on server classpath
compileOnly(kotlin("stdlib-jdk8"))
compileOnly("redis.clients:jedis:4.1.1")
compileOnly("org.mongodb:mongodb-driver:3.10.2")
compileOnly("org.reflections:reflections:0.9.11")`
dusky harness
#

wdym

#

no keep the other repos

carmine scroll
#

We're good, I renamed jar in /libs/ and it didn't throw an error.

#

Thanks

carmine scroll
#

I got a bunch of new fun problems in a sec tho

#

@dusky harness wtf is this error? It's for building project and it gets almost to the end and throws this uses unchecked or unsafe operations. Recompile with -Xlint:unchecked for details.

pulsar ferry
#

Btw how are you getting so many problems? Is this some sort of old project you're picking up and everything is outdated?

carmine scroll
#

There's a lot more to it but I don't think you wanna hear the entire story so i'll save you the hurt

dusky harness
#

or is that it

carmine scroll
# dusky harness whats the full error?

/Users/admin/IdeaProjects/Fanciful/src/main/java/net/amoebaman/util/ArrayWrapper.java: uses unchecked or unsafe operations. Recompile with -Xlint:unchecked for details.

#

Should I just @Supress and void? lol

dusky harness
#

if u go into ArrayWrapper is there an IJ error?

#

usually its not too difficult to fix that error

#

i think

#

im not sure what it exactly is

carmine scroll
#

package net.amoebaman.util;

#

the line throwing the error

dusky harness
#

uhhhhhhhhhh

#

what error

carmine scroll
#

The one I sent

ocean crow
#

thats not supposed todo that lmfao

dusky harness
#

no in intellij

#

intellij doesn't give those types of errors

carmine scroll
#

I am on mac

pulsar ferry
#

Pretty sure that's just a warning not an error

carmine scroll
#

idek how to ss

dusky harness
#

ohh right

carmine scroll
ocean crow
#

shift + command + 4 @carmine scroll

#

iirc

carmine scroll
#

It's saying it might be unsafe

pulsar ferry
#

Can you send the full log?

carmine scroll
carmine scroll
dusky harness
#

wait if you go into that class

carmine scroll
#

Or debug?

dusky harness
#

and go into the IntelliJ problems tab

#

like the one with the 🚨 symbol i think

pulsar ferry
dusky harness
#

can you screenshot that as well

carmine scroll
dusky harness
#

oh

#

ig just do what matt said for now

carmine scroll
dusky harness
#

ok

carmine scroll
pulsar ferry
carmine scroll
# pulsar ferry

Oh okay. Thanks. Other plugin is throwing like 200 errors. They're all bukkit / spigot related tho... Like it, NBT, bukkit, Minecraft...

Unresolved reference:

#

I have tried to check all bukkit imports and repos and they are all correct. I have also tried to do it offline with the jar using libs but it does nothing.

carmine scroll
#

Thank you guys for the help. I must sleep now it’s 8am.

worn jasper
#

uh any ideas about this? When I add that mainClassName, it then says Unresolved reference: mainClassName lol

stuck hearth
#

How are you adding it

queen plank
#

I have a method for converting colored text, such as #ff0000Hello! to a HEX color string. This is done using the following code HEX_PATTERN.matcher(string).replaceAll(r -> ChatColor.of(parseHEX(r.group(1))).toString()); which finds all HEX values and inserts the string representation of a ChatColor with that value. This works fine for item lores and names etc.. However it does not work with md_5s ComponentBuilder (builder.append(ColorUtils.translateColors(string));). All colors are pitch black except for #ffffff which is white. Any idea what is causing this?

dusky harness
#

it seems like it should support hex as long as it's in the right format

#

source shows it should support it tho

minor summit
#

append TextComponent.fromLegacyText(ColorUtils....)

dusky harness
#

oh

#

nvm ic

minor summit
#

append(String) likely just shoves the string content in a TextComponent

#

that's what you get for using legacy strings 😎

queen plank
queen plank
# dusky harness edit: nvm

I was compiling the pl with your suggestion, but Emily is just better ig and solved it immediately lol. Printed #x#f#f#0#0#f#fTEST TEXT if you were curios :)

queen plank
#

Tnx anyways! :>

carmine scroll
#

My project doesn't want to compile bukkit or spigot, throwing a ton of mc related reference errors.

#

It seems the dependencies aren't there but they are.

carmine scroll
#

Entity.kt: (7, 8): Unresolved reference: io

#

import io.netty.util.internal.ConcurrentSet

#

the build.gradle.kts builds just fine but then all the other classes throw errors

carmine scroll
#

Anyone have any tips for converting build.gradle to build.gradle.kts?

stuck hearth
#

Looking at existing projects is a decent way, but the gradle docs have kts examples too

carmine scroll
#

I am better off making these plugins from scratch... LOL

carmine scroll
#

error: package net.minecraft.server.v1_12_R1 does not exist import net.minecraft.server.v1_12_R1.PlayerInventory;

Bunch of build output errors for this.

dense drift
#

I dont fully remember, does bukkit config api treat single values as lists with a single item when using getStringList, getIntList, etc.?

minor summit
#

no

#

it has to be a list

dense drift
#

Bs

river solstice
#

Bs

carmine scroll
#

Okay, just ignore me asking for help that’s cool 👍🏽

torpid raft
#

okay

carmine scroll
#

error: package net.minecraft.server.v1_12_R1 does not exist import net.minecraft.server.v1_12_R1.PlayerInventory;

#

That’s literally all I asked.

pulsar ferry
#

That is not asking, that is posting an error an expecting people to know what you want

carmine scroll
#

Okay sorry

carmine scroll
carmine scroll
# royal hedge idk

In build.gradle.kts wouldn’t this just be fixed by implementing the spigot api?

royal hedge
#

mf i said idk

carmine scroll
#

Dude it was a question. Calm yourself

royal hedge
#

you were meant to ask why i responded if i didnt know

dusky harness
#

open up the paper.jar
does it have a net/minecraft/server/v1_12_R1/PlayerInventory file?

torn heart
#

can we ban for anime pfp

carmine scroll
warm steppe
#

💀

pulsar ferry
# carmine scroll I am better off making these plugins from scratch... LOL

Changing it to kts won't solve any of your issues, it's still gradle, just a different language for the build script
You should probably take your own advice here, start from scratch, once the project works then add the stuff you need instead of trying to fix something without the proper knowledge to do so

carmine scroll
worn jasper
#

Lol, does this guy know legacy is in theory not supported?

#

No one is obliged to give you support for legacy versions lol

#

Well, not even for latest version, so most def. not for old versions

dusky harness
#

because nms can't be hosted on maven repos

dusky harness
#

no one is obliged to give anyone support here, doesn't matter which version

carmine scroll
dusky harness
#

but I would also recommend latest api

worn jasper
dusky harness
pulsar ferry
#

How is that condescending or disrespectful? You are struggling with something and require guidance on every step, starting the project from scratch will give you the opportunity to learn to work with gradle and go step by step to solve your issue
You start the new project, add a dependency and copy the classes that depend on it, repeat
Or you can choose to keep asking for every single missed import you'll find which it'll get to a point where no one will want to answer anymore
Find it disrespectful if you want, but that is my advice

worn jasper
#

it feels like another one those cases where people come to java, thinking they will go from 0 to 100 in no time, skip a bunch of steps, then want to do X which is far more complex than what they can do with their current knowledge, then instead of doing research or learning things slowly, they go straight to channels asking for help in things they are not familiar and think that support MUST be given. It takes like 2 google searches to find the right answers to these questions lol

#

Might be wrong, but feels like it

carmine scroll
dusky harness
carmine scroll
carmine scroll
dusky harness
#

usually

#

afonso before you send your essay

#

i'd think about what you're saying 🥲

#

you've been typing for a while

worn jasper
# carmine scroll No one asked you once again, like do you enjoy being a dick to random ppl and co...

You are in a public channel, no one is being a dick, I am not telling you suck or whatever, just stating the fact of 1. what it feels like and 2. these can be answered rather quickly with google. And if you heard people instead of taking everything as an attack on you, life would be easier for both you and everyone else. Like Matt said, much rather you start a project from scratch and learn than asking a question every 2 minutes lol

dusky harness
#

these can be answered rather quickly with google.
without java knowledge, eh not really

worn jasper
#

well, it's a him problem if he tries doing stuff like this without java knowledge lol

#

another reason to LEARN before asking

dusky harness
#

I mean asking can result into learning

#

I asked a ton of questions in the rust discord server

#

🥲

worn jasper
#

it appears not since he refuses to take the advice of learning lol

dusky harness
#

(past tense since I stopped learning 😢)

dusky harness
#

NotEnough did say that he was thinking of starting the plugins from scratch (although I can't tell if that message was sarcastic)
and then Matt did recommend doing that as well later on

and now I'd also recommend that
I don't know how yt tutorials are rn, but I think following a spigot yt tutorial (series?) wouldn't be that bad of an idea? just to give a start

#

idk

#

I don't know what his level is

#

I just know that it's still somewhat at the beginner area from this conversation

worn jasper
# dusky harness I mean asking can result into learning

Having questions and doubts and seeking clarification or being stuck at X or not knowing how to do Y, while having the basics and having done a simple mini google search, is justified, now, trying to do something advanced, without proper knowledge and lying to yourself that you know it, and then proceeding to skip doing your own research either because you don't want to or because you lack basic knowledge to be able to do so, and then ask questions every 2 minutes in here that you should already know, does not feel justified.

And the problem with the second part is, you might fall for it, you ask the first question and maybe someone calls you out for it and you go and learn. The issue is when even after you being called out for it, you continue.

worn jasper
pulsar ferry
#

there are some good tutorials on youtube
Eh

dusky harness
#

rip bm tutorial

#

😔

worn jasper
#

no idea why, but most tutorials just refuse to use DI

#

lol

minor summit
#

@icy shadow

icy shadow
#

Hey what’s up

#

Oh yeah I am

#

Totally

pulsar ferry
#

Dependency Injection

torn heart
#

cool design pattern

worn jasper
storm stone
#

Hello

#

Just wanted to ask, where can I get started with plugin development? Any guides that I can refer to as a beginner?

torn heart
#

youtube

#

learn programming first

#

learn java/kotlin

storm stone
#

Thankfully I do know Java. Was browsing different guides on google as a starting point, but wondered if there's some specific one etc. that people here would recommend

dusky harness
dusky harness
worn jasper
storm stone
#

Gotcha, thank you all!

heady zinc
#

I am creating my own expansion using IntelliJ and I have a silly question:
How do I add the PlaceholderExpansion class to my project? Should I load it as a library, a module, or a JAR file?

I added the dependency in the pom file:
<dependency> <groupId>me.clip</groupId> <artifactId>placeholderapi</artifactId> <version>2.10.4</version> <scope>provided</scope> </dependency>

orchid otter
#

Is there a easy way to handle debug prints in spigot plugins? I would like to have a debug mode i turn on and ideally it would just allow certain messages to be sent in the console but i dont really wanna go thru my entire plugin and add if statements everywhere, there has to be a better way no?

dapper lake
#

Hello, is there event to check what item player put into Inventory?

void orchid
# orchid otter Is there a easy way to handle debug prints in spigot plugins? I would like to ha...

Yeah, delegate your debug messages to a debug log function that you control, that way you can dismiss it if it's not under the right conditions. Here's a rough basic example:

  // PluginLogDebugger

  // more convenience than calling PluginLogDebugger.instance().debug... every time
  public static void debug(String content) {
    INSTANCE.debug(content);
  }

  void debug(String content) {
    if (!debugMode) return;
    logger.log("[Debug] " + content);
  }



  // other class
  void test() {
    PluginLogDebugger.debug("test");
  }
dusky harness
#

so what you have already should be fine

orchid otter
void orchid
little snow
#

Hello, I'm making a plugin that uses DeluxeTags as a dependency, but I'm having problems setting up the pom.xml for it. Have any of you guys used this as a dependency to know how to set it up?

torn heart
#

why are you asking to ask

#

state your problem so that people can actually help you

little snow
#

Yeah I've been trying to find the pom.xml dependency section for DeluxeTags online but came up with nothing. So I was wondering what that was or if there is any work around to figuring it out

merry knoll
torn heart
#

you can just Google "deluxe tags maven" to instantly get that result

little snow
#

Thanks a ton! I did do quite a bit of research, its just difficult knowing a starting location when your new to this. But this maven repo is game changer thx

ashen edge
#

My name is Paul, and I am looking for a reliable and honest USA-based collaborator for long-term work. The work requires good English-speaking skills. If you are interested or know someone who might be, please feel free to reach out to me. Thank you!

dense drift
#

Does anyone have a method to turn World#getTime into a 12/24h format?

sterile hinge
#
private static final LocalTime SIX_O_CLOCK = LocalTime.of(6, 0);
public static LocalTime ofTicks(long ticks) {
  return SIX_O_CLOCK.plusSeconds((long) (ticks * 3.6));
}
dense drift
#

damn, works like a charm, thank you @sterile hinge ❤️

sterile hinge
#

nice

heady zinc
dusky harness
#

if maven errors, then make sure you have the repo added

#

after that, feel free to post your pom.xml

heady zinc
#

here's the repo:
<repositories> <repository> <id>spigotmc-repo</id> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> </repository> <repository> <id>sonatype</id> <url>https://oss.sonatype.org/content/groups/public/</url> </repository> </repositories>

heady zinc
dusky harness
#

make sure to add the PAPI repo

heady zinc
#

ah thanks i missed that

#

Now Im experiencing another error:
[16:36:23 WARN]: [PlaceholderAPI] Cannot load expansion randomenchantment due to a missing plugin: RandomEnchantmentExpansion

despite these pieces of code in the expansion:

private RandomEnchantmentExpansion plugin;

@Override public String getRequiredPlugin() { return "RandomEnchantmentExpansion"; }

@Override public boolean canRegister() { return (plugin = (RandomEnchantmentExpansion) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null; }

dusky harness
heady zinc
#

Hm no... I don't need that?

dusky harness
#

so it's a separate expansion jar?

heady zinc
#

yes for PAPI

dusky harness
#

then it wouldn't make sense for RandomEnchantmentExpansion to be a plugin

heady zinc
#

you're right

dusky harness
#

hold on 1 sec

#

okay

dusky harness
heady zinc
#

done

grave sky
#

hi, the itemNameTwo string output is "<!italic><red>Example Text". Is there any way to make it only return "<red>Example Text" instead of "<!italic><red>Example Text"?

String itemName = config.getString(itemPath + ".name");
Component itemNameComponent = clickedItem.getItemMeta().displayName();
String itemNameTwo = MiniMessage.miniMessage().serialize(itemNameComponent);
minor summit
#

well, the display name explicitly has italics disabled, you would lose information by doing that

torpid raft
#

no

warm steppe
#

nice try

wind tapir
#

Hello, using the dhAPI, I have this error after a couple refreshes, can anyone help me ? Thanks

[DecentHolograms] Failed to reload config file at path 'holograms/SpaceMountain.yml'.

#

java.io.FileNotFoundException: plugins/DecentHolograms/holograms/SpaceMountain.yml (No such file or directory)

#

but the file is present

minor summit
#

i'mma say "no"

wind tapir
#

ok i get it

#

i delete the hologram to refresh it

#

so the plugin detects there is no file before i create another

orchid summit
#

Hey, I'm trying to import org.bukkit.GameMode; and its not working. I'm assuming i've missed something obvious as i haven't done this in a while (i'm using paper 1.21)


import com.jtg.basicutils.Utils.Utils;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.GameMode;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;```
sterile hinge
#

what does "its not working" mean?

orchid summit
#

its saying Cannot resolve symbol 'GameMode'

#

the rest of them are fine tho

hoary scarab
#

What are jar are you depending on?

orchid summit
#

Like this stuff?

            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.21-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.kyori</groupId>
            <artifactId>adventure-api</artifactId>
            <version>4.17.0</version>
        </dependency>```
sterile hinge
#

and you're properly defining the repos too?

#

and what about the other imports?

orchid summit
#

the other imports are all working fine, and here are my repos:

        <repository>
            <id>papermc</id>
            <url>https://repo.papermc.io/repository/maven-public/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>```
sterile hinge
#

what IDE are you using?

hoary scarab
#

<scope>provided</scope>
Is the jar actually provided or do you get it from the repo?

sterile hinge
#

provided means it's provided at runtime, it doesn't affect resolution at compile time

orchid summit
sterile hinge
hoary scarab
pulsar ferry
#

Only matters at runtime, while you're working on it on your IDE it'll resolve it

sterile hinge
hoary scarab
hoary scarab
#

Atleast my IDE isn't the cause of a github breach xD

pulsar ferry
#

What?

sterile hinge
#

but yeah, can't affect an IDE that doesn't have any features

hoary scarab
minor summit
#

just uninstall the plugin

hoary scarab
minor summit
#

i didn't

sterile hinge
#

luckily eclipse never has any vulnerabilities

dense drift
hoary scarab
#

Never said it didn't.
I specified the github breach lol

minor summit
#

ok?

heady zinc
#

Maybe I used the math extension as an example for printing errors and warnings in the console. Everything works fine, but something isn't working in my extension even though it works in the math extension... I copied the NativeLogger class, and 'warning' on line 13 is marked as an error: cannot resolve method 'warning' in 'PlaceholderExpansion'
`package org.northdeer.randomenchantmentexpansion.logging;

import me.clip.placeholderapi.expansion.PlaceholderExpansion;

public class NativeLogger implements LoggerUtil {
private final PlaceholderExpansion expansion;

public NativeLogger(PlaceholderExpansion expansion) {
    this.expansion = expansion;
}

public void warn(String text) {this.expansion.warning(text);}

//public void info(String text) {this.expansion.info(text);

}`

dense drift
#

Make sure you use the latest version of placeholderapi

heady zinc
#

Yes I am using the latest version: 2.11.6

#

No candidates found for method call this.expansion.warning(text)
But it is working in the math extension... Did I overlook st?

heady zinc
dusky harness
#

oh

dense drift
#

Check the new wiki, it is mentioned at the top of the page

dusky harness
#

whoops lol

dense drift
#

Though I don't think the maven repo has changed

heady zinc
#

Now I would like to upload the extension to ecloud. The website says I need to use discord to get in touch with you because I cannot create an account.

stuck hearth
prisma briar
#

Keep getting this error while trying to upload my library into github. Full log can be found at https://jitpack.io/com/github/mdaffa48/MDLib/2.0.0/build.log

I use latest maven-shade-plugin and I have maven version 3.9.8. How can I fix this?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.6.0:shade (default) on project MDLib: The plugin org.apache.maven.plugins:maven-shade-plugin:3.6.0 requires Maven version 3.6.3 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginIncompatibleException
static jewel
#

how do you give player permissions?
do you need the LuckPerms api?

stuck hearth
#

If you wanted to do it pragmatically that or I think vault has a permissions api?

Obviously you could use commands if you're not programming.

stuck hearth
#

Ok

willow lantern
sterile hinge
#

You should use paperweight, that makes things pretty simple

willow lantern
# proud pebble pretty much

I’m just thinking, what if I make a library that acts as an abstraction layer between the plugin and different versions of NMS

#

Would that be a game-changer or yet another stupid library

merry knoll
#

you could facade it all away i suppose but its kinda not that big of a deal

proud pebble
#

it would be the same as others are already doing

torn heart
brittle carbon
#

Hey, How can I get the player who is "watching" an entity? I want to set %player_name% but I need the player for that. so basically a dynamic player.

#

I can use NMS if needed, but I can't figure it out

willow lantern
willow lantern
willow lantern
# torn heart this is literally every plugin framework ever

But frameworks do not cover all the nms functions
For example, you don’t access CraftPlayer with spigot API

What I want to create is an abstraction layer to access raw NMS functions no matter what the version is

For example, I can make a plugin that import CraftPlayer from the library, and the library will do the dirty hard-code works (detecting version and import the correct NMS class) for me

torn heart
#

there's a reason you can't access NMS from spigot, it's because if you try to abstract that low level, version changes become much harder to work with

#

or at least, I'd assume so

merry knoll
#

and you can bundle the useful parts of paper yourself worst case (adventure etc)

torn heart
willow lantern
willow lantern
willow lantern
#

Btw raytracing is, I believe (again haven’t code plugins for so long), an expensive operation
It might hurt you server performance if you’re doing too much of it

dense drift
#

How does one hide item attributes on 1.21 if the item flag doesn't work? pepe_kek

minor summit
#

a custom attribute modifier has to exist for the attribute modifier hide tooltip to work

#

because the "flag" exists in the attribute modifiers component, and for that to exist it has to have attribute modifiers

#

you could use an empty map for it if it's for GUI purposes, but then it will lose all of the vanilla properties (an iron pickaxe is as good as a stick)

#

if you want to preserve the default modifiers you'd need to copy them over

dense drift
#

I see, thanks Em

#

Do other flags also need a special treatment? I think people complain about hide_enchants not working either ugh

minor summit
#

I mean, hide enchantments only works if there are enchantments

#

I don't see why you would want to use hide enchantments without enchantments lmao

#

I guess you could have an empty enchantments list, since there is no such thing as "default enchantments"

dense drift
#

Ye that's obvious smh pepe_kek but from the picture I've seen, the item had an enchantment on otherwise the user wouldn't complain (I hope)

#

I am talking about deluxemenus btw

minor summit
#

do the enchantments actually matter?

dense drift
#

No, people usually just want the glow effect

minor summit
#

you can just set the glint override then, but the flag should work fine

dense drift
#

What is that?

minor summit
#
Minecraft Wiki

Data components, or simply components, are structured data used to define and store various properties. They are used on items, where they are referred as item components or item stack components, and block entities, partially replacing NBT format.
Data components are used in various places, including the player's inventory, container block enti...

dense drift
#

Cool

#

do you know of any plugin that uses something like kotlin script to quickly test some stuff? e.g. I want to have a command that give an item and I need to test some of the new API added in 1.20+

river solstice
#

If say.. I have a java plugin, can I create kotlin classes to use kotlin syntax? Will I be able to use kotlin classes in java ones and vise-versa? Will I need to make any more changed to the (gradle) project itself?

sterile hinge
#

you'd need to configure your build system accordingly, but it should work

stuck hearth
#

There are some oddities but in general they'll work with each-other.

If you plan on using Java I think the general suggestion has been - API in Java and Impl in Kotlin with some wrappers/extentions to make it feel like kotlin if that's your jam.

#

Java for example doesn't have named arguments, so I think you have to write a little differently there IIRC.

river solstice
#

Hmm, I see, I guess I'll try to work something out, I just wanna try out some kotlin syntactic sugar lol

stuck hearth
#

Matt suggested it to me FWIW

torn heart
dense drift
merry knoll
stuck hearth
#

Probably not in most cases FWIW

pulsar ferry
dense drift
#

smh

stuck hearth
#

The only anno you'd need is @JVMStatic and that's if it really needs to be that way for some reason.

merry knoll
#

stuff like jvmname is useful as well

dense drift
#

oh actually.. the enchantments are added after the flag 😐

minor summit
#

yeah

#

good api

stuck hearth
#

jvminline for value classes ofc, but the IDE will warn you for those

torpid burrow
#

is there any way in Spigot/Paper to execute some function when the server turns off like when the server turns off before that we can send all players online like server is shutting down...

dense drift
#

You usually do that with a proxy plugin from what I've seen.

torpid burrow
# dense drift You usually do that with a proxy plugin from what I've seen.

What i want to do is when the server turns off it should execute a database update which will update something in the database and i right now do it onDisable but if the server crashes or force stopped, the method wont be executed): which makes the plugin buggy as it requires to update something in the database, any idea on how to call some method before the server stops?

sterile hinge
#

well depending on the crash there might be exactly 0 code that gets executed after the problem occured

river solstice
#

cool, succesfully added kotlin to my plugin Peepo_happy

tight junco
river solstice
#

the syntax is kinda weird goofy tho

pulsar ferry
#

What's goofy about it? thonk

river solstice
#

I'm not really sure, it's just that I've been using mainly java for so long, the java convention and code style is wired into my brains

pulsar ferry
#

That's fair

river solstice
#

and ex. event.player and not event.getPlayer() screams "DIRECT FIELD ACCESS!! BAD"

#

lol

pulsar ferry
#

Wait till you find out you can do fun PlayerJoinEvent.onSomeEvent() and now you just do player intead of event.player :)
But yeah, in Kotlin you access the property, not the getter

river solstice
#

I mean it is nice

#

just, seems weird coming from java

little surge
#

Hi, I'm using gradle to build a project that depends on another project (:spigot depends on :core). However, :core is not compiling into the final jar. What's wrong with my build files?
It definitely isn't compiling as I've run jar tf to inspect the jar and only the spigot paths are there
:spigot = https://paste.helpch.at/larajobuzu.bash
:core = https://paste.helpch.at/ujoyifojoj.makefile
settings = https://paste.helpch.at/iwezamihuj.php

How I try to build - gradle build or gradle spigot:build

minor summit
#

you need to use shadow if you want to shade dependencies (creating a fat jar by including the dependencies in it)

#

and run the shadowJar task instead of jar/build (or make build task depend on shadowJar)

little surge
#

Ah okay, thank you, i'll look into that 🙂

#

Yeah that's compiling them now, thank you!

stuck hearth
pulsar ferry
#

Pretty goofy init

stuck hearth
#

Yeah, it is pretty goofy

river solstice
#

not pretty goofy

#

very goofy

jaunty viper
#

hello

stuck hearth
#

woah

jaunty viper
#

e

#

yeah

#

it works

#

i sent you console log pv

neat pierBOT
#
📋 Your paste: tirri26
https://paste.helpch.at/lejomeruco

A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.

icy sonnet
#

what is the api version name for the 1.21?

minor summit
#

huh

stuck hearth
#

This isn't ubuntu or mac, no snow lizards or alpaca versions

dense drift
#

I guess they mean the nms version? 😬

icy sonnet
minor summit
#

1.21-R0.1-SNAPSHOT? like every other version?

#

I have no idea what you're asking

icy sonnet
#

yea that

#

my IDE didnt find it so i was confused

static jewel
#

how would you generate a structure?

dusky harness
#

that error means that you're trying to modify a map (in this case) while looping over it

#

what is at line 103 of the AdminEventCommand class?

#

but a lot of the times, the solution is just to make a copy of the map and loop over the copy

jaunty viper
dusky harness
jaunty viper
#

maybe delete it and make new HashMap

#

and put it before

dusky harness
jaunty viper
#

i'll try do it

dusky harness
#

try this:

#

wait

#
new HashMap<>(Main.getMain().getConfiguration().getEventinvisiblity()).forEach((is, bool) -> {
```try replacing the line with this @jaunty viper
jaunty viper
#

okay

dusky harness
#

that just makes a copy of the map

jaunty viper
#

okay

#

i'm just learning 🤓

jaunty viper
#

Non-static method 'getConfiguration()' cannot be referenced from a static context

#

error

dusky harness
#

ummmmmm

#

you're not doing Main.getConfiguration()

#

right

jaunty viper
#

i get config from main

#

@Getter

#

ok

#

no error

#

nice

#

i'll try it

#

it doesn't work

static trail
#

Hi! I'm new to Java development and I'm in the process of installing the placeholder API. I keep getting these errors when building my projects. Can anyone please help me? It seems that Maven doesn't detect me.clip as a group ID and placeholderapi as an artifact. Any help is appreciated!

I'm using Intellij DEA as my IDE
Error encountered:

[ERROR] Failed to execute goal on project unusannussmp: Could not resolve dependencies for project me.devaraalandra:unusannussmp:jar:1.20.6: The following artifacts could not be resolved: me.clip:placeholderapi:jar:v2.11.6 (absent): me.clip:placeholderapi:jar:v2.11.6 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

My POM.xml:
https://paste.helpch.at/gomerifupa.xml

dawn viper
#

you're missing PAPI's repo

static trail
dawn viper
#

send the error again just in case

static trail
#

Here is my error:

[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
dawn viper
#

This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced
that's probably why, I think

#

try a clean package

static trail
#

a clean package?

#

sorry i'm new to java so i don't understand what im doing 😅

dawn viper
#

how are you building the jar right now?

static trail
#

im using Intellij DEA atm

dawn viper
#

yeah okay

#

do you see the maven icon on the right side of your screen?

static trail
#

yes i do

dawn viper
#

click on it, it'll open a tab

#

expand the Lifecycle folder then click on clean package

#

I think that's the name

#

it's been a while since I used maven 🥲

static trail
#

i see it!

#

clean successful. Should I try running it again?

dawn viper
#

or just clean apparently

#

yeah try

static trail
#

hmmmm same error

dawn viper
#

not sure what could be wrong, you'll have to wait for someone because idk Maven well enough 🥲

static trail
#

I see, thank you so much for the help tho tanguygab!

static trail
dawn viper
#

oh

static trail
#

thank you so much!

hybrid umbra
#

need texture pack help

#

please help

torn heart
#

also, don't ask for people to help you

#

just state your issue

sleek wedge
#

How can I use PAPI for creating my own placeholders to use everywhere?>

fossil raptor
#

hey, any clue as to why, even though i have PlaceholderAPI in my loadbefore

loadbefore: ["PlaceholderAPI", "JukeBox", "NoteBlockAPI", "WorldBorderAPI", "EssentialsX"]

my plugin fails to detect that PAPI is enabled? MyPlugin.getInstance().getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")

broken elbow
#

so it loads your plugin before PlaceholderAPI

fossil raptor
#

i am the dumbest person alive LMAO

#

thankyou so much

broken elbow
#

What you want to use instead is depend or softdepend.

fossil raptor
#

yup, gotcha

broken elbow
sleek wedge
#

yellow\

#

my plugin to work with PAPI needs PAPI on it?

#

or papi already format everything?

sleek wedge
#

is ChatChat ready for testing?

dusky harness
#

it's probably usable but I don't know what the current state is; development seems kinda paused right now tho 🥲

stuck hearth
#

Destroy him

broken elbow
fossil raptor
#

Question:
How the hell do custom block models work? And how would I go about implementing it in a plugin? PDC?

torn heart
#

learn

fossil raptor
#

I have.
It makes 0 sense lmao.
Is it display entities? It’s the only thing I understand there

#

I’ve heard people use noteblocks / block states?

fossil raptor
dusky harness
dusky harness
#

note that the item has a custom model data

neat pierBOT
dusky harness
fossil raptor
thin ruin
#

I’m curious, does ChatChat support 1.21 as of yet by chance? Even if it’s a dev build? I understand a stable version hasn’t officially been released yet so I understand if it doesn’t yet support it in a dev version… just thought to ask just incase.

river solstice
#

you can always try.

reef sluice
#

So my server is on the latest version of 1.20.4 Paper

[11:53:53 ERROR]: Could not pass event InventoryCreativeEvent to Essentials v2.21.0-dev+100-b392f03

SoEssentials is showing this error what can I do to fix this?

reef sluice
#

like every method

#
Could not pass event InventoryClickEvent to Essentials v2.21.0-dev+100-b392f03```
#

there are also the errors

#

like

acoustic flint
#

Use latest stable version 2.20.1

reef sluice
acoustic flint
#

np

sleek wedge
broken elbow
#

through bungeecord or velocity

sleek wedge
#

oooh okay, mostly idc

harsh brook
#

Hey Does anyone here use Skript? Just asking because I'm looking for help creating a simple skript plugin to delete a file or a list of files when i type a command

dusky harness
harsh brook
torn heart
dusky harness
#

it's easier
I'm not so sure about this (at least short-term)

#

especially when you say complex

#

but I haven't used skript myself so I can't really say too much

harsh brook
torn heart
harsh brook
torn heart
stuck hearth
#

I guess I fail to see how time makes this more or less difficult, especially something that likely won't need changed even in the long term.

#

They still have the opportunity do use plugins, so your point is kinda moot

dusky harness
#

because they don't have time, that's why they're choosing to use skript

harsh brook
#

Because I'm getting funding soon to hire a developer

torn heart
#

ah

dusky harness
#

Oh

olive shoal
#

I need help if anyone can send me a tutorial or a resource pack that works on the Custom Pause Menu i would really appreciate it there is a plugin called ItemsAdder but it is for sale and i dont have money to buy it and there is no resource pack help channel or idk a server about it so i hope it is allowed to ask here

dense galleon
#

How would I go about using reposilite on my linux machine through docker?

#

I'm not completely sure how it would work/what I should do tbh - as in, once one of my plugins is built I'd like it to be hosted on my linux machine (outside of my network) so that it can be fetched through gradle remotely.

pulsar ferry
#

Setup reposilite by following their guide, then publish to your reposilite from gradle using the maven publish plugin like you would do to any other maven repo

dense galleon
#

Docker is a good option to have it run in a "comparmentalized" environment right?

pulsar ferry
#

Uh big word, but yes docker is good here, reposilite already provides a docker image

dense galleon
#

Is there any way to set up reposilite without actually accessing the web dashboard?

#

The address which I am meant to connect to is being used by my website, so I'm not sure how I can connect to the web dashboard.

dusty frost
#

probably nginx

#

you'll need to connect to it anyways to upload/retrieve, so you need to set that up lol

dense galleon
#

Can't I just use a separate port?

dusty frost
#

it needs to be a secure domain

#

(please ping me for timely responses)

dense galleon
dusty frost
#

i mean technically yeah

#

but it's a lot safer and just straight up easier to add a subdomain for it

#

and then, you know, you can like use the web interface lol

dense galleon
#

Yeah but I kinda wanted to get this all set up first and then work on the details, hence I was wondering if it works without an SSL

dusty frost
#

i mean yeah it does

#

well probably, there might be a setting to only allow secure in production

#

but yeah ideally you would just setup the reverse proxy and certificate like first thing, so that you know everything is all setup and secure