#help-development

1 messages · Page 1113 of 1

twin venture
#

hi i have a question about something if i for example call this instsance of class :
called SkyPvPHandler ..
will it create new session handler everytime i call the SkyPvPHandler?

chrome beacon
#

Every time you create a new instance of SkyPVPHandler

#

since that's when the constructor is called

twin venture
#

i will create it once only

#

in the main class for example

#

and then i use lombok to get ann instance of it

scarlet gate
#

Seems to still happen on latest

chrome beacon
#

you can just inline new UserSessionHandlers

blazing ocean
#

nice chunks

halcyon hemlock
halcyon hemlock
#

I'm gonna become an artist when I grow up

humble tulip
#

W

#

T

#

F

#

What are you trying to do?

scarlet gate
#

I also just tried to verify this by adjusting the code formatting similar to your example earlier and it definitely is just returning a null profile

humble tulip
#

Send your current code

blazing ocean
scarlet gate
#
public @Nullable String getTextureValue(@NotNull ItemStack itemStack) {
    if (!itemStack.hasItemMeta()) {
        return null;
    }

    if (!(itemStack.getItemMeta() instanceof SkullMeta skullMeta)) {
        return null;
    }

    PlayerProfile ownerProfile = skullMeta.getOwnerProfile();
    if (ownerProfile == null) {
        return null; // Currently is returning null here
    }

    URL skinUrl = skullMeta.getOwnerProfile().getTextures().getSkin();
    return skinUrl != null ? getBase64FromUrl(skinUrl) : null;
}
halcyon hemlock
lost matrix
halcyon hemlock
quiet ice
# halcyon hemlock

Reminds me of that trippy game where by moving the camera you'd be mutating the world around you

#

Sadly I forgot the name of it

humble tulip
karmic falcon
quiet ice
#

Unlikely. It's rather unknown actually and has some extremely nauseating graphics

#

It worked by warping the same image to some kind of fractal? It's been a while though

scarlet gate
# humble tulip Wow that looks like it should work once you're passing a skull

The only thing that I noticed that I thought could potentially be of interest was that the log shows a "name=" value with nothing more about midway through, idk if that is of any importance though

ItemStack{PLAYER_HEAD x 1, SKULL_META:{meta-type=SKULL, display-name={"text":"Monitor","italic":false,"underlined":true,"color":"gold","bold":true}, lore=[{"text":"Custom Head ID: 100670","italic":false,"color":"gray"}, {"text":"www.minecraft-heads.com","italic":false,"color":"blue"}], skull-owner=CraftPlayerProfile [uniqueId=99da7d1a-4167-437c-93c6-fc85a8305b51, name=, properties={textures=[{name=textures, value=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUyNDVjMGQwOGQ2YTk3ZGM5MWY4Nzg0NTY1NTQ1MTRlY2NhOTQ4ZGIxMGYyYzk0NzE4MGMxMzM1NTQ4NjI5In19fQ==, signature=null}]}]}}
errant needle
#

can you help me with my plugin for my server i would credit you as a dev and add you if you want

river oracle
humble tulip
#

Here's what you should try @scarlet gate ,create a skull with a texture and then just see if you can read the texture from it

errant needle
river oracle
errant needle
#

i just started

#

pluh

quiet ice
#

It only takes like a year to get decent at it

scarlet gate
humble tulip
#
private static void applyTexture1_18(SkullMeta meta, String url) {
        PlayerProfile playerProfile = Bukkit.createPlayerProfile(UUID.randomUUID());

        try {
            playerProfile.getTextures().setSkin(url == null ? null : URI.create(url).toURL());
            meta.setOwnerProfile(playerProfile);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
quiet ice
#

With the amount of stuff you can do after that, it's quite the deal.

humble tulip
#

Just create a skull like this and then try to get the url from it right away

quiet ice
#

But at the same time you'll be selling your soul to the devil

humble tulip
#

Don't give the item or anything

scarlet gate
#

Sure

river oracle
#

Is there any reasonable way to get all the loaded spawn chunks on plugin startup

#

would it be a safe assumption to loop through all loaded chunks?

lost matrix
#
    Bukkit.getWorlds().forEach(world -> {
      for(Chunk chunk : world.getLoadedChunks()) {
        
      }
    });
#

That should do it

river oracle
#

alright thanks wasn't sure if that was a fairly safe assumption

lost matrix
river oracle
lost matrix
#

Yap. Honestly, i think JavaPlugin should have onLoad() onStartup() onPostWorld() methods instead. Depending on POSTWORLD plugins as a STARTUP plugin is impossible and cumbersome to workaround.

river oracle
pure dagger
#

Hey, how to do that if a player fishes another player, the second player cannot use elytre while being on the fishing rod,

the problem is that i dont see a way to detect where a player stops fishing another player

lost matrix
#

Test the ProjectileHitEvent as well since FishHook seems to be an instance of Projectile

echo basalt
lost matrix
# echo basalt No I'm not

Dont lie, you always code plugins for free and only care for exposure because you are rich and dont need any money. Just fame.

pure dagger
echo basalt
#

Damn you caught me

pure dagger
#

i think, i tested it and it seems that it does not work

#

;c

echo basalt
#

I'm batman

pure dagger
#

xdd

lost matrix
#

Wanna know how i got those scars?

lost matrix
pure dagger
#

wait wati

#

when should i check it?

lost matrix
#

First check the ProjectileHitEvent and EntityRemoveEvent
Those should both be fired for the FishHook when it hits -> put it in a Map<UUID, UUID>
When it is despawned -> remove from the Map

pure dagger
#

so.. how do i check if its despawned? when?

#

and probably Map<UUID, Set<UUID>>

#

how to listen to when player opens inventory?... but... InventoryOpenEvent only check for like opening chests or something but not opening their own inventory

humble tulip
#

The player inventory is assumed to always be open

#

@pure dagger so there's no way to tell

pure dagger
#

oh..

#

so... like, i need to make cooldowns and i would like to set item lore to the cooldown, i could like check every second and change lores, but its too lagy i guess, so i wanted to update them only when the inventories are actually opened

humble tulip
#

Ah

#

I see

pure dagger
#

what should i do? im sure its common problem

pseudo hazel
#

most people update it every second or something

#

why is it laggy

#

maybe you did it wrong

humble tulip
#

Yeah update it anyways

#

Computers aren't really that slow

pure dagger
pseudo hazel
#

well then how should it be done

pure dagger
#

i didnt do it yet

pseudo hazel
#

like what does your friend say how you should do it

humble tulip
#

Is it cooldown per item?

pure dagger
#

umm he talked about inventory open or something but he isnt really sure i see, he said he hasnt been doing minecraft plugins for 5 years

pure dagger
pseudo hazel
#

its either per item or for a certain material or whatever

#

like what is the cooldown like

#

if its for a material you can use the api to set a vanilla cooldown on that item type

pure dagger
#

umm its for items with specific namespacedkey

pure dagger
humble tulip
#

Is the cooldown a player cooldown

#

Or item cooldown

pure dagger
#

what does player cooldown or item cooldown mean

pseudo hazel
#

is the cooldown for the player that uses it

pure dagger
#

yeah

pseudo hazel
#

or does the item itself have a cooldown

pure dagger
#

yeah yeah

#

player

#

when item passed to another player cooldown is different

pseudo hazel
#

and you already have the part that sets the cooldown for the player?

pure dagger
#

yeah

#

there is cooldown but no way to show it

pseudo hazel
#

and do you also already have a way to get what items the players have that need to be updated?

humble tulip
#

You can show it on use

pseudo hazel
#

yeah thats I do too

#

I just have a message in chat when you use an item that has a cooldown still

pseudo hazel
#

I guess not

pure dagger
#

items with cooldowns have namespacedkey

pseudo hazel
#

like a way to see which items you need to update

#

right

pure dagger
#

and my idea was to check every second every item in every players inventory

#

and update it

#

to

#

player's cooldown on this item

pure dagger
pseudo hazel
#

when they try to use the item

#

instead of all the time

humble tulip
#

But you can just check cooldown players and find the item and update it

#

OR keep track of the inv slot

#

And update that single item

pure dagger
#

see

#

in lore

pure dagger
pseudo hazel
#

how do you store the items that have a cooldown for a player

pure dagger
#

aaaa

#

its like

#

i didnt know how to do that but i made a hashMap for each item

#

and it has UUID and Long

pseudo hazel
#

and how do you add and remove stuff from it

#

like what if the player puts the item away or whatever

pure dagger
#

its for like certain type

#

not one item

#

does it even matter?

pseudo hazel
#

well if it was for individual items you can just keep track of them and pdate the cooldown

#

but I see what you mean now

#

but what should the cooldown say if its in a chest

pure dagger
#

lets say there is cooldown for eating carrots,
when a player eats a carrot i add the player to a map, and the current time, when he wants to eat carrot again i check if the needed cooldown has passed

pure dagger
#

there

#

yeah it wouldnt be perfect

#

but idk what to do

#

maybe just give up

pseudo hazel
#

hmm

#

no ofc not giving up xD

#

I just wouldnt care about items in a chest

scarlet gate
# scarlet gate The only thing that I noticed that I thought could potentially be of interest wa...

I reckon it's something to do with this, I tried with a different head that does work and compared the content and the only obvious difference was the lack of the name

This is a working head:

ItemStack{PLAYER_HEAD x 1, SKULL_META:{meta-type=SKULL, display-name={"text":"","extra":[{"text":"Active Grass Cube","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"blue","bold":false}]}, skull-owner=CraftPlayerProfile [uniqueId=04049c90-d3e9-4621-9caf-0000aaa42450, name=HeadDatabase, properties={textures=[{name=textures, value=eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTgxOGFiZjRiNzUzMjFkMjJmNWY5ZDI4YzAzMzhlMDM2ZjQxNDBhYzQzMzQwYjk4OTM2N2MxNWNmZjYzOTA3MyJ9fX0=, signature=null}]}]}}
pseudo hazel
#

but like you would have to remove the cooldown for it I guess..

#

but its hard to just update all items correctly because the lore on an item changes for everyone that sees the item

pure dagger
pseudo hazel
#

and stuff like chat messages only appear for a certain player

#

yeah sure

#

just try it

scarlet gate
pseudo hazel
#

check all the open inventories

#

or player inventories I mean

#

and then update the items

pure dagger
#

like a player opens a chest

#

and it after max 1 sec updates correctly

pseudo hazel
#

and ofc the first thing you want to check for each item is if any player has tracked cooldowns for it in the first place

pure dagger
#

and it wont be too laggy because there is not many opened inventories

pure dagger
#

there can be 2 players opening the same chest

pseudo hazel
#

yeah

pure dagger
#

i think maybee.. give up with this thing in lore?

pseudo hazel
#

you reset items that are in chests

pure dagger
#

oh

#

no

#

...

#

doenst make sense either

pseudo hazel
#

or just hide the cooldown

#

like remove th cooldown from lore

#

and when the item gets pulled into a player inv it would appear for that player

#

players cant normally see each other's inventory slots

pure dagger
#

how do i do it?

#

oh

#

i know but

pseudo hazel
#

you would use inventory click and drag events

civic crest
humble tulip
scarlet gate
#

I was able to get the profile

pure dagger
#

idk what to do ;c

#

i think ill just do that when player tries to use an item that he cant use bc of cooldown ill just msg himm

scarlet gate
#

I reckon it's related to the empty name but am not certain

pure dagger
#

not pluign for me anyway

pseudo hazel
#

you can also skip the lore and just focus on like a chat message or smth

pseudo hazel
#

and come back to it later if you get ideas

humble tulip
#
public static String getUrlFromSkull(SkullMeta meta) {
        try {
            GameProfile profile = ((GameProfile) profileField.get(meta));

            if (profile == null)
                return null;

            Optional<Property> optional = profile.getProperties().get("textures").stream().findFirst();

            return optional.map(property -> new String(Base64.getDecoder().decode(property.getValue().getBytes())).split("\"")[7]).orElse(null);

        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
        return "";
    }
pseudo hazel
#

return null 💀

humble tulip
#

@scarlet gate this is a method I used pre 1.18, not sure if it works for newer versions

pseudo hazel
#

I would either return an empty string or null, not both

humble tulip
#
profileField = ((SkullMeta) skull.getItemMeta()).getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
humble tulip
#

I don't use this code anymore

#

Just from an old repo

scarlet gate
#

Yeah I do something similar for legacy versions:

@Nullable
public String getB64(ItemStack itemStack) {
    try {
        if (itemStack.hasItemMeta() && itemStack.getItemMeta() instanceof SkullMeta skullMeta) {
            if (skullMetaProfileField == null) {
                skullMetaProfileField = skullMeta.getClass().getDeclaredField("profile");
                skullMetaProfileField.setAccessible(true);
            }

            GameProfile gameProfile = (GameProfile) skullMetaProfileField.get(skullMeta);
            Iterator<Property> iterator = gameProfile.getProperties().get("textures").iterator();
            if (iterator.hasNext()) {
                Property property = iterator.next();
                return property.getValue();
            }
        }
        return null;
    } catch (Exception exception) {
        return null;
    }
}
humble tulip
#

Ah

pseudo hazel
#

based64

smoky oak
#

im on the new buildtools and i checked the generate-docs arg, but its not showing up in the 'ur about to run this command' info thing. will it still run said docs?

chrome beacon
#

🤔 It's showing up fine for me

#

and I'm not sure if it will still do it

#

try it and see ig

humble tulip
#

@scarlet gate that method will still work

scarlet gate
#

This top one doesn't allow to get the profile from SkullMeta#getOwnerProfile for me but the bottom one works fine, only difference was adding the name to the profile

/give @p minecraft:player_head[profile={id:[I;-1713734374,1097286524,-1815675771,-1473225903],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUyNDVjMGQwOGQ2YTk3ZGM5MWY4Nzg0NTY1NTQ1MTRlY2NhOTQ4ZGIxMGYyYzk0NzE4MGMxMzM1NTQ4NjI5In19fQ=="}]}] 1

/give @p player_head[profile={name:"HeadDB",id:[I;-1713734374,1097286524,-1815675771,-1473225903],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUyNDVjMGQwOGQ2YTk3ZGM5MWY4Nzg0NTY1NTQ1MTRlY2NhOTQ4ZGIxMGYyYzk0NzE4MGMxMzM1NTQ4NjI5In19fQ=="}]}] 1
scarlet gate
humble tulip
#

yep

smoky oak
#

hm it shows once it updates after hitting the compile button

scarlet gate
#

Why does it do that 😨

humble tulip
#

name is probably null

scarlet gate
#

Almost certainly

#

Not sure why that should mean it can't get the profile though

#

I understand that is happening but I don't quite get the reasoning

humble tulip
#

cuz spigot says so!!

scarlet gate
#

😭

humble tulip
#

tbf

#

whoever is creating the skulls is the problem

scarlet gate
humble tulip
#

they should atleast put a dummy name

scarlet gate
#

I do agree

smoky oak
#
fatal: detected dubious ownership in repository at 'D:/Creation/Minecraft/Bukkit'
'D:/Creation/Minecraft/Bukkit' is owned by:
    (inconvertible) (S-1-5-21-3364630119-807111168-251932798-1001)
but the current user is:
    AORUS_M/MOTERIUS (S-1-5-21-3738764286-1943144298-2269993401-1002)
To add an exception for this directory, call:

ok whats going on here? this never happened before

humble tulip
scarlet gate
smoky oak
#

oh wait it provides a fix

scarlet gate
#

They have a plugin too though (The heads from the plugin work perfectly fine)

humble tulip
#

wait so you're getting the broken heads from the command?

smoky oak
smoky oak
#

oh for gods sake it quit with the same error again

#

can i just get a working buildtools please lol

chrome beacon
#

?jira

undone axleBOT
chrome beacon
#

PlayerProfile has the name as nullable so it shouldn't have to do null checks in skull meta

scarlet gate
#

Ooh ok

smoky oak
#

alright so im changing the owner of all object and, well...

pure dagger
#

how do you get player heads ? (i need rubiks cube head xD)

smoky oak
pure dagger
#

umm the second one i think but idk what this means

smoky oak
#

you can generate a head without an actual user owning it

#

by providing it a properly encoded skin it will have that skin

#

i dont quite recall how exactly it works though

paper viper
#

Hm, so I'm trying to add a custom glow effect to an entity which specific player watchers (I don't want all players on the server to be able to see the effect). I've managed to get each Player's scoreboard and add the entity id and themselves to the team. I can't use Entity#setGlowing because that sets it glowing for everbody so I used packets to send to a specific player.

But for some reason, when I send the glow packet to a person, it still makes it glow for everyone else (code here). I used entity metadata packet and tried to udpate it for one player only

echo basalt
#

you're still updating the entity's data

#

You might want to instead dump the data and modify / insert a DataValue on the list instead

paper viper
#

Hmm so getEntityData().getNonDefaultValues() , and then modify 0th index byte

#

and then send the packet?

echo basalt
#

or if it doesn't exist, insert an element yeah

#

Might return an immutable list, defensive copy is recommended

#

yeet

kindred quest
#

hi i have this issue can someone help me ? Failed to get ProtocolManager instance.

paper viper
#

or would just the first index be empty

#

or could it be either

echo basalt
#

It would mean that the first index is set as default

paper viper
#

Oh ic so 0

humble tulip
smoky oak
paper viper
#

I tested it in game and it worked

echo basalt
#

no guarantee that the list is sorted

paper viper
#

Oh

pure dagger
#

dont get that code

humble tulip
#

You need the skull url

pure dagger
#

how to get skull url

humble tulip
paper viper
humble tulip
#

Under the developers section you'd see the url

pure dagger
#

oki

#

can i use it in 1.20.1?

echo basalt
paper viper
#

Kk

echo basalt
#

You can nuke the found boolean by having foundIndex default to -1

paper viper
#

oh yea true

amber stump
#

How do I set the texture profile property to a player head?

coarse linden
#

when is this going to be addressed

smoky oak
#

can you manipulate the amount of armor indicators armor gives without nms nonsense?

dawn flower
eternal oxide
#

yeah, its not

dawn flower
eternal oxide
#

thats your project not the jar

#

then thats not teh jar you are testing on your server

#

do NOT replace teh jar without stopping the server

dawn flower
eternal oxide
#

open the config.yml that is in the jar on your server

dawn flower
eternal oxide
#

Not possible

#

If you really did replace teh jar with the server stopped and that really is the jar on your server it would be impossible to have that error message

dawn flower
#

idk man it just happened

eternal oxide
#

Throw PC out the window, its haunted

worthy yarrow
#

There's ghosts in the code!

smoky oak
#

no its just microsoft

worthy yarrow
#

Someone's a bummer to be around

wet breach
dawn flower
#

i forgot to depend on vault, i think that fixed it

smoky oak
dawn flower
#

not sure how config is related to dependencies, but this is coding; everything is possible

smoky oak
#

im just salty

slender elbow
#

hehehaha

wet breach
#

yeah windows 11 sucks and has too many issues

blazing ocean
wet breach
#

waiting for windows 12 where they remove the strict hardware requirements

#

since whoever implemented that with windows 11 was quite dumb XD

worthy yarrow
blazing ocean
#

hi

eternal oxide
slender elbow
worthy yarrow
#

chad activity

slender elbow
#

I'm a lead revolutionist

eternal oxide
#

true rebel

wet breach
#

windows 11 was a big fail more so then vista was

slender elbow
#

I also push doors that say pull but that often doesn't go too well

eternal oxide
#

I'm on Win7. Still waiting for a good OS

wet breach
#

windows 10 is a good OS

onyx fjord
#

is there an event that triggers on each block breaking stage (when texture changes)

eternal oxide
#

nah Win10 is a tablet OS

wet breach
#

its not o.O

#

windows 8 is

onyx fjord
#

linux is an everything OS (except of smartphones for now, excluding android)

dawn flower
#

have fun gaming on linux

eternal oxide
#

I like linux, btu I dislike forced command line

dawn flower
#

(it runs minesweeper pretty well!)

onyx fjord
wet breach
onyx fjord
#

linux gaming performance is better than windows

#

only game support is worse

dawn flower
onyx fjord
#

progress on fully free driver continues

wet breach
onyx fjord
#

then watch benchmarks

#

DXVK often beats native directx

wet breach
#

I have, it is why windows continues to be the number 1 OS for gaming

eternal oxide
#

I could actually believe it, what with all teh bloat Windows has

dawn flower
#

windows is filled with ads and bloatware which makes games perform worse

onyx fjord
#

idk what it is but yea most likely the overhead of windows being windows

eternal night
#

windows is the no 1 os for gaming becauses linux support sicks

#

the performance really isn't an issue

onyx fjord
#

its good enough if you dont play hugely comp games

eternal night
#

you run windows because you get to install rootkit malware from your fav company

eternal oxide
#

All my games are mostly 10 years old or more

onyx fjord
#

with weird anticheats, but then why would you want software comparable to crowdstrike on your pc that could also end up the same as crowdstrike

dawn flower
#

can InventoryClickEvent.getClickedInventory ever be null

onyx fjord
#

imagine one day your pc enters a boot loop because of valorant

#

or any other game

eternal oxide
dawn flower
#

...

wet breach
dawn flower
wet breach
#

would be nice if you didn't spread myths lol

onyx fjord
#

not a myth?

#

its the same level of software as crowdstrike

wet breach
#

its not

eternal night
#

?

slender elbow
eternal oxide
onyx fjord
#

Vanguard also has control level above your windows OS

dawn flower
#

how can you click outside

wet breach
onyx fjord
#

it does

wet breach
#

so its modifying the EFI?

#

that is the only thing above the OS

onyx fjord
#

idk what it does but it bypasses all the system restrictions

dawn flower
#

vanguard uses a driver

onyx fjord
#

has absolute control over the system

wet breach
#

it doesn't have absolute control

#

if it did, you wouldn't be able to remove it

eternal oxide
#

sounds like a root kit

onyx fjord
#

depends whats your definition of that is

#

it is a root kit

kind hatch
eternal oxide
#

Sony liked installing those 20 years back

onyx fjord
#

its most likely even above your antivirus

#

isnt that concerning

wet breach
#

its not

#

anti-viruses depending which one, can remove drivers

chrome beacon
#

Ghensin Impacts anticheat driver was used to bypass antivirus software

kind hatch
#

That was a funny story

wet breach
#

windows defender is unique in that it can remove infected system files

dawn flower
eternal oxide
#

I only have defender

onyx fjord
coarse linden
#

not in the spigot api atleast

eternal oxide
quaint mantle
onyx fjord
#

can can i check manually if player is digging currently?

wet breach
#

for someone who has been in this discord for a long time, I am surprised you don't even know how to check for events existing

coarse linden
#

but not with just the spigot api

#

anything like the player holding down their mouse is basically impossible

onyx fjord
#

suprised us gov fights titkok while chinese games install rootkits on your system

wet breach
#

yes you can check if a player is digging

dawn flower
onyx fjord
#

yea thats an option

#

adding on block damage and removing on dig end

wet breach
onyx fjord
#

we all know its to stop the competition

wet breach
#

even if tiktok gets banned in the US it mostly just means they are forbidden from US economics

onyx fjord
#

shorts are equally evil

#

only the data is owned by someone else and in US gov hands

dawn flower
#

people will bypass it with vpns, similar to the turkiye roblox situation

wet breach
#

not sure why you love tiktok

onyx fjord
#

turkey vs roblox is wild, what was the reason it happened?

coarse linden
#

reels are so much better than tiktok

wet breach
#

I would prefer it not existing in the US anyways

onyx fjord
wet breach
#

but know this, businesses don't have a right to exist in the US

onyx fjord
#

better ui

#

less annoying ads

#

better filters

wet breach
#

unlike other countries, businesses actually need permission to exist 😉

dawn flower
#

tiktok's algorithm is made to "force" you to not stop scrolling

onyx fjord
#

reels are spamming me with "funny animal" videos

wet breach
#

you don't like funny animals?

onyx fjord
onyx fjord
#

and food content

wet breach
#

someone doesn't like animals

#

explains a lot

onyx fjord
#

my turtle is enough

wet breach
#

you should just make a yt channel of nothing but your turtle

#

you will make a lot 😉

azure zealot
#

is there an event that is called before server is closed? the player quit and kick event are not called in this case

eternal night
#

JavaPlugin#onDisable

azure zealot
#

it should only be called on server close

#

not plugin disable

eternal night
#

There is not

vast ledge
eternal oxide
#

You could add a shutdown hook, but that would only fire after teh server has terminated

azure zealot
#

shutdown hooks don't work

#

as the players are all already disconnected

#

i need the connection before the close

slender elbow
#

onDisable it is

eternal oxide
#

No event exists

azure zealot
#

i think i will onDisable and check if the server is not running

#

in this case it should be the sutdown

eternal oxide
#

no

azure zealot
#

why not

eternal oxide
#

the server will be running while onDisable fires

eternal night
#

it may not

azure zealot
eternal oxide
#

may not?

eternal night
#

Server#isStopping should be accurate

eternal oxide
#

ah

azure zealot
#

yes

azure zealot
eternal night
#

what

azure zealot
#

lmao

#

there is no xd

eternal oxide
#

Is lynx spreading paper witchcraft again?

eternal night
#

wait

azure zealot
#

do i really need to use nms for this...

eternal night
#

is that paper?

#

it is KEKW

vast ledge
#

Looks like

eternal night
#

sorry

vast ledge
#

it

eternal night
#

my condolences

azure zealot
#

no i am using spigot

#

as this is the spigot discord

#

lmao

vast ledge
#

theres only

shutdown()
azure zealot
#

i need bukkit api for isStopping

#

or isRunning

#

wow

vast ledge
#

wow?

azure zealot
#

wow like in "wow thats bad"

eternal oxide
#

I guess its more like, not been any demand

eternal night
#

I mean, an event would be nicer for sure

#

but as a certified bungeecord cookie contributor, adding a new event to spigot should be a piece of pastry

azure zealot
#

you mean bungeecord collaborator?

sterile breach
eternal night
azure zealot
#

i also need the event for bungee but i think in bungee i can use onDisable

sterile token
#

how to initialize an instance of an object using reflections? considering that there is no known constructor, no params constructor or parameter types. As gson does it I know that you can initialize class instances without importing anything and without requiring an empty constructor

#

Would i need to use Unsafe for achiving that?

hazy parrot
#

?

#

No args constructor is implicit if no other is defined

sterile token
#

yeah that the problem, if they define one, they can or not. That makes me struggle

hazy parrot
#

I mean you can get all constructors

sterile token
#

because if they dont define constructor perfect i can use that one, but if they define constructor with parameters. I wont have those parameters to initialize the class

hazy parrot
#

Find if there is one that match your types

sterile token
#

but i dont know types

#

because data can be anything

coarse linden
#

thats when you have to be cheap and use gson

sterile token
#

i mean i just want to understand how they do it

coarse linden
#

how what

sterile token
#

my final conclusion is using Unsafe

sterile token
coarse linden
#

yes

#

use gson

sterile token
#

yes or yes not mattering if having / having not constructor

sterile token
coarse linden
#

new Gson().fromJson("{}", Instance.class)

#

You don't need to

sterile token
#

is not even relevate to json

coarse linden
#

yeah

#

you dont need it to be

#

it still wroks

#

works*

sterile token
#

letme use translator

coarse linden
#

I understand what you mena

sterile token
#

i think im not explaning well

coarse linden
#

mean

#

You dont need a json to use fromJson

#

your json is the {}

sterile token
#

I want to create a simple system that serializes me from a file with content to Java objects, as an object mapping would do. But to initialize the object I have problems with the constructors and their parameters, because I don't know completely which consturctor parameters I have or don't have

torn badge
#

Gson is just using the class fields

sterile token
torn badge
#

It's assuming every field is a parameter in the constructor

#

Unless it's annotated to not be

sterile token
#

so gson just loop over constructors and class fields, so when he find a match he create the constructor?

torn badge
#

And that's only if there is no no-args constructor

sterile token
coarse linden
#

if you use gson

#

all of the fields will be null

#

it doesn't fill them in for you

sterile token
#

as far i dont know the args from constructor i cant initialize the object

torn badge
#

Just make it have an empty constructor

sterile token
coarse linden
#

yeah

#

you do that or gson

#

both options aren't perfect

sterile token
#

i would be using Gson but i cant because gson is designed for Json

torn badge
#

Empty constructor is the most basic thing for deserialization

sterile token
coarse linden
#

you can use gson to get the instance's type

#

without calling the constructor

sterile token
#

yeah i want to copy from Gson idea

#

but with my code because i wont depend on Gson

coarse linden
#

okay

sterile token
#

if data going to be deserialized/serialized were Json no problem i use it

coarse linden
#

i understand

#

well

#

you can look at the src

sterile token
#

ohh cool, you catch what i mean

coarse linden
#

of the gson.fromjson

#

but i dont think

#

anyone here can really explain to you how it works

#

under the hod

#

hood*

sterile token
#

na its perfect i was asking in general to know if was osible or not

coarse linden
#

it might

#

i dont know what it actually does

#

if you take a look you might figure it out

#

good luck

sterile token
#

thanks man

#

I seen from the hood is mix of constructor, params, matching them and Java Unsafe like final option

grim hound
#

Very useful, I use it all the time

sterile token
#

i seen that i can like enforce class initialization without taking in account constructors

dry hazel
#

you should still just use a real constructor

#

unsafe's capabilities were reduced greatly in the latest jdk releases and the entire class is going away in the future

coarse linden
#

but you already had a constructor with parameters

dry hazel
#

fill the parameters

coarse linden
#

yeah but what if it can't be null?

#

it needs to be a parameter

#

for the user they need to input one

#

but for your development

#

you know ur project and what it is

#

you can basically enable yourself to create one

grim hound
#

/\

coarse linden
#

but not the user

#

if that makes sense

#

i wish there were a more elegant solution

dry hazel
#

huh

coarse linden
#

you are allowed to create an instance of that class without parameters

#

but someone else using your lib or whatever is not

#

because they are using it for another method or something, but you need it to invoke a method inside

#

if you have explicit default constructors in every class

#

it would be confusing for everyone using your lib

#

because then they have to look and see what they need to provide as its not declared unless you don't provide a default constructor

dry hazel
#

I'm not sure what you're trying to say, we're talking about de/serialization of transparent data carriers, right?

coarse linden
#

not necessarily

dry hazel
#

example: jackson can deserialize json and bind it to an object through either a no-arg constructor and getters+setters/non-final fields (iirc) or a constructor with named parameters or parameters annotated with a special annotation that carries the parameter name

for most data carriers, the second method works just fine and no unsafe

pure dagger
#

how to make a plugin that gives player an effect?, i used playerHeldEvent or something like that but how to actually detect when player stops holdin the item?

coarse linden
#

but i had a similar issue when it came to invoking methods in a class that had a constructor with parameters

#

it isn't a dto either

#

and yes having a default constructor explicitly can solve this

#

but it leads to confusion and other sorts of problems

coarse linden
#

or do something with packets using protocol lib

pure dagger
coarse linden
#

you can make it more efficient

pure dagger
coarse linden
#

and only loop when the playerHandEvent is called

#

and then stop when the item was removed

#

so its not looping every tick

pure dagger
#

yeah ill maybe do taht

#

so when player starts holding an item i give him the efect every maybe 3 seconds, and alaways check if he still holding otherwise cancel()

#

thats good i thingk

coarse linden
#

yeah but make it like

#

1 tick

#

so you dont have multiple loops

#

because if it only checks every 3 seconds

#

they can dequip and equip the item back when its not checking

pure dagger
#

what horrible will happen then ?

coarse linden
#

and it thinks that the player hasn't changed their item, although you could just cache it now

coarse linden
#

but you can either make it 1 tick or cache the loop

#

so you can only have one present

#

per player

#

orwhatever you'd like

pure dagger
#

umm

#

how to cache it how this works?

#

i mean it sounds better than every tick

coarse linden
#

You would create a hashmap with the UUID and the bukkitrunnable

pure dagger
#

oh yeah

coarse linden
#

and then check if that hashmap contains the uuid and so on

pure dagger
#

thats good

#

umm

#

solution

#

so no multiple bukkitrunnables for 1 player

coarse linden
#

yes

#

and it would be better than 1 tick for performance wise

#

everything else like when you're checking it is up to you

pure dagger
#

thank!

#

s

#

i have so little time to finish a plugin... and i started a few days a go and i had to remember everything because i didnt do minecraft plugins for a while im like speedruning so im posting here a lot of questions lol

coarse linden
#

ah ok

pure dagger
#

also, does anyone know how to make that:
when a player catches another player with fishing rod, the catched player cant do something, but when he is not longer on the fishing rod, he can do it

the problem is that there is fishing rod event, but i dont know how to detect when player isnt catched anymore

grim hound
#

Let's say a player sends a command. He opens chat, and clicks the arrow up button.
Is it possible to either remove the suggestion record of that command or at least change it?

blazing ocean
grim hound
#

Mm

#

Aight well then no, I guess

eternal oxide
#

what do you want to do? change a command thats shown on the client?

upper hazel
#

I have a moral question.

Let's imagine the following situation: there is a platform where some open source projects are stored, both official and user (popular).
If a user wants to remove his project from the site, then there is a situation in which I would not like to be in.
On the one hand many people will be angry that an important project was deleted, on the other hand if I as an admin try to restore it by ignoring the developer it will be rude.
how to avoid this

eternal oxide
#

it all depends on the plugin license

#

if redistribution is allowed you cna do nothing

upper hazel
eternal oxide
#

still depends on the license

upper hazel
#

lol

#

wth

eternal oxide
#

OS is a gerneral term for many license

upper hazel
#

open source with restrictions

eternal oxide
#

some have specific restrictions

upper hazel
#

loool

#

then this not open source i gess

wet breach
#

open source just means the ability to see the source without having to do anything special

#

it doesn't make it free or allowed to redistribute

upper hazel
#

this hard

#

i gess i need create full open source condition

#

for this

atomic niche
wet breach
#

you can argue it all you want

smoky oak
#

can someone give me an example pom? can't find mine

wet breach
#

an example pom of what?

smoky oak
#

for a plugin?

wet breach
#

your IDE should generate one

smoky oak
#

ye but it doesnt have the spigot stuff in it

wet breach
#

which spigot stuff?

smoky oak
#

like,,,, 'use this api'?

wet breach
#

thats just a matter of adding a dependency

#

and declaring the repo where it resides

#

in that case just find some random plugin that has a github

#

look at their pom

#

or if you have other projects already for plugins, just open one of your projects

#

recommend creating a project template for plugins so you don't have to worry about this

smoky oak
#

yea i cant find that lol

#

i had one

#

i found the spigot api but not the javadoc

wet breach
#

well with netbeans its easy to create a project template couldn't tell you how to do it with intellij

wet breach
smoky oak
#

oh i dimly recall something about that

#

are they one import now?

#

the spigot-api one?

wet breach
#

uh, typically you don't have to import javadocs but javadocs typically reside in the same location as the api so that your IDE can auto pull it in if you want it to

smoky oak
#

idk when i tried last time i had to manually import it

#

been a while tho

#

yep no doc here

coarse linden
#

that is not the javadoc

#

those would be called comments

#

this is the javadoc

sacred mountain
#

[21:09:59 WARN]: java.lang.IllegalAccessException: class me.vlink102.personal.Laser$Packets cannot access a member of class net.minecraft.network.syncher.SynchedEntityData with package access

#

:(

smoky oak
#

u know what i mean

#

the ctrl q javadoc

sacred mountain
coarse linden
sacred mountain
#

no luck so far, the methods seem to not be accessible idk why

smoky oak
#

are you saying its no longer available in-ide?

coarse linden
#

it was never to begin with

#

spigot api didn't have any

#

other apis/libs might

#

its optional

smoky oak
#

i know that i could read the javadocs in ide with that before

coarse linden
#

hmmm nop

smoky oak
#

its why i run the --generate-docs arg in the first place

coarse linden
#

no

#

maybe intellij updated

sacred mountain
#

oh

#

think i may be stupid

#

mb

#

it would help if i open my eyes before posting

smoky oak
#

<classifier>javadoc</classifier> apparantly

stuck oar
#

right now im using hashmap for a kit cooldown but what do i use if i want multiple kit cooldowns

kind coral
stuck oar
#

double instead of long but yes

#

public static HashMap<UUID, Double> cooldowns;

kind coral
#

Id suggest long to use the time you started the cooldown

stuck oar
#

yeah was planning on swapping

kind coral
#

would be best, i think you could use tables for UUID, String, Long where as string is your kit identifier

#

so you dont store the whole object as key

stuck oar
#

how would i make this work with multiple cooldowns though?

#

because i think this one will only let me have 1 cooldown

kind coral
#

Since you have a table its like you having two columns pointing to a value

#

you can have

UUID-1 Kit1 Cooldown
UUID-1 Kit2 Cooldown
UUID-2 Kit3 Cooldown

#

instead of
UUID-1 Cooldown

stuck oar
#

this sounds like gibberish to me tbh, is there a doc for this

kind coral
#

But you could also use a Set or maybe directly a map with a list as value with your cooldowns like

public record KitCooldown(String kitIdentifier, long start) {}
private final Map<UUID, List<KitCooldown>> playerCooldowns = Maps.newHashMap();
#

im going to send you the docuemntation for the table one sec 🙂

stuck oar
#

thank you

kind coral
dawn flower
#

how do i exclude group 1 from group 0 in regex

gentle yacht
#

i've been trying to test out map changes in the latest version of spigot, and i have this bit of code:java @EventHandler private void onMapCreate( MapInitializeEvent event ) { event.getMap().addRenderer( new MapRenderer() { @Override public void render( MapView view, MapCanvas canvas, Player player ) { canvas.getCursors().addCursor( new MapCursor( ( byte ) 32, ( byte ) 32, ( byte ) 0, Type.RED_MARKER, true ) ); canvas.getCursors().addCursor( new MapCursor( ( byte ) 32, ( byte ) -32, ( byte ) 0, Type.TARGET_POINT, true ) ); } } ); }
but the cursors it produces is

#

im not able to create the red version of the player marker, is this a bug?

nova shoal
#

Dear,

I got a problem with my Discord Plugin Bot, where the class TextChannel is never found, even with the good imports.

sullen marlin
nova shoal
#

Here the current code of it:
`package com.illamaplugins.illamadiscord;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.exceptions.RateLimitedException;
import net.dv8tion.jda.api.requests.RestAction;
import javax.security.auth.login.LoginException;

public class DiscordBot {

private final JDA jda;
private final String channelId;
private Message pinnedMessage;

public DiscordBot(String token, String channelId) {
    this.channelId = channelId;
    try {
        jda = JDABuilder.createDefault(token).build();
        jda.awaitReady();
    } catch (LoginException | InterruptedException | RateLimitedException e) {
        throw new RuntimeException("Failed to initialize Discord bot", e);
    }
}

public void connect() {
    // Already connected in the constructor
}

public void disconnect() {
    jda.shutdown();
}

public void updatePinnedMessage(String content) {
    TextChannel channel = jda.getTextChannelById(channelId);
    if (channel != null) {
        if (pinnedMessage == null) {
            channel.sendMessage(content).queue(message -> pinnedMessage = message);
        } else {
            pinnedMessage.editMessage(content).queue();
        }
    }
}

}
`

#

Did I missed something somewhere?

torn badge
#

Only that it‘s old, less performant when you don't need it to be synchronized, and doesn't allow null keys/values

kind coral
#

could also make map in map but idk

gentle yacht
# sullen marlin It would seem like it

i did some more testing, and it seems like im not able to send the map packet with the red marker by constructing the map packet with the corresponding icon otherwise it throws an error: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:map_item_data' at net.minecraft.network.codec.IdDispatchCodec.a(SourceFile:55) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8] at net.minecraft.network.codec.IdDispatchCodec.encode(SourceFile:14) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8] at net.minecraft.network.PacketEncoder.a(SourceFile:26) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8]... Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.core.Holder.a()" because "var0" is null at net.minecraft.core.IRegistry$1.a(SourceFile:189) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8] at net.minecraft.core.IRegistry$1.a(SourceFile:186) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8] at net.minecraft.core.Registry.c(SourceFile:25) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4300-Spigot-a759b62-7070de8]

torn badge
#

Map<UUID, List<Cooldown>> is totally fine

nova shoal
#

Someome got an idea for my problem there of my dependencies?

echo basalt
#

a Cooldown class that has a policy (stack vs override) and wraps a Map<UUID, Long> is my go-to approach

torn badge
grim ice
#

I can't find net.minecraft.server.dedicated.DedicatedPlayerList in the spigot stash, any idea?

#

I can find CraftServer where its referenced just fine

eternal oxide
#

thats nms and will not be in stash

nova shoal
river oracle
eternal oxide
#

or look in your buildtools work directory

grim ice
#

ah

grim ice
#

Okay so

#

-Dorg.gradle.java.home= just doesn't work

#

it being there and not being there is the same

remote swallow
eternal oxide
#

its there for me

echo basalt
#

windows 7 spotted

eternal oxide
#

yepers

echo basalt
#

RIP mans security

eternal oxide
#

solid as a rock

echo basalt
#

that's what they want you to believe

eternal oxide
#

more solid than Win 11 🙂

#

the only known exploit I havn't patched is teh IPv6 exploit, but I'm behind NAT on IPv4 so not vulnerable.

nova shoal
eternal oxide
#

fully

nova shoal
#

Even for gaming ?

eternal oxide
#

you have to install a few patched/updates yourself, but its great

#

I've had no issues

nova shoal
#

Dear,

I got a problem with my Discord Plugin Bot, where the class TextChannel is never found, even with the good imports.
Here the current code of it:
`package com.illamaplugins.illamadiscord;

import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.TextChannel;
import net.dv8tion.jda.api.exceptions.RateLimitedException;
import net.dv8tion.jda.api.requests.RestAction;
import javax.security.auth.login.LoginException;

public class DiscordBot {

private final JDA jda;
private final String channelId;
private Message pinnedMessage;

public DiscordBot(String token, String channelId) {
    this.channelId = channelId;
    try {
        jda = JDABuilder.createDefault(token).build();
        jda.awaitReady();
    } catch (LoginException | InterruptedException | RateLimitedException e) {
        throw new RuntimeException("Failed to initialize Discord bot", e);
    }
}

public void connect() {
    // Already connected in the constructor
}

public void disconnect() {
    jda.shutdown();
}

public void updatePinnedMessage(String content) {
    TextChannel channel = jda.getTextChannelById(channelId);
    if (channel != null) {
        if (pinnedMessage == null) {
            channel.sendMessage(content).queue(message -> pinnedMessage = message);
        } else {
            pinnedMessage.editMessage(content).queue();
        }
    }
}

}
`

grim ice
#

for years

#

I only went for win11 this year

#

and it was genuinely an amazing experience

#

relatively better than windows 11

#

aside from the software that I can now use

carmine oracle
#

hey, why is my plugin importing bukkit 1.15? im setting my import for spigot to 1.21

#

and I do't have any import for bukkit 1.15 anywhere within my build.gradle

eternal oxide
#

depending on vault?

carmine oracle
#

oh

#

yea

#

does vault do that?

eternal oxide
#

move it down in priority

carmine oracle
eternal oxide
#

just make sure it is below spigot in your build.gradle

carmine oracle
#

actually nvm

#

everything is below spigotmc

#
repositories {
    mavenCentral()
    maven {
        name = "spigotmc-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
    maven { url "https://repo.oraxen.com/releases" }
    maven { url 'https://redempt.dev' }
    maven { url 'https://jitpack.io' }
    maven { url "https://maven.enginehub.org/repo/" }
    maven {
        name = "CodeMC"
        url = uri("https://repo.codemc.org/repository/maven-public/")
    }
    maven { url 'https://nexus.scarsz.me/content/groups/public/' }
}

dependencies {
    compileOnly "org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT"
    implementation 'com.github.Redempt:RedLib:6.6.1'
    compileOnly 'net.luckperms:api:5.4'
    compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.0.2-SNAPSHOT'
    implementation 'com.github.Zrips:Jobs:v5.2.2.3'
    compileOnly 'com.github.LoneDev6:API-ItemsAdder:3.6.1'
    compileOnly "me.NoChance.PvPManager:pvpmanager:3.18.7"
    implementation 'org.mariadb.jdbc:mariadb-java-client:2.1.2'
    testImplementation 'com.h2database:h2:1.3.148'
    implementation 'com.zaxxer:HikariCP:2.3.2'
    compileOnly 'com.discordsrv:discordsrv:1.27.0'
    compileOnly 'io.th0rgal:oraxen:1.173.0'
}
eternal oxide
#

was it always?

carmine oracle
#

think so

eternal oxide
#

no clue with gradle then. wityh maven you can get a dependency tree

carmine oracle
#

ok I fixed the inclusion

#

now I can't access what I want 💀

#

my IDE won't recognize it from spigot 1.21

#

do i need to include something else?

eternal oxide
#

no

#

is it red?

carmine oracle
#

wdym red?

eternal oxide
#

in your ide

carmine oracle
#

ah yeah

eternal oxide
#

intelij?

carmine oracle
#

yep

eternal oxide
#

try updating IJ. if not updated it has problems with Java 21

worthy yarrow
#

We love intelliJ sometimes

carmine oracle
#

oh

#

yeah ive never updated the poor thing

#

will try

worthy yarrow
#

Hi elgarl

eternal oxide
#

hi 🙂

worthy yarrow
#

Whatcha been up to

eternal oxide
#

Nothin, how about you?

worthy yarrow
#

skyblock / rpg core

#

I threw myself into the review gauntlet

eternal oxide
#

ah nice

carmine oracle
eternal oxide
#

I just finished a private commision for an Essentails replacement myself. So not really nothin 🙂

worthy yarrow
#

I didn't know commits had names tbf, I use git just to keep code safe this laptop is old and my projects are not on the ssd (don't ask why)

#

I also just started actually making commit messages

carmine oracle
eternal oxide
#

ah I love commit messages.

carmine oracle
#

btw why cant i upload images?

eternal oxide
#

?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

carmine oracle
#

ohhh this account

#

yeah

#

this account isnt verified

#

not my main

#

rip

worthy yarrow
#

I imagine you're probably faster than I am

eternal oxide
#

um, about a month on and off

#

it had to be original code as it was a paid commission

worthy yarrow
#

doing better than me to be fair, I'm probably at like 20% and git says I made the repo aug 1st

carmine oracle
#

i cant get my thing to work D:

eternal oxide
#

clear caches and restart

#

in file menu

carmine oracle
#

nope, didn't work

#

so...

#

it seems like worldguard was including that bukkit 1.15 thing

#

so I did this:

    compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.2-SNAPSHOT') {
        exclude group: 'org.bukkit', module: 'bukkit'
    }
#

and I thought spigot's dependency would include the Attribute class and stuff

#

but for some reason it does and does NOT at the same time (????)

eternal oxide
#

it does

carmine oracle
#

I can't show it but there is org.bukkit.attribute.Attribute under spigot's jar, but within the code, trying to do that same text won't work, there's nothing to autocomplete for that

eternal oxide
#

I can't help you with gradle though

carmine oracle
#

i fckn hate oraxen istg

#

for some reason their dependency doesn't work with maven so I had to move my project to gradle

#

and now there is this

carmine oracle
eternal oxide
#

api

#

I have a feeling I remember someone else saying somethign about that class a while back. But my memory is so bad

smoky oak
#

isnt that 2nd remapped?

carmine oracle
#

what

smoky oak
#

both are legit imports and i think the second was for remapped

eternal oxide
#

yes if you setup for remapped, else its just obfuscated

carmine oracle
#

idk what that means lololol

smoky oak
#

access to NMS thats not just a string of letters and numbers lol

carmine oracle
#

would that have something to do with my problem?

smoky oak
#

doubtful

#

remapped is usually internal stuff. it really should not influence other plugins

carmine oracle
#

how can i directly import bukkit? 🤔

#

I was able to acces the thing through bukkit, but I couldn't use it right bc it was bukkit 1.15 and I need 1.21

smoky oak
#

i think the buildtools have arguments to build bukkit instead of spigot

#

you might not be able to include it if its not in .m2

carmine oracle
#

whats .m2?

eternal oxide
#

he's using api and has the repo so no need for .m2

smoky oak
#

ah

#

nevermind then

#

its where buildtools puts stuff after you run it so that its available offline

carmine oracle
#

oh okay

#

but then

#

what's the repo or what?

#

oh nvm i think i found it (?)

eternal oxide
#

is it only that class which is causing issues?

carmine oracle
#

yes

carmine oracle
river oracle
#

No because at that point the items haven't dropped yet

#

That event doesn't give you the entity that it derived from though

#

Only thr Item entity

#

The workaround would be a temporary cache with a 1 minute expired period

#

Or whatever expiry period you see fit

#

In such a case you'd need to track pickup and drops of these items closely

#

Otherwise you could end up with a memory leak

torn shuttle
#

@echo basalt you felt that?

echo basalt
#

barely

torn shuttle
#

Earthquake in lisbon, just woke me up here in coimbra

echo basalt
#

tbf I do live on the other side of the country

#

thought my leg was twitching my desk a bit

#

nothing major, fairly light

torn shuttle
#

Same but I heard my wardrobe making nois3

echo basalt
#

lotta people yapping about it

torn shuttle
#

Well it is 5.9 in lisbon

echo basalt
#

prob like a 1.5 here

torn shuttle
#

Is lisbon still standing because I can't tell of the people I know there are sleeping or under rubble

echo basalt
#

still standing

torn shuttle
#

Damn

echo basalt
#

praying I actually have to use my doomsday knowledge one day

torn shuttle
#

Nearly had a chance to redesig that shithole again

echo basalt
#

:(

#

I'd have to cancel my travel plans though

torn shuttle
#

It was off coast

#

We getting a tsunami?

echo basalt
#

dunno

#

my city has some slight tsunami risk given that y'know

#

I live like 2km away from a beach

#

at the same time it's like a 10m drop to actually go for a swim so it'd need to be something pretty big

#

and then the water would have to travel for another 2-3km uphill

torn shuttle
#

We also have a tsunami risk in coimbra by the 2012 movie standards

echo basalt
#

yeah you have a river aite

#

unless it's coming from Figueira da Foz

#

which would surprise me

#

if that were to happen I'd be fucked skullWazowski

#

hm should I get the discord monitor

#

let's not pretend like it was 600€ 2 hours ago and the promo is complete BS

torn shuttle
#

I have an awesome monitor for discord

#

Guess ill just try to go back to bed

echo basalt
#

yeah but you can also use it for uh

#

twitter

#

or spotify

torn shuttle
#

Well let's hope the reason no one is answering messages is because they're asleep then

tardy delta
#

Shouldve bought that monitor instead of putting mine vertical

echo basalt
#

it's a weird 4k 16:18

onyx fjord
#

whats the convention for tests in java

#

like what package do i use, how i should name clases

#

to make it readable and managable

onyx fjord
#

in poland all sellers must show the last price from 30 days before the sale

hybrid turret
#

?npc

#

sadge

#

is there a guide for npcs?

echo basalt
#

no

hybrid turret
#

i only found one for 1.14

onyx fjord
#

complex topic

hybrid turret
#

sadge

onyx fjord
#

u gotta understand packets well

echo basalt
#

iluson smerch windex: en pee cees

#

nms

hybrid turret
#

yeah i'm using nms and i think i understand packets fairly well

echo basalt
#

You either use packets or make actual fake player entities with a bootlegged connection

lost matrix
echo basalt
#

damn mister smiles is writing gson 2

onyx fjord
#

i was thinking the same package as the class im testing

#

and test suffix for test classes

hybrid turret
onyx fjord
#

use packetevents by retrooper

blazing ocean
onyx fjord
#

but the library handles backwards packet compability for u

hybrid turret
#

and i don't think packets are that hard to comprehend (?)

onyx fjord
#

worth it imo

blazing ocean
hybrid turret
#

more confused about what stuff i have to use e.g. instead of the EntityPlayer from the 1.14 guide

pliant topaz
blazing ocean
#

like they make every fucking constructor private

hybrid turret
#

/j

blazing ocean
#

you have to use reflection or modify the server to construct some packets

#

very fun!!

hybrid turret
hybrid turret
#

okay i cant even find the packets, ig everything was like fkn renamed between those versions? :/

echo basalt
#

ServerPlayer

#

?remapped maybe

#

dunno

#

?mappings