#development

1 messages · Page 86 of 1

torn heart
#

they can

worn jasper
#

ah ok

scenic vapor
#

good to know

torn heart
#

text, item, block displays are all special cause they can have a matrix transformation

scenic vapor
#

also did you know that you can make a camera to be upside down?

#

xD

#

I've done it by mistaken math

worn jasper
#

one thing different between text and item displays is that text displays are only visible from one side

torn heart
#

I was working on a particle SFX library that uses stuff like this. all of these are billboards but that's easy to change ofc

#showcase message

worn jasper
#

I wonder how many display entities a minestom server can handle 🤔

torn heart
#

they're extremely cheap

#

like, if they're static

torn heart
worn jasper
#

in other words, spawned and stay untouched?

#

or do you mean smt else by static

#

?

worn jasper
#

okay what the actual frick

torn heart
#

like in that case they're technically just like

#

100% free

#

cause you just send the spawn packet

#

and that's it

worn jasper
#

another guy that has done UIs like this before said he is using item displays

#

and that his texture is 1920x1920

#

????

torn heart
#

or optifine and such

worn jasper
#

a single texture from my understanding

torn heart
#

well ask them :>

worn jasper
worn jasper
#

gonna be painful for him if he says he uses optifine lmao

#

how am I gonna tell him

#

💀

#

maybe I am not meant to tell him, maybe it's a canon event

worn jasper
#

uhm....

#

@torn heart he said without optifine, etc....

#

it just needs to be a square...

#

unable to test this atm tbh

#

but once I get time I will test and give an update

worn jasper
#

yup just checked his resourcepack

#

and yup, he has textures at like 700x700

#

etc

torn heart
#

can u reproduce it?

worn jasper
#

xD

torn heart
#

ah alr

scenic vapor
#

also @worn jasper its potentially better to use item displays as it is easier to make item texture animations

#

ofc you can make animations using text displays as well by updating the text there

#

however that would be bigger packet usage

#

as well as more ticking basically

worn jasper
#

only a few lines

#

change to item and adapt the coord translation system to go from center instead of bottom center

#

that's about it

scenic vapor
#

if you are planning doing this as public lib

#

then people may find this as benefit

#

items overall can be more controlled

worn jasper
#

And I kinda hate spoon feeding people

#

Bit controversial lol

#

Idk yet

#

Will see after

#

This library is for my server initially

worn jasper
#

funnily enough, the whole library's code is still in a test project for when I started messing with minestom lol

#

I need to move it to another project and put this in a subproject/module xD

#

things I have to do after my exam

neat pierBOT
#

There is no time to wait! Ask your question @bleak tide!

worn jasper
#

negative spaces

#

for ex.

pulsar ferry
blazing lake
#

Hello, I want to write what I want in paste.helpch.at through code, just like a file, write text content through write, how can I do it?

pulsar ferry
dense drift
#

Though you should not spam the service with 1000 pastes per second 🙂

pulsar ferry
#

Unless you host your own :)

blazing lake
#

Do I need to set up an account? When I run it, code: 403 appears.

pulsar ferry
#

You don't need to no, maybe content type is wrong? Not sure, it works for me

blazing lake
#

Yes, as you said, you should get code: 200. Maybe I wrote it wrong.

dense drift
pulsar ferry
#

I know

dense drift
#

Speaking of this, do you know a paste service that supports multiple sections?
Smth like this:

Section

const content = "hello";

Section 2

{"content": "section 2"}```
#

Each section will have its own highlight

#

Or well, one service that supports markdown could work too jeb_shrug

pulsar ferry
#

Not sure, maybe gist supports markdown? That's the only one I can think of

dense drift
#

Yeah but I wanted this for a public plugin, and for gist you most likely need an api key

pulsar ferry
#

Why do you need that btw?

dense drift
#

I have a /debug command and it consists of multiple parts, and I wanted to format it better shrug

blazing lake
#

@pulsar ferry I saw that he said at the beginning that you need to create an API token first. Is that because of this?

dense drift
#

Maybe for toptal instance

pulsar ferry
#

You don't need an api key for helpchat's, you can set it up to have api key when hosting hastebin, but we don't

#

I'm using no auth

blazing lake
#

So, I need to find out why it is 403. When I output the response message, it tells me that it is forbidden, but I don’t know why the response is forbidden.

pulsar ferry
#

Might wanna show your code

blazing lake
#

val url = (URL("https://paste.helpch.at/documents").openConnection() as HttpURLConnection).apply { requestMethod = "POST" connectTimeout = 5000 readTimeout = 5000 setRequestProperty("Charset", "UTF-8") doOutput = true doInput = true outputStream.also { it.write("example".toByteArray()) } } println(url.responseMessage)
I use kotlin, I don't know if you can understand it

robust crow
#

Just dont spam our paste with stuff

#

or set anything to log to it

#

k thx

blazing lake
#

No, it just records the error information for developers

spiral prairie
pulsar ferry
pulsar ferry
blazing lake
blazing lake
#

Thank you for your answers. Maybe the problem lies in the idea, because when I copy the code of @dense drift , it will also trigger 403. But when I use curl of cmd, it returns code: 200

#

Yes, there is a problem with idea. When I run it on it, the code is 403, but after moving it to minecraft, it can be normal code: 200

dense drift
#

is the server running on the same machine as your IDE?

blazing lake
#

Yes, and idea sets up Http Proxy

worn jasper
#

idea?

#

Oh Intellij

#

okay

chilly timber
#

I need some help, i want to create a command (ex: /ub giveCustomItem PLAYER), but i'd like to be somehow compatible with placeholders format, so I can use that command with other plugin with no issue, how can I make it

blazing lake
chilly timber
#

yep

#

the fact is that I want to use this command in another config.yml file

blazing lake
#

Then you need to use PlaceholderAPI

chilly timber
#

compulsory?

blazing lake
#

They are all the same, and both require the use of the Placeholder API, or the use of the replace method, text.replace("{name}", player.name). This is a more traditional method, but it is only allowed in the location you set.

worn jasper
blazing lake
#

You can choose to use it or not, but many plugins now use PlaceholderAPI, so you can't choose not to use it unless you write all the plugins yourself.

worn jasper
#

not the opposite

#

lol

blazing lake
blazing lake
# chilly timber compulsory?

After importing PlaceholderAPI, use the method PlaceholderAPI.setPlaceholders(player,text) to parse the variable %player_name% to get the player name

worn jasper
#

plugins calling the commands of your plugins are usually the ones that should parse those placeholders whether it be with their own system or PAPI

#

your plugin should simply only execute things on demand

#

you should not have to parse input yourself too

blazing lake
worn jasper
blazing lake
# chilly timber Okay

The PAPI Wiki has simple instructions on how to register and resolve variables, and there are also many variable extensions available.

worn jasper
#

Your plugin, should not be the one setting placeholders with PAPI on input, that's the other plugin calling that command

#

no one is speaking about using papi or their own system

worn jasper
blazing lake
#

But his requirement is that when the plugin executes the command, PLAYER will become the name of the triggering player. I told him two solutions. You said that there is nothing wrong with the parsing placeholder of the execution command. I was just giving a solution, and it does not conflict with what you said.

#

I don't quite understand what you mean. Is it possible to execute commands without parsing placeholders?

chilly timber
#

So what

#

Import or don't

worn jasper
chilly timber
#

im sure if any server uses plugin it surely does implement PAPI

worn jasper
#

I think this is simply a bad implementation for an XY problem

#

lol

#

what even is the xy?

chilly timber
#

?

worn jasper
chilly timber
#

hm

#

so you mean I asked for Y problem?

worn jasper
chilly timber
#

Well, then let me think better

chilly timber
#

on my server, I want to allow players to buy bandages through a menu (Deluxe Menu) by clicking on an item. These bandages are "special" because they store metadata. I tried creating a kit bandage with Essentials, but the bandage it gives doesn’t work. So, I want to make sure that when someone buys a bandage, they get a working one from my plugin.

worn jasper
chilly timber
#

It doesn't require create a variable player?

#

Such as /up giveitem player? Or is it enough with /ub giveitem

worn jasper
chilly timber
#

this is gonna kill me

#

fine

#

will see...

gloomy ore
#

Hey I keep having a NullPointerException upon doing /sounds off, and I can't for the life of me get behind the issue.. Can someone review my code?

`} else if (command.getName().equalsIgnoreCase("sounds")) {
if (!sender.hasPermission("scc.sounds")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.noPermission")));
return true;
}

        if (args.length != 1 || (!args[0].equalsIgnoreCase("on") && !args[0].equalsIgnoreCase("off"))) {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.invalidUsage").replace("%usage%", command.getUsage())));
            return true;
        }

        boolean enableSounds = args[0].equalsIgnoreCase("on");
        logger.info("Setting sound for player " + player.getName() + " to " + enableSounds);
        soundSettings.put(player.getUniqueId(), enableSounds);
        player.sendMessage(ChatColor.translateAlternateColorCodes('&', config.getString("messages.soundsToggled").replace("%status%", enableSounds ?"enabled" :  "disabled")));
        logger.info("Sound settings for player " + player.getName() + ": " + soundSettings.get(player.getUniqueId()));
        logger.info("Sound settings map: " + soundSettings.toString());
        return true;`
broken elbow
neat pierBOT
gloomy ore
broken elbow
#

Which line is MessageCommandExecutor.java:142

gloomy ore
#

I'll send you the whole class if you dont mind haha

broken elbow
#

Sure

gloomy ore
broken elbow
#

My best guess would be that config.getString("messages.soundsToggled") returns null

#

Try printing the value on line 141 (before sending the message to the player)

gloomy ore
#

Ah yes, thanks man. i totally overlooked that one, my bad!

chilly timber
#

which minecraft versions are compatible with Spigot Api 1.13 ?

sterile hinge
#

1.13

torpid raft
#

🤯

proud pebble
#

i think they ment what server versions work just fine if ur building against spigot 1.13

#

i dont think anything breaking has been deprecated since 1.13

#

like some plugins work just fine even when built against 1.8 but you might have to check on a couple of the majorly used versions

minor summit
#

paper's brigadier api or using a command framework that hooks up to brigadier, like cloud

chilly timber
sterile hinge
chilly timber
#

Okay

#

Good to know

swift brook
#

Hi guys, maybe I'm asking the simplest question, but how do I connect the dependency for PlaceholderApi?
How much when according to the instructions for creating an extension, I add the following code

<dependencies>
    <dependency>
        <groupId>me.clip</groupId>
        <artifactId>PlaceholderAPI</artifactId>
        <version>2.11.6</version> <!-- Check for the latest version -->
        <scope>provided</scope>
    </dependency>
</dependencies>

it says that It does not find such a dependency from the central Maven database!

#

tell me how I need to connect it correctly, thanks in advance.

fleet shale
#

anyone familiar with making a secondary configuration file that may be able to assist here ive made a new config file to hold location data for my warp plugin but im struggling to get it to save changes and sets to the file

dense drift
#

@swift brook use jitpack, the main repo is currently down

daring mulch
#

Hello, when trying to connect API for Guilds plugin (guilds 3.5.7.1-SNAPSHOT) I get an error in Maven: [WARNING] The POM for co.aikar:acf-paper:jar :0.5.1-SNAPSHOT is missing, no dependency information available.

Who has encountered this and how can it be solved?

swift brook
spiral prairie
#

That is a prime example of a language barrier

kind moat
#

Hi, who i can import in gradle NMS ?

proud pebble
#

use paperclip

twilit berry
#

Hey, are there any devs here?
We've created a server that will have simple, but addicting abilities, but we don't have anyone to code them into existence.

twilit berry
chilly timber
#

Hey, I’m running into an issue with my code. I’ve set up a world checker where you can blacklist worlds in the config.yml so you don’t bleed in certain worlds, but for some reason, it’s not working at all. Any ideas?

#
   @EventHandler
    public void onPlayerDamage(EntityDamageEvent e) {
        if (!(e.getEntity() instanceof Player)) return;

        Player player = (Player) e.getEntity();
        String worldName = player.getLocation().getWorld().getName();
        List<String> blacklistedWorlds = plugin.getConfig().getStringList("disable-world");

        if (blacklistedWorlds.stream().anyMatch(world -> world.equalsIgnoreCase(worldName))) {
            return;
        }

        double health = player.getHealth();
        double maxHealth = player.getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue();
        double healthPercentage = (health / maxHealth) * 100;

        if (plugin.getConfig().getBoolean("bleeding")) {
            double bleedChance = calculateBleedChance(healthPercentage);
            if (random.nextDouble() <= bleedChance) {
                startBleeding(player, false);
            }

            if (plugin.getConfig().getBoolean("heavy-bleeding") && random.nextDouble() <= bleedChance / 2) {
                startBleeding(player, true);
            }
        }
    }

This is the part where is called that bleeding action

tight junco
chilly timber
#

tried everything

#

was before if i remember well

tight junco
#

okay then the only reason would be

  • disabled-world is empty
  • the world is wrong in the config
  • "bleeding" in the config is false or doesnt exist
  • event isnt registered
#

add debugging (just println the config output)

chilly timber
#

Maybe i got with the key

#

One is in plural and in code is in singular

#

I feel so dumb

gusty spade
#

looking for a dev to make me a elemental Plugin. Need proof you wont scam. I have everything ready and examples I can send you code of it i js need it organized bc my dev screwed up

torn heart
#

quit spamming

bronze robin
#

how can we completely remove water and mountains

#

from a world?

lyric gyro
#

can i make PlaceholderApi.setPlaceholders(Entity entity, placeholder)?

dense drift
#

No @lyric gyro

lyric gyro
#

😭

#

so there's no way to set placeholders to entities?

dense drift
#

Not directly. But you can make placeholders that don't require a player and then get the entity from the input (e.g. by id or whatever)

#

What are you trying to do?

lyric gyro
#

Get %worldguard_region_name%

dense drift
#

Just use the WG api then

lyric gyro
lyric gyro
#

wg api is so confusing lol

lyric gyro
#

just water

#

mountains are a feature

#

water too lol but u can delete it

#

it's like a block

#

mountains are not

bronze robin
#

what about if we manuplate chunk generation

minor summit
stuck hearth
#

Erm, players are entities 🤓☝️

wild wigeon
leaden sinew
willow orbit
#

Hi, I want to ask how can I set permissions in the DeluxeMenu plugin to open only a specific menu?

ripe bison
#

Hey there
Hope you are doing well
I am a senior full stack developer who has full experience in web development | design and AI development
So if you have some projects, please let me know
thank you

icy shadow
#

Hey buddy

#

I have some projects

unkempt nova
#

Hey does anyone have any advice for getting started in selling premade plugins?

storm chasm
torpid raft
#

i have some projects too

#

but you cant have them, they're mine!

icy shadow
#

We have a special relationship

storm chasm
#

See. never mind. I am fine

icy shadow
#

no problem

static jewel
#

are there any links that would be easy to use block textures that are above 16 x 16 pixels?

#
private String getBlockImageUrl(Material blockType) {
    return "<link>{material}.png".replace("{material}", blockType.name().toLowerCase());
}
worn jasper
#

Bit confused on what you are doing

static jewel
#

so

#

I need a link that has a decently sized minecraft image

torn heart
#

wdym Minecraft image

static jewel
#

instead of the item looking small in the discord image

#

I cant send images anywhere here so its hard to explain it

neat pierBOT
static jewel
#

:I

torn heart
#

I'll send it here

#

or use imgur

static jewel
torn heart
#

can you not just upscale the image and pass the data

static jewel
#

how would you do that

torn heart
#

idk do you have access to the discord bot

static jewel
#

yes

torn heart
#

like the code of it

static jewel
#

yes

#

im making it rn

torn heart
#

can't you just upload an image with the actual image data

neat pierBOT
static jewel
#

???

torn heart
#
  • get 16x16 img
  • upscale with algo
  • pass in upscaled image data
static jewel
#

algo?

torn heart
#

algorithm

static jewel
#

oh

#

I dont know how to do that

#
            TextChannel channel = DiscordSRV.getPlugin().getDestinationTextChannelForGameChannelName("guard.blockPlace");
            if (channel != null) {
                // Create an embed with details
                EmbedBuilder builder = new EmbedBuilder();
                builder.setColor(Color.GREEN);
                builder.setTitle("Block Placed");
                builder.addField("Player", player.getName(), false);
                builder.addField("Material", report.material().name(), false);
                String locationString = report.location().getX() + ", " + report.location().getY() + ", " + report.location().getZ() + ", " + report.location().getWorld().getName();
                builder.addField("Location", locationString, false);
                builder.addField("Date", report.date().toString(), false);

                // Dynamically set the block image URL based on the block type
                Material blockType = event.getBlock().getType();
                String blockImageUrl = getBlockImageUrl(blockType);

                if (blockImageUrl != null) {
                    builder.setImage(blockImageUrl);
                    builder.setThumbnail(blockImageUrl);
                } else {
                    builder.setDescription("No image available for this block.");
                }

                // Build the embed and send it to Discord
                MessageEmbed embed = builder.build();
                channel.sendMessageEmbeds(embed).queue();
            }
static jewel
#

like just the link?

#

or like modify all 1k+ items in minecraft for a small project...

torn heart
#

No

#

upscaling an image then sending the bytes shouldn't be hard. plenty of bots do this. try using that approach and googling how to accomplish it

static jewel
#

uhhhh

#

ig I can try it....

torn heart
#

well I mean the alternative is trying to find a website which reliably hosts images like that..

static jewel
#

do u know any bots that automatically upscale an image?

torn heart
#

no.

#

and it's. not that complicated

worn jasper
#

just use BufferedImage or smt

#

then get the scaled instance

#

with the new size and algo to be used

#

and voila

icy shadow
#

the new size and algo to be used

torn heart
fluid steppe
#

Any MC java devs able to assist me real quick? Needing some help on figuring out how to impimplement liment something and my brain is fried after trying multiple things... Need to make it so a plugin can detect if a player is flying on an elytra and if they press space bar something happens... I just cannot detect the spacebar! I've tried protocollib, invisable entities, everything haha

dusky harness
#

just spent way too long figuring out that kotlin coroutine's coroutineScope {} waits for launch {} inside to finish...
I looked online and it seems like I have to use GlobalScope to avoid this?
However, the docs say that GlobalScope should be for things that run throughout the entire application's lifetime, but my usecase is to launch a coroutine that sends an IO (via usb) message, then launch another coroutine that delays 11 seconds to detect if there's been a response

this definitely doesn't seem like code that runs throughout the entire app's lifetime lol - is there any workaround?
If I don't use GlobalScope, and if I don't want all of my code to be in 1 function, then my code tries to wait for those 11 seconds because of the first sentence in this message

merry knoll
#

a scope contains any logic that is tied to that.. scope

#

its effectively lifetime

#

and instead of delay etc

#

you should be using timeout

#

for timeout logic

dusky harness
dusky harness
# merry knoll for timeout logic

although the actual sending of the message also blocks the thread so I had to put that under globalscope (at least for now) as well

#

to send multiple messages at once (might sound weird but)

merry knoll
#

you should have a scope

#

for whatever service / module that part is in

#

keep a reference

#

and use that scope

#

you can also make sub scopes for tasks

dusky harness
#

how do I call launch in another function tho in the same scope?

merry knoll
#

if you want it to cancel other coroutines in that task

#

use suspending functions?

#

they carry on the scope they are used in

#

and to return data from usb

dusky harness
merry knoll
#

or from anywhere honestly

#

you want async

#

and not launch

dusky harness
#

well

merry knoll
#

you can directly return with coroutines

#

and it will wait etc automatically for you

#

depending on where you call the awaits

#

or rather suspend that code until it completes

#

suspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
}

#

for example

#

here

#

honestly read the whole coroutine part of it and you should get how it works

#

if you worked with any other type of structed concurrency

merry knoll
#

since then you are basically saying hey this tasks scope is the entire runtime of the application

#

which rarely is true

dusky harness
merry knoll
#

you basically want to create sub-scopes

#

per module

#

then also sub-scope that per task

#

scopes only control the lifetime so they are a tool for cases like

#

lets say you got a task a

#

and you do request b and c in that task

#

and lets also say request b fails and c succeeds

#

if you scope that out and launch a coroutine per request

#

the failing one will also cancel the other one

#

since they are tied to each other and save you cycles

#

will also fail the whole scope as if its a big try catch statement

dusky harness
# merry knoll and lets also say request b fails and c succeeds

so in my case, I have two tasks

  1. send the request
  2. wait x seconds for a response (don't think I can use a timeout here since it's not just a "wait until this code is done")
    if one of them cancels or errors, then I suppose that they should both cancel
    does this mean that I should make a new coroutine scope on every request?
#

to kinda group those 2 tasks together

stuck hearth
#

Parent and child

merry knoll
#

just have a function that starts with

#

suspend fun a() = coroutineScope {

#

etc

dusky harness
dusky harness
pulsar ferry
#

Recommend watching this

river solstice
#

i saw coroutine and i got jump scared thinking it was golang

dusky harness
# merry knoll you want async

it's midnight rn so my brain might not be at 100% but I tried starting with this
here's a simplified version of my old code just to give more context```kt
// send data
val job = GlobalScope.launch {
delay(11.seconds)
println("no response!")
}
jobs[id] = job
GlobalScope.launch {
port.writeBytes(...)
}

// code that listens for data - completely separate function
while (isConnected()) {
val message = port.get()
jobs[message.id].cancel()
}```so I tried to make the jobs (either one) into async, but IntelliJ doesn't like that there's no return value (println and writeBytes don't have (usable) return values...) so I'm pretty sure I'm doing something wrong...
(I was thinking of maybe putting it into async and then just cancelling the scope when I get a response or timeout)
|| also lmk if you don't want pings ||

dusky harness
# pulsar ferry https://www.youtube.com/watch?v=kIzjzjJGk0Y

hmm
first of all - did not know that was possible... this is interesting 🤔 haven't really seen this aspect of coroutines
but I feel like there's so much more to the essence of coroutines so I'm a bit confused on this video - I might have to look at some stuff some more

tender turtle
#

i feel like i'm doing something wrong here, but are you only able to use 3 placeholders in the onPlaceholderRequest method? here's my code:

@Override
    public String onPlaceholderRequest(Player player, String identifier) {
        if (identifier.startsWith("formatted_date_world_")) {
            String worldName = identifier.substring("formatted_date_world_".length());
            World world = Bukkit.getServer().getWorld(worldName);
            if (world != null) {
                return plugin.getFormattedDate(world);
            }
        } else if (identifier.startsWith("formatted_time_world")) {
            String worldName = identifier.substring("formatted_date_world_".length());
            World world = Bukkit.getServer().getWorld(worldName);
            if (world != null) {
                return plugin.getFormattedTime(world);
            }
        } else if (identifier.equals("temperature")) {
            int temperature = plugin.api.getTemperature(player);
            return String.valueOf(temperature);
        } else if (identifier.startsWith("localized_time_")) {
            String format = identifier.substring("localized_time_".length());
            if (format.isEmpty()) return "Invalid date format";

            try {
                World world = player.getWorld();
                LocalDate date = plugin.getWorldDate(world);

                DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);

                return date.format(formatter);
            } catch (IllegalArgumentException | UnsupportedTemporalTypeException e) {
                return "Invalid date format pattern";
            }
        }
        return null;
    }

my game parses the first three properly, but the fourth one doesn't work at all
i know it's not the individual placeholders because i tested the same thing with just the last two in a separate class and it worked fine. turns out i can't have multiple identifiers

pure crater
#

You have an extra underscore so it’s “localized_time_”

#

Is that intentional?

tender turtle
#

yes

pure crater
#

Actually I see

tender turtle
#

also, turns out my issue was i wasn't parsing them properly in-game, i did the wrong placeholder name

#

seems like they all work perfectly fine now, sometimes things just magically fix themselves lol

#

thank you for the quick response

pulsar ferry
pulsar ferry
pulsar ferry
#

Okay I'm on pc now and I read a little bit more
First of all don't use global scope, make your own instead
Second the difference between launch and async is if you want a value or not, launch creates a job you don't care when it ends, async creates a job you do care when it ends because you need the value (that's why you need to await())
Third why do you need to do two jobs for that? Remember that coroutines are sequential so you can just do:

scope.launch {
  // send data
  delay(11.seconds)
  // receive data
}

However why is it so specific? Like, exactly 11 seconds after?

dusky harness
dusky harness
dusky harness
# pulsar ferry Okay I'm on pc now and I read a little bit more First of all _don't_ use global ...

Oh also I probably should've said this earlier but sending the data also appears to wait until the drawing machine finishes executing that command - according to the docs of the library I'm using: "this call will block until bytesToWrite bytes of data have been successfully written to the serial port." 🤷

However, idk how it works so I just kept the extra response listener as a "backup"
This means that sending the data has to run separately/concurrently from receiving the response to do the timeout if needed (although might be redundant?)

As for why I can't do (or at least why I think I can't? do): ```kt
scope.launch {
// send data
delay(11.seconds)
// receive data
}

Also, in order for the drawing machine to run smoothly, it needs another command in its queue, so that means that the code would go like `send (id: 1) -> send (id: 2) -> wait for response -> got response (id: 1) -> send (id: 3) -> wait for response` etc - so I can't just listen for the response and assume that it'll  be the same id (in this ex, it's 1 instead of 2)

and the actual code in the timeout removes the id from `jobs` in the example above (the code in the send part + receive part does this too)
#

sorry if this sounds confusing - I'll clear up any questions
but how should/would I do this... the coroutine way?

#

since this wouldn't really be difficult to do with java's executorservice, but since I'm already using kotlin, I'd like to learn how to do it properly :))

pulsar ferry
#

Uh still don't fully understand but I guess you can have a loop to listen to responses and handle them according to the id
If you think it'd be easier then write it with executor service and then migrate it to coroutines, it's not that much different

river solstice
#

why not a messaging system?

#

or I dont really understand the use case

pulsar ferry
#

Yeah messaging system makes a lot more sense from the description

river solstice
#

is it possible to modify default server logger to include millis/or change format in general?

#

or will I have to patch the server jar?

pulsar ferry
#

Edit the logger config inside the jar pepeLaugh

river solstice
#

I don't believe it's there 🫣

#

can't seem to find anything related to logging

#

or in fact any resources

#

I read somewhere it's possible to provide logging configuration via params? ex. -Dlog4j.configurationFile=log4j2.xml?

river solstice
#

yeah I can see it in the source

#

just.. not in the jar itself

#

I'm using a custom jar (paperclip) if that changes anything

dense drift
#

Here's how you can configure log4j: https://logging.apache.org/log4j/2.x/manual/configuration.html

I'm guessing that Spigot (or vanilla Minecraft) specify their own log4j config. You'll need to override it. It looks like if you set the "log4j.configurationFile" property then you can override it since it's the first place that log4j will look.
that might work, ye

river solstice
#

I just saw there is a format param

#

might be enough for me

dusky harness
#

Not the paperclip jar

stuck hearth
river solstice
dusky harness
#

I think in the versions folder?

river solstice
#

and my volume also has to be in increments of 5

river solstice
#

alright I managed to set it via -Dlog4j2.configurationFile prop

#

no more finness

dense galleon
#

Is it normal for a middle-click, during the InventoryClickEvent in survival mode to return an UNKNOWN click type?

dense galleon
#

In creative, middle clicking an item doesn't even trigger the inventory click event

proud pebble
dense galleon
#

Turns out it's a paper bug with the survival middle click

silent talon
#

I have a Runnable and I'm using bukkit scheduler to schedule it.
The function is supposed to run only when enabled is true in config. If the user sets it to false and reloads the plugin, how can I stop the runnable?

hoary scarab
#

You can also cancel all tasks created by the plugin since you're reloading it.

silent talon
#

hmm also i was using scheduleSyncRepeatingTask as in the wiki, do I have to switch to runTaskTimer?

#

this sounds pretty vague so i'm gonna explain a bit - i'm making an announcement system where every x seconds the plugin makes a new announcement, and I'm using runnables for that

hoary scarab
#

Yeap.
Either is fine. I think the schedule is depracated in newer versions because the name of the method.

silent talon
#

scheduleSyncRepeatingTask is not deprecated though

hoary scarab
#

Then I might have them swapped. I know they deprecated one of the method types from the scheduler because of its naming.

silent talon
#

might be schedulers using BukkitRunnables?

hoary scarab
#

Maybe

silent talon
#

how can I get a Command? I want to use it for CommandMap.register

sterile hinge
#

you just create one

silent talon
# sterile hinge you just create one

im implementing a custom command system, so the command name can be anything
Command needs a specific name, I tried to add all the custom command names as aliases but intellij keeps saying the last two arguments (description and aliases) are redundant, is it safe to ignore?

#

okay nvm i didnt provide usageMessage

vernal flame
#

hey im having issues where my PAPI command args are getting clipped off

#

just to elaborate on that, I just tried adding a 1 at the end and it set the args length to 3 & parsed a 1 but not the placeholder before the 1

#

it looks like something is stripping out placeholders?..

dusky harness
vernal flame
#

wdym

#

no ive forked papi and am modifying the jar

dusky harness
#

oh-

#

🤔

vernal flame
#

forked from commit 272e2e7904da739ddca6554160a683a88c5efcc7 (latest on master)

#

running paper latest 1.21.1

#

I have absolutely no idea why it is clipping the placeholder arg because I dont see any processing that would do that & its just a bukkit arg, there shouldnt be anything processing papi before the papi command

dusky harness
#

then this issue should basically be completely unrelated to placeholderapi and more on general spigot, right? (nothing wrong with asking it here - but just wanted to clarify that)
I guess try with only that plugin on the server, debugs, etc
there's gotta be some issue in the code that we can't see, since your screenshots alone look fine

vernal flame
#

the only reason why im here and not in paper is because it only happens with papi, no other plugin has commands clipped

#

will try on an empty dev server tho

#

alright, found the issue, the guy im working for added a plugin that removed papi placeholders from various places including commands... fucking kms ive been debugging for 6 hours

dusky harness
#

🙃

vernal flame
#

😄

silent talon
#

How can I change the message in an AsyncChatEvent?

silent talon
river solstice
#

AsyncChatEvent#message()

#

Ten you should probably serialize it to plain text.
https://docs.advntr.dev/serializer/index.html

#
// Creates a text component
final TextComponent textComponent = Component.text()
  .content("Hello ")
  .color(NamedTextColor.GOLD)
  .append(Component.text("world", NamedTextColor.AQUA, TextDecoration.BOLD))
  .append(Component.text("!", NamedTextColor.RED))
  .build();

// Converts textComponent to a plain string - "Hello world!"
final String plain = PlainTextComponentSerializer.plainText().serialize(textComponent);
dense drift
#

there is also TextReplacementConfig

spiral mural
#

Am a bit confused trying to get a mob to walk to a spesific location and it's so super random. I know mobs can be disturbed by other game mechanics so I start a task and try to redo this part again inside the timer but somehow the mob just seems confused and doesn't move.

        MoveControl moveControl = mob.getMoveControl();
        
        moveControl.setWantedPosition(destination.getBlockX(), destination.getBlockY(), destination.getBlockZ(), moveControl.getSpeedModifier());
        moveControl.tick();
        
        mob.getNavigation().moveTo(moveControl.getWantedX(), moveControl.getWantedY(), moveControl.getWantedZ(), 1);
        mob.getNavigation().tick();```
#

am just trying to move it from a > b and track it when it arrives to b really.

lyric gyro
#

hi yall! Does anyone know how I can implement custom crops to my plugin? Like anyone got idea what exactly to use in order to achive custom crops?

#

I have no idea how to add custom crops/plants, I want to when I plant for example modified seed of "seeds" after some time, it would grow into the grass.

#

then when harvested it would give me the seeds for the crops and the actuall plant item.

#

I am not looking for code, I am just trying to get help how to implement that (what listeners or at what functions to look at)

#

i am using nbt tags to identify the items

river solstice
#

Give player a custom seed by setting some data on it (nbt or just use pdc)
When placed (planted), listen to the event, then set some data on the block placed (nbt/pdc)
When its ready to harvest, check if its a custom plant (if it has the data set), if yes, cancel the event, then run the logic you want

#

simple as that

lyric gyro
river solstice
#

what is plant checker?

lyric gyro
#

like I want to use seed of the wheat

#

but when ready to harvest, I want it to turn to the grass instead of wheat

river solstice
#

listen to the grow event

lyric gyro
#

ohhhh

river solstice
lyric gyro
#

you are right, but would it still contain the nbt thing when planted?

river solstice
#

if its the last stage, then set another block

lyric gyro
#

like if I plant the seed, but then how I can pass the data on the seed that I planted

river solstice
#

you mean if the seed item data passes onto the block? if so, then no

lyric gyro
#

oh? Is there any way how to achive that

#

I think slime fun had some crops

#

like oranges or strawberies

river solstice
#

you could try player interact event, not sure, since its not a block place event

lyric gyro
#

and if the planted seed turns into the wheat would it still contain the nbt? So I can check if I can turn it into the grass

river solstice
#

but theres no distinct event for planting crops

lyric gyro
#

alright, so I need find some way how to pass the nbt onto the placed seed?

lyric gyro
river solstice
#

well you just need to get the "crop block" itself, if it was placed via the seed then you can apply additional data to the block

river solstice
lyric gyro
#

alright, no clue how to do that, but I can found some way

river solstice
#

google

#

someone has probably had this issue before

lyric gyro
#

alright

river solstice
#

im not on pc atm so I cant tell

lyric gyro
#

gonna try find it

#

thanks for help anyways

river solstice
#

glhf

lyric gyro
#

i heard blocks dosent have nbt tags

river solstice
orchid otter
#

Im working with attributes on the player, and im trying to just set them to a said number, and then reset them, right now im using setBaseValue, and to reset it i just set it to getDefaultValue() of the attribute, but ive ran into an issue that for example generic movement speed is 0.7 by default for some reason while for the players actual default is 0.1, is there any easy way to reset to the players default

lyric gyro
#

so bassicaly I can store the block x,y,z in the chuck, and check if the block is on that cords

#

this include word

#

so no one can abuse it

#

maybe the block data would be better

lyric gyro
#

so the data would be lost and I cannot check if that was the custom crop

river solstice
lyric gyro
river solstice
#

im not sure

lyric gyro
#

i used for storing the chuck

for example:

            PersistentDataContainer container = block.getChunk().getPersistentDataContainer();
            String locationKey = block.getWorld().getName() + "_" + block.getX() + "_" + block.getY() + "_" + block.getZ();
            NamespacedKey key = new NamespacedKey(plugin, locationKey);

container.set(new NamespacedKey(plugin, locationKey), PersistentDataType.STRING, "blabla");

But I need to find a way how to remove the tag in every possible scenario so players wont exploit it

primal nacelle
dapper kettle
#

Does anyone have or know an API/framework for textured GUI? I need the spacing between fonts (the same as css paddings xd)

half temple
#

Hi, I was connecting bungeecord with my servers. I started with Lobby and Bungeecord, connected them and it worked fine, I used services like Bungeeguard, authme and tcp. I did same configs with another server let's say survival but it says Did you forget to enable ip forward / bungeecord? Even though they're already enabled.

lyric gyro
#

i am trying to add ability to plant a fern, everything is going alright but when the plant would grow the fern breaks. I tried to delay it but even after 1 sec delay it stills break.

I am using BlockGrowEvent

                Block below = block.getRelative(0, -1, 0);
                below.setType(Material.GRASS_BLOCK);

                BukkitRunnable task = new BukkitRunnable() {
                    @Override
                    public void run() {
                        block.setType(Material.LARGE_FERN);

                        Block above = block.getRelative(0, 1, 0);
                        above.setType(Material.LARGE_FERN);
                        BlockData upperFernData = above.getBlockData();
                        if (upperFernData instanceof Bisected) {
                            ((Bisected) upperFernData).setHalf(Bisected.Half.TOP); // Set to upper half
                            above.setBlockData(upperFernData);
                        }
                    }
                };
                task.runTaskLater(plugin, 20);

https://www.flexclip.com/share/7016887397383460d3dc834221e41e2f23eb338.html

When there wasnt the delay. It only worked with bonemeal.
but naturaly it broked.

Does anyone knows what I am doing wrong.

#

I think there is something wrong with the fern placement

#

but I am not sure

unreal geyser
mortal scaffold
lyric gyro
unreal geyser
#

It says "Registration is currently locked. If you feel it is necessary to create an account, please join our discord and get in touch with us."

full glade
#

does anyone know how to remove javaassist malware?

boreal spear
full glade
foggy tundra
#

ello!
I downloaded someone else's Minecraft plugin repository and I want to compile it myself, but I'm getting this error

Searched in the following locations:
    https://repo.minebench.de/me/clip/placeholderapi/2.11.2/placeholderapi-2.11.2.jar```

The repository is added to repositories, like the PlaceholderAPI wiki says
```repositories{
    mavenCentral()

    // Placeholder API
    maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")```
(https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI)

I haven't used Gradle before, so I have no idea why it's not working or how to fix it
Could I get some help please?
boreal spear
full glade
keen plank
#

Hey all, just trying to get started using PlaceholderAPI in my plugin, and I'm getting a bit stuck with offline players. I'm trying to show placeholders for players that are offline (or rather, online, but on a different server in my network). These players may or may not have been on the server I'm trying to show a message on with a placeholder on, but it doesn't matter - if the player is offline, the placeholders don't work, even for expansions that supposedly work with offline players. I'm fetching the player by UUID using Server.getOfflinePlayer(UUID). Am I misunderstanding how the offline player stuff is meant to work and it's... not for offline players?

#

Aah just reading around, is this because my server is in offline mode? (Because it's in a Velocity network)

keen plank
#

Seems like being in offline mode makes no difference. Even using /papi parse the result is empty for a placeholder that says it supports offline players, with online-mode=true. Is it supposed to work if the player I'm testing against has been on the server?

keen plank
#

Alright, that does work, I just chose poorly and it turns out the statistic expansion hasn't had an up-to-date release since support for offline players was added back in 2021, but compiling and using the up-to-date version with that support built in does work fine. I thought I was losing my marbles

lyric gyro
#

oh I see the issue

lyric gyro
#

bcs 2.11.2 dosent exists

#

in the compileOnly

foggy tundra
gloomy ore
#

Hey could somebody help me? I am currently trying to check if someone has been put into combat. They get put into combat and i can verify so by seeing that there time is going down on the players' client and i see that they are being put into combat in the console but still when i try to check the players' timer with a command it returns negative..

https://paste.helpch.at/zunoworuto.java

ctc Myek
[14:11:55 INFO]: Checking combat tag for player: Myek (UUID: 1d024a7c-9b91-41ed-83bc-cefc6174aa4b)
[14:11:55 INFO]: [SC] CombatTag ╗ Myek is not in combat.
[14:11:55 INFO]: Combat check: Myek is not in combat.
ctc NoukjeKoekje
[14:12:00 INFO]: Checking combat tag for player: NoukjeKoekje (UUID: c8b92e35-484a-4560-bc9a-de43dcacee8e)
[14:12:00 INFO]: [SC] CombatTag ╗ NoukjeKoekje is not in combat.
[14:12:00 INFO]: Combat check: NoukjeKoekje is not in combat.

I should clarify that most of the time I don't really have a clue what im doing and I dont think the debug steps im trying to take are helping me in any sense..

gloomy ore
#

(Please ping me if you respond)

broken elbow
broken elbow
#

Instead of creating a new instance of CombatLogListener when setting the command executor, pass the already initialized one. The same way you've done when registering the event listener.

gloomy ore
#

Alright will check that!

dark garnet
#

hi, right now im using H2 (as well as SQLite) with a relocated H2 driver (xyz.srnyx.personalphantoms.libs.h2)
but this causes the db files to be innaccessible outside of the plugin (such as an online viewer / external viewer)
this makes it difficult to examine when testing
i also want it to be possible for it to be accessible outside the plugin if users want to modify it manually or something
any suggestions on how i can have it use the default driver while still being safe from versioning conflicts?
ping if reply

river solstice
#

cant you see the database file in /plugins/YourPlugin/...?

broken elbow
minor summit
#

isolated class loader

dark garnet
#

so i like have a class loader, load the driver classes, store the class loader, then reference/use that class loader when i use PreparedStatement#executeUpdate() (and similar) or what
ping if reply

stuck hearth
dark garnet
dark garnet
#

cause i tried something like this:

// Load driver
classLoader.loadClass("org.h2.Driver");
log("Classes in classloader: " + Arrays.toString(classLoader.getClass().getClasses()));

// Connect
return (Connection) classLoader.loadClass(DriverManager.class.getName()).asSubclass(DriverManager.class)
        .getMethod("getConnection", String.class, Properties.class)
        .invoke(null, url, properties);
```but got this exception (when it tries to connect):

Classes in classloader: []

java.sql.SQLException: No suitable driver found for jdbc:h2:file:.\plugins\PersonalPhantoms\data\h2\data

glad wedge
#

Hello, I have a strange problem, when the function is activated I get the logs, both on the server side and even in game, as if I had summoned an entity, but I can't see it IG, as if it hadn't spawned (probably not spawned).

On the other hand, if I do PerformByPlayer, it works, but I want it to be through the server,
I had dev in 1.18 and it worked fine, so I upgraded to 1.19.4, but since then it seems I've got a problem - any solutions?
Because I've got the logs its spawn (I've already debugged the spawn, the mobs world is correct)

public void spawnMobs(Player player, String mobTypeName, int count, List<String> names) {
    Location loc = player.getLocation();
    World world = loc.getWorld();
    Random random = new Random();

    for (int i = 0; i < count; i++) {
        double xOffset = (random.nextDouble() - 0.5) * 10;
        double yOffset = 0;
        double zOffset = (random.nextDouble() - 0.5) * 10;
        Location spawnLocation = loc.clone().add(xOffset, yOffset, zOffset);

        String name = "";
        if (!names.isEmpty()) {
            name = names.get(i % names.size());
        }

        String command = "summon " + mobTypeName + " " + spawnLocation.getX() + " " + spawnLocation.getY() + " " + spawnLocation.getZ() + " " + world.getName();
        if (!name.isEmpty()) {
            command += " {CustomName:'{\"text\":\"" + name + "\"}',CustomNameVisible:1}";
        }

        Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command);
    }
}

sterile hinge
#

Why aren’t you just using the proper api to spawn the entity

glad wedge
#

So can't use default API spawn, so i need to use summon

#

But why do I have the debug on MC (Summoned new mobname)?
But nothing spawns, why if it's perfromByPlayer it works and if it's me typing the command it works

#

Thats strange

glad wedge
#

ok with execute its work wtf

pulsar ferry
#

Spawning forge mob, using Bukkit, we're talking about one of those cursed servers aren't we monkaS

fiery pollen
#

Anyone here know a bit of regex?

river solstice
#

yes

#

I know all about regex

fiery pollen
#

Ow okay damn, I have this homework for school and I have to create regex but I'm stuck on this problem and I'm actually going crazy

pulsar ferry
fiery pollen
#

But It's like easy but Idk it won't work. Soo I have to find all strings (only uppercase letters) that have no repeating letters

pulsar ferry
#

all strings
You mean a list of strings and you have to get only the ones that don't repeat? Or you mean words in a string?

fiery pollen
#

Uhmm I mean like I have a file with on each line a word with uppercase letters. And using the grep command I have to find all the words that have no repeating letters

pulsar ferry
river solstice
#

\b(?!.*([A-Z]).*\1)[A-Z]+\b

fiery pollen
#

When trying to run those in my cmd I keep getting the same error: grep: Invalid back reference, any idea why?

#

cat words.txt | grep -E '\b(?!.*([A-Z]).*\1)[A-Z]+\b'

river solstice
#

iirc grep does not suport back references

#

and look aheads

fiery pollen
#

Oww hmm, how should I fix this?

torn heart
river solstice
#

grep -P '^(?!.*(.).*\1)[A-Z]+$' words.txt

pulsar ferry
torn heart
pulsar ferry
#

Interesting decision

river solstice
#

which does support back-references and look-aheads

fiery pollen
#

Ahh okay I see, thanks a lot guys!

fiery pollen
#

Okayy so the next problem, not finding it either. I have to get all words containing alternating vowels and consonants

lyric gyro
#

How can I get the source code to DeluxeMenus 1.13.3?

robust crow
dark garnet
dark garnet
#

yay it works!

#

ty emily love

icy shadow
#

you're welcome!

static jewel
#

if I have a string that I know is a placeholder, is there a way I could directly pass it as an object or something to placeholderapi, so it avoids the "placeholder finding" step?

#

so like passing the identifier, the player and the params directly somehow?

dusty frost
#

no, placeholder api is based on string parsing entirely

#

every expansion is passed a string and is charged with parsing it however they want, so we can't really separate it out into parameters and stuff like that

static jewel
#

I know that, but I meant passing the params as a string, same way the expansion receive them

#

basically as if I was calling the expansion directly instead of through placeholderapi

#

but obviously I can't depend on the expansion, so papi would be the middleman

dusty frost
#

i mean yeah you're just describing direct API usage

#

which you'd need to depend on the plugin/expansion directly

#

papi provides an abstraction based on strings, and it routes based on the first "word" of the string, there's not really too much overhead involved

static jewel
#

what about searching on the string though? thonking

#

in my case I literally only have the placeholder as the entire string, so I think it'd be much more lightweight if I could just pass it

dusty frost
#

i mean if your string is literally just "%placeholder_arg_arg%", there is basically no overhead

#

well you can't, and there'd be basically no difference lol

static jewel
#

wouldn't it skip some steps given I know that's the entire string?

dusty frost
#

we're talking milliseconds of performance here max

static jewel
#

basically just remove the first char, split by _, use index 0 as namespace and pass the rest

dusty frost
#

there's no way you're like parsing this placeholder hundreds of times

static jewel
#

I guess that's true

dusty frost
#

that's literally what the parser does lmao

static jewel
#

wouldn't it need to search for the placeholder first thonking

#

or well the placeholders

#

given it doesn't know how many there are

dusty frost
#

it's literally like O(n) to find placeholder delimiters

#

and your string is probably like 15 characters long

#

you could not be optimizing more prematurely if you tried

static jewel
#

hmm fair enough

#

I'll just stick to the regular way then

dusty frost
#

if you really care, depend on the plugin's API and use it directly

#

then you get actual benefits like type safety and stuff

#

rather than skipping a single for loop

static jewel
#

it's user input so I can't really do that

dusty frost
#

so you do need the placeholder parsing step then

static jewel
#

the only thing I know is that the string is only the placeholder

dusty frost
#

how do you know that

#

are you doing some validation?

static jewel
#

it's already been parsed beforehand

#

even if it wasn't then papi would just ignore it

#

like on any non existent placeholders

#

and then it'd be the user's fault lol

dusty frost
#

yeah so you're fine lmao

static jewel
#

aight, thanks!

lavish heart
fiery pollen
#

In regex, if I have a string like this
#83Y2h182UU4 #49MbQ3y0I3 #3_13_4x_Qv_ #_9h63_X434o

I need to find a word in the string that has three _
How would I check per word? Because the '^' and '$' operators only work for the beginning and end of the string, not the word.

sterile hinge
#

Just split the string before

fiery pollen
#

But I have to find the string back after that, I'm only allowed to use linux commands.

merry knoll
#

then match whatever you need in those words

tame peak
#

or match starting # and ending in a space or nothing

stuck rain
#

Does anyone know if there's a way to add custom items to the /give command using spigot api?

proud pebble
#

your better off making ur own give command

royal hedge
kind moat
#

Hy, do you have a idea how i can create license for my minecraft plugin pls ?

torn heart
#

google

fossil wind
#

Hey

#

How to send a title to a player?

#

Im using spigot 1.8.8

#

(i mean code not command)

west topaz
fossil wind
fossil wind
#

it said build failed

exotic iron
#

Hello I removed my prev offer services post because I wasn't sharing any relevant content there. Is there anyway to regrant my user the ability to share content there?

west basalt
#

hey is this possible to make 2-3 items displaying on a single slot

#

like at first 1 item will display then after 1 sec 2nd item will display and after 1 sec 3rd item will display and so on

west basalt
#

wht dm?

#

deluxemenus?

#

if so then yes

worn jasper
elfin sandal
#

Can anyone help with this?
PlaceholderAPI extension:
When a player logs in, determine the Bungeecord server name, split it with hyphens, take the last word of the hyphens and return it as a placeholder

Example: bedwars-1 - will be displayed in placeholder: 1

ocean raptor
#

its literally just String#split

#

send current code, error and the ways you've tried already

ocean raptor
elfin sandal
#

no longer relevant, implemented it myself

west socket
#

anyone got suggestions on how to execute console commands into a k8s pod Minecraft server?

pulsar ferry
#

Not sure what you are using to access your k8s pod and not sure if it would work either but using something like kubectl you could probably do something like kubectl exec -stdin <pod-name> -- /bin/sh to get access to the pod then find the running process, something like screen -r and there you have access to the console

torpid raft
#

can also try using minecraft's rcon, though idk how good it is

#

but at least it is agnostic to what you use to deploy the server

west socket
#

Yeah In trying to use kubectl api with stdin

pure crater
#

I’m using Hibernate ORM, and I’m not sure if I annotated everything correctly because it’s my first time using it. Basically, I’m trying to parse my ArenaManager into the database

#

I keep getting a row not found error when I try to save these objects into the Hibernate database, which in this case I am using H2 embedded for testing purposes

noble kindle
#

dont know if anyone here can help just installed python on my computer and keep getting this popup when i try to check the version

PS C:\Users\1234> python3 --version
python3 : The term 'python3' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path 
was included, verify that the path is correct and try again.
At line:1 char:1
+ python3 --version
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (python3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
formal flare
noble kindle
#

Turned out I didn’t actually install python I just downloaded the installer

shell moon
#

Any clue why this is happening?

#

Been using it for years and now it started to happen

#

when using it with 1.21.1

#

Using latest ProtocolLib latest 5.3.0

river solstice
#

no spaces after commas 💀💀

worn jasper
river solstice
#

no spaces before curly brackets as well 💀💀

#

nvm only one missing a space

pure crater
#

Does it align still with what you’re doing

shell moon
#

Well, not sure tbh

#

1.21.1

#

1.20.1

#

If someone know exactly how to fix it, pls ping

#

i see many things have been added

#

but not sure what to add exactly

pure crater
#

Write the other data values that aren’t in 1.20.1

#

And then write the optional data values if you want to change them

#

Like block interaction, etc write the data after

shell moon
worn jasper
fallen marten
dark garnet
#

is BukkitRunnable#runTaskTimer(Plugin, long, long) affected by adjusted tick speeds in the latest mc versions (/tick)?
ping if reply

river solstice
#

I'd assume it has some effects regarding schedulers

broken elbow
#

or. test?

river solstice
#

or fuck around and find out test

minor summit
#

it is not

#

@dark garnet

dark garnet
icy shadow
#

np

pure crater
icy shadow
#

ummm leave me alone I’m literally a minor??

#

consider yourself blocked

pure crater
#

2 blocked messages

#

/s

tight junco
dreamy shore
#

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\oooo\Desktop\guilds\Guilds\build.gradle.kts' line: 137

  • What went wrong:
    Task with name 'slimjar' not found in root project 'Guilds'.

#

any1

#

but i have this task in build.gradle.kts, idk its becasue gradle ver or smoehting

#

changed one thing to upper case and there's a new error

Task with name 'bstats' not found in root project 'Guilds'.

and now yes, there's now task here named bstats so what i have to do ?

#

./gradlew shadowJar

FAILURE: Build failed with an exception.

  • Where:
    line: 7

  • What went wrong:
    Plugin [id: 'org.jetbrains.dokka', version: '1.9bstats.20'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Included Builds (No included builds contain this plugin)
  • Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.dokka:org.jetbrains.dokka.gradle.plugin:1.9bstats.20')
    Searched in the following repositories:
    Gradle Central Plugin Repository
#

probably theres no any tasks from here in this project, can i compile it somehow?

relocates(
"org.bstats",
"co.aikar.commands",
"co.aikar.locales",
"co.aikar.taskchain",
"ch.jalu.configme",
"com.zaxxer.hikari",
"org.jdbi",
"org.mariadb.jdbc",
"dev.triumphteam.gui",
"net.kyori",
"com.cryptomorin.xseries",
"kotlin"
)

#

to get just .jar file as a plugin

#

ok idk
BUILD SUCCESSFUL in 3m 22s

dreamy shore
worn jasper
high sigil
#

Code:
https://pastes.dev/fLloiSPleU

Error:
https://pastes.dev/LGh5LNdLW4

Main:```java
@Override
public void onEnable() {
displayAsciiArt();
loadManagers();
new PlaceholderAPIHook(this).register();
Bukkit.getConsoleSender().sendMessage("§a│ PlaceholderAPI kayıt edildi.");
Bukkit.getConsoleSender().sendMessage("§2│ Eklenti başarıyla yüklendi ve aktif edildi.");
}

name: LobbyUtils
version: '0.1'
main: dev.shedux.lobbyUtils.LobbyUtils
api-version: '1.20'
load: STARTUP
authors: [ sheduxdev ]
depend:
  - PlaceholderAPI
  - SkinsRestorer
  - ItemsAdder
  - AlonsoLevels
  - UltimateRewards
```i dont know what i did wrong
minor summit
#
    at me.clip.placeholderapi.expansion.PlaceholderExpansion.register(PlaceholderExpansion.java:147) ~[LobbyUtils-0.1.jar:?]

you are shading PAPI (and maybe the other dependencies) in your plugin jar

#

don't do that

high sigil
# minor summit > at me.clip.placeholderapi.expansion.PlaceholderExpansion.register(Plac...
dependencies {
    compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
    compileOnly("me.clip:placeholderapi:2.11.6")
    implementation("net.skinsrestorer:skinsrestorer-api:15.4.3")
    implementation("io.github.revxrsal:lamp.common:4.0.0-beta.19")
    implementation("io.github.revxrsal:lamp.bukkit:4.0.0-beta.19")
    implementation("dev.triumphteam:triumph-gui-paper:4.0.0-SNAPSHOT")
    implementation fileTree(dir: 'libs', include: '*.jar')
}
minor summit
#

I mean, that's just a portion of your build script, but the exception clearly says that PAPI is inside your jar

minor summit
#

what's the whole build script like? you might also be a transitive dependency of one of the implementation ones, or maybe it's in that libs directory?

dusky harness
#

try gradlew clean and then run gradlew shadowJar again
and make sure you're looking at the right file

minor summit
grave sky
#

Is there any way to edit the player's name tag above the head? (Not scoreboard teams, or using the game profile)

torn heart
#

packets

keen glen
#

Hmm

quartz briar
#

? that msg is 3 years old btw 💀

serene oyster
#

the mother of the holy bagel is important af

unique osprey
#

Hi, how can I change or replace the world name "world" without changing the folder name?
for example, Currently it is called World and I want to call it Country
I tried to use some extensions but like changeoutput but I don't know completely how to use it

river solstice
#

if it's a default world, in server.properties

#

otherwise, not sure

#

maybe by using multiverse-core

vestal widget
#

how do i make the deluxetags GUI show the tags, but can be seen when locked as an item, but cannot use them, just view them?

unique osprey
minor summit
#

you can just change the name in server.properties and rename the folder

#

i believe that should be enough

river solstice
#

yeah that's what I meant lol

unique osprey
minor summit
#

no

river solstice
#

well, if you only need it to show up in differently several places, you can, as you said, using changeoutput placeholder

#

just read the docs and tinker around, its not that deep

proud pebble
#

has dev general been removed or is my discord bugged rn

worn jasper
shell moon
#

Someone using facebook api (or attempting to) using node.js? 😢

minor summit
#

no

lyric gyro
#

hello. i am trying to create a placeholder expansion. external i am trying to return an int (network level) since I use the plugin "TAB" it only wants an int not a string. is it possible to do this?

normal thicket
#

Hey @robust crow, I ping you because I can't message you, and that's what others have been instructed to do. Can I get an eCloud account made? Currently says Registration is currently locked.

dark garnet
#

updating from 1.20.4 to 1.20.6 and noticed Particle.REDSTONE doesnt exist anymore, was it replaced with Particle.DUST?

#

ok ye im 99% sure its DUST

robust crow
normal thicket
dark garnet
robust crow
normal thicket
stuck hearth
onyx parcel
#

Hey!
I need a help in little thing!
I make a Ban Menu with Litebans, in Deluxemenu and how do i make fully customzible duration & reson, with a button?
I Write duration separetly and reason separetly

#

Thats possible?

minor summit
#

probably

minor summit
#

idk

simple wren
#

hi. i want to rotate a block display around its center, similar to how item displays rotate. i can center the display's pivot point by applying a translation of (-0.5, -0.5, -0.5) but when a left rotation is applied the pivot moves again. is there a way to re-center the pivot point after a rotation?

the particle is where i want the pivot point to be at. you can see from this gif what i'm struggling with
https://i.imgur.com/V52UPKP.gif

torn heart
#

then apply it as a transformation

torn heart
#

it's a very basic thing

simple wren
#

i'm using libbulletjme for the physics

#

i'll try to integrate it to the minecraft world so performance is a concern

simple wren
# torn heart rotate the translation vector too

so i've tried this, but the display started spinning lol. should i apply the new translation and rotation at the same time?

tf = entity.getTransformation();
newtf = new Transformation(tf.getTranslation(), rotation, tf.getScale(), tf.getRightRotation());
entity.setTransformation(newtf);

tf = entity.getTransformation();
newtf = new Transformation(tf.getTranslation().rotate(rotation), tf.getLeftRotation(), tf.getScale(), tf.getRightRotation());
entity.setTransformation(newtf);
#

ah okay I'm dumb I got it

torn heart
torn heart
simple wren
#

i was rotating the current translation, not the actual translation i wanted

#

i've rotated (-0.5, -0.5, -0.5) instead of the current translation and it worked perfectly

#

thanks

torn heart
#

💜

grizzled vessel
#

does anyone know what would be the replacement for IntEnum in protocollib

#

it was removed in ~5.0 i think

halcyon reef
#

Okay so this is not quiet devlopment but was wondering if any of you knew. I am trying to give my self an item through console with gradient coloring, and I cant seem to make it work.

I have made one color

/give @p minecraft:pumpkin_pie[minecraft:custom_name='{text:"Pumpkin Pie",color:"#ffbf00"}'] 1

But I cant figure out any other ones, I was wondering if any of you could assist?

scenic vapor
#

Does anyone know how can I fix this issue?

#

Ive got my own core that uses Kotlin

#

kotlin is being used from the bukkit libraries (in plugin.yml there's stdlib added in libraries)

#

however Eco (from Auxilor) has the Kotlin shaded

#

and it seems like it breaks my plugin

muted bough
#

hi, is it possible to use a placeholder inside a placeholder?

#

like this /papi parse --null %otherplayer_world_{objective_entryposhigh_{LASER}_{1}}%

stuck hearth
#

Oh it's a framework, yeah why are they shading kotlin at all

worn jasper
#

they suck

#

lol

#

including those problems

#

and I don't think there is a way to fix it

#

You can always try asking in spigot

#

but as always, my suggestion is not using spigot at all 🙂

scenic vapor
#

it does not recognize extensions then, etc.

#

it just breaks

scenic vapor
worn jasper
#

and relocate

scenic vapor
#

no

worn jasper
#

should work if you do that

scenic vapor
#

you cannot relocate it

#

Ive already tried it

worn jasper
#

wdym

scenic vapor
#

and it broke it completely

#

so basically Waves is my core

worn jasper
#

define "broke"

scenic vapor
#

so when Ive added Waves into dependencies

#

in my other project

#

all extensions broke

#

additionally hashmaps were not recognized

#

& such

worn jasper
#

because you relocated it?

scenic vapor
#

yes

#

I literally saw extensions as classes

worn jasper
#

ah you want kotlin to be accessed by your plugins

stuck hearth
scenic vapor
#

I could have created instances of extensions xDDD

worn jasper
#

so that the core contains the library

#

is that it?

scenic vapor
#

Yea

#

so

worn jasper
#

so that only the core has the stdlib

scenic vapor
#

yes

stuck hearth
#

Unless you mean relocated for the lib, then yeah they shouldn't be shading it at all

worn jasper
#

yeah unsure tbh

scenic vapor
#

Ive been literally searching on google

worn jasper
#

I don't have these issues with paper

#

sooo

scenic vapor
#

and found absolutely nothing

worn jasper
#

can't help much

#

tried asking spigot itself?

scenic vapor
#

I dont think that anyone has had such issues

#

bcs its just bcs of 2 plugins using Kotlin that is shaded

#

the issues is that as it cannot be relocated

#

it uses the same classpathes

#

but the classloader somehow breaks it completely

#

I mean I would potentially need to make my own class loader lol

#

to load the rest of my plugins

#

but that sucks

#

bcs like the issue seem to be just in the classloader

stuck hearth
scenic vapor
#

but like

#

what should I relocate

stuck hearth
#

Are you asking what package to relocate for kotlin?

#
tasks.shadowJar {
    relocate("kotlin", "x.y.z.libs.kt")
}```
Because something like this should work just fine.
scenic vapor
#

ye well this is what Ive done

#

but it went absolutely crazy

#

as described above

#

it has broken the extensions

#

collections

#

and such

#

Not sure if it has broken it in the project itself

#

however when Ive added that project into other project's dependencies

#

I couldnt use the collections & the extensions from the plugin

stuck hearth
#

Is Waves a library as well?

scenic vapor
#

Waves is a standalone plugin

#

it has registries & such

#

so Ive made it a Core plugin of my plugins

stuck hearth
#

Oh I see

scenic vapor
#

then its being added as compileOnly dependency

pulsar ferry
#

I highly recommend shading Kotlin stdlib instead of using bukkit libraries, and defeinitely relocate it

#

It's too integral to the plugin to be relying on it being present late

scenic vapor
#

it just throws the LinkageError

pulsar ferry
#

Huh I've relocated for years with no issues, might wanna share how you have it setup, gradle etc

scenic vapor
#

theres the commented relocation of kotlin

#

just tried it again

#

and as you can see it just breaks all extensions

#

and my extensions are then literally loaded as classes

scenic vapor
#

^ I have already tried to generate sources as well

#

didnt help at all

worn jasper
#

oof

green onyx
scenic vapor
pulsar ferry
#

I'm confused about your setup, relocation is only done at compile time it should not affect ide at all, you should never get an in ide error for just adding a relocation
Unless your kotlin is coming from a fat jar, in which case don't

scenic vapor
#

yea that's just pretty strange

scenic vapor
#

just noting that as some of my messages could be confusing

pulsar ferry
#

Unless your kotlin is coming from a fat jar, in which case don't
Okay so this is true
Publishing fat jars is a bad idea

scenic vapor
#

yea

#

so

#

I guess that I would need to publish a different jarfile of the core

#

without kotlin

#

and then in the other project i will just exclude Kotlin and relocate it

pulsar ferry
#

Why exclude Kotlin in the other projects?

scenic vapor
#

to not shade it

#

the core would have Kotlin compiled itself

#

so other projects are gonna use the Kotlin from the core

pulsar ferry
#

I guess you could publish with kotlin as compileOnlyApi and build with implementation
That way the other projects wouldn't need to exclude anything
But yeah that would work too, as long as the relocation is setup identically

scenic vapor
#

so I've had to add the exclude in shadowJar

#

I'll just need to figure out how to simply make the building and such

#

bcs as the core is standalone and published as well

#

I'll basically need to somehow setup 2 different shadowJar tasks

#

one that is father - the plugin

#

and second that would be used as artifact in publishing

scenic vapor
#

@pulsar ferry it seem like I've figured it out. I've registered 2 custom tasks for shadowJar. One has the Kotlin shaded and relocated and second has the Kotlin excluded. The second is being used for publication and the first one for the plugin itself. Ofc I'll still need to test it properly, but so far it looks promising.
I want to help you so much for the suggestions and overall help ❤️

smoky storm
#

Hello, i've created a menù with DeluxeMenus https://pastebin.com/0hp5yfgi
But how i can do that, if player has the item required, when he click it get command executed and the item removed from his inventory

tawdry violet
#
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve org.spigotmc:spigot:1.21-R0.1-SNAPSHOT.
     Required by:
         project :
> Could not resolve org.spigotmc:spigot:1.21-R0.1-SNAPSHOT.
> Unable to load Maven meta-data from https://repo.tarkan.dev/org/spigotmc/spigot/1.21-R0.1-SNAPSHOT/maven-metadata.xml.
> org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 10; DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 17s
2 actionable tasks: 1 executed, 1 up-to-date```


how can i fix this
minor summit
#

1.21.1

grave sky
tight junco
#

agree but also irrelevant to the issue

zenith inlet
#

Hello everyone, I wanted to ask a question. How does the compass calculate the direction the player should go, for example, the compass indicates that the player should go to the North. How is this possible, is there any function that returns the same result?

#

I have a project that involves this, I need to know exactly where the compass points for the player to go, NORTH, EAST, WEST, etc.

hoary scarab
#

Pretty sure the compass points to spawn or the bed location.

I'm not on PC so I can't check my code but you can get direction using two locations. I think location might even have a "direction" method.

dusky harness
#

I think theres a method

#

like getCompassLocation or smth

#

getCompassTarget()

zenith inlet
# hoary scarab Pretty sure the compass points to spawn or the bed location. I'm not on PC so I...
import org.bukkit.Location
import kotlin.math.abs
import kotlin.math.atan2


fun getCardinalDirection(playerLocation: Location, targetLocation: Location): String {
    val deltaX = targetLocation.x - playerLocation.x
    val deltaZ = targetLocation.z - playerLocation.z

    val angleRadians = atan2(deltaZ, deltaX)

    val angleDegrees = Math.toDegrees(angleRadians)

    val normalizedAngle = (angleDegrees + 360) % 360

    return when (normalizedAngle) {
        in 0.0..45.0, in 315.0..360.0 -> "NORTH"
        in 45.0..135.0 -> "EAST"
        in 135.0..225.0 -> "SOUTH"
        in 225.0..315.0 -> "WEST"
        else -> "UNKNOWN"
    }
}```

This my function for calculate what cardinal

```kt
 @EventHandler
    fun onPlayerMove(event: PlayerMoveEvent) {
        val player = event.player
        println(getCardinalDirection(player.location, player.compassTarget))
    }

And my event

dusky harness
#

then as yapperyapps mentioned you can get the direction using the two locations

zenith inlet
#

I not permission to send attachments

#

I recorded video for show problem

dusky harness
zenith inlet
dusky harness
#

that works too

zenith inlet
#

This compass is pointing to NORTH and in console shows "EAST"

dusky harness
dusky harness
#

since positive Z is probably marked as east in your code

#

also technically it's facing south if you go by what minecraft says

#

¯_(ツ)_/¯

nova grail
#

anyone know how to make the end world custom generation

#

like a end world that doesnt have void holes or seperated land

#

just all as one

#

like overworld

dark garnet
#

is it not possible to set player velocities?
search results are scattered

#
final Location location1 = player1.getLocation();
final Vector velocity1 = player1.getVelocity();
final Location location2 = player2.getLocation();
final Vector velocity2 = player2.getVelocity();
player1.teleport(location2);
player1.setVelocity(velocity2);
player2.teleport(location1);
player2.setVelocity(velocity1);
#

printing the velocities instantly returns correct values
but printing 1 tick later returns 0,0,0 (and in-game there's clearly no velocity)

#

ping if reply thx

hoary scarab
#

Pretty sure you have to normalize or multiply it in some way.

dusky harness
#

because I remember setVelocity working

#

maybe you have to delay it by like a tick after tp

#

but also unless you do setVelocity(customVelocity) then the velocity is probably going to be pretty small/zero (excluding gravity)

dark garnet
#

but i always just fall straight down

dark garnet
dark garnet
#

it barely moves the other player

#

this is the velocity data while running around + jumping:
-0.02446379223545523,-0.3739040364667221,-0.08300832441767343

#

but the other player barely moves

#

i basically want the players to switch locations and continue in the direction the other player was going
so a seamless swap/transition or whatever
maybe there is something else i should do to accomplish this?

#

ping if reply again thaxnks

dusky harness
dusky harness