#help-development

1 messages · Page 455 of 1

lost matrix
#

The compiler having to optimize our garbage all day

river oracle
#

My code is great :,)

eternal oxide
#

The compiler is your slave, make it suffer!

river oracle
#

Is what I tell myself so I don't lose it

#

I stopped caring about posting my shitty code I hope one day someone looks at it and just tells me how shit I am

#

And why

river oracle
#

I wanna learn lol

rotund ravine
#

Oh

#

Too lazy atm

river oracle
#

Need to go through and purge abandoned projects again

#

I've got so many

eternal oxide
rotund ravine
#

“If you don’t write bad code you are not writing code”:
If you don’t make mistakes you are not learning.
Everyone makes mistakes, and that’s how we grow and improve. Don’t be afraid to try new things, experiment, and fail. Learn from your failures and move on. Mistakes are not a sign of weakness, but a sign of courage and curiosity.

M

#

M

Some code is good and some code is bad
But all code is a reflection of the coder's mind
A mind that is curious, creative, and bold
A mind that is not afraid to make mistakes and learn

Bad code is not a shame, but a step in the journey
A journey of discovery, improvement, and mastery
A journey that is not easy, but rewarding and fun
A journey that is not finished, but always ongoing

M

#

Poem courtesy bing

lost matrix
rotund ravine
#

Here is my attempt: - Confusionite: This is not a real rock type, but a term used by geologists to describe any rock that is difficult to identify or classify. Confusionite rocks may be unusual, rare, or have a complex history of formation. They may not have any practical use or value, except for scientific curiosity or aesthetic appeal. - Obsidian: This is a type of volcanic glass that forms when felsic lava cools rapidly. Obsidian is very brittle and sharp, which makes it useful for making tools and weapons in ancient times. However, in modern times, obsidian has little use except for decorative purposes or as a mineral specimen. It is also not very durable and can be easily weathered or broken. - Dolomite: This is a type of sedimentary rock that consists mostly of the mineral dolomite. Dolomite is similar to limestone, but it is less soluble and more resistant to acid rain. However, dolomite has few uses in construction or industry, as it is harder to quarry and process than limestone. It is mainly used as a source of magnesium or as an ornamental stone. - Sand: This is a type of sedimentary rock that consists of small particles of weathered rock. Sand is very abundant and can be found in deserts, beaches, and rivers. Sand is widely used as an aggregate for making concrete, asphalt, glass, and silicon chips. However, not all sand is suitable for these purposes, as desert sand grains are too smooth and rounded to bind together well. Also, sand mining can cause environmental problems such as erosion, habitat loss, and water pollution. - Pet Rock: This is not a natural rock type, but a product invented by Gary Dahl in 1975. Pet rocks were ordinary rocks that were sold in cardboard boxes with air holes and straw bedding. They came with a manual that instructed owners how to care for their pet rocks.

#

Pet rocks were marketed as a low-maintenance alternative to real pets. They became a fad and sold millions of units, but they had no real use or value other than being a novelty item. This is my list of top 5 most useless rock types. Of course, this list is subjective and based on limited information. You may disagree with some of my choices or have other suggestions. I hope you enjoyed this creative exercise. 😊

tardy flame
tawny remnant
#

I'm creating a pet system and i'm trying to figure out how to give the pet XP. Where do i store the xp if i want every pet to have its own xp

#

I was thinking CustomModelData but i'm not sure

lost matrix
jovial vigil
#

Hello I’m looking for a developer who can help me with my plugin

terse socket
#

?paste

undone axleBOT
terse socket
lost matrix
jovial vigil
#

I wanna make a plugin where you can right click spawners and that opens a gui where you can sell the items that got generated in the spawner. The spawner doesn’t spawn mobs

terse socket
#

That's just the default autocompletion, it will give an error if you try to run it like that so there's nothing to worry about

lost matrix
#

Check the amount of arguments and then return null in your tab completer

ivory sleet
#

if (args.length > 1){
return Collections.emptyList();
}

#

basically

#

Or return null which would tab complete all players

#

As smile suggested :>

#

Well I wrote a class to make tabcomplete easier, but to answer your question, it’s probably not that different from bukkit

#

I’d assume so?

terse socket
#

Will it create the hashmap

lost matrix
#

No comment

ivory sleet
#

@terse socket

#

I suggest taking inspiration from the last example

ivory sleet
#

Well

#

Yes

#

You get the command actually

#

And set the tab completer for that command

#

Spigot you have
getCommand("give").setTabCompleter(new TabCompleterImplementation())

#

Ah

#

You crate a variable like:
PluginCommand command = getCommand(…);
command.setExecutor
command.setTabCompleter

#

since the setter methods return void you can’t chain them

#

Well somewhere yes

#

Many people simplify it by creating some sort of helper method

vocal cloud
#

Hmmm sounds like a PR could fix it

ivory sleet
#

private void registerCommand(String name, CommandExecutor executor, TabCompleter completer){
var command = getCommand(string);
command.setExecutor(executor);
command.setTabCompleter(completer);
}

#

@south gulch

#

In plugin.java

#

And then they call that method instead

#

Yeah best of luck bud (:

#

replace with PluginCommand

#

since that’s the return type of getCommand()

tardy delta
#

doesnt worldedit also has some kind of /eval command?

pure musk
pure musk
# pure musk I used a code example from the protocollib tutorial
                new PacketAdapter(this,
                        PacketType.Play.Server.ENTITY_EQUIPMENT) {
                    @Override
                    public void onPacketSending(PacketEvent event) {
                        PacketContainer packet = event.getPacket();
                        ItemStack stack = packet.getItemModifier().read(0);

                        // Only modify leather armor
                        if (stack != null && stack.getType().name().contains("LEATHER")) {
                            // The problem turned out to be that certain Minecraft functions update
                            // every player with the same packet for an equipment, whereas other
                            // methods update the equipment with a different packet per player.
                            // To fix this, we'll simply clone the packet before we modify it
                            event.setPacket(packet = packet.deepClone());
                            stack = packet.getItemModifier().read(0);

                            // Color that depends on the player's name
                            String recieverName = event.getPlayer().getName();
                            int color = recieverName.hashCode() & 0xFFFFFF;

                            // Change the color
                            LeatherArmorMeta meta = (LeatherArmorMeta) stack.getItemMeta();
                            meta.setColor(Color.fromBGR(color));
                            stack.setItemMeta(meta);
                        }
                    }
                });```
tardy delta
#

that this?

terse socket
lost matrix
lost matrix
terse socket
lost matrix
terse socket
#

I'm gonna save it in my database on onDisable

onyx fjord
#

u gotta load it later on enable too

sage patio
#

Can a Stack of item be more than 64? like 5,000 or 10,000?

terse socket
#

oh yeah true

vocal cloud
sage patio
#

they cannot modify their inventory at all

vocal cloud
#

You can modify the stack size but you have to be careful as it's unstable as heck

sage patio
vocal cloud
tardy delta
terse ore
tardy delta
terse ore
#

ty

serene sigil
#

hi, i need to detect weather a dropped item hitbox (that is going very fast) is inside of another hitbox, ive tried using the BukkitScheduler loop but its too slow and if i use a while loop, its gonna lag out the server, what should i do?

#

btw there isnt an event for what i need to do

eternal oxide
#

a Scheduled executor

#

but you are taking risks

lost matrix
#

Check if the velocity vector intersects with the BB

rotund ravine
#

Baby

eternal oxide
#

good idea

#

as the velocity length is the maximum distance traveled per tick

quaint goblet
#

How do i fix this

eternal oxide
#

install vault, use a better chat plugin?

quaint goblet
#

I have vault.

#

This is the right one, RIght?

eternal oxide
#

yes

quaint goblet
#

I have it downlaoded

#

I added a version directly from spigot instead of my server host, Retrying now.

#

I downloaded vault again and its still like this

#

Vault isnt working.

eternal oxide
#

its yoru chat plugin at fault not vault

rotund ravine
#

Do /plugins

#

Show

quaint goblet
#

Im using venturechat

terse ore
#

(I think he means to do %vault_prefix%)

rotund ravine
#

Prolly

quaint goblet
#

Ill delete the chat plugin, Give me a minute.

terse ore
terse ore
#

check that first

quaint goblet
#

I had that page open.

#

Before you sent me it.

#

Oh.

#

I didnt do /papi ecloud download vault

#

Mbmb

#

Sorry

terse ore
#

np

serene sigil
eternal oxide
serene sigil
#

no i mean wdym taking risks

rotund ravine
#

Don’t just do what was previously explained

eternal oxide
#

operating out of sync with the main thread and reading data from Spigot is risky (at times)

#

the max distance will be your vector.length

quaint goblet
#

With venturechat, How do i add luckperms ranks into chat?

rotund ravine
#

Go check their documentation

serene sigil
# eternal oxide operating out of sync with the main thread and reading data from Spigot is risky...

basically what i did is make a gun that spawns in an iron nugget bullet and setting the velocity so it gets launched out very fast the direction the player is looking, when it is isOnGround then it will be removed and when it hits an entity it damages it and then it gets removed, and the BukkitScheduler loop is too slow to read the data and sometimes the bullet goes through an entity but it will not get damaged

eternal oxide
#

use the method as I linked

serene sigil
#

in the loop?

eternal oxide
#

if it's going to collide you will get the Entity in the result

#

yes per tick

#

the length of the vector is th emax distance the Entity can move per tick

serene sigil
#

this is what i have now

eternal oxide
#

so ray trace from the bullets BB from it's location along it's vector for the vectors length

#

um no

#

thats bad

#

make a Set of bullets

serene sigil
#

what params?

eternal oxide
#

or List

serene sigil
eternal oxide
#

when a bullet is fired, add it to the Collection

#

then have ONE task running which iterates the Collection

#

raytrace from each bullet and check for a collision

#
velocity = bullet.getVelocity();
location = bullet.getLocation();
result = bullet.getBoundingBox().raytrace(location.toVector(), velocity, velocity.length());```Something like
eternal oxide
#

yes

#

no point in stopping and starting

#

if the list/set is empty your task will do nothing

serene sigil
#

so do it static?

eternal oxide
#

depends

serene sigil
#

cuz i am doing all this in an interactEvent

eternal oxide
#

doesn;'t need to be static

#

just accessible from your task and where you fire the bullets

serene sigil
#

yes but there is always gonna be new schedulers

eternal oxide
#

no, only one

#

one task for ALL bullets

serene sigil
#

yes but when i put Bukkit.getScheduler().runTaskTimer(Main.getInstance(), runnable -> { inside the event, its gonna always (every shot) make a new scheduler

eternal oxide
#

then don;t

#

as I said only one task to handle ALL bullets

serene sigil
#

oh so outside the method?

eternal oxide
#

yes, when you spawn your bullet, all you do is push it to your list

serene sigil
#

but doesnt it take up too many resources when the scheduler runs every time even if no bullets get fired?

eternal oxide
#

if the list is empty your task does nothing

serene sigil
#

so i should cancel when its empty?

eternal oxide
#

no

#

it would take more resources to cancel and start a new one than to leave it running

serene sigil
#

oh

twilit roost
#

how can I check if Projectile hit Headshot via EntityHitResult

eternal oxide
#

entity in the result

serene sigil
#

btw ill have to go for 5 min

lost matrix
twilit roost
#

in NMS*

lost matrix
quaint goblet
#

GUYS

#

PLS HELP

twilit roost
#

riight
but that returns the same for be all the time

    public static void onBulletHit(Entity shooter, EntityHitResult result, Gun gun){
        Entity hit = result.getEntity();

        double y = result.getLocation().y;
        double entityY = hit.getBukkitEntity().getLocation().getY();
        double shotY = y - entityY;

        boolean wasHeadshot = (result.getLocation().y - entityY) >= 1.35D;
        boolean wasHipZone = shotY >= 0.80D && shotY < 1.35D;

        System.out.println("Entity hit H: %s; HZ: %s; Y: %s".formatted(wasHeadshot,wasHipZone,y));
    }

No matter the direction I'm shooting

quaint goblet
#

how do i add a space inbetwwen the [owner] and my name

twilit roost
quaint goblet
#

no im editing the code for this

#

so

#

i need help with the code

pseudo hazel
#

then add a space

chrome beacon
#

Then just add a space to the code

twilit roost
#

show us the code

quaint goblet
#

i have been

lost matrix
twilit roost
quaint goblet
#

ill try some other things and help sever

eternal oxide
quaint goblet
#

ok

pseudo hazel
#

its probably the easiest if you add a space to the prefix

analog valley
#

Storing an ArrayList<ItemStack> and HashMap to a database ?

twilit roost
#

whats the most efficient way to check whenever player holds item?
And display ActionBar when they hold it?

serene sigil
#

?paste

undone axleBOT
serene sigil
#

@eternal oxide ive made this, could this work?

#

the method gets called in onenable

quaint goblet
chrome beacon
#

Have patience

rotund ravine
serene sigil
eternal oxide
#

use an iterator so you don't need to use the keyset

#

raytrace once into a result variable

eternal oxide
#

in fact, change your pistolBulletsFired into a List<UUID>

#

then add them just as a UUID

serene sigil
#

Item,Player

eternal oxide
#

why?

serene sigil
#

the bullet and the one who shot it

eternal oxide
#

are you using a recent version of spigot?

serene sigil
#

1.16

eternal oxide
#

I don;t see you using the shooting player anywhere in the bullet code

lost matrix
#

Didnt follow the conversation but if you are iterating the list every tick then a LinkedList might be your best option.
Because you can remove elements while iterating over it

serene sigil
#

i need it in 2 places, when i damage the entity and to detect that the bullet didnt hit the shooting player

eternal oxide
#

put the shooting players UUID in teh bullets pdc

#

when they fire it

serene sigil
#

okay

#

and then only a list with Item?

eternal oxide
#

not item but the entity id

#

allow bukkit to handle going out of scope

serene sigil
#

and what list should i use?

eternal oxide
#

doesn;t matter

#

private List<UUID> pistolBulletsFired = new ArrayList<>();

lost matrix
#

If you have a LinkedList you want to iterate then the best performance will be achieved by

firedBullets.removeIf(bullet -> {
  bullet.tick();
  return bullet.isDone();
});
#

O(1)

serene sigil
serene sigil
eternal oxide
#

depends

#

one sec

serene sigil
#

k

eternal oxide
serene sigil
#

okay

eternal oxide
#

line 15 you could use a simpler test if (livingEntity.equals(bullet)

#

I missed a return at the end

serene sigil
#

@eternal oxide

eternal oxide
#

you have a zero vector on one of the entities

serene sigil
#

ye its this line RayTraceResult result = bullet.getBoundingBox().rayTrace(bullet.getLocation().toVector(), bullet.getVelocity(), bullet.getVelocity().length());

eternal oxide
#

you have a non moving bullet

serene sigil
#

no

eternal oxide
#

your error says you do

#

Directions value is 0

serene sigil
#

oh, also when it hits the ground, it doesnt disappear

#

prob that

eternal oxide
#

that would do it

#

test teh velocity, if zero remove the bullet

#

before raytracing

serene sigil
#

how again?

#

bullet.getVelocity().

eternal oxide
#
                    bullet.remove();
                    return true;
                }```
serene sigil
#

oh

#

.length

eternal oxide
#

yes, before the raytrace

serene sigil
#

yes

eternal oxide
#

if you are seeing hits to self you need to adjust your start location

serene sigil
#

it kina works but it doesnt damage anything

eternal oxide
#

yes you are probably detectign the bullet as a collision every time

#

try bullet.getLocation().toVector().add(bullet.getVelocity().normalize()) as the first argument for the raytrace

eternal oxide
#

yep, it means it's workgin, just needs one more error check

#

if it doesn;t hit anything the result is nu8ll

#

so if (result == null) return false;

serene sigil
fierce whale
#

?paste

undone axleBOT
serene sigil
#

it doesnt give any exceptions tho

eternal oxide
#

do the bullets get removed?

fierce whale
serene sigil
eternal oxide
#

then add a sysout in each of the places you return true to see where they are being removed

#

anywhere you are calling bullet.remove()

#

so 3 places

tawdry echo
#

how can remove specific amount of item from player inventory

eternal oxide
#

probably yoru path as it starts with ./

#

so it starts lookign in yoru server root

#

or the root of yoru source

fierce whale
#

?paste

undone axleBOT
fierce whale
rotund ravine
#

Yes

#

Well

eternal oxide
#

you are deleting the world before it finished saving

rotund ravine
eternal oxide
#

this is not a main world I hope

#

yep

serene sigil
#

?paste

undone axleBOT
serene sigil
eternal oxide
serene sigil
eternal oxide
#

ok so it's hitting an entity and stopping before you detect the collision with the raytrace

serene sigil
#

ig

eternal oxide
#

so add a listener for the collision and do damage. nothing else

tardy delta
#

hmm would those be different modules? (.vscode excluded)

#

trying to figure out the dif between a module and a regular folder

eternal oxide
#

somehow your bullet is hitting the entity before you detect any collision in yoru task

#

when it hits the server stops the velocity

#

then yoru code see's it has stopped and removes the bullet

serene sigil
#

oh

#

so the velocity check at the very end?

eternal oxide
#

no

#

somehow your raytrace is not detecting the hit before it happens

#

I wonder if it's skipping over the target with the unit vector

serene sigil
#

so what should i do?

eternal oxide
#

try changing the first argument of the raytrace to bullet.getLocation().toVector().add(bullet.getVelocity().normalize().multiply(0.2))

#

a much smaller jump ahead

serene sigil
#

ok

#

but even when i hit a block, it still doesnt remove the bullet the same tick

#

so idk if this raytrace thing works

eternal oxide
#

so it only ever gets removed when velocity is zero?

serene sigil
#

yes

#

basically around 5 seconds when it touches the ground

eternal oxide
#

somethigns up with the raytrace then

serene sigil
#

yes

#

maybe the item cannot overlap with the blocks

#

i bet

eternal oxide
#

oh I know, one sec

serene sigil
#

lmao the hitbox doesnt even overlap with the block

eternal oxide
#

yeah we using the wrong raytrace, sec

serene sigil
#

bruhhhh

#

lmao

#

2 hourssssssss

eternal oxide
#

RayTraceResult result = bullet.getWorld().rayTrace(bullet.getLocation(), bullet.getVelocity(), bullet.getVelocity().length(), FluidCollisionMode.NEVER, false, bullet.getBoundingBox().getHeight(), null);

serene sigil
#

alright

eternal oxide
#

we may need to add a predicate to ignore bullets

#

what entity type is your bullet?

lost matrix
#

I would create a custom projectile instead of constantly tracking a flying Item

serene sigil
lost matrix
eternal oxide
#

odd choice

serene sigil
#

cuz i want to display the iron nugget as a flying bullet

eternal oxide
#

you can do that on a projectile

#

seItem

lost matrix
#

Why dont you use a Snowball? You can literally let it look like any item now.

eternal oxide
#

lol yes 🙂

serene sigil
#

how?

eternal oxide
#

I assumed you were going this route for some reason 🙂

lost matrix
#

snowball.setItem(ItemStack) or something

serene sigil
#

does it work there?

lost matrix
#

Eh 1.16 might be a close call

serene sigil
#

uhoh

lost matrix
#

But see if you got the method for it

eternal oxide
#

you can do all this in a simple listener using projectiles

echo basalt
#

just make a snowball and disguise it with packets :)

eternal oxide
#

throwing items with yoru own collision logic is intersting though

serene sigil
#

it works :DDD

eternal oxide
#

then Player#launchProjectile is all you need and a listener

#

ProjectileHitEvent

serene sigil
#

cool i can then also use the Projectilehitevent

#

ig

#

alr lemme rewrite my code

eternal oxide
#

?paste

undone axleBOT
lilac nimbus
#

Hey, um so, how do I publish my plugin?

eternal oxide
lilac nimbus
#

Oh, thanks!

eternal oxide
#

use teh PDC instead of meta though

echo basalt
#

also pdc is a bit yicky

eternal oxide
#

pdc is perfect for passing data on the object

echo basalt
#

you gotta create a namespaced key for everything

eternal oxide
#

meta is leaky so should be avoided

echo basalt
#

meta is bad yes

eternal oxide
#

she only wants to pass a player ID (not needed) so you cna reuse a single key

echo basalt
#

still annoying

lilac nimbus
remote swallow
#

you add the plugin jar

#

for people to actually use

lilac nimbus
#

Got it

icy beacon
#

can I prevent respawning somehow? PlayerRespawnEvent doesn't seem to be cancellable

eternal oxide
#

why do you want to prevent respawn?

pure musk
icy beacon
# eternal oxide why do you want to prevent respawn?

well i don't think it's an xyproblem, but just to elaborate - after dying, i want players to not be able to respawn for a certain time. i do not want to outright kick them from the server and disallow joining, i want to explicitly stop the respawn button from respawning them

eternal oxide
#

force them into spectator then

#

and play a counter until they respawn

icy beacon
#

i want to explicitly stop the respawn button from respawning them
if that's not possible i'll ofc look for workarounds

flint coyote
#

You cannot disable respawn but you can put them into some undead state. Either you lock them in a room or you freeze them or you prevent the death and make them invisible and freeze them or anything like that. What the best option is probably depends on your use case

#

I've seen a medic system that basically let them "sleep in a bed" just without the bed. You could do that until they are allowed to respawn

icy beacon
#

how peculiar

#

thanks 😛

#

i'll think of it

flint coyote
#

You'll surely find a suitable option. If you don't want dead bodies lying around the latter one is probably not the best for you 😃

icy beacon
#

so I've discussed it with the dude i'm working for and we decided the following: spawn the player in spectator mode without an ability to move and a title-based timer + blindness

worldly ingot
#

Frick

remote swallow
#

choco how could you

tawdry lava
#

Does anyone know any good simple to understand api for commands and sub-commands. Like , example command - /bw <join> <mapname>?

fluid river
hazy parrot
#

ie join would be first arg

tawdry lava
tawdry lava
#

But I saw some libraries onlien on github like Cloud,Brigadier etc

#

and saw them being used in projects

misty ingot
#

Is there simple way to do this? -
I have a bunch of classes for diff commands
I wanna make it so all those commands are under one command, basically they become subcommands

For ex i have a class for /balance, it would become
/pepe balance
without having to create one class with a bunch of if statments for the subcommands and all that shi

young knoll
#

CommandAPI is another one

river oracle
misty ingot
#

I don't understand what you are trying to say

#

(the Map guy)

#

I know how a map works but how would that thing work

tardy delta
#

just use acf

#

just a command dispatcher map

river oracle
tardy delta
#

chatgpt telling me to do new > module 💀

kind hatch
echo basalt
#

I'm probably gonna make a funky adapter for my animation system

#

so I can make commands with the same syntax

#

as the syntax is surprisingly easy to work with

young knoll
#

Funky

echo basalt
#

it's a bit too raw but still

tardy delta
#

because the current system is horrible

icy beacon
#

hope i'm not too late

tardy delta
#

i have no clue what im doing

#

is that a java module or just smth ij?

#

btw is this even the right way to name the package?

#

or should it just be "me.fourteendoggo"?

#

im questioning my existence now

fluid river
#

the thing you have rn

#

<me/com/org/net>.<coderName/orgName/comName/teamName>.<projectName>

tardy delta
#

alr

#

ij is a piece of shit then

#

bruh cmon ij

#

ah yes

tardy delta
#

code thats not in a module anymore

#

whenever i add a module, should i put the code that i had before in a new core module?

#

what did you expect

icy beacon
#

i stopped going to paper server to ask for help with paper api

#

i'd rather ask here and get a ?whereami but get a response later

#

than sit through that

#

💀

tardy delta
#

im using mcp-reborn

icy beacon
#

do you prefer intellij or eclipse

#

sir this is spigot

tardy delta
#

just say thats not an answer to my question

worldly ingot
#

wtf is MCP-reborn? Any incarnation of MCP shouldn't be used anymore

tardy delta
#

i just need to look into mojangs code sometimes

worldly ingot
#

Why are people reviving it outside of Forge? lol

tardy delta
#

idk someone told me to use it

remote swallow
#

?blockpdc for me

undone axleBOT
tardy delta
#

i dont know what it is

icy beacon
#

i love cafebabe

worldly ingot
#

Your choices for modding are, at least in my opinion, Forge or Fabric. No others

icy beacon
#

i'll give cafebabe my firstborn

worldly ingot
#

And to be quite honest, you can support both rather easily with modularization

#

They both use Mojmaps

tardy delta
#

is the fabric stuff still halfy obfuscated?

worldly ingot
#

I would still only use Fabric for lighter mods. If it's a heavier mod, Forge is still the reigning champ

icy beacon
#

?ischocoreal

undone axleBOT
#

No, Choco is not real. I was not programmed to say this by Sam.

icy beacon
#

shit

worldly ingot
#

Fabric takes a different approach

#

Different APIs

#

fwiw, again, if you're doing a larger mod, try to modularize your code to where you can support both loaders

#

It shouldn't be that much extra effort if you start with that in mind

river oracle
worldly ingot
#

wut

#

I'm not sure I follow

#

Yeah but why? You're just making a mod, right?

#

You can't, but your mod's code is your own

#

No

#

Forge and Fabric are loaders. They'll load your mod for you just like CraftBukkit does and has hooks to call your stuff

#

They just do it for both client and server

#

No you're fine. Your mod is a separate entity

river oracle
#

Coding mods is like the equivalent of using NMS in your spigot plugin you can still post your spigot plugin right? same goes for mods

worldly ingot
#

You'll find tons of popular open source mods on GitHub

#

In fact, the modding community is a hell of a lot more open source friendly than Bukkit's developer ecosystem

young knoll
#

Quark is a mod by Vazkii

worldly ingot
#

Seems most mods are open source

icy beacon
#

if I create a PotionEffect with Int.MAX_VALUE as the duration, will it work? minecraft commands only allow up to 1 million seconds

worldly ingot
icy beacon
#

ty

river oracle
worldly ingot
#

(1.19.4)

young knoll
#

MAGIC VALUEEEEE

worldly ingot
icy beacon
river oracle
#

I know initially I started plugins a bit before I even had github only reason I got it and started using it so early on is because I had someone teaching me java while coding so he taught me how to use github

icy beacon
#

^

worldly ingot
#

I think modders are more mature than plugin developers, so yeah, I partially agree with that

#

I don't think it's the misunderstanding of Git, I think it's the ability to recognize that you're using an open source library, your code should probably also be open source

tardy delta
icy beacon
#

modules are infertile 😦

tardy delta
#

bruh

#

looks like i typed in there while i typed in discord

worldly ingot
#

lol

#

I was just going to say, you have a what

tardy delta
#

hmm you can choose what modules are getting compiled in your final jar right?

flint coyote
#

I'd say it's because of the nature of mods.
People generally have to put more effort into installing mods than plugins. Therefore only "good quality" mods are installed.
For plugins it's easy to just install anything and if it's not good enough uninstall it again. Costs you like 1 minute (excluding the testing time)

tender shard
worldly ingot
tardy delta
#

yes

worldly ingot
#

What is shaded into what depends on what modules depend on one another and what ones are shaded into each other

tender shard
#

you usually create a dist module that depends on all other modules and shades them

tardy delta
#

:/

#

chatgpts answer

worldly ingot
#

You have cli, benchmarks, and core. If your core module depends on your cli and benchmarks module and shades them, when you build it, it will contain those two modules

#

Think of them all as separate projects

#

Because they are

tardy delta
#

well the cli module should call a method from the core module, is that considered depending on?

tender shard
#

yes, cli depends on core

tardy delta
#

same for benchmarking actually

tender shard
#

I would create a separate module "dist" that shades all others

tardy delta
#

without the one that i need excluded?

#

dont need benchmarks module at runtime

tender shard
#

you just include all the modules you wanna have in the final jar as dependency

#

so you create a dist module that depends on core and cli, and shade those

tardy delta
#

isnt there a cleaner way? 🥲

tender shard
#

how is that not clean

tardy delta
#

idk

#

new module

tender shard
#

yeah well that's how it works lol

tardy delta
#

is it normal that it creates 3 different jars when not using your dist module?

tender shard
#

wdym? it creates one .jar per module

tardy delta
#

what if i wanted one jar

#

its a lib im making

tender shard
#

then you create an additioal dist module

#

that shades all your other .jars into one final .jar

vast kelp
tardy delta
#

chatgpt telling me i should put the maven shade plugin in my core module to shade all modules into one jar, except the be,chmarking module

#

idk whether to trust this stuff

tender shard
#

bullshit and cannot work

#

earlier you said that the cli module depends on core

tardy delta
#

hmm

#

this stuff is weird

icy beacon
#

is there something like scheduler.runTaskTimes(plugin, runnable, delay, period, times)?

#

or how'd i implement that

#

probably should clarify the purpose, i'm making a timer where i'm sending a player titles like 02:00, 01:59 every second

#

so i know exactly when the scheduler should stop executing

tardy delta
#

just use the consumer<bukkittask> one

#

and keep a counter

#

id make a new class for that

icy beacon
#

can you give an example of how'd i use the consumer? i don't think i've ever dealt with those

tardy delta
#

well it supposed to work like
runtasktimer(plugin, task -> { some stuff here, task.cancel() }, delay, delay)

#

so you call cancel and the task stops itself

icy beacon
#

hmm

tender shard
tardy delta
#

if you want a counter in that the lambda will complain about non final stuff so ye new class

#

or do that ugly stuff

icy beacon
#

hm

#

ty i'll look into it now

tender shard
#

buy a decent book

worldly ingot
#

New classes will definitely look nicer, but you could also do an anonymous inner class

new BukkitRunnable() {

    private static final int MAX_TIMES = 100;
    private int times = 0;

    @Override
    public void run() {
        if(times++ >= MAX_TIMES) {
            this.cancel();
        }
    }
}.runTaskTimer(this, 20, 20);```
tender shard
worldly ingot
#

You used a Consumer

tender shard
#

oh right

#

but where does your bukkitTask come from

tardy delta
worldly ingot
#

this, sorry

tender shard
#

idk I only read german books about java

tardy delta
#

someone in a company recommended that book to us

#

so i just bought it

#

ill see if it teaches me anything useful

#

but atleast i can say i have a java book then 🥹

worldly ingot
#

I'd only really recommend getting a book if you're a book reader. I got a book on C++ I think a while ago but I just... can't bring myself to read it

#

I read in a few pages then gave up

#

I learn way faster through online resources

pseudo hazel
#

practice makes better

#

no reading, yikes

worldly ingot
#

I read all the books I needed to in high school lol

tender shard
#

i like reading books 🥲

pseudo hazel
#

well that sounds like a you problem

river oracle
#

I liked reading until highschool something about being forced to read shitty novels by some random people in the 1800s really took the reading thing away from me

worldly ingot
#

Only book series I read voluntarily was the Harry Potter ones

#

Didn't care really for any others

#

I just don't like reading at all. It's too boring for me lol. To each their own'

pseudo hazel
#

yeah, and now you read code all day

remote swallow
#

reading is boring

worldly ingot
#

Weird how that works, isn't it?

worldly ingot
#

It's not like I'm incapable of reading ;p I can read rather well. In two languages no less. I just don't really like it is all

remote swallow
#

no hes a lwayer

#

lawyer

tender shard
#

wordpress

pseudo hazel
#

wait u a lawyer fr?

tender shard
#

yes

pseudo hazel
#

awesome

#

or boring i guess? idk, you probably chose to become one because its awesome

tender shard
#

oh it depends. sometimes it's quite boring, but often extremely interesting. even in the weird field I chose, which is tax law lol

icy beacon
#

can i evade taxes legally

tender shard
#

depends on how you make your money with lol

#

anyway I'll make pasta, brb

icy beacon
#

cya

#

oh my fucking god if i have to delete a trailing comma in a json file one more time

#

is there a function in gsonbuilder to allow this stuff

#

setLenient doesn't seem to

sacred mountain
#

class [I cannot be cast to class [B ([I and [B are in module java.base of loader 'bootstrap')
tf does this mean

icy beacon
#

context?

hazy stirrup
#

Hello I need some help

icy beacon
#

ask for it

#

?asj

#

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

hazy stirrup
icy beacon
#

?

hazy stirrup
icy beacon
#

so.. ask your question?

hazy stirrup
#

yeah

remote swallow
#

what do you need help with

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

remote swallow
#

alex

icy beacon
remote swallow
#

is your brain okay

paper venture
#

will something bad happen if i change language level from 9 to 16?

icy beacon
#

spoken like a true programmer

remote swallow
#

you use ?ask daily how do you not know

paper venture
#

thanks!

icy beacon
#

there are

#

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

?justask

undone axleBOT
icy beacon
#

?nohello

undone axleBOT
icy beacon
#

yeah i want to marry cafebabe

#

what a legend

remote swallow
#

since when did we have a just ask

icy beacon
#

idk lol

#

saw it in ?cc list

remote swallow
#

we need that link on the ?ask too

eternal oxide
#

it's spammy enough

icy beacon
#

yeah someone open a merge request

remote swallow
#

simply ping imajin

icy beacon
#

will i die?

remote swallow
#

no

icy beacon
#

then i don't want to

#

did we scare away quantumgamer420

#

i was excited to see the question

remote swallow
#

"so just ask your question"
"yeah"

#

english

icy beacon
#

can we have :wheeze: added to spigot

#

or does anybody have a good :wheeze: server

remote swallow
river oracle
#

no wheeze tao

icy beacon
#

i'm looking for just a wheeze

#

does anybody contain a server with that

#

this bitch

river oracle
#

this is fun

icy beacon
#

table in 9 months: 🫄

remote swallow
icy beacon
remote swallow
river oracle
#

Preconditions.checkArguments Preconditions.checkArguments (╯°□°)╯︵ ┻━┻

icy beacon
#

xD

#

yay quantumgamer420 was typing

river oracle
#

@hazy stirrup please ask uwu we want to know

icy beacon
#

the world needs you

#

don't vanish

icy beacon
#

take your time

hazy stirrup
#

?ask I want to access config from another package. How can I do that? Here is my Main Class ````package org.precious.test.testplugin;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.precious.test.testplugin.commands.Heal;
import org.precious.test.testplugin.commands.Shout;
import org.precious.test.testplugin.handlers.Torch;

import java.util.Optional;

public final class TestPlugin extends JavaPlugin {
public FileConfiguration getConfigFile() {
return config;
}
FileConfiguration config = getConfig();
private static TestPlugin instance;

public void onEnable() {
    config.options().copyDefaults(true);
    saveConfig();
    Bukkit.getLogger().info(ChatColor.GREEN + "[Test Plugin] TestPlugin Is Enabled!");
    getCommand("shout").setExecutor(new Shout());
    getCommand("heal").setExecutor(new Heal());
    new Torch(this);
}

@Override
public void onDisable() {
    Bukkit.getLogger().info(ChatColor.RED + "[Test Plugin] TestPlugin Is Disabled!");
}
public static TestPlugin getInstance(){
    return getInstance();
}

}````

Here is my another class:





public class Torch implements Listener {
    public Torch(TestPlugin plugin){
        Bukkit.getPluginManager().registerEvents(this, plugin);
    }


    @EventHandler
    public void joinEvent(PlayerJoinEvent event){
        Player player = event.getPlayer();
        String PlayerName = player.getDisplayName();
        event.setJoinMessage();

    }````
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!

remote swallow
#

add a classs private final var for your plugin

icy beacon
#

text wall

#

why did you add ?ask to the beginning of your question lol

#

?paste anyway please use this in the future to paste your code

undone axleBOT
hazy stirrup
icy beacon
#

?ask is just a command

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
#

that i used to tell you what to do

hazy stirrup
hazy stirrup
remote swallow
#
public class Torch implements Listener {
    private final TestPlugin plugin;
    
    public Torch(TorchPlugin plugin) { 
        this.plugin = plugin;
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        String configStrng = plugin.getConfig().getString("path");
    }
}
icy beacon
#

?learnjava!

undone axleBOT
wise mesa
#

how can I have maven make a release build with assertions and a debug build without assertions

#

or something similar

remote swallow
#

if (MainClass.isDebugMode()) {
doThat™️();
}

wise mesa
#

no

#

sorry i meant

#

disable asserts

remote swallow
#

the best bet you have to do that automatically is just only making them apply on a debug if

tender shard
wise mesa
#

i use a lot of them for sanity checking

wise mesa
#

cool

#

so then its not possible to strip them from my plugin

#

it just depends on if the server is in debug mode?

lost matrix
wise mesa
#

but they're meant jsut for development purposes

#

on release i want them to be stripped

lost matrix
#

assertions basically have no purpose on runtime but still produce overhead

wise mesa
#

they have purposes for me?

#

i find use for them

#

and i want them to be checked at debug time

#

and not at release time

remote swallow
#

asserting stuff in development just sounds like a bad idea

wise mesa
wise mesa
remote swallow
#

oh no, ive got yellow text saying something might be null

#

moving on

wise mesa
#

well I know it isn't null

#

if it is null something has gone seriously wrong

#

and its not something that could be fixed at runtime

#

if i don't fix it during development time

sacred mountain
#

asserting is for stuff where u know it will never be null, as it's being retrieved from an external source or smn right

#

i just never use it

wise mesa
sacred mountain
#

to make intellij stop bugging me thats pretty much the only use i have

wise mesa
#

so if they aren't true something is seriously wrong

#

and there's nothing I could do about it at runtime

lost matrix
remote swallow
wise mesa
#

im aware

hazy parrot
#

smh not null pinged again

river oracle
#

I'm almost done with this api lol I am testing weird things to see if it breaks

wise mesa
#

i use @ NotNull and @coral knotable frequently

#

oops

river oracle
wise mesa
#

sorry null

remote swallow
#

they deserve it

river oracle
#

its like if there was a lombok fanboy in here named @NonNull or something

#

or @Getter or @Setter

rotund ravine
#

@deprecated

#

Dang

river oracle
#

guys I'm so close to making inventory titles work without being scuffed as fuck

#

I don't think I've been happier to see an exception in my life

java.lang.IllegalArgumentException: Only creatable inventories can have their title changed
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.1-jre.jar:?]
    at org.bukkit.craftbukkit.v1_19_R3.inventory.CraftInventoryView.sendTitleChange(CraftInventoryView.java:85) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at sh.miles.testplugin.TestPlugin.lambda$onOpen$0(TestPlugin.java:52) ~[?:?]
    at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftTask.run(CraftTask.java:77) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at org.bukkit.craftbukkit.v1_19_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:414) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1211) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:375) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1158) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:983) ~[craftbukkit-1.19.4-R0.1-SNAPSHOT.jar:git-Bukkit-19de355]
acoustic gorge
#

Ok, I'm having some trouble getting the plugin messaging to work. I set up the plugin messaging for my main class and now I'm trying to add an outgoing message for an on click event but I'm getting an error where it's not registering my plugin in the line. I've tried importing the plugin and creating a dependency but nothing seems to be fixing it anyone know what's going wrong?

https://pastebin.com/G9qtMVkp - Main

https://pastebin.com/iS5Hr2jk - Event

icy beacon
#

is there onDisable in bungee?

#

if so, it should suffice

tender shard
icy beacon
#

oh

#

can't assist you in that case, sry

fathom idol
#

Hey
How can I get data (from a database for example) asynchrously and get the result in the main thread?
I've tried with CompletableFuture but the thenAccept or whenComplete do not specially run in the main thread.
I've seen that a method exists Bukkit.getScheduler().getMainThreadExecutor(plugin) in newer versions but not in 1.8. Is there any other way to get the mainThreadExecutor in 1.8?

tardy delta
#

cant you do some fancy classloader hooks?

#

yes

#

idk if bungeecord is aware of its subservers

icy beacon
#

does'nt seem like it

tardy delta
#

probably is lol

hazy parrot
icy beacon
#

maybe you can do something hacky

hazy parrot
icy beacon
#

i'd imagine the following

#

make a spigot plugin that's installed onto every of your spigot servers

#

when it's being disabled, send a message to your bungee plugin

#

why though

#

this sounds like it'd work

#

hacky? maybe

fathom idol
acoustic gorge
hazy parrot
#

Altrought getting things from dB shouldn't effect ticks thatuch

fathom idol
#

Showing the result in an inventory

pseudo hazel
#

inventories dont need to be on the main thread do they?

icy beacon
#

hey there eLka_dortik

#

i'm all ears

hazy parrot
icy beacon
#

bear in mind i've never done bungee

#

but i'm listening

fathom idol
icy beacon
#

i'm sorry that you have to work with 1.8

pseudo hazel
#

oh

#

ig its an old thing then

#

xD

icy beacon
#

maybe

fathom idol
icy beacon
#

but you won't know exactly when it's shut down

icy beacon
icy beacon
#

what

#

aren't there something like schedulers

#

in bungee

#

well if you don't care about exact precision then it's fine

#

sure

#

yeah i understand what you mean lmao

#

i'm just not sure if that's as precise as sending a message from spigot

#

but again if a 50ms margin is fine for you then it's a good approach

tender shard
#

because 20 ticks per secod

#

pinging the server 20 times per second is pretty useless imho

#

isn't once per second more than enough?

icy beacon
#

tbh i still like my approach more

#

it might be heavier to setup but it feels slightly less clunky

hazy parrot
#

Tbh I would say that even 30secs is okay lol

paper viper
#

How can i let my plugin start before a other plugin?

icy beacon
#

loadbefore is a plugin.yml field i think

paper viper
#

fadein fadeout?

icy beacon
#

oh perhaps

paper viper
#

🤝

echo basalt
#

set fadein to 0 ticks

summer scroll
#

I'm trying to get entity default loottables, this is my attempt and this doesn't give me the items and I'm stuck here. The entity that I tried is a pig.

public Collection<ItemStack> getLoot(Entity entity) {
        LootContext context = new LootContext.Builder(entity.getLocation())
                .lootingModifier(1)
                .build();
        LootTable lootTable = Bukkit.getLootTable(entity.getType().getKey());
        if (lootTable == null) {
            return Collections.emptyList();
        }
        return lootTable.populateLoot(this.random, context);
    }
echo basalt
#

LootTables.valueOf(entity.getType().name()).getLootTable();

#

but you'll need special handling

summer scroll
#

What do you mean by special handling?

echo basalt
summer scroll
#

Oh damn, that's annoying

#

It's only for sheep right? I can only think of sheep.

echo basalt
#

p much

worldly ingot
#

I don't actually know why LivingEntity isn't Lootable

#

Wonder if that's possible

#

I suppose realistically it's EntityType that should be Lootable but meh. Bukkit structures entities weirdly

echo basalt
#

I mean

#

there's no EntityType.PINK_SHEEP afaik

#

so not entity type

worldly ingot
#

Yeah, so Entity would need to be

#
    public MinecraftKey getLootTable() {
        return this.getType().getDefaultLootTable();
    }```
Then overridden by sheep, obviously, to account for type
#

Definitely something we can add API for

summer scroll
#

Thanks for the help by the way.

raw crow
#

is there a way to change a native minecraft recipe? know i can register a new recipe by doing Bukkit.addRecipe(), but i want change a minecraft pre-existing recipe, more specific the axe recipe: i wanna add an attribute modifier to the result, is it possible? i tried adding the same recipe but with a different namespacedkey because register an existing key will thrown an exception, but it didn't work

summer scroll
worldly ingot
#

Oh there already is

#

Sheep extends Lootable (as do many other entity types)

tardy delta
#

thank you for giving me ideas for minestom

#

my current sheep logic is kinda weird

echo basalt
worldly ingot
#
public Collection<ItemStack> getLoot(Entity entity) {
    if (!(entity instanceof Lootable lootable)) {
        return Collections.emptyList();
    }

    LootContext context = new LootContext.Builder(entity.getLocation())
            .lootingModifier(1)
            .lootedEntity(entity)
            .build();
    LootTable lootTable = lootable.getLootTable();
    return lootTable.populateLoot(this.random, context);
}```
#

That simplifies your method a little

echo basalt
worldly ingot
#

Why? Anything that isn't Lootable won't have a loot table

echo basalt
#

just to make sure there's no funky hidden table

worldly ingot
#

If there is, it's a Bukkit bug

summer scroll
worldly ingot
#

Nope

tribal quarry
#

i have an issue on paper 1.19.3/4

remote swallow
#

?whereami

summer scroll
#

Ah alright, thank you so much ImIllusion and Choco.
I'll test it right away.

tribal quarry
#

ok

echo basalt
weak meteor
#

How to insert a string in h2?

#

stmt.setString doesnt exist

remote swallow
#

is stmt a PreparedStatement

weak meteor
#

yes

remote swallow
#

stmt.setString(1, 1stString) should exist

weak meteor
#

it doesnt

#

how can i add it?

#

lol

worldly ingot
#

H2 makes use of Java's SQL API afaik, so the only way setString() wouldn't exist is if you've declared the type as something more generic

#

Like Statement instead of PreparedStatement

quaint mantle
#

[10:03:58 ERROR]: Could not load 'plugins\GA.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:150) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136) ~[patched_1.12.2.jar:git-Paper-1620]
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:318) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:222) ~[patched_1.12.2.jar:git-Paper-1620]
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:616) ~[patched_1.12.2.jar:git-Paper-1620]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_361]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 6 more

#

thats the error i get

tender shard
weak meteor
#

create a plugin.yml

solid cargo
#

show plugin.yml

tender shard
solid cargo
#

oh it doesnt contain one

#

yheah

quaint mantle
#

it has the plugin.yml

tender shard
#

no

solid cargo
#

is it in the correct path?

weak meteor
#

src > main > resources > plugin.yml

worldly ingot
#

It probably has one but isn't being exported

young knoll
#

Or it's in the wrong spot

tender shard
#

are you using maven or gradle?

quaint mantle
#

prob

solid cargo
#

what ide do you use

quaint mantle
#

lemme send a screenie

tender shard
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

quaint mantle
#

Ops I can’t here

young knoll
#

?img

undone axleBOT
tender shard
solid cargo
#

egitto what IDE do you have

quaint mantle
#

Eclipse

solid cargo
#

mistake #1

tender shard
quaint mantle
#

Why

quaint mantle
tender shard
#

do you have a pom.xml? do you have a build.gradle file?

quaint mantle
#

Omg idk guys

solid cargo
#

CHECK

quaint mantle
#

I where

tender shard
#

how do you build your .jar?

quaint mantle
#

Where

quaint mantle
solid cargo
#

in resources i think

eternal oxide
#

are you using file -> export?

quaint mantle
#

Yes

tender shard
#

then you have to tell it to export the plugin.yml there somehow

young knoll
#

Where is your plugin.yml located

eternal oxide
#

then no maven nor gradle

quaint mantle
#

Wait lemme dm u the screenie

young knoll
#

If you are exporting directly it needs to be in the root project folder

tender shard
#

it'd be easier to switch to maven or gradle than to use eclipse's export .jar feature lol

solid cargo
#

get intellij

#

it also has a cool mc dev plugin

weak meteor
#

should this work?

quaint mantle
#

Omg I don’t get into this stuff, so how do I get verified so that I could send this screenie and explain?

weak meteor
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

tender shard
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

kind hatch
#

Do you have a spigot account?

solid cargo
#

have a spigot acc

eternal oxide
#

you can just right click your project and convert to maven

quaint mantle
#

!verify Egitto

undone axleBOT
solid cargo
#

lmao

quaint mantle
#

Omg do I need an account?

kind hatch
#

That's why we ask first.

quaint mantle
#

Lmao

weak meteor
quaint mantle
#

Ok lemme do an account

weak meteor
#

now

solid cargo
#

10 years later

weak meteor
#

should this work? lol

solid cargo
#

?tryitandsee

kind hatch
#

?tryitandsee

weak meteor
#

i think i need to delete stmt.execute

solid cargo
#

fuck

kind hatch
#

?tas

undone axleBOT
young knoll
#

Non prepared statement

#

Ahhhh

weak meteor
#

gotta try it

solid cargo
#

just ask gpt to convert to prepeared

misty current
#

is the nms version for 1.19.4 1_19_R3?

young knoll
#

yes

kind hatch
#

Yes

solid cargo
#

yes

misty current
#

thanks

quaint mantle
#

!verify Egitto

undone axleBOT
#

A private message has been sent to your SpigotMC.org account for verification!

solid cargo
#

BRO GOT IT YEEE

quaint mantle
#

Finally

#

So I right click on grief alert and export

solid cargo
#

wrong path looks like

#

(i think)

quaint mantle
#

Omg

#

So how could I fix the error

weak meteor
#

src > main > resources > plugin.yml

kind hatch
#

IIRC, the plugin.yml should be in your src folder.

solid cargo
#

yep

kind hatch
#

I use maven, haven't done the old method in a while now. :p

eternal oxide
solid cargo
#

rats rats we are the rats

#

good song

weak meteor
quaint mantle
weak meteor
eternal oxide
weak meteor
#

like this:

weak meteor
#

then idk

solid cargo
#

i think he will now have "failed to locate main class"

#

perhaps

eternal oxide
#

all he does is move plugin.yml into src folder and he's good to go

solid cargo
quaint mantle
weak meteor
#

yes

solid cargo
#

y e s

eternal oxide
#

no

solid cargo
#

wait what