#help-development

1 messages · Page 1271 of 1

eternal night
#

did you edit your global git config/ git exclude

lavish hare
#

Yes, but have had it for years

#
##############################
## Java
##############################
.mtj.tmp/
*.class
*.war
*.ear
*.nar
hs_err_pid*
*.jar

##############################
## Maven
##############################
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

##############################
## Gradle
##############################
bin/
build/
.gradle
.gradletasknamecache
gradle-app.setting
!gradle-wrapper.jar

##############################
## IntelliJ
##############################
out/
.idea/
.idea_modules/
*.iml
*.ipr
*.iws

##############################
## Eclipse
##############################
.settings/
bin/
tmp/
.metadata
.classpath
.project
*.tmp
*.bak
*.swp
*~.nib
local.properties
.loadpath

##############################
## NetBeans
##############################
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

##############################
## OS X
##############################
.DS_Store
*.icloud
#

That's my global ignore, to clarify

eternal night
#

Could try to temporarily move that

lavish hare
#

I'll try now, just in case

eternal night
#

tho nonthing in there looks too troublesome

#

but yea, iirc spigots build tool thingy does a git reset on the files there

#

spigotclip when @blazing ocean or whatever that thing was called

blazing ocean
#

I mean

#

it launches fine

#

the gradle plugin only needs working remapping

slender elbow
#

sir this discord is the house of MAVEN

#

ahem

eternal night
#

nice o.O

blazing ocean
#

IJ artifact plugin when

lavish hare
#

Damn

#

That was indeed it

#

Thank you good sir, I'd not have thought to go there

#

Much, much appreciated

eternal night
rotund ravine
rotund ravine
#

Useful for small stuff

#

That ur only testing / never gonna use again on a brand new pc without all ur logins to places.

grand flint
#

hey what would be the best way to update proxy without putting down the whole network?

#

i was thinking proxy on proxy but most the time it is unsupported so how should i handle it

remote swallow
#

there isnt really a way to do that, they have to be connected somewhere so best bet is pretty much pick the quietest time of night and have a 5 min downtime or smth

grand flint
echo basalt
#

transfer packet

grand flint
potent atlas
#

So you know the TextComponent click action suggest to put text in the player's chat bar? Can that be done from a GUI rather than clickable text? Thanks!

young knoll
#

No

potent atlas
#

Sad. ok

worldly ingot
#

Yeah that's basically all you got. Can't do it from an ItemStack or anything like that. Has to be text you can click with your mouse

torn shuttle
#

I am so annoyed by api prices of claude sonnet 3.7, it's good enough to do a lot of interesting things but about 10-100x to expensive to actually pursue them

mortal vortex
#

Their "pro" subscription already sucks, when it only gives you double prompts as free.

#

Even if you try with openrouter, just using their API, the amount of credits used fucking sucks

sly topaz
#

that's why I didn't even bother trying AI code editors like windsurf or cursor

#

I'd rather not know whether it can be useful to me or not, I can hold off till it gets to a far more reasonable price

steel wharf
#

java.util.ConcurrentModificationException: null on Bukkit.getOnlinePlayers (many concurrent tasks call the method)

#

the issue occurs when there is about 100 players on server and they quit join pretty often

sullen marlin
#

The javadocs literally say it's not thread safe (like almost every method)

steel wharf
#

then Collections#unmodifiableCollection would fix the issue?

sullen marlin
#

No because that just wraps it in a version that doesn't allow modification

steel wharf
#

but i create a copy of the collection that will be independant later

sullen marlin
#

If you do that sync, sure

quaint mantle
#

Cannot access built-in declaration 'kotlin.Unit'. Ensure that you have a dependency on the Kotlin standard library

#

does someone know why this is happening

#

when im trying to build the project

blazing ocean
quaint mantle
#

nvm

empty ferry
#

Hey, very newbie question but should Spigot and Bukkit package versions match?

blazing ocean
#

wdym

empty ferry
#

Sorry my bad, I was using some old maven template to initialize the project, for some reason it was adding both bukkit and spigot. Looks like you only need spigot.

blazing ocean
#

Yea

buoyant viper
thorn isle
warm mica
torn shuttle
#

this is really starting to get annoying

blazing ocean
#

I think it may need itemsadder support

dawn flower
#
modifyUser(user ->
  user.setPrimaryGroup(rank.getGroupName())
);

private void modifyUser(Consumer<User> consumer) {
  getUserManager().modifyUser(uuid, consumer);
}

why isn't this changing the player's rank? luckperms api btw

torn shuttle
#

1.21.5 is 1_21_R4 right

#

or am I tripping

ivory sleet
dawn flower
#

wait lemme check

#

fail

ivory sleet
#

whats the rank.getGroupName()?

#

iirc it has to be a valid group node that the user has already

#

group node by group id, not display name or some other name

dawn flower
#

i want to give the player that rank

#

he doesn't already have it

ivory sleet
#

user.data().add(inheritance node here)

#

i think?

#

and then u can ofc apply that node to be the primary group after ^^

slender elbow
#

by default the primary group is calculated based on the parents' weight

#

so the setPrimaryGroup method is a noop basically

ivory sleet
#

oo

torn shuttle
#

did something about display entities change in 1.21.5?

#

oh

#

what

#

view range defaults to 1

#

width and height default to 0

#

@echo basalt yo

#

did you fix your stuff to work for 1.21.5 displays

near furnace
#

Is it possible to make a plugin that can host a web panel and allow two-way communication between the plugin and the panel? For example, the web panel sends data to the plugin (like commands), and the plugin can process it, respond, and also send data back to the panel in real time. Can both sides actively communicate and work together like that?

#

Was thinking about making a plugin that lets you execute commands and modify files through a web interface

true cosmos
#

Sure you can run a spark sever with endpoints

paper viper
#

Of course, you can send api requests back and forth ^

#

on localhost

near furnace
#

I was told, it is really "vulnerable" and the only way will be to require three active ports which will make the plugin inaccessible to a lot of people

paper viper
#

you can host the plugin and the web server on the same port

#

why would you need 3?

true cosmos
#
        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-core</artifactId>
            <version>3.5.5</version>
        </dependency>
near furnace
paper viper
#

Yes

true cosmos
#

not sure about the version though

paper viper
#

i'm not sure what people mean by vulnerable though

near furnace
#

wait a sec

#

oh yea one thing

#

will docker containers mess it up?

#

like most people use pterodactyl sooo

#

i want to make the plugin public, so it has to support people's needs yk

paper viper
#

No

near furnace
#

it won't mess it up?

paper viper
#

Yes

near furnace
#

wait my guy is saying using endpoints will be vulnerable, lemme get his reasoning

#

"i mean, for endpoints, can't anybody access that? since the server can as well (by simpler means, since the server sends data to the web server, why can't anybody else do the same?)"

paper viper
#

tf

#

just keep them localhost

#

actually hm, maybe that would mean open just one more port

#

just reserved for that not accessible to public

near furnace
#

isn't pterodactyl run on dockers

#

"docker and the host can't interact with each other
by just using-"localhost"
the port is opened on the host"

#

@paper viper dont leave me out here man

paper viper
#

In that case, create an endpoint but enforce security policies

#

like IP address filter, credentials

#

I mean just don't make your endpoint vulnerable in the first place really

near furnace
#

he replied with the triple question mark

#

"did you tell them it's a public plugin?
also verification is literally not possible
since there is no api
except you want to embed the password on the web server, sure"

unreal quartz
#

How about that person join this discord server

near furnace
#

told him

#

doesn't wanna join

#

thinks joining spigotmc will just result in an pointless argument

paper viper
#

i mean im not going to talk to someone thats just in quotations

#

i have other things to do

near furnace
#

alright sorry for wasting your time

#

i'll arrange a proper meeting later

paper viper
#

i dont want to take things to dms, sorry

mint nova
#

the best way to storage player data? like health or custom for example idk money, mana?

paper viper
#

but i mean what i said is basically essential to like any endpoint out there

#

just add authentication like api keys, enforce security policies like filters

near furnace
#

and caching

#

i guess

mint nova
#

so like adding uuid to idk storage.yaml file when player first join ye?

#

and then some data

near furnace
#

yes

mint nova
#

ty <3

near furnace
#

np ❤️

umbral ridge
#

[20:28:56 INFO]: ServerSeekerV2 (/45.135.194.65:57894) lost connection: Disconnected

paper viper
#

theres a ton everywhere

#

fuck them

umbral ridge
#

GET OUT OF MY SWAMP serverSeekerv2

#

yea

#

I had one player join before

#

and was asking if he can play and was asking about the server

pure dagger
#

how to distinguish blocks that were generated in the world, from the ones that player placed, or idk enderman or when lava and water make cobblestone

#

is there a way or do i have to mark them in the events like BlockPlace etc

somber scarab
pure dagger
#

i could add pdc to blocks placed by human, placed by enderman, generated by water and lava, i dont know if thats the same event, and if there are more cases, ill check

somber scarab
#

wel.. start with the placeBlockEvent and keep adding based on your needs

solid lake
#

guys can someone know why if i disconnect and reconnect on my server, all scoreboards disappear and GUI don't working ! I use NMS for my TabList scoreboard and bukkit scoreboard for my sideboard but idk why this glitch continue to destroy my life...

true cosmos
#

I use oauth to authenticate users on my endpoints

#

Minecraft doesn't provide user oauth but discord and patreon and twitch do

somber scarab
#

when a player disconnects, they remove all server related states/data

#

so on join, you need to resend it

#

I'd make a Scoreboard Manager that keeps track of "the" scoreboard and just send out copies to all players that join/need it

solid lake
#

i send the scoreboard to the player every time he join

somber scarab
#

any errors?

solid lake
#

no errors x)

somber scarab
#

then debugging time

solid lake
somber scarab
#

check if the code sending to the player actually triggers

solid lake
somber scarab
#

is the scoreboard filled?

#

right before you send it make sure its actually filled

solid lake
somber scarab
#

send the relevant code

solid lake
#

okay

somber scarab
#

on pastebin

#

?paste

undone axleBOT
solid lake
#

with the link ?

somber scarab
#

paste your code and send the link after you click "create"

solid lake
#

okay

#

i dont have create i just have save

#

i save it and send you the link ?ù

somber scarab
#

sure

solid lake
#

i send all the class you need i think, if you need another ask me

somber scarab
solid lake
somber scarab
#

but where do you send it to the player?

#

ah found it

solid lake
#

oh no its in playerJoin

somber scarab
#

sorry for the delay btw

#

but I don even find any "setSlot"

solid lake
solid lake
somber scarab
#

is the joining player a "gameplayer"?

#

aka is gamePlayer != null

#

on line 33

solid lake
solid lake
cosmic elk
#

Im experience a weird issue with player profiles, when I set a new PlayerProfile to a player with a new name it wont allow the player to be referenced via commands til they respawn in some way, someone told me that this is due to the cache not updating when you do the player.setPlayerProfile(); but im not sure if im comfortable reloading the player via a death unless its my only option, could I just update the cache myself somehow?

torn shuttle
#

tf did mojang do to my display entities

#

has anyone played with them in 1.21.5?

rough ibex
#

Not many regularly play with their display entities

#

Wiki records no changes

#

Possible regression?

torn shuttle
#

they logged changes in their update log

#

but I can't get them to uh

#

display

#

I think

#

hard to tell

rough ibex
#

I believe you need to send a new packet to tell the client this player changed or a new player is present

#

let me check

torn shuttle
#

hmmm

paper viper
#

I'm not sure if theres another packet besides faking death

torn shuttle
#

maybe the problem is with my packet or smth

cosmic elk
cosmic elk
#

here is the method I have that is meant to give players a new profile

public void setPlayerName(Player player, String newName) {
        PlayerProfile oldProfile = player.getPlayerProfile();
        PlayerProfile profile = Bukkit.createProfileExact(oldProfile.getId(), newName);

        profile.setTextures(oldProfile.getTextures());
        profile.setProperties(oldProfile.getProperties());

        player.setPlayerProfile(profile);
        player.setDisplayName(newName);
        player.setCustomName(newName);
    }
somber scarab
torn shuttle
#

ok yeah nvm seems like something about 1.21.5 broke packets

solid lake
somber scarab
solid lake
somber scarab
#

try to add the debug logs inside your update task

#

and disconnect then reconnect

solid lake
solid lake
light quiver
#

Anyone help please I dont know what this type of plugin is called, I want to one hit kill mobs that are stacked so that you can kill stacked mobs way faster because there is a delay before you can hit a mob again and you cant instantly kill them, I want it to be instant kill one mob and no delay before next hit
please @ me

somber scarab
#

so that's something to investigate

#

try and see when it creates and when it closes

solid lake
#

i literally create it when player connect same as plugin launch and didnt work when player join ?? just why ? x)

somber scarab
#

put debugs all over

solid lake
#

im so confused i cant even use my brain

#

i just put debug every line im tired of this plugin

somber scarab
#

its okay just take a break

solid lake
#

yeah i will

somber scarab
#

its like almost midnight for you prolly

solid lake
#

ty for your help i will send you news later

somber scarab
#

np

light quiver
#

Anyone help please I dont know what this type of plugin is called, I want to one hit kill mobs that are stacked so that you can kill stacked mobs way faster because there is a delay before you can hit a mob again and you cant instantly kill them, I want it to be instant kill one mob and no delay before next hit
please @ me

somber scarab
cosmic elk
light quiver
cosmic elk
#

sorry if im being bothersum just no idea what to do here

rough ibex
#

Sorry man I'm not on a payroll haha

#

Busy busy

somber scarab
#

or #general

light quiver
#

oh yea mb

cosmic elk
#

dw about it though

rough ibex
#

I don't see a setPlayerProfile method

#

are you sure that's available to you

somber scarab
#

lmoa

cosmic elk
somber scarab
#

how is it even building?

rough ibex
cosmic elk
rough ibex
#

I do not see it

cosmic elk
#

here let me check

#

1.21-R0.1-SNAPSHOT

#

if im correct thats 1.21.1 right?

somber scarab
#

oh

cosmic elk
#

what?

somber scarab
#

you mean

#

OfflinePlayer

#

@rough ibex

cosmic elk
#

i dont think so

rough ibex
#

that's get

#

he uses set

somber scarab
#

ahh

cosmic elk
#

oh wait sorry yeah, im using paper, im just asking questions here because i already asked ppl over on the paper server and i couldnt get much help there so i was hoping i would get some here

somber scarab
#

past the whole thing

cosmic elk
# somber scarab what are you trying to achieve

rename players, i dont want to deal with possible async issues with getting an entity to ride a player with a changed nametag, or use protocollib, i tried doing that for almost a week and had no luck

somber scarab
#

and I don't think there's a way without keeping track of it yourself

#

buit it shouldnt be that hard

cosmic elk
cosmic elk
cosmic elk
#

so if a player is named random_name then i do /kill random_name, it wont work

#

but if i kill them first, or just use there original name before they reload it also works

somber scarab
cosmic elk
#

well of course, but the issue isnt with respawns itself

#

its with how only after a respawn it will update the servers cache

#

not when i do .setPlayerProfile()

rough ibex
#

Ohhh paper

#

?whereami

rough ibex
#

No damn wonder it's not in spigot javadocs.

cosmic elk
#

but like i said

#

i already asked ppl on paper, I was hoping someone here could help despite that

#

TL;DR im desperate

rough ibex
#

sorry youre dealing with a paper-specific method

cosmic elk
#

crap

#

well thanks anyways

stuck oar
#

Anyone know why I dont have Attribute.GENERIC_MAX_HEALTH in 1.21.4? Was it removed

chrome beacon
#

Just renamed to match vanilla

sullen marlin
torn shuttle
#

but that laaaame

echo basalt
#

Took a nap woke up to a million pings

torn shuttle
#

kinda got it back kinda not

#

it's not behaving like before

#

and it's only on 1.21.5

#

wtf mojang

#

what did they even do

#

I don't get it

buoyant viper
#

Mojank

hard socket
torn shuttle
hard socket
#

I am thinking of bunch of armor stand but that just would kill the server ig

young knoll
#

Display entities

#

And matrix math

grand flint
nova notch
#

doesnt that shit cost like 40 dabloons

grand flint
#

worth 100%

dull vigil
#

I got a problem, one of my staff ran the purge code /asadmin purge [TimeInDays] and delted liek 1000 islands before we stoped him, is there anyway to undo that without rolling back the server

slender elbow
#

backups 🙏

dull vigil
#

😭

#

No simple ish way?

grand flint
#

Like coreprotect

dull vigil
#

since it was like

#

last night

#

Can i bring back islands without effecting peoples work

dull vigil
grand flint
dull vigil
#

We probably have backups of the server but we dont want to set peoples work back

grand flint
#

Then no

dull vigil
#

are you sureee 🥺

grand flint
#

Also tf is /asadmin purge

dull vigil
#

is there anyway to see what islands are purged

grand flint
#

Why would that be a command and why would you give it to admins

dull vigil
#

Uh

grand flint
#

Idk what islands you are talking about

dull vigil
#

He pulled up the wiki

grand flint
#

So, why does he have permission?

dull vigil
grand flint
#

If you are talking about a plugin go contact the developer and ask him

dull vigil
#

it was someone elses accont that got hacked

grand flint
#

Still shouldn't have permission

#

Idk?

dull vigil
#

💀

#

me fr

grand flint
#

:D

dull vigil
#

😄

grand flint
#
  1. Always have backups daily
  2. Have coreprotect imo its the best one
  3. Secure your account..???????
  4. Don't give op
#

If you want to revert the stuff there is 2 things,
you can either make players lose a bit of progress but give them something in return, like coins, gems or whatever

#

or you can lose 1000 islands and continue LMAO

#

ask the developer first

#

click the ask questions get support on the plugin page

dull vigil
#

im slow af

grand flint
#

on the plugin page

#

on the right side

dull vigil
#

I might be blind

#

found it

#

thanks

#

idk how to oask a quesion -.-

#

holy sdhit im so incompitent

#

Found it

#

🤩

#

i so prid

#

proud

hard socket
#

If magma guy is ok to share an example for me

vast ledge
drowsy helm
#

It’s open source

somber scarab
#

I'm getting this Error when loading WorldGuard with FAWE

#

oops too big

#

?paste

undone axleBOT
somber scarab
#

omgg

rotund ravine
#

Ask on FAWE disc

somber scarab
#

okay so I just finally made fawe work without any apparent bugs or errors.. it actually sped up my game terrain generation by like.. 7x or so.
But this comes at compatibility costs:

My plugin has to support paper only.
Fawe has to be used and not world edit. (otherwise, massive server lags happen)

#

I don't have a code issue, like I said no errors and it actually works good (so far)

but now I feel like I blocked many people who run spigot/world edit on their server

#

my question is, how common is it for plugins to only support one plugin loader (paper) and only fawe?

pure dagger
#

Can i save players' mo eh amoung to config or do i have to use database?

somber scarab
#

I don't want to needlessly add dependencies and cut support when there could be other ways

pure dagger
#

Ooos

#

Oops*

#

Money amount

drowsy helm
#

yes you can definitely save it to a config

tranquil beacon
slender elbow
#

lol why is the resources api broken

tranquil beacon
#

it works for me

slender elbow
#

oh this crap is paginated

#

why does it put the oldest versions first -.-

mortal vortex
slender elbow
#

yeah, and if you wanna get the info of the latest update you have to figure out the page that contains it

#

anyway, you can just getResource instead of getResourceUpdates, then get the current_version

tranquil beacon
orchid furnace
#

Hey, I'm trying to make minecarts go faster but the carts are having trouble going up inclines. I'll attatch a video of whats happening. Does anyone know how I can fix this?

I think its something to do with velocity? not sure though

The code I've got is

    public void onMinecart(VehicleMoveEvent e) {
        if (e.getVehicle() instanceof Minecart) {
            Minecart cart = (Minecart)e.getVehicle();
            cart.setMaxSpeed(1);
        }
    }```
pseudo hazel
#

why not use the experimental minecart datapack

orchid furnace
#

I'm not sure how to set that as the server im wanting this on didnt have the gamerule to begin with and im not sure how else to sort of edit it

pseudo hazel
#

you have to edit the level.dat in a nbt editor to enable the datapack retroactively

orchid furnace
#

I'll have a look at that thank you

orchid furnace
zinc moat
#

Does anyone have some expirence with CommandAPI as im trying to use it with maven but i dont see anything in documentation for maven or anything, Any help would be appricated 😄

slender elbow
zinc moat
#

I know i red it a few times but cant figure out how to use it in my maven build system

#

omg im dumb mb

slender elbow
#

toggle the toggle on the right to maven

zinc moat
#

yes i just saw that thanks tho!

slender elbow
#

that's kinda neat

#

but not very obvious

zinc moat
#

yeah

dawn flower
#

i forked fancyholograms and made it so i can make glowing holograms but for some reason

        byte sharedFlags = fsDisplay.getSharedFlags();
        if (data.isGlow()) {
            fsDisplay.setSharedFlags((byte) (sharedFlags | 0x40)); // enable glowing
        } else {
            fsDisplay.setSharedFlags((byte) (sharedFlags & ~0x40)); // disable glowing
        }```
these lines makes all holograms disappear as if they don't exist, regardless if they glow or not

https://paste.md-5.net/kagaruyoci.java
#
    public byte getSharedFlags() {
        return (Byte)this.sharedFlagsData.getValue();
    }```

it returns a byte but it can be null
#

can that be the issue

dawn flower
#

fixed it, it was actually because it returned a null byte so i added a try-catch block

warm mica
dawn flower
#

not mine

paper viper
#

also consider doing a PR

craggy moss
#

Hi

#

I need a dev to help me make a plugin please

#

``package com.example.sololeveling;

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.CommandExecutor;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.Location;

import java.util.HashMap;
import java.util.Map;

public class SoloLevelingPlugin extends JavaPlugin implements Listener {

private ManaSystem manaSystem;

@Override
public void onEnable() {
    this.manaSystem = new ManaSystem();
    getServer().getPluginManager().registerEvents(this, this);
    getCommand("rank").setExecutor(new RankCommand());
    getCommand("skill").setExecutor(new SkillCommand());
    getCommand("mana").setExecutor(new ManaCommand());
    getLogger().info("Solo Leveling Plugin Enabled!");
}

``

#

I can't send it all 😭

sonic goblet
undone axleBOT
craggy moss
#

Ok thanks

#

?paste

undone axleBOT
craggy moss
#

?paste

undone axleBOT
craggy moss
#

Paste

#

DUDE WTD

worldly ingot
# craggy moss How do I paste?

Open the URL sent above, paste your code into that website, then press the save button (Or Ctrl+S/Cmd+S), then copy/paste the URL here

#

A brief description really should be sent in that message

orchid trout
#

this man isnt real

sly topaz
#

then again, I can't fault someone for not knowing how a pasting service works

orchid trout
#

hes also probably not even 10

worldly ingot
#

Those pasting services are not really self-explanatory

#

The URL changing isn't obvious and it's not auto copied on save. Some browsers even truncate the URL by default (*glares at Safari*)

blazing ocean
#

auto copies the url and usage is super obvious

blazing ocean
warm mica
remote swallow
#

right hes back then

#

@worldly ingot

#

2nd time

#

cc @ivory sleet and @young knoll

blazing ocean
#

this is like the third time I've messaged con about this

chrome beacon
remote swallow
#

i did

craggy moss
#

Here

remote swallow
#

?services

undone axleBOT
craggy moss
remote swallow
#

no one is going to spoonfeed you that entire plugin for free or help you make it with chatgpt

#

hire a dev

craggy moss
#

Aight don't worry

#

I just want a plugin for my smp with my friends 🙂

toxic sage
#

Can I find a list of event ids somewhere? 😄

        @Override
        public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
            if (msg instanceof ClientboundEntityEventPacket packet) {
                byte eventId = packet.getEventId();
                super.write(ctx, msg, promise);
                return;
            }
        }
trim lake
#

Hi, When I have this code sound should play right? Is playing some sounds but some not. Ex. this does not work

public static void playSound(Player player, String soundStr) {
        String[] sound = soundStr.split(";");
        player.playSound(player.getLocation(), sound[0].toLowerCase(), Float.parseFloat(sound[1]), Float.parseFloat(sound[2]));
}
SoundUtils.playSound(player, "ENTITY.EXPERIENCE.ORB.PICKUP;1;1");

But this does:

SoundUtils.playSound(player, "ENTITY.PLAYER.LEVELUP;0.25;1");
warm mica
next plume
#

Someone submitted a pull request to one of my plugins which adds PlaceholdAPI support. How can I test it to see if his code works?

undone axleBOT
young knoll
sullen marlin
#

why are you using strings for this anyway? There's a Sound enum

next plume
young knoll
#

What does your plugin do

sullen marlin
#

I think placeholderapi has a test command

#

/papi debug or something

young knoll
#

Yeah there is /papi parse

next plume
#

He added a placeholder so my plugin can return a string to other plugins.

trim lake
remote swallow
#

Mods you should scroll up slightly

sullen marlin
#

its ENTITY.EXPERIENCE_ORB.PICKUP

trim lake
#

it was complaning when it was uppper case

sullen marlin
#

but you should not be hardcoding strings in your code

trim lake
#

its not hardocded in code, its just for showcase and testing, its loading from config file

young knoll
#

You shouldn’t use valueOf either

#

Use Registry.SOUNDS.match

#

Then you can just use the in game sound key

#

(With or without the minecraft: prefix)

trim lake
#

when it upper case

trim lake
next plume
trim lake
#

oh I see it now...

sullen marlin
#

whether you use _ or . is important

#

my name is md_5 not md.5

trim lake
#

yea, I saw that now... sorry

#

working, ty so much!

next plume
next plume
#

Now I know why it's called a pull request. I'm pulling my hair out.

worldly ingot
#

Depends where you go. Some places call them merge requests

#

Some change requests

slender elbow
#

I call them Joel

worldly ingot
#

Sometimes you just need to give them proper names, you're right

slender elbow
#

Choco

#

What are your top 5 most memorable games you've played?

buoyant viper
#

theyre called pull requests because

#

u pull at the devs heartstrings when u request they change their code

worldly ingot
#

Honourary mentions to Assassin's Creed Origins, Dyson Sphere Program, and Hogwarts Legacy

#

Also excluding Minecraft, but Minecraft is probably where I have my fondest memories

slender elbow
#

oh man, ACBF was fire

worldly ingot
#

frfr 🗣️ 🔥

slender elbow
#

Far Cry 3 too, whee

worldly ingot
#

Spider-man made me cry like a lil' baby

#

All three of them did tbh

#

Insomniac knows how to make games

earnest girder
#

is using NMS as simple as adding a dependency to maven?

eternal oxide
#

?nms

earnest girder
#

how do I get buildtools.jar?

#

I have .exe

eternal oxide
#

?bt

undone axleBOT
eternal oxide
#

look at teh CLI section

earnest girder
#

okay I ran java -jar BuildTools.jar --rev 1.21.4 --remapped and got a whole Spigot server folder. Do I need to do something with one of these .jars?

#

before i update the dependency?

eternal oxide
#

no

strange ibex
#

can someone help me fix the spreading with holding right click not adding the items and only adding to the last one touched? Im using protocolib and adding worth to the lore of the item. stacking works fine but the spread doesnt

smoky anchor
undone axleBOT
#

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

ocean gorge
#

I have some problems with carrots and potatoes interacting with entities

#

i'm trying to sell the vegetables I've collected to an NPC, it works with blocks (e.g. pumpkin/watermelon), but not with carrots/potatoes which are ingestible instead

#

Using Spigot API 1.20.1

smoky anchor
#

And what is the problem ?
What happens, what you expect to happen ?

ocean gorge
#

when the player interacts with these vegetables he gets the balance in his account, the system is almost working, in addition i checked if it is carrot and potato, but nothing happens

smoky anchor
#

Show the code for the check

ocean gorge
#

Problem solved

smoky anchor
sonic goblet
#

Steve is on a mission

ocean gorge
smoky anchor
pseudo hazel
#

💀

glossy laurel
#

Chat

#

I have a class

#

And I want it's children to have different constants

#

So i just created a method in the parent that children have to override and return the constant

#

Is there a better way to do this?

sullen marlin
#

Sounds fine

drowsy helm
#

It’s an OOP approach

glossy laurel
#

Oop meaning?

drowsy helm
#

You could also pass it in the super constructor but that approach is a little cleaner imo

glossy laurel
#

Nvm googled

drowsy helm
#

Object Oriented Programming

glossy laurel
#

Trust

pseudo hazel
#

thats the only usecase for a getter (i will not die on that hill but its true)

random forge
#

Guys. can i manually update a plugin with a source code? the plugin is not updated to the latest versiom and i want to update it manually

chrome beacon
#

Yes you can

random forge
#

Im not familiar with java but is it hard?

chrome beacon
#

Depends on the plugin

#

If you've never worked with Java I suggest you hire someone to update it for you

random forge
#

I got no money XD

chrome beacon
#

Time to look for a replacement or get familiar with Java then

thorn isle
#

there's a command that links a bunch of java tutorials

blazing ocean
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

hard acorn
#

Not really API-related but just Java. I have a static registry list of custom classes that's populated on startup, and I later reference it to instantiate a desired Ability. The abstract Ability class has only one constructor that has no arguments pass in, and all currently-existing subclasses are the same way. However, java insists that the declared constructor requires arguments. Is there a fix to this problem, or is there some other way to accomplish what I'm doing without a declared constructor?

    public static Ability create(int id) {
        Class<? extends Ability> clazz = ABILITIES.get(id);

        if (clazz == null) {
            throw new IllegalArgumentException("No Ability found with id " + id);
        }


        return clazz.getDeclaredConstructor().;
    }
thorn isle
#

java insists that the declaerd constructor requires arguments
elaborate

#

are you talking about the Constructor::newInstance method which takes a varargs object array?

thorn isle
#

the documentation on the method is quite clear

#

specifically

#
     * <p>If the number of formal parameters required by the underlying constructor
     * is 0, the supplied {@code initargs} array may be of length 0 or null.
#

so... supposing the constructor really has no parameters (and isn't an inner class), pass a zero-length array or null

#

or are you getting an error when doing that? if so, include the error and stack trace

hard acorn
# thorn isle or are you getting an error when doing that? if so, include the error and stack ...
[11:07:49 WARN]: java.lang.NoSuchMethodException: hollex.mCZ.abilities.spells.FireballAbility.<init>(null)
[11:07:49 WARN]:     at java.base/java.lang.Class.getConstructor0(Class.java:3761)
[11:07:49 WARN]:     at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2930)
[11:07:49 WARN]:     at MCZ-1.0-SNAPSHOT-all.jar//hollex.mCZ.abilities.AbilityRegistry.create(AbilityRegistry.java:36)
[11:07:49 WARN]:     at MCZ-1.0-SNAPSHOT-all.jar//hollex.mCZ.commands.zBootstrap.logicGiveAbility(ZombiesBootstrap.java:85)
...
#
    public static Ability create(int id) {
        Class<? extends Ability> clazz = ABILITIES.get(id);

        if (clazz == null) {
            throw new IllegalArgumentException("No Ability found with id " + id);
        }

        try {
            return clazz.getDeclaredConstructor((Class<?>) null).newInstance();
        } catch (Exception e) { e.printStackTrace(); }
        return null;
    }

updated function

#

ignore the return null it's just to let the stack trace print

thorn isle
#

mmm see what you're doing here is that you aren't passing null or a zero length array, you're passing an array of length 1 with the first element set to null

#

you'll want to cast that null to Object[] instead

#

or alternatively pass an empty array with new Object[0]

eternal oxide
#

or just leave ti null with no cast

thorn isle
#

i think that will probably emit a compile time error since it's ambiguous whether that's an array with a null in it or a null array

#

varargs are kind of ass

hard acorn
thorn isle
#

let's see the warning

hard acorn
#
C:\...\src\main\java\hollex\mCZ\abilities\AbilityRegistry.java:36: warning: non-varargs call of varargs method with inexact argument type for last parameter;
            return clazz.getDeclaredConstructor(null).newInstance();
                                                ^
  cast to Class<?> for a varargs call
  cast to Class<?>[] for a non-varargs call and to suppress this warning
Note: C:\...\src\main\java\hollex\mCZ\commands\ZombiesBootstrap.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
#

Ah wait

thorn isle
#

oh so you're not talking about newInstance, but getDeclaredConstructor

hard acorn
#

declaredconstructor is the problem

thorn isle
#

same thing applies

#

since it's a varargs call you should be able to do just getDeclaredConstructor() without any parameters

hard acorn
thorn isle
#

if that emits a runtime error, include the error and the stack trace

hard acorn
#

It's a compiletime error

thorn isle
#

what's the error

hard acorn
#

It may be working now? I got another error but it looks to be from something else

#

I think I just needed to wrap it in a try catch before, which is strange cause I definitely did that before

#

wait a minute

#

Nah it's from the same thing

#

AHAHA

#

It's because the ability itself is failing to construct because of a failing method

#

Dolthead me

stuck oar
#

How can I attatch a armorstand to a player to display something like this: 20 / 20 (hp), I have something right now but it jitters

#

nvm i forgot to stop the playerMove updating it

paper viper
#

Use a text display

stuck oar
#

Didnt know it existed, thanks ill have a look at it

stuck oar
paper viper
#

Yes

stuck oar
#

Alright ill just use that then, thanks

stuck oar
stuck oar
# paper viper Yes
        TextDisplay tag = tags.get(target.getUniqueId());

        if (tag == null || tag.isDead() || !tag.isValid()) {
            spawnTag(target);
        } else {
            updateTag(target, tag);
        }
    }

    private void updateTag(Player target, TextDisplay tag) {
        Location loc = target.getLocation().clone().add(0, cfg.getOffset(), 0);

        if (tag.getWorld() != target.getWorld() || !tag.getLocation().equals(target.getLocation())) {
            tag.teleport(loc);
        }

        tag.setText(formatHealth((int) target.getHealth(), (int) target.getMaxHealth()));
    }```

i have this but its not smooth and a bit delayed
sly topaz
#

if you are using text displays, you're better off depending on the client-side interpolation for a smooth transition

#

though most people just choose to mount the text display, is there a reason you choose teleporting instead?

thorn isle
#

mounting stuff on the player is a bit involved because the spigot server will refuse to teleport any player that's mounted by an entity

stuck oar
sly topaz
thorn isle
#

i have a feeling we've gone through this tango already

sly topaz
#

and set the interpolation duration to something sensible

glossy laurel
#

Guys, why does right clicking a block also call left click event?

stuck oar
#

You gotta do something like if interaction is rightclick

#

Action.rightclickblock

#

I think

glossy laurel
#

yes

#

but it fires 2 events

#

one for right click block

#

one for left click block

sly topaz
#

interact event fires twice, one for each hand

glossy laurel
#

💀

#

lmao that's funny actually

glossy laurel
stuck oar
sly topaz
glossy laurel
sly topaz
#

all of this is mentioned in the event's javadocs

sly topaz
glossy laurel
#

sweet

#

also, how can it be null?..

stuck oar
#

Or is that unrelated

glossy laurel
sly topaz
glossy laurel
#

oh right 🤦‍♂️

#

btw, why is pressure plate event groupped with click events? that always seemed so weird to me

sly topaz
#

because it isn't a click event, it is an interact event

remote swallow
#

ass pressure

sly topaz
#

it just so happens that most player interactions are made by clicking

remote swallow
glossy laurel
#

💀

thorn isle
#

lmao

buoyant viper
#

Ass pressure

stuck oar
#

is there no way to just attatch it to the player?

sly topaz
stuck oar
#

isnt that depricated

sly topaz
#

mounting entities? No, it isn't

stuck oar
#

if your talking about setPassenger() then yah but is there another way?

sly topaz
#

teleporting and mounting are the only ways

stuck oar
#

please could you define mounting

#

the only thing i can think of is addPassenger()

sly topaz
#

yes, that's essentially it

#

you just add the text display as a passenger of the player and it'll follow them

young knoll
#

setPasseneger is from when entities could only have one passenger

#

Now they can have infinite

stuck oar
#

so addPassenger() isnt deprecated?

young knoll
#

Well, probably 2^31 -1 but yknow

sly topaz
#

it is not, no

young knoll
stuck oar
#

oh thats my fault sorry

#

ty

sly topaz
#

Jish, can you teleport entities which have passengers or does the server block it like when trying to teleport mounted entities

#

vcs2 brought it up before and I honestly can't remember the behavior

#

I honestly remember the server just being like, fuck passengers and dismounted them before teleporting but not outright cancelling the teleportation

stuck oar
#

probably blows up

#

or just spams nulls everywhere

#

spigot loves that

young knoll
#

You cannot afaik

#

It just does nothing

sly topaz
#

welp, choose your poison then

#

there was a plugin which more or less fixed that behavior but I don't remember what its name was

stuck oar
#

with addPassenger() im assuming i cant move it around

sly topaz
#

you can't quite do that normally, but since display entities are transformable, you can apply a transform to set it to a specific offset

stuck oar
#

alright tanks

#

thanks

young knoll
#

The transformation doesn’t automatically rotate with the vehicle entity

#

Sadly

stuck oar
#

what do you mean?

sly topaz
#

doesn't that get fixed by setting billboarding, or not

#

or do you mean vertically

young knoll
#

Translation is applied before the billboard

buoyant viper
#

just like

#

dismount all passengers

#

teleport them all

#

remount all passengers

#

???

#

Profit.

stuck oar
#

its showing me the blocks behind another player

sly topaz
stuck oar
#

i mean its like

#

seeing through the body of another player

sly topaz
stuck oar
#

thanks

#

its not the text its the background

#

cant seem to see anything about background being seethrough

#

just says the text

sly topaz
young knoll
#

The background colour supports alpha

stuck oar
#

what does that do

#

Color.fromARGB(0)

will this seethrough players bodies or just be a opaque background

#

transparent

#

not opaque

sly topaz
stuck oar
#

transparent

sly topaz
#

then 0 is fine

warm mica
young knoll
#

Which is black

#

But with 0 alpha so the colour doesn’t really matter

sullen marlin
#

Dammit you already said that

young knoll
#

Infinite doesn’t really exist for computers, you know this!

#

Just assume when I say infinite it’s actually the 32/64 bit integer limit

obsidian ledge
#

looking for dev for a new mc server

rough drift
young knoll
#

I don’t think java uses biginteger for array length

rough drift
#

(just make a BigList implementation smh)

slender elbow
#

all I ever wanted is BigInteger.MAX but java refuses to add it for some reason

rough drift
slender elbow
#

just buy more ram?

#

i don't see the problem

rough drift
slender elbow
#

just buy more? lol

blazing ocean
#

just download more ram

wet breach
thorn isle
#

iirc it's backed by a long array so probably 64*2^31 bits

#

though i don't remember if it also involves radix shifting logic in which case god only knows how high it can go

blazing ocean
#

that's like 17tb

wet breach
#

the theoretical limit of an int[] is 2,147,483,647 but this is also implementation dependent as well

thorn isle
#

i'm not so sure, at least it can't be any higher than that, since passing long for an array index is a compile time error

#

fastutil does have BigLists and long-indexed arrays that are implemented as arrays of arrays, but that's quite different

wet breach
#

as far as I am aware Java does not impose any hard limits

#

the only thing would be to keep the object small enough so that sizeof wouldn't overflow but even if the object is so large it would overflow it wouldn't prevent the object from existing or other functions being able to still be performed

thorn isle
#

the jvm might load and work with bytecode that accesses array indices beyond max int (though i doubt this) but i don't think any compiler will agree to emit such bytecode

wet breach
#

have no idea

#

this isn't exactly something I have thought on testing out or really having issues with lmao

#

I can only go by what I know as far as natives and what the JVM says which doesn't say much in regards to the upper limits lmao

thorn isle
#

e.g. if you try to javac

int i = ints[(long)0];

you'll get

error: incompatible types: possible lossy conversion from long to int
        int i = ints[(long)0];
#

i don't know since i don't like remember the specification in its entirety off the top of my head but i'd assume it being illegal is mentioned somewhere for compilers to enforce it

wet breach
#

probably, but in regards to natives it isn't enforced in terms of array sizes

#

since array sizes is just the size of an object and again there isn't an imposed limit on it

thorn isle
#

mmmmyeah, though the virtual machine is pretty pedantic about what goes on the stack and what's being passed for what operands

#

type safety is enforced on the virtual machine level, e.g. you can't pass two consecutive ints for an op that looks for a long

#

so i sort of figure trying to pass a long for the array ops would explode when interpreting the bytecode

slender elbow
#

newarray takes an int count so any array can only hold 2 billion elements tops

wet breach
#

10^(10^10.26956104063342)

#

would be the max in the current default JVM implemetation for bigint

#

which is still a really large number, however caveat is I don't know the arithmetic the JVM uses though which would matter

#

so I guess it is sufficient for most use cases lmao

nova notch
#

what the hell is 10.26956104063342

worldly ingot
#

You'll run out of memory allocating a max sized array lol

warm mica
#

array.length returns an int, so it would make no sense at all for it accept a long as an index

wet breach
slender elbow
worldly ingot
#

You ask great questions

slender elbow
#

but also, a byte[] isn't the same as a long[] isn't the same as a String[] with 200-char strings

random compass
#

ive been making an immortal snail plugin. ive stopped armadillos spawning naturally, and on /snail start a snail is meant to spawn to chase the player eternally. but i cant even get the stupid armadillo to spawn. i changed it to spawn a cow, it works fine. but armadillos? no way.

ill drop the code below if it lets me

drowsy helm
#

put it in that

#

?paste

undone axleBOT
random compass
#

please help im crashing out over this

young knoll
#

I would use the spawn method that takes a class

#

Plus you can then use the consumer to modify the entity before it actually spawns

#

What version is the server on?

drowsy helm
#

pls use multiple classes 😢

rough ibex
#

ylm cool new config format

hushed river
#

if ItemStack#getItemName() is marked @NotNull why are we expected to check hasItemName()? what happens if an item name is not set? what does that even mean

drowsy helm
#

or some ancient version

young knoll
#

The notnull might be a mistake

#

Or it returns an empty string

#

Also it’s on ItemMeta not ItemStack

hushed river
random compass
drowsy helm
#

yeah thats part of ItemMeta

#

not ItemStack

hushed river
#

thats what i meant to say

young knoll
#

Yeah idk try the class version of spawn()

drowsy helm
#

hasItemName is probably just a relic from old api. IF its marked not null its most likely empty if non existent

random compass
#

What does that mean. I make a new class and do what

drowsy helm
#

You can check the craft bukkit impl and see how it works

young knoll
#

Just checked, if it’s null you’ll get an empty string

random compass
# young knoll spawn(location, Armadillo.class)

am i not doing this though? the problem is that my debug messages are saying it is spawned at certain coordinates but it doesnt actually appear to be there. when i change mobtype to a cow it works fine

young knoll
#

You’re using EntityType

#

Not the class

random compass
#

im really stupid and dont know what to change.

young knoll
#

Where you do the actual spawn

random compass
buoyant viper
torn shuttle
#

minecraft's gaslighting me

#

I'm losing it

#

I'm about to go full on joker mode

#

I'M THE JOKER BABY

blazing ocean
#

always have been

torn shuttle
#

I better release this update and go to bed before I lose it and start morbing instead

fast fulcrum
#

hi guys how to create a custom hud like on this server? what plugin should i use?

#

i know about betterhud, but i don't how he work

mortal vortex
# fast fulcrum

Well it's just using a custom defined character, which is connected to a static image, which is being loaded into the boss-bar.

nova notch
# fast fulcrum hi guys how to create a custom hud like on this server? what plugin should i use...

this isnt exactly the same, but its the same concept
https://www.youtube.com/watch?v=EL2X6ppZSCQ

We cover how to make custom ui bars similar to the health and hunger bar, in Minecraft.

💡 Amber's Negative Space Font (included in example pack) : https://github.com/AmberWat/NegativeSpaceFont

📦 Download (Contains Resource Pack and Datapack: https://www.dropbox.com/s/1fa3byoz6ugrwx3/cw_mana_bar.zip?dl=1

🔵 Discord Server: https://disc...

▶ Play video
#

theres a negative space resource pack you can use combined with custom unicode characters

nova notch
# fast fulcrum i know about betterhud, but i don't how he work

theres also this for betterhud https://www.youtube.com/watch?v=pVPW3WKa8UA

First of all, I used a robot voice in the middle of the video because I'm not an English speaker, so I'm really bad at it.

Useful links:
discord.gg/r7ACysju is the discord of betterhud and here i will put the pack of examples.

Timestamp:
00:00 Intro
00:12 Explanation of the folders
02:25 Me doing a hud!

▶ Play video
young knoll
#

You can also have custom overlays now

#

Like the pumpkin one

#

Only really good for static stuff though

molten hearth
#

they be doing anything but moving block structures

young knoll
#

They did that

#

In April fools 2024

molten hearth
#

well

#

i need them to stop edging us and actually release it as a proper feature

pseudo hazel
#

bedrock is probably too incompetent to add it

near furnace
#

#general message

near furnace
vast ledge
#

Barrier

pure dagger
#

how do i shade this
i have this

<pattern>com.jeff_media.customblockdata</pattern>
                        <shadedPattern>me.kmyk.cashBlock</shadedPattern>

but what now

smoky anchor
#

Top & bottom seem relevalt

pure dagger
#

but it shouldnt be my package

#

?

smoky anchor
#

Oooh I missed your actual question, sorry

pure dagger
#

thats oki

smoky anchor
#

I believe that's all correct, it will be relocated when you compile the plugin

pure dagger
#

i do this thing for the first time

#

so i should import com.jeff ... ?

smoky anchor
#

Yes

pure dagger
smoky anchor
#

open the resulting jar, the library should be in the place you specified

pure dagger
#

its here

slender elbow
#

that's epic

worldly ingot
#

Thanks for embedding that gif, Discord

worthy yarrow
#

Huh

#

What a nice embed failure gif

pure dagger
fathom dirge
#

So in my plugin I need to dispatch commands via the console quite a lot, but the console always prints some output after executing a command. For example: [20:46:05 INFO]: Displaying particle minecraft:flame. I want to get rid of this, but I do still need to execute this command via the console. Anyone have some ideas? I already tried to add a filter to the Logger: Bukkit.getLogger(). Also tried creating a class that implements the ConsoleCommandSender Interface. Tried creating an NMS class that extended the CraftConsoleCommandSender. None of these things seem to work. Maybe they do, but I couldn't figure it out. Any help would be greatly appreciated

drowsy helm
#

And also what command are you dispatching that cant be done in code

#

99% of the time you dont need to be using a command

fathom dirge
#

Yeah I know, but the plugin that I'm building works on commands written by the user that need to be executed in the console.

fathom dirge
drowsy helm
fathom dirge
#

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), executableCommand); I mean its just dispatching a command?

drowsy helm
#

No the modifying the logger

#

But again, I feel this is an xy problem. What command are you dispatching?

#

Is it for another plugin

fathom dirge
#

No, I just need to know how to suppress command output haha. I know I can do everything with code, but my use case is exactly running user given commands

fathom dirge
#

This was the short code of adding a filter just to test

#

But that didnt do anything

#

I think I found a solution

north oar
#

Hello! I don’t know how to code but I’m interested in helping a friend with a server plugin.

Can anyone show me the ropes? I could use some help in finding people that are very experienced coders. ;-;

fathom dirge
#

Youtube is probably your best bet

north oar
#

I’m very stupid.

drowsy helm
#

Check out some tutorials but I would recommend learning java first

#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉

north oar
drowsy helm
drowsy helm
thorn isle
#

give me money

fathom dirge
drowsy helm
north oar
# drowsy helm Lend a hand in what sense?

We could use some help with coding. Our main coder has uni & can only dedicate little times

It’s for a political roleplay that I’m helping get off the ground. I don’t know how to code but I’m willing to put in effort to find people that can.

drowsy helm
#

It’s helps with all the abstractions

#

?services

undone axleBOT
north oar
#

Oh sure, thanks!

drowsy helm
#

Chances of getting a good dev for free are pretty low though

sly topaz
#

eh, they don't have to be good

#

they just have to be smart enough

wintry oxide
#

hi there, sorry to bother, i'm trying to add serverselectorx as a dependency but i'm having some troubles, some1 can help me out? this is what i hav in my pom.xml

<dependency>
      <groupId>com.github.ServerSelectorX.free</groupId>
      <artifactId>ServerSelectorX</artifactId>
      <version>3.7.2</version>
      <scope>provided</scope>
    </dependency>

am i missing something?

sullen marlin
#

have you added the plugin maven repository?

#

maven needs to know where to find it

wintry oxide
#

i added the repo to jitpack

#

but not sure

#

if that's correct

sullen marlin
#

Should be correct, what does maven say when you build it?

#

Did you copy everything exactly

wintry oxide
#

this is the error i get

#

this is my complete pom:

<repositories>
    <repository>
        <id>sonatype</id>
        <url>https://oss.sonatype.org/content/groups/public/</url>
    </repository>
    <repository>
      <id>spigotmc-repo</id>
      <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>net.md-5</groupId>
      <artifactId>bungeecord-api</artifactId>
      <version>1.16-R0.4</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.github.ServerSelectorX.free</groupId>
      <artifactId>ServerSelectorX</artifactId>
      <version>3.7.2</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

sullen marlin
#

does it not say anything about jitpack

wintry oxide
#

yeah but it give me this error

#

and in the pom i have the red underline on the dependency for serverselector

sullen marlin
#

where do you see that its on jotpack anyway?

#

I dont see anything about it on the github

wintry oxide
#

honestly i dont know really what i am doing i asked chatgpt, got this error, and tryed searching over jitpack or sonotype the plugin name

sullen marlin
#

AI, right

#

I suggest you clone the plugin off github and build it yourself

wintry oxide
#

huh

#

damn fr?

#

thats the only way to do it?

sullen marlin
#

its probably the easiest way

#

I dont see the author having a maven repo otherwise

wintry oxide
#

damn

#

do you have a short vid to share me to do this?

sullen marlin
#

clone off github and build with maven like your plugin

wintry oxide
#

ok then i add the built jar into the project structure?

#

into the libs?

sullen marlin
#

that might work

#

otherwise just add the correct maven <dependency>

#

<groupId>xyz.derkades</groupId>
<artifactId>ServerSelectorX</artifactId>
<version>3.8.0-beta</version>

wintry oxide
#

damn thanks ill try tomorrow hope it works

#

thanks bro

fluid cypress
#

im trying to match a block with its corresponding key in variants inside its json file in assets/minecraft/blockstates inside a resourcepack. i.e. one variant from the cobblestone_stairs.json file:

"facing=east,half=bottom,shape=inner_right": {
    "model": "minecraft:block/cobblestone_stairs_inner"
},

so, how can i get the state of a block as key value pairs? im not too familiar with the spigot api, and i found this, but idek what CraftBlockData is, it doesnt exists, apparently, even tho its a recent post, and neither BlockState nor BlockData has a getValues method
https://www.spigotmc.org/threads/how-to-serialize-blockdata-for-any-block.631675/#post-4681514

fluid cypress
#

i was just trying that. then just split on , and = and thats it? i was expecting something like Map<String, String>

zealous glen
#

is there not a way to cancel spawn eggs placed in water now?

sullen marlin
#

? PlayerInteractEvent?

zealous glen
#

You need to do a bunch of extra stuff with raytracing

#

which can also be abused by hacked clients

sly topaz
#

do note that you need to specify a block type for Bukkit#createBlockData, the proper format is minecraft:block_type[some=data]

sullen marlin
#

Why would you need to ray trace

zealous glen
#

Because the event doesn't get called

#

It only calls right click air when you place spawn eggs in water

sullen marlin
#

Why can't you cancel that?

zealous glen
#

Because it doesn't provide a click location

#

therefore I need to retrace for a water block

sly topaz
#

the action would probably be right click air given the water is deep enough but the clicked block should be water, no?

zealous glen
#

it should be but it doesn't provide a clicked block

sly topaz
#

so it is just null?

zealous glen
#

yes

sly topaz
#

can you even use spawn eggs when you're right clicking air/water

#

as far I remember, you need a solid block for it to trigger the interaction

zealous glen
#

pretty sure its a new minecraft version thing

sly topaz
#

uh then it could possibly be considered a bug in the interact event if that case isn't handled

#

uh apparently it works on water since 1.6.1 lol

fierce whale
#

I tried to spawn a packet based TextDisplay and sent addEntityPacket to specific players.
But sometimes addEntityPacket is ignroed.
Actually I was in 1.20.4 and recently I moved to 1.21.4.
Does anyone know how to fix it?

drowsy helm
#

and are you 100% it sends the packet? the client doesn't just ignore packets

torn shuttle
#

I wish we had ai to filter reviews out

#

maybe redirect some of these to NASA so they can start studying the aliens that sometimes seem to download my stuff