#help-development

1 messages ยท Page 1000 of 1

wet breach
#

addWith pulls the related text associated with you input as the arg. So if its an item for example it would pull its name

#

and if you noticed in the example, the username is just a TextComponent

#

because its merely a string

#

but if overall it needs to be a string though you could just convert everything to just a simple Textcomponent

short drift
#

And it uses addWidth to combine them.

wet breach
#

Yeah because the names or those strings can be changed so it pulls that data for you, not that its asolutely necessary though

short drift
#

As far as I can tell.

twilit creek
#

Does anyone know how to use custom fonts in inventories?

wet breach
#

doesn't always work sometimes

chrome beacon
short drift
wet breach
#

I think your issue might be this

#

inspectionText.addWith(". ");

twilit creek
wet breach
#

to add that, you would need to have it be a text component first before adding it with addWith

short drift
chrome beacon
short drift
#

I thought it was unnecessary.

chrome beacon
#

?nms

chrome beacon
#

Read this on how to add it to the project ^

wet breach
short drift
#

I will test that out.

wet breach
#

it would make sense that it needs to be component of some kind

#

since you are using translatable component

twilit creek
chrome beacon
#

You use components as the inventory name

#

Instead of a String like the Spigot API does

twilit creek
#

I mean with components

eternal night
#

spigot and components isn't really a thing yet

chrome beacon
#

?

frail pilot
#

After some test, it looks like interpolation is needed to smooth the animation but you need to put it inside the runnable. But even with standard block size it's hard to see differences between one with interpolation and another one without.

twilit creek
# chrome beacon ?

I mean Bukkit.createInventory(null, size, Component.text("<Text>").font(Key.key("inventories"))); doesn't work with Spigot only, it only works with Papers API

chrome beacon
#

Yeah as I said you need to use nms

#

Not the Spigot API to have access to components in the inventory title

twilit creek
eternal night
#

You are pretty much fucked

eternal night
#

Issue is that spigot's implementation of Container (MinecraftInventory) does not know anything about component titles

twilit creek
blazing ocean
#

paper is the only easy solution for that

eternal night
#

paper can

twilit creek
#

I know, but is there a way to use NMS or something like @chrome beacon said before?

eternal night
#

not without half rolling your own packet based inventory logic

blazing ocean
#

at that point just use paper

#

and do everything with components

frail pilot
twilit creek
# blazing ocean and do everything with components

But i can't use Paper on the Server as Software because we only use Spigot and don't want to use ever Paper. I hate Paper, it doesn't makes any performance better and my Permission System doesn't work with Paper as well. Because of this i even ask for another solution without Paper. But thanks for trying to give me that idea.

eternal night
#

Ye I mean, spin our own inventory framework then ๐Ÿ‘

blazing ocean
#

spigot has close to no support for components

eternal night
#

or wait for chocos pr

blazing ocean
#

kekw

eternal night
#

actually, idk if that touches inventory. It does ๐Ÿ‘

blazing ocean
#

just pull from his fork

eternal night
#

wild permission system to not work on paper tho kekwhyper

blazing ocean
#

do you even change many permission-related things

eternal night
#

it got redone with paper plugins

#

but like, unless the plugin is ripping out all of permission handling, it should be fine

blazing ocean
#

yea but it shouldn't be breaking spigot plugins

eternal night
#

Well, if they hack into NMS it would

blazing ocean
#

kekw

twilit creek
#

Funny thing i know, but it does break the permission system. (coded from a developer from us)

eternal night
#

Yea then presumably it injects itself into server internals and dies there

blazing ocean
#

why even do that-

eternal night
#

I mean, LuckPerms does that too

twilit creek
eternal night
#

I mean yea, to be expected

#

if you code something for spigot internals, why would it work on paper internals

blazing ocean
#

spigot mapped?

twilit creek
eternal night
#

no just, paper yanks internal things obviously

blazing ocean
#

o

eternal night
#

Idk how you'd be any kind of fork without changing internals KEKW

blazing ocean
#

yea but i mean how would that break spigot stuffs

#

spigot plugins work fine on paper

eternal night
#

Well if they use internals (which seems to be the case) then they don't

#

if they call CraftBlock#a but paper removes #a and instead implements #b but makes the API still work, the plugin using CraftBlock#a would still die

blazing ocean
#

i haven't had a single NMS references in two of my servers lmfao

twilit creek
eternal night
#

If you actually have a specific case where only using spigot-api breaks on paper, that should probably be reported.

blazing ocean
quaint mantle
#

how can i remove my name from the tablist in 1.8?

blazing ocean
#

?1.8 moment

undone axleBOT
twilit creek
blazing ocean
#

fork then

short drift
#

@wet breachOk, so what WORKS (but might not be optimal) is wrapping everything like:

new TextComponent(new TranslatableComponent("my.translation"))

And then I simply add all the TextComponents together with addExtra().
Which is exactly what someone yesterday told me NOT to do.

quaint mantle
sullen canyon
quaint mantle
twilit creek
#

And my second owner and my admins don't want to use Paper. idk if it is because of ideological reasons like with ProtocolLib breaking on reload. But i think they have there reasons. (Funny thing, refector 3 lines code and ProtocolLib dosn't crash anymore on reloading)

blazing ocean
#

you shouldn't do that

wet breach
twilit creek
blazing ocean
#

never worked for my plugin without breaking DBs, etc

twilit creek
blazing ocean
#

run a dev server and hot-reload

twilit creek
eternal night
#

This discussion is stupid. Spigot does not have a concept of components in titles yet

#

You will have to spin it completely yourself, the API and its implementation won't help you

twilit creek
wet breach
short drift
eternal night
#

I mean, yea you have to use NMS for it

twilit creek
#

Never had any problems with it after it.

blazing ocean
#

don't use plib if it doesn't work for you then

wet breach
twilit creek
wet breach
#

ah seems you already did

#

thats good then lol

blazing ocean
twilit creek
wet breach
#

but as for someone who said reloading breaks their db, that is because of a design flaw on your part

blazing ocean
spice burrow
#

lol yea i dont use protocollib because it f's with my nms for some reason

blazing ocean
#

my servers depend on initializing playerdata on join, having players on during plugin load breaks it

wet breach
twilit creek
blazing ocean
#

i don't reload ๐Ÿคท

wet breach
#

you pretend they joined again

#

and just go through the players that are there and re-initialize their stuff

twilit creek
gentle inlet
#

Hi guys!

blazing ocean
#

it's kinda not needed for me since i just hot reload the classes

#

hi

twilit creek
icy beacon
wet breach
gentle inlet
#

Can someone help me ive been coding a plugin but my server keeps crashing I think I might know why but not sure how to fix it (Im quit new to coding)

blazing ocean
twilit creek
wet breach
twilit creek
blazing ocean
eternal night
#

hot reloading with jetbrains runtime and proper flags does like, nearly everything

blazing ocean
wet breach
gentle inlet
wet breach
#

?paste

undone axleBOT
twilit creek
wet breach
quaint mantle
#

how can i remove the tablist of my server 1.8? help

wet breach
#

in regards to hot reloading, if you don't understand how it works you may uninentially cause memory leaks when using it

gentle inlet
#

https://paste.md-5.net/aforezufiw.cs so playing normaly is all fine but as soon as you give yourself a relic and have it in your inventory it starts freezing and crashing I think it might be something with the Click events or the Run() part the gives effect and scoreboard if you need the errors let me know

twilit creek
wet breach
#

hot reloading replaces classes directly

#

server reload simply re-initializes everything

blazing ocean
eternal night
#

"simply" KEKW

twilit creek
eternal night
#

its a jvm feature

wet breach
#

^

blazing ocean
#

allows you to redeclare classes, methods and method bodies

#

at runtime

wet breach
#

you have to register a jvm agent, and then you can replace classes that are already loaded

twilit creek
gentle inlet
blazing ocean
wet breach
#

there is libraries like the one that is being mentioned here that helps take care of most of the work for you

twilit creek
wet breach
#

never hurts to broaden your knowledge

twilit creek
wet breach
#

but if you don't want to venture into unknown then so be it not like anyone is forcing you lol

#

I am content myself with just restarting a server ๐Ÿ™‚

wet breach
#

easily correctable though

gentle inlet
#

oh ok thats goodish

wet breach
#

your flaw is you are creating a bunch of tasks that never die

#

when you should be checking if the task already exists as well as making an exit loop for your tasks so they can die

#

should start with that and see how that goes

gentle inlet
wet breach
#

in your events, you are creating tasks but I imagine the task being created there is no code in the task for it to simply stop

#

so over time, you end up with bunch of these tasks all checking and doing the same thing

#

so, to avoid this, simply create a map that holds the player uuid and the value being the task that was created

#

or something to that effect

#

then you just check the map from your events to see if there is already a task created for whatever you are doing and if there is don't create a new one

#

in the code that the task is performing you simply create a check that should fail at some point so that when that is reached you cancel the task from within the task

#

now the task can die when it needs to and go away

gentle inlet
#

Ok thanks so much!

wet breach
#

and then you just have a cleanup loop

#

that checks your map and see if the tasks exist still if they don't remove the player from the map

#

you obviously can optimize this and this is just basically a rough outline to point you in the right direction

hybrid quartz
#

how to add multiversion support to plugin?

eternal oxide
#

there is a post about maven modules on alex site

#

?nms for me

eternal oxide
#

Hi there! Today Iโ€™m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...

#

If you are asking about spigot API, target teh lowest version you want to support.

hybrid quartz
eternal oxide
#

yes and no

#

build for the lowest version

hybrid quartz
eternal oxide
#

no, if you are talking about API

hybrid quartz
#

Or there is anything in spigot api

eternal oxide
#

The answer is still the same, for API you target the lowest version you want to support

chrome beacon
#

when you build

#

pom.xml or build.gradle for example

hybrid quartz
#

Iโ€™ll check

lilac dagger
#

do you guys know the cleanest way to unpack a zip file?

lilac dagger
#

this is how i used to have it

#

oh i think i found a cleaner way ๐Ÿ˜„

glad prawn
lilac dagger
#

ye

#

along with readAllbytes

#

actually, try with resource won't work here

glad prawn
#

which one

lilac dagger
#

getnextentry

#

i can do it for the fos i guess

glad prawn
#

you can split it into smaller methods to make it cleaner and easier to read

wet breach
# lilac dagger

it seems your code guards against zip bomb however it doesn't seem to guard against zip slip

lilac dagger
#

the zip file is internal

#

i don't worry about zip exploits

#

anyway, what's a zip slip?

wet breach
#

zip slip is where it uses relative directory tricks to have a file get extracted to a different directory then from where you are extracting

lilac dagger
#

ah

#

yeah i don't have to worry about these

chrome beacon
#

Are you just extracting a zip inside of your jar?

lilac dagger
#

i have a list of songs and i extract them on plugin start in the plugin folder

#

looks nice

glad prawn
#

yeah

onyx fjord
#

jdk is great

#

lol what was that

glad prawn
#

what khajiit

blazing ocean
onyx fjord
#

idk

blazing ocean
#

khajiit

glad prawn
hot walrus
#

Im currently having a problem with my maven dependencies because I am trying to use the API of another plugin (Worldguard and luckperms): I added the dependencies in pom.xml and added the depend flag for the plugins in the Spigot file.
I ran the build and it succesfully built the plugin, but I when I try to use the classes in code, it just doest show up in autocomplete and throws an error if i just type it in. Neither does it give me an option to import

#

There is also no file in external libraries corresponding to the dependencies i have

quaint mantle
#

Have you tried reloading the maven project?

hot walrus
#

how do you do that?

#

no i havent

quaint mantle
#

Can't upload images here

hot walrus
#

Works

#

wow thank you

quaint mantle
hot walrus
#

Bruh that was way simpler than i thought

blazing ocean
undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

quaint mantle
#

It was for the guide khajiit

glad prawn
kindred sentinel
#

A pom.xml created by minecraft plugin is good?

broken nacelle
#

gradle is better

hot walrus
#

Qhy

#

Why

broken nacelle
#

many bugs in dependencies

hot walrus
#

Im used to it right now, if there are too many bugs, ill switch. But rn i feel like its fine

eternal oxide
#

maven is great

#

don;t listen to idiots

eternal night
#

switch to ant instead

eternal oxide
#

gradle and maven fetch dependencies from the exact same repositories.

blazing ocean
#

switch to the 2844km long javac command

icy beacon
#

use what you're comfortable with and don't try to force others to conform to your preferences

#

for instance, in my own experience maven is better for java projects and gradle is better for kotlin

#

and we are NOT having a java vs kotlin discussion rn

#

ain't no way

eternal oxide
#

unless its to use Eclipse ๐Ÿ™‚ then pressure everyone to conform.

icy beacon
blazing ocean
river oracle
#

actually ๐Ÿค“

dawn flower
#

can u force someone to click in their currently opened inventory

eternal oxide
#

no

dawn flower
#

that's sad

compact arch
#

I see, so I guess it's not possible to have multiple people assigned to one resource?

vast ledge
#

You can have them as co-authors afaik

tardy delta
lilac dagger
#

let me see

tardy delta
#

InputStream::transferTo(OutputStream)

lilac dagger
#

there's no file for input stream

quaint mantle
#

Hi, any can help me in creating a command listener?

tardy delta
#

?commands

#

could only try

#

have you read the docs?

#

wait a listener, like command pre process event?

quaint mantle
tardy delta
#

ye i cant read

eternal oxide
quaint mantle
#

if we execute any command it will send the player to the lobby server including "/"

#

on spigot plugin

tardy delta
#

simply send them to the lobby server when the event fires then

compact arch
quaint mantle
#

this is my code:

public class CommandListener implements Listener {

    @EventHandler
    public void onPlayerCommand(PlayerCommandPreprocessEvent event) {
        Player player = event.getPlayer();
        String command = event.getMessage();

        if (!command.isEmpty() && command.charAt(0) == '/') {
            if (!isCommandToExecute(player, command)) {
                event.setCancelled(true);
            }
        }
    }

    private boolean isCommandToExecute(Player player, String command) {
        FileConfiguration config = LimboCore.getInstance().getConfig();
        boolean autoLobbyCommand = config.getBoolean("auto-lobby-command");

        if (autoLobbyCommand && (command.equals("/") || command.startsWith("/lobby") || command.startsWith("/hub"))) {
            player.performCommand("/lobby");
            player.sendMessage(Utils.colorize("&aRedirected to lobby..."));
            return false;
        }
        return true;
    }
}
#

doesnt work

#

;/

dawn flower
#

ok..?

tardy delta
#

define not working

dawn flower
#

issue?

eternal oxide
#

just why? make a normal command

dawn flower
#

what's the command from cafebabe to tell people to not just say "doesnt work"

tardy delta
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

dawn flower
#

noted

tardy delta
#

"does not working"
where did that bot learn english

dawn flower
#

also register the command?

dawn flower
#

someone told me it is

eternal oxide
#

literally register a command for "lobby" with an alias of "hub"

quaint mantle
#

Yes, when we run the slash command or regular command, what is expected is that the player will be returned to the lobby server from limbo. but currently it doesn't work from the code I created.

eternal oxide
#

you do not need the pre process event at all

dawn flower
#

my guy

#

register a command with an alias

quaint mantle
#

so?

dawn flower
#

and why in the flippin world r u running actual code that isn't related to the return value

#

even if aliases were that way

player.performCommand("/lobby");
player.sendMessage(Utils.colorize("&aRedirected to lobby..."));``` shouldn't be in isCommandToExecute
#

it should be in an else statement

#

anyways what's the issue

eternal oxide
#

performCommand will not be seen by Bungee

#

as it never leaves the spigot server

quaint mantle
#

please provide the code that you should mean

eternal oxide
#

?pmc You MUST use plugin messaging channels to transfer players.

quaint mantle
eternal oxide
#

yes

quaint mantle
#

okay

blazing ocean
eternal oxide
#

?whereami

blazing ocean
#

velocity is made by paper

eternal oxide
#

exactly

blazing ocean
#

i was telling them to consult the paper wiki as they made vel ๐Ÿ™‚

quaint mantle
#
public class CommandListener implements Listener {

    @EventHandler
    public void onPlayerCommand(PlayerCommandPreprocessEvent event) {
        Player player = event.getPlayer();
        String command = event.getMessage();

        if (!command.isEmpty() && command.charAt(0) == '/') {
            if (!isCommandToExecute(player, command)) {
                event.setCancelled(true);
            }
        }
    }

    private boolean isCommandToExecute(Player player, String command) {
        FileConfiguration config = LimboCore.getInstance().getConfig();
        boolean autoLobbyCommand = config.getBoolean("auto-lobby-command");

        if (autoLobbyCommand && (command.equals("/") || command.startsWith("/lobby") || command.startsWith("/hub"))) {
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            DataOutputStream out = new DataOutputStream(byteArrayOutputStream);

            try {
                out.writeUTF("Connect");
                out.writeUTF("lobby");
                player.sendPluginMessage(LimboCore.getInstance(), "BungeeCord", byteArrayOutputStream.toByteArray());
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    out.close();
                    byteArrayOutputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

            player.sendMessage(Utils.colorize("&aRedirected to lobby..."));
            return false;
        }
        return true;
    }
}
``` like this?
orchid hinge
#

wouldnt that only enable / /lobby and /hub when autoLobbyCommand is true?

quaint mantle
#

ye

tardy delta
#

use a try with resources

#

and why does a method that returns a boolean have side effects

worldly ingot
#

Success vs failure

kindred sentinel
#

Is there a way to get player's body's rotation?

worldly ingot
#

I believe that's totally handled by the client

worldly ingot
#

Unsure. Has to be either some sort of riding entity or other layered model manipulation

kindred sentinel
#

I saw servers with this feature, so... It's not a mod or something like this, but I still don't understand how it works

tardy delta
kindred sentinel
#

Oh I found this plugin.. It's HMC Cosmetic Plugin

worldly ingot
#

Yeah, they're making the armour stand ride the player

#

Granted it's packet based for some reason, but it's riding the player

kindred sentinel
#

Ok, then other question... How to spawn a lot of particles? Not only 1 particle like do world.spawnParticle

#

only cycle?

worldly ingot
#

I mean yeah, if you don't care about the specific configuration of these particles, you can use the "amount" argument to change how many are spawned and control their density with the offsetX, Y and Z arguments

#

But if you want them in very very specific positions, then yes, you have to spawn many particles in specific spots

kindred sentinel
#

maybe amount arguement could be useful in this situation

charred blaze
#

how do i disable AI of entity?

quaint mantle
#

Pathfinder?

quasi gulch
#

for example

charred blaze
#

no method for AI

shadow night
#

Because it's an Entity

#

Iirc setAI is a LivingEntity method

kindred sentinel
quasi gulch
worldly ingot
#

You'll want to change the speed of the particle in that case

#

Sometimes particle speeds are stupidly high

#

Although if that's block break, I'm unsure if speed affects it

charred blaze
#

how do i set slime's size?

quasi gulch
#

When you cast it to a Slime you get all Methods and in the Javadocs you can see all the Methods

kindred sentinel
charred blaze
#

between what numbers is slime size

kindred sentinel
#

No, It made things worse

worldly ingot
#

You probably just want this

world.spawnParticle(Particle.BLOCK, block.getLocation().add(0.5, 0.5, 0.5), 1, block.getBlockData());
quasi gulch
worldly ingot
#

Or whatever the BlockData is you want to pass

kindred sentinel
#

Yes, but instead of Particle.BLOCK - Particle.ITEM_CRACK

quasi gulch
worldly ingot
#

Worst case, if that doesn't work for whatever reason, you can try this as well

world.spawnParticle(Particle.BLOCK, block.getLocation().add(0.5, 0.5, 0.5), 1, 0.0, 0.0, 0.0, 0.0, block.getBlockData());
#

(and if you're in a verison pre-1.20.5, I think the particle is actually called BLOCK_CRACK, it got renamed)

kindred sentinel
worldly ingot
#

Try the second one I mentioned then, and increase the "1" to something like 10

worldly ingot
#

It's possible that block particle was changed so it actually respects velocity now

potent ocean
#

Anyone have a clue how to generate Minecraft structures using NMS.

worldly ingot
#

Shouldn't need to use server internals at all, we have API for it with the StructureManager

potent ocean
#

I'm trying to generate an Ocean Monument

potent ocean
worldly ingot
#

It most definitely is :p I'm looking at it right now

kindred sentinel
worldly ingot
#

The three 0.0's before it are the offsets, it will spread out the particle from the source position

kindred sentinel
#

what about

                double velX = -0.5 + rand.nextDouble();
                double velY = 2.2 + rand.nextDouble();
                double velZ = -0.5 + rand.nextDouble();
#

no

potent ocean
worldly ingot
#

Yeah, you can put those in the first three 0.0 arguments if you'd like, but that will just give them a random offset in either direction

worldly ingot
kindred sentinel
charred blaze
#

when i click it once it sends me message twice

#

any idea why?

worldly ingot
#

Interact events fire once for each hand

potent ocean
worldly ingot
#

You have to account for that with event.getHand()

potent ocean
#

Yeah

worldly ingot
#

Generally people tend to skip over the off hand interaction (especially if it's an empty handed right click action), but it's up to you

potent ocean
#

I believe sometimes it could be a user, since the event will trigger if the right mouse is held down.

#

like multiple times.

worldly ingot
#

That is also possible as well, yes. But usually it's just a matter of checking for the hand

potent ocean
#

Usually for stuff like this people add a cooldown anyways. (esp for player interact events)

kindred sentinel
dawn flower
#

this isn't a development question but i kinda fucked up and set my intellij idea font to max and now i can't reset it, does anyone know where intellij idea stores the settings?

potent ocean
#

%appdata%/Roaming/IntellIJ

#

Jetbrains/Intellij

#

or whatever version you use

kindred sentinel
potent ocean
#

C:\Users\YOUR_USER\AppData\Roaming\JetBrains\IntelliJIdea2024.1\options
Would look something like this

wintry oxide
#

hi i'm getting this error while trying to create JSONObject, attached che pom the error here's the code:


JSONObject jsonObject = new JSONObject();
            jsonObject.put("name", "John");
            jsonObject.put("age", 30);
            jsonObject.put("city", "New York");

            // Add additional values
            jsonObject.put("married", true);
            jsonObject.put("children", new String[]{"Alice", "Bob"});

            // Specify the file name
            String fileName = "example.json";

            try (FileWriter fileWriter = new FileWriter(fileName)) {
                // Write JSON content to file
                fileWriter.write(jsonObject.toString());
                System.out.println("JSON content has been written to " + fileName);
            } catch (IOException e) {
                System.out.println("An error occurred while writing JSON content to the file: " + e.getMessage());
                e.printStackTrace();
potent ocean
#

and fileWriter.close()

#

But your issue is coming from JSON not being in ur jar file.

wintry oxide
#

ok but thats not the error

#

wdym

potent ocean
#

<scope>compile</scope>

#

add this to your JSON depedency

wintry oxide
#

where

#

ok

potent ocean
#

pom.xml

wintry oxide
#

yeye

#

gime a sec

dawn flower
wintry oxide
#

yo i still ge the same error

#

i did put compile

potent ocean
#

Are you building with artifact or maven?

wintry oxide
#

atifacts

#

maybe thats y?

potent ocean
#

Use maven.

#

Do maven clean

#

then maven package

wintry oxide
#

and the the original?

#

or normal file

potent ocean
wintry oxide
#

i got two files

glad prawn
wintry oxide
#

one is the name of the file itself and the other one is original-name

potent ocean
glad prawn
#

? wtf

potent ocean
glad prawn
#

it does it for you

wintry oxide
#

ok

potent ocean
#

From previous times not using the close method it caused issues.

#

@glad prawn yeah just as I thought if you don't close it, it will not write to the file.

charred blaze
#

is Skull considered as a block?

quasi gulch
#

yes

charred blaze
#

is everything a block that can be placed?

potent ocean
quasi gulch
#

no like armor stands and so an that are entities

charred blaze
#

is everything a block that can be placed and are not entities?

quasi gulch
#

yes

#

i think

charred blaze
#

uhm

quasi gulch
#

what are you trying to achive?

#

if you want to check if its a block use instanceof Block

charred blaze
#

i want to check item's size

#

to create simillar hitbox

#

using slimes

#

and modifying sizes of slimes

hushed spindle
#

which particle replaced Particle.MAGIC in 1.20.5?

quasi gulch
#

ok when you need help show the code you having trouble with

wintry oxide
#

@potent ocean it worked thanks

#

very thanks

#

very very much

#

lov u

#

๐Ÿ˜˜

potent ocean
#

no problems

quasi gulch
hushed spindle
quasi gulch
#

Maybe Particle.SPLASH

hushed spindle
#

i think those are like the swirlies from regular splash potions

#

harming potions create more star-shaped effects

quasi gulch
hushed spindle
#

they look somewhat similar but they dont behave the same

#

so i think its something else

#

crit particle disappear in just a couple of ticks but harming potions stick around for some time

quasi gulch
#

INSTANT_EFFECT

hushed spindle
#

oh likely yes

#

think thats the one

#

ty kind sir

hazy parrot
#

smh i was scrolled

hazy parrot
broken nacelle
#

nevermind

wintry oxide
#

alredy solved

broken nacelle
#

i didnt see the pom image

wintry oxide
#

but thanks anyway

keen horizon
#

so im making a plugin so you cant put a certain item in a chest but the problem is they can put it in their offhand before and swap it in when they are in the chest anyone know how i could see them swapping it into the chest

worldly ingot
#

You can listen for that with InventoryAction#HOTBAR_X actions. It includes the off hand

slender elbow
#

i don't have HOTBAR_X in my spigot

crystal knot
#

How can i create a entity from an EntityType ?

slender elbow
#

World#spawnEntity(Location, EntityType)

eternal night
#

spigot deprecated and removed it (god complex developers and all)

golden turret
#

how can i get the dropped items when calling the Block#breakNaturally(ItemStack) method?

quaint mantle
#

does anybody know which method i need to create mixins for to know when a block starts burning ?

golden turret
#

not that

quasi gulch
#

Then BlockDropItemEvent

quaint mantle
golden turret
quaint mantle
#

i think its this one Lnet/minecraft/block/Block;onBreak(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/player/PlayerEntity;)V

shadow night
quaint mantle
quasi gulch
#

Maybe ItemSpawnEvent?

golden turret
#

not accurate

quasi gulch
#

What do you mean?

golden turret
#

a plugin may call that event

#

and it doesnt need to be strticly a block drop

#

petition to make the Block#breakNaturally() methods also call the BlockDropItemEvent: 1/3

quasi gulch
#

What do you wanna do with these items?

blazing ocean
#

is the player location the foot location?

quasi gulch
young knoll
#

Yeah all entity locations are the bottom of their hitbox

blazing ocean
#

ty

dawn flower
#

get the eye location to be abit higher

quasi gulch
dawn flower
#

how do i build a project with 3 pom files (it's a forked plugin so dont blame me)

#

its refusing to build it with the libraries

#

4 poms actually

quasi gulch
#

just put everything into one

dawn flower
#

idk what they're using the 4 pom files for so it'll prob break stuff

quasi gulch
#

it breaks stuff now so you dont have a choice or?

#

I dont think you can use more than one pom

dawn flower
#

its kinda weird

#

some poms have the same libraries but with different scopes

quasi gulch
#

can you show the project?

#

/the poms

young knoll
#

Probably a multi module project

dawn flower
#

1 sec

dawn flower
#

anyways how do u compile a multi module project

eternal night
#

gradle build 5Head

dawn flower
#

it's maven

eternal night
#

mvn package then

#

its more about what outputs you need

dawn flower
#

it aint compiling some libraries with it

eternal night
#

Well, are you shading them into the main project/output project

dawn flower
#

no

#

i think i fixed it

eternal night
#

๐Ÿ‘

dawn flower
#

nvm

eternal night
#

they are listed as children in the root pom.xml ye?

dawn flower
#

no as modules

eternal night
#

Well yea

dawn flower
#

there's a bundle package that has the best pom out of them all

#

i think im supposed to do something with that

eternal night
#

is this a public repo? xD

dawn flower
#

yeah

young knoll
#

"Best pom"

#

:P

eternal night
#

link pls

dawn flower
#

the others dont make sense

#

the rest have some "provided" libraries that dont exist in a typical server

eternal night
#

I mean, just mvn package should be fine here.

#

the output will be in the bundle's target folder tho

dawn flower
#

it doesnt compile the PacketManagement with it

eternal night
#

that is a thirdparty thing

dawn flower
#

yeah ik

dawn flower
eternal night
#

yea

dawn flower
#

im getting the root target..

eternal night
dawn flower
#

why would u even use a multi module project ๐Ÿ˜ญ

eternal night
#

why not?

dawn flower
#

it overcomplicates stuff

#

ayo it compiled properly

eternal night
#

I would not call multiple modules compilated ยฏ_(ใƒ„)_/ยฏ

worthy yarrow
#

What defines a module?

dawn flower
#

i barely deal with one pom, imagine dealing with 3

icy beacon
#

and a parent build file that builds all modules is also needed

worthy yarrow
#

Hierarchy kinda thing?

dawn flower
#

wait isn't a multi module project just a project with inner libraries by technicality

icy beacon
worthy yarrow
#

Simplest form I probably can

icy beacon
#

not sure if that's completely valid, i haven't worked with multi module projects myself, i just know the structure and the general idea

kindred sentinel
#

Does anyone know any plugin to custom mobs (like with model engine) for free?

dawn flower
#

your own plugin.

worthy yarrow
kindred sentinel
#

meg?

worthy yarrow
#

model engine

kindred sentinel
#

Meh, it costs 20$

worthy yarrow
#

Couldn't tell you anything else that does what it does

#

For a 20$ single purchase for lifetime updates and simply the quality of meg aint that bad

#
  • you can get support in their discord
#

(api / server side help btw)

kindred sentinel
#

Yeah, btw I'm not a holder of some kind of project/server so, I just wanted to test some thing with it

#

btw I found something like this

worthy yarrow
kindred sentinel
worthy yarrow
#

Maybe I'm wrong, idk lol

#

I never really pay attention to those comparisons

#

I'd rather decide based on experience with said project

kindred sentinel
#

hah fr

nova notch
kindred sentinel
#

Animated Java made only with datapacks => Minecraft commands. Everything that made on minecraft commands is made on tick function => very laggy

nova notch
#

You said free so

kindred sentinel
# kindred sentinel

Well hephaestus engine & world seed entity engine maybe a good replacement

nova notch
#

WSEE said it only works with Minestom

#

I am curious about the other one tho

kindred sentinel
#

So it may not work with spigot?

nova notch
#

If it says it only works in Minestom then I would take their word for it

#

It explicitly says it doesnt support Paper so I assume that would be the same for spigot

kindred sentinel
#

hmmm

#

If it really doesn't work with spigot, so, maybe I should give a try to hephaestus engine

nova notch
#

It does look interesting so I'm also gonna check it out later, but tbh your best option may just be model engine

#

Maybe test and compare model engine and hephaestus since model engine has a free version

#

If model engine is better, I'd just pay the $20 instead of spending tens or hundreds of hours on a half assed version of it

kindred sentinel
nova notch
#

Yes but it has a 6 model limit or something like that

kindred sentinel
#

oh

nova notch
#

Maybe some other small limitations as well not sure

kindred sentinel
#

Poor devs of Model Engine it seems like a lot of people were complaining about that is not model engine 4

slender elbow
#

lol

pseudo hazel
#

you know how the console prints text in colors if you add chat colors and stuff to messages right? How do I turn that off

#

I am debugging some message parsing stuff and I wanna see the color codes in the message that gets sent

#

like the &3 whatever in the actual console

rotund ravine
#

Good luck

pseudo hazel
#

would you know any way I can actually see that string

#

because it either removes all the format information or it shows it in color

quasi gulch
pseudo hazel
#

oh that could work

#

oh that works

#

thanks ๐Ÿ˜„

quasi gulch
#

๐Ÿ‘

quiet ice
#

does anyone happen to know Java 7 JDK vendors outside of azul?

kind hatch
#

openjdk?

quiet ice
#

that's unfortunately not a gradle toolchain vendor

#

And for whatever reason using Azul it decides to install Azul Zing which uhm I haven't heard about and doesn't work anyways

#

With not working I mean it instantly coredumps

kind hatch
#

Windows or linux?

charred blaze
#

how do i change java version of runServer task?

eternal night
#

I mean, its going to pick your projects toolchain

#

why is the toolchain not at java 21?

quiet ice
quiet ice
eternal night
#

No that wasn't for you ๐Ÿ˜…

kind hatch
# quiet ice linux

Did you download the regular azul jdk? Cause I think Azul Zing is something for their enterprise customers.

charred blaze
eternal night
#

that is your project sdk

#

the gradle toolchain is something different

#

can you share your build.gradle.kts?

#

?paste

undone axleBOT
charred blaze
#

yes

quiet ice
eternal night
# charred blaze yes
-java {
-    toolchain.languageVersion.set(JavaLanguageVersion.of(17))
-}
+java {
+    toolchain.languageVersion.set(JavaLanguageVersion.of(21))
+}
remote swallow
#

lynx you love diffs dont you

eternal night
#

I do

kind hatch
remote swallow
#

what about big diffs or do big diffs hurt and you like the small diffs

charred blaze
charred blaze
#

thanks

kind hatch
quiet ice
remote swallow
#

whats your answer

quiet ice
#

I guess I could use J8 and set the source and target versions appropriately

eternal night
#

I love all sizes of diff

remote swallow
#

big medium or small

eternal night
#

medium hits the spot just right

kind hatch
eternal night
#

I'd be surprised if any vendor under the sun (outside of zulu for whatever reason) still publishes java 7

#

given that shit has been EOL for so long, they'd have to maintain it themselves OMEGALUL

quiet ice
#

AdoptOpenJDK used to support it but the dumdums over at eclipse killed that project

#

The AdoptOpenJDK -> Adoptium move was terribly executed

eternal night
#

I mean, isn't the jump to java 8 supposedly pretty seamless tho?

#

I'd get it to jump from java 8 to 9, that sounds like work

#

could also just use jdk 8 but configure source and target compatibility to java 7

quiet ice
#

I'm just the kind of person that will always use the lowest requirements necessary when creating/maintaining libraries so yeah

kind hatch
#

Is Java 7 still used though?

quiet ice
#

But I'll go with the JDK 8 + source and target compat 7 strategy

kind hatch
#

By like anyone?

eternal night
#

supporting java 7 sounds more like a security risk than a feature OMEGALUL

quiet ice
#

The legacy minecraft community uses stone-age java versions, so I'd not be surprised

kind hatch
#

They can suffer

wraith delta
#

Would recommend going JDK 17+

kind hatch
#

Didn't minecraft run on java 6 at one point?

wraith delta
#

Most hosts are running between 17-19

quiet ice
kind hatch
#

Sheesh

quiet ice
#

But good luck finding a Java 5 JDK lol

quiet ice
eternal night
#

quickemu up a windows instance

kind hatch
#

That's what compatibility targets are for no?

#

You can use a Java 17 install to develop with, but set the IDE rules to only allow version specific code to be written and complied.

quiet ice
#

Well only problem is that that is likely going to cease in a few years. Kindof like how you cannot build Java 6 maven projects anymore if you don't have a Java 11 JDK active

turbid flame
#

I just want to discuss something. Is it possible to create single player engine that allows players to see them and integrate with them only if needed. The purpose of this is skyblock server and it would allow creating island for every player at 0 100 0 and load chunks based on packets for each player individualy?

quiet ice
#

Many plugins use one world per player strategies for this

trail coral
#

how do i do something like:
Creeper creeper = get an instance of a creeper

gusty gorge
#

Why isn't this working?

val componentSerializer = MiniMessage.miniMessage()
val player = joinEvent.player
player.sendMessage( 
             componentSerializer.deserialize(ServerUtil.PREFIXES.get("general").toString())
)

What I am trying is to send a message on the player join but I am hit with the following error:

java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.sendMessage(net.kyori.adventure.text.Component)'
turbid flame
#

Its about sending world directly to one player and to each player send his individual world

#

Then save that

eternal night
#

while compiling against paper-api

gusty gorge
turbid flame
#

And if he connects to his island again load that island and send packets with that only to him

quiet ice
trail coral
#

how do i "create" a livingentity instance

turbid flame
#

Modify the engine that it send packets with individual world for each player

#

What do you think about that @quiet ice

quiet ice
#

what is the difference between that and one world per player if I may ask?

#

?jd-s

undone axleBOT
turbid flame
#

Server does not require as much resources

quiet ice
#

so basically one server per player?

turbid flame
#

Yea you have skyblock islands so every player have their each island on coordinates 0 100 0

quiet ice
#

Or something more akin to whatever paper's multithreaded fork is (begins with f, forgot the rest tho)

turbid flame
bold gull
#

Yo

#

Anyone can help me ?

eternal night
#

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

eternal night
#

sorry too fast

#

did not see you continue typing OMEGALUL

bold gull
#

I have buyed itemadder paid plugin buy it is not working

turbid flame
#

When player join the server i load his skyblock island convert it to packet and send it to him ONLY and do that for every player

#

So basically i create singleplayer on multiplayer server

#

And if needed i add one player to another player world

bold gull
#

I have buyed itemadder paid plugin buy it is not working plz help anyone

turbid flame
eternal night
#

^

turbid flame
#

this channel is # HELP - DEVELOPMENT

bold gull
eternal night
turbid flame
eternal night
#

on the page

bold gull
#

But I have buyed from here only spiggot

eternal night
#

spigot is just a market place

turbid flame
#

Yea we dont give a fuck

#

go ask there

echo basalt
#

There are 3 main approaches to making per-player worlds / islands / whatever

#

One is to have a world per player

green prism
echo basalt
#

You can easily serialize the entire world, but most plugins will struggle with encoding their data so you'll need to fork a lot of stuff

#

The other approach is to have a grid

#

If you don't care about sharding and just want a single server this is the ideal approach because you don't have to serialize anything and plugins work fine with this approach

#

It is however, not scalable

#

But it is what most public skyblock plugins do

turbid flame
#

I can program i will not be using other plugins

turbid flame
echo basalt
#

The packet-based approach allows for a much higher player density per server but you have to re-implement and emulate most vanilla features

#

As in hijack every single mob to not target the players around you, collide with fake blocks

turbid flame
#

Yea i know that

echo basalt
#

Re-implement TNT, item dropping, liquids flowing, cobblestone and obsidian generation

eternal night
#

I'd argue its probably going to be less density with how shitty vanilla feature implementations are via the API KEKW

echo basalt
#

All packet-based

eternal oxide
#

The easiest and likely "best" implementations is islands in teh same world (spread out) and simply lock players to their own area.

echo basalt
#

It ran at like 5tps but everything was async so ppl couldn't bat an eye

eternal night
#

โœจ async โœจ

echo basalt
#

โœจ async โœจ indeed

eternal night
#

tho prison at least is easier

eternal oxide
#

islands with an unbuildable area around each.

echo basalt
#

We had 1500 people in a single instance

eternal night
#

skyblock is near impossible

#

like, you are just doing glowstone level work

echo basalt
#

With the skyblock division they sharded it all

eternal night
#

yea

turbid flame
#

So it is possible and can make it work but everything need rewrite?

eternal night
#

its as possible as coding the server itself from scratch๐Ÿ‘

echo basalt
#

Sounds like a hell lot of work for something that can be done in an afternoon with Slimeworldmanager

turbid flame
#

How is the hypixel skyblock handling this?

echo basalt
#

they use their own homemade slimeworldmanager

#

they made the damn thing to begin with

#

it's basically just their Housing system but with a different template

turbid flame
#

Could you tell me quick how is the slimeworldmanager working? What is it doing?

echo basalt
echo basalt
#

get sniped

eternal night
#

rekt me

grave vale
#

I have a feeling it's me being dumb, but why can't I do shadowJar with Shadow 8.1.1, Java 21 and Gradle 8.5?

turbid flame
#

That makes sense, it's great, then if player will enter island i can find least occupied server and load it there?

eternal night
#

shadow is not maintained anymore, at least your version

grave vale
#

oh

blazing ocean
#

use gooler/shadow

echo basalt
eternal night
grave vale
#

thanks!

echo basalt
#

You can pick the least occupied server, which guarantees less load per instance but you end up having to use more resources keeping more instances alive

#

You can also use the most occupied server which guarantees less resource consumption but more load per instance

tall saffron
#

Any tutorial on how i could make custom ores that spawn in the world? I already know how to make custom model texures, i want to know how to do the spawning stuff

echo basalt
#

You can go with a hybrid where each instance needs to meet a certain "fill level" before it switches to the next

grave vale
tall saffron
turbid flame
#

Each of this strategies is great and have pros and cons

echo basalt
#

Yeah

blazing ocean
echo basalt
#

These strategies then have to pair with your "cloud" server instancing system to spin up new servers on the fly to meet demand

#

To be able to manage player spikes of a certain magnitude

#

Let's say each server handles 10 islands, and you have a hybrid strategy where it fills each server from 0->5 and then fills the least loaded one

#

If you have 10 instances you can manage 100 islands

#

But you want to be able to handle a player spike of 50 islands, which is about half your capacity

#

So you need to start spinning up new servers to ensure that you always have that half capacity available

blazing ocean
#

k8s

echo basalt
#

Big networks are complicated!

#

(go figure)

quaint mantle
#

how can i change this?????

turbid flame
blazing ocean
#

?whereami

quaint mantle
#

like to this

blazing ocean
turbid flame
#

Never worked with skyblock and this complicated approach to be able to keep up with housends of players

quaint mantle
blazing ocean
echo basalt
#

Then there's the question of how you actually deal with all the infrastructure stuff

blazing ocean
#

you are using velocity

quaint mantle
#

i would like change the text on bungee cord

quaint mantle
quaint mantle
echo basalt
#
#

I made this little post here explaining a couple approaches

blazing ocean
#

(if you're not making your plugin)

quaint mantle
#

im gonna modify the code, but i dont know where is the part of that text

turbid flame
#

Simultaniously

quaint mantle
#

Whatever youโ€™re using, bungee or velocity

quaint mantle
#

Share playersโ€™ progress through a proper database

turbid flame
quaint mantle
#

You will need to implement a serializer to support your database

#

So you can store playersโ€™ inventory, attritubes and such

#

Maybe stats and achievements

echo basalt
#

Works on 1.20+

turbid flame
#

So it would be the best for to work on that

#

Versions

quaint mantle
#

i cant find that

quaint mantle
turbid flame
quaint mantle
#

Is there a particular reason we are missing?

#

Yeah

echo basalt
#

update it

turbid flame
quaint mantle
#

I am asking why it cannot be updated

echo basalt
#

says the one wanting to make packet-based skyblock

quaint mantle
#

Does it makes NMS calls and such?

echo basalt
#

mappings are already a thing

#

Since 1.14 iirc

blazing ocean
tall saffron
#

lol

turbid flame
#

It is easier for me to write 300 000 lines of code engine from scratch then updating whole proxy and software

echo basalt
tall saffron
#

evade the question

quaint mantle
#

People using NMS should just PR to the server software so they donโ€™t need to worry about updating to newer versions

#

What??

turbid flame
blazing ocean
#

LMAO

quaint mantle
#

I thought they were serious

turbid flame
#

I literally made the text bigger and he understood

#

Just that

eternal night
#

Love the trolls

turbid flame
#

I am not trolling

remote swallow
blazing ocean
turbid flame
#

that guy replied to my message where i answered his question

quaint mantle
#

Thatโ€™s why I prโ€™ed BlockState cloning to another location

turbid flame
#

Still Java 8 is the most popular version of Java

#

Guess why

blazing ocean
turbid flame
#

All the software stays on that and companies don't update

blazing ocean
#

you said the opposite as well

remote swallow
#

companies when 2052 rolls around and they cant use java 8 anymore

turbid flame
#

It might be because English is not my primary language, sorry for the inconvenient hope you understod what i meant

quaint mantle
turbid flame
#

Java 8 is from 2014
Java 11 from 2018

Those 2 versions are used by 89% of the companies and entities. It is just cheaper and better to not update your software.

blazing ocean
#

ok

#

but it's different to games

#

because you tend to want the latest new cool feature and gameplay aspect

iron spade
#

if (args.length > 3) sender.sendMessage(ChatColorHex.translateHexColorCodes(ChatColorHex.Color("cosmeticos-hats.no-hat-permission-other"))), item);

turbid flame
turbid flame
iron spade
turbid flame
#

Bees were added in 1.15 but if they were added in 1.19 you could implement them on your own in 1.16

blazing ocean
turbid flame
#

No no

#

Bad word

#

Sorry

#

I thought nasty means something like "dope thing"

#

good thing

#

My bad

blazing ocean
turbid flame
#

Yea

#

I know

blazing ocean
turbid flame
#

I missuderstood the word nasty i thought it meant something tottaly oposite

#

But yea to sum up for those reasons updating to 1.20 dont make sense

blazing ocean
remote swallow
chrome beacon
glad prawn
iron spade
#

)) + item)

#

??

pseudo hazel
#

what is ChatColorHex

plush sluice
#

??? java ver 21

#

works on pc but this is on other one, got the code from vcs

iron spade
pseudo hazel
#

bungee api chatcolor can already read hex colors

iron spade
#

yes

pseudo hazel
#

so what does the function Color do

plush sluice
#

anyone knows how can i fix it?

civic sluice
plush sluice
#

the problem is that its updated

civic sluice
#

U sure?

plush sluice
#

yeah

#

just updated it like 20mins ago

turbid flame
#

@echo basalt if i could take a minute from you because i do not really understand one part of what is in here https://hypixel.net/threads/dev-blog-5-storing-your-skyblock-island.2190753/

They store .slime file in SeaweedFS and Mongo in the same time or what? They say they do store it in SeaweedFS and then they say that "The Seaweed FID are stored in Mongo " i dont get it could you explain?

echo basalt
#

SeaweedFS is their file system

#

They store the file in the file system, and then store the index of the file system in mongo

#

Along with metadata

#

Isn't seaweedfs just self-hosted S3?

turbid flame
#

Yea it is

#

So basically it's like

SeaweedFS is an array
And Mongo DB keeps the index of the array?

echo basalt
#

seaweedfs is bucket storage

#

But sure just pretend that's your theory

turbid flame
plush sluice
#

ey, updated it before and when opening it shows 2023.03..

storm crystal
#

Is this an okay way to store constants as my keys that I want to use?

civic sluice
plush sluice
#

because its no longer there

civic sluice
plush sluice
#

any way to update from settings then?

echo basalt
#

Hm if NamespacedKey was an interface you could make the enum import it

plush sluice
#

found

echo basalt
#

Anyways that enum approach is flawed, go with a final class full of constants

civic sluice
storm crystal
echo basalt
#
public final class Keys {

  private Keys() {}

  public static final NamespacedKey WEAPON = NamespacedKey.fromString("myplugin:weapon");

}
storm crystal
#

but okay

echo basalt
#

And if you want to have a .values() or some kind of mapping, just make a static method and hold a collection

#
public final class Keys {

  private Keys() {}

  private static final Map<String, NamespacedKey> REGISTRY = new ConcurrentHashMap<>();

  public static final NamespacedKey WEAPON = register(NamespacedKey.fromString("myplugin:weapon"));


  private static NamespacedKey register(NamespacedKey key) {
    REGISTRY.put(key.getKey(), key);
    return key;
  }

  public static NamespacedKey getByKey(String key) {
    return REGISTRY.get(key);
  }

  public static Collection<Namespacedkey> values() {
    return List.copyOf(REGISTRY.values());
  }
}
storm crystal
#

okay, I understand

#

is it a valid approach to add manually constant keys even if there would be theoretically a lot of them?

#

like, let's say for each statistic (say 7) I'd have each elemental type of it (also 7)