#help-development

1 messages Β· Page 981 of 1

young knoll
#

And with zero height it would be all edge

lilac dagger
#

but a 2d bounding box is quite hard to intersect with

young knoll
#

It’s easy in 2D

lilac dagger
#

unless you mean if it's in x z

lilac vector
#

just use a fucking rectangle 😭

lilac dagger
#

then you can set y from max to - whatever is the min now

lilac vector
#

a 2d bounding box is a fuckin rectangle

flint coyote
#

I only needed the contains function of the three dimensional one so I remade it real quick.

@AllArgsConstructor
public class TwoDimensionalBoundingBox {

    private int minX;
    private int minZ;
    private int maxX;
    private int maxZ;

    public boolean contains(double x, double z) {
        return x >= this.minX && x < this.maxX && z >= this.minZ && z < this.maxZ;
    }
}

Sure I could set Y to 0 but it's called a few dozen times per tick so I need it to be as performant as possible

#

(a few dozen times per tick per player)

young knoll
#

That’s really not much :p

lilac vector
#

if you need it to be as performant as possible you wouldn't make it an object

flint coyote
#

I only create the object once

lilac vector
#

a few dozen times per tick per player

#

which is at max 2000 times

#

thats not much at all by 2016 standards

lilac vector
young knoll
#

The game does a ton of bounding box checks each frame

flint coyote
#

Now it does a few more uwu

lilac vector
#

idk i find it weird how people try to optimise the shit that does not need optimisation at all

flint coyote
#

Why would I not when it's literally 1 minute of effort, and does somewhat improve readability aswell?

lilac vector
#

because now you have more code to maintain

#

compound this over a few more decisions and suddenly 30% of your codebase is unnecessary optimisations

#

while you couldve used the existing apis with 1) more readibility and 2) 0.003% less performance

#

why have a weird ass class named TwoDimensionalBoundingBox with one method when the standard already has a 2 dimensional bounding box which called.. guess what? a rectangle

flint coyote
#

yeah I renamed it to rectangle already. But I'll check if the java rectangle has a contains already

lilac vector
#

it does

flint coyote
#

Well it does if you create a Point. If you call it with x,z it calls a deprecated function that seems kinda overkill to me.

#

Also why are their variables upper case πŸ₯²

lilac dagger
#

due to name collision is my guess

flint coyote
#

Yeah I guessed that, too. But that's horrible D:

quiet ice
#

took me a while to differ between X and x

lilac vector
#

not inside

#

hm

#

contains just calls inside

#

:kek:

flint coyote
#

that's what I said

#

they deprecated inside to rename it to contains and call it internally πŸ’―

lilac vector
#

anyways the point is you should be calling contains which isnt deprecated

#

the renaming is actually a wise decision

#

as inside sounds weird ahh

lilac vector
flint coyote
#

their weird assignments don't seem faster though

lilac vector
#

compilers are an interesting breed

#

i'd bet money that that code was optimised against the bytecode

flint coyote
#

they can't deal with negative coords though

buoyant jasper
#

I have problem a message to player is sent twice instead of one time

#

?paste

undone axleBOT
lilac vector
#

did u even read their code?

buoyant jasper
lilac vector
buoyant jasper
#

You bought Upgrade " + upgradeLevel + " for the Phantom Kit! is showing twice

lilac vector
#

is the player losing the money twice?

buoyant jasper
#

also yes

lilac vector
#

theres your problem

#

processUpgrade is getting called twice

flint coyote
#

oh you can set x,z and width+height seperately. I see

lilac vector
#

the reason of that I can't tell from the code you sent

hazy parrot
#

Show where you call processUpgrade

buoyant jasper
#

?paste

undone axleBOT
buoyant jasper
#

from this method its called

#

i dont know why it shows twice

lilac vector
#

idk how to explain it but checking e.getClick() == ClickType.LEFT_CLICK would prolly fix it

cinder abyss
#

Hello, why some of you prefer Eclipse instead of Intellij? Or, why did you switched to Eclipse?

orchid gazelle
cinder abyss
orchid gazelle
cinder abyss
slender elbow
#

I mean yeah, they're different products, different keybinds, different plugin systems, different build tools interesting, dependency management

quiet ice
slender elbow
#

but in the end it depends on your preference and what you'll like more

quiet ice
#

In my case I cannot live without having like 5 projects open at the same time

quiet ice
#

the only real thing I don't like is that eclipse takes forever to support newer versions of java (still not J22 support :( - although I guess I could also be using bleeding edge versions, so shame on me?) and the fact that it still hasn't sorted out the duplicate @NotNull annotation problem

#

The latter problem annoys me so much that I tried to fix it myself a while ago, only to then not be able to reproduce it. So fate really wants me to stay with these issues

cinder abyss
#

pretty interesting, but then i think that IDEA is better for me then

slender elbow
#

try one for a month or two, then the other one

#

find the one that suits you after getting familiar with them etc

cinder abyss
#

i used eclipse before

quiet ice
#

Eclipse's maven support is quite nice

cinder abyss
#

when i was using a bad pc from 2008

slender elbow
#

TIL hotdogs aren't actually hot dogs

quiet ice
#

From what I have heard is that eclipse's debugger is one of the stronger debugger on the markets. I don't quite trust that but oh well

slender elbow
#

this is the biggest let down in history

#

I really like intellijs debugger

cinder abyss
quiet ice
#

Eclipses debugger could be better. Especially when it comes to obtaining locals while stepping. But I suppose this isn't something I can blame eclipse for

cinder abyss
quiet ice
# cinder abyss what there is more thn IDEA for that?

Well given that IJ doesn't allow opening more than a project, it's kinda irrelevant. But eclipse will automatically resolve inter-project maven dependencies and thus allow you to debug connected maven projects even faster even if they aren't multi-module

trim quest
#

is intellij have project explorer ?

trim quest
#

if its not im not gonna use it

slender elbow
#

what are you talking about

cinder abyss
quiet ice
#

well one module

slender elbow
#

huh

quiet ice
#

But unless you are on macos from what I have heard it does not support it

slender elbow
#

I have literally no clue what you're talking about

cinder abyss
slender elbow
#

modules are gonna come down to your build tool, maven/gradle

#

it most certainly does support that

quiet ice
#

Under IJ I'd be only able to have micromixin and it's subprojects open, but not launcher-micromixin

slender elbow
#

and you can also open multiple projects at the same time

#

not in the same window however, but it's certainly doable

cinder abyss
#

opening the folder containing those

quiet ice
#

Though if you have it in multiple windows, would the class search work? I.e. whatever IJ's Ctrl + Shift + T is

trim quest
#

project explorer is op

slender elbow
#

if you have dependencies set up correctly yes?

quiet ice
slender elbow
#

but module dependencies come down to the build tool

quiet ice
#

The main "problem" I have set myself is that I mix and match gradle and maven a LOT

cinder abyss
#

resolving those correctly

quiet ice
slender elbow
#

why would you not publish it if the build tool needs it to build?

#

for maven/gradle to find the other dependency, from some other unrelated project, it needs to be published to a repo, and that becomes searchable when pulled

#

"fellas, can I use spring without it being on a repo?"

quiet ice
#

Well under eclipse it becomes instantly searchable, which is what I'm going for

cinder abyss
#

I saw that, I laught

quiet ice
#

tbh I usually use the package explorer - but that is only caused by me having only a single multi-module project for quite a very long time

quiet ice
#

okay perhaps janino was the only other multi-module project I have imported into eclipse in the last three years

cinder abyss
#

well, I think IDEA is better for me for now

slender elbow
cinder abyss
#

thanks πŸ˜„

#

good night! x)

slender elbow
#

it would probably get confused if you did the two and there's some version conflict or something

quiet ice
#

Well especially when I am writing something from scratch there is a rather long period (~1 week) where almost all code isn't tested and thus isn't frequently published (only to the extend required for the compiler to not complain about ABI). Once the projects become larger, being able to quickly jump between classes of completely different projects by name is quite useful

smoky anchor
#

Heyo, how can I detect when player start/ends eating an item.
I can use interactEvent to see when player starts eating (tho it is not perfect and "out of box"), but ending is harder

quiet ice
smoky anchor
#

I would rather not have to do this :D

quiet ice
#

I mean for as long as you know when they are still eating you can easily deduce when they have to stop eating

#

if you don't know if they are still eating, uh yeah

hollow oxide
#

if (sender instanceof BlockCommandSender) {
is it possible to catch datapacks senders?

lilac vector
#

How do I unregister an event listener?

eternal oxide
#

don't

#

unless you rteally have to

ionic thicket
#

@sterile axle WEll i had created one without maven and then tried to make it a maven project after learning what it was, (no idea how i got it working). Still dont know to ho fill up test folder

lilac vector
#

i cant just leave em listeners hanging

eternal oxide
#

its a heavy operation registering listeners. You should not register/unregister unless you really have to

sterile axle
#

good luck

ionic thicket
#

ty

lilac vector
#

ic

#

damn i thought registering listeners would be pretty lightweight

#

but I guess it's probably related to reflection or some shit

sullen marlin
#

?xy

undone axleBOT
sullen marlin
#

its slow so that calling them is fast

eternal oxide
#

register a listener and pass it around any code you need to run.

lilac vector
#

alralr

#

thanks

hollow oxide
#

How do I get to a CommandBlockSender using CommandBlock

#
CommandBlock commandBlock = (CommandBlock) cmdWorld.getBlockAt(0, -1, 0).getState();
Bukkit.(blockCommandSender, commandToExecute);
ionic thicket
#

?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 you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

ionic thicket
#

Jar does not contain plugin.yml

hollow oxide
#

what's the content of plugin.yml

ionic thicket
hollow oxide
#

consider using 1.20 in the api version ||maybe the issue but not sure||

#

also

sullen marlin
hollow oxide
#

no no idea

ionic thicket
#

there's only main folder

river oracle
#

you should be pressing the M button on the right hand side of your IDE

#

and pressing package

ionic thicket
#

Build ... build project

river oracle
#

yeah no

sullen marlin
river oracle
#

you're building with intellij

sullen marlin
#

why does intellij make things so complicated

river oracle
#

completely idiotic design

ionic thicket
river oracle
#

πŸ’€

ionic thicket
#

ahahahah

river oracle
#

do you have a pom.xml

hollow oxide
ionic thicket
#

i have pressed the + and selected the src folder

#

then pressed package

#

it did some stuff

#

but still the same error

river oracle
#

do you not have a pom.xml

ionic thicket
#

i do have it

river oracle
#

if you do not have a pom.xml I am not helping

#

okay

#

send me your pom

#

?paste

undone axleBOT
ionic thicket
sullen marlin
ionic thicket
worldly ingot
#

Wants to know if a command is executed by an mcfunction

river oracle
worldly ingot
#

Unsure how those are sent through

#

Feels wrong to say they're server commands and they're most certainly not command blocks

river oracle
ionic thicket
#

not found

#

πŸ’€

river oracle
#

okay you don't have maven on your system

#

an L, but that's okay

ionic thicket
#

what

river oracle
#

send a screenshot of your IDE

#

?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 you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

ionic thicket
hollow oxide
# sullen marlin I dont understand what youre doing

i have done ||kinda took it from internet|| something to preprocess some commands from commands blocks for example having some mathematical operations. (ezylang stuff)

I want to use this in my datapack in my commands

river oracle
ionic thicket
river oracle
#

press package

ionic thicket
river oracle
#

oh I'm stupid

#

lol

#

one second

#

you don't have the compile plugin setup

hollow oxide
river oracle
#

one sec gotta find someone who uses maven forgot how to do this

ionic thicket
river oracle
#

nah your pom is just well

#

shit

ionic thicket
#

xd

river oracle
#

its okay though beginners make shit poms

ionic thicket
#

may it be because of my empty test folder?

river oracle
#

not at all

#

your pom sucks

ionic thicket
#

that's very offensive

#

never heard worst insult

hollow oxide
#

i'm traumatized by poms, it's so hard, i'm now avoiding touching it

hollow oxide
ionic thicket
#

I know i was joking ahah thank you tho

rough ibex
#

all beginners start awful

#

but not all experts finish beautiful

ionic thicket
#

no idea on how to learn this stuff xD

rough ibex
#

experience

hollow oxide
#

practice

rough ibex
#

doing it, keeping at it

#

learning what other people do and why

hollow oxide
sullen marlin
#

I still dont understand what you need to know and why

hollow oxide
#

i have done ||kinda took it from internet|| something to preprocess some commands from commands blocks for example having some mathematical operations. (ezylang stuff)

I want to use this in my datapack in my commands

sullen marlin
#

I dont understand, and stop randomly spoilering please

hollow oxide
#

what don't you understand i'm bad at explaing
ok i'll stop

sullen marlin
#

what event are you using?

#

what code do you have?

river oracle
# ionic thicket no idea on how to learn this stuff xD

First. Change groupId value to whatever your package source is usually me.muteaye3
Second. Change artifactId value to whatever your project name.

Third

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
    </properties>``` Throw this below the groupId and artifactID and version.

This will standardize which java version source is and what you're compiling too. UTF-8 Just standardizes a source Encoding not as important but can cause issues if not set.

 ```xml
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.13.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
``` Put this below your dependencies. This is to define a explicit version of the compiler version just incase the one your project is using is for some reason out of date to a detrement.
hollow oxide
# sullen marlin what code do you have?
@EventHandler(
            priority = EventPriority.MONITOR
    )
    public void onCommandBlockDispatch(ServerCommandEvent e) {
        if (e.getSender() instanceof BlockCommandSender) {
            String cmd = e.getCommand();
            if (cmd.startsWith("/")) {
                cmd = cmd.replaceFirst("/", "");
            }

            if ((cmd.startsWith("minecraft:") && !cmd.contains("$"))||cmd.contains("forloop")) {
                return;
            }

            if (SELECTOR_PATTERN.matcher(cmd).find()) {
                String selector = getSelectorWithArguments(cmd);
                List<Entity> entities = this.mapping.getEntitiesFromSelector(selector, ((BlockCommandSender)e.getSender()).getBlock());
                Iterator var5 = entities.iterator();
                String a= cmd;
                while(var5.hasNext()) {
                    Entity o = (Entity)var5.next();
                    String ent;
                    if (o instanceof Player) {
                        ent = o.getName();
                    }else{
                        ent = o.getUniqueId().toString();}

                    if (cmd.contains("$")){
                        cmd=analyse(cmd,ent,o);
                        if(cmd.contains("Β£")){
                            cmd=calcule(cmd);
                        }
                    }
                    if (o != null) {
                        cmd = cmd.replace(selector, ent);
                    }
                    Bukkit.dispatchCommand(e.getSender(), cmd);
                    cmd=a;
                }
                e.setCancelled(true);}}}```
sullen marlin
#

ok, now what is the issue you are facing

#

and dont cancel events with priority.monitor

hollow oxide
#

i wan't this preprocessing, before the command is actually catched, to be aplied also on commands that comes from datapacks

sullen marlin
#

ok and what is the issue with the code you have?

ionic thicket
#

same stuff as before?

river oracle
#

yep

ionic thicket
#

w8

undone axleBOT
#

Usage: !verify <forums username>

#

This account is already verified!

hollow oxide
sullen marlin
hollow oxide
#

event.getSender()
with ServerCommandEvent event

sullen marlin
#

yes, print it and see what it is

ionic thicket
#

@river oracle Still

#

wait

#

my plugin is not getting updated

#

wait wait wait

#

no ,still

#

[WARNING] JAR will be empty - no content was marked for inclusion!

hollow oxide
river oracle
#

unless specifically otherwise specified

#

specifically any contents in src/main/java

hollow oxide
ionic thicket
sullen marlin
hollow oxide
#

this is when i use it with a command block so it's working perfectly

river oracle
#

he wants it printed out when you send a command with a datapack

#

if the event doesn't trigger via a datapack

#

that's something that should be noted

hollow oxide
#

yup i'm doing that

sullen marlin
#

its clearly coming from a command block

#

sorry I really don't understand what you want

river oracle
#

seems like they want to know when a datapack sends a command?? but again command blocks are iirelevant to that

sullen marlin
#

functions are executed in the context of what executes them, in this case a command block

ionic thicket
#

META-INF

river oracle
#

it should contain all your java files

#

under src/main/java

ionic thicket
#

i did not have a java folder xd πŸ’€

#

i made it

#

still not working

hollow oxide
#

turns out, i'm just dumb srry ;-;

ionic thicket
#

also ide died and its not helping me anymore

river oracle
#

invalidate caches

ionic thicket
#

alr 1 sec

ionic thicket
#

it seems like it cant find any package i made

#

im going insane

livid tundra
#

help how do I cast a generic list to a specific (List<ItemStack>) YamlConfiguration.getList("somehting here")

#

it's giving me classcastexception

river oracle
#

if you're getting a clast cast exception

#

its not of the type you want

livid tundra
#

I know that

#

how do I change it to the type I want

#

wait actually it's not giving me an error, just warning that it's an unchecked cast

glad prawn
livid tundra
#

why

glad prawn
#

? avoid unchecked cast

livid tundra
#

can't I just check it

#

like I have a try catch block right now but it's still giving the warning and also try catch feels wrong

glad prawn
#

how you can know if List<?> is List<ItemStack>

livid tundra
#

It should be a list of itemstacks unless someone edits the yaml because I set it to that, and if it isn't I want to just log an error message

glad prawn
#

you know because you set it, the compiler didnt

livid tundra
#

yeah, so how do I reassure the compiler that I'll log an error message

slender elbow
#

you tell it to shut the fuck up

livid tundra
#

wait actually how do I check if it's a list of itemstacks because I'm not sure if try catch will work

slender elbow
#

(by adding a @SuppressWarnings)

slender elbow
livid tundra
#

is there like a utilty method for that

slender elbow
#

not something super nice and tidy, and what approach you take depends on how you want it to react

#

do you want to ignore/throw away non-ItemStack elements? do you want to error?

livid tundra
#

I just want it to error in the console if it's not a list of itemstacks

slender elbow
#

log error and continue or error and abort?

livid tundra
#

error and abort

#

idealy

slender elbow
livid tundra
#

error and continue is fine

slender elbow
#

with a ClassCastEzceptipn

livid tundra
#

ok, but what's the difference between (List<ItemStack>) YamlConfiguration.getList("somehting here") and that

slender elbow
#

casting like you're showing there doesn't immediately throw

#

you're trusting the source to contain ItemStacks but it may not

#

and at a later time once you pull out an item that isn't, then it's gonna throw

glad prawn
#

My solution will not get unchecked cast like you, because i explicitly providing the type information.

slender elbow
#

and be confusing

livid tundra
#

ok

#

thx

slender sphinx
#

is there an event for breeding attempts not breeding success? i want to make a plugin that basically detects why villager breeding is failing (anger particles)

frosty geyser
#

Hi, currently trying to add 1.20.5 support to a plugin with NMS and whenever I try to view net.minecraft.world.item.ItemStack.class I get // INTERNAL ERROR // in the viewer while on 1.20.4 it works just fine, if anyone can help with that error, it would be great.

If you can't provide support for that, then could anyone tell me how to convert this code from 1.20.4 to 1.20.5:

        CompoundTag compound = new CompoundTag();
        compound = nmsItemStack.save(compound);```

Currently it says:
```Required type: Provider
Provided: CompoundTag```
and since I can't view the class I have no way of telling what exactly I need to convert it all
sullen marlin
#

?xy

undone axleBOT
sullen marlin
#

What are you doing the api cant?

frosty geyser
#

personally not 100% sure since I'm trying to add support to a open source plugin which I'm new at doing, but, in the section it shows:

     * Convert an Item to a Text Compount. Used in Text Component Builders to show
     * items in chat.
     *
     * @category ItemUtils
     * @param itemStack
     * @return
     */

    @Override
    String ItemToTextCompoundString(ItemStack itemStack) {
        // First we convert the item stack into an NMS itemstack
        net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
        CompoundTag compound = new CompoundTag();
        compound = nmsItemStack.save(compound);

        return compound.toString();
    }```
So from what it's saying it's trying to convert a itemstack into an NMS itemstack apparently
sullen marlin
#

@worldly ingot does the chat api support this?

worldly ingot
#

Yeah I think so. You should be able to pass ItemMeta#getAsString() into a hover event

#

(with the item type prepended as well)

#

e.g.

public static HoverEvent createHoverEvent(ItemStack itemStack) {
    String contents = itemStack.getType().getKey().toString();
    if (itemStack.hasItemMeta()) {
        contents += itemStack.getItemMeta().getAsString();
    }

    return new HoverEvent(HoverEvent.Action.SHOW_ITEM, new Item(contents));
}
#

I think that works

#

Would have to use it with a BaseComponent though obviously

frosty geyser
#

Right now I can't even get the spigot api ItemStack into a NMS ItemStack apparently, and the methods now seem to have changed completely from 1.20.4 to 1.20.5 and I currently can't see a way to get it to work

worldly ingot
#

The idea is that you don't need to use NMS at all

slender sphinx
frosty geyser
#

ah

worldly ingot
#

If you just want a string, you can do this:

public static String createHoverEvent(ItemStack itemStack) {
    String string = itemStack.getType().getKey().toString();
    if (itemStack.hasItemMeta()) {
        string += itemStack.getItemMeta().getAsString();
    }
    return string;
}
#

Will get you pretty much 1:1 what that code above does

frosty geyser
#

will it work to 1.16.4 to 1.20.5?

worldly ingot
#

It will work down to whenever ItemMeta#getAsString() was added, but I don't remember when I added that

frosty geyser
#

or should I just replace only the 1.20.5 with the new one

worldly ingot
#

1.18 or something

frosty geyser
#

ah

#

Alright, I'll try this and hopefully it works

#

thank you in advance if it does

worldly ingot
#

Yeah, 1.18.2 it was added

#

Not a bad guess tbh lol

#

Note that there's no guarantee of this for serialization. If you're wanting to serialize/deserialize, use Bukkit's configuration serializable stuff

#

The above snippet also excludes amount, which is a property of the item stack itself, not of the item meta

frosty geyser
#

okay

fringe yew
#

i have two methods that read and write to a yml file below. all the debugging logs i have in them all print correctly with the values they should, but the data.yml file isn't being changed at all. any clue why?

https://paste.md-5.net/ralezaboxa.java

sullen marlin
#

you never save it?

fringe yew
#

erm

#

this is what happens when you get 4 hours of sleep

#

whoops

shadow night
#

Relatable

oblique kettle
#

are there any "safe" ways to get a chunk?

#

I've found my server mysteriously crashing due to some sort of race condition involving chunk generation

sullen marlin
#

getChunk method?

stiff sonnet
#

shit I just noticed that this won't work either. If I wait one tick all blocks are already exploded and I won't know which of the air blocks are new

#

and the set method won't work either since I can't run an event at exactly the end of a tick

native nexus
oblique kettle
eternal oxide
lilac vector
#

is there an event for when you throw an item like an enderpearl or a snowball

rotund ravine
#

Doesn't the projectile event trigger?

sullen marlin
#

ProjectileLaunchEvent

lilac vector
#

perfect thanks

harsh ruin
#

how do I check if the player swaps a item with another? (via cursor or smth)

eternal oxide
#

click event

#

or swap hands event

harsh ruin
#

Same is if I did it in survival

stiff sonnet
#

https://imgur.com/ZKslo9H can somebody explain what's going on here? I'm giving 0.2 credits and it's doing some weird floating point stuff instead. I don't get that with 0.5 credits

eternal oxide
#

you must be dividing somewhere

stiff sonnet
#

I'm literally not

#
if (!_gm.isEdit_Test && tntOwner != null) {
                if (posOwner != null && !posOwner.equals(tntOwner.pc)) {
                    tntOwner.credits += IslandWars.cfg.playerBlockExplodeCredits;
                }
                else if (posOwner == null) {
                    tntOwner.credits += IslandWars.cfg.otherBlockExplodeCredits;
                }
            }

this is the only place where I'm giving the credits

#

ok chat filter wtf

#

bro what is this garbage chat filter

eternal oxide
#

Its a rounding error with floating point precision

stiff sonnet
#

I konw that much

eternal oxide
#

you can use a BigDecimal to fix it

stiff sonnet
#

THIS FILTER

#

this is where I'm showing the notification

sendActionBar(Component.text("+" + amount + " credits (" + this.credits + ")"));
#

what on earth

#

it filters get_Bukkit without the underscore

eternal oxide
#

stop trying to send the same message

#

oh yes

stiff sonnet
#

I'm triyng to show you that there is nothing wrong

stiff sonnet
eternal oxide
#

that is a banned word

stiff sonnet
#

why??

#

it's litearlly a function name in the spigot api

#

taht's genuinely stupid

eternal oxide
#

for one it's illegal to distribute compiled server jars

stiff sonnet
#

isn't the get_Bukkit website official?

eternal oxide
#

no

stiff sonnet
#

what

#

if it is illegal, then why hasn't the website been taken offline yet

eternal oxide
#

Why haven't I won the lottery yet

stiff sonnet
#

what license are you using?

#

GNU goes to court for you if you're using one of their licenses

#

for free

eternal oxide
#

Its not about the Spigot/bukkit license

stiff sonnet
#

it is about the license

#

if the license forbids it

#

that's what code licenses are for

eternal oxide
#

a compiled server jar contains propietary Mojang code.

stiff sonnet
#

then why is get_Bukkit banned if it's not your beer?

shadow night
eternal oxide
#

because its illegal

stiff sonnet
#

the spigot website is equally as illegal then

#

as well as paper

eternal oxide
#

no

stiff sonnet
#

why not, tehy also contain mojang source code

eternal oxide
#

neither distribute compiled server jars

stiff sonnet
#

??????

eternal oxide
#

for Spigot you run BuildTools to get as jar. For the others they compile when run

stiff sonnet
eternal oxide
#

Even paper is not a jar that contains Mojang code

#

it compiles when run

stiff sonnet
#

it's plenty fast then though

#

and why would get_Bukkit not just use the spigot jars directly?

eternal oxide
#

because they don;t care? Ask them

cinder abyss
#

Hello, how can I use yarn mappings for my spigot plugins?

stiff sonnet
stiff sonnet
eternal oxide
#

Magic 8 ball says... Ask later

stiff sonnet
eternal oxide
#

I already told you they are not the same

#

Spigot does not distribute Mojang code

#

get B does

#

a compiled server jar contains Mojang code

shadow night
eternal oxide
#

Which you are not permitted to distribute

tidal kettle
#

hello everytime i restart my server (and not change anything in the plugins), all the List reset. Is it normal?

stiff sonnet
#

well anyway, please fix the stupid chat filter to allow pasting code without being filtered

ivory sleet
tidal kettle
stiff sonnet
cinder abyss
tidal kettle
#

map where i stock the player and somme coordinate

cinder abyss
# ivory sleet Why yarn mappings?

because I want to do something special with yarn mappings, instead of translating a lot of classes from yarn mappings to mojang mappings

shadow night
eternal oxide
shadow night
#

When I write fabric I write in mojmaps

tidal kettle
eternal oxide
#

save/load it

cinder abyss
tidal kettle
stiff sonnet
shadow night
stiff sonnet
#

fabric mods can work like plugins

#

but they generally have a different target audience

tidal kettle
#

do i need to create a another .yml ?

cinder abyss
#

hmmm

stiff sonnet
# cinder abyss hmmm

there's a project called cardboard that combines both fabric and spigot, but the developer apparently stole a lot of code from other projects. Maybe there's a successor to it by now

cinder abyss
stiff sonnet
#

I'm trying to tell you that there are ways to use plugins and fabric mods at the same time to allow you to do what you want to do

shadow night
ivory sleet
cinder abyss
#

maybe it looks stupid

shadow night
#

What in the actual fuck are you doing

cinder abyss
ivory sleet
cinder abyss
#

I didn't start

shadow night
#

Explain

cinder abyss
#

translate server-side fabric mods easily in spigot

shadow night
#

well

#

Sounds like you got a bit of a problem

eternal oxide
#

?mappings

undone axleBOT
eternal oxide
#

thats about as far as you'll get

#

you'd have to load the mods in your own plugin

ivory sleet
shadow night
cinder abyss
#

so I would need to translate fabric also

ivory sleet
#

u mean fabric api?

cinder abyss
eternal oxide
#

You can implement fabric API

#

in your plugin

#

it would be a nightmare though

shadow night
#

Well, it sounds like whatever you do you'll end up with a megabyte of code and a custom classloader

mellow snow
#

soo, none know how to do something like this?

eternal oxide
#

mods

tardy delta
#

ngl, looks chaotic

mellow snow
glad prawn
#

you talking about that tab? then TAB

mellow snow
#

TAB can't modify the players section

eternal oxide
#

Tab, Action bar, I forget teh middle one, Scoreboard, and probably cleaverly placed Displays

glad prawn
mellow snow
#

wait

#

is this?

glad prawn
#

first time?

eternal oxide
#

Its called CustomTab

mellow snow
#

I don't think tab can do this

glad prawn
#

yo

eternal oxide
#

yeah, I didn;t check the link

lilac vector
#

why is EventPriority.LOWEST called first

#

it ameks no sense

tardy delta
#

so events with a higher priority can override the effects it caused

lilac vector
#

ah

thorny vine
glad prawn
valid burrow
#

the priority describes what event will stand above the others/overide

#

and not when its called

faint swift
#

Hi I m trying to use this packet:

#

But it is giving this error

#

Anyone that tried to use this packet ?

chrome beacon
#

Why are you using unmapped

median bronze
#

anyone know if citizens api could be used to forcefully keep a singular chunk loaded?

#

would rather do that than use nms

chrome beacon
#

Just use the Spigot API?

quaint mantle
#

How can i give strength effect to a player?

#

PotionEffectType.INCREASE_DAMAGE this, right?

buoyant jasper
#

i have problem with tab complete in game commands

#

console shows this
com.earth2me.essentials.Essentials.onTabComplete(Essentials.java:641) ~[?:?]at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:141) ~[spigot-api-1.20.5-R0.1-SNAPSHOT.jar:?]... 25 more

tight compass
#

Is there any case when you break a block that a registered BlockBreakEvent method isn't called?

#

Could the canecllation of another event prevent it implicitly from being called?

faint swift
river oracle
undone axleBOT
river oracle
#

Opps

#

?mojmapa

#

?remapping

#

I'm losing it

#

?nms

slender elbow
#

?y2k

river oracle
#

@faint swift ^ sorry I'm fucking losing my mind

slender elbow
#

bros gonna be the next joker

river oracle
#

Can't wait to watch everything burn

faint swift
#

So I have to use Mojang code to packets if I want to see the code mapped?

river oracle
#

No?

river oracle
# faint swift So I have to use Mojang code to packets if I want to see the code mapped?

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of β€œ1.20.4” with the version you actually use. What are...

faint swift
#

I am so stupid ong

proud badge
#

Does anyone know a library to view/modify the inventory of an offlineplayer?

junior cradle
#

Who knows how to connect a mixin to your plugin and how to work with it?

autumn bloom
worldly ingot
worldly ingot
#

Shouldn't be. Unless you're on 1.20.5 and it's a bug, but it would be a very, very, very niche bug that nobody's caught yet

#

The more likely scenario is that you either don't have an @EventHandler annotation on your listener or you haven't actually registered it

tight compass
#

Could the canecllation of another event prevent it implicitly from being called?

worldly ingot
#

If you have ignoreCancelled set to true, yes

eternal night
#

only if you defined `ignore-

worldly ingot
#

get out slo-poke >:(

eternal night
tight compass
#

When you cancel PlayerLoginEvent, is there a PlayerJoinEvent called for the same player?

eternal night
#

Well if the player cannot login..

worldly ingot
#

It's not cancellable but you can prevent them from logging in in that event, in which case, no

tight compass
#

Wait is that even cancellable

#

yea okay

worldly ingot
#

disallow() instead

tight compass
#

I was asking if another event entirely, not multiple @EventHandlers for a BlockBreakEvent.

#

The example I was going to provide is similar to the disallow behvaior between PlayerLoginEvent and PlayerJoinEvent. If there's another event that when cancelled, then refutes the call for BlockBreakEvent

proud badge
quaint mantle
#

any devs that wanna develop plugins voluntary please dm

misty garden
#

Hi, there,
I'm making a plugin, where I have to get the name of my HOPPER, except that when I put my block it doesn't work any idea where it comes from?

    private static Core core;

    @EventHandler
    public void onPlayerInteract(BlockPlaceEvent event) {
        Player player = event.getPlayer();
        Block placedBlock = event.getBlockPlaced();
        String blockname = event.getBlockPlaced().getType().toString();


        if (placedBlock.getType().toString().equalsIgnoreCase("HOPPER")) {
            if (blockname.equalsIgnoreCase(core.getInstance().getConfig().getString("items.foreuse.name"))) {
                player.sendMessage("Β§6Vous avez posΓ© une Foreuse !");
            }
        }

    }
}```java
worldly ingot
tight compass
#

Isnt that stored in the world files?

worldly ingot
#

Yes, but we have methods that interact with those files. Statistics, location, etc.

tight compass
#

playerdata?

#

Okay

#

Now you got me curious

#

Would make sense if you could just have a util to read their inventory

sage patio
#

does player.hidePlayer(anotherPlayer) still work in 1.20.4+?

worldly ingot
#

Yes

sage patio
#

tnq, idk why its not working for me

worldly ingot
#

Are you using it wrong? :p

sage patio
#

for sure yea

#

trying to figure out where is the problem

young knoll
tight compass
#

Time to fork your own spigot

worldly ingot
# misty garden Hi, there, I'm making a plugin, where I have to get the name of my HOPPER, exce...

I don't think this snippet is doing what you want it to do. Are you trying to check the name of the hopper block? Because that's not what you're doing

@EventHandler
private void onPlaceHopper(BlockPlaceEvent event) {
    Player player = event.getPlayer();
    Block block = event.getBlockPlaced();

    if (block.getType() != Material.HOPPER) {
        return;
    }

    String expectedName = core.getInstance().getConfig().getString("items.foruse.name");
    Hopper hopper = (Hopper) block.getState(); // org.bukkit.block.Hopper
    if (expectedName.equals(hopper.getCustomName())) {
        // The hopper has a name, this is probably what you want
    }
}```
worldly ingot
hot dune
worldly ingot
#

I think it's pretty much up to date, but the commands might not be. Though for commands, it's just going to be minecraft.command.<command> or bukkit.command.<command>, depending on whether it was added by Minecraft or Bukkit

#

e.g. bukkit.command.plugins, vs minecraft.command.give

tight compass
hot dune
#

okay, thx, I thought so lol, but had to ask for to clarify ;p

misty garden
#

tu parle franΓ§ais ?

worldly ingot
#

I do but I keep it English so others can join in and help as well. I'm unsure what the alternative would be for 1.8

#

It's like a 9 year old version or something

misty garden
quaint mantle
#

Does #.getClickedBlock exist?

worldly ingot
#

In PlayerInteractEvent, yes

quaint mantle
#

Choco do you have any cool armorstand ideas?

#

(Should be beginner friendly)

slender elbow
#

oh my god HIDE_POTION_EFFECTS was renamed to HIDE_ADDITIONAL_TOOLTIP

#

the benevolence

#

beyond reason

placid anvil
#

So im trying making a plugin that makes it possible to plant sugar cane on mud without water. So i have come so far to have the base down. Im able to plant sugar cane without water only on mud blocks, but when it grows it get destroyed. How can i make it so it doesent get destroyed when growing on a mud block without water?

covert pond
#

?paste

undone axleBOT
covert pond
#

https://paste.md-5.net/tidinusoha.java
im getting cannot reslove player
public void determineTeamAndTeleport(Player player)
and its stating that there shuld be a simicolen before (Plyer player)

kind hatch
#

Missing brace.

covert pond
#

ah i see it. thanks

#

that fix it. thank you. it would have taken me awhile to catch that

#

Implicitly declared classes are not supported at language level '8' is what im getting now for the rest of the code on the bottom portion

#
  private Location findClosestSpawn(Location location, List<Location> spawnLocations) {
        double minDistance = Double.MAX_VALUE;
        Location closestSpawn = null;
        for (Location spawn : spawnLocations) {
            double distance = location.distanceSquared(spawn);
            if (distance < minDistance) {
                minDistance = distance;
                closestSpawn = spawn;
            }
        }
        return closestSpawn;
    }

    private void teleportToSpawn(Player player, Location spawnLocation) {

    }

    private void loadSpawnLocations() {
    }

    private boolean isTeamsFull() {
        return false;
    }

    private void determineTeamAndTeleport(Player player) {

    }
}```
#

this portion is stating that error

quaint mantle
#

hi i have a question why spigot 1.19.4 has less space?
i mean spigot 1.19.4 is 41kb
but spigot 1.16.5 is 50kb
will there be a loss in features?

placid anvil
#

?paste

undone axleBOT
placid anvil
#

https://paste.md-5.net/tahijivuxu.java
So im trying making a plugin that makes it possible to plant sugar cane on mud without water. So i have come so far to have the base down. Im able to plant sugar cane without water only on mud blocks, but when it grows it get destroyed. How can i make it so it doesent get destroyed when growing on a mud block without water?

quaint mantle
#

and add block yourself

#

i mean

#

when sugarcane will grow

#

cancel event

#

and get sugarcane up

#

and add 1 more suger cane

faint swift
#

So I found the problem these error:

#

The cause is when I send the packet to add a new player

#

The latency is null

#

What makes sense because i m creating a npc

compact haven
#

is there no way to differentiate between a Creeper, Fireball, and TnT explosion?

eternal night
#

I mean, depends?

#

in what context

compact haven
#

in BlockExplodeEvent

#

πŸ˜”

eternal night
#

BlockExplodeEvent isn't going to be called for any of those

compact haven
#

oh nice

eternal night
#

those are all entities

compact haven
#

that's right

#

so EntityExplodeEvent or similar?

#

then I can match the provided Entity what

modern plank
#

Is it possible to write a bytebuf directly onto the pipeline without it going through the encoder? I wanna write a bytebuf where the red arrow is pointing. By default doing channel.writeAndFlush() will write it to where the purple arrow is

placid anvil
soft spire
#

Is there a way to change a motd through java? I'm a developer at heart so I always want to change stuff through scripts. I don't want to do it through server.properties

soft spire
placid anvil
quaint mantle
#

oh

#

i can't upload pictures

lilac vector
#

It seems like symlinks on macos doesn't work
Does anyone know how I can automatically move the plugin file into the local server's plugins folder

blazing ocean
quaint mantle
blazing ocean
#

use random tick speed i guess

trail coral
#

how do i remove the glow effect on enchanted armor usign nms? i know for a fact its possible

#

without removing the enchants

lilac vector
#

hm

#

i'm not sure if you can even use random tick speed

placid anvil
trail coral
#

nah man

#

a lot of things run every tick on a server

#

it wont affect anything

lilac vector
#

are you sure that is the cause of lag tho

placid anvil
#

yeah but how could i target it like my server is inputting this
Can't keep up! Is the server overloaded? Running 61296ms or 1225 ticks behind

lilac vector
#

damn

#

sugar cane isnt your only problem clearly

placid anvil
#

Yeah if i remove the part it doesent lag

soft spire
lilac vector
#

Hm

#

okay ic

#

lemme read the code rq

#

oh

#

what the fu-

#

Okay so so so so

#

you cna do the following

  • split the work into multiple ticks
  • cache the locations of the sugar cane
blazing ocean
#

use ServerListPingEvent if you want spigot

lilac vector
#

and you'll be wrong if you guessed yes

soft spire
#

Okay, thanks

soft spire
lilac vector
#

though a few things.
at start up you obviously want to fill that set, this part doesn't matter that it's slow since startup doesn't matter much

#

plus, I'd make it so the set assumes that the mud block has a sugar cane above it

hasty obsidian
#

hi guys

#

i'd need help for nuvotifier plugin

hasty obsidian
#

it's been 2 hours and a half and i cant understand this fucking error (i already allowed it using "ufw allow 25565")

16:16:04 ERROR]: [null] Votifier was not able to bind to /45.91.92.107:25565
com.vexsoftware.votifier.io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Cannot assign requested address

#

cant find nothing useful on the internet

#

no firewall blocking it since it works fine for my other server

#

already updated the plugin

#

wtf is going on here

lilac vector
lilac vector
#

tho you forgot ot check if the mud block actually has a sugar cane above it

remote swallow
compact haven
remote swallow
#

iirc yes

hasty obsidian
compact haven
#

if I want to modify the explosion block list, can I just mutate blockList() on LOWEST then cancel on MONITOR and break the blocks manually?

#

or if I mutate it does it already do that effectively

#

like does the implementation respect changes to blockList, not just allow them

remote swallow
#

ig it respects it but not entirely sure

lilac vector
#

yeah

compact haven
#

ight heads up, it seems it does respect it (at least for dragons)

blazing ocean
#

is there a thing such as PDCs for items

compact haven
#

yeah

placid anvil
# lilac vector yeah

so i added everything no lag and anything the only problem is that it just breaks when it grows

remote swallow
icy beacon
compact haven
#

through their ItemMeta you can call getPersistentDataContainer

blazing ocean
#

oh im blind

placid anvil
#

just destroys

lilac vector
#

destroys?

placid anvil
#

wait it send viodeo

blazing ocean
#

intellij this is not reformatting

lilac vector
#

jesus christ waht is that if statement

clear elm
#
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerRespawnEvent;
public class PlayerDeath implements Listener {
    @EventHandler
    public void onDeath(PlayerRespawnEvent e){
            Player p = e.getPlayer();
            FileConfiguration cfg = PracCore.getPlugin().getConfig();
            String worldStr = cfg.getString("spawn." + ".world");
            World world = Bukkit.getServer().getWorld(worldStr);
            double x = cfg.getDouble("spawn." + ".x");
            double y = cfg.getDouble("spawn." + ".y");
            double z = cfg.getDouble("spawn." + ".z");
            Location spawn = new Location(world, x, y, z);
            p.teleport(spawn);
            Location yaw = p.getLocation();
            yaw.setYaw(90);
            p.teleport(yaw);
        }
    }
#

why does this not work

lilac vector
#

you didnt register the event

clear elm
#

i did

blazing ocean
#

is there an event for when a player offhands an item

kind hatch
#

Might have to delay by a tick

clear elm
blazing ocean
#

?scheduling

undone axleBOT
kind hatch
blazing ocean
#

jesus that's a mouthful

placid anvil
lilac vector
#

sure

kind hatch
#

?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 you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

lilac vector
#

--
question,
when am I supposed to return false and when am i supposed to return true in CommandExecutor#onCommand

young knoll
#

false shows the usage message

#

true does not

lilac vector
#

ah

#

alright

#

thanks

placid anvil
#

i have sent the video

lilac vector
#

HoverEvent is apparently deprecated the way I use it

#

I need some sort of Content thingie but it's an abstract class

river oracle
#

look at the docs

#

?jds

#

?jd-s

undone axleBOT
river oracle
#

god Bungeechat docs aren't bundled with spigot

#

fml

lilac vector
#

Ah nevermind found it

lilac vector
#

apparently it's from Text

river oracle
#

Entity, Item, Text

lilac vector
#

Item? interesting

tardy delta
blazing ocean
#

yeah i changed it up again

proud badge
#

What is the best java library for reading NBT files?

covert pond
#

im keep getting this error even tho there is no errors in the editor

java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "org.scott.mcpaintball.Mc_paintball.getCommand(String)" is null
        at org.scott.mcpaintball.Mc_paintball.onEnable(Mc_paintball.java:30) ~[mc-paintball.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[paper-1.20.4.jar:git-Paper-496]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-496]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.4.jar:git-Paper-496]
        at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.4.jar:git-Paper-496]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671) ~[paper-1.20.4.jar:git-Paper-496]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.20.4.jar:git-Paper-496]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:309) ~[paper-1.20.4.jar:git-Paper-496]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-496]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-496]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]```
proud badge
covert pond
#
  startgame:
    description: Start the paintball game
    usage: /startgame
  endgame:
    description: end the paintball game
    usage: /endgame
    commandlist:
      description: Lists all commands
    Usage: /commandlist
  setredspawn:
    description: sets red team location
    usage: /setredspawn
  setgreenspawn:
    description: sets green team location
    usage: /setgreenspawn







permissions:
  Mc_paintball.admin:
    description: Allows access to admin commands
    default: op```
#

oh i see it now

#

there was a captial U

#

and some of the things wasnt in the right spot

sterile token
#

Helloo, today im inspirated and i want to learn about how to correctly design an event-driven api. Those apis which are designed for creating events and listening to them. I seen them as a really important phase of code developing because most of the time you want to listen to own events not only from Spigot, in general development is more common
I would be really thankfull if you can help me linking to documentation or tutorial that you really recommend. Or you think or used to learn from them

lilac vector
#

Guys how do I disable DAMAGE_INDICATOR particles from getting through to the player?

#

It causes lag on the client when big boi damage

#

I had some code that made it work but it relies on protocollib and i'd rather not have that

#
        ProtocolLibrary.getProtocolManager().addPacketListener(new PacketAdapter(this.plugin, ListenerPriority.HIGHEST, PacketType.Play.Server.WORLD_PARTICLES) {

            @Override
            public void onPacketSending(final PacketEvent event) {
                final PacketContainer packet = event.getPacket();
                if (packet.getNewParticles().read(0).getParticle() != Particle.DAMAGE_INDICATOR) {
                    return;
                }
                event.setCancelled(true);
            }

        });```
floral drum
#

why would you rather not have that?

#

just curious

lilac vector
floral drum
#

Well really the only way to do it is to listen to packets, there is a thing called "PacketEvents" I'm pretty sure if you want to try use that instead

hazy parrot
# sterile token Helloo, today im inspirated and i want to learn about how to correctly design an...

In software design and engineering, the observer pattern is a software design pattern in which an object, named the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods.
It is often used for implementing distributed event-handling systems in e...

lilac vector
#

which makes sense

#

but how do you even hook into nms events

#

lemme see

floral drum
#

huh?

lilac vector
#

Ohh#

sterile token
floral drum
#

You can also shade it into your plugin, basically not needing to have an external plugin/api @lilac vector

lilac vector
#

icic

#

thank u

hazy parrot
sterile token
hazy parrot
icy beacon
#

wtf

sterile token
icy beacon
#

I swear I've never seen you have nitro

sterile token
#

You have paid 2y of nitro which is equipvalent to a cpu lmao, $200 brother thats a lot haha πŸ˜‚

#

1/3 of my country minium wage paid

hazy parrot
ivory sleet
#

Yup

sterile token
ivory sleet
#

I think the idea was to have it singletonic to each concrete event class

#

and then for an event instance you’d still be able to get the handler singleton instance with the instance method getHandlers()

sterile token
#

oh okay, thats right. I know this not paper, but have you seen their system? The one they do it with lambda expressions not sure if its from paper but i seen it in Luckperms and many others plugins

ivory sleet
#

Yes I know what you’re talking about

sterile token
#

right now i cant remember the library name but we talking the samne thing atleast haha

ivory sleet
#

You have to remember bukkit’s event system is VERY OLD

#

it was at the time when coding conventions weren’t as β€œagreed upon” as it is today

sterile token
ivory sleet
#

Yea

#

I think even if md5 had the chance to change it without causing any compatibility issues he wouldve done so

#

But yeah, when an api reflects a static design, it becomes extremely hard to change it in the future

sterile token
#

right, so would you use the one i talked about? Im looking more like an event driven system which work in any platform without issues not mattering if the plugin is run on spigot nor bungee for saying some examples

ivory sleet
#

i think fabric has a nice event system

#

So does kyori

river oracle
#

subswibe UwU

ivory sleet
#

there are some good libraries u may wna checkout verano

ivory sleet
sterile token
#

right thaks Conclure

#

i would have to give a deeper check thru github

#

idk why but i seem that github capability is reduced, their finding system used to be more precise time ago

river oracle
river oracle
#

google is like dying to AI

ivory sleet
#

Dont they use ai nowadays in their engine?

river oracle
#

their is so much AI content now googles AI is simply struggling to find anything deecnt

sterile token
# river oracle google is like dying to AI

yeah lmao, totally agree. I find even faster to search with Ai rather google, not because gives you all info directly without having to resoome it bu hand. If not by the posibility of not having to read thru pages and pages to not found something

river oracle
#

you misinterpret what I say kek

proud badge
#

what is the purpose of buildtools

river oracle
#

googles results are literally get shit on because of the amount of AI content

sterile token
river oracle
ivory sleet
proud badge
sterile token
ivory sleet
river oracle
pseudo hazel
sterile token
ivory sleet
#

:)

river oracle
#

if you've been obtaining it otherways you better hope and pray your ass didn't download malware

sterile token
river oracle
#

you're joking right

proud badge
#

nope

#

add spigot to build.gradle dependency

river oracle
#

yeah I'm done

proud badge
#

Done, why do I need buildtools?

sterile token
#

why dont you use Graven is the best building tool 🀣

worthy yarrow
#

^

river oracle
#

how else do you get the server jar???

worthy yarrow
#

Graven for the ogs

river oracle
#

why tf would I clone spigot

proud badge
river oracle
#

and open the project

proud badge
#

oh you mean compile spigot source code?

#

and not a plugin?

river oracle
worthy yarrow
#

You've been installing a pirated jar

river oracle
#

MD_5 says this every update πŸ‘ why can no one read!

worthy yarrow
#

Sue em

sterile token
#

the site where you download spigot jar builtin all those are illegals

river oracle
#

I stg reading is a dying art

worthy yarrow
#

^^^

#

What's reading

icy beacon
#

not only related to coding

quaint mantle
#
    public void onTab(PlayerCommandSendEvent e) {
        e.getCommands().clear();
    }```

this event clear player command list or tab completer ?
river oracle
#

do people like not read for fun or informational content anymore??

#

?jd-s

undone axleBOT
ivory sleet
#

Tiktok attention span

icy beacon
worthy yarrow
sterile token
#

who else over think that? haha

river oracle
static hill
#

just a quick question what jdk version should i use when making a plugin on a 1.8.9 server?

worthy yarrow
river oracle
ivory sleet
worthy yarrow
#

Reading is dead, long live reading 😦

sterile token
#

if we continues creating IA we will have more usesless people as we already have in the world percentage - Thats the whole truth tho

worthy yarrow
quaint mantle
#

πŸ˜„

#

tab completers not working but commands working πŸ˜„

sterile token
quaint mantle
sterile token
#

yeah

quaint mantle
#

i did this not worked @EventHandler public void onTab(TabCompleteEvent e) { e.getCompletions().clear(); }

sterile token
#

Just create a config list with bocked cmds and then loop over it, if the command is there cancel the event

quaint mantle
#

actually i cancel the event

#

not worked

#

i will try again

sterile token
#

how do you cancel it?

quaint mantle
#

@EventHandler
public void onTab(TabCompleteEvent e) {
e.getCompletions().clear();
e.setCancelled(true);
}

sterile token
#

okay, did you register your listener in main plugin class ΒΏ?

proud badge
#

how would I "run buildtools" with these? I ran buildtools now I see this screen, how do I add these lines to it

young knoll
#

Select those versions

quaint mantle
#

my other event working

young knoll
#

The compile flags are in options

#

Or just run it from command line

quaint mantle
#

i will try to add debug

proud badge
icy beacon
#

anywhere

#

preferably have a separate folder for buildtools though

#

so that you can store its stuff there

proud badge
#

should I run all of those lines or just the 1.20.4 one

worthy yarrow
#

it generates like 30k files lol

icy beacon
#

the project you're working on seems to support 1.8.8 through 1.20.5 AND use nms, so they probably do some multi moduling stuff

proud badge
#

I got a buildtools.exe when downloading, how do I get a jar?

icy beacon
#

hence they need all of them

#

?bt for me

undone axleBOT
sterile token
icy beacon
#

he can't just recode the plugin to not use nms

#

that would probably be quite some coding

sterile token
icy beacon
acoustic pendant
#

is nms needed for creating a custom mob?

sterile token
icy beacon
#

i'm also not native, don't worry, you're doing good, the more you speak english the better you get at it obv

icy beacon
#

e.g. if you want custom pathfinding then yes, if you just want it to have different attribute values and health then no

acoustic pendant
proud badge
#

damn how long does this take? to install craftbook

icy beacon
#

sorry, i have only done pathfinding once so i barely know anything about it

proud badge
#

it

acoustic pendant
#

uh

icy beacon
acoustic pendant
#

np

robust pebble
#

is there a tutorial on how to use offline manager api in ur plugins

icy beacon
#

you can go for a walk and have dinner in the meantime

proud badge
#

ok I'll only do 1.20.4 as thats the only version I need

icy beacon
icy beacon
#

you'll have to strip out the lower versions

#

then it will

proud badge
#

ok which file I could I modify to strip those out

sterile token
icy beacon
#

do some investigation

proud badge
#

ok

icy beacon
#

it's probably not a single file but multiple

sterile token
#

path finding what its? Its like the ray trace from games engines

icy beacon
proud badge
#

how much GB does craftbukkit 1.20.4 take up?