#help-development
1 messages Β· Page 2264 of 1
should i recreate something that already exists and have been created 100 times or jump off a cliff
thx, gonna try now, but, I kinda new it's gonna be for loops but didn't know the ints, guess i need mroe sleep (or coffee π )
1.14 is shit in terms of performance, more like 1.16.5+
what? lol
Have a sleep, wake up earlier and then you'll notice a "stonks" on productivity π
jumping off a cliff feature is being recreated everyday, recreate something different
π
sadly
afk plugin
Don't do something you don't like
yeah don't waste ur time on stuff u don't like
Principle 3 of success
I mean it's for a server im dev in
It's 1. confusing cause all these demands and 2. this shit already exists
Question your staff. Do they really need an afk plugin ? Between us: this is useless
And, as you said, it's been seen 100 times
hey, anyone knows wich API i need to use to be able to use PacketPlayOutEntityEquipment
Do you want your server to be lost in other similar servers, or do you want it to be DIFFERENT
It aint my server and also if they want an afk plugin they can just download one but nooooo
You have to add your server as dependency, what's your version?
scoreboard this and toggle afk that
Be strong bro, and get paid higher π
It's free labour
Do you use maven or gradle ?
child labour π
maven
Just avoid tell them it's useless π
i thought i had to use PROTOCOLlib but doesnt seem like it
too scared to
Add this to dependency :
'''plain
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>Version-goes-here</version>
</dependency>
'''
Do you want me to explain to them ? π
n a h
@agile anvil omfg u just helped me so much i was like using ProtocolLib to send like packets in a hard way but i can do it an easy way now thx mate
Ahah no worries, that said ProtocolLib is sometimes easier. But if it's just for a packet it's okay ;)
How to add certificate for jdk?? I have Mysql database which requires SSL
Dovidas i have issue when doing something like that but with this yaml:
for (String path : this.config.getConfgurationSection("Menus").getKeys(false)) {
ConfiguractionSection section = this.config.getConfgurationSection(path);
String name = section.getString("name");
int rows = section.getInt("rows");
}
Menus:
users:
name: "&6Players data"
rows: 5
punish:
name: "&6Punishments data"
rows: 5
Do you have an error when you try connecting to it ?
so does that mean I need to add dependency for both spigot api and spigot server in my plugins?
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
you probably need to do "Menus."+path
What's your ussue ?
Oh but isnt that why config section exists?
To dont use the path
If you want to use nms before 1.18: yes
what did 1.18 change with that then?
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
again, do this: this.config.getConfgurationSection("Menus."+path);
Right, but you have to catch from the config section: which you aren't doing
explain please
Im not english so its diff for me to undersand some things
Are you sure you're db use SSL ? Aren't you trying to establish an ssl connection with a no ssl connection? π Let us see how you connect to your sb
Amazon RDS database, i downloaded their certificate, what to do with it
Depending on the api you use to connect to
Wrong channel, its not my plugin, i get this error when using other plugin
Oh
Instead of config.getConfigurationSection(key) do config.getConfigurationSection("Menus").getConfirutaiin....
That why maybe the plugin is not designed for connecting a SSL database
Or do like Martinecko told you it's easier
Does anyone have an idea why \n is not working for me in a discord embed description? I heard it should work but somehow it doesn't for me
new DiscordMessageBuilder(this).withDescription("Plugin **version " + getDescription().getVersion() + "** has been\n enabled!"
.withColor(Color.GREEN
.withAuthor("TrollBossPlus", null, StringManager.DISCORD_WEBHOOK_IMAGE_URL).build();
what's it called for when the shooters arrow hits another player?
JDA?
EntityDamageByEntityEvent
I dont know how to disable it, i dont even know if it's possible on RDS MariaDB Database
Lmao how you type so fast
Thank you
What is "it doesn't work" : error ? .. ?
java.io.IOException: Server returned HTTP response code: 400 for URL: https://discord.com/api/webhooks/XXX
Lots of coding xd
how can I make it less frequent, like have less caves without breaking the size/ length
I think you forgot to replace the xxx in the url
change the value after the comparison sign
No I just used it as a placeholder for this message
I have a valid webhook url, it works when I remove the \n
Okay sorry, well what does 400 error code means for discord api ?
bigger or smaller?
The request was improperly formatted, or the server couldn't understand it.
depends on the exact code in that line
Can we see how you send the request?
Well I'd recommend finding a way to input a \n char without actually writing \n. End if it doesn't work, try to reach the support directly
Replace the \n char with something like {new-line} or another placeholder
I tried by using System.getProperty("line.separator"); and still nothing
Yeah there is definitely a problem when you parse your request in JSON
Try outputing the request
I bet we'll see a break on the description element
Aight give me a second
Wait I've got an idea
Try just putting \n
Wait
I meant \ \ n
Without the spaces
okay
just with \n and printing it results in
[20:44:54 INFO]: has been enabled!","fields":[]}]}```
where "has been enabled!" is in a new line as it should be
Why Skulls Texture works fine on Localhost but not on "comercial" server?
This is a problem in json ^^
How do you change skull textures ? And what do you mean by comercial server?
I change them using packets
Comerical - actual server where players play, comercial is also Hypixel
So how did you do ?
\\n
I mean, the problem can come from: the server wouldn't allow you to download player skin data, or the version is different, ect. Do you have any error?
help please 
?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!
My code freezes when I try to print CraftBlock or get .getX() / .getY() / .getZ() / .getType()
no errors
Any error ?
YES, ANY
What the πππ
Well you'll need some debugging. We can't help you to debug your code. Make sure everything is not null, well defined. Check exactly in what time the freeze begin. Then show us the results and we could maybe help u
And heads are just default?
Player Head
with custom skin uploaded to minesk.in
profile.getProperties().put("textures", new Property("textures", TextureConfigManager.getConfig().getString("athenasSkull")));
try {
Method mtd = meta.getClass().getDeclaredMethod("setProfile", GameProfile.class);
mtd.setAccessible(true);
mtd.invoke(meta, profile);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException ex) {
ex.printStackTrace();
}
block.getClass() = org.bukkit.craftbukkit.v1_16_R3.block.CraftBlock
The freeze starts when the first block is placed in ChunkData
ChunkData data = createChunkData(world);
The data is ok
Well are you sure the version is exactly the same (of the server) ?
Anyone happens to know whether there is an API / some method to get an URL of a picture containing the skin of an itemstack?
1.18.1 on localhost
and 1.18.1 on big server
Wait is there this line in your code ??
yes, sure
Isn't there a cleaner way to change skull texture ?
probably? π
Ah, sorry, didn't think of that.
block.getClass() = ... Has really non sense
You're trying to define something you can't define π
But I wrote this line when, in desperation, I tried to understand what was wrong
nooooo, its formal
i write System.out.println(block.getClass())
what's the problem?
I guess you don't need nms, see https://github.com/deanveloper/SkullCreator/blob/master/src/main/java/dev/dbassett/skullcreator/SkullCreator.java
Oh π
And can you check if it's null?
you've misspelled the method name. its getConfigurationSection() not getConfgurationSection()
Anyone knows where the textures of an itemstack are saved / if they are accessible?
In the resource pack !
@ NotNull
Hm yeah makes sense xD
I can't tell you right now the exact location sorry π but I'm sure you'll quickly find it π
@ NotNull
not sure what method to use when my texture value is:
ewogICJ0aW1lc3RhbXAiIDogMTY1NjQyMTI3NDAyNywKICAicHJvZmlsZUlkIiA6ICJiYzRlZGZiNWYzNmM0OGE3YWM5ZjFhMzlkYzIzZjRmOCIsCiAgInByb2ZpbGVOYW1lIiA6ICI4YWNhNjgwYjIyNDYxMzQwIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzljOWMzNmJkOGUwNDY0YjhlZmRkMjFmZTJmMjI0NjE4YjQ5YTk4MjA1Y2U4YTU0ZGUzMTkxZjNiZDUxOGM2IiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0KICB9Cn0=
This doesn't mean it won't be null. Ever wondered what would happen if you input something null ? :)
?paste
ok, wait
Yeah, we have to check some google π
@iron glade
Do you know how to make this last longer then 1 second? they only get poison for 1 second then it disappears rather then them getting it for 20 seconds..
https://paste.md-5.net/orogisanug.java
very confused, somehow this is getting to 1 but not two, theres no exception in console either
20*INSERT_SECOND_AMOUNT_HERE
will rerunning buildtools replace the files in my local m2 repository?
yes
Don't you have to register the event somewhere?
because I forgot to build them with source lol
ok, i tried to "assert block != null" and its not null
i dont think so, but im more just confused on how the code is randomly just stopping without an exception or return
Yeah but it's just blocked, waiting for a response from your event. That's why I'm wondering about a registration or smth
That's not assuring it's not null.. sout block == null and you'll see.
Also check it's type meanwhile so you'll see if there is something wrong
I tried giving myself a skull with uuid of me on the big server and worked fine
soo now I need to do same somehow with those skins that aren't attached to anyone
how?
Sorry I'm too lazy to scroll up, but check your method is similar to #2 https://www.spigotmc.org/threads/player-head-change-texture.558365/
System.out#println
but how to check the type
Just output it π
anyone know how to make a block dissapear after X time
Hi, how can I get the NPC from another class to the class I'm working with now? because i try and i can't
this freezes the server and generation
it is not output to the console
See Bukkit Schedulers
Depending on how you work with NPC. If it's an object, save the Object you created and access it (there are billions of way doing that)
I think is not a Object
That means there is something wrong with it
yep looks like so
but fromBase64 doesn't quite work for me
Now you have to find from where it comes from.
But have you tried System.out#println(block == null) -> tell me the result
when is the populate called in block populator?
ok nvm i take it back
works now
I don't know, just explain how you work with it. You're the only one to know ahah
Well great! Didn't know what was that fromBase64 π
I think it's after terrain generation
so I built my spigot jars with --generate-source but VSCode still isn't pulling the sources from maven? What am I missing here
but I mean like, on every chunk or when
i put this line and when i hover over getX() it says "Method invocation 'getX' may produce 'NullPointerException'"
oh my im so stupid
I just realized configs I have on localhost aren't on the server..
this is normal?
What π TMI. Just update your maven
i relaunched my ide, shouldn't that work?
I think when the nearby chunk as been terrain generated, it processes chunk by chunk
No π you have to update ! Run the maven commands π
false
so it's called every chunk?
At least you found
nice to know you can get laughed out of a help channel just for asking a question around here
but mkay thanks
Woaw... That's great then, what's the result in the console please. True or false ?
false
Chunk by chunk
That's great. Now check your data above
Google your question before asking it:
https://www.google.com/
Hey, I am receiving "Internal error occurred while attempting to perform this command" when doing the command heal and feed, help? (The /healther command works) (Txt file cause its too long for discord char limit)
obviously i already did that, or I wouldn't be asking here.
but ok
chill ladies n gents
[22:23:30 INFO]: false //chunk
[22:23:30 INFO]: false //ccdc```
Great. Now I'm sorry but I'm not kidding it's just unusual to see that. And what I'll answer to you would be an answer I found on google
What line ?
when im executing the command in game
Now let us see how you gather list of blocks
not a line
obviously I know how to use maven, it's this BS "you can't download spigot you have to build it and hack it into your local repository" stuff I'm asking about. That stuff aint on google except for the actual BuildTools wiki which I've already read twice
Yeah but in the error isn't there a line specified ?
No
there is no errors in intellij btw
it makes no sense, because I tried to remove the collection and directly take blocks from the chunk, the problem was the same
Well then i recommend just clearing cache of m2 if not sure and following builttools wiki
So that you're sure
Yeah but you're trying to get blocks from chunks from a world which can be not loaded : blocks won't just work then. Or there could possibly take blocks from the actual biome, or you can also use that before generating it... There are bunch of possibilities I can't help you right now
I'd say it's because you're using data you haven't already created
I take blocks from an already loaded world, the chunks are also loaded, I checked
alright I found my problem, however the { of else if(command.getName().equalsignorecase("feed")) binds up to the } that should be a possesion of if(sender instanceof Player), how can I make it correct
should i send the code?
Use constants like MessageKey and the p.sendmessage will look like this: p.sendmessage(Messagekey.PREFIX + Messagekey.NO_PERMISSON);
@agile anvil ?
im kinda new to the java and spigot shit and i literally dont know what youre talking to me about right now xD
(if that came out rude - it wasnt supposed to be)
and also hows it going to help me with the brackets
only the block object and all lists do not work, they cause freezes
alright I fixed my errors
i write in ur dm π
its just gonna clear ur code :DDD so yea
Is there a better code to check if an image is valid / exists?
public Boolean isValidImage(String url){
try {
BufferedImage image = ImageIO.read(new URL(url));
return image != null;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}```
i dont think so, maybe just put the BufferedImage image to another class or under the public boolean text/code
public Boolean isValidImage(String url){
BufferedImage image = ImageIO.read(new URL(url));
try {
return image != null;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
like this
btw, why do u need a boolean that is check that an/the image is valid? :d
how can an image cannot be valid? :DD
I'm allowing players to set the avatar image of a discord webhook bot per command
and I want to check if there's an image at the url they provided
ooooh :DDD
I think its a good code. As i just said only u can do is just put the 'image' right under the public boolean isvalidimage
so if its work then u r good π
i guess, i neved did a project like this
i mean its a really good point in a server that u can link ur discord profile with ur minecraft profile but its just a plus i guess
Yes, u can do a lot of automatic stuff.
Like giveaway, if a player win a giveaway on the discord server then in game the bot/system gives the rank to the player BUT u can react only if ur profile is linked
sorry for my bad english im not that good :DDD
yeah that would be cool
Well, then goodluck in ur next project and have a good day/night, im in central europe
is there any analog of mixins in spigot/paper?
i recommend paper, its lightweight and easy to use. If u are using Intellij then i think u know the Minecraft plugin, in that plugin u can choose the paper function/section
what do u mean by mixins?
like randomize?
bruh
You can use ignite I believe it is called ?
but obviously, this is not available to everyone
if you are planning on publishing the plugin for others to use, you are basically out of luck for mixins
note, I have not tested this ^
ill try
π
how do i turn something from my yml back into an class object thingy
what i did was is
ConfigurationSection Areas = plugin.getConfig().getConfigurationSection(AreaLocation);
ncArea someArea = Areas.getObject(key,ncArea.class);
but that doesnt seem to work
get the object from the yml
like u want to get a string from the yml
if its not working then idk, i didint do objects in my yml. Usually i use, messages, materials, strings, smth like these so sorry if my help wasnt helpful π
ohhh soo these are locations
YamlStorage.get().getLocation(), maybe? :DDD
oooooor, u can get the configsection
YamlStorage.get().getConfigurationSection()
yea, but then i still dont have the class
cus i used that
but that just gives you a part of the yml, not an object
hmm, i need to go so i cant help u anymore sorry, maybe someone else is gonna help u, goodluck! π π¦
np, thnx anyway
sorry what?
you mean i make the object again from the yml
like, constructor(yml.x, yml.y, yml.z)
i know, bad example
how do i get the path for the logs folder, i know i could just do "/etc" but if someones server has a different path that ofc wouldnt work
Java Coding Conventions: https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html
Just go up two directories from your plugins folder
wdym go up
Wait is the logs folder dynamic? Let me double check in the configs.
Yeah just go up two folders from your plugins folder and add the logs path.
wdym by go up 2 folders?
reference the parent folder of the parent folder of your plugins folder
You could probably get it from the Logger. getHandlers and find the FileHandler instance
Just went through this route. Sadly there is no way to access the files as everything in there is private.
anyone know how to put a custom texture on a skull in 1.19? ive looked all over the place, but GameProfile doesnt exist in 1.19
Game profile is in the mojang authentication api
Iirc you can use PlayerProfile from spigot though
how can i fix that?
Example for this skin:
https://minecraft-heads.com/custom-heads/decoration/48301-ornate-emerald-block
public ItemStack createCustomHead() {
ItemStack head = new ItemStack(Material.PLAYER_HEAD);
SkullMeta meta = (SkullMeta) head.getItemMeta();
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
PlayerTextures textures = profile.getTextures();
textures.setSkin(new URL("https://textures.minecraft.net/texture/c43f12c8369f9c3888a45aaf6d7761578402b4241958f7d4ae4eceb56a867d2a"));
meta.setOwnerProfile(profile);
head.setItemMeta(meta);
return head;
}
Results in
I need to fix my skull util to not use reflection
Or more generalized:
public ItemStack createCustomHead(URL textureUrl) {
ItemStack head = new ItemStack(Material.PLAYER_HEAD);
SkullMeta meta = (SkullMeta) head.getItemMeta();
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
PlayerTextures textures = profile.getTextures();
textures.setSkin(textureUrl);
meta.setOwnerProfile(profile);
head.setItemMeta(meta);
return head;
}
@latent pilot
?paste
By not adding the event to the whole component[]?...
Please help me
CODE: (had to do pastebin because hastebin wasn't working for this code)
https://pastebin.com/vLzJ9AfC
ERROR:
https://paste.md-5.net/oluvemotot.sql
i'm trying to make it to where you can customize the layout of a player duels kit before going in a duel. there is a default layout which is just a string of a serialized inventory in a config file. when a player first joins i want it to default to that value in the config file but i am getting a mysql syntax error and is in need of help
at line 33 is where the error happens i think and line 33 is
ps.executeUpdate();
Could you send your code and explain the problem pls?
What dialect?
Javascript π
Also: I meant SQL dialect
i said java
Which DB do you use?
im using an pebble host which is just a server hosting and using their databases
So probably MySQL
of course mysql
Could have been MariaDB
never heard of that
Derivative of MySQL. Think of it as a fork
okay
I think i see the problem. Quotate your "NethPotInv" variable
Is enqute even a word?
If it wasn't it sure as fuck Is now
Why you using the two s's?
so add like ' around it
sure
Read the ConfigurationSerializable javadocs again. You forgot to add something.
There seems to be a keyword missing.
that is why there is a FormatRetention.NONE there
but it is not taking effects
Just create 3 components and chain them together. Thats how i did it when i still used the components.
hello, is there a way for me with my plugin to play a sound to a player so it follow the player, not a location ? And if not is there a plugin that enables it?
Hello, how to remove one item from player inventory after use?
E.g like glass bottles after using on bee hive so player e.g have 6 bottles and after use on hive he get one bottle of honey and got removed one empty bottle
Get the item stack and set the amount to the current amount - 1
Then give the player a new itemstack for the new item
yeah i got this
But what in this situation:
ItemStack item = event.getItem();
It's taking Item from config in to ItemStack so how i can set up to take one as well?
Wait so the βnew itemβ that is given is the one from the config?
You can make your own parser and store it in memory
bump
maybe smth like armor stand that will follow the player and then you can use location of that armor stand to play sound?
anyone have any idea whats wrong here? its suppost to choose a random string from a list in the config but it just returns null
Random rand = new Random();
List<String> TargetServers = config.getStringList("TargetServers");
String RandomServer = TargetServers.get(rand.nextInt(TargetServers.size()));```
TargetServers:
- "lobby"
- "lobby2"```
ok
Iirc positive bound is inclusive
That wonβt work
Because you have to replay the sound on the new location every time
oh okay;/
The only decent work around sorta is to play a sound at a location but with a huge radius I guess
Wiki.vg has an entity sound effect packet. Maybe that can be used?
It's a bit limited but might work
Okay here's my take if your using custom audio split it into different sections to make smaller choppier sounds then control logic to check if the player is in an area it can here the audio if so play next bit otherwise play next bit at the players new location. My only concern would be nonfluent audio but I'm not too experienced with how this would sound in practice
and how could i do it ? if u know
thought of that, but it would take 20 different parts, not enough music discs for it
^
Yea if your not using ancient versions atleast
1.9 π
Wtf
What's with that
Least sense I've seen from choice of version
Might as well use 1.8 to get legacy pvp at that point
coz in my country everyone uses a special launcher thats in 1.9
Oh yeah your cracked
nope
just a correction, thats false
im premiuΓΉ
Then jsut use vanilla launcher
Why the hell would a country not update to a newer version
And use 1.9 non the less
So weid tho well tharw nice atleast
Tbh I thought 1.13 added that
From what I can find 1.8 has it
theres a huge server that every 12-20 yo play on, and they have a special launcher for their server (where you can add other servers and play cracked / premium), and i'm trying to make the server 1.9 so every 12-20yo can play using the launcher
because most of the time, they're playing cracked and lazy to download a new launcher
Bruhf
Tf kinda country is this
if I had the chance I would make the server at least 1.15
Cracked players too lazy to recieve the latest content for free ahaha
its a minecraft server, the biggest in my country, every french minecrafter has heard of it
yes actually
More free content nahhh I'm good chap I'm good with my 1.9 ahaha
Myes that's kinda funny
France isn't even that poor of a country. You really shouldn't support cracked and that launcher
most of the time players r 12 yo whose mom dont want to buy minecraft for 23,95 β¬
1st world problems at their finest
Minecraft is 29,99β¬ now
30 euro πΆ π
Maybe I don't want to pay for something should I just steal it?
That's the logic your going with
yeah because aren't cracked launcher just a steal?
I've been eyeing up this house looks nice
I remember how I bought it for 20 EUR in like 2012
Cracked is piracy
i'm premium btw
Well you're supporting piracy
i'm not actually, its just facts
I got it in 2010 for like 15β¬ iirc
why
no, i think it was 2012 as well
L
why is the world against me
no
World no like piracy
i'm not
no
Malwarew
Delete that link
quick, open up player reporting and report them to mojang!
nooo
He'll yea
It's still very much clickable
french people :(
People with discord :(
lmao
Hey, is there a way to make a chest look open in a client-sided way?
Already tried the usual packet route, might be doing it wrong
Yes but its tricky. Lots of packet fkery
I'm caching the packets and sending them every like 3 ticks
I already cross-referenced the written data with the internal NMS packet, it all matches
I might just debug outgoing block_action packets for certain blocks to see wtf is going on
nvm I fixed it by changing actionId to 1
actually it only takes a single packet server side
about a month or so ago, discussed this with another person and learned that it is only a single packet, don't remember what it was
client side shouldn't be hard to do with a mod or resource pack
This?
yep that
Thats lots of packet fkery in my books π
lol
Not as bad as holograms but digging is still needed
Just use a component builder and add a hover event with an ItemStack
max health is an attribute. You need to get the attribute value (as the javadocs state).
ok thx
What's wrong?
you have to send it
to the player
You are just creating the component and not doing anything with it
does anyone know of something that can load dependencies + transitive dependencies other than whats inbuilt into spigot
player.spigot().sendMessage(component);
Is what I'm using
Yes of course you can
np
Show the full listener
shift and the key left of backspace
ItemStack item = new ItemStack(Material.GOLDEN_BOOTS, 1);
You don't need to add "1" here btw
yeah cause i dont think thatβs how you make the itemstack component
let me check, i remember having to send an nbt tag or something but there might be an easier way
pls anyone
I think you need to use nms in order to serialize the ItemStack to something that can be displayed.
@wind blaze what are you trying to do again sorry just jumped in
it doesnt work for transitive dependencies :(
i also tried forks
no luck
like details about the item?
What do you mean by transitive dependencies?
Transitive dependencies are usually shaded in. Otherwise the dependency fked up unless its designed for a shared platform.
also for more specific details of what im trying to do, im trying to use deeplearning4j in my project, but i dont wanna shade because would be WAY too big
like
i literally cannot upload to production server
because my internet cant handle it
by transitive dependencies i mean dependencies of dependencies
Yes in know what a transitive dependency is. But if the library depends on other dependencies that are not shaded in then there
is nothing you can do.
oh ok
Get a dependency tree and add the the next layer of dependencies to your plugin.yml
i dont utnderstand
what is dependency tree
oh
i just manually put all the dependencies
Anyone knows how I tell the discord api to manually retry sending a webhook after X seconds?
when reaching rate limit error 429
you don't tell discord api anything
you would have to know the time limits for when rate limits reset
as well as knowing the various kinds of rate limits
and then program your application or script accordingly
im looking at it and im pretty sure you have to use nms, only problem is i dont have mapped fields so its kind of hard to find the right one
Intellij can generate a dependency diagram for you
alr
then i just manually put all the dependencies into libby?
Only the ones that have a one way arrow from deeplearning4j
what's the cleanest way to prevent my plugin from enabling during onEnable? For instance, my lightweight plugin simply cannot operate without a valid config so I want to prevent it from enabling.
I've considered this.getServer().getPluginMangaer().disablePlugin(this); but I hear this causes issues with event hooks and whatnot.
when you do your onenable, check if the config is valid, if its not just end the onenable method right there
return;
you can snd a message i nconsole
well disable and then return
sorry bad spelling
that's what I'm asking about. Is my code snippet above the cleanest or is there a better way? I hear there are issues with event hooks
ItemStack item = new ItemStack(Material.STICK);
TextComponent component = new TextComponent("Hello!");
String nbt = CraftItemStack.asNMSCopy(item).b(new NBTTagCompound()).toString();
ItemTag tag = ItemTag.ofNbt(nbt);
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_ITEM, new Item(null, 1, tag)));
i think this might be the right way? take it with a grain of salt though since i havent actually tested it on a server
i would rather just leave it enabled, but if they try to use commands with the plugin or something tell the player/console that the config is invalid
plugin has no commands. it is designed to be very lightweight and barebones
imo it's important to properly communicate to the user whether it has successfully loaded or not
I think you can do this version independent. Let me play around a bit.
a console message is nice but can be easily missed
send error to console and all server administrators
about the invalid config
yeah this pretty much requires playing around a lot lol
how are you doing this? when i click "show diagram" on my maven tab it doesnt show anything similar to this
nevermind
did you import it?
that doesnt make much sense since its a part of bukkit
you should have it
@wind blaze can i see your pom.xml
maybe you dont have a dependency for nms
tiny issue i dont know how to
!Help
!uplod
!upload
?paste
thanks
ok so
you need to build spigot
for the version you're trying to work with
download build tools
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
they are using the api, why would they need to build spigot
oh I see
They would need to run 'spigot' rather than spigot-api
for nms
yes
after you download build tools then run the command that this gives you in your terminal
@quaint mantle can we get that as a command
thats actually like a really good resource
Watch that youtube video linked above
The version is what u want so if u downloaded the 1.19 spigot then its good but if not then not
:DD
this
yeah just watch the video
it will make it way easier for you
Oh
This is a tutorial on how to install BuildTools and a Spigot Server for both macOS and Windows 10. This process should only take at maximum 20 minutes to get a server running.
If you are interested in making custom plugins with the spigot API, subscribe to the channel. I will be posting tutorials on this in the future!
Thank you for watching! ...
I got u!
Imagine using apple products
Its good! Not for gaming but for coding its one of the best
if im using remapped stuff, do i want to use the -remapped output jar or the original
cries in 2013 macbook air
A lot of professional programmer use it
i love my iphone 13 pro max but id never use a mac
true in the tech workplace apple seems to have a grip over the scene
used to be a big time samsung fanboy.
For production its decent. But apple is simply such an absolutely despicable company that i would never consider paying money for anything they where involved in.
Yea + its expensive so yeah
same lol
if someone gifted me an apple product i wouldn't complain, but i would never go out and buy one myself
The Nodejs backend using, hipster ass startup company devs.
I would literally sell it and get something else
Or gift it someone else
XD
real programmers sit in their basements writing COBOL on a FreeBSD desktop machine with Emacs
Notepad++ moment
if it was a phone or mac desktop maybe but i wouldnt mind a mac laptop as a gift
My teacher just use notepad with white mode
you guys use computers?
Currently? No
I got one for free from a company i worked for when covid began so i could work from home.
Ive just installed a new linux partition on my home pc and used it instead. The macbook is still dusting in my cabinet.
ill take it off ur hands free of charge
same here
what distro
im debating fedora or debian but i feel like ill regret them over time
Catalina iirc
Thats the version on the mac. Or do you mean my linux distro
Ah
I think it was just a weird ubuntu fork
ah
So I have a yml file
level-1:
level-a:
test: test
level-b:
test: test
for (String levelString: config.getConfigurationSection("level-1").getKeys(false)) {
String level = config.getString("level-1" + "." + levelString);
}
Why is this not returning level-a and level-b?
honestly i might just go with ubuntu since itll be Debian with potentially more up to date packages
This cant "return" anything
?
looks to me like getString should be causing an error at best
I want to get level-a and level-b
It returns just a category
Its a ConfigurationSection
I want to loop over the 1st level children of levels and return the values
You can call getString on that
i dont wanna have to do that for every value
For older versions I get java.lang.NoClassDefFoundError: org/bukkit/block/data/BlockData
How can I fix this?
I'm using gradle and paper weight
This is how I shadow my stuff
tasks.withType<ShadowJar> {
dependencies {
include(dependency("io.papermc:paperlib:"))
include(dependency("com.sun.mail:javax.mail:1.6.2"))
include(dependency("javax.activation:activation:1.1.1"))
}
archiveClassifier.set("")
}
tasks {
build {
dependsOn(reobfJar)
}
compileJava {
options.encoding = "UTF-8"
options.release.set(17)
}
compileKotlin {
kotlinOptions.jvmTarget = "17"
}
}```
figured it out
Dont support older versions
its only 1.12.2
now that I type that, seems strange
but
That sounds weird...
Nope im gonna go eat something now 
yum, what you eating?
which is?
did you import the right thing
you need to import item from net.md5.bungee or whatever the package name is called
not nms
Hello, im trying to send a action bar for a plugin that is 1.8 - 1.16.5
but i keep getting this error
?paste
please use the paste link... screenshots are blurry and hard to read...
are you running craftbukkit or spigot?
spigot
works fine for me
yeah it works fine for me too
what version are you on?
the only error i can see is if your on craftbukkit which isn't support for the spigot api
yep
1.8 doesn't have ChatMessageType
importing spigot-api from a system file? why not use the repo
i didn't found it
?repo
but that isn't the problem now
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
remove the actionbar part
not a problem just a suggestion
that does not exist on 1.8
how can i detect it from 1.16
Im doing NoClassDefFoundError
Btw this is not complete but you can play around a bit more to get it fully working:
@SneakyThrows
public BaseComponent[] toHoverableText(ItemStack itemStack) {
@Cleanup ByteArrayOutputStream stream = new ByteArrayOutputStream();
@Cleanup BukkitObjectOutputStream bukkitStream = new BukkitObjectOutputStream(stream);
bukkitStream.writeObject(itemStack);
String itemInfo = stream.toString(StandardCharsets.UTF_8);
String id = itemStack.getType().getKey().getKey();
Item item = new Item(id, itemStack.getAmount(), ItemTag.ofNbt(itemInfo));
return new ComponentBuilder()
.append("[Item]")
.event(new HoverEvent(HoverEvent.Action.SHOW_ITEM, item))
.create();
}
If you decide to support ancient software like 1.8 you gonna have to make sacrifices.
There is a way to achieve this but its very advanced. (Using modules with different interface implementations).
Just drop support for those old versions. Nobody plays it anyways.
my friend has 1.7 - 1.8 server and 900 - 1300 people plays everyday
event.setKeepLevel(true);
event.setDroppedExp(0);
Do I need anything else here to keep the xp level upon death?
I have this in the death Listener but it's not keeping the levels.
Statistically insignificant information
okay
but its possible to fix this?
I told you the fix
you need to update to newer software
sending action bar messages is not in the API on 1.8
you can only send messages in chat
the 1.8 actionbar is done, i just need help the 1.16.5 actionbar
can I give a permission to someone if they consome let's say an apple?
maybe use a permission plugin?
no, it's my personal project, I'm building everything my self. 1 to get better at java 2 to have a challenge
Sure. You can either create a custom permission container and keep track of it or you use an external permission manager like luck perms.
Then step 1) Create a permission plugin
Yep it looks that way lol
- Create an API to interact with this plugin
would it be bad to just build it onto my existing one? so then there is no need for an API?
If you create one big plugin then you should split your functionalities into modules or packages.
And everything in those packages is self contained and does not use anything from the other packages except through
the programming interface (API) you provide in each package.
This ensures that you can make changes to the implementation of every package without having to worry about
your other packages being compromised.
Yes that's how I am doing it right now.
everything gets sorted and ran through my main file. everything else is isolated in its own package
is it cracked? there are not many servers with that many players, and especially not on 1.8
semi
Is it a good idea to store data about a specific block in persistentdata or config?
such as a custom name for it and other things.
do you plan on editing this data? or is it just to store. editing through the config if you chose that
editing through code. I was doing it through config but i mostly transitioned to persistent data cause it seemed "cleaner".
basically its player owned beehives
so then i would use persistent data container
all i really need to keep track of in config is the location
then yeah it would be better to move it out of the config, if theres anything that you don't want to be changed I would never put it in the config. I'd hard code it in..
well everything about it can be changed
but i have functions to change the values with namespacedkeys
alrighty
1.8.8 Add maven library that doesn't support minecraft
you dont have to re-set itemmeta when setting persistent data right??
public void setHiveName(ItemStack hiveItem, String hiveName) {
PersistentDataContainer container = hiveItem.getItemMeta().getPersistentDataContainer();
NamespacedKey hiveNameKey = new NamespacedKey(cadiaBees, "hive-name");
container.set(hiveNameKey, PersistentDataType.STRING, hiveName);
}
like this should work perfectly fine
do integer persistent data types not work??/
or does setting item meta more than once remove values?
?pdc
?
it looks like u probably do need to set the item meta again @carmine nacelle
I am
public void setHiveLevel(ItemStack hiveItem, Integer hiveLevel) {
ItemMeta hiveMeta = hiveItem.getItemMeta();
PersistentDataContainer container = hiveItem.getItemMeta().getPersistentDataContainer();
NamespacedKey hiveLevelKey = new NamespacedKey(cadiaBees, "hive-level");
container.set(hiveLevelKey, PersistentDataType.INTEGER, hiveLevel);
hiveItem.setItemMeta(hiveMeta);
}
public Integer getHiveLevel(ItemStack hiveItem) {
PersistentDataContainer container = hiveItem.getItemMeta().getPersistentDataContainer();
NamespacedKey hiveLevelKey = new NamespacedKey(cadiaBees, "hive-level");
return container.get(hiveLevelKey, PersistentDataType.INTEGER);
}
somehow between function 1 and 2 the value is getting wiped.
if i copy the return from function 2 at the end of function 1 it works
otherwise i get null.
omg im a fucking idiot
ItemMeta hiveMeta = hiveItem.getItemMeta();
PersistentDataContainer container = hiveItem.getItemMeta().getPersistentDataContainer();
yep thatll do it..
oh rip
lol just do what I do, go to work and boom you think of the solution, I whip out my phone and start coding in discord to my buddy to keep it safe, and to copy and paste it later
coding..on the phone...? π
lol yeah it's not as bad as you think..
I used to code my discord bot on my phone. when I had an android..
^
Is there a way to get PDC data from a block u break
without picking the block up
(need an itemstack)
Blocks dont have a PDC unless they are a TileEntity
Then get the BlockState, cast it to BeeHive.
BeeHive is an instance of PersistentDataHolder so you have all the pdc methods there.
wait
In this episode, I show you how to use Spigot's Persistent Data API to store primitives and Strings in items, blocks, and players. #Spigot #Minecraft
β Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentatio...
huh, didnt know beehives were TEs
how does he put pdc on diorite then
Without watching: he doesnt
must be bc i havent updated my minecraft knowledge since 1.12.2 tbh
he 100% does..
timestamp
In this episode, I show you how to use Spigot's Persistent Data API to store primitives and Strings in items, blocks, and players. #Spigot #Minecraft
β Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentatio...
He stores the data in an ItemStack. Not a Block.
If you put the data on any ItemStack (doesnt matter if its a TileState) then this data simply vanishes when the ItemStack is placed as a block,.
i am big dumb
@lost matrix I have functions to get PDC values from itemstacks but not for blocks, instead of having dupes for the blocks, is there a way i could make a "temp" itemstack and copy the values from the block to it...?
nvm there totally is.
Beehive is actually a tilestate block
is there a way to make Fish Hook not sink into the lava? (i have tried using setVelocity, yes its work but it still sinks slowly)
?paste
Does it matter which version is used when using md_5's remapping plugin? Because all the classes/fields get reverted to their obfuscated name, which is consistent throughout all versions (eg. ClientboundAddEntityPacket --> PacketPlayOutSpawnEntity)
https://paste.md-5.net/qicacitatu.java any reason why when I call this method from another project with this dependency, my actionPool is null. Calling the methods from an instance however, works.
So if I set PDC on a block, place it then break it, it loses all data?
(tile entity)
so....id need to add code for on place, it sets the values to the values of the item im holding?
Make sure you dont shade in your dependency.
is ther esomehitng wrong with that
You forgot an 's'
registerevents
does JoinListener implement the right Listener class
hit alt enter and select the org.bukkit.event.Listener one
oh i implemented the wrong one?
u didnt even import it
me when
wow, thank you lmao. What does shading do exactly?
shading = including within your compiled jar
Normally used for libraries, e.g HikariCP or Guava
Was searching through the server for plugin ideas and I am gonna yoink this one. Gonna give u creds as well
Your name is right?
What is ps in this code?
do you mind if I yoink your video idea
tis ok I figured it out
yea np i dont plan to make vids now so
if i had to guess, PlayerConnection or whatever its equivalent is
since its sending a packet
ty
Hi i want to ask if spigot can get bug for reason
Spigot can have bugs just like any other software
Because i was having an issue on 1.12x with MongoDB codec that i already fixed. Then i added the exactly code on 1.19 version but on 1.19 i have a codec exception
Which shouldnt be expected if the mongo driver is the same and the code for the codec is the same
π€‘
Im exactly like that
Spigot doesn't mess with Mongo though?
I dont know but why is happening the exception if i fixed on 1.12x and then just copy-paste the solution into 1.19?
Sounds really strange
π¬
it would be nice if CraftBukkit didn;t use versioning in its packages
Didn't they start doing that for a reason?
So spigot can get bug when executing/running plugin code?
spigot can bug out doing anything
computers are a Fuck
shit hits the fan sometimes
Yep, it doesn;t really protect anything. Just forces devs to make version dependant code
Spigot is probably not the issue
Because i will send the codec code because is exactly the same on 1.12x and 1.19x and im getting the exception only on 1.19 plugin
So shity lmao
What exception
what exception and whats the code
^
Yeah
?paste
Think they went offline
goes back to sleep
goes back to driving
yeah
Whatβs that suppose to mean?
hahaha
we're asleep
here its 4am
i think its an emoticon
nice
2 shity hours with this shhity bug
Oh
And still cannot fix it
Besides the code i the same on the 2 versions on 1.19 doent work
Well I am asleep but what does this bug of yours do?
Let me send full code first
Make sure you use latest version of spigot first and foremost
issue with mongodb , works fine on 1.12 for him but not 1.19
Yeah
Oh
Give us the exception first :>
i mean its not exactly spigots job to maintain mongodb tho
smh
it could be an issue with the JRE rather, as 1.12 used Java 8 and 1.19 uses 17 or 18
Also im not registering or using Vector on my Claim class
π€
Really strange
Is the first time that something like that happens to me
Send ClaimManager
Allright
also if those classes are in packages, please send the full class file (legit just ctrl+a the text and ctrl+c that)
otherwise erroneous lines wont match up with what we see
There you have all to try to find the problem
truncates the package line and imports
what?
if you dont paste the full text from the .java file, we cant properly identify an error line
Oh ok
I wil lhavve to send everything again
In other word the issue came because of non find codec for bukkit Vector.class
Which im not uing in the Claim class
So it shouldnt be throwing that exception
Sorry for bein ass-hole
But im annoyed because on 1.12 works perfect but not on 1.19x
I can send you a picture if you want from 1.12x server
I see now
Are you seing conclure
Thereβs data type issues
Allright
I suggest using your own vector class
Im not using vector class conclure
Im using CLocation which sostitutes vector
So i dont know why the exception
π€ π‘
But anyway
You should first and foremost shade and relocate bson
Along with Mongo and everything
Yeah i have already doing shade
Relocate also
Yeah
Such that it doesnβt cause weird linkage errors with other plugins
That its already done
So my final thought was: that spigot 1.19 was bug
Or the server itself
Dont go offline
1 sec
I will send a picture form 1.12x server
Yep
You need to declare the repository
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Conclure 1.12.2 server console
Works perfect @ivory sleet
And the code is the same in the 2 plugins
And do you have any other plugins that get loaded?
On 1.19?
@ivory sleet i ill try after getting get up creating another 1.19 plugin having only the mongo code to see if its bug mine intellij or the sever itself
See you soom its going to be 4:20 am
Good night
Sleep tight
Yeah to many hours trying to fix something
Also i dont know why hen i sleep
then try again and magically it most cases it get fixed
How do I get the name that is recognised by vanilla mc?
because 'overworld' is actually 'world', but I need to get it as 'overworld'
for example
and same with the_end
I could write come code to recognize these exceptions, but, I thought it would be worth asking if there is a way to do it without if statements or switches
or maps
or anything else
World implements Keyed
Works, thanks
is there any reason NuVotifier isn't seeing my plugin as a VoteListener..?