#help-development

1 messages · Page 2041 of 1

magic gazelle
#

so just 99999999999999999999999999999 health I guess?

pliant oyster
#

Nah xD

magic gazelle
#

idk if this works but there's Entity#remove()

tall dragon
#

that skips the death animation tho

magic gazelle
#

well

#

there's no way to ensure a kill

#

afaik

tall dragon
#

there is

#

why not just set the damage to the mobs health

magic gazelle
#

we literally just talked about this

tall dragon
#

i dont get that

magic gazelle
#

that just sets x amount of damage.

tall dragon
#

yea so?

magic gazelle
#

there is no guaranteed way to kill a mob

tall dragon
#

set it to the mobs health

magic gazelle
#

you CANT

#

there is no way to GET or SET the health of the entity being damaged.

#

because if you could get it, chances are you could set it.

tall dragon
#

bruh ur kidding me?

#

ofc u can

magic gazelle
#

no im not

#

go read

tall dragon
#

thats ur victim

#

u can get its health

#

set the damage in the event to that

#

boom!

magic gazelle
#

I'll wait.

crude loom
#

Is it possible to compare integer and int types of variables?
for example:

Integer num1 = 0;
int num2 = 1;
if(num1!=num2)
  System.out.println("not equal")
hybrid spoke
#

no, it will automatically unwrap the object

#

just 2 Integer objects would be obv. unequal

crude loom
#

I'm doing it because I need one of them to be null at the start, I guess I can just put both of them as Integer types to save some trouble

hybrid spoke
#

or just use a boolean

crude loom
#

That is also possible true

hybrid spoke
#

and better

crude loom
#

How so?

#

Wait, can I not create a list of int types?

hybrid spoke
#

you won't have a redundant object for a boolean value

hexed hatch
#

On an entity event?

hybrid spoke
#

also its IMO bad practice to use null for that

#

when appropriate, fine. but explicit a bad practice

hybrid spoke
crude loom
#

Wrapper means integer?

hybrid spoke
#

yes

crude loom
#

I see, thanks! :D

hexed hatch
# magic gazelle I'll wait.

Are you making sure you’re casting the entity you’re getting from the event to LivingEntity so you can access health methods?

hexed hatch
#

Then that’s your problem

#

Health methods aren’t accessible with Entity

golden turret
#

guys

#

im spawning an arrow and setting its velocity to my getLocation().getDirection().multiply(10)

#

but when the arrow hits a player

tall dragon
golden turret
#

it have a chance to back to the same direction

pliant oyster
#

How can I check if a damage cause is an arrow inside EntityDamageEvent

golden turret
# golden turret

spawning the arrow```java
Arrow bullet = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection().multiply(0.1)), Arrow.class);
bullet.setShooter(player);
bullet.setVelocity(player.getEyeLocation().getDirection().multiply(10));
bullet.setBounce(false);
bullet.setGravity(false);
bullet.setMetadata("bullet", new FixedMetadataValue(plugin, gun));

https://paste.md-5.net/xuxukesiza.cs the blood effect
quaint mantle
#

?paste

undone axleBOT
quaint mantle
#

NOTE: IM USING JDA, CONNECTS TO DISCORD

Any reason why this isnt working?
Code: https://paste.md-5.net/ovonuyibub.cs
Error: https://paste.md-5.net/lofitubelu.apache
Link to what im using: https://github.com/DV8FromTheWorld/JDA#download

GitHub

Java wrapper for the popular chat & VOIP service: Discord https://discord.com - GitHub - DV8FromTheWorld/JDA: Java wrapper for the popular chat & VOIP service: Discord https://discord.com

#

Main error: java.lang.ClassNotFoundException: net.dv8tion.jda.api.hooks.ListenerAdapter

magic gazelle
#

so don't

quaint mantle
#

Is anybody available to help me w/ my issue?

magic gazelle
#

JDA isn't spigot development

#

or BungeeCord

quaint mantle
#

AKA it muts be spigot or bungee cord?

#

*must

magic gazelle
#

idk im just saying

quaint mantle
#

Ive seen people use it however.

#

It should be working 100% fine.

vocal cloud
#

Did you shade it into your plugin?

quaint mantle
#
repositories {
    mavenCentral()
}

dependencies {
    implementation 'net.dv8tion:JDA:5.0.0-alpha.9'
}
quaint mantle
vocal cloud
#

There's your problem lol

quaint mantle
#

It told me to simply insert that to impliment it.

lavish hemlock
quaint mantle
lavish hemlock
#

When you run your plugin, it does not include JDA's classes.

pliant oyster
#

How can I check if a damage cause is an arrow using EntityDamageEvent

lavish hemlock
#

You need to include JDA's classes inside your plugin via shadow.

quaint mantle
#

How do I fix it then lol

quaint mantle
#

You guys keep saying shadow and I dont understand what its for nor what it does

#

:/

vocal cloud
#

He literally sent a link to it facepalm

quaint mantle
#

or

lavish hemlock
#

It's a Gradle plugin

vocal cloud
#

It has documentation

#

Read it

magic gazelle
#

https://google.com
"How to use shadow"

magic gazelle
vocal cloud
#

?jd-s

undone axleBOT
pliant oyster
#

I need an arrow lol

magic gazelle
#

kotlin, sorry

#

but there's that

#

it's not EntityDamageEvent though

pliant oyster
#

I see

#

I can use that event instead

magic gazelle
#

there's all of it

#

(in kotlin so sorry)

quaint mantle
#

@vocal cloud Am I dumb or smth

#
plugins {
    id 'com.github.johnrengelman.shadow' version '7.1.2'
    id 'java'
}
#

It isnt working

#

and I read the instructions

vocal cloud
#

I don't use gradle so shrug1 but it should create a shadow jar

quaint mantle
golden turret
#

outside that

#

outside the plugins section

lavish hemlock
#

No, you don't

#

That's legacy

golden turret
lavish hemlock
#

That's if you're using multiple subprojects

quaint mantle
#

cause i NEED this to work

#

badly

lavish hemlock
#

idk, never had any problems with it myself

#

I also just use Maven now

quaint mantle
#

can you show me your build.gradle?

#

so i can see what im doing wrong perhaps

lavish hemlock
#

I'll find an old one

quaint mantle
#

idk maybe im an idiot or smth

golden turret
magic gazelle
#

also yes

lavish hemlock
#

gradle shadowJar

magic gazelle
#

wack

lavish hemlock
#

by itself

magic gazelle
#

it works without it for me

lavish hemlock
#

since build calls jar

quaint mantle
#

okay im completely confused

#

its why i need description here

#

or else i cant do it

magic gazelle
#

...

#

press enter after typing that

#

then wait

#

then type

#

then wait

#

then you have the file.

lavish hemlock
#

Welcome to:
"I don't understand how to use Gradle properly because I use MinecraftDev's default configurations."

magic gazelle
quaint mantle
#

how do i get the command bar lol

magic gazelle
#

im actually going to shit my pants

lavish hemlock
#

What the fuck does that have to do with anything

quaint mantle
#

well thats clearly a command bar

magic gazelle
#

good job

lavish hemlock
#

Oh

quaint mantle
#

based on the arrow

magic gazelle
#

you have eyes

lavish hemlock
#

INTELLIJ

magic gazelle
#

okay

quaint mantle
#

^^^

magic gazelle
#

wait

#

use your eyes

quaint mantle
#

yea how do i open the command bar

#

on intel

magic gazelle
#

and look around the IDE

lavish hemlock
#

Say IDEA, not Intel

magic gazelle
lavish hemlock
#

Intel is a fucking CPU architecture lol

magic gazelle
#

INTELLIJ

#

christ

#

I'm using IntelliJ IDEA too

quaint mantle
#

obv

magic gazelle
#

im going to actually shit my pants

lavish hemlock
#

At the bottom there's a tab called Terminal

magic gazelle
quaint mantle
#

OHHHH

magic gazelle
#

i was waiting for him to use his eyes

#

why you gotta ruin this

lavish hemlock
#

I don't think he has eyes

#

He's blind

magic gazelle
#

true enough

quaint mantle
#

gradle : The term 'gradle' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1

  • gradle build
  •   + CategoryInfo          : ObjectNotFound: (gradle:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
lavish hemlock
#

Clearly

quaint mantle
#

i wear glasses

magic gazelle
#

./gradlew.bat

lavish hemlock
#

./gradlew, not just gradle

magic gazelle
#

he's probably on windows

#

lets be real

lavish hemlock
#

Well yeah, that's the PowerShell error

magic gazelle
#

OH YOU RIGHT

#

I forgot

#

haven't used PS in like 2y

quaint mantle
#

PS C:\Users\pixel\IdeaProjects\EmeraldsPlugin> ./gradle build
./gradle : The term './gradle' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1

  • ./gradle build
  •   + CategoryInfo          : ObjectNotFound: (./gradle:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
magic gazelle
#

./gradlew.bat

#

christ

quaint mantle
#

oh

magic gazelle
#

use tab complete

#

please

quaint mantle
#

i thought the w was a typo

#

lol

magic gazelle
#

no

#

it means windows

#

i think

#

dont quote me on that

lavish hemlock
#

Actually no it means Wrapper

quaint mantle
#

btw

magic gazelle
#

makes more sense

quaint mantle
#

i ran both

#

lettme test

lavish hemlock
#

The gradlew files come from gradle wrapper

magic gazelle
#

ok

#

now you have the jar

#

now do the thing

quaint mantle
#

uhhh @magic gazelle it made a new build

#

do i use the regular

#

or .all

#

one

lavish hemlock
#

all

quaint mantle
#

k

magic gazelle
#

christ

crimson marsh
#

anyone here familiar with bedrock edition?

quaint mantle
vocal cloud
#

If no one is there then no one is here lol

quaint mantle
#

lol

golden turret
vocal cloud
#

It's probably Sabaton scaring them off. Especially The Red Baron.

golden turret
#

😩

#

but even without the red baron that happens

#
        Arrow bullet = player.launchProjectile(Arrow.class, player.getEyeLocation().getDirection().multiply(10));
        bullet.setShooter(player);
        bullet.setBounce(true);
        bullet.setGravity(false);
        bullet.setMetadata("bullet", new FixedMetadataValue(plugin, gun));```
#

me spawning the arrow

vocal cloud
#

If you don't spam the errors does it bounce? I imagine this might be related to the invincibility frames

golden turret
#

tried to set bounce and gravity to false, true etc

golden turret
#

if i shoot slowly

#

it works fine

vocal cloud
#

Yeah because the invulnerability frames. The arrow just bounces off the mob because it can't take the damage yet. Or at least that's what it looks like. You also have bounce = true

golden turret
#

tha happens even with bounce to false

vocal cloud
#

Like I said it's probably the invulnerability stuff

quaint mantle
hybrid spoke
#

no

golden turret
#

moved that to the runTask

#

now it is working

#

:D

#

now

#

how can i prevent the arrows that are shoot from the water to stop?

hexed hatch
#

I don’t think you can

golden turret
#

im sure i can

#

look at what i found :D

quaint mantle
#

So confused on why this doesnt work

golden turret
#

nice token

quaint mantle
#

SHIT

#

IM AN IDIOT

quaint mantle
#

please tell me you didnt

golden turret
#

you can simply regenerate it

quaint mantle
#

oh

#

true

#

anyways

#
public class DiscordBot{
    private DiscordBot() throws LoginException {
        JDA jda = JDABuilder.createDefault(nice token)
                .addEventListeners(new BotListener())
                .setActivity(Activity.playing("Watching over the minecraft server!"))
                .build();
    }

    public static void main(String[] args) throws LoginException{
        new DiscordBot();
    }
}

Any reason why my bot isnt loading?

#

It SHOULD load

#

or do I need to run main by myself or smth

#

heres the github

golden turret
#

obviously

muted sand
#

look how discord srv does it

desert musk
#

so i need just general guidance this is the first plugin i'm making but: I want to prompt the player after death to allow them to decide where to spawn, how should I go about prompting them?

#

it's not like you can type in the death screen

#

so should i make a separate dimension and spawn them inside of it each time?

#

idrk

#

also um

#

the only option i have for creating a project is 1.18.1 and sooner

#

have the libraries just not updated yet or did i install old versions of them?

vocal cloud
#

if you're using maven switch the version in the pom to 1.18.2

quaint mantle
#

oh ffs

#

now my bot stops working

#

nice!

#
public class DiscordBot extends ListenerAdapter {
    public static void main(String[] args) throws LoginException {
        JDABuilder.createLight(lol no token, GatewayIntent.GUILD_MESSAGES, GatewayIntent.DIRECT_MESSAGES)
                .addEventListeners(new DiscordBot())
                .setActivity(Activity.playing("Type !ping"))
                .build();
    }

    @Override
    public void onMessageReceived(MessageReceivedEvent event) {
        Message msg = event.getMessage();
        if (msg.getContentRaw().equals("!ping")) {
            MessageChannel channel = event.getChannel();
            channel.sendMessage("Pong!");
        }
    }
}
#

anybody see an issue here

#

or no

unkempt peak
lime jolt
quaint mantle
#
                System.out.println("test:" + args[1] + "player" + args[2]);
            }else {
            player.sendMessage(ChatColor.RED + "specify an user and motivazion");
            player.sendMessage(ChatColor.LIGHT_PURPLE + "/test motive user");
            }``` i failed lol i want to make a /report command someone help me? (sorry for me english im italian)
fleet minnow
desert musk
#

you’d just select which one to respawn at

fleet minnow
#

whats wrong

#

with it specifically

quaint mantle
#

all

fleet minnow
#

?

fleet minnow
#

yes.. but I cant help without more info

quaint mantle
#

the error is the args

full forge
fleet minnow
quaint mantle
fleet minnow
#

ok.. but what is wrong with the args

quaint mantle
#

ALL

#

idk the args

fleet minnow
#

cant help if you cant tell me whats wrong

quaint mantle
#

How do I detect a plugin restart?

#

Or detect a plugin shutdown?

quaint mantle
#

idk the args

#

idk how do i make a report command

#
@Override
    public void onDisable(){
        DiscordBot.stopBot();
    }
#
public static void stopBot(){
        if(bot != null){
            bot.shutdownNow();
        }
    }
#

Why isnt this running?

#

on "/reload"

#

or restart

#

and etc

fleet minnow
quaint mantle
#

learn how to do java first

#

research on that

#

and then research on plugins

#

before attempting a plugin

fleet minnow
#

im assuming they already know java

fleet minnow
quaint mantle
#

thats the thing

fleet minnow
#

you think it should doesnt mean it does

earnest forum
#

a list starts at 0

#

so the first variable is args[0]

quaint mantle
#

One example pls?

earnest forum
#

I just gave u one

#

the first argument would be args[0]

#

the second is args[1]

quaint mantle
#

ok

earnest forum
#

args[2] would be the third value

#

/report arg0 arg1 arg2

quaint mantle
#

Ok

#

tank you

earnest forum
#

you really should learn java before doing bukkit

muted sand
#

how do i copy my built jar directly into my plugin directory?
using gradle with the .kts extension :D

ancient jackal
#

you can make another Main and name it whatever you want, like CustomDeployment or something

#

don't add it to git

#

don't put it in a package with anything

#

and remove the public access modifier from the class so you don't see it anywhere

#

add a Main method

#

and create a run configuration for it

#

in that run configuration, add a run before task and select the maven clean and package configuration

#

now you can do whatever you want immediately after building, including using the File class and copying it over which only takes 2 seconds to write, Files.copy()

#

and you're only limited by Java still

#

or you can use any of the other configurations like shell script

maiden thicket
shy pewter
#

Read my status

hexed hatch
#

No

sonic forge
#

should i ask java questions here

hexed hatch
#

Sure

sonic forge
#

this is an old question and it's prob the only one that I still haven't solved
so i started ffmpeg (for audio encoding) as subprocess using vanilla java process api
and I decided to make ffmpeg output to stdout by setting output to pipe (on ffmpeg)

so the problem is: after 7 ~ 9 minutes, it hangs
my first thought was the stream was not being read (https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4763397) and the buffer was filled, so I made it also read stderr (in this case, it will be the ffmpeg debug/information output). it doesn't help

after few months, around 4 months ago, I made a minecraft launcher, also using subprocess. and the same problem comes.
now it turns out it can last for around 30 ~ 50 minutes, after that, it hangs

I decided to use other solutions in the end, but I still haven't figure out why this happens
(For example, the ffmpeg one, I decided to use native encoder instead, and the launcher one, i decided to not use vanilla java process api)

I searched on stackoverflow, which doesn't help
I even created a post on stackoverflow, and also doesn't help

OS: Linux / Windows, doesn't matter
Java Version: JDK 8 302
I lost the code, sorry

manic furnace
#

Is there a way to get a full spigot jar from maven?

sonic forge
#

no, use buildtool

smoky oak
#

@sonic forge can't u just restart it every 5 minutes or so?

sonic forge
#

well, i can't restart minecraft process every 5 minutes, and I know some ways to go around this, but I want to know why this happens so if I'm in a situation that I really want to do subprocess, I can fix it

manic furnace
#

Ok thanks

wet breach
sonic forge
#

how about the minecraft one, is there a fix

wet breach
#

I didn't know mc uses ffmpeg o.O

sonic forge
#

i made a minecraft launcher after that, and same problem comes

wet breach
#

probably because you are using process api

#

as I said, ffmpeg uses native code to do its thing

sonic forge
#

also, what's "native process"

wet breach
#

it makes use of hardware/OS specific stuff as opposed to just done in software

sonic forge
#

yes ik but

#

isn't process supposed to be like

#

you spawn a process, and it runs

#

with other languages it went fine

wet breach
#

yes but that doesn't mean Java can just simply inject itself either

sonic forge
#

uhm are we taking about the same thing lol

wet breach
#

Yes we are, you are wanting to use a high level language to interact with what is essentially a native binary which doesn't usually go well, at least not without JNI but even then that isn't Java attempting to wrap itself around something

#

Just because you are able to do it, doesn't mean the native binary will allow it, other languages work probably because they have native code for it

#

unlike Java which does not

sonic forge
#

are you talking about this

#

if yes then im pretty sure that the opearting system/proceess doesn't work like that

smoky oak
#

interesting username you got on that one

wet breach
#

I offered an alternative solution to your problem, in fact two of them

sonic forge
#

leeme do some research about it

wet breach
#

You can use JNI or invoke it from the shell using java

#

would recommend just invoking from the shell and for the launcher JNI which should do just fine

sonic forge
#

isn't JNI for native libraries

wet breach
#

ffmpeg is a native binary

sonic forge
#

isn't it different thing

wet breach
#

different in what way?

sonic forge
#

binaries are executable
libraries are not executable

im not C expert or smt, but that's what I thought

#

and if im not wrong, binary will search for native library from path or smt

#

not path but like env var

wet breach
#

binaries can both be an executable and library/api

#

no different then how a java jar can be an application and provide an API IE spigot

sonic forge
#

uhm can you give an example

wet breach
#

are you saying spigot is not a java application?

#

that doesn't also provide an API?

sonic forge
#

ffempg is not made in java

#

it's not running on jvm

wet breach
#

never said it was

#

just said native binaries can both be executable and be an API in one binary

sonic forge
#

so like
blablabla.so = library
blablabal = binary
(on linux)
and:
blablabla.lib / blablabla.dll = library
blablabla.exe = binary
(on windows)

wet breach
#

however, when dealing with native binaries, JNI is what comes in handy sometimes as it is designed for interacting with native binaries

sonic forge
#

and i don't think

#

blablabla.exe can aslo be treated as library

#

unless you are injecting into them or smt

wet breach
#

a .dll on windows is strictly a library only

sonic forge
#

w8 no even if you injected into them

#

you can't make it library

wet breach
#

however there is no rules that say an executable can't both execute and provide an API

sonic forge
#

if im not wrong, sub process is still gonna fetch libraries from /usr/lib

#

instead of using the one provided by java

#

and the subprocess will be running directly under jvm, not java

#

is that

#

what you're saying?

#

cuz i feel like we are talking about different thing

sonic forge
sonic forge
wet breach
# sonic forge ig you were talking about native libraries?

I said native binaries. They can be libs or any executable that is native to the OS. And unfortunately trying to answer this question of yours in a way you understand is not easy especially if you don't understand that binaries can be dual purpose and not understanding my analogy in how it is the same in java in regards to jar's. Not much else I can really say. I gave you two alternative ways to invoke ffmpeg from java that would most likely fix your problems. Whether you believe me or not or accept the answers is on you. I do recommend doing more research before you decide with your limited expertise to tell people they are wrong in what they are trying to tell you.

sonic forge
wet breach
# sonic forge last question, are you sure what you are talking about im pretty sure subprocess...

It does, however it is still a wrapper functionality. Either the way you are using it there is something wrong or the way the process api is interacting with the binary doesn't allow for what you are trying to do. In either case I gave alternative solutions that would most likely work. When dealing with native binaries and java when you are having issues, there can be multiple things preventing it working the way you are expecting. I can't tell you which of those things may be the cause, it could be that what the program is outputing doesn't allow java to redirect the output in an ideal way thus causing the java wrapper thread to freeze up. It could be because of thread starvation in trying to handle the data maybe IE too much data for the thread to handle with the resources it is allowed to use. I can keep coming up with more things but that isn't going to help all that much. So instead of trying to debug all the possible ways with using this particular api, you could easily do what you are wanting also from JNI or command invoktion from the shell using java to run the commands.

bold solstice
#

hey Ive been trying to make a race plugin using scoreboard teams and I set a gui that if u click certain items it adds you to a team, and then I made a runnable and within it a foreach player in the server statement, within the foreach statement i put an if statement to check if the player is on a certain team and if so it gives him effects. the problem is that if somebody else picks a race it gives them the effects but for the first player it doesn't give the effect anymore (basically only one player can be in a race and have powers)
Can anyone help me? ty for ur time

wet breach
#

?paste

undone axleBOT
wet breach
#

going to be an issue with your code

bold solstice
#

the entire code?

wet breach
#

we don't need the whole project code, just the relevant class or classes involved with the loop you are trying to implement

#

since that is going to be the most likely area where the problem is at

bold solstice
wet breach
#

alright, so every time the task repeats

#

all the objects reset

#

so the way you have it implemented it isn't going to remember who did what unless you create classes/objects to hold that information

#

Yeah that would most likely be the cause of it. I would recommend though researching in implementing this a bit better

#

current way you are going about it, it isn't going to scale very well

bold solstice
#

I used to try it with arrays instead of teams

#

and I thought that was why it didn't work

wet breach
#

Well using teams is fine, it is your task and loops that are the issue 🙂

#

the task, repeats which is fine, but because the objects essentially get reset every time the task repeats you don't have any code or classes to facilitate in distinguishing who is doing what

bold solstice
#

So if i set the team within the reapeating task to be equal to the public team and all of that is in the repeating task could that fix the problem?

#

bc its the same thing so im not quite sure what to do

wet breach
#

alright lets see, what is the purpose of the task

bold solstice
#

to repeat its self?

wet breach
#

no that isn't what I am asking

#

why do you need the repeating task

bold solstice
#

Alright so lets just say somebody drinks a bucket of milk, thats why im using the repeating task so it can counter it and add the effects and everything every tick or 5 ticks

wet breach
#

there is events for such things

bold solstice
#

that is right but i donno its the first thing that came in mind to me

#

to use a repeating task for it

wet breach
#

Well, best to make use of the events where you can, and then if there is something an event won't facilitate then make use of a task 🙂

#

odds are you probably don't need this task

#

if that is true and since it is giving you problems, then it could just be removed completely lol

#

?jd

bold solstice
#

hmmm

wet breach
#

if you need to apply an effect every so many ticks, since an event won't cover that portion

#

you could make use of the event on the bucket part, and then from that event add a player to a map

#

then from your task, you could check the map however often you need it to be for who is in it

#

apply whatever to whoever players in said map until you deem not necessary and when that condition is met where they don't need an effect applied, have said task remove them from the map

#

and clear their effects at same time

bold solstice
#

The reason I thought of this first is to counter every option to get rid of the effects

wet breach
#

well, you could just listen for events on potion splash I think and as well drinking potions

#

and just cancel them

#

that wouldn't require a task

bold solstice
#

Alright i'll try

#

and if I ever use this task again

#

I need to save whatever Ichange in the task

#

right?

wet breach
#

yes if you want the task on the next cycle to remember what it did previously

#

otherwise it just simply forgets and grabs objects in their current state regardless of what the task did prior cycle

bold solstice
#

Wait but the team.addplayer is not in a repeating task

#

how is that it only remembers one player

#

its within OnInventoryClick

#

then why can only one player get the effects?

wet breach
#
if (Endkin.hasPlayer(p))
                    {
                        p.setMaxHealth(24);
                        p.addPotionEffect(PotionEffectType.INCREASE_DAMAGE.createEffect(100, 1));
#

obviously whatever Endkin matches is the condition that gets matched one time

#

so it is however that object/class gets updated

#

if it doesn't update except only having the last player that did something

#

then it would only ever get the last player involved

bold solstice
#

so Saving it within the gui can also be a possible way to fix it

#

like

#

in the click event

wet breach
#

it is possible, I don't know what the rest of your code looks like, so that is something for you to determine 🙂

#

but now you know you also don't need that task either

#

or most likely

bold solstice
#

yea

#

ty

#

u helped me a ton

balmy panther
#

hey guys, please, i was told that i need to switch to headless jdk to run a few plugins correctly. Is there a chance someone can help me to do it?

quasi flint
#

running linux?

balmy panther
#

nope, windows

#

just trying to set my server, but plugins such as worldedit and worldguard are not running properly

quasi flint
#

well i am running with mormal jdk

#

and they are working fine

#

so something different is wrong

#

any logs with errors?

balmy panther
#

spigot: 1.16.4
we: 6.1.9
wg: 6.2.2

#

i tried almost every spigot version with every compatible version of those plugins

quasi flint
#

install sqlite

#

atleast its telling me it needs that

#

weird error

balmy panther
#

i'll try. gimme a second

eternal night
#

The server should/does bundle the SQLite jdbc

wet breach
#

use version 7.0.4 for worldguard and 7.2.0 for worldedit

balmy panther
#

but those versions are also for newer minecraft versions

wet breach
#

those versions are for 1.16

#

which is the spigot version you said above you are using

balmy panther
#

i changed the version, installed sqlite and i got the error message again

balmy panther
wet breach
#

did you use buildtools to obtain spigot?

balmy panther
#

i downloaded spigot jar server from the spigot website

eternal night
#

I have doubts the spigot website illegally distributes the server jar

balmy panther
#

so, how do you recommend me to obtain it?

eternal night
#

?bt

undone axleBOT
eternal night
#

You use the spigot build tools to build the jar yourself

balmy panther
#

oh okay, i'm going to try it right now

wet breach
#

when you get buildtools

#

run java -jar BuildTools.jar --rev 1.16.4

#

to get the version you are wanting to use

#

always use buildtools to obtain spigot

#

it is the official way and you know for certain it hasn't been tampered with

#

which is most likely your problem from where ever you got your jar from

balmy panther
#

i see, do you think it will fix those errors?

wet breach
#

most likely because spigot has sqlite shaded in

#

so the error you are getting isn't something you should be getting at all

#

unless of course someone removed said libs from the jar

balmy panther
#

still this..

#

what's wrong with it? 🤣

vocal cloud
#

Caused by: java.lang.ClassNotFoundException: org.sqlite.core.NativeDB

#

that looks to be it

eternal oxide
#

You likely forgot to load teh class Class.forName("org.sqlite.JDBC");

dire marsh
#

they're asking a server question

wet breach
dire marsh
eternal oxide
#

^

wet breach
#

well, not like anyone was in need of development help

balmy panther
#

there are just those two plugins. Since I recieve this message I tried to create the folder with all those files again and again

#

so there was no need to put any other plugins

#

just we and wg

dire marsh
#

why are you using 7.0.4

#

7.0.4 does not have 1.16 support

wet breach
dire marsh
#

7.2.0+ has 1.16 support according to bukkit site

wet breach
#

that is for worldedit

dire marsh
#

oh

#

i hate worldguard and worldedit versions

wet breach
#

lol

dire marsh
#

they confuse me all the time

#

go ask enginehub tbh

#

chances are someone had the same problem as you and they'll know the issue

wet breach
#

the issue doesn't make sense

#

because worldedit and worldguard don't package their own sqlite drivers

#

only other thing is they are running in a directory like onedrive

safe edge
#

But is there specific reason to use 7.0.4 version when it's outdated ?

wet breach
#

7.0.5 is for 1.16.5

#

it is possibly 7.0.5 could work for their verison

#

but since they are having issues, best to stick with versions specified for the version of mc they are running

balmy panther
#

i can also switch to other spigot version, i just need it to run normally🤣

safe edge
#

So u just need server on specific version or just server ?

wet breach
#

well if you are able to run updated spigot, recommend running the latest

#

no reason to run an outdated version if you don't have a reason for it

balmy panther
#

when i tried to run the 1.18 spigot, i got the message that i do not have a java 16. After I tried to install the java update, it still ended up installing java 15

dire marsh
#

@balmy panther did you actually use buildtools

wet breach
#

they did

#

but odd on the java installing thing they said

#

I really don't know what system or setup they are running where they could get confused like that lmao

#

but the error at hand though really doesn't make sense and odds are updating isn't going to fix it. If anything it is a permission problem, and if they are on windows which I think they are, its probably going to be they are runng out of a onedrive directory

#

however, they should update regardless and test it out still

#

if they are only running those 2 plugins then it can't be a plugin loading its own sqlite driver since worldedit and worldguard as far as I am aware don't package their own.

safe edge
#

    public static IBorder select() {
        switch (Version.getCurrent()) {
            case v1_18_R1:
                return new Border_v1_18_R1();
            case v1_17_R1:
                return new Border_v1_17_R1();
            case v1_16_R3:
                return new Border_v1_16_R3();
            case v1_16_R2:
                return new Border_v1_16_R2();
            case v1_16_R1:
                return new Border_v1_16_R1();
            case v1_15_R1:
                return new Border_v1_15_R1();
            case v1_14_R1:
                return new Border_v1_14_R1();
            case v1_13_R2:
                return new Border_v1_13_R2();
            case v1_13_R1:
                return new Border_v1_13_R1();
            case v1_12_R1:
                return new Border_v1_12_R1();
            case v1_11_R1:
                return new Border_v1_11_R1();
            case v1_10_R1:
                return new Border_v1_10_R1();
            case v1_9_R2:
                return new Border_v1_9_R2();
            case v1_9_R1:
                return new Border_v1_9_R1();
            case v1_8_R3:
                return new Border_v1_8_R3();
            case v1_8_R2:
                return new Border_v1_8_R2();
            default:
                return new Border_Unknown();
        }
    }```
How I can do this so one border for every version?
wet breach
#

is it different in every version?

#

or you just needing to dynamically import?

#

I am going to assume you just want to condense that down

#

to where it is like one method

#

Class.forName(String classname)

#

grab the version from the server, pluck it in

#

you can have a method to convert the version appropriately

#

and then you can create an object in that manner without strictly having a specific import

#

this works if the code/object you are wanting is not different between the versions or whatever you are doing doesn't matter between the versions

safe edge
#

Just thinking if this is posibble to have that condesed or if I want have viaversion on server I need to have it like that ?

wet breach
#

just told you how to condense it

#

or one way anyways

past stream
#

Hello, it's been a while since I made a server plugin.
I am trying to make a plugin for 1.18.2 but I can't find the JavaPlugin class.
I consulted google without success. What changed?

eternal oxide
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

past stream
#

aha! Thank you

quaint mantle
#

hey guys is possible to send a message to a discord webhook in spigot plugin?

wet breach
#

yes

quaint mantle
#

how

wet breach
#

very carefully

quaint mantle
#

what

vocal cloud
#

Yeah if you're not careful your computer will explode

quaint mantle
#

OHHHHHH NOOO!

#

😂

wet breach
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

vocal cloud
#

Yes it's possible

wet breach
#

if you want a recommendation on a library to help you then I recommend looking at DiscordSRV

vocal cloud
#

JDA

wet breach
#

or JDA

#

or make your own via looking at the horrendous vague Discord API

vocal cloud
#

JDA has the sexiest documentation

#

The wiki tho kekw

wet breach
#

but if you were hoping that someone would just give you some kind of magical code, well I doubt you will find that here lol

quaint mantle
#
        URL u = new URL(url);
        JSONObject payload = new JSONObject();
        payload.put("username", "Pancake");
        payload.put("content", message);
        Gson gson = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
        String json = gson.toJson(payload);
        HttpsURLConnection connection = (HttpsURLConnection) u.openConnection();
        connection.addRequestProperty("Content-Type", "application/json");
        connection.addRequestProperty("User-Agent","Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36");
        connection.setDoOutput(true);
        connection.setRequestMethod("POST");

        OutputStream stream = connection.getOutputStream();
        stream.write(json.toString().getBytes());
        stream.flush();
        stream.close();
    }```
#

it's correct?

wet breach
#

it is one way of doing it, but recommend you get a discord api token to use and make sure you use the bot endpoints

#

otherwise might see some unwanted attention in regards to your bot 🙂

quaint mantle
wet breach
#

well, if you don't, you might get banned lol

#

hence the unwanted attention warning

quaint mantle
#

if i don't make a bot i get banned?

wet breach
#

you could yes

quaint mantle
#

BANNED??!?!?!!??!?!!?!?!?!??!?!

#

why

wet breach
#

because discord says so? go ask them its in their ToS

quaint mantle
#

oh

wet breach
#

what you decide to do is up to you

safe edge
#

v1_8_R2 which version I should write in dependecy in version

wet breach
#

I can just only give you a warning lmao

quaint mantle
#

and if i make a bot i don't get banned???????????????????????????????????????????????????????

wet breach
#

the odds of getting banned for misuse of the api and endpoints is far less likely yes

quaint mantle
#

why is it improper use of api?

wet breach
#

I don't make the rules in using discord api stuff. Discord team makes the rules. Whether you get banned or not is not up to me, it is their decision and if they do ban you it is generally permanent.

tender shard
#

hm can't sort sort by field?

#

(in bash)

wet breach
#

All I can do is just give you warning ahead of time, and what you should do to better avoid such things

quaint mantle
wet breach
#

I don't think you are understanding me

tender shard
safe edge
tender shard
tender shard
quaint mantle
tender shard
wet breach
#

@tender shard good luck with them, obviously they don't understand me 🙂

tender shard
quaint mantle
tender shard
wet breach
quaint mantle
wet breach
#

however with a bot api token, odds of getting in trouble is less likely

safe edge
quaint mantle
#

is there another way to get minecraft server logs (no console) without getting banned?

vocal cloud
#

You'll only get banned if you make a user account a bot

wet breach
#

there is like a thousand other ways....but obviously for whatever reason you are either not reading anything I have said

tender shard
#

can I use java 9 modules and still be java 8 comatible? 😄 I wanna hide my imlementation classes

wet breach
#

or there is some kind of other issue like you being a troll or something

vocal cloud
#

He got kicked yesterday or something for it

quaint mantle
tender shard
#

I wish there would be something like "package-parent-protected" so something in com.mypackage.whatever can still be accessed from com.mypackage, without being public

wet breach
#

that doesn't surprise me in the least then

#

since that is the case, then I will just move along and ignore them

wet breach
#

with reflection you can access private classes from another package

vocal cloud
#

Reflection is the cure to all of life's problems

tender shard
#

yeah but that's too hacky

tender shard
#

I'll rather live with the class being public then

#

if people try to instantiate it, it's their own proble mlol

wet breach
tender shard
#

`bt

#

?bt

undone axleBOT
tender shard
#

I hate this

vocal cloud
#

Obviously you don't have the right D

#

Smh my head

safe edge
tender shard
vocal cloud
#

That wasn't the joke but sure

safe edge
tender shard
#

if not, first install it

#

then instead of just entering java you enter the full path to your java 8 executable, e.g. C:\Java\jdk-8\bin\java.exe

#

how the heck can KEY_KEYS be null? It's declared directly above

vocal cloud
#

Intellij shows you why in the show more tab

rough drift
#

it is what it is

tender shard
vocal cloud
#

Maybe restart?

#

Also my eyes

opaque marsh
#

Quick question before talking about my actual problem, i'm on Spigot 1.18.1 and i'm trying to make custom pathfinding goals for entities. There is no api in spigot to achieve that right?

vocal cloud
#

Custom pathfinding is usually done through nms

opaque marsh
#

yeah and that's the thing

#

i'm on gradle using spigot:1.18.1-R0.1-SNAPSHOT:remapped-mojang with the io.typecraft.gradlesource.spigot plugin, everything works fine until i use methods from the this keyword, they are not remapped

tender shard
#

what? that makes no sense, the remapping is already included in the .jar itself

opaque marsh
#

note : i'm using remapped-mojang source

tender shard
#

well if you're on remapped, then everything should be remapped. do you maybe accidently also have the non-remapped .jar as dependency?

#

maybe you once added it directly to intellij, without gradle, or sth?

opaque marsh
#

nope

tender shard
#

then it makes no sense

#

no idea

opaque marsh
#

only have this dependency : implementation "org.spigotmc:spigot:${project.mc_version}-R0.1-SNAPSHOT:remapped-mojang"

wet breach
opaque marsh
#

yeah i mean when i use functions from super class

wet breach
#

this refers to the class itself

#

or class object

opaque marsh
#

lemme show the problem

#

here is my class:

#

when i build the plugin and use SpecialSource (through io.typecraft.gradlesource.spigot gradle plugin), it remaps almost everything correctly except these:

tender shard
#

oh you mean in your REMAPPED jar, it breaks "this.methodCalls"

#

now it makes sense lol

#

if that works, it's a bug in the gradle remapping plugin

opaque marsh
#

yeah i've tried but for some reason java tells me it can't find the main class but it's probably because i'm using SpecialSource-1.11.0 ?

#

lemme re-check

#

(also because i'm not using the shaded one too, cuse i'm using it directly from the maven local repo directory)

#

nope still Error: Could not find or load main class net.md_5.specialsource.SpecialSource, am i missing something?

tender shard
#

what did you enter to run it?

#

This is the command as md_5 mentioned in the announcements:

java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN.jar -o $PLUGIN-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-mojang.txt --reverse

java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.17-R0.1-SNAPSHOT/spigot-1.17-R0.1-SNAPSHOT-remapped-obf.jar net.md_5.specialsource.SpecialSource --live -i $PLUGIN-obf.jar -o $PLUGIN.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.17-R0.1-SNAPSHOT/minecraft-server-1.17-R0.1-SNAPSHOT-maps-spigot.csrg
opaque marsh
#

note : cd is my output dir, and SpecialSource is also in this folder, i'm on Windows and i also tried replacing $HOME with %USERPROFILE% and / with \ to be sure

java -cp SpecialSource-1.10.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.18.1-R0.1-SNAPSHOT/spigot-1.18.1-R0.1-SNAPSHOT-remapped-mojang.jar net.md_5.specialsource.SpecialSource --live -i TestPlug-1.0.0-all.jar -o TestPlug-1.0.0-obf.jar -m $HOME/.m2/repository/org/spigotmc/minecraft-server/1.18.1-R0.1-SNAPSHOT/minecraft-server-1.18.1-R0.1-SNAPSHOT-maps-mojang.txt --reverse
quaint mantle
#
    @EventHandler
    public void onInteract(PlayerInteractEvent event) {

        Player player = (Player) event.getPlayer();

        if(event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            if(player.getItemInHand().getItemMeta().getDisplayName().equals("MODALITA")) {
                Inventory inv = Bukkit.createInventory(null, 27, "MODALITA");

            }


        }


    }``` how can i make to open the gui with right click?
opaque marsh
#

player.openInventory(inv);

quaint mantle
#

Ok tank you

lean gull
#

hey so i wanna make a world gen plugin where you can customize everything with a gui, except that i dont know anything about world gen... does anyone know where i could start?

wet breach
#

interesting you would want to do it from a gui

lean gull
#

do you have a better idea?

wet breach
#

probably not from a GUI, since in order to have a GUI you would need a world to begin with

#

and then would have to have the GUI generate a second world to apply its effects or whatever chosen

#

where as with just a config file and plugin, it could generate the worlds on first load up potentially

#

anyways

wet breach
#

some of it might be outdated but should for the most part be relevant

lean gull
#

its all decpreated

wet breach
#

that isn't deprecated

tender shard
#

someone knows again how to link to foreign javadocs using maven-javadoc plugin?

lean gull
#

my bad guess i was wrong

bold solstice
#

hey frostalf

#

Can u help me real quick?

wet breach
#

depends

bold solstice
#

so basically about what u said about the repeating tasks

#

its not only for repeating task

#

if a player joins even the events doesn't work

#

its like whenever a new player joins the team it removes the previous player

quaint mantle
wet breach
#

second, if a player is being removed from the team when another joins, then there is something wrong with your code involving teams

#

I have a feeling you are not keeping a reference to the scoreboard

opaque marsh
wet breach
#

and are just making a new one everytime

#

which is what you don't want to do

quaint mantle
wet breach
#

anyways, there is other people here that can help out in regards to scoreboards and teams

#

I am going to bed 🙂

bold solstice
#

oh ok

#

gn

opaque marsh
bold solstice
#

I dont know whats wrong with it

#

can anyone help me?

quaint mantle
#
                ItemStack sword = new ItemStack(Material.STONE_SWORD);

                inv.setItem(index, food, sword);``` cannot resolve symbol index :/
#

:/

opaque marsh
#

index is the slot index you want the item to go to in the inventory, if you just want to add the item to the inventory, you can also use inv.addItem(...stacks)

quaint mantle
#

oh okay

#
            if(player.getItemInHand().getItemMeta().getDisplayName().equals("MODALITA")) {
                Inventory inv = Bukkit.createInventory(null, 27, "MODALITA DI GIOCO");
                player.openInventory(inv);

                ItemStack food = new ItemStack(Material.STONE_AXE);
                ItemStack sword = new ItemStack(Material.STONE_SWORD);

                inv.setItem(food, sword);


                }


        }```
#

don't work

#

:(((((((((((((((((((((((((((((((((((((((

vocal cloud
#

Thats because you don't know java

quaint mantle
#

i don't want to make a compless plugin i want to make this inventory plugin and i use public plugins

vocal cloud
#

Yeah but at this point we're writing the plugin for you

quaint mantle
#

no i maked other in my plugin

opaque marsh
#

If you really don't know java i can suggest you take a look at the plugin Skript if you want to do quick little things in a natural language

quaint mantle
bold solstice
#

wait

#

belu

#

u want to create a gui?

quaint mantle
#

YES yes

bold solstice
#

o

quaint mantle
#

on compass pressed plugin open gui

bold solstice
#

wdym?

#

a gui that shows directions?

opaque marsh
#

i think he wants to make a compass that when right-clicked opens a minigame/server/hub selector gui

bold solstice
#

oh

quaint mantle
#

yes

bold solstice
#

well what are you having trouble with

#

the gui

#

or the compass click

quaint mantle
#

sorry for my english im italian

quaint mantle
bold solstice
#

to the gui?

quaint mantle
#

yes

opaque marsh
bold solstice
#

Can anyone help me, When I use teams and I add a player it takes the previous player and sortof removes it from the team

#

here is the team code

opaque marsh
#

but the code you're giving us is not adding any players to a team

bold solstice
#

thats the add players to a team

#

with a gui

opaque marsh
#

but why do you overwrite the team field again?

bold solstice
#

where?

opaque marsh
#

literally everywhere

bold solstice
#

wdym?>

#

like in this : Human.addPlayer(p);
Team human = Human;
Human = human;
break;

opaque marsh
#

just use addPlayer, there is no need to get the team and override it back

bold solstice
#

It was a try to fix the problem

#

didn't work

#

Team human = Human;
Human = human;
this part

opaque marsh
#

this does nothing

bold solstice
#

yea I understood it once i tried xD

#

The thing is once I add a player to a team it removes a player that was already in the team

#

so 2 people cant have powers

#

only one

#

in the server

#

Anyone have any suggestions?

opaque marsh
#

this should not happen, i think you have something else doing something wrong, according to the api (at least in 1.18) you should use addEntry(String entry) instead

#

have you tried using vanilla command to see if the players actually are in the team?

bold solstice
#

umm

#

i'll try

#

ty

crude loom
#

Any idea as to why does this return null?

Player p = (Player) sender;
Inventory inv = Bukkit.createInventory(p,4,"Custom Menu");```
opaque marsh
#

what returns null?

crude loom
#

The inv variable gets a null object

opaque marsh
#

uhh it shouldn't

opaque marsh
#

probably cuse you're only using 4 slots

smoky oak
tender shard
#

exactly

opaque marsh
#

if you want 4 rows, use 4 * 9

tender shard
#

that's why I told them to look at the console because it's explained there

crude loom
#

Ahh I see, I thought it was the number of the rows

smoky oak
#

if you want a inventory with five slots you can use a renamed hopper inventory tho

crude loom
#

Caused by: java.lang.IllegalArgumentException: Size for custom inventory must be a multiple of 9 between 9 and 54 slots (got 4)
You were right

smoky oak
#

its the only non multiple nine item inventory tho

#

well granted

#

there's the crafting blocks

#

but those dont count

crude loom
#

Ah no I wanted 4 rows, thank you! :D

opaque marsh
#

anyways, came here to get help and yet i'm helping people lol, anyone has ideas? (#help-development message) (should i create a thread?)

daring solar
#

Good morning,
do you have a librairy to advise me to call a rest api?

I am currently using 'okhttp3' but I have an error connecting to my RESTAPI.
(NodeJS with expo hosted on my server)

error: javax.net.ssl.SSLHandshakeException
||Full Error: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target||

opaque marsh
#

If it's a local server (not exposed) i don't see the need to use https or did you misstyped?

daring solar
#

The restAPI is hosted on an external server.
It is accessible via the web and via the spigot servers that have my plugin

opaque marsh
#

Well then do you have a valid certificate if yes i can't help anymore

tender shard
#
    /**
     * Creates a DataType for a given {@link Enum} class.
     * @param enumClazz enum class to get a DataType for
     * @param <E> ???       
     * @return DataType for the given enum class
     */
    static <E extends Enum<E>> PersistentDataType<String, E> asEnum(final @NotNull Class<E> enumClazz) {
        return new GenericDataType<>(String.class, enumClazz, s -> Enum.valueOf(enumClazz, s), Enum::name);
    }
#

what the heck am I supposed to write as description for <E>

daring solar
sage dragon
#

Is it somehow possible to let custom enchantments appear in an enchanting table?

tender shard
#

I don't think so

#

IIRC the reason is that the client doesn't have any translations for your custom enchantments

sage dragon
#

Okay, thanks

ivory sleet
smoky oak
#

correction: My pom.xml does this.

        <repository>
            <id>jeff-media-gbr</id>
            <url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url>
        </repository>
...
        <dependency>
            <groupId>com.jeff_media</groupId>
            <artifactId>CustomBlockData</artifactId>
            <version>1.0.5</version>
            <scope>compile</scope>
        </dependency>

so why does it throw a java.lang.ClassNotFoundException: com.jeff_media.customblockdata.CustomBlockData

vocal cloud
#

Did you shade it in?

smoky oak
#

I think so?

<relocation>
  <pattern>com.jeff_media.morepersistentdatatypes</pattern>
  <shadedPattern>io.github.moterius.morepersistentdatatypes</shadedPattern>
</relocation>```
vocal cloud
#

Are you using the maven plugin for it?

smoky oak
#

yes

smoky oak
#

of course i can copy in the class but I'd rather have it pulled when compiling instead of it being part of the project code

quaint mantle
#

hey guys i maked my gui how can i make the items on the gui not draggable

spiral light
#

InventoryDragEvent

#

or InventoryDragItemEvent

quiet ice
#

What is your full pom?

warm light
#

what will be there?

smoky oak
#

?paste

undone axleBOT
warm light
quaint mantle
tardy delta
#

static abuse lol

tardy delta
quaint mantle
#

tank you

tardy delta
#

tanks are in ukraine rn

quiet ice
#

Are you Sure that the shade Task is Run?

quiet ice
#

You need to be more concrete

smoky oak
#

no, I've been following dubious instructions that are probably buried somewhere in the history of this channel

spiral light
smoky oak
#

he said this

#

actually @tender shard maybe you know why this isnt working?

quaint mantle
quiet ice
tardy delta
smoky oak
#

?paste

undone axleBOT
quaint mantle
tardy delta
#

sure

quiet ice
#

I'll probably have to look at your issue in full when I am at home

smoky oak
#

thats the full error

quaint mantle
past stream
#

I've done join messages in the past and I could have sworn this used to work.

    @EventHandler
    public void onLogin(PlayerLoginEvent e) {
        System.out.println("JOINED");
        e.getPlayer().sendMessage("test");
    }

I can see the "JOINED" message in the server log but the player doesn't see the "test" message.
Am I doing something wrong?

quiet ice
#

The connection is pretty Bad here

tardy delta
#

you cant message a player when they login

#

they arent in the game yet

tender shard
tardy delta
#

or just on join?

tender shard
#

yeah, PlayerJoinEvent makes more sense

tardy delta
#

well no thats still to early iirc

#

you could try

smoky oak
# tender shard huh whut?

I did exactly what you told me to do - add the build args and import your lib via maven dependencies & repos. Results in a java.lang.ClassNotFoundException: com.jeff_media.customblockdata.CustomBlockData when i try to use it

tardy delta
quaint mantle
dreamy chasm
past stream
smoky oak
#

explain

#

gimme a sec

#

i might have found it

tardy delta
smoky oak
#

nevermind

#

Could not find artifact org.spigotmc:spigot-api:pom:1.18.2-R0.1-SNAP SHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)

quaint mantle
dreamy chasm
# smoky oak explain

I had a build configuration in intelliJ that I was assuming used maven, but it didnt, I would get that ClassException, what IDE are you using?

smoky oak
#

intellij

quaint mantle
#

I want to make sure that an object cannot be put in the inventory

smoky oak
tardy delta
#

does that happen when you hold your midde mouse button to spread the items?

quaint mantle
#

yes

tardy delta
#

and are you sure that you're testing it correctly?

quaint mantle
#

yes

tender shard
smoky oak
#

[clean, verify] usually and someone told me to try [clean, package].
I tried with [clean, verify, package, compile] but that too did not help the error

undone axleBOT
smoky oak
tender shard
#

your maven shade definition is wrong

#

you didn't add any goal

smoky oak
tender shard
#

1 sec

dreamy chasm
#

?paste

undone axleBOT
tender shard
#

put this above <configuration>

<executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
smoky oak
#

cuz you said this

dreamy chasm
tender shard
#

yeah I must have forgotten, since normally everyone already has a maven-shade defionition 😄

smoky oak
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <relocations>
                        <relocation>
                            <pattern>com.jeff_media.morepersistentdatatypes</pattern>
                            <shadedPattern>io.github.moterius.morepersistentdatatypes</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </plugin>```like this?
tender shard
tender shard
tender shard
#

(it's com and not de.jeff_media now)

dreamy chasm
smoky oak
#

the fuck?
Unsupported class file major version 61

dreamy chasm
tender shard
smoky oak
#

afaik yes

tender shard
#

then change maven-shade-plugin to version 3.3.0-SNAPSHOT

#

you'll also need this somewhere in your pom:

    <pluginRepositories>
        <pluginRepository>
            <id>maven-snapshots</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
        </pluginRepository>
    </pluginRepositories>
dreamy chasm
#

then watch you'll have an issue with digital signatures next, it will be a dejavu for me

smoky oak
tender shard
#

no, in the root

smoky oak
#

<project>?

tender shard
#

yes

#

like this

summer scroll
#

So I'm modifying player's equipment specifically on HEAD slot with packet PacketPlayOutEntityEquipment but everytime I modified it, it plays a sound, is there in any way to modify it silently?

smoky oak
#

so now there's three jars

#

which to upload?

#

shaded?

tender shard
#

I guess so

#

I always tell maven to create only one jar

smoky oak
#

wait

#

why is that jar suddenly so much bigger

#

like by a order of magnitude

dreamy chasm
#

cos it has lots of stuff in it

tender shard
#
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <finalName>${project.name}-${project.version}</finalName>
        </configuration>
       </plugin>
tender shard
#

set spigot or spigot-api to <scope>provided</scope>

smoky oak
#

so it did include the spigot api ?

tender shard
#

check out the second headline there

crude loom
#

InventoryClickEvent

smoky oak
#

jup that'S been the issue

#

thanks for the help y'all