#help-development

1 messages · Page 1239 of 1

chrome beacon
#

Yes

#

This video is a bit old but the concept is the same

white crescent
#

I will try it, thank you.

white crescent
chrome beacon
#

Need to adapt that to whatever version you're using

#

The video is for 1.13

#

Check the Minecraft wiki for the current format of things

white crescent
#

the default.json is same?

radiant aspen
white crescent
#

I have pack.mcmeta for 1.21.4

chrome beacon
#

Just judging by the wiki

#

Somethings wrong with your pack or it's not applied

wide quest
#

Hello I was looking for some help, really weird situation. When a player touches a dirt path (the block you make when you right click grass with a shovel), They get tpped outside of the world boarder and die. I thought it was due to RTP so I replaced it with a new plugin but same issue.

#

Does anyone know what could cause an issue like this?

sullen marlin
#

keep removing half your plugins till it stops

wide quest
#

😩

quaint mantle
#

hi!

#

I wanted to create some custom tools. I would have to pass an instance of something that implements ToolComponent, don't I, to create a custom tool?

smoky anchor
#

call ItemMeta.getTool(), it creates that object for you

quaint mantle
#

oh.

#

I thought I had to implement it myself nvm.

#

how do I define the blocks it should mine? I am guessing its ToolRule?

#

Like passing it a Tag or a set of blocks. How is this done?

smoky anchor
#

yes, one of these

quaint mantle
#

oh ok.

#

I don't see a setBlock() method on ToolRule or the ToolComponent.

smoky anchor
#

well I do

#

it's setBlocks()

quaint mantle
smoky anchor
#

well in ToolComponent

#

The docs are quite useful, I do recommend taking a look here

quaint mantle
#

https://imgur.com/ofzM1lS

Still doesn't show anything. Oh yeah, I am on 1.21.1. Should have probably mentioned that first, my bad.

smoky anchor
#

Ye well just... update ?

quaint mantle
#

Yeah. Going to do that soon. Just have to get this thing out.

torn shuttle
#

hm cursor is kind of interesting

echo basalt
#

sup magma

#

should I start doing travel plans for apr 4th?

torn shuttle
echo basalt
#

I have a friend in leiria I'd like to visit and it's fairly close to my birthday

torn shuttle
#

the movie comes out on april 4th, I'm not sure if we get a room in the morning that we'll get to see it basically early right

echo basalt
#

I can stretch a couple days

#

idea would be that I'd hang around in leiria, check by my grandma's and then visit you whenever

#

spending a week around the 29th - 5th

#

I can stay however long I want at my grandma's but I don't really want to push back too many days

torn shuttle
#

I'll talk to the movie theaters tomorrow

echo basalt
#

LMK

torn shuttle
#

yeah will do

#

have to do the down payment 72h ahead of time too

echo basalt
#

I get really cheap bus discounts if I book a week in advance

#

and by cheap I mean getting to lisbon for 5 bucks

torn shuttle
#

we have flexbus here or whatever it's called, it's stupid cheap and pretty good

echo basalt
#

flixbux yeah

blazing ocean
#

flix

echo basalt
#

naw I'd go redex

#

flix is like 1€ more but you gotta go on crazy schedules and the bus is packed

#

meanwhile redex is slightly cheaper and overall more comfy

#

and I've used it quite a bunch so ik how it works

torn shuttle
#

for whatever reason I never end up reserving nor paying my bus tickets, always happens that I'm riding with someone else and they take care of it

#

then again I travel so little that maybe it's not that surprising

echo basalt
#

pretty sure it's 20 bucks if I schedule on the spot

#

but yeah I also gotta check out airbnb's

torn shuttle
#

cursor is kind of interesting as an IDE

#

they definitely haven't got intellij's smooth moves yet though

echo basalt
#

I just wish my AI autocomplete didn't crash once in a while

#

life's perfect otherwise

torn shuttle
#

what are you using?

echo basalt
#

supermaven

torn shuttle
#

tf is that even

echo basalt
#

it's basically copilot but good

#

same price as copilot

#

zero customer support since they got bought out by cursor

#

but hey it works and the free tier's not awful

#

try the premium trial on IJ

torn shuttle
#

lol is this running on gemini

echo basalt
#

and it has a chat feature that takes into account context

torn shuttle
#

yeah well that's kind of a given now

#

even my obsidian plugin does that

echo basalt
#

but yeah the autocomplete's good until you have like 3+ windows open

#

then it borks itself because it might be sharing context between projects

#

and sometimes that's too much

#

but when it works it works really really well

#

I tried going back to copilot and I just couldn't

echo basalt
#

eh it might work

#

just try it out, won't cost much

torn shuttle
#

hmm

#

just wondering if I should continue trying cursor out

#

afaik it's basically vscode with a ton of AI integration

#

lol cursor defaults

#

tells you a lot about how confident they are about their own models

#

at this point if you're using gpt 3.5 for programming you need to get your head checked

mortal vortex
#
    public void createFilledCircle(int centerRow, int centerCol, int radius, Tile tileType) {
        if (radius <= 0) return;
        
        for (int row = centerRow - radius; row <= centerRow + radius; row++) {
            for (int col = centerCol - radius; col <= centerCol + radius; col++) {
                double distance = sqrt(pow(row - centerRow, 2) + pow(col - centerCol, 2));
                if (distance <= radius) {
                    placeTileAt(row, col, tileType);
                }
            }
        }
    }

Anyone know how to get circles looking better than this?

#

I am working with Java8, and I cannot use Java libraries, like math, i needed to writ my own functions for sqrt.

echo basalt
#

looks accurate for a short radius

nova notch
tranquil pecan
#

How about this

mortal vortex
#

yeah but how would i generate that?

tranquil pecan
#

Totally didn't draw it

tranquil pecan
# mortal vortex yeah but how would i generate that?

Ok this one is working

public void createFilledCircle(int centerRow, int centerCol, int radius, Tile tileType) {
    if (radius <= 0) return;
    
    for (int row = centerRow - radius; row <= centerRow + radius; row++) {
        for (int col = centerCol - radius; col <= centerCol + radius; col++) {
            int deltaRow = row - centerRow;
            int deltaCol = col - centerCol;

            if (deltaRow * deltaRow + deltaCol * deltaCol < radius * radius) {
                placeTileAt(row, col, tileType);
            }
        }
    }
}```
mortal vortex
#

THANKS

white crescent
# chrome beacon Looks like it's almost the same yeah

I have this in default.json and it doesn´t work

{
"providers":[
{
"type": "bitmap"
"file": "minecraft:font/empty_start_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff1"
]
},
{
"type": "bitmap"
"file": "minecraft:font/empty_middle_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff2"
]
},
{
"type": "bitmap"
"file": "minecraft:font/empty_end_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff3"
]
},
{
"type": "bitmap"
"file": "minecraft:font/filled_start_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff4"
]
},
{
"type": "bitmap"
"file": "minecraft:font/filled_middle_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff5"
]
},
{
"type": "bitmap"
"file": "minecraft:font/filled_end_segment.png",
"ascent": 0,
"height": 15.0,
"chars": [
"\uEff6"
]
}
]
}

blazing ocean
#

are you sure your textures are in assets/minecraft/textures/font

white crescent
#

yea

blazing ocean
#

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

white crescent
#

if I type this into chat it just say 6 empty squares /title @p actionbar ["\uEff1 \uEff2 \uEff3 \uEff4 \uEff5 \uEff6"]

drowsy helm
#

use json lint

#

the json you gave isnt valid

#

you're missing commas

#

Also you can enable debug console in the minecraft launcher and it will tell you whats wrong with your resource pack

white crescent
#

it works now, thank you so much

buoyant viper
#

why no built in funcs?

mortal vortex
blazing ocean
pure dagger
#

i need to make enchantment book which gives one of 4 custom enchantments, should i just use Pdc or create an actual enchantment???

chrome beacon
#

No API to create an enchantment atm

#

So PDC

blazing ocean
#

<insert unnamed fork>

pure dagger
#

oh, i didnt know

#

is there a way to make it applyable in anvil?

chrome beacon
#

Yeah checking the prepare event

pure dagger
#

thanks

white crescent
#

Can someone help me? I have this bar but it overlapping the name bar of item someone know how to fix it?

blazing ocean
#

need to move it down

white crescent
#

I want it like that because if you are in water it will overlap with the bubbles

drowsy helm
#

Nothing you can really do unless theres a shader for it

blazing ocean
#

you would have to move up the item name or move down the bar if the item name is rendered

fair rock
fair rock
#

Just watch it entirely

white crescent
#

I watched it but didn´t find how to do it

fair rock
#

Theres a timestamp

lethal knoll
#

Any documentation on the backwards itemstack deserialization? in 1.16.5 it throws an error for the items from the versions before.

chrome beacon
#

If you want to update an itemstack you need to run it through the DFU

lethal knoll
#

DFU?

chrome beacon
#

DataFixerUpper

#

Let me check if Spigot has API for that

blazing ocean
#

ItemStack#serializeAsBytes runs through DFU

#

well, deser does but yea

chrome beacon
#

Aight use that ^^

pseudo hazel
#

thats paper

blazing ocean
#

oh shit

#

runs

lethal knoll
#

But so it would becomes unreadable for humans

pseudo hazel
#

there is no good way to do that

chrome beacon
blazing ocean
#

I'm sorry for disappointing you olivo

#

getting banned from spigot now 😔

pseudo hazel
#

you cant have perfect serialization and human readable item stacks at the same time

lethal knoll
#

So there is no solution?

pseudo hazel
#

you cna try but you would be the first to do it if you manage to succeed xD

#

the way its usually done is people make custom serialization for the things they care about

lethal knoll
#

Only alternative I can think of is creating my own custom serializer

#

yeah exactly

#

I'm unsure why the existing spigot API doesn't have an implementation for deserializing it

#

Unless it's drastically different

chrome beacon
#

I mean it does

#

I just don't think it passes through the DFU

pseudo hazel
#

well its not meant to be used this way

#

spigot api for serialization is an oversimplified solution to a problem , but you have an extra spicy problem because of the versioning

lethal knoll
#

Yeah, but asking the server owners to recreate all the items doesn't seem like a good solution either

pseudo hazel
#

well that means you need to read in those items and make something sensible out of it

lethal knoll
#

Yeah, so custom parser it is

#

It is what it is

pseudo hazel
#

thats what I did when I moved to byte serialization from spigot serialized stacks

lethal knoll
#

I just know that this will cause issues, there is so much to ItemStacks

pseudo hazel
#

yweah

#

thats the whole issue xD

lethal knoll
#

Yeah because for example books,

#

well I can think of quite a bit of things xd

pseudo hazel
#

mojang has a DFU (DataFixerUpper) but its not being used in spigots item serialization

#

and even the DFU doesnt fix everything

eternal night
#

Usually the proper solution is just a non readable format and having admins do items through ingame stuff

lethal knoll
#

but the byte serialization was paper right?

eternal night
#

yea

#

¯_(ツ)_/¯

lethal knoll
#

so no solution for spigot :p

eternal night
#

on spigot it'd be NMS

lethal knoll
#

yeikes

#

Okay thank you both, I'll go sit in a corner now and cry

fickle spindle
#
        Inventory stats = Bukkit.createInventory(p, 9 * 5, Utils.color("&7stuff"));
        ItemStack head = new ItemStack(Material.PLAYER_HEAD);
        SkullMeta meta = (SkullMeta) head.getItemMeta();
        meta.setOwner(t.getName());
        head.setItemMeta(meta);
        stats.setItem(10, getItem(head, convertToCustomFont(t.getName()), "lore"));
        return stats;
    }```

when i perform the command for get the gui of an online player i get the head of the target player if i do it for an offline player i get alex head
quaint mantle
#

What does #.spigot() do?

chrome beacon
#

It gives access to Spigot only methods

#

That are not present in CraftBukkit

#

Usually they are methods using the Bungeechat API

chrome beacon
#

And is the server in offline mode

worldly ingot
fickle spindle
fickle spindle
dapper flower
#

there are some items that i don't want to get bundled, how can i pull it off?

chrome beacon
white crescent
#

Can I somehow make like in one corner two abilities and cooldowns and in the second corner keep the bar? Like how to make it with resource pack and action bar

blazing ocean
#

to have something be properly offset, append your negative space, content, and then a positive space of the same width

white crescent
#

thank you

fickle spindle
#

how can i make a placeholder that return a numeric value (ik that if it's a string is fine too the problem is that if i try to create a leaderboard with ajl of this placeholder i can't but i don't know how to parse it as an integer because the default onRequest method for placeholders is as a String)

kind hatch
#

#toString()

#

intValue + ""

#

String.valueOf()

#

Integer.toString()

#

Plenty of ways to convert it to what you need.

fickle spindle
# kind hatch #toString()
    public @Nullable String onRequest(OfflinePlayer player, String params) {
        if (player != null && player.isOnline()) {
            Player p = player.getPlayer();
                if (params.equalsIgnoreCase("money")) {
                return format(Double.parseDouble(sql.getMoney(String.valueOf(p.getUniqueId()))));
            }
        }
        return null;
    }```


if i do `/ajl add money` it say that it send back an error because it's not a numeric value this is not what i'm needing i need to use this method for int values or double
kind hatch
#

Show the stacktrace.
It's one of those nested methods.
Likely the #parseDouble() or #getMoney() method.

umbral ridge
#

hey

#

is persistent storage per world? for entities

#

or is it for all worlds

fickle spindle
kind hatch
#

Well, maybe it's an issue with your #format() method then.
I don't have the code to either one of those so it's hard to determine where the issue stems from.

fickle spindle
# kind hatch Well, maybe it's an issue with your #format() method then. I don't have the code...

maybe i'm not explaining myself right i need to make a leaderboard for my placeholder money but i can't because the Override method that i'm using public @Nullable String onRequest(OfflinePlayer player, String params) { don't let me change it from String to another Type, there is something that i'm doing wrong or the String is the only method aviable for it and i need to do something else for parse it as a Integer / Double?

#

if something that i just said is not that clear to you just let me know and sorry for wasting your time 🙂

thorn isle
#

i think you have something backwards but i'm not 100% sure what that is

#

String is the return type of the method

#

this is because placeholders are always resolved to text; never numbers

#

your job is to resolve your placeholder into text

kind hatch
#

The method returns a String...

public String onRequest() { }

thorn isle
#

yes.

#

so return a string

kind hatch
#

Meaning you need to convert your values to a string

thorn isle
#

as was noted above there are many ways of converting a number to a string

#

String.valueOf(Number) for example

fickle spindle
#

Ajl Error doing /ajl add money The placeholder 'money' does not give a numerical value. Make sure that the placeholder returns a number that is not formatted. <- that mean that it can be a string but made with only numbers?

thorn isle
#

what prints this error exactly

kind hatch
#

^

fickle spindle
thorn isle
#

what does the placeholder return?

#

are you using papi? try /papi parse

#

i have no clue what that plugin is or what it does or what it expects, but based on just the error message, I'm guessing the "money" placeholder returns something like $200, which can't be parsed as a number because $ is not a digit

fickle spindle
thorn isle
#

i don't know

kind hatch
#

Add the formatting to the placeholder string, not before it.

thorn isle
#

ask the leaderboard plugin maintainer

kind hatch
#

Or add it in the leaderboard config

#

There's multiple ways to do it.

thorn isle
#

i'm guessing the leaderboard plugin wants the numerical rather than formatted value to be able to sort the leaderboard

kind hatch
#

You could even have multiple placeholders.

%placeholder%
%placeholder_formatted%

thorn isle
#

the value to display should be configurable separately probably

vague kayak
#

im getting error while compile 1.8.X ```
Exception in thread "main" java.lang.RuntimeException: Error patching Block.java
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:617)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Iterator.forEachRemaining(Unknown Source)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at org.spigotmc.builder.Builder.startBuilder(Builder.java:568)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:60)
Caused by: difflib.PatchFailedException: Incorrect Chunk: the chunk content doesn't match the target
at difflib.Chunk.verify(Chunk.java:86)
at difflib.ChangeDelta.verify(ChangeDelta.java:78)
at difflib.ChangeDelta.applyTo(ChangeDelta.java:44)
at difflib.Patch.applyTo(Patch.java:43)
at difflib.DiffUtils.patch(DiffUtils.java:70)
at org.spigotmc.builder.Builder.lambda$startBuilder$2(Builder.java:605)
... 13 more

split gull
#

how do i get the version portion of the craftbukkit package?

org.bukkit.craftbukkit.v1_20_R4.CraftServer
                       |______|```
split gull
thorn isle
#

get a craftbukkit class, call getName on it, and parse it

cinder abyss
#

Hello, how can I create a boss bar in mc 1.8.8 ? I tried inventive talent's bossbar but it just always throw errors

vague kayak
#

can you test?

kind hatch
split gull
vague kayak
split gull
vague kayak
#

yes

minor otter
#

Opening a gui for the player, the title doesn't allow for line breaks right? The only way to move text down is to make a unicode character for every letter you want to be lower?

minor otter
#

Time to make 3 different definitions of ascii font for different lines

split gull
#

lol

thorn isle
#

e.g. the concrete type that Bukkit.getServer() returns is CraftServer and will be in that package

kind hatch
#

Skill Issue

vague kayak
#

sad

#

can you show me your java version

kind hatch
#

BT used Java 8 for that run.

split gull
kind hatch
#

In fact...

blazing ocean
#

shadow are you using outdated software

kind hatch
#

Idk, maybe.

#

It's very possible

#

But still

split gull
#

we caught him

kind hatch
#

Skill issue

#

Oh

blazing ocean
#

how's the new GUI coming along

kind hatch
#

That's what you meant

vague kayak
#

this can be cause by internet provider?

kind hatch
blazing ocean
kind hatch
thorn isle
#

paper's runtime omits the craftbukkit package nowadays

split gull
blazing ocean
thorn isle
#

so you don't need to get it (and can't) both because it no longer exists

split gull
#

bruh

kind hatch
#

Paper moment

thorn isle
#

it was used in Class.forName calls before, but now you can just put the actual package name without any version replacement logic

#

since the package names are the same across versions

blazing ocean
#

?whereami

split gull
#

im looking to make a cross platform product

eternal night
#

1.20.5

thorn isle
#

like uh, yeah, sounds about right

kind hatch
#

This was my workaround to run it on both paper and spigot.

#

I still rely on the older method if it's available.

split gull
#

i see

#

but i need it to access nms with reflection

thorn isle
#

you can check whether you're on 1.20.5 or higher via the api

#

if you are, omit the package name from your reflection calls

vague kayak
#

i ran on a empty folder everything default and java 8 is latest what can be wrong?

thorn isle
#

if you aren't, use the old logic

eternal night
split gull
#

alright, thanks

eternal night
#

that method existed since like

#

2010? 2011?

split gull
#

don't even mention those golden years

eternal night
#

golden kekwhyper

split gull
#

i cant be feeling old at 19

eternal night
#

golden age at 4, you certainly enjoyed minecraft back then 5Head

thorn isle
#

💀

split gull
eternal night
#

Depends what you compile with i think

split gull
thorn isle
#

yeah, it depends a bit

vague kayak
#

should i use jre or jdk?

kind hatch
#

JDK

eternal night
#

jdk

split gull
thorn isle
#

either way at runtime it gets remapped out

split gull
#

alright

eternal night
#

For now ™️

thorn isle
#

you can remap it at compile time or during plugin bootstrap

split gull
#

smart call

thorn isle
#

the end result is the same

eternal night
#

Still think paper should get rid of that plugin remapping typing

split gull
eternal night
#

Yea

split gull
#

alright

thorn isle
#

i'm ambivalent towards it because i only build mojang mapped plugins and run a mojang mapped server

#

so it doesn't really do anything for me

eternal night
split gull
#

also is it paper only, sorry for the paper question but you seem knowledgeable

thorn isle
#

but maybe one day i'll need a third party plugin that relies on it

eternal night
#

that was their last announcement in .4

blazing ocean
#

"their" lynx you're a maintainer

eternal night
#

shush

#

I keep it undercover

blazing ocean
#

gonna blow your cover

eternal night
thorn isle
#

i like the mojang mappings specifically because it means i don't need to go through my 20 nms plugins for each new version and re-build and re-obfuscate with the new slightly different mappings

blazing ocean
eternal night
#

Yea mojang mappings has been a blessing.

eternal night
#

Also for hot reloading KEKW

blazing ocean
#

hear me out tho... yarn

eternal night
blazing ocean
#

okay I got something better... intermediary

#

I mean tbf it's what fabric uses at runtime in prod envs

thorn isle
#

yes let's remap it even more times

blazing ocean
#

remap spigot -> mojmap -> yarn -> intermediary

eternal night
split gull
#

finna make my own mappings

blazing ocean
#

🙂

eternal night
#

spigot still runs on spigot mappings + versioned CB package

split gull
eternal night
#

hm?

thorn isle
#

part of the "make nms shit not break every update"

split gull
#

oh

thorn isle
#

since to get into nms you almost always need to go through craftbukkit

split gull
#

i see the sense now, mb

thorn isle
#

and if the craftbukkit package changes every version it's kind of all for nothing

blazing ocean
#

compile times stonks

kind hatch
#

Ah yes, hour long compile times.
Time to compete with firefox and chromium compile times.

blazing ocean
#

linux comptimes tho

eternal night
split gull
#

hear me out, windows compile times

vague kayak
#

same error with jdk

eternal night
#

Well

#

?paste

undone axleBOT
eternal night
#

throw the error in a paste

vague kayak
kind hatch
#

Did you run it in a new directory when you updated JDKs?

vague kayak
#

what

kind hatch
#

Cause it sounds like you have some jank work folders sitting around.

vague kayak
#

Can you take a look at anydesk

kind hatch
#

Probably not.

  1. Not gonna put that shit on my computer.
  2. Don't think it even supports linux.
quaint mantle
eternal night
#

💀

vague kayak
#

so should i delete a jank folder from buildtool?

eternal night
#

I'd yank everything yea

#

presumably a faulty decompile?

kind hatch
#

You should just run it in a new folder.

#

Or delete everything that it created and run it again.

vague kayak
#

I tried this

#

whats your java sub version

kind hatch
#

sub version?

vague kayak
#

8ublabla

kind hatch
#

build 1.8.0_442-8u442-b06~us1-0ubuntu1~22.04-b06

vague kayak
#

i have 431

#

is this can be issue?

kind hatch
#

Shouldn't be, but it doesn't hurt to have the latest stuff installed.

#

Well I'll be... Anydesk does support linux.
Still not gonna install it. lmao

vague kayak
#

xd

vague kayak
#

im in pure pain

#

can you send me jar

split gull
#

question, if I do Class.forName with net.minecraft.server.level.ServerPlayer in a module that doesn't actually have the nms dependency will it work?

remote swallow
#

not on spigot

#

thats a mojang mapping, for reflection you'll need to use spigot mappings

thorn isle
#

i think the question is more about classloader access

#

yes the nms classes are accessible to your plugin classloader even without building against nms directly

#

iirc paper limits access to classes from other plugins (that aren't depend/loadbefore in your plugin.yml), but the server classes are always fair game

split gull
#

so it should be fine, right?

remote swallow
#

if you use correct mappings yeah, use spigot mappings if you want spigot+paper as paper will remap if you only awnt paper use mojang

split gull
#

wdym correct mappings

thorn isle
#

net.minecraft.server.level.ServerPlayer doesn't exist in the spigot runtime because of craftbukkit/nms package relocation

fallow violet
#

Guys dont ask why i want this but how can i modify the tabcompletion outside of a command? Like is there any event for that? bcs TabCompleteEvent does not fire at all

remote swallow
#

nms has no version its just still under spigot mappings

kind hatch
cinder abyss
#

wiki vg is down ?

blazing ocean
#

?protocol

cinder abyss
#

okay thanks

cinder abyss
blazing ocean
#

the page history

cinder abyss
#

okay thanks

split gull
#

should i do net.minecraft.server.level.EntityPlayer then?

remote swallow
#

Yeah

split gull
#

kk ty

cinder abyss
#

@blazing ocean hi, how do you report 3d location on a 2d plan relative to the player eyes ?

blazing ocean
#

I can show you the method I used

#
    fun moveCursor(player: ServerPlayerEntity, yaw: Float, pitch: Float) {
        val (_, _, cursor) = data[player] ?: throw IllegalArgumentException("player does not have data")
        val normalizedYaw = ((-yaw + 180) % 360) - 180
        val normalizedPitch = clamp(pitch.toDouble(), -90.0, 90.0)
        val horizontalFactor = normalizedYaw / 45.0
        val verticalFactor = -normalizedPitch / 45.0
        val x = x + (horizontalFactor * width).coerceIn(-width, width)
        val y = (y + 2) + (verticalFactor * height).coerceIn(-height, height)
        val z = z + distance
        val target = TeleportTarget(player.serverWorld, Vec3d(x, y, z), Vec3d.ZERO, 0f, 0f, setOf(), TeleportTarget.NO_OP)
        cursor.teleportTo(target)
        player.packet(EntityPositionS2CPacket(cursor.id, PlayerPosition.fromTeleportTarget(target), setOf(), false))
    }
#

glhf with that

cinder abyss
#

Okay interesting, thanks

thorn isle
#

take the dot product between the normal vector of the 2d plane and the player's facing direction and then multiply the player's facing direction with the reciprocal of that dot product and the plane's distance from the player

cinder abyss
#

I understand a bit and will try

#

but it looks like pain said like that

sullen marlin
#

Could probably be said much easier

cinder abyss
#

I'll try and see anyway

thorn isle
#

seems about right

cinder abyss
#

you learned it or you thinked about it ?

#

or you searched ?

thorn isle
#

i don't know, i've probably done something similar at some point before and then forgotten about it

sullen marlin
#

Linear algebra go brrr

remote swallow
#

i checked my emails earlier and saw that i got a jira comment from md, then got reminded that the jira got raided on xmas

sullen marlin
#

F

remote swallow
#

im guessing that commit just forces them to be the same time for same git hashes

sullen marlin
#

Nah it preserves the time from the input jar

#

I think stable was just a hack for that

remote swallow
#

would that make time consistent though

sullen marlin
#

In theory it may be reproducible now if you update SS in BuildData and maven plugin

#

scriptus already sets time in maven, it was just getting eaten by ssmp

thorn isle
#

that's the point on the plane

#

if you're doing the cursor thing rad was doing, you'd then compare that to the center of the plane and add the diff to the cursor's position on the plane

#

and then cancel the player movement

#

but like rad's way of doing it suffices just as well

#

it's not exactly le mathematically correct but it's not a noticeable difference since the player sends position changes 20 times a second

cinder abyss
#

what I want to do is to put a wither in the center of the player fov, and just put it some y below from the location I get

thorn isle
#

put the wither where the player is looking? rayTrace probably serves better for that

cinder abyss
#

like

thorn isle
#

subtract some value from the resulting y coordinate

cinder abyss
cinder abyss
eternal oxide
#

thats just Eye.getLoc().getDirection().multiply(howFarYouWantAway).subtract(0,2,0)

#

That gives you a Vector to add to eye location

#

then spawn

#

no normalize

cinder abyss
#

really ?

thorn isle
#

the player looking direction is already an unit vector

cinder abyss
#

oh yeah

#

so normalize does nothing ?

eternal oxide
#

depends where you do it

thorn isle
#

it turns it into an unit vector

#

if it's already an unit vector it has no effect

eternal oxide
#

if you do it after all that math you break the calculation

cinder abyss
#

logical

thorn isle
#

since it's multiplied by another value (which is probably not 1) it's (probably) not an unit vector anymore

eternal oxide
#

it likely is not as its a calculated offset

thorn isle
#

i'd probably stick with raytrace however or the wither will end up inside terrain

eternal oxide
#

depends what he really wants to do I guess

cinder abyss
#

I want a bossbar to be always visible in 1.8

cinder abyss
#

If it could be always in the terrain but still in the fov of the player

thorn isle
#

does the bossbar only show if the wither is present on the screen in 1.8? that's not how i remember that working

#

but then again it's been like 10 years

eternal oxide
#

I thought the boss bar appears when you are in range, not just facing it

cinder abyss
#

unfortunately...

eternal oxide
#

Does 1.8 not have the BossBar API?

#

um guess not

blazing ocean
#

?howold 1.8

undone axleBOT
eternal oxide
#

yeah I checked the javadoc

kind hatch
#

Oh shit, it's been a decade?!

cinder abyss
cinder abyss
blazing ocean
#

wait till you hear about elgar

eternal oxide
#

shh I'm a hip youngster like all you dudes

rotund ravine
#

I’m not hip

eternal oxide
#

Do I say "bet" here? or is my fakery showing?

sullen marlin
#

elgar is titanium hip alright

sullen marlin
#

you can update it now and see

eternal night
#

question is gonna be, are the get bukkit jars gonna match hashes then typing

sullen marlin
#

you know you could just diff them right now

eternal night
#

I could

#

Is spigot gonna like, publish some hashes to the /versions/<ver>.json endpoint

remote swallow
#

thats what i wanted

eternal night
#

would be kinda nice for auto updating

blazing ocean
#

kek

eternal night
#

dead project

blazing ocean
#

so true

eternal night
#

I'll miss it 😦

blazing ocean
#

blame raydan

#

for, idk

eternal night
#

always do NODDERS

blazing ocean
#

we're still just stuck on mappings kek

cinder abyss
#

what's Sploon ?

sullen marlin
#

CB reproduced but Spigot didn't o.o

remote swallow
#

thats funky

sullen marlin
#

ah spigot-api not getting right timestamps

#
7f3a93e44f93774978da107e2681ed3b578bcb8d  craftbukkit-1.21.4.jar
699bab3b5a1784deafa162142cfe77392f6c0417  spigot-1.21.4.jar

╰─$ sha1sum *.jar
7f3a93e44f93774978da107e2681ed3b578bcb8d  craftbukkit-1.21.4.jar
699bab3b5a1784deafa162142cfe77392f6c0417  spigot-1.21.4.jar

╰─$ sha1sum *.jar
7f3a93e44f93774978da107e2681ed3b578bcb8d  craftbukkit-1.21.4.jar
699bab3b5a1784deafa162142cfe77392f6c0417  spigot-1.21.4.jar```
#

looks good to me

remote swallow
#

1 step down

kind hatch
#

Validation coming soon???

sullen marlin
remote swallow
#

id probably vote, publish the sha1 for the LTS it supports

#

like for 1.21.4 use j21

sullen marlin
#

Doesn't match my local hashes though

kind hatch
sullen marlin
#

Maybe, I will investigate further later. Almost certainly major versions

glacial agate
#

can anybody help me upload my plugin to spigot website?

jade oasis
#

Hey can someone help I wanna make a plugin that has to do with a log system so when doing a command to get the logs it gives me a list of like logs before reboot logs after and latest logs like the last 5 hours logs but I want them to be downloadable with a click how could I go about that mainly asking around the downloadable part

glacial agate
#

nvm

wet breach
#

sounds very insecure to me even if it is just logs

manic delta
#

what is the spigot API endpoint to get user profile info?

#

or there's no one

#

i want to get this discord part to be exact:

#

and if possible the buyers of a plugin

worldly ingot
#

Buyers of a plugin, you can't. Identities, there's an endpoint for it. Or, rather, two endpoints for it depending on what data you have

#

By username: https://api.spigotmc.org/simple/0.2/index.php?action=findAuthor&name=Choco
By forums id: https://api.spigotmc.org/simple/0.2/index.php?action=getAuthor&id=1

manic delta
#

oh thank you

worldly ingot
#

Both yield the same JSON output,

{
  "id": 31119,
  "username": "Choco",
  "resource_count": 5,
  "identities": {
    "discord": "choco_dev (Choco#9999)",
    "github": "2008Choco",
    "youtube": "https://www.youtube.com/channel/UCw1E-xY5IgWRIW8fQDZLpYQ",
    "twitter": "2008Choco_"
  },
  "avatar": "https://www.spigotmc.org/data/avatars/l/31/31119.jpg?1642450565"
}
#

identities.discord is obviously the one you want

manic delta
manic delta
#

Isn't there a forum or something about all available endpoints?

worldly ingot
#

PayPal API? Possibly? Or web scraping. Not sure. That buyers list isn't exposed in the Spigot API because we don't have auth keys

manic delta
#

thank you

manic delta
#

mmm

worldly ingot
#

I figured that's what you were doing :p

#

Just know that that Discord identity field isn't validated at all (as you can see by my result). It might not match an actual Discord id

#

In fact, none of those fields are validated

manic delta
#

damn

#

so i cant get buyers

#

I heard somewhere that premium plugins have an API or something to save information when downloaded, what is that about? Maybe I can use it

#

I could save the spigot username and upload it to a database and then check it with the bot

manic delta
#

this only works for premium plugins right

#

because i want to test it

manic delta
#

at the end i made it with paypal api lol

sullen marlin
#

I'm dumb, the hashes wont match because my local build uses a dev build number

manic delta
sullen marlin
#

also maven shade seems to be fkn up some of the dates from the nms jar

rotund ravine
#

I think he uses the fields that spigot populates and then requests a “key” using those from his own server that u then verify with in discord

manic delta
#

Mmm anyway I did it with paypal api damn kekw

rotund ravine
#

Fair

mighty torrent
#
    public void onPlayerChat(AsyncPlayerChatEvent event) {
        String message = event.getMessage();

        // Check if the message contains "You have added" or "You have deleted"
        if (message.contains("You have added") || message.contains("You have deleted")) {
            event.setCancelled(true); // Cancel the event to block the message from appearing in chat
            System.out.println("Blocked message: " + message); // Log blocked messages
        }
    }``` hello, i want to remove/get rid of a plugin's message showing on player's chat, but i couldnt make it work, am i doing right?
naive loom
#

Anyone have an idea on how to change an entity's attack speed? I know that the attribute doesn't apply to any entity type except players so I went digging through some nms and found a method to get the attack interval but it seems locked.

naive loom
cinder abyss
#

Hello, do anyone has a code example for a multi-module nms project in gradle (kotlin dsl if possible) ?

sullen marlin
#

@remote swallow reproducible now for at least me on linux + java 21:

    "hashes": {
        "CraftBukkit": "a46aa57dfd199cc473f6493a5fe76ce00536c171987e50c91ba9b49732586ffb",
        "Spigot": "91095e34a20b51f1ee8d12115972ad000a40f0d03f965be02313a464f17179f2"
    },
╰─$ sha256sum *.jar                                                                                                                                                                   
a46aa57dfd199cc473f6493a5fe76ce00536c171987e50c91ba9b49732586ffb  craftbukkit-1.21.4.jar
91095e34a20b51f1ee8d12115972ad000a40f0d03f965be02313a464f17179f2  spigot-1.21.4.jar
blazing ocean
cinder abyss
#

Okay thanks

jagged thicket
#

because it looks similar to minestom's

jade oasis
wet breach
jade oasis
#

making a server and for staff this would imo be more better

outer tendon
wet breach
#

why would staff need logs?

#

o.O

#

Do you have a dedicated server?

jade oasis
wet breach
#

ok, then you have 2 options that are better

#

either make a web service for your staff to look/download logs or make a discord bot where it can show the logs in a discord channel accessible by staff

jade oasis
#

this is only a thing i want mainly cause i liked this kinda thing on a big server i used to staff on

wet breach
#

well there is only one way to download through the client

#

there isn't any other ways unless they were displaying logs using some kind of GUI

outer tendon
#

How did you go about downloading them in the past, @jade oasis?

jade oasis
jade oasis
wet breach
#

pretty insecure

#

not sure why people want to choose the less ideal options =/

jade oasis
#

tbf ive sort tryna pastebin and the api seems bad

#

but if i need to make my own like web server idk where to start

wet breach
#

publicly accessible stuff that should not be public is generally bad too

wet breach
outer tendon
#

You could create your own cdn and have users create passwords for accessing logs theyve requested

#

so it'd be a more secure version of Pastebin

outer tendon
wet breach
#

have a plugin just host a small webserver for the purpose of your staff to obtain logs. This way you can control who can and can't access them at the same time you will know who has or hasn't accessed them and when

outer tendon
#

or that

#

that's probably a better idea

jade oasis
wet breach
#

java has built in functionality for webserver stuff

jade oasis
outer tendon
#

Id use their suggestion instead

jade oasis
wet breach
#

confused about what?

outer tendon
#

but yes, Node.js is a viable option

#

you should look into building a webserver with Java

jade oasis
outer tendon
jade oasis
#

this is what i currently had

jade oasis
outer tendon
#

Alright

#

That may prove to be more difficult though, as you will have to find some way of linking your Node stack with your server so that they can communicate

wet breach
#

not sure how it is you are in a development channel and wanting to make plugins but suddenly because its webserver there is something different?

jade oasis
#

im dumb as hell my bad

wet breach
#

The only difference is how people connect when it comes to a webserver. You are accustomed to a game server, webserver is really not that much different

#

there is plenty of tutorials on making a webserver with java for simple purposes like yours

outer tendon
# jade oasis im dumb as hell my bad

There's no need to feel that way. It's just important that you are willing to learn how to do this. There are a lot of things that may require more knowledge than what you currently have and that's okay. You just need to be willing to learn.

jade oasis
outer tendon
#

It can also start off really simple. Just search what you do know. If it were me, I would just search "java webserver" and see what I get. I wouldn't expect to find everything I need that way, but it might help me to get more familiar with the concept and lead me to better search terms or resources.

#

You got this bro :D.

jade oasis
outer tendon
#

Anybody potentially able to help with this question? I've posted the crash report and my BlockPopulator code here: #help-development message

outer tendon
upper hazel
#

who has used hibernate? Is the second entity inside another entity automatically saved to the database ?

polar forge
#

guys why do i get this

#

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.134 s
[INFO] Finished at: 2025-03-10T10:20:45+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/Users/adam/Desktop). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

#

I just came back to code again

#

when i try to hit run i get this error

#

and the directory is desktop

smoky anchor
#

You mean you have stuff for code directly on desktop instead of having them in a folder ?

polar forge
#

I tried with a folder

#

but i get also the same error

#

'

smoky anchor
#

I mean, it clearly tells you what's wrong, you're missing a .pom file

polar forge
smoky anchor
#

Why are you trying to run maven if you have gradle

polar forge
#

I just followed a tutorial

#

bc it wasnt runnable b4

#

what should i do

smoky anchor
#

My honest response is to start over
You don't have much done anyways so it will be easy to copy once you get your environment setup

polar forge
#

So uninstall and download it again?

smoky anchor
#

can you drop here the tutorial you followed ?

smoky anchor
orchid furnace
#

😭

polar forge
polar forge
smoky anchor
#

Make sure to use the minecraft dev plugin for intellij and create project with that
it will setup everything for you

#

and don't change the working directory when you make a new run configuration

cinder abyss
glossy laurel
#

How can I make players in a specific world see hardcore heart textures

chrome beacon
#

Could use a resourcepack to replace the hearts with your own

glossy laurel
glossy laurel
chrome beacon
#

transfer packet ig

smoky anchor
#

theoretically you can transfer the player to a different dummy server and back :D

chrome beacon
smoky anchor
#

not sure if you can transfer player to the same server

chrome beacon
#

Yeah

smoky anchor
#

World has a setHardcore, maybe you can use that somehow ?

jagged thicket
#

wait i had a plugin which did that without resource packs

#

leme check

#

@glossy laurel

#

look at this repo

glossy laurel
#

Ty

pseudo hazel
#

just a little nms magic

smoky anchor
#

Still tells the user to rejoin, so you may have to transfer player if you want it done automagically

chrome beacon
#

^^

#

as I said it's only sent on join

wet breach
#

you only need to accept the connection and join, but don't need to load any of the world and just send them back

glossy laurel
#

Cant you tell the server to just try to rejoin the same ip

#

Or will it somehow understand its already there and not do anything

chrome beacon
#

Try it and see

wet breach
#

I am not sure if its possible to do with modern versions

#

but there did existed a rejoin exploit way back when

chrome beacon
#

Modern Minecraft has a transfer packet

wet breach
#

it was originally used to send clients to another server

chrome beacon
#

The question is if you can rejoin the same server with it

wet breach
jagged thicket
#

what if you disable that check with nms anyway

#

(the target and destination check)

glossy laurel
#

Guys, are there performance and/or functionality differences between CompletableFuture and Scheduler#runTaskAsync

slender elbow
#

they just do different things; CompletableFuture is a tool to organise your code for working with asynchronous execution; BukkitScheduler#runTaskAsync is the method that actually makes your code run on a separate thread; you can use both of these together, your code will not run faster for using either, both, or none

#

do note however that the bukkit scheduler, even for async tasks, will wait until the next tick to actually run the tasks; in the case of async tasks it will dispatch them to another thread when the server's next tick starts

polar forge
#

Why is it still not runnable

slender elbow
#

that might (or, realistically, will) result in a short delay between you saying "hey i want to run this async" and it actually running

polar forge
slender elbow
#

if you want to avoid that, look into using the JDK's built-in SchedulerExecutorService

smoky anchor
# polar forge

well you can't "run" a plugin
you compile it, grab the jar, put it in plugins folder and start a server

#

you compile it with the gradle command

polar forge
#

I remember hitting that button to compile the plugin

smoky anchor
#

you can create a run configuration that will execute the gradle command

polar forge
#

how

blazing ocean
#

run the build task

jagged thicket
#

you can just click on that gradle symbol on the right hand side bar

#

(elephant one)

smoky anchor
#

(can I just not that it's a dumb idea to replace everything with icons, this new UI is horrible in that aspect, old UI has descriptions)

remote swallow
#

right click them

blazing ocean
#

yea ^

#

can enable names

remote swallow
smoky anchor
#

oh that's cool, probably should not actually complain, I never tried it, I still run the old UI

polar forge
jagged thicket
#

click tasks

remote swallow
#

go into tasks then build

jagged thicket
#

then build

polar forge
jagged thicket
#

yeah hit build

blazing ocean
#

then hit build

jagged thicket
#

man macos is tempting

remote swallow
#

why are we hitting build

#

what did he do to you

blazing ocean
#

gonna punch build

polar forge
#

so do i need to do this everytime i want to compile my plugin?

remote swallow
#

yes

jagged thicket
#

yeah

polar forge
#

Sure thanks!

blazing ocean
#

you can hit the rerun button too

remote swallow
blazing ocean
#

definitely

smoky anchor
#

or as I said twice, you can create your own run configuration

blazing ocean
#

@build i'm warning you buddy

blazing ocean
remote swallow
#

intellij makes one when you run a gradle task

smoky anchor
#

oh does it, cool

#

guess I never noticed ?

blazing ocean
#

i just ctrl-ctrl :a-e:rS

jagged thicket
#

it also does that for shadow jar

#

cool asf

remote swallow
#

its any task

remote swallow
blazing ocean
#

oh true

remote swallow
#

my favourite is gradle :y-c:b

blazing ocean
#

are we not using a run task

smoky anchor
#

wh- why is this unreadable

remote swallow
#

i mean

#

i do but not the point

blazing ocean
#

you can abbreviate paths

slender elbow
#

at least it's not as bad as ffmpeg

#

:Clueless:

smoky anchor
blazing ocean
#

omg copy task mention @ lynx

smoky anchor
#

(I have no idea what this joke is about.. I think it's a joke ?)

blazing ocean
eternal night
#

COPY TASK???

blazing ocean
#

i knew he was gonna come here eventually

eternal night
#

I was guided by the copy task mention

#

Good task

jagged thicket
#

inflatable copy

blazing ocean
eternal night
#

in the shitty world where everyone sets the archiveOutputJar Sadge

blazing ocean
#

yea, sad times

remote swallow
#

how about i symlink it

jagged thicket
blazing ocean
smoky anchor
#

mod your server jar so the plugin folder points to target

blazing ocean
#

paper's add-plugin cli flag 5head

manic delta
#

What packets does #Player.hidePlayer() send?

polar forge
#

guys i have a question

#

if i make a command that its already in default mc (ex. /ban) will the server use the default one or the plugin command?

manic delta
# manic delta What packets does #Player.hidePlayer() send?

I want it to hide the player physically but not remove them from the autocomplete or the tablist, I had already achieved this by sending a PlayerInfo packet ADD_PLAYER AND UPDATE_LISTED but it conflicts with the tab plugin disorganizing the tablist, that's why I want to directly cancel it

blazing ocean
undone axleBOT
manic delta
#

i think is that

blazing ocean
#

if it references that

manic delta
#

yea it does

#

If I implement nms and use that same method but removing the last part, it would work, right?

slender elbow
#

maybe

#

?try

blazing ocean
#

?tas

undone axleBOT
slender elbow
#

tool assisted speedrun

blazing ocean
#

?toolassistedspeedrun

#

wtf

polar forge
blazing ocean
#

yours

#

it'll default to yourplugin:ban but minecraft:ban will still be available

polar forge
#

Oh top super thx

true perch
#

I am developing a plugin for my brother's Arclight server. How can I reference items from mods within my spigot plugin? For example, if I wanted to give the player an item from Mekanism, or display an item from another mod in a GUI. How is that done?

manic delta
true perch
blazing ocean
minor otter
#

now that in minecraft any item can practically be a totem is there a way to use EntityEffect.TOTEM_RESURRECT with a custom texture/itemstack

true perch
# manic delta i manage to do it but the server removes the autocomplete for that player, what ...

Here's an example taken from my Chess spigot plugin. Remember to implement CommandExecutor, TabCompleter

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
        List<String> suggestions = new ArrayList<>();
        if (args.length == 1) {
            suggestions.add("join");
            suggestions.add("invite");
            suggestions.add("accept");
            suggestions.add("leave");
        } else if (args.length == 2) {
            if (!(args[0].equalsIgnoreCase("accept") || args[0].equalsIgnoreCase("invite") || args[0].equalsIgnoreCase("join")))
                return suggestions;
            for (Player player : Bukkit.getOnlinePlayers())
                if (player != sender)
                    suggestions.add(player.getName());
        }
        return suggestions;
    }```
#

Within the code, notice, the suggestions are purely made based on what you add to the suggestions array.

manic delta
remote swallow
#

if only it used StringUtil.copyPartialMatches

pseudo hazel
#

spigot plugins cant have mods?

slender elbow
#

arclight :despair:

pseudo hazel
#

I guess seek support from them

slender elbow
#

you could try getting it from the Registry.ITEM, if that doesn't work, glhf

pseudo hazel
#

idk why you dont just make a mod then xD

true perch
blazing ocean
#

the fucking hybrids man

true perch
manic delta
remote swallow
#

tab complete event

true perch
manic delta
#

I noticed that this auto-completion problem only happens with commands

#

using like "hello Bot" autocompletes all the names correctly

manic delta
blazing ocean
#

oh are you talking about commands

pseudo hazel
#

I guess but trying to combine mods and plugins removes all of the simplicity that spigot gives you pretty much

manic delta
remote swallow
blazing ocean
#

it won't

#

you will still get autocomplete for commands when using hidePlayer as far as I'm aware

remote swallow
#

whichever plugin (im guessing essx) is being smart and only showing tab complete for stuff it can see

blazing ocean
#

it does for me

manic delta
#

Now I see it

#

essentials dont it

#

luckperms does

#

wtf

blazing ocean
#

Well that's an essx moment

#

not really something you can easily fix

manic delta
#

meh i dont care anymore

#

suck it essx

#

I'll mark it as fixed

blazing ocean
#

wontfix my beloved

chrome beacon
#

EssX has it's own player tab completion to hide their vanished players

slender elbow
#

Player#canSee(Player) moment

polar forge
#

Guys how do i remove someone from a config?

manic delta
polar forge
#

I made long ago a ban plugin and now im making the pardon command

#

?paste

undone axleBOT
polar forge
blazing ocean
polar forge
#

heres the banCommand

#

how do i make a pardon command that removes the banned player from the config

#

here is what i did

manic delta
#

get the list

#

remove the player

#

and set it again

polar forge
#

look at the paste link

manic delta
#

oh you are not using a list

#

use config .set("banned_players." + target.getUniqueId(), null)

polar forge
#

and thats it?

eternal oxide
#

don;t provide null as a default

slender elbow
#

huh

eternal oxide
#

oh not default, my mistake

polar forge
#

so how do i do it

eternal oxide
#

yes

polar forge
#

ok thx

quaint mantle
#

how to disable advancements and statistics?

eternal oxide
#

Why? What is your end goal?

worldly ingot
polar forge
#

Why do i get "CraftPlayer{name=Egitto}"

#

?paste

undone axleBOT
worldly ingot
#

Because you're passing through the Player into your string. e.g. "Egitto Hugs To " + player

#

You probably want player.getName()

eternal oxide
#

you used player and not their name

polar forge
#

oh yea true bruh

#

and another question

quaint mantle
polar forge
#

idk why hug fuctions and wave doesnt

#

here is the code for wave

#

Hug is the same but with hug obv

worldly ingot
#

Line 21 is still checking if the command is "hug"

quaint mantle
#

any german devs here? need some help, willing to pay, dm

worldly ingot
#

Though worth noting you can remove that check entirely because you're setting the executor. It will only ever be invoked for that command anyways

polar forge
#

Bruh

quaint mantle
#

am i allowed to say that here

polar forge
#

i should go sleep then

worldly ingot
#

?services is probably the better place to do that, Max

undone axleBOT
quaint mantle
worldly ingot
#

Or if you don't meet the requirements (because there are post requirements), other communities like BuiltByBit might be a good alternative

eternal oxide
worldly ingot
#

The advancement iterator provided by Bukkit isn't mutable, so no, you can't do it from code

#

And the advancement done event isn't cancellable due to the way that advancement awarding works

#

You would have to explore a data pack, or edit the server code directly to just not award advancements at all

quaint mantle
#

there was a setting called disable advancements before, why was this removed?

worldly ingot
#

Was there? That might still be true

quaint mantle
#

it was there in older versions but i only found this in the current version

#
  disable-saving: true
  disabled:
  - minecraft:story/disabled```
worldly ingot
#

Oh, yeah, spigot.yml has an advancements.disabled option, but you have to list all the advancements you want disabled

#

Yeah that still exists

#

I don't know how up to date it is, but it's at least a start :p You might be able to find a more complete list online

quaint mantle
#

does this setting block a single achievement or all of them in that class?

eternal oxide
#

seems there is a gamerule for it

quaint mantle
worldly ingot
#

There's a gamerule to disable broadcasting advancements, which isn't the same

worldly ingot
worldly ingot
#

Uhhh, broadcastAdvancements or something like that lol

quaint mantle
#

ah aight

worldly ingot
#

announceAdvancements

#

I was close

#

Players will still earn advancements though and see the toast in the top right

quaint mantle
#

ah no i don't want this

#

i will check other

worldly ingot
#

Then yeah, use the option above in the spigot.yml. You should be able to copy/paste that list into that setting and it will disable them all

#

Or at least "all" as far as that list is updated lol

eternal oxide
#

I thought the gamerule prevented the toast

quaint mantle
#

im trying

worldly ingot
#

Nah just the message in chat

eternal oxide
#

ah

quaint mantle
#

not only that i want nothing to appear in the advancements menu

worldly ingot
#

I think disabling them in the spigot.yml will do that

quaint mantle
#

trying now

worldly ingot
#

Yeah, it does

#

Wiki says it does at least

quaint mantle
#
  disabled:
  - '*'
  disable-saving: false```
#

i did this worked btw

worldly ingot
#

Oh, I guess you can use wildcards? lol

quaint mantle
#

btw canceling statistics update event will do lag?

worldly ingot
#

Shouldn't, no

quaint mantle
#

ty guys

pure dagger
#

why are there 4 PrepareAnvilEvent Calls when i put something there

#

? and they have a little different results when i do this

System.out.println(event.getView().getRenameText());
        System.out.println(event.getView().getMaximumRepairCost());
        System.out.println(event.getView().getRepairCost());
        System.out.println(event.getView().getRepairItemCountCost());
thorn isle
#

crafting/recipe events are 🤡

pure dagger
#

uh

thorn isle
#

what are you trying to do? with the new repairable etc. components there is probably a better way than fucking with those horrid events

pure dagger
#

custom enchantment

thorn isle
#

that's doable technically but i don't think spigot has api for that registry

#

or maybe it does, i wouldn't know

#

every time i say there might not be spigot api for something someone corrects me and says there is

pure dagger
#

what do you mean

#

im not maknig actual enchantment just lore and nbt tag

thorn isle
#

every time i omit my usual "at least on paper", then it's not available on spigot

#

i'm half convinced it's some quantum state at this point and you're all a hologram that collapses to exactly the opposite of whatever i say

pure dagger
#

you mean then it IS available

thorn isle
#

paper has a registry api

#

the easiest and most broadly compatible way to go about custom enchants is to just add them to the registry

pure dagger
thorn isle
#

no fucking with lore, no lore conflicts with other plugins, supports anvils, enchant combining, disenchanting, etc. out of the box

pure dagger
#

hum

thorn isle
#

the ♿ way of doing it is to bundle a datapack in your plugin jar that adds it into the registry and extract that into the /datapacks dir from your jar on startup

pure dagger
#

what ur talking about 😭

#

what do i do

tranquil pecan
#

So, I am getting this when I try to compile.
Tried mvn clean and install
Tried system path aswell
Tried restarting 3-4 times
nothing works

remote swallow
#

did you add it through intellij artifacts or maven

tranquil pecan
#

maven

quaint mantle
#

can i prevent social integrations hide message?

pure dagger
thorn isle
#

so it can't read the classes to compile against them

#

make sure your maven binary runs on java 21

tranquil pecan
#

oh
I forgot I accidently selected java 8

#

mb

polar forge
#

why do i get an error at line 25 if i just send the command /wave?

#

without arguments

#

The command will be sent but i get an unexpected error

slender elbow
#

you are still trying to access the array elements even when it's empty

#

i believe you're missing a return statement inside the if length = 0

naive loom
cinder abyss
blazing ocean
#

You only update dependencies in those and then use inline ifdefs in your code

cinder abyss
#

but there is just a gradle.properties

cinder abyss
#

Or it works ?