#help-development
1 messages · Page 1293 of 1
I've extensively used pretty much every model for a lot of things, claude tends to be very considerably better at most things but it's just feeling like it's stagnating pretty badly
openai also fairly recently added support for encrypted reasoning contents which made their reasoning models much better at multi-step tasks
but they're all still honestly nowhere near good enough to do any kind of production level programming beyond maybe the most boilerplate of boilerplate code, and even then it's hit and miss
they're not replacing a real programmer any time soon but they can do some relatively simple tasks autonomously and more complex tasks with oversight/feedback
I think the most complex task it has ever done for me in a way that was actually pretty much flawless was me asking it to add lerp, slerp and a few other interpolation types as methods
oh and some regex
yeeeeah i haven't used sonnet at all but i've had pretty good experiences with more complex tasks with gpt4.1 mini, or even deepseek v3
e.g., uh
i have this nms based image map plugin
you place images like paintings, using physical items
i had it calculate the resulting size of the placed image in item frames and charge $50 per frame for the creation of the item
this involved making modifications to iirc 3 classes
it's weirdly decent at math honestly
like
it sometimes feels like it is better at figuring out math as a part of programming than it is at programming in general
it could not figure out how to program a sane way of making two teleport points where it wouldn't get players stuck in a loop, but it can pretty much write all the rotation matrix systems I could ever want
i also had it set up placement limits per area in numbers of item frames, for which it added config entries, player feedback messages with placeholders, and refactored the item frame storage to support "get things in an area" lookups
what else did i have it do, uh
oh yeah
i had it send any downloaded images (for placement) to the openai moderations api and check if they're indecent, and give an error to the user if they are
all of these were basically 2-3 sentence descriptions of these features, took ~5 minutes to complete (deepseek is slow), and cost ~20 cents
really teh only good thing about deepseek is how cheap to free it is
it's a truly bad model if you use it extensively
I guess it's slowly falling out of the collective consciousness but that thing still suffers from the problem where if the context gets to be too large it will just start spamming random words
there's a third thing, which is that you can see the reasoning contents, unlike for e.g. openai reasoning models
that is invaluable information for prompt engineering
and also helps fine tune prompts for non-reasoning models
I recently removed my openai sub but I think that's still just a thing for the free tier
at least I was still seeing the reasoning when I was using it like two weeks ago
no, they don't let you see the reasoning contents even with the api; only "reasoning summaries"
the contents are hidden to prevent reverse-engineering the safety guardrails
guess they changed then
doesn't really matter I use claude
that does expose the reasoning
that's pretty nice
well, assuming it's the actual reasoning contents and not a summary like with openai
it is
i found one of my feature prompts
Implement image placement limits. Search within a X block radius of the attempted placement, and if there are more than Y total item frames used by image Panels within the radius, cancel the placement. Load these values from the config. Note that since we use packet/nms based item frame entities for images, you can't actually search for them through Bukkit: you need to use the PanelManager to find them. Display a friendly error message to a player if they go over the limit. Do this in the hanging place listener in PanelListener and decouple it from the API, as only player-placed images should be subject to the limit; also add a bypass permission node for admins.
I guess that's reasonably simple enough, but I still find that more often than not the AI will do things that are horrendous in one way or another, like picking a horribly unoptimized way of fulfilling a task
yeah for complex tasks you need oversight
you always do honestly
for those i usually look at the diffs after it's done and then just tell it to do things differently until it's up to my satisfaction
there is one thing I like it for though, when I don't know the docs for something and I can just have it write stuff
pretty good for godot or unity
it's a decent way to crash-course into an ecosystem yeah
not that I necessarily use what it gives but then I at least know where to look for what I need
for some lesser known stuff I tend to just feed it either the entire codebase or the api and tell it to do something for me
i do think with some smarter use of tools, functions, and context protocol, even the current small models can be very useful in doing code changes, with oversight
I just wonder if we're starting to stagnate on real progress here
i think we have for a long time
if we are then it's still well short of where it needs to be
definitely not, sonnet 3.7 with reasoning was a huge leap over models before that
reasoning models were kind of a bandaid, current research seems to show that they don't really use reasoning at all, just produce longer pre-learned predictions
reasoning models in general are much, much better than what came before in my experience
even if they are a bandaid
it's a new dimension to scale the system along
which I do agree with but that doesn't invalidate how good of a technique it is
but i'm not sure if "make it bigger" is working anymore, even if we add more dimensions to embiggen over
we sort of had "reasoning" even before reasoning models, with chain of thought and tree of thought methods, but the models weren't really trained to leverage them well since they were trained to keep their responses short
can a system that is trained on how humans think even become better than humans at thinking without changing how it thinks in the first place
something to think about
probably
hm
but language is a very small, keyhole-sized window into "thinking"
I don't really use chat models but I haven't really felt a decent update for copilot-like AIs
AKTUALLY
i'm still waiting for them to train a model on like egr graphs or something
I'll have you know I have a bachelor's in linguistics
I still use supermaven even though it's pretty much abandoned
I tried copilot a couple months ago and it's still ass
and there's a whole field on how reasoning and language are intertwined
I heard grok4 is decent, we tried it at work yesterday and it made a website to visualize some formulas we made with sliders and stuff
haven't looked at that yet
shore, but a lot of the shit that goes on in your noggin gets trimmed out on its way out of your mouth
does it have api access yet
same as the rest then
that's not even expensive
they're all price fixing at this point
the actually expensive models are like
30
o1-pro at $600/million tokens
o3-pro iirc dropped it to "just" $300
or maybe that was 300 and 150
enroll in the data sharing plan so they can steal all your shit and you'll get 10M or something daily tokens free
3 in 15 out for grok 4
e.g. gpt-4.5 which is normally $150/million tokens
just deepseek that shit
crazy how they all independently decided on the price without looking at the price of others
hi claude
very nice price
remember when prices were lowered by 50% every 6 months? good days
we need another deepseek bazooka on this pricing
openai did drop them by around 30% i think between 4o and 4.1, and prompt caching prices halved from 50% to 25%, and they introduced the flex tier thing that iirc stacks a 50% discount on top of all those
guess i might try gpt 4.1
in real world terms i saw my usage in dollars drop by about ~50% because i use a lot of prompt caching
they also introduced 4.1-nano which is half the price of mini but still enough for simple tasks
Gpt has been feeling rlly censored for me
and it refused to because there was scenes of violence in it
you know, like you have in D&D
just guys fighting
great
some real pg 13 action too
mmm i don't think i've run into that ever
well how many D&D transcripts have you fed into it and asked for summaries
i frequently use mini to translate chinese web novels with like 🍇 and proper violence and it never complains
the chinese are weird with that shit
Why do you need it in English
tbf I swore gpt off after that one and never tried their api again
i also use it 24/7 on my server to censor nsfw messages
i have more than a few hard n words getting thrown around all the time
and it never complains
it is half the price of sonnet 4 at least
Can’t you censor NSFW messages without killing the planet as much
no
nah i want to keep the context coherent
I used to kill the planet for no benefit before, I was doing it before just for the love of the game
this is just an amazing cherry on top
e.g. it will substitute restarted (as in mentally left behind) to dumb
i can't say the word here because your crappy non-substituting world filter stops me
half of my chat will become unintelligible
That sounds like an issue with your players
e.g. it's fairly frequent net lingo to say something is restarted
what they actually mean is that it's dumb
silly
but some people get their panties in a twist so i'm nice and filter it for them
man I was about to say something really prescient
but now illusion ruined it
there's like a decade gap in not using that kind of language
people did when I was a kid, then it stopped for like 10-15 years and now it's coming back
i also use it for realtime translations
since it's much cheaper than any translation api out there
oh yeah? what's cheaper
i went through 4-5 of the major translation apis including iirc amazon and google but all of them were 5 or 10x the price
there's some professional tools that run entirely locally so basically just the price of your electricity but it doesn't matter because they're specialty stuff
I run a translation business
wouldn't i need a license for that
uh for the good ones yes
kind of
they're not really made to be real time for the most part anyway
i mean i could probably find a free oss machine translation thing out there but i feel like it'd be kind of shit
so it would be a bit janky
plus if you are doing in-game chat I would recommend ai instead because it has a better shot at understanding context and slang
people hardly type correctly in games in the first place
yeah translation is definitely a solved problem for the easy stuff
translations end up sounding a bit janky because in the middle of nowhere there's suddenly a perfectly capitalized and punctuated sentence, but it's more than understandable
that's one of the things I keep seeing people get wrong about ai
I see so many people accusing random posts of being written by AI when they're nonsensical and are written horribly when AI is so much better at typing and expressing ideas than the average random comment on social media
you can wrangle it to use incorrect language but it becomes very difficult with the cheaper models; most ai slop online is full of textbook grammar, oxford commas, and em dashes
unfortunately outside of chatrooms i write very similarly so i get accused of being chatgpt on the daily 🤡
yeah same
it's like how people were making fun of the word delve during chatgpt 3.5
I like that word
I use it
my sin is the em dashes
Hello, could you please tell me what the issue is with the SpigotMC API when trying to get the latest plugin version? I’m getting a 403 error.
spigot infra shitting the bed rn
mojang authservers were down for a bit earlier as well
I am trying to clone CraftBukkit, it is giving me a 403, pls help @slender elbow
that's good

Been happening all day
Nothing can be fetched from spigot hub

WHAT IS THAT EMOJI
cool
stupid question but i need to ask
if im making a plugin for someone, and they have another plugin - economy plugin (from someone else) and they want my plugin to check the money, add money etc. the economy plugin should have an api.
right?
my life is a lie
i didnt knew you can mark method with throws for unchecked exceptions and in this case compiler doesnt nag you to t it try/catch it use its unchecked runtime exception
acting like a javadoc @throws but embedded into method signature itself
eh its useless but cool
your eyeballs are leaking, should turn right side back up to prevent that
Yeah i never used that
Idk how you do it
But the method above has to try catch it or also throw
when you use throws while the method itself doesn't need to catch it, anything that uses that method will need to though. It is more useful when you are making an API and you want the user to catch the exception instead of the API handling it
So i saw that the only option to make a double jump functionality is by allowing flight to players, the problem is, im making a plugin on commission for a server that has 100+ plugins running on the same server, playing around with the player's flight status can mess up other plugins,
** is there any other way of doing it?**
PlayerInputEvent can be triggered if the player walked in any direction while holding spacebar, so it's out of the picture
Did Spigot also transition away from using Maven Central or was that only Paper?
Paper has now broken the "libraries" system in plugin.yml for many dependencies since they're using a Google mirror that doesn't have everythinf
spigot is on maven central
which, well, it'll work unless your plugin is run on a host with a lot of those ™
<Deleted and reposted here from help-server i got the wrong channel>
Hi guys, i wanted to ask a simple thing is there a world where i can actually set a velocity multiplied by higher than 4.5 in Spigot without it becoming imprecise? with a value of 4.0 it's super precise when i start going up from there it starts being precise only if the player is looking directly on a X or Z vector in the inbetween it deviates a lot
thank you 🙂
How do I add an update system to my spigot plugin?
like notifications?
ye
Velocities can't be set higher than a magnitude of 4 so
Or 4 on each axis, I can't remember
Short rundown:
- Get your resource's id from the Spigot URL
- Query the resource API to get the most recent version
- Compare that version against your plugin's current version
- Profit???
If you're hosting on another platform, the first two steps will obviously differ, but generally speaking, whichever platform you upload to, it probably has an API to query for its update history or most recent version
OK that's a great info to have, so basically there is NO way i can make it go faster right?
TIL I'm a toml mixup
Yaml is a superset of json
Should be noted that the version string you use on the resource should follow a standard to make it easier to compare versions lol
Hello! I am using Spigot's 1.19.4 API and, for some reason, TrimPattern and TrimMaterial are null in 1.19.4. For example:
plugin.log(Level.WARNING, "Test: " + TrimPattern.SENTRY); // null
The exact same jar does seem to work (isn't null) in 1.21.7. I'm aware that 1.19.4 is old and that it's marked as experimental, but is it a known issue and is there a fix?
Do you have the datapack enabled
Which datapack?
The 1.20 experimental one
Oh, no. I guess that's the issue. Thanks
Is there a way to create a empty end world?
Create a void generator and then set the environment to END in the worldcreator
Or use Bukkit.yml to replace the generator of the default end with your void generator
Oh that was easier than i thought, thanks! Is there also a way to change a existing world to the end dimension? Because i have a little spawn world that should be moved to the end, but if i just move the world into the world folder it gets replaced by the minecraft end world
Probably something in level.dat
Alright, that sounds like its easier to just add a schematic
Just realized my first plugin and was wondering if these downloads are legit or not
idk, I am new to the space and getting that many downloads in 12 hours just didn't feel right in my head for some reason
i have send a report to delte my plugin How long does it take to delte it?
About a day
alr thx
[21:51:22 WARN]: java.lang.InstantiationError: io.lumine.mythic.bukkit.adapters.BukkitItemStack```
This is not a me issue right?
I am using the example code from: https://github.com/xikage/MythicMobs-API-Examples/tree/master like blank example code. How the code comes is how I am loading it right now
Full stack trace
I literally copied and pasted the code from the github and tried to run the example and it doesnt work
?whereami
?whereami
Hmmm
?whereami
Hmmm
Hmmm
Hmmmmmm
you know
for the next april fools
definitely should switch that command to show you were in paper all along
that would be pretty funny
theres no such thing as a map with indexes right
id have to go O(N) for getting a value at an index if i use a LinkedHashMap
no better way?
swap it out with the meme format
its all paper? always has been
can anyone confirm
oki thanks
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("erete!"));
is this the right way to do it ?
yes, but recommend ComponentBuilder
why?
TextComponent component = new ComponentBuilder(message).create()[0];
so like this?
do i create new component builder evry time
pretty sure Player.Spigot#sendMessage takes in a BaseComponent var-args
whats that
just sendMessage(ACTION_BAR, new ComponentBuilder("message").create());
so no [0]
a fancy array, basically
yeah the ... thing
yeah no need for grabbing an index
yeah
but it will be always size 1 ?
theres .build method for ComponentBuilder if itd bother u that much passing an array
i believe that one returns a single BaseComponent
okay
im sending an action bar message to a player every tick, it works on a server without any other plugins. but it doesnt show up on a server with these plugins
anyone know what could happen ?
u should do a binary search to find it
delete half see if it happens
if it does then its that half
ohh
this is not my server though
for someone yeah
just install the same plugins on hr own server
and do the same search to find it
then u can tell them what causes or maybe its in the config
antylogout, chemmicspawn, passky, ranking, simpleclans may do it
also u got 2 essentialschat jars
delete the older one
nah
Is it possible to open writtable books with packets? Because everytime I try it the book is not editable :/
It is not
Would there be a way to restore a custom world to it's original state using SpigotAPI?
I want a world that resets every week
Now I was thinking of having a directory with the original state of the world and just delete the world and copy that directory everytime, but was just wondering if there was a built-in way to do this
no, that process you mentioned is pretty much standard
this is so smart, nice
this is literally the best way even if there was an api for it
can i force fence connections?
i want the fence to connect to the grindstone, even if it looks wonky due to the smaller block model
should be able to
according to the wiki, if the state is set to true in regards to the cardinal direction, it will extend it. So I suppose figure out which cardinal direction that grindstone is from the fence, and then on that fence set the blockstate cardinal direction you need to true
Yeah you'll have to set the block state with physics set to false
You can set the fence side with https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/data/MultipleFacing.html#setFace(org.bukkit.block.BlockFace,boolean)
So get data, cast to Fence, set the side, set the block data with no physics
Hey there
I am looking for experienced developers for my server if u're work is good I will be paying you
Pls do dm me
?services
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/
Hello, I have noticed the method getForce() in the EntityShootBowEvent is now returning a float between 0 and 3, instead of between 0 and 1 as stated in the docs. Is this a bug or is it something with my plugin?
Best to report that on the Jira, yeah
I'll do, thank you
how can i upload a plugin in spigot? make me @ plis
you go to the resources section and click add resource
click Resources
yeah like github or forgejo
where do i learn that
your own plugin's api
uhm
im creating an instance of class in the class itself
and... i can access private fields?
like its the same class but different instance.. im confused
i'm not sure what you mean
public class SomeClass {
private int someVariable;
public void idk() {
new SomeClass().someVariable;
}
}
you can access the private variable, even if its another instance
sure
that is correct java behaviour
private means that only the class can access the class' own fields, regardless of instance
Look my first plugin https://www.spigotmc.org/resources/easyclimate.126942/
Beanstalk
Congrats
Not to be rude or anything js asking why does a climate plugin have a anti-swear/insult system
For not install more plugins
Hace you downloaded i only want to now
Yes I downloaded it
Oh thanks
Damn it works super well
components:
minecraft:custom_name: {"text":"API Test Sword","color":"gold","italic":false}
minecraft:lore:
- {"text":"This item was generated by","color":"gray","italic":false}
- {"text":"ItemsAPI!","color":"aqua","italic":false}
And I added nms support for lower versions, so my one API can support servers under and above 1.20.5
Kotlin beats java in every single important ascept imho
Idk why people still hate it
You and rad are the only two people to have ever said this tbf
At least i know better now haha
Java just lacks simple qol stuff hence shit like lombok exists
I mean I’m not gonna diss on kotlin, it’s very nice and the syntax sugar from what I’ve used is great… but I still cannot read it past a first grade reading level and I feel it’s because of all the inferred types
I’ll say it too
I had the same issue, until i just started to use it
I like java because it’s extremely strict in its usage of syntax and because I always know what the hell im reading
Just use IJ it’ll tell u what types are if u can’t infer it urself
And it became a non-issue very quickly because IDE tells you the type and names should be descriptive anyway
Yeah usually the name sorta becomes a typedescriptor too
It’s not that I can’t, I’d rather just read it and know from a given definition instead of fun this fun that kek
fun has clear types though
I had the same opinion 3 years ago
Call it preference, like I said I don’t dislike kotlin but I enjoy java more
Skill issue
But after you typed IStorageManager storageManager = new StorageManager(…) enough times… idk you should know that a StorageManager is an IStorageManager
val storageManager: IStoragemanager in the constructor. No need to repeat it thrice
Then let guice handle the rest
I am too tired to construct shit myself
Psh fine I’ll just use java records everywhere with util classes
You are confusing object classes with data classes I think
LMAO
No, apparently just a bad joke
Oh ok
Does it make it always sunny?
I meant it in the way that kotlin has companion objects
They are finee
idk
yes
I sent a report to delete my plugin two days ago and it has not been deleted
what should i do
should i spam report 😂
just wait
i mean... that does not call the constructor
unless you mean val storageManager = StorageManager(...) ? but then the type is no longer IStorageManager
I don't want the number of downloads to increase. It has reached 7. 😂
i want keep the plugin private
Then why did you post it
Gonna download it
@potent crescent u got two spigot profiles uhoh
Insert ban gif
Phone drops to spf when browsing gifs sob
hhahahha
Self-encouragement hahahahahahahahahahahahahahahahahahahahahahahahahahahahahahaha
More like ban speedrun
I changed my mind, honestly.
ill keep the plugin gor my, servwr
e
I'll give you encouragement for free bro
No need to break the rules
idk it is not allowed
and i dont nned just delete my plugin lil
lol
It does say on the signup page not to make more than one account
its my brother acc
But I praised myself on his account 😂
Hmmmm
i did for 2 times
I changed my mind, I want it private
An hour after I downloaded it, I filed a report.
?howold 1.1
Minecraft 1.1 is 13 years, 5 months old.
the fact that minecraft 1.0 is only two years older than gta v 😭
When Minecraft VI
Its crazy that there has been no new gta for 12(!!!) years now
Rockstar is either procrastinating
well gta 5 is lasting good enough
Or producing sth very very great
if I have a Block can someone please show me the code to place an item frame on it on a given BlockFace? All my item frames are breaking
Did u google it
yes please help somebody
What have u tried
?nocode
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
Just take the block, getRelative with the face you want to place it on, then spawn the frame and setFacingDirection to BlockFace#getOpposite
spawning an item frame takes a location
Block#getLocation
ok, you sure?
I cant believe ive been trying to place an item frame for 2 hours now
https://pastebin.com/pEyrZVMu
here, both spawn an item frame that breaks immediately
i feel like ive seen you send the same thing a few times and delete them all, be paitent
Did you try adding the 0.5
yes
I was switching to a paste link
ive tried all 4 combinations of: block.getRelative(oppositeface), just block, adding 0.5, not adding 0.5
Idk, place an item frame there manually and take a look at its entity data
how?
I believe F3 I copies entity data
F3 opens coordinates
F3 i
/summon minecraft:item_frame -39.50 179.50 4.97 {Motion: [0.0d, 0.0d, 0.0d], Facing: 2b, Bukkit.updateLevel: 2, Paper.SpawnReason: "DEFAULT", Invulnerable: 0b, OnGround: 0b, Air: 300s, PortalCooldown: 0, Rotation: [180.0f, 0.0f], FallDistance: 0.0f, WorldUUIDMost: -6423573177640467344L, Fire: -1s, TileY: 179, Invisible: 0b, Spigot.ticksLived: 742, Paper.OriginWorld: [I; -1495604678, 2114143344, -2041178201, -978612150], TileX: -40, TileZ: 4, WorldUUIDLeast: -8766793615286759350L, Paper.Origin: [-39.5d, 179.5d, 4.96875d], Fixed: 0b}
Dangit Mojang why is the facing direction just a magic byte :(
Okay place it and setFixed(true)
That should at least stop it from being destroyed so you can see what’s wrong
Okay so switch the facing direction around and move it back a block
you're so right
Yep that’s code
For some reason this isn't working. It prints the block being damaged but doesn't cancel it. Keeping in mind I am new to Java and Plugin development just started today but I have a very big programming background. Any help would be amazing thanks!
//Runs when a block is being broken.
@EventHandler
public void onBlockDamaged(BlockDamageEvent event) {
//Getting the player.
Player player = event.getPlayer();
//Getting the block.
Block block = event.getBlock();
//Checking if the block is obsidian.
if (block.getType() == Material.OBSIDIAN) {
//Returning.
return;
}
//Checking if the player is in creative.
if (player.getGameMode() == GameMode.CREATIVE) {
//Returning.
return;
}
System.out.println("Block damaged");
//Canceling the event.
event.setCancelled(true);
}
did you register the event
Yes.
//Registering event listeners.
getServer().getPluginManager().registerEvents(new PlayerEventListener(), this);
did you try adding some souts above your returns to check where its getting to?
Yea it gewts all the way down to the setCancelled method but it doesn't cancel the action.
I am wondering if setCancelled is like for a specific version cause I am using 1.21.1
Or is canceling the event not doing what I think it should do. Because what I got from the docs is that it cancels you attempting to break the block. So it would be like bedrock were you cant even attempt to break it.
Am I correct on that or?
best way to do this is to give the player a very high mining fatigue effect
or packets, but that is a lot more work
Shouldn't be to hard.
the way the client handles block breaking can sometimes be funny, wouldnt be surprised if it cancels server side but not client side
Ill try that.
Funny
Thank you for the help.
Better than mining fatigue would be the attribute
But I think that was 1.21.2? Idk I don’t remember
didnt even think of that, good shout
The new game drop updates make it hard to keep track
So what is there an unbreakable attribute then?
Cause I am willing to update if it means that.
block break speed
So is it an attribute for the block then?
And were would I find that in docs?
what is the best way to put a map of your world in item frames (I have a 5k x5k world and want to put it on a 3x3 grid of frames)
how do I even load a map of the world?
How can I add a fake player to the tablist. (I am making a feature to hide all players but I want players to still be able to see other players in tablist)
You have to write out a renderer
Why don't you just remove the entity without removing it from tab
with some packet magic or something
I'm going to have to use packet magic either way lol but if there is an alternative I would definitely prefer it because right now using the hideplayer effect it like ruins command autocompetions and stuff too
I don't know how to do that though, do you?
does that require NMS?
Not necessarily, no
might be beneficial to use NMS as bukkit's map stuff is slow
Either NMS or PacketEvents or something
I do
Removing a player from the world and removing them from the server are separate actions
As a player can be in the same server but in a different world
You basically want to send out the same packets (remove entity) as changing worlds
I know like nothing about sending packets. How do I do that?
How is this done?
is there a good plugin for getting a map item with an image on it?
declaration: package: org.bukkit.map, interface: MapCanvas
You’re in the dev channel
Damage event can not be called because its calling block break event
Block blockType = e.getBlock();
if(!blockType.equals("Obsidian") && !bde.getInstaBreak()) {
e.setCancelled(false);
bde.setCancelled(false);
}
e.setCancelled(true);
bde.setCancelled(true);
}```
This is what you should do
that is not a valid event handler
LMAO, Yeah. I was providing an example
on mobile
Its not the exact but its similar to that
You would just seperate it
block damage event does get called when damaging a block but the visual is client-sided, so cancelling the event would only cancel the event on the server
Thank you.
Well, what do I know lmao. I just started aswell. I figured since its insta-breaking, it didnt call the damage event
im not entirely sure if block damage gets called if the block is an insta-break, probably something to test
but either way the block is obsidian so it wouldn't apply
they are also checking if they are in creative so in that instance it would be
they are cancelling if the player isn't in creative
if I stored an instance of an entity in a collection (like I did now), assuming that I only care about it in a minigame without any restarts, is there a way for the instance to become invalid if the chunk reloads?
Think so... Store their IDs
sounds like a lot of risk to save 1 line of code
entity id or uuid?
uuid
yeah, thought so, basically I am refactoring some old code and I came across this
then I could do this?
private IronGolem cachedGolem = null;
@Nullable
public IronGolem getBukkitInstance() {
World world = game.getWorld();
if (cachedGolem == null || !cachedGolem.isValid()) {
return (cachedGolem = world.getEntitiesByClass(IronGolem.class).stream().filter(golem->golem.getUniqueId().equals(this.golemUUID)).findAny().orElse(null));
}
else return cachedGolem;
}
instead of always iterating
Use the getEntity method instead of looping
And don't bother "caching" it, getting an entity by uuid is very cheap and boils down to just a map lookup
speaking of caching, a World instance is valid until a server is reloaded / restarted?
depends
assuming no other plugins interfere with it
if no other plugins interfere, yes
it's a custom world manually loaded into the server...
unloaded by the server automatically?
I am just wondering for safety to not hold invalid instances of something, I could also always just call getWorld
so basically I have my plugin that manually loads and unloads it:
private static void unregisterWorld(String filename) {
for(World world : Bukkit.getWorlds()) {
if(world.getName().equals(filename)) {
Bukkit.unloadWorld(world, false);
}
}
}
public static World registerWorld(String world) {
WorldCreator creator = new WorldCreator(world);
System.out.println("world registered");
return creator.createWorld(); //loads a world from disk
}
if no other plugin unloads it, it is safe to store World instances?
ion think .createWorld() actually loads the world?
it does
it does, that does not matter now
since when 🤔
since forever
o
the more you know
yeah this should be fine
without other plugin doing the thing
I mean if I understand how that works, spigot won't randomly decide to change the instance unless the server is reloaded / restarted or it is intentionally unloaded
Why do you loop through worlds to find the one with the right name
There’s Bukkit.getWorld(name)
the World instance is tied to the world "instance", as in, it being loaded
a world that gets unloaded and then reloaded will produce a different World instance representing it, and the previous one will be invalid and shouldn't be used any longer
thanks
same principle as with entities; when they unload, their Entity instance becomes invalid, and when they load back in again, they produce a new Entity instance to represent them, and the old one remains invalid
for all entities I use UUIDs, but for world I assume I don't need to call getWorld each time if I know the world is valid
should be safe yes as long as you don't unload that world
is there any way to have jspecify annotations working with vscode?
if some other plugin randomly unloads it, that's more like an issue with that plugin and not strictly your fault
specifically for my minigame that happens in the same session anyway...
yeah
they do work in intellij but i cant find a way to make them work in vscode
Hi, how do I make the Bend Sinister Banner pattern? I can't find a PatternType for it.
It is basically a line which goes from the top right corner of the banner to the bottom left corner
Have you checked the wiki?
Patterns have internal names which differ from their pretty names
Compare the two
Or is it DIAGONAL_UP_RIGHT?
No? becasuse thats not Bend Sinister?
That would be Per Bend Sinister
Alright, alright
no its not alright, Skibidi Toilet.
Thank you so much! You've really helped me!
🗣️ 🤫🧏♂️ Sigma Sigma Boy Sigma Boy Sigma Boy
outdated
How can I use packets or something to hide a player from another player without hiding them from tablist/from command arguments. This always messes up tablist and stuff.
you could just use the api to hide the player then
if you are not looking to hide from tablist
I'm looking for other ways to do it on bukkit docs but I don't see other ways to do it 😔
how do I use the api that way?
declaration: package: org.bukkit.entity, interface: Player
this method will not alter the tablist. Hence it being perfect for your needs 🙂
which method? that site you sent is showing me the whole class
yeah that's what I am using right now and it does hide them from command arguments and the tablist
e.g.
player.hidePlayer(Timelords.getPlugin(), loopedPlayer);
interesting, maybe it finally got changed on that 🤔
anyways, I am assuming the hiding is causing issues with other things?
like knowing who is hidden or something?
uhh not really I could just make a command to figure out who is hidden if I needed, I just want to be able to see other players on tablist & auto complete them in command arguments even when they are hidden
all I want to hide is their actual player like model not from the server completely for that person
I wonder if the deprecated method of hiding players would work. First for me that this method completely hides them now lol
i dont understand that how can i fetch spawns as a List<List<Object>> or List<List<Integer>>
A List<List<Object>>
Is simply 2 two lists
List<Object> would ideally be your coordinates which is then stuffed into another list to hold all those lists
so its a list of lists
i know but still dont work for both.
you make the first list which is the List<Object>
and then you add that to the second list
Alright lets see if I can walk you through in how you would make such a thing.
then this should work
so with the link I gave, I have there TutorialConfigs
which we can consider as the Object
I could make a bunch of TutorialConfigs and then toss them into a list
and then lets say I make a bunch of lists of those tutorial config lists
this would give us List<List<Object>>
Object being there is just that it is not imposing a specific object type
I just want a small code snippet, I don't want to go through tons of code
pseudo code is also ok
do you know how to add objects to a list?
it isn't complex really. List.add(Whatever you are trying to add)
so that is how you add something to a list
now you add stuff to the first list right?
The second List, is just going to hold objects that are Lists themselves
once again using the add method but this time we don't just add individual objects, but instead we are adding the list to a list
how you would fetch those spawn datas :
worlds:
world-uuid:
spawns:
- [ 0, 64, -100 ]
- [ 1, 64, -101 ]
with spigots configuration api
There are too many unnecessary details, what I want is simpler.
what is not simple in what I showed? it is just a for loop and I gather up all the stuff I want in that loop and create my objects or pass the data along
max 5 line of code could solve my problem
since you are having problems with multi-dimensional arrays here is a link that will show you how to make them and access them
no thanks
Location is directly ConfigurationSerializable btw
You can just get/set a List<Location> to the config
didnt you observe my code
What is the main purpose of posting this tutorial because I don't see any problems with my code that are related to anything in this tutorial.
besides this is also not related to my question.
you asked how I would do it, not that it be relevant to you
I showed you how I would fetch data from a yaml file, which that code does indeed do
at present it seems you are having issues in creating/accessing multi-dimensional arrays
thus why I sent a tutorial on them which is related to your issue
i dont understand that how can i fetch spawns as a List<List<Object>> or List<List<Integer>> Verbatim what you said
from Configuration api *
the things you said you had an issue with, are multi-dimensional arrays
bro i even know Concurrent & Syncrhonized Collections.
and that proves what?
my knowledge on Collection framework
so then you should know how to create and access multi-dimensional arrays then?
yes
then you would know you couldn't just simply cast the way you were right?
well I suppose you could, but it would present some issues lol
also casting is not the same as creating either
It sounds like you're writing just for ego masturbation, and you're not being helpful.
ok i solved
worlds:
world-uuid:
spawns:
- - 0
- 64
- -100
- - 1
- 64
- -101
c4c74322-3d45-478f-9393-91a69af16286:
spawns:
- - 18
- 89
- 64
avg frostalf encounter
holy shit you're the GOAT
frostalf mentioning his 10yo code yup classic
code is ass btw you shouldn't use it as an example
that's even worse
I'd just do it manually tbf
ConfigurationSection worldsSection = getConfig().getConfigurationSection("worlds");
for (String key : worldSection.getKeys(false)) {
UUID worldId = UUID.fromString(key);
ConfigurationSection worldSection = worldsSection.getConfigurationSection(key);
List<String> encodedSpawns = worldsSection.getStringList("spawns");
// eh streams sure ok
World world = Bukkit.getWorld(worldId);
List<Location> locations = encodedSpawns.stream().map(this::parseVector).map(vector -> vector.toLocation(world)).toList();
...
}
This isn't really bukkit config api's fault, deeply nested generic types are a nontrivial matter in serialization
We can't really have typed getListOfListOfListOfInts() in the api to an arbitrary depth
You'd have to start fucking with like gson style type tokens
And that honestly goes well beyond what the config api is supposed to be
The expectation is that you can always grab it raw as a Map<String, Object> and do whatever parsing/casting you need to do
PacketContainer packet = new PacketContainer(PacketType.Play.Server.WINDOW_ITEMS);
packet.getIntegers().write(0, 0); // Window ID 0 pour l'inventaire du joueur
packet.getItemListModifier().write(0, Arrays.asList(items));
// Envoyer le paquet au joueur
ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);
i am sending fake items to the inventory of a player, items is an ItemStack[]
slots 9-35 are working fine and putting items inside the inventory but i also want to put some items in the hotbar (slot 0-8), i do everything correctly but the items in the hotbar never show up and i dont get any errors
except it works
your example literally is what my code does basically.
yeah but it's properly styled and looks readable
Just because they achieve the same result doesn't mean they're as good of an example
its styled properly o.O
post it on #1100941063058894868 and see what happens
just because someone has a differing opinion doesn't mean it is not styled properly
it follows conventions last I checked. As for readability, sure I probably could have spaced the lines apart
not falling for the ragebait
its not rage bait you said it was not styled properly
never clarified what wasn't all I said is that it follows conventions 🙂
Anyways if the only two issues is that though, then functionality wise what I had given them was correct as it works.
therefore it is an acceptable example since they did ask me how I would do it
seems they were happy with what you given them though, so a non-issue at this point lol
if writing dogshit code that functionally works means I can throw it as a tutorial example …
except it achieves the same results as what illusion gave and operates the same
so....not sure what you mean by this
.
that's exactly my point
oh
I'm not saying it is dogshit, although it could do a little cleanup, we are all guilty of unreadable code, but that there's definitely more value to a presentable example
Hi What is the best way to get the position of the fishing bobber when a player throws their fishing rod?
try using window id -2
Actualy im listening to the PlayerFishEvent with event.getHook().getLocation(); but by doing this i need to wait a BITE.
but I am curious, what are you using fake items for?
you can check the EntitySpawnEvent if it is a FishHook and get the location there
though I was under the impression the fish event also triggered when the player just threw the fish hook into the water and not only when a fish bites
Do I need to add a short delay after the player casts the fishing rod to wait for the bobber to land in the water?
because i want the location of the bobber when he land in the water
why do you not just check whether the PlayerFishEvent's state is FISHING, that should be exactly when the hook is in the water
Im gonna check
I tried the depricated version, it has the same issue, still hides tab players
well that is nice to know it removes them from tablist, not that it helps with your issue though =/
if only you needed this in the past
because in the past it didn't remove players from the tablist XD
would using the scoreboard method achieve what you are wanting? Not even entirely sure if it removes you from tablist either
.equals or == with Player?
as in Player object?
yeah what else?
equals, though I would rather check if the uuid is equals
oh okay
== is the technically safe approach
.equals will work
ideally yeah compare uuids
if .equals passes and == fails you have a memory leak
==
Compares if two references point to the same memory location.
.equals()
Compares the content of objects.
ah, CraftPlayer's equals checks for UUID equality anyway
well, it checks for uuid and network id, I wonder why
What do you mean?
would be incredibly cursed
NPCs aren't CraftPlayers though, they're just nms.ServerPlayer if they implement it that way
but could be, who knows. Maybe it is a leftover from ancient times
i tried searching but couldnt find which window id corresponds to what part?
the documentation for protocollib is surprisingly shit
ProtocolLib will only have information on how to listen and modify packets, aka the networking part but doesn't have much information on the protocol iteself
for documentation on the protocol, you should check the minecraft wiki. In your case specifically the Set Container Content packet documentation
to know which name corresponds to which packets in the wiki, you should check the PacketType definition
I found a bukkit post I think may work, just have to install paperweight so I can use craftbukkit stuff https://bukkit.org/threads/hide-player-without-hiding-from-tablist.229186/
Hello, I need to hide players, but keep them displayed on the tablist, the hidePlayer() method works fine, however it removes them from the tablist...
well, hopefully it works for you
you put everyone on their own team and using scoreboard api you can hide players who are not on the same team
CraftPlayer is just a wrapper for ServerPlayer
every entity has its craftwrapper
that gets lazily initialized when calling .getBukkitEntity or whatever
I am aware, however what I am saying is that npcs that touch internals are normally do not extend the craft impl but their NMS derivatives, since as you say they're just wrappers anyway
even if they do, I imagine it'd end up falling as a CraftEntityHuman or NPC
window id -2 made it so now none of the items are appearing
// Créer le paquet WINDOW_ITEMS
PacketContainer packet = new PacketContainer(PacketType.Play.Server.WINDOW_ITEMS);
packet.getIntegers().write(0, -2); // Window ID 0 pour l'inventaire du joueur
packet.getItemListModifier().write(0, Arrays.asList(items));
// Envoyer le paquet au joueur
ProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);
my bad, I got it confused with the information on the set container slot packet which uses the window ID -2 for any slot in the player inventory
window id 0 should work for the player inventory in the set content packet, however are you pointing to the right slots? Hotbar slots should be from 36 to 44
Soo noo
This is fired when we right click with the fishing rod
ah so same as entity spawn event then
if you're using paper, you could take advantage of the FishHookStateChangeEvent or whatever it was called
if you are not, then I'd just put a while loop or repeating task in the event that checks for the FishHook state until it is BOBBING or whatever it is when it is in water
Witch fishHook state should i use so ?
damn, theres no native fish event in spigor?
there is a fish event, there is no FishHookStateChangeEvent
check the javadoc for them
damn
PR time
yo we need a minecraft dev for our server , mic included and youll will get something in return ,dm pls
whats minecraft
what do we get in return
ur love and friendship?
?services
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/
what you get in return is confidential i cant just say it on the discord we can negotiate about it dm me tho so i wont get banned
that doesn't sound suspicious at all
well im just the helper of the owner and i cant really make decisions
so are u gonna stuff my ass or something wtf
"i cant just say it on discord"
my bad mr taliban
so why are u the one advertising then
This is obviously what you get in return lol

well im in a rush and im sorry that it made you feel some type of why but im prolly not gon talk you so jus ended it you could have block me to
i wouldnt mind
Always good to hire people in a rush
exactly
all good
does the bukkit scheduler guarantee tasks are executed in the order they were posted
I dont think its guaranteed as in written into the API docs, but pretty sure that's how it works
Yeah, If it's not documented the behavior can change at any time
Effective java talks about contracts and what they mean
Hey guys, is there any specific event that gets fired when Bukkit.dispatchCommand(Bukkit.getConsoleSender, ...) being called?
I've tried ServerCommandEvent and nothing comes up. This is how I debug it.
@EventHandler(ignoreCancelled = true)
public void onServerCommand(ServerCommandEvent event) {
System.out.println("event.getCommand() = " + event.getCommand());
}
What are you trying to do
Logging commands.
you would be better off listening to the chat packets for that, the dispatchCommand method seems to bypass minecraft internals (except for vanilla commands I guess, since there's a wrapper for them) so even if there was an event injected somewhere, it wouldn't be triggered
I wonder how it handles brigadier commands being registered directly, I guess whoever do this would also have to register them in Bukkit's SimpleCommandMap for it to stay in sync
This might seem so novice, but I cant remember the last time I worked with placed blocks... ahem...
when doing #setType() on a bed, how do you prevent like half of it being left?
The result of performing setType(Material.PURPLE_BED), where a green bed once was.
does it set it correctly if you just update the block state or does it remain broken
That's the default state. You have to retain the block data
I would've expected setType to handle this type of thing tbh, given there is no setType for bisected blocks specifically
Ja
Bed oldBed = (Bed) block.getBlockData();
Bed newBed = (Bed) Material.PURPLE_BED.createBlockData();
oldBed.copyTo(newBed);
block.setBlockData(newBed);
I can delete the snippet still 
What makes you think I'm not a pesky TOS violator with a message logging plugin?
I love how in the forums people choose to do this instead:
Block bedBlock = p.getLocation().getBlock();
bedBlock.setType(Material.RED_BED);
Bed bedData = (Bed) bedBlock.getBlockData();
bedData.setPart(Bed.Part.HEAD);
bedBlock.setBlockData(bedData);
Block footBedBlock = bedBlock.getRelative(bedData.getFacing().getOppositeFace());
footBedBlock.setType(Material.RED_BED);
Bed footBedData = (Bed) footBedBlock.getBlockData();
footBedData.setPart(Bed.Part.FOOT);
footBedBlock.setBlockData(footBedData);
Well that's if you were setting the bed in the world
You're just replacing a bed, right?
Yeaa
Then yeah you only need the simple part. But if you were setting the bed in the world, both parts, with no parts to replace, you would have to do that ^
Could probably simplify it a bit by pre-creating the block states, but yes, same principle
I'm imagininginging this is the same principle if I wanted to replace a collection of 4 candles as well without overwriting them to 1?
Yes
You could honestly generalize that a bit. You don't have to cast to Bed at all. In fact, I'm not entirely sure why I did lol
ur a sigma das why
private void replace(Block block, Material material) {
BlockData oldState = block.getBlockData();
BlockData newState = material.createBlockData();
oldState.copyTo(newState);
block.setBlockData(newState);
}
Man I wonder what genius added copyTo the API
Yeah if only we knew
I'll copy you to the API
I wonder if this is something that should be handled by setType tho, I doubt anyone wants the default behavior what it is right now
I guess it is too late to change it now
If you wanted a really fancy way to do it, this would also work I believe:
private <T super BlockData> void replace(Block block, BlockType.Typed<T> type, Consumer<T> changer) {
BlockData oldState = block.getBlockData();
T newState = type.createBlockData();
oldState.copyTo(newState);
changer.accept(newState);
block.setBlockData(newState);
}
(changer is optional, I just threw it in there for fun)
omg I'm going to typo every fucking message I send today, aren't I?
it happens

They are internal types for the time being lol, and the snippet I sent earlier works totally fine. I'm just getting excited for fancy new APIs 
they've been experimental for a while now, but they look solid to me
don't know what else is missing to just ship them as non-experimental
Not even experimental. They're internal so Material can work better
They're internal because you can't really use them anywhere in the API
You still need a Material practically everywhere
tl;dr presumably being, at some point Material just semi dies and is replaced by Block/ItemType. Instead of like, overloading every place that takes Material
just change every instance of Material in the API and then fix all plugins with Commodore 😎
Yea pretty much
the command library?
Commore is spigot's internal remapping tool
i like the RENAMES map whose first entry is a typo
no i simply dont write legacy chode
id like to report inconsistent code by mixing Map.of and Map.ofEntries
ApiVersion.ABSTRACT_COW 😭😭😭
Aligment 🙏
Does anyone have a multi-version inventory framework api?
what's wrong with the Inventory interface?
with an API it becomes easier
what becomes easier?
the Inventory interface has been the same for the past 10+ years
more beautiful I say
just for GUIs?
yes
people seem to like triumph-gui, or IF
IF from devnatan?
no clue, from stef I think?
https://github.com/TriumphTeam/triumph-gui this is 1.8-1.21?
main drawback with the blocktype api is that I don't recall having a Block#getBlockType method
ideally at some point Block#getType will just be changed to return BlockType
why isnt Block#getType just BlockType
every single time i use it i see Material as the return value and i have to recheck what i just typed
if you mean menus i would recomment 7smile7's tutorial to implement your own. its uses bukkit so it runs on 1.8+.
u can go to their support server or #help-server
Yes because it's an internal type right now. That's the reason it's still marked as internal lol
how do i get player names, and get players by name when they offline
yeah
Server#getOfflinePlayer(String)
you can use name or uuid pretty sure
and u can do OfflinePlayer#hasPlayedBefore
should i use it if its deprecated?
nop
so...?
just use hasPlayedBefore and getName
oh okay
???
nvm
so
Hello im using buildtool to build 1.20.3-R0.1-SNAPSHOT. All work i can see the folder 1.20.3-R0.1-SNAPSHOT in my maven repository folder local.
But when i do
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.3-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
He can't find it and that doesn't work is anyone have an idear ?
and can i get offline player by string ?
if ishouldnt use deprecated
Idk i just download a plugin source code and i see that i need 1.20.3-R0.1-SNAPSHOT
so i just run java -jar BuildTools.jar --rev 1.20.3 but i still can't compile it
?mappings
Compare different mappings with this website: https://mappings.dev/
I believe so 🤔
other plugins do that
yeah if they played before
why does he need to get the name
if he is getting the player by name
💀
they are both deprecated
its litearlly what i sent
but its deprecated so should i use thta
can anyone help me how to get gui moved to left?
I'm so rusty 😭
what does taht mean
I need it to left
I think I need this but idk how to set it up https://github.com/AmberWat/NegativeSpaceFont/blob/master/README.md
?
yeah there isnt any other way
this isnmt a thibng