#help-development

1 messages · Page 671 of 1

lunar wigeon
#

paper doesnt deprecate sendMessage

ancient plank
#

Player#sendMessage(String) is deprecated on paper

slender elbow
#

it's not

remote swallow
#

no xf staff here

lunar wigeon
kindred sentinel
lunar wigeon
#

its not

knotty shell
#

lol like that shows anything

young knoll
#

Dangit where is choochoo

lunar wigeon
remote swallow
slender elbow
#

choco my favourite official spigotmc representative

young knoll
remote swallow
#

make ur mom or dad drive down to his house

#

@austere cove if ur able, they posted a resource on spigot with the same dick pic, i can dm you the link if you need

glad prawn
#

btw small d

slender elbow
#

oh

ancient plank
#

guess im wrong, could've sworn it was

slender elbow
#

that same dude was yesterday with a thousand alts in the paper discord too 💀

#

a thousand maybe more like 3

knotty shell
#

well the old way likely is now its Player#sendMessage isnt it?

ivory sleet
#

Man got some nerve

kindred sentinel
# lunar wigeon its not

Sooo i still need to know how to use spigot().sendMessage(). I don't know how to create BaseComponent for it

eternal oxide
#

his verified name kept changing for me.

remote swallow
#

he probably keeps making new spigot accounts

knotty shell
#

this just like that same question 2 hrs ago asking same thing if someone was depreciated

lunar wigeon
eternal oxide
#

it was flashing between two names

remote swallow
#

he gets banned of 1 discord and now is sending his d pick everywhere and telling us to kill ourself

young knoll
#

Paper deprecated basically every string method except that one

#

Tho it is annotated @Obsolete or something

kindred sentinel
young knoll
#

Use ComponentBuilder

#

?chatapi

kindred sentinel
young knoll
#

:c

austere cove
eternal oxide
#

?bc-bcc

#

?jd-bcc

onyx fjord
#

he is now also banned from the other mutual server

timid hedge
#

How is if(args[0].equalsIgnoreCase("add")){ an unreachable statement?

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            if (label.equalsIgnoreCase("balance") || (label.equalsIgnoreCase("bal"))) {
                sender.sendMessage("Only players can execute this command.");
                return true;
            } else {
                Player player = (Player) sender;
                sender.sendMessage("Du har " + formatNumAsMoney((float) Balance.get().getBalance(player)) + "§a$");
                return true;
                if(args[0].equalsIgnoreCase("add")){
                    System.out.println("2");
                    if (sender.hasPermission("money.add")) {
                        System.out.println("3");
                        Player target = Bukkit.getPlayer(args[1]);
                        if (target != null) {
                            Balance.get().addBalance(target, Double.parseDouble(args[2]));
                            System.out.println("4");
                            return true;
                        }
                    }
                } 
glad prawn
#

banip for discord pls

remote swallow
strange rain
young knoll
#

That return is why

ivory sleet
#

If its on discord I will manage (or more like yeet) those alts or adele sadly we are not forum staffs :(

remote swallow
#

CHOCOS ONLINE

#

@worldly ingot YOU HAVE A CHOCO TO DO

knotty shell
#

we can do it better I just erase their existence, gimme an addres

austere cove
#

Dont think im logged in on spigot forums on my phone lol

worldly ingot
#

Huh?

#

I’m not even home

remote swallow
#

someone made a resource with a dick pick as the onyl content

austere cove
#

@worldly ingot pls deal with whatever is happening

worldly ingot
#

Oh suck

#

Sick

remote swallow
#

and it links to a gay porn site

timid hedge
remote swallow
knotty shell
#

oh pls tell me thats not that oddball wiki entry I seen

ivory sleet
#

Choco you can clutch this, we believe in :)

remote swallow
young knoll
#

Thanks choochoo

austere cove
#

Tag me again if choco cant deal w it and ill go start my pc

young knoll
#

He got it

#

Or someone did

worldly ingot
#

That was indeed a penis

knotty shell
#

okay is the IRC channel still alive?

ancient plank
#

where the bleach

worldly ingot
#

I got it lol. Sorry. I’m dog sitting for my grandma rn

young knoll
#

Dog tax?

remote swallow
#

what dogs

worldly ingot
#

Uhhh, a yorki-poodle mix and a regular yorki iirc

onyx fjord
#

not gonna comment on the picture

ivory sleet
remote swallow
young knoll
#

I'm surprised discords image filter didn't get that

worldly ingot
#

If it’s super urgent sometimes I preemptive ban after talking to some Paper gents

knotty shell
#

omg its still up? lulz

onyx fjord
#

its not

young knoll
#

no

worldly ingot
#

Oh is there a Discord image too I missed? Or did Steel get to that?

young knoll
#

Conclure got it

worldly ingot
#

O oki

remote swallow
#

yeah

onyx fjord
#

is his main spigot acc banned?

knotty shell
#

and one wonders why have no pre-loading turned on...

worldly ingot
#

Ella and Ariel

#

At least the one that posted the resource

remote swallow
#

if possible can one of you just keep their eye on this channel just incase

remote swallow
ivory sleet
#

Im here dw

worldly ingot
#

They’re smol yes

remote swallow
#

does your grandma live in an RV

worldly ingot
#

Yes

young knoll
#

Opposite of the huskies

worldly ingot
#

I’m in butt fuck nowhere ville rn

young knoll
#

Even more so then normal?

worldly ingot
#

Exactly

knotty shell
#

choco visiting IRC with me atm

worldly ingot
#

I am?

knotty shell
#

your name is here

worldly ingot
#

If I’m in the IRC still it’s probably just my bouncer lol

remote swallow
#

damn choco so rich to have a boucner

worldly ingot
#

I haven’t logged into it in like 4 years

knotty shell
#

same I didnt even think it was still up

ivory sleet
#

@remote swallow just let us know if guy attempts anything further, ill be checking in here every so often still tho :)

knotty shell
#

thought that was all transisitioned to discord

ivory sleet
#

Epic

quaint mantle
#

im dumb. other players can see the outer layer of the skin. but i can't see the outer layer of my own skin unless i die

knotty shell
#

we could use a permalink for here though I could then put that on the wiki front page and not the IRC link _

young knoll
#

Do we not have a permanent invite?

knotty shell
#

I dunno why Im asking

remote swallow
ivory sleet
#

spigotmc code should work

#

Yeah ^

knotty shell
#

meant for in this channel since was putting it on the wiki but okay

ivory sleet
#

Oh I believe not sadly

knotty shell
#

or not nvm apparently someone locked it

ivory sleet
#

Oh :>

knotty shell
#

that or someone yanked my wiki editor rights dunno

onyx fjord
#

💀 google indexed that plugin

#

and if you search its name spigot appears really high

remote swallow
#

god fucking dammit

young knoll
#

Google is quick

onyx fjord
#

anyways

#

gn everybody

remote swallow
#

oh

#

that will get purged in like a ferw hours

onyx fjord
#

i will never unsee the picture 😭

remote swallow
#

why do i feel like it was his, not even a random one from any porn site

onyx fjord
#

it looked too basic

spare hazel
onyx fjord
#

i hope discord doesnt ignore my report like it did for the past X years

wary topaz
#

ItemStack lobbySelector = new ItemStack(Material.NETHER_STAR);
MaterialData test = lobbySelector.getData();
test.setData(Byte.valueOf("debug"));
lobbySelector.setData(test);
return lobbySelector;

Does this work?

#

lol

onyx fjord
#

u should try

ivory sleet
#

?tryandsee

undone axleBOT
ivory sleet
#

But I havent seen any1 since 1.8 use mat data

knotty shell
#

mmmm mats

kindred sentinel
#

how to get opposite value using instanceof? !(clickedEntity instanceof Player) isn't working

wary topaz
#

add more ( '

knotty shell
#

opposite value of instanceof?

kindred sentinel
#

oh really

#

thx

onyx fjord
#

not only that you can even get the casted variable directly

#

if (!(something instanceOf Something something2))

#

crazy stuff

subtle folio
#

should request for instancen’tof

onyx fjord
#

all cool kids use java 17 these days

#

soon 21?

#

less boilerplate without destroying readability is cool

knotty shell
#

you even following what they add or take out?

onyx fjord
#

i like where java is going

subtle folio
#

virtual threads are very hype

onyx fjord
#

java was always seen as the enterprise language

ivory sleet
onyx fjord
#

which is usually ultra LTS

#

enterprises dont like updating

#

i know many critical front ends use java

knotty shell
#

virtual threads... hype for those who cant afford real multithreading

subtle folio
#

Java 21 won’t be Lts for another few years

ivory sleet
#

Its just that a java thread wont be lifetime bound to an os thread per say

subtle folio
#

literally replaces the need for extending thread

knotty shell
#

key is you need an OS that can handle it...

stuck flax
#

Can you detect a left click on someone who's in creative?

knotty shell
#

ask windows how many threads my TR4 has

subtle folio
ivory sleet
#

I think its a shame j21 wont likely ship structured concurrency api, but given its radical changes it’s understandable

stuck flax
knotty shell
#

21 prob will touch base on it once they know the core of 21 working then push it in 22

subtle folio
onyx fjord
#

🙏 i hope we get packets for creative player inventory

onyx fjord
#

and for inventory opening 🙏

ivory sleet
sage patio
#

is there anyway to create a fake Player and put something in his inventory?

subtle folio
ivory sleet
#

Jep 453 epic

subtle folio
#

What’s the use case of putting something in it’s inventory though?

sage patio
ivory sleet
#

(And 446)

sage patio
#

it needs a player by force, gives them some items for some stuff
i dont want the item, i just need the rest of the work by the api

subtle folio
sage patio
#

this is the decompiled code of their api

#

the only work with the requiered player object is this 4-5 line ^

subtle folio
#

Still confused on why you’d need to do this, regardless, look up how to create a fake player with nms on the forums, there’s a resource out there.

sage patio
#

the NMS can returns a Player?

quaint mantle
#

NMS nothing to do with Player

near mason
languid urchin
sage patio
#

for example:

public abstract class FakePlayer implements Player {
    // Add a method to mimic the behavior of the API call
    public void addItemToInventory(ItemStack item) {
        // Do nothing, this is a fake player
    }
}
ivory sleet
#

Basically mockbukkit

languid urchin
#

Yeah, sure, depends on your use case

#

it seems a little unnecessary since MockBukkit already has all that

#

Reinventing the wheel is usually pretty hard

sage patio
#

btw what abstract means? the ide was saying implement the Player class methods or change the class to an abstract class

ivory sleet
#

Yeah another thing u can do is to use mockito + Junit , if per say an entire emulation of the server is not needed

sage patio
#

for that api

languid urchin
#

Basically a class that can't be instantiated, but is meant for subclassing etc.

ivory sleet
#

xii what exactly ru trying to do

sage patio
#

an api method from MTVehicles needs a Player

languid urchin
#
* Abstract class: is a restricted class that cannot be used to create objects (to access it, it must be inherited from another class).

* Abstract method: can only be used in an abstract class, and it does not have a body. The body is provided by the subclass (inherited from).

From w3schools

sage patio
#

when i use this method of the api the Player may not be online

ivory sleet
#

That sounds catastrophical

sage patio
#

i can't give any player to the api method, because it adds an itemstack and sends a message

languid urchin
#

Why not just use a database or something? And read from that when the player logs in

#

Sounds like a very hacky workaround

ivory sleet
#

Im quite sure mtvehicles api wont appreciate an invalid player object

ivory sleet
#

Yes it accesses the inventory

#

and sends message which roots all the way back to nms

sage patio
#

i need to clear all the vehicles in my server every hour, but it has only 1 method to remove the vehicle from the world which it returns the vehicle item to the player, so the player may not be online and i don't want the player to have any vehicle item

young knoll
#

Sounds like the API needs changes

sage patio
ivory sleet
#

Can u consult the api owner about it?

sage patio
young knoll
#

Soon™️

sage patio
#

yea

ivory sleet
#

Cuz the api does literally not support ur needs as of now it sounds like

ivory sleet
#

Bruh moment

#

This plugin, does it by any chance have an open source upstream u can link?

sage patio
#

it is opensource

#

but i have no idea how they manage the vehicles

ivory sleet
#

Well can u link? Maybe we can access internals to get it to work the way u want it

#

Since the api clearly doesn’t wanna be of any use

sage patio
#

sure

young knoll
#

Get the hammer

ivory sleet
quaint mantle
#

changing skins yet im being removed from tablist and my outer skin layer is not showing.
im still on the tab and have my skin layer for others, but not for myself
please help
https://paste.md-5.net/irogomaxah.cs

ivory sleet
sage patio
#

sure

ivory sleet
#

Is there any chance u would use another vehicle plugin? Or write ur own?

sage patio
#

well i have a lot of custom plugins, for example robbery, bank, gangs, jobs and more

#

but i don't have any other time for something additional

ivory sleet
#

I dont wanna be mean, but this plugin is kinda meh

sage patio
#

well the owner is a nice guy, but because it is opensource he always says "its open source" on issues

ivory sleet
#

Like the whole structure would need a change to allow offline players more or less if I read it correctly

#

I mean I doubt he would appreciate a pr restructuring his entire plugin

sage patio
#

the plugin it self is not well coded enough, the api is worse

ivory sleet
#

Yeah

young knoll
#

kek

sage patio
#

i have no other way for now

#

any idea how i can do that stuff i told before?

ivory sleet
#

If u wanna be engineery, clone it and fix the offline player thingy

#

But it may give you a headache

sage patio
#

or i can just don't use a player on that method ¯_(ツ)_/¯

ivory sleet
#

Well doesnt it take a player precisely?

#

It seems to rely on a static Map<Player,Vehicle> or something similar

#

Like

#

:|

sage patio
#

the onlyway i want to do this is to removing vehicles on my server which they don't have a driver

#

the players don't have the permission to pickup vehicles

#

i'm coding a garage system plugin with their api

ivory sleet
#

More like coding a garage system plugin against their plugin rather than api

#

I dont see much of an api there tbh

sage patio
#

lol

#

or i can create another method in the api which it just removes the vehicle and has nothing to do with a player

ivory sleet
#

If I had my normal pc I would be recoding it for u at this point, but sadly im not at home

sage patio
#

but one thing, due to some reasons i've a bery bad internet connection to clone this repository
do you have the freetime to create only one method for me?

#

ow

ivory sleet
#

Hmm

#

I have a potato pc myself

#

Let me see

#

(More like a laptop)

#

Ill clone it and try to fix it now altho in going to bed in 40min

sage patio
#

thanks a lot

#

don't try to fix anything btw

#

just try to clone that method

#

and do nothing with the player (don't use a player at all)

#

it seems they do something else with the player after

ivory sleet
sage patio
#

thanks

#

its just sending messages

mental atlas
#

i get this error when trying to load my minecraft plugin
[18:02:20 WARN]: [NBTAPI] The NBT-API inside NewGods is located at 'de.tr7zw.nbtapi.utils'!
[18:02:20 WARN]: [NBTAPI] This package name is reserved for the official NBTAPI plugin, and not intended to be used for shading!
[18:02:20 WARN]: [NBTAPI] Please change the relocate to something else. For example: com.example.util.nbtapi

sage patio
subtle folio
#

You need to relocate it inside of your pom

mental atlas
#

so do i delete that file?

subtle folio
#

What?

mental atlas
#

the nbt file

#

thats alrdy in the plugin

#

in the newgods plugin

subtle folio
#

is it your plug-in that has the nbt api as a dependcy?

#

or someone else’s

mental atlas
#

so our dev made this plugin and hes offline rn

#

and all it said when installing it in my server was that

#

sooooooo

subtle folio
#

then your dev needs to fix it

#

it is something you change when compiling the plug-in

mental atlas
#

so what if i unzipped it

#

it wouldnt work prolly right?

median trench
#

Hi there anyone knows what magic happens behind createWorld while a player is already in the server? Or did I get the Respawn packet wrong?

Dimension type is supposed to be an already defined on Login dimension, while the situation above still allows you to join the world (Respawn is also used to change dimensions).
There is no packet for adding dimensions is there any? Or does the client ignore completely if the dimension was defined?

I read through CraftServer and it all seems pretty normal to me

subtle folio
mental atlas
#

can i just send it to u :3

#

plz

subtle folio
#

quite j likely

#

no

mental atlas
#

im hopeless

#

lol

subtle folio
#

if you don’t have the source code then you’re gonna have a hard time compiling it

mental atlas
#

i cant wait another day bc i go on vaca tomm

median trench
mental atlas
#

lol im helpless

subtle folio
#

the pom.xml isn’t included inside of the packaged jar so i doubt relocation will be very straight forward

mental atlas
#

yeah it is

subtle folio
#

really?

mental atlas
#

this right?

#

o

#

dang

subtle folio
#

ah it does

mental atlas
#

i cant paste images

subtle folio
#

?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

mental atlas
subtle folio
median trench
median trench
quaint mantle
median trench
median trench
median trench
quaint mantle
median trench
#

You should send code in pastebin or similar, I don't understand what you're asking as well, but the problem is probably on line if (entity.getType() == EntityType.SHEEP) return, it should be != instead of ==

worldly ice
#

the name of your listener is different from where you defined it

#

you defined it as RNDm

#

but is trying to instantiate RndmListener

quaint mantle
worldly ice
#

yeah

#

show code

#

you didn't change anything

median trench
worldly ice
#

i dont see a difference between that code block

#

and this one

quaint mantle
worldly ice
#

but your listener is named RNdm

#

not RNdmListener

median trench
#

remove Listener from that

worldly ice
#

what error are you getting?

#

your listener isn't in the listeners package then

#

change your import from net.bruh.rndm.rnDM.listeners.RNdm to net.bruh.rndm.rnDM.RNdm

median trench
worldly ice
#

also

#

?conventions

quaint mantle
#

i don't really get why this is happening as the only two packets im not sending to the player wouldn't change it

median trench
# quaint mantle oh

then idk tbh, my code is way more complicated than yours... and can't remember what was the point of it, will try to search a resource for you

quaint mantle
wary topaz
echo basalt
#

blud uses the +25 zoom

wary topaz
#

blud talking about my zoom

lunar wigeon
#

no, I guess its laptop

wary topaz
#

its computer

lunar wigeon
#

wtf

wary topaz
#

idk how to zoom out

lunar wigeon
#

CTRL + -

#

I guess

#

if not then in settings

flint coyote
#

ctrl + scroll works for me

wary topaz
#

doesnt work for me

flint coyote
#

Unsure whether I enabled that or it's the default

lunar wigeon
#

then in settings

flint coyote
wary topaz
#

cant go lower

#

oh

#

okay noiw that I zoomed in can you help me fix my problom ")

wary topaz
#

ah I had to ereplace spigot with spigot-api

sucks that I cant use nms now

flint coyote
#

?remapped

#

what was that command again

#

?nms

wary topaz
#

my intellij has been frozen for 3 minutes

#

im scared

flint coyote
#

hope you saved

wary topaz
#

okay its back

#

:phew:

flint coyote
#

after 3 minutes? That's crazy lol

opal carbon
#

yeah happens for me too

#

occasionally it just crashes

#

and comes back like 5 minutes later

flint coyote
#

Oh I usually just shut it down after 20 seconds. And then lose the last 15-20 minutes of progress

#

Maybe I should stop doing that

wary axle
#

Good evening, I am creating a KO system under spigot 1.12.2 (when the player dies he is pinned to the ground) what happens is that when the player dies I create an invisible armorstand then I add the player as a passenger.

After 5 minutes, he's automatically revived.
I just have a problem when the 5 mins are up I despawn the armorstand until then no problem but if the player disconnects then reconnects after the 5 mins I do the same thing but this time I can't find the armorstand (the player is sitting on the armorstand in game and it's not just visual).

I've tried several things to test this, firstly I've retrieved all the armorstands around the player but he can't find anything.

I've also tried retrieving all the armorstands in the world to make them despawn, and the armorstand below the player can't be found.

flint coyote
#

I'm not sure whether I understand your problem.
You want to find the armorstand once the player logs back in? Couldn't you spawn a new one and delete the old one in the PlayerQuitEvent?

wary axle
#

I apologize if my problem isn't clear 😅 .
Basically, here's the situation: the player sits on an armorstand, disconnects and, when he reconnects, the armorstand is still visible and the player remains seated on it. However, when I use my code to check if the player is on the armorstand, it returns "false" and when I try to retrieve the instance, I get a null value.

I'll try what you suggest, but I don't know if it will work.

flint coyote
wary axle
#

Yes, this method exists, but the concern I have is that it might not work. In theory, if the player reconnects before the 5 minutes have elapsed, everything runs smoothly and the armorstand is detected.

However, the difficulty lies in the fact that if I decide to reappear a new armorstand and link it to the player as a passenger, I may encounter the same problem when I reconnect.

flint coyote
#

If you always dismount and despawn the armorstand on disconnect and spawn a new one when connecting, then there is no way you lose track of that armorstand.

If getVehicle() leads to a reasonable result you should use that one though. If it does not, try to run it with a 1 tick delay

wary axle
#

I'll see later, I've been working on it for a while but thanks, I'll give it a try.

wary topaz
#

here is the requestPlayerCouint code

#
 public CompletableFuture<Integer> requestPlayerCount(Player player, String serverName) {
        CompletableFuture<Integer> future = new CompletableFuture<>();
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("PlayerCount");
        out.writeUTF(serverName);
        player.sendPluginMessage(this, "BungeeCord", out.toByteArray());

        futuresMap.put(player, future);
        return future;
    }```
spare prism
#

?paste

undone axleBOT
spare prism
#

Why is it null at the end?

[04:50:02 INFO]: [DiscordUtils] DEB - OFF: CraftPlayer{name=SunwooHan}
[04:50:02 INFO]: [DiscordUtils] DEB - OFF1: CraftPlayer{name=SunwooHan}
[04:50:02 INFO]: [DiscordUtils] DEB - OFF UUID: bbd52114-084c-3233-b6b7-2b8bd636b063
[04:50:02 INFO]: [DiscordUtils] OFFLINE PLAYER: null; user.off: null

Code: https://paste.md-5.net/sozixesote.cs

mortal hare
#

am i the only one who started to hate ORM's just recently

#

using hibernate with all of its lazy intializations seems useless and adds overhead to my opinion

simple girder
#

Is there a similar feature in gradle?

mortal hare
#

for me

#
plugins {
    id("idea")
}

idea {
    module {
        isDownloadJavadoc = true
        isDownloadSources = true
    }
}

build.gradle.kts

#

intellij idea

simple girder
#

Thanks <3

simple girder
mortal hare
slender elbow
#

you shouldn't need that, intellij will automatically download sources when it's doing the refresh thing

#

if they're available ofc

mortal hare
#

☝️ probs he's right, i've never tried downloading it manually tbh

simple girder
#

Sorry, I'm new as you can see.

slender elbow
#

you'll see a gradle tab somewhere on the side bars, in there there's a refresh button, that'll do it

#

I'd take a screenshot of where it is but computer is ded

simple girder
#

Thanks

spare prism
#

How can I fix that?

[05:11:42 INFO]: [DiscordUtils] discordutilsuser1: md.mirrerror.discordutils.discord.DiscordUtilsUser@7a850ed6
[05:11:42 INFO]: [DiscordUtils] discordutilsuser2: null

https://paste.md-5.net/gefivohema.coffeescript

quaint mantle
quaint mantle
#

how would i update the player's skin layer using the ClientboundSetEntityDataPacket? it takes in a List<DataValue> and i can't find out how to change the skin layer through that.
i tried using a datawatcher but can't find out how to convert it to a List<DataValue>.

echo basalt
#

packValues on the data watcher

quaint mantle
echo basalt
#

packDirty packs all the values that have changed since the last packDirty call

#

ideally there should be a call to pack all values

#

but it's probably packNonDefaultValues

quaint mantle
echo basalt
#

I'm at work so I can't really focus on your issue rn

quaint mantle
#

it partially works. the first time i run it, the skin parts are shown, but anytime after it doesn't work

echo basalt
#

sounds like advertising to me

small holly
#

It's a spigot thing but if it's not allowed I can delete the messages

quaint mantle
#

Which exception should I throw whenever a server admin is doing config.yml wrong?

#

ConfigurationException?

#

I have different cases of doing config.yml wrong. Like, writing something that's not in the ENUM so it's not valid (doesn't exist). Or if I am expecting them to add more values inside the ConfigurationSection

livid dove
echo basalt
#

I just skip exceptions entirely and add a fancy log message

#

reduces the amount of support requests

summer scroll
#

Hello, I'm trying to override a command registered by a plugin that I depend on, how can I achieve that?

echo basalt
#

Inject into the command map or use command events

summer scroll
echo basalt
#

Uhh ye

summer scroll
#

I don't think I will use PlayerCommandPreProcessEvent 💀

#

Alright thank you, will try it out.

summer scroll
#

@echo basalt this is my attempt https://paste.md-5.net/owihuvoban.java and it doesn't override /sell command from ShopGUIPlus and if i want to use my own command, i need to execute /sell:sellinstead.

echo basalt
#

Hm what if you removed shopguis command from the command map

summer scroll
echo basalt
#

Look at internals and figure it out

#

I'm heading to bed

summer scroll
#

Alright, thanks anyway!

steady rapids
#

Hi, do you know if there's a proper way to check if a player is onGround? that is completely server side? player.onGround can easily be modified by the client

opal carbon
#

so if you are just assuming people are cheating use an anticheat

steady rapids
#

im creating an anticheat xd

opal carbon
#

ah

#

check their coords and if the block below them is solid

#

and they are at the right coords to be directly on it

flint coyote
#

I mean you can check whether the coordinate is exactly x.0 or x.5 and then if there's a block below his feet.
Slabs make this a little more complex for the .5 part

opal carbon
#

and end rods

#

and cakes

#

and grindstones

steady rapids
#

yeah will probably do that, I was hoping for soemthing already existing hehe

opal carbon
#

and like a bazillion other things

flint coyote
#

Yup, makes me remember the least steep staircase

opal carbon
steady rapids
#

nope

steady rapids
#

must be hand made like granny cookies

opal carbon
#

grims nofall check

steady rapids
#

no ctr c ctrl v

flint coyote
#

What you could also do is spawn an invisible entity at the players feet and check if it fell (y-decrease) a tick later

#

Wouldn't do that every tick but it can be used to check every once in a while

steady rapids
#

cool idea

opal carbon
#

sounds unnecessarily intense

flint coyote
#

Well performance-wise, yes. Time-wise (coding) it probably saves you like 98%

median trench
clever lantern
#

how to repair item in hand? since 'setDurability' is deprecated

clever lantern
#

and to get item in hand is it good to use 'getItemInUse'?

sullen marlin
#

Read the docs?

#

They explain all this

steady rapids
#

Do you know if there's a library or something I can use to determine if a material is solid based on the server version? like, snow in 1.8 is considered solid but it's not in 1.17

tender shard
#

why not jut use Material#isSolid()

vast ledge
#

smort

steady rapids
vast ledge
#

You cant run a 1.20 plugin on 1.8

tender shard
vast ledge
#

iirc youd have to add all of the versions you want to the depdencys on maven

flint coyote
#

The version you build with does not matter since the dependency is provided by the actually running server version

tender shard
flint coyote
#

That's also why you can't run 1.20 functions on a 1.8 server if you compiled with spigot 1.20 as a dependency

vast ledge
#

But if you have the 1.20 spigot api, build it , then put it on a 1.8 server, if you use a func that 1.20 has its not oging to work

opal carbon
#

*excluding nms

tender shard
vast ledge
#

Ye

#

then it should work

#

but if hes using other stuff, and wants to have it run on all ver

flint coyote
#

latest is greatest

opal carbon
#

you dont have to add every single version as a dependency though lmfao

vast ledge
#

Then add a req for a ver

#

in ur plugin.yml

opal carbon
#

hes saying blatantly false info

vast ledge
#

Most likely

opal carbon
#

he thinks that we actually are shading in the entire spigot api every time

#

and therefore if he used the 1.20 dependency

#

it would have the 1.20 version of the enum

vast ledge
#

But he should still add a required version instead of allowing every version

opal carbon
#

sure

steady rapids
#

Wait I try to explain my exact problem: I'm checking if the block under the player is solid with block.getType().isSolid();, im building the plugin with compileOnly 'org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT' and testing the plugin on 1.8 server. When I walk on snow, (not the now block, just the small slab) it says im not on solid since in 1.20 it is not

vast ledge
#

Why

#

are you testing on 1.8

#

?

steady rapids
#

i want my plugin to be run in the more popular versions

#

since 1.8 to now

tender shard
vast ledge
#

1.8 isnt popular "new" version

#

If you want it to be 1.8

tender shard
#

1.8 claims its not solid

vast ledge
#

then write it for 1.8

opal carbon
#

its not solid

#

snow layers arent a solid block

vast ledge
#

Ye

steady rapids
#

mmh

opal carbon
#

the reason its saying what it is is because that info is correct

steady rapids
#

but you can stand on them D:

vast ledge
#

If you want the plugin to run, say from version 1.8 - 1.20

steady rapids
#

okay tho

vast ledge
#

youd have to check the version of the server

opal carbon
vast ledge
#

and adjut the functions to the specific version

tender shard
#

Solid means that you can place blocks against it

#

Not that you can walk on it

vast ledge
#

ye

steady rapids
#

oh... ok ty

vast ledge
#

Read the docs xD

#

they tell you everything you need to know

tender shard
#

Eg grass is not solid because you can replace it by placing a block inside

vast ledge
#

Flowers are solid

#

that stupid

#

idk why

#

its annoying

tender shard
#

Yeah i use water to get rid of them

vast ledge
#

But i just wanna build my wall

#

and all of a suddon

#

Oh hey im a flower, also fck you

#

you no place

tender shard
#

Strong flower 💪

vast ledge
#

Yea

#

how can a flower hold an anvil

#

how can a seed hold an anvil

#

but not my fatss

tender shard
#

How can you carry around 1800 anvils in your inv though

#

Must be weak ass anvil

vast ledge
#

it can crsuh you tho

opal carbon
#

shulkers too

tender shard
#

Yeah video game logic lol

vast ledge
#

:-}

vast ledge
#

never heard of them

#

#1.8

opal carbon
#

63936 anvils

vast ledge
#

+4 shulker boxes

#

you can glitch them into ur crafting slots

opal carbon
#

ooh yeah

#

forgot abt that

#

also i guess if you stay in inventory

#

cursor

vast ledge
#
  • offhand
opal carbon
#

yeah i was already accounting for that

vast ledge
#

ok

opal carbon
#

72576

vast ledge
#

ez

opal carbon
#

3 major versions of support is my rule of thumb

#

sometimes for things like nms i only have 1 or 2 just because the 3d version has minimal people left anyways, its just as a final grace period thing

#

out of that 80%:
1.18: ~5%
1.19: ~24%
1.20: ~51%

#

like for example rn i think i only have 1 publicly posted plugin with nms

#

and it does 1.18.2, all of 1.19 and all of 1.20

#

and i think that covers 79% of servers iirc

#

wait im looking through these stats

#

apparently 1.4% of servers are on bukkit???

tender shard
#

I still have support for 1.16.1 🥲

opal carbon
#

otherwise woulda kept 1.16.5

#

but either way its better to drop support for older versions imo

tender shard
#

i'm using the same library for all my plugins so basically when a new version comes out I only have to update the library and not every single plugin

#

would be a pain to keep 20 plugins updated

opal carbon
#

i just dont feel like bothering trying to support an old basically irrrlevant version

#

and why keep it around in an updated version of the plugin if you dont plan to update its functionality ig is my thought process

#

maybe im just lazy tho

#

i just know generally the 3 major version rule works for me

#

been tempted to make it 2 but i understand some servers are reluctant to change versions but 4 years old is when its just silly

ocean hollow
#

why if I have such a jsion, after I remake it into a map, it becomes in a different order? I figured out the problem and removed autosorting in json, but for some reason it does not correctly add all this to the map

        Gson gson = new Gson();
        Type skillMapType = new TypeToken<Map<String, Map<String, Double>>>() {}.getType();

        Map<String, Map<String, Double>> skills = gson.fromJson(json, skillMapType);

        Map<SkillType, Double> resultMap = new HashMap<>();

        for (String key : skills.keySet()) {
            Map.Entry<String, Double> entry = skills.get(key).entrySet().iterator().next();
            SkillType skillType = SkillType.valueOf(entry.getKey());

            Double skillValue = entry.getValue();

            resultMap.put(skillType, skillValue);
        }

        Bukkit.getLogger().info(resultMap + "");
        return resultMap;
    }```
teal wagon
#

hashmaps aren't ordered, if you want to preserve the insertion order then use a LinkedHashMap

hazy parrot
#

HashMap have no order guarantee when iterating over it

pseudo hazel
#

also if your keys are just gonna be numbers, just use an array/list

lilac dagger
#

how's gson able to convert the type from this line?
Type skillMapType = new TypeToken<Map<String, Map<String, Double>>>() {}.getType();

pseudo hazel
#

wdym

lilac dagger
#

i've got a serializer myself and i provide the sample in the constructor

sullen marlin
#

Magic

lilac dagger
#

oh, but this means the type erasure is not really true

sullen marlin
#

its not true for class definitions

lilac dagger
#

oh i see

vale ember
#

Hey! I'm using PDC on players to store their pets in my plugin, I have two questions:

  1. Users have been complaining about pets spontaniously disappearing after they logged out, what can cause this?
  2. Is it better to use PDC for this or, say, SQLIte?
tender shard
#

the PDC definitely does not sponaniously get erased or sth

lilac dagger
#

might be a bug in the code

tender shard
#

PDC is fine as long as you don't store huge amounts of data, and as long as you don't need to access offline players' data

pseudo hazel
#

how do players know their pets are gone when they have logged out

lilac dagger
#

how do you know how to get a pet back from unloaded chunks?

#

do you store pdc in the player?

vale ember
#

The thing is, when I add the pet to PDC, later, when the player opens the menu, the pets are still in there, it just disappears after logging out, and I wasn't able to reproduce the issue locally.

vale ember
lilac dagger
#

can other plugins erase pdc?

#

i never worked with them myself

#

just wondering

tender shard
#

ofc they could

pseudo hazel
#

yes there could be a plugin wiping your player's pdc on logout xD

#

but I would fire that plugin

vale ember
#

Okay, I'll ask them to test it without other plugins then.

pseudo hazel
#

yes and maybe try to find the plugin that causes it so you can reproduce it or report it to the author

vale ember
#

Yeah, I will.

pseudo hazel
#

since you should only be taking care of your own added pdc, not everyone elses xD, unless the plugin is specifically made to do that like a PDCmanager or smth

sacred mountain
#

it has been a wihle

#

is there a gui api that allows for shift clicking items into slots for a custom anvil gui?

#

i am using one atm and it only allows for drag and drop

#

because i do not wanna write my own atm

lyric meteor
#

I have a question. Is the bungeecord chat API the recommended way to do chat components?
If I understand correctly it hasn't been updates in some time, misses a few features and it is still hidden away behind .spigot() calls.

#

I know there are other libraries like adventure, but their bukkit adapter is considered legacy (/unsupported?)

ocean hollow
#

why if I subtract from 20 by 0.1 every 2 ticks - my number turns into this?

lilac dagger
#

use it @lyric meteor

#

it works well

lyric meteor
lilac dagger
#

and the reason it remained behind spigot is due to clash with the non components counterparts

lyric meteor
#

I dont know how I feel about shading a library of that size anyway

lilac dagger
#

what does it do?

#

usually you don't wanna shade stuff you barely use

lyric meteor
#

the library loader is a feature for loading libraries via maven central

lilac dagger
#

this is really cool

#

but for the bungee components, uh not sure

lyric meteor
#

i mean for adventure

lilac dagger
#

nah, i assume paper hasn't removed bungee's

sacred mountain
lyric meteor
#

they havent, but it is stil hidden behind .spigot() which makes me think it is not conaidered stable API yet

lilac dagger
#

it is

lyric meteor
#

it still feels very much like a workaround / experimental API

lilac dagger
#

no lol

#

this sub class was first used to show the difference between bukkit and spigot

#

unlike paper who confuses the user

glossy venture
#

just format it with like 2 decimal spaces

lyric meteor
#

I agree that paper's API is making things confusing. I try not to use it

glossy venture
#

should round up

lyric meteor
#

thats why i also dont want to use their native adventure support

#

but then I dont know what the recommended solution is for spigot

lilac dagger
#

if you want components go with bungee

#

they work well

lyric meteor
#

legacy messages will stop working at some point according to mojang so that puts the bukkit API in a weird place

steady rapids
#

https://uploadi.ng/q5NHiYuB do you guys know why on some blocks block.getType() says I'm standing on LEGACY_AIR? the server and the plugin api are both 1.20

lilac dagger
lyric meteor
#

would make sense

chrome beacon
#

eh not really

#

Chunks get data fixed when updating

lyric meteor
#

oh yeah thats true

#

mr datafixerupper

chrome beacon
lyric meteor
lyric meteor
#

I suppose the bungeecord chat solution works for now...

chrome beacon
steady rapids
#

I try

glossy venture
lyric meteor
glossy venture
#

the computer will consider it as 1

chrome beacon
lyric meteor
#

or if you want 2 decimals Math.round(value * 100.0) / 100.0

chrome beacon
#

That's the same as formatting it

clear panther
#

EventHandler
public void ORC3(PlayerInteractEvent event) {
if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
if (event.getItem() != null) {
if (event.getItem().getItemMeta().equals(DiamondGun)) {
Player player = event.getPlayer();
++Ammo;
Arrow a = event.getPlayer().launchProjectile(Arrow.class);
a.getWorld().playEffect(event.getPlayer().getLocation(), Effect.SMOKE, 10);
if (Ammo % 6 == 0) {
player.sendMessage("§7Reloading");
event.getItem().addEnchantment(Enchantment.LOOT_BONUS_BLOCKS, 1);
Bukkit.getScheduler().runTaskLater(_plugin, () -> {
player.sendMessage("§7Reloaded");
event.getItem().removeEnchantment(Enchantment.LOOT_BONUS_BLOCKS);
}, 100);
}
}
}
}
}
help my code doesnt work

lyric meteor
#

formatting turns it into a string though

#

I'd only use formatting if you actually want it as a string

glossy venture
#

theres no need to round it

chrome beacon
glossy venture
#

yeah thats what im saying

lyric meteor
#

unless you have a really large number

trim lake
#

Its possible to change title of opened inventory? Proabably I will need open new one, maybe?

eternal oxide
#

yes you can, in current versions

young knoll
#

There’s a method for that in modern spigoot

chrome beacon
trim lake
#

Ou thats in InventoryView not Inventory... Perfect, thanks

lyric meteor
clear panther
#

oh well

young knoll
#

?notworking

clear panther
#

it doesnt apply the enchantment

undone axleBOT
#

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

clear panther
#

i wanted it to apply enchantment if player shoot arrow 6 time

lyric meteor
#

Use formatting for code snippets too. Like this:

eternal oxide
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
young knoll
#

Add sysout messages to see where it stops

lyric meteor
#

if i had to guess its probably the item meta check

#

does the smoke spawn?

clear panther
#
@EventHandler
    public void ORC3(PlayerInteractEvent event) {
        if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) {
            if (event.getItem() != null) {
                if (event.getItem().getItemMeta().getDisplayName().equals("§9Diamond Gun")) {
                    Player player = event.getPlayer();
                    ++Ammo;
                    Arrow a = event.getPlayer().launchProjectile(Arrow.class);
                    a.getWorld().playEffect(event.getPlayer().getLocation(), Effect.SMOKE, 10);
                    if (Ammo % 6 == 0) {
                        player.sendMessage("§7Reloading");
                        event.getItem().getItemMeta().setDisplayName("§9Diamond Gun §7(Reloading)");
                            Bukkit.getScheduler().runTaskLater(_plugin, () -> {
                                player.sendMessage("§7Reloaded");
                                event.getItem().getItemMeta().setDisplayName("§9Diamond Gun");
                        }, 100);
                    }
                }
            }
        }
    }

i want it to change item name after shooting arrow 6 time
and it does send the message "reloading" and "reloaded" but it wont set display name

chrome beacon
#

getItemMeta returns a copy

#

You need to modify it and then set it back again

lyric meteor
#

good catch

#

that is a pretty annoying side effect though

#

because im pretty sure .getBlock() for instance does allow modification

chrome beacon
#

It does

#

A block is always tied directly to the world

clear panther
#

gun need to reload

young knoll
#

Did someone say gun

lyric meteor
#

I was refferring to the behavior of getItemMeta

young knoll
#

Mojang has entered the chat

clear panther
chrome beacon
clear panther
chrome beacon
#

yes

lyric meteor
#

I dont think they care

young knoll
#

Is hypixel still running cops and crims?

lyric meteor
#

oh that too yeah

shadow night
#

Just retexture the guns to be water pistols

clear panther
shadow night
#

Yeah

#

Thats where the idea comes from

clear panther
young knoll
#

Apple did that first I think

#

Years ago

shadow night
#

🔫

remote swallow
clear panther
#

...

#

What the fu-

#

really?

young knoll
#

Yes?

clear panther
#

how is that possible

#

i always think thats impossible

#

:/

young knoll
#

Why would it be impossible

pseudo hazel
#

lmao

#

learnjava moment

opal juniper
#

it’s impossible trust me

pseudo hazel
#

I mean the method exists for a reason

clear panther
#

well

#

?tryandsee

undone axleBOT
clear panther
#

lets try

pseudo hazel
#

I know yall like to add pointless setters and getters all the time but this one actually serves a purpose too

clear panther
#

wtf

#

it worked

#

lmfao

pseudo hazel
#

lol

#

nice

subtle folio
pseudo hazel
#

lol

#

ill declare it on my windows kernel

subtle folio
#

create a new cve vulnerability

pseudo hazel
#

yeah fr fr

sterile breach
remote swallow
#

you dont need wsl for redis

ocean hollow
remote swallow
#

the github you linked will work exectly how you need and without wsl

tender shard
#

you can also just use your server's redis?

sterile breach
ocean hollow
sterile breach
remote swallow
#

i used it before, and it worked as i needed it to

sterile breach
tender shard
sterile breach
tender shard
#

no

sterile breach
remote swallow
tender shard
#

i thought you already installed it on the server or sth, nvm then

remote swallow
#

i only used it because i was lazy and didnt want to boot wsl

sterile breach
remote swallow
#

did you even attempt to google "How to upgrade to wsl2 from wsl1"

sterile breach
#

i can't

remote swallow
#

you cant because?

sterile breach
#

my processor processor does not have second level address translation and i need it to enable Hyper-v supervisor. Without it passing wsl to 2 generate an error

remote swallow
#

so use the github download

#

it will work for what you need

sterile breach
#

that's why I was wondering if it wouldn't be better to use redis on wsl1 (I've tried it and it seems to work, but I'm afraid of having problems). Because with the github I can't get redis 6 :\ sinbon I can always see about getting a server.

remote swallow
#

why do you need redis 6

sterile breach
#

I prefer to use the last version but yes I can keep the 5.

tender shard
#

latest is 7

grizzled oasis
#

Hi im trying to put an ArraysList inside mongo but it gives me this error:

java.lang.IllegalArgumentException: Can not set java.util.List field nope.prisoncore.database.repository.User.vaults_items to org.bson.Document

code:

//class called User
public ArrayList<String> vaults_items = new ArrayList<>();

//Manager
user.vaults_items = new ArrayList<>();

Ps: for who is wondering i tried even List, hashmap and String[]

#

removing the line user.vaults_items from the manager solves the issue but i need a way to store the amount of item and items inside the vault

north nova
#

do you even realize what is happening there?

#

or

#

like have you actually read the error u sent?

grizzled oasis
north nova
#

so why would that happen

grizzled oasis
north nova
#

....

grizzled oasis
# north nova ....

probably because its empty (even if i tried using it with the String AIR inside but don't know)

north nova
#

learn to use mongo

grizzled oasis
north nova
#

oh god

#

please just

#

figure out the purpose of gson

#

and then figure out how to use it

#

and if you have trouble using it properly

#

then ask someone

tender shard
#

they did ask, and all they got were your useless replies

grizzled oasis
#

just fixed by myself

unborn sable
#

Is it possible for a spigot plugin to add pushable tile entities with pistons?

shadow night
#

Theoretically, ig yes

shadow night
#

You could crash servers with that, probably

unborn sable
shadow night
#

A few chests fullof booked shulkers

#

Moving at once per 2 or 4 gameticks

unborn sable
#

Oh

shadow night
#

I abused that on bedrock

#

Crashed 2 ps4's and got an iPad down to like 2 fps

plain plaza
#
    public void hide(Player player) {
        ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
        PacketContainer destroyPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_DESTROY);

        destroyPacket.getIntegerArrays().write(0, new int[]{entityId});

        try {
            protocolManager.sendServerPacket(player, destroyPacket);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }```

Made this code to destroy an entity in the client. But it throws an index error since apparently getIntegerArrays() is empty. Anyone got a clue?
#

I took a look at HolographicDisplay's packet for v1_19_R3 and it looks fairly similar:

EntityDestroyNMSPacket(EntityID entityID) {
        PacketByteBuffer packetByteBuffer = PacketByteBuffer.get();

        packetByteBuffer.writeVarIntArray(entityID.getNumericID());

        this.rawPacket = new PacketPlayOutEntityDestroy(packetByteBuffer.getInternalSerializer());
    }```
unborn sable
#

I don’t know a lot about spigot so this question may be dumb. Is there a way to inject or modify a game function to change how it works?

unborn sable
cedar marlin
#
            if (args.length == 1 && args[0].equalsIgnoreCase("kill")) {
                for (int i = 0; i < armorStandUUID.size(); i++) {
                    ArmorStand armorStand = (ArmorStand) getEntityByUniqueID(UUID.fromString(armorStandUUID.get(i)));
                    armorStand.remove();
                    armorStandUUID.clear();
                    player.sendMessage("ArmorStand killed");
                }
                return true;
            }

            if (args.length == 1 && args[0].equalsIgnoreCase("update")) {
                for (int i = 0; i < armorStandUUID.size(); i++) {
                    RecklessGD.getInstance().getFileHandler().setMoneyValue();
                    ArmorStand armorStand = (ArmorStand) getEntityByUniqueID(UUID.fromString(armorStandUUID.get(i)));
                    if (armorStand == null) return true;
                    armorStand.setCustomName(strings.get(i));
                }
            }```

The UUID probably changed. How do I keep the UUIDs of the ArmorStands static?
remote swallow
young knoll
#

ASM

remote swallow
#

oh i thought it was a plugin

young knoll
#

It is

native bramble
#

Im trying to setResourcePack to a player, but have msg: Server resource pack couldn`t be applied. Any functionality that requiers custom resources might not work as expected
here is code:```java
public static void sendRpToPlayer(Player p, Integer code){
String rpLink = RPDataHandler.asyncGetRpByCode(code);
try{
String sha1Hash = generateSHA1(rpLink);
System.out.println(sha1Hash);
p.setResourcePack(rpLink, sha1Hash);
}catch (Exception e){
e.printStackTrace();
}
}

public static String generateSHA1(String input) throws NoSuchAlgorithmException {
    MessageDigest digest = MessageDigest.getInstance("SHA-1");
    byte[] hashBytes = digest.digest(input.getBytes(StandardCharsets.UTF_8));
    return bytesToHex(hashBytes);
}

public static String bytesToHex(byte[] bytes) {
    StringBuilder result = new StringBuilder();
    for (byte b : bytes) {
        result.append(String.format("%02X", b));
    }
    return result.toString().toLowerCase();
}```
shadow night
unborn sable
#

I don’t play bedrock much

sterile breach
echo basalt
#

I'd just use writeSafely on all 3

unborn sable
plain plaza
young knoll
#

No release yet

echo basalt
plain plaza
#

Damn okay, hopefully it doesn't change much.

plain plaza
echo basalt
#

getIntLists

unborn sable
#

Is there a way to edit how the game works instead of adding stuff? Ik it’s a dumb question but I haven’t seen it done

plain plaza
#

Either make your own client or have a minecraft mod do that.

unborn sable
#

Well just editing something with the server

alpine urchin
#

like what

unborn sable
#

Not possible?

alpine urchin
#

be specific

unborn sable
alpine urchin
#

more specific

unborn sable
#

What they can move

remote swallow
#

coll did it

#

you have to use asm

unborn sable
#

I’m dumb what’s asm

remote swallow
#

assembly

#

byte code manipulation iirc

alpine urchin
#

why

#

use asm

remote swallow
alpine urchin
#

make server fork

remote swallow
alpine urchin
#

okay

remote swallow
#

people dont want to go install a new fork and have to debug any issues that may arise from it just to make chests move-able

unborn sable
#

Well what if I wanted to make other things not moveable

plain plaza
# echo basalt getIntLists

Got it, but it looks like it doesn't do anything. The armorstand still remains...
Does this mean that the entityId I assigned it is incorrect?

unborn sable
#

Same thing I’m guessing

remote swallow
#

add it to blacklisted materials probably

unborn sable
#

What is that

remote swallow
#

in colls plugin

upper hazel
#

when overriding the equals and hashCode methods, only the unique value of the class or all getters need to be compared

remote swallow
#

its however you should determin if a class is the same

#

if all values need to be the same you check all values, if only 1 unique value needs to be the same check that

young knoll
#

^

#

For example player just uses UUID

upper hazel
#

auction plugin

remote swallow
#

you have to decide

north nova
# upper hazel

why are u storing uuid as string and also name when u already know the uuid

upper hazel
#

it's just that the items themselves can be the same, the only thing that's unique is the end time

young knoll
#

You should give each auction a unique id

hazy parrot
#

i wouldn't call end time unique tbh

hazy parrot
#

unless your plugin limits one auction per time

upper hazel
#

bad

young knoll
#

None of that is inheritly unique

upper hazel
#

endTime unique

young knoll
#

No it's not

upper hazel
#

bc tihis 1

#

auction

remote swallow
#

multiple auctions could end at the same time

#

it wont be unique

upper hazel
#

up to milliseconds haha

young knoll
#

Stil possible to have the same end time

upper hazel
#

hm

#

then how is it possible?

#

random uuid

young knoll
#

Sure

remote swallow
#

check the player uuid, item stack and price if you dont want to add new fields

young knoll
#

That could still match up between auctions

remote swallow
#

ah yeah

#

you would be best to just add a uuid to each auction

upper hazel
#

can just give id by checking the size of the database?

remote swallow
#

what?

upper hazel
#

unique id in bd

#

database

#

database ganarate this

remote swallow
#

sure you could query your database to check 1 equals, but that would be way heavier and take longer than just asigning each auction a uuid

upper hazel
#

random uuid is not a real random domain right?

young knoll
#

Technically you can give each auction a unique numeric id

#

Using an auto incrementing key in the database

remote swallow
upper hazel
#

end Time is more likely to match?

remote swallow
# young knoll What

checking size of db made no sense so i thought it was probably querying the db everytime they want to call equals on it

young knoll
#

Just have a primary key that auto increments

#

And store it in the Auction object with the other data

sage patio
#

Can i get and edit an inventory of a player which its not online?

spare prism
#

Why do I get this exception?

java.lang.NoClassDefFoundError: club/minnced/discord/webhook/WebhookClientBuilder
    at md.mirrerror.discordutils.events.ChatToDiscordListener.<init>(ChatToDiscordListener.java:15) ~[DiscordUtils.jar:?]
    at md.mirrerror.discordutils.discord.DiscordUtilsBot.setupBot(DiscordUtilsBot.java:248) ~[DiscordUtils.jar:?]
    at md.mirrerror.discordutils.Main.lambda$onEnable$0(Main.java:77) ~[DiscordUtils.jar:?]
    at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1631]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: club.minnced.discord.webhook.WebhookClientBuilder
    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:153) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:105) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
    ... 9 more
        <dependency>
            <groupId>club.minnced</groupId>
            <artifactId>discord-webhooks</artifactId>
            <version>0.8.4</version>
            <scope>compile</scope>
        </dependency>
tall dragon
#

it involves editing the players data file

north nova
knotty shell
#

its also paper...

spare prism
# north nova youre supposed to shade it into your jar
            <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>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <relocations>
                                <relocation>
                                    <pattern>net.dv8tion</pattern>
                                    <shadedPattern>shaded.net.dv8tion</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
#

nvm, fixed it by changing the building configuration

plain plaza
#
    private void setInvisible(Player player) {
        try {
            PacketContainer metaDataPacket = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.ENTITY_METADATA);

            metaDataPacket.getIntegers().write(0, entityId);
            WrappedDataWatcher dataWatcher = new WrappedDataWatcher(metaDataPacket.getWatchableCollectionModifier().read(0));
            dataWatcher.setObject(new WrappedDataWatcher.WrappedDataWatcherObject(0, WrappedDataWatcher.Registry.get(Byte.class)), (byte) 0x20);
            metaDataPacket.getWatchableCollectionModifier().writeSafely(0, dataWatcher.getWatchableObjects());
            
            ProtocolLibrary.getProtocolManager().sendServerPacket(player, metaDataPacket);
        } catch (Exception err) {
            err.printStackTrace();
        }
    }```
#

oops

#

Anyways, I am confused on why this isn't working. Currently using 5.1.0 of protocollib.

#
java.lang.ClassCastException: class net.minecraft.network.syncher.DataWatcher$Item cannot be cast to class net.minecraft.network.syncher.DataWatcher$b (net.minecraft.network.syncher.DataWatcher$Item and net.minecraft.network.syncher.DataWatcher$b are in unnamed module of loader java.net.URLClassLoader @5ce65a89)```

Seems to be throwing this error.
onyx fjord
#

if that didnt happen on launch

kindred sentinel
#

How to make interactEntity event not work twice

tall dragon
#

?interactevent

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
kindred sentinel
round finch
#

wrong channel oopsi

icy beacon
#

if anybody has gpg in their path (windows), can you send me everything that's related to gpg in your path? my path was cleared on accident recently and i'm trying to piece it back, for example I can't compile my api anymore because it uses gpg, which is no longer in my path (adding GnuPG\bin\gpg.exe was not enough)

remote swallow
#

do you use intelliuj

icy beacon
#

yeah

remote swallow
#

add the gpg back into their git thingy

icy beacon
icy beacon
remote swallow
#

uhhh

#

one second

tender shard
icy beacon
#

well i assumed it is what caused the trouble because it was working fine before my path got wiped

remote swallow
#

Settings > version control > configure gpg key

icy beacon
#

nvm found it

tender shard
#

it's in git

#

do you want to sign commits or the .jar?

icy beacon
#

jar

#

it's for the api

tender shard
#

then you're in the wrong place

icy beacon
#

i'm trying to figure out where my gpg key is now lol

tender shard
#

are you using the maven-gpg-plugin ?

icy beacon
#

yes