#help-development

1 messages · Page 508 of 1

undone axleBOT
jagged monolith
#

Are you getting them as a string or something?

quaint mantle
jagged monolith
#

.java are the class files. You need to expand the com.developed... as there will already be class files

quaint mantle
#

I meant make the plugin

jagged monolith
#

Oh you mean compile it into a .jar file

quaint mantle
#

ye

#

sry

#

trying to edit the files to my liking I bought plugin and src but it wont let me make it into a jar

jagged monolith
#

Adding the src isn't enough. You need to make sure you have setup the ide for it. Make sure you have things like gradle or maven (depending what is used for the build file etc..

quaint mantle
#

maven

#

so I cant just open the src

#

?

jagged monolith
#

Having the Minecraft Development Plugin for Intellij is also very handy

#

You'll also need to make sure you have the correct java version.

quaint mantle
#

kk

#

what do I put here then

jagged monolith
#

You should probably install the Minecraft Development plugin for the ide first

jagged monolith
#

At the top right, you probably should add the build configurations in (where it says current file)

quaint mantle
#

Yep

#

How do I do that though is what im asking

jagged monolith
#

Otherwise when you try to run it, it won't know what you're wanting to do

#

Top right, where current file is, click on the drop down and edit configurations

jagged monolith
#

What did you add for the configurations

quaint mantle
#

idk

#

which one I click

jagged monolith
#

Click the plus sign and add one for maven, since you said its done in maven

quaint mantle
#

left or right

#

Ok

jagged monolith
#

?? There's one 1 + sign

quaint mantle
#

I clicked maven

jagged monolith
#

Now give it a name, then you can just use something like clean install for the command line, then make sure you set the working directory to the project.

jagged monolith
#

If that's the project you want to build then yes

quaint mantle
#

I cant click ok

quaint mantle
#

ok

#

"Apply", "Ok", "Run" should that work

jagged monolith
#

Try and see

vast raven
jagged monolith
quaint mantle
#

what I do for this part

vast raven
#

Setup a jdk

#

What version of spigot / paper are you using?

quaint mantle
#

uhh

#

how to check

#

Do you mean server version

jagged monolith
#

Which API version is being used for the plugin

quaint mantle
#

if so 1.18.2

#

idk how to check

vast raven
#

Ok use jdk 17

#

Download Amazon corretto 17

#

Into the jdk configuration you've opened

quaint mantle
#

ok

vast raven
#

17

jagged monolith
#

Not 20, you want 17

quaint mantle
#

?

#

all good

vast raven
#

y

jagged monolith
#

Yes

quaint mantle
#

ty

#

error

vast raven
#

lol

quaint mantle
#

what is this part meant to lead to?

vast raven
#

try changing jdk again

#

maybe it wasn't just ready

quaint mantle
#

I think its config issue

vast raven
#

which config do you meant?

quaint mantle
#
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.081 s
[INFO] Finished at: 2023-05-10T06:43:01+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\ozowe\Downloads\ConeticMC\SourceCodes\ESpawners-0.0.1_source_from_cfr). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
jagged monolith
#

There's no pom.xml

vast raven
#

Do you have your pom?

quaint mantle
#

oh

#

how I do that

vast raven
#

Create new file and name it pom.xml

quaint mantle
#

Should I add from old plugin

jagged monolith
#

Well check if there is a build file first

vast raven
#

Do that but be careful on changing all the needed

quaint mantle
#

ok done

vast raven
#

It should appear them a maven window saying: "Maven project found" then click Load maven script

quaint mantle
#

you talking about this?

vast raven
#

nono

quaint mantle
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project  (C:\Users\ozowe\Downloads\ConeticMC\SourceCodes\ESpawners-0.0.1_source_from_cfr\pom.xml) has 1 error
[ERROR]     Non-readable POM C:\Users\ozowe\Downloads\ConeticMC\SourceCodes\ESpawners-0.0.1_source_from_cfr\pom.xml: input contained no data
[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/ProjectBuildingException

Process finished with exit code 1
#

I added the pom

quaint mantle
#

oh I see

jagged monolith
#

?paste

undone axleBOT
quaint mantle
#

then clicked run again

vast raven
#

send me your pom

jagged monolith
#

Show us your pom.xml

#

?paste Paste it

undone axleBOT
quaint mantle
wet breach
#

The pom is what everyone seeks

vast raven
#

🤖

jagged monolith
#

That's why it won't work. You need to actually add stuff to it

quaint mantle
#

kk

#

is there a template

vast raven
#

I raccomend you one thing, create a new project and name as your plugin should be, changing all params, at the end drop your old src in the src/java folder

quaint mantle
#

kk

#

lemme try that

vast raven
#

Maven script is automatically created by the ide

wet breach
vast raven
#

Obv use the Minecraft development project

quaint mantle
#

ok

#

I added my old pom.xml

jagged monolith
wet breach
#

Interesting

quaint mantle
#

ok it worke

#

d

vast raven
#

What do you guys think about old school eclipse users?

wet breach
#

What about them?

jagged monolith
#

Eclipse is still as heavily used as Intellij

wet breach
#

We have like 2 or 3 devs here that are regulars that use eclipse

vast raven
#

The part that stills uses Eclipse to build Minecraft projects

wet breach
#

So not sure what you are trying to imply in regards to those who use it

vast raven
#

In my opinion that's not worth it

jagged monolith
#

There's really nothing wrong with Eclipse, a lot of people prefer it.

vast raven
#

Starting from the IDE itself which is still slow as it was

wet breach
#

Not entirely sure what your opinion of the ide has to do with other people using it

vast raven
wet breach
#

Like it does not affect you at all in what ide other people are using

vast raven
#

I'm not caring in other people opinions

quaint mantle
#

ok the plugin didnt load ima make a new thing

wet breach
vast raven
#

And I'm not intended to change them opinions

#

It was just a sharing of thoughts about your preferences

jagged monolith
quaint mantle
# jagged monolith How do you know it didn't load, What did it say? Where there any errors?
[06:49:28 ERROR]: Could not load 'plugins/ESpawners-1.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.loadPlugins(CraftServer.java:418) ~[paper-1.18.2.jar:git-Paper-388]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:288) ~[paper-1.18.2.jar:git-Paper-388]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1164) ~[paper-1.18.2.jar:git-Paper-388]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.2.jar:git-Paper-388]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 7 more
jagged monolith
quaint mantle
#

..

quaint mantle
#

WHERE IS IT

wet breach
vast raven
quaint mantle
#

mb caps

vast raven
jagged monolith
vast raven
dreamy ridge
#

bump

quaint mantle
jagged monolith
quaint mantle
#

Ima just make a new project

jagged monolith
#

Where all the java class files are

vast raven
jagged monolith
#

This is why you don't download source code and try to get it to run without knowing what you're actually doing

vast raven
#

Like a folder structure

wet breach
vast raven
#

Maybe I didn't formulated the right sentence

wet breach
#

I am chill. Just pointing out talking about other peoples preferences is dumb. If instead you wanted to talk about the differences between the ides and not why someone would prefer one over the other that would be different.

vast raven
#

If I was here to speak about others business, I wouldn't be here

wet breach
#

Then dont ask us to comment on opinions of unnamed people for using something you dont prefer. There isnt anything to discuss there.

vast raven
#

The question itself was pointing on the IDE not on the people them self, but it doesn't matter chill

wet breach
#

Then word your statements or questions better

#

And not sure why you keep assuming i am upset by telling me to chill. If you dont like being called out on something in a public space then dont make comments or statements in a public space.

jagged monolith
quaint mantle
#

no

wet breach
quaint mantle
#

I did

jagged monolith
#

Then show us the folder/file structure that you have for the project. Or create a new maven project is it generates the correct folder structure.

quaint mantle
#

I made it with src and everything

#

uploaded it

#

but now plugin doesnt work

#

I done something wrong

jagged monolith
#

Doesn't work how? What does it say? Any errors?

quaint mantle
#

the plugin isnt working

#

idk what else to say

vast raven
wet breach
jagged monolith
quaint mantle
vast raven
quaint mantle
#

no

vast raven
#

Like the one you see in the left top corner

jagged monolith
vast raven
quaint mantle
jagged monolith
#

Okay, that's a start. It should atleast build and load. What does it say when you try?

vast raven
#

Ok, listen, you have to take your old src folder (starting from com.spawmersgui and drop into the new com.spawnersgui folder)

quaint mantle
#

the code isnt working

vast raven
jagged monolith
#

Isn't working how? Did you copy the src files from the one you downloaded.

quaint mantle
#

wym

vast raven
#

So you have to copy your old one

unkempt peak
#

You can't just say "isn't working" that is useless

quaint mantle
#

I dont got a old one

vast raven
quaint mantle
#

The src I got sent

#

didnt haveo ne

vast raven
#

You do

quaint mantle
vast raven
#

All .java files are the classes

quaint mantle
#

ok

#

so thats the com file

vast raven
quaint mantle
jagged monolith
#

Show us what's in the com folder

quaint mantle
#

can anyone vc

#

its easier

vast raven
#

I'm at school actually

quaint mantle
vast raven
#

Double click

quaint mantle
vast raven
#

Double click

quaint mantle
vast raven
#

Ok ctrl + a

jagged monolith
#

All that stuff, add it to the src\com.spawnergui folder

vast raven
#

And drop it in your new com.spawnersgui folder in intellij

jagged monolith
#

Then make sure you update the plugin.yml and pom.xml with the new main class

wet breach
#

It may be best if both are not trying to help with the same thing to avoid confusing them further

astral pilot
#

how do you make a clickable text message

jagged monolith
#

You'd need to use a component

astral pilot
#

and where do i access that

jagged monolith
#

TextComponent can do it if I remember correctly. Haven't played with components for a while

quaint mantle
astral pilot
#

i can't find TextComponent in Spigot-API

quaint mantle
#

done

unkempt peak
astral pilot
#

bundled by spigot-api?

unkempt peak
#

Yes

astral pilot
#

ah

astral pilot
#

it seems like it has a separate docs

chrome beacon
#

?jd

glossy venture
#

?jd-bc

glossy venture
#

nvm thats bungee

#

not chat

chrome beacon
#

?jd-bcc

astral pilot
#

wait what's te difference between bungeecord chat and bungeecord

unkempt peak
#

bungeecord chat is specifically for chat

glossy venture
#

bungeecord is only for bungee but bungee chat is just for chat so is bundled by spigot

astral pilot
#

but it seems like they're using the same import

unkempt peak
#

this is the import net.md_5.bungee.api.chat

astral pilot
#

is this the right api

#

it says 1.16 e

unkempt peak
#

wdym 1.16 e?

quaint mantle
chrome beacon
#

It says 1.16 but that's fine

unkempt peak
#

It should be included in your spigot api dependency

chrome beacon
#

Now read this ^^

unkempt peak
#

Oh cool I didn't know that guide existed

astral pilot
astral pilot
chrome beacon
unkempt peak
chrome beacon
quaint mantle
jagged monolith
quaint mantle
#

I did ctrl a

#

and put it there

jagged monolith
#

You need to put it in the spawnersgui folder

quaint mantle
#

it is

chrome beacon
#

Yeah that's the com folder

#

Not the spawnersgui folder

jagged monolith
#

commands, data, events, plugin, util and ESpawners.java need to be in the spawnersgui folder.

quaint mantle
#

so what I do

#

as I been told 2 diff things

jagged monolith
#

You need to put everything in the spawnersgui folder

#

You have not done that

chrome beacon
#

^^

vast raven
# quaint mantle so what I do

All that was in the old src has to been moved on the new src, in your case commands, data, events, plugins, util and Espawners.java is all you need from the old src

quaint mantle
#

I deleted the project

#

restarting it

vast raven
# quaint mantle

Then just move it on src/main/java/com/spawnersgui, here you have putted all in the com folder not in the spawnersgui

quaint mantle
#

ok so make a folder inside com.spawnergui

#

and upload it there

#

then its good?

vast raven
#

Yep

quaint mantle
#

ok putting it in the files

vast raven
#

no

#

wait

quaint mantle
#

...

jagged monolith
#

Well, you don't need a new folder to upload it to. Just upload it directly to com.spawnergui

unkempt peak
#

bruh

vast raven
#

Just take the old stuff and move it in the com.spawnersgui

quaint mantle
quaint mantle
vast raven
quaint mantle
#

so tf I do then

vast raven
#

Not in the com.spawnersfui

unkempt peak
#

dude it's not hard

quaint mantle
#

so not in there

#

right

vast raven
quaint mantle
#

then

vast raven
#

Again

quaint mantle
#

put here

#

?

vast raven
#

Ok stop here

jagged monolith
#

Yes

vast raven
#

Yes

quaint mantle
#

ctrl c + ctrl v

#

?

jagged monolith
#

Yes

vast raven
#

Y

quaint mantle
vast raven
#

ok now

#

Go on plugin.yml

quaint mantle
#

ok done

vast raven
#

Change your main class to ESpawners

quaint mantle
#
name: SpawnerGUI
version: '${project.version}'
main: com.espawners.ESpawners
api-version: 1.18
vast raven
#

Ok, now go on your pom

quaint mantle
#

okie

#
    <groupId>com</groupId>
    <artifactId>ESpawners</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <name>ESpawners</name>
vast raven
#

?paste Paste it here

undone axleBOT
quaint mantle
#

This?

astral pilot
#

is it possible to make a new line message in ComponentBuilder

#

if so how do you do it

unkempt peak
astral pilot
#

like that

unkempt peak
vast raven
astral pilot
unkempt peak
#

try it

astral pilot
#

wait so /n should work?

#

alright

vast raven
unkempt peak
#

my b

quaint mantle
#

records are not supported in -source 8

#

I didnt get this error before

vast raven
#

Which version of Java are you using?

quaint mantle
vast raven
#

In theory, you are using an older version of Java, to fix this you should just click on the context action where it flags you the error, and click to upgrade to jdk 16

jagged monolith
#

jdk 17*

vast raven
#

Records start from jdk 16

#

So it should work as well

jagged monolith
#

They are wanting 1.18 though, so need 17

vast raven
#

Never tried it

jagged monolith
#

Nope 1.18 was built with 17

vast raven
#

okk

#

@quaint mantle Choose jdk 17

quaint mantle
#

how I do that

vast raven
#

Go on project structure

quaint mantle
#

where that

vast raven
#

You find it above exit in the top left corner of the screen

#

Clicking on the 3 dots

quaint mantle
#

top right

#

?

vast raven
#

Left

jagged monolith
#

Top Left: File > Project Structure

vast raven
#

⬅️

quaint mantle
#

im using this one

vast raven
#

wtf

#

Select language level

unkempt peak
#

try changing sdk default to 17 maybe?

jagged monolith
#

The pom has 1.8 selected

vast raven
quaint mantle
#

how I fix it

vast raven
#

@quaint mantle change the 1.8 in the pom to 17

quaint mantle
#

<java.version>17</java.version>

#

?

jagged monolith
#

Yep

vast raven
#

yep

quaint mantle
#

package net.milkbowl.vault.chat does not exist

vast raven
#

Ok now

#

You have to import vault

quaint mantle
#

kk

#

lemme get that

vast raven
#

@jagged monolith can you find it for me? I'm at school xd

quaint mantle
#

I got it

jagged monolith
#
<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>com.github.MilkBowl</groupId>
        <artifactId>VaultAPI</artifactId>
        <version>1.7</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
quaint mantle
#

on old one

#

or that

#

package net.brcdev.shopgui does not exist

vast raven
#

It is another dependency

quaint mantle
#

ye

#

im doing that rq

jagged monolith
#
    <dependency>
        <groupId>com.github.brcdev-minecraft</groupId>
        <artifactId>shopgui-api</artifactId>
        <version>3.0.0</version>
        <scope>provided</scope>
    </dependency>
quaint mantle
#
[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------------< com:SpawnerGUI >---------------------------
[INFO] Building SpawnerGUI 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.github.brcdev-minecraft:shopgui-api:jar:latest is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.374 s
[INFO] Finished at: 2023-05-10T08:42:27+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project SpawnerGUI: Could not resolve dependencies for project com:SpawnerGUI:jar:1.0: com.github.brcdev-minecraft:shopgui-api:jar:latest was not found in https://repo.papermc.io/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of papermc-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

Process finished with exit code 1

#

I added

vast raven
#

<dependency>
<groupId>com.github.brcdev-minecraft</groupId>
<artifactId>shopgui-api</artifactId>
<version>latest</version>
<scope>provided</scope>
</dependency>

weak kayak
quaint mantle
#

I got it infront of me

jagged monolith
#

Show where you added it

quaint mantle
#

ok it worked

#

next

#

patterns in switch statements are a preview feature and are disabled by default.

vast raven
#

Send your pom

quaint mantle
#

tf that mean

jagged monolith
quaint mantle
#

what I set it to

chrome beacon
#

17

quaint mantle
#

it on 17

jagged monolith
#

Change the lanugage level

buoyant viper
#

set it to "X" iirc to use preview features

jagged monolith
#

Set it to that one maybe

buoyant viper
#

or well, one of the options should say preview :p

jagged monolith
#

Side note:

😮 The new UI for Intellij looks amazing!!

#

So much cleaner

buoyant viper
#

i think its too simple

jagged monolith
#

Nah, it's cleaner and more modern. I like it.

astral pilot
#

yo it says HoverEvent is deprecated, what should I use instead?

unkempt peak
#

?jd-bcc

unkempt peak
#

It's only depreciated for public HoverEvent(HoverEvent.Action action, BaseComponent[] value)

unkempt peak
#

Instead of BaseComponent[]

astral pilot
#

ah

chrome beacon
#

You probably just want text

livid dove
#

There any good guides out there for javadocs in intelij?

I've mucked around with the doc comments and the tool in inteli ultimate.

But I'm struggling to figure out how to make an overview page for the whole documentation (like the main screen of the spigot docs).

I'm very much someone who enjoys having a complete project so if anyone could send me in the right direction to add more detailed javadoc functionality that'd be grand.

Tried finding guides but there doesn't seem to be much that links general practice with the intelij tools :S

#

Already looked at it.

Unless I'm blind it gives little to no help on how to make overview pages for a whole project.

vast raven
#

In a dream I found a javadoc for nms

#

wow never heard it

#

What do you mean, javadocs in the classes using comments or explanation of the methods?

livid dove
#

No I mean I generate a whole project but there is no "overview" page.

That's like "this is the docs for the plugin, here are all the packages"

#

This^

#

Yeah thats exactly what I'm asking chief ^_^

Cheers for the help either way

astral pilot
#

weird

#

why is the events getting

#

registered on the other text too

#
Text1: [Button1]
Text2: [Button2]
^^^^^
Button1 ClickEvent and HoverEvent gets called here
#

why is that

unkempt peak
#

Send your code

astral pilot
#
BaseComponent[] repoButton = new ComponentBuilder("[Click Here]\n").bold(true).color(net.md_5.bungee.api.ChatColor.GREEN)
                .event(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://test.com/"))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Visit the repo"))).create();

        BaseComponent[] helpButton = new ComponentBuilder("[Click Here]\n").bold(true).color(net.md_5.bungee.api.ChatColor.GREEN)
                .event(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://google.com/"))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("View Help"))).create();

BaseComponent[] messageComponent = new ComponentBuilder("\n")
.append("Repository: ").color(net.md_5.bungee.api.ChatColor.BLUE).bold(true).append(repoButton)
                .append("Commands: ").color(net.md_5.bungee.api.ChatColor.BLUE).bold(true).append(helpButton)
                .append("").create();
#

@unkempt peak

cinder abyss
#

Hello, how can I generate worldedit schematics in new chunks ?

unkempt peak
cinder abyss
#

more help please ?

#

I don't really know a good way to do this Thinkeng

#

Thanks !

astral pilot
#

like when you hover on Commands: text

#

it calls the repoButton()

cinder abyss
#

okay perfect 👍

#

thanks 😄

#

already did

astral pilot
#

soo @unkempt peak

cinder abyss
#

I don't want to change the default world generation, I just want to add a structure

unkempt peak
#

I'm not sure what is happening

#

@astral pilotcan you send the rest of your code?

astral pilot
# unkempt peak <@723479305342025729>can you send the rest of your code?
 BaseComponent[] repoButton = new ComponentBuilder("[Click Here]\n").bold(true).color(net.md_5.bungee.api.ChatColor.GREEN)
                .event(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/FlamingH0rse/OptimisedHoppers"))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Visit the repo"))).create();

        BaseComponent[] helpButton = new ComponentBuilder("[Click Here]\n").bold(true).color(net.md_5.bungee.api.ChatColor.GREEN)
                .event(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/FlamingH0rse/OptimisedHoppers"))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("View Help"))).create();

        BaseComponent[] messageComponent = new ComponentBuilder("\n")
                .append("OptimisedHoppers\n").color(net.md_5.bungee.api.ChatColor.AQUA).bold(true)
                .append(" \n")
                .append("An open-source plugin that aims at optimising\n").color(net.md_5.bungee.api.ChatColor.GOLD).bold(false)
                .append("item movements by hoppers on Minecraft\n").color(net.md_5.bungee.api.ChatColor.GOLD).bold(false)
                .append("servers\n").color(net.md_5.bungee.api.ChatColor.GOLD).bold(false)
                .append(" \n")
                .append("Repository: ").color(net.md_5.bungee.api.ChatColor.BLUE).bold(true).append(repoButton)
                .append("Commands: ").color(net.md_5.bungee.api.ChatColor.BLUE).bold(true).append(helpButton)
                .append("").create();

        p.spigot().sendMessage(messageComponent);
#

aight i sent the whole thing @unkempt peak

#

basically Commands: shouldn't have any events associated with it

hoary wing
#

ive made a plugin where you can import particle effects from blender and everything works great, but is there a way to spawn more than 16k particles (preferably with as little lagg as possible) or is that the max amount no matter what you do

wet breach
#

You can spawn as many as you want. However to do it without lag on the server side you need to utilize packets. Client may lag though

chrome beacon
#

The API just sends packets

#

So you don't need to use them directly

#

but yeah the client will lag

wet breach
chrome beacon
#

nor does it need to keep track of them

astral pilot
#
.append("Commands: ").event((ClickEvent) null).event((HoverEvent) null)
#

adding null to it fixed it

unkempt peak
#

huh

#

That is strange

#

I have no idea why the event was applied like that but yeah that works. for some reason the events seem to apply to all text until a new event is added.

keen ferry
#
Block block = world.getBlockAt(x, y, z);
if (block instanceof Directional directionalBlock)
  Bukkit.broadcastMessage("test");

The block is a Stairs block, which extends Directional, so why does this not print "test"?

astral pilot
#

Anyone here knows how to use ChatPaginator

chrome beacon
#

block.getBlockData() instanceof ... etc

chrome beacon
undone axleBOT
#

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

astral pilot
#

What is ChatPaginator actually for?

keen ferry
#

I've noticed BlockFace has values like EAST_NORTH_EAST and EAST_SOUTH_EAST, what blocks use them?

chrome beacon
#

From the javadoc

astral pilot
#

it says "returns a ChatPage"

#

what can I do with the ChatPage

chrome beacon
#

It's a util class for pagination

astral pilot
chrome beacon
#

?

#

It gives everything you need

astral pilot
#

how

#
int pagenumber = 1;
String testString = "awoipef";

ChatPaginator.ChatPage page = ChatPaginator.paginate(testString, pagenumber);
System.out.println(page);
chrome beacon
astral pilot
#

I checked that

#

i know it returns "ChatPage"

#

but what can I do with that "ChatPage"

chrome beacon
#

Read the link I sent

astral pilot
chrome beacon
#

then you have the answer to your question

astral pilot
#

No i don't

#

it doesn't say how do I send that in chat

#

nor how to change page

#

it says it automatically sets the page

#

but when setting strings that has a lot of characters

#

it gives ArrayOutOfBoundsException

chrome beacon
#

You loop and send

#

Which page is set in the paginate method

astral pilot
#

I thought it gives a page

#

like there would be page 1 page 2 whatsoever

chrome beacon
#

and the page contains lines

#

You probably didn't read the link I sent

#

Even though I told you to

astral pilot
#

i went to the docs first

#

before asking here

chrome beacon
#

That's what you can do with a page

astral pilot
chrome beacon
#

No

fierce whale
#

Is there a way to show citizen(or entity) for only specific player?

wet breach
#

One way is to use scoreboard teams

#

The only other way would be to use packets

fierce whale
#

Umm.. Is it impossible to do that with player.show() method?

wet breach
#

I dont see such method

#

Are you sure you are using spigot and not paper?

fierce whale
#

I tried to learn nms and using packet. It was always so hard 😦

crimson vault
dire gyro
#

I'm here to ask a quick question, I know it's not entirely on the spigot topic yet it's still about minecraft and I have nowhere else to ask, So feel free to remove it if it's not appropiate.

I'm currently trying to make a Minecraft server from scratch, I almost have the entire login sequence, There's just one thing that confuses me, in the login packet in the vanilla protocol it expects a UUID, Which given responds with a error refering to a too long buffer size, Even though the string is within the limits, Anyone have any idea what it could be ( It is encrypted in AES CFB ) and I verified that it works, As I can send the disconnect packet with text 🙂

chrome beacon
#

Also why are you writing code like that

wise rock
#

Hello, I received your ping.
It's surely related to the emotes feature.
Disable it in config.yml and run /iazip to regenerate your pack.
There is probably no way to fix that other than disabling emotes.

Anyway I doubt this channel is the correct one since it's called "help-development". Next time please ask on my Discord server or on my forum.

wet breach
dire gyro
wet breach
#

The uuid format it expects is in the format of a long

#

Which is 16 characters

dire gyro
#

Yes it expects a Guid right? ( Globally unique identifier )

wet breach
#

Yes but not the string

dire gyro
#

Does it expect raw bytes? instead of a prefixed string?

wet breach
#

No

#

Turn the bytes into a number

#

Which should be a long

dire gyro
#

Ah, Minecrafts special Shahash?

wet breach
#

There is 128bits to represent a uuid

#

Turn those 128bits into a long

#

There is no hashing required

dire gyro
#

So if I understand it correctly, You're saying I'd need a buffer with the size of a 128bit container and turn that container back into bytes? 🤔

#

Ah, I think I get it, This way you'd get unique numbers whilst still working with numbers to ensure people can't guess them x)

wet breach
#

You are really over thinking this

dire gyro
#

That tends to be my downfall x)

#

Thank you for your patience with me so far though, I appreciate it

wet breach
#

Anyways driving home now. Will have to wait for someone else to jump in to help.

dire gyro
#

👍🏿 Have a good day, once again thank you for the pointers I have things to try again 🙂

dire gyro
wet breach
dire gyro
#

I don't know if it's common to post the solution, But I'll post it here

in C# you can use something called a big integer to handle all kinds of magical operations 
            BigInteger integer = new BigInteger(new byte[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}); such as putting a bytes in there of any size to create a buffer which can be interpretted as a integer

This way the next person doesn't have to go through my suffering xD

wet breach
#

Nicely done

#

Although that is c#

dire gyro
#

Yes.

wet breach
#

And this is primarily java

dire gyro
#

Fair you got me there :p once again tyvm I was stuck on this for weeks x)

wet breach
#

Np

glossy venture
#

java has a BigInteger as well

crimson vault
crimson vault
flint coyote
tardy delta
#

event.getView()

crimson vault
tardy delta
#

inventoryclickevent

flint coyote
#

The designing part isn't a lot of effort.

#

The on click open another inventory or write something into a config or whatever is

crimson vault
crimson vault
flint coyote
crimson vault
flint coyote
#

Having your own inventory api reduces the effort drastically. smile made a guide on it

crimson vault
flint coyote
#

well it wouldn't be hard to create a basic version of that. The problem would be the optimization (e.g. looping over slots with the same item instead of setting them one by one)

crimson vault
crimson vault
flint coyote
#

I would still do it with a decent API for GUIs before creating something like that but yes it looks about right. Might want to add itemMeta with display name and lore aswell

#

And you can store the inventory in a file on the server on close

crimson vault
#

yes i was planning to do that :s

crimson vault
flint coyote
#

the file ending doesn't really matter anyway

#

Especially for linux

crimson vault
#

yaap ik

flint coyote
#

Also why not make it a .java 😄

crimson vault
crimson vault
warm mica
ocean hollow
#

how to import spigot api

chrome beacon
ocean hollow
#

yes, I reloaded

#

maybe that is my problem?

chrome beacon
#

Never seen that one

#

Are you using Java 20 or 21

ocean hollow
#

yeah

#

but I can't, right?

warm mica
worldly ingot
#

You could also disable experimental JDK features

#

Shouldn't be much reason to use them

worldly ingot
#

However IJ allows you to do that. I don't use it

warm mica
#

Also note that your server must be running on the same or newer version as the version of the jar that you compiled

#

Do you really need the features of these new versions? If you are not making use of them then you may as well just use jdk17

icy beacon
#

anyone knows how to get a file from a ZipEntry?

// mock code
fun doZipStuff(file: File) {
  val zipFile = ZipFile(file)
  for (entry in zipFile.entries()) {
    if (entry.isDirectory) continue
    if (!entry.name.endsWith(".json")) continue
    val jsonStuff = doJsonStuff(/* where do I get the file from? */)
  }
}
#

perhaps getting the content of the file would also be sufficient, but I don't know how to do that either

warm mica
#

Are you using gson? Then you may also pass a reader to parse it. To create it use new InputStreamReader(is, StandardCharsets.UTF8)

icy beacon
#

nope, I'm using Configurate, and I think that getting the contents of the file would indeed be sufficient 🙂

#

i'm not versed in terms of IO at all haha, should step that up at some point. would this read the contents?
zipFile.getInputStream(entry).readAllBytes()

warm mica
#

Make sure to close the inputstream:
for (InputStream is = ... ) {

}
This ensures that it is being closed after the bracket

#

And then you may use is to readAllBytes

icy beacon
#

shouldn't it be try

warm mica
#

Oh, right

icy beacon
#

ok, ty 🙂

#

I hope Configurate can read it like this lol

val mainNode = GsonConfigurationLoader.builder()
  .lenient(true)
  .buildAndLoadString(String(bytes))
warm mica
#

Also make sure to pass the charset to the string constructor if you are using an older version of java

#

Ascii is the default value for older versions

zealous osprey
#

Where's the statistic again for what amount of servers are running certain minecraft versions?

zealous osprey
#

thx

sick epoch
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
__**Admin:**__

selfrole Add or remove a selfrole from yourself.

__**Cleanup:**__

cleanup Base command for deleting messages.

__**Core:**__

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

__**Downloader:**__

findcog Find which cog a command comes from.

__**Mod:**__

names Show previous names and nicknames of a member.
userinfo Show information about a member.

__**ModLog:**__

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

__**Permissions:**__

permissions Command permission management tools.

sick epoch
#

Can someone help me with EntityDeathEvent ? ^^

icy beacon
#

?ask

undone axleBOT
#

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

icy beacon
#

please

sick epoch
#

sry

#

i forgot

#

?ask

undone axleBOT
#

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

sick epoch
#

i don't know how it works

astral pilot
#

What would be the logic in creating help command with pages

icy beacon
icy beacon
#

please open your eyes and read what it says

sick epoch
#

wow calm

icy beacon
#

and then follow the advise

icy beacon
sick epoch
#

i'm a french guy i'm not sure to understand all i read

icy beacon
#

you gonna ask or not

#

Si vous avez une question, n'hésitez pas à la poser. Ne cherchez pas de personnel ou d'experts en la matière. Ne demandez pas à demander ou à savoir si des personnes sont réveillées ou disponibles. Posez simplement votre question au canal concerné et attendez patiemment une réponse. Assurez-vous d'utiliser le bon canal en fonction du sujet de votre question. Créez un fil de discussion au cas où le canal serait déjà utilisé !

Traduit avec www.DeepL.com/Translator (version gratuite)

sick epoch
#

ty

sick epoch
#

EntityDeathEvent help

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

sharp bough
#

hi when using the worldedit api to spawn a new schematic, does it take the same amount of time no matter what blocks there are or does it take less time if some of the blocks in the schematic are already there?

context: i want to setup an arena system and spawn the schematic of the arena, but i want to know if its worth it to remember where each arena is placed to just paste some of the blocks of the schematic, or if i should just spawn the new arena X blocks away

wise mesa
#

You don’t want dots in your package names?

icy beacon
#

same problem

wise mesa
#

If you want to make one in the upper package just erase it from the name when you’re making it

#

But there probably is a way to fix it

#

But also then you would get separate folders for your base package

#

That everything is in

icy beacon
#

I'm not sure about which one you're talking. I mostly just rate resources that I might find useful in the future because I like them. please send the link here, I might find a use for it right now, as I'm working rn

#

ah, I don't think I need it in my current project unfortunately, but it seems useful for my other project

astral pilot
#

can you have conditional append in new ComponentBuilder(")

#

like append something whenever a certain condition is met

icy beacon
#

yeah I've rated it because I saw that it was quite extensive and intuitive to use

astral pilot
icy beacon
#

I'll take a deeper look and see if I find anything that could be of use

twilit roost
#

how do I make ProtocolLib's whitelist listen to all packets?

#

ok got it:
like so

        Set<PacketType> types = new HashSet<>();
        for(PacketType type : PacketType.values())
            types.add(type);
icy beacon
#

if I were to nitpick, I'd just outline a couple typos lol

  1. "get's" -> "gets" (Basic Usage)
  2. "to" should be in black color for readability (Chaining)
  3. "there is' -> "there are" (Chaining) (though i think that's valid in spoken english?)
  4. broken unordered list in PersistentData (see attachment)
  5. "With" -> "with" (Adding the dependency)
    in my opinion typo-less text looks more professional
#

overall I can't give you any more feedback yet unfortunately, this builder looks like it'd satisfy all my needs xD

#

i think you just need to delete the list and create it from scratch

#

for some reason unordered lists just occasionally break

#

you are using dark mode so it might seem normal to you

#

1 sec

#

if I could ask you to return the favor with a readability check that'd be cool haha, but don't worry if you do not want to

quaint mantle
#

Is there any way to calculate moon's phase / current location?

icy beacon
#

I've got a CONTRIBUTING.md that might be hard to read, so if you want to, I could give you the link and you could just proofread it

#

same here haha

#

can you elaborate a bit?

#

oh, let me explain

#

if you put it in one sentence:
Contributions that only focus on fixing code style, or only optimize something, or only add unit tests, or only add/remove easter eggs are not welcome.

#

you did help me notice that the "only" was missing in the last bullet point, I've edited that now

#

thanks 🙂

valid basin
#

Is there some permission event that lets me check if some permission is added to the player?

#

with vault api or even spigot api?

icy beacon
#

design question! (API)
I'm refactoring my API and I've noticed that I'm currently using this enum:

public enum EnchantmentLoadResponse {
  LOADED,
  RELOADED,
  NOT_FOUND
}

for a method of

EnchantmentLoadResponse loadEnchantment(String enchantmentName);

on more than one occasion, I've heard that using enum responses is a bad practice and exceptions should be thrown if something has gone wrong, but in this particular case I feel like the usage is fine, as there are 2 valid outcomes (LOADED/RELOADED) and 1 invalid (NOT_FOUND), and the API user might need to know whether the enchantment has been loaded or unloaded (though, honestly, I can't think of a such usecase). should I just make it return void and throw an exception when the enchantment wasn't found, or should I leave it as is?

tall furnace
icy beacon
#

another question, in PluginManager#registerEvent, what is the listener field for, if I'm handling the behavior in the 4th argument lambda?

subtle folio
icy beacon
#

yeah but like

#

what's the point of it

#
manager.registerEvent(trigger.eventClass, object: Listener {}, EventPriority.NORMAL, { _, event ->
  // I handle my event here
}, plugin)
#

the listener object that I provide here is empty. is this valid or am I doing it wrong

pseudo hazel
#

i hate exceptions so your enum looks fine to me xD

icy beacon
#

haha

tardy delta
#

i hate unwinding the stack

faint tide
#

are my lengths for every character correct? or is my math off somehow?

#

the code has set a number till the " : " mark. which i have set to 100, then from the 100 it takes off the length of the name, and fill the remaining space with spaces. except somewhere it doesn't work

#

and it checks the length of the displayname

pseudo hazel
#

maybe the space is only 2

#

idk just an idea I had

#

also it will fail when you choose a resource pack with another font

faint tide
#

2 for sure not

earnest wasp
faint tide
pseudo hazel
#

4?

faint tide
# earnest wasp What you try making?

a scoreboard system. i have a mini game plugin and the idea is to show the top scores in chat with a command, but then with the scores alligned so it looks better

pseudo hazel
#

yeah sadly tabs are not a thing so there would probably be no way to space it out equally

humble tulip
#

😦

pseudo hazel
#

also it changes if letters are bold or not

#

or italic

earnest wasp
#

I think you need task in onenable

pseudo hazel
#

task to do what

earnest wasp
#

Run animation

faint tide
faint tide
earnest wasp
#

Booths

pseudo hazel
#

run what animation

faint tide
#

doesn't that meddle with fonts too?

pseudo hazel
#

you arent making any sense xD

earnest wasp
#

XD

faint tide
#

booths? xD

earnest wasp
#

My brains = 😴😴😴

faint tide
#

good morning to you too :p

earnest wasp
faint tide
#

idk, never touched bungee, I use spigot

earnest wasp
#

Oof

true perch
#

How come it says it isn't a valid mob? Am I missing something? ```java
public final HashMap<UUID, Integer> spawnedEntityNpcDataMap = new HashMap<>();

public void spawnMob(int id, Location location) {
NpcData npcData = this.main.getNpcManager().getNpcData(id);
if (npcData == null) {
Bukkit.getLogger().info("(!!!) Invalid Npc spawn attempt: " + id);
return;
}
int npcDataId = this.main.getNpcManager().getNpcId(npcData.getName());
this.spawnedEntityNpcDataMap.put(mob.getUniqueId(), npcDataId);
Bukkit.broadcastMessage(mob.getUniqueId() + " has spawned in");
} java
@EventHandler
public void mobDamage(EntityDamageByEntityEvent event) {
if (!(event.getDamager() instanceof Player))
return;
UUID uuid = event.getEntity().getUniqueId();
if (!this.spawnedEntityNpcDataMap.containsKey(uuid)) {
Bukkit.broadcastMessage(uuid + " isn't a valid mob");
return;
}
}```

earnest wasp
true perch
pseudo hazel
#

maybe the event gets triggered by another mob?

true perch
true perch
earnest wasp
pseudo hazel
#

well it doesnt say it spawned in

slim wigeon
#

This might be a hard task, this is what I have for my waypoint system```public class WaypointNamePrompt extends StringPrompt {
private GpsCompass compass = new GpsCompass();

public String getPromptText(ConversationContext content) {
    return "Enter Waypoint Name:";
}

public Prompt acceptInput(ConversationContext content, String input) {
    Player player = (Player) content.getForWhom();
    ItemStack item = player.getInventory().getItemInMainHand(); ItemMeta meta = item.getItemMeta();

    if( compass.isItemValid(item) ) {
        DataContainer container = new DataContainer(meta); WaypointManager wpManager = new WaypointManager(container.stringGet("Waypoints"),27);
        wpManager.add(input, player.getLocation()); container.stringSet("Waypoints",wpManager.toString()); item.setItemMeta(meta);
        
        player.sendRawMessage(ChatColor.GREEN+"Success! "+ChatColor.WHITE+"Waypoint saved as \""+input+"\"");
        return END_OF_CONVERSATION;
    } else {
        player.sendRawMessage(ChatColor.RED+"Error! "+ChatColor.WHITE+"Please switch to your gps compass");
        return this;
    }
}

}```Now I have a server shop, how do I do this with my server shop as well and get the itemstack of what I click like for a example "ShopGUI+". That plugin uses GUI either than prompts

alpine swan
#

since the entitydamagebyentityevent extends entitydamageevent, if you get an entitydamageevent which was caused by an entity can you just cast it across?

true perch
pseudo hazel
#

print the map when ou handle the event

#

are you using nms?

#

yeah then you cant use the anvil inventory like that

true perch
pseudo hazel
#

yes or use someone elses plugin

pseudo hazel
# true perch

print the whole map when you are handling the event, maybe its not in there

slim wigeon
slim wigeon
#

Got the wrong message

#

But that is the right one containing the code

true perch
#

It does exist inside of it, so I don't get why it can't find it.

pseudo hazel
#

try containsKey instead

#

nvm im blind

#

where do you print the second line?

true perch
#

after the npc was spawned in. I just tried prnting it before the NPC got damaged and now the map is printing out as empty.

pseudo hazel
#

yeah just as I thought

slim wigeon
#

I try to avoid NMS if possible. We should not bypass the API when there is no reason to. Like for a example, NMS is required to create NPCs, read anvil inventories. But don't be scared to use it, its not like the registry on Windows where one value change, the os breaks

pseudo hazel
#

how many of these objects do you have

#

like what class is this in

#

same

#

thats why I use other peoples stuff xD

true perch
#

I'll post code to a site hold on

pseudo hazel
#

and where do you make the NpcEvents class

#

maybe there are multiple

#

with their own maps

#

try printing stuff after the check

true perch
#

only one found in the entire project (includes libraries)

pseudo hazel
#

no

#

I mean one instance

true perch
slim wigeon
true perch
#

you cracked the case lol

pseudo hazel
#

lmao

true perch
#

Thank you hahaha

pseudo hazel
#

and rn I am only using 1 dependency that uses nms

#

which is AnvilGUI

#

im confident it will be updated quickly after a new version comes out

slim wigeon
#

You right, same with Vault. APIs are useful for things like this

pseudo hazel
#

anyways, is it possible to instantiate a Player object myself?

slim wigeon
#

What you mean? In a for loop?

pseudo hazel
#

no

#

I just want to make a fake player

#

I dont care about them actually being an entity

#

just a player object

slim wigeon
#

A bot I see, or NPC. I don't know how, I looked at the NPC one point but I did not go deep into it

pseudo hazel
#

no not an NPC

#

I just need to pretend like I am using players since then I can easily test some stuff

#

instead of making my own fake player objects

#

would be much faster to just use the existing Player

slim wigeon
pseudo hazel
#

yeah something like that

#

hmm

slim wigeon
#

I don't know how its done

#

There might be a source code somewhere that you can look at

pseudo hazel
#

or actually not like that

ocean hollow
#

how to find out in which direction the player turned his head?

pseudo hazel
#

I dont care if they are actually "online" r not

#

not easily, why?

ocean hollow
#

eight directions

#

"+" is player aim

pseudo hazel
#

why do you need this

ocean hollow
#

necessary)

pseudo hazel
#

for what

#

the best you can probably do is get their look direction and compare that to some previous one you saved

orchid brook
tardy delta
true perch
tardy delta
#

code style

true perch
#

Cool cool

tardy delta
#

you should write methods that interact with your collection instead of exposing it to the outside world and let them do whatever they want with it

true perch
#

Forgot to make this one private or rather didn't think it'd make a difference

#

it's changed now 😄

tardy delta
#

uhh probably want some manager class for that collection, thinking about scalability

#

but ye not too bad to do it with di

slim wigeon
#

What is the vaild ConversationContext types? I trying to use only number for this shop I making

pseudo hazel
#

wdym the valid conversationcontext types?

slim wigeon
#

I was thinking NumericPrompt, don't know how to use it. Looking at the docs as we speak

pseudo hazel
#

well I never used the conversation stuff since I didnt know it existed

#

but numeric prompt sounds like the thing you want to use

slim wigeon
#

You right, its something I want to use, still looking at it

restive mango
#

UGH

#

Still getting this damn error despite entirely deleting my .m2, running BuildTools 1.18.2, and cutting everything else out from the plugin:

#
[13:37:43 ERROR]: Error occurred while enabling untitled123233 v1.0-SNAPSHOT (Is it up to date?)
java.lang.NoSuchMethodError: 'net.minecraft.world.level.block.state.BlockState net.minecraft.world.level.block.Block.stateById(int)'
    at org.example23132.untitled123233.Untitled123233.onEnable(Untitled123233.java:12) ~[testingaesopian.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:541) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:560) ~[paper-1.18.2.jar:git-Paper-388]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:665) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:432) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:316) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1164) ~[paper-1.18.2.jar:git-Paper-388]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.2.jar:git-Paper-388]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
#

Here's the plugin's only class:

#
public final class Untitled123233 extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        Bukkit.getConsoleSender().sendMessage("Initializing.");
        net.minecraft.world.level.block.Block.stateById(5);

    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}
slim wigeon
restive mango
kind hatch
#

java.lang.NoSuchMethodError means that specific method doesn't exist in on the server you are using.

#

Also

#

?paste your text walls

undone axleBOT
restive mango
#

@kind hatch I mean, that method SHOULD exist, however, that's the issue.

kind hatch
#

Well, there's a few things you could try.

  1. Use the latest version of the maven-shade-plugin (3.4.1)
  2. Remove the paper-api dependency as it could be interfering.
  3. Remove the configuration goal to createDependencyReducedPom as false is already the default.
restive mango
#

Made all those changes, the error remains.

#

Do I need to run the manual commands somewhere?

#

At the bottom of the Spigot forum post; these ->

#

java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.11.0/SpecialSource-1.11.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.18-R0.1-SNAPSHOT/spigot-1.18-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.18-R0.1-SNAPSHOT/minecraft-server-1.18-R0.1-SNAPSHOT-maps-mojang.txt --reverse
java -cp $HOME/.m2/repository/net/md-5/SpecialSource/1.11.0/SpecialSource-1.11.0-shaded.jar:$HOME/.m2/repository/org/spigotmc/spigot/1.18-R0.1-SNAPSHOT/spigot-1.18-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.18-R0.1-SNAPSHOT/minecraft-server-1.18-R0.1-SNAPSHOT-maps-spigot.csrg

kind hatch
#

You shouldn't have to. How are you compiling it currently?

restive mango
#

I go to the top of Intellij, click build => build project

kind hatch
#

Well there's your mistake.

#

You have to use the maven tab.

#

It's on the right side. You select your module, go to lifecycle and then double click package

#

Or if you have default goals setup, you can just click that run button

restive mango
#

ah, for the last three years i've only ever used build project lol

kind hatch
#

Yeaa, it seems to be a common mistake. I think it's just due to poor teaching as most tutorials still do everything the old way instead of teaching how to use a dependency management tool.

restive mango
#

Quick question, which of these are my actual plugin, though?

original-untitled123233-1.0-SNAPSHOT
untitled123233-1.0-SNAPSHOT
untitled123233-1.0-SNAPSHOT-remapped
untitled123233-1.0-SNAPSHOT-remapped-obf

kind hatch
#

The 2nd one

river oracle
#

One without a -

restive mango
#

kk

#

ty

river oracle
kind hatch
#

He listed 4, the first one started with original-

river oracle
#

Oh I thought that was the folder name lol

restive mango
#

FINALLY

#

GOD DAMN

#

[13:57:38 INFO]: Preparing start region for dimension minecraft:the_nether
[13:57:38 INFO]: Time elapsed: 40 ms
[13:57:38 INFO]: Preparing start region for dimension minecraft:the_end
[13:57:38 INFO]: Time elapsed: 38 ms
[13:57:38 INFO]: Enabling untitled123233 v1.0-SNAPSHOT
[13:57:38 INFO]: Initializing.
[13:57:38 INFO]: Running delayed init tasks
[13:57:38 INFO]: Done (2.224s)! For help, type "help"
[13:57:38 INFO]: Timings Reset

#

No error

#

sweet

#

thanks

#

is there some way i can upvote you for helping

kind hatch
#

Probably not on discord. Maybe on the forums, but I hardly use those anymore. I'm just a lurker there now. :3

remote swallow
#

i wonder if md would add another bot to cafebabe that aded reputation

young knoll
#

+rep helped me with codez

remote swallow
#

yeayh

young knoll
#

-rep mean and smelly :c

remote swallow
#

the -rep would be a w eird one

#

bc you could just get all ur friends to -rep someone bc you dont like them

kind hatch
#

Yea, rep systems are easily abused. I think that's part of the reason why there are no negative emotes on the forums.

#

Although that doesn't stop people from using them sarcastically.

#

Like the optimism one.

restive mango
#

thank you for ruining my life 🙂

#

etc

remote swallow
#

it would prob end up at +rep with either a 5 min global delay per person, or a 5 min delay for 1 person to rep that person again

vast raven
#

Does BlockExplodeEvent | EntityExplodeEvent get fired from a .createExplosion() method in World interface?

#

my plugin somehow stopped working from this morning xd

chrome beacon
#

But try it and see

vast raven
#

and yesterday it was working somehow

#

same loaded plugin

chrome beacon
#

TNT should fire EntityExplodeEvent

vast raven
chrome beacon
#

No TNT becomes an entity before it explodes

vast raven
#

Yeah I know that, but I never used EntityExplode since Block works fine

#

idk at this point

chrome beacon
#

You should be using both

vast raven
#

Actually I do

#

I tried debbuging to figure it out and none of them gets fired

#

I even tried listening TNTPrimeEvent in paper starting from 1.14

ocean hollow
#

i am using playerMoveEvent for that

young knoll
#

createExplosion should fire the block explode event

vast raven
ocean hollow
pseudo hazel
#

why does it not work correctly

exotic zinc
#

I understand what you mean now. IntelliJ is so bad. I can not set my jdk to the wsl one because everytime I select it intelliJ freezes. I hate it.

ocean hollow
#

so I need help with that

chrome beacon
exotic zinc
#

wym

#

with gateway?

chrome beacon
#

You can run it from CLI

pseudo hazel
exotic zinc
chrome beacon
#

WSL has graphic support

#

It can open windows

ocean hollow
kind hatch
#

Why are you trying to run intellij from 1) the command line and 2) through WSL?

chrome beacon
#

So they can use their WSL JDK

kind hatch
#

Huh?

#

Why don't they have it installed locally?

ocean hollow
exotic zinc
exotic zinc
#

whats the command?

kind hatch
exotic zinc
#

....

kind hatch
#

I don't have full context here.

chrome beacon
#

Personally I would just not use the JDK from WSL

kind hatch
#

I just saw WSL and started asking questions.

exotic zinc
kind hatch
#

Maven can use your local one.

chrome beacon
#

Just don't run maven from WSL then

#

If you like bash you can always install git bash

exotic zinc
#

if I open a wsl project i need to use the wsl maven?

#

or not

kind hatch
#

You can configure it to whatever you want. I'd recommend you switch it to local though.

chrome beacon
#

There's overhead when communicating between Windows and WSL

kind hatch
#

^

chrome beacon
#

It's much slower

#

So stay inside WSL or Windows

exotic zinc
#

dang

#

you wont understand

remote swallow
#

?xy be like

undone axleBOT
kind hatch
#

Can't you transfer files from WSL to your main OS?

chrome beacon
#

You can

kind hatch
#

Or is that not a thing?

exotic zinc
#

lol

kind hatch
#

Yea, so I don't see the issue here.

#

If you transfer your project files to Windows, and run everything locally, there shouldn't be that big a deal.

exotic zinc
#

patches are applied faster on linux. Thats why i have to use wsl. Its recommended to have the project on wsl. Why do you just not accept that I would love to use my local stuff but I have to use wsl in order for it to work properly.

remote swallow
#

and you cant just run the apply patches on linux but have ij open on windows because?

kind hatch
remote swallow
#

just have the entire project on windows and just run the apply patches in that dir from wsl