#help-development

1 messages · Page 1981 of 1

vague swallow
#

Is there a way to let entitys glow for only some players?

lost matrix
quaint mantle
vague swallow
#

good idea

tardy delta
#

what would it need to tell 👀

misty ingot
#

hey I was wondering if there is a way to disable the typo checker in IntelliJ? it gets a bit annoying after some time

lost matrix
misty ingot
#

I just wanna disable it man

#

just straight up disable it

quaint mantle
#

if thats what ur looking for then google before asking because stackoverflow contains everything

misty ingot
#

I tried googling it

#

I guess my google just works differently

#

thanks tho

quaint mantle
#

i googled the exact phrase you said

#

"disable typo check intelij"

vague swallow
#

For some reason there are no GameProfiles anymore... Did they remove them?

lost matrix
lost matrix
#

I think you can also just add mojangs auth stuff as a dependency

vague swallow
#

Okay

#

Also... I'm feeling ashamed for that but I have no clue about packets. Does anyone know where I can learn how they are working and how I can send them?

lost matrix
vague swallow
#

thank you

#

Well (I'm using 1.18) for some reason it doesn't find net.minecraft

sacred mountain
#

if you use maven darkmango u can access nms like htis

vague swallow
#

I'm using maven but what is htis?

sacred mountain
#

this*

vague swallow
#

ah sorry

sacred mountain
#

add those to your pom xml

#

yeah

#

sorry bad spelling

vague swallow
#

dw I know that XD

#

ty

sacred mountain
#

i use that repo for nsm

grim ice
#

dont u have to buildtools?

eternal night
#

ah yes, hosting the server implementation

#

a 100% effective way to get clapped

grim ice
#

why

lost matrix
eternal night
#

because it isn't legal

#

^

vague swallow
#

what is the net.minecraft repository link?

grim ice
#

why is it not legal

sacred mountain
#

huh

vague swallow
eternal night
grim ice
#

who said I accepted it

#

:O

floral pewter
#

If you've started your server, you have accepted it

eternal night
#

^

grim ice
eternal night
#

you still did

grim ice
#

automatically accepts it for me

floral pewter
#

Check their EULA

grim ice
#

:o

floral pewter
#

It probably mentions the mojang one

eternal night
#

they are distributing mojang assets when hosting those jars

sacred mountain
#

isnt this

#

ok it deleted

#

why is that censored

grim ice
eternal night
#

Ah yes, "if no one sues me, it is fine"

#

lol

floral pewter
sacred mountain
#

is buildtools licensed or

floral pewter
#

and if not obeyed, it might be followed by a lawsuit

#

Buildtools downloads those assets separately from Mojang

#

So it legally doesn't count as distributing them

sacred mountain
#

yo is there a way to use maven placeholders in my code? not literlaly in the code but inside the ide, for instance if i have ${project.version} and i wanna use it in something

tardy delta
narrow stag
#

Quick question about IDEA how to remove this yellow thing. its in all my files.

eternal night
#

usually you'd want to read what intellij is suggesting

delicate lynx
#

read the warning

narrow stag
#

i saw them but i want to remove them : /

delicate lynx
#

fix the warning and it will go away

narrow stag
#

ok Fixed it : )

tardy delta
#

hate the fact that you cant do if (!sender instanceof Player)

#

always that extra pair of brackets

young knoll
#

I wish you could do !instanceof

grim ice
#

it looks organized

tardy delta
#

too much brackets

grim ice
#

they should make

#

.instanceOf()

tardy delta
#

Class::isInstance isnt that something?

young knoll
#

There’s also isAssignableFrom

tardy delta
#

whats the difference between them

young knoll
#

The later works with subclasses and such

blazing scarab
#

clazz1.isAssignableFrom(clazz2)

young knoll
#

I assume the other is for objects

blazing scarab
#

isInstance is for objects

tardy delta
#

yep it takes an object as parameter

sacred mountain
narrow stag
#

Why is this not working

#

(its new class )

young knoll
#

Because getCofig isn’t a method outside your main class

#

?di

undone axleBOT
grim ice
#

MainVLandsCommand.java line 22

#

@sacred mountain

narrow stag
#

i see

#

which is then

sacred mountain
#

if (sender.hasPermission("vlu.admin")) {

lost matrix
sacred mountain
#

thats it for line 22

grim ice
#

sender is null

tranquil viper
#

I'm having a weird problem with my plugin:

banned.remove(uuidString);
plugin.banned.set("banned-players", banned);

I clearly remove the player from the Map and then set the Map to the updated Map.
This works and removes them, although when I try and add them back later it doesn't add them. Any reason this might happening?

            try {
                banned = Objects.requireNonNull(plugin.banned.getConfigurationSection("banned-players")).getValues(false);

                if(!banned.containsKey(player.getUniqueId().toString())) {
                    banned.put(player.getUniqueId().toString(), System.currentTimeMillis() + (banDuration * 1000L));
                    plugin.banned.set("banned-players", banned);
                }

            } catch (NullPointerException exc) {
                System.out.println("created map");

                banned = new HashMap<String, Object>();

                banned.put(player.getUniqueId().toString(), System.currentTimeMillis() + (banDuration * 1000L));
                plugin.banned.set("banned-players", banned);

            }
grim ice
#

oh wow

tranquil viper
#

Whenever it creates a new HashMap it doesn't seem to add them

#

And I have no clue why

vague swallow
#

How can I import net.minecraft?

tardy delta
#

catch (NullPointerException exc) thats not really good practice

tranquil viper
#

rnn throws npe though

#

I tried checking if it was null

#

came with loads of problems

#

so I just became lazy

dusk flicker
#

then you are doing something wrong more than likely

tranquil viper
#

Why wouldn't it add them to the HashMap after I create it though?

grim ice
#

dont use contains()

#

use if(hashMap.putIfAbsent(k, v) == null)

dusk flicker
#

also whya re you storing the uuid as string

#

just store a uuid?

grim ice
#

putIfAbsent will put if there is no value and will return the value found, otherwise will return null

tranquil viper
#

Doesn't solve my problem either way lmao

grim ice
#

makes your code cleaner and probably better performance

tranquil viper
#

I appreciate the tips but again, that doesn't fix the problem that it just doesn't add it to the map

grim ice
#

and im right

#

its better performance

#

oh also

#

you probably want to just store the hashmap in ur code instead of plugin.banned every second

sacred mountain
#

idk whats wrong

grim ice
#

dunno

#

also

#

putIfAbsent has the same performance as put

tardy delta
#

i guess banned is a FileConfiguration

#

this wont do anything
plugin.banned.set("banned-players", banned);

grim ice
#

so we basically just got rid of containsKey performance loss

tardy delta
#

youre not saving it

grim ice
#

put also does that

#

so you're doing double searching

#

where putIfAbsent does 1

narrow stag
#

@young knoll So what is the way to fix my issue : ) sorry for the mention

grim ice
#

instead, you should avoid it

tardy delta
#

so make sure your map is actually initialized

tardy delta
#

also avoid public variables and exposing collections

young knoll
#

?di

undone axleBOT
grim ice
#

and either way

#

you're using toString() and other methods

#

you should just use UUID

tranquil viper
#

alright thank you very much

#

I did fix it by just storing it in a hashmap and then only saving the hashmap on disable

#

I will try my best to implement/fix everything y'all told me though

#

thanks

narrow stag
tardy delta
#

dependency injection

grim ice
#

Also do not use sysout in bukkit plugins, Loggers exist.

narrow stag
#

ohh

#

i see

#

im stupid

tranquil viper
narrow stag
#

thx

tranquil viper
#

its quicker

grim ice
#

yeah

#

but for actual purposes use Loggers :)

fossil lily
#
    public static HashMap<String, Integer> loadHashMap(String hashName) {
        HashMap<String, Integer> hm = new HashMap<String, Integer>();

        file = new File(Main.instance.getDataFolder(), hashName + ".yml");

        if (!file.exists()) {
            try {
                file.createNewFile();
                System.out.println("3");
            } catch (IOException e) {
                e.printStackTrace();
                System.out.println("4");
            }
        }

        YamlConfiguration customFile = YamlConfiguration.loadConfiguration(file);
        for (String key : customFile.getConfigurationSection(hashName).getKeys(true)) {
            // Load the config from the file, and apply it to the hashmaps needed.
            hm.put(key, (int) customFile.get(hashName + "." + key));
        }
        return hm;
    }
}

Any idea why this wouldent be working? I have no errors.

#

Is there anything glaringly wrong

grim ice
#

oh god

#

static abuse

tranquil viper
tardy delta
#

new HashMap<String, Integer>();

tardy delta
tranquil viper
#

ah

#

ok

#

thanks

vague swallow
tranquil viper
#

it provides a Map<String, Object>

#

lmao

grim ice
#

is awful

tardy delta
#

dunno what you are doing

tardy delta
#

idk is there another way

grim ice
#

might want to not use it, ig just use String

#

but if ur on a newer version probably use it

fossil lily
tardy delta
#

why getKeys(true)

#

and not false?

grim ice
tardy delta
#

also instead of (int) fileconfig.get there is a getInt method

trail dragon
#

Is there an event called when a player is inside a powdered snow block? and if so what is it called.

#

I couldn't find anything in the javadocs

#

EntityChangeBlockEvent does not seem to work

#

I am essentially trying to disable the powdered snow block for players with a certain permission

#

Here is an idea of what I'm trying to do:

    public void EntityChangeBlockEvent(EntityChangeBlockEvent e) {
        if(e.getEntity() instanceof Player) {
            if(e.getBlock().getType().equals(Material.POWDER_SNOW)){
                Player p = (Player)e.getEntity();
                if (p.hasPermission("n2.snow")) {
                    p.setFreezeTicks(0);
                    p.sendMessage(":" + p.getFreezeTicks());
                }
            }
        }
    }```
glossy venture
#

yo can i use jfrog to set up a maven repo?

tardy delta
#

EventPriority.NORMAL is redundant

glossy venture
#

couldnt find it at first

lost matrix
glossy venture
#

ight

#

ill look into it

worldly ingot
#

JFrog specifically supports Maven, yes

glossy venture
#

i have no idea what im doing

#

i created a repo but now its asking me to configure

dusk flicker
#

what is that

#

oh

glossy venture
#

jfrog thing

#

but i can only configure release and snapshot, but the generated settings include themselves

#

idk its hard to explain

#

where do i deploy this

lost matrix
#

lul

glossy venture
#

i dont have a local server

lost matrix
#

remote. linux machine.

glossy venture
#

im using a free profile on jfrog and it asked me to set up an aws server

lost matrix
#

possibly a dedicated or v server

#

oh yeah aws is also possible

glossy venture
#

but did it create the server

#

or do i have to create it and then link it somehow

#

or do i have to log into it

lost matrix
#

No idea i always go for nexus and install that on my dedicated server

glossy venture
#

it seems like it has a server set up (url https://orbyfied.jfrog.io/ui/native/m2-libs-release/) cuz it says Artifactory Online Server

#

btw is this server help

#

?

#

technically

#

am i in the wrong channel again

tardy delta
#

is there a java.util.function class that takes a parameter and returns nothing?

glossy venture
#

consumer

tardy delta
#

OW RIGHT

#

lol

glossy venture
#

lmfao

tardy delta
#

making some command handling thing

glossy venture
#

what should i use as package in my repository, maven or gradle

sacred mountain
#

i like maven but

glossy venture
#

would choosing gradle prevent maven users from using the artifacts

lost matrix
#
Runnable:
void -> void

Consumer:
T -> void

Function:
T -> R

BiConsumer:
T, V -> void

BiFunction:
T, V -> R

Supplier:
void -> T

Predicate:
T -> boolean

BiPredicate:
T, V -> boolean

UnaryOperator:
T -> T

BinarOperator:
T, T -> T

And then there is also a bunch of primitive stuff like IntConsumer or LongBinaryOperator and so on

tardy delta
#

awh thanks

glossy venture
#

nice

#

why is the base class code so compressed

tardy delta
#

wdym compressed?

glossy venture
#

idk i like to do

if (...) {

}

// ...
#

with like newlines

tardy delta
#

oh idk thats just me lol

glossy venture
#

ah

#

but would choosing gradle prevent maven users from using the artifacts

#

on a repo

lost matrix
#
        switch (result) {
            case FAILED -> sender.sendMessage(ChatColor.RED + "Something went wrong!");
            case NO_PERMISSION -> Lang.NO_PERMISSION.sendTo(sender);
            case PLAYER_ONLY -> Lang.NO_CONSOLE.sendTo(sender);
            case TARGET_NOT_FOUND -> Lang.PLAYER_NOT_FOUND.sendTo(sender);
            case SHOW_USAGE -> usage.sendTo(sender);
        }

Could be done in a Map<CommandResult, Consumer<Player>> for a tiny tiny bit better performance.
And i also hate switch case statements.

tardy delta
#

lemme copy 300 more lines from my old plugin lol 😂

#

👀

#

mye possible

#

what if i would do something that doesnt need a player 🤷

#

ill look at that tomorrow

#

goodnight

glossy venture
grand flint
#

Hey guys

#

Let's say a player is in the middle of two blocks, but like slightly more closer to one

#

How do I get the block the player is closer to

opal juniper
#

so if i have a material, how do i work out if it is something like a flower that is technically a block but has no collider

glossy venture
#

isnt there an isSolid method or something

#

on the material

#

i think thats what youre looking for

mortal hare
#

does any of you have any idea why

player.getInventory().getItem(0);

returns null, and:

player.getOpenInventory().getItem(36);

returns AIR itemstack

#

both methods are nullable

#

i've tried decompiling CraftBukkit classes

#

but i cant find any difference

lost matrix
kind hatch
#

Players can move things around in their inventory, so there is no guarantee that item slot 0 will be what you want it to be.

mortal hare
#

returns null

#

for the same slot

#

instead of AIR

#

at the same time

#

also it makes no sense to return AIR itemstack whenever the method is marked as @Nullable

eternal night
#

welcome to the joys of bukkit inventory api

quiet ice
#

The API is more and more moving towards not returning null

#

that being said, null can be returned from time to time

midnight shore
#

How can I make a bossbar for the player?

sour girder
#

im currently looking for a 1.7.10 spigot (the spigot itself, not plugins) developer, if you have any information and have any experience, please dm me with snippets and previous work.

I run Alpha, a HCF server. For info about the team, server, or paid development jobs my dms are open

undone axleBOT
hasty prawn
#

Although good luck finding devs that work with 1.7.10 lol

sour girder
hasty prawn
midnight shore
lost matrix
#

You should separate the cooldown and the display of the cooldown

#

And also a while loop on the main thread blocks the whole server

#

minecraft has only a single thread. If you block it with a while loop then the server just stops.

hexed hatch
#

minecraft has more than a single thread

#

but most of the game processes happen on the one, yes

#

scheduled repeating task

lost matrix
#

You basically check every tick

#

You are using a BukkitRunnable which means you can just call BukkitRunnable#runTaskTimer(JavaPlugin, long, long)

hexed hatch
#

just use runTaskTimer like he said

#

it's part of the BukkitRunnable interface so you can use it there

lost matrix
#

A BukkitRunnable is fine. But you need to think of discrete timeframes instead of continuous ones.
Here is a guide for the scheduler in bukkit:

#

?scheduling

undone axleBOT
lost matrix
#

Running the BukkitRunnable every N ticks

#

Ill just copy something from a thread i wrote

#

From 2 different threads

#

And scheduling a repeated task basically runs your run() method at the start of every tick until you stop it.

smoky oak
#

what's the event that happens when a player's exhaustion level increases?

#

EntityExhaustionEvent, despite it being specific to players only

#

logic

main dew
#

How I can check if Player on ground in PlayerMoveEvent?

smoky oak
#

look how to check if the player is jumping and do a if not of that check

grim ice
#

If you want to get a custom one for some reason, you need a really skilled developer

#

which will break your bank

#

mostly

trail pilot
#

so im trying to make a delhome command its work perfectly except for the home name

#

test: {} is become like that

#

plugin.homesYaml.set( "Homes." + getPlayerUUID( player ) + "." + homeName, null); I have test this method but same's its still dont wont remove it

#

homeName become args[0] because i made a method for that

#

if someone know how to remove the homeName please ping me

smoky oak
#

i think by setting something to null you make that value null. Maybe it would work if you call .remove() instead

#

wait wtf

#

im using the 1.18.1 api

trail pilot
fossil lily
#

How can I set a cooldown on an event?

smoky oak
#

make internal static variable either per player or per event and store the time of last activation in that

#

if the difference between that and the current event is smaller than your cooldown do setCancelled(), otherwise update that variable

#

also

#

why the fuck does the docs online specify a class that doesnt exist in the api?

grim ice
#

are disgusting tbh

grim ice
#

literally only me and conclure said a compliment

#

why do people get urges to comment on everything, even the smallest mistakes on writing that the writer knew the correction for

main dew
#

How I can check if Player on ground in PlayerMoveEvent?

grim ice
#

if(player.isOnGround())

vocal cloud
#

Don't use that

grim ice
#

o

young knoll
#

Use that if you are aware of why it’s deprecated

vocal cloud
main dew
young knoll
#

Subtract a tiny amount from the y

#

And then check if that position is a block

#

Not perfect, but it can’t be spoofed

main dew
grim ice
young knoll
#

Hence the solid block

grim ice
#

actually 2

#

or actually 1

#

check if itsa solid block

#

if its not go to the one below it and check if it is

#

if it isnt, then he isnt on the ground

main dew
young knoll
#

I did like

#

0.01

main dew
#

you know, however, I'd rather not use this method

young knoll
#

You could also look into checking the bounding boxes of the player against the block

grim ice
#

In what context

#

are you using this

grim ice
#

if its not something you gain an adventage of by cheating

#

then just use isOnGround

#

as long as spoofing wont give adventages

young knoll
#

Block has a getCollisionShape

vocal cloud
#

I highly recommend not using isOnGround unless this is a for-fun plugin

main dew
smoky oak
#

because its client dependent

#

someone can just telling your erver the resot that method is supposed to have

vocal cloud
smoky oak
#

ergo it can be given wrong results if the player wishes for it

young knoll
#

Nah it’s good

#

Use it for an anti cheat

smoky oak
#

thats one way to do it

grim ice
#

of being on the ground

#

when the user isnt

#

very easily

main dew
#

all in all, it's an interesting approach

main dew
trail pilot
#

how i see only the ".Something" can be removed

grim ice
#

@main dew also why are you using player move event

#

it runs every single lil movement

#

even when turning ur head

trail pilot
#

nobody answer me lel

main dew
grim ice
#

Yes, PlayerMoveEvent with this check

if ((int) event.getFrom().getX() != (int) event.getTo().getX() || (int) event.getFrom().getY() != (int) event.getTo().getY() || (int) event.getFrom().getZ() != (int) event.getTo().getZ()) ```
#

getBlockX/Z/Y will floor

#

anyways

main dew
#

but there is no such existing one?

young knoll
#

Why would you not use getBlockX/Y/Z

main dew
#

good question xD

stuck flax
#

I'm making a moderation plugin for bungeecord, how would I do durations and write it to a MySQL database?

main dew
#

and you add time do this for example

#
System.currentTimeMillis()+hours*60*60*1000+minutes*60*1000+seconds*1000 ```
#

or second option

#
System.currentTimeMillis()/1000+hours*60*60+minutes*60+seconds ```
worldly quest
#

anyone know an easy way to kill a player and set their hunger to half after they respawn? ive tried just killing then saving their uuid and checking if its saved on the respawn event to no avail

main dew
lost matrix
main dew
lost matrix
main dew
trail pilot
lost matrix
# trail pilot please help

Dont use configs on runtime.
Load a players home(s) when he joins the server.
From then on you only use properly named variables and classes.
When the player quits again then you simply save his data again.

trail pilot
#

and i still dont get it because its wont delete the homeName

lost matrix
trail pilot
#

i dont need to load it because it all on a yaml file

lost matrix
trail pilot
#

oh tf should create the home XD

worldly quest
lost matrix
#

Load the config when the server starts.
Use the loaded data (HomeManager for example)
Save the data when the server stops

lost matrix
young knoll
#

No

#

The respawn event is called when they press respawn, therefor leaving the screen

trail pilot
young knoll
#

But most modifications to the player need to be delayed a tick when using the respawn event

worldly quest
lost matrix
# worldly quest how would i tag the player? i havent done stuff with scoreboards yet

Example:

  private static final String HALF_HUNGER_TAG = "__HALF_HUNGER__";

  public void killAndTagForHalfHunger(Player player) {
    player.getScoreboardTags().add(HALF_HUNGER_TAG);
    player.setHealth(0);
  }

  @EventHandler
  public void onRespawn(PlayerRespawnEvent event) {
    Player player = event.getPlayer();
    if (player.getScoreboardTags().remove(HALF_HUNGER_TAG)) {
      player.setFoodLevel(10);
    }
  }
worldly quest
#

tysm

trail pilot
#

should remove reload from my homemanger?

young knoll
#

Scoreboard tags are just janky pdc

trail pilot
#

and how tf i can remove my home name

main dew
lost matrix
lost matrix
trail pilot
young knoll
#

That only works on the player

#

Not the getTo of a move event

main dew
lost matrix
young knoll
#

The later

#

You’d probably do something with a BoundingBox and block#getCollisionShape

lost matrix
#

I see. Then ray tracing downwards for like .1 would be my approach. Not sure how it compares to the boundingbox method.

main dew
#

!docs block#getCollisionShape

young knoll
#

Nice try

main dew
#

what command to do this? xD

young knoll
#

There isn’t one

#

?jd-a

#

?jd-s

undone axleBOT
main dew
#

?docs block#getCollisionShape

#

was once

young knoll
#

Maybe on a certain forks discord

main dew
main dew
sacred scaffold
#

I need help someone please help me. basically my simplescore plugin isnt working

young knoll
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

main dew
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

muted sand
#

how do i disable inbuilt commands like /w? PlayerCommandPreprocessEvent then just cancelling the event or using commands.yml?
what would be "better"?

worldly ingot
#

For what reason? It's just an alias to /msg, no?

worldly quest
#

is there a good way to broadcast to everyone online?

worldly ingot
#

If you don't want people to use /msg you should just revoke access to that command, happi

lost matrix
trail pilot
#

how i can make a tab completer to get player home?

lost matrix
lost matrix
#

getCommand("command").setTabCompleter(new YourCompleter());

muted sand
trail pilot
#

yea that i know, the thing its how do i get home from config

wanton remnant
#

Hi :D
I've had a little problem for quite some time with hexadecimal colors. Basically, when a color in the form §#af1233 test is entered by the player, we see test in color but when it is done by the code or by the server we see under this form §#af1233 test the color is not translated. So I wanted to know if anyone knew what it was, if there have been recent changes (I'm in 1.17.1) because I didn't have this problem before :(
Thanks in advance for any help you can give me :p

worldly ingot
#

Yes. Do you just want the command removed entirely?

#

In which case yes the only way to do that would be to cancel a preprocess event

muted sand
#

Yes, if that was possible

#

oh okay!

sacred scaffold
#

Simplescore plugin is not working I reinstalled it and everything it does not pop up when I do the command ./rg flag global scoreboard example. Yes I created the reguion global using world edit and even deleted it and re-added it multiple times. It still is not popping up

#

It was working before but then it just stopped after I edited it to what I wanted in the scoreboards file

lost matrix
worldly ingot
#

Eh, well, in some cases it's fine to do on the fly. For simple configurable values, everything is cached anyways

trail pilot
#

i have methods for make thing and remove things from config

main dew
lost matrix
#

Everything that uses String keys is error prone to typos. I would really try to enforce this doctrine to not use FileConfigurations as actual data structures.

trail pilot
trail pilot
#

oh damn

#

i know what you mean

lost matrix
# main dew and you could show an example because I don't know what you mean I don't use ray...

Not sure if this covers everything:

  private static final Vector DOWN = new Vector(0, -1, 0);  

  public static boolean isGroundedLocation(Location location) {
    World world = location.getWorld();
    Preconditions.checkArgument(world != null);
    RayTraceResult result = world.rayTraceBlocks(location, DOWN, 0.1, FluidCollisionMode.NEVER);
    return result != null && result.getHitBlock() != null;
  }
trail pilot
#

but im so stupid for make it LEL

main dew
copper spoke
#

yo guys i got a pretty dumb question, im very new to owning a server.
im in the process of updating the plugins on my server and im using filezilla. Obviously theres the .jar file for the plugin but some of them also have folders. can I just drag the updated version of the plugin from my downloads folder into the plugin folder?

#

and then delete the old.jar and the folder? or keep the folder

#

shit this is in the wrong chat

#

my fault guys

#

but if someone could reply that would still be dope 👍

worldly quest
#

oh nevermind the problem was that it didnt remove the food

wanton remnant
#

Hi :D
I've had a little problem for quite some time with hexadecimal colors. Basically, when a color in the form §#af1233 test is entered by the player, we see test in color but when it is done by the code or by the server we see under this form §#af1233 test the color is not translated. So I wanted to know if anyone knew what it was, if there have been recent changes (I'm in 1.17.1) because I didn't have this problem before :(
Thanks in advance for any help you can give me :p

astral nova
#

someone had this error ?

#
java.lang.RuntimeException: Cannot retrieve entity from ID.```
quaint mantle
#

public class CommandServer extends Command implements TabExecutor { public CommandServer() { super("server", "bungeecord.command.server", new String[0]); }
Can someone explain me how to add aliases to bungeecord commands?

#

Where?

vague swallow
#

How can I get the location of a player and move only the location in his line of sight?

delicate lynx
#

check move event, get their line of sight, if it's not going there, cancel it

sharp flare
#

are there any way in optimizing a repeating runnable code that does teleportation every 2 ticks

tender shard
#

if yes, send the full error message/stacktrace. if no, report it to them

tender shard
sharp flare
#

thats the snippet

brave sparrow
#

What’s the purpose behind doing that

sharp flare
#

its a mob that stays beside the player that will fight any mob that damaged the player after killing the target it will stay back to the player's side again like floating and follows when moving

undone pebble
#

every two tick seems unnecessary

brave sparrow
#

You could probably make a custom entity with actual pathfinding goals for that

sharp flare
#

yeah but unfortunately I'm not gonna use nms for it

brave sparrow
#

Then reducing the frequency at which it runs is gonna be the best you can do

sharp flare
#

the transition is not that smooth with higher delays which makes it have very delayed movement

#

but its the best option I have ig

sleek pond
#

Is there a scoreboard objectives update event?

#

I don't think there is

#

if not, would doing a check every tick be resource heavy?

sharp flare
ancient jackal
#

wanna see something stupid

#

Stream.concat(Stream.generate(() -> new Random().nextInt(66, 92)).limit(10000), Stream.generate(() -> new Random().nextInt(34, 60)).limit(10000)) .sorted((x, y) -> new Random().nextInt(-10, 10))

worldly ingot
#

GC go brrrr

#

but I'm still gonna run it because it looks like fun

ancient jackal
#

and

#

it is sorted

#

perfectly

worldly ingot
#

I mean...

#

Yeah by definition it's going to sort perfectly haha but by any typical human definition, that's far from sorted

ancient jackal
#

real talk though, aren't the unicode numbers for uppercase letters 34-60 and 66-92 for lowercase?

dawn hazel
#

dont you just love it when this happens

ancient jackal
#

Yes

dawn hazel
#

pisses me off to the max

ancient jackal
#

at least that's what wikipedia said

worldly ingot
#

Yeah, you've got some punctuation in there too

ancient jackal
#

I mean 60-34 is 26 and 92-66 are both 26 so like it cant be any wider than that

worldly ingot
#

65 - 90 = A - Z

#

I forget where lowercase letters are just off hand though

#

97 - 122

ancient jackal
#

64-90 or 65-91? 65-90 would be missing either A or Z

worldly ingot
#

I'm being inclusive here

ancient jackal
#

yeah I just realized lol my bad

worldly ingot
#

;p

ancient jackal
#

mmm I'm gonna have to ramp up those random sorting ints by a few 0's

#

100000* works

dawn hazel
dusk flicker
#

oh god conventions

hardy swan
#

codePointAt

ancient jackal
#

I did not know that method existed but I will look into using it in the future, thank you

hardy swan
#

then I realize you could just print it to check

ancient jackal
#

what kind of task were you given where you needed to know the unicode of characters? I was just generating a random string of letters and now adding random line breaks

hardy swan
#

I was asked to implement a bold function to bold requested word in a paragraph using the markdown * symbols

ancient jackal
#

oh, why did you choose to do that with unicode?

hardy swan
#

I choose to use the .split to split the paragraph with the requested words, then join them back with the words in between with * wrapped around as separator

#

then I realise I have to check if a word is preceded or ending with anything but an alphabet

#

It was a pretty bad solution but I was in a rush

#

there was also a question of capitalizing the word where I needed to know the difference in the unicode

ancient jackal
#

oh, what would you do differently from then?

hardy swan
#

I could instead check character by character using a trie or sorts, reset whenever I am met with a whitespace or punctuation (which I will probably still required the use of unicode).

brave sparrow
hardy swan
#

looks for the word, then add * before and after

brave sparrow
#

You wouldn’t need a trie then

ancient jackal
#

I'll have to practice that

hardy swan
#

the trie is just an optimization for the case where the requested words are similar to each other

brave sparrow
#

Iterate through the characters of the string

waxen plinth
#

TRIE?

young knoll
#

Why not just use regex

brave sparrow
#

When you find the first letter, set an index point

waxen plinth
#

That's like my favorite data structure

ancient jackal
waxen plinth
#

HashMaps are a close second

brave sparrow
# young knoll Why not just use regex

This is for a technical interview question, they don’t want regex because it’s more about understanding the data and the algorithm than the string itself

waxen plinth
#

More useful but prefix trees are cooler

#

What's the problem?

young knoll
#

Ah

ancient jackal
#

I need an example of this "prefix tree" you speak of

hardy swan
#

same as trie

waxen plinth
#

Yeah but prefix tree is a better name

young knoll
#

Just call it Jeff

ancient jackal
#

HashMaps > Jeffs

brave sparrow
#

@hardy swan:
Iterate through the characters, keep a pointer to the current index of the first character in the word you’re looking for too
When you find a match, set a start index at the current point in the main string and increment the cur pointers. Continue matching each subsequent character until you fail to match or you find the entire word. If you fail to match, unset the start and set the word pointer back to 0, if you complete the match insert the * and keep going

#

No need to reorganize the data at all

waxen plinth
#

Well what if there are multiple words you could be looking for?

#

Prefix tree

hardy swan
#

i mean it will work for multiple words, just k times the whatever complexity it is, where k is the number of words

brave sparrow
#

Should be roughly O(kn)

#

Where n is the length of the main string

hardy swan
#

where n is longest word's length

brave sparrow
#

Longest word is going to be shorter than the entire string presumably

#

The limiting factor is the length of the main string

hardy swan
#

oops yea, the entire string

brave sparrow
#

Yep

waxen plinth
#
public static String bold(String input, String... words) {
  CharTree<Integer> tree = new CharTree<>();
  for (String word : words) {
    tree.set(word, 1);
  }
  StringBuilder builder = new StringBuilder();
  for (int i = 0; i < input.length(); i++) {
    Pair<Integer, Integer> result = tree.getFrom(input, i);
    if (result.getFirst() != null) {
      builder.append('*').append(input.substring(i, i + result.getSecond())).append('*');
      i += result.getSecond() - 1;
      continue;
    }
    builder.append(input.charAt(i));
  }
  return builder.toString();
}```
brave sparrow
#

You could also use more memory and do it in one pass

#

Which would be O(n) time

waxen plinth
#

Pretty sure it's the optimal solution

hardy swan
#

I meant to do it in one pass using trie

brave sparrow
#

Using a trie for this is like killing a fly with a sledgehammer

waxen plinth
#

No it's not

#

It's using the best tool for the job

brave sparrow
#

It’s overkill

waxen plinth
#

You end up not wasting processor time

#

How is it overkill if it's saving time?

#

If you have a lot of different words you want to bold it could make a massive difference

hardy swan
#

i think the difference is even more apparent when the words are kind of similar

twilit wharf
#

I have a .schematic file in my resources folder, how do I get the actual File object, and not the InputSteam object with JavaPlugin#getResource()?

hardy swan
#

["trie", "tried", "tries"]

waxen plinth
#

Because it's not a File

#

It's an internal resource in the jar

twilit wharf
#

Ah yeah

#

I need it for the WorldEdit API

ancient jackal
#

save it as a resource in the data folder perhaps?

twilit wharf
#

not sure how to get around that then

waxen plinth
#

Could just get it as a string presumably?

twilit wharf
ancient jackal
#

okay so I have a really terrible issue

#
        List<Character> temp = Stream.concat(Stream.generate(() -> new Random().nextInt(65, 91)).limit(limit), Stream.generate(() -> new Random().nextInt(97, 123)).limit(limit))
                .sorted((x, y) -> new Random().nextInt(-1000, 1000)).map(n -> (Character) (char) (int) n)
                .toList();
        System.out.println(temp);```
this works as intended, generating the limit*2 of random letters
#

but after that it's putting a single random char into arrayOfChars

        System.out.println(temp);
        char[] arrayOfChars = new char[limit*2];
        for (int j = 0; j < temp.size(); j++) {
            System.out.println(temp.get(i));
            arrayOfChars[i] = temp.get(i);
            System.out.println(arrayOfChars[i]);
        }```
waxen plinth
ancient jackal
#

to sort

waxen plinth
#

But you're not sorting

#

It looks like you're trying to shuffle

ancient jackal
#

I am sorting

#

sorting randomly

waxen plinth
#

That's not a good shuffle

young knoll
#

(Character) (char) (int) n

ancient jackal
#

it is not I must agree

#

it is very bad I must agree

waxen plinth
#

And I don't see the point of shuffling a string that is already made of random characters

#

Get rid of it

#

And it's filling the array with the same character because you're using i for all the indices and not j

#

But j is your loop variable

ancient jackal
#

ah I see that now

#

it works well now, thank you

waxen plinth
#

If you want to shuffle it (though I'm not sure why you need to) then you should just use Collections.shuffle on the list

ancient jackal
#

I chose torture today so

#

I was fully aware that existed

waxen plinth
#

Never shuffle using sort

young knoll
#

I assume it’s because the list starts with all upper and ends with all lower

waxen plinth
#

It's slower and it's heavily biased

young knoll
#

Or the other way around, idk

twilit wharf
#

I am getting this odd error when trying to access my plugins data folder, [22:05:07 WARN]: java.nio.file.AccessDeniedException: plugins\LobbySystem

waxen plinth
#

Does the folder somehow belong to another user

#

/ is the server being run from a different user

twilit wharf
#

different user?

#

shouldnt be

#

I had a notepad editor open that was editing a file in that folder

#

would that effect it?

waxen plinth
#

Potentially but it shouldn't affect the folder itself

twilit wharf
#

yeah it doesnt

#

hmm

#

wait so

#

I am using Paths.get(LobbySystem.getInstance().getDataFolder().getPath())

#

Would the .getPath() be causing any issues?

ancient jackal
#

probably

twilit wharf
#

I am using File.copy(InputSteam, Path) to save the resource

#

which is why I need the path

ancient jackal
#

for my wordle plugin, I added the word list to my data folder using saveResource("words.txt", true);

twilit wharf
#

oh I forgot that existed

ancient jackal
#

the resource path is where the file is stored beginning from your resources folder

#

and it saves "words.txt" to the plugin's data folder

twilit wharf
#

yeah

ancient jackal
#

then you can get the File with new File(plugin.getDataFolder() + File.separator + "theFile.exe")

#

or something really close to that

twilit wharf
#

yeah

#

I am now getting this error with worldedit, not sure what I means [22:17:38 WARN]: com.sk89q.worldedit.extension.platform.NoCapablePlatformException: No platforms have been registered yet! Please wait until WorldEdit is initialized.

ancient jackal
#

maybe worldedit needs to be a load after dependency

#

maybe

twilit wharf
#

I use world edit api as a command

#

it isnt ran on enable

ancient jackal
#

oh, well I'm not sure about that because I've never depended on worldedit before, sorry

twilit wharf
#

yeah, google wasnt very helpful

tender shard
twilit wharf
#

"conclure help for ping", perfect enlgish

tender shard
#

lol you must be new here

#

sorry I don't know what it's about

#

I just did my usual running gag

twilit wharf
#

I have been in this discord for like 4 months

#

lol

#

not that long I guess

tender shard
twilit wharf
tender shard
#

why?

twilit wharf
#

since world edit says it has loaded

tender shard
#

loaded, okay. but also enabled?

twilit wharf
#

and I am calling on world edit from a command

twilit wharf
tender shard
#

onLoad() != onEnable()

twilit wharf
#

//wand works

tender shard
#

hm

#

okay let's do this:

#

in your command, just add a very stupid System.out.prinlnt("Test yolo");

#

then run your command and ?paste your log

#

I know, sounds stupid, but I bet it'll help

twilit wharf
#

wait actually

#

I might know the issue

tender shard
#

what is it?

twilit wharf
#

I am using the com.sk89q.worldedit:worldedit-CORE:7.2.0-SNAPSHOT, and not com.sk89q.worldedit:worldedit-BUKKIT:7.2.0-SNAPSHOT

twilit wharf
#

that is the gradle dependancy

tender shard
#

in 90% of cases you WANT to access the core thingy

twilit wharf
#

idk if it makes a difference

tender shard
#

of course you'll need both anyway

twilit wharf
#

so add both to my dependancies?

tender shard
#

your gradle file seems to be fine

tender shard
tender shard
#

I gotta know where exactly it thows an error, and what that exact line of code is

twilit wharf
#

sometimes I question my choice of being a programmer

#

it was my gradle

#

and it was the stupidest thing ever

tender shard
#

what was it?

twilit wharf
#

I used implementation and not compileOnly

#

meaning it was making a new instance of worldedit

tender shard
#

tbh I don*'t even knot the difference

#

aaah

#

okay so "implementation" in gradle is probably "compile" in maven

#

gradle is so much more complicated than maven lol

twilit wharf
#

implementation compiles the dependancy into your .jar

tender shard
#

so you probably accidently shaded worldedit into your .jar

#

yeah

twilit wharf
#

and shading isnt built in either

#

you have to get another dependency for that

tender shard
#

uugh

#

but you got it working now? that's the most important thing

twilit wharf
#

but I dont like maven cause it looks like html and I dont like html

tender shard
#

yeah well

tender shard
twilit wharf
#

it is hard to read

#

gradle is simple

tender shard
#

haha

twilit wharf
#

in its looks

#

maybe not usage

tender shard
#

that's like

twilit wharf
tender shard
#

"I have a wive, she looks so simple" and next year she stole your children, house and bank accounts

#

but "she looked so simple"

#

because she didn't <look>like this</look>

#

lol

twilit wharf
#

still aint gonna change my mind

tender shard
#

yeah np lol

#

just wanted to say

twilit wharf
#

I get it lol

tender shard
#

gradle isn't easier just because the syntax is different

#

in fact, and I bet EVERYONE here confirms: gradle is 20% more powerful while beging 230% more complicated

twilit wharf
#

also with WorldEdit, how do I get a SessionOwner object?

tender shard
#

BukkitAdapter or sth I guess

#

depends on the context

twilit wharf
#

ah

tender shard
#

do you already have any EditSession or however it's called?

#

WE 6 or 7?

twilit wharf
#

7

tender shard
#

ok

#

erm not sure, what objects do you already have?

twilit wharf
#

I have to get the World object

tender shard
#

Bukkit world or WE world?

twilit wharf
#

WE World

#

EditSession editSession = WorldEdit.getInstance().getEditSessionFactory().getEditSession(WorldEdit.getInstance().getSessionManager().get((SessionOwner) p).getWorldOverride(), -1)

#

that is what I am currently doing

#

the cast from SessionOwner to Player is invalid

tender shard
#

yeah of course

#

wait

#

you need the WE world

#

from an editsession object

#

right?

#

doesn't EditSession has some kind of getWorld method?!

twilit wharf
#

I need to get a EditSession

tender shard
#

yeah but

#

from whom

#

you need a player

twilit wharf
#

I just need to paste a schematic

twilit wharf
tender shard
#

create a new editsession

#

using a WE world

#

for that you need the BukkitAdapter IIRC

#

it's actually totally easy once you have the correct set of "depedencies" (WE world, player (in this case, probably null), etc)

#

what's the thing you're having tourble with exactly?

#

trouble*

twilit wharf
#

tp

tender shard
#

tp?

twilit wharf
#

I literally cannot spell

#

I meant to say yay

#

it wroks

tender shard
#

oh

twilit wharf
#

ugh

tender shard
#

yeah if it works, that's good lol

twilit wharf
#

it says that there is a invalid block

#

this schematic was made from a .nbt file from like 2012

tender shard
#

who exactly says that "there's an invalid block"

#

console?

twilit wharf
#

ye

tender shard
#

send full message

twilit wharf
#

[22:47:45 WARN]: Unknown block when loading schematic: 64:15. This is most likely a bad schematic.

tender shard
#

aren't there any more lines in the stacktrace?

#

oh

#

yeah

#

your schematic is 10 years old

#

it's almost old enough to have sex

#

there's no chance that WE 7 will be able to load it

twilit wharf
#

it worked tho

tender shard
#

that's like installing some win98 program on windows vista

twilit wharf
#

like

#

99.9999999% of it worked

tender shard
#

hm yeah might be but you'll have to ask on EngineHub's discord for that

young knoll
#

WE 7 can convert legacy schematics

tender shard
#

this is definitely something related do schematics/worldedit itself

twilit wharf
#

idk what block it was

#

the build seems completely intact

#

now that I think about it

young knoll
#

64 is an oak door

twilit wharf
#

this .nbt was once used for a modpack

tender shard
#

if it's :15 it must be some kinda colored block

#

like wool

#

or similar

twilit wharf
#

hmm

young knoll
#

No it’s a door

tender shard
#

a door?!

#

with :15 ?

#

I mean, no idea

young knoll
#

Likely used for rotation

tender shard
#

I only started coding Mc plugins once all those retarded numeric ID's were gone

young knoll
#

And openness

tender shard
#

I always thought X:N, that N was the color

young knoll
#

It’s metadata

tender shard
#

or in general, the type

young knoll
#

It was used for a bunch of stuff

tender shard
#

e.g. 1:1 = stone, 1:2=andesite, etc

#

(just as example)

twilit wharf
#

ok so

young knoll
#

Rotation, color, stone type, slab orientation

twilit wharf
#

I just did a full scan of the build

young knoll
#

Etc

twilit wharf
#

and what I found, was that half of the trap doors were not flipped right, and one door was not there

young knoll
#

Yeah that would be it

twilit wharf
#

how can I fix the trapdoor thing?

young knoll
#

Don’t use legacy schematics

twilit wharf
#

ah

#

I guess

tender shard
#

tbh

#

easy solution

#

paste your schematic in 1.8

#

convert world to 1.18

#

create new schematic

twilit wharf
#

there were like 10 trapdoors

tender shard
#

yeah well

#

then

twilit wharf
#

I can just move them manually, then save it again

tender shard
#

yeah

young knoll
#

Don’t forget the door

twilit wharf
#

ah yeah

#

thanks

#

I appreciate your help

#

means a lot

tender shard
#

:3

#

we don't have anything better to do anyway lol

proud basin
#
``` *Using password: no* even though I am weirdo
tender shard
#

using no password most of the time is the securest option

proud basin
#

this is dumb

tender shard
#

?

#

not really

#

it means you can only authenticate using other methods

#

like sockets

proud basin
#

nah

tender shard
#

yah

proud basin
#

It's authentication is trash

tender shard
#

Iwe should use schematics to authenticate

#

if someone sends a dirt hut = auth denied

#

if someones sends an awesome cathedral = denied

#

but if someone sends the correctly built blackstone cathedral, block by block, = access allowed

#

basically just keyauth with extra steps

quaint mantle
#

Does anyone know what is going on here?

I am getting this error when I compile, it almost seems like a library is missing. Cannot resolve method 'getClickedInventory' in 'InventoryClickEvent'

terse panther
#

Is there a way to change the sky color from the world?

#

Like an API, NMS or something to do it

delicate lynx
#

I found a plugin that seems to work only up 1.17, but the author stated that you can't change it anymore via NMS

#

on 1.17+

worldly ingot
#

Last I recall, getClickedInventory() is a Spigot method

#

Nope, I'm wrong

quaint mantle
ancient jackal
#

I'm wondering why I cna't pass x and y to Comparator's reverseOrder method java Character[] sortedChars = l.stream() .sorted((x, y) -> Comparator.reverseOrder(x, y)) .toArray(new Character[0]);

#

I looked at it and it shows that it uses the object's compareTo method, which the Character class does have

drowsy helm
#

what is l

ancient jackal
#

'reverseOrder()' in 'java.util.Comparator' cannot be applied to '(java.lang.Character, java.lang.Character)

#

l is just a list of type Character

worldly ingot
#

reverseOrder() takes no args. It's the reverse order of natural ordering. Not quite what you want

#

You'll want (x, y) -> -Character.compare(x, y)

ancient jackal
#

ah shoot you're right, I missed that

#

thank you

#

I saw another tab completion that was at least 60% of the same text

worldly ingot
#

Also, I've a feeling toArray() can accept an IntFunction as well, so Character[]::new should work instead of new Character[0]

#

Yes. It can

ancient jackal
#

oh it does, that's neat

ancient jackal
#

which also doesn't work

#

I'm ngl, dealing with characters in a stream is pain to me

#

'comparingInt(java.util.function.ToIntFunction<? super T>)' in 'java.util.Comparator' cannot be applied to '(int, int)'

#

wait

#

I know I see it

worldly ingot
#

I mean if you're hard-set on using Comparator.reverseOrder(), you can just pass that to sorted() afaik

#

It returns a Comparator

ancient jackal
#

yeah I'm still trying to get used to streams with characters, i just did .sorted(Comparator.reverseOrder()) like you said

#

just me making it harder than it is

ancient jackal
#

stupid question

#

instead of for(int i = 0; i < n; i++) {

#

what if for(int i : new int[n]) {

#

🤔

#

in the event index i doesn't matter of course

worn tundra
#

but thatd loop through the contents of an array

#

but it's empty

#

you just define its size

ancient jackal
#

yes but you would iterate n times

worn tundra
#

no?

ancient jackal
#

yes?

#

everything in the for loop would run n times

worn tundra
#

you tried it?

ancient jackal
#

yes

#
        for(int i : new int[30]) {
            String randomizedFileString = insertRandomLineBreaks(randomString(500000), 10000);
            System.out.println(randomizedFileString);
            Writer fr = new FileWriter(f, false);
            fr.write(randomizedFileString);
        }```
worn tundra
#

Why like that tho?

ancient jackal
#

I have no clue but I was dreaming about python's range(int, int)

hasty prawn
#

You probably shouldn't define an array for no reason

ancient jackal
#

you are absolutely right

hasty prawn
#

Still works, but why peepoGiggles

ancient jackal
#

because why not

#

¯_(ツ)_/¯

hasty prawn
#

Can't argue with that

ancient jackal
#

it's like

#

why write for(;;)

#

instead of while(true)

#

except worse because of memory and stuff but that's besides the point

#

or like why write 0x1.0p-53 instead of 1.0

smoky oak
#

is there a better explanation for the EntityDamageByEntity event than 'this field exists' which is about the extent of the javadoc on spigotmc.org ?

#

(i need to know how to modify both the damage before and after applying damage reduction/changes due to armor, potions etc.)

hasty prawn
smoky oak
#

thanks

smoky oak
hasty prawn
#

Oh, then setDamage then. getFinalDamage will return the calculated one

smoky oak
#

hm

#

are all vanilla damage modifications done in terms of multiplying with a double?

hasty prawn
#

What are you trying to do

smoky oak
#

doubling damage in a specific circumstance

hasty prawn
#

Yeah, so just set the damage to getFinalDamage * 2

smoky oak
#

wait, wouldnt that possibly result in a wrong number?

hasty prawn
#

Why would it

smoky oak
#

if they have any armor the FinalDamage is less than the original damage

#

shouldnt it be damage *=2

hasty prawn
#

No because you're not setting a variable

#

So it's just *2

sterile token
#

What would use to make event-deriven system in java (have an event and listen to it)? Would you use Observators? Or is something better?

vocal cloud
#

Register an EventListener -> EventRegistry
Event occurs -> EventRegistry.Registered -> Send the event through each one however you want to

sterile token
#

Because the design pattern I find didnt convince me

#

I was expecting somethimg like spigot ones

#

But didnt find anyone like that

lost matrix
# sterile token Because the design pattern I find didnt convince me

Spigot uses reflections to get methods into their registry.
You need a manager class that contains something like a Map<Class<? extends Event>, List<EventMethod>>
This manager can then be used to dispatch events and register instances of which every annotated method is being registered.

lost matrix
smoky oak
#

thats why i changed the original damage instead

#

also is there yet a way to detect a player jumping outside of PlayerMoveEvent?

#

wait a second

#

is it possible to manipulate a player object asynchrously?

#

urrrgh im not finding anything online

#

is it possible to call runTaskAsynchrously and parse it an event instance