#help-development
1 messages · Page 1239 of 1
Since Minecraft 1.13 we have access to custom fonts. Since I have not seen much about it here a little video about it.
I want to show you everything you need to know and provide some ideas how you can use fonts creatively.
Resourcepack: https://dmanager.stevertus.com/pack/stevertus:custom-font
Reddit article: https://www.reddit.com/r/Minecraft...
This video is a bit old but the concept is the same
I will try it, thank you.
I made one but if I run the characters it will show squares
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
the default.json is same?
I have pack.mcmeta for 1.21.4
Looks like it's almost the same yeah
Just judging by the wiki
Somethings wrong with your pack or it's not applied
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?
keep removing half your plugins till it stops
😩
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?
call ItemMeta.getTool(), it creates that object for you
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?
yes, one of these
Still doesn't show anything. Oh yeah, I am on 1.21.1. Should have probably mentioned that first, my bad.
Ye well just... update ?
Yeah. Going to do that soon. Just have to get this thing out.
hm cursor is kind of interesting
if you have an anticheat it might be it
I have a friend in leiria I'd like to visit and it's fairly close to my birthday
we need to figure out the exact day
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
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
I'll talk to the movie theaters tomorrow
LMK
I get really cheap bus discounts if I book a week in advance
and by cheap I mean getting to lisbon for 5 bucks
we have flexbus here or whatever it's called, it's stupid cheap and pretty good
flixbux yeah
flix
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
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
pretty sure it's 20 bucks if I schedule on the spot
but yeah I also gotta check out airbnb's
cursor is kind of interesting as an IDE
they definitely haven't got intellij's smooth moves yet though
I just wish my AI autocomplete didn't crash once in a while
life's perfect otherwise
what are you using?
supermaven
tf is that even
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
lol is this running on gemini
and it has a chat feature that takes into account context
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
chat, am I cooked
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
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.
looks accurate for a short radius
nah it should look like this
How about this
yeah but how would i generate that?
Totally didn't draw it
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);
}
}
}
}```
THANKS
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"
]
}
]
}
what does not work
are you sure your textures are in assets/minecraft/textures/font
yea
?notworking
"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.
if I type this into chat it just say 6 empty squares /title @p actionbar ["\uEff1 \uEff2 \uEff3 \uEff4 \uEff5 \uEff6"]
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
it works now, thank you so much
what an odd limitation
why no built in funcs?
I can dm you :)
There's always both parsing and data validation exceptions in the log
i need to make enchantment book which gives one of 4 custom enchantments, should i just use Pdc or create an actual enchantment???
<insert unnamed fork>
Yeah checking the prepare event
thanks
Can someone help me? I have this bar but it overlapping the name bar of item someone know how to fix it?
need to move it down
I want it like that because if you are in water it will overlap with the bubbles
It will always be rendered on top of it
Nothing you can really do unless theres a shader for it
you would have to move up the item name or move down the bar if the item name is rendered
its in the video that Olivio send
Just watch it entirely
I watched it but didn´t find how to do it
Any documentation on the backwards itemstack deserialization? in 1.16.5 it throws an error for the items from the versions before.
If you want to update an itemstack you need to run it through the DFU
DFU?
Aight use that ^^
thats paper
But so it would becomes unreadable for humans
there is no good way to do that
Wait I trusted you 🔫
you cant have perfect serialization and human readable item stacks at the same time
So there is no solution?
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
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
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
Yeah, but asking the server owners to recreate all the items doesn't seem like a good solution either
well that means you need to read in those items and make something sensible out of it
thats what I did when I moved to byte serialization from spigot serialized stacks
I just know that this will cause issues, there is so much to ItemStacks
mojang has a DFU (DataFixerUpper) but its not being used in spigots item serialization
and even the DFU doesnt fix everything
Usually the proper solution is just a non readable format and having admins do items through ingame stuff
but the byte serialization was paper right?
so no solution for spigot :p
on spigot it'd be NMS
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
What does #.spigot() do?
It gives access to Spigot only methods
That are not present in CraftBukkit
Usually they are methods using the Bungeechat API
What version are you on?
And is the server in offline mode
I think there's only really one non-BungeeChat method in those subclasses now, and it's Player.Spigot#respawn(). Everything else has a Bukkit equivalent now I believe
nope
1.21.4
there are some items that i don't want to get bundled, how can i pull it off?
Then setOwner should be deprecated
declaration: package: org.bukkit.block, interface: Skull
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
to have something be properly offset, append your negative space, content, and then a positive space of the same width
I would also recommend https://discord.gg/npXH5cjf instead
thank you
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)
#toString()
intValue + ""
String.valueOf()
Integer.toString()
Plenty of ways to convert it to what you need.
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
Show the stacktrace.
It's one of those nested methods.
Likely the #parseDouble() or #getMoney() method.
no the getMoney() is an sql made by me in Double format the problem is the method that i have to use with Papi
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.
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 🙂
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
The method returns a String...
public String onRequest() { }
Meaning you need to convert your values to a string
as was noted above there are many ways of converting a number to a string
String.valueOf(Number) for example
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?
what prints this error exactly
^
me performing the command /ajl add money <- the plugin for make Leader boards for stuff
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
ye what i was thinking is because i made a format for like 1000 -> 1k i need to make another placeholder for the number 1000 and how can i make in the leaderboard to show 1k?
i don't know
Add the formatting to the placeholder string, not before it.
ask the leaderboard plugin maintainer
i'm guessing the leaderboard plugin wants the numerical rather than formatted value to be able to sort the leaderboard
You could even have multiple placeholders.
%placeholder%
%placeholder_formatted%
the value to display should be configurable separately probably
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
how do i get the version portion of the craftbukkit package?
org.bukkit.craftbukkit.v1_20_R4.CraftServer
|______|```
this means something went wrong when building the jar and stuff, did you enable something in the options?
get a craftbukkit class, call getName on it, and parse it
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
everything default and and latest java 8
can you test?
Run BT in an empty folder.
yeah but dont i need to know the version to get the class? im looking to do it dynamically
i tried didnt work
do you have enough space in your pc?
yes
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?
yup
Time to make 3 different definitions of ascii font for different lines
lol
get a craftbukkit object and call getClass on it
e.g. the concrete type that Bukkit.getServer() returns is CraftServer and will be in that package
Skill Issue
BT used Java 8 for that run.
this Bukkit.getServer().getClass().getName()
got me this org.bukkit.craftbukkit.CraftServer
In fact...
shadow are you using outdated software
we caught him
how's the new GUI coming along
That's what you meant
this can be cause by internet provider?
Uhhhh, we don't talk about that.
runs away in shame
no
are you on paper
It can, but not with the error that you provided.
paper's runtime omits the craftbukkit package nowadays
yeah i am
me when the CCP hijacks spigot patch files to add spyware
so you don't need to get it (and can't) both because it no longer exists
bruh
Paper moment
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
?whereami
"but now" since when is this?
im looking to make a cross platform product
1.20.5
like uh, yeah, sounds about right
This was my workaround to run it on both paper and spigot.
I still rely on the older method if it's available.
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
i ran on a empty folder everything default and java 8 is latest what can be wrong?
if you aren't, use the old logic
if you truely want to like, go old school, I just abused the shit out of Bukkit.getServer().getBukkitVersion();
alright, thanks
don't even mention those golden years
golden 
i cant be feeling old at 19
golden age at 4, you certainly enjoyed minecraft back then 
💀
i have a bunch of modules for each version, this is for 1.21.4, i would assume that its present at compile time but omitted and remapped when compiled, am i correct to assume that?
Depends what you compile with i think
take me back - to - the night - we met
yeah, it depends a bit
should i use jre or jdk?
JDK
jdk
nah i started playing it when i was 6
either way at runtime it gets remapped out
alright
For now ™️
you can remap it at compile time or during plugin bootstrap
smart call
the end result is the same
Still think paper should get rid of that plugin remapping 
are you 100% sure this was changed in this version?
Yea
alright
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
The 1.20.4 Update
Stable Paper and Velocity 1.20.4 builds have been released! As always, backups are absolutely mandatory. After upgrading your world to 1.20.4, you cannot downgrade back to a lower version!
We would like to thank everyone that worked on this update (a lot of people and work...
also is it paper only, sorry for the paper question but you seem knowledgeable
but maybe one day i'll need a third party plugin that relies on it
that was their last announcement in .4
I just don't use outdated plugins nor software so not needed
"their" lynx you're a maintainer
gonna blow your cover

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

Yea mojang mappings has been a blessing.
?
Also for hot reloading 
hear me out tho... yarn

okay I got something better... intermediary
I mean tbf it's what fabric uses at runtime in prod envs
yes let's remap it even more times
remap spigot -> mojmap -> yarn -> intermediary
Yes, only paper removed that
finna make my own mappings
🙂
spigot still runs on spigot mappings + versioned CB package
weird choice but whatever, maybe im missing the point
hm?
part of the "make nms shit not break every update"
oh
since to get into nms you almost always need to go through craftbukkit
i see the sense now, mb
and if the craftbukkit package changes every version it's kind of all for nothing
sorry, needs more layers. we need MCP mappings at runtime so we're gonna have to spigot -> mojmap -> yarn -> intermediary -> mojmap -> searge -> mcp
compile times 
Ah yes, hour long compile times.
Time to compete with firefox and chromium compile times.
linux comptimes tho

hear me out, windows compile times
same error with jdk
throw the error in a paste
Did you run it in a new directory when you updated JDKs?
what
Cause it sounds like you have some jank work folders sitting around.
Can you take a look at anydesk
Probably not.
- Not gonna put that shit on my computer.
- Don't think it even supports linux.
Imagine giving random person access to your computer 💀
💀
so should i delete a jank folder from buildtool?
You should just run it in a new folder.
Or delete everything that it created and run it again.
Hard to say. Could be remnants of newer compiles that conflict with older versions.
sub version?
8ublabla
build 1.8.0_442-8u442-b06~us1-0ubuntu1~22.04-b06
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
xd
that's illegal
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?
not on spigot
thats a mojang mapping, for reflection you'll need to use spigot mappings
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
so it should be fine, right?
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
wdym correct mappings
net.minecraft.server.level.ServerPlayer doesn't exist in the spigot runtime because of craftbukkit/nms package relocation
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
now its only mappings
nms has no version its just still under spigot mappings
You could probably do it with Brigadier directly, but there isn't anything in the API for that currently.
wiki vg is down ?
?protocol
okay thanks
and for older versions ?
the page history
okay thanks
should i do net.minecraft.server.level.EntityPlayer then?
Yeah
kk ty
@blazing ocean hi, how do you report 3d location on a 2d plan relative to the player eyes ?
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
Okay interesting, thanks
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
big brain
I understand a bit and will try
but it looks like pain said like that
Could probably be said much easier
like :java public Vector calculateProjection(Player player, Vector planeNormal, double planeDistance) { Vector playerDirection = player.getLocation().getDirection(); double dotProduct = playerDirection.dot(planeNormal); double reciprocalDotProduct = 1.0 / dotProduct; return playerDirection.multiply(reciprocalDotProduct * planeDistance); }
I'll try and see anyway
seems about right
how tf do you know this ?
you learned it or you thinked about it ?
or you searched ?
i don't know, i've probably done something similar at some point before and then forgotten about it
Linear algebra go brrr
big GG then
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
F
im guessing that commit just forces them to be the same time for same git hashes
Nah it preserves the time from the input jar
I think stable was just a hack for that
would that make time consistent though
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
and then ?
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
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
put the wither where the player is looking? rayTrace probably serves better for that
yeah but then put him down
like
subtract some value from the resulting y coordinate
okay logical I'm dumb
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
really ?
the player looking direction is already an unit vector
depends where you do it
if you do it after all that math you break the calculation
logical
since it's multiplied by another value (which is probably not 1) it's (probably) not an unit vector anymore
it likely is not as its a calculated offset
i'd probably stick with raytrace however or the wither will end up inside terrain
depends what he really wants to do I guess
I want a bossbar to be always visible in 1.8
that would be a good thing
If it could be always in the terrain but still in the fov of the player
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
it does
I thought the boss bar appears when you are in range, not just facing it
unfortunately...
?howold 1.8
Minecraft 1.8 is 10 years, 6 months old.
yeah I checked the javadoc
Oh shit, it's been a decade?!
no
you're old
wait till you hear about elgar
shh I'm a hip youngster like all you dudes
I’m not hip
Do I say "bet" here? or is my fakery showing?
elgar is titanium hip alright
so maybe for 1.21.5?
you can update it now and see
question is gonna be, are the get bukkit jars gonna match hashes then 
would be interesting to see
you know you could just diff them right now
I could
Is spigot gonna like, publish some hashes to the /versions/<ver>.json endpoint
thats what i wanted
would be kinda nice for auto updating
dead project
so true
I'll miss it 😦
always do 
we're still just stuck on mappings kek
reminds me of CVN
what's Sploon ?
1fe9c8583b2e4456c9562c28277e06f9d80af90daa989a8f491b5da2fa8939e8 craftbukkit-1.21.4.jar
ba234b60c36ed0604517da21a49f3a619399408c50d1c948887755fdbf8be595 spigot-1.21.4.jar
1fe9c8583b2e4456c9562c28277e06f9d80af90daa989a8f491b5da2fa8939e8 craftbukkit-1.21.4.jar
d717fa2e542a289fac764d0845b3fe6a6ad4b85b30dc8b68fd83c3712b546efb spigot-1.21.4.jar
CB reproduced but Spigot didn't o.o
thats funky
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
1 step down
Validation coming soon???
I think it's difficult given all the different JDK versions
id probably vote, publish the sha1 for the LTS it supports
like for 1.21.4 use j21
Do different JDKs give different hashes?
Maybe, I will investigate further later. Almost certainly major versions
can anybody help me upload my plugin to spigot website?
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
nvm
why do you want the logs downloadable through a game?
sounds very insecure to me even if it is just logs
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
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
oh thank you
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
What can I do to check who bought my plugin? Is there any way to store it?
yep, thank you
Isn't there a forum or something about all available endpoints?
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
thank you
I want to make a verification system for my discord, just to test things
mmm
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
I know, it's just to link them, that's why I want to know in some way that that spigot profile has the plugin purchased
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
i forgot the name of that thing
this only works for premium plugins right
because i want to test it
I'm dumb, the hashes wont match because my local build uses a dev build number
Ask @tender shard
Does he have something like that?
Lol
also maven shade seems to be fkn up some of the dates from the nms jar
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
Mmm anyway I did it with paypal api damn kekw
Fair
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?
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.
What are you trying to do? Make it so if the player's message is equal to that not allow the message? Helped via dms.
Hello, do anyone has a code example for a multi-module nms project in gradle (kotlin dsl if possible) ?
@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
You can use https://stonecutter.kikugie.dev
Okay thanks
do you know what library is used to make this webiste?
because it looks similar to minestom's
well i dont like having to have logs just displayed in chat
couldn't you just connect to the server and download them?
making a server and for staff this would imo be more better
Here's the crash report: https://paste.md-5.net/pohupuwuru.pl
And here's the BlockPopulator code: https://paste.md-5.net/ohagiyumib.cs
making 1 but this is just something i want
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
this is only a thing i want mainly cause i liked this kinda thing on a big server i used to staff on
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
How did you go about downloading them in the past, @jade oasis?
when doing a command ingame it gave me a bunch of clicks and which i click ill get automatically downloaded
what about having logs going to like a pastebin or something instead
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
publicly accessible stuff that should not be public is generally bad too
that is easy but you don't need a full webserver in fact it can be done through a plugin
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
If it was me, I'd use Node.js
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
any suggestions where to start cause idk
java has built in functionality for webserver stuff
that good?
Id use their suggestion instead
little confused sorry
confused about what?
but yes, Node.js is a viable option
you should look into building a webserver with Java
that idk how to do :/
Try starting by Googling "java webserver". Learn more about it.
this is what i currently had
i might try node first and if that fails i might just try figure out the java webserver stuff
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
Java has built in functionality for webserver stuff although there is libraries for it however in your use case it would be unnecessary
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?
im dumb as hell my bad
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
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.
i want to learn just never always feel like i know what to fully search to get the right stuff yk
Fair enough. Learning within a certain scope or field is in itself a skill that needs to be learned.
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.
alot of faith
Anybody potentially able to help with this question? I've posted the crash report and my BlockPopulator code here: #help-development message
Nah. I don't think it takes a lot.
who has used hibernate? Is the second entity inside another entity automatically saved to the database ?
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
You mean you have stuff for code directly on desktop instead of having them in a folder ?
I mean, it clearly tells you what's wrong, you're missing a .pom file
and whats that?
Why are you trying to run maven if you have gradle
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
So uninstall and download it again?
can you drop here the tutorial you followed ?
what
no, just make new project
😭
sure thx
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
Looks incredible
How can I make players in a specific world see hardcore heart textures
Sadly that information is sent during login
Could use a resourcepack to replace the hearts with your own
Hm
Is it possible to make a player rejoin the server somehow then?
transfer packet ig
theoretically you can transfer the player to a different dummy server and back :D
declaration: package: org.bukkit.entity, interface: Player
not sure if you can transfer player to the same server
Yeah
World has a setHardcore, maybe you can use that somehow ?
wait i had a plugin which did that without resource packs
leme check
@glossy laurel
look at this repo
Ty
just a little nms magic
Still tells the user to rejoin, so you may have to transfer player if you want it done automagically
fortunately you don't need a full server for this
you only need to accept the connection and join, but don't need to load any of the world and just send them back
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
Try it and see
I am not sure if its possible to do with modern versions
but there did existed a rejoin exploit way back when
Modern Minecraft has a transfer packet
it was originally used to send clients to another server
The question is if you can rejoin the same server with it
yeah, not sure if it works if both the destination and target are both the same
what if you disable that check with nms anyway
(the target and destination check)
Guys, are there performance and/or functionality differences between CompletableFuture and Scheduler#runTaskAsync
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
Why is it still not runnable
that might (or, realistically, will) result in a short delay between you saying "hey i want to run this async" and it actually running
if you want to avoid that, look into using the JDK's built-in SchedulerExecutorService
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
I remember hitting that button to compile the plugin
you can create a run configuration that will execute the gradle command
how
run the build task
you can just click on that gradle symbol on the right hand side bar
(elephant one)
(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)
right click them
oh that's cool, probably should not actually complain, I never tried it, I still run the old UI
click tasks
go into tasks then build
then build
yeah hit build
then hit build
man macos is tempting
gonna punch build
so do i need to do this everytime i want to compile my plugin?
yes
yeah
Sure thanks!
you can hit the rerun button too
so some may say defenestrate him?
definitely
or as I said twice, you can create your own run configuration
@build i'm warning you buddy
it will create one automatically
intellij makes one when you run a gradle task
i just ctrl-ctrl :a-e:rS
its any task
i think ur mssing the gradle prefix
oh true
my favourite is gradle :y-c:b
are we not using a run task
wh- why is this unreadable
you can abbreviate paths
more of a copy task fan myself
omg copy task mention @ lynx
(I have no idea what this joke is about.. I think it's a joke ?)
i knew he was gonna come here eventually
copy
it's like a beam of hope
in the shitty world where everyone sets the archiveOutputJar 
yea, sad times
how about i symlink it
no
mod your server jar so the plugin folder points to target
paper's add-plugin cli flag 
What packets does #Player.hidePlayer() send?
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?
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
?stash check yourself
if it references that
yea it does
If I implement nms and use that same method but removing the last part, it would work, right?
?tas
tool assisted speedrun
does anyone know the answer to this?
Oh top super thx
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?
i manage to do it but the server removes the autocomplete for that player, what can i do for that?
i think you should ask them
He does not know, I'm coming here
Player#addCustomChatCompletion or sth
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
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.
what im doing is not a command, but thank you
if only it used StringUtil.copyPartialMatches
bumping my question
spigot plugins cant have mods?
arclight :despair:
I guess seek support from them
you could try getting it from the Registry.ITEM, if that doesn't work, glhf
idk why you dont just make a mod then xD
I have tried that 😄 thank you though
the fucking hybrids man
Great idea!
doesnt seem to work
tab complete event
More comfortable with the Spigot api and I also have already spent time on the plugin my brother wants.
I noticed that this auto-completion problem only happens with commands
using like "hello Bot" autocompletes all the names correctly
this works for commands too?
oh are you talking about commands
I guess but trying to combine mods and plugins removes all of the simplicity that spigot gives you pretty much
yes
iirc yes
it won't
you will still get autocomplete for commands when using hidePlayer as far as I'm aware
whichever plugin (im guessing essx) is being smart and only showing tab complete for stuff it can see
It doesn't do this by default
it does for me
i think some plugins do
Now I see it
essentials dont it
luckperms does
wtf
wontfix my beloved
EssX has it's own player tab completion to hide their vanished players
Player#canSee(Player) moment
Guys how do i remove someone from a config?
That's what I thought, I'm not going to fix it lol
just implement Player and return true 
heres the banCommand
how do i make a pardon command that removes the banned player from the config
here is what i did
oh you are not using a list
use config .set("banned_players." + target.getUniqueId(), null)
and thats it?
don;t provide null as a default
huh
oh not default, my mistake
so how do i do it
using this
yes
ok thx
how to disable advancements and statistics?
Why? What is your end goal?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerStatisticIncrementEvent.html is cancellable. Advancements aren't as easy to disable though
Because you're passing through the Player into your string. e.g. "Egitto Hugs To " + player
You probably want player.getName()
you used player and not their name
making minigame server and i don't need them
i want to do a quality job so i don't want such things to happen
idk why hug fuctions and wave doesnt
here is the code for wave
Hug is the same but with hug obv
Line 21 is still checking if the command is "hug"
any german devs here? need some help, willing to pay, dm
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
Bruh
am i allowed to say that here
i should go sleep then
?services is probably the better place to do that, Max
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
thanks, didnt know that
Or if you don't meet the requirements (because there are post requirements), other communities like BuiltByBit might be a good alternative
You can cancel stats changes as Choco posted above. As for advancements it would be nasty to remove them all, if you even can
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
there was a setting called disable advancements before, why was this removed?
Was there? That might still be true
it was there in older versions but i only found this in the current version
disable-saving: true
disabled:
- minecraft:story/disabled```
Oh, yeah, spigot.yml has an advancements.disabled option, but you have to list all the advancements you want disabled
Yeah that still exists
https://www.spigotmc.org/wiki/spigot-configuration/#advancements the wiki has a list of vanilla advancements
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
does this setting block a single achievement or all of them in that class?
seems there is a gamerule for it
i know
There's a gamerule to disable broadcasting advancements, which isn't the same
All of them, yes. It's a list of advancement ids
which one
Uhhh, broadcastAdvancements or something like that lol
ah aight
announceAdvancements
I was close
Players will still earn advancements though and see the toast in the top right
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
I thought the gamerule prevented the toast
im trying
Nah just the message in chat
ah
not only that i want nothing to appear in the advancements menu
I think disabling them in the spigot.yml will do that
trying now
Oh, I guess you can use wildcards? lol
btw canceling statistics update event will do lag?
Shouldn't, no
yes i found on some github page
ty guys
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());
crafting/recipe events are 🤡
uh
what are you trying to do? with the new repairable etc. components there is probably a better way than fucking with those horrid events
custom enchantment
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
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
you mean then it IS available
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
whatever, im not making actual enchantment but use pdc
no fucking with lore, no lore conflicts with other plugins, supports anvils, enchant combining, disenchanting, etc. out of the box
hum
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
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
did you add it through intellij artifacts or maven
maven
can i prevent social integrations hide message?
anyone know why that is?
the class version of the dependency is higher than the java version of your maven runner
so it can't read the classes to compile against them
make sure your maven binary runs on java 21
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
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
Anyone? I went about replicating the goal and just changing the value but it seems that the stop method is called every 20 ticks and if changed causes the entity to on and off start and stop targeting the entity.
and then, how can I use each versions subfolder to put my code in ?
but there is just a gradle.properties
but I need to use nms, I can't use multiple nms versions in the same project ?
Or it works ?
