#help-development
1 messages Β· Page 424 of 1
jumpscare
text wall π
Sorry
immediately just sweeped my post away lol.
.
you just had to cancel the event
still taking fire location
What exactly do you want in dumb dumb list form,
Okay so I want to make that if grass_block is on fire then change this grass_block on to another one after certain of time, like the BlockBurnEvent make but BlockBurnEvent will not work with blocks that not already with that future
it seems like getblock should return the block you clicked but you think its the fire block itself?
anyone know how to make an item look enchanted but its not
so like it has the glint but has no enchanment lore thing
add enchant and itemflag
ItemStack item = ...
ItemMeta meta = item.getItemMeta();
meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
Sounds like a complete able future that calls a method that checks the block beneath the fire after x seconds to me
where do i do this
ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
ItemMeta meta = item.getItemMeta();
meta.addEnchant(Enchantment.DAMAGE_ALL, 1, true);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
where you want to want glint
or maybe when u give player an item
yes getblock take fire of block not the one under it change the fire not block under, I get how to change location of that:
@EventHandler
public void OnBlockIgnite(final BlockIgniteEvent event) {
Block block = event.getBlock();
Location location = block.getLocation();
location.subtract(0, 1, 0);
if (event.getCause() != BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL) return;
OraxenBlocks.place("ash_block", location);
}
}
But can't get idea how now I can check if that block under that fire is a dirt
where you want it to run
yes
if you want to show glint you add enchantment and then hide the enchantment lore
u figure the rest out
ok
I just use a custom enchantment for glow
So it doesnt conflict with any additional actual enchantments
true
how do i do that
is it in server file configs or smth
how do you create custom enchantments nowadays? didn't it get deprecated (old way)
I think you can get a block at a location using the World
https://github.com/JEFF-Media-GbR/JeffLib/tree/master/core/src/main/java/com/jeff_media/jefflib/internal/glowenchantment you extend Enchantment and then register it
ok so i really have to close my server, drag over the remapped jar and then boot the server back up?
my brain isnt working fully, so i just need someone to confirm this
Immutable is the thing where you can pass something, modify it and not need to return it right? and then ItemMetas are immutable
use artifacts
with plugin manager
i am not using intellji
then u can compile and then reload the plugin
then use it
i just got away from it tho π¦
I'm sure there is a constructor for block that uses coordinates no?
Get the location of the fire, fhen get the block at the fires coordinates -1
*-1 y
Thank you I get it
srry for time consum
can i totally not steal this
is there a way to completely hide an entity's name
i'm trying to flip an entity by making it dinnerbone
but when i hover over the entity i can see its name
entity.setCustomNameVisible(false); only makes it so that it's not shown when it's not hovered
Cool buy the tiniest bit wreckless. If I had a nickel for every bugged enchantment plugin I've mucked with.
Point is that if its ur own code at fault, easy fix.
Library busted? Then yikes π
Only a smidge though
Enchantments are crazy hard to do right
yeah I was about to say, if its hard there is usually a library for it
Although I myself got out lucky due to the CE plugin I am maintaining is a bit cheating in this regard
i don't want to work on my ce plugin but it's gone too far i can't stop
The only "bug" I have is some claim protection plugins not working properly
And the anvil, oh the anvils.
imo the anvil was the hardest to get right
But just not registering the enchantments to bukkit works nicely
i had to rewrite it like 5 times
yeah no f anvils
wait you don't register them
Yep - the enchantments don't really exist
do you just lore-pdc them
Yeah ... mainly the former because the plugin stems from 1.8 days
i have so many obs videos of me making progress on that plugin back when i was coding it in 1.8
I did look into just slowly converting everything into PDC but opted not to
but even before i released it i recoded it in 1.17 lmao
I only forked the plugin after spigot broke how lores are stored back in 1.15.0
ItemStack item = pHandler.LootBlock(p, blockLoc);
Random r = new Random();
p.sendMessage(LootMessages[r.nextInt(LootMessages.length)] + item.getItemMeta().getDisplayName() + "!");
Why does this send an empty item?
The string is just "You looted !"
The random string works
but the item doesn't
are you coding in c# somehow
what are these naming convs
but other than that the item might just not have a display name ig
there is just one inaccuracy when it comes to naming conventions
but it hurts the eyes instantly
What? It's literally java
Well perhaps 2 inaccuracies and one blunder if I put it more bluntly
Would it be possible to give any mob the ai of a wolf, meaning it fighs for you and follows you. I'm trying to give the player the ability to basically turn every mob into a marionette and make that marionette behave like a wolf would
i spent like 20 seconds trying to figure out why is he using a class as an array
then please follow java naming principles
No
that was a book move
and that is a resignation
Does the item have a custom name?
From your comments, yes
Actually no - two blunders.
What do you mean with custom name
Well I take it as a no.
As in, custom name via anvil, or custom name via lang file
Ugh - I am afraid I have to tell you something
I really hoped it would never come to it, but I guess some things have to happen: You need to use bungee-chat.
No
Then adventure it is!
Otherwise you are out of options
You can't send translateable components that [Player#sendMessage] way
Ill just ask AI
AI will not be aware of your issue
Your issue is that you want to send a translation component @undone yarrow
Or Ill just look it up
Therefore you need to use components: So either use Bungee-chat or Adventure
of course you can encode the json yourself but please don't.
And Adventure is off the table judging by the spigot's paper police that will come knocking any moment now...
How can it be so difficult to get the name of an item
Languages?
Fuck languages
Only English language
People who join the server'll have to switch to en_us anyways as that's what the resource pack uses
The server only knows the I18N name .. so it'll be something like itemstack.name.diamond_sword (I made that up)
Hmm
Although to be honest, providing I18N to plugins is not that hard...
It's just something you need to do from day 1
I'll just say they found an item
Alternatively you can just hard-code the name in the loot table
True, but Im also working with custom model data and custom items
so it's just going to get harder
by setting a custom name and resetting the chat colors or the name before (so it'll not be cursive)
Plus it's going to be a lot of different items eventually
Oh crap, now that I think of it, I need my plugin to use custommodeldata. How can I specify custom model data when using a command to specify an item?
Currently Im using this to add a particle and item to a block, though how would I also include custommodeldata when specifying an item?
case "add" -> {
if (args.length == 4) {
// convert args[1] to particle
Particle particle = validParticles.contains(args[1].toUpperCase()) ? Particle.valueOf(args[1].toUpperCase()) : Particle.ASH;
// convert args[2] to int
int cooldown = Integer.parseInt(args[2]);
// convert args[3] to List<ItemStack>
List<ItemStack> items = new ArrayList<>();
String[] itemStrings = args[3].split(",");
for (String itemString : itemStrings) {
Material material = Material.matchMaterial(itemString.trim());
if (material != null) {
ItemStack item = new ItemStack(material);
items.add(item);
}
}
ChestObject chest = new ChestObject(false, blockLoc, particle, cooldown, items);
pHandler.AddLoc(chest, sender);
return true;
}```
The command looks something like /sc add SCRAPE 5 sand,dirt,orange_dye
and it needs to become /sc add SCRAPE 5 sand{CustomModelData:4},dirt{CustomModelData:200},orange_dye
import org.bukkit.craftbukkit.v1_19_R2.CraftServer the R2 is means this is 1.19.2?
ok well i think ive messed up my versions or something cause my nms is not working as intended
ServerGamePacketListenerImpl connection = ((CraftPlayer) player).getHandle().connection;
connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc));
connection.send(new ClientboundAddPlayerPacket(npc));
connection.send(new ClientboundRotateHeadPacket(npc, (byte) (npc.getBukkitYaw() * 256 / 360)));
}``` I'm not sure if ClientboundAddPlayerPacket is the correct packet for sending the physical player
1.19.1 = R1, 1.19.2 & 1.19.3 = R2, 1.19.4 = R3
ok perfect
Are you telling me you didn't rewrite the entire anvil code for custom enchants?
I am creating a team and putting the player and an entity inside, but the entity still can and will attack the player
ScoreboardManager manager = Bukkit.getScoreboardManager();
Scoreboard board = manager.getNewScoreboard();
team = board.registerNewTeam(getPlayer().getName() + " -- " + getPlayer().getUniqueId());
team.addEntry(getPlayer().getUniqueId().toString());
team.setDisplayName("display name");
team.setCanSeeFriendlyInvisibles(true);
team.setAllowFriendlyFire(false);
team.addEntry(entity.getUniqueId().toString());
teams do not prevent agro
afaik entities don't give a shit about teams
you alkso have to set them to the same team
I set allowFriendlyFire to false though
thats between players, pvp
they are being added to the same team
If I try it using vanilla cmds it works
yeah , normal entities like monsters dont follow team logic
Then how could I make them not being able to attack the player
I have no clue srry
Yo, i need some thinking juice from someone. So i'm trying to make multiple lines in a "Hologram", any idea how i would start of?
make multiple armor stands under each other
How can I fix that? If I tempban a player that doesn't exist I get the error
Code: https://paste.md-5.net/ivezawiyon.java
Error: https://paste.md-5.net/azolutuyoq.md
iirc spacing them out by 0.25 will make them fit perfectly as though they are 2 lines together
check if its null before you ban them?
also if you read the error you will know what is null specifically
I've never met anyone named null in my life
exactly
missed opportunity tbh im naming my kid null
well
if i ever have them 
then he will always be returned early
yea true
is there a way to remove this ? https://gyazo.com/92b8d9d4d9605b93790039cea87e9459
the blank text above the head
is chatgpt broken?
when is it not
cant submit anything
ye i cant either
they are at capacity
try to relog
it will show that its full
just buy the upgrade π€·
can someone explain to me how to depend on a plugin using maven? There's no explicit <dependency> tags in the readme but it does have specific api events
Some plugins may provide an API without being hosted on maven central (or any other repo), if that's the case you will have to import manually the plugin jar file
This might help you
https://stackoverflow.com/a/2229775
shouldnt it still be accessible via https://jitpack.io
don't use system scope, its deprecated
Only if the plugin owner has it
use jitpack (if on github) or mvn install it
Really? IntellIJ doesn't mark it as deprecated
the project is on github hence me being a bit annoyed about this message
Could not find artifact com.github.nulli0n:ExcellentCrates-spigot:jar:master-SNAPSHOT in jitpack.io
The website says using 'master-SHAPSHOT' just grabs latest but apparantly it doesnt
system scopes arenβt meant for what you are using it for, guaranteed
That's because the plugin owner must have a repo in jitpack
That synchronizes with his github project
It's a paid service
srsly
Yes
alright let me rephrase my question
how do i maven install a plugin as dependency
@hazy parrot
you said using system is deprecated
Thereβs an install-file command
i mean the issue i have is importing it in the pom
can you send me gh link
no, jitpack compiles it from github
Since when was jitpack a paid service btw
and your pom ?
because itβs literally been free and available for any public GitHub repo since I knew of it
it still is ?
When I tried to use it it told me to pay π
couldnt find
I just revised, and I don't know what I did, but you are right, it's not paid
the frustrating thing is that to the best of my knowledge jitpack does find the user, and i did everyhting as described
plus theres no requirement for it to have a release
so why isnt master-SNAPSHOT as version working?
Just use jitpack to generate the dependency for you
@smoky oak the jitpack build is not building
jitpack is nice to pull from github
so thats the issue then?
how do i fix that
went back to intellij...
Try using <artifactId>ExcellentCrates</artifactId>
Instead of ExcellentCrates-spigot
auth faile
I think that repository is not compiling correctly
Acording to its latest compile log: https://www.jitpack.io/com/github/nulli0n/ExcellentCrates-spigot/f997898fea/build.log
might need to mvn install it urself
i mean the repo i have to put into <repositories>
yeah i dont see a repo
the api or the plugin isnt hosted anywhere that you can download it/add it to ur project easily
one moment
the plugin is on spigotmc
lol ofc its alex blog again
As system scope is deprecated, you could try to git clone and do a maven install to install it on your local repository
cmd, gotta install maven first
?maven
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
if u give me like 5 min i can stick it on a repo
Use that guide, it's very easy to follow
can i make it spit out the local maven repo path?
to make sure it points to .m2?
nvmind found it
.........uuuummm
I installed the jar file with maven. It's now telling me that a dependency of the file im trying to install couldn't be obtained
how is the plugin so decent but the code is so bad
what command did you run to mvn install it
like in the blog
mvn install:install-file -Dfile=D:\Server\plugins\ExcellentCrates-4.1.6.jar -DgroupId=com.github.nulli0n -DartifactId=ExcellentCrates -Dversion=4.1.6 -Dpackaging=ja
dont tell me i need to do this for every dependency
make it whatever ur userhome is
saw the D:\ and didnt know if anything else was different
I have this code in my command trigger. However, the p is red in @p: Bukkit.selectEntities(sender, β@pβ);
F
real quick which updated added the ability to add comments to configuration files again?
was it 1.19?
I don't think it's possible, I think you can only use the header comment
it's possible as of recently
I'm using it
I just forgot it isn't there for older versions
I think 1.18.2 has it at the very least
Are you realling telling me that yml of spigotmc now supports comments?
yep
π
pets magma's beard.
bro
ever heard of consent you freak?
no
you said no but yours eyes said yes.
I think magma is having a slight moment.
Next version of elite mobs is going to have yaml comments up the wazoo
buddy
you mean the version from a week ago
hahah
I'm just patching the fact I forgot older versions don't have it
I've found you can actually use FileConfiguration#parseComments which parses a boolean as argument and by default is true
π
love me some comments boys
you'll be happy to know that's one file of
Jesus magma, comments much?
can i assume that it wont throw exceptions if run on older software cuz of that version checker? When was that introduced?
16
and not the largest
nor even the whole file
good
now let me flip this switch
I should find a way to count how many files this plugin has anyway
I have no clue
Now it will make sense to shade spigotmc in your plugin so you can use configuration comments
π
Plus standalone plugin
All pluses
cant u just go into explorer right click and go propertie
I don't have a 100% full setup on my local
FileConfiguration storage = it.zerotwo.moneyprinter.MoneyPrinter.getStorage();
storage.set("moneyprinter." + moneyPrinter + ".UUID", moneyPrinter.toString());
try {
storage.save("storage.yml");
event.getPlayer().sendMessage("Registred");
} catch (Exception e) {
}
Hi, i don't know why but it doesn't save
The purple devil smiling face is the best emoji an human could have ever create
alright i'm downloading from remote
quick
everyone place your bets, how many files are in the configuration folder of my plugin?
my friend the eggplant would disagree. π
I'm going to guess 2k
42
this is good, it's still calculating the size
ok huh the transfer says it's going to take 1h
The number 42 is, in The Hitchhiker's Guide to the Galaxy by Douglas Adams, the "Answer to the Ultimate Question of Life, the Universe, and Everything," calculated by an enormous supercomputer named Deep Thought over a period of 7.5 million years.
yes
That's good, but not better than π₯Ά
ok maybe more than 2k
2048
Dont you have a full version set up on matecraft?
that's what I'm downloading
which was the wrong answer due to Arthur Dents arrival
there's something like 50+ subfolders
actually come to think of it
there's probably over 100 subfolders
Isnt there a magic command you can run in the server terminal to get it to tell you how many folders / files are there
probably
Also I cant type for beans tonight
yo vert did you see my latest amazing top tier video
link?
ok we're about 1/3 done according to the preview and there's already 411 files
I try and keep up where i can but get a bit bogged down.
wow I can't believe you haven't seen it, it's the only thing worth seeing
you'll be pulling your eyes out of your sockets after you see it because you'll be done with seeing in general, there will be no point to it
just look my name up I don't want to self-promote
we are up to 69 folders
Nice
Bump
How can I make it thundering in a world. World#setThundering(true) doesn't seem to work for me
OMG THE BEARD.
that's what they all say
whats the biome ur in
deserts dont get rain
I was in a plains biome
lol
The random events from Rs were so janky
it is not sending me even the "here1" what do i do?
https://paste.md-5.net/hocupateva.cs
set teh weather first
mana.mana oh no
reply.reply.reply.reply.reply("maybe you shouldn't do that");
Supposed to stop bots but people just ended up working around them and pretty much made them useless, that and they kept killing people who were afk
still iconic
and they were rare enough that they weren't that much of an issue anyhow
Yeah should make that a plugin
it's a feature in mine
I even recreated the ent one specifically
so do you know why it aint work or no?
the maze one would be good.
I think it's a 1/10000 chance of spawning two vexes
build it out of iron bars
when destroying log blocks
WHAT DOES THIS ALL MEAN?!?! π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯ π₯
satan's wishes are granted
it means that it never meets the conditions for the first debug message
on a scale from 10 to 10 explain why my video is a 10 using less than 200 words
42
My answer to everything
haha give a scrap about
I brute force everything I do
I'm a bit of a comedian you see
Well you must have a sore arse.
How hard are the enchantment bosses?
tbh I find them very enjoyable and rarely die to them so... probably quite hard for the average non-chad gamer
Me, a perfectionist who enjoys stupidly difficult challenges
go solo a sanctum then
I played a multiplayer rogue like which had runes that amplified my damage but only when I wore no armor or anything defensive
So the whole time I played like an elden ring player
glass cannon builds can be fun
risk of rain 2 has a few ways of doing it that are a lot of fun
there's a cursed item that doubles your damage and halves your health
and it stacks as much as you want
not all blue items are that fun unfortunately
When I use Bukkit.selectEntities, can I use something like @a[tag=foo]?
If not, how can I?
yes
how can I create hitboxes like this?
mods
I dont think it is a mod
it cant be
nooooooooooo
I always see this with vanilla blocks
I dont think it is a mod
and?
I need it to make the player walk in water
Yeah, that's the create mod
noooooooooooooooooooooooooooooooo
i think that is not a vanilla block
?
It doesn't work for me. Everything worked fine with just @a and @p, but when I do something like @a[tag=test], it gives this error: https://paste.md-5.net/yudowenumi.bash
uhh
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:316) ~[?:?]
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:258) ~[?:?]
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:327) ~[?:?]
at java.util.jar.JarVerifier.update(JarVerifier.java:239) ~[?:?]
at java.util.jar.JarFile.initializeVerifier(JarFile.java:767) ~[?:?]
at java.util.jar.JarFile.getInputStream(JarFile.java:852) ~[?:?]
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:173) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:381) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:224) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:928) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:273) ~[server.jar:3096a-Spigot-9fb885e-af1a232]
at java.lang.Thread.run(Thread.java:829) [?:?]
What is this ?
That error isn't caused by Bukkit#selectEntities(). DialogueCommand line 35 is getting a value at a non-existent index of an ArrayList
?paste
paste it in pastebin
are you coding a plugin yourself?
?
?paste
but what need is there of a photo when you can see perfectly in a world
and with respect who are you?
and in a photo the fault would not be seen exactly
I am a developer with other 10 years experience and have done and dealt with more projects then i care to count. I suggest you learn to follow the rules and also upload images so people can see them with out downloading a file. As that is sketchy as hell.
you also didn't answer me, are you creating a plugin or are you a server owner?
please give context
why the heck are you sending stacktraces in docx files lmao
You opened it?
why wouldn't I?
Macros and viruses?
I'm on macOS and opening it with pages in read only mode
I just gave it a third check and there is nothing that determines that the user error you need to resolve has to be in image format
if you want support you should post the issue in a format that is not awful
I dont have to do shit son.
please be polite and refrain from profanity if you claim to be a professional of 10 years it must be that you must maintain respect
major coding beef
ΒΏ?
I am not aware of that
Yeah whatever.
how do i check if a plugin is installed i put into softdepend? I'm about 95% certain it crashed if its not present and i check if an instance of the softdepend plugin's main class is loaded
PluginManager.getPlugin
It's a conversion, not sure if that is a conversion
Whatever It is far too late for me. I should go to sleep
Well, if you think what you do is fine, but I ask that if you do not intend to help, please do not interfere. If you say you have experience, realize that complaining and not cooperating in helping is very unethical
so if(getPlugin(s) != null) you mean?
yeah, if it's != null it's installed
If you cant provide the information in a format that is deemed acceptable you are going to get 0 help and just told that you need to put it in a format, as others can understand. go do that and come back and perhaps you might get further.
Upload images to imgur or here in discord along with stack trace uploaded to the paste site and wait,simple enough.
um
can someone translate this?
The POM for <library> is invalid, transitive dependencies (if any) will not be available
paste the pom file?
<library> published a broken pom file
23:00 in germany?
arent they both?
ask the author of <library> to publish a proper pom.xml, in the meantime ignore it
Good afternoon, I want a moment of someone's time who can help me solve 2 problems that I have for my server. These 2 plugins give some messages that show errors. Unfortunately, I cannot include it in a photo since the code that shows the error It's something big and I need someone to know if purpur and protocollib is possible
(with all due respect, if you are going to answer my message and it is only with the intention of annoying, please do not screw up existence to maintain due respect)
why do you keep sending it as docx file
im not dumb enough to download that
oh my gosh
?paste
uh oh
tell that person to use paste
atleast use paste thing or make a gist
java.util.UnknownFormatConversionException: Conversion = 'p'
at org.bukkit.event.player.AsyncPlayerChatEvent.setFormat(AsyncPlayerChatEvent.java:105) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at Clans.ClientListener.chat(ClientListener.java:193) ~[Clans-0.4.5.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor319.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1934]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1934]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1934]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:414) ~[purpur-1.19.4.jar:git-Purpur-1934]
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:100) ~[purpur-1.19.4.jar:git-Purpur-1934]
at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2476) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2632) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$18(ServerGamePacketListenerImpl.java:2311) ~[?:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
that's their weird doxx file
?whereami too
Clearly my messages are being ignored, I am tired and off to bed
?paste
what did i say about sleep again?
I am not saying that I am stupid for not wanting to download, but rather that you are, with all due respect, something gross for not realizing that it is a world file
it's a docx file?!?!
i know what a word file is
i ALSO know that that doesnt mean anything
fucking macros that dont need to be enabled
i dont trust shit that aint in .txt exactly
again please give context, are you coding a plugin or are you just getting this error?
like what is this from
"yo guys why is my code not working" lol
fuck r u doing with ebook files
i wish i never joined this chat
only this channel is unmuted
u better dont
i only have trivia muted
I don't know, but these people don't have much respect, they just insult or interfere to bother and they think that those who speak Spanish were rude people
i have the server muted too but no other channels
π
no idea what you're talking about
i cant say i saw anyone call you rude for being spanish
but do you actually expect people to download your docx files?
why don't you just paste it
i dont even know who you are
yes
that's pretty shitty
yes like yes no or yes yes
nobody actually sets it back inaccessible
ok so lets fix it
so just return in the try
- you return null. you should rather rethrow the exceptioN
- you make public fields private by using setAccessible(false)
- you don't cache the fields anywhere
Hey so you probably get it way too much, but is there a faster way to build jars with buildtools?
This is the error that I have and I hope that another supposed gentleman with 10 years of experience does not come to bother
more ram maybe hahah?
get an amd epic
i mean you dont need to unless ur a server owner
Surely doing it one-by-one can't be the answer
Im trying to compile a plugin that needs em
the error is from the protocollib plugin
https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ReflUtils.java#L210 this is how I do it
ah, just make a batch script that iterates over a list
alex how does this actually work
why would this not work?
you can also get the line numbers etc like that
im not saying "how does this work its jank as hell" more of how does it even work it even work
it just uses the stacktrace
does it get the callers stacktrace elements? wait no thats not from the caller
it looks like getting a stack trace from thin air and then using some regex syntax then getting th class name
wdym from thin air? Thread.currentThread().getStackTrace() is clearly visible in the screenshot lol
yeah but whats generated the stacktrace
Nothing
Every method has a stack
yeah, otherwise it couldn't be called lol
every thread has one
til
Rather, every method adds a new scope to the stack
It's the reason your local variables get deleted after your method terminates
@gleaming vine
array = ( "1.18" , "1.18.1", "1.18.2" )
for i in "${array[@]}"
do
java -jar BuildTools -jar --rev $i
done
This is a very cursed method though ngl
You are expecting way too much of me but I appreciate the time you took to create that
im doing a batch script
paste in file, replace 'array' with versions you want to build, make file ending .sh
double click
wait hour
here's my buildtools script for 1.16 - 1.19: https://github.com/JEFF-Media-GbR/JeffLib/blob/master/run-buildtools.sh
done
why?
It just looks like it should break lol
2 is an undocumented magic number
You're throwing a RuntimeException
hoping that the caller is very sure about that number 
That too
imma copy that disclaimer so i dont lose it again
you have nothing on my item serializer
Wow I sincerely hate that
well
public class MyTest {
{
System.out.println(ClassUtils.getCurrentClassName());
}
this prints "MyTest"
private static byte[] stackToByte(ItemStack[] stack){
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
BukkitObjectOutputStream oos = new BukkitObjectOutputStream(bos);
oos.writeInt(stack.length);
for (ItemStack itemStack : stack) {oos.writeObject(itemStack);}
oos.close();
return bos.toByteArray();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
whats bad about that
how's that cursed?
just looks it
ok
is it a performance hitter if i dont cache them
I dunno why you're walking the stack for it
doesnt that print memory address?
if you do it often, yes
im a very literate ass
what if you want to know which class called your current method?
ok i will cache them
i take you literally
Then you've made some jank-ass design choices
isnt there Reflection.getCaller() or smth?
how else am i meant to automatically get my plugin
(in a lib)
im trying as hard as i can to not need an init method
if you instantiate it twice you'll get an exception anyways
public void constructor() {}```
actually
dont remind meof that
if your only constructor is the empty one
that's exactly what I use the getCurrentClass() thing for
you only need to do this
whats @DoNotRename
public class MyClass(){
{
System.out.println("I'm a constructor!");
}
}
obsfucator
do not rename
an annotation to tell allatori to not rename this method
this is your chance to link the blog post
which blog post
the one about allatori
oh ok
i want to hear the one about allatori
at least that one might get a good laugh out of me
how so
i heard 'do not rename' and knew itd be good
yeah annotations are funny
Here is line 34+35 List<Entity> entity = Bukkit.selectEntities(sender, args[0]); Entity player = entity.get(0);
Args[0] is @a[tag=test]
Yeah so youβre just assuming thereβs an entity selected
It may not have selected any. What if no entity has that tag? (Which clearly seems to be the case)
How can I check the length of the list?
size()
wtf
is there a stream foreach
that returns the modified stream
oh wait does map work
foreach doesn't modify anything
yeah you probably mean map
foreach takes a consumer, it doesn't return anything.
map takes a function
what are you trying to do?
im doing this as an example
So in my command I have this code: player.sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(this.word)); Player is an Entity variable so it can be @p or MyName. I get this error message for the code. How can I resolve it? no suitable method found for sendMessage(net.md_5.bungee.api.ChatMessageType,net.md_5.bungee.api.chat.TextComponent)
rn im just trying to access the items
you want to use forEach
goddammit
addUnsafeEnchantment doesn't return anything
a map is e.g. to turn a List<ItemStack> into a List<ItemMeta>
List<ItemMeta> = itemStackList.stream().map(ItemStack::getItemMeta).collect(Collectors.toList());
this is e.g. what map is for
Also how can I make my command runnable in an execute command?
is list always ordered?
lists are always ordered
so i can do a 1:1 mapping
perfect
actually
is there a 'modify if CONDITION with FUNCTION' for streams?
List<String> newList = oldList.stream().map(name -> {
if(name.equals("")) {
return "<empty name>";
}
return name;
}).collect(...)
you mean sth like this?
This is the error that I have and I hope that another supposed gentleman with 10 years of experience does not come to bother
can you guys stop your childish contest about who dislikes the other person more?
well have you done what the error says in the first line?
Ive been trying to do buildtools manually cause i only need a few specific versions and now its telling me I need a specific java version that I have, and i dont know how to set a specific version.
you can enter the path to the java version to use
/opt/java/jdk1.8/bin/java -jar BuildTools.jar --rev 1.12.2
for example
ofc you need to have that version of java installed already
but the buildtools jar wouldnt be in there so would i have to put it in that folder?
no, you are supposed to run this in your buildtools folder
but instead of using "java" you use "/Path/To/Your/Java/java"
oh.
yes and I did not find anything regarding tickets on github
guess then you gotta wait until they answer you there
C:Program Files\Java\jre1.8.0_361\bin\java.exe -jar BuildTools.jar --rev 1.16.3
yeah but you gotta quote the java path because it contains spaces
(1,2,3) (a,b,c) -> (1,a) (2,b) (3,c)
absolute life saver thanks
"C:\Program Files\Java\jre1.8......\bin\java.exe" -jar BuildTools.jar ...
cuz i need to reapply the modified itemmeta
just forEach it then
wouldnt work cuz, you know, list
thats why im asking
that was my thought and then i was like 'how to index'
myItemStackList.stream().forEach(item -> {
ItemMeta meta = item.getItemMeta();
meta....
item.setItemMeta(meta);
}
).collect...
im a idiot
thats what ive been doing already
wait
no its not
i can edit it to that though hopefully
is there a reason why you need a stream?
seems simpler than casting it to arrays
Anyway, what can I do with the error I have from protocolib
report it to them
ΒΏ?
its been this simple all the damn time lol
for(ItemStack stack : resultList)
stack.setItemMeta(modMeta(stack.getItemMeta()));
well im clearly doing something wrong but its no longer the iterations fault
Bump
player.spigot().sendMessage
report the error to protocollib
Player#spigot.sendMessage
beaten
I never understood why this got moved into the Player.Spigot class
how do i get the inventory name
from the inventory view
get the inventory view, then call getName() on that
or getTitle(), sth like that
but erm
why would you ever need that?
Inventory inventory = view.getTopInventory();
if (inventory != null && view.getTitle().equals("My GUI"))```
? to make an upgrade menu
you shouldnt detect your GUIs by their title
but rather store the inventories you open in a set or map
you create a Set<Inventory> as field somewhere
then whenever you do player.openInventory(myInventory), you add myInventory to that Set
then in the InventoryClickEvent, you can check if the set.contains(event.getClickedInventory())
if yes, it's your GUI
otherwise you'll be in trouble when another plugin uses the same title. Although unlikely, it's just very bad practice to rely on the name
thank you i appreciate it
yea i sppose your right
yeah I mean you could use color codes to prevent players using the same name in an anvil, but I guess just using the Set is the only proper way
ok then it should work as long as you don't allow color codes in anvil
ok
Inventory#getTitle has been removed on newer versions, I don't know at what version exactly, but I would not depend on it. Rather use the hash-code of the inventory, by putting it in a collection which best fits your use-case (hashset, hashmap)
And how do I report it if there is no place to file a ticket in git hub?
it's InventoryView#getTitle() and that was not removed
but yeah, using the title still is a bad idea
the link to open an issue even is in the error you sent
There still was the getter on the inventory, at least on 1.13. Again, I don't know when they removed it.
1.14 iirc
why is this string ChatColor.BOLD + "" + ChatColor.DARK_GREEN + "ZOMBIE SHOP" showing up as
oh i dont have image permissions
well its not showing up as bold
Yeah I mixed up
Usage: !verify <forums username>
! verify username
it's !verify Sainte
!verify Sainte
A private message has been sent to your SpigotMC.org account for verification!
got it
yup
What is the easiest way to create an ItemStack (NMS)?
(Are NMS questions alright in this channel?)
Create it through the bukkit API and then call CraftItemStack#asNMSCopy
^
Ah perfect hoped there would be something like that thx
Yup, this utility is pretty handy for converting between the two. Just mind the version-dependent import. You may want to use reflect.
Ok thx for the heads up
well the nms itemstack code is version dependant anyway and reflection won't help there
whats the difference between a normal itemstack and a NMS one
That completely depends on what they're trying to do, it's not as trivial. But yes, using reflect only on that site will likely not suffice for true version independence in whatever defined range.
nms is minecraft's internal code. there's some things you can only do with NMS itemstacks, but it's undocumented and might change every time and it usually only works if your code is written for exactly this one MC version
anyone can help me with this problem
I want to make custom logger so whole line is red with timestamp
// Create a console handler
ConsoleHandler handler = new ConsoleHandler();
handler.setFormatter(new CustomFormatter());
// Add the console handler to the logger
LOGGER.addHandler(handler);
}
public static Logger getLogger() {
return LOGGER;
}
public static class CustomFormatter extends Formatter {
private static final String ANSI_RED = "\u001B[31m";
private static final String ANSI_RESET = "\u001B[0m";
private Date date = new Date();
@Override
public synchronized String format(LogRecord record) {
StringBuilder builder = new StringBuilder();
// Format the timestamp and log level in red for SEVERE messages
if (record.getLevel() == Level.SEVERE) {
builder.append(ANSI_RED);
builder.append(String.format("[%1$tT] [%2$s/%3$s]: ", date, record.getLoggerName(), record.getLevel()));
builder.append(ANSI_RESET);
} else {
builder.append(String.format("[%1$tT] ", date));
}
// Append the log message
builder.append(formatMessage(record));
builder.append("\n");
return builder.toString();
}
}
}```
Why do you append the timestamp as well as the plugin-name twice, as this is already handled by the plugin's logger? If you really need the whole line to be red, you likely need to alter the logger's parent(s). I would strongly advise against that, tho.
Isn't the text being red good enough...
color codes don't belong into the console anyway imho
every proper log viewer can handle to only show and/or highlight warnings and errors
Some people don't read
so I would like to make it more red for them
also why would you print is warning only to then again say it's SEVERE
Wouldn't be such an issue if the sequences would be stripped before writing the logs to the file. But yes, in that sense, I agree.
why not just use error in the first place
^
myPlugin.getLogger().severe("bla bla")
well Level is set to SEVERE
but from some reason it outputting warning
I meant this
BeastLogger != JavaPlugin#getLogger()
What can cause to the warp section being null?
If the section are there, i dont know what im missing
If you see the debug, the of the keys, none of them is null. So the warp section cannot be null
You are basically getting Warp.Warps.Warp.Warps
You are calling warp.warps on warps config section
oh
No?
First warps is for iterating over each warp key. And the second section for getting each warp value
you are calling Warp.Warps on the config section Warp.Warps w the line warps.getConfigurationSection(Warp.Warps." + key)
which p much is asking for something like Warp.Warps.Warp.Warps.store etc.
you are
π€¦ββοΈ
with the warps object
yeah but i mean, i thought every section needs the path
warps already gives you the path
oh its a parent
calling getConfigurationSection on warps is calling whatever path you give + warps path
yes
Hello!
hey guys. java noob here. found a fork of a now outdated plugin which has it updated. could anybody build the repo into a jar for me real quick? the repo is https://github.com/DmitryRendov/TitleManager
Does anyone knows what events are fired in the next scenario: ```
- The player dies
- Instead of reviving, they disconnect from the server
- They Join the server again <- what events are fired here?```
Why don't you ?tas
i'd assume just no playerrespawnevent is filed
Same events as when they normally join the server
if you're responding to me, it's bc idk how
I'm not
ah sorry
Why dont you built it yourself?
because i don't know how
What is it that you need to do? Would be easier to answer, I think.
oh ok
I am debugging my plugin
It should handle some events on the death and on join
But for some reason in this scenario the user bugs out and switches to spectator mode
Which is not really intended
I suspect some events are fired not in the order I expect them to happen
And my plugin shoots itself into the leg
What are you doing on join? Are you checking if the player's dead?
Eh, no, it does some db job
Logging etc
It's difficult to explain, I am just curious about event sequence
It's also very difficult to spot the issue, as I have next to no information about your system, sorry, :-:
I mean, I didn't ask to debug my system, I just need some info about how Spigot works
Eh, whatever, nevermind
Well, it works as expected. You're gonna get the death event, then the quit event, then join event, and then - likely - the respawn event, as the player has to respawn. That's about it, I'd say.
Hmm, okay
I apologize if I sounded rude or smth, it's just my bad English
Not at all, I was just wondering whether I've pissed you off somehow, because you said whatever, xDD. I get your question, and I told you all I can tell you, but debugging can be very hard and tedious, so you shouldn't give up so easily! :)
I just rewrote a whole big system and can't bother remaking 3 basic files
Som1 know why this isnt working ?
https://paste.md-5.net/gisuyefofe.java
The error :
https://paste.md-5.net/wowajunuli.pl
So what should i do
I want args 0 for the mobs and args 1 in optional for the player name (if we want to give it to som1)
should i reverse mobs array and username array
Just check the size of the array
If the size is 1 then there is no username and thus can skip that check
If there is 2 args check the second arg for username
lowkey
what is wrong now ?
What this mean
Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R2.inventory.CraftMetaBlockState cannot be cast to class org.bukkit.inventory.meta.SpawnEggMeta (org.bukkit.craftbukkit.v1_19_R2.inventory.CraftMetaBlockState and org.bukkit.inventory.meta.SpawnEggMeta are in unnamed module of loader java.net.URLClassLoader @2e5d6d97)
at fr.worldorder.wospawner.WOSpawner.onCommand(WOSpawner.java:99) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.19.3-R0.1-SNAPSHOT.jar:?]
declaration: package: org.bukkit.inventory.meta, interface: SpawnEggMeta
doesnt extend BlockState
You want BlockStateMeta
you need the BlockStateMeta mentioned and in there use the CreatureSpawner for set the entity.
okk
ItemStack spawner = new ItemStack(Material.SPAWNER);
ItemMeta spawnerMeta = spawner.getItemMeta();
spawnerMeta.setDisplayName("Β§rΒ§eSpawner Β§6" + entityType.toString());
if (entityType == null) {
player.sendMessage("Β§cLe mobs spΓ©cifiΓ© n'existe pas.");
return true;
}
spawnerMeta.getPersistentDataContainer().set(new NamespacedKey(this, "mob"), PersistentDataType.STRING, entityType.toString().toLowerCase() + "spawner");
// crΓ©er un CreatureSpawner Γ partir du bloc spawner associΓ© Γ l'ItemStack
BlockStateMeta blockStateMeta = (BlockStateMeta) spawnerMeta;
BlockState blockState = blockStateMeta.getBlockState();
if (blockState instanceof CreatureSpawner) {
CreatureSpawner creatureSpawner = (CreatureSpawner) blockState;
// dΓ©finir le type d'entitΓ© souhaitΓ© sur le spawner
creatureSpawner.setSpawnedType(entityType);
// mettre Γ jour le BlockStateMeta avec le BlockState mis Γ jour
blockStateMeta.setBlockState(creatureSpawner);
spawner.setItemMeta(blockStateMeta);
} else {
player.sendMessage("Β§cL'objet spawner est invalide.");
return true;
}
working
!
https://paste.md-5.net/hugorezusa.java
How can i make this command working in console ?
(In the server console)
Check if the CommandSender is an instance of ConsoleCommandSender and continue accordingly.
Can't you also put players on the ban list if they don't exist?
hi.
what's the difference in absolute path, canonical path and just path?
i dont need like "C:/some folder/some path/"
i just need the relative path.
like "./../another folder" or "./some folder/yet another folder".
Which filetype are you using
Also you can create another file in relation to your file.
please
hi.
how do i create an index in mysql only if an index with the name does not already exist like in sqlite?
so
i can do CREATE INDEX IF NOT EXISTS index_name on table_name (columnA, columnB); in sqlite but the same statement does not seem to run on mysql though.
um, can someone help?
how to check is block is flowing water?
check if the block is Material.WATER. If yes, cast the BlockData to Levelled and check the level
yes but not how you wrote it
the source block is 0, every further block is 1,2,3 etc until it falls down where it starts again at 8, then continues with 1,2,3 again
does anyone know how to make jitpack run buildtools?
which versions?
maybe this is useful: https://github.com/SpraxDev/Action-SpigotMC
however getting jitpack/actions to work is a pain, I'd rather just build it locally and then deploy it to a proper repo
Hey,
Anyone any Idea on how to open a enchanting inventory to the player, where he can enchant his items and if possible even open a enchanting inventory with a specific enchantments level, like 10/20/30?
how to check is block is flowing water?
I explained it to you in detail above and even sent a screenshot
oh.. i just forget that i already asked this
you can open an enchantment table with Player#openEnchanting(Location, boolean). The block at the location however actually needs to be an enchantment table
thanks
then you can listen to PrepareItemEnchantEvent, and change the EnchantmentOffer[] returned by getOffers()
is there a way to open it without the block being there?
you can send a block change to make the client think there's an enchantment table at the given location
on 1.19.4 though, the block actually has to be an enchantment table
What is the equivalent of plugin.getServer().getPluginManager().getPlugin("SomePlugin") for bungee api?
?jd-bc
ProxyServer.getInstance().getPluginManager().getPlugin(String name)
probably want a getInstance() in there

