#help-development

1 messages · Page 1841 of 1

last ledge
#

but I want the item to be End portal Frame only, what do i write

indigo sage
#

Please wait a moment

#

What's your 24th line?

last ledge
#

ItemStack spawner = new ItemStack(Material.ENDER_PORTAL_FRAME, 1);

#

If I use any other item, then It runs

indigo sage
#

Remove 1 and the comma

last ledge
#

tried doing, still same

indigo sage
#

Also import the Material class

last ledge
#

import org.bukkit.Material;

#

already imported

indigo sage
#

Material.ENDER_PORTAL_FRAME should work

desert loom
#

ENDER_PORTAL_FRAME doesn't seem to exist in the material enum

last ledge
#

nop

desert loom
#

it's probably END_PORTAL_FRAME

last ledge
#

doesnt work

indigo sage
#

END_PORTAL_FRAME should work ENDER_PORTAL_FRAME is legacy now

#

If it doesn't work please try the forums so see if they can help

last ledge
#

both doesnt work

crimson terrace
young knoll
#

Make sure your API version is set

last ledge
#
                ItemStack spawner = new ItemStack(Material.STONE, 1);
                ItemMeta spawner_Meta = spawner.getItemMeta();
                spawner_Meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&e&lDragon Spawner"));
                ArrayList<String> spawner_Lore = new ArrayList<>();
                spawner_Lore.add(ChatColor.translateAlternateColorCodes('&', "&a&L| &7Test"));
                spawner_Lore.add(ChatColor.translateAlternateColorCodes('&', "&a&L| &7Test2"));
                spawner_Meta.setLore(spawner_Lore);
                spawner.setItemMeta(spawner_Meta);
                Bukkit.getPlayer(args[0]).getInventory().addItem(spawner);
            }```
#
    @EventHandler
    public void onPlace(BlockPlaceEvent event){
        if(event.getBlock().hasMetadata("spawner_Meta")){
            Location loc = event.getBlock().getLocation().add(0, 50, 0);
            Entity dragon = event.getBlock().getLocation().getWorld().spawnEntity(loc, EntityType.ENDER_DRAGON);
        }```
#

Idk why Dragon doesn't spawn

candid galleon
#

i'd make sure the if statement is true

last ledge
#

which means that event is not working

#

ig its cause of Meta Data

#

idk what to do

candid galleon
#

well a newly placed block won't have any metadata afaik

last ledge
#

so how do I add meta data to my itemstack block

split lichen
#

Is there a way to reduce the duration of a particle effect when spawned? I'm working on a rotating cube effect, and the math's fine, but the particles last longer than the time it takes to spawn the next particle effect in each loop, resulting in the particles overlapping and distorting the cube

sullen marlin
#

Unlikely

split lichen
#

I've managed to find a workaround by using the electric spark particle

quaint mantle
split lichen
#

I've also tried lowering the speed at which the particles spawn, but that results in a really slow rotating cube

quaint mantle
#

i can never do that

#

dies

tardy delta
#

Me who dies with simple math 😳

tardy delta
sacred prairie
#

guys, how can i check if the player right clicked in an PlayerInteractEvent

indigo sage
#

if( event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR ) {

#

}

sacred prairie
#

love ya

indigo sage
#

A quick google search can never hurt

sacred prairie
#

ye, i googled and it dint worked sooo ye

hybrid spoke
#

or check if the name of the action starts with RIGHT

sacred prairie
#

true

tardy delta
#

That's like checking inv name

#

🥶

hybrid spoke
#

nope

tardy delta
#

Ya right but i would never check an enum constant on name

sacred prairie
#

i used at first if( event.getAction() != Action.RIGHT_CLICK_BLOCK || event.getAction() != Action.RIGHT_CLICK_AIR) return; but this dint worked well

#

idk why

hybrid spoke
sacred prairie
#

ye then it return;

tardy delta
#

Idk that's just me

hybrid spoke
#

otherwise it will always be true since it can just be one action

sacred prairie
#

oh ok

#

ye true i defenetly missed that

worldly steppe
#

Hello, please help me #general

last ledge
#

?paste

undone axleBOT
last ledge
#

Tried to find solution in forums too, but didnt find

#

if ENDER_PORTAL_FRAME isn't working, then what to use

indigo sage
#

What version are you developing in?

last ledge
#

but I want it to work for 1.15+

indigo sage
#

Then you END_PORTAL_FRAME

#

you use*

last ledge
#

doesnt work

indigo sage
#

or you have bad pom.xml

last ledge
#

END_PORTAL_FRAME

indigo sage
#

Screenshot?

last ledge
#

cant send here

indigo sage
#

Send in #general

#

Also upload your pom.xml to ?paste

#

?paste

undone axleBOT
indigo sage
#

Why is your version in pom.xml 1.12.2?

#

At least make it 1.14 or 1.13

last ledge
#

<version>1.12.2-R0.1-SNAPSHOT</version>

#

here?

indigo sage
#

Yep change that to a 1.13 or 1.14 version

#

or better yet 1.15

last ledge
#

??

indigo sage
#

Wait let me check

#

yep

last ledge
#

it is in red

indigo sage
#

you have to reload maven first

#

there should be an icon if you are using intellij on the medium right

last ledge
#

ye done

indigo sage
#

now it should work

worldly steppe
#

What I do for remove minecraft invulnerability on 1.8.8?

#

On spigot and paper

indigo sage
#

On spigot install spigot again

#

Paper idk

worldly steppe
#

I install spigot 2 days before

#

Maybe it is parched?

indigo sage
#

It should be fine then. As long as you installed from Buildtools

worldly steppe
#

I install spigot from

#

Get bukkit

indigo sage
#

THEN INSTALL from BUILDTOOLS!

#

very unsafe

#

sorry for caps!

worldly steppe
#

Ok

#

If I install now frob build tools the same version

#

I don't lose config of plugins no?

indigo sage
#

No you don't

worldly steppe
#

Ok

#

Send me link pls

#

I found this

#

But it isn't

indigo sage
#

The one you showed above is right

#

showed*

worldly steppe
#

But there is not for install

indigo sage
#

Read the entire damn thing

#

then you follow the instructions

naive jolt
#

Hi

#

is it possible to convert

#

Denzin code to Spigot?

quaint mantle
#

denizen?

#

to spigot?

#

what do you mean?

#

you can just rewrite everything to java by using the concept

naive jolt
#

Ah thought

#

it would be possible to just use the code

#

Denzin is a spigot plugin

#

so for it to execute the code it has to convert it

quaint mantle
#

oh yes

#

but then you have to see their plugin

#

source

eternal oxide
#

What do you mean? If Denzin is already a spigot plugin, what are you asking?

quaint mantle
#

are you talking about converting code from deni to java?

#

just to make sure i understand you

eternal oxide
#

also are you talking about Denizen or Denzin?

quaint mantle
#

wait

#

what is denzin?

#

idk denzin

eternal oxide
#

no idea, thats what he wrote

candid galleon
#

it's like Skript

eternal oxide
#

ah, so he's talking about converting those skripts into a plugin

#

Your first reply is accurate then.

cold field
#

Guys, I've a problem. I was looking into the sources of spigot and I've seen that the CommandListenerWrapper has been moved into the net.minecraft.commands package. I've a lib that access a method of that class via reflection. My question is: I want to get rid of the reflection and call the method normally (Importing the package) the problem is that gradle tells me that I can't build my project because the class that I've imported (CommandListenerWrapper) is from a new version of java so I should use another JDK to compile the project. I can't use another JDK because that would break the lib that is used on pre 1.17 plugin

#

(P.S. I've a factory pattern that doesn't load the class where I've imported CommandListenerWrapper if the version isn't 1.17 or up)

eternal oxide
#

net.minecraft.commands is not Spigot

#

Spigot is the Spigot/Bukkit API on top of nms. net.minecraft.commands is nms.

cold field
#

I was looking into craftBukkit pardon

eternal oxide
#

CB is teh Bukkit implementation, its still not net.minecraft

#

Everything you are refering to is NMS, not a part of spigot.

#

However, Minecraft now requires Java 17. So any plugin you write for 1.17+ will require an up to date Java

quaint mantle
#

or use 1.16.5

cold field
eternal oxide
#

Spigot 1.17+ also no longer includes any Mappings.

cold field
#

and use the shadow plugin

eternal oxide
#

I don;t use Gradle, but it would be fine, so long as you have somethign to remap to Mojang NMS mappings

summer scroll
#

What would be the best design for a custom item that holds multiple information such as upgrades, levelling system, etc and the data must persist.
I have 2 idea that I would consider use

  • Throw everything into a NBT data and access the data directly there.
  • Put an unique identifier such as UUID to the item and then create an object that hold all of data on the fishing rod and have the same unique identifier as the fishing rod and then to save/load the data on a flatfile
cold field
#

Thanks for the infos

eternal oxide
#

data in NBT is safer

#

?pdc

summer scroll
#

Okay, let's make an example, I want to store level, xp, and max xp, does that mean I need 3 NamespacedKey?

eternal oxide
#

That or create yoru own storage object to put in the PDC

summer scroll
#

Oh, you can put object there?

eternal oxide
#

the PDC javadoc has an example of storing a UUID object

cold field
summer scroll
#

Ah, I could also put a Gson as a String on the PDC too.

eternal oxide
#

it will include Mojang mappings

summer scroll
eternal oxide
#

no point in using Gson if you are storing in the PDC

summer scroll
#

hmm

#

I mean by storing it on the PDC, I don't need to handle saving/loading

#

And it's easier to handle, no?

lapis heath
#

is it possible to attach a particle effect to an entity?

#

i.e. spawn a zombie with constant red particles

#

like how potion effects work, but without any effects

#

from what I can see there's a deprecated method about color in the potioneffect class

burnt current
#

yes

remote gazelle
#

is there any way to remove chunk?

indigo sage
remote gazelle
#

no

#

removing chunk on live world

#

bump

remote gazelle
#

all of that just saying regenerating chunk

quaint mantle
#

Pretty sure they're talking about deleting it then regenerating it

#

meaning you can just keep it deleted or generate an empty one after that

remote gazelle
#

no they are saying that just setting blocks to air and regen it when loaded

quaint mantle
#

well idk

tardy delta
#

this doesnt makes sense

[14:24:09] [Server thread/WARN]: [MagmaBuildNetwork] Loaded class com.zaxxer.hikari.HikariDataSource from GemsEconomy v4.9.2 which is not a depend, softdepend or loadbefore of this plugin.
#

i'm not even using that dependency

#

and since when am i using hikaricp from that plugin??

young knoll
#

If you are, make sure to relocate

tardy delta
#

wdym relocate?

tender shard
#

When not setting "shadedPattern" inside a relocation section of maven, it relocates it to "hidden.<original.package.name>". I only found out about this from maven's source code. It's NOWHERE in the docs. Am I stupid, or is maven stupid? Shouldn't it print a warning instead?

#

Or at least it should be in the documentation

tardy delta
#

i'm not shading anything or what are you talking about

tender shard
#

I am not talking about your problem, this is my own question

tardy delta
#

i just saw the maven thing

#

oh

#

mwoa

tender shard
#

or maybe you access another plugins class which in turn imports that class?

#

what happens when you uninstall GemsEconomy and see where the error is thrown? 😛

modern fox
#

Why doesn't IChatBaseComponent exist for me?

#

1.8.8

tender shard
#

did you import spigot as dependency?

modern fox
#

yea

#

Everything else works

tender shard
#

are you using maven?

#

or gradle?

modern fox
#

Yes

#

Maven

tender shard
#

show your pom.xml pls

#

?paste

undone axleBOT
modern fox
tender shard
#

ok easy 🙂

modern fox
#

I need bukkit

tender shard
#

you are NOT adding spigot as dependency

modern fox
#

Wait

tender shard
#

you only added spigot-api

#

spigot-api = only the API

#

spigot = API + also all the NMS & craftbukkit classes

modern fox
#

Oh bruh

#

Thank you

tender shard
#

np

#

if it cannot find spigot: you must run BuildTools first for your exact version

modern fox
#

I got it. Thank you

tender shard
#

np

hollow cliff
#

commissioning developers, dm me

tardy delta
#

i added it to my pom

tender shard
tender shard
#

there's a reason why it's mostly 20 lines long 😛

tardy delta
#

its just.. constructor

tender shard
tardy delta
#

yessir..

late sonnet
#

and you check the JAR with the hikari added?

tender shard
late sonnet
tender shard
tardy delta
#

wdym not using? i'm not using that gemseconomy depdendency

#

not hikari

tender shard
#

oooh

late sonnet
#

XD

tender shard
#

then you didnt shade hikari

tardy delta
#

i didnt shade anything

tender shard
#

that's your problem

#

you MUST shade and relocate dependencies that you need

tardy delta
#

i just added it to my pom as in the github page

late sonnet
#

strange need relocate hikary

tender shard
#

yeah but you must also shade and relocate it

#

well

#

you MUST not relocate it but then you get weird problems when two plugins use it without relocating

#

AT LEAST you have to shade it

#

<scope>compile</scope>

tardy delta
#

ok i'll try that

summer scroll
#

it doesn't show you how to on the github page, but you must shade it

tender shard
#

well actually "compile" is the default scope

#

don't you have any maven-shade-plugin declared in your pom?

#

maybe just show your full pom

tardy delta
tender shard
#

yeah but you still don'T shade it

#

one sec

tardy delta
#

what does shading even do?

young knoll
#

Add the dependencies classes to your jar

tender shard
#

it adds hikari to your .jar

#

(ignore all the <relocations>)

tardy delta
young knoll
#

A normal dependency has to be present at runtime

tardy delta
#

and this one?

young knoll
#

Isn’t present at runtime

#

So you have to shade it

tardy delta
#

:/

#

where is it then?

summer scroll
#

so the classes will present on your compiled jar

tender shard
young knoll
#

On maven

tardy delta
#

so it didnt download to my jar when i added the dependency?

tender shard
#

obviously you also didn't "download" spigot "to your jar"

#

because it's expected to be there at runtime

#

Your pom should look like this:

young knoll
#

Well it did, it’s probably in your maven local cache

#

But that’s not the server

tender shard
#

Yeah ik the intendetaion is messed up, just copy paste it, reformat it and adjust the YOUR.PACKAGE part

tardy delta
#

cringe

tender shard
young knoll
#

If someone else ran your plugin where would you expect the dependency to come from for them

tender shard
#

Adding dependency to maven = you can compile it but it will fail if it's not there at runtime

#

Spigot is there at runtime, so you must not shade that

#

Hikari isn't, so you must shade that

tardy delta
#

also why isnt it there at runtime? 👀

tender shard
#

...

#

because you didnt shade it

summer scroll
tardy delta
#

ah

modern fox
#

I added a java api to my plugin and when I use it ingame it just says it cannot find the classes

tender shard
tender shard
#

you only have to replace YOUR.PACKAGE with your package name

summer scroll
#

relocate is to put where should the classes that you're shading in located

tender shard
#

yeah imagine three plugins use hikari without relocating. they would all get messages "WARN: You loaded a class from another plugin". And you get problems if two plugins actually expect different versions of the library

#

so ALWAYS relocate

summer scroll
#

yup, only things that you don't want to happen if you do not relocate it

tardy delta
#

liek this?

#

that shadedpattern things looks wrong

modern fox
#

?paste

undone axleBOT
modern fox
#

ERror

modern fox
summer scroll
tardy delta
#

Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project MagmaBuildNetwork: Error creating shaded jar: null

modern fox
#

Idk what shading the libs mean

summer scroll
modern fox
summer scroll
modern fox
#

how?

summer scroll
tardy delta
#

this looks weird
<shadedPattern>io.github.FourteenBrush.MagmaBuildNetwork.com.zaxxer.hikari</shadedPattern>

summer scroll
#

maybe

#

package name should all be in lowercase tho

#

i mean it's not gonna help your problem there but yeah

tardy delta
#

no

modern fox
summer scroll
tardy delta
#

there are uppercase characters in my package name and refactoring doesnt work

modern fox
tender shard
tardy delta
#

well it says this
Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project MagmaBuildNetwork: Error creating shaded jar: null

tardy delta
#

and where can i find that?

tender shard
#

bottom left, click the uppermost part

#

the one I selected

#

then copy paste the full log from the bottom window

tardy delta
#

?paste

undone axleBOT
tardy delta
tender shard
#

hm tbh no idea

#

might have sth to do with this:
[WARNING] Discovered module-info.class. Shading will break its strong encapsulation.

#

sorry gotta go in a few minutes

tardy delta
#

without the relocation it works tho

#

np

tender shard
#

yeah you can just ignore relocating for now but you should get it fixed sometime

#

as said relocating is not required, but don't doing it might result in strange stuff later on 😄

#

just remove the 4 lines of <relocation>

tardy delta
#

now fixing that stupid mysql driver

#

does mysql work with db files?

tender shard
#

no, that's sqlite

tardy delta
#

smh i used sqlite before

#

so for mysql i need a connection string like jdbc:mysql://localhost:3306/databasename

tender shard
#

in general, yes

tardy delta
#

i'm trying to find out where i can get the db from :/

tender shard
#

what do you mean?

#

the database is called however you name it

tardy delta
#

well idk where i can find that database

tender shard
#

did you actually create any database yet?

tardy delta
#

like normally in sqlite you connecto to the db file in the plugins folder

tender shard
#

run mysql and enter SHOW DATABASES

#

it gives a list of all existing DBs on your mysql server

tardy delta
#

it gives me a list of databases used for school

tender shard
#

that's all dbs you have

ancient plank
#

Jeff

tender shard
#

yes

tardy delta
#

so i cant start a database from the plugin but the user needs to run that database or something?

native gale
#

EventPriority.LOWEST means that the even will be called in the end, right?

tender shard
#

Jeff Media GbR :3

native gale
#

Or is it opposite

tardy delta
#

no

#

first

native gale
#

I forgot

tender shard
#

HIGHEST = second last, MONITOR = last

tardy delta
#

HIGHEST will decide the final outcome so its ran last

#

monitor shouldnt cancel anything too

tender shard
#

true but it runs last anyway

tardy delta
#

yea

native gale
#

Okay, thank you

tender shard
#

you just have to remember:

#

HIGHEST has the last word

tardy delta
#

hmm

tender shard
#

so it runs LAST, so it can override other stuff

tender shard
tardy delta
#

🤡

tender shard
#

I used to have a library called Daddy

#

so I could do if(Daddy.allows("whatever"))

tardy delta
#

smh

tender shard
#

but I replaced it with Stepsister lol

tardy delta
#

if Stepsister.allow() oh god

tender shard
#

the one verifying the verification codes for my discord / plugin verification is called Discord-DaddyStepSister-Verifier lmao

visual tide
#

"raucherwerden"?

#

😐

tender shard
tardy delta
#

lol

tender shard
#

it's about why you should smoke

visual tide
#

its

#

satire

#

right

worldly ingot
ancient plank
#

Lol

tender shard
tender shard
worldly ingot
#

Like a lot

ancient plank
#

I love it

#

Good meme

tender shard
#

yeah as said meanwhile it's called Stepsister 😄

#

because

#

there was a bug in Daddy that make it go into an endless loop

tender shard
#

so it was stuck

#

and we all know who tends to get stuck in weird situations

#

the stepsis

ancient plank
#

Stepbro im stuck

tender shard
#

yeah haha

tardy delta
#

😳

#

can i get any help now or are we talking abt stepsis?

tender shard
#

what's your question?

#

create a new DB and use that name

summer scroll
#

use xampp, much more easier

tardy delta
#

so if the user hasnt created a db the plugin cant make one itself?

tender shard
#

well

#

just make the db name configurable

#

like all plugins do

visual tide
#

HAHAHA
"Schwangere Raucher unterstützen örtliche Kioske und fördern den Ausbau von Sonderschulen"
that is-
i mean yes but

tender shard
#

have a config like this

mysql:
  host: localhost
  port: 3306
  db: databasename
  user: username
  password: password
tardy delta
#

yes i have that

tender shard
visual tide
#

actually?

tardy delta
#

lmao

tender shard
tender shard
#

they asked whether I'm doing organ trafficking

visual tide
#

😐

summer scroll
tender shard
#

unless your users are so stupid to use the mysql root account

tardy delta
#

i was confused normally i use sqlite

#

which uses a file

tender shard
#

yeah MySQL is a server, imagine it like your local PC

summer scroll
#

database is the file

tender shard
#

You have an admin, only that one can create new users and databases

#

so the admin creates a new db "minecraft" with a user "minecraft" and now "minecraft" can access the "minecraft" db 😄

tardy delta
#

but does the user have to enable the database or something or can it be done by code when its already created?

tender shard
#

the admin HAS to create the database manually

#

the admin also HAS to create a user and give it permissions to the database

#

e.g. here's my tiny script to create a DB plus user:

summer scroll
#

however, i saw it where you can automatically create the database

tender shard
#
#!/bin/bash

read -p "Name: " NAME
read -p "User: " USER
read -p "PW: " PASSWORD

mysql <<EOF
CREATE DATABASE $NAME;
CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASSWORD';
GRANT ALL PRIVILEGES ON ${NAME}. * TO '$USER'@'localhost';
EOF
tardy delta
#

i think i already have an user

summer scroll
#

and use that database that just created

tender shard
tender shard
#

just imagine some plugins does bad things, it could then corrupt all other DBs

#

you don't want that

#

you want to have one (or many) DBs for your MC server, and one separate user for those DBs

tardy delta
#

uhm and how do i do that?

#

somewhere in the settings?

tender shard
#

I just sent you a tiny script to create a DB + a user with write access to it

tender shard
#

basically everything above MySQL 5.6 IIRC

tardy delta
#

which code is it?

#

shell?

tender shard
#

yeah you can also just run only the mysql commands directly inside of mysql

tardy delta
#

oh right

tender shard
#
CREATE DATABASE $NAME;
CREATE USER '$USER'@'localhost' IDENTIFIED BY '$PASSWORD';
GRANT ALL PRIVILEGES ON ${NAME}. * TO '$USER'@'localhost';
#

of course yo uhave to replace $USER, $PASSWORD and ${NAME}

hollow cliff
#

looking for plugin developers PAID dm me

tardy delta
#

?services

undone axleBOT
hollow cliff
#

oh thx

tardy delta
#

how should i call my user? 🤡

young shell
#

I currently get a ```txt
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml

#

How do I fix that

quiet ice
#

Are you sure it is in src/main/resources?

#

And are you sure that there are no spelling mistakes (perhaps you called it plugins.yml or something like that instead)

young shell
#

Looks correct to me

quiet ice
#

That makes it more complicated. Could you show me the lines around the stacktrace (including the full stacktrace)?

young shell
#
[16:19:23 ERROR]: Could not load 'plugins/hubcore-1.0-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[spigot.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot.jar:git-Spigot-c3c767f-33d5de3]
    at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.java:291) [spigot.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.java:152) [spigot.jar:git-Spigot-c3c767f-33d5de3]
    at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:505) [spigot.jar:git-Spigot-c3c767f-33d5de3]
    at java.base/java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    ... 6 more```
#

Thats the full Error

worldly ingot
#

Better yet, how are you compiling? Ideally with Maven, yeah?

#

Some just use the artifacts feature in IntelliJ and circumvent Maven entirely

young shell
#

I'm doing a clean package

worldly ingot
#

Ehm, in which case... refresh your Maven project? I'm all out of ideas heh

young shell
#

Thats the pom.xml

#

Oh I'm so dumb

tardy delta
#

👀

young shell
#

I think i just found the error

#

Yeah, for some reason it was defined as an exclude

quiet ice
#

bruh why did you filter out the plugin.yml

young shell
#

I didn't thats the thing

#

Time for git blame

open lily
#

<exclude>plugin.yml</exclude>

#

remove it

young shell
#

Yeah already found it

#

Saw it when pasting it into the pastebin

quiet ice
#

Also, the system scope might be dangerous

young shell
#

I only have that because I have a modified Version of the artifact that I haven't pushed to a repo yet

quiet ice
#

Then you might want to use mavenLocal instead

young shell
#

so <scope>mavenLocal</scope>?

quiet ice
#

No, just publish your artifact to maven local (by default this is done via mvn install or ./gradlew publishToMavenLocal) and you have it availiable like a regular dependency

young shell
#

true

tardy delta
#

it says operation CREATE USER failed for 'user'@'localhost'

quaint mantle
#

enderman.setTarget(player);

Shouldn't that make an enderman attack a player?

tardy delta
#

isnt that just the entity the enderman is looking at?

pliant tundra
#
private fun minerHelmetRecipe(): ShapedRecipe {
        val item = ItemStack(Material.IRON_HELMET)
        // itemmeta is only null when it is air
        item.itemMeta!!.setDisplayName("${ChatColor.DARK_AQUA}Miner's Helmet")
        val key = NamespacedKey(Main.instance, "miner_helmet")
        val recipe = ShapedRecipe(key, item)
        recipe.shape("DID", "D D")

        recipe.setIngredient('D', Material.COBBLED_DEEPSLATE)
        recipe.setIngredient('I', Material.IRON_BLOCK)

        return recipe
    }

i have this recipe that results in a custom helmet (i havnt added much cusotm stuff yet but thats not important), but when i craft it, it results in a regular iron helmet, anyone know why?

young knoll
#

Do you call setItemMeta

#

I’m not familiar with Kotlin syntax

quaint mantle
young knoll
#

That should set their attack target

#

Maybe it doesn’t work because they aren’t angry, idk

#

I didn’t see a method to make them angry

tardy delta
#

entity.makeAngry

#

jk

pliant tundra
quaint mantle
pliant tundra
#

how can i add a dig (mining) speed attribute to an armor piece
i dont see it in the Attribute enum

young knoll
#

There isn’t one

pliant tundra
#

rip

#

is there a way i can give haste

#

should i use an inventory event to do that

tardy delta
#

player.addPotionEffect

young knoll
#

You can give haste when they hold the item

#

PlayerItemHeldEvent? I think

pliant tundra
#

alright ty setItemMeta works

#

but intelllij is yelling at me to use the property access lmao

trim surge
#
Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException: Creating directories for C:\Program Files\BuildTools\Bukkit\.git failed
#

Anyone had this issue with BuildTools?

#
Starting clone of https://hub.spigotmc.org/stash/scm/spigot/bukkit.git to Bukkit
Exception in thread "main" org.eclipse.jgit.api.errors.JGitInternalException: Creating directories for C:\Program Files\BuildTools\Bukkit\.git failed
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:106)
        at org.eclipse.jgit.api.CloneCommand.init(CloneCommand.java:275)
        at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:173)
        at org.spigotmc.builder.Builder.clone(Builder.java:1042)
        at org.spigotmc.builder.Builder.main(Builder.java:266)
        at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Caused by: java.io.IOException: Creating directories for C:\Program Files\BuildTools\Bukkit\.git failed
        at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412)
        at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:230)
        at org.eclipse.jgit.api.InitCommand.call(InitCommand.java:103)
        ... 5 more
#

Full Error

quaint mantle
#
Enderman enderman = (Enderman) e.getEntity();
if (e.getDamager() instanceof LivingEntity) {
    System.out.println("Living");
    enderman.setTarget((LivingEntity) e.getDamager());

    System.out.println(enderman.getTarget());

    List<Enderman> endermen = enderman.getNearbyEntities(32, 32, 32).stream().filter(entity -> entity instanceof Enderman).map(entity -> (Enderman) enderman).collect(Collectors.toList());
    for (Enderman men : endermen) {
        men.setTarget((LivingEntity) e.getDamager());
        System.out.println(men.getTarget());
    }

}

getTarget does return the correct player and stuff, but the endermen don't attack...

#

setTarget(null) also does not prevent the enderman from attacking

gusty gorge
#

Does the ItemFrame call the EntityDeathEvent on destruction?

tardy delta
#

why am i getting it twice?

modern fox
#
    @EventHandler
    public void onChat(AsyncPlayerChatEvent e) {
        Player player = e.getPlayer();

        for(String message : WordFilter.getWords()) {
            if(e.getMessage().toLowerCase().contains(message.toLowerCase())) {
                e.getRecipients().clear();
                for(Player plr : WordFilter.getInstance().curseList) {
                    e.getRecipients().add(plr);
                }
                e.setMessage(e.getMessage().toLowerCase().replace(message.toLowerCase(), getReplacedWord()));
            }
        }
    }
``` I made this and this makes it work that it changes the word and sends to everyone in the curseList but I want it to not change anything to everyone outside the list
#

Any ideas how I would do it

young shell
#
[WARNING] HCurrencyAPI-1.0-SNAPSHOT.jar, hubcore-1.0-SNAPSHOT.jar define 1 overlapping resource: 
[WARNING]   - plugin.yml
[WARNING] maven-shade-plugin has detected that some class files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the class is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
```  How can I fix this. I have access to both artifacts
pliant tundra
#

how can i check if an item is one of my custom items?

tardy delta
#

what defines a custom item in your case?

quaint mantle
#

how to run a async task in bungeecord?

quaint mantle
pliant tundra
#

title as in displayname

torn shuttle
#

you can't do Bukkit#dispatchCommand() from async?

#

what a weird issue, this shouldn't be async

tardy delta
#

just do it sync then

tardy delta
torn shuttle
#

I say it shouldn't be as in I can't see why it would think it's async

#

especially since it's getting run from a sync repeating task

pliant tundra
tardy delta
#

no

#

i think because its shaded

#

?paste

undone axleBOT
tardy delta
#

wait the constructor wasnt on it

trail lintel
#

Yo gamers, I have been working on the PlayerInteractEvent and it has been working just fine. But I notice with vanilla items, if you are hovering over a chest, even if its a "usable" item, opening the chest will take priority when you right click. My custom event handler which operates on PlayerInteractEvent does not seem to follow this logic, and the item handler is fired, rather than the chest being opened. Is this something I need to account for manually? E.g. "If player is currently looking at chest, don't do this logic"?

tardy delta
#

what are you trying, doing custom item stuff when rightclicking?

trail lintel
#

Sorry was afk for a sec. Yup thats exactly right.

tardy delta
#

check for the item in the player's hand and cancel the event depending on if the item is a custom item or not

trail lintel
#

So thats the interesting thing, I am already doing that o.o cancelling the event if it is a custom item

#

perhaps I made a logic mistake

tardy delta
#

?paste your code

undone axleBOT
trail lintel
#

oof, expected cord would handle that better

#

will use paste site

#

Ahhh you know what, looking at it I think I see what I can do

#

If action is RIGHT_CLICK_BLOCK, I can operate on that event logic based on what block was clicked

tardy delta
#

why are you playing an enderchest sound if the player is opening one?

trail lintel
#

to play the ender chest sound, it doesn't play if you open it via command

#

If you are referring to the isEnderChest check, that is my function

#

checking the persistent data on the custom item

tribal lichen
#

Hey everyone, I would love to learn to make plugins on spigot but I don't have the faintest clue to what any of the bukkit libraries are or where I can effectively learn them anyone know a good way to learn? or good places to learn?

#

I already have a decent understanding of java I have been learning that for a few months now already

trail lintel
candid galleon
#

I strongly recommend learning basic stuff first

#

I believe my first plugin ever was related to a jump pad plugin

#

Stuff like that, jump pads, double jumps, kill streaks, etc.

grim ice
#

bro what the fucking shit

#

so some guy ddosed a server

#

and the ddoser or whatever

#

got the IPs

#

of every single player

#

in that server

#

is this possible

proud basin
#

yes

grim ice
#

WHAT

#

how?

tribal lichen
#

yes

proud basin
#

and simple to do

grim ice
#

what teh fuck

#

how

#

did he do that

proud basin
#

Why should I tell you

#

Then your gonna go do it

grim ice
#

Im not

grim ice
tribal lichen
grim ice
#

I wont do it

#

I just wanna know how its done

tribal lichen
# grim ice I wont do it

How can you stop a DDOS attacks on your Minecraft server? Well, in this video, we show you how to do exactly that. Going over every single step of adding DDOS protection to your Minecraft server using TCPShield. From setting up a TCPShield account to putting your Minecraft server behind a domain name to then stopping all DDOS attacks from hittin...

▶ Play video
grim ice
#

if I get someone's IP it won't benefit me anyways? if i do anything with it that's a crime

#

You dont get it

#

im telling u how did the players get their ip known

torn badge
#

The server knows the players‘ IPs

#

So you have access to the server, you have access to the IPs

grim ice
#

Yes but normal players dont have that

#

?

#

Juicy thats not a question about servers

#

its related to development eitherway

tribal lichen
grim ice
#

Sigh

tribal lichen
#

regardless of what you do with it

grim ice
#

do you think I want to go to jail for 10 years

#

??

undone pebble
#

do you think those "small" servers are gonna sue you?

grim ice
#

small?

#

Dd

#

dude

#

having an ip is okay as long as u dont do shit with it

trail lintel
#

What is happening.....

grim ice
#

its how the internet works

undone pebble
#

no shit?

grim ice
#

either help or please dont reply

undone pebble
#

but people aren't the nicest

grim ice
#

Okay listen

#

if you dont wanna help please dont reply

austere sinew
#

My brain hurts watching this

undone pebble
#

don't say dumb stuff then please

grim ice
#

I asked a question

#

if u dont wanna answer it then dont

#

why do u care that much if someone sends a message in the wrong channel

#

jeez lmao

austere sinew
grim ice
austere sinew
#

Sooo use it

tribal lichen
#

Personally If I were @grim ice I wouldn't feel a need to pry so much to get an answer if I only needed to prevent it but if I really wanted to know I'd do my own research and learn how it all works

ivory sleet
grim ice
#

lmao

proud basin
#

2hex open a thread

grim ice
#

Anyone knows how a server players got their IP stolen when the server has not been hacked directly?

#

wait frick

tribal lichen
#

Quick question tho, since when did I need a license for IntelliJ?

ivory sleet
#

IntelliJ ultimate

grim ice
#

thats for ultimate

proud basin
#

ultimate you need one

tribal lichen
#

Is it worth it?

ivory sleet
#

Nope

undone pebble
#

depends

tribal lichen
#

👍

proud basin
#

It’s worth it for me

undone pebble
#

same here ^^

austere sinew
ivory sleet
#

xDparsi basically jetbrains has a better deal and you’ll get all of their premium softwares iirc

torn badge
#

Use setPassenger

ivory sleet
#

Or if you’re a student, claim GitHub student pack

trail lintel
#

vscode baby >:D

proud basin
#

Why doesn’t it work?

elder basin
#

Hello. Who has an idea of ​​how after many seconds an Enderman usually takes a block? (This information is needed to configure my plugin).

proud basin
#

Cast entity?

lavish hemlock
torn badge
#

CraftEntity also has setPassenger

elder basin
#

Thanks!

ivory sleet
#

I believe it just triggers the cooldown once it have taken a block

trail lintel
lavish hemlock
#

IDEA does inspections faster than VSCode on my computers :p

#

the primary difference is startup time but I can wait 5 mins for IDEA to load if I just like it more

ivory sleet
#

I mean thing is IntelliJ has so many good features it’s not even a match for something like vsc

trail lintel
#

theming, extensions, language server support, able to disable features, compile it yourself, strip micrsoft telemetry

#

open source

ivory sleet
#

And?

#

Open source doesn’t help me

#

I don’t code plugins or extensions

trail lintel
#

thats just why I like vscode =] just saying calling it terrible is disingenuous

ivory sleet
#

Yeah

#

Terrible is a misjudgment

lavish hemlock
trail lintel
#

there are two versions, one which is shipped by microsoft, and one which is never touched by the telemetry

#

both are on github as open source products

torn badge
#

Check getBukkitEntity()

lavish hemlock
#

VSCodium isn't legally allowed to interface with Microsoft's marketplace though, therefore you get less options unless you mod VSCodium.

trail lintel
#

that is definitely true, there are workarounds of course 😉

lavish hemlock
#

Problems with Microsoft: #general message

trail lintel
#

but you are right (although I just use microsoft vscode as it doesn't bother me)

lavish hemlock
#

They're notoriously anti-competitive.

#

I don't want to support them in any way but unfortunately I still use a lot of their tools.

indigo drift
#

Hey everyone , i have been trying to duplicate mobs when they die ...I can do this generally but i want to do this only when they are killed by the player , can anyone help me with this

torn badge
#

Yes, ArmorStand is a LivingEntity

tribal lichen
#

Which JDK should I use?

lavish hemlock
#

go with either Temurin or OpenJDK

#

those are the most general options

indigo drift
#

Okk lemme try that

tribal lichen
#

Any significant differences that may affect my choice?

lavish hemlock
#

I'm not sure, haven't looked at the other distros

tribal lichen
#

OpenJDK it is

buoyant viper
tribal lichen
#

:O

buoyant viper
#

id go with oracle openjdk

indigo drift
#

What event should I use then

buoyant viper
#

but ur jdk rly up doesn't matter, i think, java is java

torn badge
#

Show your current code

undone axleBOT
quaint mantle
#

intellij's boss

indigo drift
#

I know I'm supposed to check the killer but I'm not able to figure out how ,

quaint mantle
#

tf is coffeescript

buoyant viper
#

js language iirc

#

hastebin doesnt have the greatest code recognition

#

not for snippets at least

quaint mantle
#

oh coffeescript is just like a preprocessor

ivory sleet
buoyant viper
#

usually

indigo drift
#

Already did that doesn't work

buoyant viper
#

but sometimes itll really drop the ball

torn badge
#

@fervent robin Why are you even using NMS?

wicked lake
#

You'd need to mess with packets, sending if the player has the perm and not sending if not. I can't give you any pointers there, I have not learned any of that quite yet

ivory sleet
buoyant viper
#

i wish it could tell c# apart from java better tho

#

so many times itll mark my java code as .cs so some coloring is wrong

quaint mantle
#

what's the difference between spigot api .jar and the .jar with javadoc in it ? Does it only add the javadoc ?

indigo drift
#

Just a second

buoyant viper
#

but u can change the extension hastebin will color code from so it evens out

torn badge
#

Spawn it using API, then destroy it for specific players with packets

#

@fervent robin PacketPlayOutEntityDestroy

#

getId()

#

Worked?

pliant tundra
#

how do i check when a player's inventory changes

torn badge
#

Show your code

#

It's the same lol

#

np

#

That's why you should avoid it whenever you can

deep tiger
#

Do you guys have ever used resource bundles for your i18n api ?

#

Do we need to load multiple resource bundles when starting the server and use one according to the player's language ?

tender shard
#

why do I always get random pings here lol

tardy delta
#

i said something

tender shard
#

aren't armor stands uncollidable by default? o0

#

I mean they are used for holograms all the time

#

that doesn't have anything to do with collisions though

digital rain
#

hey guys, any idea what would be the best solution to: so i created this chestplate, which when equipped gives you extra maxhealth, but if you equip it and unequip it in quick succession, you can end up having extra hearts even tho the chestplate is no longer equiped

tender shard
#

I don't think you can avoid it tbh

tender shard
#

how do you know they used armorstands?

digital rain
#

this is the class with the event listeners, there is bunch more methods in there, but they are only calculations, or asignEnchant just gives you the extra hearts

digital rain
#

honestly i dont think there is a problem with my plugin, since it all happens at once, its more like spigot not being able to keep up

digital rain
#

like when an item gets into the players invetory?

pliant tundra
digital rain
#

ohh

#

thats a bit more complex

#

you wouldve have to listen for PlayerIntercat, InvetoryClickEvent and PlayerItemBreakEvent

pliant tundra
#

frick

#

what is playerinteract

digital rain
#

when player clicks into the air

#

like for example when openning a map

pliant tundra
#

why do i need that

digital rain
#

bc you can equip armor by right clicking when out of invetory

#

or i mean if you dont wanna do events you can just create cycles that listen to it instead lol, but thats quite ineffective

#

i mean runnables

upper mica
#

Hello, so I have this \/\*(.*?)\*\/ regex, and it selects string parts that are between /* and */. But there is a problem and I don't know how to make it work, right now regex selects like this:
text /comment/ blah blah /another comment/ blah /*unfinished comment
I want to make make regex also select that last /* with all text after that, I don't know how to ask this in goggle lmao

tender shard
#

collisions are about what you "cannot walk through" and not what you will hit when left-/right-clicking though

#

e.g. you can hit flowers but you cannot collide with them

#

but what are you using the sheep / armor stand for?

#

other servers probably just use packets to make other players think you have something mounted on your head instead of using real entities

#

so actually you don't have anything mounted on the servers you mentioned

fervent gate
#

Is it possible to read json files in a specific folder in the plugins folder

#

and access their contents?

fervent gate
tender shard
#

use a json library?

#

e.g. Gson

fervent gate
#

Never heard of that

tender shard
#

or JsonSimple (or SimpleJson? I dont remember how its called)

#

Gson = Google's JSON library

fervent gate
#

Which one would you recommend?

tardy delta
#

gson

tender shard
#

First of all - for what do you need json? 😛

#

Most of the time I recommend to not use json at all unless you have a good reason to do so 😛

grim ice
#

google is so creative

tender shard
grim ice
#

no

#

google naming their json lib Gson

sleek pond
#

Any better names?

tender shard
#

yeah but that's how they call it 😄

grim ice
#

its funny tho

tender shard
#

I mean why not?

grim ice
#

maybe my humour just sux tho

fervent gate
#

Would that be a good use for JSON files or is there a better way to tackle that?

tender shard
#

I'd rather use yaml for that, way easier to edit for admins

#

imho json is just complicated yaml

fervent gate
#

is yaml easier to work with?

tender shard
#

definitely

digital rain
#

for sure

tender shard
#

spigot has yaml support built in and it's way easier for humans to read/edit

digital rain
#

i mean decompilers exist for both so both are easy to read :)

fervent gate
#

That's great, because I will probably need non-coders to create these files

tender shard
#

YAML:

monster1:
  name: jesus
  age: 7
  description:
    - This is my first monster
    - and it's called Jesus.

JSON:

{
  "monster1": {
    "name": "jesus",
    "age": 7,
    "description": [
      "This is my first monster",
      "and it's called Jesus."
    ]
  }
}
fervent gate
#

perfect

digital rain
#

honestly both are tedious to edit without proper tools, since sometimes youll miss that an extra " " and the whole file wouldnt like it

hasty prawn
#

@sullen marlin sorry for the ping, but I resolved that mapping issue from yesterday. You were right about me just missing the jar from the class path (I just used the wrong directory by accident).

With that being said though, I think the separator for the -cp argument is actually a semicolon and not a colon, as you have in the forum post. When using a colon it always gives me Could not find or load main class net.md_5.specialsource.SpecialSource. Using a semicolon it works, so the forum post for the manual commands might be wrong.

#

Appreciate the help also ^^

tender shard
digital rain
#

thats for sure

tender shard
#

only advantage of json is that it doesn't break when messing up the intendation or however it's called 😄

candid galleon
#

they have different use cases

tender shard
#

but on the other side people have to care about all the { and [ and } and ] and " and '

candid galleon
#

JSON is more for storing data

#

YAML is easier for configs

tender shard
#

YAML can easily store data too the same way JSON can

candid galleon
#

and vice versa

tender shard
#

JSON is a tiny bit more efficient but who cares about that. I'd rather have readable configs than a config that loads 0.01 ms faster

candid galleon
#

JSON is also much more globally standardized

waxen plinth
#

🤔

tender shard
#

much more globally standardized? both have their own RFCs so they both are "standardized"

candid galleon
#

you’re right I was talking out of my ass for the last point

#

JSON is much more straightforward to understand

waxen plinth
#

I mean, yaml is more readable though

tender shard
#

actually I think json is much more complicated to understand but that's of course just my opinion 😛

candid galleon
#

YML has config sections and lists and custom objects and arrays and multiple ways of showing the same thing

waxen plinth
#

It's easier to write

#

Well json is much easier to write a parser for

candid galleon
#

YAML is great I 100% agree

waxen plinth
#

So it's got that going for it lol

candid galleon
#

But they’re meant for different use cases is my point

waxen plinth
#

Json is objectively a very simple format

#

Yaml is more complicated

tender shard
#

yeah of course technically, yaml is more complicated. but noone would write a yaml parser today because we already got SnakeYaml which does it perfectly

waxen plinth
#

I have considered writing a yaml parser

tender shard
#

EVERY json document is valid yaml anyway soooo. if someone supports yaml, they also automatically support json

#

TL;DR: YAML = Json + easy for humans 😄

waxen plinth
#

Yeah that's reasonable

tender shard
#

writing a yaml parser for sure is an interesting idea for learning stuff

paper viper
#

toml tho

tender shard
#

I wouldn't bother myself to do it though

waxen plinth
#

But currently it can't handle context sensitive languages

#

And yaml is one sadly

tender shard
# paper viper toml tho

isn't that this kind of thing?

[Something]
value1 = bla
value2 = anotherBla

[AnotherThing]
value1 = whatever

?

waxen plinth
#

Yea

#

I don't know how subsections work in toml though

tender shard
#

lol

waxen plinth
#

¯\_(ツ)_/¯

paper viper
#

[parent.subsection]

tender shard
#

doesn'T systemd use toml?

waxen plinth
#

Writing my own yaml parser would be pretty great though

#

Yes it does

#

If I had my own yaml parser I could add support for comments

digital rain
#

is generally more effective checking for an attribute each time as a listener executes or having a temporary value to which you assign the necessary data

waxen plinth
#

That's a pretty vague question

tender shard
waxen plinth
#

Could you get a bit more specific

tender shard
#

I'd just call "premature optimization" and only "cache" the values if you really run into any performance problems

digital rain
#

like storing player uuids which have done smth

waxen plinth
#

Yeah not worth

tender shard
#

I'd say: don't worry unless you experience lags

#

for example there are people who cache every config value, like
int value = getConfig().getInteger("value");
instead of just using
getConfig().getInteger("value")
everytime

#

of course it might me a microsecond faster, but...

waxen plinth
#

I think that's more for simplicity

digital rain
waxen plinth
#

Storing the values in variables

digital rain
#

oh ok

waxen plinth
#

It makes the code more readable

waxen plinth
#

Just get them every time

digital rain
#

okay that sounds fair

tender shard
#

btw since we talked about toml: here's the only toml I ever wrote lol

[Unit]
Description=Minecraft %i
After=network.target

[Service]
WorkingDirectory=/home/minecraft/servers/%i
EnvironmentFile=/home/minecraft/servers/%i/env.conf
User=minecraft
Group=minecraft

Restart=always

ExecStart=/home/minecraft/bin/mcstart %i
ExecStartPost=/usr/bin/echo %i started.

ExecStop=/usr/bin/screen -p 0 -S mc-%i -X stuff "say Stopping Server^M"
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X stuff "save-all^M"
ExecStop=/usr/bin/screen -p 0 -S mc-%i -X stuff "stop^M"
ExecStopPost=/usr/bin/echo %i stopped.

[Install]
WantedBy=multi-user.target
waxen plinth
#

You have a systemd service for a Minecraft server?

#

Interesting

tender shard
#

I just do systemctl start minecraft@lobby to start the lobby, etc

waxen plinth
#

I just put it in crontab

tender shard
#

yeah but what if you wanna restart that server?

waxen plinth
#

@reboot command here

tender shard
#

or if you want to automatically restart it when it died

waxen plinth
#

Then I attach to the tmux window and restart it

tender shard
#

yeah okay

#

but systemd can handle all of that automatically 🙂

waxen plinth
#

Then I run the tmux command to send restart to it lol

#

I love tmux

tender shard
#

take a look at byobu if you like tmux 🙂 it's a tmux wrapper

waxen plinth
#

Maybe

#

I don't have any gripes with tmux though

#

So no real need for a wrapper

tender shard
#

yeah it's just e.g. to automatically open a tmux session everytime you login etc

waxen plinth
#

Oh that's not hard anyways

#

Damn after this conversation I want to write a yaml parser

#

Somebody stop me before I waste my time

candid galleon
#

Sounds pointless

#

Recreating the wheel yet again

#

Write your own data structure be praised ☜(゚ヮ゚☜)

waxen plinth
#

But comment support

#

It's the one thing my config library is lacking

#

And snakeyaml can't do it

candid galleon
#

Maybe for a reason 👀

solid cargo
#

uhhhh... why the fudge doesnt the event trigger?

#

i have registered it

candid galleon
#

?listener

#

?events

#

?smh

waxen plinth
#

Lol

candid galleon
solid cargo
#

i have done it thousands of times

candid galleon
#

Code?

solid cargo
#

and this time it rejects to execute

#

what need code of?

#

event class?

candid galleon
#

main and event ye

solid cargo
candid galleon
#

Main class?

solid cargo
#

and uhg

#

whole of it?

candid galleon
#

And can you send the whole event class

solid cargo
#

i put this in onEnable

candid galleon
#

onEnable of Main

solid cargo
#

getServer().getPluginManager().registerEvents(new JoinEvent(), this);

candid galleon
#

Is debug not printed?

solid cargo
#

nope

candid galleon
#

I’d make sure your onEnable is being run

solid cargo
#

it is being run

ember estuary
#
    public static void b() {
        System.out.println("b() was used");
    }
    
    public static void a() {
        return b();
    }

Why does this not work in java?
It works in JS, Python, and even in C (!)
Is the Java Compiler dumb and thinks void is a value, or am I missing something?

candid galleon
#

you can’t return a function

waxen plinth
#

You don't return b()

#

You just call b()

candid galleon
#

you’re returning a function when it’s expecting nothing

waxen plinth
#

Java compiler is not being dumb

solid cargo
#

also doesnt this question belong to a general java community? not just spigot?

ember estuary
#
void b() {
   printf("b() was used");
   return ;
}
void a() {
   return b();
}

#

thats the code in c

waxen plinth
ember estuary
#

works without a problem

ivory sleet
#

Hehe python print(print())

waxen plinth
foggy estuary
#

?paste

undone axleBOT
waxen plinth
#

They're different languages

#

You can't try to return a value from a void function

ember estuary
#

im just wondering if the java compiler is dumb

waxen plinth
#

Saying it works in other languages doesn't prove anything

ember estuary
foggy estuary
waxen plinth
foggy estuary
#

instead of breaking block

ivory sleet
waxen plinth
#

It doesn't prove anything

ivory sleet
#

and makes side effect functions more obvious

waxen plinth
#

It's how the language is designed

solid cargo
#

@candid galleon could it be because i didnt set a join message?

waxen plinth
#

You can't return a value from a void function

ember estuary
#

i am not returning a value tho

waxen plinth
#

And even if a() was not a void function, b() is

ember estuary
#

b() isnt a value