#help-development
1 messages · Page 1200 of 1
BlockState = minecraft's block entity data, a chest's inventory contents for example
or a sign's text
^^ basically it's NBT tag
because
Entity#getLocation be like
you are creating an Entity, it just isn't placed in the world yet
It's a bit of a funny API
very much
In that case the entity would be noted by the world right? But without a location it can’t be considered a physical entity can it?
Who pinged
I think there was talk about virtual entities which would be exactly that.
Hmm I wasn’t here for that
This random guy looking for devs @jagged quail
Would virtual entities in this case even make sense? I mean we’ve already got display entities so
@jagged quail you.
@blazing ocean did you get the laptop for Christmas
yes
What os do you have on it
Ew
yea W11 is ew
how does that interact with the library plugin itself actually running?
Is smooth teleportation possible? In this case:
- I have an entity walking around
- Player is the entity that should get teleported to the entity location
- Tick delay is fine, so no exact synchronozation
The question Im having is more like, is it possible to do teleports in a way, that it doesnt bug around when done frequently (like you can feel you get teleported)? Ideally, the same as it would feel as when e.g "walking". I could imagine that you would perhaps do it in a bunch of steps, so its more fluent, however, that would take too many ticks. So how does mc walking work? Isnt that also just teleports? Why doesnt that bug around when moving very fast?
Are you trying to link to the library or modify the library itself?
If you link to it the reshading will change the imports to whatever the library you're using uses
I'm using compassMeta.setLodestone(pointTo); to set the location for a compass, but then the compass becomes enchanted and named "Lodestone compass". Can I somehow make it not modify itself?
I don't think teleporting a player is the way to go, any ping issue would cause issues, I think it's best if you can tp the entity instead
Can someone give me a list of plugins for Lobby on minecraft server?
?
uh @blazing ocean ???
what
what "???"
pfp I assume
probably
rad stop putting alts in spigot
no u

nuhuh
I see this as evidence, so its confirmed. epic == rad

I'm trying to use the library I wrote, yeah. I have the shade plugin set to relocate Jackson 2.15.1 to a separate package, and I can get the plugin to compile against that shaded version, but then the plugin itself breaks because it does a lot of reflection and when it locates a subclass of a Jackson (de)serializer, the plugin class loader from Spigot loses its fucking mind
me*
shut up #163
What do you meaaaan 163
shut up #8
so clueless
ok #76
Can't believe rad has over 163 alts. :3
Glad I'm not one of them.
-# Sent from #21
Wait... am i a rad alt?
yes, #87
We all are, really.
exactly #26485
is 0 the real rad and then 1-10 are the sub controllers
yes
whos the real rad 
I read one of those "existential dread" type horror stories once where we're basically the same person living out infinite different lifetimes, so technically, we could all be rad alts.
wdym "could"
we are.
smile i saw that
what was that
Only one way to handle being a rad alt
Eh, being an alt isn't so bad.
I don't have to worry about anything since I can be deleted at anytime.
whats choco
vanilla's alt aka dinnerbone
oo maybe it is true
mhm mhm
i would just make the map myself, set a spawn in there, cancel the playermoveevent until he sent the code in chat
no like installing mvcore, voidgen, generating the world via command and then use that world
the whole world gen fuckery just adds unnecessary complexity just to make the world once
rather have a setspawn system which then gives the player an unverified state until he chats your code. after that set him to verified
you know you can just use an empty chunk generator and biome provider right
for what exactly
to make an empty world all over again?
creating a void world?
not everything has to be made programmatically
especially not something you would only run once and can be done way simpler
i have a method with depending on the abstraction can return something or nothing, is there a way to abstract this well, or should i just return null when there is nothing and something if there is?
i didnt quite understand the first part of your message, but for the latter there is Optional which you can use
declaration: module: java.base, package: java.util, class: Optional
i have an interface some impl return something some dont when put into a method
it isnt really optional as some have a 100% chance of not returning something
either use optional or you have to think of a better design
if the return is not reliable there is probably a better design choice
im sending messages in between my servers, some might get a response, some simply inform
i have a send method
im not sure how make this better i could add another method, but that would come with problems
i would just always send a response
i tested this and it can slow it down 10x
when sending 1.000.000 messages which takes 3000ms, when waiting for an ack it results in 53000ms
:(
so then check if a response was given, if not just craft one and return it? and if its just a "RECEIVED"
okay
but by that your api is consistent
and your response could have a response code and the actual response wrapped in an Optional, so you can always check if an actual response was given
class Response {
ResponseCode responseCode;
Optional<ResponseBody> responseBodyOptional;
}
something like that
okay, thank you, im gonna apply the changes now
public static ItemStack getSkull(String url) {
ItemStack head = new ItemStack(Material.PLAYER_HEAD);
if (url.isEmpty()) {
return head;
}
SkullMeta headMeta = (SkullMeta) head.getItemMeta();
GameProfile profile = new GameProfile(UUID.randomUUID(), "null");
profile.getProperties().put("textures", new Property("textures", url));
Field profileField;
try {
profileField = headMeta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(headMeta, profile);
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException event) {
}
head.setItemMeta(headMeta);
return head;
}
I don't why It's not working and i want this custom head texture:
https://minecraft-heads.com/player-heads/head/47397-lucky-block
??
Just use the API that is present.
Which API?
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
declaration: package: org.bukkit.inventory.meta, interface: SkullMeta
Thank you so much, @chrome beacon and @civic sluice! I really appreciate all of your help. ❤️
Dade Robinson is spamming up the Jira, not sure if this is allowed behavior
just wait for md to wake up and ban em
whats the best resource to learn plugin development?
Same for one of my ancient jira tickets.
Def not allowed
ok, yeah, it's a really old ticket that he's doing it to here also
Almost 30 mails so far ....
Kids these days
Back when I was a young kid I'd collect cards or something
👌😅
he's probably just angry that he's alone on christmas
i'd say you should learn java first
once you got the basics, plugins are gonna be easy
also, after you learn java the spigot javadocs are incredibly useful
Just do stuff that interest you, I would say
^ this is the best advice but no one here is gonna really hold your hand don't expect that.
it sounds like a poor implementation then, you shouldn't use reflections when working with anything of this kind, the jackson api should be enough
@worldly ingot @young knoll There is a porn spam bot on jira
Yeah md's aware now
Dade?
yep
why associate yourself with that behaviour
So Lynx is the guilty party!
xD
I never look at the Jira usually, wouldn't have even known if it wasn't posted in here
ill be real im a novice hobby programmer - currently learning the ropes through javascript and python. think im fairly confident on key concepts i just currently dont know the java translation if that makes sense? the plugin im intending to create is very (seemingly) simple, so im thinking i could use it as a project to work towards to help me learn java
just not sure how to start plugin development specifically, like the meta way of starting in 2024 (or 2025) if that makes sense :p
look into strong typed languages and faniliarize yourself with that, it's going to be one of the bigger things to get used to when switching over from python/javascript to java
ive done a fair bit with typescript if thats what u mean
ok, yeah, you shouldn't be unfamiiar with the concept then
the hurdles are mostly just going to be about API/library details and Java syntax specifics then.
Yeah thats what im thinking, like i say i think i can accomplish what i have in mind for a plugin idea as its relatively simple, like it just sends a player message upon player executing a command and logs a random number generated within the player message string to db on the backend - im just wondering where to start
Yes, just start with it. That's how you learn basically anything. There's a guide for a simple plugin in the spigot website, also one in the paper website which says about the same thing.
I think that plugin development is something you can start with when starting Java, I did the same. Just follow the guide and use a IDE, like intellij
Eclipse is another good IDE, I like how it lets you add custom javadocs so you can have the info right there in your ide
Intellij does have that feature as well
oh nice, im more familiar with eclipse and didn't know that, but at any rate, it's a very good feature when learning a new library
One feature that Intellij does not have is the ability to compile broken code
By simply replacing methods with runtime errors
sounds fun
I like Eclipse as it can have multiple projects open in a single workspace
and its light weight
yeah i like that about it too
probably the only two features over IJ
the multiple projects in a single window was really nice
altho intellij's multiple windows feature is not the hardest to get used to either
There is an official plugin for that now though it's still w.i.p and a bit limited
as far as i know no
i see.
there's the built in decompiler that you can use to follow code in other projects
altho it will look a bit different
jackson API doesn't do plugin setup...
jackson is a serialization/deserialization library, is it not?
the library I wrote is specifically designed to automate annoying plugin tasks and use Jackson to automatically read configs and generate new ones where necessary lol
the thing is, in the plugin I'm using that references Jackson, there are places where I want to define custom Jackson serializers for certain structs
but i don't see where the reflections are needed
hey do you think you can create world async or at least don't have a BIG lag when creating a world?
how else do you check annotations
this has nothing to do with serialization
just so we're on the same page :p
You cannot
yes its possible, but you need a fixed spawn and don't keep spawn in memory
lol thx x)
tho you can provide a fixed spawn location and disable keeping the spawn in memory, use an empty biome provider and chunk generator ^
NOT async though
for the spawn in memeory i use this :
@EventHandler(priority= EventPriority.HIGHEST)
public void worldInit(org.bukkit.event.world.WorldInitEvent e){
e.getWorld().setKeepSpawnInMemory(false);
}
can i see the code?
but what is fixed spawnn and empty biome provider and chunk generator
you might be better off just looking at it on github, it's not just a snippet
fair warning
it's pretty old code i wrote in uni, so there's places where it's just ???
Actually here's the simplest use case
@Preload
public class AbilityFromStringDeserializer extends FromStringDeserializer<Ability> {
protected AbilityFromStringDeserializer() {
super(Ability.class);
}
@Override
protected Ability _deserialize(String s, DeserializationContext deserializationContext) throws IOException {
return AbilityManager.getAbility(s);
}
}```
FromStringDeserializer is a Jackson class
the @Preload annotation just refers to the setup phase, basically something that needs to be loaded before doing any config injection (because it's a serializer)
Now this part isn't the problem, the problem is actually the import
actually hang on - this one is fine
the import is still not reflection
you can use the addon method i said in the begining
wait no
let me finish
actually, I think I might know what the problem could be
There's a section where, during init, the library attempts to instantiate that serializer
There's some security manager bullshit that Java does that doesn't like that, though
is there a security manager still in java?
I don't know the details because I'm not an expert on Java
The Security Manager is getting removed
but this should be fine for most classes
Yeah I don't know what the hell breaks when I do a relocate
It worked fine with shaded code back in like 1.19
i think it's when accessing classes from a different jar maybe?
That was what I was thinking happened
that seems a bit unsafe
It's just weird because like...all this shit worked totally fine before
I can't test it without the relocate because minecraft (and by extension spigot) is using an outdated version of Jackson lol
And I can't downgrade server versions because I'm using 1.20/1.21 stuff :')
Hang on let me see what happens if I just wantonly set external to true when trying to load the class
hmm, i thought spigot/minecraft uses gson
they do (or did? or maybe it's guava), but for some reason jackson is now in the bundled libraries for spigot 1.21.3
I have no idea what they use it for
I believe it's Mojang uses both gson and jackson in their code
Weirdly enough I could probably contact someone at Mojang through work
But that'd be a really specific and weird question lmao
Or it's a transitive
i think it's transitive
I'm inclined to say transitive because the version is actually ancient
You don't deliberately add ancient libraries for new features. normally.
so maybe they're using a new library that in turn hasn't had a dependency update in years lol
the spigot api shouldn't have it exposed tho
it's not exposed, I was already using Jackson
been using it for years
or rather I did use it for years, I've been doing nothing but C++ for about 3 years now
spigot just loads it at runtime
...i wonder what would happen if i just removed it
what i mean is you should be able to use your library without minecraft messing it up if you just depend on spigot api
i gave up on json simple because it was in craftbukkit
it can be removed at any point in the future
there's a simpler solution to your problems
probably
i'm not using spigot's config API though
unless they've improved it since 2021
was kind of awful for years tbh
yaml?
i also already have my own config system
format doesn't matter
it's the methods/ease of use
it's not bad for user files
ehh
it's not very good at handling proper serialization/deserialization
the reason I turned away from it in the first place is because I have a fair amount of use cases that were, at the time, too complex for it
i don't remember the details because it's been more than 3 years, you'd have to give me some time to remember why I had to use an external library
i made a cool serializer for the yaml and it can be made to look good
it depends how much effort you're willing to put in
anyway
right now my shit works by:
- add field to class
1a. make a serializer/deserializer if needed - annotate field
- it now appears in the config file you specified
takes like 3 seconds
ig there are a few things I could try
it should work
it doesn't seem to require reflections, just a way to access the library to add a custom serializer
well, again, the issue was that the class loader had a stroke when i tried to initialize a class that depended on something from the shaded files
now that you mention it I think the reflection is probably orthogonal anyway
so yeah fair point
thanks for putting up with me here, I've been baffled on this for a couple hours lmao
no problem, was of more help to me
i'm a C++ dev, we just "shade" everything all the time or force you to include a .dll. there is no compromise
lol first time i ever thought about static libs as shading. cool
tbh i was thinking a little simpler LMAO include directives are basically just force shading
oh that too, lol
all c++ clang programs compile to one really long file, basically
clang doesn't make obj files?
im one of those plebs that uses visual studio for c++
I can use getDirection() or getYaw() to get the orientation of the face, but how to get the orientation of the player's body is difficult to realize with the current API?
getLocation().getYaw() is for overall body orientation, it does not retrieve torso orientation.
Sorry not sure I'd have to look
I do seem to remember some sort of headyaw method somewhere but maybe not in the api
Isn’t that getEyeLocation().getYaw()
for body i think you can use Entity.getPose() and if the player's is gliding, or swimming then their body's yaw is their head yaw. But when they are just standig there or crouching, im pretty sure that the orientation of the body is clientside only, and that's why players look like their heads are on backwards sometimes... but i could be remembering wrongly
Hello guys, I'm working on a plugin to block certain commands from being executed, but can't get auto complete to work this is what I have tried: java if (args.length == 2 && args[0].equalsIgnoreCase("add")) { CommandMap commandMap = Bukkit.getServer().getCommandMap(); return commandMap.getKnownCommands().keySet().stream() .filter(cmd -> !blockedCommands.contains(cmd.toLowerCase())) .collect(Collectors.toList()); }
trying to get all registered commands on the server like also with specific args.
why not use the permissions system?
So its against forceop exploits.
not really something with permissions
just make a plugin that auto bans ops
that's what my plugin on my personal server does
nah also things like gamerule randomtickspeed need to be blocked as it can crash your server so easily
and keep crashing it when it starts
nvm, i see what you're saying now
but i still think perms and disallowing op is a better option than trying to get a list of commands and stopping them
pretty sure commands don't have to be registered either, so what you're trying to do might not work with every plugin
Yeah I know, that was the first thing I did when I started my server.
I had only problems with blocking randomtickspeed as gamerule is only one permission
That's correct but it's better than nothing. It will also allow unregistered commands tho.
you could write your own gamerule command, commands have namespaces, and then in your perms you can give permission to use your version of the command
that way you don't have to give the perm node that gives unwanted things in addition
Yeah, but that will just make it more difficult than it needs to be.
This is a really easy way to patch these things
not really, it's just writing a command that looks at the params and verifies that you wanna allow them, then forwards to https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/World.html#setGameRule(org.bukkit.GameRule,T)
if you're alright with the player doing the thing they tried to do
i think this is an easier approach, but you do you
The system is already running and uploaded to spigotmc
Will check it out
Is it possible to add multiple world borders in one world
That doesnt sound useful as only the most inner one would ever be seen, since you cant move past it.
It’s for skyblock islands
So you want a per-player WorldBorder?
declaration: package: org.bukkit.entity, interface: Player
when a player enters an island -> get WB from island -> call player.setWorldBorder(wb)
An island creates its own WB using Server.createWorldBorder()
Yeah i tried that, it only made a border for one island. The other islands didn’t have one and when a player tpd he insta died (bc being outside of border is instant death) but after turning it off too there was no border on their island only the first island created
I didn’t try it per “player” but I’m assuming you just mean for every island owner so I’m not sure it’ll work
You need to change the border when a player changes islands of course...
But if i have 100 people online at once
Who have their own island
I don’t want the border to just be on one island
is it possible to defer player getting on the server while fetching some data from external database for example? i want to first load the player's stats and then let him play. maybe AsyncPlayerPreLoginEvent?
should work fine
yes exactly that
ah that's nice ty
so the player will "officially join" after the event handler finishes on some non-main thread?
it runs not on server thread and yea
ye no worries, have fun multithreading
you can make a player wait at the prelogin stage for approximately 15 minutes.
15 minutes because that is typically what desktop OS's have the TCP timeout set at when not receiving data
not that I recommend making players wait that long though lmao
personally I like to allow players to connect to the lobby and allow the player to somewhat do something while data loads though
if(playerName.equals("frostalf") {
Thread.sleep(...);
}
I think sleeping one thread isnt enough smile, we need greater measures!
lol
System.exit(-1)

Not if you coach it properly
sounds like it's os-dependent
but from experience I feel like minecraft would just kill the connection with "Timed out"
the game closes the socket after 30 seconds of not receiving any payload, and the client isn't at a stage where you can send a random packet to stall them anyway
hold on a second, i've seen this scenario being played before 🤔
I'm confused, how can I create a pixel art minigame on my server, in which the game is played in pairs, the idea is that if a player places a block only that player can break it within a time limit.
put metadata on the block including the player's uuid and a timestamp
compare in the break event
can you add data to every block now?
to me it seems like metadatable is only limited to certain blocks
it's to block and blockstate
block is the coordinate in the world basically
if you move the block with a piston the metadata wont move
It’s not persistent though
yeah that too
It will also leak if you don’t remove it properly
yep
it's a half assed api that isn't even finished
:(
like, it's better and easier if you just keep track of stuff in a Map yourself
i think it's pretty useful for minigames in its current state though
did you block me?
this is a thing? time to go change some things... server I work on just kicks people and tells em to relog if their stuff isn't loaded
It’s 30 seconds
tbf it only takes a couple seconds for our data to be fetched
deferring is always better than kicking imo
this should be a thing
if the servers were on the moon, could it still be considered the cloud?
or would it be the satellite ...
have fun waiting 1.28 seconds every time something is updated
just have good caching
just use quantum teleportation 👍
teleport the server to earth, query data, teleport the server back?
im just waiting for micro dbs which i can implant into my brain
"[Vulcan] incompatible spigot fork detected. Please contact the developer of you spigot forkand tell them to fix this!Your server tps Is being read 0 because they changed thing unnecessary"
Anyone help me with this
Error
Please contact the developer of you spigot forkand tell them to fix this!
?whereami
Anywho
player.sendMessage(Util.sendMessage(plugin.getConfig().getString("prefix.banker" + " messages.transaction-coins-640-successful")));
This seems to be returning an error, to be exact a null error
https://paste.md-5.net/iboqojebiz.bash
Any thoughts?
I'm pretty sure it's returning null
Why though?
Because it's invalid path
Path prefix.banker messages.transaction-coins-640-successful doesn't have a value
🤔
You need to get both string, so:
String prefix = config.getString("prefix.banker");
String otherMessage = config.getString("other.messages.path");
player.sendMessage(color(prefix + otherMessage))
I'm guessing that's what you meant to do.
Wait, so, if it's prefix.banker, isn't the yaml supposed to be formatted like this?
prefix:
banker:
# Path: prefix.banker
prefix:
banker: "prefix"
I'm not sure if the indentation is mandatory but without indentation it's gonna be confusing as hell.
Your whole path is prefix.banker messages.transaction-coins-640-successful
You need to get the string from the config twice.
What if there are multiple?
What do you mean multiple?
Oh, wait, I got it
Yeah yeah, it's kinda hard to explain xd.
multiple paths?
If you want to get multiple values, then you need to call multiple getString method
Got it
I have a /give command I made a while ago that has an item that gives a written book to a player. is there a way to use either item stacks and/or "setItem" method to give a book using the same meta data? recreating it from scratch using the API would take a while, so is it at all possible to use the existing data present within the /give command? (the part of the command to the right of the item ID is specified wraped in square brackets)
is there a plugin/api i can use that allows me to "share" data between a bukkit player and a bungeecord player
does anyone know what plugin can be used to fix archeitectural errors in code (inteliji ultimate)?
none
What errors
@blazing ocean
what does it even mean primitive, in python str is primitive, i dont get it
a primitive is a type not represented by a class
what is class
wait.
is array primitive
or what is it actually
i guess its not a type or nothing
its just more primitives
Arrays are not primitives in java
public class int {
private final int int;
public int(int int) {
this.int = int;
}
public int() {
return this.int;
}
}
but its int
dude has never heard of Integer.java
thats int.java
....
and that's also not possible kek
yea
int is a reserved keyword
???
what the fuck is this
You just got called an alien
code of somebody who does not know java
mf doesn't know about java.lang.Integer
yeah ignoring that
Make a MapRenderer and add it to the MapView
wont it change?
you sure add this correctly?
you can check another versions if maybe that is the issue https://jitpack.io/#Tigeax/CustomWings
i mean is it permanent?
Yeah, that was the problem, is solved already
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
``` any1 knows the right groupId?
Dependency 'me. clip:placeholderapi:2.11.1' not found
did you add the repo
you need to add the repo and then the dependency
Like this ?
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>
<repositories>
<repository>
<id>papermc-repo</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/releases/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>
</dependencies>
yes
still doesnt work
reload maven
Hello, is there a way to spawn falling block entities without removing the original block at its position, and without the falling block’s position being rounded to integer ? I’m using world#spawnFallingBlock, but I’m facing these two issues. I tried using world#spawnEntity, but it seems like FallingBlock can’t set its blockData.
Can’t you spawnFallingBlock with the BlockData in the constructor?
use teh spawn method which takes a Consumer
FallingBlock doesn't have a method to change its BlockData
You're forced to use spawnFallingBlock(), which yes, does center the block coordinates. NMS accepts a BlockPosition and centers it
It doesn't have to because it just passes the coordinates as centered doubles, but at least currently it just takes a BP
I see, thanks.
Is there any way to make entities visible through walls without glow?
not serverside i suppose
whats wrong with glow tho?
you could try to go the hacky way and scale the entity down and put it in its place so it looks like its there
but thats something you dont really want to do
I dont want the glow lines. Is there perhaps a way to "glow" without glow lines?
glow without the lines would just be nothing, glow doesnt render the entity through walls jsut the lines
what are you trying to do with the effect, maybe there is a workaround?
I have an armorstand. I want to be able to see the armorstand through blocks, without the glow lines. Like, I want to see the actual armorstand.
yeah i got that, but whats the purpose of the armorstand?
maybe you can get such a effect differently
There is no alternative purpose, just messing around with entities. And right now, just trying to see them through blocks.
okay, then i can just tell you that this probably wont work, i dont know anything except glow for such an effect
maybe some1 else has an idea
I see :c
you could use a texturepack and change the core shaders
altough i dont know how and what, but im certain that shaders are managing the rendering
Yeah, if there is no serverside solution
how does /tick work? i want to slow dont entity when they by me including arrows but i dont understand. im very new
/tick affects the whole server not just entities
Hi guys just wondering if anybody could help me with a problem in my java minecraft plugin where for some reason it wont connect to the backend supabase db ive specified
it would be helpfull if you share your error message
what's the best way to handle reloading config changes?
depends on what the config options do
i think for this specific config itd be best to just have commands which let you directly add or remove stuff
Hi guys, I'm developing a plugin, but I can't figure out how I can check whether a wolf has armour. Can anyone help me?
The wolf entity should have a method I think
Let me see
I can only see this
Hmm
That sounds correct
getEquipment().getChestplate() I think. Wolf refers to it as body
I'll try this. Thanks!
There does need to be a WolfInventory though
And I think wolves should be inventory holders
This is how horses are
how do people make this green documentation text?
Not sure I understand the question
Javadocs
/** instead of /*
normal ides format javadocs nicely
My IDE formats things just fine lol
Also, I'm adding WolfInventory API for armour and whatnot. Guess it was just overlooked
Just Sonnenfinsternis things.
Done. Just waiting PR review
But in the future, wolf.getInventory().getArmor() would work fine
Make sure to give them wolves the ability to fly as well :p
... you can set the body for all mob
yeah but thats not the point
how is spigot gonna survive without more inventory classes
atleast you dont have to pull it if it does get merged
k?
choco did you see md commented already
old habits die hard
Why not just wolf.getArmor()
Why not player.getChestplate()? 👀
dog crocs
I mean, it probably is going to stay as is, don't see horses getting new armor pieces lol
Yes, but horses have an inventory is my point :p
Ideally anything that can hold an item should probably have an inventory
do foxes have inventories
An inventory doesn't constitute something the player can see. That's what InventoryView is for
can foxes hold anything
yeah
In their mouths, yes
there doesn't seem to be a way to get/set the item they're biting either
why can a fox be a server operator
any entity can
im guessing its done through EntityEquipment
ah that makes sense
We're circling back to the wolf armour dilemma lol
wait, if you can already get the armor of a horse/wolf through entity equipment, why do you need an inventory
Readability and ease of access tbh. wolf.getInventory().getArmor() is a lot clearer than wolf.getEquipment().getItem(EquipmentSlot.BODY);
though the fox one is indeed weird considering there is no "mouth" equipment slot lol, what would it be considered I wonder
Right. Inventory makes it clearer. Could be getItemInMouth() or some shit lol
getItemBeingCurrentlyBitten
getItemCoveredInFoxSalivaAfterBeingInItsMouthSinceWhoKnowsHowLong()
Can I release a plugin that needs a license if its unofuscated and not encrypted whatsoever
kinda lazy to go through everything and remove the license stuff rn
Not sure what you mean
Like the plugin needs a license key to start
Oh license key
Yeah
If it's premium, we don't allow license key systems. They're forbidden by the premium guidelines. It'll get insta-rejected
I've never seen anyone do that yet, imagine your server not being able to start until you renew some plugin's license key lmao
And if it's free - why license key it? lol
Oh okay, I'll remove it then
free to download, paid to use
me when im adobe
Lol is that even allowed💀
That's not free anymore and abusing premium rule somewhere
there is no explicit rule that disallows it however I'd like to believe one would have to be made whenever someone attempts that
it's kind of pointless given how easy it is to remove any kind of protection the plugin might have against cracking anyway
the biggest barrier of entry to cracking plugins is someone actually wanting to spend money in order to get the original jar. Without that you're basically asking these people in shady markets to do it
I guess this sentence is a bit forward and unchecked but the point still stands I think
though now that I am thinking about it, since it wouldn't be explicitly a premium plugin you don't have to abide the rules like "needs to work without an internet connection" or "no heavy obfuscation" so you could potentially apply stronger protection lol
yeah its pointless, even if someone were to use a leaked version at this point there's most likely another plugin that does the same thing so doesn't matter tbh, as long as they don't get support its all good to me now lol
That's typically the approach people take (and the approach more should lean towards). Leaks are inevitable, but if you have a way to identify a leaked copy, just don't offer support
Paying for support is just less worrying
Yeah I see that its the best thing to do
Is there a way without NMS to get all components on an item/block
why InventoryClickEvent has less events in PlayerInventory than in chest inventory
Are you in creative mode?
is there one maprenderer per map per server or per player?
I can't test because I don't have two accounts and friends are away
you add a map renderer to a map
you can even have multiple map renderers per map item
I think it's per map
thank you
Does someone know Kody simpson if yes is he good
I want to improve my plugin skills
what exactly do you want improve on?
I want to work with packages nms and databases
if he has tutorials for that sure, by packages i assume you mean modules?
Do you know someone better than him.
whats wrong with him?
Nothing I haven’t even started watching but probably there is something who explains better
Dont think that is name infamous here
What do you mean
I normally like tutorials more
please never use any ai for internals
it will almost always be completely outdated and wrong
https://youtube.com/playlist?list=PLfu_Bpi_zcDNEKmR82hnbv9UxQ16nUBF7&si=VibK640d6VyZQodL
im thinking about to watch this series but don’t know where to start
i wouldn't do that if you only want to add npcs to ur knowledge just search "how to make npcs spigot"
He like also has videos „understanding packets with ProctolLib“ what I also wanna learn
okay, altough, i wouldnt recommend using packets unless ur usecase is for something that the api doesnt cover
the spigot api also sends packets, altough hidden behind the methods, if the packets change with a version spigot takes care of that, adn you dont need to worry that something doesnt working anymore
packets can break every version
sometimes they are removed, replaced or new params are added
Would you say it’s important to know how to use them to make good plugins
no, you can do almost everything with the api with some exceptions, which is when u need to use packets
What about nms?
nms is just minecraft
yes
I watched 10 seconds of the Tutorial and I heard I can modify mobs or smth like that
NMS is uncharted jungle of mojang's deprecated code and modern features mashed together, which bukkit api tries to bootstrap together into one package
you can also modify them with the api
by modifying he is probably referring to, making them invisible or on fire etc. which can be done with api too
Spigot's/Paper's implementation of its own command api still on modern versions of MC haunts me till this day, when they butcher Mojang's brigadier to fit into bukkit legacy command api. It literally screams for refactor
He said thad normally friendly mobs attack players
i think thats one of the things not exposed in the api, im not sure tho
as i said some things arent in the api, but rarely
Okay
if it isnt in the api it would be a usecase for packets
yea i believe there's no proper pathfinding bukkit api
i believe you can do pathfinding and AI stuff only from NMS
Bukkit API is just a safe haven for future compatibility, you usually do not update a plugin if you plainly just use bukkit api just because how backwards compatible API is
^
but when you use NMS, you introduce minecraft server version as a dependency, thus you need to rerelease usually your plugin to support newer minecraft's implementations
Okay thanks guys
If you're lazy and smart, just use bukkit api
api > packets
if you want fancy shmancy features that are bleeding edge and there's no proper API for it yet in bukkit api, use NMS
Also I got a question some plugins need protoLib or packet events to create holograms why
because these entities are cheaper when done with packets
they only exists on the client
therefore are not ticked
you usually dont want holograms to be entities which are ticking your server and eating your TPS
by spawning packet level hologram (which just fools client that there's a server entity, when in theory it doesnt exist), you can make holograms only exist on the client
So just for performance reasons
yes
altough you can also use the new display entities which are basically the same as their tick method is empty
the fact that you need to store ids for holograms to remove them properly, handle them in cases where player gets out of entity visibility range
it can be even worse for performance, as you would still need to write code to handle those packet level entities anyways, its just that it could be handled independently from the server itself, which you can in theory optimize but its just not worth it
i believe nowadays packet entities are obsolete with display entities which were introduced recently i believe in 1.19 or smth
Okay thanks how do you know all this stuff
practice
Do you have any public plugins?
from other ppl on the discord tbh
no
had bunch of servers since 14 yrs old, now im 21
Do you have smth public?
I see
it takes a lot of time and patience to develop something for public
and then you get bombarded by spigotmc reviews
to update that plugin to newest version of minecraft
1hr after it gets released
Yea I know I have some public plugin s
It means i dont think they are known here.
Or a person known to be good or significant like some other devs that are known here lol
kody simpson is the guy that makes those wacky spigot tutorial vids
on yt
not a community member by any means but somewhat popular because he's a gateway to a lot of ppl joining the scene
hey, a quick question to resolve my confusion.
With the 1.21.4 we have the new models format for texturepacks
And so i now picked up the spigot api for 1.21.4
And it still has the setCustomModelData method? (with the int, as the old structure)
but it also has the setCustomModelDataComponent for the newer bits and bobs?
if i understand it correctly, does the old one corresponds to the ranged_dispatch, index 0 now?? since the description about this method also doesnt really make sence anymore or am i missing something?
And also, is this method ever going to be depricated?
The old one just puts an int as first item, same as vanilla migration
aha okay. makes sence
and is the setCustomModelData(int: ) planned to be depricated? or will it stay?
I thought it was deprecated, guess not
It's not deprecated
(bottom method is just example of how it shows when it is deprecated. it doesnt have any other relevance)
(yet)
aha
okay that makes sence XD
i mean, why not make it depricated imidiatly, but it also doesnt really matter
Might have been an oversight 🤷♂️
guys is there a way to automate that when you build your project, the version of your project in your pom and plugin.yml goes up? ( <version>1.0-SNAPSHOT</version>) & *(version: '1.0')
or do i need to update it everytime manually
You can make maven put the plugin version in the plugin.yml for you
so you only have to change it in one place
yea, i guess haha
It doesnt really matter though, since its merely a tag for us coders, i was just curious why it was still being supported, but i suppose its not :P
alright and how do i do that?
with resource filtering you can just use the variable ${project.version}
alright thanks
probably paper
Uhhh so when submitting my resource i took out all the license stuff but forgot to remove it from the config updater so when the plugin is run it adds a license feild to the config but the plugin doesn't use a license and well doesn't seem like I can change the jar before its approved??
I mean idk if they run the jar to check it or just check the code but well there's no license so shouldn't get rejected or anything
whatever i'll just update the jar whenever i can
how can i browse nms source code specifically for PlayerInteractManager?
I'm on 1.21.1, added spigot dependency in maven pom.xml (it came from build tools) and it doesn't come up when searching for it
(to avoid xy i'm wondering how the instaBreak boolean is calculated/determined in the BlockBreakDamage event)
?mappings
Compare different mappings with this website: https://mappings.dev/
You're looking for ServerPlayerGameMode
PlayerInteractManager is the Spigot mapped name
oh for some reason i thought spigot mappings didn't exist anymore in modern versions, tyvm
I get it backward compatibility and stuff
I don't think that's why
Spigot only maintains backwards compat for the api
Internals can break at any time
afaik the only spigot mappings that remain are just the old class names, any new classes get mojmapped iirc
Welp
My phone is blind
Almost
Glue, holding the screen loosened off
Now my screen is held down by molex connector
I didn't leave it in the config, but on runtime it adds a license key thing to the config that does absolutely nothing, it doesn't stop the plugin from working or anything.
ah I see I misunderstood that
Probably fine then but you might still get rejected if the person going through the plugin doesn't notice that it has no behavior
Worst case just fix and resubmit
No need to worry about it too much
/tryitandsee
Yeah I'll just wait till they check it and if it gets rejected for that then I'll resumbit, I already fixed it but seems like there's no way to change the jar until its approved.
Is EntityStorageBlock#releaseEntities not supposed to update the number of entities inside? I see that vanilla, when a bee exits a beehive, the entity count drops, but with the method, it does not
Ok, so with that said, it seems to duplicate the entity/bee
For however many released using the method
If I use the world.playSound(Location) or player.playSound(Location)
How far around this location do players hear the sound? There seems to be no javadocs on this, and there is no radius param
use the overloads with volume if you are about the volume
https://minecraft.wiki/w/Sound
"Most sounds can be heard from up to 16 blocks away, with the exception of: "
Okay this is helpful thanks.
in fact spigot doesnt even have a method without volume
so no idea what youre doing
Basically trying brodacast an ender pearl sound to all players when it is thrown, no matter the distance
loop each player, play it at the player location
but it prodeses its own sound, so I dont want to send two sounds
otherwise sounds weird
If players are close by, will that not make the sounds play multiple times for them? And still the original sound produced by the pearl plays
no because Player.playSound is that player only
there's not really a way to stop sounds in general
there's stopsound
Right. Ya there is the stop sound method but that would be hacky
might be the best option
although it'd have to be after the event so idk
you can emulate directionality if you're truly devious
(make an entity that follows you at a hardcoded axis)
I do not care enough... I just want them to be aware of one.
Even if they hear the two from the original location, that might be okay
Thanks guys!
just an idea, but would it work to set the enderpearl silent?
Thats a thing?
That would super work!
Gonna give it a go thanks for the Idea!
Is anyone know if there is a good way to detect when player traded with villager?
Doesn't look like there is event. Probably just inventory click event is the way to go
okay thx
Looks like someone was working on it, but then pred it
https://www.spigotmc.org/threads/adding-a-cancellable-villagertradeevent.411963/
How to hide players from tab list?
Player#unlistPlayer
what is it
I'm trying to optimize my plugin and it seems this code consuming more than 3% for some reason, could anyone identify why please?
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
private void hopper(InventoryMoveItemEvent event) {
if (!(event.getDestination().getHolder() instanceof Container container)) {
return;
}
ItemStack stack = event.getItem();
ChunkCollector collector = ChunkCollectorRepository.getCollector(container.getLocation());
if (collector == null) return;
// Try to add the item into the chest
if (collector.addItem(stack)) {
// Remove the item from hopper if add item is successful
event.getInitiator().removeItem(stack);
}
}
Basically I want to check if item is being transferred to the chunk collector using hoppers, then we handle it differently.
But for some reason getHolder is consuming high usage.
Yeah it needs to make a bunch of copies
You really don't want to call it unless you absolutely have to
paper has a method to get the holder without making a copy
I think I have to call the getHolder method in this case, no?
Interesting, but I'd like to have spigot as the base of this plugin.
What, that's a thing?
Damn, is that new or something? I didn't know that.
Looks to have been added in 1.9
Ah okay, thanks for the help!
Whic ProtcolLib version should i set if my server is on 1.20.6?
The latest one available
okay so 5.3.0
Yeah
anyone know why this method stopped functioning?
because right now im having to do this manually and its a real pain to deal with lol
Probably because items are component based now
because the way the component worked changed, now there's a separate consumable component
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1076/overview there's an open PR that will add proper support for the consumable component, hopefully that's merged soon
ah that's nice
since mojang added different wood types for signs , is there a way to check if the block placed is a sign without typing all the varieties out?
Tag.SIGN.isTagged(...
how do i use that to check if the placed block is a wall sign?
check if the block data is an instanceof WallSign
if (e.getBlock().getBlockData() instanceof WallSign)
oh thank you
Whats a plugin people desperately need atm
Coming back to the scene and want to give the community something actually useful
The plugin plugin which creates any plugin I think of its powered with ChatGPT and you pay for all the token requests
Oh also it should send money to my bitcoin wallet too
can someone recommend me a good recent plugin dev guide
Guide on what
Spigot wiki is fine given you know java
except that one time i tried 2 years ago and quit
Otherwise gl hf
when doing this to /** to write docs, how do i reference classes? so that you can click on it and see the impl?
{@link MyClass}
thank
You could also do @see MyClass but this must be on its own line
the ability to change biome colors in the latest version pls thx I'm too lazy to figure it out myself
So it's far more limited than link
Please do better on your portfolio..
okay thank you guys
?
I will eventually been too lazy to figure out how to put my spigot contributions in there
There's quite a few so I'm not sure how to structure it
Plugins I’ve Made | blah
Fixes I’ve Contributed | blah
Reviews or Improvements | blah
or in order of cont size or importance
I feel like that'd get too long though
Do a creative play on gits commit display
Oh god no I'm like furthest thing from an artist I'll probably just clump git commit hashes and hyper link them
Yeah but surely strucutre it or filter per project
Posting your PR reviews as reference 
Many hang their first dollar I hang my first paper PR request text

The baller move
I'd never frame my first spigot PR we don't talk about that one

I was a lot dumber 2 years ago or whatever it was
my first spigot pr was me correcting a typo in contributing.md
but not too much 💀
Some fuck ups could be in an app no one uses and another fuck up could be InventoryView#setTitle fuck ups look different depending what you do.
Improving the server software
Anyone can vouch all I think about is inventories
nothing 😭
Checks out
I just mindlessly fight against my sisyphus-esque punishment
if you buy my plugin for a million dollars, you’ll have something
I have 3 plugins people use, one of em I like and the other 2 cause endless stress to me
What plugin do you offer for a million dollars xD
Probably packet events
Sometimes having a fav child isn't too bad
FlyToggler
Yeah just like my parents (I'm the favorite, I hope atleast)
the one is just a plugin that lets you make signs that contain more text, which will never break unless paper really changes things with their hard fork, so I'm chill and it doesn't live rent free in my brain
sounds relaxed xD
every physics and spanish exam
I've got a pull request idea all of a sudden

wait no I have 4 plugins, the 2nd favorite is the one where it's basically a more open and mobile version of minecraft's grindstone
what is it @river oracle
just has groups of blocks that you can exchange blocks for, for building
tell us the idea
the homeboys
bro
he ran away with it like its a business idea
Bro
oh
erm
Limit sign text to expected amount the client is limited to I'm sure no plugins use this behavior for anything
my coding brainchild is a fishing plugin that reworks fishing in minecraft almost entirely but I hate it because it wasn't meant to be in production and getting shit updated on main is near impossible on this server
Haven't decided about that yet tbh
both 
I'll probably do paper first and then port it to spigot going forward.
I value all the constructive comments like make title not required
get paper review bombed
And also rename class to not include Abstract
These are the type of difficult hard to swallow things you'll never hear on spigot
sorry for the dig but I literally had to
non-maintainer being like "you HAVE to change this thing it's ABSOLUTELY CRUCIAL" literally renaming a class
like bro chill 😂😂😂😂😂😂😂😂😂😂😂😂😂
You laugh now until the entire project collapses turns out that word Abstract pushed the project over the maximum java char limit for total class name length and now everything is on fire 🔥
AbstractFishingMechanismHandlerImpl
HandlerImpl is perfection
actually I wonder what the longest class name in my fishing plugin is
IAbstractRegistryKeyLocationBundlerFactoryBuilderHandlerStructureImplV1_21_4
🤮
thenyou are delusional
oh
okay
thats not impossible
now I wonder what mine is xD
now that doesn't say anything for my method names
I have some long fkin method names
off()
AbstractIrTransformerForFirCodecifyCompanionObjectGenerator would like to have a word with you (59 chars)
Longest one in my most recent PR is probably AbstractLocationInventoryViewBuilder
Or maybe it's CraftBlockEntityInventoryViewBuilder
Villager#tellWitnessesThatIWasMurdered
and yes, that is an official method name from mojang ;-;
I love the very first one in the mappings
||There was a bug report about this method not being first, which got fixed||
Hey, stupid method names are fun sometimes. I've added my fair share of stupid methods names to Hypixel lol
I think this is fine personally
hello people, im making a rpg plugin for my 1.21.3 server and i was wondering if its a good idea to register custom entities. I assumed from a source i cant remember that I "needed" to register my custom entities, and in my research to figure that out, I also found some people saying that its a bad idea. I havent gotten entity registration to work yet but now im not sure if its even a good idea to have it at all. 🧘🫃
am i the only one who doesnt pollute classes with helper methods/constructors and instead puts them under utility classes
for example copy constructors
Yes
^ agreed you are
for me it depends
but usually you would make some kinda method that builds more complicated versions of the same object
like a builder or factory I guess
i've started to do this because kotlin does this with its function extensions and i do think it produces cleaner code in long term as helper funcs shouldnt belong in the raw logic
Is it bad to use Object instead of making an model?
public class Requirement {
private final Object objective;
private final int amount;
private final Object type;
public Requirement(Object type, Object objective, int amount) {
this.type = type;
this.objective = objective;
this.amount = amount;
}
public Object getObjective() {
return this.objective;
}
public int getAmount() {
return this.amount;
}
public Object getType() {
return this.type;
}
}```
Registering them is a bad idea since it will break the client
Just use generics
You should instead manage your own entities
this seems like a cop out over an actually robust system
instead of injecting them in to the server registry
Yeah, i have the actual objects but i just thought of this and was like i wonder if this is bad
what kinda objects
unless your a fan of ClassCastException
im just asking a general programming question.
right now you can only use this class to be a container for a requirement
they're making a questing system
but like not doing something with it
but like in that context such design makes no sense
honestly you should probably sparsely ever use Object
usually if you're using Object might be a good sign you need some generics
couldn't you just return a String instead then??
i just was curious what the purpose of Object was.
the only times I used object was to store data ni some kind of hashmap
why wrap it in a record
this and its for config files
I've only ever used Object as a param for conversions or reading data in a way that's applicable to my system(s)
the purpose of object is that everything is an object
oop
