#help-development

1 messages · Page 2242 of 1

misty current
#

but in this case i could use it

hybrid spoke
#

faster

#

performance goes brrr

tardy delta
#

write clean code lol

#

your mom goes brr too

hybrid spoke
#

fuck clean code

#

performance!!

misty current
#

the performance is negligible

hybrid spoke
#

woah.

hybrid spoke
humble tulip
#

If args.length ==1

tardy delta
#

we will run a spigot plugin for a rocket

misty current
#

this is the sole reason why im used to make enhanced for

humble tulip
tardy delta
#

fuck the rockets

humble tulip
#

It's stuff they send without humans that they care abt 100% performance

#

Like probes etc

limpid bronze
#

But you don't specify any damage or you do ore.getAsBlock().getBreakSpeed(player)

misty current
#

the damage is based on the pickaxe i'm holding

#

i have an nbt tag with the mining speed

#

and an enum with all the ore types and their health

tardy delta
#

fuck the pickaxe

misty current
#

when i create a cosmicore object from a block, i set the health based on the enum constant representing that ore

#

and each tick i subtract from its health the damage a player does

#

based on the pickaxe

misty current
small current
#

how can i activate end exit portal without killing any dragon

snow sluice
#

im trying to use inventoryframework but im getting an error and i dont know how to fix it

tardy delta
#

shade it i guess

snow sluice
#

how do i do that

worldly ingot
#

I literally don't even know why you're listening to a packet for this

#

That's the whole purpose of BlockBreakEvent lol

tardy delta
#

uhh

worldly ingot
#

There's also an event for when a player starts breaking a block iirc

earnest forum
#

block damage event

misty current
#

what about when they stop

limpid bronze
misty current
#

that'd up to you to decide how u wanna implement it

worldly ingot
#

There is a stop one as well

wary harness
#

does this has any logic to you guys

misty current
#

i stored the damage in the nbt

small current
#

how can i activate end exit portal without killing any dragon

limpid bronze
wary harness
#

my max ram is 4gb and guy is saying my server is spiking up to 6gb

tardy delta
#
 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <relocations>
                        <relocation>
                            <pattern>co.aikar.commands</pattern>
                            <shadedPattern>me.fourteendoggo.xkingdoms.acf</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>co.aikar.locales</pattern>
                            <shadedPattern>me.fourteendoggo.xkingdoms.locales</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>``` add this under your <build><plugins> in your pom, pattern is the package of the stuff you want to shade @snow sluice
misty current
#

aight i'll change it later

#

thanks

snow sluice
#

im using gradle does that change anything?

tardy delta
#

oh god

#

idk for gradle

limpid bronze
reef lagoon
#
            TextComponent component = new TextComponent();
            component.setText(event.getMessage());
            component.setText(component.getText().replace("[item]", "["+name + ChatColor.GRAY + " x" + tool.getAmount()+ChatColor.RESET + " ]"));
            component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("text").create()));

            event.setMessage(component.toLegacyText());```
this works fine, except the hover event part which just doesnt work (nothing when hovering)
no errors in console or anything
anyone knows how to fix it
snow sluice
#

ah okay ill try to figure it out

snow sluice
#

ty

misty current
#

my system ignores enchants and potions

mortal hare
#

im wondering how NMS executes packet handling on the main thread

#

if netty's IO handlers are async

#

there should be a method

#

where they pass a runnable to execute in main thread

#

but i cant find it

limpid bronze
# misty current my system ignores enchants and potions

Okay, I think I will do with Block#getBreakSpeed() (i need that it depends on potion effect/enchants ect...)
And where do you display the breaking animation, i guess it's depending on the health of your ComsicOre object

valid sorrel
#

can I read the console somehow

humble tulip
#

Starting my laptop

chrome beacon
#

It's in the Server class

chrome beacon
valid sorrel
humble tulip
#

Why do u need to do that?

reef lagoon
valid sorrel
#

making a plugin that can send console output over websocket

humble tulip
#

Ah

#

I'm not sure how it's done but you'll have to use a custom logger that sends stuff before it logs

chrome beacon
tardy delta
reef lagoon
#

"Required type: string"

humble tulip
#

Ah ok

humble tulip
chrome beacon
valid sorrel
#

something like this?

tardy delta
#

dunno exactly

#

i guess just redirect the logrecord over your socket

chrome beacon
#

execute works to but executeIfPossible makes sure server isn't stopping

mortal hare
# chrome beacon MinecraftServer.execute or smth like that

yea, but according to my research that packet handling is so weird and bizzare... They execute packet handling on the main thread with PacketUtils.ensureMainThread() method which throws RunningOnDifferentThreadException exception when code is not executed on main thread, which gets caught and nothing done with it inside Connection#channelRead0() method

#

it feels like NMS is built on twig foundations

chrome beacon
#

It feels like Mojang has too tight deadlines they're forced to push update after update without patching or improving already existing code

#

They really shouldn't promise an update every 6 months and focus on improving things instead 🙃

valid sorrel
#

it simply does nothing

mortal hare
#

If im correct the code prevents execution if its on netty io thread, and reruns the packet handling code on the main thread via #Server.executeIfPossible()

    public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
        if (!engine.isSameThread()) {
            engine.executeIfPossible(() -> {
                packetProcessing.push(listener); // Paper - detailed watchdog information
                try { // Paper - detailed watchdog information
                if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerGamePacketListenerImpl && ((ServerGamePacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590
                if (listener.getConnection().isConnected()) {
                    co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
                    try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
                        packet.handle(listener);
                    } catch (Exception exception) {
#

am I correct @chrome beacon

worldly ingot
#

Thread synchronization is a nightmare. Handling that all on the main thread is the smartest thing to do

#

Imagine all the possible race conditions otherwise handling thousands of packets every second

mortal hare
#

yep

#

Thread synchronization is nightmare especially with NMS

#

if you have architecture design with concurrency in mind

#

its not that bad

worldly ingot
#

Right but nobody truly does because you need a very, very specific design pattern

valid sorrel
#

Read console output

mortal hare
#

what's the difference between #Server.scheduleOnSync() and #Server.executeIfPossible() will the first one schedule it at the next tick?

reef lagoon
chrome beacon
#

Yeah

#

Something like that

reef lagoon
#

then god fucking dammit

#

is there really not a way to set the message

sage patio
#

is this code ok for adding 1 level to protection? its not working

humble tulip
mortal hare
#

this is paper method

#

probs

#

scheduleOnMain

#

not onSync

#

but yea

#

its paper

#

method

humble tulip
#

I'm looking at paper

#

I also don't see that

#

Looking in minecraftserver and dedicatedserver

mortal hare
#
    // Paper start
    public void scheduleOnMain(Runnable r0) {
        // postToMainThread does not work the same as older versions of mc
        // This method is actually used to create a TickTask, which can then be posted onto main
        this.tell(this.wrapRunnable(r0));
    }
    // Paper end
#

BlockableEventLoop

humble tulip
#

Oh

mortal hare
#

which Server extends

humble tulip
#

Ah i see what t

#

It*

earnest forum
#

yeah

eternal night
#

you need to double escape

#

beyond that, could just use single quotes

#

'"'

neat maple
#

when I build a version with the NMS classes using BuildTools, the jar is not recognized by IntelliJ. Can anyone tell me what my error is? this is my .bat
java -jar BuildTools.jar --rev 1.19 --compile craftbukkit --compile-if-changed
I use the craftbukkit-1.19.jar which is created in the root directory.

small current
undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

small current
#

Well do it directly with the item and not meta

chrome beacon
#

You should be using the meta

sage patio
#

thanks

sage patio
chrome beacon
#

hmm I thought the other one was deprecated

#

Turns out it wasn't

small current
neat maple
# chrome beacon ?bootstrap

can anyone give me an example of a .bat that I can use to create a file that will be recognized by intelliJ or tell me where I can get one? I've read through this several times but never got anywhere.

chrome beacon
#

java -jar BuildTools.jar --rev 1.19

#

Then depend on Spigot/Spigot-API/target/spigot-api-1.19-R0.1-SNAPSHOT-shaded.jar

#

Like the message above said

neat maple
#

ok i test it

sage patio
#

@last temple set it on One Dark too

#

👍

lethal roost
#

would i do that like this?

        List<Material> materialList = new ArrayList<>();
        for(String s : materialListStr) materialList.add(Material.valueOf(s));```
shy shadow
#

Hey guys, would it be possible to prevent the eyes of ender to be attracted by any stronghold whose outside of the worldborder ? 🤔

humble tulip
#
    public List<String> checkListForValidMaterials(List<String> stringList) {
        List<String> valid = new ArrayList<>();
        for (String s : stringList) {
            try {
                Material material = Material.valueOf(s.toUpperCase());
                valid.add(material.name());
            } catch (IllegalArgumentException e) {
                getLogger().info("Invalid material: " + s);
            }
        }
        return valid;
    }
lethal roost
#

ah tysm! i'll try that

tardy delta
#

@humble tulip

humble tulip
#

oh nice

tardy delta
#

ah theres a matchMaterial too

shy shadow
shy shadow
#

Thanks !

humble tulip
# lethal roost ah tysm! i'll try that
public List<String> checkListForValidMaterials(List<String> stringList) {
        List<String> valid = new ArrayList<>();
        for (String s : stringList) {
            Material material = Material.getMaterial(s.toUpperCase());
            if (material != null) {
                valid.add(material.name());
            } else {
                getLogger().info("Invalid material: " + s);
            }
        }
        return valid;
    }
#

without try catch

pastel relic
#

Hey, so I'm trying to make that clickable text thing in chat and I tried this:

TextComponent snoopalDiscord = new TextComponent("[Discord Server]");
                snoopalDiscord.setClickEvent( new ClickEvent(ClickEvent.Action.OPEN_URL, "https://discord.gg/Jzdt65AUxc"));

But I got this in chat. Am I doing something wrong here?

shy shadow
# humble tulip ye

Lil' problem tho, I can cancel the event, but the eye just wouldn't fire, I can't redirect it to the other nearest stronghold right ?

#

Might have to do it another way, like find a way to remove the strongholds that are outside the worldborder ? I tried filling it with worldedit but the eyes are still attracted to them

chrome beacon
pastel relic
#

wdym?

chrome beacon
#

You are converting the text component to a string instead of sending it

pastel relic
#

I am sending it

chrome beacon
#

as a string

#

not as TextComponent

pastel relic
#
player.sendMessage(ChatColor.WHITE + "     " + ChatColor.BLUE + snoopalDiscord);
valid sorrel
#

player.spigot().sendMessage()

chrome beacon
#

You're converting it to a string

zealous edge
pastel relic
#

So, what should I do exactly?

chrome beacon
chrome beacon
zealous edge
pastel relic
tardy delta
#

send multiple messages lol

pastel relic
#

and what if i want them to be a certain color

pastel relic
snow sluice
#

how would i fix this?

#

im using the example shop

#

copy pasted it and its giving me errors

chrome beacon
tardy delta
#

?checkthedocs

chrome beacon
#

?paste

undone axleBOT
snow sluice
#

its a image link

#

wait

#

yea

chrome beacon
#

Don't screenshot text 🙃

snow sluice
#

yea youre right my bad

chrome beacon
#

Looks like InventoryFramework isn't on the server

#

You need to include it in your plugin

snow sluice
#

oh

#

that makes a lot of sense

tardy delta
#

i told that before lol

snow sluice
#

oh 😭

#

im blind

tardy delta
#

you literally responded to me how to shade it in gradle

chrome beacon
#

They explain how to do that in the main page README file

snow sluice
snow sluice
# chrome beacon Looks like InventoryFramework isn't on the server
[16:16:43 ERROR]: Could not load 'plugins\IF-0.10.6.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:159) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.CraftServer.loadPlugins(CraftServer.java:417) ~[paper-1.18.2.jar:git-Paper-268]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:288) ~[paper-1.18.2.jar:git-Paper-268]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1163) ~[paper-1.18.2.jar:git-Paper-268]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-268]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    ... 7 more```
#

eee

#

am i doing it wrong

#

probably

chrome beacon
#

That's not shading

#

Scroll down and read 🙂

snow sluice
#
    relocate(
            "com.github.stefvanschie.inventoryframework",
            "com.xlexih.core.inventoryframework"
    )
}```
#

i did this

chrome beacon
#

How did you build your jar

snow sluice
#

on the side

#

core >> tasks >> build >> jar

chrome beacon
#

Use the shadowJar task

snow sluice
#

oh

#

core >> task >> build >> shadow >> shadowjar?

chrome beacon
#

Yeah

snow sluice
#

will the

#
jar{
    destinationDirectory.set(file("D:\\User\\Applications\\MCHost\\servers\\JavaLearning\\plugins"))
}
#

work for it too?

chrome beacon
#

No idea

snow sluice
#

welp

#

ig ill test

chrome beacon
#

Anyways hardcoding that is a bad idea

snow sluice
#

its okay i just use it for learning how to code java

#

yea it didnt effect it

#

😔

chrome beacon
#

Did you check your libs folder

snow sluice
#

yea it is there

ivory sleet
#

set the dest dir of shadowJar then perhaps

chrome beacon
#

^

humble tulip
#
public abstract class Database<T> {

    public abstract String getType();

    public abstract T getConnection();

    public abstract void close();
}

ivory sleet
#

interface

humble tulip
#

is this a bad idea?

#

ok

humble tulip
#

but is it?

snow sluice
tardy delta
#

<T extends Connection> hehe

ivory sleet
#

^im a bit confused there as well

#

feels like thinkable connections should be hidden

humble tulip
#
public class MongoDatabase implements Database<MongoClient> {
    
    @Override
    public String getType() {
        return "MongoDB";
    }

    @Override
    public MongoClient getConnection() {
        return null;
    }

    @Override
    public void close() {

    }
}
#

it's so i can do this

tardy delta
#

im always exposing my connection via a ConnectionSupplier which supplies a connection for each storage type

humble tulip
#
public abstract class SQLDatabase implements Database<Connection> {

    protected final HikariDataSource dataSource;

    public SQLDatabase() {
        this.dataSource = new HikariDataSource();
    }

    public Connection getConnection() {
        try {
            return this.dataSource.getConnection();
        } catch (SQLException e) {
            e.printStackTrace();
            return null;
        }
    }

    public boolean isConnected() {
        try (Connection connection = this.getConnection()) {
            return connection.isValid(2);
        } catch (SQLException e) {
            e.printStackTrace();
            return false;
        }
    }

    public void close() {
        if (!dataSource.isClosed())
            this.dataSource.close();
    }
}
ivory sleet
#

minion, but now you technically expose concretion with your type parameter

humble tulip
#

or this

#

hm

#

should i stop trying to abstract database?

tardy delta
#

just handle the connection internally

ivory sleet
#

I usually abstract the storage

zealous edge
#

you know how to make a command that turns PVP on and off?

ivory sleet
#

so I create an interface with reasonable methods, and for each database type I write an impl, then whenever I use the facade I should have little knowledge about the implementation that is being used

humble tulip
#

make a command that toggles a boolean

#

if the boolean is true, cancel all player to player damage events

#

if its false do nothing

valid sorrel
#

ugh... why is there not an easy way for this...

chrome beacon
humble tulip
#

ye^^

tardy delta
#

moderator override aaaah

humble tulip
#

Set<UUID>

zealous edge
#

or on

#

active

tardy delta
#

well ye use the boolean then

chrome beacon
#

You could just use this

humble tulip
#

how would i get the connection tho?

#

wait actually ik what i'll do

ivory sleet
#

You don’t need to get the connection

#

Let that be an internal detail for those implementations that do depend on a connection

worldly ingot
#

Ideally your interface hides everything connection or SQL-related

tardy delta
humble tulip
#

ty

tardy delta
#

mweh latest commit isnt pushed yet

worldly ingot
#

You're welcome to browse this package as an example

#

I only have init(), save(), and load() methods

chrome beacon
#

but why though

worldly ingot
#

If I needed to do anything else with SQL, I'd add another action method

tardy delta
#

i hate it when i have another project open on a different os and i need to close stuff

chrome beacon
#

You really don't need more than 14M blocks/s for a prison core

#

You don't though ;/

humble tulip
#
public interface StorageDatabase {

    AltPlayer getAltPlayerFromUUID(UUID uuid);

    AltPlayer getOrCreateAltPlayer(UUID uuid, String name);

    AltPlayer getAltPlayerFromName(String name);

    Set<AltPlayer> getPlayersFromIP(String ip);

    void insertIPData(PlayerIP playerIP);

}
#

so is this more appropriate then?

ivory sleet
#

looks good

#

well if you want, I can show you I dealt with it... but something like that looks good

humble tulip
#

what if i'd like to have another class that does database stuff?

ivory sleet
#

altho you might wanna have a close and init method

humble tulip
#

should i create another connection to the db?

ivory sleet
#

such as?

humble tulip
#

logs or something

ivory sleet
#

mye

glossy venture
#

idk maybe get the block array of the chunks

#

and set it

humble tulip
#

ahh ok

ivory sleet
#

you can have another interface for that then

glossy venture
#

manually

tardy delta
#

does gitignore excludes files?

humble tulip
#

i didnt wanna have to connect to the db twice

ivory sleet
#

yes

#

isnt that what gitignore is made for

tardy delta
#

im confused

humble tulip
#

ig it's ok to do so tho

ivory sleet
#

fourteen, I believe you can still push gitignored files manually somehow, but w/ for instance intellij it filters those files so that you cant commit them

#

(with that being said, if you already pushed a gitignored file before it was ignored it wont magically disappear from upstream)

ivory sleet
#

the main reason is what if you want to log with mongo, but want to manage player data with postgre?

#

in this case it'd be easy since the 2 are independent

humble tulip
#

true

quiet ice
#

Yeah you can push gitignored files via the git CLI if you explicitly add them, though it will spit out a warning if you do so

chrome beacon
#

It probably has to do more with loading chunks. You should load balance instead of doing everything on a single tick

tardy delta
#

👀

#

lets switch os to push some stuff to gh lol

humble tulip
#

u dont have to

#

open cmd

tardy delta
#

Dualboot

humble tulip
#

and run git add or something

chrome beacon
#

You can also take advantage of Paper getChunkAtAsync to lower to load even further

tardy delta
#

Ah

humble tulip
#

idk git cli commands

tardy delta
#

Ill reset my pc anyways so i need backups of everything

zealous edge
#

I can't stop my server

pastel relic
#

Hey, is the HoverEvent deprecated?

pastel relic
waxen plinth
tardy delta
#

copied all my minecraft worlds on linux to windows lol

zealous edge
wary harness
#

WildStacker is one big shit

humble tulip
opal juniper
zealous edge
pastel relic
#

no bruv

humble tulip
#

Lmao

opal juniper
#

that was a joke

pastel relic
#

that exits any process

opal juniper
#

i thought that the flushed emojis would be enough

hybrid spoke
#

when do you CTRL+V it

tardy delta
#

copy and paste is shit on tmux

chrome beacon
pastel relic
#

okay

#

but it still marks it as deprecated though

river oracle
#

Is that nms or org.bukkit

pastel relic
#

nms

#

I cant import it as bukkit

#

whats the import for bukkit hover effect?

river oracle
#

Hmmmm I'd try snooping around for a replacement

river oracle
#

But I wasn't sure so I just asked

pastel relic
#

iirc?

river oracle
#

If I remember correctly

opal juniper
pastel relic
#

oh, okay

opal juniper
#

i thought

#

i could be wrong

pastel relic
#

it is

#

ig

#

import net.md_5.bungee.api.chat.HoverEvent;

#

for some reason u can only use the Hover and Click event using md_5

opal juniper
#

yep its in the bungee chat api for some reason i will never know

pastel relic
#

so, should I just use the deprecated version of it or?

chrome beacon
#

Use the other one

pastel relic
#

wdym exactly?

paper viper
#

There are multiple constructors

compact cape
tender shard
opal juniper
#

what does the error say

tender shard
wary harness
tender shard
#

no stacker plugin at all, they all suck

#

i mean what do they even do besides adding those useless holograms?

#

why would someone need a hologram to see that there's a bunch of dirt blocks on the ground

wary harness
#

well I need to stack mobs

#

at least trying

#

so

#

xd

compact cape
chrome beacon
#

Try invalidating caches and restarting

paper viper
#

^

pastel relic
#

what do I need to change?

chrome beacon
#

You should give it a Content instead of a Component

#

Content is an abstract class and there are a few option as for what you can give it

#

I assume you want Text

#

So give it a Text object

green prism
#
                                CardConfigStep cardConfigStep = new CardConfigStep(typeParams, sender, cardHolder, cardType);
                                String randomString = RandomStringUtils.randomAlphanumeric(10);
                                TextComponent textComponent = new TextComponent(Lang.confirm_card_message);
                                textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/creditcard confirm " + randomString));
                                textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(Lang.confirm_card_message_hover).create()));
                                plugin.getCardConfigPlayers().add(player);
                                plugin.getCardConfigStep().put(randomString, cardConfigStep);
                                new ConfirmTimer(randomString, plugin).runTaskLater(plugin, plugin.getConfig().getInt("confirm-cancelled-tickage"));
                                cardHolder.spigot().sendMessage(textComponent);```

Hi guys, I’m trying to do run_command of the verification command, but nothing seems to happen after clicking the text. This is after I switched to java 16 (I changed the project's java sdk to 16 too)
#

help me please, olivo ç_ç

pastel relic
chrome beacon
green prism
#

HHAHAHA

pastel relic
#

So something like this?

spigotLink.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("SpigotMc.org - Krzheski")));
compact cape
pastel relic
#

okay, btw, what other components are there?

chrome beacon
#

Content or Components?

pastel relic
#

Content, sorry

chrome beacon
#

Entity and Item

pastel relic
#

Wait, you can have an Item when you hover on text?

chrome beacon
#

Yeah, that's how the vanilla kill messages work with renamed weapons

pastel relic
#

oh

green prism
#

Olivo, what do you mean by content? textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Lang.confirm_card_message_hover).create());

chrome beacon
#

Like this Image I found on Google

pastel relic
#

Isnt the thing I did correct?

chrome beacon
#

It is

pastel relic
#

why should I use Maik's thing then?

compact cape
chrome beacon
pastel relic
#

oh, okay

tender shard
#

okay I'm stupid right now. Anyone got an idea on how I can supply the exception to the future here?

    public static CompletableFuture<Game> fromCategory(QuizBot bot, String fileName, TextChannel channel, Member starter) {
        CompletableFuture<Game> future = CompletableFuture.supplyAsync(() -> {
            try {
                return fromNativeCategory(bot, fileName, channel, starter);
            } catch (FileNotFoundException ignored) {

            }

            try {
                return fromRedCategory(bot, fileName, channel, starter);
            } catch (FileNotFoundException ignored) {

            }

            throw new CategoryNotFoundException(); // <-- Obviously this doesn't work. How can I can complete the future exceptionally?
        });
    }
twilit roost
#

Can I change texture of Chest?
Like in case of Items and Custom Model Data?

chrome beacon
twilit roost
#

nah ik how to do that
but overall the Block placed

green prism
#
                                CardConfigStep cardConfigStep = new CardConfigStep(typeParams, sender, cardHolder, cardType);
                                String randomString = RandomStringUtils.randomAlphanumeric(10);
                                TextComponent textComponent = new TextComponent(Lang.confirm_card_message);
                                textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/creditcard confirm " + randomString));
                                textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(Lang.confirm_card_message_hover)));
                                plugin.getCardConfigPlayers().add(player);
                                plugin.getCardConfigStep().put(randomString, cardConfigStep);
                                new ConfirmTimer(randomString, plugin).runTaskLater(plugin, plugin.getConfig().getInt("confirm-cancelled-tickage"));
                                cardHolder.spigot().sendMessage(textComponent);```
Olivo, this doesn't work 🙂
chrome beacon
#

What part doesn't work

green prism
#

Click

#

It doesn't run the cmd

chrome beacon
#

What happens when you click it

green prism
#

nothing

chrome beacon
#

Check your console

#

Does it say you're running a command

green prism
#

nop

#

I tried to check with a printLn in the confirmcmd section

#

but nothing

#

I hid the verification command from the console though thanks to an "antilog", brutally removed with log4j everything that started with creditcard confirm but I don’t think that’s it. I moved to this server from localhost and the only difference was the java 16 but now it doesn’t work anymore

#

what do you think about, olivo?

chrome beacon
#

Java version shouldn't change anything

green prism
#

Could it be some settings in the spigot.yml/bukkit.yml that I changed?

pastel relic
green prism
#

hmhmhmhmhmhm

chrome beacon
#

You could also have some plugin installed that would mess with chat packets

green prism
#

It is possible?

pastel relic
#

I only need to figure out how to put 2 TextComponets in one row now

pastel relic
chrome beacon
green prism
# green prism ChatInjector/Essentials chat

[15:35:53 INFO]: Plugins (24): AuthMe, BotSentry, bPermissions*, ChatInjector*, CrackShot, CreditCards, Essentials, EssentialsChat, EssentialsSpawn, Identity, LiteBans, PlaceholderAPI, PlugManX (PlugMan), PremiumVanish, ProtocolLib, RealisticSeasons, Scoreboard-revision*, SpigotGuard, TAB, Vault, VehiclesPlusPro, Vulcan, WorldEdit, WorldGuard

pastel relic
pastel relic
#

lmao PlugMan

chrome beacon
pastel relic
#

gl using it

#

okay

#

tysm

green prism
chrome beacon
#

AuthMe suggests your pirating the game

#

Plugman causes memory leaks and bugs

green prism
green prism
pastel relic
chrome beacon
#

It's for running the game when offline ;/

pastel relic
#

Ik it's not the best thing to do but many of the biggest servers have online mode set to false

chrome beacon
#

Not for pirating the game

pastel relic
#

well...

pastel relic
green prism
#

Any chatinjector alternatives? To inject external placeholders into essentials chat

pastel relic
#

tbh i dont even know what that is lmfao

chrome beacon
#

You could just make your own chat plugin

pastel relic
pastel relic
earnest forum
#

name me some

#

online mode false invites hackers

pastel relic
#

pika-network

#

mineland

#

mineberry

earnest forum
#

never heard of any except pika

#

and they aren't particularly big

pastel relic
#

mineberry is kinda dead now but it used to have like 3+k players every day

twilit roost
#

how to store instances of diferrent classes extending same class in same List?

chrome beacon
lost matrix
chrome beacon
#

You can pay for ingame stuff but not the game 😂

pastel relic
#

i forgot my password on mineland and they asked me to pay to get it changed

twilit roost
#

SuperClass: LootSkull
Classes : AthenasSkull, PoisonousSkull

List is containing LootSkull but when I do .add I get error that they don't match

pastel relic
#

yeah

#

they r good though

#

have to admit, they spend a lot of time and effort into making those servers

#

but they also make money out of every single thing

lost matrix
pastel relic
#

they use a free auth plugin but ask you to pay for it to be changed? wot

twilit roost
#

oh I was doing Clazz.class not using new
thx

tardy delta
#

lol

pastel relic
#

I dont think it looks right

chrome beacon
#

Like that but make it valid Java

pastel relic
#

wdym?

chrome beacon
#
TextComponent songodaLink = new TextComponent("[spigot2]");
TextComponent spigotLink = new TextComponent("[Spigot]");
spigotLink.addExtra(songodaLink);
pastel relic
#

oooh

#

got it

#

tysm

lost matrix
pastel relic
#

so, should I just ignore that, oor?

chrome beacon
#

my bad

#

Fixed

pastel relic
#

okay thx again

#

and now I just send spigotLink in chat?

chrome beacon
#

yes

pastel relic
#

okay ^^

#

finalyyy

#

looks great, tysm

glossy venture
#

is there a way to get a configuration section as a Map<String, List<String>>

ivory sleet
#

a config section is at most just Map<String,Object>

#

but ye

#

getValues iirc

pastel relic
#

one more thing, what if I want to put the link on a certain word inside a sentence?

tardy delta
#

easiest thing is to use componentbuilder

bitter garden
#

how do you get a list of every loaded permission on the server? getPluginManager().getPermissions() doesnt show all of the vanilla ones

twilit roost
#

Again dumb question from me as always

I have List of all possible options player can be given
Each has its chance ( 0 - 100 )
And I somehow want to give the player something based of the chances

Any ideas?

humble tulip
#

I also did sometjing like this

#

Wanna see it @twilit roost

covert anvil
#

Assuming something goes wrong while enabling the plugin and I wouldn't like the plugin to be enabled anymore. Is it OK to getPluginLoader().disablePlugin(this); from within the onEnable method?

humble tulip
#

Yes

tardy delta
#

yes

covert anvil
#

👍 thanks y'all!

tender shard
steady trout
#

Hi! i have a question, i have a command in my plugin that i want to stay out of auto complete. the command is /asigner and when u start typing /a it shows you the command in the auto complete, is there anyway to stop the command from showing up?

twilit roost
tender shard
steady trout
#

alright thank you!

zealous edge
#

what is that

humble tulip
#

?paste

undone axleBOT
zealous edge
#

it's long

lost matrix
zealous edge
lost matrix
pastel relic
zealous edge
lost matrix
#

F

tender shard
tardy delta
ivory sleet
#

you should use the plugin manager if anything

#

since the pm will properly deregister everything

tardy delta
lost matrix
tardy delta
#

i thought he said getPluginManager() smh

ivory sleet
#

🥲

quiet ice
tardy delta
#

eclipse being slow hehe

zealous edge
quiet ice
#

It sometimes can take a while (i.e. a minute), but after that it is rather fast

tardy delta
#

but intellij taking alot more time 😂

covert anvil
quiet ice
pastel relic
zealous edge
quiet ice
#

You can still use the IDE normally, just without any visual feedback as I believe the render thread is blocked during indexing

tardy delta
#

maybe cuz i only have 8 gigs of ram 😢

glossy venture
#

caching symbols is part of the indexing

#

but it doesnt block the render thread

quiet ice
#

It might even be that the IDE as a whole cannot be used - though it will still register keystrokes so I don't really care

glossy venture
#

right

glossy venture
#

or eclipse

quiet ice
#

Myeah I am not too sure

#

Eclipse

glossy venture
#

oooh

#

yeah in intellij its on a diff thred

#

idk abt eclipse

quiet ice
#

I know that in eclipse I am getting temporary freezes rather frequently (not too frequently, but still often enough to be notable), though whether those are caused by autocompletion or something else I am not too sure

tardy delta
#

always fun looking thro my old code 💀

lost matrix
lost matrix
tardy delta
#

@Language("MySQL") is fun too

quaint mantle
#

?paste

undone axleBOT
lost matrix
quaint mantle
#

keep getting this error

tardy delta
#

atleast its one of the times i tried to write documentation

lost matrix
quiet ice
quaint mantle
#

hm

quiet ice
tardy delta
#

ye i know

quiet ice
#

Put it in an <ul> block and it will show up automatically

tardy delta
#

smh

quaint mantle
#

thats line 54

tardy delta
#
<ul>
stuff
otherstuff
</ul>```?
quiet ice
#
<ul>
  <li>A</li>
  <li>B</li>
</ul>
lost matrix
tardy delta
#

ah mye i was thinking where the <li>s were 😅

quaint mantle
#

a

quiet ice
#

It only happens like once per session tops

quaint mantle
#

I dont know

lost matrix
tardy delta
#

we got a html hater here

quiet ice
#

It really is not that annoying, just noticable

#

Wtf are you going to use if not HTML?

zealous edge
quiet ice
#

You can disable autocompletion entirely if needed

lost matrix
#

I just really dislike web development.
Mainly because of javascript

zealous edge
tardy delta
#

luckily im using acf now

zealous edge
tardy delta
#

its not

zealous edge
tardy delta
#

AAAAAA

quiet ice
#

Though uh, I'd not recommend disabling it

#

At that point you might as well use vim

lost matrix
quiet ice
#

Just remember - you can exit it with ad<bvjkklbtjnghnb

lost matrix
#

Imagine setting a custom exit shortcut...

tender shard
quiet ice
#

Though really the claims that you cannot exit vim are a bit overexaggerated - it even says how you can exit it (Just doesn't mention that you need to press a to write text and Ctrl + C to stop doing so again)

tender shard
quiet ice
#

Ctrl + C = ^C or ETX (End of text) iirc

viral pike
#

Excuse me I can ask questions about worldedit (dev) ?

quiet ice
#

Though the enginehub discord would be a bit more appropriate depending on your issue

subtle folio
#

instead of js

quiet ice
#

Well, you are a few years to late in that case

lost matrix
tender shard
subtle folio
vagrant stratus
#

Apparently I don't know how recipes work. This is wrong lol
For ShapedRecipe what shape would I need so it has to be a 2x2 in any of the corners?

lost matrix
tender shard
quiet ice
#

To be honest I am using fedora, which might do things a bit differently

quiet ice
#

But it is a bit strange that they discard Ctrl + C given that Ctrl + C should send an interrupt signal to the process that is running

quiet ice
#

I am running debian on one of my servers - well I don't think it was a wise choice

tender shard
#

what's wrong with debian?

neon brook
#

Hello, is there been changes in commands in 1.19 or i'm a dumdum ? I'm on paper 1.19, I'm trying to make a plugin, I made plugins in the past, mainly 1.8 and 1.16.
I tried making a basic command to test it out.

package me.scaffus.noopysurvival.commands;

import me.scaffus.noopysurvival.NoopySurvival;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

public class TestCommand {

  private NoopySurvival plugin;

  public TestCommand(NoopySurvival plugin) {
      this.plugin = plugin;
      plugin.getCommand("test").setExecutor(this.plugin);
  }

  private boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
      sender.sendMessage("DDDDDDDDDDD");

      return false;
  }
}

I register it in the main file

package me.scaffus.noopysurvival;

import me.scaffus.noopysurvival.commands.TestCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.logging.Logger;

public final class NoopySurvival extends JavaPlugin {

  @Override
  public void onEnable() {
      new TestCommand(this);

      Logger.getLogger("Minecraft").info("[NooLog] Plugin chargé");
  }

  @Override
  public void onDisable() {
  }
}

And I added it in the plugin.yml

commands:
test:
  aliases: [ ]
  description: Test
  usage: /<command>

And when I execute it in game, it only sends /test, the usage part. No error in console what so ever.
I'm kinda lost there. Please help 🙂

tender shard
bitter garden
#

when making a permissions plugin how do you setup the * permission

viral pike
#

I have a small problem and despite my research I am not finding a solution for my version

In google i find this :

Location loc = new Location(world, 10, 64, 100);
RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer();
RegionQuery query = container.createQuery();
ApplicableRegionSet set = query.getApplicableRegions(loc);

But the problem is that I can’t make WorldGuard.getInstance I must have a version too old

I’m trying to see if specific coordinates are protecting

    public boolean ifBlockIsProtected(BlockBreakEvent bbe,int x, int y, int z){
        Location localtion = new Location(bbe.getBlock().getWorld(), x,y,z);
        for (final ProtectedRegion r : WGBukkit.getRegionManager(bbe.getPlayer().getWorld()).getApplicableRegions(bbe.getBlock().getLocation())) {
            if (r.contains(x,y,z)) {
                return true;
            }

        }
        return false;    
    }

I know this is not the right method but if you have any way to do this ?

Spigot 1.8.8

Thank you in advance for your feedback 😄

waxen plinth
#

@neon brook @viral pike please make paste links instead of flooding chat

neon brook
#

Ok

eternal night
#

setExecutor(this.plugin) 👀

neon brook
#

yesyes

#

this does not owrk

tender shard
eternal night
#

well why would it work

neon brook
#

idk

#

I hoped

eternal night
#

your class is supposed to implement CommandExecutor

#

and then you register it to this

#

not your plugin

bitter garden
neon brook
#

I'm a dumdum

#

thx

quiet ice
#

Though as far as I know when I am using vi over on my debian server I can also exit through Ctrl + C

neon brook
golden turret
#

which packet is sent to remove a potion effect from the player?

quiet ice
#

Regardless, fedora accepts both - debian (through SSH and running in vi compatible mode) only Ctrl + C

tender shard
quiet ice
#

If it is running outside of vi compatible mode it also accepts escape

bitter garden
ornate patio
#

bump

lost matrix
ornate patio
#

i have

#

for many days

#

couldnt find anything

lost matrix
#

Oh you still on with your horses finding water?

ornate patio
#

and horses finding grass

#

and brewing stands

#

but pretty much yeah

compact cape
#

Why InventoryClickEvent#getClickedInventory do not exists...

eternal night
#

What does the event class look like ? intellij should allow you to read that by Ctr + clicking it

compact cape
#

I know, I checked it there was no ClickedInventory...

eternal night
#

beyond that, maybe some lib is pulling a horrible bukkit api version or smth ?

compact cape
#

I found all other methods... but not the getClickedInventory

humble tulip
#

getClickedInvenrmtory has been there for so long th

lost matrix
compact cape
#

I know...

lost matrix
#

Vault pulls 1.7 or something iirc

#

do you have that?

tardy delta
#

hmmm yes

compact cape
eternal night
#

ngl

#

vault kinda cringe for that

lost matrix
eternal night
#

or exclude it from vault weSmart

compact cape
#

Well stupid Vault 😂

ornate patio
#

i hate this villager AI man

#

why is it so hard to navigate

tardy delta
#

cuz nms

lost matrix
#

You dont need it to be honest. If you just want to find some blocks around you then you can simply implement a
flood filling algorithm. Preferably an async one.

ornate patio
#

but won't it be slow

#

i dont understand how the villagers are so fast at finding their target

lost matrix
ornate patio
#

and how do they determine if a block is reachable

ornate patio
#

_ _
also

#

are attribute modifiers "modifiable"

#

as in

#

can I store an AttributeModifer from an entity, then later edit that variable and it'll automatically update the entity?

#

nvm there's no set methods on it lmao

tardy delta
#

if i store a weakreference to a player, the player instance will be able to gc'd no?

ivory sleet
#

myes

#

well ur reference wont hinder the gc from queuying it

river oracle
#

Hello spigot, I have a formal request to you. I am in need of some dire information regarding spigot .

#

I am actually curious about something though. I've seen lots of custom inventory's and some people do it by creating custom item texutres and filling slots, however, wouldn't simply hovering over the item destroy the effect given that when hovering over an item is all client sided

#

and layering with title isn't ideal either as you kind of ruin the effect by shift clicking something in. I'm curious if there are any known methods to make the inventory seem less hacky to the end user

chrome beacon
#

There aren't really any better ways

river oracle
chrome beacon
#

No it's client side

river oracle
#

oof

tender shard
#

there's no other way

chrome beacon
#

I know custom fonts can be used for small textures maybe they can be used for menus too?

#

I'm not sure what the size limits of them are and how they scale

river oracle
#

256x256

#

is the limit size for fonts

chrome beacon
#

ah

#

If you scale them right that should be enough

#

Or can you even scale them

#

🤷‍♂️

river oracle
#

Well I know how to layer everything the issue is the slots look hacky any way you do it. hmm guess I'll just do more experimenting

ornate patio
#

how do i alter the movement speed of an entity in water

#

if I add an atribute multiplier of -1, the horse I'm riding can't move on land but can move in water

lethal roost
#

[12:00:30] [Server thread/INFO]: [HeavyWeapons] Enabling HeavyWeapons v1.0-SNAPSHOT
how do i change the version of my plugin? i don't want the -SNAPSHOT there and i wanna change it from v1.0 to 1.18.2-v1.0

waxen plinth
#

It's whatever is in your plugin.yml

lethal roost
#

Ah is it that easy, im stupid lol

#

Thx

heady hollow
#

is there a noob guide for modding with fabric?

severe turret
#
        MongoClient mongoClient = MongoClients.create(Project.uri);
        MongoDatabase database = mongoClient.getDatabase(Project.database);
        MongoCollection<Document> collection = database.getCollection("players");
        Document data = new Document("player-name", "maxwell");
        collection.insertOne(data);
    }```
delicate lynx
#

sir this is spigot

heady hollow
#

oh sorry!

ivory sleet
#

their docs

severe turret
#
        MongoClient mongoClient = MongoClients.create(Project.uri);
        MongoDatabase database = mongoClient.getDatabase(Project.database);
        MongoCollection<Document> collection = database.getCollection("players");
        Document data = new Document("player-name", "maxwell");
        collection.insertOne(data);
    }```
#

any idea

ivory sleet
#

and probably some half-good guide on yt

severe turret
#

why the first one actually posts into my database

#

and the second one doesnt

#

my head is about to explode because of mongodb

#

i just figured out why it didnt work i think

#

and i want to kill myself

#

so i changed my project directories

tardy delta
#

i love ij cloning from gh

severe turret
#

and ive been trying to copy the plugin from yesterday

#

over and over and over

#

XD

#

.............

lost matrix
#

tons

#

example

hidden kestrel
#

I'm trying to develop a world generator that develops world much line in Classic, with terrain and a flat sea around it

#

What would be the best way to do this?

#

Generate the bedrock and water, and then afterwards the terrain chunks

#

or develop it so the terrain generates along with the bedrock? Would that even be possible?

lost matrix
hidden kestrel
#

What's a sigmoid function?

#

Ah!

lost matrix
hidden kestrel
#

So that it smooths out you mean?

lost matrix
#

Otherwise you would have a hard cut from normal terrain to suddenly zero

hidden kestrel
#

That is indeed what I want

lost matrix
#

Ah i see

hidden kestrel
#

I'm specifically trying to recreate 0.30 style generation

#

Except, with modern terrain

lost matrix
#

Any reason why you want the bedrock + water there?

hidden kestrel
#

Yess, to make it similar to classic

#

I assumed I create the bedrock + water using flatworld generation settings

#

and then generate a few terrain chunks in the middle of it all

lost matrix
#

Alright... then i would just check simple constraints and have most of those disabled

    shouldGenerateNoise()
    shouldGenerateSurface()
    shouldGenerateBedrock()
    shouldGenerateCaves()
    shouldGenerateDecorations()
    shouldGenerateMobs()
    shouldGenerateStructures()
if(Math.abs(x) > maxX || Math.abs(z) > maxZ)
dusk shell
#

where and how i can put a string of code that always repeats? for spigot plugin

undone axleBOT
tardy delta
#

?scheduling

undone axleBOT
tardy delta
#

not again

dusk shell
#

thanks

glossy venture
#

ok so whats the best way to execute a command string and get if it succeeded

#

i checked spigot stash and Bukkit.dispatchCommand(...) calls

CraftServer.dispatchCommand
SimpleCommandMap.dispatch
``` and in there it says
#

stoopid

naive bolt
#

anyone know a decent way to add a health bar to the warden

#

like the ender dragon boss bar but track health of a warden

glossy venture
#

boss bar

naive bolt
#

and display bossbar to people in a certine radius

glossy venture
#

create a bossbar and display it to people in a certain radius

glossy venture
#

SimpleCommandMap.java

#

in spigot stash

noble lantern
#

Couldnt you call execute() yourself and override it for commands you need

#

Like

#

commandpreprocessevent

#

dont remember exact name

glossy venture
#

i tried but that breaks vanilla commadns

noble lantern
#

ahh

green prism
#

Hello guys, I have a plug-in that manages the format of the chat with this priority (@EventHandler(priority = EventPriority.LOWEST) and another to manage the radio with this other: (@EventHandler(priority = EventPriority.LOWEST)

I have a small problem, they both interact on the chat and I have no idea how to not get them both activated despite I have used setCancelled (true) correctly

First: https://paste.md-5.net/ujulifutoc.cs
Second: https://paste.md-5.net/uqujokituf.cs

#

Please help

noble lantern
#

Its cause theyre async events

green prism
#

So, what should I use/do?

glossy venture
old sail
#

Can I use § for implementing hex codes in legacy strings?

noble lantern
#

Your gonna have some communication issues between 2 events if theyre both running async on diff threads

Theyre both gonna complete at different times and arent in sync like normal event execution

dusk shell
noble lantern
tardy delta
#

just use ChatColor.of lol

noble lantern
#

^

tardy delta
#

i hate people writing their hex thing as &f&f&0&0&0&0

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

ornate patio
#

how can I stop a baby horse from being force-fed to an adult

noble lantern
#

should be a thing

#

theres PlayerConsumeEvent

old sail
noble lantern
#

so asume the ladder exists

ornate patio
green prism
#

please

noble lantern
ornate patio
#

alright

#

thanks

noble lantern
dusk shell
noble lantern
#

?paste

undone axleBOT
tardy delta
#

well follow the guide

green prism
dusk shell
#

and where?

noble lantern
#

Thats kind how the event system works :p

dusk shell
#

(i mean in my code)

noble lantern
#

And cancelling async events from another async event isnt gonna go over well for you (At all even)

green prism
noble lantern
#

Create a dummy listener, the async chat event and have its method body only be event.setCancelled

#

comment out your other chat listeners

#

see if works then (IE Removes the message sent)

#

if it doesnt, then you have a bigger issue at hand (Spigot bug, which i assume cant rly be the case)

ornate patio
#

what are all the items a baby horse can be fed

noble lantern
#

uhmm

#

hm

ornate patio
#

they eat literally everything

noble lantern
ornate patio
#

oh k thanks

dusk shell
ornate patio
#

well

#

i still want the health regen to work, but I dont want the speed growth to happen

#

how would I do that?

#

the baby is already ageLocked

glossy venture
#

whats the best way to check if a player has joined before
preferably in PlayerJoinEvent

noble lantern
ornate patio
ornate patio
#

the horse is already agelocked

noble lantern
#

And it still ages?

ornate patio
#

if its agelocked, the age doesn't go up natrually

glossy venture
#

actually let me look on google first

#

am stupid

ornate patio
#

but it still goes up if i feed it

noble lantern
#

or both

#

prolly both

ornate patio
noble lantern
#

idk

#

method specifically says it prevents the animal from maturing

ornate patio
#

i mean i just tested it

noble lantern
#

If the horse still matures, its a spigot bug

ornate patio
#

if i spam feed it it still grows up

noble lantern
#

Yeah defo spigot bug

#

But

#

could be an oversight too, not exactly a bug

subtle folio
#

bug report when

ornate patio
#

well i could just set the age to 0 manually for now i guess

subtle folio
#

onAge { no; }

noble lantern
#

yeah that would work, just make sure to store the UUID of the horses you want stuck at age 0

ornate patio
#

i dont want any horse to be ageing normally

#

so its fine

noble lantern
#

ah kk nvm then

noble lantern
#

onAge{ maybe; }

subtle folio
ornate patio
#

!yesn't

subtle folio
subtle folio
#

!(!yesn’t)

noble lantern
subtle folio
#

all my homies use Consumer<T>

noble lantern
#

Create a empty async chat listener and cancel it

#

and if it cancels, you know its something in your code somewhere

green prism
#

They're two different plug-ins

noble lantern
#

if it doesnt, then maybe you cant cancel that event entirely

noble lantern
#

jkjk

subtle folio
#

if it implements cancelable

noble lantern
#

It does but sometimes spigots weird

green prism
#

my brain is almost dead

noble lantern
#

idk his problem seems to stem from a few different things feel like more info is prolly needed

green prism
#

hm

noble lantern
#

Prolly just needs debugging

hollow belfry
#

i have a java server with geyser but if bedrock players try to register there cone cheats are not allowed

noble lantern
#

see what methods are really getting called

ornate patio
#

this just did the exact opposite of what I'm trying to do

#

now when i feed the baby horse it instantly becomes an adult after one click

#
@EventHandler
public void onPlayerFeedHorse(PlayerInteractEntityEvent event) {
    Player player = event.getPlayer();
    if (
        event.getRightClicked() instanceof Horse &&
        feedableItems.contains(player.getInventory().getItem(event.getHand()).getType())
    ) {
        ((Horse) event.getRightClicked()).setAge(0);
    }
}
noble lantern
#

maybe 0 is adult

#

try 7

subtle folio
#

7?

ornate patio
#

why 7

subtle folio
#

i thought it was 8

noble lantern
#

maybe 5

#

jkjk

subtle folio
#

1?

ornate patio
#

i have no idea how aging works in vanilla minecraft

noble lantern
#

i said 7 cause Crop has 7 stages

#

So maybe aging has 7 stages too

subtle folio
#

prob 1

#

bc horse has two age stages

green prism
#

thanks

ornate patio
#

how lmao

#

i guess

ornate patio
noble lantern
ornate patio
#

yeah

noble lantern
#

wtf

#

wait

#

setBaby()

#

lol

ornate patio
#

8 didnt work either

ornate patio
hidden kestrel
ornate patio
#

or wait

noble lantern
#

idk if that would work

#

it might

ornate patio
#

i need to make sure that not every adult horse i feed turns into a baby too lmao

noble lantern
#

HorseAPI suks

#

okay well then how about this

worldly ice
#

i think a baby horse has negative age

noble lantern
#

scratch it, go back to the first thing i said with PlayerInteractEvent

outer wadi
#

In C++ we have something we pass as a parameter that is ..., meaning you can pass whatever there, countless arguments if im not mistaking, do we have any of that in Java?

outer wadi
#

Ah yes

#

Thats it

ornate patio
#

why is this so hard i thought it would be easy

noble lantern
#

negative age value

ornate patio