#development

1 messages · Page 89 of 1

worn jasper
#

just sayin

spiral prairie
#

Which then start to be corrected to HAHAGAGAHHA

#

Because I've misspelt in that way

icy shadow
spiral prairie
#

Yes it is

#

Obviously

dusky harness
spiral prairie
dusky harness
#

ah

#

I use Swiftkey :)

spiral prairie
#

Although I don't have that issue anymore since I've disabled autocorrect

icy shadow
#

Wow

#

Ambitious

dusky harness
#

oh I rely too much on autocorrect

spiral prairie
#

When I want to correct a word I tap the middle suggestion it's usually right

#

Typing using suggestions is quite fast

#

No way I'm typing out suggestions

#

I type sugg (deez nuts) and I can immediately tap that suggestion while not relying on goofy auto corrects

#

Anyhow, how's our FileManager guy doing?

icy sonnet
#

giving up hope and stuff you know

spiral prairie
#

Relatable

#

Giving up in misery is a key part of programming actually

icy sonnet
#

Your kidding shoking and stuff

#

🙂

#

you guys ever worked with react + spring-boot

spiral prairie
#

Sounds like it hurts

icy sonnet
#

nah IT was so FUN

spiral prairie
#

Spring boot gives me enterprise fizzbuzz vibes every time I look at it

icy sonnet
#

nah dont say that word

#

fizzbuzz

#

working with a freaking module to get to an answer nobody likes

#

soo instead of making my own crap

#

apparenlty JAVAPLUGIN ALREADY HAS THOSE THINGS

#

getResource("config.yml");
getResource("deathMessages.yml");
saveResource("config.yml", true);
saveResource("deathMessages.yml", true);
sad dayz

spiral prairie
#

Yeah it works pretty well for simple stuff

icy sonnet
#

for now I just want it to get my files so I can do stuff in the config

neat pierBOT
icy sonnet
#

from 2021

dark garnet
#

sorry @dusty frost @hoary scarab didnt see ur msgs about this
unfortunately the ppl hosting events are not the brightest sometimes (ive had to add so many warnings/guides so that they didnt screw up the process somehow 😭), so im afraid theyll more often than not forget to end the event
im also afraid of asking ppl when their event will end cause some ppl just dont know. some events can last for 30-60 mins but end early, later, etc..., ppl just dont know
being able to add time on might work, but ending early is still a problem (ppl might also forget to add time unless reminded somehow which is another problem in itself)
and we're currently working on in-game integration + website if that helps at all

dark garnet
#

what inventory gui library do u guys use/recommend ping if reply

worn jasper
#

YESSIR

#

use v4 if you can

dark garnet
#

🙏

dark garnet
worn jasper
dark garnet
#

is it on mvn

worn jasper
#

docs are pretty small

#

and uncompleted

#

v4 is quite new

#

but you can check examples in the repo

dark garnet
#

v3 it is then 💀

worn jasper
#

it's essentially a reactive gui library

worn jasper
dark garnet
#

im downloading library during runtime

#

so gotta be on mvn

worn jasper
#

just use paper loaders

#

or libby

coarse abyss
#

hello

#

someone can help me with this?

#

i cant send links

#

damn

worn jasper
#

there

coarse abyss
#

thanks

coarse abyss
dark garnet
worn jasper
dark garnet
#

is v4 on another repo

#

probs shouldve asked that

worn jasper
#

says in the docs

dark garnet
#

o didnt see setup page cause wasnt on v3 docs so assumed id find setup stuff on v4 readme

dark garnet
shell moon
#

How would you store custom data from players (input) like 2500 characters?

#

I mean, to save player saved patterns, modifiers, etc

hoary scarab
#

When I was working on my skyblock plugin I would use a json string and compress it. Idk which compression I used though.

shell moon
#

GZIP, ZLIB, Base64 + GZIP/ZLIB, LZ4, Snappy? (Yes, chatgpt xd)

#

Here are the sizes of your string after applying different compression methods:

Original size: 2520 bytes
GZIP compressed size: 102 bytes
ZLIB compressed size: 90 bytes
GZIP + Base64 encoded size: 136 bytes
ZLIB + Base64 encoded size: 120 bytes

hoary scarab
#

Actually yeah I think that's it lol
Base64 and gzip

shell moon
hoary scarab
#

I'll be on pc in a couple hours and check.

shell moon
hoary scarab
#

Yeah used it for saving schematics for island generation.

Makes me want to work on it again. sigh

shell moon
#

shows code eyes_shake

hoary scarab
#

...

shell moon
hoary scarab
#

Still not on pc

shell moon
hoary scarab
#
//Base64.encode()/.decode()

public byte[] compress(String data) throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream(data.length());
    GZIPOutputStream gzip = new GZIPOutputStream(bos);
    gzip.write(data.getBytes());
    gzip.close();
    byte[] compressed = bos.toByteArray();
    bos.close();
    return compressed;
}
    
public String decompress(byte[] compressed) throws IOException {
    ByteArrayInputStream bis = new ByteArrayInputStream(compressed);
    GZIPInputStream gis = new GZIPInputStream(bis);
    BufferedReader br = new BufferedReader(new InputStreamReader(gis, "UTF-8"));
    StringBuilder sb = new StringBuilder();
    String line;
    while((line = br.readLine()) != null) {
        sb.append(line);
    }
    br.close();
    gis.close();
    bis.close();
    return sb.toString();
}
```Old &/or bad code adjust accordingly.
#

@shell moon ^^^

pure crater
#

Why not a database

#

And also, why are you trying to compress 2 kb of data??

#

Even if you have a server like Hypixel that’s 50k players, that’s not going to be much

#

If you really have to, use the built in DB compression if it’s supported

shell moon
# pure crater And also, why are you trying to compress 2 kb of data??

I want to store like this:
c=AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC t=1 a=lmno|c=AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC t=1 a=lmno|c=AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC-AABBCC t=1 a=lmno
but not three times, probably up to 15 times (in a column)

pure crater
#

Yes but still, are you sure you really want to write the code to compress and decompress 2 kilobytes of data

#

And also what if server owners want to change something

shell moon
#

They shouldn't all handled by the plugin

#

i dont think they should change something

#

i mean, its not an important info for the player

#

they can always delete the row

worn jasper
#

I think everything I had to say was already said in the other channel

worn jasper
#

lol

#

one of the most basic ones

pure crater
#

You could even use an ORM and let the library handle seeialization and deserialization into the database for you

#

I use Hibernate ORM to do that

#

Just create java objects and let it handle the database for you

worn jasper
#

yeah also works

#

although I usually prefer an inbetween

#

like exposed allows

shell moon
#

i make plugins for hobbie

#

idk that much

worn jasper
#

well, I'd learn about DBs better then

#

cause the format you just described sounds like you do not know the principles

#

and are treating it as a "I'll use the same method I used to store data in files, but in an sql db"

icy shadow
#

this is very strange

worn jasper
minor summit
#

this

worn jasper
icy shadow
#

Joe mama

minor summit
#

stranger than this, even

worn jasper
lyric gyro
#

Bruh

#

Too lazy to use now the command for just a gif

ocean crow
#

heyo, question for y'all

with our texturepack we wanna do an animated emoji in chat, we have a system for static images but not sure how to go about doing animated (if possible) so if anyone has some insight let me know :D

torn heart
#

like 90% sure

#

with shaders it's not hard but it's not going to work for most people

pulsar ferry
#

You can bump that to 100%

worn jasper
#

make it 101%

west socket
#

Does anyone know how to make a good looking solid bar in chat in vanilla?

#

This used to work with strikethrough and the hyphon character in older versions, but now looks bad for some reason

shell moon
#

why no just use square unicode?

west socket
#

Square?

#

Does that appear as a line?

shell moon
#

You have a lot to choose from

#

▄▁▁▁▁▁▁▁▁▁▁ 4%
⣦⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 4%
◐○○○○○○○○○○○○ 4%

#

▥□□□□□□□□□□□□ 4%

#

▰▱▱▱▱▱▱▱▱▱▱▱▱ 4%

west socket
#

Im looking more for a border that separates chat messages for formatting

#

I would prefer it to be seemless

shell moon
#

why not just

#

#

and change color of progress completed

tight junco
#

if you want a solid line just do strikethrough with a bunch of spaces

west socket
#

Can you strikethrough a space?

tight junco
#

yes

west socket
#

That solves my issue then

#

Thanks

tight junco
#

you may just need to add &f on the end so it recognises the spaces and isnt trimming it

shell moon
#

Ori Solutions Inc.

mild musk
#

guys how would i fix "Expected whitespace to end one argument, but found trailing data", i wanna use a url as one of the arguments in a command but that error appears when i try

mild musk
high needle
#

Hi guys! I was wondering what a fair price is for a dev on an hour rate?

sly saddle
high needle
torpid raft
mild musk
torpid raft
#

where did you say that

#

i must be missing context

#

i really have no idea how to begin helping without more info

mild musk
#

yeah i've forked a plugin and im trying to fix this

#

you want me to send the code for it?

lyric gyro
torpid raft
mild musk
torpid raft
#

send it as a pastebin link

#

id prefer that over an image

mild musk
#

yeye

sly saddle
#

ofc lol

torpid raft
#

from the docs of the command argument library that plugin uses

#

in your code url is handled by a TextArgument:

this.withArguments(new TextArgument("url"));
this.withArguments(new StringArgument("filename"));
#

so basically, wrap the url in quotes

mild musk
#

hmm

#

lemme try it

#

you are a genius my man

#

that worked perfectly

torpid raft
#

happy to help

mild musk
#

thank you very much

shell moon
#

Any way to create a (format, idk the name) using adventure, like gradient or something like that, and later, set the string content? I dont mean like

MiniMessage.miniMessage().deserialize("<rainxow>"+text+"</rainbow>")```
as text can contain also tags and it will be taken incorrectly (havent used adventure that way yet) any ideas?
#

I mean something more like

SomethingComponent sc = Adventure.something(color1, color2, color3, etc).style(BOLD, etc);

Component c = sc.content("This will be a rainbow text!")

so it can be reused

icy shadow
#

have a look at this?

marble gull
#

Hello everyone, I have been having issues compiling this plugin from source. I'm not sure what I'm doing wrong, if I understand it right the dependencies are not being found because they're not available in the urls defined. Is anyone able to give it a try to see if I'm the issue or if this is an issue?
https://github.com/kangarko/ChatControl

#

I take it the development chat is for general development, not only papi related? Don't wanna break any rules

ocean crow
#

Is it throwing any errors?

marble gull
ocean crow
#

Hm

#

Ah okay

#

Change the foundation stuff to be local and specify the directory for it

#

Can just compile it too

#

@marble gull ^

worn jasper
ocean crow
#

XD

#

I mean it’s one of the dependencies and his bitbucket doesn’t seem to be up

worn jasper
#

(Ik it's for compiling chatcontrol, which btw, do not use that either but to whoever sees this, do not use it)

ocean crow
#

XD

marble gull
digital temple
#

Are there any devs here with experience in Gradle?
I'm new to this and don't want to use Maven anymore.
I managed to set everything up properly, the plugin builds correctly, and I can also start the plugin on the server.

However, I'm having issues with the relocations. They are not being shaded into the .jar.
The whole thing is supposed to be uploaded to Jitpack as an API, including the relocations.

This is my current build.gradle.kts: https://hastebin.skyra.pw/fubohebadu.pgsql

river solstice
#

try
./gradlew shadowJar --info

#

look for relocate process

#

also not sure if it makes any difference but move out shadowJar { } out of tasks { } (maybe thats just .kts thing though) I have my shadowJar non-scoped at it works correctly

spare flare
#

anyone knows what the DamageCause that the worldborder does?

#

does it count as custom?

spare flare
#

nvm

gleaming nacelle
#

Hi! Has someone ever used PluginLib to download and relocate libraries? I'm having some trouble setting it up. I can't use Spigot's own library loader bc it seems that it doesen't like library relocations

pure crater
#

You don’t need to relocate if you use spigot’s library loader ideally

#

Only when shading

worn jasper
#

I don't recommend using spigot library loader

#

it downloads from maven central, which is against their ToS

#

libby allows for much more and using third party repos

gleaming nacelle
gleaming nacelle
hoary scarab
pure crater
#

It does violate ToS but I personally am fine with using it

hoary scarab
#

I didn't say it doesn't. Just questioning why their TOS would be against its use case lol

gleaming nacelle
# pure crater Which ones specifically

Twitch4J, specially fasterxml.jackson. I've been having issues with the library since spigot 1.21.3. I've talked to a mantainer of Twitch4J who recommended me to shade and relocate the libs directly (which worked, but I don't want a large file size)

#

I had PluginLib almost completely set up, but couldn't get it to import correctly and load the libraries

worn jasper
gleaming nacelle
#

Personally, I would prefer to use PluginLib, as I almost got it but I think I'm missing something

pure crater
gleaming nacelle
#

And seems that spigot's loader doesen't support relocation

craggy maple
#

When I buy a pickaxe from the menu on my minecraft server for 5000 game money, I want that pickaxe to be magical in the game, for example, efficiency is 5, how do we do this, the following does not work

give %player_name% netherite_pickaxe{Enchantments:[{id:"efficiency",lvl:5}]} 1

neon pewter
#

if the Collider classes are extends of Component, will isAssignableFrom still work normally ?

    public void resetCollider(FlatPhysicBody flatPhysicBody, Component colliderObject) {
        Body body = flatPhysicBody.loadInstObjectBody();

        if (body == null) return;

        int size = fixtureListSize(body);

        for (int i = 0; i < size; i++) {
            body.destroyFixture(body.getFixtureList());
        }

        if (colliderObject.getClass().isAssignableFrom(FlatBoxCollider.class)) {
            addFlatBoxCollider(flatPhysicBody, colliderObject);
        }
        else if (colliderObject.getClass().isAssignableFrom(FlatCircleCollider.class)) {
            addFlatCircleCollider(flatPhysicBody, colliderObject);
        }
        else if (colliderObject.getClass().isAssignableFrom(PillBoxCollider.class)) {
            addPillBoxCollider(flatPhysicBody, colliderObject);
        }

        body.resetMassData();
    }
sterile hinge
#

Not sure what you‘re trying to do there

dense drift
#

I think you are looking for colliderObject instanceof SomeCollider

Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter
I think it will always return true for the first check

neon pewter
#

hmmm

#

i will make a test to see what turn true when i pass in value

dense drift
neon pewter
#

i read the article and it seems like for my use case it will be instaneof instead of isAssignableFrom

mental haven
#

Heyo, anyone here used the Incendo/cloud project for managing commands? Im trying to use the new system in beta.10 and im wondering if anyone managed to get the MinecraftExceptionHandler to work?

dusty frost
#

I believe if you are using the modern PaperCommandManager, the typing and everything is different since you need to use their mapper from the Brigadier type, but it should be pretty similar!

mental haven
dusty frost
mental haven
#

i'll try

dusty frost
#

then you don't have to deal with the sender type mapping and everything

mental haven
#

i just followed the example on the github they have

dusty frost
#

and you can use .defaultHandlers() to add all the handlers automatically

mental haven
dusty frost
#

though I also have a sneaking suspicion that something is afoot with your .decorator(), since the exception complains about serializing Components, and you're doing component stuff where I'm not

mental haven
#

oh

#

will try

dusty frost
mental haven
#

will also try that, also trying to use it with the new PaperCommandManager will see how that works out

dusty frost
#

yeah my biggest gripe with the new one is that you have to use their wrapper type for senders and validation instead of just like CommandSender or Player from Bukkit

#

just adds a bit of overhead all so you can access the brigadier tree, which is probably useful for some stuff, but I haven't had any issues without it

mental haven
#

which versions of libs do u use?

dusty frost
#
    compileOnly("org.incendo:cloud-paper:2.0.0-beta.10")
    compileOnly("org.incendo:cloud-minecraft-extras:2.0.0-beta.10")
    compileOnly("org.incendo:cloud-kotlin-extensions:2.0.0")
    compileOnly("org.incendo:cloud-annotations:2.0.0")
    compileOnly("org.incendo:cloud-kotlin-coroutines-annotations:2.0.0")
    kapt("org.incendo:cloud-annotations:2.0.0")
#

though half of those are for kotlin specifically lol

mental haven
dusty frost
#

yeah im ngl, i swear there was a big change in the way text components were serialized in one of the 1.21 versions, so i thought that might be it

#

because i'm using that setup on 1.21.1 with no issues, but i noticed you're on 1.21.3 so maybe something changed internally with how text components work that cloud hasn't updated to?

mental haven
#

possible i'll try 1.21.1 to see if it works there

dusty frost
#

yeah i wasn't gonna suggest that cause it seems like a lot of work if you're not like using a gradle plugin to runServer automatically but yeah definitely worth trying imo

mental haven
#

eh i have all the servers setup i just drag and drop plugins ^w^ so should be fine

dusty frost
#

ah sweet!

#

hmm okay so, more digging, possibly your Paper jar might be messed up? if you could, try opening it with an unzipping program and see if there's a META-INF/services/io.papermc.paper.command.brigadier.MessageComponentSerializer file with that class plus Impl in it.

#

cause it looks like it can't find an implementation via the Java ServiceLoader to dynamically instantiate

mental haven
#

theres no services folder in the META-INF if you mean in paper.jar?

dusty frost
#

yeahhh

#

there should be i think

mental haven
dusty frost
#

hmm

#

looking at my paperweight jar, it contains META-INF/services/ a bunch of stuff, but maybe actual paper jars don't?

mental haven
#

possible, maybe its in the libraries folder jars

#

i also tried on 1.21.1 now still no work

minor summit
#

the paper jar you download from the website won't contain the service file

#

it's the patched server jar that has it

dusty frost
#

ah is that in /cache/mojang_1.21.1.jar then?

mental haven
#

yea it is there

minor summit
mental haven
#

oooo

#

interesting

#

now i know what it could be haha

#

thanks

dusty frost
#

emily to the rescue!

#

we love emily in this household discord server

mental haven
#

i was experimenting with externally loading .jar files before so thats probably causing the problems

dusty frost
#

ah yeah that would probably do it

#

was that for library loading purposes? if so, you can use either the spigot library loader or the new paper plugin library loader to accomplish the same thing but way easier

mental haven
#

oh i was just playing around, its H2 driver

#

but i guess i can just add that to plugin.yml yeah

dusty frost
#

ah yeah that'd be good for either of those, if you actually do want it!

mental haven
#

wuh added pluginloader to paper now plugin isnt even detected haha

dusty frost
#

oh god lol, did you add the Loader + Bootstrapper + paper-plugin.yml pointing to those?

mental haven
#

oh i need both bootstrapper and loader?

dusty frost
#

yeah cause the bootstrapper provides your plugin instantiation

mental haven
#

🤷‍♂️ no workey haha added both

dusty frost
#

and your paper-plugin.yml points to them correctly?

mental haven
#

should i think, i just used gradle plugin for making plugin.yml and paper-plugin.yml

dusty frost
#

oh, well check that it's good in the actual .jar, and maybe get rid of the plugin.yml as it might conflict? i don't remember tbh

minor summit
#

you don't need both bootstrapper and loader, you can have one or the other, they do different things, and paper will ignore plugin.yml if paper-plugin.yml is present

dusty frost
#

oh shit, i didn't even know that!

#

just assumed it'd require a bootstrapper, that's sweet

mental haven
#

oh well for some reason when i add loader it just doesnt find plugin anymoer haha

dusty frost
#

no messages in the console or anything? it should do something, even if it just immediately fails on startup lol

mental haven
#

well i get the
[15:06:31 INFO]: [PluginInitializerManager] Initializing plugins...
[15:06:31 INFO]: [PluginInitializerManager] Initialized 9 plugins
[15:06:31 INFO]: [PluginInitializerManager] Bukkit plugins (9):

and plugin is not included in those haha

minor summit
#

no other errors or anything in the log? then the plugin is not in the plugins folder Think2

mental haven
#

nothing at all, plugin is clearly in plugins folder tho hm

minor summit
#

if the server is not picking it up at all then it isn't

#

if it does not show up in the log

mental haven
#

it is, if i remove loader it finds it xd

#

if i add loader it fails

#

to find

minor summit
#

share the whole server log?

mental haven
#

oki sec

minor summit
#

adding a file in your jar won't make the server not show up your plugin in the log at all

#

even if it's an error

mental haven
minor summit
#

that really just sounds like it isn't in the plugins folder; what's the log like when the plugin loads?

mental haven
#

it wont fully load of course cause it cant find the H2

minor summit
#

very strange, it works fine for me

mental haven
#

which version of paper?

#

Maybe my configuration is wrong?

api-version: "1.21"
name: AdvancedCrops
version: 0.0.1
main: eu.virtusdevelops.advancedcrops.plugin.AdvancedCrops
loader: eu.virtusdevelops.advancedcrops.plugin.AdvancedCropsLoader
description: Advanced crops for your server.
load: STARTUP
authors:
  - VirtusDevelops
folia-supported: false
dependencies:
  server:
    Vault:
      load: BEFORE
      required: true
      join-classpath: true

dusty frost
#

oh maybe get rid of the load: STARTUP? that and the folia-supported are the only things I don't have in mine

mental haven
#

nope still same issue

#

also i assume this is fine?

class AdvancedCropsLoader : PluginLoader {
    override fun classloader(classpathBuilder: PluginClasspathBuilder) {
        val resolver = MavenLibraryResolver()
        resolver.addDependency(Dependency(DefaultArtifact("com.h2database.h2:2.3.232"), null))
        classpathBuilder.addLibrary(resolver)
    }
}
dusty frost
#

ohhh

#

you probably need to add Kt to the end of your package name

#

since it's Kotlin and it renames the .class files

mental haven
#

interesting, main works just fine tho :o.

dusty frost
#

ngl I live in fear and just do those in Java anyways lol

#

so if that doesn't work, guess you'll just have to embrace the old ways and do it in Java

minor summit
#

the PluginLoader has to be in Java

#

unless you are shading kotlin, uh

#

something like that

mental haven
#

oki

dusty frost
#

oh also, don't you have to add Maven Central manually as a repository? or am I just discovering other unnecessary things i'm doing lmao

mental haven
#

i just followed the instructions on papermc website this.

public class TestPluginLoader implements PluginLoader {

    @Override
    public void classloader(PluginClasspathBuilder classpathBuilder) {
        classpathBuilder.addLibrary(new JarLibrary(Path.of("dependency.jar")));

        MavenLibraryResolver resolver = new MavenLibraryResolver();
        resolver.addDependency(new Dependency(new DefaultArtifact("com.example:example:version"), null));
        resolver.addRepository(new RemoteRepository.Builder("paper", "default", "https://repo.papermc.io/repository/maven-public/").build());

        classpathBuilder.addLibrary(resolver);
    }
}
dusty frost
mental haven
#

oki i'll add just in case

#

still no luck

dusty frost
#

man you have a cursed setup lmao

mental haven
#

seems like it yep

#

i'll take break come back and see if that helps whahaha

mental haven
#

pl

#

yeah still doesnt work, i dont even know, theres no debug logs or anything

#

is there any flag that would enable any extra debugging?

#

i added -Dpaper.log-level=FINE but that didnt change anything

dense drift
#

This is the first time I do something that I need to take into consideration concurrency. For a plugin I have something like a goal, where players have to deliver x items (e.g. 1000 oak logs) and receive money for how much they deliver. The goal is global, meaning that all players can deliver different amounts until the total amount is reached.
How can I process each deposit sequentially so that players don't deliver more than is required?

sterile hinge
#

so it's across multiple servers or what?

dusty frost
#

yeah we'd need more details on like database/redis/server setup to help more

pulsar ferry
#

How is the delivery even done?

river solstice
#
import java.util.concurrent.locks.ReentrantLock;

public class Goal {
    private final int goalAmount;
    private int currentAmount = 0;
    private final ReentrantLock lock = new ReentrantLock();

  // Getters, Setters

    public int deposit(int amount) {
        lock.lock();
        try {
            int remaining = getRemainingAmount();

            if (remaining <= 0) {
                return 0; 
            }

            int toDeposit = Math.min(amount, remaining);
            currentAmount += toDeposit;

            return toDeposit; 
        } finally {
            lock.unlock()
        }
    }
}
#

though not exactly sure what are you trying to do

pulsar ferry
#

Yeah that's why I'm asking, because if it's done by like dropping an item or something like that it'll already be on the main thread so I wouldn't worry about it

river solstice
#

well either by dropping or a command, I would guess at least

#

@dense drift more context required 🚨

dense drift
#

Place items in an inventory and then click on a button

dense drift
sterile hinge
#

But it‘s all on one thread?

dusty frost
#

ngl the last time i did something like this for a holiday event, we just had a straight competition with no upper limit, so it didn't matter the order/concurrency people submitted them

#

because if it's just closing the GUI you'd have to give the extra items BACK to them afterwards

torpid raft
#

mutex moment

marble gull
#

Does anyone have a github actions example to publish a plugin jar to releases using maven? (please ping me)

river solstice
icy shadow
#

Mutex more like

#

Pootex

icy shadow
#

and it sounds like it is, if you’re just handling inventory click events

hoary scarab
#

If I want to "license" my code, do I just add the license to the top of each class?
I usually stick to all rights reserved but figure I'll post something GPL or similar.

finite geode
#

the header in files isn’t necessary. just placing a license file in your repo should be enough. afaik don’t even really need that either as long as you just specify somewhere in the repo what it’s licensed as.

#

I just stick with only a license file in my repo

hoary scarab
#

Ok so as long as its mentioned. 👍

wide salmon
#

hi i have a problem with papi

#

my placeholder not work

hoary scarab
#

If I have 1 interface and multiple classes but they essentially all do the same thing is that an API or a Library?

icy shadow
#

the terms are more or less synonymous

#

so "both" is the short answer

#

the long answer: depends on the visibility of the classes. if they're private implementation detail then they are part of the library but not part of the API

#

eg all the nms code is part of the spigot library (arguably not even this) but not part of the api

hoary scarab
#

Yeah thats the way i was thinking

torn heart
pure crater
#

Yes I would think API has in interfaces, headers, like the bare bones while library contains implementations as well

torn heart
#

API implies working with something with an interface

icy shadow
#

everything is an interface

#

even a static utility class is still an interface

#

it doesnt have to be a java interface

torn heart
#

maybe in technicality but like

#

the infamous "left pad" by most people's opinions would probably be a library but not an API

icy shadow
#

if you have a public static String leftPad(String s) that's an interface

torn heart
#

yea fair enough

hoary scarab
#

Is there a way to not modify the variable of a string but to edit the string itself?
Example; string = string.replace("key", "value");

I might be wording it wrong so google only shows the methods of String which doesn't help.

royal hedge
graceful hedge
royal hedge
icy shadow
#

also strings are immutable

#

thats the real reason

royal hedge
icy shadow
#

what do you mean

royal hedge
#

idk dude

#

wording wasnt very technical

icy shadow
#

it's a bit ambiguous yeah

#

either way the answer's no i guess haha

royal hedge
#

oh nvm i read it wrong

#

it says "not modify the variable but edit the string itself" i read it as "modify the variable but not the string itself"

#

silly me 😅!

icy shadow
#

you'd still be right with the correct reading i think

royal hedge
#

pass by reference would be modifying the variable tho no?

torpid raft
#

sparky more like

icy shadow
#

you could interpret it either way

torpid raft
#

spoony

#

im an addict

dense drift
dense drift
dusty frost
dusty frost
#

if you're doing this synchronously, then yeah you can just have it execute in order on a thread, but if you're doing it async you should definitely use some sort of locking mechanism externally to have tasks wait until it's their turn in the queue or whatever

dense drift
#

I can just put a warning that all items will be taken

dusty frost
#

well that's the whole point - if they have more than what would be required, it won't take those extra items

#

whereas it would take however many are put in the gui and/or you'd have to reimburse them somehow which seems error prone to me

dense drift
#

Yup

prisma briar
#

I know that Placeholder#setPlaceholders will parse the color for you, but is it possible to make PlaceholderAPI not to parse colors?

dusty frost
prisma briar
plucky maple
#

I asked this in #placeholder-api but ive realised it probably makes better sense asking here. I dont know the first thing about Java and im relatively slow with files altogether. I tried manually adding Quintillions, Sextillions and Septillions to vaults open-source placeholders so I could display Qi, Sx and Sp for money. To upload them I need to save them in the placeholders vault folder, but i noticed they're .class files in there and my ones I edited are .java files. Is this fine can i save them as .java files, or do i need to figure out how to save them as .class?

#

^ Incase I did it wrong btw

dense drift
#

@plucky maple run gradlew shadowjar and you should find a jar in build/libs afterwards

plucky maple
dense drift
#

in the folder you downloaded from git

#

where src is

plucky maple
#

oh I never downloaded the folder I just downloaded the singular file

#

i didnt realise i needed the folder

dense drift
#

Erm

#

You can not edit a java program like you edit a skript xD it needs to be recompiled into a .jar

Make your edit in this EconomyHook file and then run the command

#

And VaultExpansion*

plucky maple
#

Ngl, im still trynna figure out how to download the folder LMAO

#

Like I said, im so so slow when it comes to this kinda stuff

#

Okay think I figured it out, didnt realise you needed a third-party to do it

dense drift
#

Click on < > Code and then download @plucky maple

plucky maple
#

Thats all good I managed to download it via the third-party, now im just working out how you run gradlew shadowjar in the folder

#

I downloaded Eclipse IDE because I assumed thats what you needed to do it

#

Okay i've definitely done something wrong I think. It says "gradlew is not recognised as an internal or external command, operable program or batch file."

dense drift
#

it should work, as there is a gradlew.bat file

#

try gradlew.bat

#

And make sure you are in the folder you downloaded

plucky maple
#

It says deprecated gradle features were used in this build making it incompatible with Gradle 8.0

#

I've got a mate who was able to compile it so he's going to try to compile it for me instead, not sure why it wasnt working for me

royal hedge
dense drift
plucky maple
#

I've already deleted the folder and all that stuff, my mate got it working for me and now its doing what I wanted and formats numbers up to $999Sp :)

dense drift
#

Cool

plucky maple
#

Appreciate all the help, sorry i was a bit troublesome lol. I dont plan on doing this like ever so probably wont have to deal with me in here again thankfully 😂

dense drift
#

No problem

hoary scarab
#

Any reason why File.createTempFile(String, String) doesn't make the file with the proper ext?

dense drift
#

ext?

hoary scarab
#

extension

dusky harness
#

suffix - The suffix string to be used in generating the file's name; may be null, in which case the suffix ".tmp" will be used

#

so what do you have in the suffix param and what extension are you getting?

hoary scarab
#

.txt

#

with no extension

dusky harness
#

are you sure?
I tested java public static void main(String[] args) throws IOException { File file = File.createTempFile("name", ".txt"); System.out.println(file.getName()); System.out.println(file.exists()); file.delete(); } on my pc and it works: ```
name6104929944890761521.txt
true

hoary scarab
#

\Local\Temp\56017f11-6da8-44fe-b0f5-19fba37b56223637234225750069121txt

dusky harness
#

did you forget the .? 🙃

dense drift
#

It says "suffix", it can be anything, so you probably need the dot as dkim showed shrug

hoary scarab
#

Yeap just found that name.substring(name.lastIndexOf(".") + 1)
Need to remove the + 1

dusky harness
#

👍

hoary scarab
#

Why is a prefix required if it already randomizes the name?

minor summit
#

it isn't requried tho?

hoary scarab
#

Can't be null & can't be shorter than 3 char

minor summit
#

ah, you are using the old File API

hoary scarab
#

java 23 File

hoary scarab
#

Ah yeah didn't want to use the attributes

minor summit
#

you don't have to pass any tho?

hoary scarab
#

Aight I'll swap it

#

Yeah says its required

minor summit
#

no?

hoary scarab
#

I was putting null 🤦

minor summit
#

as attributes? yeah don't do that lol

#

just don't pass any attribtues..

hoary scarab
#

yeah got that

wary dust
#

any people good with vps' able to help me out real quick

#

I just cant get into my vps with ssh ive reset it and all

#

so confused

icy shadow
#

what’s happening

#

Timed out? Authentication failure?

icy sonnet
broken elbow
#

What?

icy shadow
#

use a command framework i suppose

#

but that's maybe making things much more complicated

hoary scarab
#

You can clean it a little but thats about the "best" way.

river solstice
#

im not sure what im looking at tbh

#

and what even is the question

hoary scarab
#

He doesn't like having to instantiate everything

river solstice
#

use Reflections library 🤓 (or write class finding yourself)

Interface for listeners (same for commands):

@Retention(RetentionPolicy.RUNTIME)
public @interface Listener {
}

Your listener classes:

@Listener
public class PlayerJoinListener implements Listener {
    public PlayerJoinListener(MyCoolPlugin plugin) {
        // I asssume you register it here
    }
}

Your instantiation logic in your main class:

public void instantiateListeners() {
    new Reflections("my.cool.package.listeners").getTypesAnnotatedWith(Listener.class).stream()
        .forEach(listenerClass -> {
            try {
                listenerClass.getConstructor(MyCoolPlugin.class).newInstance(this);
                // It would be better to register it here instead of in the constructor
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

This way all the listener classes annotated with @Listener will be registered automatically. No need for a "command framework".

icy shadow
#

not really worth it unless you have a very big project

#

and in that case i'd generally favour something like Guice modules rather than magic searching

icy sonnet
icy sonnet
hoary scarab
#

I don't like doing it 🤷

icy shadow
#

nobody likes it

#

it's like doing your dishes

#

you can do them by hand or you can buy an industrial dishwasher if you have a shit ton of dishes to do

#

but if you only have a few plates it's probably not worth it

hoary scarab
#

Pffft You don't know me. I don't care how many dishes there are, they are getting washed by hand.

icy shadow
#

bro would NOT survive in the catering industry

hoary scarab
#

I don't care if others use a dishwasher but I don't

river solstice
#

sure I mean if you have two commands why bother with reflections and class searching

river solstice
#

personally I just go with Stream.of(new MyListener(), ...).forEach(listener -> ...), but to each their own

icy shadow
icy shadow
sterile hinge
#

reflections bad

#

But you can also generate code at compile time that does what you need

pure crater
#

I had a plugin that had 100 different implementations so I had to use class graph to get them all lol

icy shadow
#

I will die on the Guice hill

#

Especially for stuff like that, encouraging compartmentalisation

royal hedge
#

dagger >>

hoary scarab
#

Anyone have example usage editing a string in a constantpool using the new api? Google search fucking sucks.

#

I can read the strings I need but can't figure out how to modify them.

sterile hinge
#

You mean the jdk classfile api?

hoary scarab
#

yes

sterile hinge
#

I don’t think you can patch the constant pool directly

hoary scarab
#

You can build, parse it. I don't see why you can't edit it.
Google keeps showing ways that don't aline with the actual use case so there must me something its just showing the wrong shit lol

sterile hinge
#

because directly patching it would be a pretty broken implementation

hoary scarab
#

Can also "add" but thats useless to me.

sterile hinge
#

if you want to rewrite class references, there is ClassRemapper

#

if you want to rewrite string values, you can use that as an inspiration I guess

#

oh wait is ClassRemapper one of the classes moved into internals extremely late?

hoary scarab
#

Maybe I'm explaining wrong.
Its possible to edit a constant pool with ConstantPoolBuilder. I and google can't figure out how 😉

I'm currently reading the strings I want with```java
ClassFile cf = ClassFile.of();
ClassModel model = cf.parse(FileMethods.asBytes(toParse));

ConstantPoolBuilder constantPool = ConstantPoolBuilder.of(model);
constantPool.forEach(ent -> {
if(ent instanceof StringEntry)
String asString = ((StringEntry) ent).stringValue();
});

hoary scarab
#

ASM does it

sterile hinge
#

ASM is extremely low-level and allows you to generate any waste you want

#

(more or less)

hoary scarab
#

Google thinks in java 22 you can return an entry to modify it but thats wrong.

sterile hinge
#

google is flooded with ai shit

#

you most likely want to remap ldc instructions, probably also annotation values

hoary scarab
#

Anyway to pass the entry to another pool?
Something simple like ConstantPoolBuilder.add(PoolEntry) I only see methods for each individual entry type.

sterile hinge
#

How would that help you?

hoary scarab
#

Rebuilding the pool with different values

dense drift
#

I'm really confused by what you are trying to do.

#

And you mentioned that ASM can do it, why aren't you using that?

hoary scarab
#

I am currently. But want to use base java

sterile hinge
hoary scarab
#

Have I ever cared how it works?

#

I know its possible to do it. I just can't figure it out.

sterile hinge
#

💀

river solstice
#

is this what you're looking for?

hoary scarab
#

Yes and no. I can already edit strings in my .class files with ASM
I'm looking to do it with the Java api

river solstice
#

what do you mean java api?

river solstice
#

yeah I havent used it so not sure tbh

sterile hinge
#

I mean I already gave the answer but shrug_animated

river solstice
#

ASM?

dense drift
#

Have you tried ASM?

finite geode
#

lmao

spiral prairie
#

we need a MC server implementation in ASM

icy shadow
#

different asm

spiral prairie
#

ah ferk

#

my point still stands

pulsar ferry
#

Someone should just do it in Rust

noble kindle
#

Anyone wanna help me with abit of python spent 2 hours trying to get a cog to do as its told and it doesnt want to work 😦

torpid raft
#

whats a cog

noble kindle
#

like cogs?

noble kindle
torpid raft
#

i see

noble kindle
#

ive even tried using chatgbt its saying everything i done is correct i have a folder named Slave inside of that folder is another folder called cogs and below that there is a file named bot.py inside of the cogs folder there is a file called games.py

spiral prairie
#

context?

#

What are you trying to do?

#

And how exactly is it not working

torpid raft
#

yeah tbh i said i see but i still have no idea what you are talking about

noble kindle
#

make a discord bot im trying to put a cog/extension to run off the main file to run all the games from

torpid raft
#

what libraries are you using

noble kindle
torpid raft
#

ok that is very helpful

#

do you care to share your code which isnt working

#

i suggest pastebin

spiral prairie
#

So how is it not working

noble kindle
#

Ive not done anything like this for years its my first time going back to it hense why im abit confused and yes, what im trying to do to try and explain abit better ive got a main file called bot.py ive also got a folder called cogs inside of the folder is a file named games.py im attempting to use games.py for all my game stuff on my bot and keep bot.py clean / ready for other cogs/extensions ive got 2 commands inside of the games.py file but they are not being registered like when i try and run the commands it says command not found ( but when i restart the bot it says games cog loaded successfully)

#

hopefully that is a bit better explained

spiral prairie
#

Share your code

noble kindle
spiral prairie
#

hmm odd

noble kindle
#

Do you see anything major wrong?

spiral prairie
#

nope

noble kindle
#

hold on ill send the folder when my laptop decided to respond

#

thats the folder the files are in

noble kindle
#

^ did manage to get it to work adventurly changed from discord.py to py-cord

delicate panther
# noble kindle https://imgur.com/a/AIfqo6y and thats the console log

There is something wrong with it.

Let's figure it out shall we?

On the console, there is something wrong with Coroutine Not Awaited that happened to be (RuntimeWarning). Which lead to Commands Not Found even you command for (start_game, hello) so that not working. Maybe there is Incorrect Syntax for Loading Cogs.

#

Replace your load_external('cops.games') to await bot.load_extension('cops.games')

#

In cops/games.py, define commands like this:

class Games(commands.Cog):  
    def __init__(self, bot):  
        self.bot = bot  
    @commands.command()  
    async def start_game(self, ctx):  
        await ctx.send("Game started!")  
async def setup(bot):  
    await bot.add_cog(Games(bot))```
#

For Await Coroutines Properly

    await bot.load_extension('cops.games')  
bot.setup_hook = setup_hook```
high needle
#

Anyone that got experience with a Rainbow Cycle class?
I'm trying to add the Cycle so it goes from red to yellow ect. It's for my Trails plugin.

flint pecan
#

hello can somebody review code for the plugin i made and tell me what i can do better?

gleaming nacelle
#

Hi! I'm trying to implement Libby into my project, as some transcendent dependencies of my plugin conflicted with a different version of said dependencies of Spigot. I'm using AlessioDP's Libby 2.0 snapshot, which allows to manage transitive dependencies. I've ran into an issue. First, if I download a library (A) with all its transitive dependencies (B,C) it will only relocate the main library but not its other dependencies. And then, if I try to add the dependencies (B,C) as libraries, the "main" library (A) will fail to use the relocated version of B,C and instead will use the server's version, which causes conflicts as are not compatible versions.
What should I do?

short badger
dense drift
#

ah you are reading the rest in UserServiceImpl, cool

icy shadow
#

seems like using removeIf would be cleaner

#

I think you should definitely incorporate a caching layer into your data storage

#

and probably refactor it to use Futures or some other async mechanism

solemn estuary
#

Hey! I have a problem, I want to center messages without taking into account parameters such as &#(HexCode) &l ...
The problem is that it does weird stuff, and I'm not at all confident about doing it myself, so do you know any methods or libraries for this kind of thing?

#
private String centerText(String message) {
        int lineWidthPx = 154; 
        int messagePxSize = 0;
        boolean previousCode = false;
        boolean isBold = false;
        StringBuilder currentLine = new StringBuilder();
        List<String> lines = new ArrayList<>();

        for (char c : message.toCharArray()) {
            if (c == '§' || c == '&') { // Codes de formatage
                previousCode = true;
            } else if (previousCode) {
                previousCode = false;
                isBold = c == 'l' || c == 'L';
                currentLine.append('§').append(c); 
            } else {
                messagePxSize += isBold ? 6 : 4; 
                if (messagePxSize >= lineWidthPx) {
                    lines.add(currentLine.toString());
                    currentLine = new StringBuilder();
                    messagePxSize = isBold ? 6 : 4;
                }
                currentLine.append(c);
            }
        }
        lines.add(currentLine.toString()); 

        StringBuilder centeredResult = new StringBuilder();
        for (String line : lines) {
            int lineLengthPx = 0;
            isBold = false;
            for (char c : line.toCharArray()) {
                if (c == '§' || c == '&') {
                    previousCode = true;
                } else if (previousCode) {
                    previousCode = false;
                    isBold = c == 'l' || c == 'L';
                } else {
                    lineLengthPx += isBold ? 6 : 4;
                }
            }
            int offset = (lineWidthPx - lineLengthPx) / 2;
            for (int i = 0; i < offset / 4; i++) {
                centeredResult.append(" ");
            }
            centeredResult.append(line).append("\n");
        }

        return centeredResult.toString();

    }

}
hoary scarab
solemn estuary
#

tysm <3

hoary scarab
#

👍

solemn estuary
#

Is there a website with a list of premade functions ? ( or useful libraries )

hoary scarab
#

I would say just use google but its gone to shit.
Use a search engine of your choosing and just search for what you need. More then likeley you can find what ever you're looking for already made.

solemn estuary
hoary scarab
#

I mean if you want to be technical... github.com lol
But like I said if you search for it there is usually already a lib/api for it.

solemn estuary
#

it's working

#

🎉

hoary scarab
#
ClassModel unparsed = ClassFile.of().parse(FileMethods.asBytes(toParse));
ConstantPool unparsedPool = unparsed.constantPool();
System.out.println("Unparsed Size: " + unparsedPool.size());
ConstantPoolBuilder poolBuilder = ConstantPoolBuilder.of();
// Loop through unparsed modify & write entries to poolBuilder
System.out.println("Parsed Size: " + poolBuilder.size());
byte[] parsed = ClassFile.of().build(unparsed.thisClass(), poolBuilder, t -> {});
FileMethods.writeToFile(file, parsed);
```Unparsed/parsed size match but when I decompile the class its missing the variable...

Unparsed:```java
package com.thecrappiest.module;

public class Test {
    private String test = "%%__USER__%%";
}
```Parsed:```java
package com.thecrappiest.module;

public class Test {
}

I also debugged both unparsed and poolBuilder and they are the same besides the string being changed.

sterile hinge
#

well you're building an empty class with t -> {} I guess

icy shadow
#

// Loop through unparsed modify & write entries to poolBuilder is this showing that there's more code you're not sharing?

#

yeah lol

hoary scarab
hoary scarab
icy shadow
#

the constant pool is only one part of the whole class

#

it doesn't define fields or anything

sterile hinge
#

you need to actually add stuff to your class

hoary scarab
#

sigh give me a sec.

#

So what is the point of the ConstantPoolBuilder?

sterile hinge
#

it's for the api to add constants it needs

#

I don't think it should ever be the case that you use it directly

hoary scarab
#

So what is the point of having it as a parameter if Its not used by the builder?

sterile hinge
#

this way you can share constant pools in case most of it just stays the same

hoary scarab
#

Maybe I'm reading this wrong. How would it be shared... if its not used by the builder?

sterile hinge
#

wait, why do you think it's not used by the builder

hoary scarab
#

I have to build the class still.
None of the entries are converted to elements.

sterile hinge
#

it's the constant pool, not the rest of the class file

minor summit
#

The constant pool does not describe the class

#

You are not building the class, you're just ignoring it t -> {}

hoary scarab
#

Updated:```java
byte[] parsed = ClassFile.of().build(unparsed.thisClass(), poolBuilder, builder -> {
unparsed.forEach(ele -> {
builder.accept(ele);
});
});

#

Yeap still can't solve it.
Try again tommorow.

sterile hinge
#

I assume the result now is just the original class?

hoary scarab
#

Yeap was hoping one of the elements would be the constant pool

sterile hinge
#

what

hoary scarab
#

was hoping one of the elements would be the constant pool

sterile hinge
#

I already told you that you can't patch the constant pool directly like a week ago

#

are you still trying to do that anyway?

hoary scarab
#

Ofcourse 😉

sterile hinge
#

incredible

minor summit
#

the api just does not allow to arbitrarily patch the constant pool

#

no matter how hard you try

#

you need to remap the ldc instruction

hoary scarab
#

That required manipulating the bytecode. I want to make some use of the API rather then just writing it all out.

sterile hinge
#

what

minor summit
#

your words don't make any sense

sterile hinge
#

you are doing everything but using the api in the way it is designed

hoary scarab
#

Class -> Read -> Edit String -> Write

icy shadow
minor summit
#

because people smarter that any of us decided it would be a bad idea if they did

minor summit
hoary scarab
icy shadow
icy shadow
hoary scarab
minor summit
#

you don't need to manually alter the bytes

#

the api does it all for you

hoary scarab
#

Then show it lol

#

Been at this for a few weeks now

minor summit
#

when I'm on a computer, sure

icy shadow
#

can i ask

#

have you read the documentation for this library at all

hoary scarab
#

Unfortunately

sterile hinge
hoary scarab
#

Yeah but its not my code

hoary scarab
icy shadow
#

it does do exactly what you want to do

minor summit
#

it does exactly what you want

icy shadow
#

you want to find all the ldc instructions and modify them

hoary scarab
#

🤦

#

One sec

hoary scarab
#

SON OF A BITCH!
Weeks wasted 🤦

hoary scarab
#

Saved 200kb lol

hoary scarab
#

I work better with code then "explanations"

#

Why is it not embedding the image?

proper olive
#

Hi all! Where can I create a ticket or where is a special chat where they can help me with the plugin? I'm new here, I don't understand.

robust crow
#

Just put your message in the most relevant channel, most likely #general-plugins for your case.

viscid veldt
#

hey lads

#

I want to go through a class with multiple listeners and enable each one individually based off the config, but well that isn't quite working

#

is this even possible without doing some funniness like making a class for each listener

#

my current attempt

            // Connect listeners
            PluginManager pm = getServer().getPluginManager();

            if (channelSettings.replicateMinecraftMessages()) {
                pm.registerEvent(new Minecraft().ReplicateMessages(), this);
            }
torn heart
viscid veldt
#

ya

torn heart
#

there's nothing extra you need to do for that

#

just have multiple @EventHandler annnotated functions in the class

viscid veldt
#

well I do

#

its just giving me an error whenever I try to individually register them

torn heart
#

also your functions should never start with an uppercase letter unless you'e doing some kotlin dsl stuff

torn heart
viscid veldt
torn heart
#

ah mb

viscid veldt
#

dw

torn heart
#

well it's not silly at all to create different classes

viscid veldt
#

eh I suppose so

torn heart
#

people tend to do that anyway

viscid veldt
#

I just felt like it would be nicer to have them all in 1 class

torn heart
#

it's not

#

1 class should only do ~1 thing

viscid veldt
#

doing whatever looks nice to me

viscid veldt
#

alri ty

torn heart
#

don't be afraid to split up code between functions and classes as necessary, ofc there is "too much" and "too little" but you will learn

viscid veldt
#

I'm working on doing that better

#

thank you

torn heart
viscid veldt
#

that would be a waste of resources though

#

even if it's not much it's still doing something

torn heart
#

if it's already being defined in your config then it's not anything extra

#

and i guarantee you, 1 extra if statement has zero measurable impact on your code

#

avoid premature optimization

viscid veldt
torn heart
#

that has no impact on anything

viscid veldt
#

the impact is that small

#

dang

torn heart
#

no

#

it's just

#

almost nonexistent

#

you have a million other things to be worried about before that is something to be worried about

viscid veldt
#

fair enough

torn heart
#

performance is not always a priority either

#

didn't read the article but considering the title... probably accurate

viscid veldt
#

I'll have to read that later then

loud yoke
mystic ermine
#

Not sure if anyone can help, but haven't got anything back in the MythicCraft Discord yet about it:

Hello! Anyone know how to apply an offset to a ModeledEntity or ActiveModel? I'm trying to use MEG models for hats/in-game items and I can't really find a way of doing so. I've tried ItemDisplay with a translation offset and it didn't seem to work.

icy shadow
#

wow thats awesome

#

@leaden plume

torpid raft
#

HOW

icy shadow
#

HOW

leaden plume
icy shadow
#

"pog champ"

plucky maple
#
<head><title>403 Forbidden</title></head>
<body>
<center><h1>403 Forbidden</h1></center>
<hr><center>Microsoft-Azure-Application-Gateway/v2</center>
</body>
</html>```
This is the error message
#

Any clues what the hell is going on because im so lost

minor summit
#

rate limit issues with mojang services

#

it's kinda absurd, everyone has been experiencing an increase in rate limit errors even if it just shouldn't happen lol

plucky maple
#

Yeah right, im not sure if this is the cause or not but ever since they started players on my server have been getting lag issues where they simply cant load in and then they time out

past tinsel
#

Hey, when a player creates a coinflip using DeluxeCoinflip, relogs and opens a gui menu it "desyncs" the menu and allows players to take items out. I thought the plugin was not closing the gui correctly but that isnt the case; i tried this

            Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "dm execute " + player.getName() + " [close]");
        }
        if (loser.isOnline()) {
            Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "dm execute " + loser.getName() + " [close]");
        }```
#

In the console it confirms it has closed, but the gui doesnt reflect it

#

I tried delaying the animation start by 2 ticks to allow this to happen incase that was the issue and that still didnt work

dense drift
#

What even is that?

past tinsel
dense drift
#

That code, what is it doing, why is it using dm execute?

past tinsel
#

Other things do not work

dense drift
#

Im pretty sure there is a method in bukkit to close the inventory of a player, or just smth like Player#getOpenedInventory().close()

serene cairn
#

It's just Player#closeInventory

past tinsel
#

it doesnt do shit

brisk cedar
#

Does anyone know how to setup Pterodactyl on cloud server using cloudflare domain DNS ?

torpid raft
#

its a secret

high needle
#

Anyone got some recommendations for a license system for minecraft plugins?

dense drift
#

None

fading matrix
#

i cant place command blocks in my server

#

anyone can help?

torn heart
#

please google things before going to discord to ask

#

you will get a quicker answer

fading matrix
#

bro

#

still i cant place

torpid raft
#

did you restart the server after you updated the setting

#
  • be in creative mode
minor summit
#

be in creative, be op, paper adds a permission I think

past tinsel
flint pecan
#

I am not sure on how to apply this end portal shader to entities like endermen

clear walrus
#

My papi addon stopped working after 1.21 update, i will see better the details later, but wanted to ask if there was a major change or smth

dense drift
#

No

clear walrus
west socket
#

Is there any possible way to apply slow-falling to a non-living entity?

#

Or would you have to simulate it with some velocity shenanigans

last jolt
#

I need help with the new item displays, I summoned 4 of them, but the problem is since its a custom border on a big map, it'll scale hundreds of blocks when its big, even when its small, it will still extend that way vertically. When I scale that large, it stretches the texture out so much that it literally changes it's colour to light blue, how can I keep the original colour? it's just a completely purple texture with less opacity, but still gets scaled out like that. is there anything I can do with the texture to maybe solve this issue? Or some property im missing?

icy vigil
#

if you mean instance of Entity but not LivingEntity thn you can probably do some "hacks" like spawning invisible LivingEntity, applying slow falling to that entity and setting passenger

neat pawn
#
java.lang.NoClassDefFoundError: net/minecraft/network/NetworkManager```

I know NetworkManager was changed to Connection, and I'm using Connection, but why am I still getting this error?  Is there a way to fix it?
pulsar ferry
#

Still being referenced somewhere in your code

neat pawn
#

uhm

west socket
#

Thanks

west socket
#

Oh interesting

#

Maybe that changed at some point

raw junco
#

Anyone know how to make a rideable controllable ender dragon

pearl topaz
#

Hello, I feel insane right now but how on earth do you detect merchant trades, as in from a MerchantView, in a way where you can cancel it? It feels like there should be a PlayerTradeEvent.

dense drift
pearl topaz
dense drift
#

Why

pearl topaz
#

I prefer to develop for Spigot because it just works on more places

#

and im developing for a server that will be running Spigot

sterile hinge
#

We have 2025

#

Not 2014

pearl topaz
#

?

sterile hinge
#

Spigot is worse than paper in every aspect

pearl topaz
#

it has a habit of changing vanilla gameplay mechanics

sterile hinge
#

That‘s what spigot does, yeah

pearl topaz
#

it's what paper does

sterile hinge
#

Paper fixes some of the things spigot breaks

pearl topaz
#

like?

dense drift
#

Well, good luck implementing that in spigot with nms and whatever

pearl topaz
#

thanks, I get the feeling I'll need it

dense drift
pearl topaz
dense drift
#

I get why one would use spigot for a public plugin, but for a private plugin?? kek

worn jasper
worn jasper
#

And when paper hard forked, meaning spigot support will slowly fade away

worn jasper
#

Exactly so no reason to use spigot

pearl topaz
#

eh

worn jasper
#

Using spigot api (or well spigot itself) in 2025 is sad

#

And that is a well known statement

pearl topaz
#

Paper API pretty much encapsulated the spigot api

worn jasper
#

Do you know what a fork is

#

?

#

Lol

pearl topaz
#

yes

#

I understand that

worn jasper
#

Then you will know why your statement is irrelevant

pearl topaz
#

are you telling me that at this moment they aren't almost entirely the same?

worn jasper
pearl topaz
#

the linux version diversity is beautiful

worn jasper
#

And that does not change the fact that your previous statement (or well, this one) is irrelevant to the convo lol

pearl topaz
#

i was just looking lol

#

it looks nice

#

I used paper before

#

and there was a reason, I was having issues with it so I started just using Spigot

#

lemme see if i cant find my test server

worn jasper
#

That is called user error and skill issue my friend

pearl topaz
#

it wasn't user error

#

it was errors upon starting

worn jasper
#

Chances are 98% that it was

pearl topaz
#

cmd errors (on builtins)

worn jasper
#

Lol

sterile hinge
#

I had issues driving a car so I stuck to riding horses

pearl topaz
#

bruh

#

i found it btw

#

issues with early 1.21 builds

worn jasper
pearl topaz
#

this is just preference

#

any public plugin I would never target paper

#

so why would I on any other project?

sterile hinge
#

What

pearl topaz
#

point is your solution of just using a different platform is unhelpful, but thanks anyway

sterile hinge
#

But it fixes your problem

worn jasper
#

Leave him be

#

Brainwashed people usually stay the same

pearl topaz
#

definitely leave me alone, im not sure how exactly I've been brainwashed, clearly the secret spigot spies or whatever

#

and I do use paper? all the time

#

i just haven't this time and want to leave the option not to open

#

I'm sorry that this decision has personally offended you

#

good night fellow interneters 👋

river solstice
#

its 1pm

minor summit
#

and tons more api for other problems you might run into

#

but alas

pulsar ferry
#

Some people don't want solutions shrug

minor summit
#

yeah idk what they were asking for then

#

"hey i have this problem" damn bro that sucks

pulsar ferry
#

The amount of issues I have had open that only affects spigot is crazy, things as simple as InventoryClickEvent simply just not triggering on hopper inventories on Spigot for absolutely no reason

worn jasper
#

lmao

dense drift
#

because inside the request method you are checking the identifier as well (playercheck whatever). That's not part of the string argument.

river solstice
#

^
in your case the placeholder would be %playercheckexists_playercheckexists_<...>%

raw junco
#

Hello can someone help me Im trying to install a plugin I got from github into my intellIjidea project so i can edit the contents of it and add fetures but im having trouble and is lost.

solemn estuary
devout cave
#

Hi I got a question I have a serious problem I created my own server a few weeks ago rent it on gportal. So today I stupidly showed the ftp data so the IP the port the username the password and the link to a unserious Developer now he blocked me on dc and left our Server what is he still able to do now and How can I disallow him to do anything. Hopefully somebody could help I would be really grateful

solemn estuary
#

He can literally do anything he wants with your files.
You should contact your suupport

devout cave
#

ok and what should I ask for

solemn estuary
#

How to edit your creditentials for FTP

devout cave
#

ok

devout cave
#

and could anyone translate what this does he set it up

#

[21:20:19 WARN]: [SimpleScore] Task #34025 for SimpleScore v3.12.5 generated an exception
java.lang.IndexOutOfBoundsException: Index 2 out of bounds for length 2
at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source) ~[?:?]
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source) ~[?:?]
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source) ~[?:?]
at java.base/java.util.Objects.checkIndex(Unknown Source) ~[?:?]
at java.base/java.util.ArrayList.get(Unknown Source) ~[?:?]
at SimpleScore-3.12.5(1).jar/com.r4g3baby.simplescore.scoreboard.models.PlayerLine.getShouldRender(PlayerLine.kt:22) ~[SimpleScore-3.12.5(1).jar:?]
at SimpleScore-3.12.5(1).jar/com.r4g3baby.simplescore.scoreboard.tasks.ScoreboardTask.getPlayerScoreboard(ScoreboardTask.kt:133) ~[SimpleScore-3.12.5(1).jar:?]
at SimpleScore-3.12.5(1).jar/com.r4g3baby.simplescore.scoreboard.tasks.ScoreboardTask.getPlayerScoreboards(ScoreboardTask.kt:102) ~[SimpleScore-3.12.5(1).jar:?]
at SimpleScore-3.12.5(1).jar/com.r4g3baby.simplescore.scoreboard.tasks.ScoreboardTask.run$lambda$8(ScoreboardTask.kt:76) ~[SimpleScore-3.12.5(1).jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1659) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1529) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310) ~[paper-1.21.4.jar:1.21.4-138-5395ae3]
at java.base/java.lang.Thread.run(Unknown Source) ~[?:?]

jagged belfry
misty prism
#

A plugin is a software component that adds specific features or functionality to an existing program without modifying its core structure. Plugins are commonly used in various applications, including:

Web Browsers (e.g., browser extensions like ad blockers)
WordPress (e.g., SEO tools, security plugins)
Media Players (e.g., codecs for additional formats)
Development Tools (e.g., VS Code or JetBrains plugins)
They allow customization and enhancement of software without needing to alter its original code. Do you have a specific plugin type in mind?

torn heart
#

the genius

misty prism
misty prism
torpid raft
misty prism
torpid raft
misty prism
torpid raft
icy shadow
#

I love plugin

minor summit
pulsar ferry
#

Seems like you really do

misty prism
icy shadow
river solstice
#

too welcome

misty prism
icy shadow
#

no problem

#

what is your problem

icy shadow
pulsar ferry
#

Professional discord moderator

icy shadow
#

I am a professional liaison with your mother

misty prism
torpid raft
#

name every blockchain

icy shadow
#

Do you know $HAWK

sterile hinge
#

2blockchainz

misty prism
#

Yes not only $HAWK but also w3, and solidity and so on

misty prism
pulsar ferry
misty prism
pulsar ferry
#

Yes

sterile hinge
river solstice
#

😔 🫰

misty prism
icy shadow
misty prism
icy shadow
#

of course!

#

what do you need help with?

misty prism
sterile hinge
#

nice

misty prism
icy shadow
#

i will be your client

#

can you make me a blockchain?

misty prism
#

Are you bot?

icy shadow
#

no i am serious

#

i would like a blockchain

sterile hinge
icy shadow
#

🤯

#

i will pay you $10000

#

do you accept $HAWK?

misty prism
icy shadow
#

HAWK is a crypto

icy shadow
#

i would like my own coin

misty prism
icy vigil
icy shadow
misty prism
#

Excuse me, would send me D M?

misty prism
misty prism
sterile hinge
misty prism
#

what? You are blockchain? lol...