<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
#help-development
1 messages · Page 672 of 1
yeah I got the same, except that I use 3.1.0
~/.gnupg/
that just seems to be my gpg installation folder?
user home
do you actually have a key generated
oh my bad
i should, i've used gpg for like ages with this api
this is all i have in .gnupg
open gitbash and run gpg --list-secret-keys --keyid-format=long
dont send a screenshot here also
it outputted nothing what the fuck 😭
did you uninstall gpg or somethin
nah
i myself do not know what has happened
all i know is that it was working before my path was wiped, but i'm starting to think that something else happened in the meantime
wait
nvm
i had to do the command in cmd, not git bash
i do have a key
so the key is in the .kbx file?
idk where the key is actually stored
if you need it in armor theres a command for it
i'm trying to figure out how to couple it back to intellij
it's a different error now, i updated maven-gpg-plugin to 3.1.0
yeah that happens to me too on windows (works fine on mac)
I just run maven outside of intellij
that works fine
😳
i'm not quite sure how exactly i'd do that because i have no idea where i can grab a maven executable
and overall this seems very hacky for a problem that started appearing out of the blue
no clue why
oh
from the maven website? lol
i have never had a maven executable on my pc xD ty one sec
Hello
Does anyone know why when I add a JDA dependency in maven, the plugin weighs 13 MB??
because it includes JDA?
jda is huge
you can use the shade plugin's minimizeJar option to get rid of classes you don't need
lowest you can get while shading it is 9mb
you can also exclude the audio stuff if you don't need it manually
<exclusions>
<exclusion>
<groupId>club.minnced</groupId>
<artifactId>opus-java</artifactId>
</exclusion>
</exclusions>
But JDA makes a 3KB plugin suddenly weigh 13MB?
some1 know how fix it?
just shade all maven central into ur project
dont have to bother with dependencies then
im getting a error when a launch: unrecognized option - Xincgc
new question, how do i specify a key for maven-gpg-plugin because it apparently lost it?
what is that option even supposed to do?
minimizeJar that I find in Intellij?
no, in your pom
in the maven shade plugin's <configuration> add <minimizeJar>true
i dont know, is a default compile, i creating a custom client
just get rid of that option if you don't know what it's supposed to do
Extra insanely non-creative garbage cleaner?
running it with -s "path/to/settings.xml" also did not help
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar> <!-- <---- this -->
</configuration>
</execution>
</executions>
</plugin>
and as said, exclude opus-java from the dependency
do you know where i can change the launch options on eclipse ide?°
no clue
nvm i found it
what is -Xingc meant to do
i want know too
he doesn't know
remove it then
Extra incredibly non-conventional garbage cleaner?
f*
Not only is JDA huge and adds some weight, but it shades a huge websocket client into it as well as some utility libs, jackson which is quite huge and okhttp3 as well as trove iirc
Hello, please help, I paid for the cmi plugin on the site, but it shows that it is not paid, where will it go?
wait
also this is the wrong channel
if anyone knows please help because i'm gonna be away from my pc for 2 weeks and it won't let me sleep at night xD
What is the approximate time to expect? the plugin was paid for earlier in the day
Thanks everyone for your help
check on paypal whether the transaction is "pending"
and as I said, this is the wrong channel
u shoulda just said min 1 min max 30 days
which channel should I switch to?
#general I guess
Thanks for help!
is there a better api to use for getting a uuid from a name and getting skin texture than mojangs? as i keep getting ratelimited which is understandable but i'm just wondering
well how many requests are you doing?
the ratelimit was SUPER reduced yesterday
don't you only ever have to query it once per user?
its like 11 requests and you get ratelimited
it went from 600 / 10 minutes to 10 / 5 seconds
so IIRC you can actually do twice as many requests in the same amount of time, just not all at once
Can someone please help me
I am getting an error at if (args[0].equalsIgnoreCase("add")) {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (label.equalsIgnoreCase("bal")) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can do this");
return true;
} else {
Player player = (Player) sender;
if(args.length == 0){
sender.sendMessage("You have " + formatNumAsMoney((float) Balance.get().getBalance(player)) + "§a$");
}
if (args[0].equalsIgnoreCase("add")) {
System.out.println("2");
if (sender.hasPermission("money.add")) {
System.out.println("3");
Player target = Bukkit.getPlayer(args[1]);
if (target != null) {
Balance.get().addBalance(target, Double.parseDouble(args[2]));
System.out.println("4");
return true;
}
}
}
It says this
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at my.server.economy.commands.BalanceCommand.onCommand(BalanceCommand.java:25) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
why not use my economy plugin? 😄
you now know
it is on github, you can check there too, if you want to learn
shameless selfpromotion 
cough worthit cough
No one cares
This, my friend, is a development channel. If your not here to ask for help, go somewhere else
No need to be hostile
I mean there are third party apis u could use
No need to advertise either
^
First use if (args.length < 1) { return true; }
I think the issue is also the punishment margin for exceeding 10/5
Sorry if i just dumb rn but what is wrong with this i cant see the error
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (label.equalsIgnoreCase("bal")) {
if (!(sender instanceof Player)) {
sender.sendMessage("Only players can do this");
return true;
}
Player player = (Player) sender;
if (args.length == 0) {
sender.sendMessage("You have " + formatNumAsMoney((float) Balance.get().getBalance(player)) + "§a$");
}
if (args[0].equalsIgnoreCase("add")) {
System.out.println("2");
if (sender.hasPermission("money.add")) {
System.out.println("3");
Player target = Bukkit.getPlayer(args[1]);
if (target != null) {
Balance.get().addBalance(target, Double.parseDouble(args[2]));
System.out.println("4");
return true;
}
}
}
}
return false;
}
}
Not trying to be hostile, but randomly and irrelevantly promoting your work wastes everyone’s time
what is it?
?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.
mans forgot a return
What is happening? It’s not giving an error, but what is it doing?
This
?paste
@quaint mantle ^
ohh, yea that makes sense
why are you checking the command's name o0
https://paste.md-5.net/sacetefuci.bashHere is the console error
we already told you
did you not read that?
I was pasting this mean while
we told you like half an hour ago
it is strange though considering i get ratelimited sometimes and don't think i've ever surpassed 10/5 but eh, whatever
don't access args[N] if the array's lengh is smaller than N+1
Saw a tutorial where he put multiple commands in a class… though that seems very odd
man cant read
he just copypastes
It's fine maybe in a year you'll start understanding
Understandable if you use the same command executor for multiple plugin commands
true, he's been doing this for weeks now
yep
When I try to compile my plugin I'm getting this error. With maven
cannot access net.kyori.adventure.text.Component
Does someone know why?
Using obliviateinvs
It does hurt a little because the guy from last night u walked in on us talking to. He started java literally last night, and within 2 hours the dude was doing critical thinking on what he was writing.
If the guys who copy pasted spent literally an hour learning the concepts, they'd be in this channel like 80% less xD
you're using paper
yes
this is the spigot discord
I found it odd you were teaching binary to a complete beginner
More context
Its a bit hard to know with just that error message 😅
Yeah but the ultimate satisfying moment was him going "ohhhh thats why we start at 0 with arrays and lists"
I'm a lecturer irl and you'd be surprised how many complicated concepts can be explained easy as hell if done right
I don't think I have the patience needed to become a teacher
I mean the fact that we start from 0 and not 1 doesn’t have much to do with binary?
Well it's weird, it drops that error and it brings me to my custom GUI server selector class. But nothing is red but the error is still dropped
super(player, "hubselector", "Hub Selector", 3);
}```
But I do have the patience needed for writing multi-platform minigame stuff
converting my minigamelib to minestom right now
Its one of the reasons. Saving that sliver space is one of the easiest reasons you can give off the bat
I’d say its a really insignificant reason if any at all
But it is a reason.
And from my experience, having a good story to go with a concept makes it so much easier to remember.
As said, by the time we finished I literally stood back and he went ham with no help needed
Idk tbh how much of a reason it is tho. Yes sure having stories, anecdotes or other tales may help but that has nothing to do saying binary is a reason indiceables start at 0. But nonetheless if it helped him than who am I to judge 
Aye 🙂
Where exactly does this error message pop up?
He is a good kid though, I can see him being quite the developer in a few months
Most people who come here are good and really interesting if you let your eyes not judge their inabilities too hard :>
Its an abstract class, what does it extend?
Is there such an event that checks that a player hit another player by throwing a trident?
Im trying to check if the args is a player but i dont know how to, i have this right now but it is not working. It sends this
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at my.server.economy.commands.BalanceCommand.onCommand(BalanceCommand.java:41) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-21fe707-741a1bd]
... 15 more
if (args[0].equalsIgnoreCase("add")) {
System.out.println("2");
if (sender.hasPermission("money.add")) {
System.out.println("3");
}
OfflinePlayer[] target = Bukkit.getOfflinePlayers();
if(args[1].equalsIgnoreCase(Arrays.toString(target))){
System.out.println("4");
return true;
}
}
Immediatly top of my head: EntityDamageEntity , check if the entity is erm? A trident (I dunno arrows and Tridents are weird like that lol)
Bukkit.getPlayer()
or getOfflinePlayer @timid hedge
Get offline player is big and clever
And I stand by the naming convention is bullshit xD
vault requires getoffline player
It should be Player and OnlinePlayer : Change my mind
so it depends if you wanna allow adding to offline players
Thats what i have tried to do but its just not working
This isnt working Player target = Bukkit.getOfflinePlayers(); and i need to use OfflinePlayer[] target = Bukkit.getOfflinePlayers();
Does it? Thought it just took an offline player but yeah something like that (:
how would i change the nametag of the player (name above head). player.setPlayerListName() changes tab name and player.setDisplayName() changes chat name
IIRC, you have to mess with Scoreboard Teams to change that. Even then, you can only add prefixes and suffixes. You can't change the player name aside from color styling.
how get tident owner
this will be fun
remove the s
I cant, i need to get the player by uuid or string name, i think its becuase im using the 1.8 api
mans making 1.8 plugins as a beginner
Yeah, i dont think im going to use any other version
Can you try to send some of your code or a picture?
There definetly is Bukkit.getOfflinePlayer in 1.8
?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 can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
Oh i forgot that, thanks
i would recommend getting it from Bukkit.getOfflinePlayers().get and null checking to avoid querying the the mojang db
that can take longer if you have a lot of users on your server
Tell me all the registries extend an interface called registry 🙏
Class FileConfiguration has method getDefaults(); , but this method is marked as nullable, how to make it not null?
null check it
That does not change if it is null?
average intellij response
check if its null and run code if it isnt
add defaults
the objects functions are amazing!!
Does anyone have a custom MapFont class, to make like the text bold or just for fancy characters?
yes thanks, weird I did not saw it before
I'm aware of drawing an image, but I'm too lazy for now to cut all of the characters out by hand
Anyone who uses XMaterials here? I'm trying to check if a material is contained in a list of XMaterials but it seems to not work:
this is the list:
static{
SKULLS.add(XMaterial.DRAGON_HEAD.parseMaterial());
SKULLS.add(XMaterial.PLAYER_HEAD.parseMaterial());
SKULLS.add(XMaterial.ZOMBIE_HEAD.parseMaterial());
SKULLS.add(XMaterial.CREEPER_HEAD.parseMaterial());
SKULLS.add(XMaterial.PIGLIN_HEAD.parseMaterial());
SKULLS.add(XMaterial.SKELETON_SKULL.parseMaterial());
SKULLS.add(XMaterial.WITHER_SKELETON_SKULL.parseMaterial());
}```
and then the check that fails to see my material as a skull:
``` public static boolean isSkull(final Block block){
final Material blockMaterial = block.getType();
if (SKULLS.contains(blockMaterial)){
return true;
}
return false;
}```
When I test it in 1.20 it works fine, but in older versions, the skulls seems to not be recognised as "skull"
print out the contents of the list and see what it actually contains
what event to take to understand that the player threw an item from the right hand in the inventory
threw? wdym?
Left
what event to take to understand that the player threw an item from his right hand using his inventory and mouse
left hand
right or left then
i still don't understand
you say right then left
left
you cant drop from ur off hand
thats just it being in an offhand
its not dropped from the off hand
you have to tell if its from offhand by slot number
in short, how to understand that a certain item in the off hand is missing when the player does something in the inventory
listen to the inventory events
what is more specific
InventoryClickEvent InventoryDragEvent
i just give certain effects when the item is in off hand and need to remove them when it is not so
DEMM
someone uploaded
?
i hope not
I am confused on why this isn't working. Currently using 5.1.0 of protocollib.
private void setInvisible(Player player) {
try {
PacketContainer metaDataPacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA);
metaDataPacket.getIntegers().write(0, entityId);
WrappedDataWatcher dataWatcher = new WrappedDataWatcher(metaDataPacket.getWatchableCollectionModifier().read(0));
dataWatcher.setObject(new WrappedDataWatcher.WrappedDataWatcherObject(0, WrappedDataWatcher.Registry.get(Byte.class)), (byte) 0x20);
metaDataPacket.getWatchableCollectionModifier().writeSafely(0, dataWatcher.getWatchableObjects());
ProtocolLibrary.getProtocolManager().sendServerPacket(player, metaDataPacket);
} catch (Exception err) {
err.printStackTrace();
}
}```
Here’s the error
```java
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @5ce65a89)```
Seems to be throwing this error.
is this proper usage of CompletableFuture & CountDownLatch? https://github.com/JEFF-Media-GbR/javafinder/blob/master/src/main/java/com/jeff_media/javafinder/JavaFinder.java#L87
When I have a FileConfiguration of my own yaml file, should be reloading config done async?
can't CompletableFuture.allOf do that?
it wouldn't hurt to do it async
👋
no clue tbh
I'd still have to use the countdownlatch to wait for the futures to complete
to sort the list
not really, you just add all the cfs to an array, return a cf that completes when the allOf completes
but I have to wait until all futures using a DirectoryCrawler are done before I can sort the list
right, so you do return CompletableFuture.allOf(cfs).thenApply(some lambda)
hmm let's try
also, can you add to HashSet from multiple threads at once? I didn't think it was thread safe
well there is no thenSupply
to return something?
yeha, that takes a function to return your list
but apply feels weird to use, I dont need the parameter
the parameter is useless, its Void from the allOf
I know, hence I don't want to use it lol
I mean that's what allOf is for
like, you can't not have a parameter
you could create a new CF and complete it inside a thenRun I suppose if you really didn't want an ignored param
and then return that other CF
thx I now came up with this
public @NotNull CompletableFuture<List<JavaInstallation>> findInstallationsAsync() {
Set<JavaInstallation> installations = ConcurrentHashMap.newKeySet();
return CompletableFuture.allOf(searchDirectories
.stream()
.filter(File::isDirectory)
.map(location -> CompletableFuture.runAsync(() -> installations
.addAll(new DirectoryCrawler(location, OperatingSystem.CURRENT).findInstallations())))
.toArray(CompletableFuture[]::new))
.thenApply(Void -> installations.stream().sorted().collect(Collectors.toList()));
}
yeah, way nicer than using the latch that you have to catch the intertupt exception and what not
ps.send(new ClientboundSetEquipmentPacket(npc.getBukkitEntity().getEntityId(), List.of(new Pair<>(EquipmentSlot.HAND, CraftItemStack.asNMSCopy(pickaxe)))))```
```md
Incompatible types. Found: 'java.util.List<com.mojang.datafixers.util.Pair<org.bukkit.inventory.EquipmentSlot,net.minecraft.world.item.ItemStack>>', required: 'java.util.List<com.mojang.datafixers.util.Pair<net.minecraft.world.entity.EquipmentSlot,net.minecraft.world.item.ItemStack>>'```
you are using the wrong EquipmentSlot, as the error lays out pretty clearly
also, isn't there API for changing equipment for an entity?
how
Hi, just recently switched from Eclips to Intellij Idead (finnaly) and Im getting some warns while Im building the plugin. What is wrong?
Pom.xml https://paste.md-5.net/riheqiqoli.xml
you can ignore those
Probably but its anoying xD
Btw. What is correct option tu pick? Package/install? I saw some tutorial where was install use, but someone told me is wrong
package
So tutorial was wrong... thanks
how do i set an armor stand's helmet
Since an armorstand is an entity, you set it just like you would for a skeleton/zombie etc
Player.clearActivePotionEffects throw NoSuchMethodException?
do you have paper or spigot api in ur pom
paper
do you run paper or spigot
paper
update paper
plz dont whereami me
how do i
NOOOOOO
download latest from their website
ok ty
?kick @hamit
Member "@hamit" not found.
why
?kick @near mason
Done. That felt good.
why did i got kicked?
woo hooo
update premium vanish
they update it every single day
who heard about the new restrictions in microsoft
now you not can use mincraft logotip
end e t c
what
it doesnt have subtitles
in short: you can not use everything related to minecraft in your projects
oh that eula change
logotips, game name
yeah i saw it a few days ago
Hi, I am trying to add a heart to the player when they complete an advancement but this PlayerAdvancementDoneEvent also runs even if the player gets a crafting recipie unlocked. How do I change it so it only adds the heart when the player gets a real advancement such as [Stone Age]
I am using 1.20.1
@EventHandler
public void onAdvancement(PlayerAdvancementDoneEvent event) {
Player player = event.getPlayer();
Advancement advancement = event.getAdvancement();
Bukkit.getLogger().info("Heart Advancement Debug: " + advancement.getCriteria());
if (!advancement.getCriteria().contains("has_the_recipe")) {
AttributeInstance attribute = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
double newHealth = attribute.getBaseValue() + 1;
attribute.setBaseValue(newHealth);
}
}
Well they’re all “real” advancements.
You can filter out recipe advancements by checking the key for a prefix “recipe/” or “recipes/” depending on the version
Is getCriteria showing what you expect? Otherwise yeah they all have a key starting with recipe or crafting or something
Install depends on package, so install always builds the jar. However, install installs the project to your mavenLocal. Generally I use install over package as it also updates all dependent projects if applicable
Yes - I'm necroing but whatever
Yeah I believe get criteria and recipe/ sort of work. I noticed some inconsistency since when I crafted a crafting table, It was considered as a advancement and added a heart to my health.
You can see console messages here. All I did was get wood and a crafting table in a fresh new world:
public static List<Category> getAllowedCategories(Player player){
List<Category> list = new ArrayList<>();
for (Category category : getAllCategory()) {
if (player.hasPermission(category.getPermission())) {
list.add(category);
}
}
return list;
}
Hello, i'm searching for a way to add category in a list only if player has permission, but if the player is op, this return me all category avaible...
I though patch this by de-oping player if he is op then, op him again but i dont like this method, do you have a better solution pls ?
Thanks a lot. Probably gona stay with package and time to time run install. 😄
oh god this again
didn't we already discuss this
also not even on topic
good job
just found yet anotehr way to crash my client with my plugin
wonderful
error rendering item
great
check getEffectivePermissions, then you can check the permissions that are actually set, instead of the hasPermission check that might fallback to the op status
i tried by checking if getEffectivePermissions contains my category perm but idk if it will works :
because getEffectivePermissions does't seems to contain my perm even if i have it when i'm op
well it won't list every single permission to ever exist only because you are op
i am suggesting it because it doesn't list permissions you do not explicitly have
can anyone help me with custom configs?
?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!
i don't get it to make an new folder
Create a new file object and call mkdir or mkdirs
we did
?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.
?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.
?configs
See this wiki page on how to use custom configuration files: https://www.spigotmc.org/wiki/config-files/
this is the code to create the folder:
customDirectory = new File(getDataFolder(), "languages");
if (!customDirectory.exists()) {
customDirectory.mkdir();
}
change it to mkdirs()
okey
Is there a way to find the chunk in which the host loads the most?
Hello, I am using ProtocolLib and I am spawning an entity, but I would like to make this entity lie down. How can I achieve this? It's a Zombie.
Chat gpt not work
Dont relie on chat gpt
Use datawatcher and NMS, (I don't know much about plib with that), in older versions you have to use bed packet
Im trying using bed packet
Sometimes ChatGPT is really useful
thx, i understood what you mean, finnally works with this code 🙂
public static List<Category> getAllowedCategories(Player player){
List<Category> list = new ArrayList<>();
List<String> permList = new ArrayList<>();
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
permList.add(perms.getPermission());
}
for (Category category : getAllCategory()) {
if (permList.contains(category.getPermission())) {
list.add(category);
System.out.println(category.getName());
}
}
return list;
}
Im am Brazilian, and my english is not very good for this question
please do not use chatgpt
use it only if you know what you are doing and are aware of what it is and can do
Hmm yeah, ChatGPT can't make difficult plugins
I used it for plugin messaging cause I did not want to code a completeable future
Place a fake bed block in ground, then send bed packet with player's Id and bed block pos, then remove the faked bed block.
Im used to translate text
Playerinteract entity packet
whats the full name
Plib?
If you're working with nms you need to specify version
And if you use mojmaps or not
UseEntity
client?
i got a problem.
i try to load a String from a custom config File but it gives me an error that said null
this is the code:
in the util:
public static String getEnglishConfigItem(String key){
return EnglishLanguageFile.getLanguageFile().getString(key);
}
in the Main:
String EnglishRollMessage = EnglishLanguageUtils.getEnglishConfigItem("Roll");
getCommand("roll").setExecutor(new rollCommand(prefix, language, broadcast, EnglishRollMessage));
in the command:
private final String language;
private final boolean broadcast;
private final String englishmessage;
public rollCommand(String prefix, String language, boolean broadcast, String EnglishMessage){
this.prefix = prefix;
this.language = language;
this.broadcast = broadcast;
this.englishmessage = EnglishMessage;
}
I use obfuscated version of NMS 🫠
why
Because.
ServerboundInteractPacket it seems
Show your config and how you're loading it
thanks
Imagine debugging it.
💀💀💀
I really dont use NMS now, but i was trying to use it on second day of learning java&bukkit thats why i had some troubles (I still have that) with installing remapped version
Just dont use nms
one sec
I am not using it now
Sooo use obfuscated nms version is not very bad idea))
You're never setting the contents of the config
i do
Not in the code you sent
you set stuff other than "Roll"
i have this in my main
//adding strings to configs
EnglishLanguageUtils.addString();
Well Roll is never set
yeah i wanted this to work first
so why are you coming for help with Roll when you know it wont work
ps.send(new ServerboundInteractPacket(npc.getBukkitEntity().getEntityId(), plugin.menus.boxServerMenu(p.getPlayer())));```
```md
'ServerboundInteractPacket(net.minecraft.network.FriendlyByteBuf)' in 'net.minecraft.network.protocol.game.ServerboundInteractPacket' cannot be applied to '(int, void)'```
What is the correct way to do this?
wait, you are trying to send a serverbound packet?
i know it can work only im not sure how
That's a serverbound packet why are you sending it to a player
I want when the player interacts with the npc itopens that gui
it wont, you dont add Roll to the config, set Roll then come back
Listen to the packet then
how?
Use the entity interact packet
its nms though
packet events is the easier option
Then just open a regular inventory
i have changed the names after i send the first message here
Use Protocollib or PacketEvents
what is a packetevent
a library
made by resident retro
thankis
did the girl deny you
do I need to install their plugin?
you can shade im pretty sure
depends if you shade it in
could I have assistance with that
if you include it as part of your plugin you dont need to
where even is the maven
wgat
ty
public static String test(ItemStack item) {
NBTItem nbt = new NBTItem(item);
return nbt.getString("test");
}
what this method returns if nbt does not contains test?
null probably
nvm got it working
step 2 is not very clear
thanks
you dont know how to shade stuff?
Well it isn't a maven or gradle tutorial
also one more question, if someone clicks on an air in his inventory, getCurrentItem returns AIR or null?
could be either
then i check for both, thanks
that's wrong. plenty of places where its an air stack
It seems to me that I figured out how to get the supposed chunk with lag machines, but this is too wild and not reliable... Every 30 seconds compare TPS with TPS 30 seconds ago, and if TPS went down sharply then get all the chunks with players that entered in a new chunk in last 10 seconds
Or something like that
This is absolutely not reliable, however, this is the only thing I could think of
<pattern>com.github.retrooper.packetevents</pattern>
<shadedPattern>me.lobbymanager.packetevents.api</shadedPattern>
<pattern>io.github.retrooper.packetevents</pattern>
<shadedPattern>me.lobbymanager.packetevents.impl</shadedPattern>
<pattern>net.kyori</pattern>
<shadedPattern>me.lobbymanager.packetevents.kyori</shadedPattern>
this took a while lol
so how do I use it lmfao
This question is pretty dumb. So is there any documentation showing this?
have you read the docs
Probably not
no
@PacketHandler
public void onPlayerClickNPCPacket(ServerboundInteractPacket event) {
}
its that easy?
lmfaoo
wait do I have to register the event?
probably
omg this is just spigot
It's my first time using Protocolib, so I absolutely know nothing. I even tried to spawn here, but it didn't work.
Read the docs
probably PacketEvents.getAPI().getEventManager().registerListener(instance)
very much spoon
ill fork a potato
PacketEvents.getAPI().getEventManager().registerListener(this);
Method 'onPlayerClickNPCPacket(net.minecraft.network.protocol.game.ServerboundInteractPacket)' is never used
you dont
¯_(ツ)_/¯
@PacketHandler
public void onPlayerClickNPCPacket(ServerboundInteractPacket event) {
}
The method is only being called reflectively so I doubt IntelliJ will find the link
you do. However after using the same annotation a bunch of times, IJ asks you whether you want to consider annotated methods as implicitly called. Same for variables
does anyone know a ChatMenu API like this one here https://github.com/EverNife/ChatMenuAPI/
İf i set item of snoeball to air will it disappear or it'll be invisible?
Unfortunately, no.
is there an event for scoreboard update
Sad
Define scoreboard update
someone triggers a criteria
Most scoreboards are updated manually by a plugin
Well you can Rightclick on the method and disable inspection for methods with @EventHandler annotation.
However the ones that reflect statistics can be detected with StatisticIncrementEvent
Oh ill just use barriers
am I able to create my own listeners
how
Make a class that extends event
Give it the fields and stuff you want
And make sure it has both a static and non static getHandlerList method
About to start work on a Logging plugin and was wondering for folk's input on my current interface structuring for the log data before I go any deeper into concrete stuff
Version with methods for context
Lookupable 👎
BeingAbleToBeLookedUpInADataSource 👍
Of course, how could i be so blind
You want #help-server
k
never seen it before
Hypixel Forums
Welcome everyone!
Today, we have another developer blog post for you. This time about the technical side of the Replay System. We will go into detail about how we record games at scale without any observable performance impact. As of now, we record more than 12,000,000 recordings per week. But...
Are they actually for real? Theyve managed to mcguiver a plugin like that and havent even made a premium version for auto pinging for stuff like xray pings and cheat pings 💀
I wanna make one now just on dang principle
What
Imagine someone gets hit by an xray ping plugin, and it begins to auto record them from the moment it pings
maybe or maybe not
You know they have some pretty advanced wacky stuff when it comes to bot detection on skyblock right?
A dude once got banned for picking up a wooden axe dropped by a bot 2 weeks prior
Oh i have no doubt.
I guese my point is that I dunno, id legit feel extremely guilty if I had a tool like that and didnt make it available to server owners
they're hypixel
They have NDAs and noncompetes for everything
And they're paid well enough for that kind of stuff
There's also a ton of core logic that hooks into their spigot fork
Oh yeah no doubt fr.
But like I dunno I feel in development in general sharing of big break throughs that are not competing, but complimentary to the community as a whole is just good sportsmenship.
E.g: When Hinge did Video based face verification and then shared it with other dating apps by letting the company they contracted have sale rights
E.g: Imagine someone took Foila for paper tommorow and somehow made region borders just work (so no need for merging) so it ends up as true multithreading? Then imagine they made that proprietry NDA CIA mega National Treasure Davinci code secret shit?
It'd be incredibly bad etiquette imo
Well
Imagine someone's paying you to make a DRM software so that your game isn't crackable
And they're paying you a ton
Would you really license it out?
I respect the analogy but i'd argue as we are all just working within the same game / community, something like anti Xray isnt gonna hurt the bottom lines of any one server if spread out
Well
What if you had a magic folia fork made for 1.8 and your anti-xray is closely coupled with your fork?
Would you go out of your way, during work ours, to work on making a public version of it?
Hypixel isn't a FOSS company
That is utterly fair
And i mean props for them showing some of the technical specs i guese
Send me a link when you get to the point PRs and branching would help 🙂
Eh might as well
Ideally I'd make this multi-platform but whatever
I might just make a crappy common module
Interface structure go brt
yeah every time I decide to do something multi-platform things nuke themselves
You looked into abstract factory pattern?
Yuh
thing is there are some things that are hard to make multi-platform
Like I started making my minigamelib multi-platform so it supports minestom
but there's literally nothing I can do
Because all the bukkit events don't match minestom events
And I'd have to write so much multi-platform code that it's like 5x bigger than just rewriting the spigot base
Yes
My advice? Make it all abstract. Like every aspect. Infact one sec lemme grab something
Screenshot of essentials
so many interfaces n abstract classes
Hey epic you want to write code to save and load entire sections of world to a database
Kek
Sometimes its not the ammount, but where they are.
E.g: Because of the highlighted classes, this plugin could be expanded to literally any skill based, item based, or entity based plugin api.
Because the Legend is an Empty SkillHolder (it will be populated with progression interface based methods in the not too distant future) it can be expanded to other entities, items, locations, god dang furniture if I wanted.
If you are gonna do multi platform projects, id highly suggest doing UML for at least the interfaces side of the project as it helps with the whole "have i actually designed this structure to be easily expanded to other platforms"
last time I used a uml generator it made a 25gb png
I might not have it
It is on ultimate and shift ctrl alt u
hm
Yeah I don't have ultimate for whatever reason
Can't bother reinstalling intellij
God the extra functionality tho
I don't use it
If ur going into the domain of multi platform software, I would learn some of them :L
Just imo foc
ofc
hmm how the fuck can I make this super simple
Oo there's a super hacky way of doing this that allows me to wrap entities
Yours or third party.
Either way the person who made the plugin didn't add any meaningful exceptions to the start up process
your pom is bad
what do you have
it also literally tells you the issue
read the error in full
not much of a coder here 🤣
"Non-parsable POM"
"Expected but found"
yes but idk how to get the correct one
configuring it gives another error
hey thats my friend
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies> ```
its the spigot one
is that all of it
yes
"In order to access the Spigot API using Maven, developers need to add both of the following to the pom.xml: 1) the Spigot Maven repository and 2) the Spigot API artifact. These additions are excerpted in the following code snippet:"
emphasis mine
what is the spigot api artifact
i just downloaded maven then set up the system variables
there was no pom.xml..
what ide are you using
eclipse
oh ok
click on new
new project
i think
then there should be a maven folder
and im going to find a tutorial
i understand how to do public booleans, ints, etc and save it to a file, but how do i save "Material SaveBlock = block.getType();" to a file?
how are you saving the primitives to a file?
heres my playerstats.java. https://pastebin.com/nMYuXgfW
to save and load it i put this in the server start and stop https://pastebin.com/aZvT57iA
that should be everything you need to do it yourself
@orchid trout i did it and its the same error
wat error
one sec let me blur my name
can u show your pom
<modelVersion>4.0.0</modelVersion>
<groupId>com.masai</groupId>
<artifactId>hibernatedaoapp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<description> </description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4</version><!--change this value depending on the version or use LATEST-->
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies> ```
you are not closing your <project> tag
should i put it at the very bottom or at the ending of <project>
very bottom
ok
it jsut gave me this now https://cdn.discordapp.com/attachments/730993330170888212/1140494112232054804/image.png
that seems like a project error
i dont use eclipse so i dont think i'll be able to help you with that
reload maven
i can send you what it gave me in command prompt
oh your version is not valid
how do i set it to 1.19.4
it should be 1.19.4-R0.1-SNAPSHOT
alright
3
ok so i mvn clean installed, and it gave me a compiled jar only with the pom not the entire folder
what's your project structure?
it should look something similar to that
except replace com.datasiqn.arcadia with your own group and artifact
eclipse should've done that for you which is weird
erm
public static @NotNull String colorizeHex(@NotNull String string) {
Matcher matcher = HEX_PATTERN.matcher(string);
while (matcher.find()) {
final String hexString = matcher.group(1);
string = string.replace("&#" + hexString, ChatColor.of(hexString) + "");
matcher = HEX_PATTERN.matcher(string);
}
return colorize(string);
}```
java.lang.IllegalArgumentException: Could not parse ChatColor FF0000
oh
i see why
idk the difference
they are build tools used to compile jars
if you have one you don't need the other
i think eclipse should have a button to just compile
why tf is matcher.group(1); returning FF0000 but matcher.group(0); is returning &#FF0000
am i missing something
do u know where it is
based on what crackma said i assume you right click your project
and there should be a gradle tab
nope nvm
that is for reloading the project
there should be a tab somewhere called "Gradle Tasks"
right click the build one and run that task
i dont see no gradle tasks
nvm fixed it i messed up my regex
ok nvm i guess my eclipse broke
try running gradlew build in the project's root directory @copper lake
paste your build.gradle
help
also it seems that you didn't write that code
is there any reason why you are manually compiling?
HELP
?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!
yes
It’s an open source GitHub
No
is it like a premiun resource then?
Yeah one sec
https://github.com/Realizedd/DE-arenaregen @worldly ice
why does YamlConfiguraiton.getLocation() returns null?
ok so looks like that project uses nms @copper lake
which would require you to run build tools for each version it supports
or run a script that does it for you
yeah that works too
so what should I do
?bt
this honestly seems like a lot of effort for a $7 plugin
I tried doing the build tools but it just says unable to access
no money
your status says otherwise
ITs 6.42 cents a year
?paste
#help-development message anyone?
solid 6am here
Scoreboard Help
Hello, its possible to convert an arraylist (and his instances) with gson?
ye should be, but i never tried it https://stackoverflow.com/questions/18857884/how-to-convert-arraylist-of-custom-class-to-jsonarray-in-java
in the ClientboundBlockDestructionPacket packet
what does id refer to?
the id of the entity that is destroying it
ohh ty
which apparently can just be some random value
and doesn't actually need to be a valid id
and if i just do
String json = gson.toJson(dataMap);
that's work? (also for theys instances in the arrraylist?)
should work but idk
I was porting mcMMO to folia in preperation for a PR. Here is the GitHub for it https://github.com/Yomamaeatstoes/mcMMO-Folia/tree/replace-bukkit-schedulars. Although I did encounter a issue ( https://mclo.gs/Cd7hfNC ) I was wondering what class this error was from? Also if you could provide me with the scheduler I would appreciated that as well. Here is the library I am using to replace the schedulers https://github.com/TechnicallyCoded/FoliaLib/tree/dev
?whereami
This is a kinda cute vid ngl.
im using maven and i have to right click the project -> run as -> maven install
you can also just use "install" in the maven tab
refactored all my NMS stuff and it didn't break anything 🥲
his tps is higher than twenty 🤔
and yet people claim spigot is poorly optimized 🥲
H,i am having some issues with this "Pathfinder" for my pets when i try to go up they just go and trying getting in up on me but not working so it goes from one corner to another or just sometimes by moving they bug totally (and the animation is laggy), I tried fixing them by myself but I just lost hope after the 10th try
https://paste.md-5.net/acajaceweb.cs
Im doing an armorstand / pet following the player and im doing it with a runner, the armorstands follow the player around and it does nothing the armor stand on its own
no particles nothing
just following and watching
nms to respawn the player?
just that nothing else
Not sure thats generally done using teleports. It will probably look real snappy
yes it does
Most "pet" plugins do this with actual pathfindergoals i think. But if u go up a ladder for example i believe it will just teleport when u go too far
probably but doing it with pathfinder will result harder i need to make a custom entity armor stand, and some config are done while creating it so probably not the best for me
private Map<Player, Boolean> playersWithWaterAbility = new HashMap<>();
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack itemInHand = player.getInventory().getItemInMainHand();
if (itemInHand != null && itemInHand.getItemMeta().getDisplayName().equals(ChatColor.AQUA+"Water Ability")) {
if (!playersWithWaterAbility.containsKey(player)) {
playersWithWaterAbility.put(player, true);
player.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, Integer.MAX_VALUE, 0, false, false));
ItemStack glassHelmet = WaterAbilityItem.createWaterItem();
player.getInventory().setHelmet(glassHelmet);
player.getInventory().setItemInMainHand(null); // Remove from hand
event.setCancelled(true); // Prevent default interaction
} else {
playersWithWaterAbility.remove(player);
player.getInventory().setHelmet(null);
event.setCancelled(true);
}
}
}```
How can I remove the effect when the player removes the item from their head
(Assuming this is for survival, not some minigame)
Don't store reference to Player, use UUID instead.
Or PDC might be good idea here as well, you would not have to deal with the player leaving/joining.
Don't test for custom items with displayname, what would happen if I rename the item in an anvil ? Use PDC instead.
To actually answer your question: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/LivingEntity.html#removePotionEffect(org.bukkit.potion.PotionEffectType)
Basically I know how to remove the effect from the player but I don't know how to check if the player has removed the item from their head
That would be https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/InventoryInteractEvent.html
Since spigot does not have armor events
i had an idea about this, if i make a wolf invisible without sounds? should work just fine? (stupid idea)
hi, is retrieving all the contents of a redis cache a bad thing to be avoided (at a certain event)? or is it good?
I made a plugin to add attrebute to the player when he has a certain item in his left hand, but there are bugs. there is a chance that the effect will not be removed when quickly switching between hands. Tell me how to fix
player attribute
Yeah just apply it to the item directly
a?
ItemMeta has methods for that
when I addDefaults in for loop and when for loop end, I save config, why it does not show? If I am right, it should add paths with values there if they are not present?
give the same characteristics to the item???
Yes
but how will it affect the player
addDefaults doesn’t any actually add anything to the config
Put a default config in your jar and use saveDefaultConfig
When they hold it they get the attributes
According to MemoryConfiguration it should do
I am not using configuration from plugin
Then add a default file to your jar and use saveResource
addDefaults just adds invisible default values that will be used if no value is defined
Well... I guess I will have to do it harder way
as I already said, it is not configuration from plugin
What is it then
StaffProtect/addons/global_config.yml
You can still saveResource that
Alright then you can use the internal stuff saveResource uses
well I would like but I do not understand it :/
It’s basically just Class.getResource
https://pastes.dev/7MNemiHsrl
Here you can look on it
It uses basically similar things although I added completable future and saving in reload config
For more context, you can look on this
https://github.com/ExperiencePowered/StaffProtect/blob/Jakush/API/src/main/java/net/experience/powered/staffprotect/addons/GlobalConfiguration.java
wait wait means the attributes will be removed by themselves if the item is not in the hand ??
does it happen automatically?
yes
oh my god
you have to rewrite the whole plugin(
I have everything set to manual change
Is there anything in the documentation about this?
What do you need to know
It's vanilla, no need for spigot to document this
^
So MC wiki might answer
Hi im trying using XParticle with the method
blackSun(plugin, 1, 1, 10, ParticleDisplay);
What is particle display and i need to use a new instance or there's something else?
and if I want to change the attributes, let's say multiply them by 2 in the process of finding an object in the left hand, will this affect the player?
or need update
I don't get what you mean by "process of finding an object in the left hand"
and needing an update
If you change the attribute of the item the player will obviously be affected by the change.
But
I heard the phrase - mistakes make us stronger but damn these mistakes are so expensive
I assume they mean changing the attributes while the player is holding it
hi, is retrieving all the contents of a redis cache a bad thing to be avoided (at a certain event)? or is it good?
I would guess they would update immediately but idk
API?
XSeries
Oh I see
Particle display is from com.cryptomorin.xseries.particles package
yes
docs is not updated
from what I see in this class you can use either
ParticleDisplay.of(Particle);
or
ParticleDisplay.display(Location, Particle);
i think more appropriate ParticleDisplay.of
I mean, I never heard of that plugin so I am just searching for some methods there, although better would be to make plugin on latest version
the fact im using 1.20.1
1.13 maybe
the api is updated on last version not the wiki tho
If you’re using 1.20 why not just use the spigot api
works the method
What
I did not understand it as well
what does Caused by: java.lang.IllegalStateException: zip file closed means?
?paste full stacktrace
thanks
its finally done
a community contributor of MTVehicles decided to care and add the methods i need to the api
(he updates the plugin always, the owner is dead D:)
Rip owner
.
is it possible to create an inventory with the title of Component?
i need to add font to title and use translate
Yes and no
how is that?
Yes you can with NMS
Yes you can with the api once Chocos PR gets merged
No you can’t with the api right now
Choco MD, please, merge faster.
It’s up to md
is it normal that glint dissapears when i rename an item with custom enchant?
Is the enchant still present
I’m going to guess mc recognizes it’s not a proper enchantment and yeets it
nope
I think that is spigot specific, it likes to delete "invalid" enchants
in vanilla, you can put close to anything into nbt and it will keep it
It’s not just in NBT tho
It’s in the enchantment tag, which is managed by mc
Especially in the anvil gui
am i doing something wrong or intellij has a glitch
im literally catching it?
oh i see
just use getOrDefault instead of using a try/catch
i gotta use the Integer class
pdc.getOrDefault(getKey(), NO_LEVEL);
I am confused on why this isn't working. Currently using 5.1.0 of protocollib.
I am attempting to make an armorstand invisible
private void setInvisible(Player player) {
try {
PacketContainer metaDataPacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA);
metaDataPacket.getIntegers().write(0, entityId);
WrappedDataWatcher dataWatcher = new WrappedDataWatcher(metaDataPacket.getWatchableCollectionModifier().read(0));
dataWatcher.setObject(new WrappedDataWatcher.WrappedDataWatcherObject(0, WrappedDataWatcher.Registry.get(Byte.class)), (byte) 0x20);
metaDataPacket.getWatchableCollectionModifier().writeSafely(0, dataWatcher.getWatchableObjects());
ProtocolLibrary.getProtocolManager().sendServerPacket(player, metaDataPacket);
} catch (Exception err) {
err.printStackTrace();
}
}```
Here’s the error
```java
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @5ce65a89)```
Seems to be throwing this error.
?paste the full stacktrace
Already went through this
After 1.19 they changed the format
You'll want a list of wrappeddatavalues and skip the watcher entirely
that's what happens when people use protocollib instead of just constructing the packet normally
Nms changed
yeah, using the constructor one can easily see that
For future projects I will just normally construct the packets, but I am too far in to redo the whole builder.
Thanks
suggest an idea, I'm making a plugin for spawning structures, but I need to somehow get (select) certain biomes and search out all their locations
learned how to convert primitives to strings so far, now i know how to save to config, just need to convert them to material and I figured it out
what event is responsible for moving items from a menu to a player inventory?
i want to make it so , player cant drag . and drop item in player inventory if he has KitEditor menu open .
just wana the event name , using old version
does AsyncPlayerPreLoginEvent get called before the player session is verified?
InventoryClickEvent
i dont want to stop items from being moved in the same inventory
also you might want to check for InventoryDragEvent too
oky
you need to check if the destination inventory is not the top one
there is getInventory , and getView?
hey were i can get minecraft code in tlauncher?
gonna use InventoryClickEvent
or this not exists
it works , but 3/5 of the times it pass ,
because you didn;t also check the drag event
If you click the mouse and accidentally move the mouse a single pixel it counts as a drag
alright
how to make a listener so if player places a shulker box it drops random item from config, also the chance per item is in config
BlockPlaceEvent
I am making my own utility and I want to make an optimized code, rate the quality
1/10
what to add
Bro coding in a 4gb 8 year old pc is unbearable
Like it freezes every 10 minutes
It’s a packet entity, the armor stand isn’t real so spigot doesn’t see it.
I did create my own PacketArmorStand class so it’s somewhat bareable for spigot to recognize and see.
the IntStream seems pretty overkill, also you hardcoded Y 0 instead of WorldInfo#getMinBuildHeight()
stream api is redundant?
i'd just use World#getHighestBlockAt
oh ok i fix
it does not take into account foliage
yeah true
btw you can also just use Material#isAir() instead of checking VOID, CAVE and normal AIR
is there a commandExecution event?
@EventHandler
public void onReport(somethingidkcommanexecution event) {
}```
no
yeah but that doesn't allow you to get the actual command
ik I explain in the worst way possible
public void onReport(asdasdiasuidaisdiasd event) {
DiscordWebhook wh = new DiscordWebhook(url);
String messgage = String.format(message, event.getPlayer().getDisplayName());
wh.setContent(messgage);
try {
wh.execute();
} catch (MalformedURLException e) {
System.out.println("[MoreReports] Invalid webhook URL");
} catch (IOException e) {
e.printStackTrace();
}
}
}```
something like this
so do I use PlayerCommandPreprocessevent?
oh yeah if you just want to see which commands they entered, then the PlayerCommandPreProcessEvent is fine
alright thanks man
Hello, I have an issue with the stonecutter. I've added custom head crafts to the stonecutter, but they are not displaying in the correct order. The order in which I added them is "books", "mailbox", "beer", "cake", "test," but they are showing up in a random order. I'm wondering if it might be in alphabetical order. However, when I select the first head, which should be "books," it correctly crafts the "books" head. It's just displaying the wrong head in the selection menu. I've searched online, but I haven't found a similar issue. Does anyone have a solution?
There is no solution. You cannot have multiple stonecutter recipes that output the same item type
It’s also not a vanilla bug because you can’t define recipes like that in vanilla
Read this for a full explanation of why it isn’t fixable and isn’t a vanilla bug. https://github.com/PaperMC/Paper/issues/9499#issuecomment-1636945917
How does the game display them? Is it based on alphabetical order or something similar? If I named my heads "a_books" and "b_cake," for example, would it be possible to manipulate the in-game display order?
Read the issue I linked
I hadn't noticed, thank you.
The order is set by the client, and it’s based on the output item type
just the item type, not anything custom about it
So if there are recipes with the same output item type, the order is undefined
stupid vanilla
I mean vanilla has no concept of custom recipes that output items with nbt. You can’t create them with datapacks
Until you can, this isn’t a vanilla issue.
yeah but mojang probably knows that plugins / mods etc would add custom recipes
Which is why it’d be a “feature request” not a bug report
Mods can add them
They just have to fix the client side too
so?
client mods, yes