#help-development
1 messages · Page 1315 of 1
send your entire class, along with the imports at the top
?paste
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
also this doesn't seem to be world-associated information since you only ever access the "main world"
this is lossy and generally speaking bad practice
just copying thos time
save to a .json/yaml in your plugin directory instead
Ctrl+A Ctrl+C
Ctrl+V
i get world(0)
the main world
yeah, that's bad
what if the admin wants to change their main world? they have no way of moving your pdc data over to the new main world and all of the data will be lost
the main world is no place to store your plugin data
that's what databases and your plugin directory are for
It just deletes with that
its not that important
its not economy or ban time or something
storing it in a .yml via the bukkit config api will also be easier
yeah
im doing this cause big plugins like lp and vault does'nt use yml
Do you know why they don't ?
package com.NovaDevs.novaPolice.Wanted;
import com.NovaDevs.novaPolice.NovaPolice;
import com.google.gson.Gson;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import java.util.HashMap;
import java.util.UUID;
public class WantedManager {
HashMap<UUID, Integer> wanted = new HashMap<>();
NamespacedKey key = new NamespacedKey(NovaPolice.getInstance(), "wanteds_info");
World world = Bukkit.getWorlds().get(0);
PersistentDataContainer data = world.getPersistentDataContainer();
String json = new Gson().toJson(wanted);
}
they don't use pdc either
no?
Well then don't try to blindly follow their steps
and most certainly they don't use the world pdc
you should blindly follow their steps and not use the world pdc for this
You don't know Java at all, do you
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
Yeah they use databeses but i don't know sql
i know a little
why?
nvm
i'm gonna just make a data.yml
well, vault doesn't store anything, it's just a bridge with an actual economy plugin
luckperms does have the capacity to store data in yaml or json files, it just doesn't by default, but admins are allowed the option; what it does not do is store permission data in the world pdc
not a better time to start learning than today!
Ok
I'm not gonna explain basic concepts of java
But the TLDR would be "the code should be in a method, not just a class"
Tysm guys
i made a data.yml file and my code is alot easier and cleaner!
What the helly?
hey, so I was wondering what the "official" (intended of the api) way of handling custom virtual inventory UIs would be with the bukkit api at the moment
Whatever you feel like
I've personally always used the InventoryHolder which I know is not intended by any means but I was still wondering what is the "go-to" official way of doing it is right now
the intended way is to use createInventory and then set it on a player
anything else is dependend on your goal
there is an article for inspirations on larger systems
?gui
So its basically remember the inventory in some map and go from there is what I get
in my own plugin I have a stack system where a player can have multiple menus open in a stack
eah
in my case its a map of uuid and list<MyInventoryWrapper>
and I show the top inventory in that list to the player
but just having a simple map of uuid and inventory is good enough
and then probably a central inventory listener that can pass the events to the inventory in question
I've recently seen the "new" InventoryView api for creating virtual views and was wondering if that may have introduced something else other than pushing stuff into a map and call it a day kind of thing
if it aint broke
supposedly at least on spigot the InventoryHolder approach is bad because getting the holder from an inventory will clone the backing tile entity if it's a block inventory, and that is very expensive
on paper you can pass false to the method to not clone it, but i don't think that exists on spigot
at least for inventories created with Bukkit.createInventory, the inventory identity is stable and reliable, so just a Map<Inventory, Handler> where Handler represents your business state for the gui, is sufficient
i see many people use UUID -> Handler/Inventory maps but that relies on accurate tracking of inventory opening/closing or else you'll be firing logic for the wrong gui on inventory click, which is why i've avoided this approach
all that said, imo, the performance ramifications on spigot aside, the InventoryHolder approach is the most principally correct
since it most closely resembles the relationship between a gui/menu and its state as already exists with vanilla block menus and containers themselves; the "holder" acts as the controller for the inventory state
Does anyone know how to make this hover effect? I know the yellow text is part of a font, but I don't know how it's rendered ONLY on hover. I'm not even sure if it's being rendered on hover or it's always being rendered but some rendering shenanigans cause it to show on hover.
core shaders perhaps, don't really know
WAIT
It could possibly be one of these https://minecraft.wiki/w/Items_model_definition#condition
What server is this ?
Nuvguard
is that a god damn battlepass
looks like it
since when are these a thing
1.21.4
Ye I sadly don't think there's an easy way to add "hover model"
I was misremembering probably
yeah can't find one in this list
it's most likely core shaders in that case
the "picked up" condition is quite interesting though
When cancel() is called in a BukkitRunnable, does it finish the iteration its currently in
new BukkitRunnable() {
int secondsRemaining = 5;
@Override
public void run() {
p.sendMessage("Time Remaining: " + secondsRemaining + " seconds");
secondsRemaining--;
if (secondsRemaining == 0) {
cancel();
}
}
}.runTaskTimer(this.main, 0, 20);
} ```
I doubt it, just do return under it
Thank you!
It will proceed through the rest of the method
So yeah, return if you don't want to execute anything after your cancel()
cancel is not a flow control statement like return, it has zero control over whether the current iteration finishes or not
it just makes it so that run won't be called again
Do you have any experience with Java?
omegalul
someone pay this man a full kangarko plugin dev course
fax
yo, i have this plugin for custom item drop from mobs
and is there a list of mob codename? cuz i tried ELDER_GUARDIAN it works, but when i try WARDEN and RAVAGER, it doesnt works or do they have a specific name?
?jd-s
should just be WARDEN and RAVAGER yeah
EntityDeathEvent.getDrops() is a mutable list, correct?
As in, if I change it, it will change the end result of the entity drops
that sounds weird
In death event you can add items, yes
You're thinking of BlockDropItemEvent where you cannot add items
Although to be fair, you probably should be able to. There's no reason you shouldn't
ah I see I was thinking of the wrong event
Alright thanks
how can i make a plugin that makes potions last longer so and i can configure it
You can either modify the effect on the itemstack itself via the PotionMeta or listen to the EntityPotionEffectEvent and change things there
for that i think you can modify the output with the BrewEvent
mojang please give us data driven potions already
Hey. So I am having this bug where I want to cancel item dropping. But if you drop the item from the inventory via the hotkey it duplicates for some reason. And I can't seem to find a fix. It works fine in all other scenarios however.
does the same happens while on survival?
No actually. Didn't test that. I suppose it's fine in that case. But it's still strange. And the behaviour is weird too because it always puts the dropped item into the currently selected slot.
Creative is a pain with inventory handling
the creative inventory behaves differently from survivals
I see
As far as I remember on creative the client generates items on its end
So you get the dupes
And messed up items
huh. strange
Especially noticable with dynamic lore
yeah i think it clones the item stack everytime you pick, drag or anything
I've made an enchant plugin once
That added the lore to look like vanilla
But using packets
However creative client could dupe the item and upon interaction the lore ended up not client side...
Because the client recreated it
Hope you understand
That's weird. I guess as long as you can't dupe in survival I can tolerate it.
Yupp creative = client does whatever client wants
Who am I to question the client?
good ole clientside creative experience
I usually just prevent interactions with my plugins if someone is in creative mode if there's fear of exploits, since the server I write code for has a limited creative option for groups
Do async tasks ran via BukkitScheduler or BukkitRunnable spin up new threads or do they reuse threads in a pool? This is all to ask if I should bother doing my own scheduling?
it is a single thread executor
Okay, thanks
actually, I am wrong
(I was looking at the paper source)
it is a cached thread pool
Ah, alright
Hey @smoky anchor sorry for the ping 🫣 I've been messing around with trying to get the texture working for the last two hours but it's just not getting anywhere :/ I'm stuck with the gorgeous undefined texture hahaha. I've changed up my folder structure a bit to get it to this point, but still, it's not working. I've tried to run it through ChatGPT and it's pushing to use CustomModelData instead of just ItemModel via the setItemModel() of ItemMeta. I'm spinning in circles here 😭 Any advice?
/**
* @return The Diamond Arrow.
*/
public ItemStack getItem() {
ItemStack item = new ItemStack(Material.ARROW, 1);
ItemMeta meta = item.getItemMeta();
if (Objects.nonNull(meta)) {
NamespacedKey key = new NamespacedKey(AranarthCore.getInstance(), "arrow_diamond");
meta.setItemModel(key);
ArrayList<String> lore = new ArrayList<>();
meta.getPersistentDataContainer().set(ARROW, PersistentDataType.STRING, "diamond");
meta.setDisplayName(ChatUtils.translateToColor(getName()));
meta.setLore(lore);
item.setItemMeta(meta);
}
return item;
}
lemme take a look
I mean, works for me XD
My guess would be that the namespaced key is wrong
NamespacedKey key = new NamespacedKey(AranarthCore.getInstance(), "arrow_diamond");
Can you do sysout of the key @wooden relic
girl what 😭 The universe hates my guts omg
The result should be aranarthcore:arrow_diamond for it to work
just gonna revert what I was trying and adding the sys out, gimme a couple mins!
Why tf is your Diamond Arrow crafted with prismarine lol :D
Also, I used this command to verify that the RP is correct
/give @s arrow[item_model="aranarthcore:arrow_diamond"]
And in the RP you sent, you can remove the minecraft namespace (unless you do plan to use it in the future)
It's another custom item! An arrow head that's crafted with diamond haha. Eventually I'm getting around to adding the textures for the arrow heads as well hahaha one step at a time 😂
Oh I see!
So the print displays exactly what you mentioned: aranarthcore:arrow_diamond
I still get the pink/black squares
do you... have the RP on ?
And the command yields the same thing
I'd assume so?
If you'd be open to it, I'd happily give you the IP so you can join and check it out as well? 🙂
I'd rather not
No problem c:
so, I tested this on 1.21.9, what version are you using
1.21.7
I thought maybe the version in the mcmeta was too old/new?
But I aligned it with the guideline correctly (I think?)
guideline?
The RP version should be 64, you have 48
But that is fine, it can still load
I'll try 21.7
welp
I think maybe the server isn't properly detecting the resourcepack, but there aren't any logs on my client side or the server showing any issues
ok fuck it gib ip
BAHAHAHA okok will pm you
Did you provide a resourcepack hash
That should't be needed ?
The SHA1? Yes hahaha
It's there to let the client know when the resource pack needs updating/if the integrity is fine
yes it's optional but having it set can be good in cases like this
to ensure that the pack the client is loading is correct and not damaged or outdated
I had it on client, the RP from server does in fact not owrk
Huh how did it fail to download? Downloaded fine for me .-.
Time to open the client log
Could you try and remove the cached version from the server resource pack folder in your clients installation directory
and see if it redownloads correctly
wait, we may have it now
you chatting in Minecraft now?
tldr: don't use github to host the RP :D
steve I'll deadass venmo you if this works
gl, don't have that
hahaahhaah
IT WORKED!!!
wahoo
my dude 🥺 How can I ever repay you
I just told them to use the mc packs hosting website
❤️ my hero
but fr I really would love to show thanks somehow hahaha you've taken a lot of time to help me out
welp uhhh here's my written endorsement!
~thanks @smoky anchor for being a huge help ❤️
hm
I have a weird one for forum staff
https://www.spigotmc.org/members/leocool3175.1989394/
What's going on here?
this guy copy pasted the same message on 84 different plugins
this exact message
well rip that guy
How do I prevent villagers from locking profession after a single trade?
What are you trying to do
300 words to say nothing at all
Trying to code a plugin which prevents a villager from locking their profession after a single trade
https://jd.papermc.io/paper/1.21.10/org/bukkit/entity/memory/MemoryKey.html#JOB_SITE you could try querying this on a schedule and see if it's still the correct block type, and if it isn't for n consecutive checks, reset the profession manually
alternatively try looking at nms to see what logic fires the profession change and try replicating it yourself but without the trading xp check
guys. I am making a plugin rn and I am currently using this code
@EventHandler
public void onInventoryDrag(InventoryDragEvent event) {
String title = ChatColor.stripColor(event.getView().getTitle());
String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
if (!title.equalsIgnoreCase(menuTitle)) return;
// Cancel any drag that touches the top inventory
for (int slot : event.getInventorySlots()) {
if (slot < event.getView().getTopInventory().getSize()) {
event.setCancelled(true);
return;
}
}
}
@EventHandler
public void onInventoryMove(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player player)) return;
String title = ChatColor.stripColor(event.getView().getTitle());
String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
if (!title.equalsIgnoreCase(menuTitle)) return;
// Cancel all click types in top inventory
if (event.getClickedInventory() == event.getView().getTopInventory()) {
event.setCancelled(true);
}
}```
for canceling movement in the GUI
but its not working
I am able to take out items of the GUI
Don't use the inventory title to detect inventories
?gui
for some reason buildtools just does not load for me. I have tried running it as administrator and closing background instances of it
What happens when you try to run it
Is there someone well known in making resource packs?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
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 OS?
windows 11
Aight then i wanted to make custom model data for a ender chest via blockbench, made model, made .json files, resource pack, but in game everything is not right
also version
Well idk how to really explain. I have my texture pack with these all .json, textures, etc hops on single player, block is invisible in inventory, when i place it down it appears as normal chest
Tried with datapack custom roleplay data and after using that my custom model data was only visible in a player inventory, when placed it appeard as regular ender chest
Also if u dont understand me i can use translator since english isnt my first language
Yes, you can not change the model of a placed block with custom model data.
custom model data can only be used for items
So lets say ill make server for ppl, which plugin or smth i need to use to get model of a placed block?
In theory to make custom blocks you would need to spawn item display entity that hides the actual vanilla block once it's placed
Alternatively, use the many redundant note block block states to render custom blocks, but this will require a bunch of protocol hacking and will impact gameplay for players without the resource pack
How to add data to NBT "components" without wrapping it around on "minecraft:custom_data"?
{
"id": "minecraft:gold_ingot",
"count": 1,
"components": {
"minecraft:custom_data": {
"components": {
"minecraft:tooltip_style": "lzblocks:tooltip/legendary"
}
}
}
}```
Tried alot of attempts using NBTAPI
```java
public static void giveTooltipGoldIngot(Player player) {
ItemStack goldIngot = new ItemStack(Material.GOLD_INGOT);
NBT.modify(goldIngot, nbt -> {
var comp = nbt.getOrCreateCompound("components");
comp.setString("minecraft:tooltip_style", "lzblocks:tooltip/legendary");
});
player.getInventory().addItem(goldIngot);
}
``` And for some reason it still wraps the data on "minecraft:custom_data":
Are you running a modded server
or client
actually nvm, the method you're looking for is just https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/meta/ItemMeta.html#setTooltipStyle(org.bukkit.NamespacedKey)
declaration: package: org.bukkit.inventory.meta, interface: ItemMeta
thought you were trying to define your own component there for a sec
you can't
items no longer have free form nbt data
items have components, which are closely tied into registries, and have a fixed range of state they can represent
anything that does not fall into the item components defined by mojang gets dunked into the custom_data component as raw nbt
if you want to change the values for actual item components that already exist, use the api
use the api method I linked?
thanks, ima test it tomorrow, I kinda messed up the gradle part
Hola necesito ayuda
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
And please in English
No abro inglés
skill issue
Soy chileno
fate worse than death
Te estan diciendo que digas lo que necesitas amigo
Ah he was banned uh ok
He was not. He left lol
can anyone code a minecraft server
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
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/
We ban people of different cultures here
It is possible with the new mannequin entity to add textures without a player profile? Using commands and a resource pack with a specific skin is possible, but idk if with the spigot api is capable of that
XD
based
looks like it is, with setSkinPatch
Entity e = location.getWorld().spawnEntity(location, EntityType.MANNEQUIN);
String name = "YourNPC";
String type = "npc-skin-name";
Mannequin mannequin = (Mannequin) e;
PlayerProfile pp = plugin.getServer().createPlayerProfile(UUID.randomUUID(), name);
PlayerSkinPatch psp = pp.getSkinPatch();
psp.setTexturePatch(new NamespacedKey("mannequin", "entity/player/wide/" + type));
pp.setSkinPatch(psp);
mannequin.setPlayerProfile(pp);
mannequin.setHideDescription(true);
Thank you for giving me a reason to update my code to use Mannequins instead of Villagers 😄
rip backwards compat
Is the mannequin the integrated equivalent of NPCs? I didn't even know this was going to exist, it's awesome
Sounds like a bad news for plugins/mods like Citizens or Custom NPCs, even though I suppose there are far fewer features. But this will allow us to implement it much more easily in our modern plugins which is great
it's only bad news for citizens if people stop using citizens, which i seriously doubt, reminder that it also offers a whole catalogue of features that a simple mannequin cannot, hell citizens even might start using mannequins for all we know and it'd be perfectly fine
true
Hey, I've been working on a logic and have come across an Issue:
The player is holding 2 diffrent items in his main and off hand. Both items are interactable (main hand loaded crossbow and offhand shield). I want it so while the player is in a certain state, the user cannot shoot the crossbow, but he should be able to block. The only way to cancel the crossbow shot without the crossbow losing its ammo, is by cancelling the right click interaction, but that makes it so i cant hold the shield.
Anyone have any ideas on how to do it?
You're kinda shit outta luck because it's client-sided behaviour determining which item should be interacted with. It sends the interaction start packet
I guess the only other option that might be worth trying is sending a cooldown for the crossbow to disable it, but I'm not sure if the client tries to use the offhand instead if the main hand is on cooldown
Or, as you said, remove its ammo. You can strip it of its loaded ammo and the ammo in the player's inventory if they have any, then re-add it when you want the player to be able to shoot. Not as pretty, but probably works
If the cooldown works though, that would be easier
it does, but by the time you apply a cooldown on the server, the client will have already determined whether it needs to use the crossbow or not
the client will not send an item use packet for the offhand if it expects the main hand item usage to be successful, so like, yeah
gl
Well, they said they wanted the player to be in a certain state. I took that as the state could be toggled at any time, not at the time of interaction
They just said their attempt was to cancel the interaction while the state was active
the wording of the question is certainly unclear
"while the player is in a certain state, the user cannot shoot the crossbow"
like, yeah, you don't need to use the interaction event for this, but they're still talking about the interaction event
choco
you are a nerd
tf
but you are my second favourite nerd
Who tf took my first place?
gf
Mine or yours?
Do we share the same girlfriend!? 
Ah okay. I was confused because the wording of your statement was certainly unclear
no
Hi, Could someone help me about this weird thing happening to me on my server?
Sometimes when im doing stuff on my server i get laggy and start to get like 3k+ ping for no reason, i went on other servers while that was happening and i didnt had any lag on those servers + did a speedtest which looks fine, so the problem isnt on my side. I tried resetting the playerdata of the server and checking spark profiler but there wasnt any problems too, so can someone help me about this annoying thing that doesnt even let me do my stuff on my server.
If your hosting provider uses AWS the News was saying that they're having all kinds of problems and outages today...
other players dont lag and the tps is fine
im tryna make a datapack where the warden drops a chirp music disk ill make a texture pack for it called ''warden heart'', but it isnt working PLEASE HELP 😭 IM LOSING MY SANITY 💀
Duno then
its not the first time ive seen this, extremely high Latency, only one server and only one player
the server side is fine im the only one lagging
So do you have any type of fix for it?
Thanks for the example, i had troubles finding any hint on how to do it :)
I kinda wish for mojang to use a more efficient way to use player skins in this way, instead of being dependant to a resource pack or the skin the player is using, something similar to how player heads are
i mean, you can do that too, no? the thing just works with a PlayerProfile
^
Yeah, but its a very tedious way to apply just a skin, i just want a more simpler way like a "id" for the skin instead of decoding a base 64 code for only that
wat
you still need to provide a profile for player heads
like, it's literally the same thing
I'm just saying nonsense xd srry
Hey! I'm creating a plugin for a tactical shooter in Minecraft and I want to add weapon recoil. Unfortunately, when I use teleportation, I can't move the mouse no matter what I do — even when I try something like player.teleport(coordinates, player.getRotation() + offset), rotating the player causes screen jitter and other issues.
I tried using ProtocolLib to add rotation instead of setting the player's rotation directly, but I'm not really sure how to do it, so I'm looking for help here.
You want to teleport the player with the relative teleport flags set
unfortunately I don't think Spigot has API for that, so you'll need ProtocolLib for that part
or Papers API if you don't plan on posting the plugin to spigotmc and are using Paper
ive got protocollib
I tried using ProtocolLib to add rotation instead of setting the player's rotation directly, but I'm not really sure how to do it
please 😭
ma'am, this is Spigot Plugin development channel
- what isn't working
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
can someone help me with that rotation? I tried everything but i cant figure it out
It works perfectly on 1.21.10 using the /rotate command (again, using the relative ~)
at worst you can just dispatch that
how this command works? can i add rotation to player with it? (NOT set rotation)
get the rotation and then add something to it?
yes, that's what the "relative" means
no, that's setting to last server known value - jitter
oh
I guess then it has a dedicated way to set relative angles
which is the relative thing you mentioned
when im trying to set player rotation like that: playerrotation + offset. it makes screen jittery
As I said you need to send the teleport packet with the relative teleport flag set
yes, literally what I said would happen
chatgpt send me this. But it doesn't work. it's just not doing anything
var yaw = 300f;
var pitch = -30.0f;
try {
Location loc = player.getLocation();
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_LOOK);
packet.getIntegers().write(0, player.getEntityId());
// Konwertujemy float (0-360) do byte (0-255)
byte yawByte = (byte) (yaw * 256 / 360);
byte pitchByte = (byte) (pitch * 256 / 360);
packet.getBytes().write(0, yawByte);
packet.getBytes().write(1, pitchByte);
PacketContainer headPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_HEAD_ROTATION);
headPacket.getIntegers().write(0, player.getEntityId());
headPacket.getBytes().write(0, yawByte);
protocolManager.sendServerPacket(player, headPacket);
protocolManager.sendServerPacket(player, packet);
} catch (Exception e) {
e.printStackTrace();
}
yeah that won't work
that packet is for other entities
Now try what I told you to try
probably wouldn't rely on chatgpt to fix your problems >>
what does it means its for other entities? I can rotate only mobs with that? Or i can rotate players but only other players will see this rotation?
please guys help
did you try what olivo told you to try
i dont know how i search for an half hour but i couldn't find how to use teleport packet
How do i make a player open up the command block gui and let thr player perform commands in that gui if possible.
What version are you on
The latest
And why the flippity flop my name is the conqueror
That's the name of your Spigot account
Alr thx!
That GUI is clientside so sadly you cannot forcibly open it
😭
Nuuuuuu
Ig ill explore a lil hehee
dialogs will probably do what you want
they support text inputs and with a bit of elbow grease you can probably reproduce the command block gui using them
Probably easier to just call the nms teleport method and let it handle the packet sending so server and client don't desync too much
Thx for giving me a hand. I hope i dont need nms for this bc shit is hard for a dummy like me
Nvm ima do nms and dive straight in
you don't need nms for dialogs, spigot has API for them
hello
guys how do i expose some methods from one plugin to another one? Because i tried a method I found onlin which does the following:
@Override
public void onEnable() {
instance = this;
getServer().getServicesManager().register(
BeaconomicsCoreAPI.class,
BeaconomicsCoreAPI.getInstance(),
this,
ServicePriority.Normal
);
...
And then In my other plugin, I am doing:
@Override
public void onEnable() {
instance = this;
RegisteredServiceProvider<BeaconomicsCoreAPI> apiProvider = getServer()
.getServicesManager()
.getRegistration(BeaconomicsCoreAPI.class);
if (apiProvider != null) {
api = apiProvider.getProvider();
}
....
But this doesnt work
when I reload i get:
Caused by: java.lang.ClassNotFoundException: com.swondi.beaconomics_core.BeaconomicsCoreAPI
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]
I had another way of doing this which was to compile a 3rd project containing just a interface and calling it let's say BeaconomicsAPI, then both plugins would import that .jar and use it like that, but I doubt thats a good way.
What you are doing seems very complex for the desired result. Maybe you can simply add the first plugin as a dependency on the second and access its methods from there? Do you have any reason to use a ServiceProvider specifically? But in any case, if you try to access the methods of the first plugin, you will have to add it as a dependency to the second one
Yeah i know it seems too complex even for me, but i added the plugin as a dependency, thats why intellij shows me the methods/classes that are in my Core plugin, but building it and reloading throws that error
Are you sure that your second plugin is loaded after the first one? You can ensure it by adding the first plugin to the depend section on the plugin.yml file
yeah thats already there
even without the registration if i just use BeaconomicsCoreAPI.createNexus() or createGenerator() it throws class not found
BeaconomicsCoreAPI is the name of the whole first plugin, or is a lib shared between both plugins?
okay my bad i fixxed it
BeaconomicsCoreAPI is just a file that exposes some methods from the BeaconomicsCore plugin
although i really f'ed it up since I already had access to everything about my Core plugin, so why did i bother to register stuff when I could just use it
thats the bad part of coding for 12h a day
take a break ahah
although I don't like that I can access all files in my Core library
im not really an expert with java, is the fix a package-private type of visibility
you can use private/protected in your core and public only for your api class
mh no thats not gonna cut it, the other guy who sent the gradle-related message was probably right
I'll stick with the build system to handle that
i tried module-info, thinking it was cleaner but it requires you to filter all the used libraries and not only decide what to export, and for some reasons it cant find some other APIs im using so, ill stick with maven
if it's for internal use only, it might not be worth spending time on it
thats why i just dropped the whole thing since mvn requires shading, which is incompatible with some plugins im using 🤣
what happened to the mojang mapping guide
?mappings
Compare different mappings with this website: https://mappings.dev/
wasnt there like a guide to set it up in maven
?nms is what you mean I assume
says site cant be reached
You can plop that into the wayback machine
I think someone asked some time ago if they could put this on the spigot forum, but not sure if anything came from that.
Doesn't look like it at least...
i also saw web archive that didnt work either
is the guide just gone
why
ask Alex, it's his website
Maybe his business is gone idk
https://web.archive.org/web/20250520100129/https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
This one should work
It's just really slow
kk ill sus
what
im too boomer to understand ig
um
for libs disguise after updating
cannot access com.github.retrooper.packetevents.protocol.player.UserProfile
on PlayerDisguise playerDisguise = new PlayerDisguise(target);
i mean i updated the dependency but this screams i have messed up somewhere
oh wait im missing packetevents
https://docs.packetevents.com/getting-started
this doesnt work in my pom
am i just using old out of date shit that just sucks now
what is "this"
show what actually is in your pom too
i just put
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
and
<dependency>
<groupId>com.github.retrooper</groupId>
<artifactId>packetevents-PLATFORM</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
in repos/dependencies
And did you actually read the instructions instead of just copy pasting
And where did you get 2.10.0 from
that won't get you far in this profession
You better learn to at least tolerate it
OH
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
<dependency>
<groupId>com.github.retrooper</groupId>
<artifactId>packetevents-spigot</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
</dependency>
stll doesnt work hold on
hm, seems like 2.10.0 is on modrinth
maven just says Unresolved dependency: 'com.github.retrooper:packetevents-spigot:jar:2.3.0'
did you refresh maven ? theres a button in the maven tab
assuming you're using intellij
welp that's the extent of what I can do rn
ye I did look into the wrong place, 2.10.0 is latest
and it doesn't have 2.3.0
so that's my bad, sorry
what is it telling you now ?
Unresolved dependency: 'com.github.retrooper:packetevents-spigot🫙2.3.0'
ye I made a mistake, set it to 2.10.0
its trying to compile rn
NG] Failed to download examination-api-1.3.0.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download annotations-26.0.2-1.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download adventure-key-4.25.0.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download packetevents-api-2.10.0.jar [https://hub.spigotmc.org/nexus/content/repositories/snapshots/]
[WARNING] Failed to download packetevents-api-2.10.0.jar [https://repo.md-5.net/content/groups/public/]
wait
ok.
anyway.
works ig.
🫙
I hope i dont need nms for this
you don't need nms for dialogs
No one said such thing as that
confused
Oh
My smol brain sorry
Lemme delete b4 anybody sees it
Uh oh
delete them too
Hey guys! I have just tried to download the bungeecord-config package from the maven repo but I don't think it's available?
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-config</artifactId>
<version>1.20-R0.1-SNAPSHOT</version>
</dependency>```
I checked the repo and only R0.4 and R0.5 were available
Yo wantet to ask smth i coded my own pl but in the gradel stuff rhe gradel.bat didnt generate what can i do
Sounds like you're using an installed version of Gradle instead of the wrapper
hello guys. I want to change player rotation (relative pitch) with packets but whenewer i run this script it returns an error:
Field index 0 is out of bounds for length 0
i dont know what i'm doing wrong so i'm asking you guys
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_POSITION_SYNC);
packet.getFloat().write(0, yaw);
packet.getFloat().write(1, pitch);
packet.getDoubles()
.write(0, loc.getX())
.write(1, loc.getY())
.write(2, loc.getZ());
packet.getDoubles()
.write(3, player.getVelocity().getX())
.write(4, player.getVelocity().getY())
.write(5, player.getVelocity().getZ());
packet.getFloat().write(0, yaw);
packet.getFloat().write(1, pitch);
packet.getBytes().write(0, (byte) 0x18);
try {
protocolManager.sendServerPacket(player, packet);
} catch (Exception e) {
e.printStackTrace();
}
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_TELEPORT);
packet.getDoubles()
.write(0, loc.getX())
.write(1, loc.getY())
.write(2, loc.getZ());
try {
protocolManager.sendServerPacket(player, packet);
} catch (Exception e) {
e.printStackTrace();
}
when i'm doing it like that it returns the same error
try TELEPORT
there is no packet "teleport"
POSITION I mean
okay
but who tf knows what that does, the enum has no explanation
not enum, class
whatever
is PacketType.Play.Server Server -> Client ?
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.POSITION);
packet.getDoubles()
.write(0, loc.getX())
.write(1, loc.getY())
.write(2, loc.getZ());
packet.getFloat()
.write(0, yaw)
.write(1, pitch);
try {
protocolManager.sendServerPacket(player, packet);
} catch (Exception e) {
e.printStackTrace();
}
the same error
just use nms man
but can i change player's relative rotation with that? (I dont know anything about it)
well ye, I forget what NMS actually stands for but it's basically just the vanilla minecraft server
get your player entity, cast to CraftPlayer, getHandle() to get the NMS Player object, that should have the teleport method with the flags somewhere
calling that should handle everything for you
including the confirmation packet which idk what that does
that's the right packet i think, now what's this error you're talking about
but yea plugging into nms might be easier
Are you just using GPT
he is I'm pretty sure
Hey all!
I am currently working on a (almost) one of kind realistic medieval (historical) minecraft server. We are pretty far in our development but have noticed we are lacking JAVA coders. Our coders have gotten more inactive over time. If you are interested in helping plz MSG 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/
no, it spigot does not have api for teleporting with relative flags
oh
net.minecraft.server
Very creative
it also means Non-modified source
ohh didnt know that
But we def modify it
sometimes, but I was just pointing out that NMS is definitely a term in the programming that it doesn't necessarily mean net.minecraft.server but can also mean non-modified source
maybe I should have made it more clear on that
but either way, now they know it has two meanings though
How do I upload plugins to spigotmc
I made one of my first plugins
and I rlly want it to be posted
Wrong chat sorry
i feel like in the context of minecraft plugins, it most certainly will mean net.minecraft.server lol
It’s obviously no mans sky
Is it possible to get Bukkit/Spigot for versions before 1.8? I see only versions after 1.8 are available on https://hub.spigotmc.org/versions through BuildTools. With the earliest build being 253
Where are builds 0..252?
Spigot did exist before 1.8, source: https://www.spigotmc.org/threads/1-4-6-update.230
No longer available unfortunately
Any reason why?
because of the bukkit fiasco
you can probably still find binaries on the internet archive perhaps, I know there were some cb builds there
Needless to say, if you somehow get your hands on a build prior to 1.8, it's not going to be supported here or practically anywhere else. You're wholly on your own
?howold 1.8
Minecraft 1.4.6 is 12 years, 10 months old.
that cannot be right
Release cycles were very quick back in the day
They slowed down with 1.8 until around 1.18
I guess if a whole release was just horses it was pretty fast to ship
yeah, that's when they started doing a lot more content in the updates
it kinda makes sense now how all I remember is 1.8 even though I actually started playing around 1.5, release cycle was so fast that I spent most of my time on 1.8 anyway lol
1.6 also brought the new launcher
it was a catastrophic hit for cracked servers/players
It is possible but requires a bit of work to get lol
Is there a particular version you were wanting?
the 1.6 launcher absolutely golden
ill never forgive mojang for the microsoft store launcher
can anyone code a minecraft server
Everything that’s possible to get, what’s the method? 😮
What do you mean 😭
like help make one
What do you want to make?
idon't need oone it is for my friend and i am just helping him try and get someone
It was the 1.6 launcher? 😭 I thought it would have stayed the same in 1.8 until 1.9
Nostalgic
yeah that
It was so simple
Today I always have to search for where I can create a new version profile 😭
yeah i just use prism launcher lol
havent used the official launcher in at least a year or 2 now
u can still access snapshots on most other launchers..
Unfortunately not with the clients I use like Noriskclient ig
Ok when i get home i will upload what i have then. I have like 3gb of craftbukkit versions
And spigot versions i will have to make
[00:17:03] [Netty Server IO #3/ERROR]: Error sending packet clientbound/minecraft:set_entity_data io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_entity_data' at net.minecraft.network.codec.IdDispatchCodec.a(SourceFile:61) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.codec.IdDispatchCodec.encode(SourceFile:14) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.PacketEncoder.a(SourceFile:26) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.PacketEncoder.encode(SourceFile:12) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.118.Final.jar:4.1.118.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.jav```
i havent used packetevents before. updating from like 1.17, have to use netty as a dependency for libsdisguise.
dont really know what could be causing this the stacktrace doesnt poitn to anything, any known ideas/known culprits? im gonna take a deeper dive into it but was just wondering
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.
i am sorry lord md_5
i have made quite a noobish and disgusting error
um, i am on my phone rn i will send it soon its more i have 0 idea why an API ive only just made a maven dependency is causing a client to crash i havent called it in my code, i guess my high level question is packetevents like hooking into spigot and doing something on its own accord or
also im self conscious and dont want to publicly share my repo bc i will be judged
me when im at the "being edgy as fuck" competition but this guy is my opponent
bro ive been around since i was like 10 i know hwo md5 is
i am showing respect to the goat
hehe
public void setGlowing(Player player, Entity entity) {
playerMapping.computeIfAbsent(player.getUniqueId(), key -> new HashSet<>()).add(entity.getEntityId());
entityMapping.computeIfAbsent(entity.getEntityId(), key -> new HashSet<>()).add(player.getUniqueId());
touch(player, entity);
}
it was this :3
the stacktrace isn't even complete and neither is the code
I'm trying to stop player-entity collision with Protocollib, anyone know what packet I need to be listening to?
Yeah that won't work great
The client predicts player movement, trying to block/modify certain packets would only cause visual issues
Instead use teams and place the entities you do not want to collide in the same team and disable collisions there
yeah but that will not work pre 1.13
not sure if anything will work pre 1.13 then, i don't remember if there is any way of disabling collisions apart from teams
that said i'm fairly sure i remember plugins disabling collisions before 1.13, so maybe it will work pre 1.13
welp Imma try doing it with teams and test it on pre 1.13 server, we'll how it'll turn out
It was added in 1.9
it didnt have anything in there
Team command != Team
Teams have existed for longer
Oh ok thanks
the team command was originally a subcommand of the scoreboard command
is there api function to make smth glow for a specific player only
you can set the Scoreboard, along with its teams, per-player with Player::setScoreboard
i'm not totally sure if that affects glowing beyond just the outline color, though
bro got hacked
affects everyone ig
just want one player only
im starting out again feel so noob
no, Player::setScoreboard affects only that player, that's why it's on the player object
but i don't know if being able to set teams and scores on a per-player basis is enough to to per-player glow
what are you trying to make glow specifically? if it's not another player or something similar, you could use the per-player entity visibility api instead and have the whole glowing entity only be visible to the desired player
um, just a villager
i just want their objective to be lit up
id probs prefer to do it with packetevents or protocollib but my protocollib solution disconnects the player bc its old... and was from 1.17
you probably have to do it with packet fucknuggetry then yeah
alternatively, i think libsdisguises might be able to do it for you
it supports setting entity metadata in the "disguise" properties, and does iirc support per-player disguises; so you could disguise the villager as itself, but with the glowing effect, only for that player
libsdisguises exists for a wide range of versions and is actively maintained, open source, and free
Hi,
I'm reaching your help due to development on intellij. I'm coding on spigot 1.8.8 and for some days, I have a problem on the spigot dependancy. This one can't reach bungeecord and I don't know why. Can you help me ?
[ERROR] Failed to execute goal on project UHCManagerAPI: Could not resolve dependencies for project fr.glerious.uhcmanagerapi:UHCManagerAPI:jar:1.0-SNAPSHOT
[ERROR] dependency: net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT (provided)
[ERROR] net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://jitpack.io during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of jitpack.io has elapsed or updates are forced
[ERROR] net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced
[ERROR] net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://oss.sonatype.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
i think the artifact got deleted from the repo at some point, 1.8 is older than many minecraft players at this point
It was removed when OSSRH was EOL:d
good to know
ill try that then yeah ty
You can still find it on the Spigot nexus in the public group
grap them there and manually install them to the maven local
or add that as a fallback repo in the maven config
is there a resource to like understand/read how to use packets
the mcwiki protocol page is a good start, but it doesn't match 1:1
that page + nms sources so you can see the actual fields on the packets is the way to go
they don't match 1:1 because the protocol page doesn't document the actual fields of the packet objects (which is what protocollib accesses), but rather the serial form of the packet
e.g. on the teleport packet, the field for the relativity flags is like an EnumSet<Flag>, but the serial form is a bitset
lowkey i need to stop coding so late at night bc i probs cant learn much
also need to stop doing stuff like 10 versions apart
i have this bug where like, NPCs i spawn in sometimes their Y coordinates are off, idk if it has anything to do with the fact that i just disable travel by overriding it but i cant seem to recreate it consistently it seems compeltely random. anyone have any ideas
Compare different mappings with this website: https://mappings.dev/
is remapped the same
which mappings you use isn't super important
what is is the fields the classes contain
if you use protocollib, that is
since it only cares about the field type
i.e. you get the n'th int field in a class
packetevents probably works the same, dunno
packetevents provides wrappers for everything so you're never working with the raw types like that
My hat doesn't work in ItemsAdder, I'm doing everything the same as with the previous hat that worked for me. please help
pls help
#help-server but I bet itemsadder has discord or other support, they will know better
ok
Don't make it, I want to know how to make it
You have a lot of the code in stash
Checkout the git commit history
how to make a timer for somone for something like jail time
do you need a timer, you can just store the time you put them in jail and then calculate the difference
Uh
how to make that timer
thats the problem
Would anyone here be willing to create a batch command execution plugin that communicates with the Fawe api?
I am willing to pay of course.
Basically I want a plugin that takes a file like a yml, containing a bunch of fawe commands, it then executes the commands in order, always waiting on a confirmation from fawe (an example would be waiting for a paste command to finish executing)
?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/
I uh, dont really want to make another account on another forum I will use only once. I really wish I could request this here..
i think fawe commands are queued naturally
so you could send them all at once and each will start as the previous one finishes
that being the case this would be simple enough for chatgpt to vibecode it for you
I dont want to do this because the paste commands can take up to 14 minutes to finish sometimes with my large paste volumes, so I would like it to actually wait for a success command, incase something happens and things fail, I know where it left off and it didnt just skip a single command and completely fuck everything up
I honestly just didnt really want to set up the environment to make a plugin because that would be the most time consuming task.
And chat gpt is kind of completely stupid in this regard, I already tried asking it fawe api related questions and it made up like 50% of the answers lol
yeah it won't be good enough for anything worldedit/fawe api related
mostly because they change everything every 0.2 versions and have the most unintelligible documentation
yup... Ive learned as much
to chatgpt's credit, most devs can't do it either
I was hoping I could just check for the debug comands FAWE leaves in the console after every command but sadly other plugins dont seem to have access to those
either way i don't think anyone here is really interested in providing services, you're probably best off creating an account and posting there
we can guide you on it if you want to write it yourself but doing things with fawe as your first project might be a tall order
?scheduling
i don't think ts is related to my problem
let me install intellij 😢
yyeah setting up the environment is a fucking nightmare because why would it be simple
jesus
Every single guide I see has a a completely different process, this is just silly lol
There are a couple different ways of setting up a project
with different pros and cons
you could definitely vibe-code 90% of it with codex or gemini code
but building is the annoyying part
that's what maven is for, you just click the package button and it gets built
setting up maven with the dependencies is the part where most newbies lose hope because it's not super intuitive and it doesn't feel like you're doing le coding
The Minecraft Development Plugin for Intellij can just do that setup for you if you're having problems
I tried it, just threw a bunch of errors mostly lol. Trying another method
🤔 what errors
?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/
Ah sorry my bad
Thanks that worked. I'm too lazy to test it on older version lol
There are many people who have worked on bukkit over the years
but if you want to go way back EvilSeph and Dinnerbone were major contributors during the early days
who started it?
I wasn't around back then so I have no idea how it got started
you just curious or are you trying to do smth?
Dinnerbone and grumm have some of the first commits iirc
yap
awesome first commit tbh https://github.com/Bukkit/Bukkit/commit/4e8311a6551e8d7794cff73c57a481251b47459c
ok, then I will wait till this weekend because I don't work on the weekends
Its a texture issue most likely
Some really weird things happen with certain folders and certain stuff as you move on from versions
Texture size
Wait a minute its pre 1.21.6 format or after and what is your version
Call me crazy but mojang does not know how to give an update without ruining every single thing, absolutely no foresight
1.21.4 comes suddenly decides to override item custom model data predication formats
Without offering a way to maintain previous formats
No warning just overriding
Disgusting
No if it was a texture issue it would have been the model without texture
What the hell are you yapping with yourself about? lol
Also, yeah, new versions add newer, more powerful features to resource packs. I don't understand the complaint. Do you want them to never make improvements ever and just prefer that everything works as is? There's a reason resource and data packs provide version ranges. It's not to look pretty. It's to denote that they support a specific format
Item model definitions are just an objectively better way to handle things over custom model data
bro is having a breakdown
icl it is getting confusing since they have been switching things up, but i think the compromise is good in exchange for a good DSL over so many features and so much customizability
thats also not true
new things are always announced in snapshots
u can find em also quite easily
So minor for something so major
i think major is very subjective
Custom model datas were a big deal for me personally
And it took a long time for tools and me to adjust
Yes i like it more but they shouldnt have overriden the prev one
i dont wna neglect ur work etc, but like, it lowkey should not take too much effort just re-designing to item model + new custom model data
Bruh
i mean its just to configure the item model
This definetly affected my server, I'm still on 1.21.3 rn
like supplying certain parameters to the item model
Yeah but you can have all sorts of parameters now
yea which is the point
Before it was just a number
But item model takes care of that, you don’t even need to override any vanilla jsons
I like to yap
- no conflicts
No but like what do you mean i have to do everything all over again is there really no way to have both?
I mean if u wna support multiple versions u'd have to use "both"
tho i dont see why u'd shoot urself in the foot like that
Nexo does that anyway
You don’t even need to redo anything json wise
There were many instances which i had to do everything all over again
Just add the item model tag to your items
Yes you do
There are 6 circles
For custom model data
i mean u may have to define new item model definitionss that point to ur item models
A new system was introduced
and that is in json
You should already have those if you were using the old custom model data
i mean depends on how old u date it back to
but u most definitely need to add new item model definitions
esp if ur migrating to where they added those
What im saying is isnt it nice to have a resource pack or something from 1.11 that still works on modern versions alongside all of those cool things?
depends
Just like how a 2010 exe file still runs
minecraft is in the works of making things like substantially data driven
Though EVERYTHING has changed
i mean that very much depends on what file
and like cyrus, for regular players things do work when u update from an old version to a new version
which is like the biggest audience of minecraft
Windows is built on supporting older stuff i dont remember the strategies name
Really?
My 20 year old game still runs
Your 20 year old game is not in fact ever single program ever made
They mostly do dont they?
na
😭😭😭
depends hugely on what program
ofc its nice if legacy stuff work on long dated future versions
There’s an xkcd for this
I think its not that hard to do but its not cost effective to maintain
Lmao
lmao
I mean i think it hugely depends on ur audience
like business requirements and goals specifically
Idk what hes trying to do but i understand his struggle
and they change all the time
Im just complaining that everything breaks all the time and i have to fix it thats it ;(
Its bothering
yea i suppose
Its like playing catch up with mojang
i think the benefits long outweigh the drawbacks
Wait until you write mods
They dont even care about modders/multiplayer anyway
ye no api
i mean they kinda do
thats why they add so many new features and ability to customize
Its not a primary concern
?
For them
id want to disagree
Look like roblox
“Oops Mojang changed the render pipeline… again”
its a primary concern no?
Is a multillayer gane
just look how much stuff they add for modders etc?
But minecraft is a singleplayer with the ability to play online, sometimes in servers, big difference
roblox is different
its a really odd comparison given how different the games are if u think about it or more should I say platform vs game
Its not a "multiplayer game" we just made use of it that way
Ummm
Theyre alike in many ways tho
they are unlike in many more ways tho
i mean yea but that doesnt really relate to them not concerning themselves about modders and customizability for like datapack and resourcepack makers
and like this statement is just outrageously untrue
Mind blown
Therefor same game, case closed
blox = blocks 😭
I had a fuckton of monster energy drinks and coffe together maybe thats why im yapping so much
Im usually quiet
It was mariposa
Idk i work a lot with resource packs
And with each update
It seems like mojang personally hates me😭😭😭
Also a problem is
People try to join with 1.20 for some reason
And
I cant really make sense to why should ttf font interpretation differ so much from 1.20 to 1.20.4 to 1.21.1 to 1.21.4
I think people usually dont concern themselves with resource packs or at least the parts that i have problems with that much?
i suppose
i mean yea ppl developed a set of hacks from resource pack
and ofc they might break as updates go on
If i truly speak my mind people will lock me in a room
I always try to conceal my thoughts from the outer world
But sometimes... I fail

What timezone is used on https://hub.spigotmc.org/versions/ for the build dates?
UTC probably
That page is a nightmare though
Gonna have to strip all the non-version builds out or something
Why?
I think I know what you're saying
0.0.0 <> 0000
Damn even you aren't 100% sure 😭
Why is there not a better system then? 🙃
Also how does the -a versions work? these were built at very distinct times, but refer to the same version number for some reason
They're hotfixes of a superseded MC version
Hello! I am making a custom magma cube but I get an error when I extend the EntityMagmaCube class. I don't fully understand it so I'll just paste the whole thing with my code. The thing is, I don't use the method it's talking about anywhere in my plugin
https://pastes.dev/T11UanLvlY
I do not know why it's talking about slimes :/
I do have a custom slime class but it's totally separate
... MagmaCube extends Slime?
I had that o: but when I went to spawn it I got a different error
Hang on I'll paste it
Can you help me understand what that means?
Then I might be able to figure it out
So if I want build number 1573, I should use 1573-k? because 1573 .. 1573-j have bugs?
Why do you want a specific build number
What do these numbers #0000 reference on the bukkit branch commit?
- https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/4ece6d0e2f14bb5717e7472011785fda5d9fd5a1
- https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/24fbb46243bc3a44cd690657b4d1bc5c9c0ca562
- https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/d8d04ae927d7d5ceb859007cfe48cf0d9b2d2ca2
I don't, just want to understand how the build versioning works
Those are pull request numbers
Ok so I'm telling the plugin I want to spawn a magma cube, but when it goes to get the custom magma cube it returns slime and gives me that error. How can I fix that?
wtf is method l()
what
some nms method. does something different depending on the class
imagine not using mojang mappings
absolutely unreadable, no wonder the code doesnt work xD
rawdogging nms as god intended
Im using nms but fsr it says ClassNotFoundException: net.minecraft.network.chat.Component
Ill send photos in a sec
How did you add the nms dependency
Hollon sending thw photots!!11!!
I hope you're not sending text as images
Too latte
Hm?
Looking to paste something? Try a code block or one of the following websites:
- https://pastes.dev/
- https://sourceb.in/
- https://mclo.gs/ (best for server logs)
is anyone good with creating custom minecraft powers
yeah missing remapping
yep, missing remapping
https://web.archive.org/web/20250520100129/https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/
If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of �1.20.4� with the version you actually use. What are...
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
Love how bots can just reply for u lol
i’m just look for someone that is capable of creating powers, mainly based off of lighting, using custom textures, that sort of thing
Do you want them to create the powers and stuff?
?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/
Then
omg thank you
Which part am i really missing?
the specialsource-maven-plugin
which you can see in the link I provided
Thx!!
Why are there certain builds that use the same exact commits? Are those mistake duplicates? Or is there another reason in particular / purpose?
I guess something changed in the ci since the hashes are different
though since that's not public its a bit hard to know 🤷♂️
What do the hashes mean/represent/are for?
Not sure, they're not used by BuildTools as far as I can tell
Are you trying to open it for player ?
Somebody said recently that it's client sided menu and it can't be opened from server-
i requested them for a project i never ended up doing, theyre just the hash of the builded server jar
builded
neat
So if the commits are all the same, what could possibly have changed in the built jar? o_O
As I said something about the ci
Any ideas what it could be or who would know?
md would probably know
(there is a 99% chance it doesnt matter to you)
and iirc the jar has timestamps in of when it was built so that would change the hash
Ye
Ohhh
Yo mb : D
Also I'm not sure how versions work when there's no Minecraft server side update like 1.21.9 to 1.21.10. Using BuildTools --rev 1.21.9 it still produces 1.21.10 jar. On https://hub.spigotmc.org/versions you can see that:
1.21.9.json = 1.21.10.json = build 4543, however the "Update to Minecraft 1.21.10" commits were at build 4541, so why is it not that:
1.21.9.json = 4540 (4541 - 1)
1.21.10.json = 4543
that someone being me
I'm particularly curious, because I know there's no difference between 1.21.9 and 1.21.10 except Spigot patches that support both versions, but this can cause confusion and this issue that points out that it changes the version number in the jar can lead to some issues with plugins: https://hub.spigotmc.org/jira/browse/BUILDTOOLS-734?focusedId=58705&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-58705
is there any reason you actually need this info? eg, 1.21.9 was superceeded with 1.21.10 so there isnt really ever a need for 1.21.9. this entire situation seems xy
bro has been asked like 10 times why they need all this information and hasn't dropped a word of it
I couldnt find any ways to open it and thx to gpt now i am stuck with some garb
Stop laughing grrrr !!!
id 'java'
}
group = 'me.vesder'
version = '1.0'
repositories {
mavenCentral()
maven {
name = "spigotmc-repo"
url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/groups/public/"
}
}
dependencies {
compileOnly "org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT"
}
def targetJavaVersion = 8
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release.set(targetJavaVersion)
}
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find net.md-5:bungeecord-chat:1.12-SNAPSHOT.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
- https://repo.maven.apache.org/maven2/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
- https://hub.spigotmc.org/nexus/content/repositories/snapshots/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
- https://hub.spigotmc.org/nexus/content/repositories/snapshots/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
- https://oss.sonatype.org/content/groups/public/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
- https://oss.sonatype.org/content/groups/public/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
Required by:
project : > org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT:20180712.012057-156
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
add the public spigotmc repo https://hub.spigotmc.org/nexus/repository/public/
should™ be on there
it is on there
Uhh
I still cant do the thing so ima ask
Is it possible to open a command block.
Could be in anyway since i dobt have any options anymore
No u cant
haven't you been told that it's clientside and that you can't
like several times
i remember telling you that your best bet might be to replicate it with a dialog
Alr ig
I give up, ill try out that
Also why are there missing build numbers / gaps sometimes? Like 3659 does not exist in-between 3658 and 3660
probably a failed ci build
im tryna make a plugin where the warden drops a chirp music disk ill make a texture pack for it called ''warden core'' BUT IT ISNT WORKING PLEASE HELP 😭 ive been trying for 3 hours im losing my sanity 💀
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?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.
oh thats a new one
im using
import org.bukkit.craftbukkit.v1_20_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;
but i updated to 1.21 and now these classes cant be found - how do i make a plugin backwards compatible?
oh okay thanks