#help-development

1 messages · Page 1722 of 1

young knoll
#

Right

civic apex
#

thats what i meant

#

basically to avoid making huge textcomponents and just have a formatted string

#

yo october 8th for me now

quaint mantle
#

whaat

#

same

#

what timezone u in?

civic apex
#

utc - 1

quaint mantle
#

mines gmt+2 iirc

civic apex
#

wait

#

i dont actually know

#

if its that

#

no its +2

#

ok

#

utc

quaint mantle
#

ye i live in south africa so its gmt+2

civic apex
#

time is says mine is utc+2 or cest

quaint mantle
#

can someone give me an incredibly stupid plugin idea

lavish hemlock
#

weed

quaint mantle
#

:|

lavish hemlock
#

you asked for a dumb idea

#

I gave you weed

young knoll
#

Blocks run away from you

muted sand
#

Answer to this is probably no- but is it safe cancelling an event while in an async task?
also how do i see the output of an async task and run a sync task with that specific output

worldly ingot
#

is it safe cancelling an event while in an async task?
By the time you cancel it in an async task, the event will have already been processed

#

Is it safe? Yes. Is it effective? No not at all

quaint mantle
#

Whats the best way to store server names as a list like hub Skyblock into a data base
im trying to do it as i want too store wheather or no a module is active on each server ETC

#

Anyhelp is appreciated

eternal oxide
#

Your question doesn't really make sense

#

server names are set by editing the properties file, so you must already know the server name

#

also if you are using a bungee proxy you must already have added the names to the proxy, so again you already know the names

torn shuttle
#

hm my laziness sometimes surprises me

#

so I need to map new durability values that are sort of similar to the vanilla mc ones

#

but, like, there's a lot of materials to cover

#

and config options

#

so

#

how about just doing some math on existing durability and calling it a day

#

say hello to (1000 - defaultDurability) / 1000

young knoll
#

What happens when the default durability is > 1000

torn shuttle
young knoll
#

Are we talking the default durability of vanilla items?

torn shuttle
#

yeah

#

highest value is 592

young knoll
#

Cast your meta

#

The class I linked?

torn shuttle
#

are there?

gaunt saffron
#

im re-downloading jetbrains whatever it's called (ssd failure)
does it have remote git repo support or do i have to use the command line?
im not using github

torn shuttle
#

oh wait netherite tools go higher?

#

2031

young knoll
#

Yes

#

Even diamond is over 1000

torn shuttle
#

hmm

#

I'll just run a different check for tools with an adjustment for 2k

#

man I never remember how damageable works

#

it counts up to the durability right

#

not down

young knoll
#

1 damage means 1 away from full durability

torn shuttle
#

when damage reaches max durability the item breaks, correct?

#

?paste

undone axleBOT
torn shuttle
#

oh wait

#

not close at all

#

I forgot what I was doing with these actually

sullen dome
#

the damage get's count down. so for example:
you have a pickaxe with 500 base-durability.
if you set it's damage to 50, it's durability would be at 450

worldly ingot
#

That always messes me up as well tbh lol

#

It is a bit backwards

sullen dome
#

why tho? you set the damage, not the actual durability

worldly ingot
#

No I get that

#

Suppose it's less NBT data if there's no damage on the tool, but we could otherwise have the luxury of setting alternative durabilities :((

sullen dome
#

i mean, minecraft has always been weird

hard barn
#

ñ

quaint mantle
#

How can i save custom configs withing Bungeecord any ideas cant see anything on google

pastel stag
#

migrating from eclipse to intellij what a nightmare

quaint mantle
#

yikes

quaint mantle
muted sand
#

pain

muted sand
quaint mantle
#

im still trying to make blocks fear me

#

not going well

muted sand
#

appears you fear the blocks

quaint mantle
#

yes

#

yes i do

quaint mantle
#

Can pulling information from database without using async task cause lag?

young knoll
#

Yes

stone sinew
quaint mantle
#

Is the best way to pull information from the database using asynctask?

young knoll
#

Generally, yes

quaint mantle
#

Would pulling too many houses from players using async be bad?

#

pull coords

vital yacht
#

Doing it on the main thread would be worse

quaint mantle
vital yacht
#

If you do anything involving databases on the main thread, the whole server has to wait until it is complete.

#

That’s how anything on the main thread works, but databases will take more time.

quaint mantle
#

So I shouldn't put homes in asynchronous?

worldly ingot
#

You should

#

When a player joins the server, you should asynchronously load their homes from the database and keep them cached

#

When they leave, remove them from the cache

#

If they create/delete a home, update the cache and perform an asynchronous update

quaint mantle
#

oh

worldly ingot
#

Any sort of IO operation, especially databases, do them async

young knoll
#

Is it worth it to look into some sort of cache for database updates

quaint mantle
#

When there is no possibility to use async, is there a problem?

young knoll
#

Or should I just send them as they happen

worldly ingot
#

No, sending as it happens is fine

#

And there's generally always an opportunity to perform operations asynchronously

#

Especially for homes because it's not required at all times

#

Again, loading when they join and caching prevents the need for a SELECT statement randomly on request

quaint mantle
#

This one, for example, I don't see how.

worldly ingot
#

That too you would ideally keep a cache of

quaint mantle
#

I have a chace, in this case it is to set money for offline players.

worldly ingot
#

Unfortunately Vault isn't async-friendly so you really are SOL in that case

quaint mantle
#

So should i remove my async?

worldly ingot
#

In that case, maybe. Vault expects things to be run synchronously which is annoying

#

May be worth checking in on how economy is implemented in other open source plugins like Essentials

young knoll
#

You can still cache everything though

worldly ingot
#

Oh definitely. If done once you can cache and it's a hell of a lot less painful

quaint mantle
worldly ingot
#

Though first run would hurt a bit

quaint mantle
#

But this option is to set money for offline players.

young knoll
#

Explains the somewhat heavy login event from essentials

quaint mantle
#

Is saving cached data to the database after the player leaves a great idea?

#

Or it would be better to leave the data stored and every 5 minutes when there is an autosave, check if it is online and then remove it.

vast kelp
#

Well ask yourself this: do you need the database to be up-to-date at all times, or can you afford to be more lenient?

quaint mantle
#

Both are good for me. I would like what has the least negative impact (lagg)

young knoll
#

Save it when they leave

#

And then consider having a task to save it every so often

vast kelp
#

I disagree, it sounds like every 5 minutes would be preferable for them. A short, expected lag spike is certainly preferable to something a player can trigger, especially on larger servers.

young knoll
#

Alternatively save it whenever it updates

vast kelp
#

You could also do both with a config variable that lets the server owner decide.

young knoll
#

If you are able to save async there is no reason not to do it on update

#

But if you aren’t then you may want to consider the other option

quaint mantle
atomic vale
#

it is allowed publish plugin with url shortner?

undone pebble
# quaint mantle

You don't have to get their offline player instance - you can simply invoke the regular method (Bukkit#getPlayer), check if its null then proceed into removing their cache as you usually would.

It's more efficient in that case iirc

gusty mica
#

hi im getting alot of errors

#

with this

#

idk spigot api.. i was watchin a plugin tutorial lol

chrome beacon
#

What error

#

Also never use thread sleep

gusty mica
#

lemme show

#

wait how do i show lol

#

its on eclipse

#

....

chrome beacon
#

Did you just copy and paste code?

gusty mica
#

yee.... and a bit of changes

#

i just watched the tutorial and followed it lol

#

i can send u it if needed

chrome beacon
#

You should learn Java then start with spigot

gusty mica
#

and found this

chrome beacon
#

What were you looking for

gusty mica
#

dm's

chrome beacon
#

Noted do NOT help ^
Goal is back door plugin

undone pebble
#

Hm?

stone sinew
chrome beacon
radiant plaza
#

lmao

mortal hare
#

i just watched the tutorial and followed it lol
@gusty mica have you imported the spigot api via eclipe or maven?

#

You dont have any Spigot API packages

paper geode
#

of course

sage patio
#

What is best method for freeze a player ?

worn tundra
sage patio
#

and about slowness / speed, i don't want to player rotate his head too

chrome beacon
ivory sleet
#

dont us an ArrayList, maybe a HashSet instead?

chrome beacon
#

True that works

sage patio
#

i thought about freezing player with spawning an npc, invisible and spect player into npc
but player can get out with shift

ivory sleet
#

I didn’t say HashMap I said HashSet

#

And the problem with ArrayList is that it has an O(n) time complexity for its contains method

#

Meaning it isn’t scalable for what you’re doing

chrome beacon
#

Well HashSets are essentially hashmaps

ivory sleet
#

Yeah

mortal hare
#

HashSets are mostly used for duplicate sorting and o(1) access time. If you really know you wouldnt get any duplicate data and you dont need to access the data via object data, use arraylist or if its fixed size, primitive array,

#

Have you tried debugging the packet handler by adding message after instanceof clause?

#

Have you tried relogging?

#

Do you have any plugins that interfere with packets?

tardy delta
#

does anyone knows a bit of regex here?

#

i'm trying to remove all spaces, underscores and - characters from a string

#

i tried [\\ _-], "" but that doesnt seems to work

sullen marlin
#

Hmm looks ok to me, assuming those are replaceAll arguments

#

Though idk if escaping space is required

tardy delta
#

Let's take my book from previous year

eternal oxide
#

[\\ _-]+ works for me

sullen marlin
#

You could always just do three replaces in a row, might even be faster

eternal oxide
#

the + is for multiple matches

candid galleon
#

shouldn't you use \s also

solar sable
#
 @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&',"&bDiscord Invite Link Processing..."));
        String message = ChatColor.translateAlternateColorCodes('&', "&b Discord Invite: <discord invite link will be here> ");
        Bukkit.getScheduler().runTaskLater(DiscordCommand,message, 20);
        return true;
    }
``` how to make the String message send the message a bit late? i dont know if what i did with the scheduler is correct or not
#

maybe detect when they use it and then cancel the event?

#

e.setCancelled(true)

#

like that lol

#

lol

tardy delta
candid galleon
#

ye

barren nacelle
pastel stag
#

why use a burn after read

atomic vale
#

can i publish plugin with adfocus url shortner

barren nacelle
#

Uh

#

Idk

pastel stag
#

you create a player object but continue to use e.getPlayer() in the rest of your code also

barren nacelle
#

Oh yeah

#

Aside from that anything else wrong

pastel stag
#

you should specify Player player = event.getPlayer(); and then after that just use player.blahblahblah instead, like you did on your player.sendMessage("you smell");

#

im not familiar w/ toggles as of yet tbh but just passing on the tip for the bit i saw right away that you could improve 🙂

barren nacelle
#

Do you mean e.getplayer when you say event.getplayer();

#

its an Interact event

pastel stag
#

your event is specified as e so for you, yes

#

personally i prefer something like public void onBreak(BlockBreakEvent event) { instead of just 'e' but it can be whatever

#

same, it technically makes no difference except i feel like it makes your code easier to read later on, by yourself and potentially others

#

where was that in his code?

#

am i blind o.o

#

oh lmao

barren nacelle
#

I am dumb🥟

pastel stag
#

also, getItemInHand() is deprecated

barren nacelle
#

People say that you need to know Java before coding plugins but do you know what level of Java you need to achieve before coding plugins?

barren nacelle
#

Ok its more readable I guess

pastel stag
#

personally i would rename your array as well

#

i find it kind of confusing personally might be just me

#

could make it like 'dragonplayer' or something

#

yeah just keeping future readability in mind

#

i dont see why the code wouldnt work @barren nacelle ```
public class ToggleEgg implements Listener {
ArrayList<Player> dragonplayer = new ArrayList<>();
@EventHandler
public void onClick(PlayerInteractEvent e) {
Player player = e.getPlayer();
if (player.getInventory().getItemInMainHand().getType() == (Material.DRAGON_EGG)) {
if (dragonplayer.contains(player)) {
player.setAllowFlight(true);
player.setFlying(true);
player.setFlySpeed(10);
player.setHealth(50);
player.sendMessage("You smell");
dragonplayer.remove(player);
} else { //NOT dragonplayer
player.sendMessage("You suck");
player.setHealth(50);
dragonplayer.add(player);
}
}
}
@EventHandler
public void onDeath(PlayerDeathEvent e) {
Player player = e.getEntity();
if (dragonplayer.contains(player)) {
e.setDeathMessage("You died a dragon you suck");
}
}
}

#

i register mine in Main class, assuming he has one as well

#

typically i private Main plugin; public ExampleListenerClass(Main plugin) { this.plugin = plugin; }
and then
getServer().getPluginManager().registerEvents(new SQLLogger(this), this);
in the main class w/ an import

#

which i think is not-preferred? but whatevs

paper viper
#

Don’t name your main class Main

barren nacelle
#

Probably idk how to fix it tho

pastel stag
#

😛

barren nacelle
#

So it works one way I just can't turn it off

#

`package server.core.one;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.DragonFireball;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener {

@Override
public void onEnable() {

Bukkit.getPluginManager().registerEvents(new ToggleEgg(), this);
Bukkit.getPluginManager().registerEvents(this, this);
}

@EventHandler
public void onIn1(PlayerInteractEvent e) {
    if (e.getAction() == (Action.RIGHT_CLICK_AIR) || e.getAction() == (Action.RIGHT_CLICK_BLOCK)) {
        if (e.getPlayer().getItemInHand() != null && e.getPlayer().getItemInHand().getType() == (Material.DRAGON_HEAD)) {
            DragonFireball dragonfireball = e.getPlayer().launchProjectile(DragonFireball.class, e.getPlayer().getLocation().getDirection());
            
        }

}}}`

undone axleBOT
barren nacelle
#

Maybe I should of used paste bin

pastel stag
#

methods in main class 😒

#

i really am a simpleton

wise fulcrum
#

Can I ask a question about Gradle in here?

eternal oxide
#

?ask

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. Create a thread in case the help channel you are using is already in use!

wise fulcrum
#

Oh okay. When I want to use Gradle with Kotlin DSL in Intellij it always underlines everything. Ich have tried using different version of Intellij Idea, reinstalling Gradle and so on. I've also googled the problem but didn't find anything that helped me.

lavish hemlock
#

click on the Gradle button on the right side of IDEA

#

then, in the top left of that panel, click the refresh button

#

that fixes it most of the time for me

wise fulcrum
lavish hemlock
#

have you tried restarting IDEA?

wise fulcrum
#

Yes

lavish hemlock
#

the problem probably is IDEA tho

#

considering it doesn't seem to recognize that the scope of the buildscript is a Project

#

have you tried invalidating the caches?

#

you can do so via File > Invalidate Caches... (File is in the top left)

lavish hemlock
#

well, theoretically yeah

#

but you'd break a lot of shit

#

well you'd need to implement an event listener that listens for all cancellable events and then cancels them immediately

#

there isn't a generic way to do it since you can't find all classes that extend/implement a specific superclass/interface

solar sable
#

i mostly use e cause its shorter and easier to write lol

lavish hemlock
#

I use e as it's conventional and looks nicer

#

but, as a Kotlin dev, I write the long names more often

solar sable
#

yuh

swift creek
#

where to download spigot

lavish hemlock
eternal oxide
#

If you do that no one is going to be able to login

swift creek
#

thanks

lavish hemlock
#

I think...?

solar sable
#
@Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        sender.sendMessage(ChatColor.translateAlternateColorCodes('&',"&bDiscord Invite Link Processing..."));
        String message = ChatColor.translateAlternateColorCodes('&', "&bDiscord Invite: https://discord.gg/usNtXww9pD");
        Bukkit.getScheduler().runTaskLater(Testing.getPlugin(Testing.class), () -> {
            Bukkit.broadcastMessage(message);
        }, 20);
        return true;
    }
``` guys how to make the discord link clickable? i tried to click it but its not clickable but if i send in chat it will be clickable
wise fulcrum
lavish hemlock
#

unfortunately a lot of events probably don't have superclasses

#

and

#

I think that would cause Spigot to listen to only an instance of the superclass instead of the subclasses

#

but that's impl logic that I don't know lol

#

you can find all cancellables via the javadocs

#

but uhhh

#

that's a lot of cancellable events

#

I'd recommend trying the superclass method on something like EntityEvent

#

and if that doesn't work

#

then

eternal oxide
#

?xy

undone axleBOT
lavish hemlock
#

feel free to suffer! :D

tender shard
#

I don't think that'll work

lavish hemlock
#

better than the alternative

#

(if it works)

tender shard
#

I once tried to listen to all events by using the "super" classes but the events just weren't passed to the listeners

pastel stag
#

lmao who added these snippets to the bot

#

that dude is fucking hilarious

solar sable
#

snippets?

solar sable
#

guys how to delete modules?

#

in my project, theres this thing now which i thought i was making a new project but instead did something else and now everything is broken down

#

i wanted to create a new project called Events but instead i made the events into the project i was in and now idk how to fix it

worldly ingot
#

A Maven module you mean?

#

If so all you have to do is delete that project, and then in the parent pom.xml, remove the <modules> block

#
<modules>
    <module>My plugin coding</module>
</modules>```
or something like that. You can just delete it
solar sable
#

in the pomxml, its not what my old pom.xml is how to fix this?

worldly ingot
solar sable
#

and there is no modules in the pomxml

quaint mantle
#

Hi everyone I need an developer that can help the server from me if there are problems to fix it and also add plugings. Dm me if u want.

solar sable
#

theres only the pom.xml for the events thing

#

theres no pom.xml for my original project

lavish hemlock
#

yep that sounds about right

solar sable
#

this is pain

#

me trying to recover back my project is pain

maiden briar
#

If I create a scoreboard via packets, will new joining players automatically get the scoreboard or do I have to resend all objectives/teams again?

solar sable
#

i really need help, idk how to remove this Events thing in my plugin and it literally removed my plugin yml and stuff

lavish hemlock
#

nope

#

he is 15

quaint mantle
#

Doesn't matter

lavish hemlock
#

he also said he wouldn't

quaint mantle
#

ye my bad

#

i just need an good dev but for free

#

so srr

#

I have many customers who are not even 15 :)

lavish hemlock
#

(what he actually means is he needs someone to setup plugins and check for bugs, so he needs a sysadmin lol)

quaint mantle
#

i know

lavish hemlock
#

I'm not even accepting plugin commissions atm

quaint mantle
#

Then either do it yourself or pay

lavish hemlock
#

not until I finish my framework

#

but even then they won't be free bc I need money for videogames

lavish hemlock
#

(I need to completely redo some parts of it)

#

(I am scared, someone please help me)

ivory sleet
#

Hi

lavish hemlock
#

hi Conc

ivory sleet
#

hi Maow

#

How’s life

lavish hemlock
#

it's aight

#

just been playing some shit on my Switch instead of finishing my projects

#

the usual™️

ivory sleet
#

Ah procrastination continues

lavish hemlock
#

replayed Undertale again since I saw we had it on there

ivory sleet
#

Oo

eternal oxide
#

I'm a master procrastinator

ivory sleet
#

I’m still awaiting the switch I ordered

#

🥲

lavish hemlock
#

my family's had one since like

#

2 Christmases ago I think

#

we just don't have many games for it

#

it's mainly just the games my sister wants for it before she throws a fit bc she's 6 and doesn't know how to play videogames

#

example: Cuphead

quaint mantle
#

What about #general 😋

ivory sleet
#

Oh lel

lavish hemlock
quaint mantle
#

we are discord helpers

#

All

ivory sleet
lavish hemlock
#

what fuckin' hivemind did I end up in by accident

quaint mantle
#

Everyone can help in something

eternal oxide
#

then you are not actually cancelling the events, or your listeners are not registered correctly

#

?paste some actual code

undone axleBOT
eternal oxide
#

where do you register it?

#

show

#

horrible static use but with that code there is no reason you can move items

#

also line 15 of main can be removed, its doing nothing

#

from that code, assuming you have no errors on startup, there is no reason you can move items

#

then it should be working. Perhaps you forgot to update the server with the jar?

#

there is nothign broken in that code

#

also, no point in final on your Main class

#

No idea, we only do spigot here

#

add some sysout to debug. Make sure the events are firing

#

try it on vanilla spigot

#

spigot

#

sorry, I was talking to morice

#

yes, spigot, not whatever you are using as a server

old cloud
#

Is there an API to write/read schematic files?

eternal night
#

which uses the mojang structure format

old cloud
#

Ok cool, and how do I access the StructureManager?

old cloud
#

hm, it doesnt exist for some reason

lavish hemlock
#

what version are you on?

old cloud
#

1.17

lavish hemlock
#

hm

eternal night
#

this API is 3 days old

old cloud
#

Oh

eternal night
#

make sure your local maven cache is up to date

lavish hemlock
#

oh lol

#

yeah you might wanna update your Spigot then

old cloud
#

Well, how would you do it for older versions?

eternal night
#

you are using 1.17 but not 1.17.1 ? xD

old cloud
#

y

eternal night
#

eeeh, well presumably you use WorldEdit API ? I don't know if there is any cute standalone library to read/write sponge schematics

old cloud
#

I found a wiki page but its pretty superficial

eternal night
old cloud
#

Very nice, thankyou 👍

lavish hemlock
#

isn't it just a binary format?

#

I could probably make my own library

#

also maaaan it's been a while since I've seen the name "MCEdit"

eternal night
#

this fortunately isn't mcedit format 🙏

lavish hemlock
#

it's built upon it

#

The goal of the Sponge Schematic Format is to improve upon the previous MCEdit Schematic Format to provide better forward compatibility and improve inter compatibility between different versions, platforms, and varyingly modded environments.

eternal night
#

yea, but now we at least have a well documented standard xD

#

and yea, you could implement it yourself

#

half of it is just internal nbt

lavish hemlock
#

dope

#

actually that's a fun project to work on for MSPL

#

I love binary formats

eternal night
#

I mean, you don't actually have to do the writing

#

you are just constructing a huge compound tag

#

and using mojangs existing compression/writer to write it

lavish hemlock
#

wellllll

#

it's like

#

kinda different

#

does the name of the field actually matter?

#

if so, then it's just NBT

#

if not, then it's a custom format

lavish hemlock
#

damn

#

that's disappointing, actually

eternal night
#

I mean, you could definitely make this more efficient

#

on the other hand, not much need to do so

#

concerning these files never see the network besides an initial copy to the destination

#

it is pretty whatever

crude hound
#

Hello, I succesfully put the mojang mapping on nms but now the problem is that every classes changed and I don't know how, and what to do to send a packet (im in 1.17.1)

golden turret
#

?paste

undone axleBOT
golden turret
tardy delta
#

this is more efficient

if (a < 10) {
  return "something";
} else if (a < 20) {
  return "something else";
} else {
  "return nope";
}```
than this right?
```java
String str = "nope";
if (a < 10) {
  str = "something";
} else if (a < 20) {
  str = "something else";
} 
return str;
golden turret
#

return

eternal night
#

if you are on this level of optimisation, you are probably missing a bunch of other low hanging fruits tho

tardy delta
#

no but my teacher doesnt allow me to use the first one

eternal night
#

¯_(ツ)_/¯

golden turret
#

say to him for me: fuck you

tardy delta
#

so i'm angry i got 24/25 on my test

#

😳

hasty prawn
#

Was there a comment

eternal night
#

felt that done that

hasty prawn
#

On why you missed a point

tardy delta
#

no

#

he probably hasnt seen a real java program

hasty prawn
#

If the first one is exactly what you submitted, you deserved a point off

#

"return nope";

eternal night
#

true

tardy delta
#

it was for calculating something but its the same principe

unreal quartz
#

correction: 1F steps which is even worse

golden turret
#

so what i need to do

unreal quartz
#

increment by 1/6 of 2pi each time

#

or just do it in degrees incrementing by 60deg and convert to rad before sin/cos

golden turret
unreal quartz
#

the last statement of that for loop is where you increment the angle

#

you've just changed the bounds

golden turret
#

a

golden turret
#

got if after some seconds

unreal quartz
#

your seperator should be (1/6)*2pi, not 1+1/6

#

you will get 6 equal angles of a circle

golden turret
#

the 1 of 1/6 mean something like my separator or it is static?

crude hound
#

nevermind I found the solution

quaint mantle
#

hello. is it possible to choose a slot for a player somehow?

pallid ferry
#

for nametagedits, when i add the group permissions on the group.yml it only shows with the owner rank even if im a lower one rank than owner (im using ultra permissions for the ranks btw) anyone know how to fix?

unreal quartz
#

right now your separator is 1F, so you're incrementing the angle by 1 + 1/6F or 7/6F each time which is not 6 equal sections of a circle

crude hound
#

but now I want to modify only the hat layer of a skin (not the first layer) how can I do?

golden turret
#

actually 1 + 1 / 6 will be 1 + (1 / 6) 🤔

unreal quartz
#

yes

quaint mantle
#

guys

#

is it possible to select 1 slot for a player when logging in to the server?

unreal quartz
#

which is 7/6

golden turret
#

ok

#

but i did not understand anything you said

tardy delta
golden turret
#

^

unreal quartz
#

if you want 6 positions on a circle equidistant from each other along its circumference then you have to get those positions at equal angles around the circle

golden turret
#

i wont have a static number

#

because i will change it based in something in the future

quaint mantle
golden turret
#

so i want something that works for every number

unreal quartz
#

since there are 2pi angles or 360deg then you need increments such that the sum of all of them equal 2pi or 360deg, but what you have right now is 1F which will never add to 2pi hence your offset

golden turret
#

say it in simple words

unreal quartz
#

hmm

tardy delta
#

hmm

quaint mantle
#

addItem() does not give the item to the left hand, is it possible to fix it somehow?

unreal quartz
#

each angle should be 1/6 * 2pi

#

there you will have 6 equal segments of a circle

quaint mantle
golden turret
unreal quartz
#

yes

golden turret
#

is all items with the same space? 🤔

unreal quartz
#

the first one looks equally apart

golden turret
#

let me increase the rad per sec

#

and you will see what i want to show better

quaint mantle
unreal quartz
#

what are you actually doing?

#

are they supposed to be rotating along the circle each tick

quaint mantle
#

if I hold the item in my left hand, it is not added

#

p.getInventory().addItem(item);

golden turret
#

but this is happening

#

in a low effect with lower RAD_PER_SEC

opal juniper
golden turret
#

the above is 15F

quaint mantle
golden turret
#

i would like that the items rotate in a static way

unreal quartz
#

is there any reason why you add a seperator here RAD_PER_TICK * tick + SEPARATOR * i

golden turret
#

yes, ctrl c ctrl v

unreal quartz
#

you should be adding a constant angle to each armor stand for it to rotate about the centre

golden turret
#

i dont think so

#

as i want them to rotate

#

so i need to change were the armor statnd will be

unreal quartz
#

it looks like SEPARATOR * i is meant to be the original position of the armor stand, which is going to be wrong for the reasons we've already established

golden turret
#

removing the * i the armor stands simply does not move

unreal quartz
#

well it looks like SEPARATOR * i is supposed to be the original angle of the armor stand

#

but obviously the seperator is wrong

golden turret
#

🤔

#

forgot to update

unreal quartz
#

the way i would have done it is to keep the current angle of each stand somewhere and add a constant angle to it each tick, remembering to update the current angle each time

#

you should try with lower numbers than RAD_PER_SEC = 15f so you can actually see what is going on

waxen barn
# unreal quartz

2 and 6 share a common factor of 2, so you can write the angle as pi/3

golden turret
#

the same effect but with a low speed

unreal quartz
golden turret
unreal quartz
#

is there any reason for this velocitystand.setVelocity(new Vector(1, 0, 0));?

eternal oxide
#

stops teh stand falling

#

No idea if the bug still exists though

golden turret
unreal quartz
#

well it looks like it's working as intended there

#

does it still go wild if you increase the rad per sec

golden turret
#

is that a question?

unreal quartz
#

yes

golden turret
#

yes

eternal oxide
#

you need to set your separator to 2 * PI / number of stands you want

unreal quartz
#

tbh i'm just starting to think it's a bug with the client with high revolutions, because i've compiled it and testing it in game now as well

#

also applying a velocity doesnt seem to stop the stand falling at all if you increase the interval of the runnable

eternal oxide
#

does it still fall if you disable AI?

#

it should not be affected by gravity then

unreal quartz
#

it still falls with AI set to false but there is a method setGravity which does exactly what we want

#

(on 1.17.1 at least)

#

actually the effect might not even be a bug, it might just be the client trying to interpolate the teleportations but since they are so drastic and constant they are interpolating across the circle instead of around it

golden turret
#

maybe

eternal oxide
#

yep, if you try to move too fast it will cut across the circle

golden turret
#

sad

#

so

#

it is done

#

thank everyone

eternal oxide
#

why do you want it to spin so fast?

golden turret
#

i was just testing

naive drift
#

Is possible to get object what i need like getData(EServerData.Integer) without transform to int, but i dont know how to use generic with this :/

public Object getData(EServerData eServerData) {

        try {
            Connection connection = Westcore.getDataSource().getConnection();
            PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM wl_server_data WHERE server_data = ? LIMIT 1");
            preparedStatement.setString(1, eServerData.name());

            ResultSet resultSet = preparedStatement.executeQuery();
            if(resultSet.next()) {
                //Method to get data from the database by type
                {
                    if (eServerData.getClassType().getClazz().equals(Integer.class)) {
                        return resultSet.getInt("int_data");
                    }
                    if (eServerData.getClassType().getClazz().equals(String.class)) {
                        return resultSet.getString("string_data");
                    }
                    if (eServerData.getClassType().getClazz().equals(Double.class)) {
                        return resultSet.getString("double_data");
                    }
                    if (eServerData.getClassType().getClazz().equals(Float.class)) {
                        return resultSet.getString("float_data");
                    }
                    if (eServerData.getClassType().getClazz().equals(Long.class)) {
                        return resultSet.getString("long_data");
                    }
                    if (eServerData.getClassType().getClazz().equals(Boolean.class)) {
                        return resultSet.getString("boolean_data");
                    }
                }
            }

            connection.close();
            preparedStatement.close();
            resultSet.close();

        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }```
wise fulcrum
#

Do I get it right and I need to use the original Mojang mapping when I want to use nms-code?

tardy delta
#

run buildtools?

young knoll
#

You don't need to use Mojmap

#

But it's probably easier

lavish hemlock
#

ye

crimson terrace
#

inside a ProjectileLaunchEvent for a blaze, for some reason it just wont give the new projectile the correct vector...

young knoll
#

Map<String, Integer> enchants = (Map<String, Integer>) value;

#

Where does value come from

golden turret
#

use Number instead of Integer 😎

#

and the map?

ivory sleet
#

Also why is stringsutil an instance?

acoustic pendant
#

Hey! how can i add delay for closing inventory?

stone sinew
young knoll
#

Utils are generally static

stone sinew
stone sinew
ivory sleet
stone sinew
quaint mantle
#

if a player gets X blocks away from an armor stand i spawned with packets, the armorstand will disapear
and the x is entity tracking range

ivory sleet
#

The idea of utility classes are that they should just contain a set of global stateless methods which by some sense are reasoned not to belong to an instance. With that being said any statefullness contained in a utility class is considered an anti pattern.

For your actual problem, have you debugged anything with tests or print statements?

stone sinew
#

Returns 3.0 for looting instead of 3

acoustic pendant
dense kestrel
#

by "delay for closing inventory"

acoustic pendant
#

i mean

#

i have a code

#

a gui code

#

but with p.closeInventory();

#

it doesn't close it

#

and i want to try with delay

#

but idk how it works

dense kestrel
#

Bukkit.getSchedular().runTaskLater(pluginInstance, () -> p.closeInventory(), 1);

#

something like that @acoustic pendant

ivory sleet
#

@stone sinew taking a look rn

stone sinew
acoustic pendant
#

with "pluginInstance"

ivory sleet
#

also you probably want to just use
meta.getEnchants().entrySet().forEach(entry -> {enchantData.put(entry.getKey().getName(), entry.getValue().intValue());});
(hint the Number#intValue)

dense kestrel
wary harness
#

any one can explain how this text is warping

dense kestrel
wary harness
ivory sleet
#

with line 73 also

wary harness
#

it is like animated

stone sinew
dense kestrel
ivory sleet
#

73 | enchants.entrySet().forEach(enchantEntry -> item.addEnchantment(Enchantment.getByName(enchantEntry.getKey()), enchantEntry.getValue().intValue()));

#

yapperyaps

ivory sleet
#

Okay if you just use Number instead of Integer

#

but still when quering and commanding the map use Number#intValue instead of (int) Number

stone sinew
ivory sleet
#

send the error

#

do you even update the jar

#

?

golden turret
#

hello

stone sinew
golden turret
#

i want to spawn armor stands via packets

ivory sleet
#

feels like you dont 😅

stone sinew
golden turret
#

but now i need to make them invisible

#

and display only the head

#

which packet do i need to use

ivory sleet
golden turret
ivory sleet
#

which is line 184?

stone sinew
ivory sleet
#

do u use plugman or reload?

stone sinew
ivory sleet
#

how did u swap so fast then?

#

hotswapping?

stone sinew
#

I have a fast PC?

ivory sleet
#

hmm alr

stone sinew
#

I just restart the server lol

ivory sleet
#

cuz the error seems irrelevant if you used the code I provided

stone sinew
#

Everything tells me its an integer but the server goes stupid and thinks its a double

dense kestrel
#

send the class again if youre able to

ivory sleet
#

maybe try using a
new HashMap<String,Integer>(){}

#

where the type will stay at runtime

golden turret
# golden turret

so, after searching a bit and saw that i need to send this packet, but what the boolean means?

stone sinew
#

... Ok now it wants to work with Map<String, Number> WTF???

#

I tried this like 5+ mins ago lol

ivory sleet
#

yeah weird

stone sinew
#

Welp. Thanks for the help. IDK why it doesn't work the first 5 times xD

ivory sleet
#

yeah

#

programmer life

golden turret
#

conclure

#

do you know how to set an armorstand to the invisible mode using packets?

dense kestrel
golden turret
#

no

dense kestrel
#

interesting

ivory sleet
#

You'd use entity metadata packet if im not wrong

golden turret
#

yes

#

but i need to update the datawatcher

#

tried this and when the packet was sent it thrown a cast exception

#

wating int

#

so i sent as int

stone sinew
#

@ivory sleet i just exported my plugin and it didn't add the new code. I think it actually wasn't exporting and that was the issue. So yeah the jar might not have been updated lol

golden turret
#

and it did nothing

golden turret
#

nvm

ivory sleet
#

did it work?

golden turret
#

yes

ivory sleet
#

ah pog

golden turret
#

changed 1 to 0

#

thanks

ivory sleet
#

didnt do a thing but happy it works :p

golden turret
#

😎

#

👍

#

ok now i need to send the packet of the armor stand moving/teleporting

#

done

#

?paste

undone axleBOT
stone sinew
# ivory sleet ah fair and square

Wait nvm had the output under the wrong code 🤦 The integer thing I still don't know why that didn't work but works with Number so I'm not fucking with it xD

ivory sleet
#

oh right lol

quaint mantle
#

petition for

interface RequiresString {
    String toString();
}
ivory sleet
#

oo but why

left swift
#

generateChunkData() method in 1.17 spigot api is deprecated, which other should i use?

quaint mantle
#
explicit String toString();
#

must be implemented by the class inheriting

#

does not matter if the interface is implemented

#

every class extending / implementing it must have it

#

would be nice

ivory sleet
#

oo yeah

golden turret
#

static abstract T deserialize(Map<String, Object> data) 😔

ivory sleet
#

static inheritance? 😮

quaint mantle
#

not a bad idea

#

i've been thinking of that

ivory sleet
#

yeah

quaint mantle
#

just imagine

abstract class A {
    public abstract synchronized explicit static void main(String[] args);
}
#

😂

ivory sleet
#

god

#

you need to leave

golden turret
#
public interface Serializable<T> {
  Map<String, Object> serialize();
  static T deserialize(Map<String, Object> data);
}```
quaint mantle
#

yes.

ivory sleet
#

Basically ConfigurationSerializable

golden turret
#

yes

#

but with explicit deserialize method

ivory sleet
#

why not just extract the serialization to a

interface Serializable<V> {
  Map<String, Object> serialize(V value);
  V deserialize(Map<String, Object> data);
}
interface SerializerProvider<V> {
  Serializable<V> serializer();
}```
Then let classes derive SerializerProvider
golden turret
#

@unreal quartz sorry for the ping

#

but i found the issue with the circles

#

actually not the issue

#

but the solution

#

im using packets to create and rotate the armorstands now

#

and it is static :D

unreal quartz
#

i'm assuming that avoids the client interpolation then?

golden turret
#

maybe

unreal quartz
#

cool

golden turret
#

actually the radius had a decrease

#

but it was static

main dew
#

How convert UUID player to name?

tender shard
#

Bukkit.getOfflinePlayer(uuid).getName()

#

only works for players who at least joined the server once, otherwise getName returns null

quaint mantle
tidal hollow
#

Does anyone have any code that makes the water give you some effect? :P

tender shard
crude sleet
#

How can i disable the recipe book? I already try to cancel the PacketPlayInRecipeSettings but it doesn't work. I dont want to remove the Recipes from the player. Its for a custom furnace inventory

tender shard
# tidal hollow Yes

Just loop over all online players (like, every tick, or every second, or how ever often you like), check if their getLocation().getBlock().getType == Material.WATER, and if yes, give them a potion effect

#

you could also use PlayerMoveEvent and check whether their getTo().getBlock().getType == WATER buuut that would stop them from getting effects when they stand still in water

tidal hollow
#
@EventHandler
    public void onMove(PlayerMoveEvent e) {
        if (e.getPlayer().getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == MATERIAL.WATER) {
            e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 400, 0, false, false, true));
        }
}

something like that right?

tender shard
#

I'd use something like this

public void onEnable() {
        Bukkit.getScheduler().scheduleSyncRepeatingTask(this, () -> {
            for (Player player : Bukkit.getOnlinePlayers()) {
                if(player.isInWater()) {
                    player.addPotionEffect(new PotionEffect(PotionEffectType.DOLPHINS_GRACE, 5,1));
                }
            }
        },1L,1L);
    }
ancient plank
#

isn't there a method like Entity#isInWater() ?

tender shard
#

yes, true

#

but it does the exact same thing

#

Edited my answer

tidal hollow
#

Ok thank you very much

tender shard
#

np

muted sand
#

how would i check on BlockPlaceEvent if a chest thats being placed, becomes a double chest?

ancient plank
tender shard
tender shard
# muted sand how would i check on `BlockPlaceEvent` if a chest thats being placed, becomes a ...

hm only thing I could imagine is by checking it manually, like

  1. Is a chest already next to it, facing in the same direction?
  2. Is it a doublechest? If so, check the chest on the other side
  3. If that's a double chest too, this cannot become a double chest
  4. If a player shift-clicked, I think that prevents creating a double chest

Like, you basically have to recreate what the vanilla game's logic is for that I believe

arctic moth
#

how do you spawn a falling block

#

since spawnFallingBlock is depracated

tender shard
#

if you don't need the result away, I'd simply wait one tick and check if the resulting block's state is now instanceof DoubleChest

tender shard
arctic moth
#

ye

#

it is

tender shard
#

no

arctic moth
#

nvm

tender shard
arctic moth
#

the one i was using was depracated

quaint mantle
tender shard
quaint mantle
#

isnt that deprecated tho

#

nvm

#

im an idiot

tender shard
#

😄

#

np

quaint mantle
#

its just that particular method signature @arctic moth is using lol

arctic moth
#

lol

#

all of the MaterialData signatures are deprecated

torn oyster
#

how do i prevent the spawn region from being ocean biome

tender shard
#

actually MaterialData is the thing that's NOT deprecated

#

using bytes for data is deprecated and was replaced with BlockData and MaterialData

arctic moth
#

lol

tender shard
tender shard
quaint mantle
tender shard
#

strange that spawnFallingBlock using MaterialData is not deprecated then

arctic moth
#

lol

tender shard
#

anyway, you're fine with using BlockData, I promise 😄

arctic moth
#

they mustve forgot when making the library

#

xD

#

wait so how do u use blockdata

#

like it says string

tender shard
#

it's actually already deprecated since 1.12 lol

arctic moth
#

lol

tender shard
#

Bukkit.createBlockData(Material.CACTUS);

arctic moth
#

but like what do i put in Bukkit.createBlockData("")

#

o

#

thx

tender shard
#

the material, unless you already have blockdata

quaint mantle
#

world.spawnFallingBlock( location, Bukkit.createBlockData(material) )

#

o

tender shard
#

like you could do Bukkit.createBlockData("minecraft:candle[candles=2,lit=true]"); to spawn two lit, falling candles

arctic moth
#

why does a spawned anvil not interact with the environment

#

it hits the ground and spawns the block but doesnt break or damage stuff

golden turret
#

how do i get the block face?

tender shard
tender shard
arctic moth
#

wdym

golden turret
#

of a block?

arctic moth
#

anvils simply go thru people

#

when i spawn them

tender shard
#

a blockface describes the relative position between two different blocks - what do you mean "the blockface of a block"?

tender shard
golden turret
tender shard
golden turret
#

a

tender shard
#

get the blockstate and cast it to Directionable or however its called

golden turret
#

ok

#

thanks

tender shard
#

oh sorry, BlockData not BlockState

arctic moth
#

lol

tender shard
#

I always confuse blockstates and blockdata

arctic moth
tender shard
#

I haven't started IntelliJ yet, wait a min pls

arctic moth
#

lol

#

k

#

for some reason when the anvil fell on a cactus it broke

#

nvm

#

lol

#

idk what happened then

#

so sometimes its breaking and sometimes its not

#

but not doing any damage

tender shard
muted sand
#

how do I check if a chest (or another container was opened) without the open and close sound playing?
PlayerInteractEvent returns the clicked block, InventoryOpenEvent plays the sound when it's cancelled?? unless i am being dumb

tender shard
arctic moth
tender shard
#

the sound being played is simply a packet sent by the server

muted sand
arctic moth
tender shard
# arctic moth what code r u using
    @EventHandler
    public void onInteract(PlayerInteractEvent event) {
        event.getPlayer().getLocation().getBlock().getRelative(0,20,0).setType(Material.ANVIL);
    }
tender shard
muted sand
#

o

arctic moth
tender shard
arctic moth
#

idk

tender shard
#

yeah lol

#

because you spawn a falling block

arctic moth
#

ye

tender shard
#

falling blocks are non-solid

arctic moth
#

o

tender shard
#

they only turn solid when they hit the ground

#

just spawn a normal anvil using setBlock

arctic moth
#

why does it sometimes break when it hits ground tho

tender shard
#

like torches, cacti, ...

#

fences

#

...

arctic moth
#

but it did like the anvil breaking sound

tender shard
#

don't you remember how people used torches to farm sand?

arctic moth
#

also it destroys cacti lol

tender shard
#

why do you need to spawn a falling block?

#

why don'T you simply set the block using setBlock?

arctic moth
#

lol if they are underground

#

it spawns a block

#

is there a way of detecting if a coordinate has a block

tender shard
# muted sand o
@EventHandler
public void onInventoryOpen(InventoryOpenEvent event) {
  event.setCancelled(true);
  event.getPlayer().openInventory(event.getInventory());
}

BAsically just this (of course add checks whether it's a chest etc)

muted sand
#
    @EventHandler
    public void InventoryOpen(InventoryOpenEvent event) {
        InventoryType type = event.getInventory().getType();
        if (type.equals(InventoryType.CHEST)) {
            event.setCancelled(true);
        }
    }

This still plays the sound-

tender shard
muted sand
#

unless i were to add this?
event.getPlayer().stopSound(SoundStop.named(Sound.BLOCK_CHEST_OPEN));?

tender shard
#

okay the sound is triggered by the PlayerInteractEvent

#

cancel the PlayerInteractEvent and then open the inventory

muted sand
#

:bruh:

#

wouldn't cancelling that cause more problems-?

tender shard
muted sand
#

sad

golden turret
#

just use it with a higher priority

muted sand
#

ohh

#

so set my InventoryOpenEvent a higher priority compared to PlayerInteractEvent ?

#

oke

tender shard
#

why do you think cancelling the interactevent would cause problems?

muted sand
#

placing blocks etc

tender shard
#

Placing blocks doesn't call a PlayerInteractEvent

tender shard
muted sand
#

oh, back to the docs i go

muted sand
#

why not

tender shard
#

because it won't get called when you cancel the PlayerInteractEvent

#

Bukkit works like this:

muted sand
tender shard
#
  1. Player right-clicks block
    --> Bukkit calls PlayerinteractEvent
  2. Bukkit checks if that was cancelled, if so: do nothing
  3. Tell nearby players "Yo, a player interacted with a block", resulting in players hearing the open chest sound
  4. Now Bukkit calls an InventoryOpenEvent
    --> If that's cancelled: do nothing
  5. Bukkit opens the inventory
tender shard
#

well I'd probably use HIGHEST priority too and check if the event was already cancelled

#

but still, other plugins could also run on HIGHEST. Or on monitor and think "oh, the event was cancelled" although you actually intend to open the chest

muted sand
tender shard
#

np!

muted sand
tender shard
#

yeah as said I'd use Highest too, because that you way the event will already be cancelled by most other plugins if they e.g. protect the chest

golden turret
#

or

tender shard
#

but a protection plugin could also use HIGHEST too, so it's random whether those can protect the chest or not when you simply cancel that event

golden turret
#

use reflection and set your listener as the first listener of the list

golden turret
#

y

muted sand
#

welp

tender shard
#

because if it's the first, it will ignore every single protection plugin

golden turret
#

:stonks:

tender shard
#

what's actually the reason why you want to cancel the sound?

#

is it supposed to be for admins to silently open chests?

muted sand
#

ye

tender shard
#

oh yeah then fuck it

tender shard
#

use LOWEST priority, cancel the event yourself and simply open the inv

muted sand
#

why lowest now lmfao

tender shard
#

because as admin, you do not care about protection plugins

#

You see, my idea was this:

muted sand
#

oh wait, do lowest priority things get executed first?

tender shard
#
  1. Player opens chest silently
  2. WorldGuard says "no, you must not" but the inv is already open

This happens when using lowest

#

yeah of course

#

Lowest is called first

muted sand
#

oh, i am smart

tender shard
#

Highest (actually Monitor) is called last

#

yeah it's because it means

#

the listeners on highest have the highest priority, so they have the last word whether the event gets cancelled

muted sand
#

ohh

tender shard
#

after that comes monitor, which COULD cancel the event too, but people will hate you if you do

muted sand
#

lol

#

well, i did this-

    @EventHandler
    public void something(PlayerInteractEvent event) {
        event.setCancelled(true);
    }

and it prevents blocks from being placed :sip:

quaint mantle
#

the event priority system is bad imo

#

they should all be equal

#

and why uncancel an event?

#

doesnt make sense to me

#

except monitor

tender shard
quaint mantle
#

like?

tender shard
#

PlayerResurrectEvent

eternal oxide
#

right click air

tender shard
#

or idk if thats the correct name

quaint mantle
eternal oxide
#

it is, but its default cancelled

eternal oxide
#

This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air). For the purpose of avoiding doubt, this means that the event will only be in the cancelled state if it is fired as a result of some prediction made by the server where no subsequent code will run, rather than when the subsequent interaction activity (e.g. placing a block in an illegal position (BlockCanBuildEvent) will fail.

arctic moth
#

im trying to delete an anvil when it hits the ground using EntityBlockFormEvent but its not doing anything

tender shard
#

EntityBlockFormEvent ?

#

oh sorry

#

I misread

#

is the event even called for that?

tender shard
#

that gets called

wary harness
#

@eternal oxide do you maybe know how is this possible

eternal oxide
#

it looks like custom fonts

wary harness
tender shard
#

I'd say custom resource pack with custom fonts using a ton of mappings using some otherwise unused unicode letters? and a runnable to update the text

eternal oxide
#

yep, it would take a LOT of fonts

tender shard
#

yeah 😄

#

and then you end up with only this one simple sign lol

eternal oxide
#

it would be easier to render on a map

wary harness
#

oki got it

tender shard
#

I mean the color gradient is easy

eternal oxide
#

I wonder if 1.17 exposes teh sign canvas

tender shard
#

but the moving font is uugh

eternal oxide
#

nope no sign canvas. has to be multiple fonts in a resource pack

#

or a modded client

tender shard
#

or Photoshop 😛

arctic moth
acoustic pendant
#

Why does this happens?

#

in .setHelmet

#

in appears a line

tender shard
#

because the method is deprecated

acoustic pendant
#

but it works as well?

tender shard
#

yes but it might not be working anymore tomorrow

#

remember when all plugins were broken when 1.13 was released? it's because 90% of developers ignored all the deprecation warnings they have been getting since years^^

acoustic pendant
#

so instead of that?

tender shard
#

instead of that you can use the method I sent above