#development
1 messages · Page 90 of 1
i would like to buy one blockchain please
okay. I can help you.
Can you repair me
yes I do
you can choose (etherium, solana, cardano, bitcoin...). what?
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.
D.M me
what is D.M
request friend. understand?
i dont have any friends sorry
would accept me?
I sent request friend. click accept.
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.
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
i think it's the latter + the occasional gpt paragraph
what.
If you don't believe me, I will prove me.
I will show my github.
you too.
If you don't believe me, I will prove me.
I will show my github.
check all this github.
If you need my resume, I will send to you.
holy cow are you THE crypto legend x
you again!
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
you are a liar!!!!
How can prove me for you.
I will do your project free for.
for my honest
i have no patience for untruthful people
i can be your angle or your devil
your choice
okay. I will make your token till after 3days.
I will prove me.
thank you
you are a good man
if you can do this, you will have a powerful position in my business
I will work full time (day and night)
i will make you my senior crypto developer
thank you darling
ok. wait your coin.
Send me request friend.
you had block.
I want to talk about your project everyday.
ok?
out*

hello?
How can I use mojang mappings NMS pre 1.17?
Pretty sure it's available all the way to 1.14
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.
Excuse me, where live in?
what lol?
@wheat carbon can you ban the bot? 😅
sorry for the ping
but hes just randomly tagging people
the hoss guy
xDD
He’s making me a bitcoin
What is the error message
And share code
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=[]}
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
Not an error but its not suppose to say that lol
spigot
Alright you need to use the player.spigot().sendMessage then
To send the component properly formatted
Can I send you the code?
Send it here
How its too long
you’re probably doing something like player.sendMessage(something.toString())
Which is bad
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
mmm code
Indeed
Oh yeah String.valueOf
Same thing
don’t do that
If you’re using minimessage that means you’re using Adventure too, right?
Yup
Okay so you need to get an Audience for the player and use that to send the message
Yeah uhh how xd
easiest would be to drop spigot and only support paper
yeah that’s definitely the easiest
if that's not possible because you are forced to support spigot by higher forces, you need adventure-platform
I’m on mobile so I can’t say specifically but the adventure documentation should make it pretty clear
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
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
Yeah no but I think I can just save my time with using another plugin or so.
Fair enough
Very true but I know nothing about code beside like { and }
yeah, it’s an opportunity to learn something!
It’s a very useful skill to have as a server owner
everyone finds it hard at first hehe
it’s up to you of course
but I think it’s a good learning opportunity
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
Have to disagree but suit yourself
let's call
Take him on a date first
Now, I'm working for him.
but he don't call with me.
I can't understand
Same, he never calls me either 😔
:icant:
I can't know about him.
@dense drift yeet the bot, it's getting boring
I think he is bot or scam.
what do you think?
you are
Definitely @icy shadow is one of the worse bot and scams I've seen in a while, I hate him
that is true
what happened to us man
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
@pulsar ferry done
finally
They have been out since 1.14.4 iirc, but spigot didn't include them until 1.17
Have you tried paperweight? Not sure if it goes back that far either but hey worth a try
Or use a more recent version :')
lmao
nope lol, paperweight has the same limitation, also im making a library with cross version support so i'd like to include as much as possible
ah yes making libraries with support for versions nobody uses
Why can't I make a 1.8 with Intellij Idea ?
You can
what does that even mean
he succeeded...
im gonna guess he means that the mc development plugin doesnt have it in the template
you could just select a higher version and then just change the version
Not everyone is the sharpest tool in the shed
To be fair, 1.8 spigot has a different repo and artifact information
So you’d have to change more than just the version
Ty x)
I thought of that yes, but I didn't know if there would be an issue
I did
and it worked
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 )
add a persistent data container to the item and give it a tag from your plugin
then check for that data
this should give you all the information you need: https://docs.papermc.io/paper/dev/pdc
tysm
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?
i think you should treat commit messages like code comments
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
yeah i made this same mistake too hehe
i agree with ivan
would recommend conventional commits where possible
even if theyre kind of annoying
Wait what do you mean by "conventional commits"? Or are you referring to what you said above, to use javadoc notation?
don't forget to add emojis to your commit messages
true...
blazingly fast
Feat 🔥
Bug 🐛
Optimization 🚀
chore 🧹
no thanks, unless they add this guy to unicode:

be the change you want to see in the world

hold the unicode consortium hostage
until they add it
bring a gun into their office
or a bomb
i think that would help
but emojiless-labels? thats an interesting approach
what do you mean
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
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?
Nope, it's very useful
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
Taken from work
Writing them can be annoying, but there’s a vscode extension to format them automatically, and I assume an IntelliJ one too
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
Yeah that’s a good way of doing it
It gets kind of annoying doing them for every single commit, especially wip ones
If I had to specify every file I touch on a commit I would kms
horrible
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 😄
its also kinda pointless because git literally does that for you, no point in repeating yourself
Yeah it’s silly even when you’re a solo dev haha
We also got a wonderful mix of present and past tense commit messages in some repos 😏
Barry eats children for fun
Why can't u shout I like shouting
Barry is shoutophobic
https://i.tricrotism.com/ol9ul1ol.png
(Mainly refactoring and getting rid of old/deprecated code and adding some more universal ways todo stuff)
Was done in about a week +-
cool, now do a code review
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.
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}
};
Let me check that!
Ask chatgpt if ur nooby
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
im tryna make a minecraft server, tho im not very good with that rn
use a thread pool like hikaricp
ik
then im sure there are guides and best practice articles for using it
give a specific example of something you are struggling with
mariadb connections work the same way mysql does if that helps
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;
}
are you able to connect to the mariadb instance using the mysql cli tool
yes
even when you explicitely pass in the same ip/port/credentials you configured in your plugin?
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();
}
}
Returning an object that depends on something you‘re closing before returning doesn’t sound like a solid solution
ye true
oh when you do this, does the sql query work the first few times
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
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)
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;
});
}
}
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();
}
}
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
so, is there anyway i can replace the code above ?
yes, don't use executeQuery to get a ResultSet and handle everything inside the createPlayerData method instead.
aight, thank you
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
why not just update the playtime on leave with the amount of time they were on the server for. updating every second for every player is going to be a lot. do you need like live play time for something?
talked with someone and seems to be fine, not for each player but with a common task
yeah but like why
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
each 20 ticks*
yes ? each second
ik but i want it like idk smooth
Why?
like, for example in the player’s profile the time is updated
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
so, its equal to what?
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
@pulsar ferry Can I ask for a PM?
For?
for a private chat with me for a moment
Not without knowing what it is about lol
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?
"the holograms" what hologram? If this is a plugin question you should ask in #general-plugins instead
Well I do not know either 
hmm ok
maybe you should ask piggy to make a global announcement to force everyone to help you with your hologram issue
Not in this channel #general-plugins or #1007620980627230730
Can someone verify? https://api.extendedclip.com/expansions/movecraftpapi/
prolly wanna ping cube or piggy
@wheat carbon
speak for yourself 💅
gg for me ig

Anyone heard anything about the replication of 1.8 pvp in 1.21
Is it not as simple as removing the attack cooldown?
I know you can now also replicate sword blocking with eating animations
knockback is different too iirc
Ah
in one of the recent snapshots, they also added an attribute that you can add that allows you to basically block with any item
How can I make a hopper filter system? I tried InventoryItemMoveEvent, its not working
It is probably disabled in spigot/paper config
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
always put your readers/writers in a try-with-resources
try (var reader = new FileReader(file)) {
// ... use reader
}
same for writers
huh, doing exactly that fixed it... interesting
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
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
yeah checks out
tho now gotta figure out how to have it deal with a missing values
fromJSON will throw an exception in that case i think
FileWriter won't always directly write to the file, it might create an in-memory buffer
which needs to be closed/flushed
which is what the parenthesis (try-with-resources) does automatically
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
yeah you don't have to necessarily rethrow it
just log it / print the stack trace
or wrap it in a RuntimeException and rethrow
this is generally the approach i'd recommend rather than a true/false return
because you can then handle the error case further up in the stack, eg sending it as a message or something
fixed this, the issue was actually when the file has no valid fields it would return the object as null and now have a check for that
when getting an enchantment level, is it inclusive or exclusive
from where exactly?
do you perhaps mean 0-indexed or 1-indexed?
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.
it really depends on the spigot event you are trying to replicate? fabric-api is pretty extensive
It’s a more niche one. It is the event that sends a list of possible commands to the client when joining
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?
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
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.
i mean the spigot event is a weird event to listen to
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
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
I'll give that a try, thanks
now that it's in-sources
That helped, thanks
No problem!
grep...
Hlo everyone 🥰
The scoreboard stuff or the mechanic itself?
scoreboard
I want to display the item's attack damage in the score
There is the scoreboard api https://jd.papermc.io/paper/1.21.4/org/bukkit/scoreboard/Scoreboard.html
How do I enter it into the scoreboard?
Using paper api? This is a coding channel btw if you're not coding a plugin then you are asking in the wrong channel
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?
apply an enchantment, then use itemflags to hide the enchantments
also this is a #minecraft or #general-plugins question
Okh
How to use itemflags ?
deluxemenus has a wiki, and it has a specific section about itemflags
All item related options & configurations
Ok
seems like itemflags are seperated into specific values so use that
how to mkae deluxhub server selector open deluxmenu menu
Wrong channel you want #general-plugins
does anyone have a tutorial/example project for making custom enchants in 1.21.3?
this shit is so confusing now
Did something change in 1.21.3? If not, you can try this one: #development message
😭😭😭
they are now data driven iirc
and now instead of changing a single field to be accessible it seems like there is a fuck ton of reflection needed
Wonderful
Ah. Sorry to hear that
spigot masterrace lol
||/s||
doesn't seem like it or I am just blind
I believe paper is still working on the item components stuff, but it should have something in 1.21.4 i think
it has
yeah
this shit is so confusing now
and doesnt match my current structure whatsoever
fun
If anyone has any recommendations how could I, without rewriting 90% of the plugin, add support for 1.21.3 - @ me, thanks
https://github.com/M0diis/M0-ExtraEnchants/tree/1.21.3-res
||the code itself is not ideal, I know, haven't had time to make it up to standards||
or if anyone wants a quick buck #1323802935934845069 message
the price of unsupported hacks 
to support data-driven enchantments
I dont care about data driven enchantments
there I said it
then don't run versions that have it
no, give me back non-data-driven enchantments
no
yes
anyways
kind of weird that there are no (from what I have seen) any libs that would make life working with enchants easier
lol
paper registry api 
yeah, I did try it out briefly, don't really have much time fully rewrite the plugin lol
well, it's either that or data packs
or nms and deep reflection that is likely to break things
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
on any line but the first it returns as blank instead of a color code
im actually a fucking idiot, it checks the original splits, it doesnt even think about the new one
so the color is always gunna be empty
cus the original didnt have the new colors
now produces this which is what i wanted
legacy ahh hacky formatting
'-'
yes
legacy isnt fun but for a quick prototype instead of figuring out adventure it just works
quick
now to figure out how to wrap text using components instead of strings
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);
}
}
}
in this i just wanted to test if rabbits spawn event is cancelled or not
but rabbits are still able to be spawned
try EntitySpawnEvent, not CreatureSpawnEvent
ok
though CreatureSpawnEvent extends EntitySpawnEvent
nope still the same
Well the gamerule should work, sounds like something is wrong somewhere else already
Or your expectations of how it works are wrong
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
is getentitytype returning anything?
no
how do you know? you done a sysout for it or?
Maybe you forgot to register your listener?
i did register it bro
bw
btw
for some reasons my gamerules just get forgetten lol
And did you tried debug to see if your listener works?
what do i debug
lol
Idk just put a sysout there
and if it prints the message in the console then it works
man im tired af
if it doesn't well it doesn't work
i aint doin it now 😭
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?
[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 :/
you need to call .register()
i did andstill nothing
show your code
new PlaceholderAPIHook(this).register();
getLogger().info("Placeholder API and Hooks enabled too.");
}```
^^ i hope i registered it correct
hi, i need help, with the plugin EzRanksPro
have you set PlaceholderAPI as a soft depend?
i did yeah but ive gotten it to work now
tried it and it sucks
You paid for it?
no just the free trial
claude sonnet 3.7 is free
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
Oh my friend said it was good
but he doesn't code mc plugins, he's full time web dev I believe
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
or just use your brain
50% of programmers are having an ai
Other 50% are having a brain
brAIn
blud uses LLMs more than his brain
That is becoming so common, this generation is so cooked
Speaking of cooked, the song "There's a McDonald's in the Pentagon" is stuck in my head...
Me too 😭😭😭
I agree I'm one of those people who use / learn with AI.
It takes too much time to fix an AI code, sometimes I can spend hours just to add a simple system like a bounty system( But I really try to learn by analyzing code, seeking help, etc ... )
now imagine if you actually wrote the code and understood it yourself lmao
I can understand, writing it entirely without relying on myself ? no I hesitate on everything and I'm not sure x) So I always need to verify my code
why not verify the code my running it and testing it
Ofc I do, but sometimes I need other people to test it, and I won't call them 24 in a day
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 ?
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.
ok and how to I know If my plugins need place to store data sorry I'm a total beginner
man are you trolling?
if you mean the plugins you find online, they will usually say somewhere on their page that they need a database server
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
ah ok every plugin I used seems to work without it thank you
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
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.
SunLicense
LicenseGate
Anyone here with an active Spigot plugin development team looking for new members by the way? I'm looking to join one
Guys
?
Guys
yeah
?
no
Im working on a custom particle dome effect but its not working the way I want it to can someone help me?
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.
byte[] -> String conversion depends on a charset, it normally doesn't make sense to transform arbitrary bytes into strings
But if there is no charset I assumed it would be the same in both conversions
there is no situation where there is no charset
I meant not supplying one
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
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?
I didn't really understand what you're trying to achieve
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.
how to make abilities for mobs using MythicMobs ?
then just append bytes to the file
you don't need to read anything of it
I want to read them as well
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
do whatever you want
just don't epxect arbitrary charsets to allow your arbitrary input
its just bytes
not sure what still isn't clear
eof is also just a specific byte
open file -> read whatever you need to read -> adjust -> save -> done
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.
Not helpful
🤦
the last byte is the last byte
unless you are talking about something specific like .docx
in which case thats just a package of files with metadata
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
man what is the xy
here
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
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.
okay so you want to distinguish between original bytes of an image
and whatever that was added after
Lets start with that yes.
then you just
check whatever file extension you are editing
they all have a protocol
for example
I guess I don't even want to know why
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
(almost) any file
Guess Ill try that route
Fuck! Someone gave me a working method.
File -> byte[] -> char[] -> string -> char[] -> byte[] -> File
I know what I'm trying to do works now so IDGAF
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.
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
wouldnt you wanna do /ajl add %yourplaceholderidentifier_money%?
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
How can I cache it ?
You can load in the player's money on join into a HashMap<UUID, Double>, for example
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
And I update this hashmap everytime the player do something with the money ?
And when they log out it logs in the sql
The map is only for caching you still have to send the data to the mysql (when server stops, player leaves etc...)
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 ?
I mean yeah you still have to be careful
save data to database in some background task once every some time
Can u send me a code or a link where I can learn how to do background stuff or stuff that doesn't impact that much on the performance I'm pretty new to this stuff
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
So like update everytime both and on the placeholder read only the hashmap?
Yes
Okay I think I will do like that ty
hey
HEY
omg hiiiiii :3
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
}
}
}```
wassup
read this
k
bro starts coding without reading
like a pro
does RTFM apply here
does M stand for "Manual" or "[Brister Mitten's lovely helpful] Message"?
message obviouslee
yippee
Hi, please tell me how I can spawn mobs in a zone.
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)
Use mineskin.org
You can upload image files to it and it’ll automatically give you skin value and texture in base64
but isn't it for skin
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
You cannot convert an 'image' to base64, since base64 is a text encoder
Yeah? I mean you're setting the skull's texture to the one from the texture URL that is within the base64 encoded string
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
I might be wrong on this as I found websites that do convert (decode) images into base64
you can
yeah I figured
you cannot put an arbitrary image in the player head without uploading it to mojang servers; the base64 is just some encoded json with a URL to the actual image, but that URL has to be that of mojang's servers
mineskin simply makes the process of uploading an image and getting a url back much, much easier
The base64 string for skulls is just an encoded json that contains the textures.minecraft.net URL
yeah thanks emily
No problem
In case it wasn’t clear, the base64 string is an url to mojang servers, it can’t be an arbitrary image
ok i still do not 100% understand what should i do
- 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?)
- i upload it to mineskin
- 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
?
sounds about right
idk the exact sizes of skin textures, although it's outlined in the minecraft.wiki
I didn't read entirely, sorry 🥲
yeah, to be frank, it's just a base64 encoded text, which is an url to mojang servers
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.
but can I use it to encode an image into a skull?
a simple answer is no. base64 is a mathematical encoding, not a visual transformation. it simply converts binary data into a specific text format.
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!
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
no
aww
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?
What's the best way to make endery crystal explote? without a player damaging it?
doesn't setHealth(0) work?
thats for LivingEntity i guess
yes, its for living entity, ender crystal isnt
ideas? (Ping me)

Isn't there an explode method?
If not just send a damage event.
ProjectileHitEvent?
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();
}
}
why two
Exactly
what
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
Still using new Example()
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?
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();
are you just asking how to create a singleton?
...
I don’t really understand what you’re asking for neither yapps 😅
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?
Ah I see what you mean
I assume you mean when the class is loaded and the init block runs? or do u mean specifically when the clinit block runs?
I mean is there anyway to not have to create a new object of the already initalized class?
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
Well in ur case, lets say u leave Example to be the empty program
then Example wont create a new instance
Alternatively making everything static will allow you to avoid the new instance thing but I would not recommend doing so
Example::main does nothing but merely just exists inside Example
Exactly
ye same
Like for example IDK why in the static method you can't use "this" since the static method needs the class to run.
this refers to the object instance
it doesnt tho?
Which there isn't one
Oh yeap scratch that then ^^^
Still a variable of the running instance would be nice
You mean running class?
as in when clinit runs ^^?
Yes
what
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?
First no.
wtf am I reading here
if you never use new Example() then there will never be an instance of Example
^^
Not one thats a variable. But the java environment has to create the instance to run the main method.
no it doesnt?
Static methods belong to a class not an object instance
i mean sure if u use the new jep stuff w a non-static main method
Isn't that just syntax sugar or did I miss smth
the syntax sugar is that you don't need the surrounding class, but modifiers are as if the method is in a class
if you want to create an instance, you need to create an instance, yes
yup, thats Java for you'
Add packet listener and add the events
What's changed since 1.21.3?
Last time I saw and used protocol lib api
It was working

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
manually calling an event will not cause the server to run code, it's the other way around, the code in the server causes the event to be fired
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
https://jd.papermc.io/paper/1.21.4/org/bukkit/World.html#createExplosion(org.bukkit.Location,float,boolean,boolean,org.bukkit.entity.Entity) with the end crystal as causing entity, no fire, radius of 6
@shell moon
also lol
wassup people: https://paste.helpch.at/tejoxixaha.java
can someone explain why regexDomain never works. but in plain java when I test it. It works just fine?
what is plain Java
And what does “never works” means
like just java nothing else no api etcc
like it never gets the regex match
but it does find matches with this REGEXIP
what is the message contents
so you're saying the regex behaves different because specific libraries are on the classpath? I highly doubt that lol
just print out message and see what it is
guarantee it's different in some way
to what you're testing with
well theres no dots lol
when I type the message in minecraft there are dots 🙂
I think thats essentials
well then that's the problem
well essentials is the most used plugin soo I need to figure out how to disable what essentialschat is doing
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
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
oh yeah true
I mean it still works
now it works. thanks peeps
no problemo
Yeah, someone suggested me that, sadly it's only for 1.14.4 apparently, so i'll have to make a check if i want to support old versions too, thanks appreciate it
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
agree

(ik, its old code)
wonder why there is not .explode() method there
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?
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.
maybe its just an ex maple
bro's fleeing Canada or something 😭
@silk olive and @wraith heron this is not the channel for those questions. Try #general-plugins or #1007620980627230730
okay
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
nms
Inventory is more than just a custom one (via createInventory), and not all inventories have a title
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.
Wouldn't it be easier to just use String type and convert afterwards?
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
confused, is your question if a custom PDT is possible?
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
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.
Paper has a has(NamespacedKey) method, regardless of the real type (could be a byte array for all you know)
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)
hey quick reply, i didn't understand your question tbh
can you rephrase your question?
you are asking if you can make the spawn point in another dimension instead of the default overworld spawnpoint?
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
/spawnpoint, /setworldspawn
sorry for the horrible phrasing my friend is helping me with this but thanks for helping
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?
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.
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)
IntelliJ are u on drugs 
repair ide 😌
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.
The thing is, all minecraft maps no matter their scale have a resolution of 256x256 pixels, and from what i could tell, they only use map pixels to render items, progress bars and check marks but blocks and text are probably rendered through some kind of clever trick... but i cant think of what exactly this trick is, probably they replace textures of some kind of UI element...
Oh it’s 256x256? I thought it was 128x128. I could use higher pixels then.
That might improves it
Do you know what’s the clever trick by any chance?
ehats the source image from?
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
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
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..
https://paste.helpch.at/ucumanutuf.java I found this by Omer but it doesn't seem to work or smth
There seems to be some invalid syntax in your config! You can paste it into https://yaml.helpch.at/ in order to find out where your issue is!
Why do you need it to not be generated again if you only need to retain comments that you make?
or do you mean manually
https://github.com/AuthMe/ConfigMe for example does support comments though
I mean, when I add new options etcc. bukkit doesnt put them in automatically
ah
yeah I think this should
(rip mf-config)
np 🙃
Oh!!!
A revival!
It's not the same and not ConfigMe based though
polaris on top
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
bayzed
you could try sponge's configurate
ever so slightly wank but it can work https://github.com/SpongePowered/Configurate
A simple configuration library for Java applications providing a node structure, a variety of formats, and tools for transformation - SpongePowered/Configurate
have yet to figure out optional config options though where it won't automatically add every option to ever exist to the file
I don't think it supports comments tho
it has api for comments, not sure if all of its services provide implementation for it
https://paste.helpch.at/fuhifijovu.css keep running into same problem over and over. even tho the dependency is loaded etcc.
https://paste.helpch.at/kucipezamo.java: JavaPlugin class
Do you have the shadow plugin (gradlew)/shade plugin (maven) setup correctly?
And are you building with mvn clean package?
well mvn package & mvn install
The package task creates 2 jars, make sure you are getting the biggest one
still same problem.
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
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 ...
why do you need to preserve comments
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 ?
So the file doesnt look like garbage
BukkitSchedule?
Could you make me a example code for this
Ask chatgpt prob makes it better than me
meh
I typically just create a config_default.yml that is overridden everytime the server starts
and is always up to date
Doesn’t that always override the changes the user makes?
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.
I bet you could just use snake yaml directly and retain comments
I already did
So then no issue?
Yes it doesnt support lists like http:// balala
I mean comments are hard since by specification they can pop up pretty much anywhere
(^ yaml)
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
oh woaw, interesting oddity
huh?
Yea I dont know every time I loaded the plugin everything was fine on restart on the other hand. All the files glitched out
@icy sonnet https://github.com/decorators-squad/eo-yaml
Ill look into it thanks
I mean even eo yaml has somewhat of limited support for comments, but yea maybe it fixes these weird issues for cozy
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)
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
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!
if i put -Xms$(({{SERVER_MEMORY}}*85/100))M -Xmx$(({{SERVER_MEMORY}}*85/100))M with all Aikars flags, what exactly would that do?
Does anyone know what the name of the minecart with chest is for deluxe menus matrial
allocate 85% of your server's memory to the mc server
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();```
Maybe try adding neon_
still doesn't seem to work
Debug it. Check if its running.
Your method
Right sec
Also don't need to do .toLowerCase() when you are ignoring case
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
I haven't really used PAPI so I can't help further on that side.
Alright thanks anyway
ah oaky thanks, im currently looking to optimize our server as best as possible with jvm args
show your entire placeholder expansion class
CHEST_MINECART
Well it seems that the issue was that I used the same identifier for all placeholders when that's not allowed I guess
can you show the whole class?
I have fixed it now, the issue was that I used the same identifier for every placeholder which isn't supported I guess.
ah
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);
that should be correct
