#help-development

1 messages Β· Page 2264 of 1

agile anvil
#

My goal is to remove all the 1.14- versions 😈

hot wolf
#

Server is on 1.18.2 anywho

#

Thanks you two!

cunning shard
#

should i recreate something that already exists and have been created 100 times or jump off a cliff

limber owl
#

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 πŸ‘€ )

mortal hare
#

1.14 is shit in terms of performance, more like 1.16.5+

agile anvil
mortal hare
cunning shard
#

πŸ’€

cunning shard
#

afk plugin

agile anvil
iron glade
#

yeah don't waste ur time on stuff u don't like

agile anvil
#

Principle 3 of success

cunning shard
#

I mean it's for a server im dev in

#

It's 1. confusing cause all these demands and 2. this shit already exists

agile anvil
#

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

steel swan
#

hey, anyone knows wich API i need to use to be able to use PacketPlayOutEntityEquipment

agile anvil
#

Do you want your server to be lost in other similar servers, or do you want it to be DIFFERENT

cunning shard
#

It aint my server and also if they want an afk plugin they can just download one but nooooo

agile anvil
cunning shard
#

scoreboard this and toggle afk that

agile anvil
cunning shard
#

It's free labour

agile anvil
cunning shard
#

child labour πŸ‘

steel swan
agile anvil
steel swan
#

i thought i had to use PROTOCOLlib but doesnt seem like it

cunning shard
agile anvil
# steel swan maven

Add this to dependency :
'''plain
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>Version-goes-here</version>
</dependency>
'''

agile anvil
cunning shard
#

n a h

steel swan
#

@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

agile anvil
formal bear
#

How to add certificate for jdk?? I have Mysql database which requires SSL

sterile token
#

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
agile anvil
signal ether
formal bear
#

Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

limber owl
sterile token
#

To dont use the path

agile anvil
signal ether
#

what did 1.18 change with that then?

agile anvil
undone axleBOT
#

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

limber owl
agile anvil
sterile token
#

Im not english so its diff for me to undersand some things

agile anvil
formal bear
agile anvil
sterile token
#

@formal bear send your db connection on

#

?paste

undone axleBOT
formal bear
#

Wrong channel, its not my plugin, i get this error when using other plugin

sterile token
#

Oh

agile anvil
sterile token
agile anvil
#

Or do like Martinecko told you it's easier

iron glade
#

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();
zenith gate
#

what's it called for when the shooters arrow hits another player?

iron glade
formal bear
sterile token
zenith gate
agile anvil
iron glade
iron glade
limber owl
#

how can I make it less frequent, like have less caves without breaking the size/ length

agile anvil
smoky oak
iron glade
#

I have a valid webhook url, it works when I remove the \n

agile anvil
limber owl
iron glade
smoky oak
#

depends on the exact code in that line

limber owl
#

if(e > caveFrequency )

#

what should the caveFrequency be

sterile token
agile anvil
sterile token
iron glade
#

I tried by using System.getProperty("line.separator"); and still nothing

iron glade
#

?paste

undone axleBOT
iron glade
agile anvil
#

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

iron glade
#

Aight give me a second

agile anvil
#

Try just putting \n

#

Wait

#

I meant \ \ n

#

Without the spaces

iron glade
#

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
twilit roost
#

Why Skulls Texture works fine on Localhost but not on "comercial" server?

agile anvil
iron glade
twilit roost
#

I change them using packets
Comerical - actual server where players play, comercial is also Hypixel

agile anvil
iron glade
#

\\n

agile anvil
agile anvil
undone axleBOT
#

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!

iron glade
#

The odd thing is

#

It executes it, but still prints the error 400 in console lol

frozen cedar
# agile anvil ?ask

My code freezes when I try to print CraftBlock or get .getX() / .getY() / .getZ() / .getType()

frozen cedar
agile anvil
frozen cedar
#

I can not any more

#

i'm on fire now

#

no error

agile anvil
# frozen cedar no error

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

agile anvil
twilit roost
#

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();
}
frozen cedar
#

ChunkData data = createChunkData(world);
The data is ok

agile anvil
iron glade
#

Anyone happens to know whether there is an API / some method to get an URL of a picture containing the skin of an itemstack?

twilit roost
agile anvil
frozen cedar
agile anvil
twilit roost
#

probably? πŸ˜„

frozen cedar
agile anvil
#

You're trying to define something you can't define πŸ˜‚

frozen cedar
#

But I wrote this line when, in desperation, I tried to understand what was wrong

frozen cedar
#

i write System.out.println(block.getClass())

agile anvil
agile anvil
agile anvil
mortal hare
iron glade
#

Anyone knows where the textures of an itemstack are saved / if they are accessible?

iron glade
agile anvil
frozen cedar
twilit roost
# agile anvil I guess you don't need nms, see https://github.com/deanveloper/SkullCreator/blob...

not sure what method to use when my texture value is:
ewogICJ0aW1lc3RhbXAiIDogMTY1NjQyMTI3NDAyNywKICAicHJvZmlsZUlkIiA6ICJiYzRlZGZiNWYzNmM0OGE3YWM5ZjFhMzlkYzIzZjRmOCIsCiAgInByb2ZpbGVOYW1lIiA6ICI4YWNhNjgwYjIyNDYxMzQwIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzljOWMzNmJkOGUwNDY0YjhlZmRkMjFmZTJmMjI0NjE4YjQ5YTk4MjA1Y2U4YTU0ZGUzMTkxZjNiZDUxOGM2IiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0KICB9Cn0=

agile anvil
# frozen cedar @ NotNull

This doesn't mean it won't be null. Ever wondered what would happen if you input something null ? :)

zenith gate
#

?paste

undone axleBOT
agile anvil
zenith gate
#

@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

crisp steeple
#

very confused, somehow this is getting to 1 but not two, theres no exception in console either

iron glade
#

^

#

it's in ticks, not seconds, so you would have to multiply by 20

zenith gate
#

ohhh

#

that's right

signal ether
#

will rerunning buildtools replace the files in my local m2 repository?

hybrid spoke
#

yes

agile anvil
hybrid spoke
signal ether
#

because I forgot to build them with source lol

frozen cedar
crisp steeple
agile anvil
agile anvil
twilit roost
agile anvil
agile anvil
frozen cedar
agile anvil
jolly mantle
#

anyone know how to make a block dissapear after X time

quaint mantle
#

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

frozen cedar
#

it is not output to the console

agile anvil
agile anvil
quaint mantle
#

I think is not a Object

agile anvil
twilit roost
agile anvil
limber owl
#

when is the populate called in block populator?

twilit roost
agile anvil
agile anvil
agile anvil
signal ether
#

so I built my spigot jars with --generate-source but VSCode still isn't pulling the sources from maven? What am I missing here

limber owl
frozen cedar
twilit roost
frozen cedar
#

this is normal?

agile anvil
signal ether
#

i relaunched my ide, shouldn't that work?

agile anvil
agile anvil
limber owl
#

so it's called every chunk?

signal ether
#

nice to know you can get laughed out of a help channel just for asking a question around here

#

but mkay thanks

agile anvil
agile anvil
agile anvil
undone axleBOT
fiery prairie
#

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)

signal ether
#

but ok

sudden violet
#

chill ladies n gents

frozen cedar
agile anvil
fiery prairie
agile anvil
fiery prairie
#

not a line

signal ether
#

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

agile anvil
fiery prairie
#

there is no errors in intellij btw

frozen cedar
agile anvil
#

So that you're sure

agile anvil
#

I'd say it's because you're using data you haven't already created

frozen cedar
fiery prairie
#

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?

vestal musk
# fiery prairie

Use constants like MessageKey and the p.sendmessage will look like this: p.sendmessage(Messagekey.PREFIX + Messagekey.NO_PERMISSON);

fiery prairie
#

(if that came out rude - it wasnt supposed to be)

#

and also hows it going to help me with the brackets

frozen cedar
fiery prairie
#

alright I fixed my errors

vestal musk
iron glade
#

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;
        }
    }```
vestal musk
#

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

iron glade
#

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

vestal musk
#

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

iron glade
#

Yeah I'm kinda new too to discord linking stuff

#

but it seems fun

vestal musk
#

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

vestal musk
#

Well, then goodluck in ur next project and have a good day/night, im in central europe

thin lantern
#

is there any analog of mixins in spigot/paper?

vestal musk
#

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?

eternal night
#

and no

thin lantern
eternal night
#

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 ^

thin lantern
#

ill try

vestal musk
#

πŸ˜„

dawn plover
#

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

vestal musk
#

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 πŸ˜„

dawn plover
#

yea, my yml looks more like this

#

so string wont do it for me XD

vestal musk
#

ohhh soo these are locations

dawn plover
#

yea, basicly

#

and i ened the ncArea

#

(or ncPart, that will also do just fine)

vestal musk
#

YamlStorage.get().getLocation(), maybe? :DDD

#

oooooor, u can get the configsection

#

YamlStorage.get().getConfigurationSection()

dawn plover
#

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

vestal musk
#

hmm, i need to go so i cant help u anymore sorry, maybe someone else is gonna help u, goodluck! πŸ™‚ 😦

dawn plover
#

np, thnx anyway

delicate lynx
#

why not pass the location in the constructor

#

of whatever object you are using

dawn plover
#

sorry what?

#

you mean i make the object again from the yml

#

like, constructor(yml.x, yml.y, yml.z)

#

i know, bad example

dry forum
#

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

undone axleBOT
lost matrix
dry forum
#

wdym go up

lost matrix
#

Wait is the logs folder dynamic? Let me double check in the configs.

lost matrix
dry forum
#

wdym by go up 2 folders?

lost matrix
eternal oxide
#

You could probably get it from the Logger. getHandlers and find the FileHandler instance

lost matrix
latent pilot
#

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

river oracle
#

Iirc you can use PlayerProfile from spigot though

golden turret
#

how can i fix that?

lost matrix
#

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

river oracle
lost matrix
#

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

quaint mantle
#

?paste

undone axleBOT
lost matrix
quaint mantle
#

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();

lost matrix
quaint mantle
#

like language?

#

java

#

well im on spigot

lost matrix
#

What?

#

Spigot doesnt use javascript

river oracle
#

Javascript πŸ’€

lost matrix
#

Also: I meant SQL dialect

quaint mantle
#

i said java

lost matrix
#

Which DB do you use?

quaint mantle
#

im using an pebble host which is just a server hosting and using their databases

worldly ingot
#

So probably MySQL

quaint mantle
#

of course mysql

worldly ingot
#

Could have been MariaDB

quaint mantle
#

never heard of that

worldly ingot
#

Derivative of MySQL. Think of it as a fork

quaint mantle
#

okay

lost matrix
#

Is enqute even a word?

river oracle
next stratus
quaint mantle
lost matrix
#

Read the ConfigurationSerializable javadocs again. You forgot to add something.

quaint mantle
lost matrix
#

There seems to be a keyword missing.

golden turret
#

but it is not taking effects

lost matrix
manic bison
#

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?

signal kettle
#

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

paper viper
#

Get the item stack and set the amount to the current amount - 1

#

Then give the player a new itemstack for the new item

signal kettle
#

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?

paper viper
#

Wait so the β€œnew item” that is given is the one from the config?

river oracle
#

You can make your own parser and store it in memory

chrome beacon
#

I don't think that's possible

#

Sound requires a location

signal kettle
# manic bison bump

maybe smth like armor stand that will follow the player and then you can use location of that armor stand to play sound?

dawn hazel
#

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"```
river oracle
#

do size -1

#

Indexes start at 0

dawn hazel
#

ok

river oracle
#

Iirc positive bound is inclusive

paper viper
#

Because you have to replay the sound on the new location every time

signal kettle
#

oh okay;/

paper viper
# manic bison bump

The only decent work around sorta is to play a sound at a location but with a huge radius I guess

old cloud
chrome beacon
#

Wiki.vg has an entity sound effect packet. Maybe that can be used?

#

It's a bit limited but might work

river oracle
# manic bison bump

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

manic bison
manic bison
chrome beacon
#

You can use custom sounds without music discs

#

There's a whole system for that

river oracle
#

^

manic bison
#

oh

#

real?

river oracle
#

Yea if your not using ancient versions atleast

manic bison
#

1.9 πŸƒ

river oracle
#

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

manic bison
#

coz in my country everyone uses a special launcher thats in 1.9

river oracle
#

Oh yeah your cracked

manic bison
#

nope

dawn hazel
manic bison
#

im premiuΓΉ

river oracle
#

Then jsut use vanilla launcher

vocal cloud
#

Why the hell would a country not update to a newer version

river oracle
#

And use 1.9 non the less

chrome beacon
#

1.9 has the sound feature so it's fine

#

But yeah updating would be recommended

river oracle
#

So weid tho well tharw nice atleast

river oracle
chrome beacon
#

From what I can find 1.8 has it

manic bison
#

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

river oracle
#

Bruhf

manic bison
#

yes

#

epic bruh

river oracle
#

Tf kinda country is this

manic bison
#

if I had the chance I would make the server at least 1.15

river oracle
#

Cracked players too lazy to recieve the latest content for free ahaha

manic bison
#

its a minecraft server, the biggest in my country, every french minecrafter has heard of it

river oracle
#

More free content nahhh I'm good chap I'm good with my 1.9 ahaha

#

Myes that's kinda funny

chrome beacon
#

France isn't even that poor of a country. You really shouldn't support cracked and that launcher

manic bison
#

most of the time players r 12 yo whose mom dont want to buy minecraft for 23,95 €

river oracle
#

1st world problems at their finest

iron glade
#

Minecraft is 29,99€ now

river oracle
#

30 euro πŸ’Ά πŸ‘Œ

chrome beacon
#

Maybe I don't want to pay for something should I just steal it?

#

That's the logic your going with

manic bison
#

yeah because aren't cracked launcher just a steal?

river oracle
iron glade
#

I remember how I bought it for 20 EUR in like 2012

river oracle
chrome beacon
#

Well you're supporting piracy

manic bison
#

i'm not actually, its just facts

river oracle
#

Shut it kid get outta here

#

πŸ˜‚ πŸ˜‚

old cloud
manic bison
#

why

old cloud
paper viper
#

L

manic bison
#

why is the world against me

paper viper
#

You are pirating games

#

Or support it

#

I meant

manic bison
#

no

river oracle
#

World no like piracy

manic bison
#

i'm not

dire marsh
manic bison
#

no

dire marsh
#

ah yes

#

virus

river oracle
#

Malwarew

manic bison
#

yes

#

like this gaem

chrome beacon
dire marsh
#

quick, open up player reporting and report them to mojang!

manic bison
#

nooo

river oracle
#

He'll yea

chrome beacon
manic bison
#

can you click it now

#

pierronus.sendMessage(answer)

NullPointerException

buoyant viper
#

french people :(

river oracle
#

People with discord :(

quaint mantle
buoyant viper
#

lmao

echo basalt
#

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

lost matrix
echo basalt
#

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

wet breach
#

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

buoyant viper
#

u just need to tell the client someone opened the chest

#

thats all

wet breach
#

yep that

lost matrix
#

Thats lots of packet fkery in my books πŸ˜„

wet breach
#

lol

lost matrix
#

Not as bad as holograms but digging is still needed

winged storm
#

why is it crossed

lost matrix
#

Just use a component builder and add a hover event with an ItemStack

lost matrix
# winged storm

max health is an attribute. You need to get the attribute value (as the javadocs state).

winged storm
#

ok thx

iron glade
#

What's wrong?

#

you have to send it

#

to the player

#

You are just creating the component and not doing anything with it

celest thunder
#

does anyone know of something that can load dependencies + transitive dependencies other than whats inbuilt into spigot

iron glade
#

player.spigot().sendMessage(component);

#

Is what I'm using

#

Yes of course you can

#

np

#

Show the full listener

celest thunder
#

java

#

i

#

messed it up

iron glade
#

shift and the key left of backspace

celest thunder
crisp steeple
#

using String.valueOf is not going to work

#

ide doesn’t always know what you want

iron glade
#

ItemStack item = new ItemStack(Material.GOLDEN_BOOTS, 1);
You don't need to add "1" here btw

crisp steeple
#

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

lost matrix
#

I think you need to use nms in order to serialize the ItemStack to something that can be displayed.

celest thunder
#

@wind blaze what are you trying to do again sorry just jumped in

lost matrix
celest thunder
#

i also tried forks

#

no luck

#

like details about the item?

lost matrix
#

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.

celest thunder
# celest thunder no luck

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

celest thunder
lost matrix
lost matrix
#

Get a dependency tree and add the the next layer of dependencies to your plugin.yml

celest thunder
#

what is dependency tree

#

oh

#

i just manually put all the dependencies

iron glade
#

Anyone knows how I tell the discord api to manually retry sending a webhook after X seconds?

#

when reaching rate limit error 429

wet breach
#

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

crisp steeple
#

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

lost matrix
#

Intellij can generate a dependency diagram for you

celest thunder
#

then i just manually put all the dependencies into libby?

lost matrix
signal ether
#

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.

celest thunder
buoyant viper
#

return;

signal ether
#

plugin would still show as enabled

#

which might confuse user

celest thunder
#

you can snd a message i nconsole

buoyant viper
#

well disable and then return

celest thunder
#

sorry bad spelling

signal ether
crisp steeple
#
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

celest thunder
signal ether
#

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

lost matrix
signal ether
#

a console message is nice but can be easily missed

celest thunder
#

about the invalid config

crisp steeple
celest thunder
#

nevermind

crisp steeple
#

did you import it?

#

that doesnt make much sense since its a part of bukkit

#

you should have it

celest thunder
#

@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

dusk flicker
#

?paste

undone axleBOT
celest thunder
#

thanks

#

ok so

#

you need to build spigot

#

for the version you're trying to work with

#

download build tools

dusk flicker
#

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

vestal musk
celest thunder
dusk flicker
#

@quaint mantle can we get that as a command

#

thats actually like a really good resource

celest thunder
#

yes

#

yeah that should work

#

open your cmd

dusk flicker
#

Watch that youtube video linked above

vestal musk
#

The version is what u want so if u downloaded the 1.19 spigot then its good but if not then not

celest thunder
#

yes

#

the youtube video will explain better than me

vestal musk
#

:DD

celest thunder
#

yeah just watch the video

#

it will make it way easier for you

vestal musk
#

Oh

#

I got u!

lost matrix
#

Imagine using apple products

vestal musk
#

Its good! Not for gaming but for coding its one of the best

carmine nacelle
#

if im using remapped stuff, do i want to use the -remapped output jar or the original

buoyant viper
vestal musk
#

A lot of professional programmer use it

carmine nacelle
#

i love my iphone 13 pro max but id never use a mac

buoyant viper
#

true in the tech workplace apple seems to have a grip over the scene

carmine nacelle
#

used to be a big time samsung fanboy.

lost matrix
vestal musk
buoyant viper
lost matrix
lost matrix
#

Or gift it someone else

vestal musk
#

XD

buoyant viper
#

real programmers sit in their basements writing COBOL on a FreeBSD desktop machine with Emacs

vestal musk
#

Notepad++ moment

buoyant viper
vestal musk
#

My teacher just use notepad with white mode

celest thunder
#

you guys use computers?

vestal musk
#

Currently? No

lost matrix
buoyant viper
#

ill take it off ur hands free of charge

celest thunder
#

same here

buoyant viper
#

im debating fedora or debian but i feel like ill regret them over time

lost matrix
#

Catalina iirc

buoyant viper
#

thats macos

#

i meant the linux distro u installed

lost matrix
#

Thats the version on the mac. Or do you mean my linux distro

#

Ah

#

I think it was just a weird ubuntu fork

buoyant viper
#

ah

carmine nacelle
#

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?

buoyant viper
#

honestly i might just go with ubuntu since itll be Debian with potentially more up to date packages

lost matrix
carmine nacelle
#

?

buoyant viper
#

looks to me like getString should be causing an error at best

carmine nacelle
#

I want to get level-a and level-b

paper viper
#

It returns just a category

carmine nacelle
#

yeah

#

thats what i want

paper viper
#

You can’t do getString

#

It’s a category

lost matrix
#

Its a ConfigurationSection

paper viper
#

Mhm

#

You have to go further by one

#

level-1.level-a.test

carmine nacelle
#

I want to loop over the 1st level children of levels and return the values

paper viper
#

You can call getString on that

carmine nacelle
#

i dont wanna have to do that for every value

shadow zinc
#

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"
    }
}```
carmine nacelle
#

figured it out

shadow zinc
#

now that I type that, seems strange

#

but

lost matrix
#

That sounds weird...

shadow zinc
#

I do want it to be multi-version

#

same here

#

how do I shadow that lib?

lost matrix
#

Nope im gonna go eat something now PES_MmmSip

shadow zinc
#

yum, what you eating?

buoyant viper
#

just like

#

uh

#

do it

#

idk

crisp steeple
#

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

dim palm
#

Hello, im trying to send a action bar for a plugin that is 1.8 - 1.16.5

#

but i keep getting this error

zenith gate
#

?paste

undone axleBOT
dim palm
zenith gate
#

please use the paste link... screenshots are blurry and hard to read...

dim palm
zenith gate
#

are you running craftbukkit or spigot?

dim palm
crisp steeple
#

works fine for me

zenith gate
#

yeah it works fine for me too

dim palm
crisp steeple
#

what version are you on?

zenith gate
#

the only error i can see is if your on craftbukkit which isn't support for the spigot api

crisp steeple
#

youre on 1.8 and 1.16?

#

what

dim palm
delicate lynx
#

1.8 doesn't have ChatMessageType

buoyant viper
#

importing spigot-api from a system file? why not use the repo

dim palm
#

?repo

#

but that isn't the problem now

buoyant viper
delicate lynx
#

remove the actionbar part

buoyant viper
#

not a problem just a suggestion

delicate lynx
#

that does not exist on 1.8

dim palm
#

how can i detect it from 1.16

buoyant viper
#

test for something only 1.16+ would have

#

or check server version

dim palm
#

Im doing NoClassDefFoundError

lost matrix
#

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();
  }
lost matrix
# dim palm

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.

dim palm
zenith gate
#
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.

lost matrix
dim palm
#

okay

delicate lynx
#

I told you the fix

zenith gate
#

you need to update to newer software

delicate lynx
#

sending action bar messages is not in the API on 1.8

#

you can only send messages in chat

dim palm
zenith gate
#

can I give a permission to someone if they consome let's say an apple?

dim palm
#

maybe use a permission plugin?

zenith gate
lost matrix
lost matrix
zenith gate
#

Yep it looks that way lol

lost matrix
#
  1. Create an API to interact with this plugin
zenith gate
#

would it be bad to just build it onto my existing one? so then there is no need for an API?

lost matrix
# zenith gate would it be bad to just build it onto my existing one? so then there is no need ...

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.

zenith gate
#

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

crisp steeple
carmine nacelle
#

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.

zenith gate
#

do you plan on editing this data? or is it just to store. editing through the config if you chose that

carmine nacelle
#

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

zenith gate
#

so then i would use persistent data container

carmine nacelle
#

all i really need to keep track of in config is the location

zenith gate
#

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..

carmine nacelle
#

well everything about it can be changed

#

but i have functions to change the values with namespacedkeys

zenith gate
#

alrighty

echo magnet
#

1.8.8 Add maven library that doesn't support minecraft

carmine nacelle
#

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

carmine nacelle
#

do integer persistent data types not work??/

#

or does setting item meta more than once remove values?

buoyant viper
#

?pdc

carmine nacelle
#

?

buoyant viper
#

it looks like u probably do need to set the item meta again @carmine nacelle

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..

buoyant viper
#

oh rip

carmine nacelle
#

yuppp

#

i need a break

zenith gate
# carmine nacelle i need a break

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

carmine nacelle
#

coding..on the phone...? 😭

zenith gate
#

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..

carmine nacelle
#

nuts

#

masochist

lost matrix
zenith gate
#

mhm...

#

yeah lol

#

don't worry I don't do it anymore 🀣

carmine nacelle
#

Is there a way to get PDC data from a block u break

#

without picking the block up

#

(need an itemstack)

lost matrix
#

Blocks dont have a PDC unless they are a TileEntity

carmine nacelle
#

its a tileentity

#

beehive

lost matrix
carmine nacelle
#

yea

#

it is one

lost matrix
#

Then get the BlockState, cast it to BeeHive.

#

BeeHive is an instance of PersistentDataHolder so you have all the pdc methods there.

carmine nacelle
#

wait

buoyant viper
#

huh, didnt know beehives were TEs

carmine nacelle
#

how does he put pdc on diorite then

lost matrix
#

Without watching: he doesnt

buoyant viper
#

must be bc i havent updated my minecraft knowledge since 1.12.2 tbh

carmine nacelle
#

he 100% does..

buoyant viper
#

theres uh

#

@tender shard library for block pdcs iirc

lost matrix
carmine nacelle
lost matrix
carmine nacelle
#

...

#

yep

#

u right.

lost matrix
#

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,.

carmine nacelle
#

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.

desert tinsel
#

Beehive is actually a tilestate block

tacit dagger
#

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)

winged anvil
#

?paste

undone axleBOT
sweet pike
#

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)

winged anvil
#

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.

carmine nacelle
#

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?

lost matrix
winged storm
#

is ther esomehitng wrong with that

lost matrix
carmine nacelle
#

registerevents

winged storm
#

its still underlined

#

will this work

buoyant viper
#

does JoinListener implement the right Listener class

winged storm
buoyant viper
#

hit alt enter and select the org.bukkit.event.Listener one

winged storm
#

oh i implemented the wrong one?

buoyant viper
#

u didnt even import it

winged storm
#

oh ok

#

ty

ancient plank
#

me when

winged anvil
proper notch
#

shading = including within your compiled jar

#

Normally used for libraries, e.g HikariCP or Guava

ashen quest
#

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?

eternal oxide
#

What is ps in this code?

ashen quest
#

do you mind if I yoink your video idea

eternal oxide
#

tis ok I figured it out

golden kelp
buoyant viper
#

since its sending a packet

ashen quest
sterile token
#

Hi i want to ask if spigot can get bug for reason

chrome beacon
#

Spigot can have bugs just like any other software

sterile token
#

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

chrome beacon
#

Spigot doesn't mess with Mongo though?

sterile token
#

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

#

😬

eternal oxide
#

it would be nice if CraftBukkit didn;t use versioning in its packages

buoyant viper
#

true

#

would make NMS a lot less painful probably

chrome beacon
#

Didn't they start doing that for a reason?

sterile token
#

So spigot can get bug when executing/running plugin code?

buoyant viper
#

spigot can bug out doing anything

#

computers are a Fuck

#

shit hits the fan sometimes

eternal oxide
#

Yep, it doesn;t really protect anything. Just forces devs to make version dependant code

chrome beacon
#

Spigot is probably not the issue

sterile token
#

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

chrome beacon
#

What exception

buoyant viper
#

what exception and whats the code

chrome beacon
#

^

sterile token
#

Yeah

chrome beacon
#

?paste

undone axleBOT
sterile token
#

Let me paste everything

#

1m please

#

Please dont go offline!!!!

ivory sleet
#

Think they went offline

chrome beacon
#

goes back to sleep

buoyant viper
#

goes back to driving

ivory sleet
#

Yup

#

Verano unlucky :>

sterile token
#

Conclure are u sleeping?

#

=><=

#

Im annoyed

buoyant viper
#

yeah

ivory sleet
#

What’s that suppose to mean?

sterile token
#

hahaha

buoyant viper
#

we're asleep

ivory sleet
#

=><=

#

?

sterile token
#

here its 4am

buoyant viper
ashen quest
#

nice

sterile token
#

2 shity hours with this shhity bug

ivory sleet
#

Oh

sterile token
#

And still cannot fix it

#

Besides the code i the same on the 2 versions on 1.19 doent work

ivory sleet
#

Well I am asleep but what does this bug of yours do?

sterile token
#

Let me send full code first

ivory sleet
#

Make sure you use latest version of spigot first and foremost

buoyant viper
#

issue with mongodb , works fine on 1.12 for him but not 1.19

sterile token
#

Yeah

ivory sleet
#

Oh

sterile token
#

Im thinking its a spigot bug

#

Or something

ivory sleet
#

Give us the exception first :>

buoyant viper
#

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

sterile token
#

Also im not registering or using Vector on my Claim class

#

πŸ€”

#

Really strange

#

Is the first time that something like that happens to me

ivory sleet
#

Send ClaimManager

sterile token
#

Allright

buoyant viper
#

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

sterile token
#

There you have all to try to find the problem

buoyant viper
#

truncates the package line and imports

sterile token
#

what?

buoyant viper
#

if you dont paste the full text from the .java file, we cant properly identify an error line

sterile token
#

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

ivory sleet
#

I see now

sterile token
#

Are you seing conclure

ivory sleet
#

There’s data type issues

sterile token
#

Allright

ivory sleet
#

I suggest using your own vector class

sterile token
#

Im not using vector class conclure

#

Im using CLocation which sostitutes vector

#

So i dont know why the exception

#

πŸ€” 😑

ivory sleet
#

But anyway

#

You should first and foremost shade and relocate bson

#

Along with Mongo and everything

sterile token
#

Yeah i have already doing shade

ivory sleet
#

Relocate also

sterile token
#

Yeah

ivory sleet
#

Such that it doesn’t cause weird linkage errors with other plugins

sterile token
#

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

ivory sleet
#

Yep

#

You need to declare the repository

sterile token
#

Conclure 1.12.2 server console

sterile token
#

And the code is the same in the 2 plugins

ivory sleet
#

And do you have any other plugins that get loaded?

sterile token
ivory sleet
#

Hmm

#

Try to yeet any spigot-api from your local maven repo

sterile token
#

@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

ivory sleet
#

Sleep tight

sterile token
#

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

shadow zinc
#

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

lost matrix
shadow zinc
quaint mantle
#

is there any reason NuVotifier isn't seeing my plugin as a VoteListener..?