#help-development
1 messages · Page 1199 of 1
I can name few of them, custom model data to define the "textures" of certain item, persistent data containers.
?pdc
In 1.21.4 it's even crazier with food components, etc.
Basically you can make any items consumable
oh wtf
Resource packs are like the coolest shit ever
you can make custom shaders, fonts, textures, models, everything
Eat the sword
oh wow
shame I'm terrible with graphic design
so PDC is like a database? for storing plugin data
kind of, not really
PDC is more or less used to add your own metadata to items and (block)entities
you should not store bulk data in here
Yes, kinda like nbt tag
if you're making custom items for example
and you wanna add functionality to them
you could just add that functionality by matching the item exactly on your custom definition, but that's not smart
Also many developers decide to store data on the lore previously, you can now use pdc for that
Previously comparing item it would compare display name, lore, etc
Now we can use pdc to compare it, less breaking
like checking a right click of an item
less breaking and less intrusive
u would check the pdc
prevents you having to add lore you might not want there
not the name & type or smth
The craziest thing is the components, there are tons of new components on 1.21.4
ye I gotta check this out it seems crazy
I remember when PDC dropped and people were going crazy I was just a 1.8 user so I never learned it
components are great but there aren't all that many new ones on 1.21.4 yet
at least not exposed by spigot
1.14
oh sorry
misread
all good lol
is this it? https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/meta/components/package-summary.html
declaration: package: org.bukkit.inventory.meta.components
also just wondering too is there util plugin people use? I know lucko's helper was popular a long time ago but idk what people use now
I have a problem that I want to create an interaction entity and a display item but... I don't know how to do this
private static final String[] playerHeads = {
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWZmYjlmM2FhMWQxYmU5NmNhY2U3OTU3NGU3MmZiMzFiNjQ2Y2I2YTJkMTkxMDFlYTEyN2Y5MjBlZmUwOTkifX19"
};
double x = parseCoordinate(args[0], player.getLocation().getX());
double y = parseCoordinate(args[1], player.getLocation().getY());
double z = parseCoordinate(args[2], player.getLocation().getZ());
String worldType = args[3];
World world = player.getWorld();
int headIndex = Integer.parseInt(worldType) - 1;
if (headIndex < 0 || headIndex >= playerHeads.length) {
player.sendMessage("Invalid head type. Available types: 1, 2, 3.");
return false;
}
String texture = playerHeads[headIndex];
org.bukkit.entity.ItemDisplay itemDisplay = (org.bukkit.entity.ItemDisplay) world.spawnEntity(player.getLocation().add(x, y, z), org.bukkit.entity.EntityType.ITEM_DISPLAY);
itemDisplay.setItemStack(new org.bukkit.inventory.ItemStack(org.bukkit.Material.PLAYER_HEAD, 1));
org.bukkit.inventory.meta.SkullMeta skullMeta = (org.bukkit.inventory.meta.SkullMeta) itemDisplay.getItemStack().getItemMeta();
if (skullMeta != null) {
GameProfile profile = new GameProfile(java.util.UUID.randomUUID(), null);
profile.getProperties().put("textures", new Property("textures", texture));
skullMeta.setOwnerProfile(profile);
itemDisplay.getItemStack().setItemMeta(skullMeta);
}
its pretty diversified
Yes
wait really i didn't know
please help
?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.
Also, some little formatting would not hurt anyone, your code lacks indentation and is really difficult to read.
there are no errors and I sent the code where the entity is not created without errors there
there's a ds limit(
?paste
for longer code
what are imports
Google "guard clause", it reduces this ugly if-else chain.
Follow java naming conventions, classes start with capital letter.
Is your command actually executing ?
Do you have it registered and is it in plugin.yml ?
org.bukkit.entity.# why, just import it.
commands:
makingGift:
aliases:
- mg
usage: /makinggift <x> <y> <z> <type>
and where do you register it ?
usually it is in onLoad
public void onEnable() {
// Plugin startup logic
getCommand("makingGift").setExecutor(new makingGift());
}
player.getLocation().add(x, y, z)
Are you inputting xyz as absolute values when you're running the command ?
'cause that won't work in your case
I can't create an entity
you won't be able to create an entity if you're trying to spawn it in unloaded chunks
I create loaded chunks
I still don't think the coordinates are correct
If you were to input /cmd 123 64 123 idk
And you were standing at 123 64 123
The entity will be created at 246 128 246
The same would happen with /cmd ~ ~ ~ idk 'cause again, you're adding the xyz to current player coordinate
Try to create new location instead
hmm
i send coordinate
player.sendMessage("Coordinates: X=" + x + ", Y=" + y + ", Z=" + z);
player.sendMessage("World Type: " + worldType);
This may print the correct coordinates, but you're still adding them to player coordinates when you execute spawnEntity
And you're not printing that
Also where's the import for it?
well, I also tested with teleporting the player to the position, everything is fine, but the entity is not created because I don’t know how to normally create these display entities in them and there is probably a problem, there is simply no normal information on the Internet or I don’t know how to google
ECJ 🔥
true I was also thinking that 💀
replace world.spawnEntity(player.getLocation().add(x, y, z), org.bukkit.entity.EntityType.ITEM_DISPLAY);
With world.spawnEntity(new Location(world, x, y, z), org.bukkit.entity.EntityType.ITEM_DISPLAY); and see if that does anything
And fix your imports
im too lazy to check whats your problem, so give me 3 words of what youre trying
attempting (to) summon entity
create display item and interaction
first of all, you cant interact with an display entity
Try spawning a pig instead of a display entity, just as a test ?
Assuming you fixed the thing I told you it should spawn a pig
Guys, I'm making launchable fireballs, but they collide with the player instantly after getting spawned. What are some possible fixes for this? Can I make it not collide with the player somehow?
either cancel the event or spawn it infront of the player
okey
Which event do I cancel
i just checked, you cant. it would just cause that it doesnt explode - but still vanishes
just spawn it infront of the player
Interestingly, summoning a fireball with a command does not make it explode right away. So there must be a trick to it.
Player#launchProjectile
elgar coming to the rescue
side note: this is probably one of the things launchProjectile method does
nc
Did I make a mistake in my Maven setup? I can't see it.
https://gist.github.com/Pilvinen/634a3256900ce47e0c119487716d0fdc
https://www.spigotmc.org/resources/gsit-modern-sit-seat-and-chair-lay-and-crawl-plugin-1-16-1-21-4.62325/field?field=documentation
Unresolved dependency: 'com.github.Gecolay.GSit:core:jar:LATEST'
replace LATEST with an actual version
That seems to have fixed the issue.
I'm very casual Java user. My preferred language is C# and - all this Java dependency wizardry is out of my scope.
Why does this suddenly not work anymore?
gradle deps are a nightmare, i hate them
you have maven if you prefer
Why does this suddenly not work anymore?
what doesnt work
It used to work fine with the LATEST.
And it's also what the GSIT docs recommend doing.
if hes pushing both to the version and to a "latest" version then he either forgot, removed it or moved the repository
I don't know anything about Maven - or Gradle - I just copy paste this weird XML in my my pom.xml so I can do some coding.
I did link it above #help-development message.
https://jitpack.io/#gecolay/GSit
if i had to guess, he removed it for whatever reason
iirc it was changed
im not sure, but maybe try latest.release or latest.integration
wouldnt that show here?
yes
but its -SNAPSHOT
and for the latest commit, not release
Also. I'm having real trouble trying to find DiscordSRV plugin API. Does it even exist?
you can't get it just from the texture url, you need to get the player profile from the profile api endpoint, that will include the signature and that url you sent in the profile's properties
https://sessionserver.mojang.com/session/minecraft/profile/3fcaa1ec552248d6bfee793f4afb7e9b then why doesn't my very own skin include the signature?
because you didn't pass the unsigned=false param
like the wiki page i linked mentions
so is there any point of there being a textures.minecraft.net?
to get the actual texture image
the profile property contains the signature and the url to the texture
its just gradle that supports latest status so to speak
doesn't the value and signature already allow a manual decode?
ah
nice
also, paper's FlushConsolidationHandler is ruining my day
I try to send a packet after transferring the player to the very same server with a transfer packet
and he just keeps on connecting...
cuz nuh-uh
I do a bit of black magic under the hood
but c'mon
welp, I guess modifying the pipeline it is
not gonna do channel.unsafe().flush() every single time a login packet isn't sent
I need a professional plugin developer. I'm gonna pay...
?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/
has anyone ever used MockBukkit? i am having issues of it saying Game Version not set, as i see from the issues i see the problem is because of paperweight, is there i way i could exclude it from testing?
idk if its actually the best idea to ask here for paperweight after the hard-fork, lol
me when I mock minecraft
minecraft me when mock i
hello
how can I modify the .jar file inside my resource on spigotmc.org??
She mock my minecraft till I publish
you mean posting an update?
yes, but in the sense that I can replace my previous .jar file
you dont replace it, you upload a new one
and how?
try that
or how to can i delete my full resource?
Is there something wrong with the jar you uploaded?
Like does it contain something you really need to get removed
if not just post an update
You can delete specific updates if there's a newer one afaik
hm yeah looks like it
I uploaded the wrong file, a completely different one than what I wanted
or one of the versions of my project, only that part doesn't work and I accidentally uploaded it
Post an update and delete the old version
How to solve problem that my plugin freezes when i am creating a new world with that
I just want to make the same world same seed for players but if someone is creating a new one then plugin freezes for few seconds
I wonder if bounding box positions are usually calculated on the gpu or the cpu side
i guess its needed for collision so it should be computed on the cpu
no?
I think ur doing it on main thread
Try doing it in a scheduler runTask or runTaskAsync
yes
runTask will be on the main thread
Also I don't think it's supported doing it off the main thread
how to set the size for the interaction entity?
You can calculate them on the GPU if you want to
yea but then you need to do branching
and we all know that's not what you want on shaders
i will calculate them on cpu probs. im making my own trashy open gl game engine using lwjgl
where 2D sprites are being rendered using entity component system
its going to be slow af, but who cares
new Entity().setComponent(new Sprite("assets/tank.png'))
and then OpenGL renderer loops entities on each frame and checks if entity has a Sprite.class component. if it does it renders a quad and applies a texture from provided file path
that's very inefficient, but overall renderer is being decoupled from the game itself, so there must be penalty anyways
but oh well
i need to calculate bounding boxes because i have Position, Size and Rotation components, so they're going to be used for calculating collision between sprites and for calculating quad vertice positions
please help me
we cant help if you dont tell us what you need help with
How do I set the size for an interaction entity I have a simple code that creates it
Location loc = new Location(world, x, y, z);
Interaction interaction = (Interaction) world.spawnEntity(loc, EntityType.INTERACTION);
declaration: package: org.bukkit.entity, interface: Interaction
OMG
what?
its okay
sps
hello! I'm making a minecraft plugin and with a gui, when you type /uzinomanage <player> it will appear a gui where you can freeze, unfreeze and kill the player, the kill functionates but the freeze and unfreeze doesn't, is there anyway i can fix it?
we need ur code
i dont really know, i dont know what u are doing in ur code
we need to see everything relevant to ur problem
the listener
i entered a stupid code
it's just target.isFrozen()
package me.uzinoh.uzinomenu.listeners;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
public class MenuListener implements Listener {
private final Set<Player> frozenPlayers = new HashSet<>();
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
if (!event.getView().getTitle().equals(ChatColor.GOLD + "Gestisci i giocatori.")) {
return;
}
event.setCancelled(true);
if (event.getCurrentItem() == null) {
return;
}
Player player = (Player) event.getWhoClicked();
Player target = Bukkit.getPlayer(event.getView().getItem(22).getItemMeta().getDisplayName());
if (target == null) {
player.closeInventory();
player.sendMessage(ChatColor.RED + "Il giocatore selezionato non è più o non è mai stato online!");
return;
}
if(event.getCurrentItem().getType() == Material.RED_DYE) {
target.isFrozen();
player.sendMessage(ChatColor.RED + "Sei stato freezato da uno staff!");
} else if(event.getCurrentItem().getType() == Material.BLUE_DYE) {
target.isFrozen();
event.setCancelled(true);
player.sendMessage(ChatColor.GREEN + "Sei stato unfreezato da uno staff!");
} else if(event.getCurrentItem().getType() == Material.IRON_SWORD) {
target.setHealth(0);
player.sendMessage(ChatColor.RED + "Sei stato ucciso da un membro dello staff!");
this is the code
so isFreeze() checks if the player is frozen and doesnt freeze him + with freezing its meant when a player dies in powdered snow
i think with freezing you mean stopping them from moving
okay
what code can i use?
there is no quick solution for that
wdym by quick solution
there is no code that you can use
how
you have to make it urself
how do i connect the code to the listener
what?
i mean, if i make a code in another class, how do i connect it to the listener
ur listener is a class, you can use dependency injection or create an instance of you other class
if you are having trouble with java, i would recommend watching yt videos
so basically the simplest way to "freeze" someone is just to put their walkspeed to 0
Ye
And prevent moveevent
Because they can jump and move that way
Event set to event get from does it
what if i do Player.moveEvent event.setCancelled(true);
you need to only cancel it for the player
I don't know what that did exactly
I always used the way I said earlier
Should work I think 🤔
how do i do that
Don't detect inventories by their name 💀
wait wait
inb4 someone renames a chest and starts freezing people
?gui
you don't know how to create a display item and hang a head on it and a texture for the head? Can you send display item link
you can find the links yourself by searching whatever you need and then spigot docs at the end
hmm
what if i exploit function arguments for compile time safety for array elements..
surely for small amounts its not bad
what exactly do you experience an issue with? (also is this Java?)
Hey guys, I have a problem with my code. I'm making an item store with JSON storage, but I have an error in a part of my code when returning the price in a message.
public ItemModel fromItemStack(ItemStack item) {
ItemMeta meta = item.getItemMeta();
if (meta == null) return null;
ItemModel.Builder builder = new ItemModel.Builder()
.material(item.getType().name())
.amount(item.getAmount());
if (meta.hasDisplayName()) {
builder.name(meta.getDisplayName());
} else {
builder.name(formatMaterialName(item.getType().name()));
}
if (meta.hasLore()) {
List<String> lore = meta.getLore();
if (lore != null && !lore.isEmpty()) {
// Asumimos que la primera línea es la descripción
builder.description(lore.get(0));
// Buscamos el precio en el lore
for (String line : lore) {
if (line.startsWith(ChatColor.GOLD + "Precio: ")) {
try {
String priceStr = ChatColor.stripColor(line.substring(9));
double price = Double.parseDouble(priceStr);
builder.price(price);
} catch (NumberFormatException e) {
logger.error("Error parsing price from lore", e);
}
}
}
// Añadimos el resto del lore
for (int i = 1; i < lore.size(); i++) {
if (!lore.get(i).startsWith(ChatColor.GOLD + "Precio: ")) {
builder.addLoreLine(lore.get(i));
}
}
}
}
return builder.build();
}
}```
private void handleItemClick(Player player, ItemStack item) {
ItemModel itemModel = plugin.getItemConverter().fromItemStack(item);
if (itemModel != null) {
// implementar la lógica de compra
player.sendMessage(ChatColor.GREEN + "Has seleccionado: " +
ChatColor.WHITE + itemModel.getName());
player.sendMessage(ChatColor.GREEN + "Precio: " +
ChatColor.WHITE + itemModel.getPrice());
}
}
}```
in the json file it is saved like this
[
{
"name": "Pene",
"amount": 1,
"description": "Item dirt",
"price": 0.0,
"material": "DIRT",
"lore": []
},
{
"name": "Lananana",
"amount": 2,
"description": "Item wool",
"price": 0.0,
"material": "WOOL",
"lore": []
}]
and it gives me an error
could someone give me a suggestion?
[14:29:46] [Server thread/ERROR]: Error parsing price from lore
java.lang.NumberFormatException: For input string: "0,00"
at jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054) ~[?:?]
at jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:?]
at java.lang.Double.parseDouble(Double.java:944) ~[?:?]
at me.manolo.ShopJs.utils.ItemConverter.fromItemStack(ItemConverter.java:86) ~[?:?]
at me.manolo.ShopJs.manager.InventoryManager.handleItemClick(InventoryManager.java:118) ~[?:?]
at me.manolo.ShopJs.manager.InventoryManager.onInventoryClick(InventoryManager.java:109) ~[?:?]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
is that the entire config?
the error is saying there is something in the config you haven't shown us
if (line.startsWith(ChatColor.GOLD + "Precio: ")) {
try {
String priceStr = ChatColor.stripColor(line.substring(9));
double price = Double.parseDouble(priceStr);
builder.price(price);
please for the love of god do not do this
use PDC to store data
@EventHandler
public void onInventoryClick(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player)) return;
Player player = (Player) event.getWhoClicked();
if (activeInventories.containsKey(player.getUniqueId())) {
event.setCancelled(true);
ItemStack clickedItem = event.getCurrentItem();
if (clickedItem != null && clickedItem.getType() != Material.AIR) {
handleItemClick(player, clickedItem);
}
}
}
private void handleItemClick(Player player, ItemStack item) {
ItemModel itemModel = plugin.getItemConverter().fromItemStack(item);
if (itemModel != null) {
// implementar la lógica de compra
player.sendMessage(ChatColor.GREEN + "Has seleccionado: " +
ChatColor.WHITE + itemModel.getName());
player.sendMessage(ChatColor.GREEN + "Precio: " +
ChatColor.WHITE + itemModel.getPrice());
}
}```
?pdc
looks like 1.8 code
PDC back then didnt existed
newer versions use chat components
spigot users don't
no
is 1.8
good luck
its paper that force components, you can use components on spigot but most people dont still
im so used to paper's adventure that i didnt knew spigot still uses strings for text
you barely can
you can use bungee components in some places
still waiting on that pr @worldly ingot
paper is right and spigot should've done that ages ago
it might happen one day
i think 1.8 introduced chat components natively in nms
or smth
its been so long
public void setMatrixUniform4(final CharSequence name, boolean transpose,
final float value1, final float value2, final float value3, final float value4,
final float value5, final float value6, final float value7, final float value8,
final float value9, final float value10, final float value11, final float value12,
final float value13, final float value14, final float value15, final float value16
) {
GL33.glUniformMatrix4fv(this.getUniformLocation(name), transpose, new float[] {
value1, value2, value3, value4,
value5, value6, value7, value8,
value9, value10, value11, value12,
value13, value14, value15, value16
});
}
cursed code
this looks cursed, but it can really provide type safety at compile time, not allowing to pass bigger or smaller arrays to opengl state which expects 4x4 matrix
but i think i should remove it 😄 because that's way to much
🤢
but hear me out
you can get this compile time safety without any runtime checks
at the cost of ugliness
this kind of exploitation reminds me of SFINAE from CPP traits
"in an ideal world we would be able to encode the size in an iterative type" - probably nobody
in c, cpp we have fixed sizes array references
i mean yea
too bad java doesnt have it
but its only as safe as u respect it to be though unless u go super strict
i means probs impossible due to how array live on heap
for example haskell has this kind of type, but enforces it (which ig is comparable to strict)
does any1 know an image that shows as an example what all of these mean? like for example what happens if i increase x on leftRotation
these are the values which are being applied to the matrix as transformations. basically by altering these vectors, you be able to scale, translate and rotate something
if i had to guess
thank you for the brief explanation, do you know any image having a visual representation of all of these?
scale is pretty obvious, but what does left and rightrotation do
They're both rotation, it's just when the rotations are applied
Patreon ► https://patreon.com/thecherno
Twitter ► https://twitter.com/thecherno
Instagram ► https://instagram.com/thecherno
Discord ► https://thecherno.com/discord
Series Playlist ► https://thecherno.com/opengl
Thank you to the following Patreon supporters:
- Dominic Pace
- Kevin Gregory Agwaze
- Sébastien Bervoets
- Tobias Humig
- Peter Siegm...
this is not really related generally
but it explains it kinda great
okay
iirc right rotation applies first (is the initial rotation), then left rotation applies after the scale and translation
ok
Wouldn't quote me on that, but I believe that's the difference lol
okay
I was close. Right rotation first, then scale, then left rotation, then translation
That's how Mojang has it defined
I guess more accurately, how Minecraft has it defined
Translation is just changing position along the x/y/z axis, rotation is rotation around the center of the model, and scale is size along the x/y/z axis
new Transformation(
new Vector3f(0, 1, 0), // Translates the model up by 1
new AxisAngle4f(Math.PI, 1, 0, 0), // Rotates the model by 180 degrees along the x axis (flips upside down)
new Vector3f(2, 2, 2), // Scales the model by 2x on each axis
new AxisAngel4f() // Confusingly, the first rotation to apply, but do nothing here. Angle = 0
);
thank you
We should really add some Javadoc comments to that Transformation class, or maybe to Display somewhere, to indicate in which order the transformation applies
that would be great
Mmm, useful tool
yes thank you olivo
Need a mathematics and compsci degree to do anything in mc these days
Or just any dummy like me who knows how to read a wiki page 🤓
and has WAY too much free time
owo
usually it is easier to get the existing transformation and apply your changes to it, since its objects are mutable
var transformation = display.getTransformation();
transformation.getTranslation().add(0, 1, 0);
transformation.getLeftRotation().rotate(Math.PI);
transformation.getScale().mul(2);
display.setTransformation(transformation);
which ones are commonly used?
ugh I mean there the gui ones, the command ones and then like just general utility like eco, helper, bkcommonlib
if i were u id look it up at an awesome-minecraft gh list or sth
or like awesome-spigot w/e
Yeah, I was just demonstrating what each parameter did lol
what does 'const' do
ty ty
In Java? Nothing
It's a keyword, but it does nothing
Ultimately superceded by final
missed opportunity to have an alias to final
The last thing we need in Java is keyword aliases 
i guess we have kotlin for shit like that
i cringed so hard when i saw full guide on kotlin for java devs was 3 hours longer than for rust on youtube
That's just not nice
classic way to show your importance when corporate layoffs start
Reminds me of good old
https://stackoverflow.com/a/52099076
trying to catch PlayerInteractEvent RIGHT_CLICK_BLOCK while holding a bundle and its just not working
oh no not poor innocent integer cache 😭
You can do the same in Python
hello, I have a problem with the keys in the getcase plugin, when I want to open the box it writes no key and I hold it in my hand
any1 know the dependency for the latest world edit?
what do you mean by the dependency
Ummm like for pom.xml
So I can use the world edit classes and stuff in my own project
I can’t seem to find it
how do i set someone's scoreboard objective value through spigot?
Thanks
depends, if you want to set it for the main scoreboard, you do Bukkit.getScoreboardManager().getMainScoreboard() and then get their objective and entry from the Scoreboard object
but if you want to change it from the player's own scoreboard, then you get it from Player#getScoreboard
- Get scoreboard
- Get objective
- Get score of player
- Get actual score value from score object
I guess Player#getScoreboard will return the main scoreboard if they hadn't set a new one anyway now that I think about it
so "getPlayer().getScoreboard().getObjective("inDialogue").getScore("inDialogue").setScore(0)"?
is inDialogue the player's name
inDialogue is the name of the objective
getScore requires the entry name
that's often the entity's name
so "getPlayer().getScoreboard().getObjective("inDialogue").getScore(event.getPlayer()).setScore(1);"?
not exactly what is recommended since the method that takes players is deprecated but sure that will work
what's the alternative?
and thanks for all your help
just using the player's name should do
aka event.getPlayer().getName()
Does CraftItemEvent get fired multiple times if you're shift clicking?
I think so
EntitySnapshot ess = getServer().getEntityFactory().createEntitySnapshot(mdata);
null
null
but why for?
Does Java have a #define equavilent?
you mean macros? no
Yeah you can use preproccesors
Take a look at manifold
You'd need a IDE plugin too though
You need to use ASM too
So that's "fun"
okay, so its a "no*"
A not as straightforward no because you can achieve preprocessing it's just a tad of effort
But if you really want it it's worth it
you could also just have a class full of static methods
id say just fuck with Integer cache until something works
oh hey thats exactly what they did
forgot to mention that setting the score of the player worked, thank you very much
now i'm just struggling to wrap my head around how to check if someone's score is equal to 1
Hi, please let me sleep haha
(Don't worry, I didn't gat woke up)
Define is a macro, it replaces before compilation, it isnt the same as final or immutable variables because those are still inherintly variables and reserve memory.
No. Only via buildscript or modifying the compiler
Imagine thinking about memory in java 💀
Average modern minecraft dev
Is it possible to read data on the current data pack from a plugin? Or for a plugin to provide a datapack?
I'm gonna try to make my skygrid generator use custom datapack data to define stuff like what generates on the grid, what layers, what chances etc
whats wrong with it?
Fr buy more ram
why is ChatColour decripted? what do I use instead??
deprecated?
its only deprecated in Paper
why?
read their docs
is there an advantage to coding on paper?
or should I just stick to spigot
like I know they have certain neiche events spigot doesnt have but idk apart from that
That's something you'll have to decide for yourself. this place isn't really the right forum to advocate for a fork
Well I mean idk what it has to offer
not using spigot api does mean you can potentially break your plugin on spigot servers
ic ic
I mean I'll be using a spigot fork anyway
that being purpur / paper
idk I just dont know what paper offers that spigot doesnt
if its not a public plugin just use whatever fork you are using
paper has adventure, and a few other nifty api features
alrighty
Any idea whats up here?
shadowJar {
relocate 'com.zaxxer.hikari', 'me.abbev.wardenCore.libs.hikari'
relocate 'org.slf4j', 'me.abbev.wardenCore.libs.slf4j'
relocate 'org.postgresql', 'me.abbev.wardenCore.libs.postgresql'
}
Yet:
java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:postgresql://XXXXXXXXXXXXXX:5432/mclink
at WardenCore-1.0.jar/me.abbev.wardenCore.libs.hikari.util.DriverDataSource.<init>(DriverDataSource.java:113) ~[WardenCore-1.0.jar:?]
at WardenCore-......
the jdbcUrl= shouldn't be there is my guess
its not in the code
config.setJdbcUrl(String.format("jdbc:postgresql://%s:%d/%s",
getConfig().getString("database.host"),
getConfig().getInt("database.port"),
getConfig().getString("database.name")
));
you could use pgjdbc-ng, it's what I use
Check above. It’s there.
that's only relocation
my second guess is that the service files are not getting relocated properly hence the driver is not discovered automatically
try specifying the driver class name manually
(org.postgresql.Driver)
It isnt solving problem CreateWorld() is always on the main thread is anyone know how is it possible to solve that when i am creating a new world my server is freezing for a half of second? its important to me because i will have lots of worlds dynamically created
Try setting keepSpawnInMemory to false in the world creator
i have it
That's not the world creator
That's still not the world creator
^ keep it like that
okay thanks i'll test it out
okay it doesnt change anything i guess i need to find some other way because i have a timer here and when someone is at game and another world is creating this timer is pausing for a half of second
okay i'll look into it and what do you think about just copying and pasting template of world when i want to create a new one for player?
because i literally want same seed for every player
so in my situation it can be copy paste
For my plugin I have custom items. When an item is generated with stats etc it get saved with an id in a yml file. When I give the item to the player I just give the id and a method creates the item with the lore etc.
Now I want to detect what id an item has when the player holds it. How can I do that?
The most obvious way is lore/nbt but serilization is a pain xd. Any other suggestions?
?pdc
Just store the Id in pdc so you can look up the other stuff
@ivory sleet check dms
Importante
Broo naah 😭
Cowoconcluwube
any1 know why I am getting this error cannot access com.sk89q.worldedit.bukkit.WorldEditPlugin when I build my project
when I have the dependency and repo already loaded, im on maven and I pressed the little button that shows up to update the pom.xml file too so not sure why its showing up
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.3.9</version>
</dependency>
<repository>
<id>sk89q-repo</id>
<url>https://maven.enginehub.org/repo/</url>
</repository>
try 7.4.0-SNAPSHOT instead for the version
still the same error
is the error shown in your ide or when you execute mvn package goal?
mvn clean install / mvn clean package
I am trying to check for the item the player is holding and used PlayerItemHeldEvent, but that checks if you move way from the item in your hotbar i noticed instead of when starting to hold te item. Is there some sort of way to check if the player starts holding the item?
ide doesn't let me run for some reason so I just do the mvn clean package
what does your code look like, and does IJ tell you anything about the dependency
?img
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
where are you trying to use WorldEditPlugin
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import org.blamesafey.destiniaskyblock.commands.island.IslandCommand;
import org.blamesafey.destiniaskyblock.island.IslandManager;
import org.blamesafey.destiniaskyblock.listeners.PlayerJoin;
import org.blamesafey.destiniaskyblock.listeners.PlayerMove;
import org.blamesafey.destiniaskyblock.listeners.PlayerQuit;
import org.blamesafey.destiniaskyblock.listeners.PlayerRespawn;
import org.blamesafey.destiniaskyblock.tpa.TpaManager;
import org.blamesafey.destiniaskyblock.world.SkyBlockGen;
import org.bukkit.*;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionDefault;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public final class DestiniaSkyblock extends JavaPlugin {
String worldName = "skyblock";
public World world;
public WorldEditPlugin worldedit;
private static DestiniaSkyblock skyBlock;
@Override
public void onEnable() {
skyBlock = this;
this.worldedit = (WorldEditPlugin) Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");
if (worldedit == null) {
sendMessage("ERROR, You must have worldedit on your server!");
} else {
makeWorld();
new IslandManager();
new TpaManager();
registerPermissions();
registerCommands();
registerListeners();
}
}
just here
onEnable
I don't think that's how you get the WE instance
you do WorldEdit.getInstance() as far I remember
I mean, isn't that the same thing
you'd just use the PlayerItemHeldEvent#getNewSlot to get the item that the player started to hold
so like where do I even put that? like this.worldedit = WorldEdit.getInstance()
sure, that works
you could also just use it directly whenever you need it
well i don't want my plugin to load without it
you just have to put WE in your depend list on your plugin.yml for that
o
well I got no idea now lol
perhaps you'll have better luck in the EngineHub server
perhaps you also have to depend on worldedit-core for it to work?
bet, thanks tho I just thought ti was something to do w the pom.xml idk weird
not sure how modern WE API works tbh
try putting worldedit-core dependency as well as see if it stops complaining
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-core</artifactId>
<version>7.4.0-SNAPSHOT</version>
</dependency>
well I truly do not know now
yeah, idk whats going on and I have never had to install it myself
try with a different version
the server I work at already had it in the code base so idk how to do half these things, i just know how to fix bugs 😂 I have exp in java not mc
WorldGuard uses 7.3.0
WG supports 1.21.4 so I'd hope so
API doesn't really change that much anyway so it shouldn't be an issue
so want me to use like 7.3.0
sure, give it a go
I would think WG works with 1.21x, WE does so
so it was just the version in the end, that's funny
thanks a lot
yeaah, kinda dumb but thats what makes coding fun, sometimes its the smallest thing 😭
when you forget a ; and the whole project doesn't compile 😦
lol happened to me so many times
is the entity spawn event bugged or smthing
No?
What's the issue?
So I have an event handler that creates a text display and makes the display a passanger to the entity that spawned. But anytime I join the server or I reload it, the server just has a masive crash.
The most recent crash log is 85.5 megabytes
?paste
send us errors
stop listening to the spawn event to spawn a new entity
that too
or, start ignoring YOUR spawned entites
ok
Spawn the entity then add a display
i just realized it
I'm pretty sure you'll have the entity object after spawning anyway so
yeah
you won't have to listen for the spawn
or just ignore if it is a text display
thx
i didn't think about that
@eternal oxide @worthy yarrow I fixed it thanks for the help
Elgarl is the smart one but no worries lol ❤️
Sometimes 😛
well I'd have to see errors to be helpful in most cases
I feel like you've probably delt with enough weird spigot api stuff that you just know lol
I am using the PlayerItemHeldEvent and want to detect what the player is holding in their main hand and in their offhand. How can I check for that because I cant seem to figure out how to integrate the getItemInMainHand with getNewSlow
player.getInventory().getItem(event.getNewSlot()) will always be your main hand
If you want to check when a player swaps hand items, there's a separate event, PlayerSwapHandItemsEvent
Bear in mind also though that you might want to listen for InventoryClickEvent, PlayerPickupItemEvent, and PlayerDropItemEvent, for when items are moved around in the player's inventory. Depends on how in-depth you want to go into this
Alr thx
how can I stop mobs from being able to take damage, but you can still hit them and they take kb
just heal them when they take damage
set the damage to 0
how you do that?
listening to the event
i meant how do I modify the damage amoutn
nvm i found it
Hello,
I am currently creating a spell casting plugin, and so your hotbar contains spells.
One of the ways to cast one is by selecting the slot of the ability, and it will cast it automatically.
@EventHandler
fun onItemHeld(event: PlayerItemHeldEvent) {
val player = event.player
val settings = PlayerContextSystem.getContext(player).settings
if (!settings.quickCastEnabled) return
if( player.inventory.heldItemSlot != Ability.Slot.PASSIVE.index)
simulateClick(player)
player.inventory.heldItemSlot = Ability.Slot.PASSIVE.index
}
Basically, if you press 4 it goes to slot 4, then the spell in slot 4 is cast. and then it goes back to the passive slot
(we have to go back to the passive slot again, otherwise you cant cast 4 again since this event is only called when there is a change)
For a single press/cast, or a really short hold its all works fine.
Whenever you press 4 it imitialty goes back to its passive slot (8)
However, when you hold the button longer, then for some reason when you release it, it still goes with back and forth between 4 and 8 for the first second or so.
I think this has to do with the amount of requests that are being send by the client to move the selected slot to 4, while it constantly moves it back.
But i am not sure if this is true though
Anyways, i was hoping someone else would know a solution to this, since i looked on the internet and things like a debouncing or adding cooldowns for the slot reset, but it all doesnt work
(yes btw, its kotlin that i am writing, but i dont care if anyone gives a java response)
What about the debouncing doesn't work?
that just completely breaks it, instead of constntly returning to the Passive slot, it now just sometimes returns to the passive slot, and sometimes not at all.
Can't really recreate the issue on a localhost server 🤷♂️
Also I recommend you cancel the event so prevent the server from thinking the slot changed for a bit
wait, you dont have this problem?
yea i also thought that, but that does not fix the problem :p
what was your code?
if its the same, then i know its just something that really relies on the server performance (its a local server for me to, and my pc is bad af so it would make sence)
Tested both event.setCancelled(true); and event.getPlayer().getInventory().setHeldItemSlot(0);
And that being the only code inside of the event listener
aha okay.
i wil ltry that, as the only line in the listener
I dont think it will make a difference since the other bits are not that expencive, but you will never know before you try
lol yea
@EventHandler
fun onItemHeld(event: PlayerItemHeldEvent) {
event.isCancelled = true
}
This littaraly gives the exact same problem
Are you testing locally?
yup
what version are you on?
so it might be my bad copmuter
1.21.4
Specs?
(plugin has api for 1.21.3 though, but that should not make a difference)
||ass||
XD
i have no idea where to look lol
oh i found this
Yeah that's on the slower end
yea lol
But i feel like there should be a way to prevent this that it doesnt have to rely on server performance
or i will get back to this when i upgraded my pc. thats also an option
but yea really didnt have any problems right? when holding dow e.g. right click a long time on an item
since if that is the case. then i will just leave it as is right now, and come back to this feature in 2 weeks or so when my pc got an upgrade
Are you able to have an armorstand ride the player?
yes
how would you go about doing that
adding the armorstand to the player as a passenger
kk ty
player.addPassenger(armorstand)
can you hide the heart particles when you kill a mob?
this didn't work
Was there an error, or it simply did not happen?
Try doing this:
@EventHandler
public void onEntityDeath(EntityDeathEvent event) {
// You can try to disable heart particles by temporarily setting the mob's health above 0
if (event.getEntity().getLastDamageCause() != null) {
event.getEntity().setHealth(0.5);
event.getEntity().remove();
}
}
if (event.getRightClicked() instanceof ArmorStand armorstand) {
if (!armorstand.getName().equals("Hat")) {
return;
}
event.getPlayer().addPassenger(armorstand);
}
}```
@mortal vortex
try removing the if block, to see if any armor stand will ride the player
kk
didn't work
So you got rid of this?
if (!armorstand.getName().equals("Hat")) {
return;
}
onArmorStandLeftClick
InteractEntityEvent
Are you right clicking or left clicking?
right clicking i misnamed it
should be "onArmorStandRightClick"
and yes
ItemType.Typed<M extends ItemMeta> how do you use this?
Use PlayerInteractAtEntityEvent for armor stands
Found that after a search, tyvm
Can I override the version of Jackson that Spigot uses? It's breaking one of my plugins.
I use 2.15.1
and uh
Shade and relocate
java.lang.NoSuchMethodError: 'com.fasterxml.jackson.core.StreamReadConstraints com.fasterxml.jackson.dataformat.yaml.YAMLParser.streamReadConstraints()
Instead of reading from the shaded version in my jar
it's reading from the one bundled in the spigot install from buildtools
in the /bundler/libraries directory, relative to wherever you ran buildtools
Shade and relocate
Do you use maven
Google maven shade plugin relocating
oh it's a maven thing
god I fucking hate Java. thanks though
this seems like it should work lmao
attaboy
lmao
I actually enjoy raw Java, especially with the modern JDK features
it's the ecosystem surrounding it that makes my head hurt
my one gripe with java - no pointers
i was gonna try building something in Kotlin recently, is it that much nicer to work with?
I worked on making an interpreted language in Kotlin
Yessir
It's not used anywhere yet
looks like the only way to put things in a bundle
please read the javadocs on spigot
declaration: package: org.bukkit.inventory, interface: ItemType
While this API is in a public interface, it is not intended for use by plugins until further notice. The purpose of these types is to make Material more maintenance friendly, but will in due time be the official replacement for the aforementioned enum. Entirely incompatible changes may occur. Do not use this API in plugins.
completely incorrect
declaration: package: org.bukkit.inventory.meta, interface: BundleMeta
well shit
if you're using paper API they fully implemented this API a few versions ago
idk why spigot hasn't yet its kinda insane
What is wrong here?
server.scheduler.runTaskAsynchronously(this) {
runBlocking {
try {
databaseManager.initialize()
logger.info("Database initialized successfully!")
} catch (e: Exception) {
logger.severe("Failed to initialize database: ${e.message}")
server.pluginManager.disablePlugin(this@Main)
}
}
}
Overload resolution ambiguity between candidates:
fun runTaskAsynchronously(p0: @NotNull() Plugin, p1: @NotNull() Runnable): @NotNull() BukkitTask
fun runTaskAsynchronously(p0: @NotNull() Plugin, p1: @NotNull() Consumer<in BukkitTask!>): Unit
Kotlin can't tell whether you're trying to use the BukkitTask or Runnable method oyu can fix it like so
server.scheduler.runTaskAsynchronously(this) Runnable {
runBlocking {
try {
databaseManager.initialize()
logger.info("Database initialized successfully!")
} catch (e: Exception) {
logger.severe("Failed to initialize database: ${e.message}")
server.pluginManager.disablePlugin(this@Main)
}
}
}
you could also use the BukkitTask one if you need that
Turns out what's wrong is in fact kotlin
^
idk what your run blocking DSL is, but you could maybe just insert that directly too
more importantly I'm confused why you're initializing your database asynchronously. I feel like it'd be smarter to block the server start until your DB connects, its okay to send blocking requests during startup
It's base kotlin or coroutines
Hi, when I create custom entity with nms to target any closest player it looks like it's deactivated and doesn't do anything for 5-15 seconds right until I try to interact with it or it will start attacking a player after being some time idle.
I am not sure why this is happening, but I believe this is not what is supposed to happen. It's a bit of a problem because a player can sometime run through entity and it won't do anything.
Here is my entity's class. Please forgive me for 1.12.2 nms
https://pastebin.com/fKELuqhR
can anyone help precisely control the spawn rate of amethyst?
When a plugin is disabled, is it true that all its listeners are unregistered before the onDisable method is called
Theres a reason
I was getting an error:
Suspend function 'executeUpdate' should be called only from a coroutine or another suspend function
Could this do?
override fun onEnable() {
saveDefaultConfig()
val config: FileConfiguration = this.config
val databaseConfig = DatabaseConfig.fromBukkitConfig(config)
try {
databaseManager = DatabaseManager(this, databaseConfig)
runBlocking {
try {
databaseManager.initialize()
logger.info("Database initialized successfully!")
} catch (e: DatabaseException.InitializationException) {
logger.severe("Failed to initialize database: ${e.message}")
server.pluginManager.disablePlugin(this@Main)
}
}
} catch (e: Exception) {
logger.severe("Failed to create DatabaseManager: ${e.message}")
server.pluginManager.disablePlugin(this)
}
}
I mean you don't even need that runningBlock not sure how that helps you here
I do
without it, I get erros
whatever your using for database is kinda silly then
imagine forcing someone to open a connection asynchronously, in practice sounds smart, but how often do you really need your connection to be added asynchronous
Is it possible to listen to a disable event in a listener (I made my own events in an attempt to do what I'm trying to do)
public final class KitListener implements Listener {
// ...
@EventHandler
public void onEnable(InvisPracticeEnableEvent event) {
System.out.println(1);
Bukkit.getOnlinePlayers().stream()
.map(Player::getUniqueId)
.forEach(this::cachePlayerAndKits);
}
@EventHandler
public void onDisable(InvisPracticeDisableEvent event) {
Bukkit.getOnlinePlayers().stream()
.map(Player::getUniqueId)
.forEach(this::saveAndClearCachedPlayerAndKits);
}
// ...
}
I’ll rephrase here… Is there any way to reliably control the speed of a player flying with an elytra, without any severe stuttering effect? (Deleted old question as it was badly phrased)
if whatever attributes you're using don't work I'd assume no
pretty sure the client will predict movement
and then stutter back if the server readjusts
Seems right! I’ve found ways to boost the speed of an elytra similar to rockets (rockets are server side velocity I think) but unfortunately I’m not seeing if there’s some way to get full control (also slowing down)… rip
A disable event for what? Is InvisPractice a plugin? Are you maybe looking for PluginEnableEvent and PluginDisableEvent?
InvisPractice is my plugin, sorry I should have said that
If it's the current plugin, then is there a reason you're not using your onEnable()/onDisable() methods in JavaPlugin
Yeah I want to keep the logic inside that listener
I mean you could keep the logic in that class if you want, and just call some methods
I don't think you'll ever receive the enable/disable events for your own plugin
Like having a field then calling methods on it?
Exactly that, yes
public class MyPlugin extends JavaPlugin {
private final KitListener kitListener;
@Override
public void onEnable() {
this.kitListener = new KitListener();
Bukkit.getPluginManager().registerEvents(kitListener, this);
this.kitListener.onPluginEnable();
}
@Override
public void onDisable() {
this.kitListener.onPluginDisable();
}
}
Hm ok
Pretend I write all my code correctly lol, you get the idea
\o/
so confused about how ACF args work
4 Edits damn

lol
So the relocate thing worked for the core plugin, but now building against that plugin is ass, because I have code that extends some methods in my core plugin
tl;dr I was using Jackson in my core library, and now Spigot bundles it in, except I'm using a later version, so some code breaks when it actually executes on the server
someone suggested I use the relocate feature in the maven-shade plugin, so I did, but that ensures unique bytecode generates for the relocated shaded dependency...so the plugin I had building against that core library, which extends a couple of serialization modules to serialize/deserialize things specific to that plugin, now won't build either unless I go and explicitly use all the shaded bits lol
It's doable it's just
hideous
Aight nvm this is utter hell
This would work fine if I were not relocating in a library but
@sullen marlin Sorry for the ping, but why are you guys using Jackson 2.13.4 specifically?
I wouldn't ping but there's a security flaw in older versions
and uh, this is one of them
what security flaw?
Blame mojang
We have it transistively
If you think the security bug is insane enough make a bug report to them please
Though most of those "security vulnerabilities" aren't really severe and can be ignored
there's a bug in the XML parser that can break shit
realistically speaking it's probably not a big deal for Spigot, but I have XML parsing as part of this library
yeahh this one's probably not severe enough to matter if I'm honest
I doubt you are using the feature in question
sounds about right, where I work we're using libraries that are like 8+ years behind on updates
that would affect you
Comprehensive vulnerability database for your open source projects and dependencies.
This vulnerability is only exploitable when the non-default UNWRAP_SINGLE_VALUE_ARRAYS feature is enabled.
Tbh businesses always be like that
if you are not using that you are fine
in our case it's because something in our code completely broke after they updated it, because their update was designed for people to not optimize SIMD instructions
which actually broke pre-optimized SIMD instructions
but uh. now we can't get support for shit anymore lol
lol
I have a set of changes designed to update + fix those issues but they never got approved 💀
that sucks
mm red tape
Tbh no clue what SIMD is looked it up looks like "fun" to implement
I don't use that library but I know the feeling of having a pr denied for no logical reasoning or something arbitrary
It's fun in the same way writing ASM is fun
right up until it stops working
which in the case of ASM is on first launch
Single instruction multiple data
Yeah I saw it's used in GPUs largely sounds fun low level fuckery
there's a lot of "this isn't worth the time" where I work even though sometimes our tools can take literal hours to run
Considering we have 10k+ employees, and many of them use these tools, we lose collective months to waiting on tools to run every year...but updating them so that we can do work to make them run faster isn't worth the time? corporate brainrot tbh
I once submitted a pr for lockette when hoppers came out. Lockette was vulnerable against the hoppers. I submitted a pr for it, admitted it wasn't super optimal, but it got denied
IME it's largely CPU-side but supported on some modern GPU architectures, as a rule if you can GPU accelerate that's still gonna be faster but SIMD is a chunky speedup for CPU-bound code if you can format your data to run with it
and it annoyed me that they would rather let a plugin be vulnerable to something all because of a small performance hit and then release a proper fix later
fortunately where I work we don't really do code quality checks on v0s or hotfixes
but we also don't clean up the code later either, so the entire codebase is just millions of lines of duct tape
there are two extremes
I mean there's basic code quality like "don't make a HUGE mess" but it's like wiping dust off your desk and then not vacuuming it off the floor afterward
they can make a proper fix later XD
i daresay the hoppers themselves were causing more perf hits than whatever your PR did
hoppers are notoriously laggy
indeed
I think some modified servers do something about them, but Spigot tends to stick close to vanilla
not that there's anything inherently wrong with that, I stick to Spigot for that reason lmao
my pr simply would use movement check on the hopper carts and since you could make the cart slide off the rail, even checked blocks around
and then for building it just checked if the player matched the lock
is Lockette something to do with being able to lock chests?
yes, it uses a sign and no DB
i'm guessing hoppers could bypass those locks
that's extremely funny actually
ew @ the sign though
and yes hoppers could bypass the locks because it was new functionality since mojang never had items empty out of a chest before
I mean it definitely makes sense why that would happen
but that is also pretty annoying for anyone playing on a server running that plugin
if they didn't know about it
anyways, later versions did get a fix, but like they weren't super quick about it
unfortunately there's always the one player that will try anything to make other people sad lol
just annoyed me of their reasoning was all and that they would much rather deny a pr fix then to accept one that works but would need fixing
well fixing if it is determined it wasn't to par in terms of performance etc
Speaking of fixing
...how the hell do I explicitly use Jackson 2.15.1 in a plugin that depends on a library that has to use relocated code?
This code's in the library, so downgrading is...not an option
kinda feel like manually checking a sign every time someone clicks on a chest would be a more important fix lmao
Please use mccoroutine
And exposed
can Exposed be used with Postgres?
Yeap
using pgjdbcng
just as an fyi, those try/catches are somewhat redundant as your plugin will disable anyway if you have a exception in your initialiser
I assume the library is a separated plugin?
If you can depend on it then you can use build to reshade it
This is how I do it for my arcade addons
The game engine is reshaded in arcade and the add-ons depend on the game engine/arcade that are unshaded to the add-on module
So I apply another shade in the add-on to fix the difference
which data are you wanting? The skin?
yeah but I dont know the name of the skin and skull.getOwner is null
and idk what that base64 data is when you lookup player skulls
it should be skullmeta where you should be able to get the owner
the base64 data is just their skin texture
as long as you know the name of the player you can obtain that data yourself manually
and that data just allows servers and clients to download the texture
yeah skullmeta apparantly has the owner set to nothing
maybe I'm tripping
sorry skullmeta is item based
I need block info
skull.getOwner is null but hasOwner returns true
I figured it out
glad you figured it out
had to use reflection to set textures property
and also set owner to some random name
There's the player profile api you can use
they are using 1.8
I don't know if I should be proud of my self for this but oh well
couldn't figure out why nms was being a pain
But i thought we don't support 1.8 anymore
I felt like being nice and it was for something minor really lol
The package approach does not work on paper BTW
Anyone have a better idea for what I'm trying to acomplish
It did not want to work on either
wrong reply hehe
Dif person
Yep yep yep
Create a version module where you keep the interfaces
And a module for each version
@lapis widget
Ah I see
Mine is a bit bigger project
1.8 smh
isn't it time consuming keeping compat for so many versions?
probably
I don't usually add features to the calculation code
Just visual updates for the server owners to use
so then it's this that has to be updated
Yep
its only broken on 1.21 thank god (the default method)
why is that?
help me Hello, who can help me with something, that is, create a menu with a kit for my paper server with the DeluxeMenus plugin, I hope you can help me, give me a config for a fine menu with a kit in private or even here in general
if I use getNMSVersion then I either get a blank string or craftbukkit as output when debugging
have you tried making a kit yourself?
as i said, paper doesn't have the version in the package anymore
CommandExecutor to open up a inventory on command with arguments of kit name to create a kit
InventoryClickEvent select kit, stop taking items from inventory
InventoryDragEvent stop dragging of items out of inventory
InventoryCloseEvent save input of inventory in a config
CommandExecutor with command name of kits to show kits
Yes, I tried, but it's hard for me and I can't
he asks for help with deluxe menu
oops lol
it really isn't, keep trying
Maybe chatgpt can help
chat gpt doesn't know what to do in this case
i don't think it ever saw a deluxe menu config
erm
Im not gonna vouch for accuracy but it did provide me with a answer
https://wiki.helpch.at/helpchat-plugins/deluxemenus/options-and-configurations/gui i still suggest this
it doesn't work for me
Hello, who can help me with the DeluxeMenus plugin, that is, give yourself a config with a Server Information menu
you should try looking into the wiki above
hehe you gotta prompt it a bit better I think xd
proompting moment
🎆
you should let the prompting be done by actual prompt engineers, its a whole field of work you see
so next time, hire prompt emgineers to gpt you the answer instead of a dev that can do it for you
all you have to do is provide it the necessary info to build up the structure
the result will be as good as the prompt you give it
hiring a dev to write a yaml file is crazy tho
deluxemenus configuration format seems pretty straightforward honestly:
https://github.com/HelpChat/DeluxeMenus-Wiki/blob/master/gui_menus/kits.yml
Is there any way to teleport entities with passengers, or is that still not possible? Dismounting,teleporting and then mounting again does teleport, but its buggy when done every tick.
im pretty sure that entities dont lose their passengers when teleporting
or am i wrong?
Huh, that would be weird. When I tried it out, teleport wouldnt do anything unless I dismounted the passengers.
what entity are you teleporting?
cant tp with passenger
A cow
And there is no other workaround?
Not on spigot
One day it will be
Whats the alternative?
Paper has teleport flags for that
And what does it do? Is it just dismount/mounting but more convenient because its its own function, or something completely different?
They have a seperate function for teleporting with flags, one of them is for allowing passengers. On spigot, the function just returns false when called with passengers mounted
Isn't there an open PR to fix that issue?
¯_(ツ)_/¯
Yea, looks like there is. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/924/overview
Wonder what's holding it up if anything.
Can't view it :p
Gonna have to sell my soul to daddy md_5 first
you haven't signed the CLA yet? That's crazy
I've never needed it
it's fun to look at what the status of some PRs are from time to time
most likely the contributor just gave up on it after trying to come up with a good way to fix the linked issue
how do I make creeper spawn eggs with a specific nbt tag get ignited on spawn
Thanks. Also, how do I prime a tnt? Set it to air and spawn a primed one?
Sure
is there a better way?
Not that I know of
alr
Why are you just pinging random people
fun!!
Sorry
Are u Minecraft server developmer
No one will help you if you have that behaviour
To me....
How do I like get a block data of air or something
Material.AIR.createBlockData or something
^
ah, alr
How do I create an entity snapshot without an actual entity? I want something like EntityType + a few methods applied to it
World.createEntity
I don't think that's a method
It is
createEntity + Entity#createSnapshot
yeah alr
Quick question, what's the difference between BlockDataMeta and BlockStateMeta
you're not gonna believe this
one holds a BlockData and the other holds a BlockState
crazy
ikr
He’s probably asking what’s the difference between state and meta

