#help-development

1 messages · Page 1319 of 1

oblique timber
#

dude, I couldn't do it, never mind

#

can you help me with this?

#

1.8.9 I want to make a plugin but the minimum version is 1.12.,

thorn isle
#

my best advice is to give up

#

remember how i said you should pray all the repositories referenced by the build script are still up?

#

well, 1.8 is so old that they aren't anymore

#

so you'll have to find alternate repositories for them, build/install the dependencies yourself, or hunt down the dependency jars and install them locally

oblique timber
#

The server I'm playing on with my friend is currently 1.8.9 factions required.

thorn isle
#

my condolences

#

but you are fucked

oblique timber
#

will you teach me how to do it, bro

thorn isle
#

i can't, i don't use 1.8 and i don't know where the things you need are

#

but if you find another 1.8 person they might be able to point you at the jars you need

oblique timber
#

hm

thorn isle
#

looking at nms, it doesn't seem like we have api for triggering item "use" like reeling back a fishing rod? i only see it getting called from the void handleUseItem(ServerboundUseItemPacket packet) on the ServerGamePacketListenerImpl

#

am i missing something or do i really need nms/reflection for this

#

xy is that i'm writing an auto fishing rod

young knoll
#

Teach the villagers to fish

smoky anchor
#

Not sure about specifically reeling in
But you can at the very least fake it by sending whatever packet makes the players hand move and fake it from there

thorn isle
#

i suppose... but setting up protocollib or packetevents for that might be more effort and breakable surface area than reflecting into it

slender elbow
#

i don't think you can trigger item uses in the api, like, at all?

thorn isle
#

looks like that's the case yeah

#

hopefully running the serverside logic for it without being prompted by the client won't desync things

#

it does look like the server sends a game event for the fishing rod being reeled in to the client at least, so it hopefully won't

wet breach
#

but not sure if you could trigger it though

#

since that would come from the client?

thorn isle
#

yeah, looking at the code paths to the reeling-in logic, the only path seems to be from an incoming packet

wet breach
#

could always create a fake packet I guess and toss it into the incoming queue lol. But it would really depend on why you need this

thorn isle
#

i'm just trying to add a custom item/enchant that'd auto-fish for the player as a kind of a twist on the popular "afk zone" thing

#

and ideally have it play nice with custom fishing plugins, so i'd rather not spawn a random fish item and toss it at the player manually

hybrid spoke
oblique timber
#

help me

sly topaz
#

?howold

undone axleBOT
#
CafeBabe Help Menu

**Syntax:
**```
?howold <text_final>

Custom command.

Created via the CustomCom cog. See ?customcom for more details.

sly topaz
#

?howold 1.8.8

undone axleBOT
sly topaz
#

there we go

quaint mantle
#

golden age

potent plover
#

Hi, how do I connect my Discord to my Spigot account?

chrome beacon
desert aspen
#

for a polar bear

#

what mobs?

torn shuttle
#

hm oh hey

#

new chatgpt model

#

5.1

#

oh man I hate the style of it

drowsy helm
torn shuttle
#

reply style

drowsy helm
#

ah

torn shuttle
#

they're back with the weird corporate bff style that people with what I assume are serious mental illness like and everyone normal finds extremely offputting

cursive kite
#

Hello - I am trying to code it so placing spawn eggs on spawners doesn't change the spawner type

#

I want players to be able to place the eggs ontop the spawner

eternal oxide
#

How are they going to set the spawn type if you don;t allow the use of eggs on them?

#

As far as I remember eggs are not placeable

#

You would need to intercept the interact event (cancel) and place a spawn egg as a DisplayEntity

cursive kite
#

Basically I dont want them to interact

#

I want clicking a spawner with an egg = egg mob is spawned

#

basically players want to be able to place creeper eggs on spawners

#

but the issue is it is currently changing the spawner TO a creeper spawner

sullen marlin
#

Cancel event; spawn mob

cursive kite
#

As in manually spawn the mob and remove the item?

sullen marlin
#

Best way off the top of my head

#

Others might have different ideas

cursive kite
#

Got it, was hoping it would be a simple event cancel lol

warped yoke
#

@sullen marlin hey can I ask here ?

#

Or not in this whole server ?

cursive kite
#

For spawn mob. Any easier way then checking block face manually.. then having top = math to spawn ontop, side = math to spawn on clicked side, bottom = spawn with math -1

wraith delta
cursive kite
#

Tried that - cancelling the event doesn’t use the egg

wraith delta
#

I’m confused what you just said

#

You’d check that the player is holding a spawn egg, and then check if they interacted with a spawner block

#

Does your spawner plugin not cancel the egg changing feature?

wraith delta
torn shuttle
#

if there any easy to to get the player velocity without having to track it myself

sullen marlin
#

Isn't there a getVelocity method

#

Of course if you mean, eg, walking velocity, that has to be tracked

thorn isle
#

looks like it's not available through the api yet

summer scroll
#

Hey guys how can I properly use libraries in plugin.yml?
I've tried set the dependency scope as provided in the pom and add this in the plugin.yml but it's still giving me errors.

libraries:
  - tools.jackson.core:jackson-databind:3.0.2
  - org.redisson:redisson:3.52.0
slender elbow
#

that looks fine, what kind of errors are you getting?

summer scroll
#

Uhhhhhhh, I tested it again and now it works fine, smh.

#

It was few days ago last time I test it.

stray compass
#

Have you ever tried prebuilding projects with intelliJ before writing them?

#

It basically creates a ready to code project.

slender elbow
#

like a project template?

#

the Minecraft Development Plugin can create a basic plugin structure

chrome beacon
#

or you can make your own maven archetype

outer ember
#

How to merge 2 players hitbox?

#

cause im making a handcuff plugin

#

cuffed player will tp to police left arm every 5 tick

#

i wanna make it like if police wanna goes to a way with 1 block wide
and makes cuffed player suffocate in the wall
canceles his movement

#

do u know wdym

outer ember
stray compass
#

You basically can create the project and begin coding, all the turmoil is of the way.

pseudo hazel
#

yeah its by far the easiest way to get started

stoic junco
#

private Sound parseSound(String s) { if (s == null) return null; try { String norm = s.trim().toUpperCase(Locale.ROOT).replace('-', '_').replace('.', '_').replace(':', '_'); return Sound.valueOf(norm); } catch (Throwable t) { try { return Sound.valueOf(s.trim().toUpperCase(Locale.ROOT)); } catch (Throwable ignored) { plugin.getLogger().warning("Unknown sound name for PvP config: '" + s + "'"); return null; } when i try to compile the jar it shows an error that says that Sound.valueof is going to be removed what can i use to replace it?

smoky anchor
tender shard
desert aspen
#

?paste

undone axleBOT
desert aspen
#

?tias

#

🙁

rotund ravine
buoyant viper
rotund ravine
stray compass
#

@sullen marlin Sorry for the ping but I built the latest server jar for they who shall not be named and the head fetching works. There is something going on with fetching skull owner profiles in spigot.

hard socket
#

is it possible now to make a nickname plugin with PlayerProfile?

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.

sullen marlin
#

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

sullen marlin
#

Pretty hard to investigate anything without reproduction code or a stack trace

young knoll
#

Have you tried the crystal ball

stray compass
#

The only logged error is

[03:23:12] [Server thread/ERROR]: [BlockProt] Failed to set skull head for "sourgummybear2": The skull profile is missing a name or textures!

#

Used another server framework and it's fully functional.

#

Like I said above, it seems like it may be an issue with how spigot fetches profiles on the backend.

rotund ravine
#

@stray compass What code did you use to make the profile

#

What’s the minimum setup needed to reproduce said bug

stray compass
#

only plugin

#

doesnt work

rotund ravine
#

Brother

#

What we want is what u did in the plugin

stray compass
remote swallow
stray compass
#

It's working on paper and pre 1.21.10 spigot

#

it cant be the way the plugin is fetching the profile or it would universally be dysfunctional.

remote swallow
#

do you get a stacktrace with the error saying it cant load it

stray compass
#

No, just that line I sent.

#

There was another person in here having an issue with fetching offlineplayer details.

#

But it was a bit different

#

Smite me down if I'm wrong but I'm thinking it's probably spigot.

hard socket
#

?paste

undone axleBOT
hard socket
sullen marlin
#

?whereami

sullen marlin
# stray compass The only logged error is `[03:23:12] [Server thread/ERROR]: [BlockProt] Failed...

https://github.com/spnda/BlockProt/blob/15dd2afe45d4e9703423e99f9666d03bd3badb80/spigot/src/main/java/de/sean/blockprot/bukkit/inventories/BlockProtInventory.java#L425

That message is from the plugin, not Spigot. The plugin is hiding the exception, making it impossible to debug.

GitHub

Bukkit plugin to protect your chests, furnaces and more with a modern GUI approach. - spnda/BlockProt

stray compass
sullen marlin
#

I wouldn't be so sure it's a Spigot bug, but whatever

cursive kite
#

Is it possible to show NPC / EntityPlayer in tabs when in a different world?

rotund ravine
#

It is

cursive kite
#

For some reason it 'despawns' or removes from when on world switch

#

when switching back to the world with the npc it shows back

sullen marlin
#

How are you making NPC

wild mulch
#

how do i capture all packets getting sent to the player in protocollib (ALL PACKETS.)

vast ledge
#

Why would you need that

wild mulch
#

im making a plugin that works with a anticrash so when people try crashing the server it fake times out them

#

by blocking all the packets sent to the client xD

#

Basically we get to participate in a little trolling

dark moth
#

lel

hard socket
echo basalt
#

Try updating ProtocolLib

hard socket
#

is my way at least correct?

echo basalt
#

Server version?

hard socket
#

latest too

echo basalt
#

I'm a little busy will look into the code later

#

Using the latest release or dev build?

hard socket
#

its ok take ur time

echo basalt
#

Try a dev build

hard socket
echo basalt
#

Yeah

hard socket
#

Error sending packet clientbound/minecraft:player_info_update io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:player_info_update'

hard socket
thorn isle
#

nowdays with nms being as accessible as it is, and even more so now that mojang is dropping obfuscation, i don't really see much point to using protocollib

tired elbow
#

Hi

#

I have a question about config or yml files

tired elbow
#

HAHAHAHAHAHA

#

I just don't know how to explain this

wet breach
#

just ask

tired elbow
#

Look, let's imagine the following

#

We have a hologram plugin

#

And we can configure the names of the holograms

#

But first comes the name, and then comes everything else about the hologram: text and everything else you want the hologram to have.

#

How to first access the name so that the plugin can then access all the hologram properties

thorn isle
#

let's rephrase the "name" as "id" or "internal identifier"

#

from there, you can have a configuration section in your config for each hologram id

#

e.g.

spawn_welcome:
  text: Welcome, this is the spawn
  location: world;1,3,4
#

here, spawn_welcome is the id of the hologram, and Welcome, this is the spawn is the contents of the hologram

#

to get the section from the config, you'd do config.getConfigurationSection(id), where id in this case would be "spawn_welcome"

tired elbow
#

Thanks bro

#

I always wondered how some plugins did that and I couldn't do it myself lol

#

Now I can make my hologram plugin for my server on version 1.8.8

#

Xd

wet breach
tired elbow
#

It depends

#

From what I can see, current holograms are made with an entity called "text display".

wet breach
#

ok, lets imagine in future then, is it possible there will be lots of definable properties?

tired elbow
#

This entity was added in version 1.19.4

wet breach
#

yeah don't care about that as it isn't relevant to what you decide

#

if these holograms are going to end up having lots of things you can configure as made by you

#

then I suggest going with each hologram gets its own yml file and the name of yml file is the name of the hologram

#

this lets you do things like recurse a directory for all the holograms

tired elbow
#

It can be created, but I would say it's the least optimal thing to do.

wet breach
#

not sure what you mean, files are not inoptimal or optimal in of themselves

tired elbow
#

Wouldn't that fill up the server with unnecessary space?

wet breach
#

how much space you got? 10gb?

#

these days its customary that servers have like 1TB

#

you are not filling 1TB with yml files unless you changed how large a block sector is to some insane size

tired elbow
#

HAHAHAHAHA, well I'll make it so that in the config file you can choose between a file with holograms and another one that generates a folder full of YAML files.

thorn isle
#

it doesn't really matter whether you have a file-per or a single big config

wet breach
#

Anyways, you shouldn't always think in terms of optimal. The way I am suggesting is for ease of use without compromising on optimal

thorn isle
#

personally i don't really see a hologram definition getting big enough to warrant its own file, but you can do that if you prefer

wet breach
#

instead of just one large yml file. Thats all lol

#

and yeah there was servers that had like 100 or more holograms sometimes

thorn isle
#

my favorite approach is a blend of both, sort of like how mythicmobs does it; multiple holograms per file, but an arbitrary number of files

wet breach
#

ah nice

thorn isle
#

e.g. you could have a spawn_holograms.yml that had the spawn related holograms

#

and other files for other things

wet breach
#

makes sense

rotund plume
#

22:38:02] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'LifestealCore 2025.08 (3).jar' in folder 'plugins/.paper-remapped'
org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: Inconsistent stackmap frames at branch target 381
Exception Details:
Location:
dev/norska/lsc/LifestealCore.onEnable()V @52: goto
Reason:
Current frame's stack size doesn't match stackmap.
Current Frame:
bci: @52
flags: { }
locals: { 'dev/norska/lsc/LifestealCore' }
stack: { 'dev/norska/lsc/LifestealCore', 'java/lang/String' }
Stackmap Frame:
bci: @381
flags: { }
locals: { 'dev/norska/lsc/LifestealCore' }
stack: { }
Bytecode:
0000000: b800 632a 2ab7 0067 b800 6db5 006f 2ab8
0000010: 0075 b300 772a 2ab6 007b b600 7fb6 0082
0000020: b800 8699 0014 1288 b800 8e12 90b6 0096
0000030: 749b 000b a701 4912 98b8 008e b500 9a2a
0000040: b600 9eb6 00a2 b600 a72a b600 aa2a b600
0000050: ad2a b700 b02a b600 9eb6 00a2 12b2 b200
0000060: b403 2ebd 0092 59b2 00b4 042e 2ab4 009a
0000070: 5359 b200 b405 2e2a b600 b8b6 00be 53b6
0000080: 00c2 2ab7 00c5 2ab7 00c8 2ab7 00cb 2ab7
0000090: 00ce 2ab6 009e b600 a22a b600 d12a b600
00000a0: d5b6 00d8 2ab6 009e b600 dc2a b600 e101
00000b0: c600 37a7 00ca 4c2b b600 e412 e6b6 0096
00000c0: 101a 1100 9c60 1100 9464 1100 8e60 107d
00000d0: 1068 6011 00d5 6411 00a4 6082 a000 0ba7

#

Does anyone know how to fix this problem?

sullen marlin
#

?whereami

young knoll
#

Either you have a corrupted jar or papers remapping corrupted it

torn shuttle
#

woo

#

got a headless omarchy setup now as a secondary pc that I'm spinning up as a non-production dedicated server

#

now that's fancy

#

it's also a really good pc too

dreamy glade
#

Can someone ELI5 how armor points actually work?
The wiki said each armor point equals 4% damage reduction.
So 20 armor points = 80% damage reduction.
Wiki also said the maximum valid armor point is 30 (achieved via command). I tested it in-game, and it's indeed having a difference. But 30 × 4 would be 120%? The math doesn't add up or am I missing something?

pliant topaz
#

Depending on the incoming damage, armor will be less effective. Toughness decreases the amount of "uneffectiveness". Damage reduction is also capped at a max of 80%.
Anything else can be extracted out of the formular stated in the wiki, altough there is also a further, bigger explanation on there too

dawn flower
#

Is there pdc or something similar in 1.12.2?

chrome beacon
#

No

stoic junco
#

hello so for a chunk visualization command i used invisible ArmorStands with a block on it but i did some testing which larger area and all those entities make the server lag is there a way to make them client sided only?

chrome beacon
#

There are better ways of outlining than spamming armor stands

#

such as structure blocks or particles

#

Could even use a shulker with its size set

smoky anchor
#

If you're on version with Display Entities, then those
You can transform the model however you want - stretch it in one direction to create a line
You can also use heads for solid color

#

Unless you mean something like "making a scaled down version of a chunk"
Which would still lag even with Display Entities, but less.

autumn zinc
#

How i can get the skin texture signature without mojang services because the server will run in offline mode?

short pilot
#

is there any way with commands or anything to place plants on any block without them instantly breaking?

kind of like how debug stick works on changing a block until it's adjacent block is updated

#

if you try to place foliage using code will it automatically break or nah

#

(if it's not on a supported block like grass? )

thorn isle
#

if you do Block::setType and pass false for the block updates parameter, it shouldn't break

#

until something else triggers a block update

short pilot
#

how can i make a chunk be always loaded

thorn isle
#

add a chunk ticket through the World api or use the /forceload command

short pilot
#

I knew I would find some wisdom here

short pilot
#

I'm mainly trying to make a plugin that lets players place plants on any block so this will help

#

hm I was thinking
like someone places a short grass on mossy cobblestone and wants to place another short grass right next to it, it'd trigger a block update

is there any way to cancel that out or do I need to add listeners and then a whole system for that 😭

#

but this helps tho ty

young knoll
#

You can listen to the block physics event and cancel them breaking

#

But that event is pretty spicy

minor depot
#

Hi guys please help to fix not showing join and quit message

zenith elbow
#

how can i disable server messages like [Server: Loaded template .....]

sullen marlin
#

That's not a Spigot message

zenith elbow
#

yeah

#

how can i disable

#

do you know?

sullen marlin
#

Disable plugins until you find which plugin

#

Or could be your server panel

#

Whats the issue?

zenith elbow
#

but i need this command

sullen marlin
#

Whats the command?

#

Surely the message is from the plugin with the command then lol

static quiver
#

why it still says that?

mortal vortex
#

Share the code?

#

And check what’s inside the .jar ITSELF.

static quiver
#
    private void checkUpdates() {
        Bukkit.getScheduler().runTaskAsynchronously(this, () -> {
            try {
                String currentVersion = this.getDescription().getVersion();
                URL url = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + RESOURCE_ID);
                HttpURLConnection con = (HttpURLConnection) url.openConnection();
                con.setRequestMethod("GET");
                String latestVersion = new BufferedReader(new InputStreamReader(con.getInputStream())).readLine();

                if (!currentVersion.equalsIgnoreCase(latestVersion)) {
                    getLogger().warning("====================================================");
                    getLogger().warning("A new version of RepairIT is available: " + latestVersion);
                    getLogger().warning("You are using version: " + currentVersion);
                    getLogger().warning("Download at: https://www.spigotmc.org/resources/" + RESOURCE_ID);
                    getLogger().warning("====================================================");
                    newVersion = latestVersion;
                } else {
                    getLogger().info("RepairIT is up to date. (" + currentVersion + ")");
                }
            } catch (Exception e) {
                getLogger().warning("Could not check for updates: " + e.getMessage());
            }
        });
    }
}```
#

idk if i did it right

#

and yes ik that the plugin only checks if the version is different

#

but i dont think this is a problem

mortal vortex
#

where are you changing the version of the plugin?

static quiver
static quiver
mortal vortex
#

okay

static quiver
mortal vortex
#

trim the output

#

But I have no idea why the endpoint is returning 1.1

static quiver
#

When I open this website it returns 1.0

#

which is different from the 1.1 that the java code returns

young knoll
#

The endpoint doesn’t update that quickly

#

You should parse the versions to actually check if the api is returning a newer version

mortal vortex
#
private boolean isNewerVersion(String latest, String current) {
    if (latest == null || current == null) return false;

    latest = latest.trim();
    current = current.trim();

    String[] latestParts = latest.split("\\.");
    String[] currentParts = current.split("\\.");

    int length = Math.max(latestParts.length, currentParts.length);
    for (int i = 0; i < length; i++) {
        int latestNum = i < latestParts.length ? parseIntSafe(latestParts[i]) : 0;
        int currentNum = i < currentParts.length ? parseIntSafe(currentParts[i]) : 0;

        if (latestNum > currentNum) return true;        // newer
        if (latestNum < currentNum) return false;       // older
    }

    return false;   // same version
}

private int parseIntSafe(String s) {
    try {
        return Integer.parseInt(s);
    } catch (NumberFormatException e) {
        return 0;
    }
}
#

Is discord not parsing that properly

#

Why tf does it say “Java” at the top in raw text

pseudo hazel
#

did you put it right beside the backtick?

mortal vortex
#

There was a space after my bad

young knoll
#

That parseIntSafe is a bit inflatable

#

We have guava so we can do Ints.tryParse

mortal vortex
#

Or guava nectar

#

Dude it’s so fucking good

buoyant viper
sullen marlin
#

What needs updating?

#

Does it not work?

cloud perch
#

It maybe uses nms

thorn isle
#

it looks to be doing a lot of reflective nonsense

#

what does it even do?

#

if it's just storing and dropping different inventory contents per player, there shouldn't be any need for nms or reflection or protocol nonsense at all

cloud perch
#

using reflection to access NMS?

thorn isle
#

didn't check, i only saw a bunch of reflection utils classes

#

but presumably nms yes

thorn isle
#

good shit

#

throw it in the 🚮 and rewrite it

quaint mantle
#

I'm pretty sure you can do it with a datapack

young knoll
#

Do mannequins have inventory data

slender elbow
#

probably armour + main/off hands

young knoll
#

Well yeah, all LivingEntity have that

smoky anchor
#

What about the saddle slot tho Thinkies

#

(players do have that)

slender elbow
young knoll
#

I assume they meant the full 27/36 slot inventory

short pilot
#

i-

buoyant viper
thorn isle
#

bend over

buoyant viper
#

WHAT!

mortal hare
#

what defines as MMO game in today's world?

#

is Minecraft MMO given then fact that most of the action is being done on multiplayer servers with high player counts?

#

if not why i keep finding academic papers referencing it at it is

#

whilst i believe MMO is more like a game like WoW or runescape where you cant even play a game without a server connection

#

im confused

wet breach
#

MMO isn't particular to a game, rather its in the name. Massively Multiplayer Online. So anything that allows massive amounts of players to play at once together.

#

so you have RPG MMO's, RTS MMO's etc

mortal hare
#

what's even weirder is rpg part in this thesis

#

what minecraft has to do with RPG

thorn isle
#

minecraft is an online mmorpg

#

lol

wet breach
#

technically you can say minecraft is an RPG simply because you can roleplay and it has stuff to facilitate that especially its adventure mode

mortal hare
#

that's a very far stretch

wet breach
#

however, I agree it is not an RPG in the sense of what we know an RPG to be

thorn isle
#

i don't know, i feel like that's stretching it a bit

wet breach
#

its not

#

RPG doesn't mean doing quests or the sorts

mortal hare
#

not the worst thing i've found whilst doing research for my bachelors thesis tbh

thorn isle
#

i'm not sure if there are video games that would not be a rpg by that definition

mortal hare
wet breach
#

Look at DnD its an RPG

thorn isle
#

besides like Pong

mortal hare
#

i've found a research paper on explaining freemium models in integrals

#

i swear most research i can find online is so trash that i trust plain google articles more than this

wet breach
thorn isle
#

is monopoly a role playing game

mortal hare
#

i guess

#

because you roleplay as business entities?

#

but you role play as S T E V E in minecraft too

thorn isle
#

i would say monopoly is much more a role playing game than minecraft, because playing a role is part of the game

#

minecraft is a sandbox game

#

you can roleplay with legos, too

#

doesn't mean it's a rpg

mortal hare
#

wtf is rpg then

thorn isle
#

nobody knows

wet breach
#

yes minecraft at its core is a sandbox game, but it facilitates rpg even when you add community customizations

mortal hare
#

it feels that everything that falls under runescape game logic falls under rpg category mostly

thorn isle
#

addon's don't count

wet breach
#

they do

#

not sure what made you think they don't?

thorn isle
#

if addons count then skyrim is both a 4X game and a virtual reality porn game

mortal hare
#

how did we end up from minecraft to vr porn

young knoll
#

Hey the lusty argonian maid was always in the game

#

Bethesda knew what they were doing

wet breach
#

lol

ivory sleet
#

afaik RPG does not mean RP in a game, even if RP is a core aspect of that game it doesnt make it an RPG

#

like rpg and rp are linearly independent

worthy yarrow
#

@wet breach I was selling internet at a store like 10 minutes from your house the other day

wet breach
#

lol nice

ivory sleet
#

i also think mmos are easier to define by providing what an mmo isnt, for example in the games industry, u usually differentiate between coop and mmo, or lets say solo/singeplayer gameplay vs mmo

worthy yarrow
#

Unfortunate how many people hate spectrum over there lol

ivory sleet
# mortal hare

id also say thats wrong, minecraft itself isnt really an mmo on its own as a base game

rough parcel
#

I am not sure if I should be putting this here or not but I was looking for some help with creating a plugin development. I know VERY little about this, so I was looking to comission someone. It is for a PvP Duel/Wager system on my paper survival server, I have all the details and desires written out in a google doc so if you are interested please dm me a portfolio of some of your current work and we can try and find a reasonable price for something like this!!

wet breach
#

the only reason you even go with spectrum is because either the alternatives are worse or there is no alternatives lol

wet breach
#

so it technically meets the definition of an MMO. As it means massively multiplayer online and to meet that is first player numbers and second all players in the same playable/viewable world and can all interact with each other

#

Currently, the server population is dominated by servers that host more then 20 players so that counts as it being such a game

smoky oak
#

if a door doesnt have a blockstate, what holds if its open or closed?

violet blade
smoky oak
#

jfc
thats what i get for trying to make structure data human-readable i guess

#

hm? if BlockState uses BlockData for its........ data, how come not all sub-interfaces use BlockState?

violet blade
#

not every block needs a server-side state object

orchid brook
#

Hi is it possible to remove the sound that is played when u break a block ?

wet breach
smoky oak
#

thats not whats confusing me here

violet blade
#

not sure tho

smoky oak
wet breach
#

Well all blocks have Block Data. Not all Blocks have a state.

#

But because not all blocks have a state, is why you wouldn't have all sub-interfaces use BlockState because it may not be there

#

but BlockData is always there

smoky oak
#

ok so it looks to me like the blockdata (by default) is just the physical state of the correspnding material, but whats up with those rotation and mirror methods? if they exist, why is there no methods to manually change the rotation of the blockdata?

#

im not sure if, if i work with no other plugins involved, i can discard the blockdata when doing structure work

smoky oak
#

ah

#

so a block is (assuming no container/metadata) material + blockdata only, then?

slender elbow
#

well, not all blocks have properties either

#

such as stone

smoky oak
#

thats what null is for kek

slender elbow
#

no, it will still return a valid BlockData

#

just, no specific sub-interface

#

as it has no specific properties

smoky oak
#

of such a block, would getAsString(true) return an empty string then?

slender elbow
#

well, no, it would return the block type name

#

minecraft:stone

smoky oak
#

ah. turns out i cant read

#

is there a way to figure out if it is no sub-interface?

#

i dimly recall some weird way of asking 'is it an instance of this class exactly'

slender elbow
#

one slight problem here is that it's a big interface hierarchy, and the implementing classes are on the server so you can't simply do blockData.getClass() == BlockData.class

smoky oak
#

sooo that i know if i can just store the material?

#

im doing structure stuff

slender elbow
#

what's wrong with storing the result of getAsString as it is?

smoky oak
#

if it has blockData besides the material, that string needs to be stored. its one entry per block
if it doesnt have blockdata, i can just index the materials, and then be like '6x3'

#

and given that most blocks are without any extra data, and this is something that can be generated by players... probably a good idea to compress the resulting data like this lol

slender elbow
#

6x3 🤔

smoky oak
#

yea. six times index three

#
<Format>;<Block 0, Block 1>;0,5*1,0,1,0
#

so that i can do this instead of having to store a long aah string for each block

slender elbow
#

i thought there was a method in Material to get the blockdata Class it uses, but i must be mistaken

thorn isle
#

i vaguely remember seeing that somewhere

#

but it could be in craftbukkit

#

or it could be itemmeta rather than blockdata

smoky oak
#

you think the tags thing could tell me if a block has weird blockdata?

slender elbow
#

i doubt it, unless you start tagging them yourself which kinda defeats the point

thorn isle
#

what are you doing again

slender elbow
#

but ruh roh @Internal

smoky oak
#

if not, is 'Location, Material, Direction' enough?

thorn isle
#

serialize the blockdata and see if it has any fields i suppose

slender elbow
#

that works too i suppose lol

thorn isle
#

if you want human readable serializable form, use the whatever api facility that gives you the blockdata as it's used in /setblock

#

e.g. minecraft:oak_log[axis=y]

smoky oak
#

it already prints blockdata as string, im convinced its that. but this isnt the goal here, i want to compress the data

#

most blocks can be identified by just their material

#

so instead of twenty characters, i want to compress that to two at most

thorn isle
#

that'd be minecraft:dirt[]

smoky oak
#

so... regex?

#

i gues that works

slender elbow
#

i mean, ideally you'd index all block types regardless of whether they have additional properties or not

thorn isle
#

no? the facility is going to give you minecraft:dirt[]

smoky oak
#

feels clunky tho ngl

thorn isle
#

or probably just []

#

if you want to compress it, it won't be human readable

#

if you don't need it to be human readable, use gzip or whatever

slender elbow
#

or just use the worldedit api to store schematics

thorn isle
#

myes, no point reinventing the wheel

slender elbow
#

or the regular minecraft jigsaw structures

smoky oak
#

oh hey
class.getInterface spits out the exact one

smoky oak
thorn isle
#

good time to learn interfaces

#

and not as in the java class type, but as in the programming concept

#

either way, if you really want to homebrew some schematic format yourself, do something like the following

#

have a header table that lists every blockdata involved in the schematic in its full form, so you can serialize it correctly, and assign them to an index

#

then in your data itself, for each block in the schematic, append n bits containing a number pointing at the index of the blockdata that is in that location

#

n bits being the bits required to represent your highest index

#

this is kinda sorta how the game does it

slender elbow
#

you could also have an index table for the properties if you wanna go further

smoky oak
#

well, im assuming here that most of that blockdata is going to be unique excluding rotations

thorn isle
#

and once you're done you run it through gzip or your compression algorithm of choice

smoky oak
#

but indexing it initially should work pretty well

thorn isle
#

you're storing the schematic in a sql database? 💀

smoky oak
#

id rather avoid shoving the resulting data into an item

#

aka 'oh hey bookban'

#

my solution for data i dont know the size of is UUID index in PDC of item -> SQL database with that uuid as key

slender elbow
#

whar

thorn isle
#

unless it's cross-server on like a velocity network, flatfile will serve you better

#

this really isn't where sql shines

smoky oak
#

isnt the access time in those determined by the entry count?

thorn isle
#

no

#

you have a directory with a bunch of files, the name of the file is your key and the contents of the file are your value

smoky oak
#

ah move the problem to the OS, gotcha lol

thorn isle
#

it'll be as fast as your filesystem is at looking up a random file, which will most likely outperform a mysql server fetching a blob from an index

smoky oak
#

noted

thorn isle
#

if you do want a database, something something nosql is probably the go for this

#

but if it's just a local thing and you don't need a database you communicate with from multiple places, flatfile will be simple, effective, understandable for server admins, and require no setup

smoky oak
#

well there is some item metadata that needs to be put into a relational database, but the structure data isnt part of that, so good point

rough parcel
#

I am not sure if I should be putting this here (and if you know a better place to put this, please lmk!) but I was looking for some help with creating a plugin development. I know VERY little about this, so I was looking to comission someone. It is for a PvP Duel/Wager system on my paper survival server, I have all the details and desires written out in a google doc so if you are interested please dm me a portfolio of some of your current work and we can try and find a reasonable price for something like this!!

undone axleBOT
rough parcel
robust helm
#

np

eternal oxide
#

@worldly ingot If you have time.

worldly ingot
#

I do have time

#

?softban @agile prawn Spam bot

undone axleBOT
#

Done. Enough chaos.

hollow oxide
#
       NamespacedKey recipeKey = new NamespacedKey(plugin, "aa-atk");
        player.discoverRecipe(recipeKey);
        recipeKey = new NamespacedKey(plugin, "ab-");
        player.discoverRecipe(recipeKey);```

is there a way to change the order in the recipe book? it seems random but idk, datapacks can change the order of the recipes in the recipe book
sullen marlin
#

Recipe group maybe?

hollow oxide
#

what's that?

golden turret
#

can text from TextDisplay have \n?

#

yes they can

eager roost
#

Does bukkit have anything analogous to ChunkPos from NMS?

young knoll
#

Isn’t that just 2 ints

hard socket
#

https://pastes.dev/yBNThAtaJh
This code updated the tab list corrrectly but no skin modifications are set, tried removed the player using packets and re adding him but didnt work ( players removed from tablist and no skin changes) no paper part is broken I guess it's a packet issue

slender elbow
mortal vortex
#

why do you use a null with a ternary? thhats just lazy

young knoll
gentle yacht
#

im trying to deserialize an itemstack with some vanilla tags on it, but spigot seems to throw an error: Caused by: java.lang.IllegalArgumentException: Specified class does not exist ('Consumable')
The code responsible for serializing the item is ```java
FileConfiguration config;
ItemStack item;
config.set( "item", item );

and the deserialization is:
```java
ItemStack item = config.getItemStack( "item" );

while the actual content of the serialized yaml is yaml item: ==: org.bukkit.inventory.ItemStack v: 4556 type: IRON_INGOT meta: ==: ItemMeta meta-type: UNSPECIFIC consumable: ==: Consumable consume-seconds: 2.0 animation: BLOCK sound: minecraft:entity.generic.eat has-consume-particles: true effects: []
is there something im missing? i'm running the latest version of spigot too: This server is running CraftBukkit version 4563-Spigot-6e369ba-5e06940 (MC: 1.21.10) (Implementing API version 1.21.10-R0.1-SNAPSHOT)

#

it doesn't appear to have made it past the YamlConfiguration.loadConfiguration call though

eager roost
sullen marlin
sullen marlin
remote swallow
buoyant viper
#

spigot breaks confirmed

sly topaz
#

honestly, one could just make an annotation processor to automatically register these instead of depending on one manually having to do it

outer ember
#

What should i do to make a replay plugin?

buoyant viper
#

log any and all player actions

#

upload them to the government

#

???

#

profit.

outer ember
sullen marlin
amber condor
#

Hi all, https://hub.jeff-media.com/ - when will this website be operational? Who will help? I can't compile the plugin I need from the github.

sullen marlin
#

idk ask @tender shard

weak wasp
#

Man md_5 is so good

torn shuttle
#

long outage man

#

they knew I had something to upload

#

they don't want the good plugins to get updated

uncut topaz
#

spigot down ?

torn shuttle
#

cloudflare down

#

so half the internet is down

uncut topaz
#

...

#

ahhh hiii Magma 😄

torn shuttle
#

didn't I just do a support ticket

#

with you in it

#

maybe not, I don't know what happened today that everyone decided to open a ticket

ancient plank
torn shuttle
ancient plank
#

I'm glad I'm not original

hushed spindle
#

what do i have to do when it says "nag {author} of {plugin} for not relocating the {library} package"

chrome beacon
#

Time to relocate

young knoll
#

Relocate it

hushed spindle
#

why does it need to be relocated too

chrome beacon
#

You relocate to prevent conflicts with other plugins

hushed spindle
#

so do i relocate it to my own group id i guess?

chrome beacon
#

Yes

hushed spindle
#

forgive me for asking for a spoonfed solution but how can i do that? i seem to be getting a lot of different answers from google

#

using maven

#

is that something you do in the dependency itself or in the plugins

chrome beacon
#

You do so in the shade plugin

#

Under relocations

hushed spindle
#

definitely overcomplicated this in my head

#

thanks

wet breach
#

how you do it with maven using relocation

#

the excludes are not necessary, but handy to know about if you want to exclude something specific when shading 😉

#

occasionally you end up with some transitive dependencies trying to be shaded in and you just don't want them lmao

golden turret
#

how can i get the default entity stuff such as size, height etc from an EntityType? I want to know if the entity can spawn there (if it can fit)

hasty prawn
#

Anyone have any idea why an Arrow retrieved via EntityShootBowEvent always has fire ticks set to 0 even when it's shot with a Flame bow?

sly topaz
hasty prawn
#

Even delaying by a tick it still returned 0, all the other attributes like Pickup Status, Critical, Pierce, they're all set and I can get those properly

#

It's just fire ticks that for some reason returns 0

mortal vortex
#

What a clown

vast ledge
#

gtfo out of this channel

#

?services

undone axleBOT
mortal vortex
#

When I pressed him he said “fuck up now”, public relations final boss

wet breach
#

the reason for it being on fire even when that is not set yet, is because of HasVisualFire is set to true

#

which gives it the appearance of being on fire, without it being actually on fire

fading drift
#

havent touched plugins in over a year, so could someone please help me with this error:

#
[ERROR] Failed to read artifact descriptor for net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT
[ERROR]     Caused by: The following artifacts could not be resolved: net.md-5:bungeecord-parent:pom:1.8-SNAPSHOT (absent): net.md-5:bungeecord-parent:pom:1.8-SNAPSHOT was not found in https://maven.enginehub.org/repo/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of enginehub-maven has elapsed or updates are forced
[ERROR] 
[ERROR] -> ```
pseudo hazel
#

1.8 should be buried at this point xD

fading drift
#

ahah unfortunately thats what im having to work with

eternal oxide
#

check yoru repos, I don't belive its on teh SNAPSHOT branch anymore

#

?maven

undone axleBOT
fading drift
#

changed to this, however same erorr

#
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository> -->
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
        </repository>```
eternal oxide
fading drift
#

is that not what I updated to?

#

or am I mistaken

eternal oxide
#

you did

#

I was just saying, 1.8 is on there

fading drift
#

oh sorry I think the error was cached

#

looks to be working now

hasty prawn
onyx fjord
#

any clues why my blockdisplay isnt glowing?

        location.getWorld().spawn(location, BlockDisplay.class, (display) -> {
            display.setGlowing(true);
            display.setGravity(false);
            display.setGlowColorOverride(Color.WHITE);
            display.setBlock(block.getBlockData()); // Said block is just some dirt block
        });
#

i might have a clue

worldly ingot
#

Are they able to glow?

slender elbow
#

yes

#

in any one of the 16,777,216 colours of the rainbow

onyx fjord
#

gson is having trouble serializing bukkit colors

#

ive made a wrapper around it

worldly ingot
slender elbow
#

yep

buoyant viper
#

i dont get why people still bother with anything less than 1.12.2

#

and even thats pushing it

worldly ingot
#

I don't understand why people still bother with anything less than 1.21.5

buoyant viper
#

i get 1.8 and 1.12.2 are like "mod-stable" versions bc they either had a pretty long run (1.8) or the game just kept getting constant big changes after it (1.12.2) but like

onyx fjord
#

no point in 1.8 even for pvp

#

because we got blockhitting back

#

thanks to components

#

in items

buoyant viper
#

fwiw maybe its bc it was hypixel but blockhitting felt like ass playing on 1.21

#

granted im also... out of practice

#

but it did feel less like it used to

onyx fjord
#

if hypixel doesnt forward the hitbox to newer versions it might be a slight disadvantage

#

but idk much about hitbox changes across versions

#

i know one server im playing on compensates hitboxes

buoyant viper
#

what does hitbox have to do with it

#

it would be a matter of the hit registering as being blocked or not

#

player reach and player hitbox has remained largely unchanged iirc

#

except for the addition of crawling and changes w sneaking

onyx fjord
#

sneak hitbox is different

#

at least i think

buoyant viper
onyx fjord
#

new code

                    BlockDisplay displayy = location.getWorld().spawn(location, BlockDisplay.class, (display) -> {
                        display.setGlowing(true);
                        display.setGravity(false);
                        display.setGlowColorOverride(org.bukkit.Color.WHITE);
                        display.setBlock(block.getBlockData());
                    });
                    System.out.println(displayy.isGlowing());
                    System.out.println(displayy.getGlowColorOverride());

true
null

#

testing it on blocks like stone dirt etc.

buoyant viper
onyx fjord
#

wdym 💀

slender elbow
#

lol that's funny

onyx fjord
#

whats funny 😢

slender elbow
#

Color.WHITE is argb 0xffffffff, or -1 in decimal; the glow color override being -1 means it will use the default color which is the player's team color, but the api will read that -1 in the display entity as null

onyx fjord
#

but its literally asking for a bukkit color

slender elbow
#

sure

#

just don't use white lmao

onyx fjord
#

😢 called override for a reason

#

so a spigot bug

#

or whatever

slender elbow
#

or use 0xfffefefe lmao

onyx fjord
#

is it a known problem or sum

slender elbow
#

idk

#

-1 being the "default" to use the player's team color is an intended game mechanic

onyx fjord
#

trying gray now

#

wish me luck

slender elbow
#

yeah literally anything else will work fine

#

the thing doesn't even make use of the alpha value

#

what a scam

#

so 0x00ffffff will work fine as it's still white

onyx fjord
#

ill add a dirty workaround just so configurers arent confused

buoyant viper
#

if (white) gray();

onyx fjord
#

true
Color:[argb0xFF808080]

#

wtf

#

oh its the shader ffs

#

thanks

onyx fjord
#

can i make the blockdisplay invisible yet still glowing?

#

using barrier would break shapes

young knoll
#

You can if you make a texture with like 1 alpha

#

Since the game won’t actually render pixels below like 25 alpha, but it’ll still use them to calculate an outline

onyx fjord
#

since glow is see-through-walls ill try making the display .001 smaller

echo basalt
onyx fjord
#

oh lol

young knoll
#

The item does!

#

But yeah the block has no opaque pixels so it has no outline

echo basalt
#

for regular glowing blocks we usually use shulkers or something

#

and maybe scale them with attributes

onyx fjord
#

i just put a slightly smaller blockdisplay of the block type

#

inside of the block

#

99.99% accurate

sullen marlin
#

It's ok you're allowed to admit 1.12.2 was the best version

young knoll
#

Did you try checking a tick later

hasty prawn
wet breach
#

I can't really explain if both settings are not set lol

young knoll
#

What about fire ticks

hasty prawn
#

Returns 0

wet breach
# young knoll What about fire ticks

any ideas? I am leaning towards it being a bug at this point because fire ticks being 0 is typically normal until it hits a target and then ticks are set. But the visual should be set though otherwise where is it getting its flaming appearance from?

hasty prawn
#

Actually does look like fire ticks is set after 1 tick & visual fire stays NOT_SET

#

Guess I'll delay by a tick for that angry_thonk weird thats the only thing that gets delayed

young knoll
#

Visual fire is an override for visual fire

#

It’s not used in vanilla afaik

hasty prawn
#

Yeah I was more saying it's strange that fire ticks is delayed while things like the arrow's Critical and Pierce are set before the event is called

young knoll
#

I blame dinnerbone! ¯_(ツ)_/¯

hasty prawn
#

I'm okay with that! Shame on dinnerbone. Thanks lads dogdance

wet breach
onyx fjord
#

how do i exactly create a blockdisplay of some textured head?

#

the blockdata part

young knoll
#

You don’t

#

Block displays only support block states, not NBT data

#

Use an item display

onyx fjord
#

ahh

fathom fable
analog ether
#

Hey, anyone else is having an issue with items with "org.bukkit.craftbukkit.v1_21_R6.inventory.components.consumable.effects.CraftConsumableApplyEffects" not deserializing ?

#

They're being written correctly (cant paste image of the file, but it is written correctly)

#

But when trying to load them I get

[16:54:55] [Server thread/WARN]:        at org.bukkit.configuration.file.YamlConstructor$ConstructCustomObject.construct(YamlConstructor.java:60)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:464)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:430)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlSeq.construct(SafeConstructor.java:574)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:576)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:210)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552)
[16:54:55] [Server thread/WARN]:        at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597)```
#

[16:54:55] [Server thread/WARN]: Caused by: java.lang.IllegalArgumentException: Specified class does not exist ('org.bukkit.craftbukkit.v1_21_R6.inventory.components.consumable.effects.CraftConsumableApplyEffects')

#

Using the latest spigot

worldly ingot
#

I don't think you are using the latest because this was fixed 3 days ago

#

Re-run BuildTools and it should be resolved

analog ether
#

yeah I saw that, but it doesn't fix my case

#
[16:59:38] [Server thread/INFO]: Checking version, please wait...
[16:59:39] [Thread-3/INFO]: You are running the latest version
#

Can be reproduced by serializing then deserializing this :
give @a mushroom_stew[custom_name=[{"text":"Super Regular Mushroom Stew","italic":false}],lore=[[{"text":"This one is not suspicious","italic":false}]],food={nutrition:1,saturation:1},consumable={on_consume_effects:[{type:apply_effects,effects:[{id:instant_health,duration:1,amplifier:1},{id:absorption,duration:160,amplifier:1},{id:regeneration,duration:80,amplifier:2},{id:speed,duration:160,amplifier:2}]}]}]

#

Since only CraftConsumableComponent was added

worldly ingot
#

Yes I think they should all be registered. Could you open a bug report on Jira?

#

?jira

undone axleBOT
worldly ingot
#

Thank you 🙂

eternal oxide
#

Didn't md just do this fix a couple of days ago?

#

ah effect

#

not just consumable.

mortal hare
#

i was thinking lately rn, what if you designed minecraft server around the idea of linux virtual file system

like expose ABI which would allow to manipulate chunk level control codes with read and write methods and then build everything on top in user-level implementations,
ofc it wouldnt be such a simple ABI, but theoretically this would allow to make platform independent plugins and functionality which would run on both bedrock and java editions

#

this sounds like minestom but without strict java-based API

#

lets say you implement chunk writes/loads and other stuff which is needed to be fast in something like C, expose ABI to interact with the chunks, and then build API's dedicated to specific languages to compile user-space programs which manipulate those chunks with control codes

#

like JVM bytecode, but custom to minecraft iself

young knoll
#

But java and bedrock don’t have the same chunk format

mortal hare
slender elbow
#

lol

#

yeah they have absolutely no reason to do this

thorn isle
#

dovidas says something along the lines of "i was thinking" or "why don't we"

#

wall of text

#

despair

golden turret
#

if I have an Entity object, unload the chunk where it is and load it again and then try to get the same entity from it will the be the same Entity or not?

#

in a way that oldEntity == newEntity

smoky anchor
#

Probably not
Use UUID instead of storing a reference to the entity

thorn isle
#

it won't be ==, but it will probably be equals, and the old entity will return false for isValid()

#

it generally isn't a good idea to hold onto entity references that escape your scope or persist for over a tick

worldly ingot
#

Well, actually, it might not even be equals() because it compares the entity id, not the entity's UUID

#

So no it won't be equals() :p but its UUID will match

thorn isle
#

looks like on paper at least CraftEntity actually compares the nms entity instance with == for equals

worldly ingot
#

Which afaik is functionally equivalent to comparing its numeric ID

thorn isle
#

so yeah it definitely won't be equals if the backing entity gets unloaded and recreated

eternal night
#

Not that holding onto an entity instance is a smart idea

thorn isle
#

easy way to leak memory for sure, much like with players

#

generally speaking, whenever you work with entity instances that weren't created in the same scope you're using them in, you should always at least check isValid()

#

even if it's on the main thread and expected to happen in a single tick; if execution leaves your scope, someone could delete it through the api

#

i do though frequently use entity reference sets/maps managed by entity add/remove events since identity things are nice and efficient

marble spade
#

hey so i'm having a little trouble with the usage of the bossbar, i made all but the style that i assigned to the bossbar doesnt apply, and i added it in both sides, i also tested the other styles and nothing

echo basalt
#

Could be a bukkit bug

sullen marlin
#

just tested it, works fine for me 1.21.10

#

could be viaversion or something bug

sullen marlin
#

Anyone know a tool to manipulate maven repositories locally? Specifically to delete all the old SNAPSHOTS/only retain one of each

light willow
#

mvn versions:purge-local-repository should do it

#

or mvn dependency:purge-local-repository -DsnapshotsOnly=true if you only want snapshots gone

#

if you're running your own repo server just use nexus/artifactory cleanup policies, way easier

sullen marlin
#

I saw that but it purges everything, I want to retain a single local version

#

Yes I basically want a cleanup policy but locally

light willow
#

yeah maven doesn't have "keep latest N" built-in. your local repo is just ~/.m2/repository with predictable structure though

#

script approach (most reliable):

find ~/.m2/repository -type d -name "*-SNAPSHOT" | while read dir; do
  cd "$dir"
  ls -t *.jar 2>/dev/null | tail -n +2 | xargs -r rm -f
  ls -t *.pom 2>/dev/null | tail -n +2 | xargs -r rm -f
done
#

keeps newest jar/pom of each snapshot, nukes the rest. safe because maven redownloads on next build if needed

#

or use this plugin:
mvn de.dentrassi.maven:maven-repository-cleaner:0.1.0:clean-snapshots -DkeepLatest=1

sage patio
#

How can I check if the killed entity on EntityDeathEvent is either Monster and Hostile not Item, ItemFrame and ...?

smoky oak
smoky oak
#

ok so i have a rater self-inflicted problem
im storing data in shulkers. my ender chest now takes about 1-2 seconds to load in the contents. is there a way to only send the data of shulkers when the player hovers over them?

light willow
#

use InventoryOpenEvent to catch when the ender chest opens, then iterate through the inventory contents and strip shulker box NBT before sending to client:

#
@EventHandler
public void onInventoryOpen(InventoryOpenEvent event) {
    if (!(event.getInventory() instanceof EnderChestInventory)) return;
    
    Inventory inv = event.getInventory();
    Player player = (Player) event.getPlayer();
    
    for (int i = 0; i < inv.getSize(); i++) {
        ItemStack item = inv.getItem(i);
        if (item != null && item.getType().toString().contains("SHULKER_BOX")) {
            // Send stripped version, store real version server-side
            ItemStack fake = item.clone();
            ItemMeta meta = fake.getItemMeta();
            if (meta instanceof BlockStateMeta bsm) {
                bsm.setBlockState(null); // strips container contents
                fake.setItemMeta(meta);
            }
            // send fake to client, you'll need PacketPlayOutSetSlot for this
        }
    }
}
#

then use PlayerItemHeldEvent or a custom hover detection to send the real NBT data only when needed

#

but honestly if you're storing that much data in shulkers you're probably hitting the 2MB NBT limit per chunk. might want to rethink the data storage approach entirely

smoky oak
#

well, its nesting inventories for specific items

#

lemme just check something rq

#

hm. my playerdata is 49kb

#

is the ender chest stored elsewhere?

young knoll
#

No

hollow zealot
#

It seems like the SpawnChangeEvent doesn't get called when someone runs the setworldspawn command
I checked everything and i can't seem to find the problem in my code

eternal oxide
#

Do you have a plugin intercepting the command?

hollow zealot
#

nope

#

i only have my plugin on that server

eternal oxide
#

show code you are using to test

#

?paste

undone axleBOT
eternal oxide
#

where you register the listener and the listner itself

hollow zealot
#

    @EventHandler
    public void onSpawnChange(SpawnChangeEvent e){
            System.out.println("[MyEasySpawn] Spawn Location change detected");
    }
}```

Registration :
```        getServer().getPluginManager().registerEvents(new SpawnChangeListener(), this);
eternal oxide
#

Nothing wrong, IF thats the actual code you are using

hollow zealot
#

yep

eternal night
#

spigot version?

#

.10 had some pretty large changes around spawn points of worlds so

#

that might be introduced a bug

hollow zealot
eternal night
#

I mean. 1.21.1 is unsupported anyway

#

even if there was a bug in spigot, you won't get a fix pushed for it

mortal vortex
#

Bro doesn’t pay his staff, plus was told twice about not asking for staff in Discord

thorn isle
#

looking for people to give me money for free

#

would you like to give me money for free?

vocal cloud
acoustic pendant
#

Is jitpack down? I cant access it

#

Can someone enter the page? or is it my problem

weak wasp
acoustic pendant
weak wasp
#

Yeah typo, it's up for me

acoustic pendant
#

Well, I cant access it for some reason

thorn isle
#

it's very finicky with certain artifacts

quasi gulch
#

I use the 1.20.4 spigot API for my plugin but in 1.21.10 the new windcharges don't work right with the EntityExplodeEvent. The blockList contains blocks near the explosion but in vanilla the wind charge does not break blocks. Why is the blockList not empty in this case?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityExplodeEvent.html#blockList()

thorn isle
#

because it still "explodes" them, it just doesn't destroy all block types

#

it will press buttons, shatter pottery (i think) and clear out some sensitive blocks

#

that said i agree it's kind of misleading and unexpected, i know it has caused issues in many plugins

quasi gulch
#

Yeah but it also contains blocks that are not effected by wind charges like dirt or beacons. The discription says it only contains blocks that are destroyed by the explosion

#

I mean is it intended or?

thorn isle
#

i don't know, honestly

#

i could see it either-or, but judging by that description, probably not

#

at the same time, we do need an event for the wind charge explosion and the blocks it "affects", to e.g. make the explosions interact with custom blocks

#

so perhaps it should be split into its own event altogether, and only the actually destroyed blocks should be included in the current explode event

#

that's how i'd do it, but i'm no insider to know whether there's some rationale behind it being this way right now

quasi gulch
#

okay thanks

thorn isle
#

choco might know, and knowing how it always goes, choco probably also has a pr doing something about it that was never merged

quaint basin
#

I couldn't stand the velocity anymore

buoyant viper
#

interesting

sullen marlin
#

Maybe the docs should say "affect" rather than "destroy" now

umbral ridge
#

hi

#

does anyone use hikari cp?

#

is it possible to silent the console messages?

#

they appear sometimes, later on

#

HikariPool-2...3..4..5..6.7.8

sullen marlin
#

probably can set a logger somehow

wispy shore
#

what recepture is renaissance book?

rotund ravine
#

Huh

wispy shore
#

the revive command isn't working for me

rotund ravine
#

What revive command

wispy shore
#

/revive

#

can you help me

thorn isle
#

lol

#

ultra-clown

echo basalt
#

Is there any equivalent for BlockDropItemEvent for dettached blocks?

#

For example, if I place a button and break the supporting block

#

The button will drop but BlockDropItemEvent isn't fired for the button, only the support

wispy shore
thorn isle
#

giga-hyper-clown

#

i am indeed like jesus

wispy shore
#

your dad is hitting you with an Ethernet cable

thorn isle
echo basalt
#

I can prevent it from dettaching with the physics event

#

I just want the item to not drop

thorn isle
#

iirc i marked the positions with the physics event and then listened to EntityAddToWorld for items appearing in those spaces during the rest of the tick

echo basalt
#

that's cursed

thorn isle
#

myes

echo basalt
#

Can I see? :3

thorn isle
#

god knows if i still have it anywhere, i've changed machines like thrice since

#

i'll take a look

#

huh

#

have you tried BlockDestroyEvent?

#

i think that fires for the button

leaden veldt
#

Hi,
why is Bukkit#getOfflinePlayer(UUID) deprecated and what should I use then to get a offline player with the name?

quaint basin
#

Are schedulers executed after or before events?

sullen marlin
#

Doesn't look deprecated to me

sullen marlin
thorn isle
#

i believe they're run at the start of the tick but i'm not sure

sullen marlin
#

I think so too, but that's not really the question

quaint mantle
#

🤔

thorn isle
#

by game events i assume they mean event listeners called by things happening during the tick

sullen marlin
#

It's not deprecated in spigot 1.18 either

leaden veldt
# sullen marlin It's not deprecated in spigot 1.18 either
@Deprecated 
public static org.bukkit.OfflinePlayer getOfflinePlayer(
    String name
)
 
Gets the player by the given name, regardless if they are offline or online.
This method may involve a blocking web request to get the UUID for the given name.
This will return an object even if the player does not exist. To this method, all players will exist.

Deprecated
Persistent storage of users should be by UUID as names are no longer unique past a single session.

Params:
name – the name the player to retrieve

Returns:
an offline player

See Also:
getOfflinePlayer(UUID)
thorn isle
#

you were linking the UUID method, but i guess you're talking about the name method

leaden veldt
#

Oh im stupid

#

yeah I meant that all the time

quaint mantle
#

i wonder

sullen marlin
#

I think the documentation explains it sufficiently

#

Do you have a question not explained by it?

leaden veldt
#

No, I understand the reason but I am curious how to handle commands like /dosomething <PLAYER> when I need to handle with the Offline player object

quaint basin
sullen marlin
#

By using the method

#

Deprecated doesn't mean it doesn't work

leaden veldt
quaint basin
# quaint basin When the player leaves - I check if the player is in combatPlayers and if so, I ...

My question is whether this could cause race problems - I was thinking that if player1 == player is false, it would remove the player from combatPlayers, and only then would the PlayerQuitEvent be called, and within that event the player would no longer be in combat, thus causing a race problem. But this can't happen since for Bukkit.getPlayer(id) to return null, it means the playerquitEvent has already been called, right?

leaden veldt
#

but if there isn't one, i will ofc use it

sullen marlin
#

@SuppressWarnings

#

Why do you need an offline player object?

young knoll
#

I mean technically you could call the Mojang api yourself

leaden veldt
leaden veldt
quaint basin
leaden veldt
#

oh thats OnlinePlayer

quaint basin
leaden veldt
#

i am so lost today

leaden veldt
quaint basin
leaden veldt
#

but there the method is also deprecated

quaint basin
#

Do you need to give items to offline players?

leaden veldt
leaden veldt
leaden veldt
quaint basin
#

If I have a Player instance representing a player, and that player is online, and then on a later tick I do Bukkit.getPlayer(player) and it returns null, am I guaranteed that the PlayerQuitEvent for that player was called previously?

thorn isle
#

or the player is dead

quaint basin
thorn isle
#

iirc dead players don't have a corresponding valid Player instance

#

but yes, if it returns null they're not online or are maybe dead

#

i'm not 100% on the dead part

quaint basin
quaint mantle
#

but that wouldn't make any sense. A dead player is still a player

quaint basin
#

This looks like AI to me

thorn isle
#

yeah, but the object is tied to the entity

#

and a dead entity is not a valid entity

quaint basin
#

but no

#

But your logic is good

thorn isle
#

you can try it and let me know if it's the case or not

quaint basin
#

im 99.9% sure ure wrong about that

#

99.9999%

thorn isle
#

it's not logic, it's memory

#

i remember it specifically because it's something that you would be 99% sure is false

quaint mantle
#

ddr5?

quaint basin
#

with all due respect to my brother

thorn isle
#

if it returns null, the player is not online, or possibly is dead

#

you can ignore the possibly is dead part if you want

quaint mantle
thorn isle
#

and if the player is not online now but was online previously, then at some point in between the quit event has fired

quaint basin
quaint basin
#

this is what i am asking

#

I'm developing a combat plugin and I'm worried about race problems

quaint mantle
#

if there's no player then the quit event should be done with execution

#

probably

thorn isle
#

races are only really a concern in multithreaded environments

quaint basin
#

Where's the md5 in these situations?

thorn isle
#

if you're using the listeners and the scheduler, you don't have to worry about them

quaint basin
#

you convinced me

#

thank you

#

!!

quaint mantle
#

good

#

Battery low

#

i di

quaint basin
#

The more I study, the dumber I become

buoyant viper
umbral ridge
#

ddr2

#

intel pentium

#

$5 aliexpress pc case

#

homemade keyboard

#

plastic mouse

buoyant viper
young knoll
#

Dance dance revolution 2

umbral ridge
#

windows ME

#

mistake edition

hybrid spoke
buoyant viper
young knoll
#

What’s wrong with xp!

buoyant viper
#

Windows
its in the name

#

a bad bunch ruins the good apple...

hybrid spoke
#

macos ftw

buoyant viper
#

could not agree less

#

macos is just bootleg BSD

hybrid spoke
#

i like it, that's all it needs to win me over

buoyant viper
#

the customer is always right, in the matter of taste...

cinder abyss
#

Hello, how can I get the loot table corresponding to a chest ?

mighty mountain
#

How do I like make rpg class work like I don't know how to make it work..

chrome beacon
#

Depends entierly on what you want it to do

chrome beacon
#

Get the state cast it to Chest and then call getLootTable

echo basalt
#

Any of you nerds know the packet structure for light data? I'm trying to individually light a block

buoyant viper
#

have u consulted the wiki

echo basalt
#

the wiki is confusing as fuck

#

and this light data class is used for both updating entire chunks and blocks

#

and regions or something

buoyant viper
#

is it possible to light an individual block

echo basalt
#

it is

#

and light data is split into nibbles fml

#

is there really no easy way to set a block's light without it spreading

buoyant viper
#

pretty sure

#

could try those weird Light blocks

thorn isle
#

yeah i'd probably just sendBlockChange light blocks

#

unless you want the client to not do light updates, but that's pretty fragile as it might just decide to do them anyway due to a clientside update

echo basalt
#

I don't want the light to scatter

#

crazy my client just crashed ok

#

aand this doesn't work.. amazing

#

or maybe it works too well

wet breach
echo basalt
#

forgot to call my custom action

#

typical

wet breach
#

lol

echo basalt
#

this is only slightly insane

#

uhh

#

we're having weird light artifacts!!

#

I can't tell if the client is fighting me or not

wet breach
#

Might be from the client trying to do its own thing =/

echo basalt
#

could be

#

Might have to intercept packets

#

I hate this