#help-development

1 messages · Page 2073 of 1

vocal cloud
#

Every ad break is literally Won't someone think of these old Jewish people who can barely lift a bottle of water

wet breach
#

I never seen an ad like that

#

and I would probably laugh if I did see one of those

viral crag
#

me either

wet breach
#

mainly because we have all kinds of elderly homes in the US

vocal cloud
#

This is a TV advert from the International Fellowship of Christians and Jews fundraising organization.

From MinistryWatch.com: "...(IFCJ) founded and run by Rabbi Yeckiel Eckstein (...) Rabbi Eckstein is said to now have a database of over 1 million Christians who donate to his ministry. In the most recent year, the ministry raised over $113 m...

▶ Play video
viral crag
#

do you yell: get them a straw at the screen?

vocal cloud
#

It's really annoying to watch not going to lie.

viral crag
#

at least the christians are working with the jews, more than we can say for the catholics

vocal cloud
#

WTB life straws for the homeless

grim ice
#

yall ever got punched in the face?

viral crag
#

wonders how rivex's quest goes

vocal cloud
#

She dead

viral crag
#

obsificated out of existence ?

vocal cloud
#

a() b()? c() d(). e() f().

#

@sullen dome a()? B() c() d(). e() f() g() h() i().

sullen dome
#

-_-

vocal cloud
sullen dome
#

i stopped, and just work with a fabric server now

#

works easier in this case

grim ice
#

my pfp is awesome

vocal cloud
#

Probably for the best. I gave up on the disaster which was forge to spigot

sullen dome
#

well i before tried to use the plugin messaging channel (i guess at least), and that "worked"

#

but on clientside, i had problems getting those written values then

#

the "packet" was sent, but the values were wonky

vocal cloud
#

Forge has the nicest messaging imo

upper cypress
#

is anyone familliar with visual bukkit

rough drift
#

no

vocal cloud
#

Da Heck is visual bukkit

rough drift
#

basically

#

slightly better version of skript

#

but its nodes

#

like UE node editor

viral crag
rough drift
#

yes

vocal cloud
#

No

#

Stop don't tell me more

rough drift
#

and

vocal cloud
#

No

rough drift
#

methods

vocal cloud
#

Shut

rough drift
#

have their exact names

#

nothing is abstracted

#

you can use runMethod to run a method

vocal cloud
viral crag
#

its that rainbow plugin again!

rough drift
#

omg

#

i was actually writing changelogs

#

10 months ago

gilded sun
#

Im trying to build my plugin but it is coming with this error during build.

#

cannot access org.bukkit.ChatColor

#

cannot access org.bukkit.entity.Player

rough drift
#

L

gilded sun
#

cannot access org.bukkit.event.EventHandler

#

cannot access org.bukkit.event.Listener

#

cannot access org.bukkit.event.player.PlayerJoinEvent

quaint mantle
#

Okay

rough drift
#

?learnjava

undone axleBOT
viral crag
#

you should probably provide access to those if you want to use them

gilded sun
rough drift
#

learn java

viral crag
quaint mantle
#

Hello there long time no see :p

gilded sun
viral crag
#

yeah its been a bit, you are a busy person

rough drift
#

slightly better version of == true?

#

(that was me 10 months ago)

quaint mantle
#

Yea haven't had much time these days sight. :d Life

viral crag
#

that the way spring goes!

gilded sun
vocal cloud
#

invalidate caches and restart

viral crag
#

Are they using maven?

gilded sun
#

yeah

vocal cloud
#

mvn clean your gradle projects. If you're lucky it'll work and you'll stop using gradle

gilded sun
#

im using maven

viral crag
#

think he meant me

gilded sun
#

Nvm im so dumb i forget to cahnge my java version from 11 to 17

viral crag
#

i like gradle, it counts for me

gilded sun
#

new error.

[22:36:05 ERROR]: Error occurred while enabling DesertValleyEssentials v1.0 (Is it up to date?)
java.lang.IllegalMonitorStateException: current thread is not owner
        at java.lang.Object.wait(Native Method) ~[?:?]
        at xyz.desertval.desertvalleyessentials.DesertValleyEssentials.onEnable(DesertValleyEssentials.java:17) ~[DesertValleyEssentials-1.0.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:501) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:559) ~[paper-1.18.2.jar:git-Paper-276]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:473) ~[paper-1.18.2.jar:git-Paper-276]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:664) ~[paper-1.18.2.jar:git-Paper-276]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.18.2.jar:git-Paper-276]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:316) ~[paper-1.18.2.jar:git-Paper-276]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1163) ~[paper-1.18.2.jar:git-Paper-276]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-276]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
viral crag
#

are you playing with threads?

gilded sun
#

nope

#

just a basic fly command

#

with 2 events onjoin and onquit

vocal cloud
#

Paper kekw

viral crag
#

whats your onEnable ?

rough drift
sterile token
#

How do you remove values from a Set<CustomObject> when you dont have the object iself?

rough drift
#

paper has events we like

gilded sun
#
    @Override
    public void onEnable()
    {
        Bukkit.getLogger().info("Plugin has been enabled.");
        loadCommands();
        loadEvents();
    }```
rough drift
#

paper has kyori

#

fuck paper

grim ice
#

Allman style

#

yikes

tender shard
#

can I tell the maven surefire plugin to only execute tests AFTER package has created a .jar?

viral crag
#

guessin its in the loadEvents()

gilded sun
#

alr

tender shard
#

some of my dependencies need to access the .jar file so I have to delay tests until after the .jar was created, and use that to run the tests

gilded sun
#

this is line 17.

}```
sterile token
vocal cloud
#

DesertValleyEssentials.java:17 thonk

#

x to doubt

viral crag
#

oh ide 😛

grim ice
#

Nice ide youve got

#

tells you about runtime exceptions

gilded sun
viral crag
#

Guessing it is how you are registering your listeners

gilded sun
#
    public void loadCommands()
    {
        getCommand("fly").setExecutor(new FlyCommand());
    }


    public void loadEvents()
    {
        Bukkit.getPluginManager().registerEvents(new OnPlayerJoin(), this);
        Bukkit.getPluginManager().registerEvents(new OnPlayerQuit(), this);
    }```
tender shard
#

the error message you sent cannot come from a }line. you must have changed something or ran an old version of your .jar

rough drift
#

that's fine

grim ice
#

on a thread

gilded sun
#

no

rough drift
#

what did you do?!

vocal cloud
#

Recompile it -> run -> paste error and full class file

noble lantern
#

Alright im gonna ask this again because for some reason as it seems this guy im talking eith does beileve me

grim ice
#

show ur whole class

sterile token
# tender shard you can only iterate over it

But how do i delete it? I dont have the object i just have a value inside that object.

For example i have a Set<Claim>
Claim object contains: uuid, name, location

So i dont have the uuid either name, so to delete it i just have the location

rough drift
sterile token
#

Oh omg

#

Hex can i send code?

grim ice
#

sure

rough drift
grim ice
#

i think i get what u wanna do

#

u wanna remove an object from a set based on one of its fields

tender shard
#

or as lambda:

#
        set.removeIf(o -> {
            if (something) return true;
            return false;
        });
rough drift
#

return something;

noble lantern
#

Is there a way to change strings in the enchantment table previews (the 3 bars on the right) using classes extending Enchantment and then registering them as enchants

Im 100% certain this is a client limitation due to enchant maps client side and language handling

No we don't want to use resource packs either

Sorry to ask this again but I need to somehow convince this person im dealing with that this really isn't possible without creating a GUI

tender shard
#

example:

        set.removeIf(myObject -> {
            if (myObject.getLocation().equals(anotherLocation))) return true;
            return false;
        });
vocal cloud
rough drift
#

only mods can do that

grim ice
#

claims.removeIf(claim -> claim.getLocation().equals(location));

#

ye

tender shard
rough drift
tender shard
#

an empty equals?

tender shard
vocal cloud
#

Well throw something into it lol

grim ice
#

Lmao

vocal cloud
#

set.removeIf(e -> e.equals(xyz));

tender shard
#

no

#

haven't you all listened?

#

his e won't be equal to xyz

#

but his e.getLocation() will equal to xyz

rough drift
#

ok

grim ice
#

this is a mess

vocal cloud
#

reeeeee²

rough drift
#

example

sterile token
rough drift
#

(its a bit messy but you get the point)

grim ice
#

it does

#

lol

tender shard
vocal cloud
#

java.util set does

tender shard
sterile token
#

Fuck its because im java 8

tender shard
#

no

#

it's fine in java 8

sterile token
#

🤡

vocal cloud
#

Works in 8 yeah

grim ice
#

wait

#

u cant

#

nvm

#

sucks

tender shard
#

why are you all making this so complicated, it's a simple lambda to check one property lol

grim ice
#

lol

tender shard
#

and no it cannot use a method reference

grim ice
#

yeah

tender shard
#

😄

grim ice
#

OH

#

I WANNA SHOW U SMTH LMAO

#

WAIT A SEC

golden turret
#

ARE YOU WORKING WITH ENUMS?

grim ice
#
    private UUID getPlayerUUID(String nameOfPlayer) {
        return Optional.of(Bukkit.getOnlinePlayers().stream()
                .filter(onlinePlayer -> Objects.equals(onlinePlayer.getName(), nameOfPlayer))
                .collect(Collectors.toList()).get(0).getUniqueId())
                .orElse(Optional.of(Arrays.stream(Bukkit.getOfflinePlayers())
                        .filter(offlinePlayer -> Objects.equals(offlinePlayer.getName(), nameOfPlayer))
                            .collect(Collectors.toList()).get(0).getUniqueId()).orElse(null));
    }
#

old shit i found in my project

rough drift
#

please

#

A hammer won't fix it

grim ice
rough drift
#

rm - rf /*.* will

rough drift
rough drift
#

but i wanna do the self oof

dire salmon
#

how can i place a light with custom level?

vocal cloud
#

Won't even work guaranteed cause names aren't safe for getting offline players

rough drift
#

^^^

#

hold on

dire salmon
#

xD

vocal cloud
#

5 giorni fa

rough drift
#

5 days ago

vocal cloud
#

I too enjoy 5 giorni fas

rough drift
#

sadly

#

i am italian

#

can't fix that

dire salmon
rough drift
dire salmon
#

yes

rough drift
#

you can change its block state iirc

tender shard
rough drift
molten hearth
#

say I want to send the player like 10 different chat messages delayed, should I use the Conversation API

tender shard
rough drift
molten hearth
#

I dont really need player input

grim ice
young knoll
#

Just use a runnable then

dire salmon
molten hearth
vocal cloud
#

If they're complicated messages use an API otherwise schedule

molten hearth
#

that sounds so cursed

tender shard
grim ice
#

ur looping thru offline players

#

not online players

tender shard
#

that does contain all online players too

grim ice
#

What

#

thats cool

tender shard
#

but yeah it's still bad

grim ice
#

but also doesnt make sense

tender shard
#

because offline player list can be huge

#

so yeah I'd do this

#
    @Nullable
    private static UUID getPlayerUUID(String nameOfPlayer) {
        final Player online = Bukkit.getPlayerExact(nameOfPlayer);
        if(online != null) return online.getUniqueId();
        final Optional<OfflinePlayer> optional = Arrays.stream(Bukkit.getOfflinePlayers())
                .filter(player -> nameOfPlayer.equals(player.getName()))
                .findAny();
        return optional.map(OfflinePlayer::getUniqueId).orElse(null);
    }
rough drift
#
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff;
  Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
  
  }, 20L); // 2 sec delay
}, 20L); // 1 sec delay

Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff3;
  
}, 20L); // 1 sec delay

stuff, then stuff3, then stuff 2

sterile token
#

doesnt exists something computeIfAbsent but in Set?

grim ice
#

not one liner

#

0/10 (sarcasm)

tender shard
#

what should a set compute

molten hearth
#

yeah but like

#

good old

rough drift
#

good old bukkit scheduler

young knoll
#

Use a repeating task and a dequeue

molten hearth
#
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff;
  Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
    Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
  Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
  
  }, 20L); // 2 sec delay
}, 20L);```
rough drift
#

dude

#

not like that

#

jesus

sterile token
rough drift
#

you can just use 40L if you don't wanna nest

molten hearth
#
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff;
  Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
    Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
      stuff2;
      Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
        stuff2;
        Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
          stuff2;
          Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
            stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
              stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
                stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
                  stuff2;Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
                    stuff2;

                  }, 20 L); // 2 sec delay

                }, 20 L); // 2 sec delay

              }, 20 L); // 2 sec delay

            }, 20 L); // 2 sec delay

          }, 20 L); // 2 sec delay
        }, 20 L); // 2 sec delay

      }, 20 L); // 2 sec delay

    }, 20 L); // 2 sec delay

  }, 20 L); // 2 sec delay
}, 20 L);```
rough drift
#
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff;
}, 20L); // 1 sec delay

Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
    stuff2;
  
}, 40L); // 2 sec delay

Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
  stuff3;
  
}, 20L); // 1 sec delay

stuff, then stuff3, then stuff 2

#

there

molten hearth
#

well there you go prettified

rough drift
#

ez

sterile token
#

Stop spamming

tender shard
molten hearth
#

yeah I didnt bother changing the stuff2

sterile token
molten hearth
#

but if I have like 10 chat messages isnt that what I'll have in the end

dire salmon
young knoll
tender shard
rough drift
#

no nesting

#

it just easier to keep track of nests imo

molten hearth
#

hm alright

sterile token
molten hearth
#

sounds so whacky but ty

rough drift
#

np

tender shard
sterile token
tender shard
#

if your custom object properly override the equals() method, it's not possible to add the same claim object twice anyway

grim ice
dire salmon
#

how do i place a light with custom level?

grim ice
#

(sarcasm)

#

well one thing that makes it bad is that ur getPlayerExact twice

#

but otherwise its same thing

tender shard
# grim ice ```java private static UUID getPlayerUUID(String nameOfPlayer) { ret...

here, now it's one line without getting onlineplayer twice lol

@Nullable private static UUID getPlayerUUID(String nameOfPlayer) {final Player online = Bukkit.getPlayerExact(nameOfPlayer);if(online != null) return online.getUniqueId();final Optional<OfflinePlayer> optional = Arrays.stream(Bukkit.getOfflinePlayers()).filter(player -> nameOfPlayer.equals(player.getName())).findAny();return optional.map(OfflinePlayer::getUniqueId).orElse(null);}
sterile token
dire salmon
#

tf is this

grim ice
#

LMOAOOO

tender shard
sterile token
#

No need

tender shard
#

bruh

sterile token
#

I can use the default equals

#

😂

tender shard
#

you have no idea what a hashset is for, right?

tender shard
#

using a hashset without a proper equals and hashcode method makes using a set useless

fossil lily
#

Can I get the player who dealt the damage on EntityDamageEvent?

tender shard
#

it's called HASHset for a reason

tender shard
#

because it uses hashcode() and equals()

vocal cloud
#

It's because it's made of hash browns

grim ice
#

EntityDamageByEntityEvent

#

yeah

fossil lily
#

Idk why im using this

dire salmon
#

i just want the light thing lol

vocal cloud
#

Make sure to brown your hashes before consuming them

grim ice
#

my mouse broke btw

#

good thing im using a laptop

tender shard
grim ice
#

cant u generate an equals and a hashcode with intellij

tender shard
#

so no reason to use a set in the first place when you don't override equals and hashcode

tender shard
grim ice
#

lol

sterile token
grim ice
#

BRO

tender shard
#

coding on a cellphone?

grim ice
#

wait u can code in a phone

tender shard
#

okay I'm out

grim ice
#

thats amazing

#

that was my 10 years old self dream

tender shard
#

when I was 10, no phone had wifi lol

grim ice
#

r u like 50

sterile token
#

I dont thin the program its netbeans but i find an apk and try it and worked

tender shard
grim ice
#

oh right

wet breach
grim ice
#

17 years ago dang

#

WAIT WHAT

#

UR 27

tender shard
crisp steeple
#

i am going white shopping

tender shard
#

and there definitely weren't any "apps" or similar

grim ice
#

i assumed ur a teenager

wet breach
tender shard
#

there was stuff like "calender" and "notes" and "contacts" and maybe a weird browser that couldn't display any normal websites

#

oh also 1MB was more expensive than my monthly rent

viral crag
#

there are lots of programming android apps

vocal cloud
#

Browser was a joke

wet breach
#

the browser for phones back then was weird

grim ice
#

oh also guys, I once COPIED A YOUTUBE VIDEO CODE, EACH CHARACTER ONE BY ONE IN AN ANDROID PHONE

viral crag
#

dcoder, jstudio, code editor, codeacademy, etc

grim ice
#

A 80$ ONE

#

AND IT WAS PHP

dire salmon
#

god

viral crag
grim ice
#

AND I COPIED IT WITH INDENTS

#

lemme try to find the vid i copied it from

sterile token
#

I rember that when i was 5 years i had cellphone number and the cellphone was a Nokia C5

#

That its the prove that technology have improved in about 10 years

wet breach
#

I remember when a razr was essentially the iphone of the day

dire salmon
sterile token
#

Oh lamo coding on cellphone its so difficult

#

Im planning to edit the apk to integrate github copilot

granite owl
#

is this the correct way to access another plugins fields? btw this is only a temporary solution til ive got the sql database working

#
try
            {
                Field f = Bukkit.getPluginManager().getPlugin("SystemControl").getClass().getDeclaredField("playerUUIDList");
                f.setAccessible(true);
                @SuppressWarnings("unchecked")
                HashMap<String, UUID> playerUUIDList = (HashMap<String, UUID>) f.get(Bukkit.getServer());
                f.setAccessible(false);
                
                if (playerUUIDList.containsKey(player))
                {
                    return playerUUIDList.get(player);
                }
            }
            catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e)
            {
                e.printStackTrace();
            }
dire salmon
#

formatting 😔

sterile token
#

You should use reflections when you want to access to something that you dont have access to it

sterile token
wet breach
sterile token
tender shard
#

that's correct

granite owl
dire salmon
#

how do i place a light with custom level? it only places in max level

granite owl
#

but thats only til i get the sql database working

sterile token
tender shard
#

getPlugin(...) obviously returns the other plugin's main class instance

viral crag
#

wonders if they know there is a file that stores player uuid and names?

sterile token
crisp steeple
#

bukkit already has a usercache.json

tender shard
#

that's of course wrong

sterile token
tender shard
#

you have to provide the plugin instance instead of just Bukkit.getServer() in f.get

tender shard
crisp steeple
#

to oddy?

sterile token
#

And most plugins use custom users because they use custom values

crisp steeple
granite owl
#

HashMap<String, UUID> playerUUIDList = (HashMap<String, UUID>) f.get(Bukkit.getPluginManager().getPlugin("SystemControl"));

#

xD

left pine
#

hello
Can someone help me how to create a command that sends a message please?

tender shard
#

Plugin otherPlugin = Bukkit.getPluginManager().getPlugin("...");
Field field = otherPlugin.getClass().getDeclaredField(...);
Object value = field.get(otherPlugin);

dire salmon
#

is it even possible to place a light with level lower than max?

sterile token
tender shard
dire salmon
#

wdym

tender shard
sterile token
#

To access private methods exits reflections lamo

dire salmon
crisp steeple
#

Why are you adding reactions to your own message

young knoll
#

Light is a block

tender shard
#

I highly doubt that you can change the light level using the API, and I even think you can't change it using NMS since at least paper runs the light engine on its own

young knoll
#

You can with the block

dire salmon
#

you can change it when its on ground

young knoll
#

Which is what I think they are talking about

dire salmon
#

i did that :p

fossil lily
#

Is it possible to set the source of damag dealth by the plugin to a player?

dire salmon
young knoll
dire salmon
#

that only accepts Material

young knoll
#

mhm

#

Set material, get data, set data

#

Or you can get the base data, edit that, and then block.setData

tender shard
#

I don't think that you can do anything with the light interface

#
[23:18:57 ERROR]: [Test] [ACF] java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData cannot be cast to class org.bukkit.block.data.type.Light (org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData and org.bukkit.block.data.type.Light are in unnamed module of loader java.net.URLClassLoader @4f8e5cde)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//de.jeff_media.test.TestCommand.msg(TestCommand.java:25)
[23:18:57 ERROR]: [Test] [ACF]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[23:18:57 ERROR]: [Test] [ACF]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[23:18:57 ERROR]: [Test] [ACF]  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[23:18:57 ERROR]: [Test] [ACF]  at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//co.aikar.commands.RegisteredCommand.invoke(RegisteredCommand.java:152)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//co.aikar.commands.BaseCommand.executeCommand(BaseCommand.java:577)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//co.aikar.commands.BaseCommand.execute(BaseCommand.java:513)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//co.aikar.commands.RootCommand.execute(RootCommand.java:99)
[23:18:57 ERROR]: [Test] [ACF]  at Test.jar//co.aikar.commands.BukkitRootCommand.execute(BukkitRootCommand.java:84)
[23:18:57 ERROR]: [Test] [ACF]  at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[23:18:57 ERROR]: [Test] [ACF]  at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:905)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2306)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2117)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2098)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:6)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$1(PlayerConnectionUtils.java:51)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.TickTask.run(TickTask.java:18)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:23)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1399)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.util.thread.IAsyncTaskHandler.y(IAsyncTaskHandler.java:126)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.be(MinecraftServer.java:1376)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1369)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1347)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1229)
[23:18:57 ERROR]: [Test] [ACF]  at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[23:18:57 ERROR]: [Test] [ACF]  at java.base/java.lang.Thread.run(Thread.java:833)

this is what happens if you cast a torch's or candle's blockdata to light

sterile token
#

?paste

undone axleBOT
young knoll
#

No no

#

Light is a block alex

dire salmon
#

well im trying to replace air with light

young knoll
#

Literally a block called light

sterile token
young knoll
#

Are you alex?

tender shard
#

huh

#

is that new?

young knoll
#

Yes

#

1.17/18

tender shard
#

fr

dire salmon
#

yep

tender shard
#

awesome

young knoll
#

It can have a light level from 1 to 15

#

Is invisible and intangible

tender shard
#

why did noone ever mention that before

young knoll
#

And can be waterlogged

tender shard
#

and why is it not in the creative tab

young knoll
#

Idk, ask mojang

granite owl
#

kk ty implemeted it but too tired for further testing

#

;D

dire salmon
young knoll
#

Material.LIGHT.createBlockData, cast it, set the level to 7, and then block.setData

tender shard
#

I really didn't know this existed at all lmao

quaint mantle
#

Any idea as to why this happens ?

tender shard
quaint mantle
#

The red "AxleCrates"

tender shard
#

is that your plugin?

quaint mantle
#

Yes, I'm trying to make the ServerBasics as a plugin reloader.

tender shard
#

and what's your code for "reloading" other plugins?

quaint mantle
#
Plugin target = null;
        File pluginDir = new File("plugins");

        if(!pluginDir.isDirectory()){
            return ChatColor.RED + "DIRECTORY COULDN'T BE FOUND";
        }

        File plugin = new File(pluginDir, name + ".jar");

        if(!plugin.isFile()){
            for(File file : pluginDir.listFiles()){
                try{
                    PluginDescriptionFile desc = ServerBasics.getInstance().getPluginLoader().getPluginDescription(file);
                    if(file.getName().endsWith(".jar")){
                        if(desc.getName().equalsIgnoreCase(name)){
                            plugin = file;
                            break;
                        }
                    }
                } catch (InvalidDescriptionException e) {
                    return ChatColor.translateAlternateColorCodes('&', ServerBasics.getInstance().plugin_prefix + "Plugin description was not set.");
                }
            }

            try{
                target = Bukkit.getPluginManager().loadPlugin(plugin);
            } catch (InvalidPluginException e) {
                return ChatColor.translateAlternateColorCodes('&', ServerBasics.getInstance().plugin_prefix + "The plugin was not found.");
            } catch (InvalidDescriptionException e) {
                return ChatColor.translateAlternateColorCodes('&', ServerBasics.getInstance().plugin_prefix + "The plugin description was not found.");
            }
            Bukkit.getPluginManager().enablePlugin(target);
        }

        return ChatColor.translateAlternateColorCodes('&', "The plugin &a" + name + " &f was successfully loaded.");```
tender shard
quaint mantle
#

I just do java plugin.getServer().getPluginManager().disablePlugin(plugin.getServer().getPluginManager().getPlugin(args[0])); in the CommandExecutor

tender shard
#

you only disable the plugin

quaint mantle
#

How do you remove it then ?

#

or "unload" it

desert musk
#

is there a way to make an entity only glow to specific players?

tender shard
# quaint mantle or "unload" it
  1. you can't properly unload it without reflection and class loading magic
  2. you can only make bukkit think that's it not there anymore. check out the SimplePluginManager class and its private fields
#
  1. unloading plugins at runtime is a bad idea and it will never work reliantly
sterile token
#

Why MongoDatabase#getCollection()#find()#foreach(document -> bla bla) its deprecated?

tender shard
dire salmon
tender shard
#
  1. remove the plugins from the SimplePluginManager, especially the fields I have marked
#
  1. and now, you'll want to have the classloader forget about the already loaded classes from that plugin
#

and only now you might have a small chance of actually getting it to load properly again

noble lantern
#

Is there ways to change mining of speed with blocks?

I assume only way to do this is with NMS (Dont want to apply mining fatige to player)

tender shard
dire salmon
#

ah

tender shard
#

what tasks do you need to wait for?

#

doesn't it return a CompleteableFuture or similar?

ivory sleet
#

usually youd just append a callback

dire salmon
#

how do i check if clicked block is a sign?

#
Block block = rightClickEvent.getClickedBlock().get();
tender shard
#

well, then use that 😄

#

or don't you know what that is?

#

why not?

dire salmon
ivory sleet
#

ye then just ::join it?

#

or whats the biggie?

tender shard
#

i don't understand why you want to schedule a new runnable in on disable

#

you can provide your stuff to the completablefuture to run it after it has completed

tender shard
#

join or get will block the thread until the future has completed

ivory sleet
#

yes, in particular using the bukkit scheduler wont work as onDisable runs the last server tick, but look what alex aforementioned

tender shard
#

basically you can pass your runnable to the future once you get the future, then in ondisable you can .get() or .join() your future to make it complete (if i am not mistaken)

#

or do you actually only call the structureblocklib in ondisable?

#

because that probably won't work

dire salmon
#

how can i check if block is a sign

sterile token
tender shard
#

if(block.getState() instanceof Sign) ...

dire salmon
#

will that get all signs?

tender shard
tender shard
dire salmon
#

so spruce, birch, etc?

tender shard
#

if(block.getState() instanceof Sign) will work for wall signs, for normal signs, for spruce, for birch, ...

dire salmon
#

ok

#

im just trying to make a neon ink lol

#

k seems to work

#

now how do i make it glow

tender shard
dire salmon
#

thx

tender shard
#

hm it's a bit hard to explain lol

sterile token
minor garnet
#

how i create a boss bar without bar style?

tender shard
minor garnet
#

its because make a fog and dark sky

#

and i dont want those

tender shard
#

are you talking about BarFlags instead of BarStyle?

minor garnet
#

yes

#

sorry xd

tender shard
#

well then just don't provide any barflags

#

the createBossBar method takes a varargs array of BarFlag

minor garnet
#

but when i use bukkit.createbossbar

#

show me a barflag value

tender shard
#

Bukkit.createBossBar("title",BarColor.YELLOW,BarStyle.SOLID);

#

it's a varargs constructor

#

you don't have to pass anything as barflag if you don't need one

minor garnet
#

true

tender shard
#

you can also pass an empty array

#
Bukkit.createBossBar("title",BarColor.YELLOW,BarStyle.SOLID); // works
Bukkit.createBossBar("title",BarColor.YELLOW,BarStyle.SOLID, new BarFlag[0]); // works too
arctic moth
#

so for whatever reason, in this code, the top of a kelp plant gets triggered by this

if (!Main.unstableblocks.contains(nblock.getType()) && Main.unstableblocks.contains(nblock.getWorld().getBlockAt(nblock.getX(), nblock.getY() - 1, nblock.getZ()).getType()) && !Main.stableblocks.contains(nblock.getType()))

Material.KELP_PLANT is in unstableblocks btw

young knoll
#

Kelp is two blocks iirc

tender shard
arctic moth
#

oh the top of a kelp plant is called kelp

dire salmon
arctic moth
#

not kelp_plant

#

thats stupid

#

everything else in the kelp plant is kelp_plant

young knoll
#

KELP and KELP_PLANT

#

ye

tender shard
#

the reason for 2 materials is where it can be "placed"

#

a KELP_PLANT can be placed on KELP and KELP_PLANT while a KELP_PLANT can only be placed on... idk, dirt, etc?

#

oh

#

no

#

other way around

#

KELP is the top most part

#

KELP_PLANT are the ones below that don't need any "ticking"

young knoll
#

Clever little optimization

#

Bamboo also works that way

tender shard
#

so it's not stupid at all, also given that every "block" has a bounding box and the box of the top most part is only half the size of the ones below

young knoll
#

Bounding box can be changed with just data tho

tender shard
#

hm no idea

#

oh yeah otherwise fences would be weird

#

or doors

#

lol

grim ice
#

i have made a severe and continuous lapse in my judgement

#

and I don’t expect to be forgiven. I’m simply here to apologize.

#

There's a lot of things I should have done differently but I didn't. And for that, from the bottom of my heart, I am sorry. I want to apologize to the internet.

#

Like I said I made a huge mistake. I don’t expect to be forgiven, I’m just here to apologize. I'm ashamed of myself. I’m disappointed in myself. And I promise to be better. I will be better. Thank you.

#

well

noble lantern
#

Hex wtf you on about lmao

grim ice
#

do u have a completable future

grim ice
#

Logan paul

tender shard
grim ice
#

LMFOAOO

noble lantern
tender shard
#

just don't call your library in ondisable

#

do it before

noble lantern
#

Yes that is your issue hex, please update to a supported version of minecraft and this should solve your issues

#

🙂

grim ice
#

that seems like a shit library

noble lantern
#

so many functional interfaces

tender shard
#

can't you just call .join() or .get() at the end?

#

why?

#

do you have a github link to that api?

#

thx

ivory sleet
#

I mean .getCompletionStage().toCompletableFuture().join()

grim ice
#

will stop the server

#

until the task completes

ivory sleet
#

no not rly

#

ye it will wait

#

but like you said this was done in onDisable right?

grim ice
#

they should make a onDisable(Stage stage) {}

tender shard
ivory sleet
#

ye

sterile token
# ivory sleet no not rly

Its possible to disable the shity message from spigot saying that "plugin name version bla has been loaded"?

grim ice
#

Stage.EARLY, Stage.PRESENT, STAGE.AFTER

tender shard
#

it's a pretty important information

ivory sleet
#

^

sterile token
tender shard
#

and why?

sterile token
#

What does he have to do?

ivory sleet
#

well you'd have to do it in your constructor

#

reflecting the plugin manager instance or sth

tender shard
#

you can attach custom filters or however they were called again

sterile token
#

Oh its by code?

ivory sleet
#

or yeah perhaps just manipulating the logger could be somewhat easier

grim ice
#

early is 10 seconds before the server starts shutting down, present is when it starts shutting down, after is after 10 seconds, when the server has shutdown but doesnt kill the program, leaves the thread for the Stage.AFTER listeners

tender shard
#

but it's a pretty stupid idea unless you want to hide some malware

sterile token
#

I dont know what he want to do

tender shard
sterile token
#

Its no my problem if he is doing bad things

tender shard
#

check the source code of AuthMe

grim ice
#

no

sterile token
tender shard
#

wait

noble lantern
#

?paste

undone axleBOT
noble lantern
#

sry needed that link

tender shard
#

authme is the plugin that does /password whatever right?

tender shard
#

yeah then check the source of that

#

it attaches a custom logging filter or however its called to prevent the passwords from appearing in the log

sterile token
#

Allr thanks, he literally paid me for asking me that question

tender shard
#

ok

noble lantern
#

we get 50% right

sterile token
#

I told him i help u for free and them i check paypal and he already paid me :/

tender shard
#

yeah where's our share

sterile token
#

And i didnt give him money back because he we would receive back 0.something dollar

#

Because commisssions are amazing

#

😡

tender shard
#

if you send a refund on paypal, there is no fee whatsoever

sterile token
tender shard
#

obviously not much if the remaining amount is under a dollar lol

sterile token
grim ice
#

oh

tender shard
#

ah yes, the ddl currency

sterile token
#

I will do a refund so he get his money back

grim ice
#

do a refund to me

sterile token
#

Because i dont ask for money to friends

grim ice
#

:)

noble lantern
noble lantern
#

thats all it gives me

tender shard
#

the full log

#

do this:

#
  1. mvn compile
#
  1. when the error occurs, click the uppermost thing on the left side (where it rn says "sync")
#

then send the full log

noble lantern
#

oh fucks sakes

tender shard
#

I assume its likely something that the SpecialSource plugin does that prevents it maybe?
nope

noble lantern
#

i hate that button

tender shard
#

ugh

noble lantern
#

accidentally set maven in offline mode lmfao

tender shard
#

I didn't even know that button exists lol

noble lantern
#

its annoying i press it all the time

sterile token
#

Mongo $_id its always unique or can be overriden?

tender shard
#

if it still doesn't wanna update, do mvn clean compile -U

sterile token
#

Because i dont know why to mongo objects id are duplicated

noble lantern
#

$_id can be duplicated if you set data incorrectly

#

you need to set using the id from the get object you received from mongo iirc

#

otherwise it just sets the data you have again

tender shard
#

fun fact: "mongo" is a pretty bad german insult against disabled people

#

I always wondered why they called their database like that

noble lantern
tender shard
grim ice
grim ice
#

its only in algerian accent

noble lantern
grim ice
#

and Moroccan as well idk

#

i can dm u it if u want

tender shard
grim ice
#

"mongo" isnt the full one

noble lantern
#

oh i know both maven and gradle, i just like gradle cause speeeeeeeeeed

#

shits so fast

tender shard
#

imho maven can do 99% of what gradle can, while being 30% easier to use for MOST things

crisp steeple
#

In my experience gradle has been really slow lol

tender shard
crisp steeple
#

Yeah

noble lantern
#

indeed

tender shard
noble lantern
#

but after that its speedy

tender shard
#

yeah sure it always has a daemon running

crisp steeple
#

Its just preference i guess

tender shard
#

definitely

#

neither is better or worse, they are just different and have different philosophies

#

it's a bit like nginx vs apache

noble lantern
#

i doubt it does

noble lantern
#

sad cowboy hours

wet breach
arctic moth
#

what type of in-game tree is TreeType.REDWOOD

tender shard
#

but tbh if your pom is setup correctly and you do not have a ton of unused plugins and goals and executions and whatever, it won't be slower

#

after all it only calls javac too, just like gradle

#

when I compile stuff that doesn't have 10+ modules, javac is always the thing taking up the most time

arctic moth
wet breach
#

maven out of the box is very conservative on resource usage. If you have resources for it to use, you can specify in your pom for compiler args to give it more ram and you can even build concurrently too

noble lantern
#

idk when compiling this plugin with just one class using maven i feel like it takes a few seconds, but when compiling a larger 31k line+ project with gradle it feels instantaneous

wet breach
#

just told you why

tender shard
noble lantern
#

havent heard of that before

wet breach
#

no it will build dependencies and modules concurrently for the project

#

but that is if only you tell it can do so

tender shard
#

i haven't ever heard of that

sterile token
wet breach
#

some projects rely on certain modules to be built first and in those scenarios the project couldn't be built concurrently

noble lantern
#

maybe i still have it but i think i deleted that project

tender shard
#

although they don't depend on each other, obviously

tender shard
#

e.g. 1_18_R2, 1_18_R1, etc

#

how do I make it compile those concurrently?

#

I have never ever heard of such an option

noble lantern
#

oh hey i still have the project what do yah know

#

probably a better way to handle this

#

but this things really old, like 2-3 years old

ivory sleet
#

define better

noble lantern
#

ie cleaner and or just without needing to remove the _id from the Document

tender shard
noble lantern
#

not sure i havent used mongo in a while

noble lantern
#

this is js

sterile token
#

Yeah

arctic moth
#

people are gonna hate me for this

noble lantern
#

well, maybe that java code sent helps but im not sure how the wrappers work between versions

sterile token
worldly ingot
#

I do hate you for that

wet breach
# tender shard let me try that

here is another command similar to the first one
mvn -T 1C clean install the difference here is this will tell maven to use 1 thread per core

candid galleon
#

use an enhanced switch please

sterile token
tender shard
#

just why

worldly ingot
#
event.getLocation().getBlock().setType(switch (event.getSpecies()) {
    case DARK_OAK -> Material.DARK_OAK_LOG;
    case ACACIA -> Material.ACACIA_LOG;
    // etc.
});```
noble lantern
#

mmmm

#

beautiful

worldly ingot
#

Will clean things up significantly

wet breach
tender shard
#

I'd just create a method for that o0

worldly ingot
#

Or a Map, yeah

tender shard
#

Material getLog(TreeType)

tender shard
noble lantern
crisp steeple
tender shard
#

why the heck doesn't maven enable that by default

worldly ingot
#

EnumMap is preferable there actually

wet breach
tender shard
tender shard
wet breach
#

well not only just if you have modules but proper modularization too

#

and your dependencies are setup appropriately

tender shard
#

as said, my stuff went down from 2 minutes to 30 seconds using -T 1C 😄

wet breach
#

nice and that wasn't even increasing the ram allotment either 😛

#

which is another thing you can do as well

tender shard
wet breach
#

by default maven starts with 512mb of ram and I think only uses at most 1GB or something like that

#

but you can just arbitrarily give maven more ram to use as well

#

especially if your project is large 🙂

#

so what do you think now @tender shard with maven vs gradle? 😛

arctic moth
tender shard
# arctic moth tbh i kinda forgor ¯\_(ツ)_/¯

I mean you could at least do it like this 😄

public static Material getLog(TreeType type) {
        switch (type) {
            case REDWOOD:
            case MEGA_REDWOOD:
            case TALL_REDWOOD:
                return Material.SPRUCE_LOG;
noble lantern
#

Enabled -T 1C but time didnt change

But at the same time, this project is legit just 1 class, 1 compiled dependency, and one class lmao

Cant really get faster than 6.9 seconds for something like that i assume

tender shard
noble lantern
#

Ill have to try on a larger project i have

ebon siren
tender shard
wet breach
wet breach
#

should really read that page 🙂

ebon siren
#

ok that explains the npe but im still confused about the event exception

tender shard
#

the event exception is caused by your nullpointerexception

ebon siren
#

i had it before that tho

tender shard
#

EventException = there was an exception in one of the event handlers (yours)

ebon siren
#

ok

#

i probably didnt see it thanks

tender shard
#

you only care about the "Caused by: " part

arctic moth
#

does ExplosionPrimeEvent happen when the thing is ignited?

ivory sleet
wet breach
noble lantern
tender shard
#

@wet breach can I somehow add the -T parameter to my pom.xml so I don't have to type it everytime? 😄

ivory sleet
wet breach
tender shard
#

I mean, can't hurt to use 8 cores all the time

#

so why not

wet breach
#

there is a line somewhere saying something something arguments

#

don't have maven installed currently so I don't have anything to look at XD

tender shard
#

my settings.xml only has repository credentials 😄

wet breach
# tender shard how can I add it to settings.xml?
For Windows (Linux in parens):

    Open the Environment Variables window: Computer -> Properties -> Advanced System settings -> Environment Variables
    Add the property MAVEN_CMD_LINE_OPTS with your desired value. In my case -T 3 as I want Maven to use 3 threads to build in parallel.

    Edit the mvn.cmd file (In Linux: the mvn file). Find the part where the Java command is actually executed, the line starting with %MAVEN_JAVA_EXE% (In Linux: generally after the line defining the main class: org.codehaus.plexus.classworlds.launcher.Launcher)

    Add %MAVEN_CMD_LINE_OPTS% to the end of the line (In Linux: $MAVEN_CMD_LINE_OPTS)

When you run mvn compile on a Maven project you will now see the following line:

Using the MultiThreadedBuilder implementation with a thread count of 3

This has the advantage of the user being able to 'override' this value. So if the user executes mvn -T4 compile, then 4 threads are used instead of the default 3.
#

also, you can configure maven to download more dependencies at a time too

ivory sleet
#

what do u have as of now?

arctic moth
#

does PlayerJoinEvent get triggered when a player changes worlds?

#

or is there a different event for that

wet breach
#

can use MVN_OPTS for this as well
mvn -Dmaven.artifact.threads=1 verify
export MAVEN_OPTS=-Dmaven.artifact.threads=3
first one will download 1 artifact at a time second one will download 3 at a time, by default maven downloads 5 artifacts at a time

ivory sleet
#

I meant onDisable

#

that function tells us scarcely anything

wet breach
ivory sleet
#

where does it go wrong

wet breach
#

using mvn compile -pl module-c

ivory sleet
#

so it just doesnt save?

#

well thats because you're just writing to the output stream

#

in principle you need to save the bytes from it

outer sorrel
#

I have a plugin that reads a lot of yml files constantly. If i was to load them all to ram it would use up like 2gb of ram. it there any better way to read lots of files constantly? the tps often drops to 18

ivory sleet
#

send your structure util as well

ivory sleet
#

utilManager.utility.savePlots();

#

this one

outer sorrel
ivory sleet
#

Bukkit.getScheduler().runTaskAsynchronously(BlobPlots.getInstance(), () -> {

#

this is illegal

#

or well

#

it becomes illegal/useless in onDisable

#

line 78

ivory sleet
#

which in itself should in principle not hurt your tps

#

unless you're doing sus stuff on the main thread

outer sorrel
# ivory sleet yes

it uses like 2gb+ in ram because there are a few thousand files it stoes in ram

ivory sleet
#

oh acc nvm

#

its your "shitty" library which uses the scheduler

ivory sleet
#

hmm

#

can u link the lib

#

I will take a look

left pine
#

Hello, can someone help me how to create a command that sends a message in the minecraft chat in vs code? please

ivory sleet
#

@quaint mantle in principle no

#

but like

#

you could proxy it

#

or actually no, I mean just pass a custom instance of ProxyService that you implement

#

which does not use the bukkit scheduler

#

altho it gets hard if you wanna execute things synced still

#

but that could be a temporary solution

#

but you should ask the developer if they could redesign such that you could pass a custom Executor

sterile token
#

What he doing?

#

Why dont he modif the lib?

ivory sleet
#

its not that easy

sterile token
#

Isnt better to fork the repo and fix the issue?

tender shard
ivory sleet
#

yes a pr could be one way to address this issue

#

but this lib is a plugin lib, so he has no control over it in principle

sterile token
#

I have done for using the ZKM obfuscator and works reallly good

tender shard
sterile token
livid crescent
sterile token
#

I paid i think 3000 dollars or something like that

tender shard
sterile token
#

Stringer its the one that costs $3000 dollars

granite beacon
#

I'm having a weird quirk (not sure if it's a new 1.18 thing.)
When doing:

@EventHandler
public void onPlace(BlockPlaceEvent e) {
  e.setCancelled(true);
  e.getBlock().setType(Material.SAND);
}

Nothing gets placed?

crisp steeple
#

probably because you're not calling the method

sterile token
granite beacon
#

Oops type on my end, on my code I am

crisp steeple
sterile token
#

Did you register the listener on your main class?

granite beacon
#

Yes, that's not the issue

#

It works as expected when the event is not cancelled

sterile token
#

Oh prob try giving a small delay before setting the block again

crisp steeple
#

that is a bad idea

vocal cloud
#

They're canceling it

#

So nothing happens?

granite beacon
#

Right, but then I'm setting it

#

So something should happen

vocal cloud
#

No? Because you cancelled it

granite beacon
#

Maybe I just have bad memory but that's how it works on older versions?

crisp steeple
#

well

#

the block events are weird

vocal cloud
#

No they're not

crisp steeple
#

they get triggered after the event actually happens

sterile token
#

If you cancel the event its because you dont want to happen its right what saying Mike

crisp steeple
vocal cloud
#

And this one is no exception

crisp steeple
#

it is

vocal cloud
#

It's called before it's placed

crisp steeple
#

that's not true

#

at least on older versions

vocal cloud
#

You cancel it means no block is placed

sterile token
vocal cloud
#

You change the material of a block that doesn't exist

sterile token
#

It should be called after setting the event

crisp steeple
#

but then its just stopped

#

its pretty weird

granite beacon
crisp steeple
#

i have had multiple issues with it

#

i ended up having to switch to playerinteractevent and checking right click block

granite beacon
#

The weird part is if you get the type it returns SAND even though the change hasn't occurred in the game.

left pine
#

Hello, can someone help me how to create a command that sends a message in the minecraft chat in vs code? please

vocal cloud
#

So setting the material and not canceling the event doesn't work?

granite beacon
#

It does but I don't want the player placing their blocks

#

(and adding blocks back to their inventory after they've placed one is not an option)

vocal cloud
#

Ah

crisp steeple
#

you should just be able to do event.setCancelled(true)

vocal cloud
#

So wait does this method work or not

crisp steeple
#

without the sand part

granite beacon
#

Right but I want to place a sand at the location they attempted to place a block

vocal cloud
#

So the code above doesn't work

#

It just cancels it?

crisp steeple
#
@EventHandler
    public void blockPlace(PlayerInteractEvent event){
        if(event.getAction() != Action.RIGHT_CLICK_BLOCK || event.getItem() == null) return;
        event.setCancelled(true);
        Block block = event.getClickedBlock().getRelative(event.getBlockFace());
        if(block.getType() != Material.AIR) return;
        block.setType(Material.SAND);
    }

@granite beacon this could work for what you're trying

granite beacon
#

does this channel support image embedding

#

from links

vocal cloud
#

Yes

#

But like does it work or not

granite beacon
#

This is what occurs, might take a second to load

vocal cloud
#

Alright so it doesn't

granite beacon
#

lol

cedar laurel
granite beacon
#

There ya go

#

That is what occurs

vocal cloud
#

Try getting the location and world from the block and setting the block material using the location

vocal cloud
#

No don't use that code

arctic moth
vocal cloud
#

Firespreadevent?

arctic moth
#

like idk is there a way of detecting the reason its supposed to fade

arctic moth
vocal cloud
#

?jd-s

undone axleBOT
granite beacon
#

lol

granite beacon
undone axleBOT
granite beacon
#

@sterile token ?

arctic moth
#

and then leaves floating fire

sterile token
#

Do you need something?

granite beacon
#

with docs

sterile token
#

Oh sorry

#

MY bad

granite beacon
#

All good lol

sterile token
#

Yeah i just want to copy them

#

And didnt notice i was repliying to u

granite beacon
#

No worries

vocal cloud
#

You have op on the server right? Not in spawn chunks?

granite beacon
#

Yes and Yes

vocal cloud
#

Kk

granite beacon
#

It also wouldn't make sense why not canceling and setting the type works

vocal cloud
#

Might have to use the interact event code

granite beacon
#

Yeah...

#

1.18 seems a bit unreliable

vocal cloud
#

Probably because when you cancel it the event just ignores any block state changes

granite beacon
#

Maybe idk

vocal cloud
#

You'd probably have to run a runnable to change it 1 tick after

granite beacon
#

Yeah but that just seems kind of absurd for replacing a placed block

sterile token
vocal cloud
#

Less than ideal

sterile token
crisp steeple
#

yeah using a runnable is not a good idea

granite beacon
granite beacon
#

About to

#

It works

left pine
#

someone tell me how to create a command that sends a message in the minecraft chat or at least create a plugin well and 100% funsional in vs code

granite beacon
left pine
granite beacon
# left pine because?

Because it's not designed for Java and you'll spend more time trying to do anything

#

Go install a Java IDE like intelij or eclipse

crisp steeple
left pine
ivory sleet
#

Netbeans perhaps

#

Altho it’s scarcely any better than vsc

vocal cloud
#

If Eclipse and intellij don't work that must be some toaster

left pine
vocal cloud
#

Your computer is a toaster

left pine
vocal cloud
#

Use the last intellij version that supports 32 bit

left pine
#

so that's why I ask about that for vs code which is the little bit of luck that I found

shrewd solstice
#

im trying to put my main from my plugin but... i got this please help me
main cannot be resolved to a variable

young knoll
#

?di

undone axleBOT
arctic moth
#

how do you change the loot tables?

young knoll
#

Datapack is easiest

arctic moth
young knoll
#

Hmm

#

Blocks or mobs

arctic pawn
#
    @EventHandler
    public void rcPlayer(PlayerInteractEvent event) {

        Player player = event.getPlayer();
        if(event.getAction() == Action.RIGHT_CLICK_AIR) {
            if(player.getItemInHand().getType() == Material.DIAMOND) {

                Location loc = player.getLocation();
                event.getPlayer().getWorld().spawnEntity(loc.add(0,1,0), EntityType.ARMOR_STAND);
            }
        }

    }

    @EventHandler
    public void spawn(CreatureSpawnEvent event) {

    if (event.getEntityType() == EntityType.ARMOR_STAND) {
        ArmorStand armorStand = (ArmorStand) event.getEntity();

        armorStand.setVisible(armorStand.isInvisible());
         }
    }```
#

Hi, spigot newbie here- How would I go about essentially combining these two? As in once the armor stand entity spawns, it would be set as invisible

wispy bridge
crisp steeple
#

^

left pine
#

someone recommend me a windows 7 32bit java IDE system to create my plugin please

wispy bridge
#
ArmorStand armorStand = (ArmorStand) event.getPlayer().getWorld().spawnEntity(loc.add(0,1,0), EntityType.ARMOR_STAND);
arctic pawn
#

Ah, I see. Thank you very much!

crisp steeple