#help-development

1 messages · Page 1317 of 1

chrome beacon
#

oh neat there was a method for that

#

Why don't you just pass the player?

slate tinsel
#

Because I dont have it

#

Its for my machines plugin

#

So a Machine mines the block, using a pickaxe in its inventory

thorn isle
#

nms.ItemStack

    public float getDestroySpeed(BlockState state) {
        return this.getItem().getDestroySpeed(this, state);
    }
#

i'd really just rerun the numbers from the wiki though, it's not really worth hooking into nms for just a multiplication and division or whatever the equation was

thorn isle
#

on paper you could probably also get it directly from the Tool component, maybe spigot has something similar

slate tinsel
#

hmm yeah

thorn isle
#

but i don't remember if spigot lets you get item components from the item prototype itself, iirc it might only be the itemmeta

slate tinsel
#

But how can I use that value? I want it to be diffrent from block to block

slender elbow
#

i mean, aren't you using paper api anyway given you asked in the paper discord?

thorn isle
#

you use it against the block's hardness

slate tinsel
#

then I saw my project used spigot api 💀

slate tinsel
thorn isle
#

see the wiki

slate tinsel
#

Minecraft or spigot wiki?

slate tinsel
thorn isle
#

if the tool isn't suitable, you multiply by 30 or something

chrome beacon
#

It contains all the psudocode you need

slate tinsel
chrome beacon
#

because someone decided that they should?

#

They break at the same speed if thats what you're wondering about

slate tinsel
chrome beacon
#

what pickaxe are you using

slate tinsel
#

wood

chrome beacon
#

That's why

#

wood pickaxe can't mine diamonds

slate tinsel
#

So then it just returns the hand value instead

chrome beacon
#

not quite

#

Just look at the wiki

#

it tells you exactly how to calculate it

slate tinsel
chrome beacon
thorn isle
chrome beacon
#

^ see wiki

fresh timber
#

I'm trying to use Entity#setPersistent(false) so that entities with it will be removed when their chunk is unloaded or when the server restarts. It seems to work well so far with the caveat that if you go behind a wall and can't see the entities then wait for a few minutes, when you walk around, all of the mobs despawned.

This is an issue because I load them back again when a player loads the chunk again.

Is there any easy way to fix this or should I just slap on a PDC for the impersistent entities and kill them on disable/enable?

chrome beacon
#

Set to false

fresh timber
#

I tried it before

#

oh wait nvm

#

I see what you mean now

fresh timber
#

Why can't I cancel PlayerArmorChangeEvent? I'm trying to stop players from changing their armor by right clicking with an armor item in main hand.

hybrid spoke
fresh timber
#

oh wait thats paper

smoky anchor
#

Use the interact event then

tribal rover
#

someone please help, i have a jobs gui menu with images etc . how i install the gui on the server please help.

echo basalt
#

Any idea why the client would hard crash with a SetPassengers packet 🤔

buoyant viper
#

bad entity ids?

#

idk

echo basalt
#

entity ids are fine

buoyant viper
#

poorly constructed packet?

echo basalt
#

I'm debating if I need to unmount an entity before mounting it for somebody else

#

my logs basically print

#
A holds [B]
B holds [C]
C holds [D]
D holds [E]
E holds [24]
Player holds [24]
Player holds [24]
Player holds [A]
#

What if I need to say that E holds [] before saying that player holds 24

#

otherwise 24 shares 2 parents?

#

I dunno if the client unmounts it or not

#

Especially in 1.20.4

buoyant viper
#

wouldnt doubt

#

client code is awful

echo basalt
#

ugh

#

ofc mojang's bug tracker is ass

buoyant viper
#

yeahhhh

echo basalt
#

It seems like it handles it properly

#

so why would it hard crash

buoyant viper
#

what does it say in log

echo basalt
#

some stackoverflow

buoyant viper
#

well

#

thats telling

echo basalt
#

it's like an infinite stream.forEach

echo basalt
#

welp that was stupid I never properly set the mount id in the packet

#

🤦

slate surge
#

in the read as well

graceful laurel
#

so i have a custom item called soul charm and dont think i did it right the custommodeldata is 20001

public ItemStack createCharm() {
ItemStack charm = new ItemStack(material, 1);
ItemMeta meta = charm.getItemMeta();

    if (meta != null) {
        meta.setDisplayName(displayName);

        if (!lore.isEmpty()) {
            meta.setLore(lore);
        }

        if (customModelData > 0) {
            meta.setCustomModelData(customModelData);
        }

        meta.getPersistentDataContainer().set(charmKey, PersistentDataType.BYTE, (byte) 1);

        if (glowEffect) {
            meta.addEnchant(org.bukkit.enchantments.Enchantment.LURE, 1, true);
        }

        charm.setItemMeta(meta);
    }

    return charm;
}
onyx fjord
#

any replacement for this?

#

specifically ENCHANT_BUTTON1, 2, 3

thorn isle
#

what're you trying to do

gusty obsidian
#

Help me with protocolLib

onyx fjord
#

creating a virtual enchanting table with spefific levels

gusty obsidian
#

manager.updateHologramIfExists(hologram, ctx -> {
});
I don't understand what the handler should contain

thorn isle
#

try maybe EnchantmentView::setOffers?

#

eyeballing it, that looks like what you want

onyx fjord
#

yeah but offers contain a fixed enchantment

#

i want the game to handle it naturally

smoky anchor
thorn isle
#

ItemFactory::enchantWithLevels

#

not sure where you'd get the player's enchanting seed however

onyx fjord
#

whats weird is that offer can have only one enchantment

#

event tho a table gives multiple at times

mortal vortex
#

Enchanting table provides 3 offers. It’s not weird

thorn isle
onyx fjord
#

turns out just setting the offer cost makes the game give out good enchants

#

and the hint enchantment

thorn isle
#

has anyone made a 1:1 earth map with like a custom world generator that pulls satellite imagery from google maps

pseudo hazel
#

youd have to squish it way down in the y level

thorn isle
#

i think the current max supported world height is 1024 blocks

#

a kilometer tall ought to be good enough if we flatten the mountains a bit, not like we need to go to the earth's core

pseudo hazel
#

maybe

#

mt everest is 8.8km

#

high

#

but ig its an outlier

thorn isle
#

mmm

pseudo hazel
#

and also the earth is a globe so it would be an approximation like a map

thorn isle
#

then there's the oceans

pseudo hazel
#

yes like 20km deep ocean

thorn isle
#

something i've thought about in the context of earth map before are different projections to keep the dimensions roughly accurate, mercator is ass

#

i forget what it was called but there was one that split the globe into triangles and unfolded it in such a way that the disjoint borders were over oceans

pseudo hazel
#

yeah thats probably your best bet

thorn isle
#

if each triangle were to be its own world, we could have the oceans be 1 kilometer deep and the mountains 1 kilometer tall, as long as we don't have a mountain and an ocean on the same triangle

#

this one i think

#

a cuboctahedron projection

#

🤡

#

update the compass logic a bit to point to north and rewrite dynmap to remap it back to a sphere

#

all the landmasses are contiguous so unless players try to swim across the atlantic, nobody would notice

young knoll
#

Can go to +-1024 on the Y axis

#

Nope it’s +-2032

#

So around 4000 blocks

thorn isle
#

yeees

pseudo hazel
#

yeah and then map y = 0 to sea level

young knoll
#

And then cry because of the performance

alpine solar
#

Did yall know

#

The new "beginner" level to programming is not being able to sort arrays

#

And it's just knowing OOP

thorn isle
#

i blame python

#

democratization of anything always leads to that anything turning to absolute shit for everyone involved

alpine solar
#

Nah, it was something else

#

Someone said I was "unfit" for being a developer cause I asked if scripts were allowed in their roblox game

#

Asked them if they knew programming

alpine solar
#

If that's the case, I might as well apply on Hypixel

thorn isle
#

if you think about it, roblox is also the democratization of game development

alpine solar
#

Lua

thorn isle
#

and again everything has turned to shit for everyone involved

alpine solar
#

Python 2.0

alpine solar
#

Oh wait this is the development channel

#

mb

alpine solar
#

Is it possible to convert a while loop into a for loop

thorn isle
#

you always see artists getting mad about generative ai and about how i can write "picture of a cat, pixel art, masterpiece" in a text box and it shits me a picture and i can go "i made the art for my game"

#

but i never see anyone complaining about that same artist writing "import game, import numpy" and writing 3 lines of code and going "i made a game"

alpine solar
#

That wasn't the quesiton tho

#

😭

onyx fjord
thorn isle
#

both are just abstractions for the same jump instructions

#

depends on how you define "convert"

#

e.g. decompilers frequently "convert" for loops into while (true) loops with a break somewhere in them, simply because from the bytecode you can't really tell which is which

onyx fjord
#

For is just while + abstraction for the iterator

#

And java has even more

#

The enhanced for loop

wet breach
#
goto, goto_w, if_acmpeq, if_acmpne, if_icmpeq, if_icmpge, if_icmpgt, if_icmple, if_icmplt, if_icmpne, ifeq, ifge, ifgt, ifle, iflt, ifne, ifnonnull, ifnull

these instructions are your typical ones for loops. While it is true that most for loops can be written as while loops and thus end up with essentially the same bytecode, it would not be accurate to say that a while and for loop are indeed the same as the ordering of instructions are indeed different between the two when you can not order the for loop as a while loop. Also, we are forgetting try/catches and if statements being mixed in. Typically what you see in a for loop is that once it is done with whatever code in the middle, it usually has an instruction to go to the end of the loop, not always the case but typical in how some are setup. Where as in a while loop you don't have that and instead you have a break instruction to exit the while loop.

#

that is probably the most you will get in terms of identifying which loop you are dealing with but don't always exist for the for loop which is fine because it just means it can be a while loop just fine lol

slender elbow
#

modern compilers can definitely tell the difference between while, do while, indexed for and for-each loops

#

try-finally is also a very fun one if you have multiple exit points!

wet breach
#

compilers sure, decompilers however not quite

#

it depends if the compiler changed its structure or not or removed key identifiers

slender elbow
#

er, meant to say decompilers

#

vineflower definitely can and that's basically the only one i care about

wet breach
#

as was stated, at times the compiler can sometimes change a for loop to instrinsically the same as that of a while loop in terms of ordering bytecode. Also, not sure if we are assuming there is no metadata or other types of data being removed or not.

thorn isle
slender elbow
#

there's a whole blogpost about its history by jetbrains when its creator passed and it's explained pretty well, although the focus of the blogpost is not exactly the technical details of how the decompiler works

buoyant viper
#

u just write for instead of while duhh

weak wasp
#

I no longer have the source code of one of my plugins, so naturally I go to decompile it like I have done a few times before. I forget the program I used before, but as soon as you supply the bukkit API it decompiled no problem. As I forget the program I have tried half a dozen decompilers and they all fail. Vineflower comes the closest to succeeding when I supply the bukkit API, but still fails in the end. Then there are like half of the decompilers that don't allow you to supply reference libraries and fail miserably.

Anyone have a goto decompiler, or is Vineflower pretty much it?

slender elbow
#

define "fail"

#

afaik VF can just decompile without having to add any libraries or anything? no?

young knoll
#

I’ve never had to supply a library

#

If the bytecode says org.bukkit.Bukkit.broadcastMessage is being called, then it’s being called, even if it doesn’t exist in context

slender elbow
#

yeah lol

weak wasp
#

It was having trouble with switch statements on bukkit.material, then there was something in my event listener class that caused an internal error

#

One of my classes there is a huge commented block that just says failed to decompile even with the lib

young knoll
#

I believe the switch would be compiled to switch on the Enum#ordinal

weak wasp
#

You mean int codes instead? That's what it did without the lib but the range was incorrect...

young knoll
#

What was the range?

weak wasp
#

It was like 16000, but there are only a couple hundred materials AFAIK

#

I have a version behind up on github, super annoying to figure out what I updated in the last version, but not the end of the world

#

Was just hoping it would be an easy decompile. The decompiler that worked last time was some kind of GUI

slender elbow
weak wasp
young knoll
#

Apparently it generates a synthetic runtime class that maps ordinals to each switch case

weak wasp
weak wasp
#

It's really no biggie though, I had a support request where the guy screen shared on Discord. He was getting all kinds of errors in the console and the plugin didn't work properly, then he rebooted the server and everything worked fine...

I haven't had to update in like 4 years, but one of these new versions is bound to break something.

golden scaffold
#

Does anyone know what I can use to have hologram leaderboards, something like decent holograms or fancy holograms?, up to 1.21

#

or some way to achieve it, dholo doesn't work and fholo too, or I must be doing something wrong, but the placeholders look like ---

mortal vortex
#

or, nowadays TextDisplay

pliant topaz
golden scaffold
thorn isle
#

placeholders aren't a minecraft concept, no thing in minecraft directly works with placeholders

#

with the exception of like translatable and score components, but that's not what you mean

#

how placeholders work is that a plugin pre-processes the text and injects the placeholders, and then sets the text display, armor stand, or whatever else to display that text

pseudo hazel
#

if you are making a plugin and want to use placecholders, its up to you to use the placeholder api and implement that functionality

thorn isle
#

that'd be the selector component yes

tawny osprey
#

What's the best way to store data for both simple and complex plugins?

ivory sleet
#

whats a simple plugin and whats a complex one?

chrome beacon
tawny osprey
ivory sleet
#

configs can be in a config format like yml or json (in a flatfile) no?

chrome beacon
#

^^ configs through yml and the playerdata in a database like sqlite or mysql

tawny osprey
ivory sleet
#

and then for the other bits, usually storing it through NoSQL like mongo or something is fine

tawny osprey
#

Hmm

#

I see

ivory sleet
#

you can go with SQL

chrome beacon
#

Most servers have access to a MySQL compatible DB like MariaDB

#

and for those that don't you can use SQLite

ivory sleet
#

but like, thats if u're actually gonna use what SQL will offer u, if u're just storing and loading data blobs, mongo is somewhat nicer

chrome beacon
#

That's true but you need to bundle the drivers and stuff

ivory sleet
#

especially if you're adding new things seeing as what you're coding might be somewhat of a growing rpg?

young knoll
#

Nothing stops you from having a gui to edit configs saved in a flatfile

chrome beacon
#

^

thorn isle
#

How the data is stored isn't relevant to how it's used once it's in memory

#

What is relevant is your indexing of that data; how does one piece of data relate to another? Do you have to find samples of data by say, a timestamp, or are they tied to a block location? Sql and databases allow for very robust ways of finding which data to get into memory and when, but that is only tangentially related to ingame guis or anything of the like

onyx fjord
young knoll
#

No?

#

You can edit while the server is off

#

Or make a manual reload command

onyx fjord
#

wdym exactly by flatfile

young knoll
#

Or be super extra and make a file watcher

onyx fjord
#

i thought you mean some binary blob

#

or a format unreadable by humans

young knoll
#

yml

#

Or json

onyx fjord
#

ah

#

yea

young knoll
#

Or txt if you want to be fancy

mortal vortex
slim wigeon
#

One question. Where is the user data like the inventories in the server?

thorn isle
#

in the playerdata directory under the main world directory

#

i.e. world/playerdata by default

slim wigeon
#

I looked at that and its all matrix, I cannot tell what I looking at. I just trying to push the inventory and data to another player

thorn isle
#

it's compressed nbt

#

if you want to move all the data of one player to another player, simply rename the first player's file to replace the second player's file

#

while the server is offline

#

if you need to do anything more complicated, open both files in an nbt editor and do what you need to do

#

for doing it programmatically, which i assume you're looking for since this is the dev channel, you can use a nbt library or nms

slim wigeon
#

Minecraft servers are being super annoying. I just trying to move the player data from the paid account to the cracked account. The servers are offline it shows on my end

thorn isle
#

yeah mojang servers are down again

slim wigeon
#

I NOT asking for help with piracy, just with the player data move. Just want to make that clear

#

You know what nbt editor I can use for this?

thorn isle
#

just rename the file if you want to transfer all data

slim wigeon
#

Also, the messages are sending slower. The internet, I might see what is happening. Hard to tell

#

Maybe my connection?WARNING: [youtube] ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')). Retrying (1/3)...

slim wigeon
wraith delta
#

Interesting aye

pliant topaz
#

HOLY SHISH

fresh timber
#

epic stuff

#

but since we already got all the names basically does it matter much

chrome beacon
#

No more compiling and remapping the same code for each version

fresh timber
young knoll
#

Makes reflection easier too

fresh timber
#

maybe if it improves startup time that would be cool

fresh timber
young knoll
#

Latest version already starts in like 2 seconds

#

Since spawn chunks are ded

fresh timber
#

rn for me its like 20-25s

chrome beacon
#

huh what are you running on

fresh timber
#

ryzen 5600x NVMe storage

#

im on 1.21.10 paper, I think most of startup time is the plugins

chrome beacon
#

yeah that's your plugins

#

it does not take that long on my 5600X

fresh timber
#

yeah ik

chrome beacon
#

well 5600G if you want to be specific

fresh timber
#

but my game is nothing like vanilla so yeah

fresh timber
chrome beacon
#

The 5600X doesn't have integrated graphics the 5600G does

fresh timber
#

yeah I don't use integrated graphics

#

I have a gpu

chrome beacon
#

same

fresh timber
#

it doesnt run on a server computer its just my pc lol

#

but yeah

chrome beacon
#

First boot on my phone (A51) :shrug:

Second boot took 1.8s

#

(spigot not Paper)

torn shuttle
#

no more obfuscation?

#

oh joyous day

#

no more remapping

#

damn I actually might have to redo some of the stuff I was doing from scratch since I'll hopefully barely even need any reflections

#

ngl 1.21 has been a big W

#

custom items

#

dialogs

#

no more obfuscation

#

uh

#

idk if we got new attributes now but I only started using some of the weirder ones now

#

I wonder if they're looking at roblox and slowly starting to wonder if they should be more like that

wraith delta
dreamy glade
#

What event i need listen to for stone cutter actions?

sly topaz
solid raptor
#

Hello, I’m creating a Python script that automatically generates word filters. However, after trying many different approaches, I haven’t been able to find a filter that supports RGB or hex colors.

For example, “cow”:
(?<![A-Za-z0-9§])((?:§[a-f0-9x])*(?:§[a-f0-9x])*[ccççćĉċč](?:§[a-f0-9x])*(?:[\s._@%":;()¿?=!&/\^*_\-<>]*)?(?:§[a-f0-9x])*[oo0òóôöõōōǒŏȯőȫ](?:§[a-f0-9x])*(?:[\s._@%":;()¿?=!&/\^*_\-<>]*)?(?:§[a-f0-9x])*[wwŵẁẃẅ](?:§[a-f0-9x])*(?:[\s._@%":;()¿?=!&/\^*_\-<>]*)?(?:§[a-f0-9x])*)(?![A-Za-z0-9§]), x
The word gets filtered correctly but it doesn’t work on regex101. What could be the reason?
FilterGenerator: https://github.com/SparkCry/FilterGenerator.git

drowsy helm
#

python has it's own things

#

what flavour are you testing against

onyx fjord
#

With formatting stripped

#

And you can use some kind of algorithm

#

To match words

echo basalt
#

replaceText(Pattern.whatever, whatever)

#

ezpz

solid raptor
solid raptor
smoky anchor
#

Fully strip out the color formatting then

#

oh you're not making a plugin but configuring one I guess ok

solid raptor
smoky anchor
#

Ok and how do you intend to use the filters then

thorn isle
#

python raaargh

solid raptor
# smoky anchor Ok and how do you intend to use the filters then

In plugins that use regex filters, blocked words only work correctly when the message has a single color code. When the text includes multiple colors (for example, rainbow text), the filters are ignored entirely, allowing players to bypass restrictions for insults, domains, and similar content.
Guess I just wasted time making a GIF, only to realize I can’t even share it here 😅

- (\b.?cow), horse
- c o w( s )?, horse
- co[00]+w, horse
- planet.?minecraft,another dimension
- pmc,another dimension
- ((\d+\.){3}\d+),another dimension

This type of formatting allows users to easily circumvent the filters.

#cow
- (?<![A-Za-z0-9§])([§a-f0-9x]*[cCçÇ????][§a-f0-9x]*[\s._@%":;()¿?=!&/\^*_\-<>]*?[§a-f0-9x]*[oO0òóôöõø??????][§a-f0-9x]*[\s._@%":;()¿?=!&/\^*_\-<>]*?[§a-f0-9x]*[wW????][§a-f0-9x]*[\s._@%":;()¿?=!&/\^*_\-<>]*?[§a-f0-9x]*)(?![A-Za-z0-9§]), x

This format successfully blocks rainbow-style hexadecimal colors, but it still doesn’t block IP addresses, domains, or server names when using this method.
I’m still new to this, so please bear with me 😅. If there’s already a platform, plugin, or script that supports this format, I’d really appreciate it — I’ve been spending the whole day trying to make it block IPs, domains, and servers properly.

thorn isle
#

pattern.matcher(PlainTextComponentSerializer.plainText().serialize(component))

#

strip all color and formatting before trying to match anything

#

also that regex is unintelligible, you ought to use metacharacters like \w instead of [a-zA-Z0-9]

#

personally though i gave up on regex anti-advertising filters and use text embeddings based classification instead

thorn isle
#

remind me again, is it a guarantee that from a YamlConfiguration freshly loaded from a file/string (i.e. there haven't been any put's with e.g. ConfigurationSerializable objects), calling getValues(true) will return a map consisting purely of string keys, and primitive/list/map values?

#

in other words, there won't be some random Location object there eagerly deserialized already?

slender elbow
#

no, tagged entries (==: org.bukkit.Location or however that is typed) are mapped during deserialization/loading

thorn isle
#

uh is that a "no there won't be locations" or "no there will be locations"

#

looks like the latter

#

very annoying, is there a way to disable it? do i need to load it in manually though snakeyaml?

slender elbow
#

yeah "no it's no a guarantee"
uhhhhhhh probably? i know that a "vanilla" snakeyaml mapper does not use the ==: key for object-mapped entries, that's something bukkit configures, so i think it would be a regular string -> string entry in the map where the key is "=="

#

but that YamlConstructor is the thing that is passed to the yaml library so it does the things

thorn isle
#

right, ty 👍

low marlin
#

How do you hide this in spawner?

#

I've tried Hide additional tooltip but it doesn't work

eternal oxide
#

My guess is you are not using Spigot. Other platforms require additional actiosn to block it

low marlin
#

nope I'm using spigot

eternal oxide
#

or are you using the setHideToolTip ?

low marlin
#
public static ItemStack getSpawner(String name,int price){

        ItemStack i = new ItemStack(Material.SPAWNER);
        ItemMeta m = i.getItemMeta();
        ArrayList<String> lore = new ArrayList<>();

        m.setDisplayName(messageManager.translateHexColorCodes(name));

        

        m.setLore(lore);

        i.setItemMeta(m);

        return i;
    }
eternal oxide
#

I don;t see you hiding anything there

low marlin
#

yeah removed the line

low marlin
#

good to know

#

I'll try it

chrome beacon
#

hide tooltip will entirely remove the tooltip which you probably don't want

low marlin
#

ah yeah

chrome beacon
#

That still exists in .8?

low marlin
chrome beacon
#

Then you are not on 1.21.8

low marlin
#
<dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.21.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
chrome beacon
#

works just fine

#

Just gave it a test

low marlin
#

I'll try refreshing maven

#

yeah it worked

#

I'll try the hide block

#

Yeah it works

#

thanks

old flicker
#

java```

ItemStack oldHelmet;

                    if (chosen.getInventory().getHelmet() != null) {
                        oldHelmet = chosen.getInventory().getHelmet();
                    } else {
                        oldHelmet = null;
                    }

                    if (oldHelmet != null) {
                        chosen.getInventory().remove(oldHelmet);
                    }

                    ItemStack pumpkin = new ItemStack(Material.CARVED_PUMPKIN);
                    pumpkin.addEnchantment(Enchantment.BINDING_CURSE, 1);
                    chosen.getInventory().setHelmet(pumpkin);

                    new BukkitRunnable() {
                        @Override
                        public void run() {
                            chosen.getInventory().remove(pumpkin);
                            if (oldHelmet != null) {
                                chosen.getInventory().setHelmet(oldHelmet);
                                opposingRed.remove(chosen);
                            }
                        }
                    }.runTaskLater(UwpCTF.getInstance(), 200);

I cant get this to work and I am unsure why. I think its silently falling our or nulling somewhere but I am unsure what the cause is. I get no issues in console
#

I did see a 1 in the binding curse, but changing that to 0 also didnt do anything to affect the behavior

chrome beacon
#

What about it isn't working

#

Setting the pumpkin or adding the helmet back

old flicker
#

The punpkin isnt appearing. The helments are not getting removed either, which is interesting

chrome beacon
#

is the code running?

slender elbow
#

you better go catch it then!

old flicker
# chrome beacon is the code running?

I figured it out. It was in a for loop that I intended to end sooner, but for a bunch of code that shouldn't have been contained in it was in the for loop due to a bad }. Whats odd about it is there were no exceptions and not a obvious issue lwith everything else. Oh well, its fixed

chrome beacon
#

you're better off not using remove

old flicker
chrome beacon
echo granite
#

Hey, I'm running maven package from github actions for a 1.8.8 plugin(don't start a useless debate) and getting this error, how can I fix it?

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal on project: Could not resolve dependencies for project
Error:  dependency: net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT (provided)
Error:      Could not find artifact net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
Error:      Could not find artifact net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots)
#

pom.xml:

#
<repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
rotund ravine
#

Find another repo it is hosted in

echo granite
rotund ravine
echo granite
rotund ravine
#

Bungee chat used to be hosted on sonatype

sullen marlin
echo granite
#

maybe a small message about legacy versions can be added

sullen marlin
#

It's a wiki, you could add it 😉

echo granite
#

oh, I had no idea. I will 🙂

sullen marlin
#

Thank you!

#

Could probably just change the url, the reasons for using /snapshots are no longer applicable anyway

echo granite
#

well I just discovered that it's impossible, because I had requested the deletion of my account so according to the rules I can't make a new one.
Hopefully a random reader here will do this.

tribal canyon
#

Hi!

I'm collaborating with a friend of mine who is a very qualified builder (can send qualifications if interested) - I'm an avid worldbuilder. We're planning on starting a youtube building series (with the help of his already very notable youtube friends), and to make those builds into part of an mmorpg minecraft server - if anyone wants to collaborate with us on our passion project, please let me know or ask for more details! :D

To be sure, this is not a post advertising for free labour or anything of the sort - it's only for fun for the both of us, and there are no speed expectations/pressure/deadlines. It's purely a passion project and if it takes off, then that would be great.

wet breach
#

reads a lot like advertising

#

otherwise if it wasn't why would you point out how popular your friend is, or how qualified another person is at building

#

and that you are doing a youtube series

echo granite
tribal canyon
#

Idrk, it was to inspire some faith in the project I suppose

echo granite
#

There's no problem with the intention, it's just not the correct place

tribal canyon
#

Its not done/made with the ultimate intention of monetisation

echo granite
#

This is a programming help channel

echo granite
tribal canyon
#

and im sorry, i assumed it meant help for programming and I guess this is technically a form of asking for a programmer's help

echo granite
#

are you looking for a programmer?

tribal canyon
#

yep

#

I mean my friend is learning java rn to help out and there are some interested people, i wanted to establish a small friendgroup who could nerd out and work on a collaborative creative project for fun

echo granite
#

well, it's still not the correct place, this channel is for getting helping in developing plugins. I think the website has a hiring forum

chrome beacon
#

?services

undone axleBOT
echo granite
#

yeah

#

that

tribal canyon
#

Ah crap now I look like im asking for free labor ;( its very weird to find a way to say things without it being assumed to be one way or the other

#

Ill check it out ;D

#

Sorry guys :(

echo granite
#

All good, everyone makes mistakes 🙂

tribal canyon
#

Would it be okay if my friend who is learning java, to come and ask for someone's help regarding it?

echo granite
#

yeah, this specific channel is exactly the place

tribal canyon
#

Ohh yeah okay - my original understanding was that, but I didn't realise that asking for a programmer to do something vs help with something was distinct

#

tytyty ill stop bothering you

echo granite
#

No bothering at all, without questions we would stay dumb xD

thorn isle
onyx fjord
#

anyone experienced with rabbitmq?

this is my code roughly

            channel.queueDeclare(COMMAND_QUEUE, true, false, false, null);

            commandListener = new CommandListener();
            channel.basicConsume(COMMAND_QUEUE, true, commandListener, tag -> {});

and the listener is just DeliverCallback impl

i have multiple servers running with this exact code, basically what the system does is it publishes a command like so

            plugin.getChannel().basicPublish("", COMMAND_QUEUE, null, message.getBytes(StandardCharsets.UTF_8));

then executes with the listener above

the issue im having is, it seems to not work consistently, some deliveries are lost (i feel like its going round-robin on the consumers), what could be the issue?

#

the above part is in onEnable, the below is inside a commandexecutor

#

all consumers should get the message

abstract rampart
#

Sorry if this has been asked, didn't see it. Is it possible for ItemMeta#setItemModel to fallback to the vanilla texture if the client doesn't have the resource pack? It's showing the purple/black missing texture right now. Or do I just need to use the old method of CustomModelData?

sterile token
#

Helloo, good afternon its been such a long time. I would like to know how JDBC transactions are done, because i cant understand them. I just know that for making a transaction you have to reuse the same Connectio. Because if not the transaction is done in a different context from the other. Right? Could someone lnk me to an example please

eternal night
ivory sleet
pseudo hazel
#

what is that name font

#

did discord do a new nitro thing again?

wintry smelt
wintry smelt
chrome beacon
#

custom biome

wintry smelt
#

i want it to be closer like this

#

rather than this

thorn isle
#

i mean the fog is controlled by the client, no?

#

specifically based on render distance

#

there are some things that can add fog, like the bossbar and the blindness potion effect, but i'm not 100% if they use the biome color

#

blindness definitely doesn't

hardy anvil
#

I'm looking for someone who will update the resource pack from version 1.21.1 to 1.21.4 Minecraft

wintry smelt
thorn isle
#

that'd be worth a try, if you don't mind there being a bossbar

wintry smelt
thorn isle
#

you can't

#

at least not to my knowledge; fog exists purely to hide the render distance, "fog thickness" isn't a biome feature

#

what you can do is send the player a lower server render distance based on the biome they are in, but i maybe foresee that running into issues with the client not retaining chunks correctly

#

and any time the render distance is changed, all chunks get re-rendered, so it would look pretty janky on the client

smoky anchor
#

1.21.11 I will have a feature to control the fog parameters :D

thorn isle
#

neat

#

that'll be nice for immersive bogs and swamps and suchlike

#

mayhaps underground dungeons as well

thorn isle
#

i have no idea but i sort of suspect you have to listen to the craftercraftevent or whatever it is, check the recipe, and cancel it

#

did you confirm that your code actually reaches the setCancelled part? like other than just eyeballing it and figuring that it should work

#

shove a sysout there and see if it fires

#

throw more sysouts at it until you figure where your assumptions about it break down

#

e.g. at the very start to see if the event fires at all (and to sanity check the listener is registered)

#

it sounds dumb but unless you're plugging the server into a debugger, the answer to "why doesn't it work" is almost always to throw more sysouts at it

wet breach
#

shouldn't it be itemtype?

#

since its inventory

umbral ridge
#

how do you get the file name without extension

#

no regex, I think it should be possible with Path but i just cant figure it out

wet breach
#

use split, extension is technically part of the name

umbral ridge
#

what if there is no dot

wet breach
#

then extension is unknown and is just a file. windows hides extensions for appearances but its still there

sullen marlin
#

Use event.getResult not recipe. Mace recipe may be complex

sullen marlin
#

Version?

#

Try latest

#

...

wintry smelt
smoky anchor
wintry smelt
#

ok thanks

smoky anchor
#

It's still biome params, but you can change biomes around the player on the fly

wintry smelt
smoky anchor
#

ye

#

the official change log on minecraft.net may have it formatted better

near furnace
misty nova
#

Hello everyone, joined the discord because my IDE is always being mysterious about why my program doesn't work. This code works:

import java.util.List;
import java.util.UUID;

import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.EquipmentSlotGroup;
import org.bukkit.inventory.ItemRarity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.components.CustomModelDataComponent;

public class ItemHandler {

    public static ItemStack fancy_sword;

    public static void init() {
        createFancySword();
    }

    private static void createFancySword() {
        ItemStack item = new ItemStack(Material.STONE_SWORD, 1);
        ItemMeta meta = item.getItemMeta();
        meta.setItemName("Fancy Sword");
        item.setItemMeta(meta);
        fancy_sword = item;
    }
}```
But when I try to add attribute modifiers it doesn't (it still compiles, but the command I use to give me the item doesn't do anything):
```private static void createFancySword() {
     ItemStack item = new ItemStack(Material.STONE_SWORD, 1);
     ItemMeta meta = item.getItemMeta();
     meta.setItemName("Fancy Sword");
     meta.addAttributeModifier(Attribute.ATTACK_DAMAGE, new AttributeModifier(NamespacedKey.minecraft("ATTACK_DAMAGE"),1.0, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlotGroup.MAINHAND));
     meta.addAttributeModifier(Attribute.MOVEMENT_SPEED, new AttributeModifier(NamespacedKey.minecraft("MOVEMENT_SPEED"),1.0, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlotGroup.MAINHAND));
     item.setItemMeta(meta);
     fancy_sword = item;
 }```
I'm using spigot-api version 1.21.10-R0.1-20251027.210814-6.
thorn isle
#

you need to set the meta back to the item

#

item.setItemMeta(meta)

weak wasp
misty nova
thorn isle
#

do /paper dumpitem while holding the item

#

or if you're not on paper, put it in a chest and then do uh

#

f3+ something to copy the tile entity data

#

and see if the meta is getting applied

#

f3+i

misty nova
#

i can't get the item, the command doesn't work when I add attribute modifiers(i haven't added a recipe, but I doubt it would work)

thorn isle
#

check the console and see if there's an error

short pilot
#

hi guys

#

i was wondering why this is not setting the player's gamemode as intended

#

but other code i put in here to test like message sending works

#
String[] ignoreGroups = {"jailed", "experiment", "spectator", "helper", "admin", "player"};
for (String group : ignoreGroups) {
    if (player.hasPermission("group." + group)) {
        LoggerUtil.debug("Player " + player.getName() + " has permission group." + group + ". Ignoring promote.");
        // Schedule gamemode change for next tick since player isn't fully loaded yet
        Bukkit.getScheduler().runTask(plugin, () -> {
            player.setGameMode(GameMode.SURVIVAL);
            LoggerUtil.debug("Set gamemode to SURVIVAL for " + player.getName());
        });
        return;
    }
}
#

originally i just tried to setGameMode without the scheduler but i thought maybe it was because the player just joined

#

the greater function is here

    @EventHandler
    public void onPlayerLogin(PlayerLoginEvent event) {
        Player player = event.getPlayer();
        LoggerUtil.debug("Player " + player.getName() + " is logging in.");

        if (!player.isWhitelisted()) {
            LoggerUtil.debug("Player " + player.getName() + " is not whitelisted. Ignoring promote.");
            return;
        }

        String[] ignoreGroups = {"jailed", "experiment", "spectator", "helper", "admin", "player"};
        for (String group : ignoreGroups) {
            if (player.hasPermission("group." + group)) {
                LoggerUtil.debug("Player " + player.getName() + " has permission group." + group + ". Ignoring promote.");
                // Schedule gamemode change for next tick since player isn't fully loaded yet
                Bukkit.getScheduler().runTask(plugin, () -> {
                    player.setGameMode(GameMode.SURVIVAL);
                    LoggerUtil.debug("Set gamemode to SURVIVAL for " + player.getName());
                });
                return;
            }
        }
misty nova
# thorn isle check the console and see if there's an error

There is this error, do you know what it means?

    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:218) ~[guava-33.3.1-jre.jar:?]
    at org.bukkit.NamespacedKey.<init>(NamespacedKey.java:85) ~[spigot-api-1.21.8-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.NamespacedKey.minecraft(NamespacedKey.java:177) ~[spigot-api-1.21.8-R0.1-SNAPSHOT.jar:?]
    at com.github.spitelessness.items.ItemHandler.createWitherBrand(ItemHandler.java:33) ~[?:?]
    at com.github.spitelessness.items.ItemHandler.init(ItemHandler.java:23) ~[?:?]
    at com.github.spitelessness.App.onEnable(App.java:16) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267) ~[spigot-api-1.21.8-R0.1-SNAPSHOT.jar:?]```
thorn isle
#

in the onEnable method

#

at com.github.spitelessness.App.onEnable(App.java:16)

#

follow the call here to ItemHandler line 23 and ItemHandler line 33

misty nova
thorn isle
#

something you are doing there is trying to construct an invalid NamespacedKey

#

you're passing it ATTACK_DAMAGE when it only accepts letters a-z, numbers 0-9, forward slashes, periods, underscores, and dashes

#

java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9/._-]: ATTACK_DAMAGE

misty nova
thorn isle
#

i have no idea what you're talking about

misty nova
#

What should I do instead of NamespacedKey.minecraft("ATTACK_DAMAGE")?

thorn isle
#

you need to provide a valid namespaced key

#

one that consists of the letters a through z, digits 0 through 9, periods, underscores, forward slashes, and dashes

#

yours has uppercase letters which is not valid

#

so the first thing i'd try is making it lowercase

thorn isle
#

it's very hard to give any useful help when i can't see the code

#

either way, try with a lowercase key

#

namespaced keys cannot have capital letters in them

thorn isle
#

try PlayerJoinEvent instead of login

#

login happens much earlier than join and i'm pretty sure it could be more than just 1 tick until the player is actually physically in the world

misty nova
thorn isle
#

i honestly don't know how to make them green

thorn isle
#

the join event fires directly before or maybe after, i don't quite remember, the player is added into the world

native hedge
#

Good evening, I wanted to ask how to set the name tag, not before the name, but the whole name tag.

thorn isle
#

no clue what you mean but maybe Player::setDisplayName

native hedge
young knoll
#

Don’t think you can easily change the name tag for players

thorn isle
#

what's the name tag

young knoll
#

Other than the hacky method of attaching another entity as a passenger

thorn isle
#

the text over a player's head?

young knoll
#

Yes

native hedge
thorn isle
#

get a plugin that does the hacky shit for you i suppose

young knoll
#

Alternatively mess with NMS and PlayerProfile

native hedge
thorn isle
#

i know TAB does it but that's not really the main point of the plugin

#

i mostly notice it as an undesired side-effect

#

i'm sure there are many plugins for it though, perhaps ask in #help-server where the server admins frequent, or try googling a bit

misty nova
#

How do I get the item meta / item name of a dropped item? I have an event handler to cancel EntityCombustEvent, but I don't know how to check if it's the specific item I want.

sullen marlin
#

get entity, cast to item, get item stack

#

get meta, get name

misty nova
rotund ravine
#

Item is an entity class

#

(Item)

misty nova
# rotund ravine (Item)

Would this work?

if (item.getItemMeta().getItemName() == "Item Name") {
    event.setCancelled(true);
}```
rotund ravine
#

Bro

#

The Item entity class, not ItemStack

sullen marlin
#

No you need to cast to Item first, not ItemStack

thorn isle
#

despair

sullen marlin
#

Do you know java?

misty nova
sullen marlin
#

You also shouldn't use == on strings, use . equals

weak wasp
mortal vortex
#

PDC is satanic black magic. if it didnt exist in 1.7.3, dont use it

misty nova
misty nova
weak wasp
#

Looks like it would work to me

sullen marlin
#

Yes

#

Add an instance of Item before casting to not error when other items combust

#

Probably also want to check there are model data/strings

#

And java starts indexing at 0

sullen marlin
#

What happens to your code if something other than an item combusts

misty nova
# sullen marlin What happens to your code if something other than an item combusts

This should work, right?

public void onEntityCombust(EntityCombustEvent event) {
    if (event.getEntityType() == EntityType.ITEM) {
        Item item = (Item)event.getEntity();
        if (item.getItemStack().getItemMeta().getCustomModelDataComponent().getStrings().get(1) != null) {
            if (item.getItemStack().getItemMeta().getCustomModelDataComponent().getStrings().get(1).equals("uc")) {
                event.setCancelled(true);
            }
        }
    }
}```
sullen marlin
#

Model data component can't be null

#

You need to check get strings isEmpty and also change 1 to 0

wraith dragon
thorn isle
#

🤡

mortal vortex
#

All my plugins just write CSV data inside a book and place it in an item frame at 0,0.

rotund ravine
#

Don’t listen to abb3v

#

Atleast place it in a infinite glitched (int limit) storage chest of books at 0,0

mortal vortex
#

oooh yeah I gotta start doing that

pliant topaz
#

too advanced for me, i store my data with 16 different blocks as values in a separate dimension and stack em

sullen marlin
#

Better to store the info as a binary set of blocks with stone =1 and dirt =0

twilit egret
#

Hi,
I’m extending the supported versions for my plugin which currently supports 1.17-1.21.1. 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
pseudo hazel
full vessel
#

Hey there,

I’m a verified Minecraft plugin developer on BuiltByBit and primarily release paid, high-quality plugins. However, I’m currently not eligible for premium plugin uploads here.

You can verify my legitimacy and past work through my existing BuiltByBit resources:

I’m a trusted and experienced developer with a consistent record of quality work and community trust. I’d greatly appreciate a manual verification so I can list and sell my premium plugins here as well.

Thank you.

chrome beacon
full vessel
eternal oxide
#

Litterally will not happen. Others have asked. There are rules for premium plugins, you need to abide by them.

full vessel
# eternal oxide Litterally will not happen. Others have asked. There are rules for premium plugi...

I completely understand and respect the rules — I’m not asking to bypass them, just to be considered under the intent of the Premium Resource Guidelines

As stated there, the purpose of the premium system is to ensure that developers who provide quality plugins and proper support are able to publish premium resources. I’ve already demonstrated this standard through multiple paid resources on BuiltByBit with proven support history and positive reception.

Since I’ve already met the quality, consistency, and community trust standards outlined by SpigotMC, I believe this should be sufficient proof of credibility for manual review or early eligibility.

They should consider introducing a manual verification process for developers who can provide clear proof of their legitimacy and quality of work.

worthy yarrow
#

Are you ai?

full vessel
#

im writing this in my native language and using gpt to enhance and translating.

worthy yarrow
#

Kek no wonder it’s written like a book

full vessel
#

at the end of the day its understandable.

worthy yarrow
#

Yes it is

twilit egret
# eternal oxide why not just use the new PlayerInput event? and yes its a toggle

Hey, thanks for the suggestion — I just checked out the PlayerInputEvent docs, and yeah, it looks like a clean, built-in way to handle this since 1.21.2. The getInput() method pulling from the Input object seems straightforward for grabbing forward/backward/left/right/jump/sneak flags without diving into packets.
One question though, does it fire every tick while in a vehicle (even if inputs don't change), or only on changes? The docs say it's for "updated input," but if it's a true toggle/every-tick event like the forum reply hinted, that could solve my hold-to-move issue perfectly without PacketEvents.
Tempting to switch for simplicity (especially since it's experimental but stable in 1.21+), but I'm already deep into PacketEvents for cross-version support down to 1.17. Have you used it in a vehicle plugin? Any gotchas with sneaking (dismount) or jumping (my nitro trigger)?

eternal oxide
#

I believe it fires on a state change

weak wasp
# full vessel I completely understand and respect the rules — I’m not asking to bypass them, j...

Section Requirements
We regularly change the requirements for authors to participate in this section to help moderate supply and demand. As it stands the current requirements are:
8 week old account
80 messages (forum posts) + 20 positive ratings
3 free resources
Two-step verification enabled
Save your backup codes (print them out)! We will not reset accounts who have lost their backup codes.
In the five years which we have run this section for, not once has a user failed to be promoted within one hour of meeting these requirements. Do not contact us about being unable to use this service.

Last line right there: "Do not contact us about being unable to use this service."

chrome beacon
#

Not to mention the do not use discord as a way of contacting staff rule

pseudo hazel
#

also like why do you not qualify?

#

do you not have any free resources I guess?

#

I think the requirements are not just about being trustworthy

#

its just about being a good citizen on the platform and active contributor before you can make use of the premium features

weak wasp
#

It's usually the 80 messages +20 positive ratings that get people.

ancient plank
#

?support

undone axleBOT
weak wasp
#

Yeah I passed these requirements without even trying...

full vessel
full vessel
ancient plank
#

just make some easy plugins

weak wasp
ancient plank
#

like a discord bot or some qol things like nametag rendering

pseudo hazel
#

see it as an investment

full vessel
#

actually i already released 3 free plugins..

#

now i need to message 80 times right?

weak wasp
ancient plank
#

just spend some time replying to help requests or yeah make a meaningful post

pseudo hazel
#

looking at that picture getting the 20+ positive ratings is also not very straightforward

weak wasp
pseudo hazel
#

well yeah its just more that getting 20 positive ratings is not as easy as dumping 3 resources on there and twiddling your thumbs, well I guess it highly depends on the resources and the wind direction of the day

weak wasp
#

Premium resources can be hard to sell anyways. I released one like 2 weeks ago, and it has 0 downloads.
Maybe I should make a slimmed down free version.

pseudo hazel
#

yeah I mean premium resources depend even more on what the actual resource is

#

if its like custom item plugin 126 its a hard sell

weak wasp
#

Yeah, mine is pretty niche. It integrates Twitch streams into Minecraft. So basically you need to be a Twitch streamer with your own Minecraft server.

pseudo hazel
#

yeah

#

and then there are probably other ones that do it too

weak wasp
#

I couldn't find any other ones that do what mine does. There are a bunch that take Twitch chat and put it into Minecraft though. Mine can do both Twitch to Minecraft and Minecraft to Twitch.

pseudo hazel
#

fair enough

weak wasp
#

I got the idea from a plugin request, so I figured at least the guy requesting it would want it...

pseudo hazel
#

I have def seen streamers use twitch integration in MC but that was probably a mod or something

#

lol

weak wasp
#

I think the coolest part about the plugin is that you can use channel point redemptions to give people stuff in game, so like diamonds or flytime.

#

You can also give ranks to followers and or subscribers. Plus there are announcements and custom commands for a ton of twitch events, like hype trains, raids and such

#

I'm thinking if I make a free version I only do chat mirroring and follow and subscribe events and not include support for 1.8

autumn zinc
#

How i can connect postgresql jdbc driver to a spigot plugin? A gradle dependency isn`t working, and another ways in the google search

remote swallow
#

do you have the gradle shadow plugin added

autumn zinc
remote swallow
#

did you declare the depenency as implementation and run the shadowJar task anduse the -all jar?

autumn zinc
#
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
    id "java"
    id "com.gradleup.shadow" version "+"
}

group = "iwust"
version = "0.1"

repositories {
    mavenCentral()
    maven {
        name = "spigotmc-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
}

dependencies {
    compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
    implementation("org.postgresql:postgresql:42.7.7")
    implementation("org.jetbrains:annotations:26.0.2")
}

java {
    sourceCompatibility = JavaVersion.VERSION_21
    targetCompatibility = JavaVersion.VERSION_21
    toolchain.languageVersion = JavaLanguageVersion.of(21)
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = "UTF-8"
}

tasks.named("shadowJar", ShadowJar) {
    archiveFileName = "${rootProject.name}-${version}-all.jar"
    relocate "org.postgresql", "shadow.postgresql"
}

tasks.build {
    dependsOn(shadowJar)
}
chrome beacon
#

What happens when you run it

autumn zinc
#

When i use DirverManager.getConnection(...), i catch SQLException - "No suitable driver found for"

eternal oxide
#

You may need to merge your metainf service files

#

in your ShadowJar task include mergeServiceFiles()

#

not sure postgre can be relocated though

autumn zinc
#

like this?

tasks.named("shadowJar", ShadowJar) {
    mergeServiceFiles()
    archiveFileName = "${rootProject.name}-${version}-all.jar"
    relocate "org.postgresql", "shadow.postgresql"
}
eternal oxide
#

?tryitnadsee

#

if I could type

#

?tryitandsee

#

hm

eternal oxide
#

open your jar and look to see if postgre has a service file in meta-inf

ancient plank
#

?tryandsee

undone axleBOT
eternal oxide
#

and check postgre driver is present in the jar and properly relocated

autumn zinc
autumn zinc
eternal oxide
#

no clue then

#

when I use postgresql I don;t package the driver

autumn zinc
#

so how?

eternal oxide
#

just add it to the dependencies section of the plugin.yml

remote swallow
#

might be worth Class.forName'ing the driver

eternal oxide
#

libraries

#
libraries:
    - org.postgresql:postgresql:42.4.2
    - com.h2database:h2:2.1.214
    - mysql:mysql-connector-java:8.0.30
    - org.mariadb.jdbc:mariadb-java-client:3.0.7
    - com.zaxxer:HikariCP:5.0.1
    - org.slf4j:slf4j-api:2.0.0```
autumn zinc
autumn zinc
eternal oxide
#

no

#

if you add its reference to teh plugin.yml Spigot will download it at startup

autumn zinc
eternal oxide
#

same error?

autumn zinc
#

yes, "No suitable driver found for"

eternal oxide
#

show some code then

autumn zinc
#

sql connection code?

eternal oxide
#

this is my data

DRIVER = org.postgresql.Driver
URL = jdbc:postgresql://%HostName%:%Port%/%DatabaseName%?characterEncoding=utf8```
autumn zinc
#

?

autumn zinc
eternal oxide
#

what is your url?

autumn zinc
eternal oxide
#

looks fine

#

before your call to DriverManager do a Class.forName("org.postgresql.Driver");

autumn zinc
#

I have to pay you

ionic geyser
#

i want a server developer

#

@autumn zinc

smoky anchor
undone axleBOT
mortal hare
#

https://gitlab.gnome.org/GNOME/mutter/-/issues/4416
gnome users: if you experience key being stuck in an xwayland app whilst closing an app or switching the workspace, newest version of mutter broke the correct behaviour
there's already a revert commit being made, but until proper fix is being rolled out i suggest blacklisting gnome-shell and mutter from updating

pseudo hazel
#

can you like use a pasting site for the code?

#

?paste

undone axleBOT
tawny osprey
#

Anyone got a good guide on how to use MySQL to setup a database for my plugin?

weak wasp
cursive kite
#

With removal of obfuscation will NMS become easier to work with?

chrome beacon
#

just working with it in general, no not really

wet breach
# cursive kite With removal of obfuscation will NMS become easier to work with?

it depends really. This is advantageous to those who want to run custom servers though because all that is needed is to really just decompile and do some fixing up. Before part of the decompiling you needed mappings and while although mojang did provide some mappings not everything was deobfuscated. So now there will be, hopefully, no more guessing

#

as for the current forks, it just saves a step in the decompiling process in no longer needing to remap stuff. As for NMS stuff you wouldn't need to reobfuscate or have to worry about deobfuscated vs obfsucated stuff lol

undone kernel
#

improvements?

viscid carbon
#

Fix your names

undone kernel
#

nah

frail willow
undone kernel
viscid carbon
#

"BagFuck"

orchid trout
#

just move on really

undone kernel
undone kernel
orchid trout
#

you dont need methods if youre only gonna use them once

undone kernel
#

what methods are only used once

orchid trout
#

there is one

#

but youre also just

viscid carbon
orchid trout
#

doing ryetrarded stuff

#

like the isnull method

#

why do you need that

#

just check if its null

undone kernel
viscid carbon
#

if (p == null)

#

no need to make 1000 methods when you have an ide that auto completes everything you do.

#

more methods = more confusing.

orchid trout
#

method names have to be descriptive

viscid carbon
#

whats heal() doing?

undone kernel
viscid carbon
#

not what i meant

undone kernel
#

it gets the max health attribute checks if thats null if not grabs the value then applies it to the player

viscid carbon
#

Player#setHealth?

#

why do you need to check anything if your just healing a player?

undone kernel
#

comparison

undone kernel
mortal vortex
#

@NotNull brudda

buoyant viper
ivory sleet
buoyant viper
ivory sleet
#

classical

analog lantern
#

well there’s a space in the c# version but

#

Why are all of your local variables final 😭

naive loom
#

force of habit

ivory sleet
#

wouldnt really make sense to have that in Java

analog lantern
#

is in c# is just == in IL iirc but yes you’re correct

#

is will ignore all overloads when compiled

#

That’s why it breaks unity

ivory sleet
#

yea but like in Java having something like isNull is pretty useless, unless you're using it to pass a method ref

#

since java doesnt have op overloading

analog lantern
#

Yeah just use !=

#

Or don’t check it, let the user deal with the consequences.

#

Man people that use Objects.requireNonNull because they don’t know what it does and just click “Show context actions”

#

Those people are silly

ivory sleet
#

yea nullability sucks anyway

analog lantern
#

it’s not bad, no, but often when you see it

#

It’s people who don’t understand what it does

#

Using it to get rid of a warning

ivory sleet
#

eh idk

analog lantern
#

And then their code nullptrs wow who could’ve predicted this

ivory sleet
#

maybe back in the days that was probably the case

#

or if ur looking at some beginner's code

analog lantern
#

Yeah that’s what I mean

#

I’ve been using Java for several years now though and I don’t actually think I’ve used it for anything

#

It’ll nullpointer when you try to use the object anyway

ivory sleet
#

I've used it for LivingEntity#getAttribute for example when I know that it will never be null

analog lantern
#

Then why use it?

ivory sleet
#

to make IDE stfu, and because I can navigate it through IDE, to find all those places where I assert an invariant

analog lantern
#

I mean you can disable that with a comment

ivory sleet
#

You you can suppress that with an annot also

analog lantern
#

Yep

#

in c# you can do it with an exclamation point

ivory sleet
#

but like, then if it should yield with rnn, I directly know I was wrong about my perception of the system and its invariants

analog lantern
ivory sleet
#

Ig its similar to if u use checkers framework and you write nullability proofs ie

#

but checker's a pain

quaint mantle
#

Cope and write extra null checks

ivory sleet
#

never too many null checks

analog lantern
analog lantern
#

Null check the variables you just set

#

Gotta make sure

ivory sleet
#

yea, dont want a miracle to alter the correctness of ur alleged program

ivory sleet
ivory sleet
#

(imo)

#

fr

analog lantern
#

That being said, I’ve noticed, at least in the dev circles I’m in, that kotlin and java communities have worse relationships than c# and java ones

#

Like kotlin users dislike Java more

ivory sleet
#

lmao yea

quaint mantle
#

val a = b?.c?.d?.e() ?: throw NullPointerException()

ivory sleet
#

I mean Kotlin is nice, but it feels like every kotlin project I'm on, I will be surprised by how different conventions, patterns and designs they each will use

where as in Java there's a bit more concistency, tho this is just my opinion based on experience, and by no means trashing on kotlin

analog lantern
#

But with var

echo basalt
#

yeah every kt project is a little different

#

some are incredibly thrown together

#

some are incredibly consistent

ivory sleet
#

yup

echo basalt
#

I personally prefer the thrown together ones

analog lantern
#

I have made plugins and mods in both kotlin and java at the same time before to piss off all communities

quaint mantle
echo basalt
#

I usually go for java and I use kt for exposed if I have to

echo basalt
#

just make a lil object or two for all the database handling and yeet @jvmstatic on it all

analog lantern
#

Considering making a silksong mod in Java and transpiling it to IL with IKVM.NET

quaint mantle
analog lantern
ivory sleet
echo basalt
#

I've been playing with webdev in kt lately

#

using ktor and stuff

analog lantern
#

But you should make it throw a badimageformatexception to confuse people

undone kernel
soft dagger
#

im looking for a dev who help me to set my server

undone kernel
soft dagger
undone kernel
cold mason
#

I have a project for someone and willing to pay pretty good Anyways I need to reverse engineer cosmic client and make a cheat that can inject into it.

mortal vortex
#

This is a haxxor community afterall

echo granite
dry hazel
#

trolling

analog lantern
echo granite
undone axleBOT
echo granite
#

Irrelevant to here.

thorn isle
#

for free

soft dagger
soft dagger
pseudo hazel
#

no not DM, make a post on the forums

thorn isle
#

you can dm me for sending-me-money purposes

echo granite
soft dagger
chrome beacon
#

This is the wrong place to ask

hushed spindle
#

?paste

undone axleBOT
outer ember
#

WHY
Every single time i code a command
it has to dont work and return usage

thorn isle
#

you probably didn't register it

outer ember
#

ugh

thorn isle
#

show code

outer ember
#

what ussually cause this problem

thorn isle
#

it will print usage if

  • it is not registered
  • the registered command executor returns false
#

use a paste site to paste your 700 lines

undone axleBOT
thorn isle
#

it's one of them, otherwise it wouldn't print usage

outer ember
#

Its in a txt file

#

lemme upload it somewhere

chrome beacon
#

Just use one of the paste sites above

thorn isle
#

paste your server log as well, since your plugin could e.g. explode before registering the commands

outer ember
#

Yeah ur right

#

ty

sweet cloud
#

Hello, im opening my skyblock server in 1 hour but the custom resourcepack that I made doesnt work. Can somebody help? It says 'resource reload failed'.

sweet cloud
#

Mc pack.

smoky anchor
#

And did you just put the link in server.properties ?
Did you include the sha ?

sweet cloud
#

No, I use Skript.

smoky anchor
#

Then ask Skript

#

Don't fucking DM me with this
I said ask Skript

#

I don't know skript

sweet cloud
#

Skript isnt a person...

smoky anchor
#

ask the discord server

sweet cloud
#

But the problem isnt in Skript.

#

Its with my resourcepack.

smoky anchor
#

Check client log to see why it failed loading

sweet cloud
#

Okay, thanks mate.

smoky anchor
#

But if it works on client and not when you send it from server and you send it with skript whatever bs, then you should ask them

outer ember
mortal hare
#

I'm skeptical of Mojang removing obfuscation from the game, sure obfuscation brings no benefit to anyone (because mappings exists anyways), but to me it feels like they're trying to refactor game to be data driven as possible and then they will put it in maintenance mode in favour of bedrock edition

eternal night
#

kekwhyper cannot even call that a wild take, pretty sure your cat ran over your keyboard

#

Ah yes, let me invest endless hours of developer time into cleaning up tech dept in our codebase to then put the product into maintenance mode

#

I also do a full rewrite of my projects before I abandon them for shits and giggles

buoyant viper
#

java edition aint bringin in the cash anymore fr

buoyant viper
#

git commit -m "big cleanup + refactor" && git push

Last commit 7 years ago

mortal hare
#

that's almost the same thing that Sun Microsystems did when they got bought by Oracle

#

they open sourced the jdk before getting bought

#

knowing that java edition is not profitable to them i see this as an effort to make compromise between community and mojang

#

there's a reason why java edition losts its branding as just minecraft

young vine
thorn isle
#

i see it more as them trying to emulate roblox, which during the covid shutdowns and thereafter beat everything else out of the water with its ease of customization

#

doesn't make financial sense for them to pretty it up and then leave it as abandonware; i doubt the suits calling the shots really value "community sentiment" enough to put that much effort into just making amends

#

rather than abandonware, i foresee a simple interface on realms for installing mods, simple enough for a child to use, because that's where java edition makes its money; children's pocket money spent on realms

#

they tried this all the way back during the craftbukkit fiasco with the official "modding api" but it never went anywhere, we'll see what'll happen this time

bold nebula
#

We are in the same boat

naive loom
#

Does anyone here have an expertise with packets? I'm running into an issue where my client isn't acknowledging the block changes, the packet creation code with the positions works fine (you'll see the #createPackets) as it is used when players load chunks. The particles appear correctly at the position and I've tested to see if the positions were right by sending a block change above the block I'm trying to modify and they appear, so it seems to just be ignoring the packet? (I also know these packets are being sent as I am logging all packets in the console)

https://pastes.dev/1kEyh7gfFO

chrome beacon
#

sounds like something else is updating your blocks

naive loom
#

nothing should be modifying the block could it be because I’m cancelling the digging packet the client doesn’t want to receive an update?

chrome beacon
#

Are you currently breaking the block when the issue is happening

naive loom
#

However if I interact with a block around the batch of blocks it will then display the packets coming in.

torn shuttle
#

I just had a really stupid idea

#

train an ai model on a movie

#

just one movie

#

but with a generic base model

#

then tell it to play that movie back

#

but crank the temperature

#

would it come up with different lines and endings?

#

imagine if each time you went to see lord of the rings in the theater you kinda got a similar movie to the original but at some point it kinda starts hallucinating a new path

#

like boromir just tanks all of those crossbow bolts

#

and takes the ring too

#

or gandalf takes the ring

rancid hatch
#

yo i made a plugin but its not working very good can som1 help me pls

#

it kinda works but some thing sdont work

undone kernel
rancid hatch
#

so i made a kinda bliss smp but also kinda merged with strength but some of the shards dont work

drowsy helm
#

without code we can't tell you much

torn shuttle
rotund ravine
#

?nowork

#

Sad

#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

torn shuttle
#

ok like I expected it to work good with no bugs, but instead it is running like doodoo with lots of bugs. help

#

here's my code

package

I haven't written the rest yet

undone kernel
torn shuttle
#
;package
undone kernel
torn shuttle
#

works great thanks

undone kernel
buoyant viper
#

wtf was i typing?

#

like that has been sitting here in my message box for like 5+ hours

jagged thicket
#

in ur client

#

atleast in that device, even if u restart discord

mint barn
#

Hi everyone,
I'm trying to create a new world programmatically using WorldCreator with Paper 1.21.10, but I keep getting this error:

java.lang.ClassCastException: class net.minecraft.world.entity.EntityType cannot be cast to class net.minecraft.util.debug.DebugSubscription (net.minecraft.world.entity.EntityType and net.minecraft.util.debug.DebugSubscription are in unnamed module of loader java.net.URLClassLoader @4e515669)
        at net.minecraft.util.debug.LevelDebugSynchronizers.<init>(LevelDebugSynchronizers.java:36) ~[paper-1.21.10.jar:1.21.10-100-e8c6ba5]
        at net.minecraft.server.level.ServerLevel.<init>(ServerLevel.java:216) ~[paper-1.21.10.jar:1.21.10-100-e8c6ba5]
        at org.bukkit.craftbukkit.CraftServer.createWorld(CraftServer.java:1300) ~[paper-1.21.10.jar:1.21.10-100-e8c6ba5]
        at org.bukkit.Bukkit.createWorld(Bukkit.java:828) ~[paper-api-1.21.10-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.WorldCreator.createWorld(WorldCreator.java:494) ~[paper-api-1.21.10-R0.1-SNAPSHOT.jar:?]

My code here

WorldCreator worldCreator = new WorldCreator(name);
        worldCreator.environment(environment);
        worldCreator.type(WorldType.NORMAL);
        worldCreator.createWorld();

any idea?

winter jungle
#

ask paper

chrome beacon
#

^^ this

mint barn
#

I'm posting here because I tried with Spigot but I got the same result

dark moth
#

?whereami

dark moth
#

Oh yea this one

#

I got hit with it aswell

eternal oxide
#

Give us a spigot error and we'll help

mint barn
#

I just told you that I get the same error message whether I'm using Spigot or Paper...

eternal oxide
#

No you don't, You get a similar one, not the same

mint barn
eternal oxide
#

We are not here to support paper, only spigot

mint barn
#

I just mentioned that I'm getting this error message: java.lang.ClassCastException: class net.minecraft.world.entity.EntityType cannot be cast to class net.minecraft.util.debug.DebugSubscription (net.minecraft.world.entity.EntityType and net.minecraft.util.debug.DebugSubscription are in unnamed module of loader java.net.URLClassLoader @4e515669) on both Spigot and Paper. I switched from Spigot to Paper to try and fix this problem, and I got the same error. I want to know if anyone else has experienced this issue.

eternal oxide
#

You are in McDonalds complaining about a Burger King meal.

chrome beacon
#

Send the stacktrace from Spigot

mint barn
eternal oxide
#

EXACTLY

mint barn
#

You seem very excited. You don't understand the context and you're focusing on the word "paper"

chrome beacon
#

You seem to want to argue with us instead of providing actually useful information

mint barn
#

I just want to tell this dear friend that I didn't come here by chance; I initially encountered this error on Spigot, as I mentioned earlier

eternal oxide
#

Then give us teh stack trace from spigot

chrome beacon
#

then you already have the log

#

You don't have to make this so hard

winter jungle
#

or just ask in the paper discord if you want to use paper

pseudo hazel
#

look, arguing over it isnt worth it, these guys are stubborn. during this conversation I could have spun up a dozen servers to get an error log, its just not worth the effort to argue

eternal oxide
#

Spigot and Paper do things differently under the hood. Some errors only happen on paper, so prove to us you have the exact same error on Spigot and we can help you.

pseudo hazel
#

but yeah just asking in paper discord is a good option too

mint barn
#

Never mind, I'll go to the Paper Discord server. Thanks again

dark moth
#

hov fix

#

idk if this ss is enough, just tell me where should i ss

thorn isle
#

failed to execute goal compile

#

it doesn't compile

#

there's a compilation error

dark moth
#

do u recommend any ways to fix it ?

eternal oxide
#

look earlier in the log to see where it errors

dark moth
#

alr

#

theres some warnings aswell

#

should i ss them ?

eternal oxide
#

?paste

undone axleBOT
dark moth
#

oh

#

forgor