#help-development

1 messages ยท Page 796 of 1

molten hearth
#

LMFAOOO

grand flint
#

moron

#

go to sleep

#

im doing it

molten hearth
#

u sleep first

#

fine

grand flint
#

is this his question?

#

@molten hearth u do it idk wtf he said

molten hearth
#

nah that wasnt for us ๐Ÿ˜ญ

grand flint
#

oh okk

young knoll
#

I imagine it fires the the fish event with reel in state

grand flint
#

wth is the fish event

young knoll
#

But that isnโ€™t exclusive

#

PlayerFishEvent

molten hearth
#

yea but i cant see one for the line snapping

grand flint
#

so how does it snap

young knoll
#

Like I said I assume that just fires reel in

molten hearth
#

oh shit fr

#

well thats a bit problematic i guess because it doesnt differentiate between players manually reeling in and it snapping

young knoll
#

Check distance I guess

grand flint
#

if there is a loot or not

molten hearth
#

ya it fires another event if there's loot

#

i mean not another event

#

another thingy

grand flint
#

ye

#

so heck

#

check

#

if thats null

#

if so cancel event

molten hearth
#

but then are we gonna kidnap players until they find loot

grand flint
#

why

#

ok cancel it unless

#

its right click

molten hearth
grand flint
#

or they get a loot

#

ye dont cancel it if it is failed attempt, bite, caught entity, caught fish, in groud or reel in

#

else cancel it

molten hearth
#

then you're cancelling fishing in general no

fading gull
#

which i populate manually?

young knoll
#

You can

#

Or via a loop or whatever other methods

fading gull
#

alright thanks

grand flint
#

i said dont cancel

molten hearth
grand flint
#

dont talk to me

molten hearth
#

.

grand flint
#

@molten hearth i did it

molten hearth
#

no way fr

grand flint
#

ye

#

i just returned all the events

#

if it didnt return

#

i cancelled it

#

lmao

molten hearth
#

lmao

#

gud job

grand flint
#

im not talking to u

molten hearth
#

HUh why

grand flint
#

ok come back to dm

young knoll
#

Stop edating smh

pastel axle
#

Hmm, is it expected that the following would be false? Correctly returns true for InventoryType.WORKBENCH.

Inventory inv = getServer().createInventory(new RecipeHolder(), InventoryType.FURNACE);
...
InventoryClickEvent.getInventory().getHolder() instanceof RecipeHolder

InventoryClickEvent.getInventory().getType() is correct

river oracle
#

you can't create inventories like that

pastel axle
#

Ah, nevermind, SPIGOT-4274

young knoll
#

Is that a custom inventory holder

river oracle
young knoll
#

๐Ÿ˜ฉ

river oracle
#

its impossible

pastel axle
#

I don't want a working furnace. I want one where I can intercept click events (custom /recipe command)

river oracle
#

currently a PR in the work to solve that

#

should see it around 1.21 probably

pastel axle
#

Hmm. Bummer. Because I was hoping to fix a bug in my plugin where players could just yoink items out of a furnace /recipe. I'll come up with another solution then.

young knoll
#

Can you not detect click events in a furnace gui

pastel axle
#

the event works fine itself, but checking whether it was opened by my code quick&easy will have to be another solution

river oracle
#

this might help you

#

at keeping track of it

young knoll
#

Compare by instance or view

river oracle
young knoll
#

Donโ€™t make custom holder plz

pastel axle
#

To be fair, this is currently why it's a holder

#

Untouched for 9 years, not surprising things have changed ๐Ÿ˜›

river oracle
#

but considering its so old best to learn now :P

pastel axle
#

for now I fix the bug another way, later I refactor the recipe command. Yep ๐Ÿ™‚

river oracle
#

@young knoll I know I've been annoying about this for a whlie, but I would enjoy feedback about Inventory PR at some point, its getting to the point of being pretty much finalized so not much will change

pastel axle
#

I won't tell if you don't ๐Ÿ˜‰ if (!(e.getView().getTitle().startsWith("Recipe:"))) return;

river oracle
#

there is InventoryView#setTitle now

#

just a heads up

pastel axle
#

Yes I know ๐Ÿ˜‰

young knoll
#

Can we just make inventory holder sealed :p

river oracle
young knoll
river oracle
#

I wouldn't be against it

pastel axle
#

probably a good idea?

young knoll
#

Wonโ€™t happen cuz itโ€™ll break plugins and requires a java version bump

river oracle
young knoll
#

But hey one can dream

#

Ooh interesting

river oracle
young knoll
#

Iโ€™ll see how my inventory framework handles it

#

And then yell at you when it explodes

river oracle
#

such as having multiple people share the same InventoryView

river oracle
#

or rather store state for an inventory and replicate it for multiple views

young knoll
#

I mean

pastel axle
#

huh interesting, createInventory supports setting the inventory title easily but the getTitle function for inventories is gone. Whoops :LUL:

young knoll
#

Mine just works with an inventory and then does a good ol openInventory

river oracle
#

its bukkit making up for a legacy feature being gone in nms

pastel axle
#

yeah I remember learning that back when updating the plugin to support newer versions

river oracle
#

I know a bit too much about inventories so lmk if ytou have any questions

pastel axle
#

I think it was for our.. backpack command?

young knoll
#

Yeah Bukkit yeeted inventory.getName

#

That broke a lot of stuff

pastel axle
#

for good reason imo

river oracle
young knoll
#

Wtf hax

river oracle
#

with MinecraftInventory gone the only thing to hold the title is CraftInventory

#

Granted it's only there for legacy purposes and would be null given you use the new api

young knoll
#

Now old plugins are gonna come back from the dead

#

Like zombies

knotty aspen
#

Inventories can have titles in vanilla tho?

river oracle
river oracle
knotty aspen
#

Rename a chest and open it, you got an inventory with a title

river oracle
#

Not an inventory

#

Completely different

knotty aspen
#

not really but whatever

river oracle
#

No really

#

In NMS it's wildly different

knotty aspen
#

but its the thing plugins should care about

river oracle
#

Inventories are basically just the glorified lists of Items

river oracle
#

just because the API wasn't able to allow plugins to care for a long time doesn't mean we shouldn't switch now

#

further now more than ever its becoming increasingly important to distinguish between a InventoryView and a Inventory

#

or we end up with AnvilInventory which is a disgusting implementation

knotty aspen
#

the whole inventory api is kinda not great tbh

river oracle
#

it just needed some tweaks

#

the base idea of the Inventory API is actually quite great its implementation was what was subpar

#

but by fixing its implementation the Inventory API will be much better. Much like other older API's all it needed was a little love

young knoll
#

Pretty sure you could apply that to almost anything

#

APIs
Servers
Plugins

#

โ€ฆ me

river oracle
#

so proud of everyone who made this GUI CH_RainbowHeart
I love using it

pastel axle
#

Hmm, this seems fishy.

[14:30:57] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "text" is null
[14:30:57] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_20_R2.map.CraftMapView.getId(CraftMapView.java:36)
[14:30:57] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer.sendMap(CraftPlayer.java:852)
#

Wonder if it's because I'm using outdated calls or whether there's an actual bug related to maps..

#

For reference, this is just a

    private void updateMap(Player p, MapView mv) {
        p.sendMap(mv);
    }

after

// args[1] = "close"
String sscale = args[1].toUpperCase();
Scale mvs;
mvs = Scale.valueOf(sscale);
mv.setScale(mvs);
updateMap(p, mv);

So I don't think I'm doing anything special?

#
        String text = worldMap.id;
        Preconditions.checkState(text.startsWith("map_"), "Map has a invalid ID");

๐Ÿค”

bitter rune
#

how do you get the craft entity or crature and the handle?

river oracle
#

the handle you just get by doing CraftEntity#getHandle

#

after you cast

torn shuttle
#

@wet breach oh no

wet breach
#

๐Ÿ˜ฎ

torn shuttle
#

we got ourselves a race

chrome beacon
#

๐Ÿ‘€

wet breach
#

I say it leaves you with about 3GB left

torn shuttle
#

place your bets

#

I say 20gb

#

yknow I should probably just remove the unedited timelapse footage I accidentally recorded in 4k 60 fps

#

fun fact these are not even the files I am going to be using anyway, I had to convert them to mp4 to work with my editor

exotic obsidian
#

how can i save the player stats from database before leave?

river oracle
#

PlayerQuitEvent

exotic obsidian
#

i got error

torn shuttle
wet breach
#

lol

river oracle
#

how do you create a map with FastUtils

#

I'm trying to create a Short2ObjectMap i'm not really sure how

#

nothing in Short2ObjectMaps seems relavent for just initalizing an empty map

#

wait nvm I figured it out, but which one to chose ๐Ÿ’€ idk the difference between most of these.

#

I'll just do the OpenHasMap and hope nothing explodes

carmine mica
#

there are multiple implementations of it

#

you probably want Short2ObjectOpenHashMap

#

just use your IDE to look at implementations of the Short2ObjectMap interface and find constructors

river oracle
#
    private static byte[] unpack(short packed) {
        return new byte[]{(byte) (packed >> 8), (byte) (packed >> 4 & 0xF), (byte) (packed & 0xF)};
    }
``` lol I love bit shifting so scuffed
quaint mantle
#

10TB?!?!?

rigid otter
#

Can we change the player UUID? I've tried changing it in PlayerProfile but it does not work.

rotund ravine
#

Are you an online mode server?

rigid otter
#

No

rotund ravine
#

Why do you want to change the uuid

rigid otter
#

Since it is still useless, so I would manage a new UUID system myself.

#

So, can we really change?

rotund ravine
#

Not supported by the api in any case so you would have to do some hacky stuff

river oracle
# rigid otter So, can we really change?

yeah you can so first thing you need to do is make a custom client and distribute it to all of your players to load up and join your server with. Second off you'll want to fork spigot and add further support for your custom UUID system

#

its really only 1 custom client and server fork away!

#

couldn't be more simple

rigid otter
#

Ahh

#

Thank you anyway!

twin venture
#

Any suggestions for advanced cosmetics system for a skywars plugin?
kits , win dance, kill effect .. etc etc etc
also cages ?

rotund ravine
#

Why is kits included in a cosmetic plugin

twin venture
#

its for a skywars plugin :p

rotund ravine
#

Oh yeah nvm

twin venture
#

listening to your suggestions ..?

rotund ravine
#

Some possible suggestions for advanced cosmetics system for a skywars plugin are:

  • Trails: Players can choose different particle effects that follow them as they move around the map. For example, fire, smoke, hearts, stars, etc.
  • Taunts: Players can perform various animations or sounds to mock or celebrate their opponents. For example, laughing, dancing, clapping, etc.
  • Balloons: Players can have a floating balloon attached to them that displays their name, rank, or custom message. The balloon can also have different shapes and colors.
  • Pets: Players can have a small companion that follows them around and helps them in combat. The pet can be a mob, an item, or a custom entity. For example, a dog, a sword, a dragon, etc.
  • Cages: Players can customize the appearance of their cage before the game starts. The cage can have different materials, patterns, or effects. For example, glass, wood, iron, rainbow, etc.

Source: Conversation with Bing, 18/11/2023

twin venture
#

i mean the structure of the code

rotund ravine
#

Hmm?

quaint mantle
bitter rune
#

pet following mechanics are a pain

quaint mantle
#

I asked chat gpt do simple pet following and it worked :)

earnest socket
#

anyone know how I can get an NMS block state from a material?

sullen marlin
#

?xy

undone axleBOT
earnest socket
# rotund ravine For?

I am trying to change a bunch of blocks quickly. I read this post https://www.spigotmc.org/threads/methods-for-changing-a-massive-amount-of-blocks-up-to-14m-blocks-s.395868/ and it says that using nms to change blocks is faster

#

but it doesnt' seem to be in mojang mappings

rotund ravine
#

How many blocks?

earnest socket
#

like 200 thousand

#

making a big explosion basically

rotund ravine
#

I would just space it out and use bukkits methods rbh

#

Tbh

minor junco
#

I'd have a look in the underlying source from spigot to see what is happening when you set a block (I assume update some kind of mapping and send the packet to all players?) if it's something you could manually do after the blocks have been set then go for it, otherwise split up the iterations in custom sized chunks an run them asynchronously

#

That would've been my solution to this problem

shadow night
#

Most likely it's just calling some nms method and converting the material to the nms one

minor junco
#

Probably, but that wouldn't explain why the setblock method is so much slower than invoking the method handle manually

#

The conversion of material to NMS material certainly happens at O(1) no?

shadow night
#

Who knows, it's bukkit code

minor junco
#

Fair

minor junco
shadow zinc
#

where can I find some good resources on how properly use packets?

#

additionally, other than protoclollib, is there any good packet util?

earnest socket
#

I tried both the bukkit method and nms method

#

I timed both

#

they do seem pretty random

#

with the same amount of blocks, sometimes bukkit is faster while nms is slower

#

and other times it's the opposite

earnest socket
echo basalt
#

No

#

โค๏ธ

sullen wharf
#

use a scheduler

#

๐Ÿ‘Ž

arctic shuttle
#

alr

echo basalt
#

?scheduling

undone axleBOT
echo basalt
#

๐Ÿ‘Ž

sullen wharf
#

NO

torn shuttle
echo basalt
#

Doubleโ„ข๏ธ it and give it to the next person

#

about to sleep half a tick

minor junco
#

Damn ๐Ÿ’€

hushed spindle
#

bless your heart

torn shuttle
#

virtual machines are such an absolute pain to deal with

#

every time I try to get into using them I just keep getting plagued with issues

echo basalt
#

I think that's a you problem

hushed spindle
#

gottem

lost matrix
hushed spindle
#

grandpa be like

zealous osprey
#

moderately longer than a tick

tropic saddle
#

?nms

tropic saddle
#

how do i use that with gradle xd

tropic saddle
#

thx

zealous osprey
#

Hey, quick question, hopefully.
I'm pretty sure that there is a lib for opening a browser tab and doing actions in it. Anyone know how one is called, I can't seem to find one.

lost matrix
#

You mean something like Selenium?

zealous osprey
#

Yeah, I think so. Gotta test.

night whale
#

hey I have a question where can I find on spigot: disable-unloaded-chunk-enderpearl-exploit

night whale
#

yes

lost matrix
# night whale yes

This is how you access the configs as YamlConfigurations. Just need to get the config entries through a path, like you normally do with FileConfiguration.

shadow zinc
#

how can I get the startup flags used for the server?

night whale
#

i dont can send a picture

lost matrix
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

lost matrix
chrome beacon
#

ManagementFactory.getRuntimeMXBean().getInputArguments() from what I can find online

shadow zinc
#

sweet thanks

lost matrix
fervent gale
#

what's the best a cleanest way to refresh a custom gui?

#

i've tried like 3 diff things and nothing works lmao

shadow zinc
fervent gale
#

wym?

shadow zinc
#

from my experience, simply opening another gui while another one is open is quite seamless

fervent gale
#

just have a runnable check the title and if it matches reopen it?

shadow zinc
#

well it depends for you

#

idk how you want to do it

#

but the general idea still stands

fervent gale
#

would that be a simple way?

shadow zinc
#

yeah thats good

#

or something more robust by checking the inventory instance

#

either or

fervent gale
#

wym instance?

glad prawn
#

Does RGB/Hex affect performance?

hazy parrot
#

doubt tbh

shadow zinc
#

and removing it on close

fervent gale
#

hmm

shadow zinc
#

just check if they are the same

#

wait

#

nvm

#

thats entirely different

#

but you get the idea

fervent gale
#

ok thanks

#

i got an idea now

grim hound
#

what would be the most efficient way

#

to apply a remapping function on all of

#

ConcurrentHashMap's entries

storm crystal
#

anyone got up to date SQLite tutorial?

chrome beacon
#

There shouldn't be any major changes

#

so looking at older guides should be fine

weak meteor
#

how can i get all folder .json file?

#

like, i have a folder named /kits/ in plugin data folder

#

how do i get all files of that folder

#

all sons?

#

children*

weak meteor
#

thanks

weak meteor
#

cause im doing this:

#

and throws a npe in the for loop

#

i guess im getting wrong the file

young knoll
#

Does the file exist

weak meteor
#

ye

#

oh

#

no it doesnt

#

got the name wrong

#

now ig?

#

yea it worked

hazy parrot
#

i mean sure, but there wont be any files

#

if it doesn't exist

weak meteor
#

ye thats the problem

#

so the array is going to be null?

#

cause i got one created

hazy parrot
#

probably empty one

weak meteor
#

yea maybe

#

but lets say i have 3 files

#

this 3 files represent 3 indexes, right?

knotty locust
#

this is the config

hazy parrot
#

3 items of array, yes

hazy parrot
knotty locust
#

I have this issue: when I start the plugin for the first time and it creates the config files, it creates a fake value - let's say 'b', but it should be 'a' (b is used as well and it's stated in the next line), but next time I run it with the config created already, it works normally.

I assume it's some loading issue but the all config stuff is called before creating the thing that causes the issue.

young knoll
#

Make sure you use the api of the lowest version you want to support when developing

knotty locust
#

but then you might have some issues cuz some things didn't exist yet

young knoll
#

Yeah that's the price you pay to support older versions

knotty locust
young knoll
#

Can we see some code

knotty locust
#

alr

warm pine
knotty locust
young knoll
#

yes

knotty locust
#

this is the main class

young knoll
#

We basically never remove stuff from the api

knotty locust
young knoll
#

yes but we don't remove em

young knoll
knotty locust
#

what's the #addDefault for then

knotty locust
young knoll
#

Yes

#

Defaults are a magical hidden value that will be used if the key is missing

#

Also you don't need that manifest file :p

knotty locust
#

ok thanks

quaint mantle
#
    @EventHandler
    public void onChunkUnload(ChunkUnloadEvent e) {
        for (BlockState state : e.getChunk().getTileEntities()) {
            if (state instanceof CreatureSpawner) {
                System.out.println("spawner found");
            }
        }
    }

does anyone know why this only works for naturally generated spawners?

knotty locust
#

because if not I don't think it's considered a BlockEntity

quaint mantle
knotty locust
#

did you check if it's a BlockEntity?

#

trough pichart

knotty locust
quaint mantle
knotty locust
#

okay

quaint mantle
knotty locust
#

but why do you unload chunks

#

isn't it better to load the chunks?

quaint mantle
#

I need to check for both, I just put the unload as an example because the same problem happens for both

quaint mantle
knotty locust
#

when the server unloads the chunks yeah

eternal oxide
#

How did you place the spawner? It may not have updated teh tile entity correctly

quaint mantle
#

just with a spawner block

#

then I put the egg in it

#

it also doesn't work when I set the spawned entity with my plugin

knotty locust
#

how do you do that

eternal oxide
#

you mean the spawner doesn;t work?

knotty locust
#

something like spawner.setMobInside(blaze)

quaint mantle
knotty locust
#

and does it spawn the mobs?

quaint mantle
quaint mantle
#

I don't see why it wouldn't spawn them

eternal oxide
knotty locust
#

your problem is with updating the list of active BlockEntities

knotty locust
eternal oxide
#

A while ago Bukkit had an issue with TileEntites not being replaced/updated correctly. I thought it had been fixed/

quaint mantle
knotty locust
#

no

#

if the list is updated

#

and the spawner you placed before the restart is there

eternal oxide
#

Bukkti would give an error and try to update the TileEntity on loading

knotty locust
#

in the list

quaint mantle
#

I'm not sure what you mean by that

#

how can I test for what you're saying

eternal oxide
#

restart the server after you have placed a block, then run your code to see if teh TileEntity is there

quaint mantle
#

oh

#

the tileentity is never found both before and after a restart if it hasn't been generated automatically (e.g. in a dungeon)

eternal oxide
#

what version of Spigot?

vital sandal
#

any idea to solve the problem of map's shadow?

#

may be with resourcepack?

eternal oxide
#

Its a client side light rendering issue. You won't prevent the lighting changes without a custom shader

quaint mantle
knotty locust
#

or blocks of light

knotty locust
vital sandal
quaint mantle
#

or am I not doing something right

eternal oxide
#

I'm going to assume you are updating the type when you place (with no delay)

#

I see no reason for teh TileEntity data to not be updated unless you are somehow updating the block incorrectly

quaint mantle
#

it gets detected in different events if I get the chunk from the location

#

just not in the unload event

reef fable
#

what obfuscator you guys recommend to dont break spigot rules?

eternal oxide
#

perhaps that event does not have an updated chunk, but it sounds odd

eternal oxide
#

You said the TE is never detected before and after a restart if it was not naturally spawned

#

but you now say it does exist in some events?

quaint mantle
#

when I use e.getChunk() in the chunkunloadevent and then use that to get the TEs the spawner isn't included
but if I use location.getChunk() in a different event and use that to get the TEs the spawner is included

lost matrix
eternal oxide
#

If thats the case, it should exist after a restart

reef fable
eternal oxide
lost matrix
quaint mantle
# lost matrix Hm? Show your ChunkLoadEvent pls
@EventHandler
    public void onChunkUnload(ChunkUnloadEvent e) {
        for (BlockState state : e.getChunk().getTileEntities()) {
            if (state instanceof CreatureSpawner) {
                System.out.println("spawner found");
            }
        }
    }
reef fable
lost matrix
reef fable
#

ex i got paid plugin with license system

lost matrix
quaint mantle
reef fable
lost matrix
upper hazel
#

BlockPopulator - load full chunk or 16x16x16 ? and i can use PDC from chunk?

#

in this moment

quaint mantle
eternal oxide
#

You did restart not reload when testing the TE?

quaint mantle
#

yes

eternal oxide
#

Your described issue makes no sense

lost matrix
quaint mantle
# eternal oxide Your described issue makes no sense

sorry if i've been confusing, I'll try to summarise it
in the chunkunload event e.getChunk().getTileEntities() is empty except for TEs that have been generated by the server automatically
But if I use location.getChunk().getTileEntities() in the chunk where I know the manually placed spawner is, it returns my spawner and all TEs normally

#

also e.getChunk() in the ChunkUnloadEvent never returns the same thing as the location.getChunk() in the other event

eternal oxide
#

My confusion is where you say after a restart it is still not there

#

If the TE is there in other events/location then it shoudl be there in an unload after a restart

quaint mantle
#

it isn't

eternal oxide
#

very odd

#

I don;t have my IDE up to test

minor junco
#

Talking about this topic, how would one implement a limitation to number of servers of a plugin to avoid people from spreading? I mean you could do it with an external licensing system but that seems to be forbidden. Is there a way to check if a user has bought a plugin?

rotund ravine
#

There is some things, but nothing really big allowedd

minor junco
#

I mean if I recall correctly konsolas had a licensing system in his Anti-Cheat system, but how would he have done it without violating the rules?

river oracle
# minor junco Talking about this topic, how would one implement a limitation to number of serv...

Generally I'd say the best approach is to first make your plugin open source, that way everyone who will not buy your plugins won't get malware on their systems for it, no one deserves malware even if they aren't willing to pay for your product. Secondly only provide support to those who've legitimately bought your plugin on spigotmc you can do this in a variety of ways like making them confirm their spigotmc username and making some system to ensure only one person claims a username. Obfuscation and licensing systems are a waste of time and effort they will be cracked anyways its so easy to edit jar files you may as well just not

quaint mantle
#

My server has a problem, can anyone help me?

Unlike vanilla on my server, for example, in Guardian Farms, when an entity passes through the portal and enters the Nether, it must be driven to the next portal by its AI, but the entities mostly stay in place or go to the portal very late.

How do I fix this problem?

river oracle
quaint mantle
#

ok ty

rotund ravine
fluid river
#

is there a way to display current playerprefs

#

like editor tab or file

rotund ravine
fluid river
#

oh shit i'm dumb

#

wrong channel

minor junco
river oracle
minor junco
#

That is indeed very helpful and what I was looking for, thanks!

quaint mantle
#

is it ok for the repository pattern to be loading stuff and saving stuff like files

remote swallow
vital sandal
#

a bit of math here
how to get the location in front of a player?

river oracle
#

I just noticed it says truck lmao

rotund ravine
vital sandal
#

I want it to always be on the same Y no matter how player look up or down

minor junco
vital sandal
#

and minecraft's direction vector is kind sus?

#

and ignore it :l

#

just need to set the pitch to 0

minor junco
#

Just take the location of the player, add the direction of the player and multiply it by the range (in this case one), no?

#

Ah nvm

vital sandal
#

and again

#

given a plane and 4 corner and a vector how to find the point that the vector is pointing on the plane

eternal oxide
#

what do you mean the way it's pointing? Thats what a vector is

vital sandal
#

like the location where that vector is pointing on the plane

eternal oxide
#

do you want its angle, like yaw?

vital sandal
#

ermm no?

#

like x y z

eternal oxide
#

um, you need an origin to calculate a location

vital sandal
#

yeh it should be given as well

eternal oxide
#

if you have an origin you need to zero the Y value, then normalize. Multiply by however far you want to go in that direction, then add it to your origin

#

so with your 4 corner example, if you want to move all, you add the resulting vector to all corners

vital sandal
#

well it should be like this :l

vital sandal
eternal oxide
#

you are trying to find the intersection point of teh vector?

river oracle
eternal oxide
#

That is not so easy

vital sandal
#

the block of light doesn't seemed to be helping at all?

#

and it seemed to be the armorstand facing?

#

in fact it does also happen when you holding it on your hand

minor junco
#

Any Exceptions?

thin iris
#

how do i programmatically activate a sculk sensor

novel gust
#

pretty stupid question but I haven't found any help online

quaint mantle
#

anyone help me with this log

#

cant seem to find the issue

young knoll
#

This server is running Paper version git-Paper-243 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 3a5c6f8)

#

Sir this is spigot

timber crescent
#
  this.task = Bukkit.getScheduler().scheduleSyncRepeatingTask((Plugin) GalactiCore.getInstance(), new Runnable() {
                            public void run() {
                                if (item != null && !item.isDead()) {
                                    final Firework f = (Firework) item.getWorld().spawnEntity(item.getLocation(), EntityType.FIREWORK);

                                    FireworkMeta fm = f.getFireworkMeta();
                                    fm.addEffect(FireworkEffect.builder().flicker(false).trail(false).with(FireworkEffect.Type.BALL)
                                            .withColor(Color.RED).withFade(Color.RED).build());
                                    fm.setPower(10);
                                    f.setFireworkMeta(fm);

                                    Bukkit.getScheduler().scheduleSyncDelayedTask((Plugin) GalactiCore.getInstance(), new Runnable() {
                                        public void run() {
                                            f.detonate();
                                        }
                                    }, 2L);
                                } else {
                                    Bukkit.getScheduler().cancelTask(FlareThrow.this.task);
                                }
                            }
                        }, 10L, 10L);```
how come if i spam this the fireworks just dont show up?
heady wasp
#

Anyone know why when I try to compile using Maven, I get
newPosition < 0: (-1 < 0) as an error.
This only happens when any .YML files have any content in them. If I delete all content in the YML files it builds fine

valid burrow
#

what would be the simplest way to change a friendly entitys ai to attack a player

echo basalt
#

Nms

vital sandal
#

Entity#setTarget()

inner mulch
#

small question to packets.
which packets are called when a player gets out of render distance of another player and which packet is called when a player enters the rende distance of another player?

valid burrow
echo basalt
#

It's really easy

#

Pretty sure you can do it with reflections

shadow night
#

Nms is my bro, especially on older versions

valid burrow
#

do i need to create an entirely new entity or can i edit an existing ne

#

one*

inner mulch
#

i think you only need the entities id

echo basalt
#

You can edit an existing one

rotund ravine
#

Just make zombie, and edit the packet the player gets to sheep easy easy /s

valid burrow
#

ark

#

arl

tranquil dome
#

Is there an advantage to sending text components over strings? If no, does it bring drawbacks, or should it not matter which is used?

inner mulch
#

i think you use componentes for stuff like hover events or click events

#

in chat

rotund ravine
tranquil dome
#

Yea I'm rewriting my utility class to support hover/click events and so on, so I thought why not just use components everytime

valid burrow
molten hearth
#

do you guys know if with intellij CE there's a proper way to generate the package

#

because by default it only creates src/Main

#

ultimate has the groupId feature in advanced settings but idk if CE has it somewhere

chrome beacon
#

When creating a project?

molten hearth
#

yeah

chrome beacon
#

CE also has it in advanced setting

molten hearth
#

nuh uh

#

AH BRUH

#

ITS ONLY UNDER BUILD SYSTEMS

#

LMAO

chrome beacon
#

Yeah

#

Maven or Gradle will do it

molten hearth
#

i guess intellij doesnt support it

#

wtf

valid burrow
glad prawn
# molten hearth

bro actually takes a photo of the computer screen with his phone ๐Ÿ˜ญ

glad prawn
molten hearth
#

fym

#

i aint gonna log into my discord on my friend's laptop ๐Ÿ˜ญ

glad prawn
#

omg

dense blaze
#

Anyone have a suggestion to determine if there is an active conduit near a player and the level it is even when they are out of water?

blazing ocean
#

how can I make a custom tablist without header and footer? like fake players?

chrome beacon
#

You'd send player info packets

blazing ocean
#

can you give me an example

chrome beacon
#

If you mean write it for you then no

blazing ocean
#

thats not what I mean

chrome beacon
#

What version are you making the plugin for

blazing ocean
#

i dont quite get how to construct the packets / set options

#

1.20.1

chrome beacon
#

Do you plan on using NMS or ProtocolLib or PacketEvents

blazing ocean
#

what are PacketEvents

#

is it just events for packets getting sent?

chrome beacon
#

PacketEvents is a library simillar to ProtocolLib

#

but you can shade it

blazing ocean
#

ill check it out

#

sounds good, ill add it

#

and how do I actually use it tho?

chrome beacon
#

To add players to the tab list you need to send the player info packet. You'd use the Wrapped version from Packet Events

#

and to send it you'd just get the protocol manager from the packet events api

blazing ocean
chrome beacon
#

Would be channel and packet

#

I've never used PacketEvents before so I'm just looking at it's code

#

Looks like you can get a User object from the player manager

blazing ocean
#

i got the PlayerInfo but I just need to send it

#

what channel do I use?

chrome beacon
#

The players channel

blazing ocean
#

its literally a Collection<Object>

chrome beacon
#

The User class will handle that part for you

blazing ocean
#

ah got itt

#

lemme test it

glossy venture
#

can the server not load libraries if the load type is set to startup

#

or smth

blazing ocean
# chrome beacon The User class will handle that part for you

took a bit and nothing is showing in tab. no errors. code: ```kt
fun createFakePlayer(username: String, displayName: Component) {
val profile = UserProfile(UUID.randomUUID(), username)
val info = PlayerInfo(profile, true, 0, GameMode.ADVENTURE, displayName, null)
val protocolManager = PacketEvents.getAPI().protocolManager

        for (user in protocolManager.users) {
            user.sendPacket(info)
        }
    }```

ive just been doing this on player login

rotund ravine
#

Try waiting a second and running the code

blazing ocean
#

okay

glossy venture
#

does libraries not exist in 1.8

chrome beacon
#

It doesn't

glossy venture
#

bruh

rotund ravine
#

1.8 is the dark ages

#

You get nothing fun

#

But a shit ton of issues

glossy venture
#

true

shadow night
rotund ravine
#

Rayden o ly ur so machochist u go there

shadow night
#

well

#

it's a cool version

rotund ravine
#

Nty

shadow night
#

and I made a creative inventory on that version

#

so it's funnier

blazing ocean
rotund ravine
#

Rip

blazing ocean
#

lmao

chrome beacon
#

Looks like you're trying to send PlayerInfo as a packet

blazing ocean
#

isnt that what i have to do?

chrome beacon
#

You want a WrapperPlayServerPlayerInfoUpdate that contains the player info

#

and the add action

#

so WrapperPlayServerPlayerInfoUpdate(Action.ADD_PLAYER, info)

blazing ocean
#

okay im gonna try

blazing ocean
chrome beacon
#

hm

blazing ocean
#

wait

#

its in the chat autocomplete

blazing ocean
chrome beacon
#

Not sure why it isn't working

#

You could test and see if that send packet method is called

blazing ocean
#

it probably is

echo basalt
#

pretty sure that on 1.20.1+ you need to send a spawn entity packet too

blazing ocean
#

for goodness sake

chrome beacon
#

forgot about that

blazing ocean
#

because both have an insane amount of arguments

chrome beacon
#

WrapperPlayServerPlayerInfoUpdate(EnumSet.allOf(WrapperPlayServerPlayerInfoUpdate.Action.class), info)

knotty aspen
#

Not sure about those wrappers, but the actual ClientboundPlayerInfoUpdatePacket has a shortcut method for this, createPlayerInitializing

placid rover
#

How do i change/customise the world loading screen? I want this in a Spigot server and im wondering if its physically possible?

placid rover
#

thought so

river oracle
#

you might beable to with a resource pack but I'm pretty sure the resource pack loads after you've already seen that screen

placid rover
#

was wondering for a project

placid rover
river oracle
#

maybe

#

try it out with a server resource pack

placid rover
#

ill try find a file for that idk

upper hazel
#

?past

#

?paste

undone axleBOT
upper hazel
rotund ravine
#

You gotta check if itโ€™s the same block too.

#

?blockpdc

undone axleBOT
rotund ravine
#

For inspiration

upper hazel
#

i was check but this classes use some api how i undestand

rotund ravine
#

@tender shard explain

gaunt sonnet
#

Hello everyone, does anyone have any advice please. I have the Pterodactyl panel. That's pretty cool, but my self-made plugin can't establish a connection. despite correct database access data.
all other plugins that work with databases

upper hazel
#

I think my code will work too after all I don't need to make it with version support

rotund ravine
#

No, but that code u posted wonโ€™t work

upper hazel
#

That's what most of the code is designed to do, as I understand it.

rotund ravine
#

I mean sure you can save it to relative locations

#

But what if a block is broken and replaced

#

You still got the old relative locaiton

#

Data

upper hazel
#

i will use listeners

rotund ravine
#

Try it then ๐Ÿคท๐Ÿฝโ€โ™‚๏ธ

upper hazel
#

oh wait i see now

#

you mean location not good id for block?

#

i need check material

#

or smth else

#

or use blockState as a string

#

hm

rotund ravine
#

Donโ€™t store too much data

upper hazel
#

what's the best fit? Material+location?

rotund ravine
#

Just relative location in the chunk

#

Remember to clean it on anything that replaces the block though

upper hazel
#

the pdc itself is not deleted, is it ?

wet breach
#

not unless the chunk gets deleted

upper hazel
#

if i reload server

river oracle
upper hazel
#

oh what this

devout kite
#

Hello i am trying to make a book interface but i get Invalid Book tag


    public static void gui(Player player){
        ItemStack book = new ItemStack(Material.WRITTEN_BOOK);
        BookMeta bookMeta = (BookMeta) book.getItemMeta();
        bookMeta.setAuthor("Handy");
        bookMeta.setTitle(name);
        book.setItemMeta(bookMeta);
        player.openBook(book);
    }```
#

can someone help me?

rotund ravine
upper hazel
river oracle
#

The answer is no

#

So doubles are unnecessary

upper hazel
#

It was easier than I thought.

grim hound
#

n & 0xF

#

Is n & 15 because blocks in chunks are identified by 0-15?

#

Is that the idea?

rotund ravine
#

Itโ€™s the relative location in the chunk

grim hound
#

I know

grim hound
#

Also, storing just the x and z would be just fine

grim hound
river oracle
storm crystal
#

so should I go with former guide to making classes or just use methods straight up from latter link

sterile token
sterile token
#

I would use SQLite and HikariCP

storm crystal
sterile token
#

yeah that seems really good

#

But i will implement it via HikariCP

young knoll
#

HikariCP doesnโ€™t really do anything for SQLite

#

Still usable though

sterile token
#

Because of the pooling handling, thats what i have read some months ago

native bramble
#

what is the better way to create custom snow on all server?

#

but i dont want to change all biomes

young knoll
#

You could spoof biomes with packets

river oracle
#

.avi ๐Ÿ’€ wtf kinda extension is that

#

should prob tranlsate that into mov or mp4

left pine
slender elbow
#

ffmpeg -i file.avi file.mp4 :chatting:

wet breach
lost matrix
storm crystal
#

Still dont get why there are so many types

#

Should be mp3 for audio and mp4 for video and call it a day

slender elbow
#

lossy

lost matrix
#

mp4 and mp3 are compressed to the rim. You would end up with a pixel mess after reusing those formats in editing tools for example

slender elbow
#

then you have fucking Bink video format which it provides no real benefit and only games use because "every other game uses it" and isn't used outside of games because there isn't a reason for it

lost matrix
#

mpeg is fine for videos distributed through the internet. Other than that i wouldnt really use it

#

Another loved one: WEBM
I really like to see those, after downloading videos PES_Yikes

slender elbow
#

wav tho

#

in the words of Ben Shapiro, wet ass v-word

young knoll
#

flv

storm crystal
#

So why not

#

Make one good format

#

For video and audio

slender elbow
#

it's a tradeoff between file size and quality retained

#

there is no one size fits all solution

lost matrix
#

Because different formats are specialized for different cases.
Imagine embedding avi videos. Half the people would have to buffer 480p youtube videos for some time

wet breach
storm crystal
#

:]

wet breach
#

you just need to determine what it is you need

#

some formats exist purely because it is easier to work with

river oracle
wet breach
#

it can be embedded

#

it just doesn't stream like mp4 does

river oracle
wet breach
#

and this is due to the fact mp4 has frames(can't think of the word)

#

every so many minutes

#

avi doesn't support chapters/frames

#

an alternative to mp4 is mkv if you want a format that is more close to it

river oracle
#

I love how much you know about a ton of random shit lol

wet breach
#

however, avi, mp4, and mkv are all containers and therefore are not necessarily the codecs for the video itself

#

which is why it depends on your settings that dictates quality/size

wet breach
#

if you grew up in the early 2000's you would probably know some of these things with the formats

#

since you know that was one of the times where formats were a big deal and all the format wars etc especially with dvd

river oracle
#

I wasn't even alive yet then

#

Ironically despite my name

wet breach
#

yeah, so not much of a reason until probably recently were you might need to learn something with the formats

#

back then it was a big deal because sometimes you might want to play a copy DVD and so when buying a dvd player you had to make sure it played formats you were familiar with

#

and then internet back then wasn't super fast so you had one format for transferring online

#

and other formats if you stored for backups to retain that quality

left pine
#

Hello, I wanted to know how I could detect if there is an entity to avoid this small error.
Don't ask about the music I was listening to :V

minor junco
#

That ain't music that's a whole ass movie

sterile token
minor junco
#

I don't even understand the question to begin with

sterile token
wet breach
#

not sure how an entity fits into this when you are messing with blocks

left pine
# wet breach what error?

I just need to know if there is an entity where the block is being clicked, because do you think that when I opened the custom inv it put the block.

What I try to do is not put the block when there is an entity in that position or when it has the block but opens the inv

sterile token
left pine
young knoll
#

What

sterile token
wet breach
#

but I take it your issue is the inventory thing?

#

Where it isn't opening the beacon inventory and instead some other kind?

young knoll
#

I think thatโ€™s intentional?

#

If you donโ€™t want blocks to be placed when your custom inventory opens, cancel the interact event

minor junco
left pine
floral thorn
#

uhm i never used heads before cause that im asking how to set an head in an inventory with texture of the discord logo?

minor junco
#

For everyone else I think what he is trying to do is place a block when clicked but when there's an entity at that position there shouldn't be a block placement

young knoll
#

Ah

#

BoundingBox.of(block) combined with World.getNearbyEntities(BoundingBox)

wet breach
minor junco
#

Himself I think

wet breach
#

unless they mean the player? but in that case it doesn't show them standing in the same spot as the block being placed

young knoll
minor junco
young knoll
#

Oh I got the wrong reply

#

F

minor junco
#

Happens the best of us

floral thorn
minor junco
#

I mean it's been done like this in legacy versions that's for sure

river oracle
young knoll
#

AuthLib^

#

Idk if AuthLib was even separate back then

#

Kinda wish Mojang made their NBT system open source

floral thorn
#

i guess im stupid

minor junco
#

Microsoft and open source

#

yup definitely not fitting

floral thorn
#

only thing i found is


        <dependency>
            <groupId>com.destroystokyo.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

river oracle
#

Smh smh Microsoft is an ally of open source! They own github too

#

You silly little dummies and saying Microsoft hates foss

minor junco
river oracle
floral thorn
#

but i never used heads so im helpless

#

& hopeless

#

xd

river oracle
#

Well I'm pretty sure you need nms here for sure

#

So start there ig

#

I can't help you since yk legacy

young knoll
warm mica
#

Microsoft purposely breaks office so that it doesn't work with wine

river oracle
minor junco
#

Y2K biggest troll on this server

river oracle
#

I'm a pretty helpful guy

minor junco
#

First says inches ftw and then this

#

yeah ๐Ÿ˜„

river oracle
minor junco
#

Hahaha

#

Yeah of course

#

Inches, feet and miles over scientific metrics

#

Makes sense to me

river oracle
#

Please do not speak ill of my legacy

minor junco
#

I won't I promise

river oracle
#

Good

young knoll
#

How many feet are in a mile

river oracle
young knoll
#

Ah yes normal values

river oracle
#

10,560 in 2 and so on

young knoll
#

Whoever invented it must have been using random.nextInt(10000)

river oracle
slender elbow
#

science was invented by George Science as we all know

young knoll
#

Thomas running invented running when he tried to walk twice

river oracle
minor junco
#

We're all nerds

subtle folio
#

how does one go about creating custom structures and thingies out of armorstands wearing/holding blocks? is there a library for this

tulip phoenix
#

Hello, good evening everyone. I would like to know, if I make a economy plugin and save all the players' money data in YAML databases instead of MYSQL or Lite, is there any problem on my server in the future?

knotty aspen
#

yaml isn't a database, so a yaml database doesn't exist

#

As long as you aren't planning on running multiple servers, you should be able to do this without issues.
Just don't do the I/O on the main server thread, but thats the case for sql too

tulip phoenix
#

Hm, okay. Thank you!

exotic obsidian
#

hello

#

if i want to save player xp i need a hashmap right?

#

but which event should i use?

vast ledge
#

Im having an issue when compiling a nms project, im extending CraftPlayer, the IDE shows no errors or missing methods, yet i get the following error

com.bedless.virtualplayer2.nms.v1_20_R2.CraftVirtualPlayer is not abstract and does not override abstract method playSound(org.bukkit.entity.Entity,java.lang.String,org.bukkit.SoundCategory,float,float,long) in org.bukkit.entity.Player```
#

I just checked multiple times tho

#

there is no method in entity.Player

#

with a long as playSound

young knoll
#

Itโ€™s new

vast ledge
#

wdym?

#

Is my Jar on an older version?

young knoll
#

Appears so

#

It was added to the api yesterday

vast ledge
#

But how is my maven getting the compile error, if my decomped jar.. doesnt have it

#

wat

slender elbow
#

your ide is lying

near night
#

anyone have any idea why this wonโ€™t work

manager.addPacketListener(new PacketAdapter(this, ListenerPriority.NORMAL, PacketType.Play.Server.BLOCK_BREAK_ANIMATION) {
            @Override
            public void onPacketReceiving(PacketEvent event) {
                event.getPacket().getIntegers().write(0, new Random().nextInt(2000));
                event.getPacket().getIntegers().write(1, 1);
                getLogger().info("RAN THE LISTENER");
            }
        });```
#

it just doesnโ€™t get called no exceptions or anything

quaint mantle
#

would Player#setAllowFlight(true) get set to false when the person leaves?

quaint mantle
#

it stays true?

wet breach
#

no, your statment is true is what I am saying ๐Ÿ™‚

quaint mantle
#

oh

wet breach
#

lol

#

it should get set to false because I don't recall that being a setting that gets saved in the player data files

#

so uh warning, depending how your server is setup

#

it may be wise that players don't log out while high up in the air

#

because when they come back, they may find themselves falling ๐Ÿ˜›

#

and potentially die

knotty aspen
#

Its a player ability, mayFly. Player abilities are saved in player data files. Unless the craftbukkit/spigot somehow breaks this, it will stay

#

its possible that the server is setting the gamemode again on join, that would override it

wet breach
#

if so the setAllowFlight is not quite the same thing

knotty aspen
#

nope. Elytra flight is what mojangs call "fall flying"

wet breach
#

nvm, went and looked it up. I don't remember how exactly CB implemented it

#

but I don't remember flying being permanent exception if you were in creative mode

#

since flying didn't really need to be saved even if its supported

#

it could have since changed and it is guess they would just need to try it and see which it is

knotty aspen
#

I wouldn't be surprised if somewhere in the login process the set gamemode method in ServerPlayer is called, that would set mayFly back to false

teal pond
#

is there documention for NMS?

wet breach
#

not really

#

just got to look at the code and see what it does ๐Ÿ™‚

teal pond
#

ok, ty

shadow zinc
#

I want to make a packet manager util for my library, but I'm unsure where to start. How might i provide ways to manipulate and read the packets after its been injected? Perhaps an abstract perform class that accepts the packet object? what will be the best way to do this?

torn shuttle
#

I'm just stuck

#

this sucks

#

I'm having to guess my way through how the rotations are meant to work here

#

it's so weird because while testing individual parts it just seems like it is working correctly but when the models get more complex it just dies

shadow zinc
#

i installed the buildtools with the remap flag

#

so idk whats happening

dry hazel
#

there are no mojang mappings for 1.8

shadow zinc
glad prawn
#

1.8 ๐Ÿ’€

shadow zinc
arctic shuttle
#

how would I make it so when a chest is open they can't move certain items into it and around their inventory?

shadow zinc
#

assuming thats what you're doing

#

then you listen for inventory item moves and canel it

grim hound
#

I'm decently sure that getAllowFlight stays the same

#

like 99% sure

wet breach
grim hound
#

since like 1.10

grim hound
#

the ability to fly

#

but flying also stays

wet breach
#

I have been around since the beginning of MC ๐Ÿ™‚

#

so not everything I recall is correct since things change ๐Ÿ˜›

grim hound
#

that was like

#

how long again

wet breach
#

2010?

#

I think is when mc officially released

#

2011

grim hound
#

anyway more than 7 years ago

wet breach
#

off by a year

grim hound
#

so

#

uh

#

you know

grim hound
#

ever since player abilities became a thing

torn shuttle
#

my animation system is so close to done I can taste it, it's so frustrating

wet breach
#

the feature for flying existed since beta 1.8

torn shuttle
#

'member magic carpet? I 'member

shadow zinc
#

is there an event listener for all events?

#

or a way to find when a player does literally anything

#

without packets

grim hound
#

handling

grim hound
shadow zinc
#

packets are such an ass fuck tho

#

literally the worst

grim hound
#

they're not if you learn them

shadow zinc
#

they are if you have to code them from 1.8 up to 1.20

grim hound
#

I can send you my github on how I've restricted all packets from a player

hazy parrot
#

Easy fix, don't support 1.8

shadow zinc
#

because my plugin works for 1.8 up to 1.20

grim hound
#

what exactly do you wanna do?

shadow zinc
#

create a metric on which players are sending the most data to the server

rotund ravine
shadow zinc
#

now you are speaking my language

#

please elaborate kind sir

#

anything but packets

grim hound
#

packets are still superior

shadow zinc
#

i am not coding packets from 1.8 to 1.20

#

period

#

not happening

grim hound
shadow zinc
#

oh?

#

how so

grim hound
#

packet

#

libraries

#

like PacketEvents

shadow zinc
#

not if it requires another plugin

#

im not making people install dependencies

grim hound
#

you can shade it in

shadow zinc
#

great

#

it can be even larger

#

how big is it?

grim hound
#

no idea

#

2.5 mb

shadow zinc
#

yeah i dont want my plugin to be 5mb

grim hound
shadow zinc
#

can't upload it to spigot

#

i would have to use an external site

#

surely there is a lightweight packet listener for all versions

#

that isn't a plugin

wet breach
#

there is some events that can be listened to that have others below it

shadow zinc
#

is there one that has all of them below it?

wet breach
#

Yes technically

fervent gale
#

when checking if a string matches a gui title, do I also need to check for the color or?

shadow zinc
wet breach
#

Event

#

however

shadow zinc
#

you cant just listen for event can you?

wet breach
#

nope

#

but

rotund ravine
# grim hound whaaat

   /**
     * Tries to remap all events implementing Cancellable
     */
    private fun tryRemapAllCancellable() {
        val section = config.getConfigurationSection("other") ?: return
        if (!section.getBoolean("listen-to-all-cancellable", false)) return
        val nameSpaces = section.getStringList("cancellable-namespaces")
        val ignored = section.getStringList("ignore-cancellable")
        val isCancelledMethod = listOf("isCancelled")
        nameSpaces.forEach { nameSpace ->
            val reflections = Reflections(nameSpace)
            reflections
                .getSubTypesOf(Cancellable::class.java)
                .filter {
                    it.declaredFields.any { field -> field.type.name.endsWith("HandlerList") }
                            && !ignored.contains(it.name)
                }
                .forEach {
                    EventRemapper.remapAndSubscribe(it as Class<out Event>, isCancelledMethod)
                }
        }

    }

implementation("org.reflections", "reflections", "0.9.12")

wet breach
#

you can extend it and make a custom event and stuff all the events into it

#

not sure if its wise to do, but I suppose you could give it a try