#development

1 messages · Page 95 of 1

sterile hinge
#

by specification of the interface, yes

neon pewter
#

should i do

private record AtlasKey(String canonicalPath, GlyphRange glyphRange) {}
private final ConcurrentHashMap<AtlasKey, TextureHandle> fontAtlasHandles;

or

private final Map<String, Map<GlyphRange, TextureHandle>> fontAtlasHandles;

-# typo so i edited

torn heart
#

why is one concurrent and the other not

#

barring the concurrency diff, these don't even have the same usecase anyway 😭

#

they're not identical

sterile hinge
#

in that case (A x B) -> C is equivalent to (A -> B) -> C A -> (B -> C)

#

wait that's the wrong way round

#

brain not working

#

now I think

neon pewter
#

unless u mean that the inner map need to be explictly concurrent

minor summit
sterile hinge
pliant pendant
#

Hello guys. Im currently developing a plugin and want to use a menu from Deluxe Menu. Can you help me and maybe tell me what the most elegant way is?

brisk forum
#

could someone help me with my plugin its not realy working (in InteliJ) bukkit is in red and almost everything else too

im in #164280495964815360

brisk forum
#

I fixed Some parts but now minecraft automaticly deactivate it

river solstice
solar wagon
#

Hey there, friends. I had a sort of... Ambitious idea, and I wasn't really sure where to start on the development side of things. So I thought I'd ask for some suggestions; I'm trying to create a Minecraft Roleplay Server, kind of 'Civilization' style with different nations to side with, quests to do, and jobs to take up. It would play a bit like an MMO, but I want a focus on people being in-character, Roleplaying, and giving them reasons to work together. (Such as goblins roaming in groups, and being hard to solo. Maybe more dark-souls style combat where there's a lot of punishment, so traveling solo is hard). I'd have custom monsters, a big expansive world (but only certain areas would have harvestable nodes that respawn over time), and I wanted players to be able to talk to the NPC's using a chatbox or something similar, and while it can't do anything other than talk, I think it would be neat for it to be AI based chat with the NPC's (They'd be able to read from world lore and create their own history in the world to interact with players or to maybe come up with quests). Honestly, I don't know what plugins I'd need, where I'd begin on setting things up, or how to start. Any help in pointing me the right way is appreciated. :) DM's open!

tight junco
reef swan
#

Hey Guys can someone help me with my discord server and my minecraft server

stiff flax
unkempt kiln
#

Can someone explain how I can create a circle radius of 10 around a player's location?

sterile hinge
#

wdym "create"?

unkempt kiln
sterile hinge
#

so you want to place blocks in the world around the player?

dusky harness
#

sin/cos :))

minor summit
#

basic trig

#

a plugin developer's archnemesis

torn heart
#

if you're creating a radius of blocks then you need to use something like this

#

if you don't want to bother trying to understand it just scroll down to "algorithm" (though the explanation is really quite reasonable and only requires basic algebra knowledge to follow, you should have no problem implementing it)

#

usually with circles you'd use trigonometry but it's not as simple here since you want the circle to be continuous

#

and it's not possible to guarantee that by just iterating degrees

#

this reminds me of voxel raycasting

#

I remember seeing in spigot forums people doing raycasts for blocks or entities via iterating by a small step and checking if anything is in it

#

which is not only horrible for performance but it's also provably inaccurate 😭

humble tendon
#

Is there any1 here who knows how to fix ghost blocks on bridging server?

icy vigil
#

define ghost blocks

humble tendon
#

Bassically there is a mode when u bridge from start to end, and ppl are crazy with it so sometimes if they fall in the void server teleports them back to start and some blocks stay in their place

#

When u walk on them server think u are flying

proud pebble
#

this isnt the channel to ask that

humble tendon
humble tendon
#

Csn some1 help

sudden sand
#

Simple question, on latest version using paper api, do I absolutely have to switch over Kyori Adventure API's Sound system to play sound?

lime ravine
#

is it possible to remove a open-command, so i can just link them when i want to?

dense drift
unreal wigeon
#

Makes sense, cus there's no way someone older making mods for free when you got job or work to do lol

torn heart
#

$50k+ yearly

#

but obviously most people aren't doing that

manic crane
#

Hello, is there a way I can get placeholderAPI to work with folia? I tried to use it but its marked as not supporting folia, I am working on my own plugins and need a placeholder for other plugin support

proud pebble
#

have fun patching papi with ur own code to make it support folia

dusty frost
#

i think there's a fork on GitHub that uses one of many "universal scheduler" libraries that you can try

#

oh, it looks like it was merged July 1st actually! There just hasn't been an actual release since then

unkempt kiln
#

Hey guys, do I need to add a craftbukkit dependency when using NMS packets?

dusky harness
unkempt kiln
dusky harness
#

like your current dependency

unkempt kiln
# dusky harness like your current dependency

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

dusky harness
#

have you tried to see if that works?

#

the second one might not even be needed

#

but I haven't used this approach in forever so 🤷

unkempt kiln
#

Im gonna try without the second

unkempt kiln
#

@EventHandler
public void onSneak(PlayerToggleSneakEvent e) {
((CraftPlayer) e.getPlayer()).getHandle().connection.send(new ClientboundAnimatePacket(((CraftPlayer) e.getPlayer()).getHandle(), 0));
}

dusky harness
neat pierBOT
dusky harness
#

is there anything below that?

unkempt kiln
#

Yes

#

here

#

Sorry it made me use this but its probably more helpful anyways lol

dusky harness
#

or

unkempt kiln
bitter basin
dusty frost
#

can you not just serialize to base64?

#

especially if you're Paper-only, iirc they have some really nice ItemStack serialization stuff built in

graceful hedge
# bitter basin https://github.com/SpongePowered/Configurate does anyone use this and have some...

You might be able to abstract configurate under a custom DynOps impl (just make sure its lossless), after you've implemented that its then a simple task to convert between
(File Data) <-> YourDynOps <-> NbtOps (possibly skippable) <-> ItemStack CODEC

but if you dont wna do that paper does this for u (including invoking data upper fixing) with ItemStack#serializeToBytes ItemStack#deserializeBytes (ItemStack <-> byte[]) or ItemStack#serializeStack ItemStack#deserializeStack (ItemStack <-> Map)

bitter basin
#

I was looking to load items from a config is the thing, trying to use the same format as bukkits config system is

#

So players can define their items and stuff and i just load ItemStack with configuratate on a custom serializer but when i try it, it seems to not like itemmeta

#

smth like this

#
      2:
        ==: org.bukkit.inventory.ItemStack
        v: 2230
        type: ENCHANTED_BOOK
        meta:
          ==: ItemMeta
          meta-type: ENCHANTED
          stored-enchants:
            PROTECTION_ENVIRONMENTAL: 1
minor summit
#

that format is lossy and in some aspects broken

#

paper now serialises that to snbt instead to make sure it's lossless

bitter basin
#

how would you have a user config items and load them then?

#

the other option im thinking is the string format

#

minecraft:diamond_sword{Enchantments:[{id:"minecraft:sharpness", lvl:3}]}

minor summit
#

what server version are you on ?

bitter basin
#

1.20.4

#

currently

#

Bukkit.getItemFactory().createItemStack(node.getString());

#

was thinking i just do this then

#

with that format above

minor summit
#

right sure that's the old format, as long as you don't plan on updating because then you can't automatically migrate the configs lol

bitter basin
#

will be going to latest end of next month probably

#

whats the new format?

minor summit
#

well, the format used in the command is different, it follows the data components format, see the examples in the wiki https://minecraft.wiki/w/Commands/give#Examples https://minecraft.wiki/w/Argument_types#item_stack
but paper's ConfigSerializable will safely serialise to snbt (which is different from the command format) to prevent the stupid old lossy/broken conversion, but as long as you use the ConfigSerial it should be fine once you upgrade, just make sure to recursively serialise the whole thing

bitter basin
#

i dont plan on serialzing rn, just deserializing

#

think ill definetly need a better solution otherwise

#

how can this shit be so aids

#

damn

bitter basin
minor summit
#

just take an itemstack and run /paper dumpitem, at least i think that command existed in that version

#

you'll see

#

but in that case i'd go down the route conclube mentioned with using internals

#

but, y'know, stuff has changed since then

minor summit
#

rather than having to write a whole load of itemstack crap in the config

#

then you can modify the written stack

bitter basin
#

i have tried to Itemstack#serialize but it dies when configurate tries to put it into the yaml

#

man this shit is so aids

minor summit
#

are you recursively serializing it tho?

#

as in, some values might be instances of ConfigurationSerializable which need to be serialized

bitter basin
#

does it not just do it itself?

minor summit
#

configurate or ConfigSerializable?

bitter basin
#

i guess configserializble? im just doing ItemStack.serialize()

minor summit
bitter basin
#

bruh all i wanna do is load some items into a fucking chest 😭

#

fuck

minor summit
#

i mean i don't know anything about configurate but if it's anything like gson, you could just register a hierarchical type adapter for ConfigSerializable and it will just handle it when it encounters it

bitter basin
#
public class ItemStackSerializer implements TypeSerializer<ItemStack> {

    @Override
    public ItemStack deserialize(@NotNull Type type, ConfigurationNode node) {
        Object raw = node.raw();
        if (!(raw instanceof Map)) {
            return null;
        }
        @SuppressWarnings("unchecked")
        Map<String, Object> data = (Map<String, Object>) raw;
        return ItemStack.deserialize(data);
    }


    @Override
    public void serialize(@NotNull Type type, ItemStack obj, @NotNull ConfigurationNode node) throws SerializationException {
        if (obj == null) {
            node.set(null);
            return;
        }
        node.set(obj.serialize());
    }
}

this is all i wanted to do

minor summit
#

well sure, but then it does not know how to serialize the ItemMeta

#

just register an adapter for ConfigSerializable instead

#

of specifically ItemStack

bitter basin
#

ok i need to see how to do that then

flat phoenix
shut flax
#

Hey everyone, does PlaceholderExpansion’s onRequest method always run on the main thread?

torn heart
torpid raft
#

death

finite geode
torn heart
rough jolt
#

Hey there, I’m looking for a long-term language buddy to chat, learn, and laugh with. I like keeping things light but consistent, so we can really grow together. If you’re up for fun convos and steady progress, let’s connect. No pressure, just good vibes and learning.

icy shadow
#

i love good vibes and learning

torpid raft
#

sorry i only opt for bad vibes

icy shadow
#

bastard!!!

torpid raft
#

😱

abstract gate
#

What is the easiest way to load offline player data? Like checking a player's coordinates.

dusky harness
abstract gate
dusky harness
#

oh whoops I misread the question

#

although I mean why not store it yourself?
it probably won't take that much storage anyways

#

I don't know how to actually read the raw offlineplayer data though

abstract gate
#

I want health, hunger, armor, location

#

oh and statistics

dusky harness
#

seems like you can get statistics already from OfflinePlayer

#

maybe you can try looking at the server code to see how the minecraft server loads the player data

trail burrow
#

I'm having trouble with using the right data for storing data about breaking blocks getType seems to use plural version of block type ?

trail burrow
#

Material.matchMaterial does not match Block blockBroken = event.getBlock(); WHY?

dusky harness
#

for example, I'm pretty sure that CHORUS_PLANT is the "block" version of CHORUS_FRUIT

#

so you have to watch out for those differences

#

assuming that's what you mean

trail burrow
#

this is not seeing real block name for CARROT, POTATO and BEETROOT


        final String worldName = blockBroken.getWorld().getName();

        List<String> crops7 = new ArrayList<>(Arrays.asList("CARROTS", "WHEAT", "POTATOES"));
        List<String> crops3 = new ArrayList<>(Arrays.asList("BEETROOTS", "NETHER_WART"));

        if (crops7.contains(blockBroken.getType().toString())){
            Ageable ageable = (Ageable) blockBroken.getBlockData();
            if (ageable.getAge() == 7) {

                PlayerStatSpecification specification = new BlocksBrokenSpecification(player.getUniqueId(), 1,
                        worldName, blockBroken.getType());

                // Update value to new ageable7 stat.
                plugin.getDataManager().setPlayerInfo(player.getUniqueId(), stat, specification.constructQuery());
            }
        }else if (crops3.contains(blockBroken.getType().toString())){
            Ageable ageable = (Ageable) blockBroken.getBlockData();
            if (ageable.getAge() == 3) {
                PlayerStatSpecification specification = new BlocksBrokenSpecification(player.getUniqueId(), 1,
                        worldName, blockBroken.getType());

                // Update value to new ageable3 stat.
                plugin.getDataManager().setPlayerInfo(player.getUniqueId(), stat, specification.constructQuery());
            }
        }else{
            PlayerStatSpecification specification = new BlocksBrokenSpecification(player.getUniqueId(), 1,
                worldName, blockBroken.getType());

            // Update value to new stat.
            plugin.getDataManager().setPlayerInfo(player.getUniqueId(), stat, specification.constructQuery());
        }
    }```
dusky harness
#

and that's a minecraft-internal design, not really spigot's choice to have them separate

trail burrow
#

in my Plugin I use Material match and it don't like CARROTS so you can get the data from the other plugin

minor summit
#

carrots is the block type, carrot is the item type, the fact that Material mixes both block and item type into a same class has always been an issue

#

so getting the material from the block will yield the block type name, which is carrots, and that works perfectly fine with matchMaterial

trail burrow
#

@minor summit maybe, but ,my plugin is built on 1.6.5 so the pural of crops it rejects

dense drift
#

1.6.5 ???

#

As in ... 2011 1.6.5?

trail burrow
#

no missed a number 1.16.5

minor summit
# trail burrow <@657593747231735808> maybe, but ,my plugin is built on 1.6.5 so the pural of cr...

idk, it works fine for me

class TestPlugin extends JavaPlugin {
  @Override
  public void onEnable() {
    getSLF4JLogger().info("Material.matchMaterial(\"CARROTS\") = {}", Material.matchMaterial("CARROTS"));
  }
}
[10:08:21 INFO]: [test-plugin] Material.matchMaterial("CARROTS") = CARROTS
[10:08:29 INFO]: This server is running Paper version git-Paper-794 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
#

like that's just how things work, carrots is the block and carrot is the item, there is a Material for the carrots block, Material.CARROTS, and for the carrot item, Material.CARROT, same for potatoes/potato or dkim's example with chorus_plant and chorus_fruit and many other materials

#

and Material.matchMaterial works perfectly fine with all of them

#

it's literally just a string match against the material names

#

nothing fancy

torpid raft
#

no

sterile hinge
#

Unfortunately, a month ago, my Upwork accounts ( of any country)had been suspended for some reason

#

I really wonder why omegalul

trail burrow
#

@minor summit I didn't code that section of the plug-in when I get home maybe somebody could help me figure out what's wrong cuz what I see what you posted it should work but it doesn't for me

minor summit
#

sure

lapis fulcrum
#

give me plugin ideas people

#

i have no idea on what to make

icy vigil
lapis fulcrum
#

thatd be unbelieveably hard

icy vigil
#

no point of making "hello world" plugins

lapis fulcrum
#

something simpler dawg

#

emotes are absurdly hard to do

#

thats like

#

yeras of mc plugin dev experience needed

#

ts shit aint mods

icy vigil
#

hardest part of emotes plugin is making the actual emotes with blockbench

lapis fulcrum
#

i suck at that lmao

icy vigil
#

me too

lapis fulcrum
#

i suck anything related to blockbench

trail burrow
dusky harness
#

so you cannot use it in an ItemStack

trail burrow
#

yes I caught that after I posted it

#

, just not sure why it's check if it is a item not a block

dusky harness
#

I think an item, by definition, is something that can show up in the inventory

#

so by allowing non-items in ItemStacks, it can cause further issues and confusion down the line

trail burrow
#

this is the code using itemstack when it is really checking blocks ``` public boolean initRequirement(String[] options) {
String materialName = null;
int amount = 1;
String displayName = null;
boolean useDisplayName = false;
if (options.length == 1) {
amount = Integer.parseInt(options[0].trim());
}

    if (options.length > 1) {
        materialName = options[0].trim().toUpperCase().replace(" ", "_");
        amount = Integer.parseInt(options[1].trim());
    }

    if (options.length > 2) {
        displayName = options[2];
    }

    if (options.length > 3) {
        useDisplayName = options[3].equalsIgnoreCase("true");
    }

    ItemStack itemStack = null;
    if (materialName != null ) {
        Material matchedMaterial = Material.matchMaterial(materialName);
        if (matchedMaterial == null) {
            this.registerWarningMessage("Material '" + materialName + "' is not a valid material.");
            return false;
        }

        itemStack = new ItemStack(matchedMaterial, amount);
    }

    this.wrapper = new BlocksBrokenWrapper(itemStack, displayName, false, useDisplayName);
    this.wrapper.setBlocksBroken(amount);
    if (amount < 0) {
        this.registerWarningMessage("Amount is not provided or smaller than 0.");
        return false;
    } else if (this.wrapper == null) {
        this.registerWarningMessage("No valid block provided.");
        return false;
    } else {
        return true;
    }
}
trail burrow
#

I added a band aid just before it checked the data to fix it if (block == CARROT) block = CARROTS; if (block == POTATO) block = POTATOES; if (block == BEETROOT) block = BEETROOTS;

torn heart
river solstice
#

buddy noone wants to do that for free

static jewel
#

so Im trying to use the PlaceholderAPI dev api, and its not working. none of the classes get imported from gradle or anything

#
repositories {
    maven {
        name = "placeholderapi"
        url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi")
    }
    maven {
        url = uri("https://repo.extendedclip.com/releases/")
    }
}
dependencies {
    compileOnly("me.clip:placeholderapi:2.11.6")
}
```https://wiki.placeholderapi.com/developers/using-placeholderapi/#gradle

I don't know what is wrong
worn jasper
#

when reloading gradle

static jewel
static jewel
#

nope

#

wtf I just reloaded it and it worked

#

i swear that did not happen earlier

#

thank you

night coral
#

im using ProtocolLib and trying to disconnect the player, I figured out how to disconnect the player but ProtocolLib still processes the packets, How should I properly disconnect and cllose the connection?

scenic vapor
night coral
#

yea i am sending the kick packet through protocollib

#

how do i close the connection

pulsar ferry
#

Why though? Why don't you just kick with the api?

torn heart
#

this feels like it would be extremely likely to cause problems with other plugins

#

since you're basically "silently" removing the player

#

which surely is not good practice

night coral
#

because i want it to be packet based

#

to force-disconnect

river solstice
#

not everything needs to be packed based

night coral
#

fine

river solstice
#

I suppose it depends what plugins you are using, but some of them could listen to PlayerQuitEvent or whatever, and if removing them by packet doesnt trigger it, it could lead to potential issues

#

and honestly I don't see the gain of doing it via packets

pulsar ferry
#

There is no gain only problems

night coral
#

im developing a anticrash

river solstice
#

anticrash?

night coral
#

server anticrasher

#

so people can't. Crash it using exploits

river solstice
#

do you need to develop it?

night coral
#

no, its just for fun lol

pulsar ferry
#

Best anti-crash is probably to update your server :')

river solstice
#

iirc you need to close the connection at Netty level, something like (if you're using NMS)
((CraftPlayer) player).getHandle().connection.disconnect("Some reason");

night coral
#

I'm not using NMS

river solstice
#

yeah I'm not sure if you can do that without NMS

pulsar ferry
#

you can if you just kick them through the api

river solstice
#

yeah I was about to say

#

that otherwise you still need to kick them via the api

ocean raptor
#

how are you developing an anticrash without nms or netty

night coral
#

um

#

im getting a eror

pulsar ferry
#

Put the kick code inside a runTask

night coral
#

how

#

nvm

#

I needa check if a player is online (ProtocolLib packet handling after kick)

#

so i dont process extra packets

#

nvm

#

there is a isOnline function 💀

worn jasper
#

@fiery osprey what is your reason for doing everything packet based besides "I am making an anti crasher"

#

(which btw is irrelevant, just cause it's an anti crasher does not mean it all needs to be packet based, you should still not be doing these things via packets as previously said, it would break a ton of other plugins relying on it)

humble tendon
#

how to make 1.8 plugin in intellj

river solstice
#

what

torpid raft
humble tendon
#

sob

#

thanks for help

torpid raft
#

anytime

humble tendon
#

no like fr

#

how to do that

#

i need to make plugin kinda fast

torpid raft
#

i think you have to set the spigot api version to 1.8 in your build.gradle

#

iirc

#

or are you asking for like a full on tutorial on how to make a plugin

river solstice
mint comet
#

Hello, May I ask how I can apply for an ecloud account?

robust crow
robust crow
mint comet
robust crow
#

Ah I see, best thing to do would be to pr the orginal plugin adding the expansion into the source. This way there's no expansion to download and the versions will always be aligned

mint comet
trail burrow
#

I'm not sure why this returns null for rsp

        if (rsp == null) {
            return false;
        }```
sterile hinge
#

Maybe because the service isn’t registered at that point in time

dusky harness
#

(Vault doesn't count)

mint comet
dense drift
#

And add dependsOn vault

trail burrow
#

Thanks guys it was the simple thing of course, I must of deleted essentialsX and didn't realize I didn't put it back

dusky harness
#

-# must have*

dry frigate
#

I'm making a plugin that will have a custom value type. Different sets of armor and swards give you different value type that changes the damage players deal and receive based on those values. My question is should I update the value I could do it when the player changes the item they are holding or changes their armor pace. Alternatively I could add up the values for the player and mob when damage is dealt and I'm adding the costum damage values. I don't care about how easy it would be to implement I just need it to be very efficient as it will happen a lot.

dry frigate
#

(Im using maven and it's a Bucket plugin)

torn heart
#

bucket

torn heart
dry frigate
torn heart
fathom raptor
clear pelican
#

How to check ExutableItem in your inventory to exchange a custom item for something else

dry frigate
torn heart
#

there's no event that tells you if a player's armor was changed

#

since another plugin might change the data of the item stack, which would not call an event

#

I answered your question earlier

dry frigate
fathom raptor
languid mantle
#

someone know the name of class in cobblemon when can find capture method

torn heart
#

I also already described what bug it could have

lyric gyro
#

looking for developers to help code in Maveen DM ME

fathom raptor
torn heart
#

right below the other message

fathom raptor
torn heart
#

but why would you do that

#

and it would obviously break if the item is modified and an event is not thrown

#

which can happen for a myriad of reasons

fathom raptor
#

Oh wait nvm im stupid 💀 i was thinking of something else when i responded to that guy

#

Yeah i can see the bug

river solstice
dry frigate
tight prairie
#

guys. I am making a plugin rn and I am currently using this code

    @EventHandler
    public void onInventoryDrag(InventoryDragEvent event) {
        String title = ChatColor.stripColor(event.getView().getTitle());
        String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
        if (!title.equalsIgnoreCase(menuTitle)) return;

        // Cancel any drag that touches the top inventory
        for (int slot : event.getInventorySlots()) {
            if (slot < event.getView().getTopInventory().getSize()) {
                event.setCancelled(true);
                return;
            }
        }
    }

    @EventHandler
    public void onInventoryMove(InventoryClickEvent event) {
        if (!(event.getWhoClicked() instanceof Player player)) return;

        String title = ChatColor.stripColor(event.getView().getTitle());
        String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
        if (!title.equalsIgnoreCase(menuTitle)) return;

        // Cancel all click types in top inventory
        if (event.getClickedInventory() == event.getView().getTopInventory()) {
            event.setCancelled(true);
        }
    }```

for canceling movement in the GUI
but its not working
I am able to take out items of the GUI
#
menu:
  title: "&8Your Backpack"
  size: 27 # Must be multiple of 9

  items:
    border:
      material: GRAY_STAINED_GLASS_PANE
      name: "&r"
      lore: []
      slots: [0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,25,26]

Config ^

#

@dawn viper

#

mind helpin rq

vital schooner
# tight prairie guys. I am making a plugin rn and I am currently using this code ```c @Eve...

you should consider using UUID's for your menus, matching them based off the title is not secure at all. add some debugs and see where its going wrong:

    @EventHandler
    public void onInventoryMove(InventoryClickEvent event) {
        if (!(event.getWhoClicked() instanceof Player player)) return;
        Bukkit.broadcastMessage("Debug: InventoryClickEvent triggered for player " + player.getName());
        
        String title = ChatColor.stripColor(event.getView().getTitle());
        String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
        if (!title.equalsIgnoreCase(menuTitle)) return;
        Bukkit.broadcastMessage("Debug: InventoryClickEvent title matched for player " + player.getName());

        if (event.getClickedInventory() != null && event.getClickedInventory() == event.getView().getTopInventory()) {
                Bukkit.broadcastMessage("Debug: InventoryClickEvent top inventory matched for player " + player.getName());
            event.setCancelled(true);
        }
    }```
vital schooner
#

but remember seeing a video on it

jagged belfry
# vital schooner pretty sure this was the exploit in that anticheat plugin too wasnt it hahah, ca...

it was Vulcan. They had an admin GUI that allows you to change plugin settings with it. And you could access it by renaming a chest with that title and placing it. And one of the settings you could change is add a command to run when a cheat is detected so people would make it op them and then use that cheat. It was so bad that they released the updated version for free to everyone so it also doesnt affect people using cracked versions of the plugin.

finite geode
#

You are supposed to use an InventoryHolder to check instead of the title.

icy shadow
#

officially you arent supposed to do that i think haha

pulsar ferry
#

Spigot says you shouldn't but don't provide any good reason as to why, Paper recommends it

icy shadow
#

oh i didnt know paper recommended it

icy shadow
#

lovely

#

oh yeah i think the problem was that getHolder() can unintentionally cause loads of data to be loaded/cloned

#

but paper fixed that with the false param i guess

river solstice
#

common spigot L

#

common paper W

atomic trail
#

PlaceholderAPI can parse multiple deep placeholders through one call right? For example if I first input %plugin_player_name% and that returns %otherplugin_name_color%Player Name, that would work right?

#

In this case plugin also uses PlaceholderAPI.setPlaceholders for the player_name placeholder

atomic trail
#

Aight ty

dense drift
#

No it doesn't.

#

You need to do repeating parse calls

worn jasper
dense drift
#

That's why expansions like parseutil exist

worn jasper
#

interesting, wonder why it worked last time

#

maybe it was something different

#

sorry for the misinformation in that case!

atomic trail
#

But yeah it doesn't check through layers automatically

dense drift
#

🙂 that is not the same as setPlaceholders doing it automatically

atomic trail
#

No, I kinda misunderstood what was going on when trying to workout the issue lol

#

is parseutil a plugin?

#

But it can be done automatically with just a simple loop no? Just checking if the returned string contains % and if the string was changed

dense drift
#

parseutil is an extension, or just util, I can't remember

#

And yeah, you could simply check the output, ig thats what the expansion does.

worn jasper
worn jasper
little heathBOT
#

@dense drift Unknown expansion.

worn jasper
#

And how would you track if the string was changed

little heathBOT
dense drift
#

-list

worn jasper
#

F

dense drift
#

I cant remember exactly the name, but @marble heart knows more for sure

marble heart
#

blink i m not aware of such expansion

atomic trail
minor summit
#

yes

dense drift
#

utils_parse @marble heart

marble heart
#

oh that? 😭

#

yeah

#

i do use utils a lot 💀

dense drift
#

Smh

high needle
#

Is there an API for skullcreator?

flat phoenix
#

@here

chilly olive
#

1.21.10 paper

When I join my server and when I leave, I always go to the same place after I leave. Is this problem only with me

sterile hinge
#

what does that mean

chilly olive
#

When I join in my server and go to break a stone or something, and after I leave the server, I am always teleported to the same coordinates

#

1.21.8 does not have this problem

muted pine
#

I'm currently attempting to recompile https://github.com/cijaaimee/Slime-World-Manager
they use nms code but the paper jars i downloaded don't have the nms classes. and SWM uses maven😭 so i cant use papers gradle plugin. does anyone have a workaround?

dusky harness
#

and it'll get the org.spigotmc:spigot dependencies from your local maven repo

torn heart
#

do what dkim said

keen lynx
#

Help me pls

Cannot resolve me.clip:placeholderapi:2.11.6```
dense drift
glacial schooner
river solstice
#

when is LootGenerateEvent being called?

I set a chest with (for ex).:
/setblock ~ ~1 ~ minecraft:chest{LootTable:"minecraft:chests/desert_pyramid"} replace

but when I open it it's not being called.

#

nor does it work for chests already in the world, so idk

atomic trail
orchid otter
#

loll

#

lowkey useless event

minor summit
#

not really? why would it be? lol

serene oyster
#

in spigot's api (or paper's) is there an event which listens to the formation obsidian thru lava and water?

pure crater
#

BlockFromToEvent?

river solstice
river solstice
# orchid otter lowkey useless event

not really useless. there are some things that we want to remove from loot tables, for ex. we have a custom enchantments plugin and some datapacks have loot-tables that can generate any enchant, including custom ones, we don't want that

#

and also we want to make some other items unobtainable

#

sure I could just go through all the datapacks and edit their lootables (or override vanilla ones), but this is, imo, faster

prime helm
#

BlockFromToEvent is for position change

vale crescent
#

Does anyone know how to add custom rgb gradient to luckperm ranks?
animated rgb
Ping me please

full prairie
vale crescent
#

It doesn't support 1.2.1.8 tho!

golden palm
#

is there a way in DM to make items that have a default stack size of 1 (cakes, for example) display stacking count?

#

I have an item thats a cake with amount 3 set, and it only displays as 1 cake in a menu

toxic crescent
#

u can't change this, but you can get illegal stacks in EssentialsX, i really don't know if you can use stacks of non-stackeable items in dm.

golden palm
#

correct, was just wondering if there was a way using the new item attributes, since one of them is to set an item stack size

minor summit
#

yeah i mean, you can change the max_stack_size data component and then change the item's amount, that will work fine on a cake item, but don't ask me how to do that on DM, lol

bitter basin
#

recommend me some 1.8 forks i can use

#

please

#

i see FlamePaper, PandaSpigot

#

they both seem to be updating still

worn jasper
bitter basin
#

its unfortunately not by choice 🙁

worn jasper
#

Also, wrong channel

worn jasper
bitter basin
#

which is best

worn jasper
carmine dirge
#

Hi everyone,
I’m extending the supported versions for my plugin which currently supports 1.17-1.21.1 into 1.21.2+.I'm using packetevents to detect the movement keypresses to move the cart vehicle and I’ve run into a movement issue on 1.21.2+ (works fine on older versions).

Problem:
When the player presses and holds W, the minecart moves only once (one tick).
It does not continue moving while the key is held.
Releasing and pressing again triggers another single move.
Older versions (<1.21.2) using STEER_VEHICLE work perfectly with hold-to-move.

What I Know:

  • In 1.21.2+, STEER_VEHICLE is replaced by PLAYER_INPUT.
  • PLAYER_INPUT is only sent when input changes, not every tick.

Question:

  1. How do I make hold-to-move work on 1.21.2+ with PLAYER_INPUT?
  2. Do I need to assume input persists until a packet says otherwise? Or is there a better way to detect continuous key hold?
  3. Any help or working examples would be greatly appreciated!
    PacketEvents Version: 2.10.0
    Spigot Version: 1.21.4-R0.1-SNAPSHOT
    Full listener code: https://pastebin.com/PVgr2B1K
    Thanks in advance
merry knoll
#

especially with movements on half blocks etc

carmine dirge
#

Hey! Thank you so much — your advice was spot-on and fixed it perfectly!
PLAYER_INPUT is sent every tick, even when movement inputs don’t change. I was overthinking it with stale cleanup and persistence logic.

haughty timber
#

is there way to stack 2 same item with different itemmetas using packetevents

atomic trail
#

Does anyone know what the replacement for SimpleBuilder using TriumphGui is in recent versions? The basic builder for GUIs. It seems like all types now are specific and not sure how BaseGuiBuilder should be implemented

atomic trail
#

using 3.1.13

#

I used 3.1.10 before, which included a class called SimpleBuilder for guis

#

Ah looks like it was renamed to ChestGuiBuilder

pulsar ferry
atomic trail
fair rain
#

How can I load texture gui heads really fast in a GUI? I have 1,000 player usernames and I need to display all of their heads in a GUI but I get rate limited

torn heart
#

fetching skin data? probably start with caching

#

i'd imagine that's good enough

river solstice
#

yeah not many other options

sweet cosmos
#

Any idea how I can use a command registered in DeluxeMenus to open a different menu depending on the world the player is in?

orchid otter
#

dont think u can do that with DM alone, ud probably want to get or make a plugin that runs a different cmd for the player based on criteria, when they do the plugins cmd

chilly olive
#

If there is a mineshaft in my server, with which plugin can I put levels on the different mines?

#

For example, when players reach this level, they should have access to this mine

stiff quiver
#

hi guys, im getting some errors when putting vault like a dependence of my plugin, it says that the repository doesnt exist but im putting exactly the same in vault's github

#

and idk whats happening because i try with like 10 different repositories

stiff quiver
#

oh wait nvm i solved it

minor summit
#

good job

rigid harbor
#

So, I finally built plugin, but it's up to date? idk what to do, who can help?

icy shadow
#

That doesn’t seem like a problem to me

atomic trail
#

Question regarding JIT for Java: So I didn't actually know this was a thing that optimizes your code at runtime before now. If I understand correctly, it basically caches loops etc in overhead and then reuses it if used many times. Doesn't this mean that it's not necessary to cache so many things in applications? For example user data

#

I havn't looked into this a lot, so I might be completely wrong

hushed badge
#

I dont think it necessarily caches any results, but it may simplify some instructions

#

and it definitely won't cache user data

#

more than likely whatever the JIT compiler is doing u dont have to worry about, but im no expert

atomic trail
atomic trail
river solstice
# atomic trail Question regarding JIT for Java: So I didn't actually know this was a thing that...

well, JIT basically compiles bytecode into native machine code at runtime, just before (many) execution(s) (hence "Just in time")

without it JVM would have to interpret ALL the bytecode line by line, which is way slower, so JIT converts "hotspots" (frequently used code, like loops and methods) into machine code, does inlining, loop unrolling, removes dead code (iirc)
next time the method runs it, in theory, should be way faster (another reason why benchmarks need warm-up)

you can see what JIT does by using
-XX:+PrintCompilation
JVM flag

icy shadow
#

Yeah it definitely doesn’t do anything data wise

atomic trail
icy shadow
#

yes

river solstice
#

yes

icy shadow
#

and also doing it at runtime often allows you to make better, more targeted optimisations

#

because you can analyse how the code actually behaves at runtime rather than just at compile time

atomic trail
#

Interesting, potentially exceeding c++ performance at stable runtime then perhaps? As that's just compiled once I think atleast

icy shadow
#

im sure it can in some cases although it will vary a lot

#

there are still some overheads in java that you cant really optimise away

atomic trail
#

Yeah makes sense. I always just had the idea that java is a very slow language, but for some cases it would be fast then I'd assume

icy shadow
#

imo java is unfairly considered slow

#

and once the jit kicks in it's usually "a bit" slower than a native lang but rarely "significantly" slower

river solstice
#

iirc after the initial warm-up java is within 5-10% (may vary) of C++ in terms of performance

atomic trail
#

That's pretty good I'd say

icy shadow
#

sounds about right yeah

#

for sure

#

apart from really performance critical stuff i think it's fine

river solstice
#

fun fact GraalVM JVM comes with both JIT and AOT

icy shadow
#

yeah graal is cool too

atomic trail
#

Then the compiled application wouldn't work for all operating systems tho right?

icy shadow
#

correct

river solstice
#

From their website

Are There Any Issues With AOT, Then?
Yes, there are.

When Graal/any AOT compiler creates those native executable, it needs to do static code analysis with a so-called closed-world assumption. Effectively meaning that it needs to know all classes that are reachable at runtime during build time, otherwise the code won’t end up in the final executable.

And this means that everything which involves dynamic loading, such as reflection, JNI or proxies - all the good things that a lot of Java libraries and projects use - is a potential issue.

icy shadow
#

you typically AOT compile and then put it in a docker image or something

atomic trail
#

Ahhh yeah as it just runs in unix / linux or whatever anyways

#

So not runnable on windows?

icy shadow
#

no you can compile to a windows binary too lol

#

docker just gives you portability across platforms

#

for free

river solstice
#

and last point missing from screenshot

This is not an issue when putting, for example, your server executable into a Docker container, but more on that in a second.

icy shadow
#

brister mitten is a better source than blog screenshots

river solstice
#

what about Mitter Bristen

icy shadow
#

bad source

river solstice
#

tldr AOT bad JIT good 😎 ✌️

icy shadow
#

no! JIT bad AOT good!!

#

if james gosling was alive today and was gay: i am quite fond of MEN

river solstice
#

why cant I reacc in this channel wtf

#

@robust crow fix pls

icy shadow
#

i can 😎

atomic trail
icy shadow
#

yeah i think so

river solstice
#

iirc Steam automatically detects your platform and downloads whats needed

atomic trail
#

Makes sense, I always just thought it was one .exe file that works on basically all platforms lol

river solstice
#

or it may just be bundled or whatever, for ex Unity games (I think)

icy shadow
#

That being 64 bit windows

atomic trail
#

Yeah probably not many playing on linux systems

icy shadow
#

sadly no

minor summit
#

even then for Linux you have uhh whatsitcalled

#

proton

hushed badge
#

proton

#

is it

minor summit
#

cool shit

icy shadow
#

On a similar note I remember reading about I think one of the older fallout games which rather than implementing proper localisation they just packaged like 20 versions of the game into 1 so the download size was massive

minor summit
#

just bethesda things

torpid raft
#

based?

lone python
#

One of the civ games packed like 11 different intro videos for each language making the videos larger than the actual game.

#

I remember ripping it

pulsar ferry
hushed badge
#

i remember when ps5 came out and everyone was saying file sizes are going to be so much smaller now!!

#

whatever happened to that

lone python
#

Wishful thinking

icy shadow
#

just one more hardware generation bro

#

we just need one more generation

river solstice
#

surely this time...

#

just one more, promise

lone python
#

Hardware changes are so random. I remember calling up LG to see if one of their Blue-Ray burners could read DVDs and CDs as well, he said yes, but that the new cases didn't have slots for them and that they were basically going out of business making optical drives.
I thought people would just adopt HDDVDs abd Blue-Rays not just abandon optical media all together...

dusty frost
#

but like, nobody uses HDDs anymore, and even less would be using it if it wasn't 140GB, so it's like a self-fulfilling prophecy lol

hushed badge
#

id be surprised if an ssd isnt part of the minimum specs for that, considering its only on new gen consoles

worn jasper
#

(Which is known to be hella optimized and compressed)

pulsar ferry
dusty frost
#

and then people have to put it on their bigger HDD because it's so big, like ugh lol

ocean crow
robust crow
eternal plover
#

Hey, I'm kinda stuck with the following issue and I would really appreciate some advice.

I'm a dev for an kingdom server which runs on spigot and version 1.21.8.
And I've been tasked with the following:

In the kingdom server we wanna run a texturepack for a better playing experience, but with the use of modelEngine we wanna use custom textures for every kingdoms weapons & armor.
For example KD1 gets red swords and armor & KD2 blue swords and armor, etc.
So that when a player runs the texturepack they can see from which kingdom someone else is based on the armor they have on.
And besides that we also have the texturepack for mythicmobs for some bosses which you can fight.

What would be the smartest approach? seeing as it only possible (I think) to serve only one texturepack at a time.

pulsar ferry
#

You can serve multiple resource packs at the same time

eternal plover
#

really? Could you please elaborate?

pulsar ferry
#

Using Paper api or Adventure api, you can just do Player#sendResourcePacks with multiple packs (possible since 1.20.3)
No idea if Spigot has a way for that, they are always mega outdated

eternal plover
#

I understand, however, what would be an smart approach towards what im trying to achieve? Is there an plugin you can recommend for spigot 1.21.8 which could help me?

#

seeing as my server isn't running on paper

pulsar ferry
#

Probably wouldn't be hard to manually merge the two packs, I mean it's just files at the end of the day
But no I don't know of any plugin that does that, this channel is for coding, if you are looking for plugins you'll probably have better luck in #general-plugins or even #minecraft
Any particular reason to run spigot? There is like no reason to not run paper nowadays

eternal plover
#

its prefered by the head dev and owner of the server

eternal plover
pulsar ferry
#

You can just apply a custom texture to the armor using item components

river solstice
torn heart
#

and it'll show up for everyone as the custom texture

#

this is trivial with ItemsAdder for example

#

or any such plugin

#

or you can even do it manually and it's not hard

ripe owl
minor summit
#

hello! no!

sterile hinge
sterile hinge
#

Idk do something cool or stuff like that

minor summit
#

oh okay

worn jasper
#

Just like, you do the work, and I slap my name in the authors

minor summit
#

i can slap you, yeah

lone python
#

Kinky

haughty pelican
#

Is this what hell is?

haughty pelican
#

Wow no Yoshi hot pocket

fathom raptor
jagged belfry
#

someone has an open source version of Hypixel Skyblock made with Minestom

wheat carbon
#

why is ij saying this, is he stupid

sterile hinge
#

He‘s smart enough to understand that methods aren’t always idempotent but not smart enough to understand that it is in this case

wheat carbon
#

damn

#

so what kind of values could V be in HoverEvent<V>

#

cuz like when I'm trying to do a replacement I need to assume V is a component

#

can it be anything else?

#

ah perhaps translatablecomponent

#

that's a component too tho

#

surely it's just always a component

#

oh it can show items and entities and stuff cool

pulsar ferry
wheat carbon
#

so would only need to replace placeholders on HoverEvent<Component> right

pulsar ferry
#

Probably yeah

wheat carbon
#

cool

pulsar ferry
#

Doubt anyone would go as far as wanting to replace things on item's name/lore or entity's name only when being shown in chat lol

wheat carbon
#

are hover events only for chat?

pulsar ferry
#

Chat and dialogs are the only places I can think of

wheat carbon
#

luckily dialogs aren't implemented in adventure yet it seems

#

so don't have to worry about those

worn jasper
#

there is paper api for them though

#

they might just use the same system for chat

pulsar ferry
#

Yeah it's just a component it doesn't matter where it is it'll behave similarly

worn jasper
#

what in the fk, is this just your usual IJ bug?

vale crescent
#

Could be a wrong file format too?

worn jasper
#

no clue this is me trying to create a kotlin file via IJ

#

like, nothing extra

split grail
#

hello

I am searching for a python dev with also a little knowledge about html, css and javascript. there is a little thing that has to be done on my open source project. you can see a detailed description about what has to be done in the issue.

https://github.com/VulcanoSoftware/VulcanoCraft-plugin-repository/issues/14

as a reward you get a thank you in the readme.md, and if you like you may also put some free ads on my readme.md so you can advertise your services.

thanks in advance, i am looking forward to work with you ❤️

wind tapir
#

Hello, is there a way to disable the worldborder collisions in spigot 1.21 ?

solemn bridge
#

I want to set 2 click requirement in deluxemenus , one is currency and 2ed is lp permission . I already do the currency permission but I can't do the lp permission , can anyone help me . I want that if somebody have the enderchest.size.4 perms in lp then he have the permission to click this option in deluxemenus

proud pebble
pearl topaz
#

hello peeps

boolean success = Bukkit.getServer().unloadWorld(gameWorld, false);
if (!success) {
    Bukkit.getLogger().severe("Failed to unload world " + gameWorld.getName() + " for reset!");
    return;
}```
what reasons would cause unloading a world to fail? Is it possible to unload the main world?
hoary scarab
#

Can’t unload the main world. Atleast on spigot.

pearl topaz
#

is there a good way to reset it? As in delete everything and have it regenerate?

river solstice
pearl topaz
#

can you do that programatically?

#

without restarting lol

#

I ended up just not using the primary world and basically ignoring it

river solstice
dusky harness
reef delta
#

Does anyone know of any ways to fix Logger (java.util.logging.logger) not parsing colour in console?

[20:23:34 INFO]: [ShopGUIPlus] Wackenzie bought 1 x §f§f§x§f§f§8§9§9§fᴄ§x§e§e§9§5§9§8ᴏ§x§d§e§a§2§9§2ᴢ§x§c§d§a§e§8§bʏ§x§b§d§b§b§8§5 §x§a§c§c§7§7§eɪ§x§9§b§d§3§7§7ʙ§x§8§b§e§0§7§1ᴇ§x§7§a§e§c§6§ax§x§7§8§e§7§7§d §x§7§7§e§1§8§fᴘ§x§7§5§d§c§a§2ʟ§x§7§3§d§7§b§5ᴜ§x§7§1§d§1§c§7s§x§7§0§c§c§d§aʜ§x§6§e§c§6§e§cɪ§x§6§c§c§1§f§fᴇ for $50 from fall shop

I've previously done the Bukkit#getConsoleSender#sendMessage way but I'd prefer to maintain use of Logger in this specific case. I'm tempted to do some ANSI parsing/mapping but it would be nicer if Java/Mojang/Bukkit has some sort of provided solution. 😄

worn jasper
#

legacy colors hate aside, think ASL uses the logger and colors

#

maybe check that out

reef delta
#

Is it mini-message or is that something different?

worn jasper
reef delta
dusky harness
#

it seems to also have an ansi serializer

worn jasper
reef delta
dusky harness
#

just have to shade adventure

dusky harness
#

but ansi should work

worn jasper
#

Not sure about spigot (but who cares about that one)

reef delta
#

I agree too

dusky harness
#

wdym

worn jasper
#

And yes think it might use ANSI internally (ComponentLogger)

dusky harness
#

it wouldn't matter if spigot/paper/etc supported ansi tho or used it internally

#

since you can shade adventure as a whole and print it out directly to console (or logger ig)

#

idk

#

¯_(ツ)_/¯

worn jasper
#

Try and see ig

reef delta
#

🥲

worn jasper
reef delta
scenic vapor
neon pewter
#

how can I get rid of this suspicious remove warning, I'm not iterating over the the same array, will it get fix if i extract it into a method ?

worn jasper
#

What exactly is the warning? I'd assume is related to an index out of bounds but you have created a new array list so that confuses me

dense drift
#

doesnt it suggest to use an iterator?

worn jasper
#

I am on the phone, can't read much of the code

worn jasper
sterile hinge
pulsar ferry
neon pewter
#

and that is all the warning is, no suggestion for fix

#

extract it does remove the warning

neon pewter
dense drift
#

Do you want to remove it only from update or also from keyCombos?

neon pewter
#

just for the new update list, the key combo list need to remain unchange until the end of frame

worn jasper
#

You could also just use streams to filter the original arraylist

#

People forget those exist. I was one of them until I started using kotlin xD

neon pewter
#

dont worry, i do use stream here and there

minor summit
#

why wouldn't it be static?

sterile hinge
icy shadow
#

lol

#

intellij is tweaking i think

dusky harness
#

because with your current code, I think it skips over a value every time that remove gets called

#

smart intellij

#

jetbrains recommends using removeIf() instead
it should probably put that in the warning message tho

neon pewter
#

yeah... but im not remove on the same list that is being iterated ?

dusky harness
#

yeah I can't read

#

your message or your code

#

wait

#

nvm

#

ig just gotta suppress it

carmine charm
#

Looking for plug-in developer

dusky harness
sterile hinge
# neon pewter

Ah, maybe the description of the intention tells you what’s up

dusty frost
# neon pewter

why not build the list as you iterate through and skip elements you don't want rather than copy the entire list and remove just one thing each time?

neon pewter
neon pewter
dusty frost
neon pewter
sterile hinge
carmine charm
minor summit
#

that you were

carmine charm
minor summit
#

a requirement channel?

carmine charm
minor summit
#

those aren't recruitment channels either

carmine charm
#

Ig

minor summit
#

it's against the rules lmao

#

those are channels for requesting projects, like i said

if you have a specific plugin request you want to make

carmine charm
languid mantle
#
[18:58:23 WARN]: Caused by: java.lang.NullPointerException: Cannot invoke "String.toCharArray()" because "text" is null
[18:58:23 WARN]:        at PlaceholderAPI-2.11.7.jar//me.clip.placeholderapi.replacer.CharsReplacer.apply(CharsReplacer.java:45)
[18:58:23 WARN]:        at PlaceholderAPI-2.11.7.jar//me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:71)
[18:58:23 WARN]:        at PlaceholderAPI-2.11.7.jar//me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:99)
[18:58:23 WARN]:        at ValorSky-Crates-0.0.1-SNAPSHOT.jar//fr.valorsky.crates.utils.messages.MessagesUtils.sendMessage(MessagesUtils.java:20)
[18:58:23 WARN]:        at ValorSky-Crates-0.0.1-SNAPSHOT.jar//fr.valorsky.crates.crate.CrateManager.setCrate(CrateManager.java:29)
[18:58:23 WARN]:        at ValorSky-Crates-0.0.1-SNAPSHOT.jar//fr.valorsky.crates.commands.CrateSetCommand.onCommand(CrateSetCommand.java:19)
[18:58:23 WARN]:        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[18:58:23 WARN]:        ... 23 more
  String parsedMessage = type.imageName + PlaceholderAPI.setPlaceholders(player, rawMessage);

someone one know ?

hushed badge
#

it says what the issue is, rawMessage is null

#

you cannot pass null as a string here

languid mantle
#

my bad u_u

icy shadow
#

no problem

river solstice
#

@marble heart tell em

pulsar ferry
limpid hinge
pulsar ferry
limpid hinge
#

i dont understand, to be honest, im tryna add papi dependence and it just keeps saying it doesnt exist and then, i put the url on my browser and it said not found. (Maven)

<repositories>
    <repository>
        <id>placeholderapi</id>
        <url>https://repo.extendedclip.com/releases/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>me.clip</groupId>
        <artifactId>placeholderapi</artifactId>
        <version>2.11.7</version>
        <scope>provided</scope>
    </dependency>
</dependencies>```
#

am i missing something

dense drift
limpid hinge
neon pewter
#

i'm trying to build jextract but i got this error when trying to build it:

* What went wrong:
Execution failed for task ':compileJava'.
> Error while evaluating property 'javaCompiler' of task ':compileJava'.
   > Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
      > The configured executable does not exist (D:\Code\Java\Lib\jdk-21\bin\javac)

I checked my JDK and the javac.exe is actually there

||(For some reason, they only say the gradlew.bat file was enough on windows, but in the build file, the fix is to add .exe to the javac)||

pulsar ferry
#

Hi

limpid hinge
white vessel
#

is it possible to prevent natural dragon egg spawning after first dragon defeat?

river solstice
#

idk, probably

white vessel
broken elbow
past tinsel
#

just crossposting this here if you saw the thing in # minecraft dont mind this

#

If there's anyone here who is familiar with Forge modding (the actual development process) please shoot me a dm, I want to do a silly but complex thing that might not even work and I'd rather prevent wasting tens of hours agathanks

white vessel
proud pebble
#

if you dont want players getting the dragon egg, could always void it if they try to pick it up rather then having to deal with those edge cases

#

tho if ur on paper you can also use DragonEggFormEvent

#

this is the code for creating the dragon egg

#

seems like podium always spawns at x=0 z=0 and the y value is defined by the heightmap whatever thats gunna mean

#

idk if the Y position is exposed by the spigot api and if the dragon egg always spawns in the same position other then the Y value. if it does spawn at the same x and z position you could always loop over the 320/256 possible y positions, look for the egg and then replace it with air

white vessel
scenic vapor
minor summit
#

idk why people are so pissed about it

#

bro who cares

river solstice
proud pebble
#

atleast minecraft 2 isnt in our future lol

icy shadow
#

the only possibility of getting minecraft 2 relies on jesus returning, and therefore the year system resetting to BC2 (before christ 2) and AD2

spiral prairie
#

or... we just wait until 2102

#

hm, might be 102.whatever then, maybe in the year 3002

jagged belfry
minor summit
midnight wyvern
#

hi! Is there a new way to remove/put "textures" on GameProfile? tried .remove/removeAll as it used to be, but nothing. Long time not using nms

        EntityPlayer ep = ((CraftPlayer) p).getHandle();
        GameProfile gp = ep.getBukkitEntity().getProfile();
        PropertyMap pm = gp.properties();
        Property property = pm.get("textures").iterator().next();

        pm.removeAll("textures");

        String textureVal = "ewogI...";
        String textureSignature = "TsE43...";

        pm.put("textures", new Property("textures", textureVal, textureSignature));
midnight wyvern
#

Latest, sorry! 1.21.10

icy vigil
#

why don't you use PlayerProfile from api instead?

#

oh its spigot?

midnight wyvern
#

Yeah. Need to read abt PlayerProfile

icy vigil
#
gameProfile.getProperties().removeAll("textures");
gameProfile.getProperties().put("textures", new Property("textures", "value", "signature"));
midnight wyvern
#

Nup. That's what Im actually doing right now! Think it's an ImmutableMap and since that, it can't change. Although, Im reading the class you've sent, it may solve my problem. Do you know if it changes the skin for all players or only for itself?

neon pewter
#

i just need to add this to suppress the warning ?

icy vigil
#

the api doesnt match

#
/**
 * Changes the PlayerProfile for this player. This will cause this player
 * to be re-registered to all clients that can currently see this player.
 * <p>
 * After executing this method, the player {@link java.util.UUID} won't
 * be swapped, only their name and profile properties.
 *
 * @param profile The new profile to use
 */
void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile profile);
sterile hinge
proud pebble
storm basalt
#

can anyone code me a plugin?

#

ill pay

#

im look for someone who codes high quality plugins

orchid otter
worn jasper
#

Usually the default is around 20ish /h

fathom raptor
#

But usually 30-40/h is normal

worn jasper
#

Cause I have, and those are far from "normal", they should be the norm yes, but it isn't.

#

In the mc community, you are lucky if you get paid 10-15/h

#

which is why I nowadays rarely do commissions

#

since I always charge a minimum of 20-25/h

subtle kindle
#

don't really see a full support channel, but my friend is a developer and wants peoples opinions here, he was banned a couple years back for compromised account. was wondering if a staff member could take a look into it for me, user: Spyproof

worn jasper
#

@celest tendon or @leaden plume maybe can help though, I'd go to #off-topic though

fathom raptor
#

30-40 is normal for premium servers

#

anything below is for cracked servers

worn jasper
worn jasper
fathom raptor
#

there are premium only servers and cracked servers]

worn jasper
# fathom raptor why xD

I have not worked for a single cracked server and still nothing similar to those prices beside one or the other

fathom raptor
worn jasper
pulsar ferry
fathom raptor
fathom raptor
pulsar ferry
#

Wdym by premium users?

fathom raptor
#

and dont use cracked launchers

#

to play the game

pulsar ferry
#

Those are normal users lol

fathom raptor
#

once u work with cracked servers u'll end up calling premium and cracked

#

or premium and offline

pulsar ferry
#

Normal and offline :')

fathom raptor
#

Atleast its good we can understand eachother

pulsar ferry
#

Premium tends to mean something more than normal, if you are just the base userbase you can hardly call them premium

worn jasper
robust crow
subtle kindle
#

He was unbanned, I think it was his alt or something

torn heart
#

very very few devs are making that much

scenic vapor
#

authentication plugins are also calling it premium

scenic vapor
plush hound
atomic trail
#

Has anyone had the issue where class files doesn't load the correct logo anymore?

sterile hinge
#

class files or java files?

atomic trail
#

java files mb

#

They used to have a different symbol

#

At least when they are in the src directory

sterile hinge
#

yeah they have to be in a directory that is marked as source root

atomic trail
#

They are tho

#

The blue indicates sources root iirc

sterile hinge
#

lol

#

try the repair ide steps I guess

atomic trail
#

I'll try, it's happening in all projects though, very weird

#

IntelliJ got an update, I'll try that

gleaming marsh
#

Hey, I have a Placeholders plugin and I'd like to add it to eCloud, but apparently the website has closed registrations. How can I register?

river solstice
#

@gleaming marsh ping @robust crow

#

bug him

gleaming marsh
robust crow
#

Paste a link here

#

to it

gleaming marsh
#

oh, I misinterpreted it, srry.

robust crow
#

Does it depend on another plugin to work?

gleaming marsh
#

only placeholderapi

robust crow
#

So the ecloud is for expansions not plugins, if it's already built in you don't need to do anything else

gleaming marsh
#

could I create a version with just the placeholders for eCloud?

robust crow
#

You don't need to, you've already built the expansion into the plugin

worn jasper
robust crow
#

Oh

#

What does the expansion actually do?

#

Retrive stats for a particular plugin?

worn jasper
#

seems like it's retrieving stats via http requests and show tags etc

gleaming marsh
#

^ ^

worn jasper
#

I understand portuguese but way too tired to read it all lol

gleaming marsh
worn jasper
#

(only english here)

#

cool project though, central database for pvp related statistics that is shared across servers of south america

#

could probably be abused but cool still

robust crow
#

It's unlikely we'd verify an expansion that makes outside network calls

gleaming marsh
dense drift
#

Yup

fiery gazelle
#

how can i load custom meta data using the new string based system

#

im not sure how

#

using java/kotlin

pulsar ferry
#

New string based system?

icy shadow
#

do you mean namespaced keys maybe

torpid raft
#

🦗

gritty meteor
#

i need help

neat pierBOT
#

There is no time to wait! Ask your question @gritty meteor!

gritty meteor
#

pleasee

#

Im so confused

#

2 expensions that i coded work

#

but 1 doesnt at all

#

i dont get why

#

it does seem to register it if it do /papi list

torn heart
gritty meteor
#

oh lol my bad i dint remove all my messages

#

its resolved

sour night
#

Hello !
I am a beginner minecraft server Developer / Manager and would love to start my own minecraft server, I ran some tests and made a few plugins but I couldn't shake off the feeling that what I am doing right now is wrong and incorrect.
I am looking for someone capable enough to help me clear my mind and answer my questions, thank you in advance.

indigo cloak
#

Hi, does anyone have any idea how I could put two texts inside the inventory of my plugin, which would be the player's name and the player's rank? I think I would be using a custom font in the title, but the trick is to create a logic so that I can center the name and the rank.

torn heart
#

and that's okay

torn heart
# indigo cloak Hi, does anyone have any idea how I could put two texts inside the inventory of ...

you can't center the title with something like an "alignment" field or anything since that doesn't exist. you can get a decent approximation though by looking at how large the chest title space is, as in how many characters you can fit in there, and then using that to center the player names. unfortunately finding true text width is more complicated and requires you to find the font you're using and create a lookup table of the character widths. alternatively you can shade lwjgl and copy Minecraft's code to calculate the width yourself

torn heart
#

that is the summary

indigo cloak
torn heart
#

Yeah

#

its complicated

#

serverside manual text alignment is non trivial

icy vigil
minor summit
#

that makes a lot of assumptions about the client's setup that you just cannot really do

#

god forbid you change your chat width, use a resource pack, or do literally anything outside of default settings

torn heart
pulsar ferry
#

If you know the character width of your font, it's really easy to center in the title, chat however it's pretty much impossible

worn jasper
#

Well

#

Maybe with shaders

lean jungle
#

is there anyone who is looking for a high skilled and reliable engineer?

icy shadow
minor summit
#

jarvis

#

jork it a little

torn heart
#

🧐

ashen lodge
#
java.lang.ClassCastException: Cannot cast liltrip.prison.Prison to codes.kooper.blockify.Blockify
        at java.base/java.lang.Class.cast(Class.java:4069) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.getPlugin(JavaPlugin.java:513) ~[paper-api-1.21.10-R0.1-SNAPSHOT.jar:?]
        at prison.jar/codes.kooper.blockify.Blockify.getInstance(Blockify.java:51) ~[prison.jar:?]
        at prison.jar/liltrip.prison.api.MineFactory.loadMine(MineFactory.java:37) ~[prison.jar:?]
        at prison.jar/liltrip.prison.data.PlayerJoin.lambda$onJoin$0(PlayerJoin.java:47) ~[prison.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.10.jar:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
#

what to do about this error

#

ive been stuck

sterile hinge
#

Don’t cast randomly?

torn heart
#

this error is about as understandable as an error gets

dusky harness
#

before you guys immediately bash on that guy for casting
doesn't that error mean that JavaPlugin.getPlugin is getting the casting wrong

dusky harness
#

my guess is that you're doing JavaPlugin.getPlugin(Blockify.class), but the plugin's actual main class is Prison
otherwise idk how that error would happen, and we'd need more info

ashen lodge
#

i fixed that

#

but now i got

java.lang.NoClassDefFoundError: codes/kooper/blockify/models/Audience
        at prison.jar/liltrip.prison.api.MineFactory.loadMine(MineFactory.java:36) ~[prison.jar:?]
        at prison.jar/liltrip.prison.data.PlayerJoin.lambda$onJoin$0(PlayerJoin.java:47) ~[prison.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[paper-1.21.10.jar:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: codes.kooper.blockify.models.Audience
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:146) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:107) ~[paper-1.21.10.jar:1.21.10-117-df4b668]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
        ... 8 more```
#

blockify is one of my dependencies

royal hedge
#

i believe blockify has documentation for how to add a dependency

royal hedge
#

he comes from skript and minehut dw

ashen lodge
#

nah kooper said dont shade

ashen lodge
dusky harness
#

yeah probably

crimson portal
royal hedge
dense drift
#

@pastel badger dont spam the chat with your code, use paste.helpch.at to share code/configs/logs etc.

pastel badger
#

oh sorry its just i dont really know what i am doing this is the first time i have made a plugin and also the first time i have used discord

#

where do I do that at is it a separate website?

#

@dense drift so I put it there now what and clicked save now what

pulsar ferry
pastel badger
dusky harness
#

I don't know if there were some deleted messages or something, but what's the issue/error/question?

pastel badger
#

will this code work? if it will work could someone please compile it into a working .jar for me my computer just will not compile it no matter what I do. https://paste.helpch.at/olufaxexix.kotlin Thank you to anyone willing to help me

past vessel
#

Why is everything in the main class😭

river solstice
#

talk about single responsibility principle

#

this class has ALL the responsibilities

torn heart
#

you should instead post information about how you're attempting to compile it and what issues you're getting

worn jasper
#

Yeah it all being in a single class is a bit eh, naming for some stuff is also eh like PluginBan, but either way, as said, to become a programmer, first thing you gotta accomplish is compile.

river badge
#

👋

minor summit
#

hello likely spammer

river solstice
#

he's the owner of MWCS

#

don't you know

minor summit
lean shuttle
#

hello, could you help me, I’ve been suffering with my plugin for 3 days now, I need papi on version 2.11.7, I added it to the pom.xml of my plugin, but it constantly pulls up bStats 1.7, what should I do? I’m just going crazy and I can’t solve this problem in any way, he stupidly doesn’t want to compile

*здравствуйте, не могли бы вы мне помочь я уже 3 день страдаю со своим плагином, мне нужен papi на версии 2.11.7 я его добавил в pom.xml своего плагина но он посстоянно подтягивает bStats 1.7 что делать? просто я вообще уже с ума схожу не могу никак решить эту проблему он тупо не хочет компелироваться *

icy shadow
#

can you send the error message?

split lynx
#

I was searching for this channel for like 5 minutes 😭

dusky harness
#

like how to put that in a PAPI placeholder? I'm not too sure what you're asking

split lynx
#

But the returned value isn't dynamic, it's static

dusky harness
#

have you confirmed that with the /papi parse command?
I mean it seems like it should work fine

#

maybe put some print statements throughout the code to see if everything is running properly

#

might just be missing something obvious

#

also note that you should probably be making task a BukkitTask (what runTaskTimer() returns)

split lynx
next notch
#

Anyone send me papi dependency

#

Nvm found.

lethal ridge
#

@dense drift Hey! Sorry for the ping but I'm not sure what is the proper way to reach out to you. I've created this PR a year ago and is wondering if you (or other maintainers) could take a look?

I can't post links so it is PR #65 in the Server-Expansion repo.
https://github.com/PlaceholderAPI/Server-Expansion/pull/65

pulsar ferry
#

You can post links just not masked links

lethal ridge
lethal ridge
#

Merry Christmas! Thank @dense drift for merging my PR! Just checking will there be a release for the updated server expansion soon?

nocturne dust
#

Hey anyone interested in coding a plugin w me?

nocturne dust
#

i mean i am gonna code too

neon pewter
#

should I call the ConfigurationSerialization#registerClass(Class) in onEnable before I start loading the config ?

icy shadow
#

Yes

neon pewter
# icy shadow Yes

Ah thank you! Do you also know if I can use nested keys for get serializable?:

        FileConfiguration config = plugin.getConfig();
        CurrencyLimit currencyLimit = config.getSerializable(CurrencyLimit.currencyLimitKey, CurrencyLimit.class, CurrencyLimit.getDefault());

I define the serialization and deserialization methods as:

    @Override
    public @NonNull Map<String, Object> serialize() {
        Map<String, Object> data = new HashMap<>();

        data.put(minTradeKey, minTrade);
        data.put(MinKey.enableKey, min.enable);
        data.put(MinKey.valueKey, min.value);
        data.put(MaxKey.enableKey, max.enable);
        data.put(MaxKey.valueKey, max.value);

        return data;
    }

    public static CurrencyLimit deserialize(Map<String, Object> args) {
        double minTrade = (double) args.get(minTradeKey);
        boolean enableMin = (boolean) args.get(MinKey.enableKey);
        double minValue = (double) args.get(MinKey.valueKey);
        boolean enableMax = (boolean) args.get(MaxKey.enableKey);
        double maxValue = (double) args.get(MaxKey.valueKey);
        return new CurrencyLimit(minTrade, enableMin, minValue, enableMax, maxValue);
    }

where the key are the full path, some of them look like this:

"currency-limit.min-trade"
"currency-limit.min.enable"
"currency-limit.min.value"
icy shadow
#

I think that’s fine

#

Just try it and see haha

neon pewter
#

ah ok

#

was worrying that it cannot serialize because i format the config like this:

currency-limit:
  min-trade: 0.1
  min:
    enable: true
    value: 0.0
  max:
    enable: true
    value: 1000000000.0
scenic vapor
#

instead of setting the enabled true/false

#

so when it is in the config, then it is enabled

#

and if it is not in the config, then it is disabled

icy shadow
#

but as far as i know, a.b: x is treated totally identically to a: b: x

neon pewter
neon pewter
icy shadow
#

I’m not sure what you mean

neon pewter
#

i'm trying to understand if the Map that is passed into deserializer is a flat map where string is the full key path and the object is the value itself or it is a nested map, where the string is the relative key (for example min-trade instead of currency-limit.min-trade) and the object at those nested entry is a map that i need to type cast

neon pewter
#

nvm, just not gonna use bukki serialization api

minor summit
#

based

neon pewter
#

it loaded 😭

rotund raft
#

do minecraft servers/paper server software have any memory leaks? i notice my server's memory progressively gets higher and then drops back down to about a gigabyte of ram usage, making me think it has a memory leak somewhere. i ran /paper heap and brought the file into eclipse memory analyzer just to see and i find a couple leak suspects, but im not quite sure what im actually looking at lol

#

sorry if this isnt the right channel to ask, im not sure what this would be classified as lol

sterile hinge
#

If it drops back down, there isn’t a leak