#development

1 messages · Page 90 of 1

misty prism
#

I'm blockchain engineer. kidding me?

torpid raft
misty prism
sterile hinge
misty prism
misty prism
river solstice
#

can I buy two chain blocks

#

I have 3 emeralds

torpid raft
#

can i have half of a blockchain

#

we can split the profits!

misty prism
# river solstice can I buy two chain blocks

you can. A desktop self-custody wallet supporting cryptocurrencies such as Bitcoin (BTC), Ethereum (ETH), Ethereum Classic (ETC), and Tether (USDT). It provides a secure platform for managing digital assets, including features like hardware wallet support and transaction history tracking.

misty prism
torpid raft
misty prism
torpid raft
#

i dont have any friends sorry

misty prism
misty prism
#

Everyone! I’m a senior full-stack blockchain and web developer specializing in smart contract development, decentralized applications (dApps), and Web3 integrations. With a strong background in blockchain architecture, DeFi, NFTs, and SaaS solutions, I help businesses leverage blockchain technology for secure, scalable, and innovative applications.

#

Hi! I’m a senior full-stack blockchain and web developer specializing in smart contract development, decentralized applications (dApps), and Web3 integrations. With a strong background in blockchain architecture, DeFi, NFTs, and SaaS solutions, I help businesses leverage blockchain technology for secure, scalable, and innovative applications.

river solstice
#

i still cant decide whether its a bot or someone with very broken english and not the sharpest tool in the shed

#

might be a bit of both

torpid raft
#

i think it's the latter + the occasional gpt paragraph

misty prism
misty prism
#

check all this github.

#

If you need my resume, I will send to you.

torpid raft
#

holy cow are you THE crypto legend x

hushed badge
#

omg

#

the cypto legend 🙏

icy shadow
#

you are still here??

#

If you always do what you always did, you will always get what you always got. Innovation will never happen if you do the same thing you always did

#

One loyal friend is worth ten thousand relatives

icy shadow
misty prism
icy shadow
#

yes do it for free

#

make me my coin token

#

and then i will believe you

misty prism
icy shadow
#

i have no patience for untruthful people

#

i can be your angle or your devil

#

your choice

misty prism
icy shadow
#

thank you

#

you are a good man

#

if you can do this, you will have a powerful position in my business

misty prism
icy shadow
#

i will make you my senior crypto developer

icy shadow
misty prism
icy shadow
#

i will wait

#

i am so excited

misty prism
icy shadow
#

okay i am sorry for blocking you

#

i hope we can make up

torpid raft
#

out*

tardy cosmos
scenic vapor
#

wtf is it literally a chat bot?

#

xDDD

misty prism
minor flax
#

How can I use mojang mappings NMS pre 1.17?

pulsar ferry
#

Pretty sure it's available all the way to 1.14

hardy jay
#

Yo I'm re-developing an old spectator plugin. The function works as intended but when I do the command in-game it shows an error message instead of the text it was suppose to put out.

hardy jay
scenic vapor
#

@wheat carbon can you ban the bot? 😅

#

sorry for the ping

#

but hes just randomly tagging people

#

the hoss guy

icy shadow
#

that’s my goat

#

Hop off

scenic vapor
#

xDD

icy shadow
#

He’s making me a bitcoin

icy shadow
#

And share code

hardy jay
# icy shadow What is the error message

This is what it says instead of the message:

TextComponentImpl{content="Entered spectator mode! Use /spec or /s to return." style=StyleImpl{obfuscated=not_set, bold=not_set, strikethrough=not_set, underlined=not_set, italic=not_set, color=NamedTextColor{name="yellow", value="#ffff55"}, shadowColor=null, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}

icy shadow
#

That doesn’t look like an error

#

That looks like you’re doing .toString or something on a component

#

Are you using spigot or paper

hardy jay
#

Not an error but its not suppose to say that lol

hardy jay
icy shadow
#

Alright you need to use the player.spigot().sendMessage then

#

To send the component properly formatted

hardy jay
#

So instead of the TextComponentImpl?

#

Sorry I'm new to coding lol

hardy jay
icy shadow
#

Send it here

hardy jay
#

How its too long

icy shadow
#

Which is bad

hardy jay
#

oh.. Well

#

public class SpecToggle extends JavaPlugin implements CommandExecutor {
private final HashMap<UUID, Location> storedLocations = new HashMap<>();
private final HashMap<UUID, GameMode> previousGameModes = new HashMap<>();

@Override
public void onEnable() {
    if (getCommand("spec") != null) {
        Objects.requireNonNull(getCommand("spec")).setExecutor(this);
    }
    if (getCommand("s") != null) {
        Objects.requireNonNull(getCommand("s")).setExecutor(this);
    }
}

public boolean onCommand(@NotNull CommandSender sender, @NotNull String label, String[] args) {
    assert getCommand() != null;
    boolean b = onCommand(sender, getCommand(), label, args);
    return b;
}

private static @Nullable Command getCommand() {
    return null;
}
#

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
boolean result = true;
if (!(sender instanceof Player player)) {
sender.sendMessage("Only players can use this command!");
} else {
if (!player.hasPermission("spectoggle.use")) {
player.sendMessage(String.valueOf(MiniMessage.miniMessage().deserialize("<red>You do not have permission to use this command!")));
} else {
UUID uuid = player.getUniqueId();
if (player.getGameMode() == GameMode.SPECTATOR) {
Location location = storedLocations.remove(uuid);
GameMode previousGameMode = previousGameModes.remove(uuid);

                if (location != null) {
                    player.teleport(location);
                    player.setGameMode(previousGameMode != null ? previousGameMode : GameMode.SURVIVAL);
                    player.sendMessage(String.valueOf(MiniMessage.miniMessage().deserialize("<green>Returned to previous location!")));
                } else {
                    player.sendMessage(String.valueOf(MiniMessage.miniMessage().deserialize("<red>No saved location found!")));
                }
            } else {
                storedLocations.put(uuid, player.getLocation());
                previousGameModes.put(uuid, player.getGameMode());
                player.setGameMode(GameMode.SPECTATOR);
                player.sendMessage(String.valueOf(MiniMessage.miniMessage().deserialize("<yellow>Entered spectator mode! Use /spec or /s to return.")));
            }
        }
    }

    return result;
}

}

#

Thats the code

torpid raft
#

mmm code

hardy jay
icy shadow
#

Oh yeah String.valueOf

#

Same thing

#

don’t do that

#

If you’re using minimessage that means you’re using Adventure too, right?

hardy jay
#

Yup

icy shadow
#

Okay so you need to get an Audience for the player and use that to send the message

hardy jay
#

Yeah uhh how xd

sterile hinge
#

easiest would be to drop spigot and only support paper

icy shadow
#

yeah that’s definitely the easiest

sterile hinge
#

if that's not possible because you are forced to support spigot by higher forces, you need adventure-platform

icy shadow
hardy jay
#

I think I may not code at all. This was made with ai and I just changed some basic stuff 😭

#

I'm trying to make my own small things for a server I'm working on thats why

icy shadow
#

Yeah I wouldn’t recommend trying to chatgpt your way through things

#

but also I’d encourage you to not give up, these are some pretty simple changes if you’re willing to keep trying

hardy jay
#

Yeah no but I think I can just save my time with using another plugin or so.

icy shadow
#

Fair enough

hardy jay
icy shadow
#

yeah, it’s an opportunity to learn something!

#

It’s a very useful skill to have as a server owner

hardy jay
#

I think visual bukkit is hard

#

So code is.. Something else

icy shadow
#

everyone finds it hard at first hehe

#

it’s up to you of course

#

but I think it’s a good learning opportunity

hardy jay
#

Yeah of course it is, I agree on that and its great for who it works for. I'm just not the person that this works for lol. I dropped out for a reason xd

icy shadow
#

Have to disagree but suit yourself

misty prism
pulsar ferry
#

Take him on a date first

misty prism
pulsar ferry
#

Same, he never calls me either 😔

icy vigil
#

:icant:

misty prism
pulsar ferry
#

@dense drift yeet the bot, it's getting boring

misty prism
icy vigil
#

you are

pulsar ferry
#

Definitely @icy shadow is one of the worse bot and scams I've seen in a while, I hate him

icy shadow
#

that is true

icy shadow
#

we used to be so close

#

and now we’re calling each other bots? scammers?

#

you’re not the same person I fell in love with

dense drift
#

@pulsar ferry done

icy vigil
#

finally

minor flax
pulsar ferry
#

Have you tried paperweight? Not sure if it goes back that far either but hey worth a try
Or use a more recent version :')

minor flax
icy vigil
#

ah yes making libraries with support for versions nobody uses

solemn estuary
#

Why can't I make a 1.8 with Intellij Idea ?

pulsar ferry
#

You can

solemn estuary
#

I can but I need to make every file myself x)

#

I succeeded

minor summit
#

what does that even mean

icy shadow
#

he succeeded...

#

im gonna guess he means that the mc development plugin doesnt have it in the template

jagged belfry
#

you could just select a higher version and then just change the version

ocean crow
icy shadow
#

To be fair, 1.8 spigot has a different repo and artifact information

#

So you’d have to change more than just the version

solemn estuary
solemn estuary
solemn estuary
#

and it worked

solemn estuary
#

Hi !
When giving someone an item with a plugin, I want to make sure my plugin recognize his items for example swords with effects. How to do this ? Like I need to read the lore ? or is there a more simple way that I don't know ? ( I'm new )

torn heart
#

then check for that data

solemn estuary
#

tysm

heavy wadi
#

How do you specify methods in your commit messages? Do you just write

Refactor Image.addText to use StyledText class

Or what is considered best practice?

icy shadow
#

Generally follow javadoc notation

#

Class#m(Type)

torpid raft
#

you dont need to say stuff like

# declaring name string variable
name = "peanut"
#

give people insight into why you made the changes, not what the changes themselves are

#

(unless its super obtuse like mass regex or something)

#

ah wait i think i misinterpreted your question...

#

i agree with bm

icy shadow
#

i agree with ivan

#

would recommend conventional commits where possible

#

even if theyre kind of annoying

heavy wadi
#

Wait what do you mean by "conventional commits"? Or are you referring to what you said above, to use javadoc notation?

icy shadow
#

this is unrelated to what you were asking

#

but a good practice

minor summit
icy shadow
#

true...

#

the vscode extension does that automatically

#

for maximum 🚀

minor summit
#

true...

icy shadow
#

blazingly fast

minor summit
#

Feat 🔥
Bug 🐛
Optimization 🚀
chore 🧹

heavy wadi
minor summit
#

be the change you want to see in the world

heavy wadi
icy shadow
#

until they add it

#

bring a gun into their office

#

or a bomb

#

i think that would help

icy shadow
#

but it looks pretty

heavy wadi
#

but emojiless-labels? thats an interesting approach

icy shadow
#

what do you mean

heavy wadi
#

these thingies

#

I see room for improvement

icy shadow
#

oh sorry that's from the refined github extension

#

the actual commits look like feat(core): :safety_vest: Add a check for pattern matches missing binders in core typecheck etc

#

but because it's in a standardised format, the extension can format them in a pretty way

#

and you can automatically generate pretty changelogs

heavy wadi
#

oh, interesting

#

isn't it annoying to work with such commit messages outside github tho? like, when you browse commits using cli or from within your ide?

pulsar ferry
#

Nope, it's very useful

icy shadow
#

not particularly, it’s only an extra 15 or so characters usually

#

then the rest is normal message

#

Unless you’re on a really tiny monitor I don’t think it’ll matter

pulsar ferry
#

Taken from work

icy shadow
#

Writing them can be annoying, but there’s a vscode extension to format them automatically, and I assume an IntelliJ one too

pulsar ferry
#

The rule for us is pretty simple, on your branch you do whatever but when merging to main you squash the commits and use the prefix on the message

icy shadow
#

Yeah that’s a good way of doing it

#

It gets kind of annoying doing them for every single commit, especially wip ones

heavy wadi
#

Most of our repos looked like this until recently

pulsar ferry
#

If I had to specify every file I touch on a commit I would kms

icy shadow
heavy wadi
#

Smol team and the guy who used to be the lead dev was self-taught and more used to working on his own so he didnt care 😄

heavy wadi
icy shadow
#

Yeah it’s silly even when you’re a solo dev haha

heavy wadi
#

We also got a wonderful mix of present and past tense commit messages in some repos 😏

minor summit
#

Barry eats children for fun

snow grove
#

Why can't u shout I like shouting

minor summit
#

Barry is shoutophobic

ocean crow
river solstice
#

cool, now do a code review

high needle
#

Anyone got Experience with Boolean shapes?
I'm trying to make angels wings: https://media.discordapp.net/attachments/1231342127347142777/1341072850198593547/image0.png?ex=67b6a52b&is=67b553ab&hm=1fcfa0a417a93fda59688687a199d8e03dd4f16258f5384f5e1d9fdfd972df5e&=&format=webp&quality=lossless&width=1117&height=592

Using this format:

    private static final boolean x = true;
    private static final boolean o = false;
    private static final boolean[][] shape = {
            {o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o},
            {o, x, x, x, x, o, o, o, o, o, o, o, x, x, x, x, o, o},
            {o, o, x, x, x, x, x, o, o, o, x, x, x, x, x, o, o, o},
            {o, o, o, x, x, x, x, x, x, x, x, x, x, x, o, o, o, o},
            {o, o, o, o, x, x, x, x, x, x, x, x, x, o, o, o, o, o},
            {o, o, o, o, x, x, x, x, o, x, x, x, x, o, o, o, o, o},
            {o, o, o, o, o, x, x, x, o, x, x, x, o, o, o, o, o, o},
            {o, o, o, o, o, x, x, o, o, o, x, x, o, o, o, o, o, o},
            {o, o, o, o, x, x, o, o, o, o, o, x, x, o, o, o, o, o}
    };

I need some help from someone that can put the x's in the correct spots.

warm steppe
#

chatgpt

#
private static final boolean x = true;
private static final boolean o = false;
private static final boolean[][] shape = {
        {o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o, o},
        {o, o, o, o, x, x, o, o, o, o, x, x, o, o, o, o, o, o},
        {o, o, o, x, x, x, o, o, x, x, x, x, o, o, o, o, o, o},
        {o, o, x, x, x, x, x, o, x, x, x, x, x, o, o, o, o, o},
        {o, x, x, x, x, x, x, x, x, x, x, x, x, x, o, o, o, o},
        {o, o, x, x, x, x, x, x, x, x, x, x, x, o, o, o, o, o},
        {o, o, o, x, x, x, x, x, x, x, x, x, o, o, o, o, o, o},
        {o, o, o, o, x, x, x, x, x, x, x, o, o, o, o, o, o, o},
        {o, o, o, o, o, x, x, x, x, x, o, o, o, o, o, o, o, o}
};
high needle
#

Let me check that!

warm steppe
#

Ask chatgpt if ur nooby

wind tapir
#

Hi, could someone explain to me the steps to follow for connecting and interacting with a MariaDB database? I'm having too many problems right now, timeouts, I don't know when to close connections, it's a mess ngl

river solstice
#

give us more context

#

what are you doing rn

wind tapir
torpid raft
wind tapir
#

ik

torpid raft
#

then im sure there are guides and best practice articles for using it

wind tapir
#

but rn im having too many issues with it

#

i don't know how to use it correctly

torpid raft
#

give a specific example of something you are struggling with

worn jasper
#

mariadb connections work the same way mysql does if that helps

wind tapir
# torpid raft give a specific example of something you are struggling with

im gonna send my actual code, im having timeout issues

[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:100)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at fr.hibry.api.player.PlayerData.executeQuery(PlayerData.java:50)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at fr.hibry.api.player.PlayerData.getField(PlayerData.java:73)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at fr.idaamo.hub.scoreboard.PersonalScoreboard.setLines(PersonalScoreboard.java:51)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at fr.idaamo.hub.scoreboard.ScoreboardManager.lambda$null$0(ScoreboardManager.java:40)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[19.02 17:40:20.217] INFO : [Lobby-1] [17:40:20 WARN]:  at java.base/java.lang.Thread.run(Thread.java:1575)

private static ResultSet executeQuery(String query, Object... params) throws SQLException {
        Connection connection = dataSource.getConnection();
        PreparedStatement statement = connection.prepareStatement(query);
        for (int i = 0; i < params.length; i++) {
            statement.setObject(i + 1, params[i]);
        }
        ResultSet resultSet = statement.executeQuery();
        return resultSet;
    }

public static Object getField(OfflinePlayer player, String field) {
        ResultSet rs = null;
        try {
            rs = executeQuery("SELECT " + field + " FROM players WHERE uuid = ?", player.getUniqueId().toString());
            if (rs != null && rs.next()) {
                return rs.getObject(field);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        } finally {
            try {
                if (rs != null && !rs.isClosed()) {
                    rs.close();
                }
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
torpid raft
#

are you able to connect to the mariadb instance using the mysql cli tool

wind tapir
#

yes

torpid raft
#

even when you explicitely pass in the same ip/port/credentials you configured in your plugin?

wind tapir
#

yes

#

i changed the code a bit bc i had leak issues, heres the code before:

public static Object getField(OfflinePlayer player, String field) {
        try {
            ResultSet rs = executeQuery("SELECT " + field + " FROM players WHERE uuid = ?", player.getUniqueId().toString());
            if (rs.next()) {
                return rs.getObject(field);
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }

private static ResultSet executeQuery(String query, Object... params) throws SQLException {
        try (Connection connection = dataSource.getConnection()) {
            PreparedStatement statement = connection.prepareStatement(query);
            for (int i = 0; i < params.length; i++) {
                statement.setObject(i + 1, params[i]);
            }
            return statement.executeQuery();
        }
    }
sterile hinge
#

Returning an object that depends on something you‘re closing before returning doesn’t sound like a solid solution

wind tapir
#

ye true

torpid raft
#

or does it never work at all

#

because you're never freeing your connection, which you definitely should be doing if you are using hikaricp

wind tapir
#

thats whats happening with this code, i forgot

[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.result.ResultSetImpl.checkClosed(ResultSetImpl.java:470)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.mysql.cj.jdbc.result.ResultSetImpl.next(ResultSetImpl.java:1766)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at com.zaxxer.hikari.pool.HikariProxyResultSet.next(HikariProxyResultSet.java)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at fr.hibry.api.player.PlayerData.getField(PlayerData.java:72)
[19.02 18:11:40.899] INFO : [Lobby-1] [18:11:40 WARN]:  at fr.hibry.api.utils.ServerName.onPluginMessageReceived(ServerName.java:38)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at org.bukkit.plugin.messaging.StandardMessenger.dispatchIncomingMessage(StandardMessenger.java:429)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:2154)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.PacketPlayInCustomPayload.a(SourceFile:55)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.PacketPlayInCustomPayload.a(SourceFile:8)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:774)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616)
[19.02 18:11:40.900] INFO : [Lobby-1] [18:11:40 WARN]:  at java.base/java.lang.Thread.run(Thread.java:1575)
river solstice
# wind tapir thats whats happening with this code, i forgot ```java.sql.SQLException: Operat...

The connection is closed by try-with-resources and you cant use the ResultSet outside executeQuery method.
Instead you should be doing something like this:

public static Object getField(OfflinePlayer player, String field) {
    String query = "SELECT " + field + " FROM players WHERE uuid = ?";
    
    try (Connection connection = dataSource.getConnection();
         PreparedStatement statement = connection.prepareStatement(query)) {
        
        statement.setObject(1, player.getUniqueId().toString());

        try (ResultSet rs = statement.executeQuery()) { 
            if (rs.next()) {
                return rs.getObject(field);
            }
        }
    } catch (SQLException e) {
        e.printStackTrace();
    }
    
    return null;
}
#

Granted, this approach is far from ideal. As mentioned before, you should be using something like HikariCP, for ex.:

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

import javax.sql.DataSource;

public class Database {
    private final HikariDataSource dataSource;

    public Database(String jdbcUrl, String username, String password) {
        HikariConfig config = new HikariConfig();
        // adjust config as needed.
        this.dataSource = new HikariDataSource(config);
    }

    public DataSource getDataSource() {
        return dataSource;
    }

    public void close() {
        if (dataSource != null && !dataSource.isClosed()) {
            dataSource.close();
        }
    }
}
public class PlayerDAO {
    private final DataSource dataSource;

    public PlayerDAO(Database database) {
        this.dataSource = database.getDataSource();
    }

    public CompletableFuture<Object> getField(UUID playerUUID, String field) {
        return CompletableFuture.supplyAsync(() -> {
            String query = "SELECT " + field + " FROM players WHERE uuid = ?";
            try (Connection connection = dataSource.getConnection();
                 PreparedStatement statement = connection.prepareStatement(query)) {

                statement.setString(1, playerUUID.toString());
                try (ResultSet rs = statement.executeQuery()) {
                    if (rs.next()) {
                        return rs.getObject(field);
                    }
                }
            } catch (SQLException e) {
                // log 
            }
            return null;
        });
    }
}
wind tapir
# river solstice The connection is closed by try-with-resources and you cant use the ResultSet ou...

seems to work well, the problem is that i have this error

java.sql.SQLException: Operation not allowed after ResultSet closed
[19.02 18:31:10.864] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
[19.02 18:31:10.864] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
[19.02 18:31:10.865] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
[19.02 18:31:10.865] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
[19.02 18:31:10.865] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.result.ResultSetImpl.checkClosed(ResultSetImpl.java:470)
[19.02 18:31:10.872] INFO : [Lobby-1] [18:31:10 WARN]:  at com.mysql.cj.jdbc.result.ResultSetImpl.next(ResultSetImpl.java:1766)
[19.02 18:31:10.876] INFO : [Lobby-1] [18:31:10 WARN]:  at com.zaxxer.hikari.pool.HikariProxyResultSet.next(HikariProxyResultSet.java)
[19.02 18:31:10.876] INFO : [Lobby-1] [18:31:10 WARN]:  at fr.hibry.api.player.PlayerData.createPlayerData(PlayerData.java:115)
[19.02 18:31:10.876] INFO : [Lobby-1] [18:31:10 WARN]:  at fr.hibry.api.listeners.PlayerListener.connect(PlayerListener.java:32)
 public static void createPlayerData(Player player) {
        try {
            ResultSet rs = executeQuery("SELECT uuid FROM players WHERE uuid = ?", player.getUniqueId().toString());
            // line 115 
            if (!rs.next()) {
                executeUpdate("INSERT INTO players ...",...)
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
river solstice
#

I don't see what was changed

#

ah that's a different method

#

well, same thing applies, you cannot use the ResultSet from outside

#

it is being closed inside the executeQuery method

wind tapir
#

so, is there anyway i can replace the code above ?

river solstice
#

yes, don't use executeQuery to get a ResultSet and handle everything inside the createPlayerData method instead.

wind tapir
#

aight, thank you

wind tapir
#

um, anything else, is that a good thing to do ?

tasks.put(event.getPlayer(), Bukkit.getScheduler().runTaskTimer(APILoader.get(), () -> {
            long playtime = PlayerData.getField(event.getPlayer(), "playtime") != null ? Long.parseLong(String.valueOf(PlayerData.getField(event.getPlayer(), "playtime"))) : 0L;
            PlayerData.setField(event.getPlayer(), "playtime", Long.valueOf(playtime + 1L));
        }, 0L, 20L));
#

each second an update is made

#

in the table

#

i could make it asynchronous

#

btw

jagged belfry
wind tapir
torn heart
#

you're already storing player data

#

it's not harder to just do it onleave and onjoin

#

i'm hoping you're not also setting the database here

icy vigil
wind tapir
wind tapir
icy shadow
#

Why?

wind tapir
pulsar ferry
#

On join store the timestamp of the join, then on the player profile sum the time from stored timestamp till now plus the database time, no task needed

icy vigil
#

20 ticks is not equal to 1 second

wind tapir
#

so, its equal to what?

pulsar ferry
#

It's roughly 1 second at 20tps

#

If the server's tps changes so does your time

#

If you want to track time use timestamps

wind tapir
#

aight

#

thanks

clear compass
#

@pulsar ferry Can I ask for a PM?

pulsar ferry
clear compass
#

for a private chat with me for a moment

pulsar ferry
#

Not without knowing what it is about lol

clear compass
#

Is it possible to make the holograms display the list of players on another server? If so, how, because I can't find any information?

pulsar ferry
#

"the holograms" what hologram? If this is a plugin question you should ask in #general-plugins instead

clear compass
#

I asked 😛

#

no one answered😐

pulsar ferry
#

Well I do not know either shrug

clear compass
#

hmm ok

torpid raft
#

maybe you should ask piggy to make a global announcement to force everyone to help you with your hologram issue

knotty ruin
#

hey can I get another plugin help here?

#

of nLogin

pulsar ferry
clear walrus
minor summit
#

prolly wanna ping cube or piggy

river solstice
#

@wheat carbon

icy vigil
#

congrats yall getting banned

#

gg

minor summit
#

speak for yourself 💅

river solstice
#

minimodding

icy vigil
pulsar ferry
wary dust
#

Anyone heard anything about the replication of 1.8 pvp in 1.21

west socket
#

I know you can now also replicate sword blocking with eating animations

torn heart
west socket
#

Ah

jagged belfry
gritty dirge
#

How can I make a hopper filter system? I tried InventoryItemMoveEvent, its not working

dense drift
#

It is probably disabled in spigot/paper config

proud pebble
#

for some reason this is create the file no issues, but not actually putting in the values to the json file

#

first time trying to implement using json files and this is mainly a test of how to do it

minor summit
#

always put your readers/writers in a try-with-resources

#
try (var reader = new FileReader(file)) {
  // ... use reader
}

same for writers

proud pebble
#

huh, doing exactly that fixed it... interesting

icy shadow
#

surely this is not the right code to demonstrate the problem

#

not actually putting in the values to the json file
you should be sharing the code for writing to the file then, no?

#

but yeah it's the same thing emily said

#

otherwise the writer won't necessarily get .close()'d and won't necessarily be flushed

#

would also not recommending hiding exception information as that's gonna be really annoying to debug when something does go wrong

proud pebble
#

i posted the wrong image...

#

this is the one for saving to file, tho moving the writer bit into the try parenthasis did fix the issue

icy shadow
#

yeah checks out

proud pebble
#

tho now gotta figure out how to have it deal with a missing values

icy shadow
#

fromJSON will throw an exception in that case i think

icy shadow
#

which needs to be closed/flushed

#

which is what the parenthesis (try-with-resources) does automatically

proud pebble
#

well it autogenerated a throw statement but i couldnt add the return statement below it im assuming cus it immediately exits so i just removed the throw statement

icy shadow
#

yeah you don't have to necessarily rethrow it

#

just log it / print the stack trace

#

or wrap it in a RuntimeException and rethrow

icy shadow
#

because you can then handle the error case further up in the stack, eg sending it as a message or something

proud pebble
sharp hemlock
#

when getting an enchantment level, is it inclusive or exclusive

proud pebble
minor summit
#

do you perhaps mean 0-indexed or 1-indexed?

west socket
#

Im trying to fork a spigot plugin to fabric. Due to the very limited number of fabric events, I likely will have to implement my own events with mixins. Is there a place I can easily see where in the NMS code spigot is "injecting" their event calls.

#

IntelliJ search all doesnt seem to be able to find those references.

minor summit
#

it really depends on the spigot event you are trying to replicate? fabric-api is pretty extensive

west socket
#

Am I missing something when you say fabric API is very extensive? From a quick glance, it looks like it has a fraction of the events spigot has. Is this just because a lot of its coverage doesn’t use an events system?

minor summit
#

that's generally a weird event to listen for in the first place

#

but if you absolutely must use it, then you'd probably need to mixin either where the packet is written to the buffer or when the packet is created

west socket
#

Well yes, I would instead of using an event, just use my own mixin call. But I need to see where in the NMS code I need to inject. I was planning on using spigot source for that.

minor summit
#

i mean the spigot event is a weird event to listen to

west socket
#

I just need to use it as reference to see where to inject.

#

My real question is to ask if there are any resources for finding good inject-spots through NMS source

#

Since IDE search functionality just doesn't really work through decompiled libraries

minor summit
#

just clone paper, run the apply patches task, and see where and how they call the event

#

or look it up on paper's github repo

west socket
#

I'll give that a try, thanks

minor summit
#

now that it's in-sources

west socket
#

That helped, thanks

icy shadow
#

No problem!

alpine jackal
#

Hlo everyone 🥰

delicate garnet
#

Hello

#

@alpine jackal

pulsar ferry
#

The scoreboard stuff or the mechanic itself?

deft wedge
#

I want to display the item's attack damage in the score

pulsar ferry
deft wedge
pulsar ferry
#

Using paper api? This is a coding channel btw if you're not coding a plugin then you are asking in the wrong channel

prime jungle
#

hlo i want help regarding Deluxemenus plugin

#

like i have made a menu and in that i wanna the material should glow

#

so how can i do that?

proud pebble
prime jungle
proud pebble
proud pebble
#

seems like itemflags are seperated into specific values so use that

lyric gyro
#

how to mkae deluxhub server selector open deluxmenu menu

pulsar ferry
river solstice
#

does anyone have a tutorial/example project for making custom enchants in 1.21.3?
this shit is so confusing now

broken elbow
river solstice
#

sadly doesnt seem to work

#

@icy shadow update pls

icy shadow
#

😭😭😭

river solstice
#

and now instead of changing a single field to be accessible it seems like there is a fuck ton of reflection needed

icy shadow
#

Wonderful

river solstice
#

bruh 💀

#

i need to update this shit asap

broken elbow
#

Does Paper not have an API for this?

#

Or do you want spigot support as well

river solstice
#

spigot masterrace lol

||/s||

river solstice
pulsar ferry
#

I believe paper is still working on the item components stuff, but it should have something in 1.21.4 i think

river solstice
#

well there is this

worn jasper
river solstice
#

this shit is so confusing now

#

and doesnt match my current structure whatsoever

#

||the code itself is not ideal, I know, haven't had time to make it up to standards||

minor summit
#

the price of unsupported hacks pepelaugh

river solstice
#

it is what it is

#

why did they have to fuck it up so much

minor summit
#

to support data-driven enchantments

river solstice
#

I dont care about data driven enchantments
there I said it

minor summit
#

then don't run versions that have it

river solstice
#

no, give me back non-data-driven enchantments

minor summit
#

no

river solstice
#

yes

#

anyways
kind of weird that there are no (from what I have seen) any libs that would make life working with enchants easier

minor summit
#

paper registry api fingerguns

river solstice
#

yeah, I did try it out briefly, don't really have much time fully rewrite the plugin lol

minor summit
#

well, it's either that or data packs

#

or nms and deep reflection that is likely to break things

proud pebble
#

this doesnt seem to preserve the color past the first 2 lines

#

i have no idea why this is even the case

#

getlastcolors seems to read the color from the first line, then adds to 2nd line, but then when it reads it again it doesnt detect a color even tho at the start its been put as light gray

#

yeah ik that chatcolor is deprecated just trying to prototype this rn

#

this is what it looks like ingame rn

#

ive probs missed something cus its nearly 4am and this is likely just me being either blind and/or stupid

proud pebble
#

on any line but the first it returns as blank instead of a color code

prime jungle
#

bro help please

#

hide_enchantments is not working

proud pebble
#

so the color is always gunna be empty

#

cus the original didnt have the new colors

#

now produces this which is what i wanted

icy vigil
#

legacy ahh hacky formatting

solemn estuary
#

'-'

proud pebble
#

yes

#

legacy isnt fun but for a quick prototype instead of figuring out adventure it just works

dense drift
#

quick

proud pebble
#

now to figure out how to wrap text using components instead of strings

deep kettle
#

hi guys so i have a problem in my server so the problem is like im not able to disable mob spawning thru /gamerule doMobSpawning false, and i have disabled anything related to mob spawning in the servers files. still animals and mobs are able to spawn
(i do not use multiverse core)
i had decided further to use this implimentation and it dosent work as well any suggestions?


import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.CreatureSpawnEvent;

public class CreatureSummon implements Listener {

    @EventHandler(priority = EventPriority.HIGH)
    public void onCreatureSpawn(CreatureSpawnEvent event) {
        if (event.getEntityType() == org.bukkit.entity.EntityType.RABBIT) {
            event.setCancelled(true);
        }
    }
}

deep kettle
#

but rabbits are still able to be spawned

river solstice
#

try EntitySpawnEvent, not CreatureSpawnEvent

deep kettle
#

ok

river solstice
#

though CreatureSpawnEvent extends EntitySpawnEvent

deep kettle
#

nope still the same

sterile hinge
#

Well the gamerule should work, sounds like something is wrong somewhere else already

#

Or your expectations of how it works are wrong

deep kettle
# sterile hinge Well the gamerule should work, sounds like something is wrong somewhere else alr...
        World world = Bukkit.getWorld(worldName);
        if (world == null) {
            world = new WorldCreator(worldName).createWorld();
            if (world == null) {
                Bukkit.getLogger().severe("Failed to create world: " + worldName);
                return;
            }
        }
        if (!worldsWithGameRulesSet.contains(worldName)) {
            setGameRules(world);
            worldsWithGameRulesSet.add(worldName);
        }
    }

    private static void setGameRules(World world) {
        world.setGameRule(GameRule.DO_MOB_SPAWNING, false);
        world.setGameRule(GameRule.DO_MOB_LOOT, false);
        world.setGameRule(GameRule.DO_WEATHER_CYCLE, false);
        world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, false);
        world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false);
        world.setGameRule(GameRule.DO_PATROL_SPAWNING, false);
        world.setGameRule(GameRule.DO_TRADER_SPAWNING, false);
        world.setGameRule(GameRule.DO_IMMEDIATE_RESPAWN, true);
    }```
#

im using this

proud pebble
deep kettle
#

no

proud pebble
#

how do you know? you done a sysout for it or?

sudden sand
deep kettle
#

bw

#

btw

#

for some reasons my gamerules just get forgetten lol

sudden sand
deep kettle
#

lol

sudden sand
#

and if it prints the message in the console then it works

deep kettle
#

man im tired af

sudden sand
#

if it doesn't well it doesn't work

deep kettle
#

i aint doin it now 😭

stray yacht
#

Hello i need help for deluxemenus how can i perform my "left click commands" as op i mean players who click that are not op but they can perform that command as op? i searched the wiki but i can only see there are 2 options [player] and [console] both are useless for me is there a way to do that?

lyric gyro
#

[SOLVED]Im getting this: 0 placeholder hook(s) registered!


    private static ICraftTokens plugin;

    public PlaceholderAPIHook(ICraftTokens plugin){
        this.plugin=plugin;
    }

    @Override
    public @NotNull String getIdentifier() {
        return "iCraftToken";
    }

    @Override
    public @NotNull String getAuthor() {
        return "DreadIce";
    }

    @Override
    public @NotNull String getVersion() {
        return "1.0.0";
    }

    @Override
    public String onPlaceholderRequest(Player player,String params){
        if (params.equalsIgnoreCase("bal_survival")){
            return String.valueOf(getters.getBalance(player,"survival"));
        }

        return null;
    }
}```
and ive registed in my main: ```if(Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            PlaceholderAPIHook = new PlaceholderAPIHook(this);
            getLogger().info("Placeholder API and Hooks enabled too.");
        }```
i get the logger.info in the console but the hooks arent avaliable :/
icy shadow
#

you need to call .register()

lyric gyro
icy shadow
#

show your code

lyric gyro
#
            new PlaceholderAPIHook(this).register();
            getLogger().info("Placeholder API and Hooks enabled too.");
        }```
lyric gyro
idle zenith
#

hi, i need help, with the plugin EzRanksPro

proud pebble
lyric gyro
unreal wigeon
#

Hi

#

Does anyone here use Claude Sonnet 3.7 for coding/helpw ith plugins?

unreal wigeon
torn heart
#

no just the free trial

dusky harness
#

claude sonnet 3.7 is free

torn heart
#

so no reasoning model

#

gave it 240 lines of code and it spit back 10 nonexistent bugs, 1 instance of me forgetting to check for a division by 0, and nothing helpful to solve the problem

#

not exaggerating lol

unreal wigeon
#

Oh my friend said it was good

#

but he doesn't code mc plugins, he's full time web dev I believe

torn heart
#

it's probably more useful for web dev

#

especially frontend

spice fern
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

minor summit
#

or just use your brain

icy shadow
#

50% of programmers are having an ai
Other 50% are having a brain

sterile hinge
#

brAIn

river solstice
#

blud uses LLMs more than his brain

pulsar ferry
#

That is becoming so common, this generation is so cooked

spiral prairie
#

Speaking of cooked, the song "There's a McDonald's in the Pentagon" is stuck in my head...

solemn estuary
dusty frost
#

now imagine if you actually wrote the code and understood it yourself lmao

solemn estuary
jagged belfry
#

why not verify the code my running it and testing it

solemn estuary
#

Ofc I do, but sometimes I need other people to test it, and I won't call them 24 in a day

torn heart
devout cave
#

Hi I got a simple basic question why is it necesarry to set up a database for my server or why should I do that ?

river solstice
#

it depends

#

if you are planning to use plugins that need a place to store data then you probably need one, though usually they just store in yaml/json/sqlite/h2.

devout cave
#

ok and how to I know If my plugins need place to store data sorry I'm a total beginner

torpid raft
#

or you can just install them and they will send an error message in your server log on startup that says they cant find the database server, at which point you now know they need one

torn heart
devout cave
wary dust
#

Anyone know why using ProtocolLib I'm unable to cancel the block dig packet

#
 public void processFakeBlockHit(PacketEvent event) {
        PacketContainer packet = event.getPacket();
        Player player = event.getPlayer();

        
        // Check for block dig types that indicate the player is interacting with a block.
        EnumWrappers.PlayerDigType digType = packet.getPlayerDigTypes().read(0);
        if (!(digType == EnumWrappers.PlayerDigType.START_DESTROY_BLOCK ||
                digType == EnumWrappers.PlayerDigType.ABORT_DESTROY_BLOCK ||
                digType == EnumWrappers.PlayerDigType.STOP_DESTROY_BLOCK)) {
            return;
        }

        event.setCancelled(true);
}```
#

it definitely reaches setCancelled but it just keeps digging anyway

craggy umbra
#

Hey, is it desirable if I create a pull request for Pinger expansion that replaces (or adds) support for the current ping sequence? Currently Pinger still uses legacy ping.

#

I don't know if there are any real reasons behind this, but for me using the current ping sequence based on the handshake makes more sense.

molten ether
#

SunLicense

dull marlin
#

LicenseGate

#

Anyone here with an active Spigot plugin development team looking for new members by the way? I'm looking to join one

lyric gyro
#

Guys

solemn estuary
#

?

torpid raft
#

Guys

lyric gyro
#

yeah

lyric gyro
torpid raft
#

no

minor summit
raw junco
#

Im working on a custom particle dome effect but its not working the way I want it to can someone help me?

hoary scarab
#

Anyone know a way to edit any file type like a txt?
For example I can open image files (png, jpeg etc...) with any text editor and add text to the end of them. How would I do this with java?
I've tried the basic File -> byte[] -> String -> byte[] -> File but the string conversion never returns the same bytes.
Also tried looping through all bytes and matching them to Strings converted to bytes with no luck.

sterile hinge
#

byte[] -> String conversion depends on a charset, it normally doesn't make sense to transform arbitrary bytes into strings

hoary scarab
#

But if there is no charset I assumed it would be the same in both conversions

sterile hinge
#

there is no situation where there is no charset

hoary scarab
#

I meant not supplying one

sterile hinge
#

that just means it uses some specific

#

but also specific bytes might be invalid in a charset, so it really doesn't make sense to go from arbitrary bytes to string

hoary scarab
#

Yeah I tried looping through the bytes and finding a match for the string bytes but that doesn't work either.

So back to the question any idea how?

sterile hinge
#

I didn't really understand what you're trying to achieve

hoary scarab
#

You can open (almost) any file with notepad and write at the end of the file without altering it. For example images. I want to mimic that.

verbal venture
#

how to make abilities for mobs using MythicMobs ?

sterile hinge
#

you don't need to read anything of it

hoary scarab
#

I want to read them as well

sterile hinge
#

then do that

#

just don't do conversion to string

hoary scarab
#

I need to be able to remove the text to not just read/append. Plus there is no way for me to know if its the end of the file or that text

sterile hinge
#

do whatever you want

#

just don't epxect arbitrary charsets to allow your arbitrary input

hoary scarab
#

🤦 still not answering the question

#

How in java do I do this?

merry knoll
#

its just bytes

sterile hinge
#

not sure what still isn't clear

merry knoll
#

eof is also just a specific byte

#

open file -> read whatever you need to read -> adjust -> save -> done

hoary scarab
#

It can be text yes. At the end of any file. Which means when I read all bytes IDK where the end of the file is.

merry knoll
#

end of file is where the bytes end thats literally it

#

read through buffer

hoary scarab
#

🤦

sterile hinge
#

the last byte is the last byte

merry knoll
#

unless you are talking about something specific like .docx

#

in which case thats just a package of files with metadata

hoary scarab
#

Let me rephrase. I don't know where the text/file content starts/ends because the last byte would always be the last byte of the text

sterile hinge
#

man what is the xy

merry knoll
#

there is no difference between an image file and a text file

#

as long as its not something compressed

#

(like docx)

#

you can read the bytes -> append and edit -> save

#

if you need the char version, then you need to "parse" the bytes according to utf8 etc

hoary scarab
#

Ok I need to read the bytes that aren't originally the content of the image file....

#

So IDK how many bytes to read at the end of the file.

merry knoll
#

and whatever that was added after

hoary scarab
#

Lets start with that yes.

merry knoll
#

then you just

#

check whatever file extension you are editing

#

they all have a protocol

#

for example

sterile hinge
#

but just to be clear, it might be totally valid for a file format to end with arbitrary text, so whatever you're trying to do does not work generally

hoary scarab
hoary scarab
#

Fuck! Someone gave me a working method.
File -> byte[] -> char[] -> string -> char[] -> byte[] -> File

sterile hinge
#

bruh

#

so you still don't know what's going on

hoary scarab
#

I know what I'm trying to do works now so IDGAF

river solstice
#

Anyone here used JOOQ before?
I have a small issue:
The generator tool has input schemas (for example):
servername_coreprotect,
servername_misc,
etc.

The tool generates the tables, everything is fine, but in the test/development environment (server) the schemas have a prefix servername_dev_coreprotect, etc.

So for ex. if I run the plugin in the dev environment, the query:

dslContext.select(DSL.asterisk())
                .from(SomeTable.SOME_TABLE)
                .where(condition)
                .fetchInto(SomeRecord.class);

would select from servername_coreprotect schema and not servername_dev_coreprotect.

#

One of the options I found to work is to extend the base table with a "custom" one and override getSchema method:

    static class SomeTableCustomSchema extends SomeTable {
        @Override
        public Schema getSchema() {
            return DSL.schema(Config.str("db.sometable.schema"));
        }
    }

// and then
 private static final SomeTableCustomSchema CUSTOM_SCHEMA_TABLE = new SomeTableCustomSchema();

dslContext.select(DSL.asterisk())
                .from(CUSTOM_SCHEMA_TABLE)
                .where(condition)
                .fetchInto(SomeRecord.class);
#

or another option would be passing a custom Settings to DSLContext

new Settings().withRenderMapping(new RenderMapping()
    .withSchemata(new MappedSchema()
        .withInput("servername_sometable")
        .withOutput(Config.str("db.sometable.schema")))) // "servername_dev_sometable"         
#

I was wondering if there are "better"/"global" ways of doing it at runtime.

rapid marsh
#
    public @Nullable String onRequest(OfflinePlayer player, String params) {
        if (player != null && player.isOnline()) {
            Player p = player.getPlayer();
                if (params.equalsIgnoreCase("money")) {
                return format(Double.parseDouble(sql.getMoney(String.valueOf(p.getUniqueId()))));
            }
        }
        return null;
    }```


if i do `/ajl add money` it say that it send back an error because it's not a numeric value this is not what i'm needing i need to use this method for int values or double
proud pebble
#

ofcourse replace yourplaceholderidentifier with whatever you put for your plugin's identifier when creating your placeholder expansion class

#

also. for the love of god can you cache your getmoney values and intermittenly update them instead of always calling to your database, cus calling ur database all the time is gunna be slow when the placeholder will be called every tick

dusky harness
#

But yeah you don't want to run database stuff on the main thread

#

Especially with a lot of players - it will really slow down the server

rapid marsh
#

And when they log out it logs in the sql

hoary scarab
#

The map is only for caching you still have to send the data to the mysql (when server stops, player leaves etc...)

icy vigil
rapid marsh
# icy vigil yes

And if something appen like that the server crash and it will not bring a saving of all the data so an instant stop and not a regular one the data will be lose ?

icy vigil
#

I mean yeah you still have to be careful

#

save data to database in some background task once every some time

rapid marsh
pulsar ferry
#

Read from db on join and create cache, every write you'd write to both, and reads are always from cache
If you write on leave or on task you might still lose some data which you don't want, it's always safer to always write

rapid marsh
pulsar ferry
#

Yes

rapid marsh
#

Okay I think I will do like that ty

river fern
#

hey

minor summit
#

HEY

icy shadow
#

omg hiiiiii :3

river fern
#

hi guys , so i am a server owner and we are trying ot figure out how to create a placeholder for our cutom pluign , bsically ity just has to discplay the amout of points the player has , this is what my developer has made for now but i dont know what do we have to do next? it my first time doing stuff like this so idk what im doing but thanks for help
heres the code


import me.clip.placeholderapi.expansion.PlaceholderExpansion
import net.override.scoreSMP.utility.PointsPlayerUtility
import org.bukkit.entity.Player

class ScoreSMPPlaceholders : PlaceholderExpansion() {

    override fun getIdentifier(): String {
        return "scoresmp" // This makes %scoresmp_<...>% the placeholder format
    }

    override fun getAuthor(): String {
        return "OverRide" // Put your name or alias
    }

    override fun getVersion(): String {
        return "1.0" // Version of your placeholder expansion
    }

    override fun onPlaceholderRequest(player: Player?, params: String): String? {
        if (player == null) return ""

        return when (params.lowercase()) {
            "points" -> PointsPlayerUtility.getPlayerMemory(player).points.toString()
            else -> null // return null if placeholder not found
        }
    }
}```
river fern
river fern
#

what do i we need to do next?

river fern
river solstice
#

bro starts coding without reading

minor summit
#

like a pro

river solstice
#

does RTFM apply here

icy shadow
#

does M stand for "Manual" or "[Brister Mitten's lovely helpful] Message"?

river solstice
#

message obviouslee

icy shadow
#

yippee

kind moat
#

Hi, please tell me how I can spawn mobs in a zone.

limpid zealot
#

Hello there
i would like to know something about player skulls/heads

so i am in search of either a tool that already exist or a tool which i could create (maybe using python, maybe as java mc plugin)

it is about generating from given image -> base64 value of a head which i can use in mc to get that head

Now the thing is that i cannot find which format playerheads use, like 64x32? and where is the top/bottom/left/right/forward/back side(s), neither i know if it is even possible to obtain a valid base64 value (that work inside of MC and gives that actual textured head) because i already tried with some image i had which is 16x16 which i converted from image (png) to base64 value and when i tried to give myself skull/playerhead (regardless of server version, i have multiple test servers from 1.8 up to 1.21.4), i was always getting some default-skinned head (steve/alex/others...) where i assume either 16x16 is not valid format for heads (but what if i have only 1 side which i want to be applied on all 6 sides of the skull/playerhead?)

TL;DR
Is someone experienced with playerheads/skulls?
Converting image (png) to base64 which i can use to obtain custom-textured skulls?
I need some skulls/heads which are not found online (or to say, even more custom than online-custom ones, lol)

astral mauve
#

You can upload image files to it and it’ll automatically give you skin value and texture in base64

limpid zealot
#

it works for playerheads too?

#

there is no way to convert image to base64 which i can use inside of mc for playerhead? without using 3rd party website

astral mauve
#

You cannot convert an 'image' to base64, since base64 is a text encoder

astral mauve
#

Upload any skin (image) to the mineskin.org website, then you'll get the texture URL which you can use to set the texture of the skull

#

It also provides both the skin value and signature in base64

astral mauve
astral mauve
#

yeah I figured

river solstice
minor summit
#

mineskin simply makes the process of uploading an image and getting a url back much, much easier

dense drift
minor summit
#

yeah thanks emily

icy shadow
#

No problem

#

In case it wasn’t clear, the base64 string is an url to mojang servers, it can’t be an arbitrary image

limpid zealot
#

ok i still do not 100% understand what should i do

  1. i create image (what size? 64x64? 16x16? 64x32? should i have layout exact same as if i am creating mc skin but just leave body empty - png transparent and i am only working on playerhead?)
  2. i upload it to mineskin
  3. from mineskin i will get base64 value of my uploaded skin, which i can then use in either DeluxeMenus/DecentHolograms or even in /give command to give myself skull/playerhead with the base64 value i got from MineSkin
#

?

minor summit
#

sounds about right

#

idk the exact sizes of skin textures, although it's outlined in the minecraft.wiki

dense drift
river solstice
icy shadow
#

thanks i didnt know that

river solstice
# icy shadow thanks i didnt know that

base64 works by dividing binary data into 6-bit chunks, since 6 bits can represent 64 different values, these chunks then are then mapped to a set of 64 ASCII characters (A-Z, a-z, 0-9, +, /). If the input length isn't a multiple of 3 bytes - a padding (equals symbol =) is added to ensure proper encoding.

icy shadow
#

but can I use it to encode an image into a skull?

river solstice
icy shadow
#

Thank you you’re so helpful

#

Can we kiss

river solstice
#

Haha, I appreciate the love! 😆 But let’s keep it to virtual high-fives and good vibes. 🙌💙 Let me know what else I can help with!

icy shadow
#

sure thing, I have another question

#

I want to put an arbitrary image into a skull. Can I use base64 to do this? Without using another website

river solstice
#

no

icy shadow
#

aww

worldly igloo
#

Resetting Spigot-Server to CraftBukkit...
HEAD is now at 35dfdb572 CraftBukkit $ Wed Mar 12 21:43:46 TSS 2025
Applying patches to Spigot-Server...
Applying: POM Changes
Applying: mc-dev imports
Applying: Skeleton API Implementations
Applying: Obfuscation Helpers
Applying: Spigot Configuration
error: sha1 information is lacking or useless (src/main/java/net/minecraft/server/DedicatedServer.java).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0005 Spigot Configuration
Something did not apply cleanly to Spigot-Server.
Please review above details and finish the apply then
save the changes with rebuildPatches.sh

Getting this error while compiling paper ver/1.8.8 does anyone know how to fix that?

shell moon
#

What's the best way to make endery crystal explote? without a player damaging it?

minor summit
#

doesn't setHealth(0) work?

shell moon
#

thats for LivingEntity i guess

#

yes, its for living entity, ender crystal isnt

#

ideas? (Ping me)

hoary scarab
#

Isn't there an explode method?
If not just send a damage event.

shell moon
#

How?

#

I don't think new damage event and call event

#

Has some effect

hoary scarab
#

ProjectileHitEvent?

hoary scarab
#

Is there a way to create an instance of the class already being called?

public class Example {
    private static Example instance;

    public static void main(String[] args) {
        instance = new Example();
    }
}
hoary scarab
sweet rose
#
public class Example {
    private static Example instance;

    private Example() {
    }

    public static Example getInstance() {
        if (instance == null) {
            instance = new Example();
        }
        return instance;
    }

    public static void main(String[] args) {
        Example obj1 = Example.getInstance();
        Example obj2 = Example.getInstance();

        System.out.println(obj1 == obj2);
    }
}

If you just want one use that

hoary scarab
#

Still using new Example()

sweet rose
#

but once

#

so next times you can call the instance with Example.getInstance

hoary scarab
#

I already do this. You aren't answering the question lol

#

"Example" is already initalized by the java environment. Is there no way to capture it as a variable?

hoary scarab
#

This is how I currently do it. ```java
private static Example instance;
static {
instance = new Example();
}

public static Example getInstance() {
return instance;
}

#

Could even just private static Example instance = new Example();

torn heart
graceful hedge
#

I don’t really understand what you’re asking for neither yapps 😅

hoary scarab
#

I really can't explain it any other way.

#

When you run the program example is already initialized....
Can you create a variable of the initialized object?

graceful hedge
#

Ah I see what you mean

graceful hedge
hoary scarab
#

I mean is there anyway to not have to create a new object of the already initalized class?

frank orchid
#

Tbh I read it as they think and instance is already created which they want to access so they can skip the new Example thing.

Though the answer to that is there isn't one yet. You're in a static context

graceful hedge
#

Well in ur case, lets say u leave Example to be the empty program

#

then Example wont create a new instance

frank orchid
#

Alternatively making everything static will allow you to avoid the new instance thing but I would not recommend doing so

graceful hedge
#

Example::main does nothing but merely just exists inside Example

hoary scarab
#

Like for example IDK why in the static method you can't use "this" since the static method needs the class to run.

frank orchid
#

this refers to the object instance

frank orchid
#

Which there isn't one

hoary scarab
#

Oh yeap scratch that then ^^^

#

Still a variable of the running instance would be nice

frank orchid
#

You mean running class?

graceful hedge
#

as in when clinit runs ^^?

hoary scarab
#

Yes

sterile hinge
#

what

graceful hedge
#

I mean u can hypothetically create a new instance right inside of the static block? and that'd be the first instance of that class no?

hoary scarab
#

First no.

sterile hinge
#

wtf am I reading here

#

if you never use new Example() then there will never be an instance of Example

graceful hedge
#

^^

hoary scarab
#

Not one thats a variable. But the java environment has to create the instance to run the main method.

graceful hedge
#

no it doesnt?

sterile hinge
#

no

#

that's the whole point of static

frank orchid
#

Static methods belong to a class not an object instance

graceful hedge
#

i mean sure if u use the new jep stuff w a non-static main method

frank orchid
sterile hinge
#

the syntax sugar is that you don't need the surrounding class, but modifiers are as if the method is in a class

hoary scarab
#

👍

#

So stuck creating a new instance

sterile hinge
#

if you want to create an instance, you need to create an instance, yes

graceful hedge
shell moon
#

Add packet listener and add the events

shell moon
#

What's changed since 1.21.3?

#

Last time I saw and used protocol lib api

#

It was working

shell moon
#

I don't get it, you said you never tried the api?

#

Google protocol lib listen packets

#

Or smth and it will show some examples

minor summit
#

don't think there's a nice way to do this in the api outside of, like, create a small explosion where the ender crystal is

#

oh, actually it will not blow up if it was damaged by an explosion

#

so, just spawn an explosion lol

#

@shell moon

#

also lol

icy sonnet
icy shadow
#

what is plain Java

sterile hinge
#

what does "but in plain java" mean

#

mmm

icy shadow
#

And what does “never works” means

icy sonnet
#

like just java nothing else no api etcc

#

like it never gets the regex match

#

but it does find matches with this REGEXIP

icy shadow
#

what is the message contents

sterile hinge
#

so you're saying the regex behaves different because specific libraries are on the classpath? I highly doubt that lol

icy shadow
#

just print out message and see what it is

#

guarantee it's different in some way

#

to what you're testing with

icy sonnet
#

alr one min

#

mostly I prompt an domain to test

icy shadow
#

well theres no dots lol

icy sonnet
#

when I type the message in minecraft there are dots 🙂

icy shadow
#

something is removing them then

icy sonnet
#

I think thats essentials

icy shadow
#

well then that's the problem

icy sonnet
#

well essentials is the most used plugin soo I need to figure out how to disable what essentialschat is doing

icy shadow
#

indeed

#

or change the event priority to lowest

#

wait no you're cancelling it so thats maybe a bad idea

#

for future reference, in 99.9999% of cases, the java standard library is not the cause of issues lol

icy sonnet
#

I didn't say java is the issue 🙂 I said with java it works but with spigot api it doesnt. that's what I mean

icy shadow
#

oh yeah true

sterile hinge
#

I mean it still works

icy sonnet
#

now it works. thanks peeps

icy shadow
#

no problemo

shell moon
shell moon
# minor summit also lol

hahaha yeah, that's my account, last is my old account and 2nd is a temp account when i joined the server from a widget i think and got bugged or smth, i never was asked to enter a password or smth, so its weird xd

minor summit
#

a sane solution is to not support old versions

#

and 1.14 is old

minor summit
#

but that is far from the current code

#

it'll still create an explosion tho

dusk venture
#

How can I setup docker for this project

FROM node:lts-alpine3.17

WORKDIR /usr/app

COPY package.json pnpm-lock.yaml ./

RUN npm install -g pnpm

RUN pnpm install

# Run separately bc different layer. Makes rebuilding image faster.
COPY . .

CMD ["pnpm", "start"]
services:
  app:
    build:
      context: .
    init: true
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
    env_file: ./.env

I tried doing it, you can checkout the Dockerfile and the docker-compose.yml, no errors in building image but when starting the service prisma doesn't connect to the database. It gives this error

2025-03-13 21:16:12 app-1  | Can't reach database server at `node.exmaple.com:2002`
2025-03-13 21:16:12 app-1  | 
2025-03-13 21:16:12 app-1  | Please make sure your database server is running at `node.exmaple.com:2002`.

Although the db is running and works fine, can only db's that are in the same volume can be connected?

dusty frost
#

no you just need to setup the ports correctly

#

this has nothing to do with your app setup, it's all about the db, you'd need to show us that part of the docker compose file or however you're hosting it

#

not sure if you just censored it, but you did spell example wrong, and it could be any number of networking issues for why it's not connecting, wrong port, firewall blocking, didn't do docker networking right, etc.

river solstice
#

maybe its just an ex maple

dusty frost
#

bro's fleeing Canada or something 😭

broken elbow
shell moon
#

When inventory is create, you specify a Title when using Bukkit.createInventory method

#

How to get that original title from when the inventory was created?

#

i know you get the title from inventory view, but im asking without opening yet

#

let's say, to "clone" an inventory

minor summit
#

nms

#

Inventory is more than just a custom one (via createInventory), and not all inventories have a title

shell moon
#

I see, i need to cast it to CraftInventory and then to MinecraftInventory

broken elbow
#

I will explain exactly what I want, but before you start yelling at me, this has existed like this in DeluxeMenus ever since implemented by clip, so I have to keep it to not break backwards compatibility.

I don't suppose its possible to have custom a PersistentDataType that decides if a primitive (String in my case) can be converted to the complex type (Boolean)? Basically, I want to have booleans stored as strings but from what I can tell, if you have Type<String, T>, it doesn't matter what T is, it will always try to convert.

pulsar ferry
#

Wouldn't it be easier to just use String type and convert afterwards?

broken elbow
#

Yeah, that's what I am doing right now. Was hoping I could make a custom type for this and decide when to convert and when to not in one place

worn jasper
broken elbow
#

No. I know its possible.

#

Damn, I have a hard time explaining what my issue is. I think Matt understood me but lets try again:

I have a type PDT<String, Boolean>.

If I use PDC#set(my:key, PDT<String, String>, value)

PDC#has(my:key, PDT<String, Boolean>) will return true always. If I want to remember what the complex type of a value is I have to store it myself.

#

So I guess, short form: PDC#has(key, type) only checks the primitive type

worn jasper
#

I see

#

hmm yeah converting it afterwards is an easy solution but I see your point

broken elbow
#

Yeah. That's what I'm doing rn. Its just annoying that I have to pass extra context (my PDT and an extra type telling me that its actually supposed to be converted to a boolean). And if I ever try to get all values of type String it will contain the boolean ones as well. I guess, you can say that the complex type works as a sort of an alias.

minor summit
#

Paper has a has(NamespacedKey) method, regardless of the real type (could be a byte array for all you know)

paper kiln
#

hey quick question can i make it so that spawn is in another world (like the nether but not in the nether in another dimension)

shell moon
#

hey quick reply, i didn't understand your question tbh

proud pebble
#

you are asking if you can make the spawn point in another dimension instead of the default overworld spawnpoint?

icy shadow
#

they mean another world i think

#

a different overworld

torpid raft
#

pretty sure you can just copy world_nether into the place of world and that should just work

#

if you need a more general solution, im sure worst case you can just have a plugin send a player to the location of your choosing upon death or first login

paper kiln
#

sorry for the horrible phrasing my friend is helping me with this but thanks for helping

woeful flame
#

I am now developing a plugin that involves working with a helluva lot of entities, so i am thinking is it worth the effort to make them client-side only (with packets) to hopefully put less strain on the server and allow for multithreading, if so, how do you manage such entities? The examples i've seen on the internet just send spawn/metatdata change packets to all players on the server, is it really an optimal solution? Or is it better to somehow send updates only to players in a certain radius for example?

river solstice
#

Sending to all players? Doesn't sound very optimal if not all players see those entities.
Obviously if you can implement a way to send the data to players in a specific radius - it would be better, though keep it mind you don't want them to randomly appear/dissapear if the range is too low.

#

Of course you need to weight in what's more performance intensive, most likely on the network side, to send the data to all players, or hardware side implementing a range check.

woeful flame
# river solstice Sending to **all** players? Doesn't sound very *optimal* if not all players *see...

Yeah, i think to just put range setting into the config file for that reason... i am just thinking what could happen if a player will for example enter the radius and the server will send him the metadata update for an entity that client thinks doesnt exist since it was not in range at the time of entity spawn, so i probably need to keep the track of clients that know the entity exists and despawn and spawn it for the certain clients accordingly, which could also be performance intensive if you'll need to despawn thousands of entities at a time... (btw i was inspired by cymaera's rgb displays and want to create a minecraft VNC client using this technique, so even a 144p display will require 36k text display plxels)

sharp hemlock
#

IntelliJ are u on drugs kekW

minor summit
#

repair ide 😌

prisma briar
#

Hello guys, I'm trying to create a bingo card for one of my minigame, but when it comes to placing blocks images the quality is really low and I'm not sure how to improve it. It works well with items, but not blocks. This is my code that generates the bingo card image https://paste.helpch.at/pecuhisupa.java.

This is what I want to achieve: https://i.imgur.com/xov0iQ6.png
This is currently what I have: https://i.imgur.com/D2vp60X.png

You could really tell the difference on the image quality. I could retrieve the block image from the resource pack, which is 16x16 already but it's only one-side of the block and I want the image of the block is using the 3d part just like in the image that I want to achieve.

woeful flame
prisma briar
#

That might improves it

prisma briar
proud pebble
#

the one with the map on it

#

the first one

#

cus from what i can tell its a hard cap of 128x128 making that image impossible to render on a map and since maps dont have anything on them but the image id say its impossible for that map to exist

#

unless it uses some bs like scoreboard or actionbar to put images on screen

woeful flame
# prisma briar Oh it’s 256x256? I thought it was 128x128. I could use higher pixels then.

oh... sorry, yeah, strange, i always thought of them being 256x256... but i havent touched maps since 1.12.2 times... In terms of the trick, the only thing that comes to my mind is to put banner markers on the map (you know that rarely used vanilla feature where you can click a banner placed somewhere in the world and this banner will show up on the map with it's name bellow? there should be a way to make such markers in the bukkit api, go to the docs/google) and then you could retexture some chineese characters with the block images and put thouse characters as the marker names, you could make the descriptions the same way

icy sonnet
#

Does anyone know if something exists like this:

Config:

  • doesn't need to be removed and generated again after each update/fix.
  • Keeps comments I make for user
  • can support lists, etcc..
neat pierBOT
dusky harness
#

or do you mean manually

icy sonnet
#

I mean, when I add new options etcc. bukkit doesnt put them in automatically

dusky harness
#

ah

dusky harness
#

(rip mf-config)

icy sonnet
#

who's mf?

#

Matt no?

dusky harness
#

he forked ConfigMe a while back

icy sonnet
#

aah

#

Oh yea thanks @dusky harness btw xd

dusky harness
#

np 🙃

dusky harness
#

Oh!!!
A revival!

pulsar ferry
#

It's not the same and not ConfigMe based though

dusky harness
#

Mmm in kotlin this time

#

Yeah

worn jasper
#

polaris on top

pulsar ferry
#

Kotlinx.serialization based

#
@Serializable
public data class MyConfig(
  @SerialComment(["hiii"]) public val name: String,
)

val config = loadConfig<MyConfig>{ ... }
val configValue: MyConfig by config

println(configValue.name)
config.reload()
println(configValue.name) // changed name

Pretty simple to use too

river solstice
#

bayzed

tight junco
#

have yet to figure out optional config options though where it won't automatically add every option to ever exist to the file

dusky harness
#

I don't think it supports comments tho

graceful hedge
#

it has api for comments, not sure if all of its services provide implementation for it

icy sonnet
pulsar ferry
#

Do you have the shadow plugin (gradlew)/shade plugin (maven) setup correctly?

icy sonnet
#

I don't think so, they never taught me what that is in school

pulsar ferry
#

And are you building with mvn clean package?

icy sonnet
#

well mvn package & mvn install

pulsar ferry
#

The package task creates 2 jars, make sure you are getting the biggest one

icy sonnet
#

still same problem.

pulsar ferry
#

If the error is exactly the same then you are still either not building it right or not getting the right jar, it wouldn't say ch/jalu/configme/resource/PropertyResource it would be me/cozyleprechaun94/joychat/shaded/configme/resource/PropertyResource instead
Make sure you are doing mvn clean package > go to target folder, get the bigger jar
don't do install

icy sonnet
#

there is JoyChat-3.0.0 and original the first one is bigger, I put that in the server plugin folder and still

#

ah now I get different one

#

so now it only creates config.yml and says that whitelisteddomains must not be null.

#

now it created all. bruh

#

all that work and configme doesnt preserve comments ...

river solstice
#

why do you need to preserve comments

jolly kayak
#

Hey im working on my first plugin and i want it to broadcast a message on every morning whats the best way to do this ?

icy sonnet
jolly kayak
icy sonnet
#

Ask chatgpt prob makes it better than me

jolly kayak
#

Already doing 😂

#

Ahh yeah im already doing that

river solstice
#

I typically just create a config_default.yml that is overridden everytime the server starts

#

and is always up to date

icy sonnet
#

Doesn’t that always override the changes the user makes?

river solstice
#

well, yes, but it's just for "example" purposes

#

main config is config.yml

#

I include a comment about it being there just for reference at the top.

graceful hedge
icy sonnet
#

I already did

graceful hedge
#

So then no issue?

icy sonnet
#

Yes it doesnt support lists like http:// balala

graceful hedge
#

I mean comments are hard since by specification they can pop up pretty much anywhere

#

(^ yaml)

icy sonnet
#

I asked gpt about it and it made a great class for updating config after new update etcc.. but everytime I added a sort of list it glitched out

graceful hedge
#

oh woaw, interesting oddity

river solstice
icy sonnet
#

Yea I dont know every time I loaded the plugin everything was fine on restart on the other hand. All the files glitched out

river solstice
icy sonnet
#

Ill look into it thanks

graceful hedge
grave tusk
#

would anyone here per chance know how to use blender?

#

i'm kinda stuck with a small problem (i can't send images here though)

neat pierBOT
grave tusk
#

i guess i can

#

trying to get rird of those lines because i'm rendering an image for a thumbnail

#

but i can't seem to be able to get rid of those lines

#

nevermind, got it!

wanton terrace
#

if i put -Xms$(({{SERVER_MEMORY}}*85/100))M -Xmx$(({{SERVER_MEMORY}}*85/100))M with all Aikars flags, what exactly would that do?

buoyant wave
#

Does anyone know what the name of the minecart with chest is for deluxe menus matrial

woeful flame
lyric gyro
#

why isn't this working??

    public @Nullable String onRequest(OfflinePlayer player, @NotNull String params) {
        if (params.toLowerCase().equalsIgnoreCase("alive_players")) {
            return list.aliveAsList();
        }else if (params.toLowerCase().equalsIgnoreCase("alive_size")) {
            return String.valueOf(list.aliveList.size());
        }
        return null;
    }```
#

i don't see anything wrong with the code but i still can't use the placeholder cause it doesn't return anything

#

if I do /papi parse me %neon_alive_size% it sends %neon_alive_size%

#

registered them too with

            new dead(list).register();
            new tokens(tokens).register();```
hoary scarab
#

Maybe try adding neon_

lyric gyro
#

still doesn't seem to work

hoary scarab
#

Debug it. Check if its running.

lyric gyro
#

If what's running

#

Papi?

hoary scarab
#

Your method

lyric gyro
#

Right sec

hoary scarab
#

Also don't need to do .toLowerCase() when you are ignoring case

lyric gyro
#

I added Messages.broadcast("PARAMS: " + params); at the start of the method, and it doesn't broadcast anything so I guess its not being requested or something

hoary scarab
#

I haven't really used PAPI so I can't help further on that side.

lyric gyro
#

Alright thanks anyway

wanton terrace
proud pebble
lyric gyro
dusky harness
lyric gyro
short cedar
#

Hey,
ignoring that mapids are deprecated,

Whats the correct way of getting the mapemta from the itemstack? this throws a classcast exception
class org.bukkit.craftbukkit.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.MapMeta

  var map = new ItemStack(Material.FILLED_MAP,1);
           var nextID = Display.mapIDs.getAndIncrement();
           MapMeta meta = (MapMeta) map.getItemMeta();
           meta.setMapId(nextID);