#development

1 messages · Page 93 of 1

atomic trail
#

It's installed on server startup into the server directory called libraries

#

The PluginLoader is the only way right?

#

Or does that even download it into the libraries directory? Isn't that just for the jar

dusky harness
#

such as by using slimjar

dusky harness
#

you could binary search the plugins

  • delete libraries folder
  • remove half the plugins
  • see if kotlin appears
  • if so, bring back half of the remaining removed plugins, and if not, remove half of the current plugins
  • repeat
#

until you narrowed it down to 1 plugin

atomic trail
dusky harness
#

wait hold on

#

why do you care about kotlin being installed thonking

#

are you sure this is necessary

atomic trail
#

Basically it's a system of plugins where they MUST get the kotlin version from the core, which shades it, but they get it from somewhere else

#

I'm assuming the libraries from server as it's downloaded there and I've disabled all plugins that shaded kotlin

dusky harness
atomic trail
#

Nope, it works when they're the only 2 plugins on the server

#

Wdym by isolated classloaders?

dusky harness
#

oh wait or maybe a plugin shades it without relocating

atomic trail
#

Well, it happens because EcoCrates must use the instance of kotlin which is provided by Eco (the core), but it gets it from the server libraries

atomic trail
dusky harness
atomic trail
#

Looked through all the jars and disabled all with the org.jetbrains.whatever package

dusky harness
#

kotlin uses the kotlin package

atomic trail
atomic trail
#

I think it's kotlindsl or something but yeah

#

I found the ones that shaded kotlin and disabled them

#

I think I'll just have to binary search for the issue and then work from there

#

And then hope that it's an easy fix

dusky harness
#

but finding the problem plugin is a good step to finding the real issue

atomic trail
#

Yeah, because the plugins do work by themselves, it's when using them with more plugins that's the issue

atomic trail
dusky harness
#

or wait

#

nevermind

atomic trail
#

It uses kotlin but doesnt shade it, it requires the instance from eco

dusky harness
#

mhm

crystal reef
#

I need someone who is experienced at php to help me add a login system to my litebans interface

river solstice
#

50€ and I can do it for you

crystal reef
#

help a brother out man

#

please

plain lagoon
torpid raft
#

php is a very marketable skill you wont regret learning it tbh

crystal reef
#

any good sources to learn from that you know?

river solstice
#

yeah, internet

torpid raft
#

i dont know php, but in my experience you should not be overly concerned with finding the best source when learning something new

#

this applies to anything

river solstice
#

there is an abundance of information out there nowadays, your job is to pick one and start from there

minor summit
#

WHAT IS THIS

#

This video has been removed for violating YouTube's Terms of Service@stiff cape

shell moon
#

(It was a fake Free nitro with scam link)

#

Yeah, his account was hacked xd

swift portal
#

I'm using Skript to make "soulbound" items with a specific lore line not drop on death and be returned after respawn. The skript saves and gives the item back correctly — that part works.

The problem is: the item still drops when the player dies.

    set {_uuid} to victim's uuid
    clear {soulbound.items::%{_uuid}%::*}
    loop all items in victim's inventory:
        if lore of loop-item contains "&8(&7Soulbound&8)":
            add loop-item to {soulbound.items::%{_uuid}%::*}
            remove loop-item from victim's inventory

on player respawn:
    loop {soulbound.items::%player's uuid%::*}:
        give loop-value to player
    delete {soulbound.items::%player's uuid%::*}```
#

can anyone help solve this issue?

weary finch
#

remove loop-item from drops

#

@swift portal

swift portal
weary finch
#
    set {_uuid} to victim's uuid
    clear {soulbound.items::%{_uuid}%::*}
    loop all items in victim's inventory:
        if lore of loop-item contains "&8(&7Soulbound&8)":
            add loop-item to {soulbound.items::%{_uuid}%::*}
            remove loop-item from drops

on player respawn:
    loop {soulbound.items::%player's uuid%::*}:
        give loop-value to player
    delete {soulbound.items::%player's uuid%::*}```
#

Victim is already dead so the item has dropped

#

so it went into the items dropped method

swift portal
#

It still drops

#

@weary finch

weary finch
#
    set {_uuid} to victim's uuid
    clear {soulbound.items::%{_uuid}%::*}
    loop drops:
        if lore of loop-item contains "&7Soulbound":
            add loop-item to {soulbound.items::%{_uuid}%::*}
            remove loop-item from drops

on player respawn:
    loop {soulbound.items::%player's uuid%::*}:
        give loop-value to player
    delete {soulbound.items::%player's uuid%::*}```
#

Try now @swift portal

swift portal
#

still drops and now it doesn't go back to my inventory after death.

#

@weary finch

weary finch
#

Ok, go back to that previous

swift portal
#

Any idea on why this doesn't work?

weary finch
swift portal
#

Alright will do thank you!

floral fern
#

Unresolved dependency: 'me.clip:placeholderapi🫙2.11.6'

Why, when
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/releases/</url>
</repository>
and
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.6</version>
<scope>provided</scope>
</dependency>

#

@hushed badge@pulsar ferry@dawn viper

#

@wheat carbon

hushed badge
#

please dont ping unnecessarily

floral fern
#

Where should Maven find the file when there's nowhere to download it from?

hushed badge
#

in browser u need the /#/ to view the index, maven will find it from the link above

floral fern
#

okay, i downloaded and will add with local lib

hushed badge
#

why?

#

the repo is literally there

floral fern
#

Error

hushed badge
#

ok

#

did u refresh the dependencies after adding the new repo?

neon pewter
#

I already assign default value to the interface but why there still warning that calling fetch can return null ?

sterile hinge
#

The warning isn’t about the return value of the fetch method but of the getAnnotation call

#

I guess it‘s not smart enough there to understand the previous if covers that

neon pewter
#

oh i checked and get annotation is nullable so i guess that is where the warning is

lyric gyro
neat pierBOT
peak flame
#

Hello everyone,

I'm not sure if this is the correct channel for my question .. please let me know if I should post elsewhere.

I'm trying to disable the highlight for inventory slots, or ideally, make it so that the highlight appears only over the item itself within the slot (see this example: https://gyazo.com/8c0f6208a12bdda3e8041569a84514af).

I've seen several Minecraft servers implement this, but I haven't figured out how to achieve it. Any guidance would be appreciated!

quaint sequoia
#

Cause that pic is 100% made with ItemsAdder

peak flame
quaint sequoia
peak flame
#

I am using my texture pack with my own plugin that I am developping

quaint sequoia
#

That's how those servers are making custom GUIs like that

#

They're not just changing the texture of the inventory

peak flame
#

Oh so the item highlight thing is linked to itemsAdder?

quaint sequoia
#

What they do is that they change the way a font looks for special characters and then they just show those characters
So instead of fx.
$ being $ it would show an image

#

does that make sense?

peak flame
#

Coz I know how to add a custom texture ... it's just that the slot highlight is annoying and ruining the menu I made (ok leme reread what you wrote)

quaint sequoia
#

so the menu is actually the inventory title text that is covering the whole inventory

#

and thats why the highlight isn't shown

#

since the "image" from the custom font from ItemsAdder is covering it

#

same way that ItemsAdder can give you custom emojis in chats. It's just a special character that they've changed the font of

#

This is an example from their docs

smile:
  permission: smile
  show_in_gui: true
  path: "font/emoji/smile.png"
  symbol: "鄿"
  scale_ratio: 9
  y_position: 8
#

then here the symbol is changed to the image

#

so the image is shown when you type the symbol in chat or show it in the tablist etc

#

as the font itself is changed

#

They change it with a resourcepack tho, so you could technically do it yourself

peak flame
#

I know how to add custom textured Items and the texture for the gui. All I'm struggling with right now is the hover animation on an inventory slot that is limited only to the borders of the item's texture. And not the whole item slot.

quaint sequoia
#

now imagine that you put a picture on that A instead of a normal bitmap font looking A

#

Now imagine if you scale that image so it's way bigger than what the A originally was

#

Now you got a font with an A that looks like an image, and this way you can cover the whole menu with just a symbol

#

the image you sent is the exact same. Here I'm just guessing that they're ofc still putting a ui over the inventory so that the vanilla highlight is being covered, and then they just put an item in the menu with that texture and move the item around

#

Notice how big the gap is from the coin and up to the "infinibag"

#

that's cause the top row of the inventory is in between

peak flame
#

Damn okay I am not sure I understood you fully. I don't know how I'll be able to implement that in my own plugin + texturepack without relying on itemsadder

quaint sequoia
#

It's not the easiest thing no

west socket
#

Does anyone have experience with/know if its possible to have custom models (something like ModelEngine) appear on bedrock with geysermc?

west socket
#

Hi

dense galleon
weary finch
dense galleon
weary finch
#

No such object: maven-central/maven2/org/bouncycastle/bcpkix-jdk18on/1.81/

dense galleon
#

I don't understand what I am meant to be doing then, I'm sorry

weary finch
#

You can ask the dev to fix it. Only real fix

#

Which plugin is it

dense galleon
#

Right, he's MIA though

#

Protoweaver

weary finch
dense galleon
#

Paper, 1.21.7

weary finch
dense galleon
#

Yeah I have been trying to do that too

#

There isn't any issues whatsoever though

#

From what I can tell

#

I've been at it for two hours, if you find anything lmk

weary finch
dense galleon
#

Yeah I have

#

It builds fine

weary finch
#

same error?

dense galleon
#

Nope, no error whatsoever when building

weary finch
dense galleon
#

Oh, yeah it's the same errors still

weary finch
#

Ah, Its a paper issue

weary finch
dense galleon
weary finch
#

No

dense galleon
#

What do you mean then?

weary finch
#

bouncy_version=1.81

#

papermc is on 1.75

#

change that to 1.75

#

and well his is uhhh blank

#

so it wont work even with the fix

dense galleon
#

Are you saying to rebuild it changing the version to 1.75?

weary finch
#

Like I said, That wont fix it though because his repo on paper does not include his library

weary finch
dense galleon
#

Right, so I should just wait for him to fix it then? :/

weary finch
#
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:473) ~[maven-resolver-impl-1.9.18.jar:1.9.18]
        at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261) ~[maven-resolver-impl-1.9.18.jar:1.9.18]
        at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:353) ~[maven-resolver-impl-1.9.18.jar:1.9.18]
        at org.bukkit.plugin.java.LibraryLoader.createLoader(LibraryLoader.java:112) ~[paper-api-1.21.7-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:125) ~[paper-1.21.7.jar:1.21.7-26-533d93c]
        ... 9 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact me.mrnavastar:r:jar:1.0.9 in central (https://maven-central.storage-download.googleapis.com/maven2)
        at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:42) ~[maven-resolver-connector-basic-1.9.18.jar:1.9.18]
        at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:417) ~[maven-resolver-connector-basic-1.9.18.jar:1.9.18]
        at org.eclipse.aether.util.concurrency.RunnableErrorForwarder.lambda$wrap$0(RunnableErrorForwarder.java:66) ~[maven-resolver-util-1.9.18.jar:1.9.18]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        ... 1 more```
#

See, I fixed the bouncycastle thing and now it says that

#

It might be a paper issue

#

Im trying one more thing @dense galleon

dense galleon
#

Okay thank you so much I really appreciate it

weary finch
#

thats up to you!

#

modifications to make:

plugin.yml - In Paper

author: MrNavaStar
version: 'debug-build'
main: me.mrnavastar.protoweaver.loader.Paper
api-version: '1.13'
load: STARTUP
libraries:
  - org.apache.fury:fury-core:0.10.3
  - io.netty:netty-codec-http:4.1.97.Final
  - io.netty:netty-codec-http2:4.1.97.Final
  - org.bouncycastle:bcpkix-jdk18on:1.75```

gradle.properties:
`bouncy_version=1.75`

build.gradle:
```    repositories {
        maven { url "https://repo1.maven.org/maven2" }
        mavenCentral()
        maven { url "https://maven.minecraftforge.net/" }                   // Forge
        maven { url "https://repo.papermc.io/repository/maven-public/" } // Paper + Velocity
        maven { url "https://api.modrinth.com/maven/" }                     // Modrinth
    }```
#

@dense galleon

#

ah nevermind, Wont work. needs a custom class loader

#

I had to do a massive work around

dense galleon
#

Api version 1.13??

dense galleon
#

You don't have to keep going it's okay

wary cloud
#

hey guys i need some help im trying to make a custom token enchantment system when i click on the enchantment in the menu it doesnt actually give me the enchantment and it doesnt pull the token from my inventory

worldly bolt
#

level_1:
display_name: "&aLevel 1"
material: hdb-2492
slot: 10
lore:
- "&7Requirement: 30 mins"
- "&eStatus: %playtimerewardsplus_level_1_status%"
click_commands:
- '[player] playtimerewardsplus claim 1'

#

this is the code i have been using to create a deluxmenu and i assigned a headdatabase head to it idk why its not showing in the menu

#

can someone help ?

novel drum
#

Hello ! Is it possible to find the source of DeluxeMenus 1.13.6 please?

neat pierBOT
#
Deluxemenus - Version List
Spigot:

1.8.8
1.12.2
1.13.2
1.16.5
1.20.2

Version:

v1.10.5
v1.13.7
v1.14.0 - Latest
v1.14.0 - Latest
v1.14.0 - Latest

proud pebble
#

id assume to use that you gotta have it installed

worldly bolt
proud pebble
worldly bolt
#

Everything is normal in console

dry summit
#

do any1 of you have bitcoin mining programs to mine ? or any people actually mining ?

true ember
#

I’m still a beginner Java coder but is passing the main plugin instance as static as bad as people make it out to be?

torpid raft
#

it wont cause your house to catch fire

#

it's just against best practices / oop

crisp star
#

Don't do it it's going to create a supermassive black hole in the center of the planet

dry summit
#

i dont recommend this to u have much other options as getting it in a static way

torn heart
#

general "issues" with static/Singleton patterns

#

but tbh like

#

it doesn't really matter

#

it's literally against best practice to reload the server anyway or to mess with plugins being disabled at runtime

#

which is when this would cause an issue anyway

torn heart
# torn heart

like I wouldn't really necessarily say any of these apply to JavaPlugin instance

#

you already don't have control over its lifetime

dense galleon
#

If I have 5 plugins that all depend on a Core plugin, and all five of those also require TriumphCMD, am I better off shadowing it in my core plugin's API jar or shadowing it in each plugin?

peak stirrup
torn heart
#

you can exclude everything you don't need

#

and you can legit js unzip jar files to see what got included if you're not sure

#

don't even need decompilation

dense galleon
#

Does anyone know if BaseCommand has been removed from triumphcmd in 2.0.0-BETA-3?

peak stirrup
torn heart
#

google it

proper hull
#

What is the way to register a simple %example%?

#

(I have the placeholderAPI 2.10.9 dependency LATEST)

icy shadow
#

sometimes you need a Plugin instance but you should always try to avoid needing your plugin class

#

3500 lines so far and zero dependencies on my JavaPlugin instance

broken elbow
proper hull
#

thanks

torn heart
#

is there like a concrete reason

#

don't just throw SOLID at me 😭 cause that shit controversial

icy shadow
torn heart
#

which ones

#

I said they were invalid with java plugins

icy shadow
#

Nah I disagree

torn heart
#

how do any of these apply here

icy shadow
#

It’s really easy for your plugin class to end up being a god object which is inherently bad design

torn heart
#

#1 and #2 I don't think apply to the literal Java plugin instance

icy shadow
#

Especially when trying to do automated testing

torn heart
#

like what do people use that for

icy shadow
#

well if you avoid needing an instance of your plugin then you don’t have to worry about getting an instance in a testing environment

torn heart
#

also @icy shadow do you never use Kotlin Objects then (if you write Kotlin)

icy shadow
#

I try to avoid it where possible

torn heart
#

I actually don't get this

#

why does that change with static vs. passed plugin instance

royal hedge
#

you can't easily provide a test double if its static

torn heart
#

why are you hardcoding numbers

#

I'm specifically talking about plugin instance

torn heart
royal hedge
torn heart
# royal hedge hm?

I mean that this is only an issue if you're hardcoding numbers in the first place

#

like again I'm still kinda missing a concrete reason for not having just a static plugin instance

#

like the whole point of statics is they exist once throughout the lifetime of your application

#

this is something that other things shouldn't really be touching in bukkit in the first place

#

I read someone mentioning that if you don't do that then it's easier for GC to clean it on reload, but looking at the actual data, that object is usually tiny

icy shadow
# icy shadow I try to avoid it where possible

I think kotlin objects are different though because they’re kind of a separate thing entirely, compared to a singleton class with funky initialisation logic that literally can’t exist in some environments

torn heart
#

i don't know if their logic is actually different?

torn heart
icy shadow
icy shadow
# icy shadow Ideally you shouldn’t need a plugin instance at all

But constructors are almost always better than static access because they make the graph of dependencies much more obvious. Suppose you’re running a unit test on some class which statically accesses the plugin. Your test fails at runtime (maybe not consistently) because the plugin static is null because you’re not running it in a bukkit environment. Compare that to if it was needed in the constructor: clear, obvious, compile-time error because it needs a plugin instance

torn heart
#

the only difference is you waste time testing something incorrectly

#

cause you're using that instance there either way

#

but

#

Ohh

#

no I see your point

icy shadow
#

again, you should avoid needing a plugin instance as much as possible

#

In cases where you do need it then you should inject it because then you can mock it etc for testing, or provide a different implementation for different platforms

torn heart
#

why would plugin instance differ between those

icy shadow
#

Other server platforms

torn heart
#

Ohh

#

yeah makes more sense

icy shadow
#

You can make one codebase compatible with forge and spigot and bungee and whatever else

royal hedge
#

or stubs

torn heart
#

don't have it hard-coded anyway

#

or just... vary the object that provides those numbers

torn heart
#

cause then this is like

#

if we're telling people not to use static plugin instances, tell them to abstract over Bukkit as well

icy shadow
#

Yeah you should try to do that too although it’s often harder

#

Making a fully platform agnostic implementation is a big task don’t get me wrong

#

It’s not always worth the effort

icy shadow
royal hedge
torn heart
dusky harness
torn heart
#

it's really easy to keep doing forward

#

cause J's... initialize the constructors

#

but lwk like

#

kotlin objects are really cool twin 😭

#

and having a lateinit field seems sketchy cause it's not enforced by compiler

#

well technically that's the case anyway

dusky harness
#

I can't remember the last time I used lateinit

torn heart
#

I js have lateinit plugin instance in companion object of main class

#

I don't actually know why I do that

#

I don't remember

#

I don't think JavaPlugin can be object?

dusky harness
#

Or avoid it entirely 🤩

torn heart
dusky harness
torn heart
dusky harness
#

On startup? No

torn heart
#

ah yeah you right

torn heart
#

it should right?

dusky harness
#

Wdym

torn heart
#

in an object can you have like val instance = JavaPlugin.get....

#

I don't remember when initialization there is exactly

dusky harness
#

getPlugin(Class) is a static method on JavaPlugin

#

iirc

dusky harness
orchid otter
#

What about things like the Logger

torn heart
#

but actually still like

dusky harness
#

Val instance by lazy { Java Plugin. GetPlugin(My Plugin::Class.java)} ignore formatting I'm on phone

torn heart
orchid otter
dusky harness
torn heart
dusky harness
#

It just makes your static code a bit nicer

torn heart
#

it's completely identical

torn heart
#

I disagree at that point

dusky harness
torn heart
torn heart
torn heart
dusky harness
#

Difference between the code I put or not using static?

torn heart
#

not using static

#

I'm not tryna be circular mb J's tryna understand

dusky harness
#

Bm already explained basically what I would say ig (altho I really just quickly skimmed the convo)
And I'm on phone

But I guess it's also about building a good habit for when you do other things other than create plugins

#

Sure, bukkit makes it kinda unneeded in some ways

#

But I assume you're going to code on other stuff other than bukkit someday

torn heart
#

it's good practice ig

#

but I'ma still say it's definitely not the biggest sin new devs commit

#

I remember someone being cautious about putting an if statement in a tick loop cause they thought it was too performance intensive 😭

dusky harness
torn heart
#

lwk the root of all evil

icy shadow
torn heart
#

that's fair

icy shadow
#

Even if it doesn’t do MUCH practical difference it teaches you how to do it right

peak flame
torn heart
#

raycast to see when player looking at furniture / clicking on it

tacit timber
#

Has anyone ever encountered deluxemenus not registering menus that exist within the gui_menus folder?

#

for example, i have a menu called "scene_townsfolk_cook_edit.yml", but when i'm in game and type, "/dm open scene_townsfolk_cook_edit", it tells me that the menu does not exist

weary finch
chilly olive
#

Does anyone know how I can make my server for usa,europe,asia. I think I need 1usa,1europe,1asia proxies and I need to connect them to my lifesteal server with one domain

orchid otter
#

Why bother? I dont think you will actually get any latency benefit

#

itll just show better ping in the server browser, but ingame ull still have the ping that comes from the actual paper server

chilly olive
orchid otter
#

Well yea ull connect to the proxy faster, but the connection still has to travel to the real server

#

so it just gives the illusion of better ping

#

I dont think theres an actual way to reduce ping, cause speed of light, only way to improve ping is to get a better route to the client, you could set up a proxy near the client and hope that ur proxy recieves better routing than the client, but will that be the case, doubt it.

#

if im wrong id be glad to know

minor summit
#

multiproxy is only really helpful for, like, minigames or skyblock, where you can actually run a proxy and servers in the region, so you'd have minigame/skyblock servers in NA, EU, Asia, and a proxy in each region that connects to their regional servers

#

anything like a SMP, Factions, Towny, roleplay, where you'd want one server for everyone to share is kinda out of the question unless you want to have different SMP/Factions/etc servers per region as well but that stinks

orchid otter
minor summit
#

no, you are still connected to the proxy

#

unless you are transferred, but that only works for semi-modern clients, idk when the transfer packet was introduced exactly

#

neither the transfer packet nor a proxy are a replacement for each other, they are both useful to what they do, and can work in conjunction

orchid otter
#

Fair makes sense

rare echo
#

I get an out of bounds error since it tries to set it in the main inventory

leaden sinew
#

Does anyone know the @SuppressWarnings name for Unsubstituted expression warning when using @Pattern?

dusky harness
leaden sinew
#

No it doesn't

minor summit
#

it should, but alternatively you can @Subst("example string matching pattern") the variable or whatever

dusty frost
# leaden sinew Does anyone know the `@SuppressWarnings` name for `Unsubstituted expression` war...
#

looks like it's a non compile-time constant expression that it can't analyze

leaden sinew
#

Yeah I'm using Adventure Keys and I'm storing / reading the string value which is what causes the issue

#

I'd rather not turn off the inspection completely, but I also haven't been able to find a name for the suppress warnings

leaden sinew
dusky harness
#

since I feel like you should use a valid example value instead of "suppresswarning" 🥲

#

woah wait @Pattern is pretty cool

#

didn't know this existed

#

wait it doesn't work :(

#

oh nevermind it just doesn't work in kotlin :(

leaden sinew
dusky harness
#

ohh

minor summit
#

yeah just slap a @Subst("some_key") on the variable

royal hedge
#

or u can disable it from flagging non constant values which is what i did

sterile hinge
#

u r a bad inspection

royal hedge
#

☹️

sterile hinge
#

generally there is a reason why people use the pattern annotation

royal hedge
#

this disables the no @Subst inspection

#

not the @Pattern inspection

#

see the option

sterile hinge
#

still it would make more sense to carry over the pattern to the source whenever possible

leaden sinew
leaden sinew
royal hedge
#

its fine with adventure cuz it @KeyPattern annotations are easy to use

#

but sometimes its annoying like if its not a parameter

leaden sinew
#

It's also really aggressive about how many warnings it gives, like sometimes it warns on 5 separate lines for one method call

dense drift
#

wasn't there a gradle plugin for paper that allows to start a test server or I remember wrong?

noble loom
#

Hey, how can I use text colors in deluxemenus config, for displaynames, lore, etc? I want to be able to use any color in hex or rbg or any other format

river solstice
#

probably just minimessage format, like most of the plugins nowadays

dusky torrent
#

Hi, I'd like to know how to buy and sell custom items with Deluxe Menus. Could someone tell me how to do it? Thanks. ^^

orchid otter
#

most of the times ud just take money and use the plugins give command for that item

dusky torrent
orchid otter
#

you want deluxemenus to create custom items for you?

dusky torrent
dusky torrent
orchid otter
#

thats a fun one

dusky torrent
orchid otter
#

You can use the CheckItem-Expansion for a good enough way to check

#

and i assume u wanna remove the coins too, not really sure how to go about that

dusky torrent
#

Same as with vanilla items, but they must be custom, if someone could give me an example I would be very grateful. 😊

orchid otter
#

yea not sure, you can try writing a minecraft:clear cmd with the data for those items only

#

but its all kinda messy

#

ideally ud have a plugin providing a placeholder for the item amounts and removing

#

but maybe im wrong

#

¯_(ツ)_/¯

dusky torrent
#

Well, thanks anyway for responding.

noble loom
wanton terrace
#

Does anyone here have experience working with core shaders? I'm currently trying to modify my hotbar away from the vanilla standards

torn heart
#

it's googlable

ripe gull
#

hello

        Bat bat = (Bat) world.spawnEntity(location, EntityType.BAT);

        bat.setAI(false);
        bat.setGlowing(true);
        bat.setInvulnerable(true);
        bat.setPersistent(true);
        bat.setRemoveWhenFarAway(false);

        return bat;
    }``` when i spawn the bat its falling through blocks because its in the "hanging state" how can i make it actually fly in place?
broken elbow
ripe gull
proud pebble
#

Currently working on a treecapitator imitation plugin, its working mostly but its giving kinda spotty results of the max amount of blocks its actually broken, currently got what feels like a bandaid fix by double checking the locations to make sure they arent trying to rebreak an already broken location.
basically my code that generates the next blocks to check and then break seems to be giving alot of duplicate coordinates and im not sure if theres something i can do to make it not have those duplicates
i was original using a List<Location> to store the points. switched to a Set<Location> to make the locations not be applied for whats already in the list but it was doing the same thing, so i tried using a Triplet of the x y and z coordinate but it also gave the same result of around 29-32 blocks broken even tho my max block break cap is 35.

https://github.com/lunaiskey/ABP/blob/master/src/main/java/me/lunaiskey/anotherbadplugin/item/tasks/TreeFellerTask.java

GitHub

ABP (Another Bad Plugin). Contribute to lunaiskey/ABP development by creating an account on GitHub.

#

mainly wondering if theres a better way to do this or where my code is flawed and giving these duplicate coordinate locations

#

the idea of my logic is to take a block location, check 1 block around it so 26 possible coordinates, add any coordinates that match that block type to a list, break the original block and then repeat till either it runs out of blocks to check since there isnt enough connected or hits a max block break cap of 35 blocks, tho the max cap is dynamic. i have noticed that theres alot of duplicate blocks being checked and wasnt sure if there was a better way to do it so that it only checks the block's location once

#

im mainly wanting to filter them just for the fact that it might be laggy to check the block's data for ones that are already air but im probs doing it at such a small scale that its a nonissue

torn heart
#

your overall approach is fine

#

js standard iterative BFS

torn heart
ripe gull
#

is looping every player every 1 tick and getting values from cache is better than per-player runnable that is every 1tick? like 100 runnables (1 per player) vs 1 runnable that loops all players?

#

i am making a speedrun timer

#

the single runnable with player loop is checking if player isSpeedrunning()

#

the per-player doesnt do that

#

its cancelled immediately on onFinish

icy shadow
#

1 runnable is likely better

#

but it depends

ripe gull
#

on?

#

i just update the actionb ar

icy shadow
# ripe gull on?

literally everything, it's the kind of question that isnt really a yes/no answer

#

java performance is difficult to reason about like that

#

best thing to do is try both and benchmark

broken elbow
ripe gull
#

smothly

ripe gull
# icy shadow literally everything, it's the kind of question that isnt really a yes/no answer
            @Override
            public void run() {
                Bukkit.getOnlinePlayers().forEach(player -> {
                    Arena arena = ArenaManager.getArenaByPlayer(player);
                    if(arena != null && arena.isStarted) {
                        long czas = System.currentTimeMillis()-arena.startTime;
                        player.sendActionBar(ChatUtil.fix(getConfig().getString("messages.timerActionbar").replace("{time}", TimeUtil.formatTime(time))));
                        }*/
                    }
                });
            }
        }.runTaskTimer(this, 3L, 2L);```
#

it looks like that

icy shadow
#

yeah it still depends

proud pebble
# torn heart if you're getting duplicate coordinate locations in a Set, use a `record` instea...

i originally had a List<Locations>, changed it to a Set<Location>, which i thought would stop the duplicates, but it didnt so i tried a Set<Triplet> instead, same thing still had duplicates, i even decided to try manually looping through the set to check for duplicates and still wouldnt get the correct result. so im assuming more then likely its adding to the hashset block locations that no longer have logs in them, which would explain why my check to see if the block is a log or not does actually allow my code to do the full maxblock cap of 35 rather then what it was doing before of 29-32 blocks

#

also glad to know that im actually be doing it in a good way

#

ill check out records and see if that stops the duplicates

#

something else that ive just thought of is that at the end of the loop through the original list of locations, perhaps when im doing getBlock#setType(Material.AIR) its not being processed till the next tick, which means later on if i have multiple block locations having their 1 block radius around them being checked its picking up the blocks that have been queued to change to a different material but havent actually changed yet, another thing that would explain why its having air blocks being picked up since when they were checked they would be a wood log before the next tick which updates them to being air

#

ill try making another list to check through thatll contain block locations that have been modified already through my code but might not have had their block material updated yet and to skip if that location is the same

merry zodiac
#

Can anyone know how can i makkke a toggle menu example if I click on A example item suppose Stone it convert into end stone and it lore change to hello and if I click again it return backk to stone and lore change to hi and I need thhis in 1 menu

fair nest
#

i tried deleting the world folder to reset stats.yml but it didnt work

#

what should i do

merry zodiac
dense drift
#

I try to update an old project and I get this error when I compile:

C:/Users/dumit/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/26.0.2/c7ce3cdeda3d18909368dfe5977332dfad326c6d/annotations-26.0.2.jar!/META-INF/annotations.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.6.0.
I've updated adventure-api to latest version and it comes with org.jetbrains:annotations:26.0.0 and excluding it doesn't do anything thinkfused

    implementation("net.kyori:adventure-api:$adventureVersion") {
        exclude group: "org.jetbrains", module: "annotations"
    }
    implementation("net.kyori:adventure-platform-bukkit:$adventurePlatformVersion") {
        exclude group: "org.jetbrains", module: "annotations"
    }
    implementation("net.kyori:adventure-text-minimessage:$adventureVersion") {
        exclude group: "org.jetbrains", module: "annotations"
    }
#

I know I could update to kotlin 1.9.0 but I don't really want to bother

pulsar ferry
#

Dude Kotlin is already on 2.2.0 and you don't even want to update it to 1.9.0 :')

dense drift
#

:(((((

#

it was supposed to be a quick library update to support 1.21.x

#

fine, I will do it :((

dusky harness
#

or at least I haven't run into any that I remember

#

except for android

neat pierBOT
dry frigate
#

so im trying to import the foundation library but there is a plugin that is supposed to stop it from shading all the libaries but i cant get it to work. https://paste.helpch.at/vucininohe.xml

dry frigate
#

Does anyone know what i did wrong?

dry frigate
#

😕

rapid marsh
#

hello, the idea of making an homes plugins and a team plugins came to my mind but i don't want to make both in the same .jar i want to make them work one alone of the other but i would love to integrate some stuff of one to the other for example the homes one i want to integrate an item in the gui of the homes that it's the team home how can i make the 2 communicate? (Sorry if it's a stupid question but I'm really new to creating API or whatever can make them communicate)

pulsar ferry
#

Pretty sure most people her would see "kangarko" there and be like :')

dusky harness
dry frigate
dry frigate
dusky harness
dry frigate
dusky harness
#

seems to work fine for me

#

make sure you're running mvn clean package

#

if that still doesn't work, try to create a folder and put only the pom.xml in there (that's how I tested it)
then, that should work
you can then slowly add in files until you locate the problem

dry frigate
dusky harness
#

but you see all the other files in target/test-1.0.0-Alpha.jar?

#

from mvn clean package

dry frigate
dusky harness
dry frigate
dusky harness
#

press ctrl twice and type mvn clean package

#

how big is your jar file

#

from the test project

dry frigate
# dusky harness from the test project

Ok so not i get that in the target folder do i just always use that instead of the file in the out folder or what do i do with the cleaned file in target

dusky harness
dusky harness
#

and the other file is with shading - this is the one you want to use

#

and the out folder I believe is generated by IntelliJ's own build tool instead of maven

dry frigate
dusky harness
#

but it's good that it's all fixed now 👍

chilly olive
#

chat-format: "&f{prefix}{player_name}{deluxetags_tag}: &f{message}"

Why deluxetags_tag dont work?

acoustic chasm
#

yo sup everyone, does anyone havbe any idea how to make a plugin that recreates hypixel skyblocks breaking speed for mining

leaden sinew
#

If you’re using one of the latest versions you can set the players block break speed attribute to zero and send the block damage packet yourself

#

Otherwise you do the same thing but instead give the player mining fatigue -1

torn heart
#

^

noble loom
#

Hey is it possible to enable player inventory clicks while a DeluxeMenu GUI is opened?

viscid veldt
#

I have a .sh file I'm running with an intellji configuration, but whenever intellji runs the file it's unable to run java commands, anyone know why?

I'm able to run it fine in terminal

minor summit
#

what does it say

dusty frost
#

bro isn't PATHing correctly

viscid veldt
viscid veldt
#

works fine in terminal and normal shell code works but java doesnt work when intellji runs it

dusty frost
#

yeah no it's probably a PATH issue tbh

viscid veldt
dusty frost
#

i mean step 1 would be to just echo $PATH in the beginning of the script

#

and see what it has

#

but you might just need to do an absolute path for the java installation

#

like /usr/bin/javac or whatever

torn heart
orchid otter
#

are there any libraries for making inventories, that you guys would recommend?

minor summit
#

both TriumphTeam/triumph-gui and stefvanschie/IF are pretty popular

orchid otter
#

will have a look, thanks

shell isle
#

do you guys offer support for custom model data texturepacks (for 1.21.4+)

weary finch
#

DeluxeMenus does

shell isle
#

and custom model data based textures

weary finch
#

Oh, I haven't dove into that.

sand arrow
#

I am getting this error even when PAPI is loading correctly java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion

#

its softdepended and no error in pom file

#

[PlaceholderAPI] Enabling PlaceholderAPI v2.11.6 [20:26:19 INFO]: [PlaceholderAPI] Fetching available expansion information...

weary finch
sand arrow
#

I don't think that's ideal

weary finch
weary finch
#

Oh oops

runic siren
#

hello can anyone help me to setup my costum GUI with itemadder and dulexmenu

#

is like PNG files not yml

tame moth
#

how is every1

pearl topaz
#

I'm doing great, how are you? Although this is a weird channel to ask that

tame moth
#

just working on some of my open source plugins

pearl topaz
tame moth
pearl topaz
#

makes sense

tame moth
#

I decided its a good idea to update some of my public plugins as I kinda havnt touched them in a few weeks

pearl topaz
#

i find the things I'm always motivated to work on are the things I want to use

tame moth
pearl topaz
#

yep, best source of inspiration

tame moth
tame moth
# pearl topaz yep, best source of inspiration

I am the type of person to use very few public plugins and code everything myself for the most part (with my team aswell) there are certain things i will use as im happy with the quality like luckperms for one, fawe worldguard but things like essentials i have fully custom done

pearl topaz
tame moth
#

im cleaning that up now

#

i was posting on my spigotMC

tame moth
#

with the interactive graph

pearl topaz
tame moth
#

im curious

sterile hinge
#

DO NOT CONTRIBUTE CODE WITH JAVA 9+ FEATURES

Stuck in 2014 feelsBadManC

pearl topaz
pearl topaz
#

so java 8 it is

pearl topaz
#

it's just bstats

tame moth
#

ahh

tame moth
pearl topaz
pearl topaz
tame moth
#

okay im just blind

sterile hinge
pearl topaz
#

it makes me happy

#

so me :)

sterile hinge
#

I'd be extremely unhappy if I had to touch java 8

pearl topaz
#

it's really not that bad

#

java 21 feels like java 8 when I've been using C#

sterile hinge
pearl topaz
#

someone using something different to you must be very hard to deal with

tame moth
#

21 is a more fun number than 8 even though i do love 8 im around it too much

pearl topaz
#

21 definitely has nice features

#

and makes java way better

#

but the point of EsTools is maximum compatibility

sterile hinge
#

I don't see any point in that, but sounds like a very fun project for you

tame moth
#

Minimum compatibility plugin

#

Almost impossible to use

#

With the users setups

pearl topaz
#

that sounds like something SirYwell would love to make

#

and then it could get major breaking changes every week

sterile hinge
#

We generally try to keep compatibility as long as the maintenance burden isn't too high and as long as there are actually people using a version

#

Otherwise we wouldn't target Java 17/21 :)

tame moth
#

lmao

#

its 1am

#

ima head 2 sleep

neon pewter
#

oh look java 25, ||~~ gonna took another 100 year for it to power 3 billion devices~~||

minor summit
#

wait until you find out that it never actually ran on 3 billion devices

#

today maybe but not back then when that install screen was made

sleek nest
#

If anyone is looking for a project:
The developer of the legendary MyPet plugin (a very unique and old plugin for pets) seems to have become inactive.
If anyone wants to help with updating it, feel free to reach out on the MyPet Discord to “haeherfeder”.

minor summit
#

okay scurok

torn heart
#

okay Emily

woeful schooner
#

okay ixume

orchid otter
#

why do they always aim so high

#

even 1k a week is lots for most people,

orchid otter
#

now i look scitzo

dusty frost
#

aren't you?

orchid otter
#

😔

shell moon
#

Best way to remove "temporary" blocks placed when server restart? (locations are stored in a map)

river solstice
#

loop and remove 🧌

jagged belfry
#

yeah I just remove them in onDisable

shell moon
# river solstice loop and remove 🧌

Issue is that when doing that in onDisable as i remember it didnt save it correctly and when forced world save it caused light issues, can you confirm it works as intended? Thonk

shell moon
#

at least last time i tested it was like that

jagged belfry
#

hmm it worked fine the last time I tried. but its been a while so not sure. The only issue with that is if the server force crashes, your onDisable method won't get called.

torn heart
#

or have a command for it

leaden sinew
river solstice
shell moon
leaden sinew
shell moon
minor summit
#

I mean, the map is meant to be ephemeral, no? then not saving (or having a template world you copy over and load the copy on each start) is what makes sense the most

grizzled sundial
#

Hi, you can add a command to reset the metadata specific to all players, like the remove command, msi with an all in the player args

#

Thanks if you think about doing it, I don't have time to modify the source code myself !

torn heart
#

lmfao

sand arrow
#

java.lang.NoClassDefFoundError: me/clip/placeholderapi/expansion/PlaceholderExpansion

#

why is this happening on my plugin

#

PAPI is loading fine

torn heart
#

add papi into plugins folder

sand arrow
#

and I have correct dependency

sand arrow
#

[23:52:13 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing... [23:52:13 INFO]: 0 placeholder hook(s) registered!

#

everything seems fine in my project

minor summit
#

did you add placeholderapi as a depend in your plugin.yml/paper-plugin.yml ?

torn heart
#

don't you need to specify it in array format

#

name: ExamplePlugin
version: 1.0
author: author
main: your.main.path.Here

softdepend: ["PlaceholderAPI"] #

dusty frost
sterile hinge
#

sad I don't have any skills

#

but how is it passive if it requires skills

feral raptor
#

Struggling to understand the concept of callbacks with CompletableFutures

#

I've been reading articles left and right to no avail

#

for a CompletableFuture "cf1":

cf1.thenApply(fn).thenAccept(csc).thenRun(run)

^ what will that pipeline actually do?

minor summit
#

it's probably better with a more realistic example than just cf1, fn, csc, and run

torn heart
feral raptor
torn heart
#

what is the issue

feral raptor
#

It arguably made me understand it less

#

lmao

torn heart
#

can't get much simpler 😭

minor summit
# minor summit it's probably better with a more realistic example than just `cf1`, `fn`, `csc`,...
CompletableFuture.supplyAsync(() -> "oop sucks")
    .thenApply(string -> "wisdom: " + string)         // "oop sucks" -> "wisdom: oop sucks"
    .thenAccept(string -> System.out.println(string)) // prints "wisdom: oop sucks"
    .thenRun(() -> System.out.println("completed"));  // runs and prints "completed"

you are basically "scheduling" tasks for when the future completes with a result, the thenApply will prepend the string "wisdom: " to the resulting string once the first future completes, then it will take that transformed result and print it, once that completes it will run the final runnable

feral raptor
#

I mean this makes sense at a surface level, I just don't get whats actually going on under the hood.

why is each thenX method creating a brand new CompletableFuture, and how is the scheduling actually handled?

torn heart
#

you should just read the docs

feral raptor
#

I would have understood if it was returning the same CompletableFuture and it was just popping a stack post-completion

torn heart
#

hell, read the source code

#

you'll get a better explanation and deeper understanding than from others telling you

feral raptor
#

I didn't show up here not trying to learn it in advance. I'm coming here to ask after exhausting all options you've already suggested me to do

torn heart
#

not understanding the documentation means you didn't try hard enough to understand it

feral raptor
#

do you have something to contribute or are you just here to ridicule

minor summit
#

to put it bluntly, it just stores your function/runnable/etc in a list of "run after this completes"
it returns a new one because you might be changing the type of the future (e.g. Future<String> to Future<Integer>), for that you need a new object, and so you can attach multiple callbacks to one future without affecting the result others take; if you are performing more work asynchronously then the first future will complete first, but the second future will complete after that other work is done, etc

torn heart
minor summit
#

i'd be intrigued if it didn't return a new future

#

i don't think you're helping

feral raptor
torn heart
#

and what do you do when it's something more niche and there are fewer resources on whatever you're learning

minor summit
#

do you really think you are being helpful in saying "go read the source code" "you'll get a better explanation than what others are telling you" "you're taking a bad approach at learning"

torn heart
#

I could have been nicer yeah that's my bad

#

but if the sentiment makes him less likely to ask others for help and instead try to figure it out himself in the future then that's a good thing I think

#

almost anyone can learn almost anything

#

in a 1st world country

#

programming is especially one thing which has an abundance of places to do that

#

also, if since wanted to know what's under the hood, were you gonna explain the whole pipeline to him?

#

like this genuinely is the type of thing that is better googled

minor summit
#

if the sentiment makes him less likely to ask others for help [...] then that's a good thing

#

i...

#

sure

#

whatever makes you sleep at night

torn heart
#

I feel like I backed up what I said pretty reasonably 😭

#

I don't think asking others for help on things that have better resources should be done

#

yes it can sometimes be more efficient

#

but as soon as you're asking someone to write paragraphs for you, especially on this, it's likely you'll find a better resource online

#

like if I asked in chat "how does the network protocol work? like behind the scenes"

minor summit
#

i don't think there's anything wrong with asking someone else with a different wording or a little assistance to help clear things up

feral raptor
#

Also, by your logic this channel is pointless and should be closed

torn heart
#

I feel like your initial question was unclear

torn heart
#

I think there's lots of things that are really useful to ask about, often because they are quite domain specific and have less information online

#

but also a lot of the questions here shouldn't be asked yeah

#

lots of people simply don't google

#

there was a conversation here about static plugin references and I learned a good bit there, that was a good discussion for example because it was more complex and domain specific

feral raptor
#

thats one way to look at things -- "it was useful to me so its relevant"

torn heart
#

I don't think youre evil or stupid or something for asking the question

torn heart
#

I'm like genuinely trying here

#

you strawmanning me so hard 😭

feral raptor
torn heart
#

😭

torn heart
#

genuinely asking

feral raptor
# minor summit to put it bluntly, it just stores your function/runnable/etc in a list of "run a...

I think I get what you mean--what I understood when I read an article this morning was that this "list" structure works by every "Completion" instance containing a reference to the future before it (or after it)

So basically, cf1 finishes executing and runs postComplete which will then invoke its Completion instance, which in turn invokes its associated future which in turn invokes its completion instance etc etc.

#

So basically what happens is when you do thenX on an existing future, and assume the initial task has finished already:

  • you are setting its Completion field to be a new Completion (lets call it thenCompute) which actually has a new CompletableFuture as state

  • it then calls postComplete() which will then invoke the Completion instance which will invoke its attached future (either inline or async). This attached future can also have a Completion instance that it invokes etc etc

tight junco
# torn heart you never even answered this either

I'll bite actually, It's incredibly dismissive and unhelpful when someone comes to a place for questions and support, to tell them to go elsewhere and find the support all by themselves and just a worthless contribution, I don't think they're asking for the whole declaration of independence to be explained but if someone can spare the time to explain something in a way someone else is actually able to/more effectively understand, there's no actual issue there

If you really want to push for self sufficient research, give them a vague explanation and provide links to sources for them to research in case they haven't, while also answering the question, even if vague (#development message this wasn't very complicated or longwinded of an explanation and neither was this #development message), Pushing someone away from actually receiving help has a significant longrunning negative impact

300 people a day would come in here asking how to make commands or do whatever with plugins, the solution was never to just tell them to learn java and come back later, It was always give them the answer, while also giving them resources to look into it more

#

Personally, I can write stuff all day, do circles on people but if i have to sit and read lengthy, in depth documentation, i literally cannot do it, i do not absorb any of the information at all. In reality, You don't know any of the people who are asking for help, nor the ways they learn things the best. Sitting at your chair with drool down your face, crusted on the desk, reading books and source code might work for you. It doesn't work for everybody else

feral raptor
#

Going back to the CompletableFuture (CF) topic, what I currently understand is that callbacks will actually instantiate and assign a Completion object as a field of the CF instance. After the CF finishes its execution, it calls CF#postComplete which will in turn invoke Completion#tryFire(SYNC/ASYNC), which will in turn invoke that Completion's own CF (for simplicity, lets just go with a synchronous callback).

The aforementioned event will repeat recursively.

tame moth
#

whatsup over in the dev channel?

sterile hinge
dusky harness
#

because like no one knows about linked roles

#

dev general died :p

tame moth
#

crazy

#

i didnt know about it XD

#

now in it XD

torn heart
torn heart
#

I don't know if I necessarily agree with "pushing away people from getting help has a long running negative impact" in a field like programming specifically

#

it's definitely a negative in some circumstances

#

but I am trying to push for self sufficiency

#

though I understand why I didn't do that well above

torn heart
#

like genuinely not trying to be condescending, but in this case his question seemed to be like directly answered by just looking at the implementation, and not even necessitating anything deep

#

I agree I was rude and unamicable, but I genuinely feel like this was the simplest way for him to get his question answered

#

if I'm wrong please tell me how

#

like if your question can be answered by looking at a (simple, which is true here) function implementation, is it wrong of me to say that you should do that before asking other people?

icy shadow
#

Just like the stream api, it’s designed in a way that you don’t need to understand the implementations

#

You’re more or less correct but I’m not sure if it’s helping your understanding of the type as a whole

torn heart
#

I agree w this ^

#

unless you're performance maxxing, you don't usually need to know these specifics

leaden sinew
#

I like to minimize my performance

torpid raft
#

i like to maximize my minimizing

feral raptor
#

I just don't want it to feel like magic per se. Like when I was studying reflection, I just needed to know the general idea of how it works, that is, that it uses JVM intrinsics to pull data about classes from the metaspace at runtime--I don't actually need to know how it does it exactly, but having an understanding of it helps in ensuring that I'm not just applying mindless libraries with no understanding

graceful hedge
#

I think that depends very much on the library, some libraries are easier to just apply in a brain-dead fashion, whilst other libraries require more profound knowledge.

hexed crag
#

good day everyone, if someone includes the deluxmenus plugin once, please help, I need to hide on the leather bib *painted, I use nbt_int: 'HideFlags:63' for this, but then Hide_attributes: true disappears. also with potion, help, hide it effect

If I wrote in the wrong chat, I apologize.

всем добрый день, если кто-то разбирается в плагине deluxmenus можете пожалуйста помочь, мне нужно скрыть у кожанного нагрудника *крашеный, я для этого я использую nbt_int: 'HideFlags:63' но тогда пропадает hide_attributes: true. также с зельем, помогите еще пожалуйста скрыть его

tight junco
feral raptor
graceful hedge
#

I mean yea thats fair and ofc it depends on how exactly u see the term better, i think a problem with being pedantic about knowing+understanding everything is that it can at times compromise on for example productivity

teal quartz
#

apart from the costs, will I find a devs here interested in creating such a infrastructure like minehut.com for me freelance? Message me privately

brisk forum
#

im trying to make an own plugin but im getting errors

icy shadow
#

sorry to hear that

#

you’ll need to give some more information than that though

brisk forum
#

i included an plugin.yml but the error is still there:

[15.08 22:44:50.154] WARN : [CityBuild-Builder-1/WARN]: [15.08 22:44:50.143] ERROR: Error loading plugin: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/AutoEffectsPlugin-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
[15.08 22:44:50.155] WARN : [CityBuild-Builder-1/WARN]: java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/AutoEffectsPlugin-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
[15.08 22:44:50.155] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:85)
[15.08 22:44:50.156] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:52)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:113)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at net.minecraft.server.Main.main(Main.java:111)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:21)
[15.08 22:44:50.157] WARN : [CityBuild-Builder-1/WARN]:     at org.bukkit.craftbukkit.Main.main(Main.java:281)
[15.08 22:44:50.158] WARN : [CityBuild-Builder-1/WARN]:     at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42)
[15.08 22:44:50.158] WARN : [CityBuild-Builder-1/WARN]:     at java.base/java.lang.Thread.run(Thread.java:1447)
[15.08 22:44:50.158] WARN : [CityBuild-Builder-1/WARN]: Caused by: java.lang.IllegalArgumentException: Directory 'plugins/.paper-remapped/AutoEffectsPlugin-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
[15.08 22:44:50.158] WARN : [CityBuild-Builder-1/WARN]:     ... 10 common frames omitted
icy shadow
#

Did you make a plugin.yml?

brisk forum
#

yes:

name: AutoEffectsPlugin
version: 1.0
main: AutoEffectsPlugin
api-version: 1.20

i dont know if thats enough for my code

brisk forum
dusky harness
#

How are you creating your plugin jar?

brisk forum
dusky harness
brisk forum
#

i have many errors in my code o-o

dusky harness
#

nono I mean in the server log

#

?startuplog

neat pierBOT
#
FAQ Answer:

Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.

brisk forum
dusky harness
#

woa

#

what in the world is that

brisk forum
dusky harness
#

ah

#

it needs to be in src/main/resources/plugin.yml

brisk forum
#

i knew it i forgot something

dusky harness
#

also that's a lot of red-

brisk forum
dusky harness
#

oh and the package should be just skygamb.de (the main/java isn't part of the package since that's a Maven thing)
which means your plugin.yml should have this instead: ```yml
main: skygamb.de.AutoEffectsPlugin

brisk forum
dusky harness
#

make sure to change lien 1 of AutoEffectsPlugin.java to ```java
package skygamb.de;

#

or how did you even get to this state anyways-

brisk forum
dusky harness
#

or actually

#

just double click shift and type "reload maven"

#

and lmk what happens after that

brisk forum
dusky harness
#

this is what I mean btw

brisk forum
dusky harness
#

oh!

#

that's good

brisk forum
dusky harness
#

wait can you show your whole IntelliJ screen

#

I want to see if I can find the maven button

brisk forum
dusky harness
#

oh it changed lol but it's the m at the top right

#

click that and then what does it show?

dusky harness
#

ah yeah that's the button

brisk forum
#

now the test

dusky harness
#

but also, small tip - if you double shift again and type mvn clean package

in the future, you'll be able to just run it again by pressing Shift + F10 (or clicking the "play button" at the top right)

brisk forum
#

shift and F10 dont work f_coffee

dusky harness
#

oh

brisk forum
#

IntelliJ Community Edition

dusky harness
#

it should work though

#

is the play button green?

brisk forum
#

nope

#

only a gray

dusky harness
#

with the double shift

#

or actually no

#

sorry

#

it's double ctrl

brisk forum
#

no errors in console thats a good thing

#

oh no...

#

there is an error:

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) { <------------
        Player player = event.getPlayer();
        player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 6000, 1));
        player.sendMessage(ChatColor.GREEN + "Willkommen " + ChatColor.YELLOW + player.getName() + ChatColor.GREEN + "!");
    }
}

its gray but everything else is blue:
https://i.imgur.com/L2PTEuT.png

dusky harness
#

?startuplog

neat pierBOT
#
FAQ Answer:

Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.

dusky harness
#

:))

#

or find the error and you can just send that

brisk forum
#

hint now its Lobby-1

broken elbow
# brisk forum https://paste.helpch.at/linepudige.yaml

Directory 'plugins/.paper-remapped/AutoEffectsPlugin-1.0-SNAPSHOT.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it

Have you moved the plugin.yml file to src/main/resources/ as suggested above?

broken elbow
#

Also, can you change the debugging mode for cloudnet? I see most of these are DEBUG level logs and it is very hard to see trough all that noise

broken elbow
brisk forum
broken elbow
brisk forum
#

i set it off

broken elbow
# brisk forum https://i.imgur.com/PwBc8YT.png

I'm not sure this will work, but try right clicking the src directory, and click Mark directory as and select Sources Root if it is available.
Also, right click resources directory, and click Mark directory as and select Resources Root if it is available.

brisk forum
broken elbow
#

None. It is already marked as sources root. Try the same for resources, and if it is already marked as Resources Root, don't click anything

brisk forum
#

bruh i am stupid... 🤦‍♂️

i had the wrong Effect set:

player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 6000, 1));
tame moth
#

hey

torn heart
#

is this peak kotlin programming

kotlin {
    jvmToolchain(targetJavaVersion)
    compilerOptions {
        freeCompilerArgs.addAll(
            "-Xno-call-assertions",
            "-Xno-param-assertions",
            "-Xno-receiver-assertions"
        )
    }
}
pulsar ferry
#

Why?

torn heart
#

I could have rewritten that (and eventually I'm going to, not for this reason but for performance) but physics engine is intensive, so release builds should avoid any sort of unnecessary safeties, as those can be checked in debug builds along with other invariant checking

#

also Kotlin coroutines are actually so awesome

#

they're ~10% more performant on my machine than fixed thread pool for CPU bound tasks

long raptor
#

Hello everyone, please advise best way to use MiniMessage#deserialize with placeholders in a string. Does parsing Component each time to insert placeholders create unnecessary load? Is it better to use TextReplacementConfig, or can I just use MiniMessage#deserialize? Thank for answer

minor summit
#

using mm each time is fine

#

unless you are parsing tens of thousands of components every second or something ridiculous

torn heart
#

very simple optimization that will probably cover you

#

if you have repetitive rapidly swapping states you could technically cache it but like

torn heart
#

remember to benchmark if you're unsure!

tame moth
#

I need some feature suggestions. Im making an alternative to tebex, its already gonna be 50% cheaper any features people would want to see included

long raptor
#

Thanks for answer!
I heard that replacing will be faster than parsing, that's just why I wanted to ask about it

torn heart
#

test it out :)

minor summit
torn heart
#

I may have misunderstood though

minor summit
#

i was thinking a minimessage string containing a <papi:foo_bar> tag

torn heart
#

ah ic

torn heart
neon pewter
#

in a renderer server i have this method run at the end of each loop cycle to update the server on what object need to be render or removed from rendering

    private void updateBatches() {
        List<GameObject> updateList = new ArrayList<>(updatedGameObjects);
        updatedGameObjects.clear();
        List<GameObject> removeList = new ArrayList<>(removedGameObjects);
        removedGameObjects.clear();

        for (GameObject go: removeList) {
            destroyObject(go);
        }

        for (GameObject go : updateList) {
            if (!go.isRemoved()) addGameObject(go);
        }
    }

the updateGameObjects and the removedGameObjects are where update or remove call end up in. does these two list thread save enough for me to do a copy and clear when i run update or do i need to use synchronized list ?

torn heart
#

queues are much better for concurrency

torn heart
# neon pewter in a renderer server i have this method run at the end of each loop cycle to upd...

since you're talking about rendering i'm assuming you're having gameobjects be updated from outside of this thread. for this the easiest thing is to have the gameobjects list be private and have a "queueRemove(GameObject go)" and "queueAdd(GameObject go)" or something of the sort which adds to a threadsafe structure like a ConcurrentLinkedQueue, and then in your render loop you can iterate through it at the start/end of your tick

#

you want these queues separated from your main object list because you don't want objects to be added or removed during stepping

#

also CopyOnWriteArrayList is probably the best concurrent list implementation IF you NEED to use a list in a game context since its doubtful you have elements moving in and out more than youre reading them. but prefer Queues because they are an inherently better data structure for concurrency (the "index" nature of lists make them unreliable for concurrency)

neon pewter
torn heart
#

it's fine if an object is added to one of the queues while it's being iterated over - that's the safety with concurrent structures

torn heart
#

otherwise they might not get removed / added

#

something like this (getAndClear must be atomic)

    private fun processToRemove() {
        val ss = bodiesToRemove.getAndClear()
        for (body in ss) {
            kill(body)
        }
    }
#

i don't know 100% if this is the best implementation but i have never had any issues with it and it works, i just use an AtomicReference<List<T>> in my physics engine

#

so i can write stuff like this very easily

    fun getAndClear(): List<T> {
        return items.getAndSet(emptyList())
    }
#

w full safety

neon pewter
#

well im currently doing this:

    public void queueObjectForAddition(GameObject go) {
        queueObjectForUpdate(go);
    }

    // Add a game object to the removal list and remove it from the update list.
    public void queueObjectForRemoval(GameObject go) {
        updatedGameObjects.remove(go);
        if (!removedGameObjects.contains(go)) removedGameObjects.add(go);
    }

    public void queueObjectForUpdate(GameObject go) {
        if (!updatedGameObjects.contains(go) && !removedGameObjects.contains(go)) updatedGameObjects.add(go);
    }

    private void addGameObject(GameObject go) {
        List<SpriteRenderer> sps = go.getComponents(SpriteRenderer.class);
        for (SpriteRenderer sprite : sps) {
            addSprite(sprite);
        }

        List<TextRenderer> ts = go.getComponents(TextRenderer.class);
        for (TextRenderer txt : ts) {
            addText(txt);
        }
    }

the renderer doesnt care about the object itself, it end goal is to extract renderable component out of the object.

torn heart
#

w concurrent stuff you have to remember that you cannot ever trust the state of something between 2 statements without some other guarantee

neon pewter
#

i could minimize the risk by limit where the logic server can access the renderer call right ? Currently object add remove or update operation on the logic thread is queue into the scene, the scene collect the queue then process it at the end of each loop cycle. So for now the the access is sequential so it should be ok?

torn heart
#

if you don't have different threads accessing it concurrently then it's safe yeah, I don't exactly I understand your architecture so I can't give a very detailed answer

neon pewter
#

i use server system, where a task like logic and renderer task is assigned a thread for the engine's entire runtime

torn heart
#

the risk is you randomly don't have objects added into the scene

#

or removed

#

or whatever the thread does

#

no synchronization needed and perfectly safe

#

& very easy to implement

neon pewter
#

i'm glad that the scene is a logic thing

river solstice
#

I am sure it does the job but it looks like a fragile design to me

minor summit
#

what do you know about fragile design anyway

sterile hinge
#

uuid = string is more concerning tbh

worn jasper
#

and that being for each component

#

for each packet

river solstice
torn heart
#

last 2 I'm not sure but seems reasonable

#

other than it being String

#

if all of them are managed in a few methods w high locality of behavior it's pretty fine

river solstice
#

well, I don't know the whole context and how are they used, so it's difficult to tell

torn heart
#

concurrent rendering

#

so you need those extra queues for processing either way

neon pewter
#

the uuid is actually stored as string for the object

#

the value is generated and converted to string when the object first created and it is serialized when save and on load

sterile hinge
#

yeah but why

#

stringly typed is generally a bad sign

neon pewter
#

i don't see why it is a bad sign right now could you explain?

neon pewter
sterile hinge
icy shadow
neon pewter
#

if the component carry a uuid that is not a uuid, wouldnt the system use the malformed uuid to get the component with malformed uuid ?

icy shadow
#

it’s still a bad practice to allow malformed ids in the first place

#

Also using UUID will be faster because it has a much more simple hash function

neon pewter
#

i see, thanks for clarify that

river solstice
#
public class MyCoolUUID {
    private final String original;
    private final UUID uuid;

    public MyCoolUUID(String possiblyMalformedUuid) {
        this.original = possiblyMalformedUuid;

        UUID parsed;
        try {
            parsed = UUID.fromString(possiblyMalformedUuid);
        } catch (IllegalArgumentException e) {
            // Oops
            String sanitized = sanitize(possiblyMalformedUuid);
            try {
                parsed = UUID.fromString(sanitized);
            } catch (Exception ex) {
                // Whatever lol
                parsed = UUID.randomUUID();
            }
        }
        this.uuid = parsed;
    }

    private static String sanitize(String s) {
        // Force it into the "8-4-4-4-12" UUID format B)
        String hexOnly = s.replaceAll("[^0-9a-fA-F]", "");
        hexOnly = (hexOnly + "00000000000000000000000000000000").substring(0, 32);
        return hexOnly.replaceFirst(
            "(\\p{XDigit}{8})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{4})(\\p{XDigit}{12})",
            "$1-$2-$3-$4-$5"
        );
    }
}
sterile hinge
#

💀

dense drift
#

I would not use the string unless the id is exposed to an user (config, database, commands) tbh

tame moth
#

i just made a discord bot that uses ai to read your promt and sets up an entire discord server roles channels catagories ect for you in 5 seconds

neon pewter
dusty frost
#

i was gonna say bro, any serialization framework will do that for you

#

SQL libraries serialize it to/from bytes if your SQL server supports it

dusky harness
dusty frost
#

yeah i'm the #1 Hoplite lover bro lol

dusty frost
#

they just couldn't do the JVM UUID for multiplatform reasons

dusky harness
#

ah

#

oh that makes more sense now

dusky harness
dusty frost
#

on god bro

#

that shit is peem

dusky harness
neon pewter
minor summit
#

like bruh it's just two u64 how hard can it be

pulsar ferry
#

Which isn't serializable by default either pepeLaugh
As for why it's experimental, basically any Kotlin feature has to be experimental for a few releases before it's marked as stable even if it is as simple as a class :')

#

Ah wait quick update on that, it's not @Serializable but it is internally serializable by kotlinx.serialization, i guess it makes sense

worn jasper
pulsar ferry
#

Do you use it? lol

worn jasper
#

kinda like it

pulsar ferry
#

Oh interesting

worn jasper
#

I am gonna rewrite Runway, still checking what I will use

#

since I technically do have my own config system xD

#

but might go with yours as it is probably much better/safer than mine

#

I don't trust myself xd

#

I also need to see how in the world I am gonna optimize runway's parser

#

I have no idea how I will do it... caching? idk

#

I never did benchmarks in the current way, but I'd assume it sucks at performance in bigger servers

worn jasper
snow grove
#

idk

minor summit
#

setting config values :(

worn jasper
#

that's the least of my worries

unkempt kiln
#

Hi guys, am I able to ask for help regarding java stuff here or just MC specific?

unkempt kiln
#

Regarding constructors and Inheritance, if I have a constructor in a subclass am I able to use a this statement in a constructor and a super() in the next constructor?

river solstice
#

If I understood your question correctly, this is allowed, for ex.:

class Parent {
    Parent() {
        // Parent constr
    }
    Parent(String msg) {
        // Parent constr with args
    }
}

class Child extends Parent {
    Child() {
        this("Child without args");
    }
    Child(String args) {
        super(args); // super();
        // Child with args
    }
}
unkempt kiln
#

hmm i see

worn jasper
river solstice
#

similarly

public void methodWithoutArgs() {
   methodWithArgs("Hello");
}

public void methodWithArgs(String arg) {
  // ...
}