#development

1 messages Β· Page 83 of 1

dusty frost
#

then you just use the gradle/maven publish plugin, point it to your secure and easy to type domain, and bam

river solstice
#

hey, um, I'm trying to add server logs to our so called "staff control panel".
my current impl., is, well, iffy. (and a bit dumb)
using laravel/react (inertia) stack
so basically I am ssh commands to zgrep the logs and, to say the least, when I try to put them all in a table (not ALL logs, say only the latest log file), it's a bit laggy due to the amount of data loaded.
any recommendations how could that be improved? what I want to achieve is an easy way to search through ALL the logs without the hassle of opening each one manually and searching.

dusty frost
#

okay first question: is this like, a React table that lags your browser?

#

or like a database table or something backend

river solstice
#

it's probably my implementation, it's just a custom table component with ~50000 rows of logs

#

though the whole page is laggy

#

πŸ’€

#

basically it's just a bit json passed from back to front

dusty frost
#

i would recommend tanstack table, it's superb @river solstice

#

free, open source, made by the guy who made React Query and co.

#

i would also recommend pagination of some kind, or like infinite scrolling (still technically pagination)

#

so that you don't send 50,000 rows at once

#

this looks to be an even better option potentially

#

virtualized, can parse stuff nicely, has highlighting and searching

river solstice
#

things can never go smoothly can they

#

yeah well I fixed that part, but the log is just not showing up

#

why it do that

dusty frost
#

hmm hmm

#

old library sad

#

maybe you can find a fork of it?

river solstice
#

I mean

#

it works with any other website

#

but not my own lol

dense galleon
#

How come I am getting all these warnings in my build.gradle?

#

'maven' cannot be applied to '(java.lang.Class<org.gradle.api.publish.maven.MavenPublication>, groovy.lang.Closure<org.gradle.api.publish.Publication>)'

#

Cannot assign 'String' to 'Publication'

pulsar ferry
#

Groovy or kts? Where are you getting that example from? Normally you don't set groupid, artifactid, and version, that is taken from the project automatically

dense galleon
#

Groovy

#

You think I don't need the publications section?

pulsar ferry
#

You do, you just don't need to set the ids, etc, just the from section

dense galleon
pulsar ferry
#

Did you add the publish plugin? Is that in the tasks block? Hard to tell from just that screenshot

dense galleon
#
plugins {
    id 'java-library'
    id 'maven-publish'
}``` Yeah I do
pulsar ferry
#

Is that in the tasks block?
Might wanna send your full build.gradle

dense galleon
#

when running the publish task, I get an error too saying:

Credentials required for this build could not be resolved.
> The following Gradle properties are missing for 'AdventurousKlyNetMsg' credentials:
    - AdventurousKlyNetMsgUsername
    - AdventurousKlyNetMsgPassword```
I added the credentials in my `gradle.properties`
#
myDomainRepositoryUsername=username
myDomainRepositoryPassword=password``` this is in my gradle.properties
dusky harness
dense galleon
#

Yeah that was it!! thank youu

dense galleon
#

I'm getting an error saying:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':compileClasspath'.
Using insecure protocols with repositories, without explicit opt-in, is unsupported.``` This is when adding the published dependency to one of my projects though, not when publishing.
#

Plugin 1 (AdventurousKlyNetMsg) I managed to publish through adding allowInsecureProtocol = true

pulsar ferry
#

Using insecure protocols with repositories
Not using https, you'll need to optin on everything that uses it

dense galleon
#

Oh

#

So plugin 2 needs to have allowInsecureProtocol=true in the publishing.repositories section?

pulsar ferry
#

Yeah

#

Or use https

dense galleon
#

It's my dad's server and he cannot add the SSL until next week, was hoping to use http for the time being till then since after next week ill be busy again

#

I added that line in plugin 2 though I still get the same issue when reloading the build.gradle

pulsar ferry
#

btw you are publicly sharing the ip, on the paste too

dense galleon
#

What

#

It's been leaked on 4chan a few weeks ago anyway by some people

#

Either way, did I do that right or am I missing something?

pulsar ferry
#

As long as you're fine with it
And yeah that looks correct

#

setAllowInsecureProtocol(true) seems to also be a thing, try that if it doesn't work

dense galleon
#

Oh I had it in the wrong place

river solstice
dusty frost
#

hell yeah

river solstice
#

in my table component previously I would just pass all the rows and do the pagination inside the component, which would generate a shit load of html elements

dusty frost
#

yeahhh

#

virtualization and pagination are gonna be your biggest optimizations

river solstice
#

now I just slice the data before generating the rows, and the table component just has a "fake pagination", which just calculates the pages and rows per page by the total amount of data

#

and I thought the issue was 50k rows of json

#

now it can handle ~100mil without an issue

dusty frost
#

phew!

river solstice
#

although currently I do it file by file, my goal is to "load" and have an ability to search through all of them, but for that Ill have to increase the buffer size quite a lot lol

#

thanks for the idea anyways, totally forgot about virtualization

#

will most likely use it when I'll get in the big boy numbers

sullen flame
#

Good day. I'm not sure why you guys keep putting my new servers under review when my server follows all of the guidelines. I just recently made a new server for gamers but it has been under review for weeks. My other server that I tried to open was under review for months and I had to delete it because I couldn't engage with a community. Can you kindly check my discord server personally if you think something is wrong and then can you kindly allow it to go on disboard so I can start my community? It seems to me like you people aren't doing your job properly. My username is night_hawk4 and my new servers name was DREAMSCAPES.

torpid raft
#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

torpid raft
#

also even if this was an official discord support server, disboard != discord

stuck hearth
#

Sorry I forgor to do my jorb

torpid raft
#

banned for forgor

torn heart
lethal shell
#

Is there already a test version for 1.21?
Unfortunately I couldn't find anything

torn heart
#

test version of what

#

you're so descriptive

lethal shell
#

Ah sorry πŸ™ˆ PlaceholderAPI

torn heart
queen swift
#

in need of a dev for helping me with combatlogx

silk swan
#

I want to bring back DeluxeChat, if there anyone wants to help me do it, write me in dm, i already have a good base for this plugin, but i'm stuck now, if there anyone who wants to help me, thank you

dense drift
#

You want to do what? @silk swan

silk swan
# dense drift You want to do what? <@541992599594991637>

I want to make a chat plugin in the style of deluxechat, I loved deluxechat but as it is no longer being updated it is no longer sustainable in new versions, and so I would like to recreate it to continue support in new versions

dense drift
#

Do you plan to use any of its code? πŸ™‚

#

Also, we do have a better replacement for it: ChatChat

silk swan
dusky harness
#

chatchat kinda πŸͺ¦ tho πŸ₯²

#

papi3 when

pulsar ferry
analog basalt
#

How can I display a sign and get the user input on my plugin? Do I need to use ProtocolLib ?

dense drift
dense drift
brittle thunder
hearty lily
#

hello, I am creating a plugin and I want to make it compatible to several versions at the same time is there a way to do it ?

dusky harness
# hearty lily hello, I am creating a plugin and I want to make it compatible to several versio...

depends on the versions
chances are, it'll work even if you don't change anything

but generally you want to

  1. set the spigot version in pom.xml/build.gradle/build.gradle.kts to the lowest version you want to support because while newer versions might have additions, removals are rare
  2. If the lowest version is below 1.13, then plugin.yml should not have api-version. If it's >= 1.13, then you should add api-version: 1.13 or whatever version

and most importantly - test! There have been changes across versions which might require checks (ex do x on 1.13 but y on 1.14)

#

this assumes you have a working plugin on a specific version already

hearty lily
rugged bane
hearty lily
#

Hi i am tring to apply velocity api to my plugin but this error keeps going here is my pom.xml

#

Unresolved dependency: 'com.velocitypowered:velocity-api:jar:3.1.0'

pulsar ferry
pseudo spoke
#

hi! is there api for DeluxeMenu?

#

i want to open menu by code!

#

ping on reply please!!

neat pebble
#

idk if there is an api, but you can open the menu to the player making him perform a command or using the console command sender

pseudo spoke
#

oh

#

thank you!

#

but.. is it work for unregistered command too?

neat pebble
#

The command would be the dm open menu_name player

queen plank
#

This player.getOpenInventory().getTopInventory().getHolder() != view.getHolder(); gives me the following error:
java.lang.IncompatibleClassChangeError: Found class org.bukkit.inventory.InventoryView, but interface was expected. The plugin is compiled with Spigots 1.21 API but is ran on a server with 1.20.4 which I assume has something to do with it.

#

Ping if you respond pls

dusky harness
#

uhh

dusky harness
#

that's probably not where the error is coming from

proud lodge
worn jasper
proud lodge
worn jasper
#

(yes, read the channel topic)

proud lodge
worn jasper
#

development is referencing coding

#

not with server optimizations

proud lodge
#

cool my bad

worn jasper
analog basalt
#

How can I display a sign and get the user input on my plugin? Do I need to use ProtocolLib ?

eternal pilot
#

Are there Any discord mods here?

torpid raft
#

me

#

whats up

#

jk no

#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

eternal pilot
torpid raft
#

im not a mod here or discord itself

eternal pilot
#

Hmm?

torpid raft
#

btw this is not a discord support server this is a minecraft discord, in case you were fooled at some point

#

a lot of people join here assuming this is an official discord support server for discord itself

eternal pilot
#

Damn

torn heart
#

become literate.

dense galleon
#

If in my plugin's main class I override getDataFolder(), does that mean I can use a directory in a custom path to store plugin config?

#

Ah it's final, shit

#

How can I change the data folder a plugin uses?

minor summit
#

just use any other file location you want

#

you are not bound by the data folder

#

new File(getDataFolder().getParentFile(), "foo bar")

cedar tartan
#

hey guys i'm trying to delete a server but for some reason the option isn't showing in my server settings. Any suggestions?

queen plank
# dusky harness can you give the stacktrace?

Sorry for the late response, went to bed before you responded and then I've been at work. Anyways, here is the full stacktrace:

[23:58:44] [Server thread/WARN]: [Yggdrasil] Task #25 for Yggdrasil v2.0.0 generated an exception
java.lang.IncompatibleClassChangeError: Found class org.bukkit.inventory.InventoryView, but interface was expected
at com.sniskus.yggdrasil.gui.Gui$1.lambda$1(Gui.java:72) ~[Yggdrasil-2.0.0.jar:?]
at com.sniskus.yggdrasil.util.time.Scheduler$1.run(Scheduler.java:26) ~[Yggdrasil-2.0.0.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.4.jar:git-Paper-399]
at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.4.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1635) ~[paper-1.20.4.jar:git-Paper-399]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.20.4.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1514) ~[paper-1.20.4.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1215) ~[paper-1.20.4.jar:git-Paper-399]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-399]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

#

Does not look like it is caused by another exception

dense drift
#

Spigot has recently changed the type of some Inventory class from interface to abstract class, idk if that's the problem

queen plank
#

Probably, I haven't faced this problem before tho, how do I solve it?

#

I get what the problem is, just have no clue how to solve it

#

Tried searching some before but found nothing I felt was useful

dense drift
#

Welp, is the other way around

#

abstract class > interface

#

Actually idk how to fix this, probably a different class that extends/implements InventoryView depending on the version you are on shrug

queen plank
#

Yeah that was my first thought but it seems like a hassle

#

Frick

dense drift
#

Ye 😬

#

Probably some smarter people know a better way to do this

queen plank
#

gpt

#

πŸ‘€

dense drift
#

I was thinking ab actual ppl, but that works too ig pepe_kek

queen plank
#

Yup, GPT is telling me the same thing πŸ’€

#

istg imma just drop legacy versions

dense drift
#

The best option!

#

Although that means anything before 1.21 pepe_kek

queen plank
#

ik 🫠

#

I'll see how much of a hassle it is then decide

dense drift
#

Good luck!

queen plank
#

Thanks, probs will need it lol

#

thanks for the help

#

I genuinly have no clue how to do this. It's not like I'm creating my own InventoryView, I'm getting a bukkit one which is of the wrong type which throws the error.

dusky harness
#

tbh I had no idea what IncompatibleClassChangeError was

#

I probably should've looked it up before responding lol

queen plank
#

Oh πŸ’€

tardy cosmos
#

Alternatively if you develop with the 1.20.4 API it will simply work on both 1.20.4 and 1.21 because of asm rewriting shenanigans as long as your plugin isn't a paper plugin

dark garnet
#

is there a way to access/clear the 2x2 crafting grid? players r using it to store illegal items to use them past the "safeguards" i have

#

just realized they can also bypass by holding item with cursor πŸ™ƒ

dusky harness
#

reminds me of when I made a item "tracking" library a while ago

dusky harness
dark garnet
#

ye just found method for it

#

but 2x2 grid >:((((

dusky harness
#

πŸ™ƒ

#

probably getting slots or raw slots

dark garnet
#

wow thx πŸ™„

dusky harness
#

lol

torn heart
#

well there definitely exists a solution so don't be discouraged

dusky harness
#

tbf they did ask if there is a way

#

:)

dark garnet
#

what just happened

dark garnet
#

fowrareda dwhat

#

ok i tried disabling inventoryclickevent if inventorytype is crafting

#

but it only works sometimes...??

dusky harness
dusky harness
#

but

#

Β―_(ツ)_/Β―

dark garnet
#

event.getView().getTopInventory().getType() == InventoryType.CRAFTING

#

if i spam it doesnt detect the click wthhhhh

#

what do i do

#

ping if reply im going to bed its 1:30 am

#

//TODO prevent ppl abusing 2x2 craft grid (just disable it lol)

dusky harness
#

like the client thinks it exists but it doesn't actually exist (on the server)

dark garnet
minor summit
#

even if you slide a single pixel you start dragging items, so you need to check for both click and drag events

tardy cosmos
#

can confirm the drag event is always to blame

dark garnet
#

ok yea i think that worked

#

but wth is this logic

#

if i drag anywhere in my inventory, its CRAFTING inventory, but if i just click, its PLAYER inventory

#

not even in the 2x2 grid, just anywhere in my inventory, that makes 0 sense

#

oh i think its cause for click event im using event.getClickedInventory() but for drag event im using event.getInventory() (getClickedInventory() doesnt exist)
anyway to fix that?

minor summit
#

check the inventories you dragged across? the event gives you the raw slots, and you can get the inventory for a raw slot from the inventoryview

dark garnet
#

ok ye it still does

#

HAHAHAHhahHAhahAHhahaahHAH i was putting the updated plugin jar on the wrong server!!!!!! !!1 11 11 11 !!!1!!!!

#

it worked, thx :)

austere raft
#

hey is this help for everything todo with minecraft development?

stable wedge
#

hjelp

proud pebble
#

like dev as in coding, not just editing configs for a premade plugin

torn heart
#

not much else

restive ivy
#

is it possible to disable features within guilds?

torpid raft
#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

austere raft
river solstice
#

well the protocol is well documented, but youd have to implement everything, every game mechanic from scratch and theres kinda no reason to do so

austere raft
#

like I just wanna make a Proxy System

dense drift
austere raft
#

I want my own Cloud System that creates servers, does maintainance, does loadbalancing onto the Proxies

dark garnet
#

why is PlayerMoveEvent#getTo() nullable? ping if reply

pulsar ferry
minor summit
#

spigot skull with crossbones emoji

dark garnet
hushed badge
#

my guess is that spigot annotated it incorrectly, and paper corrected it

minor summit
#

Β―_(ツ)_/Β―

#

I don't use spigot so I don't really care

pulsar ferry
#

Plus why would it matter why it is nullable, just throw a null check and call it a day

dark garnet
#

cause im using it to detect movement type (translation, rotation, both), so i need to either return one of those when getTo is null or return null, depending on what getTo being null means

#

its fine, i have it set as translation from when i first set it up so ill just keep it like that

pliant sluice
#

What additional features does Paper's API provide compared to Spigot?

worn jasper
gloomy trench
#

I'm wondering how feasible it would be to add placeholder support for all mobs not just players. For example have this method:

// PlaceholderHook.java:
   public String onPlaceholderEntityRequest(final Entity entity, @NotNull final String params) {
    return null;
  }```
#

Or was a specific reason that only players are used

dusky harness
gloomy trench
#

Making it an optional override rather than required be would ideal and support backwards compat

dusky harness
#

might be a good papi3 suggestion

#

although its current release date eta is already like 2030

#

wait 2030 isn't even that far away anymore

#

it might actually be 2030

gloomy trench
#

maybe they'll add it for minecraft 2.0

river solstice
#

Anyone experienced this issue in the past?

#

Sometimes the directory gets "locked" and I haven't really found the reason why or any workarounds. This happens when building reobf paperclip jar.

minor summit
#

gradlew --stop cct

analog basalt
#

how can i make a player glow with color using ProtocolLib?

worn jasper
#

Uhm so I am saving a region as a schematic using WE api, then I load it, and when I paste it programatically, it just pastes air in the area, if I paste it manually, it works perfectly. This means that schematic saving is not the issue, and it's def. either the loading of it or pasting of it.

WorldEdit worldEdit = WorldEdit.getInstance();
com.sk89q.worldedit.world.World w = BukkitAdapter.adapt(toWorld);
try (EditSession editSession = worldEdit.newEditSession(w)) {
    Operation operation = new ClipboardHolder(clipboard)
        .createPaste(editSession)
        .to(from)
        .ignoreAirBlocks(false)
        .build();
    Operations.complete(operation);
}
minor summit
#

show loading the schematic into the clipboard

minor summit
#

runTaskAsynchronously

#

don't do that lol

tardy cosmos
#

that actually does work fine with fawe

minor summit
#

fawe is not we

tardy cosmos
#

not saying it couldn't possibly be the cause, try without

#

oh yeah if that's we it will die

minor summit
#

also the saveSchematic is kinda weird, completing the operation to copy to the clipboard after writing to file?

#

but the async task is raising the eyebrow more than that lol

worn jasper
worn jasper
# minor summit also the saveSchematic is kinda weird, completing the operation to copy to the c...
CuboidRegion region = new CuboidRegion(from, to);
BlockArrayClipboard clipboard = new BlockArrayClipboard(region);

ForwardExtentCopy forwardExtentCopy = new ForwardExtentCopy(
    BukkitAdapter.adapt(fromWorld), region, clipboard, region.getMinimumPoint()
);
Operations.complete(forwardExtentCopy);

File file = new File(WorldEdit.getInstance().getSchematicsFolderPath() + "/ARegionReset-" + name + ".schem");
try (ClipboardWriter writer = BuiltInClipboardFormat.FAST.getWriter(new FileOutputStream(file))) {
    writer.write(clipboard);
} catch (IOException e) {
    throw new RuntimeException(e);
}
return clipboard;

so like this? Cause this didn't fix the issue xD

#

and it is still saving the schematic properly...

main aurora
#

Can anyone help me to compile a plugin i have source code but I don’t know how to compile

worn jasper
#

lmao

main aurora
rain trench
analog basalt
#

how can i make a player glow with color using ProtocolLib?

worn jasper
main aurora
dusty frost
#

why not just download it then if it's free

onyx vortex
#

or he had done changes on the source code

dusty frost
#

if he had changes done on the source code, he better be able to compile it lmao

#

it is very likely to be a paid plugin that's open source

worn jasper
main aurora
worn jasper
#

lmao

#

Well, there's your reason @dusty frost

dusty frost
#

ah lol

minor summit
worn jasper
#

yeah

#

fair enough

#

also running it async is not a problem

minor summit
#

have you tried running it sync ?

worn jasper
#

the idea is to have a region in W2, that when I want I can save and it will paste that in W1 at the same location
Issue is, if I save and paste it while I am in W2 (the "original" region), W1 is not updated and when I go to W1, I have to save it again and paste it, then it works

keen lark
#

hello, I have a small problem, I have a menu that allows players to launch a dungeon and you have to have 10k money to be able to launch the command that puts the player in the dungeon. The problem is that if I don't have the 10K I have a message in the console that tells me that the player cannot be below $0 but it launches the dungeon anyway while I would like it to cancel it if the player does not have the $10K

onyx vortex
worn jasper
onyx vortex
#

well if it so, just return at the point where it sends the user message data

rain trench
#

hey I'm trying to update an abounded plugin WirelessRedstone and the plugin hasn't been updated since around the time where the signs were changed to have multiple writable sides, in the api docs it says to use getSide(Side) and SignSide.setLine(int, String)
Below is the old function

     public boolean placeSign(String channelName, Location location, SignType type, int extraData) {
        Block block = location.getBlock();
        if (block.getType() != Material.AIR) {
            return false;
        }

        if (!(CrossMaterial.SIGN.equals(block.getType()) || CrossMaterial.WALL_SIGN.equals(block.getType()))) {
            block = CrossMaterial.SIGN.setMaterial(block);
        }

        if (!(location.getBlock().getState() instanceof Sign)) {
            return false;
        }

        Sign sign = (Sign) block.getState();
        sign.setLine(1, channelName);

        switch (type) {
            case TRANSMITTER:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsTransmitter.get(0));
                break;
            case SCREEN:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsScreen.get(0));
                break;
            case RECEIVER:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.setLine(2, WirelessRedstone.getStringManager().tagsReceiverDefaultType.get(0));
                break;
            case RECEIVER_INVERTER:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.setLine(2, WirelessRedstone.getStringManager().tagsReceiverInverterType.get(0));
                break;
            case RECEIVER_SWITCH:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.setLine(2, WirelessRedstone.getStringManager().tagsReceiverSwitchType.get(0));
                break;
            case RECEIVER_DELAYER:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.setLine(2, WirelessRedstone.getStringManager().tagsReceiverDelayerType.get(0));
                sign.setLine(3, Integer.toString(extraData));
                break;
            case RECEIVER_CLOCK:
                sign.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.setLine(2, WirelessRedstone.getStringManager().tagsReceiverClockType.get(0));
                sign.setLine(3, Integer.toString(extraData));
                break;
        }

        sign.update();
        InternalProvider.getCompatBlockData().setSignRotation(block, Utils.yawToFace(location.getYaw()));
        return true;
    }
#

and here is my updated one:

        Sign sign = (Sign) block.getState();
        sign.SignSide.setLine(1, channelName);

        switch (type) {
            case TRANSMITTER:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsTransmitter.get(0));
                break;
            case SCREEN:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsScreen.get(0));
                break;
            case RECEIVER:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.SignSide.setLine(2, WirelessRedstone.getStringManager().tagsReceiverDefaultType.get(0));
                break;
            case RECEIVER_INVERTER:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.SignSide.setLine(2, WirelessRedstone.getStringManager().tagsReceiverInverterType.get(0));
                break;
            case RECEIVER_SWITCH:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.SignSide.setLine(2, WirelessRedstone.getStringManager().tagsReceiverSwitchType.get(0));
                break;
            case RECEIVER_DELAYER:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.SignSide.setLine(2, WirelessRedstone.getStringManager().tagsReceiverDelayerType.get(0));
                sign.SignSide.setLine(3, Integer.toString(extraData));
                break;
            case RECEIVER_CLOCK:
                sign.SignSide.setLine(0, WirelessRedstone.getStringManager().tagsReceiver.get(0));
                sign.SignSide.setLine(2, WirelessRedstone.getStringManager().tagsReceiverClockType.get(0));
                sign.SignSide.setLine(3, Integer.toString(extraData));
                break;

I get SignSide cannot be resolved, is it because I'm missing an import or am I misunderstanding the docs?
Here is the docs:

setLine Link icon
@Deprecated
void setLine(int index,
@NotNull
String line)
throws IndexOutOfBoundsException
Deprecated.
A sign may have multiple writable sides now. Use getSide(Side) and SignSide.setLine(int, String).
Sets the line of text at the specified index.
For example, setLine(0, "Line One") will set the first line of text to "Line One".

Parameters:
index - Line number to set the text at, starting from 0
line - New text to set at the specified index
Throws:
IndexOutOfBoundsException - If the index is out of the range 0..3
#

nvm after reading the api doc again and very slowly I got it lol

prime orbit
#

Is delux menue updated for. 1.21?

onyx vortex
dense drift
#

Has anyone seen this before?

#

(Sorry for the picture, the error is from someone else)

torpid raft
#

something something arcane vouchers breaking on enable 🀷

dense drift
#

Yes but why ugh

torpid raft
#

the error is like 3 pixels tall idk

#

something about method not being available

#

idk the cause

dense drift
#

😬

dark garnet
#

hi
player has op, they can craft custom recipe
player doesnt have op, they cant craft custom recipe
im just using Bukkit#addRecipe(Recipe), i dont understand how op can even affect that 😭

#

issue was reported from a server admin, i dont feel like replicating it rn and probably wouldnt be able to cause no one else has reported it πŸ’€

dusky harness
#

Β―_(ツ)_/Β―

#

well ig you'd have to ask them to do so

#

someone probably knows the answer to the issue but I don't

#

πŸ₯²

dark garnet
dusky harness
#

oh-

dark garnet
#

I had them install it and give themselves myplugin.* but still didn’t work

#

They have like 5 plugins, none of which do crafting stuff

dusky harness
#

like it just doesn't show up in the result?

dark garnet
#

I do not understand how it’s possible

dusky harness
#

I would try testing it yourself πŸ₯² πŸ₯²

#

theres gotta be something else to it

dusky harness
#

didn't see this until now

dark garnet
dusky harness
dark garnet
dusky harness
#

πŸ’€

dark garnet
# dusky harness πŸ’€

I’ve flagged it so many times but trustpilot won’t remove it. They’ve removed other invalid ones I’ve flagged idk y not this one

dense drift
#

Are the recipes even locked behind a permission?

warm steppe
#

Arent recipes added player-side too?

#

Yeah

#

I was doing this when working with them

#

Line 38-43

worn jasper
#

πŸ’€

merry knoll
#

how do you guys write unit tests for dao classes? (as in how do you mock the db)

#

i was thinking i could maybe use h2 in-memory db but eh

minor summit
#

sounds more like an integration test than a unit test

#

if your program supports sql storage then it should be fairly easy/simple to get it to use an h2 memory store

#

that's what luckperms does i believe for its sql storage tests

merry knoll
royal hedge
#

but h2 is a real database

#

so its an integration test

minor summit
#

shut the fuck up

torpid raft
#

average discord user nicknamed ANNOUNCEMENTS

rain trench
#

Question about some depreciation
The method copyHeader(boolean) from the type YamlConfigurationOptions is deprecated but in the docs for spigot api there is no info on what to use instead, could someone point me in the right direction?

leaden plume
dense drift
leaden plume
dense drift
#

Dont open this channel again smh Adam

minor summit
#

that's... interesting

#

share pom.xml/build script

dense drift
#

It was reported by a single person and I didn't update the plugin in a while. One second 😐

merry knoll
royal hedge
#

but if youre using an actual database (like h2) then its an integration test

#

if you were using something like mockito to mock out the class that actually accesses the database, then it would be a unit test

merry knoll
#

interesting, we usually call the generic or rather overall tests integration tests

#

had to look up the definitions and it seems like im basically doing both for different tests, they are small in scale with mock objects but DO connect to an external db

deep patrol
#

I have a question about BukkitRunnables with runTaskTimer. I have 3 in one class because I have seperate times for my HideNSeek plugin. It starts with HidingTimer() then SeekingTimer() then Restarts(). But issue is I am having is that multiple of them are running even though I cancel them & return based on variables. I am confused because I see examples of that same thing I've done and supposedly they work.

    public void HidingTimer() {
        new BukkitRunnable() {
            int timeLeft = hidingTime;

            @Override
            public void run() {
                if (!hasGameStarted) {
                    StopGame();
                    this.cancel();
                    return;
                }

                int minutes = timeLeft / 60;
                int seconds = timeLeft % 60;

                String timeString = String.format("%02d:%02d", minutes, seconds);

                sObjective.setDisplayName(ChatColor.GREEN + "Released In " + ChatColor.RED + ChatColor.BOLD + timeString);
                hObjective.setDisplayName(ChatColor.GREEN + "Seeker Released In " + ChatColor.RED + ChatColor.BOLD + timeString);

                if (timeLeft <= 0) {
                    isHidingPhase = false;
                    SeekingTimer();
                    Player seekerPlayer = Bukkit.getPlayer(seekers.get(0));
                    if (seekerPlayer != null) {
                        seekerPlayer.removePotionEffect(PotionEffectType.BLINDNESS);
                    }
                    this.cancel();
                    return;
                }

                timeLeft--;
            }
        }.runTaskTimer(plugin, 0, 20);
    }
dusky harness
#

and are you sure that you're calling HidingTimer() only once?

merry knoll
#

and we probably need more code to see where these methods are called, chances are these are cancelling and you are running more

deep patrol
bronze robin
#

jdk not found on compile

#

help

sterile hinge
#

?

bronze robin
sterile hinge
#

what do you want to tell us

bronze robin
#

how do i send pic

#

when i compile the lpugin

#

it says jre not found

sterile hinge
#

"the plugin"

bronze robin
#

plugin

#

yea

#

minecraft plugin

sterile hinge
#

that's still like 0 information

deep patrol
deep patrol
#

Send a screenshot.

bronze robin
#

where

#

shhould i dm u

deep patrol
#

No..

#

In this channel.

bronze robin
#

no perms

deep patrol
#

upload to imgur or something and send link.

#

Improvise

bronze robin
#

ok

deep patrol
bronze robin
#

ok leme try

dusky harness
bronze robin
dusky harness
#

and i think theres like a JDK option

bronze robin
#

yeah

#

i applied it

dusky harness
#

is it red?

bronze robin
#

still says invalid

dusky harness
#

oh

#

do you have a jdk installed?

#

like did you download and install one from the internet

bronze robin
#

yea

#

i tried 2 versions

#

java 17

#

and java 21

#

nopoe didnt work after downloading once again

#

still the same error

#

should i try reinstalling ide

dusky harness
#

I don't think reinstallation would fix it
I can't really go in detail right now though because I'm kinda busy but maybe someone else can help

dusky harness
bronze robin
#

aighyt bro

deep patrol
#

I am having a hard time finding anything on setting custom skins through spigot. I just want a simple way of setting skins & resetting. Would anybody have examples for 1.21

ocean crow
deep patrol
ocean crow
#

Oh, I could be wrong but not fully sure if that’s possible..?

deep patrol
# ocean crow Like custom models or npc skins?
    public void SetSkin(Player player) {
        PlayerProfile profile = player.getPlayerProfile();

        int randomSkin = new Random().nextInt(skins.size());

        PlayerTextures texture = profile.getTextures();

        try {
            texture.setSkin(new URL(skins.get(randomSkin)));
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }

        profile.setTextures(texture);
        profile.update();
    }

I saw something about player profiles and wanted to check out to see if that would work.

ocean crow
#

Hmm

deep patrol
ocean crow
#

Not fully sure, the only time I use profiles is for player heads

ocean crow
dusty frost
#

Could look at the LibsDisguises source code

#

that's what i use for my server

deep patrol
dusty frost
#

I mean yeah I guess but it's probably your best source

#

I don't know of any other disguise plugins like that still currently in development

deep patrol
#

I am doing a minor little thing and its such a pain.

tight junco
#

i remember changing a players skin using nms was like

#

profile properties.removeAll("textures"), applying the new texture, hide the player then show the player, send removed player packet add player packet + update name

#

like it was weird

#

but it worked

deep patrol
#

thats exactly what it is but the packets names have changed

deep patrol
#
    public void SetSkin(Player player) {
        CraftPlayer craftPlayer = (CraftPlayer)player;
        GameProfile profile = craftPlayer.getProfile();
        ServerGamePacketListenerImpl connection = craftPlayer.getHandle().connection;

        connection.sendPacket(new ClientboundPlayerInfoRemovePacket()));

        int randomSkin = new Random().nextInt(skins.size());
        Property property = new Property("textures", skins.get(randomSkin));

        plugin.getLogger().log(Level.WARNING, skins.get(randomSkin).toString());

        profile.getProperties().removeAll("textures");
        profile.getProperties().put("textures", property);

        connection.sendPacket(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ((CraftPlayer)player).getHandle()));

    }

I got it to not make any errors but I just think its just more figuring out if I am doing the proper thing with the packets.

tight junco
#

i would try this

#

You may need to ClientboundRespawnPacket(CommonPlayerSpawnInfo, (byte) 0) aswell

deep patrol
tight junco
#

i created a command that allows players to take another players skin at one point

torn heart
#

best way to work with custom skins is to track how Minecraft does it and then copy it

#

that way u don't have to just keep trying and failing

deep patrol
#

I just want to use a simple system use mine skins.

#

have my config read the urls and picks a random one boom.

#

Its just more or less figuring out how to do this. I am not very familiar with Minecraft Networking and seems like a pain.

torn heart
#

there's a tutorial online about creating a player with NMS and he goes over some skin stuff

#

smth like that might be what you need

deep patrol
#

1.16.5 vs 1.21

#

They have diff names

torn heart
deep patrol
#

It used to be named PacketPlayOutInfo something

torn heart
#

thsts the same thing as Clientbound

deep patrol
#

nah

#

they remove REMOVE_Player for actions and diff in general

#

in some ways

torn heart
pure crater
#

In WorldEdit, you can paste with the -o command in order to ignore all the relative positions and paste at the original copy spot. That's for the plugin.

Currently, I’m using the API, and when copying it takes locations (the corners), but when pasting, it only uses one location to paste. I want to paste the schematic at the copied location (essentially allowing me to β€œreset” an arena map), but I don’t see an option like ignore relative paste or anything like that.

#

For example, Operation has a to, which accepts a BlockVector3 but it's just a single location. I'm not sure how the pasting system would work (like which corner would I paste to?).

       final Operation operation =
            new ClipboardHolder(clipboard)
                .createPaste(session)
                .to(BlockVector3.at(x, y, z))
                .ignoreAirBlocks(false)
                .build();

Given that I have the two corner locations, how can I acheive it so it pastes directly between these corners.

#

Would it be ClipBoard#getOrigin be the location I paste to

tawny wedge
#

hi! im creating a mini-game plugin and I need to unload and load a world. There is an issue with this way, but I dont find what is wrong, anyone knows? The first link is the issue, the world is not loaded correctly. The secong link is the code.
https://streamable.com/sjuy0f
https://pastes.dev/Bor3Q0Bf0V

it seems to work

[17:52:37 INFO]: [ChunkHolderManager] Halted chunk system for world 'world_nether'
[17:52:37 INFO]: Preparing start region for dimension minecraft:the_nether
[17:52:37 INFO]: Time elapsed: 56 ms```
but it does not be load correctly
lyric gyro
#

hello

I'm looking for a developer who is willing to update an outdated plugin to 1.20.6. I'll pay

#

I hope this is the right channel to ask

deep patrol
#
    public void SetSkin(Player player) {
        protocolManager = ProtocolLibrary.getProtocolManager();

        PacketContainer packet = new PacketContainer(PacketType.Play.Server.PLAYER_INFO);

        WrappedGameProfile profile = new WrappedGameProfile(player.getUniqueId(), player.getName());

        int randomSkin = new Random().nextInt(skins.size());
        Skin skin = skins.get(randomSkin);

        WrappedSignedProperty texture = new WrappedSignedProperty("textures", skin.getValue(), skin.getSignature());

        profile.getProperties().put("textures", texture);


        protocolManager.sendServerPacket(player, packet);
    }

I am now using ProtocolLib. I am not sure how to replace a players skin at this point. I've looked everywhere for refs but they have no use to me cause they are using some sort of api they built that does other things.

torn heart
deep patrol
#

1.21

#

yes

torn heart
#

except you didn't actually specify the player id in the client remove packet

deep patrol
torn heart
#

yes but that is a big clue

#

that it's probably not very hard to make it work from there

deep patrol
#

I don't even think I create a remove packet

torn heart
#

yea you didnt do anything with it

torn heart
#

well you did create it but didn't actually remove anything

deep patrol
#

Am I suppose to access the packet variable and add/remove

torn heart
#

ill lyk if i figure out how to do it on demand

#

gonna analyze the packets sent from server to client rn to see what minecraft is doing

deep patrol
#

Ah you using the code I sent?

torn heart
#

damn it changes in the tab list but not from the goddamn world

torn heart
#

you can force it to by for example, /killing the player

#

but there's probably some more clever way

deep patrol
#

Its just the proper packets aren't being sent.

merry knoll
deep patrol
# merry knoll its either player update packet or despawn then respawn the player
    public void SetSkin(Player player) {
        protocolManager = ProtocolLibrary.getProtocolManager();

        PacketContainer removePacket = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO_REMOVE);

        removePacket.getUUIDLists().write(0, Collections.singletonList(player.getUniqueId()));

        protocolManager.sendServerPacket(player, removePacket);

        PacketContainer addPacket = protocolManager.createPacket(PacketType.Play.Server.PLAYER_INFO);

        addPacket.getPlayerInfoActions().write(0, EnumSet.of(EnumWrappers.PlayerInfoAction.ADD_PLAYER));

        addPacket.getPlayerInfoDataLists().write(1, Collections.singletonList(new PlayerInfoData(
                new WrappedGameProfile(player.getUniqueId(), player.getName()),
                player.getPing(),
                EnumWrappers.NativeGameMode.SURVIVAL,
                WrappedChatComponent.fromText(player.getName())
        )));

        int randomSkin = new Random().nextInt(skins.size());
        Skin skin = skins.get(randomSkin);

        //WrappedSignedProperty texture = new WrappedSignedProperty("textures", skin.getValue(), skin.getSignature());
        //profile.getProperties().put("textures", texture);

        protocolManager.sendServerPacket(player, addPacket);
    }

There is an remove & add.

I did this and when I do /kill my skin is an alex.

merry knoll
#

you need to send it to everyone

#

not the player being their skin changed

#

@deep patrol

deep patrol
#

I did that

#

too

#

dosen't work.

#

you mean brodcastPacket?

deep patrol
merry knoll
#

whoever you send it to, removes that character from them

#

then readds

deep patrol
#

Huh

merry knoll
#

you are telling their client

#

remove x player

#

spawn x player

deep patrol
#

Yes.

merry knoll
#

addPacket.getPlayerInfoDataLists().write(1, Collections.singletonList(new PlayerInfoData(
new WrappedGameProfile(player.getUniqueId(),

#

the uuid here needs to be the targer person

#

and the packet needs to be sent to all players

#

(or the ones close by)

#

i dont use protocol libs

#

so i am not sure the exact stuff in it

deep patrol
#

I do have the mappings for it but its even more confusing.

#

I just didn't know at this point.

#

How would I do this without protocol lib? Creating a packet

#
 ClientboundPlayerInfoRemovePacket removePacket = new ClientboundPlayerInfoRemovePacket(Collections.singletonList(player.getUniqueId()));
deep patrol
# merry knoll addPacket.getPlayerInfoDataLists().write(1, Collections.singletonList(new Player...
    public void SetSkin(Player player) {

        CraftPlayer craftPlayer = (CraftPlayer)player;
        ServerPlayer serverPlayer = craftPlayer.getHandle();
        GameProfile profile = serverPlayer.getGameProfile();
        ServerGamePacketListenerImpl connection = serverPlayer.connection;


        ClientboundPlayerInfoRemovePacket removePacket = new ClientboundPlayerInfoRemovePacket(Collections.singletonList(player.getUniqueId()));

        connection.sendPacket(removePacket);

        int randomSkin = new Random().nextInt(skins.size());
        Property property = new Property("textures", skins.get(randomSkin).value, skins.get(randomSkin).signature);

        profile.getProperties().removeAll("textures");
        profile.getProperties().put("textures", property);

        ClientboundPlayerInfoUpdatePacket addPacket = new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, serverPlayer);
        connection.sendPacket(addPacket);

        Level level = serverPlayer.level();

        CommonPlayerSpawnInfo playerSpawnInfo = new CommonPlayerSpawnInfo(
                level.dimensionTypeRegistration(),
                level.dimension(),
                0,
                serverPlayer.gameMode.getGameModeForPlayer(),
                serverPlayer.gameMode.getPreviousGameModeForPlayer(),
                level.isDebug(),
                true,
                Optional.of(GlobalPos.of(level.dimension(), serverPlayer.getOnPos())),
                serverPlayer.getPortalCooldown()
        );

        ClientboundRespawnPacket respawnPacket = new ClientboundRespawnPacket(playerSpawnInfo, (byte) 0x01);
        connection.sendPacket(respawnPacket);

        skinStorage.put(player.getUniqueId(), randomSkin);
    }

I fixed it the only issue when I use the respawn packet it takes forever to long back in the tab still shows nothing and the skin layers are glitched but when I do /kill they are fine.

merry knoll
#

i havent done skins before

#

you could probably kill them clientside worst case

#

with packets

deep patrol
#

You don't need to its just respawn but I am not sure how to do it without it taking 10 years to findout.

deep patrol
merry knoll
#

as in send the death packet

torn heart
#

that fixed the tab stuff for me

torn heart
minor summit
#

you can also use Paper's profile API and it'll take care of everything for you :)

vernal ledge
vernal ledge
#

Please can anyone help me

vernal ledge
#

I've already found a solution

bleak arch
#

Hi

#

Does anyone know an API to create custom inventories?

tawny bear
#

does anyone know a way show ActionBar title in 1.20.1?

#

I used me.lemonypancake's ActionBarAPI back in 1.19.4

#

Problem solved! Thanks guys

tawny bear
#

Guys, how do you guys reload your plugin when you guys are developing?

#

Am i the only one who thinks reopening the server takes too much time?

merry knoll
#

if you use the paper plugin on gradle you can rerun etc quite easily

#

as in update file, rerun the server etc

#

or you can use a custom build script

stuck hearth
#

Hot swap

#

Fastest reload you'll get

tawny bear
#

is this the right thing?

stuck hearth
#

That's probably more convoluted than it needs to be.

You could probably use the plugin Aki mentioned and run a debug over the run server task and then you could do it from there.

tawny bear
#

Holyyy

#

Never knew this feature

#

this is crazy

#

life changer

#

Thanks alot!!!

#

@stuck hearth love you

river solstice
#

does Bukkit.getPlayer("SomeName") return a player if there's a player SomeNameTwo online?

merry knoll
river solstice
#

yeah I guess so too

#

I suppose it's for mistypes or for not needing to type full player name

#

have to re-do most of my stuff to getPlayerExact now Angry

torn heart
#

feels like that could cause some issues

dusky harness
minor summit
dense drift
#

Ye lol

#

Who the fuck expects it to do this weird stuff

merry knoll
#

who even needs the closest match

tardy cosmos
#

my favorite part is giving it an empty string returns the first player online in the getOfflinePlayers list

dense drift
pulsar ferry
#

Ah yes, the "expected behavious"

dense drift
#

Is that just a case insensitive search?

broken elbow
dense drift
#

Oh god, I was focusing on that break and I didn't see the very last return 😐

#

Welp, time to change the code of all of my plugins pepe_kek

minor summit
#

also getPlayerExact isn't an exact match either, it's case insensitive :^)

dense drift
river solstice
#

anyways, is it possible to create a chest (visible, interactable) for a specific player only? Is it possible using packets?

dense drift
#

Yes, why not, but you probably need to use packets for interaction as well

minor summit
#

i mean uh you can probably do that with just the api, with the inv open event, checking the block and opening your own inventory instead

torn heart
minor summit
#

oh yeah i missed that part

#

there's sendBlockChange or w/e but you'll have to deal with the server sending back the correct block and stuff

torn heart
#

yea that would be annoying

pure crater
#

So there is a conflict I think where Player#getLocation is marked with @NotNull but OfflinePlayer#getLocation is marked with @Nullable. As a result, Checker Framework is acting up and saying that the method returns an @Nullable Location, and I have to cast (@NonNull Location) every time I use the method so it doesn’t mark it as an error.

#

Does anyone know how I could fix this issue. I hate seeing the redundant casts in my code

sterile hinge
#

I'd assume this should be handled by checkerframework, but I didn't find anything about that

pure crater
#

Who tf is annotating these Bukkit classes ☠️

dense drift
#

// ignore all

#

I think the OfflinePlayer method is nullable because the class doesn't necessarily represent a player that has joined the server. Although idk why it has a getLocation method 😐

sterile hinge
#

from my understanding it even returns a location if the player is offline, but only if the player played on the server before?

pure crater
#

Yeah

sterile hinge
#

I mean it makes sense then this way, but the return type is basically covariant with respect to nullability and I'd expect checkerframework to deal with that properly

pure crater
#

Yeah I assumed that the lower classes annotations should override any above classes annotations

#

Oh well. Maybe I’ll just add a method to my class which gets the location anyways and annotate it with @NonNull. I have a GamePlayer class that wraps a Player object anyways

lyric gyro
#

hey, i been trying to use placeholderapi in my plugin (not create my own placeholder, use statistic placeholder) and idk what i been doing wrong

proud pebble
#

we cant try to help without seeing ur code of what youve been trying

#

also show the placeholder youve been trying to parse

#

the full thing

#

so %yourplugin_placeholder% for example

lyric gyro
dense drift
#

Does anybody know how to create a cloudflare pages app using typescript?
This is the command that I use and it generates the template with js shrug
npm create cloudflare -- <directory> --framework react --ts true --deploy false

primal junco
#

Is this channel just for dev support in general

#

or like specifically for minecraft development

tawny bear
#

Guys, I am currently using SQLite to store all my user data and things.
However, I have a concern about server lag.
I made a separate leveling system in my plugin and might have to save it to db every second, will this lag my server if a lot of players use it?

or should I make a system that loads everything into db every certain period?

NVM making a system that writes back to DB every certain period

torn heart
primal junco
#

fair

#

I'm trying to get NGINX to work rn and it just refuses to cooperate

primal junco
#

Ok I got everything mostly working now just that one problem keeps persisting

#

I have to use the ?v2 flag at the end for one page or it will show up as not found and same with some static files like css and js

#

Some static files i need to go up to v5 to get the actual version stored in the folder

torpid raft
primal junco
#

I already fixed it by now
I jus gave up and switched from Flask to Django and now it works fine

torpid raft
#

nice

primal junco
#

almost at least my css is still kinda crap lol

#

but that is just bcs i suck at making good css ig

dense drift
#

I have a few inputs created with this function https://paste.helpch.at/qiwasasemu.js, but as soon I add a handler for onChange I can not type in the input anymore 😐 any idea why? πŸ˜…
const [className, setClassName] = useState('');
[...]
createField('class', 'Class', setClassName)

river solstice
#

value={className}
onChange={e => setClassName(e.target.value)}

dense drift
#

ok, now I can type but I need to click the element after each key 😐

pulsar ferry
#

What are you trying to do?

#

Because right now you are causing the component to re-render on every key press, which is why it loses focus

dense drift
#

display a set of fields based on the value of a select (for option a display 1 field, for option b display 3, etc.), then use their values for a request

#

ofc the code is a mess kek there can be 1000 reasons why it behaves weird

pulsar ferry
#

A select or a text field? thonk

dense drift
#

Select, this (Class) is one of the fields controlled by it

pulsar ferry
#

Then why are you updating the text field on change? Shouldn't the select be the one updating the component?

dense drift
#

I want to store the value of the input in that state, is onChange not the function I should use?

#

or is it onInput thinking

pulsar ferry
#

The issue is the state, because the state is attached to the component it causes a re-render on value change which isn't what you want, just use a variable to store the input instead

dense drift
#

Yes

river solstice
#

yeah the issue is if a state in your component changes, this function gets called, which causes the field to be re-rendered, so in this case every time you call setClassname

dense drift
#

yup, that worked

royal hedge
#

idk why adventure even has that

#

theyre tryna be too much now imo

dense drift
#

wdym?

#

every time I look at adventure I see too much high level stuff for me kek

royal hedge
#

like Pointers

#

and the options

#

and serializers using services

dense drift
#

yup

stuck hearth
#

Pointers have been there forever

#

And are pretty useful if you're using a platform that doesn't suck

#

Or even if you are

pure crater
#

bro what

#

why is checkerframework complaining lol

river solstice
#

step 1 dont use checker framework

dusky harness
#

wait checker framework has a compile-time checker?

#

if so thats kinda cool πŸ‘€

pure crater
#

also u dont have to annotation spam cuz it inserts them into the bytecode at the end

pure crater
#

assumes @NonNull for everything unless u mark @Nullable

dusky harness
#

ohhh

#

hmmm

#

interesting

pure crater
dusky harness
#

I feel like it should be the other way around tbh but

#

Β―_(ツ)_/Β―

pure crater
#

hmm why so

dusky harness
#

because like if you forget to annotate it then it's safer to assume nullable

#

and then it'd trigger the code analysis if you need it notnull

pure crater
#

hm that's true

dusky harness
#

also guess what pulse

pure crater
#

What

#

mr dkim

dusky harness
#

idk if you remember but I remember talking about this a while ago but

#

😎

pure crater
#

Good shit good shit good shit

#

I do in fact remember

#

It was a very long time ago lmao

dusky harness
#

lol yeah

pure crater
#

back in the spigot days

#

when we all used to talk there lmao

dusky harness
#

πŸ˜”

#

the good ol days

pure crater
#

@void orchid bird?

void orchid
#

Yeah haha

pure crater
#

Lol

void orchid
#

πŸ˜…

pure crater
#

i remember when i first joined the server Gaby kicked me cause i was being annoying lmao

dense drift
#

did I? lol

pure crater
#

I think lol but it was like 4 years ago

#

back during covid

graceful hedge
#

lol

royal hedge
#

for all checkerframework knows, this.announcement could have changed by a different thread by the time you use it again

#

put it into a local variable then use that in both places

royal hedge
dusky harness
#

I just assumed it was like other libraries

#

where it just has the annotations + IDEs do the stuff

royal hedge
dusky harness
#

or I guess if I try setting it to null

#

yeah

#

idk I still think nullable is better but I guess you can't really have it notnull accidentally so its not a big deal

royal hedge
#

idk

#

most apis dont want anything to deal with null

pure crater
#

I ended up just making my classes extend a higher class so it doesn't have to pass null for an argument to set this.announcement to null

dusky harness
#

oh yeah whoops I just ignored your question lol
but kotlin has that same behavior as well

bronze robin
#

can someone help me to make a meun close when an object has been clicked? and make it so i cannot take out stuff or add stuff into the menu

#
    public void onInventoryClick(InventoryClickEvent event) {
        if (event.getView().getTitle().equals("Customize Kit")) {
            event.setCancelled(true); // Prevent item taking or dropping

            // Allow players to move items around in the GUI
            if (event.getCurrentItem() != null) {
                Material type = event.getCurrentItem().getType();
                if (type == Material.BLACK_STAINED_GLASS_PANE) {
                    event.setCancelled(true); // Prevent interaction with black stained glass panes
                } else if (type == Material.RED_WOOL) {
                    // Close the GUI when red_wool is clicked
                    Player player = (Player) event.getWhoClicked();
                    player.closeInventory();
                } else if (type == Material.LIME_WOOL) {
                    // Save the customized kit for this player
                    Player player = (Player) event.getWhoClicked();
                    savePlayerKit(player);
                    player.sendMessage("Your customized kit has been saved!");
                }
            }
        }
    }```
#

this aint working for me

minor summit
#

you can't call closeInventory directly in the click event, you should use the bukkitscheduler to close it on the next tick

#

https://jd.papermc.io/paper/1.21/org/bukkit/event/inventory/InventoryClickEvent.html

Methods that change the view a player is looking at should never be invoked by an EventHandler for InventoryClickEvent using the HumanEntity or InventoryView associated with this event. Examples of these include:

HumanEntity.closeInventory()
HumanEntity.openInventory(Inventory)
HumanEntity.openWorkbench(Location, boolean)
HumanEntity.openEnchanting(Location, boolean)
InventoryView.close()

To invoke one of these methods, schedule a task using BukkitScheduler.runTask(Plugin, Runnable), which will run the task on the next tick. Also be aware that this is not an exhaustive list, and other methods could potentially create issues as well.

bronze robin
minor summit
#

all good

bronze robin
#

❀️

ruby vale
#

Hey guys, is there anyone here that would like to be a dev on my server? We’ve been having issues and need help!

#

It is a velocity server

#

Just dm me if you can help out

orchid otter
ruby vale
#

Well soon it will be public (hopefully soon)

orchid otter
spiral prairie
#

Lol

ruby vale
orchid otter
#

u said ur server us a velocity server

#

thats a proxy

ruby vale
#

Yeah..

#

And…?

orchid otter
#

brother

ruby vale
#

What

#

?

#

Wuts wrong with it being a proxy?…..

#

@orchid otter ?…

orchid otter
#

u need to calm down man

ruby vale
#

Wuts happening

#

I’m confusled

orchid otter
#

its just useless information with the context, u ask ppl to help ur server dev wise, and the information u choose to share is that u use the most popular proxy

#

i dont know if its just me but most of my server development happens on actual minecraft servers

ruby vale
#

It is an actual Minecraft server

orchid otter
#

theres so much u could had shared, gamemode, even in general where u need help etc but u share what kind of proxy u use

ruby vale
#

A proxy is connected servers..

orchid otter
#

thats it, poked fun at that

ruby vale
#

(I’m still confused)

orchid otter
#

brother, a proxy is what proxies connections to your minecraft servers

ruby vale
#

Wut

orchid otter
#

πŸ‘

ruby vale
#

…..

#

I’m still confused πŸ˜…πŸ˜…πŸ˜…

orchid otter
#

me too buddy

ruby vale
#

My question is what is wrong with a proxy server, and wdym β€œactual Minecraft servers”

orchid otter
#

nothings wrong with it, its just not the most important information to give when looking for devs

#

its like when a mechanic asks what car u have and u say a blue one

ruby vale
#

And what do you mean β€œactual Minecraft servers”

orchid otter
#

spigot paper fabric forge

#

they are the "actual minecraft servers"

ruby vale
#

I’m using paper

dusky harness
#

i think you guys are both overthinking this too much πŸ₯²
hypixel (which is a network) is commonly referred to as a server,
and Wuzzy's main point is that there needs to be more information if you want people to help (and it's unlikely for people to DM with no info)

#

also this isn't really the right channel

ruby vale
#

I did in request free

sonic nebula
#

creating H2 database in bukkit

#

it should create it when connecting to database

#

how ever what path should be there

#

since it doesnt allow to create file

sonic nebula
#

nvm done

#

shit bukkit paths

minor summit
#

huh

river solstice
#

tony falk adventures

dusty frost
#

someone should make a comic

river solstice
#

bro will bash anything that isnt made by him

#

his code is the cleanest

#

his name is.. Tony, Tony Falk

royal hedge
sonic nebula
dense drift
#

Path#toAbsolutePath ?

minor summit
#

lmao what

clear walrus
#

How do I upload the a PlaceholderPAPI plugin to the eCloud?

wanton palm
clear walrus
torn heart
#

I been there it's great

clear walrus
wanton palm
clear walrus
rugged bane
#

I'm working on a plugin to track things that players do ingame, if I want to listen to the event last, it's MONITOR right that I listen to?

icy shadow
#

yes

spiral prairie
#

Is there a way to set different Java versions for different tasks? I want my build task to use 17 while the runServer task has to use 21, any ideas?

dusky harness
#

the plugin would probably run java -jar server.jar allowing it to change the java version via some configuration

#

but I never used it so idk

#

but I don't think gradle itself runs on any specific java version

minor summit
#

you can specify the launcher used in the runServer task
or the compiler toolchain used in the compile task

#

if you give me half an hour to get out of bed I'll give you an example pepelaugh

#

alternatively use java 21 toolchain for everything, and set the compiler release flag to 17

spiral prairie
#

ignore the .set it was a change after it didnt work

minor summit
#

those are different, the first one is referring to the task javaToolchains, the second one isn't in the tasks scope so it's using the project's javaToolchain

#

I hate that

spiral prairie
royal hedge
#
java {
  ...
  toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}

tasks.withType<JavaCompile> {
  options {
    release.set(17)
  }
}
spiral prairie
#

that seems to have worked, how do I check if it's compatble with that

minor summit
#

compatible?

spiral prairie
#

i mean if the compiled jar is now compiled against j17

minor summit
#

it is

#

zzz

#

unzip and javap or smth

#

but trust

minor summit
royal hedge
#

ig

#

u can change it tho

royal hedge
fallen eagle
#

is it possible to make like a mcmmo leaderboard

#

with like holograms

#

1-10 power level display

torn heart
#

everything is possible

cobalt nacelle
dusky harness
cobalt nacelle
#

hey there guys, im making a iceboat racing plugin for my server. and this is the error i found

#

alright sure.. wait

dusky harness
#

It seems like you're including the PAPI plugin inside your jar

proud lodge
cobalt nacelle
#

my pom.xml file

dusky harness
cobalt nacelle
#

alright

#

ill try it now

dusky harness
#

did you try mvn clean package?

cobalt nacelle
#

no

#

damn i keep forgetting everything.. ill try that now

#

still doesn't work

dusky harness
#

hmmm

cobalt nacelle
#

hmmmmmm..

#

hey, do you think theres a solution for this?

spiral prairie
#

Open the jar and check

cobalt nacelle
#

should i just manually open my plugin jar?

spiral prairie
#

7zip for example

cobalt nacelle
#

i don't really get it, i don't open jar files

#

and ive never opened one

minor summit
#

it's just a zip file

cobalt nacelle
#

yep, im confused right now.. could you explain?

proud lodge
minor summit
#

there isn't really a lot to explain, a jar file is just a zip file

cobalt nacelle
#

oh

#

alright

#

after opening what should i look for?

minor summit
#

are the packages and classes for papi in your jar file?

#

me/clip/placeholderapi etc

cobalt nacelle
#

yeah

minor summit
#

yeah it shouldn't

cobalt nacelle
#

alright so how do i get rid of it?

minor summit
#

how are you building/compiling your plugin?

#

doubt that's gonna fix the issue but uhhh yeah

cobalt nacelle
#

oh yeah

#

it works now

#

thanks for your assistance

minor summit
#

nice

proud lodge
fallow thicket
#

hello, I'm trying to implement adventure api in a spigot plugin, but I'm getting a NoClassDefFound

broken elbow
#

You have to bundle adventure-bukkit with your plugin JAR file

tawny bear
#

What is the best way to spawn loots in a map? in chest and barrels

merry knoll
#

cache locations and/or chests

#

then populate

#

if you want to populate without predetermined chest locs

#

look into procedural gen algorithms

dense drift
cloud torrent
#

Hello, I would like to publish my Money API on Github so that others can use it. Is anyone familiar with Jitpack and could explain how to set this up?

dusky harness
#

iirc jitpack usually doesn't require any extra setup

cloud torrent
warm steppe
#

there are at least 2 red flags

#

in your repo

#

can't say that my repos are better so it evens out

cloud torrent
#

im here for tips so im happy to hear it

warm steppe
#

nah i don;t have tips, i like sometimes like to shit on other peoples work for no actual reason

cloud torrent
#

so do you know how to include Jitpack in my API?

warm steppe
#

open jitpack site it literally tells you what to do

stuck hearth
#

This is the way, it'll verify it's even a valid version to use

cloud torrent
#

I think I have managed it, could someone possibly test whether it really works and then write to me privately?

stuck hearth
#

Jitpack will tell you when you request a version on the website.

It'll attempt to build it, and if it can't it'll have a red paper thing you can click and see the log

#

Or green if it's good, log is still there either way

cloud torrent
#

ok thanks

torpid raft
#

amazing

orchid otter
#

that is very nice

somber gale
#

What differences are there between CompletableFuture#handleAsync(...) and CommpletableFuture#supplyAsync(...) outside of the latter apparently being static?

sterile hinge
#

one creates a cf and one adds a completion stage on top of another cf

somber gale
#

And which is which?

#

I assume handle adds and supply creates? Given supply is static and handle is not, therefore requiring a pre-existing CF instance

#

Also, is there any other notable difference, or could I use them interchangably?
Like could I switch

CompletableFuture<Something> cf = new CompletableFuture<>();
cf.handleAsync((something, ex) -> ...);

with

CompletableFuture.supplyAsync(() -> ...);

and it would work the same?

#

Actually, I can already see the differences here

sterile hinge
#

the lambda passed to handleAsync is called when the receiver completes

river solstice
#

handleAsync is used to process the result of a CompletableFuture when it completes, either normally or with an exception

CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> {
    // Some computation
    return 1;
});

CompletableFuture<String> handledFuture = future.handleAsync((result, ex) -> {
    if (ex != null) {
        return "Failed: " + ex.getMessage();
    } else {
        return "Result: " + result;
    }
});

supplyAsync is used to start an asynchronous computation that supplies a result

CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> {
    return 1;
});
wheat fog
#

hey

#

i cant send screenshots πŸ€¦β€β™‚οΈ

neat pierBOT
wheat fog
#

i'm wondering if there's a way to make a initalize an NMS ServerPlayer without calling getPlayerAdvancements()
https://imgur.com/a/vMoVYkz

#

because it's really unoptimized by pufferfish/vanilla server

#

and it makes the server lag

#

by fetching an NPC's advancements

#

and in this case the NMS NPC is used for making per/player custom tablists

#

I don't really wanna rebuild pufferfish to just fix this bug

#

but I might have to

#

but i'm here to ask that if there may be another way to fix this

warm steppe
#

wouldnt it be just a custom patch of yours?

#

if so then i dont see a problem

wheat fog
#

how can I do that?

#

^ found it

#

might try but i will check if i can get around it using reflection

#

damn because i use purpur applying patches will be alot harder

#

maybe i'll try my luck with this one

leaden sinew
wheat fog
#

I dont think you can do it without using ServerPlayer

torn heart
# wheat fog I dont think you can do it without using ServerPlayer
public ClientboundPlayerInfoUpdatePacket(EnumSet<ClientboundPlayerInfoUpdatePacket.Action> actions, ClientboundPlayerInfoUpdatePacket.Entry entry) {
        this.actions = actions;
        this.entries = List.of(entry);
    }```
you can pass in an entry which is less complex
```java
public static record Entry(
        UUID profileId,
        @Nullable GameProfile profile,
        boolean listed,
        int latency,
        GameType gameMode,
        @Nullable Component displayName,
        @Nullable RemoteChatSession.Data chatSession
    )```
#

most of the other packet stuff is done with entity id's isn't it

#

you absolutely can do this without the extra boiler plate, just gotta be a big boy and figure it out

wheat fog
#

In 1.21 you must provide ServerPlayer in a ClientboundPlayerInfoUpdatePacket

#

and yes that what I use.

#

maybe its possible to circumvent this stupid change by just initalizing a ClientboundPlayerInfoUpdatePacket using reflection

torn heart
#

ya jus do that

#

1.21 still using entries

wheat fog
#

Yea I can try, idk why the f they would do this lol

#

to just require ServerPlayers instead of entries lol

wheat fog
narrow pivot
#

is it ok to ask questions here?

dusky harness
narrow pivot
#

perfect

#

thank you

#

I'm trying to make a custom fox entity by extending EntityFox. Its going well so far, but the method to add trusted players is friendly in nms meaning I can't call it from my subclass. What's the best way to add player UUID's to the fox's trust list?

narrow pivot
#

access modifier

dusky harness
#

friendly isn't an access modifier

#

but there seems to be a getTrustedUUIDs() method that you may be able to override

#

oh

narrow pivot
dusky harness
#

ah default

#

hmmmmmmm

narrow pivot
#

its no modifier