#help-development

1 messages ยท Page 852 of 1

valid burrow
#

np

#

lmk if u need anything

twin venture
#

Hello , what do you think is the best way to handle multi user structure?

like :
User [UUID]
UserStats [use User UUID if possible ,Kills,Deaths , etc]
UserCosmetics [use user uuid if possible , cosmetic id (integer)]
UserArena [use user uuid if possible, Arena , other data]

#

in a database for example :
sql

#

i was thinking about using ormlite, but i keep getting errors while creating a 3rd and 4th user

#

it doesn't work for them

chrome beacon
#

foreign key the user (and possibly arena)

twin venture
chrome beacon
#

yeah

#
viral temple
#

Does anyone knows if there's a difference between org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder and java.util.Base64 when encoding/decoding data?

dry hazel
#

I mean, just use the standard j.u.Base64

viral temple
#

i've made the mistake of going with Base64Coder from snakeyaml and now it's causing problems..

viral temple
#

fffffffffffffffffffffff

#

ck.

wet breach
#

snakeyaml base64 uses RFC 1521

and Java Util Base64 uses RFC 4648 and RFC 2045

viral temple
#

i know spigot updated it.

wet breach
#

not that I am aware, its always used that rfc

upper hazel
viral temple
#
        if (item != null && item.getType() != Material.AIR)
            try {
                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                BukkitObjectOutputStream dataOutput = new BukkitObjectOutputStream(outputStream);
                dataOutput.writeObject(item.serialize());
                return Base64Coder.encodeLines(outputStream.toByteArray());
            } catch (IOException ex) {
                this.plugin.getLogger().log(Level.WARNING, "Failed to encode item!", ex);
            }
        return "";
    }

    @SuppressWarnings("unchecked")
    public ItemStack decodeItemStack(String data) {
        if (data != null && !data.isEmpty())
            try {
                ByteArrayInputStream inputStream = new ByteArrayInputStream(Base64Coder.decodeLines(data));
                BukkitObjectInputStream dataInput = new BukkitObjectInputStream(inputStream);
                return ItemStack.deserialize((Map<String, Object>) dataInput.readObject());
            } catch (IOException | ClassNotFoundException ex) {
                this.plugin.getLogger().log(Level.WARNING, "Failed to decode item!", ex);
            }
        return null;
    }```
#

this is what i'm doing with it

wet breach
#

it just means that while both work similarily you can't expect to mix and match which base64 encoder/decoder you are using and expect to get the output/input you are expecting

viral temple
#

but it's causing problems lately

wet breach
#

I think I have a base64 encoder that I used

wet breach
#

heres a link to the code

#

feel free to copy if you want its MIT afterall

echo basalt
#

good ol' frosty always linking to the same project

viral temple
wet breach
echo basalt
#

speaking of, imma start a new open-source project

#

a quest plugin

#

as part of a trial plugin for a german server

#

they offering 30$/hr

wet breach
#

good luck, we haven't had a decent quest plugin in a while

viral temple
wet breach
#

well, my code isn't from the forums

#

its just one of my defunct plugins XD

#

but the code is working code

#

so if you are having issues, could just look to see what you are doing differently or wrong ๐Ÿ˜›

echo basalt
#

A couple hours after I got a DM commissioning me a project for like 2-3k

#

I guess today's a good day

wet breach
#

now you can pay off all them debts ๐Ÿ™‚

echo basalt
#

"them debts"

#

I have like 60 bucks worth of credit to pay off

wet breach
#

lol

chrome beacon
#

Debt free uwu

echo basalt
#

I paid off the apartment last week

#

And my brother for the desk

wet breach
#

I have like $3k of debt to snap-on

echo basalt
#

been living on money saving mode for a while

#

have like 30 bucks in my wallet and a solid 10 on paypal and I can last the month

#

gotta hit the barber tho

upper hazel
echo basalt
#

just live in a poor country

wet breach
echo basalt
#

I live in portugal, minimum wage is close to 4$/hr

#

30/hr is enough to live comfortably working 10h/week

upper hazel
#

unstable clients?

echo basalt
wet breach
#

there is no job security in it unless you work for something like hypixel where its a full fledge business and everything

echo basalt
#

Sometimes people don't want to pay up

#

Sometimes you get fired for no reason

#

Or your customers just disappear from the face of the earth (happened to me a solid 8 times already)

upper hazel
#

I take it you were lucky with the office?

echo basalt
#

They'll come back 6 months later with some BS excuse and cancel the project entirely

wet breach
#

but most people who are entering the plugin market really missed the peak time for selling plugins and joining servers etc

upper hazel
#

and it seems easier to become a backend developer than to write plugins lol

echo basalt
#

Yeah market's dying

#

tbh most plugin devs fall into like 3 stereotypes

wet breach
echo basalt
#

In one hand you have the third-world-country plugin dev

#

from india, turkey, brazil type deal

#

charges 4$ an hour

#

is either 14 or 24, no in between

#

On another hand you have your german dev

#

usually 17-20, excellent math skills, charges like 35/hr

#

And then there's the rest

#

no math skills

upper hazel
echo basalt
#

either a god or complete trash

wet breach
upper hazel
upper hazel
wet breach
#

like a back end developer could be developing tools to help manage the servers etc, which most people don't know how to do and I probably wouldn't really trust a plugin dev to randomly know how to make these things either, because security comes into play for a lot of this as well and your typical plugin dev has not a clue about security XD

wet breach
upper hazel
echo basalt
#

Here's the thing

#

Minecraft servers are backend

upper hazel
wet breach
# upper hazel Doesn't Spring provide security?

maybe? idk I don't use it, but you can't expect something to provide security and be all good, your developers actually have to know security too so that the code they produce isn't at risk of causing security risks/breeches

upper hazel
#

Well, I have to try, Iโ€™ll tell you how it is when I get settled

#

A friend of mine who created websites and made plugins told me so

upper hazel
#

As far as I've heard from startups, the quality of their code suffers greatly due to their deadlines

#

this is a guess but it makes sense

twin venture
#

Hi uhh , iam getting a bit a problem :
so i have a abtstract run method that is located in CosmeticFunction but when i implement it in CosmeticWrapper , it does not work , it run the empty method , and not the one in AnvilRainCosmetic ..
the user have AnvilRainCosmetic

#

this is how i have it :

#

any idea why it does not work ,-,?

wet breach
#

but most start ups in the mc world are done by kids

#

and of course kids have no clue about security

#

hence why they are mostly the victim of most attacks

echo basalt
#

toss it all on a ?paste

#

?paste

undone axleBOT
echo basalt
#

bruh

wet breach
#

also kids have tend to have unrealistic deadlines as well, and this isn't just true with kids but people who are not familiar with coding at all as well

echo basalt
#

yeah deadlines was something I kept getting wrong at the start

upper hazel
echo basalt
#

gotta write a whole tycoon game

#

I'd estimate like a week for it lmao

#

it's closer to 3 weeks if we account for testing and fine tuning

wet breach
valid burrow
upper hazel
echo basalt
#

intermediate

#

I'd say 2020

#

I worked like crazy to save up for my pc and after a solid 80 hours of work I saved up 300 bucks

sterile flicker
#
ItemStack item = new ItemStack(Material.STICK);
                    ItemMeta meta = item.getItemMeta();
                    meta.setCustomModelData(1);
                    item.setItemMeta(meta);
                    player.getInventory().addItem(item);
``` SumeruPack/assets/sumeru/blockstates/ak47.json```json
{
    "variants":
    {
        "normal":
        {
            "model": "sumeru:ak47"
        }
    }
}
``` SumeruPack/assets/sumeru/models/item/ ```json
{
    "parent": "sumeru:models/block/ak47",
    "display":
    {
        "firstperson_righthand":
        {
            "translation": [0, 5, 0],
            "scale": [1.25, 1.25, 1.25]
        }
    },
    "overrides": [
        {
            "predicate": {
                "custom_model_data": 1
            },
            "model": "sumeru:item/ak47"
        }
    ]
}
``` and  SumeruPack/assets/sumeru/models/block/ak47.json Made with Blockbench https://easyupload.io/vzxk3i
#

can someone help me with the custom model data resource pack for items? I created a texture pack, uploaded it to the resource packs hosting and Player.setResourcepack with arguments link and sha-1 key. the resource pack loaded in the logs on the client side there are no errors, but when I install in the item meta custom model data to overlay textures from the resource pack on it, it simply does not work.

upper hazel
#

but companies still succeed due to functionality and marketing, despite the content of the code

twin venture
#

here yaa ga

echo basalt
#

The quicker the code is to write the longer it takes to rewrite

echo basalt
wet breach
echo basalt
#

I'd make CosmeticWrapper hold a CosmeticFunciton instead of implementing it

#

Something like the decorator pattern

upper hazel
echo basalt
#

So it'd implement CosmeticFunction and proxy the requests to its internal function

#

While adding any extra functionality

#

Basically CosmeticFunction and CosmeticWrapper should be segmented

sterile flicker
echo basalt
#

Yeah idk this structure is icky

twin venture
echo basalt
#

There always is

sterile flicker
echo basalt
#

I just can't think of one because this one's fogging up my brain

sterile flicker
upper hazel
echo basalt
#

uH

#

why is your ak47 a block

#

Also I never see a mention of you overriding a stick

#

assets/minecraft/models/item/stick.json

{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecract:item/stick"
  },
  "overrides": [
    {
      "predicate": {
        "custom_model_data": 1
      },
      "model": "sumeru:item/ak47"
    }
  ]
}
sterile flicker
echo basalt
#

yeah that doesn't need to be a block

#

can be an item

#

You then toss your .json under assets/sumeru/models/item/ak47.json

sterile flicker
echo basalt
#

bruh

#

can't you just use an itemframe for that

chrome beacon
#

Item Display uwu

sterile flicker
echo basalt
#

whatever blockbench exports is whatever you use

sterile flicker
#

And as I understand it, I don't need blockstates.

echo basalt
#

you refer to it the way I mentioned

#

exactly

sterile flicker
wet breach
#

but you can succeed without ever advertising

#

I never advertised and I still made money

#

all my customers were from word of mouth ๐Ÿ™‚

echo basalt
#

yo frosty you got a platform agnostic packet system?

#

I wrote one like 4 years ago and I'm looking to get it remade

wet breach
#

I do not have one on hand unfortunately ๐Ÿ˜ฆ

echo basalt
#

wanna use it for my minigame stuff

#

sadge

#

guess I'll have to write code

#

and maybe a forum thread

wet breach
#

my snippets library died with my hard drive, its not gone forever just need to fix the board on it

#

but until then that library is inaccessible

echo basalt
#

for someone with a network history you have horrible data storage habits

wet breach
#

a power surge managed to overload my surge protector and it killed the HDD XD

echo basalt
#

never had a power surge in my life

#

maybe it's a us thing

wet breach
#

its not a US thing only

#

if enough transformers get knocked offline on the grid or if a power station goes down

#

it causes the power to surge while it gets routed, well there was a storm that was knocking transformers offline left and right

sterile flicker
wet breach
#

and I didn't have time to turn the PC off as I was asleep and I had woke up just as it was happening

#

fortunately all that died was the HDD though and nothing more serious then that

#

well the HDD board

#

not the HDD itself

echo basalt
#

so basically instead of all the energy going to ground it goes to your house

#

got it

sterile flicker
#

the correct path in resource packs textures/item or textures/items?

wet breach
#

so the power stations are trying to manage this fluctuation

#

it has nothing to do with power going to ground or not

echo basalt
#

hm

#

Gotta ask my dad ab it

wet breach
#

anyways surge protectors are basically capacitors that can absorb some of this extra power, the one I had obviously wasn't enough ๐Ÿ˜›

echo basalt
#

afaik I've never witnessed a power surge

#

either because I live in an area with tropical weather

#

or because the US just struggles

wet breach
#

in worse case scenarios power stations will cut power at their lines to stop this fluctuation pattern because there is a point where it can't be controlled and the only thing to stop it is to just black out

wet breach
#

I am explaining to you that power on the lines fluctuates

#

its not constant

echo basalt
wet breach
#

but you can get this wave pattern going on in the grid though

echo basalt
#

maybe the us just fluctuates more than us

wet breach
#

and the only way to stop it is to just cut power but this wave pattern causes surges in some houses

wet breach
#

to even notice it

echo basalt
#

either that or the EU mandates surge protectors

#

either in houses, the electrical boxes outside houses or somewhere else

wet breach
#

well, its possible that the sub stations in the EU are more sensitive and thus just cut power

#

but in the US, its not exactly that simple though

#

our grids are massive

#

in comparison to the EU

#

a single state in the US is larger in grid size then some countries in the EU XD

echo basalt
#

true

wet breach
#

however as I said, as you cut power, the grid ends up with more power on the lines

#

this means the power station needs to start producing less power

#

but if the grid suddenly needs more power, you can't just create power instantly

#

this is why in the US its a game of routing without going down as long as possible ๐Ÿ˜›

#

its more difficult to start back up when all power is gone, then it is if there is still some power on the grid

echo basalt
#

even power outages are super rare here

upper hazel
echo basalt
#

my power went out for like a minute last week

#

last time it had gone out was a solid 2 years ago

#

during a massive storm

wet breach
#

well most of your lines are probably in the ground but we can't do this in the US just too large

echo basalt
#

uH

wet breach
#

in the major cities sure

echo basalt
#

I call cap

wet breach
#

cap?

echo basalt
#

teen lingo for "lies"

wet breach
#

the US can't put all the lines in the ground because its just not feasible econonmically

#

some of our power lines traverse entire mountain ranges

echo basalt
#

I do live in the city and for most part of the city the lines are indeed underground

wet breach
#

good luck putting those in the ground

echo basalt
#

beyond the city we have above head lines

#

and below ground

#

it's a mix

wet breach
#

yeah, same here in the US

#

the majority of the lines are above ground because its cheaper and easier to fix this way

echo basalt
#

We don't really worry about that

wet breach
#

as you move towards more the cities they are in the ground because people are too dumb to not hit power poles >>

wet breach
echo basalt
#

it is

#

nearest big power station I know is like half an hour away by train

wet breach
#

therefore it is easier and makes more sense to put them all in the ground

echo basalt
#

next to the train station that connects my region with the main train line that goes over the capital

wet breach
#

but when you got literally 5k square miles to provide power though

#

not so easy to do that ๐Ÿ˜›

#

not sure if you ever played city skylines or similar city sims

echo basalt
#

I used to watch sims 3 vids as a kid so no

wet breach
#

but you simply can't just have everything upgraded without going bankrupt XD

echo basalt
#

I get it, the distance between cities in the US is a lot bigger

#

I walked between cities last week as my train just didn't show up and it was something like 12km

#

8 miles?

#

sumn like that

#

Passed through a solid 5 counties

wet breach
#

just under 8 miles according to google

echo basalt
#

about 8 miles then

#

still had to walk a bunch after I reached my city

sterile flicker
echo basalt
#

I'd run the resourcepack locally to start with

chrome beacon
#

Did you update the hash after modifying the resource pack

echo basalt
#

once that's done you can upload it on mcpacks or something

sterile flicker
#
{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "minecract:item/stick"
  },
  "overrides": [
    {
      "predicate": {
        "custom_model_data": 1
      },
      "model": "sumeru:item/ak47"
    }
  ]
}```assets/sumeru/models/item/stick.json
echo basalt
#

toss that stick json in assets/minecraft/models/item

night grove
#

hey guys do you know some plugin that will do that the crystals will blow you higher like in 1.18

proud badge
#

Would Entity.kill() work if the entity is in unloaded chunks?

#

Im making a rideable ender dragons system, and I'd like it to despawn 5 minutes after nobody is riding it

sterile flicker
# echo basalt toss that stick json in assets/minecraft/models/item
    minecraft:textures/atlas/blocks.png:minecract:item/stick
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture1
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture10
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture11
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture12
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture2
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture3
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture4
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture5
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture6
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture7
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture8
    minecraft:textures/atlas/blocks.png:sumeru:textures/item/ak47/texture9```
glossy venture
#

its looking at the blocks texture atlas for an item that looks wrong to me idk what it would be tho

sterile flicker
#
{
    "credit": "Made with Blockbench",
    "textures": {
        "0": "sumeru:textures/item/ak47/texture1",
        "1": "sumeru:textures/item/ak47/texture2",
        "2": "sumeru:textures/item/ak47/texture3",
        "3": "sumeru:textures/item/ak47/texture4",
        "4": "sumeru:textures/item/ak47/texture5",
        "5": "sumeru:textures/item/ak47/texture6",
        "6": "sumeru:textures/item/ak47/texture7",
        "7": "sumeru:textures/item/ak47/texture8",
        "8": "sumeru:textures/item/ak47/texture9",
        "9": "sumeru:textures/item/ak47/texture10",
        "10": "sumeru:textures/item/ak47/texture11",
        "11": "sumeru:textures/item/ak47/texture12",
        "particle": "sumeru:textures/item/ak47/texture1"
    },
```assets\sumeru\textures\item\ak47 the problem is that it is missing .png at the end?
chrome beacon
#

Do you have all those textures

#

in the right place

sterile flicker
#

yes

sterile flicker
wet breach
#

entities in unloaded chunks are not alive

twin venture
#

its running the empty method that is being used in CosmeticWrapper

#

and its not running this method :

echo basalt
#

I'm not even home

twin venture
#

alr sorry , maybe other people can help :p

lost matrix
tender shard
twin venture
lilac dagger
#

the wrapper should work only if it's the top class

twin venture
#

this is how iam creating it :

#

oh i see so this won't work correct?

lilac dagger
#

it should work

#

try run() here at winEffect

lost matrix
twin venture
night grove
#

Hey guys do you know some plugin that will do that the crystals will blow you higher with blast protection leggings like in 1.18

lost matrix
lost matrix
#

Ok ORMLite doesnt even have a codec. Its very basic. Anyways, here are some types you can use on enum fields

twin venture
#

what about the Material ?

lost matrix
#

Material is still an enum, right?

twin venture
#

yes

#

this is how iam doing rn , but its still not function correctly.

#

2 impl

#

inerators*

lost matrix
#

Then annotate the material field with

@DatabaseField(dataType=DataType.ENUM_NAME)

for example.

twin venture
#

oh i see

twin venture
lost matrix
#

Ah never mind. I misread that line.

#

The name cosmeticsPlayerList is just confusing

twin venture
#

thats line i use the command :
/nick run run
so it run the method of the comsetic the user have

#

yeah ik its the comsetic for loop of the cosmetics user have

#

the cosmetics are saved in database

#

so lets say :

  • it load from lobby server to -> ormlite database
  • other servers like game-1 , game-2 can get the cosmeticfrom the ormlite database [sql]
lost matrix
#

Ok but is there something like a Class or Type field in your Database table?

twin venture
#

that's how it looks like

#

and this is how its looks like for the userCosmetic DAO

lost matrix
#

Because to me it looks like

CosmeticWrapper wrapper = dao.getbyUUID(someId);

will never return any other class than CosmeticWrapper.
Because thats exactly what you are asking the service for.

#

I dont understand where you expect the DAO to realize "Oh, im trying to create an instance of the AnvilRainWinEffect.class".

twin venture
lost matrix
#

Ok. This stores your AnvilRainWinEffect as a CosmeticWrapper in your Database. The runtime class is completely lost.
It needs to be stored somewhere. You cant recover a class type from thin air.

twin venture
#

can i save the className?

#

what i can do now ?

lost matrix
#

ORMLite has some persister class

#

One moment

twin venture
#

Thank you

lost matrix
twin venture
#

Thanks

lost matrix
#

But there is probably something out there already

twin venture
lost matrix
twin venture
#

ik

lost matrix
#

Prevents SQL syntax problems by yourself and you are not bound to an ORM

#

But now that you already use one. ๐Ÿคท
Just keep it

twin venture
#

yeah i need to remake everything from 0..

sterile flicker
#

maybe in assets/sumeru/models/item/ak47.json use json { "credit": "Made with Blockbench", "textures": { "0": "textures/item/ak47/texture1.png", instead of json { "credit": "Made with Blockbench", "textures": { "0": "sumeru:textures/item/ak47/texture1.png",

quaint mantle
#

How can I reduce the firework boost when using elytra?

sterile flicker
#

Well, maybe that's the problem.

late sonnet
fair crest
#

yo guys

#

how do i find the hints

#

or enable em

chrome beacon
#

"the hints"?

fair crest
#

the things that do int/counts

chrome beacon
#

???

fair crest
#

bruh

late sonnet
fair crest
chrome beacon
#

Those are handled by your IDE

fair crest
chrome beacon
#

Should be enabled by default

fair crest
#

everytime i try to do directional particles

#

they put the xyz as v1,2,3

chrome beacon
#

?

late sonnet
fair crest
#

so it doesn't show

chrome beacon
#

Which IDE are you using

fair crest
#

Intellij IDEA

#

Community 2022

#

i haven't updated

#

im trying to make directional particles where the player is facing

eternal oxide
#

player.spawnParticle(player.getEyeLocation().add(player.getDirection().multiply(1))... )

#

or something close

#

increase the multiply value to control distance

glossy venture
#
Could not find inset-bson-3660ecc.jar (com.github.slatepowered.inset:inset-bson:3660ecc).
Searched in the following locations:
    https://jitpack.io/com/github/slatepowered/inset/inset-bson/3660ecc/inset-bson-3660ecc.jar
#

????????

#

entering the link dls the file

quaint mantle
#

Which is the default power of a firework? (FireworkMeta)? I can't find it

#

max is 127, sure?

#

I'll checks thanks!

smoky anchor
#

not sure if this is the best source for this, haven't really looked at it
but I think Minecraft Commands discord server is "better equiped" to handle resourcepack questions

quaint mantle
#

How can I get the firework at InteractEvent, I'm trying to cast but ItemStack can't be casted to Firework

mellow pebble
#

is there way of getting if player clicked right click or left click on mob for example slime or zombie ? i mean it must be some event for that but i cant find which one would be best for such thing ?

smoky anchor
young knoll
#

That would be FireworkMeta

glossy venture
#

anyone know why gradle may be failing to download one module from a URL

#

when i try the url manually it downloads fine

young knoll
#

The item will never be a firework, firework is an entity

sterile flicker
#

is it possible to get a snowman to throw a snowball while driving a pathfindering at the player? launchprojectile is not working for me

glossy venture
mellow pebble
#

how can i launch up mob 4 blocks up in air like with seting its velocity with new vector

west jacinth
#

i am currently trying Event PlayerItemConsumeEvent but if i eat sweet berries or glowing berries then why does it return item as AIR

tender shard
west jacinth
tender shard
#

try adding it

#
api-version: "1.20"
west jacinth
#

thanks :]

quaint mantle
#

Is there any event when flying with elytras?

#

ELYTRA_GLIDE shows up when searching

smoky anchor
#

My guess (based on nothing) would be PlayerMoveEvent and then just check if the player is flying with elytra there

quaint mantle
#

thats a good idea yeah

mellow pebble
#

@tender shard do you have idea how can i prevent slime from jumping

eternal oxide
#

disable its AI

quaint mantle
#

so maybe MoveEvent can't provide me that

quaint mantle
lost matrix
knotty aspen
#

or just use the fawe api

sterile flicker
sullen wharf
#

Any specific reason a Skull doesn't change its texture to the player's head when doing skull#setOwningPlayer?

#

The player has played on the server before and getOwningPlayer returns the player, the head just doesn't change texture

chrome beacon
#

Did you forget to update the block state

sullen wharf
#

uhh, it's on a GUI

chrome beacon
#

so not the block skull

sullen wharf
#

ye, it's the item

#

I meant' skullmeta

#

mb

chrome beacon
#

Did you set the item meta back to the item

sullen wharf
#

yes

chrome beacon
#

try updating the inventory

sullen wharf
#

Already tried, nothing

chrome beacon
#

Show your code

#

?paste

undone axleBOT
eternal night
#

what version ?

#

there were some mojang API troubles these past few days on older versions

sullen wharf
#

1.20.2

#

Those forceUpdate methods mostly handle placeholder replacements.

#

Also, server is running on online mode

#

just in case that's a thing

chrome beacon
#

Yeah can't get head textures when offline

sterile flicker
# sullen wharf Any specific reason a Skull doesn't change its texture to the player's head when...

here is my code: ```java
ArmorStand armorstand = (ArmorStand) player.getLocation().getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
final ItemStack helm = new ItemStack(Material.PLAYER_HEAD, 1);
helm.editMeta(SkullMeta.class, m -> {
m.displayName(Component.text("Test"));
final PlayerProfile profile = Bukkit.createProfile(UUID.fromString("0f4d0aae-9e91-4d68-951f-94dbfb77999a"));
profile.complete();

        m.setPlayerProfile(profile);
    });```
chrome beacon
#

If you plan on modifying the armor stand when spawning it use the spawn method that takes a consumer

#

That will ensure it spawns with your changes instead of being spawned and then modified

#

They do not

smoky anchor
#

ok, what the frick is that editMeta
How have I never seen that

eternal night
#

their code is terribly paper-api specific

#

PlayerProfile#complete is not a thing on spigot, nor is editMeta or displayName(Component)

smoky anchor
#

aww man

proud badge
#

Hi, is there any guide somewhere on how I could make a mob walk in a specific direction?

eternal night
#

on spigot you'd call the #update() method on the player profile which yields back a CompletableFuture

sterile flicker
eternal night
#

they do not ๐Ÿ˜…

quaint mantle
#

I'm getting cast error when doing this

ItemMeta itemMeta = item.getItemMeta();
FireworkMeta fireworkMeta = (FireworkMeta) itemMeta;
fireworkMeta.setPower(2);
item.setItemMeta(fireworkMeta);

item is a ItemStack

chrome beacon
#

is the item a firework

quaint mantle
#

yes, a Firework Rocket

inner mulch
#

Can you show us the full code?

#

So we can see what item is

quaint mantle
#

?paste

undone axleBOT
chrome beacon
#

also send the error

#

?paste

undone axleBOT
quaint mantle
chrome beacon
#

That error does not match the code

#

HandleFireworkMechanics is where the error is

#

you seem to be casting an itemstack to an entity

quaint mantle
#

Now I don't have errors but nothing seems to happend

inner mulch
#

What do you want to happen?

quaint mantle
#

like set the boost of the rocket (setPower()) to 0

quaint terrace
#

hi, my server give this error:
[14:48:23 WARN]: Can't keep up! Is the server overloaded? Running 5002ms or 100 ticks behind

#

how I fix it?

eternal oxide
#

More power, or better plugins

inner mulch
quaint mantle
#

maybe I can cancel the interact event and done

inner mulch
#

if you want player to not boost with an elytra you could look into this, im not sure if this event is paper only tho PlayerElytraBoostEvent

quaint mantle
#

thats paper I think

inner mulch
#

so spigot doesnt have something like this?

quaint mantle
#

The is a method to check if the player is flying with and elytra

#

but I don't find more

inner mulch
#

okay, i guess you gotta cancel the event when someone is flying with an elytra and tries to right click the firework

quaint mantle
#

yeah

#

The thing is when I cancel the event the items seems not to be used and dont remove it

shadow night
#

where did I fuck up

#

(it always says there are 199 fuel ticks)

inner mulch
quaint mantle
#

yeah

#

I can't figure out how

glad prawn
inner mulch
shadow night
#

hmm, maybe updating pdc every tick is an awful idea

eternal oxide
#

On an ItemStack, Very bad idea

shadow night
#

this is a furnace

glad prawn
#

i don't know what it will do so i can't help

eternal night
#

you'd need to update the tile entity

#

getState() yields you a snapshot

shadow night
#

so, call update?

eternal night
#

the PDC is a snapshot too

#

Yea

inner mulch
inner mulch
#

I think this approach would be better as you are not changing the pdc and just some object in memory

agile hollow
#

how can i check if someone rightclick on a player?

inner mulch
#

PlayerInteractEntityEvent

inner mulch
quaint terrace
shadow night
#

I smell overallocation

quiet ice
sullen wharf
#

Tried PlayerProfile, problem persists

#

the skull texture actually loaded once, but only once

#

It seems like this problem only occurs inside GUIs as I replicate it and get a itemstack with the skull texture

#

uhm, nevermind

#

the itemstack doesn't have texture, the skull block has

#

๐Ÿค”

chrome beacon
#

I have created an abomination

#

I replaced all my for loops with streams kekwhyper

shadow night
#

Especially in my tab comletion logic

chrome beacon
#

functional programming go brr

echo basalt
#

blocked.

shadow night
#

Lmao

chrome beacon
#

wait me?

#

๐Ÿ’€

echo basalt
chrome beacon
#

I just wanted to learn streams

#

Usually stay away from them

shadow night
#

Streams are easy, just open twitch.tv in your browser

quaint mantle
#

How functional programing help with streaming?

small current
#

how can i make custom crops

next plume
quaint terrace
quiet ice
#

Then this is the wrong channel I am afraid.

worldly ingot
#

I mean... they both serve their own purposes

#

And composition is a little easier in languages that actually have good typing frameworks. Java's generics are not great lol

ivory sleet
#

I mean type inheritance and behavior inheritance can be fine

#

usually itโ€™s implementation inheritance thatโ€™s not so appreciated in the long run

wary harness
#

hey I am making shop with signs

#

but got in problem

grand flint
#

dope

wary harness
#

names with more then 15 char

#

is there some list of items

#

with short names

#

made by someone

#

free to use

#

xd

#

SO I don't need to do it

#

like essentials has DiamondChestplate - DchestPlate

ivory sleet
#

Essentials maybe got an api for that u could use?

wary harness
ivory sleet
#

Fair enough

wary harness
#

but essentials is open source

#

so I could borrow

#

it from there plugin

#

xd

ivory sleet
#

Haha maybe ur plugin could fetch the list from essentials gh

#

๐Ÿฅฒ

quaint terrace
river oracle
#

you should beable to do this programatically

#

pretty sure minecraft's resources are publicly downloaded so you could generate resource files

quiet ice
quiet ice
#

I am willing to help you once you have a spark report - but I aint going to spoonfeed you how to install a plugin and to then run a command.

upper hazel
#

what the event can stop enchant item

quaint mantle
clever lantern
#

what its called

#

i wanna make this but idk what is it lol

pseudo hazel
#

scoreboard

clever lantern
#

is it possible to make this in spigot?

pseudo hazel
#

yes

proud badge
#

does Spigot by default have mob pathfinders?

young knoll
#

You mean an api for it?

#

No

quaint mantle
#

There other way to create custom recipes not in the onEnable method?

young knoll
#

sure

#

Pretty sure you can register them whenever

quaint mantle
#

let me try thanks

#

@young knoll Something like this?

young knoll
#

You gotta call Bukkit.addRecipe

quaint mantle
#

yeah, at onEnable method right?

young knoll
#

You can call it in that method

quaint mantle
#

And I need to call the class anywhere?

young knoll
#

Generally on enable

zealous osprey
# quaint mantle <@125349520249847809> Something like this?

Just as a question, is it wise to put the recipe addition into the cunstructor?
Doesn't that mean, that it always adds the recipe when creating a new firework of that type?
Wouldn't it be better to either create a static function to add the recipe, but then you'd always have to add that. Maybe instead use a type of singelton pattern (or rather that pattern where you add a #clone method) and have that add it.
What do you think @young knoll?

young knoll
#

I mean

quaint mantle
#

I'm almost new at Java maybe I do things in a bad way

young knoll
#

You can just hold the itemstack in a variable somewhere

feral pike
zealous osprey
quaint mantle
feral pike
quaint mantle
glad prawn
#
    @Override
    public boolean contains(Object obj) {
        if (!(obj instanceof MonthDay)) return false;
        MonthDay mday = (MonthDay) obj;
        return month == mday.getMonth() && monthDays[mday.getDayOfMonth()] != null;
    }
    
    @Override
    public boolean add(MonthDay mday) {
        if (contains(mday)) return false;
        monthDays[mday.getDayOfMonth()] = mday;
        return true;
    }```
does anyone know why contains returns false but it is still added to the array?
#

ah ik

steel swan
#

Hey !
I'm trying to place a structure in spigot.
Here are a few questions.

If i put a file in my server files that contains the different structures i wanna place, how do I get them in the code?
Does anyone have any documention on how to place structure?

quiet ice
#

Are you aware of the src/main/resources directory which is the default under maven and gradle?

#

If not, that is how you include files - if you don't use maven or gradle or have overridden the defaults: Figure it out on your own.

steel swan
quiet ice
#

just put them in the src/main/resources directory

steel swan
#

so here with plugin.yml?

quiet ice
#

i.e. like follows

quiet ice
steel swan
# quiet ice ye

ok, so imagine i put here a file containing the structure that was saved with a structure file, how do i access it? (and place it)

quiet ice
#

how you can place it I cannot tell you however - it is likely that you need to depend on the worldedit API, but there might be other ways around it.
Regardless, I have never done that myself

steel swan
#

ill try things, and get back to you later.
Thx tho

steel swan
steel swan
#

and this would return the structure i want?

quiet ice
#

Also remember that getResource requires the full path, including the extension

steel swan
hushed scaffold
#

Yo hi , ive got this code for checking if the result of a smithing event is an item material from the config file , and if it is , then to cancel the event.
Problem is , it simply just doesnt cancel the event.
And for my code should i write Material.{Insert Item here } or just the item name in the config file?
@EventHandler
public void onSmithItemEvent(SmithItemEvent e) {
Material resultMaterial = Objects.requireNonNull(e.getInventory().getResult()).getType();
if (isItem(resultMaterial)) {
e.setCancelled(true);
}
}

private boolean isItem(Material material) {
    List<String> itemStrings = config.getStringList("Items");
    for (String itemString : itemStrings) {
        if (Material.valueOf(itemString) == material) {
            return true;
        }
    }
    return false;
}
quiet ice
quiet ice
quiet ice
hushed scaffold
steel swan
quiet ice
#

basically yes

#

And if you decide to put it in a folder within the resource folder (for example to keep things tidy) you'd need to use "structures/myStructure.dat" for example (in this case the folder is called structures)

steel swan
#

oh and last question

#

does it work the same for worlds? Like if i wanna put a world in my files, would it work if i try to load it

quiet ice
#

The problem with worlds is that they are likely going to be folders. getResource however requires singular files more or less

steel swan
#

how could i do that with a world then?

buoyant plinth
#

I am working on a 1.12.2 PaintBall plugin, but I am having a major problem during compilation; I cannot compile the plugin, and I keep getting the error "package BuyAPI does not exist" (this is an economy plugin). I believe I have added the plugin, and the IDE even seems to recognize it. What could be the issue?

Error: https://pastebin.com/RpvG0ZBT
https://ibb.co/xXBm8zT
https://ibb.co/tB8r1bn

Image image hosted in ImgBB

Image image hosted in ImgBB

quiet ice
#

You can still do it the same way though, but it will be a bit more complicated as you'd need to read the index of files for a given directory, but I am not completely sure how that works (to me that is still witchcraft, somehow)

#

You could of course store it as a zip in your jar and unpack it via a ZipInputStream, but that is a bit more convoluted.
So you'd have

try (ZipInputStream zipIn = new ZipInputStream(inputStream)) {
  for (ZipEntry e = zipIn.getNextEntry(); e != null; e = zipIn.getNextEntry()) {
    // ...
  } 
}

though obviously that isn't even half of the needed logic

quiet ice
steel swan
#

Ok so, i put it like this for the structure :

buoyant plinth
#

1 time I was able to compile the plugin but I still donโ€™t understand how I did it

quiet ice
#

If the plugin implements vault, you don't need to use any other economy plugin - you can plainly use vault (which in turn will use the plugin you want)

quiet ice
steel swan
quiet ice
quiet ice
#

what is your maven pom?

steel swan
#

?paste

undone axleBOT
steel swan
quiet ice
#

You'd want to have

            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>plugin.yml</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>plugin.yml</include>
                </includes>
            </resource>

instead of your current resource-block

#

Although I did not test above code, but it should work

steel swan
#

It compiled ! Ill not test it ingame

heavy void
#

Someone knows how i can check if the Inventory of onInventoryClick event is the same from the command? (Obs: Im using a class that implements both CommandExecutor and Listener, and the inventory is in a private variable in the class, but its not the same when i try to check in onInventoryClick event

steel swan
buoyant plinth
# quiet ice <@761175017588916224> anyways, if you cannot make use of vault and the plugin yo...
PS C:\Projects\PaintBall> ls src  


    Directory: C:\Projects\PaintBall\src


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        12/31/2023   1:33 PM                main
-a----          1/3/2024   6:18 PM         315022 bank.jar


PS C:\Projects\PaintBall> mvn install:install-file -Dfile=src\bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.tokishu:PaintBall >------------------------
[INFO] Building PaintBall 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- install:3.1.1:install-file (default-cli) @ PaintBall ---
[ERROR] The specified file 'C:\Projects\PaintBall\src\bank' does not exist
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping PaintBall
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.287 s
[INFO] Finished at: 2024-01-08T20:21:48+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file (default-cli) on project PaintBall: The specified file 'C:\Projects\PaintBall\src\bank' does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
PS C:\Projects\PaintBall> 
quiet ice
quiet ice
buoyant plinth
#

:(

PS C:\Projects\PaintBall> mvn install:install-file -Dfile=src/bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< org.tokishu:PaintBall >------------------------
[INFO] Building PaintBall 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- install:3.1.1:install-file (default-cli) @ PaintBall ---
[ERROR] The specified file 'C:\Projects\PaintBall\src\bank' does not exist
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping PaintBall
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.271 s
[INFO] Finished at: 2024-01-08T20:23:46+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file (default-cli) on project PaintBall: The specified file 'C:\Projects\PaintBall\src\bank' does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
PS C:\Projects\PaintBall> cd src                                                                                                          
PS C:\Projects\PaintBall\src> mvn install:install-file -Dfile=bank.jar -DgroupId=com.bank -DartifactId=bank -Dversion=1.0 -Dpackaging=jar    
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.056 s
[INFO] Finished at: 2024-01-08T20:24:03+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Projects\PaintBall\src). Please verify you invoked Maven from the correct directory. -> [Help 1]   
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
PS C:\Projects\PaintBall\src> 

steel swan
#

?paste

undone axleBOT
heavy void
#

Someone knows how i can check if the Inventory of onInventoryClick event is the same from the command? (Obs: Im using a class that implements both CommandExecutor and Listener, and the inventory is in a private variable in the class, but its not the same when i try to check in onInventoryClick event

quiet ice
buoyant plinth
#

probably not, I'm not that experienced in plugin development and java๐Ÿ˜•

quiet ice
quiet ice
quiet ice
quiet ice
buoyant plinth
#

Maybe I'm adding the plugin to the project incorrectly?

quiet ice
#

0 kb? That is rather concerning. Is the nbt file in your resource directory empty?

quiet ice
quiet ice
# steel swan its not empty here

Okay yeah, then something is wrong with the advice I gave you. If a mvn clean package does not work, it's best to wait for the advice of the elders

steel swan
quiet ice
#

in your project directory (where your pom resides)

#

you can also use IJ and execute the maven clean goal, does the same thing

steel swan
#

im sorry, i dont really understand what you want me to do in my pom here

quiet ice
#

You know how you build a maven project, right? So instead of using package or install you'll first use clean, then package or install

steel swan
#

Usually i just run my code and put it in my plugins so...

quiet ice
#

Just delete the target folder then

#

Then build the plugin again

steel swan
#

Ok ill do that and get back to you

quiet ice
#

I must stress that this is more or less a final hail-mary approach. I don't actually expect this to work

steel swan
#

It works !!!!

#

It works, but could you explain what was the problem? id like to understand

quiet ice
#

It's caused by caches. More specifically maven thought it already copied that file into your jar even though it didn't (as it crashed when doing so, as you might remember)

steel swan
#

ooooh ok

#

thx tho

quiet ice
#

You'll find similar problems quite often, so deleting/cleaning caches will be something you'll do more frequently. So that is something to keep in mind

steel swan
quiet ice
#

well you are wasting your own time, that is what if happening if you do it for no good reason. But as long as you know what you are deleting it is otherwise perfectly fine. The target directory for example can always be deleted

clever lantern
#

how can i spawn an entity in nether even if player was never there

sullen marlin
#

Get the nether world and call .addEntity

steel swan
#

Hey, little question, how would i check for a player interacting with a block?

(i want to check when the player opens a loom, and check the looms location)

steel swan
tame wolf
#

Have you looked at the event?

steel swan
tame wolf
#

It does have one, look carefully

slender elbow
#

look for other methods that return a Block

steel swan
tame wolf
#

๐Ÿ˜‰

valid burrow
#

is there a way to get this exact location im looking at?

#

like

#

is there a method for it?

remote swallow
#

getTargetExact

valid burrow
#

thx

spare mason
#

why when i disconnect and connect from a server a custom nms entity is now like a normal entity?

chrome beacon
#

Yeah that's normal

#

When the game saved and loads it again

#

it doesn't know it's a custom entity anymore

#

You'll need to handle that part on your own

#

basically just save where it is and spawn it again on load

spare mason
#

how could i instead just delete it instead of reseting?

little rampart
#

Hey Guys, i got a little problem. i want to get into plugin development with IntelliJ. I managed to get the debugger running the build process works. but when the debug server is running and im trying to build / replace, i get the "Artifacts builder: Cannot delete file <path>" error... Did i miss anything?

Edit: it magically works now

trim lake
#

How should I remove attribute from player? Ifs are true but I have still same amout of healts. Look like Im removing attribute wrong. Adding is working fine

if (HelmetManager.isHelmet(clickedItem) && HelmetManager.haveEffect(clickedItem, healthEffect)) {
                System.out.println("REMOVE HP!");
                double effectValue = HelmetManager.getEffectValue(cursorItem, healthEffect);
                AttributeModifier attributeModifier = new AttributeModifier("mask_health", effectValue, AttributeModifier.Operation.ADD_NUMBER);
                player.getAttribute(Attribute.GENERIC_MAX_HEALTH).removeModifier(attributeModifier);
            }
            if (HelmetManager.haveEffect(cursorItem, healthEffect)) {
                System.out.println("ADD HP!");
                double effectValue = HelmetManager.getEffectValue(cursorItem, healthEffect);
                AttributeModifier attributeModifier = new AttributeModifier("mask_health", effectValue, AttributeModifier.Operation.ADD_NUMBER);
                player.getAttribute(Attribute.GENERIC_MAX_HEALTH).addModifier(attributeModifier);
            }
worldly ingot
#

The UUIDs of the modifier must match

#

Generate a constant UUID and hold it in a field, then use it to construct AttributeModifier instances. Or, better yet, just keep the AttributeModifier instance as a constant

trim lake
#

oh... yeah make seans. Hmmm better way here will be just check if player has AttributeModifier. ๐Ÿค”

trim lake
worldly ingot
#
private static final UUID ATTRIBUTE_ID = UUID.fromString("f239698d-5604-40a2-bb8d-6613bfcd1783");
private static final AttributeModifier ATTRIBUTE_MODIFIER = new AttributeModifier(
    ATTRIBUTE_ID,
    "mask_health",
    /* value */,
    AttributeModifier.Operation.ADD_NUMBER
);
#

If the value isn't constant, you'll have to construct it each time. What matters is that the UUID is constant

trim lake
#

If player equip specify helmet, he is getting HP and if player unequip that helment ofc losse that HP.

trim lake
#

I can ๐Ÿ˜„ But helmet have lore where I display hearts (2 healts) and in helment it will display helts (half of hearth) in attribute.

#

I kinda dont like that, but that make my work more compicated, what I should avoid.

worldly ingot
#

You can use ItemFlag.HIDE_ATTRIBUTES if you'd like

trim lake
#

Anyway I learned somerhing new again

worldly ingot
#

Yeah. Just be sure the UUID is the same and you'll be fine :p

#

You have an alternative if you'd like to explore that avenue instead

trim lake
#

Can I hide only specify attribute? probably not I guess? ๐Ÿค”

#

Or I can just ask person, if that display of attribute is oke and all will be fine ๐Ÿ˜„ Thanks a lot I learned something new thats important for me... Im coding only for 1 year and still have lot to learn...

quaint mantle
#

How can I fix this, the thing i to keep the meta from the original item

worldly ingot
worldly ingot
#

PlayerInteractEvent? Somewhere else?

quaint mantle
worldly ingot
#

And is handItem = e.getItem()?

#

If so, that's a mirror ItemStack so you can actually simplify your item handling a lot by just updating the amount and that's it. No need to re-set the item in the hand or anything. It will update automatically. handItem.setAmount(handItem.getAmount() - 1); should work just fine

inner mulch
#

Is it possible to change classes from the spigot api, like the player class to add methods?

worldly ingot
#

No

#

Typical solution is to wrap the Player instance with your own type

quaint mantle
worldly ingot
#

Okay, then your whole removeFailureItem() can be removed and replaced with just handItem.setAmount(handItem.getAmount() - 1);

trim lake
#

As Im not setting modifier UUID it will ser random one? ๐Ÿค” Interesting.

worldly ingot
#

Yeah, if you don't specify the UUID, it will generate a random one each time you construct it

trim lake
#

I just relize Im not setting one and u talked about that ๐Ÿ˜„ Get me confused for moment ๐Ÿ˜„ Fixed thanks again!

quaint mantle
#

How can I get the item from a custom recipe?

young knoll
#

getResult?

quaint mantle
#

Like get if the customItem from recipe is the one in the hand

young knoll
#

What?

quaint mantle
# young knoll What?

I made a custom recipe. So, what I want to do is to compare if the item the player is using is the item generated from the recipe.

young knoll
#

Give it a pdc tag

quaint mantle
#

pdc?

young knoll
#

?pdc

sterile token
#

Hi, i having some troubles to Good, I'm a bit complicated trying to figure out how to do the logic to display the help dynamically. I mean if you have a command structure like faction (main command), faction list (faction argument). On the other hand, the sub command faction points (child of faction) and in turn, faction points info child of faction points.

How could I make the help list to be displayed depending on how the commands are executed, ie. If you execute the command faction without arguments, the help list would include this order: /<command> <argument> (where command would be faction in my case, where argument would be list and points)

In case of executing the command /faction points without arguments, the help list would change to the order: /<parent> <command> <argument> (where parent would be faction, command would be points and argument would be the arguments and/or children associated to points).

astral scroll
#

someone has a ItemStack gson adapter for 1.18.2?

#

the one i have its 1.8

#

so yeah

#

:(

#

save me

sterile token
hallow lion
#

Spawning an item with world#spawn makes it spawn at Y level 0, even setting the location.setY to -60 will still make it spawn at y=0, i've also tried disabling the randomize data. Is this a bug or am i missing something?

next plume
#

Since ProtocolLib is broken, I'm trying to use TinyProtocol.
It has an import for io.netty.channel. What version does Spigot use?
And it also imports com.mojang.authlib.GameProfile. Where can I find that (with Maven)?

sleek estuary
#

I will be an invisible armor stand with a custom name. This name doesn't have a space at the end, but in the game it's as if there was a space at the end. Does anyone know how to solve this?

sterile token
quiet ice
sterile token
#

@next plume

next plume
#

I figured out the netty one. The pom is from like 7 years ago.

quiet ice
#

Uh, I am not sure if the lib works then but I guess you know what you are doing

next plume
#

This should be fun. (And by that, I mean not fun.)

sterile token
next plume
#

I can't get this thing to compile. I have no idea what I'm doing. F- it.

young knoll
#

Iโ€™ve noticed you can specify a uuid when sending resource packs to the client now

#

Does that uuid need to be based on something or can it just be whatever

remote swallow
#

im guessing thats just the id of the resourcepack

#

so you can check if they accepted/denied or whatevert

opal juniper
#

I imagine itโ€™s just cause you can send multiple now so it knows if one is a duplicate

remote swallow
#

wouldnt it use hash for duplicate

opal juniper
#

Fairly expensive

#

Idk

remote swallow
#

i mean dont they check the hash anyway

young knoll
#

That hash is just for caching

#

I assume I can just use a random uuid and I donโ€™t have to generate it based off the file

quaint mantle
#

how would i make tablist people organized based off their rank

sullen marlin
young knoll
#

Cool

#

Very happy that we donโ€™t have to deal with merging anymore

astral scroll
#

whats the difference between File#mkdirs and #mkdir?

young knoll
#

mkDirs will also make any missing parent directories

#

Well, try to

river oracle
#

now you don't have to worry about the trying part

#

๐Ÿ’ช

young knoll
#

Yeah until something else goes wrong

#

Like

#

Idk cosmic bit flip

hot reef
#

Im trying to incorperate the mariaDB jdbc driver into a plugin and i just don't know what to do, I am aware shading is involved but how and how do i implement shading effectively in my project?

#
<!-- removed -->
 <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>papermc-repo</id>
            <url>https://repo.papermc.io/repository/maven-public/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.20.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <version>3.3.2</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>
astral scroll
#

its weird

#

cuz

river oracle
hot reef
astral scroll
#

when i use mkdirs on a file lets say new File(plugin.dataFolder, "imablock/block.json" literally creates a folder with named block.json and well, what in the big actual fuck

#

i want the file

#

not a foldee with the full name of a file

#

So i normally do

astral scroll
#

file.parentFile.mkdirs

river oracle
#

you're asking it to make a directory xD

#

what do you expect

hot reef
river oracle
#

just because you have a . at the end doesn't magically make it a file

river oracle
#

well

#

maybe for some META/INF exclusions one seocnd

astral scroll
#

so ig

#

calling parent's mkdirs is just what i nees

#

And then createNewFile

#

right?

river oracle
#

yes

#

@hot reef

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>${maven-shade-plugin.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>com.google</exclude>
                                    <exclude>sh.miles.raven:raven-platform-mongodb*</exclude>
                                </excludes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*.MF</exclude>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                                <exclude>com/google/**</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
            </plugin>```
#

obv you'd wanna replace my variable and exclusions but yeah

hot reef
river oracle
#

excludes things from your final artifact that could cause compatability

#

you can remove the com/google/** one

hot reef
#

would it looks something like this

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>org.mariadb</exclude>
                                    <exclude>mariadb-java-client</exclude>
                                </excludes>
                            </artifactSet>
                        </configuration>
                    </execution>

                </executions>
            </plugin>
river oracle
#

erm

#

I wouldn't exclude what you wanna shade

#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>```
#

more like this

hot reef
river oracle
#

Then you should be good

#

Are you packaging with mvn package

hot reef
#

yea

#

im using the package function from the intellij sidebar

#

lol

river oracle
#

Send your pom

hot reef
#

i need to verify on the forum hang on

river oracle
#

No

#

?paste

undone axleBOT
river oracle
#

You can just paste

#

๐Ÿฅณ I'd reccomend verifying at some point tho

hot reef
river oracle
#

Lgtm you using the right jar?

hot reef
#

yes

tender shard
#

what even is the issue? I haven't seen you send any error message at all?

hot reef
#

hang on

tender shard
#

have you checked if your jar contains org.mariadb.jdbc.Driver?

tender shard
#

unzip it

hot reef
#

i can do that!?!?

tender shard
#

jars are just zip files

river oracle
#

wrong!

#

they are fancy zip files

young knoll
#

Ur a fancy zip file

river oracle
#

this is another reason I somewhat dislike windows you can't just open a jar file

#

you gotta rename it to zip

#

on linux I just crack that baby open

kind hatch
#

Archive Manager go brrrr

river oracle
#

frr

young knoll
#

7zip go

hot reef
#

^

tender shard
#

i mean obviously the default "open with" is java

river oracle
#

its cuz you got winrar probs

#

I've never had that option

hot reef
#

it is indeed in there

river oracle
#

granted I'm in no space to talk I haven't used windows as a daily driver in uhhh 2 years now xD

kind hatch
#

Did you use the ole Class.forName() trick?

river oracle
#

ahhh yess Class.forName()

kind hatch
#

Tbh, it's bs that you still need to do that in some cases.

kind hatch
#

I'm pretty sure you don't have to use Class.forName with the MySQL driver anymore, but I think you still need to for mariadb and others.

young knoll
#

You have to force the classloader to load the class because ??? :)

tender shard
river oracle
thin iris
#

heyyyy

kind hatch
#

Tell it to not be

thin iris
#

how yall doin

hot reef
river oracle
#

I'd put it onLoad ๐Ÿง  ๐Ÿ˜†

river oracle
thin iris
tender shard
#

can't hurt to try it though

hot reef
#

im gonna try it now

formal vector
#

twas needed in my case as well

#

because things are weird

#

!

tender shard
#

hm weird, i never had to do this ever

hot reef
formal vector
#

hello there

hot reef
#

if this works

#

you all have my thanks โค๏ธ

#

THATS A NEW ERROR GG WE GOT SOMEWHERE ๐Ÿ˜‚

formal vector
#

that's just auth ye

hot reef
#

thank you all โค๏ธ

hot reef
#

lol

formal vector
#

:YEP:

#

oh no external emotes

#

damn

tender shard
kind hatch
#

Ayo, does the Donor rank get access to that?

tender shard
#

idk, I only know boosters get it

#

but maybe donors get it too

river oracle
#

shadow about to drop 100 for out of server emotes

kind hatch
#

I will

#

Watch me

young knoll
#

But boosting is cheaper

kind hatch
#

I also want to change my name, soooooo

tender shard
young knoll
#

Thatโ€™s only $10

#

:p

river oracle
#

Nothixal

kind hatch
#

But

young knoll
tender shard
#

donor rank is 100$ +

kind hatch
#

Purple color

tender shard
hot reef
#

tfw gif fail

#

๐Ÿ˜‚

young knoll
#

I wonder if orange gets external emotes

#

I donโ€™t have nitro so idk

kind hatch
#

I'm pretty sure you do

tender shard
hot reef
kind hatch
#

You can tell if you open the emoji picker and everything is not grayed out. :p

young knoll
#

Itโ€™s all greyed out

kind hatch
#

You got scammed

remote swallow
young knoll
#

Is this the cheapest or most expensive way to do it

#

Didnโ€™t cost money but did cost my soul

tender shard
#

How much is your soul worth?

remote swallow
#

9.99

young knoll
#

Bout tree fiddy

tender shard
#

Then it was cheaper this way

#

Trust me i learnt math once

kind hatch
#

Hey coll, don't you get access to the discord bot panels now that you're orange?

tender shard
young knoll
#

I can use some of the bot admin commands

#

But I donโ€™t have access to any fancy panels

kind hatch
#

So you can't fix the typo in the ?img command? smh

young knoll
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

young knoll
#

that can use

#

I assume?

kind hatch
#

Yes

remote swallow
#

you can

#

conclube can use it

#

so must be able to

young knoll
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

kind hatch
#

Ty coll

young knoll
#

Someone does not like typos

kind hatch
#

Someone clearly missed my javadoc pr. :3

young knoll
#

Oh no Iโ€™ve seen it

kind hatch
#

Oh, speaking of. Need to update it again.

kind hatch
young knoll
#

F

kind hatch
#

And it's updated. Maybe one day

young knoll
#

Try spam pinging md

thin iris
#

๐Ÿซƒ

sterile token
#

Im trying to test a plugin and server spams

[06:29:54] [Netty Epoll Server IO #1/WARN]: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.RuntimeException: Unable to access address of buffer
    at io.netty.channel.epoll.Native.read(Native Method) ~[spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.doReadBytes(EpollSocketChannel.java:678) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe.epollInReady(EpollSocketChannel.java:714) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.channel.epoll.EpollSocketChannel$EpollSocketUnsafe$3.run(EpollSocketChannel.java:755) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:268) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [spigot.jar:git-Spigot-db6de12-18fbb24]
    at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
dry hazel
#

what minecraft and java version is this?

sterile token
#

1.16

#

Server builted from BT (build tools)

#

also it start crashing when i start to connect the server

sterile token
tender shard
#

well are you doing netty stuff?

sterile token
#

the worst weird thing is that i dont have any plugin, just plain server built from spigot bt

dry hazel
#

your epoll is broken for some reason, I know it happens for 1.8 and lower on newer java versions, but no idea here

sterile token