#help-development

1 messages · Page 1043 of 1

spare sky
#

Yeah but not at putting item to inventory

drowsy helm
#

where does it stop at?

spare sky
#

?

#

I dont get your question

drowsy helm
#

do a debug on each line and see where it stops executing

upper hazel
#

Well, without the intervention of the player and the transfer of data on what skin he uses from this site is not possible I understand. That is, it can not be automated and will have to use a random skin at the entrance

drowsy helm
#

that will tell you what bit isnt working

spare sky
drowsy helm
#

can you send the entire event handler method

trail coral
#

is there a way to get info about my plugin inside of my plugin?

#

i keep track of which version of my plugin the server is running in its config.yml, i want to check if its the same as the one on spigotmc

#

and if not send a message to update

drowsy helm
#

not a config

#

whats stopping the user from going in and changing the number

trail coral
#

lmao then theyre not gonna get the latest version

#

its not gonna break anything

#

it just notifies server when a new version comes out

drowsy helm
#

can use this for the version in the plugin.yml

trail coral
#

alr but how do i get the version thats on spigotmc

spare sky
#
    @EventHandler
    public void onClick(InventoryClickEvent e) {
        Player p = (Player) e.getWhoClicked();

        if(e.getCurrentItem() == null) {
            return;
        }
        if(e.getAction() == InventoryAction.HOTBAR_SWAP) {
            ItemStack item = p.getInventory().getItem(e.getHotbarButton());
            if(item != null && item.hasItemMeta() && item.getItemMeta().hasCustomModelData() && item.getItemMeta().getCustomModelData() == 76 && item.getType() == Material.GHAST_TEAR) {
                e.setCancelled(true);
            }
        }
        if(e.getCurrentItem().hasItemMeta() && e.getCurrentItem().getItemMeta().hasCustomModelData() && e.getCurrentItem().getItemMeta().getCustomModelData() == 76 && e.getCurrentItem().getType() == Material.GHAST_TEAR) {
            e.setCancelled(true);
        }
        if (e.getInventory().getHolder() instanceof Upgrade) {
            if (e.getClickedInventory().getHolder() instanceof Upgrade) {
                if (e.getSlot() != 20) {
                    e.setCancelled(true);
                } else {
                    if (!UpgradeTools.contains(e.getCurrentItem().getType())) {
                        e.setCancelled(true);
                    }
                }
            }
        }
    }
}```
drowsy helm
young knoll
#

There’s an api for getting the version

#

It’s quite simple

trail coral
#

can you show me it

trail coral
young knoll
drowsy helm
young knoll
#

Use that or look at the code it uses

#

Idk I’ve never had a rate limit issue

#

How often are ya checking for updates

drowsy helm
trail coral
#

on startip

#

also some plugins have an autoupdate feature

#

how is that done

#

some github shit?

drowsy helm
#

can do that with spiget aswell, not sure how the spigot api works for that one

#

but usually i recommend staying away from auto updaters

trail coral
#

im not trynna do that rn its kinda shitty that its even possible

#

i was just curious

#

what stops people from downloading malware on servers with an "autoupdater"?

young knoll
#

I just do a check at startup and then repeating task every hour

trail coral
#

what do you think is best

young knoll
#

I do console

#

But it’s up to you

trail coral
#

alr thanks

dense oracle
#

is there a way to check if its the "default" ender dragon spawn or if a player respawned the dragon manually using the CreatureSpawnEvent?
or is there an other event, which is better to do that?

young knoll
#

There’s api for the DragonFight iirc

#

I believe you can check there

green prism
#

Hi there. How can I compare two inventory instances when I also have item animations? I'm iterating through an ItemStack array every 2 ms and using Inventory#setItem, but it seems they don't match an initially stored instance.

dense oracle
young knoll
#

If I recall correctly

drowsy helm
green prism
young knoll
#

You should be able to compare them with ==

#

At least in modern versions

green prism
young knoll
#

Not sure

#

Depends if inventory overrides it

green prism
#

hmmh, let me try

drowsy helm
#

do jdocs say whether a method is overriden?

tardy delta
#

believe so

young knoll
#

It’s an interface tho

#

The actual override would be in the craft class

dense oracle
trail coral
#

@young knoll can you help me shade it

#

it says its missing the .jar artifact

#

where tf do i put it

young knoll
#

The readme has all the code you need to shade it

trail coral
#

still has an error

#

im pom.xml

drowsy helm
#

what error

trail coral
#

missing artifact

#

updatechecker.jar

lusty cipher
#

have there been any reports about InventoryItemMoveEvent not working correctly between hoppers and crafters?

#

to me it looks like when I cancel the event the moved item just disappears

#

if not I will report it now since Paper works fine

young knoll
#

Not that I know of

#

Check

#

?jora

#

?jora

#

?jira

undone axleBOT
kind hatch
#

Jora

young knoll
#

Shut

icy beacon
#

distributing spigot jars is illegal. you must build it yourself

icy beacon
quaint mantle
#

I build spigot jars in Columbia and distribute it to US

tardy delta
#

great

dawn flower
#

how do i smooth teleport? so basiclaly it blacks out your screen for a second then teleports you

hushed spindle
# dawn flower like this

i suppose by not using a client that probably added that fade in as that fade is not a vanilla feature

dawn flower
#

if i normally teleport it doesn't do the effect

#

so it can't be because of my client

hushed spindle
#

so when does it do the effect

#

teleport with plugin?

dawn flower
#

if i just do Player#teleport it doesn't do the effect

dawn flower
kind hatch
#

It's probably an issue with your resourcepack.

hushed spindle
#

so this is someone elses video?

dawn flower
#

no this is mine

hushed spindle
#

the only thing i can think of is that they're briefly given the darkness or blindness effect during the teleport

#

or some other plugin is doing that

#

the fade effect doesnt exist in vanilla as far as i know

dawn flower
#

ok

hushed spindle
#

anyway i came here because ive been having this issue for a couple of days and i would really like a way to work with it
the issue being I get a NoClassDefFoundError on an nms mojang mappings class exclusively on 1.21, which I also run the server on that same jar. my project has several modules to account for version differences and there's no real difference between each module's pom.xml besides obviously the version numbers. this issue does not occur on papermc

is it because im running the server on a remapped jar? if i want to test a plugin using mojang mappings do i need to do so on a separate jar built without the --remapped argument, so i would need to build each twice?

#

^^ trying the solution right now but i reckon this kind of stuff should be documented clearly somewhere

robust ginkgo
#

I still need help with this

sleek estuary
#

entity#getcustomname can return null? spigot 1.8

hushed spindle
#

yes

#

i think

#

lemme double check

rough drift
#

you make a big font image that's full black, then play a short title

#

it does fade in/fade out on it's own

hushed spindle
#

oh right

hushed spindle
sleek estuary
#

thc

#

thx

hushed spindle
#

for next time you can read the documentation on that method

#

you can google something like "spigot 1.8 Entity" and it'll pop up the documentation on that class which has that method

green prism
#

Is it normal?

trail coral
#

how do i get an entity from UUID?

#

im not able to save entities

#

im working with textdisplays btw

hushed spindle
#

i think Bukkit.getEntity(UUID) also works

trail coral
#

which one should i use

hushed spindle
#

either

blazing ocean
#

it's a pretty cool effect

kind hatch
trail coral
#

how do i delete text displays?

#

or kill them whatever

blazing ocean
#

Entity#remove

trail coral
#

thank you

hushed spindle
kind hatch
#

Not to my knowledge.

hushed spindle
#

it's refusing to work even without a remapped jar

kind hatch
#

Just make sure you have the correct spigot version set in the pom

hushed spindle
#

actually the result is the same strangely

kind hatch
#

?paste your pom

undone axleBOT
green prism
#
[16:34:59] [Server thread/INFO]: org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryCustom@5e5f3b06 AGAINST org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@40df74e CHECK N*3```

How can I compare a player's Dispenser-type inventory to a Dispenser inventory?

They seem to be generated from entirely different classes: `CraftInventory` and `CraftInventoryCustom`
blazing ocean
green prism
blazing ocean
#

yeah what about them are you trying to compare

#

instance? items?

green prism
#

them

#

instance

blazing ocean
#

?pdc

green prism
#

Isn't PDC for items?

kind hatch
#

Show code

blazing ocean
slender elbow
#

raised eyebrow emoji

#

no they aren't

blazing ocean
#

tile entities are
fuck

shadow night
#

An inventory is not persistent, how would it have a persistent data container

green prism
# kind hatch Show code

Bukkit.createInventory(null, type, title); generates a CraftInventoryCustom instance. When I cache that and then use #getTopInventory() (which returns an instance from CraftInventory), they don't match.

[16:44:34] [Server thread/INFO]: Inventory has type: DISPENSER N*3
[16:44:34] [Server thread/INFO]: org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryCustom@4647d1f AGAINST org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory@71ccf783 CHECK N*3
            System.out.println("Inventory has type: " + inventory.getType() + " N*" + i);
            System.out.println(customInventory.getInventory() + " AGAINST " + inventory + " CHECK N*" + i);
blazing ocean
#

yeah well the top inventory isn't the inventory

green prism
blazing ocean
#

chests are different from dispensers

green prism
trail coral
#

whats the best way of storing uuid data over resets?

#

i do it in a .yml file rn

blazing ocean
#

why not compare against the inventory itself

kind hatch
#

That’s what they are trying to do

blazing ocean
#

they are comparing the inventory and the top inventory

kind hatch
kind hatch
trail coral
#

i cant do a pdc so ill stick to files thank you

green prism
blazing ocean
#

never said player inventory

hard socket
#

public HashMap<UUID, List<UUID>> playerFriends;

what is the best way to save this in a MySQL database

green prism
# blazing ocean why call getInventory again

I'm using it as a library, so I don't declare it directly. In this case, the inventory is defined as:

Inventory topInventory = player.getOpenInventory().getTopInventory();

getInventory() is just a cached inventory that comes from Bukkit.createInventory(...)

kind hatch
#

wut?

hybrid spoke
green prism
green prism
green prism
#

how can I compare a Dispenser to a TopInventory?

hazy parrot
hybrid spoke
#

isnt a "topinventory" also the dispenser?

green prism
tardy delta
hybrid spoke
#

i always do the no-no shit by just implementing inventoryholder and comparing it by the holder

hybrid spoke
green prism
kind hatch
#

Then get the inventory from the view

#

The InventoryView contains both the top and the bottom inventories.

green prism
#

I'm already doing it

kind hatch
#

?paste

undone axleBOT
kind hatch
#

Show the entire code

hybrid spoke
#

im not that much into gui stuff

kind hatch
hard socket
hybrid spoke
#

he just told you the way to go

green prism
hard socket
#

I am thinking to put the key in a column and the value in another column

green prism
blazing ocean
#

have the player UUID be the PK and then just relations ig

hybrid spoke
tardy delta
#

unless i need to do some maven trick

grim hound
green prism
# green prism ofc https://paste.md-5.net/rayesuxihe.cs

where

                inventory = Bukkit.createInventory(null, type, ComponentsUtil.serialize(title));

Returns a

public class CraftInventoryCustom extends CraftInventory {

    public CraftInventoryCustom(InventoryHolder owner, InventoryType type, String title) {
        super(new MinecraftInventory(owner, type, title));
    }

instance

kind hatch
#

Why are you comparing against that?

#
Inventory inv = Bukkit.createInventory();
#

Should be comparing against the interface.

green prism
#

so I would need a cast

kind hatch
#

You shouldn't need one.

#

If you are trying to compare types, there's InventoryType#DISPENSER

#

You can also do an instanceof check.

green prism
kind hatch
#

Yea, and this is part of how you do that. :p

tardy delta
#

@blazing ocean plugins should work with kotlin out of the box no?

green prism
blazing ocean
#

yeah

tardy delta
#

weird

#

lemme restart instead of reload

blazing ocean
#

yeah

#

you using paper now?

tardy delta
#

yes 👉👈

kind hatch
#

Traitor

#

dies

tardy delta
#

running spigot on a raspberry pi will make it smoke

#

die again

green prism
kind hatch
#

You're not supposed to. 💀

#

That's what the api methods are for.

#

Otherwise you're basically implementing your own inventory system.

#

Which you would still need to fork craftbukkit for.

green prism
#

this is getting tricky haha

#

Here's the new question: How can I compare a cached CraftInventoryCustom (that extends CraftInventory) to an open inventory view that also extends CraftInventory? While CraftInventory and CraftInventoryCustom classes are inaccessible

tardy delta
#

oh god

#

anyways, plugin still doesnt load lol

#

this is how it works no

blazing ocean
tardy delta
#

forgive me for silly questions, havent been making plugins in basically two years

blazing ocean
#

use gradle

#

or show your pom

tardy delta
#

never again

blazing ocean
#

make sure you're compiling kotlin

tardy delta
blazing ocean
#

forgor that once and took me an hour to debug

shadow night
#

Why tf would you use maven with kotlin

hybrid spoke
tardy delta
#

cuz i dont want to use java?

hybrid spoke
#

if its the same inventory, it should be the same instance

blazing ocean
#

@tardy delta any errors in console

#

can't believe i'm gonna ?notworking your ass

#

?notworking

undone axleBOT
#

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

tardy delta
#

uhh no

green prism
blazing ocean
#

check your jar

#

or is just nothing happening

#

not getting recognised

tardy delta
#

jdgui pullin a java.lang.InternalError: platform encoding not initialized on me smh

#

well its there, plugin.yml too 🤷‍♂️

hybrid spoke
#

==

tardy delta
#

unless /plugins/update doesnt work on paper

hybrid spoke
#

and no, craftinventory does not seem to override equals

#

maybe a subclass

tardy delta
#

whatever

green prism
kind hatch
#

I'm pretty sure you'd want to use == in the case of inventory instance comparison

green prism
#

oh wait

#

.equals worked!!!

#

jweikjqwheytgqe

tardy delta
#

update: plugins/update doesnt work on paper or smth, works fine now

green prism
#

@hybrid spoke, I love you

tardy delta
#

just doesnt generate one

hybrid spoke
#

maybe its that

blazing ocean
tardy delta
#

well i doubt just adding a repo and dependency will run an annotation processor

tardy delta
blazing ocean
#

why not use that gradle plugin

#

or just stick to plugin.yml

eternal night
#

cat_what why would the update folder not work on paper

tardy delta
#

cuz it clearly doesnt

#

i put it in /plugins and it works instantly 🤷‍♂️

short drift
#

After some more testing it seems all multi-line messages in spigot.yml are broken in Spigot 1.21 (Eg. outdated-server, restart, etc under the messages section).

#

No matter how you define them.

hard socket
#

?paste

undone axleBOT
hard socket
eternal night
hushed spindle
#

I'm getting the following error only on spigot 1.21, paper 1.21 works fine and any lower version also works fine. Using mojang mappings for my project, no mappings for the server I'm testing on, and there's no differences besides versions to pom.xml between the 1.21 module and its lower counterparts. I don't understand why. Is there a possibility that buildtools is not working properly?

eternal night
#

you need to remap if you want to run on spigot

hushed spindle
#

here's the pom.xml if needed

#

remap? like using mojang mappings? I am doing that

#

i tried running the server both with and without mappings to no result

eternal night
#

no like, the maven plugin you have should map from mojang (the mapping your source code compiles against) to spigot mappings

#

maybe you are not using the right jar?

hushed spindle
#

the specialsource plugin right

#

using the right jar as dependency? I think so, I rebuilt and updated it several times

eternal night
#

Yea the special source plugin

#

idk, I am not versed enough with the spigot setup sadly

uncut heath
#

does anyone know how to make i to where people can place blocks if they are tagged in combat logX

hybrid spoke
uncut heath
#

lol myf

spice burrow
#

does PlayerQuitEvent fire even if the client crashes?

kind hatch
hybrid spoke
kind hatch
#

Oh wait

#

nvm

hushed spindle
#

same as how i assume everyone else does it, "open git bash here" in the explorer window containing buildtools which i put in my .m2 folder and executing java -jar BuildTools.jar --rev 1.21 --remapped

#

removing the --remapped for the jar i use for the server

kind hatch
#

You ran BT in your .m2 folder?

eternal night
#

I mean, they have the right setup no? Given they have access to the mojang mapped soruce code to compile against

hushed spindle
#

yeah i dont see why not, kinda messy yeah but it shouldnt break anything

eternal night
#

the special source remapping just fails

hushed spindle
#

it did the job for the other 8 versions i support but 1.21 specifically breaks

eternal night
#

huh

spice burrow
kind hatch
#

It looks right to me

eternal night
#

maybe some java version fuckery?

hushed spindle
#

1.20.6 also uses java 21 right

#

that one was also fine

#

i hate to go pointing fingers but could it not be buildtools somehow

#

it doesnt make sense to me why papermc would work when spigot doesnt

kind hatch
#

You can always check the log file for BT

eternal night
#

paper does not use spigots mappings at runtime

kind hatch
#

Did you guys switch over to mojmaps?

eternal night
#

yea

kind hatch
#

Fancy

eternal night
#

and removed craftbukkit package relocation

kind hatch
#

Must be nice.

eternal night
#

it is KEKW

hybrid spoke
#

thatd be the kick event

hushed spindle
#

i mean i guess its the server jar im using then right?

kind hatch
#

Could be

eternal night
#

no the plugin references a mojang mapped classname

#

its the specialsource plugin

spice burrow
hushed spindle
#

when you guys build a spigot jar for server stuff do you use --remapped or no

eternal night
#

the remapped thing just puts the remapped server into your local repo

spice burrow
#

didnt know if for example the jdk corrupts or something (a bit extreme), it wouldn't fire

eternal night
#

the jar stays with spigot mappings

kind hatch
#

^

hushed spindle
#

man

kind hatch
#

As long as you are using the spigot jar that it spits out and not the one labeled with -remapped, then you should be using the correct spigot jar.

hushed spindle
#

yeah so that cant be it then

#

could buildtools be messing up at all

#

imma go look at that log file rq

lucid pagoda
#

how can i make my own custom model data item's name translatable with a custom key in the languages of my server's texture pack

hushed spindle
#

afaik you cant do that

kind hatch
#

Cause I'm currently using Java 17 to compile stuff for 1.21

hushed spindle
#

also 17

#

gonna throw stuff at the wall and see if java 21 sticks

#

oh, i do see a warning saying "the requested profile "remapped" could not be activated because it does not exist

#

so thats probably it right lol

kind hatch
#

Probably

hushed spindle
#

nevermind

tardy delta
#

you kidding me right

#

still doesnt do it tho

#

🤷‍♂️

kindred valley
#

@quaint mantle stop using static keyword

#

Its really dangerous and rookie act

trail coral
#

if i have a 1.19 server and do some shit with text displays and a player joins on 1.12 for example, will he be able to see the textdisplays? (using viaversion and viabackwards)

#

lmao what

#

he accidentally pinged the wrong guy he must be a criminal

#

mods cut his balls off

kindred valley
#

It is not a random ping. I just gave advice

#

I look up there u used static

kindred valley
#

Aye stop being disrespectful

trail coral
#

calm your tits big guy

trail coral
ancient plank
#

@quaint mantle calm down bucko

trail coral
ancient plank
#

I don't care if you're pissed about a random ping, don't insult people

trail coral
#

he pinged me mods cut his balls off

ancient plank
#

@kindred valley idk if you typo'd a name or what, but y'know

kindred valley
#

If you dont want to be criticized then dont post random stuff

blazing ocean
#

if you looked up their messages and found that out, stop that

#

because that's fucking creepy

trail coral
#

limpeex is that levan saginashvili?

#

on your banner

kindred valley
#

How you know him

trail coral
#

same country

kindred valley
#

Levan or devon

trail coral
#

levan

kindred valley
#

Ye my guy

#

I love levan i had photo with him

trail coral
#

nice

#

hes a giant

quiet ice
#

Well I already had limpeex blocked for quite some time now (must have been over half a year ago).

kindred valley
#

alright creeps started to fuck with me

#

Im out

#

Goodbye

quiet ice
#

So yeah, there must have been some history of them being not great to deal with already

trail coral
trail coral
blazing ocean
#

think that's the wrong image buddy

spare sky
# drowsy helm wheres the debugs

sorry I didn't have time

here:

 public void onClick(InventoryClickEvent e) {
     Player p = (Player) e.getWhoClicked();

     if(e.getCurrentItem() == null) {
         return;
     }
     if(e.getAction() == InventoryAction.HOTBAR_SWAP) {
         ItemStack item = p.getInventory().getItem(e.getHotbarButton());
         if(item != null && item.hasItemMeta() && item.getItemMeta().hasCustomModelData() && item.getItemMeta().getCustomModelData() == 76 && item.getType() == Material.GHAST_TEAR) {
             e.setCancelled(true);
         }
     }
     if(e.getCurrentItem().hasItemMeta() && e.getCurrentItem().getItemMeta().hasCustomModelData() && e.getCurrentItem().getItemMeta().getCustomModelData() == 76 && e.getCurrentItem().getType() == Material.GHAST_TEAR) {
         e.setCancelled(true);
     }
     System.out.println("debug");
     if (e.getInventory().getHolder() instanceof Upgrade) {
         if (e.getClickedInventory().getHolder() instanceof Upgrade) {
             if (e.getSlot() != 20) {
                 e.setCancelled(true);
             } else {
                 if (!UpgradeTools.contains(e.getCurrentItem().getType())) {
                     e.setCancelled(true);
                 }
             }
         }
     }
 }
}```
dire marsh
#

Dude has some dedication to still be annoying someone about "static" after 2 years.

kindred valley
#

look helpers they still try to provoke me

#

this is a help channel and i gave advices

#

thats it dont cry zacken dont use statics

#

lol whats wrong with it

#

you are cringe

remote swallow
#

using static is fine

kindred valley
#

I didnt reply to you for this one ok?

remote swallow
#

pinging random people when they havent spoke here for a month is a bit weird

blazing ocean
#

my man there's no static there

#

yeah no just let them be

#

stop telling them what to do

#

while static abuse is bad

remote swallow
#

i use static for all my code

blazing ocean
#

it doesn't mean you should harass them about it

kind hatch
#

Just block them :p

blazing ocean
#

objects

spare sky
#

guys what do you think about static?

blazing ocean
#

(kotlin)

remote swallow
#

big fan of companion objects

kind hatch
#

Idk man, some people deserve a block

kindred valley
#

.

#

look at this one

#

he first started it

blazing ocean
remote swallow
#

that was 2 years ago

#

calm down, move on

kind hatch
#

Fr

remote swallow
kind hatch
#

Y’all got decade old beef?

blazing ocean
#

huge W

kindred valley
#

ye obsessed with your ignorance

#
public static {
static static() {
static.static.static("static");
}
}```
remote swallow
#

not valid code

blazing ocean
#

ok we get it

#

you are incapable of being friendly and writing code

#

you definitely weren't

remote swallow
#

okay

ancient plank
#

both of you just stop and move on I don't care about your past issues
@kindred valley stop randomly pinging this guy to say things about static

blazing ocean
#

it was?

remote swallow
#

it was

blazing ocean
#

???

kindred valley
#

lolll

remote swallow
#

please explain how it wasnt random, he has not spoken in a month

blazing ocean
#

how is pinging people at random times for saying "stop abusing static" not random pinging

worldly ingot
#

Mk, moving on

blazing ocean
#

be gone

remote swallow
#

hi choco

worldly ingot
#

Take a breather. Go outside. Touch some grass. All good

remote swallow
#

how are the huskies

remote swallow
worldly ingot
#

Good. Huskin'

remote swallow
hushed spindle
# hushed spindle https://paste.md-5.net/namedikulu.xml

@eternal night @kind hatch so i figured out what was wrong and as it turns out, somehow, in the pom.xml you can see how the whole specialsource plugin was wrapped in another pluginManagement block. how that got there I have no idea, but I didn't catch on to it at first because I compared it to a previous version which happened to have the same mistake that I never caught because I test 1.20.6 on paper and not spigot.

sorry for the trouble, lol

eternal night
#

KEKW nice

kind hatch
#

Lol

remote swallow
eternal night
#

no KEKW

remote swallow
#

monster

eternal night
#

today is my one day of paper work

remote swallow
#

you arent streaming

eternal night
#

if I have time later, I'll read it

remote swallow
#

go look at his pr

eternal night
#

oh I am about to head to the germany game

remote swallow
#

read the pr smh

eternal night
#

actually @river oracle can you throw me the PR link in DMs

eternal night
#

oh nice

remote swallow
#

i think its that one anyway

eternal night
#

enjoy holiday then!

remote swallow
#

thats his only open pr

#

so you can review it while hes gone for a surprise when he returns

tardy delta
inner mulch
#

Java > Kotlin

shadow night
tardy delta
#

traitor

green prism
#

oh wait, integrating papi inside custom guis' text means no item caching, doesn't it?

mellow hazel
shadow night
#

used some non-ascii characters there

#

but public static static static sure does look fancy

hot reef
tardy delta
#
static class static {
  class static1 {
    static static1 static() {
      return (new static()).new static1();
    }
  }
}```
hot reef
#

christ

slender elbow
#

fortunately you can't use static like that

quasi gulch
slender elbow
#

yes

#

I was gonna say that

#

I'll take the credit

quasi gulch
#

👍

hot reef
quasi gulch
#

yup

hot reef
#

that pains me

#

SO MUCJ

prisma creek
#

Isn't there still an easy way to create custom brewing recipes?

trail coral
#

text displays can be seen from any version as long as the servers main version supports then

#

them

#

i just tested it out

green prism
#
  bad class file: /C:/Users/***/.m2/repository/com/mojang/authlib/3.4.40/authlib-3.4.40.jar!/com/mojang/authlib/GameProfile.class
    class file has wrong version 60.0, should be 52.0

💀

trail coral
#

how do i make a new line in textdisplays? \n just does a weird character

#

is it \\n or smth?

green prism
#

?tryandsee

undone axleBOT
wintry dagger
#

what’s generally most appreciated for server owners?

#

managing everything through GUIs or commands

#

GUIs being more clean, more straightforward, commands being easier to handle?

tardy delta
# tardy delta

ahh had to do this, kapt is in maintenance mode tho and ksp is recommended but cant figure it out

acoustic shuttle
#

Is there a way to do custom mining speed without mining fatigue I think I saw someone but I don't remember if I did or where it was
The only reason mining fatigue is even useful is cuz of the block damage animation and the only reason I don't want it is because it just looks weird to have the constant effect, fist goes down slower, and I could be wrong but I think in the newer versions it makes you attack slower?

acoustic shuttle
trail coral
trail coral
trail coral
blazing ocean
#

oh there's no TextDisplay.Spigot yeah you're cooked

trail coral
#

items have mining speed atteibute

#

pickaxes and stuff

trail coral
blazing ocean
#

yeah

#

spigot only supports setting text

trail coral
#

ive done it before but i cant remember how i did it im so stupid

blazing ocean
#

which is such a spigot skill issue ngl

trail coral
#

spigot is a skill issue in itself

#

why is minecraft so against modding and the community changing things around?

blazing ocean
#

real should just use paper

#

it's really not lmao

trail coral
#

like why doesnt nms have an api itself

trail coral
blazing ocean
#

nms literally is an api what are you talking about

trail coral
#

everything is obsfucated and shit

blazing ocean
#

use mojmaps

trail coral
blazing ocean
#

you're using spigot mappings

#

?mappings

undone axleBOT
blazing ocean
#

?nms

chrome beacon
#

They provide mappings

#

You don't have to work with the obduscated code

blazing ocean
#

which just outright suck

trail coral
#

i guess

#

maybe its being more supportive of modding by each update

#

like in 1.8 it was basically impossible

blazing ocean
#

?1.8

undone axleBOT
chrome beacon
#

It was worse but very mich possible

#

Much*

#

The community supplied mappings for the most commonly used parts

blazing ocean
#

yarn my beloved ❤️

#

rustrover is so high

trail coral
#

every doc i see or code snippet on textdisplays uses \n for new line but for me it creates a weird character

blazing ocean
#

that's because it doesn't work like that

trail coral
#

actually i was on 1.12.2 when i saw that to test if it worked on there maybe thats why?

blazing ocean
#

components ftw

trail coral
#

what

blazing ocean
#

how tf did you get text displays on 1.12.2

trail coral
#

1.19 server

#

viabackwards

blazing ocean
#

bruh

trail coral
#

join with 1.12

blazing ocean
#

💀

trail coral
#

cause most people do it like that

blazing ocean
#

literally the worst way to test new features

#

except they don't

trail coral
#

lmao i was just testing the compatibility

trail coral
chrome beacon
#

So it's a backwards translation error

trail coral
#

most servers are 1.20 or 1.21 and allow older versions to join

blazing ocean
trail coral
#

maybe 1.16-1.21

#

or something like that

blazing ocean
#

people shouldn't join a 1.19 server with 1.12 kekw

trail coral
#

basically every server does this

blazing ocean
#

no?

trail coral
blazing ocean
#

okay?

trail coral
#

and there wouldnt be an issue depending on the derver

trail coral
#

if thats what you think

blazing ocean
#

lol

trail coral
#

im gonna test it out on 1.19 later

blazing ocean
#

you've never seen a modern server then

trail coral
#

literally 99% or more servers support more than 1 mc version

#

stop arguing about that

#

its a fact

chrome beacon
#

They usually support newer versions

#

Not older ones with via backwards

trail coral
#

minigame servers or lobbies support backwards and forwards

#

depending on what the servers theme is

blazing ocean
trail coral
#

im not fucking talking about 1.8 servers

#

just shut the fuck up and stick to making plugins

#

1.20 servers support 1.16 too

#

a lot of them

#

and for sure the servers im making my plugin for

blazing ocean
blazing ocean
trail coral
blazing ocean
#

you are trying out a modern feature with an ancient version kekw

trail coral
#

and youre also replying to my messages with clown emojis ??

kindred valley
#

😇

trail coral
#

its a modern feature

blazing ocean
#

yeah

#

that's why you use it for modern versions

trail coral
#

im talking abt servers supporting multiple versions

blazing ocean
#

those use armour stands

trail coral
#

bro

trail coral
#

can you read

blazing ocean
#

okay?

#

me too?

trail coral
#

youre actually braindead

blazing ocean
#

they use armour stands for cross-version compatibility

kindred valley
#

Agreed.

blazing ocean
#

tf did i do to you

trail coral
#

you were saying cross version compatibility was not a modern feature

#

earlier

blazing ocean
#

gl trying to implement a 1.19.4 feature for 1.12

blazing ocean
trail coral
#

is it okay if i tell you to get your gay ass outta here? not in a homophobic way

#

youre pissing me off

blazing ocean
#

no

echo basalt
blazing ocean
#

yeah lol

#

and the fact they're just telling me to stfu kekw

trail coral
# blazing ocean no

wouldnt really ask if people wouldnt get their titties hurt here if i mention the word gay

blazing ocean
#

my issue there was not the word gay

echo basalt
#

can y'all not be rude to each other

trail coral
blazing ocean
#

my issue was that you're being a complete dickhead to me lol

blazing ocean
#

i'm trying so hard to be nice rn

ivory sleet
#

dw handled ^^

winged crater
#

I cant type /plugin anymore.
All I get is "incomplete command" error..

#

0 errors in console

chrome beacon
#

/plugins

winged crater
#

not working.

blazing ocean
#

?notworking

undone axleBOT
#

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

winged crater
#

Rad stfu

#

Ur the most annoying person in this discord server ngl

#

I just described it

chrome beacon
#

Send the output from /about

#

My guess would be that you're not running Spigot

slender elbow
#

I didn't know today was being rude day

blazing ocean
winged crater
#

Cant send a ss in here, or u mean from console

blazing ocean
#

everybody be harassing me today

#

very fun

young knoll
#

Yea you suck!

blazing ocean
#

damn :(

chrome beacon
#

The world is against you

winged crater
blazing ocean
#

😔

winged crater
#

Also the server ran perfect, and after our normal restart we figured out nothing is protected, /plugins isnt working and so on.

blazing ocean
#

are you sure you have the permission / op

winged crater
#

yeah.

chrome beacon
#

Are you running the command in the console or as a player

winged crater
#

both

blazing ocean
#

what plugins are you running (check your plugins folder)

chrome beacon
#

^ it's probably a plugin

#

One of those plugin hiders

slender elbow
#

something something logs

winged crater
blazing ocean
#

okay

#

me too!

winged crater
#

but actually nothing special

blazing ocean
#

send a list

chrome beacon
#

Or just recreate the issue without plugins

#

And then binary search them

#

(As in the algorithm, and if it's fixed when removing the plugins)

blazing ocean
#

(this is a paper link as they have docs for it)

#

(definitely not trying to promote paper)

chrome beacon
#

Neat

trim raptor
#

wild

winged crater
#

helping him?

winged crater
#

okay in the console is /pl and /plugins working but not ingame.

blazing ocean
#

are you 100% sure you have the correct permissions

slender elbow
blazing ocean
#

???????????????????????????forkkkkkkkkkkkkkkkkkk

chrome beacon
winged crater
remote swallow
blazing ocean
chrome beacon
#

Yes

blazing ocean
#

oh damn

remote swallow
#

player command pre process event

chrome beacon
#

^^ block that

blazing ocean
#

ah

pseudo silo
#

Hey Guys ! I just figured out that the bukkit event PortalCreateEvent isn't trigger for end_portals . any of you got a solution ?

winged crater
#

okay seems like a bungee problem, cant say it on single server and on the hub

twin venture
#

hi , iam using pubsub to send a message in redis but , for some reason this :
the kit_serilizeditem is not being sent

#

what iam missing?

#

it send only the first 5 or 8 letter from it and it stop sending it

gilded forge
#

My changes make damage system broken again wtf

remote swallow
#

fucking

#

hell

#

how did you break it this time

gilded forge
#

I made my armor unbreakable
because i have to hit myself hundreds of times

remote swallow
#

smh

gilded forge
#

and then i havent noticed the durability changes

#

Thanks Doc

#

this issue was resolved immediately

eternal night
young knoll
#

Breaking things is my job :c

echo basalt
#

Broke branches so hard at work that I'm no longer allowed to git merge :(

slender elbow
#

git gud

echo basalt
prisma creek
#

getMaximumAge() not working anymore ?

gilded forge
#

it just looks like a cpu

slender elbow
#

wrong Ageable imported

prisma creek
#

thanks lol

slender elbow
#

you want org.bukkit.block.data.Ageable

gilded forge
#

whats a houe

prisma creek
tardy delta
#

french hoe

silent slate
#

uhm, when clicking a compass in the air and listening to the interact event it doesnt say anything, is there a way to fix this? How do the big plugins make this happen?

eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

inner mulch
#

can you change a entitytype of an existing entity? (with packets or api) Or is this immutable?

sacred mountain
#

So confused, I'm trying to make 2 recipes in my plugin, but one of them doesnt work and one of them does. not really sure why
The pickaxe works for reference

#

Like the axe appears in the recipe book but when i click it, the items go into the grid but there is no result

sacred mountain
#

nvm

#

i think this may be out of my control

carmine mica
#

you have a full column of spaces, just remove it

#

shape("NN ", "NB ", " B ") -> shape("NN","NB"," B")

sacred mountain
#

will that make a difference

carmine mica
#

it will make it work, and it will make it a better recipe because it can be constructed in either of the 2 arrangements

#

the shape should always be the minimal. If your recipe requires a 2x3 grid, the shape should be that

sacred mountain
#

i see

compact haven
#

I hate that instead of trying the solution of the first comment he said it was out of his control 😭

sleek estuary
#

i cant make this on secondary thread?

carmine mica
#

you cannot interact with world state off the main thread

sleek estuary
compact haven
#

^ must be queued on main thread with scheduler or attained before jumping onto the second thread

carmine mica
#

you are querying some world state. You are getting the state of a block, that is interacting with the world

#

you can't read from the world, write to the world, interact with inventories, spawn entities, interact with entities, and lots more off the main thread

#

You can copy sections of the world with ChunkSnapshot and then interact with that snapshot off the main thread. Useful for doing lookups in larger areas. That works because it's essentially copying chunks.

sleek estuary
carmine mica
#

if you are just looking at one block that you already know the location of, just do it on the main thread

kindred valley
#

He tries to involve the topic like its about him then complaining about people being rude at him

carmine mica
#

ChunkSnapshot is useful if like, I want to find all iron ore in a section of the world. I don't know where it is, so I make copies of chunks, and then search through it off the main thread. Then I have a list of locations, and can check those exactly back on the main thread without having to check every single block in the area on the main thread

#

but it looks like you already know the location, so just do the check on the main thread

kindred valley
blazing ocean
remote swallow
kindred valley
#

lol

#

just sleep m8

#

please

blazing ocean
#

probably because you use kotlin

remote swallow
#

its 10pm and im listening to greenday live

acoustic shuttle
#

Anyone know how to clear Block damage at a block?

player.sendBlockDamage(block.getLocation(), 0);
Nothing I do seems to work as 0 is the first stage
player.sendBlockDamage(block.getLocation(), 0);
1 is the last stage

and it has to be a float between 0 and 1
Can't find anything in the docs to clear
The only way it clears is if I start breaking another block

river oracle
remote swallow
river oracle
remote swallow
#

i fixed it already

river oracle
#

You're our QA department

remote swallow
#

fuck no im not

#

cant believe you never tested edge cases before sending it smh

remote swallow
river oracle
#

I didn't test it at all before pushing to prod

remote swallow
#

thats what im meant to do

acoustic shuttle
kindred valley
#

Isnt it already being cleared when you stop breaking it

acoustic shuttle
#

the block isn't actually breaking

grim oak
#

HI, How do i check if an inventory click event was a villagers inventory, because there isnt a 'villager' inventory type

wraith delta
#

Q: if I have a ArrayList and I add duplicate String STONE, STONE.. how can I remove just one of them? Doesn’t matter which one, not all stone values?

grim oak
river oracle
wraith delta
#

Leaving 4 behind

river oracle
#

Or you could just stop the loop after the first one

#

Why would it need to go through every element if you've already found the first entry you're looking for

wraith delta
#

It’s keeping count of shops that contain that item, don’t want one shop to remove all of them. I usually use array.remove(item) but I’m guessing that would remove all 5 stone values instead of just picking one to remove

river oracle
wraith delta
twin venture
#

how would it know that that's the correct data for it?

#

should i do if path.contains(AnvilRain) ?

real lagoon
twin venture
young knoll
#

Map

real lagoon
young knoll
#

A bit gross but yeah you can do that

real lagoon
potent shuttle
#

Whens the next 1.21 build?

slender elbow
slender elbow
real lagoon
#

And he also needs to use reflection then

young knoll
#

You can have a map String -> some kind of factory method

real lagoon
#

An extra extra step

twin venture
#

thanks for suggestions , i will try to finish it torrmow its 3am for me 🥲

young knoll
#

You could just have a static factory method for each cosmetic that takes in a ConfigurationSection and grabs the data it needs

#

Although in this case it looks like they all use the same data so you can simplify that even further

real lagoon
#

But it's useless if all classes have the same constructor

#

The smallest way in terms of code lines is using Class.byName and call the constructor via reflection

twin venture
#

WinEffects , WinDance , KillEffects , KillMessage ...

young knoll
#

Well yeah but you can avoid the reflection by having a Map that just maps a string to a custom functional interface

#

Which takes in price, rarity, and mode and returns a Cosmetic

real lagoon
twin venture
#

yeb that what i did

young knoll
#

The switch isn’t really smaller

#

If anything it’s the same

twin venture
#

do i need to edit it and have ConfigurationSection in each cosmetic?

real lagoon
twin venture
#

and just set data from there?

real lagoon
young knoll
#

switch (x)
case ->
case ->
case ->

Vs

Map.of(name, A::new, name, B::new, name, C::new)

twin venture
young knoll
#

Pretty sure map.of is fairly old

#

Yeah it’s java 9

#

And functional interfaces are java 8

twin venture
#

thx gonna work on it tomrrrow 😮‍💨

real lagoon
young knoll
#

Hmm?

real lagoon
# young knoll Hmm?

If he needs to call a method in the interface that takes 2 strings and 1 int of which type the functional interface would be?

young knoll
#

Custom one

real lagoon
#

Isn't faster to do it with the switch?

young knoll
#
public interface CosmeticFactory {
   public Cosmetic apply(String type, String rarity, int price);
}```
#

Faster? Yeah probably marginally so but how often are you parsing configs

#

One benefit of using a map is you can allow other plugins to register custom cosmetic types

real lagoon
young knoll
#

And you don’t end up with a giant switch as you add more types

#

I don’t think java has a TriFunction

#

Kek

#

Smh java get on that

twin venture
real lagoon
young knoll
#

Why stop there

#

I want my quad and penta functions too

real lagoon
young knoll
#

And consumers of course

twin venture
real lagoon
young knoll
#

Man ya gotta have that reload command

#

If every plugin did that we could just yeet /reload

twin venture
#

just restart for proper data handling ..

real lagoon
young knoll
#

You don’t seem to understand how lazy the average server owner is

#

And how much they can’t afford 30 seconds of downtime!!!!11

real lagoon
young knoll
#

Yes but that’s likely to break everything

real lagoon
#

Plugins that break only for being disabled suck

young knoll
#

¯_(ツ)_/¯

#

The devs should have designed around that

#

But disabling stuff at runtime is quite hacky so sometimes it’s difficult

real lagoon
young knoll
#

Pretty sure the classloader just gets closed and a remade

young knoll
#

Can cause all kinds of strange things with static variables and whatnot

#

And if the plugin is messing with stuff in NMS who knows what might explode

real lagoon
#

Everyone likes exploding things

slender elbow
#

so long as "things" doesn't include sewers

real lagoon
#

I never heard about sewers

slender elbow
#

Do you live in Madagascar or something?

young knoll
#

And if so, are you one of the penguins?

#

Love those guys

real lagoon
real lagoon
#

Like plugins that blow up when re-enabling them

real lagoon
slender elbow
real lagoon
#

Really?

young knoll
#

Ah man rip penguin

#

Beaten by the basketball mob

real lagoon
#

That's actually me

dreamy sorrel
#

How is intellij/gradle using a version of my plugin I made 6 hours ago

#

wtf

real lagoon
young knoll
#

Dog armour is pretty good

young knoll
#

But still, F to the penguins and the crabs

real lagoon
#

The dog is actually immortal

#

But Mojang decides to nerf the mace

dreamy sorrel
real lagoon
#

Lol

young knoll
#

Pretty sure the mace is still quite powerful

#

Just situational

real lagoon
#

I know

#

But I hate the invulnerability of dogs with armor

#

That's making no sense

young knoll
#

Meh

#

I still don’t think they are super powerful

real lagoon
#

Breed one thousand dogs and go

#

And one cat to pss pss creepers and phantoms far away

young knoll
#

Good luck fighting anywhere close quarters with 1000 dogs :p

real lagoon
#

Ehehe

devout otter
#

can someone help me with luckperms quickly?
how do i give all players that join default rank on luckperms

#

resolved

elder dune
#

What would be the best way to get the amount of deaths that has happend in a day then reset when its a new day ?

agile anvil
#

Of course this is fairly simple and not resistant to restarts, and also one server only. You can overcome these issues using a database, or other systems to fit your setup

wet breach
#

real world day or in game

jolly creek
#

Does anyone know the new enum name of SNOW_SHOVEL?

#

And for how the explosion particle enums work, now there is only EXPLOSION, but before there was EXPLOSION_NORMAL, LARGE, and HUGE

hazy parrot
#

Poof

jolly creek
acoustic shuttle
#

Is there a way to make this stick somehow?

    private void sendBlockDamage(Player player, Location blockLocation, int stage) {
        PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.BLOCK_BREAK_ANIMATION);
        packet.getIntegers().write(0, player.getEntityId());
        packet.getBlockPositionModifier().write(0, new BlockPosition(blockLocation.getBlockX(), blockLocation.getBlockY(), blockLocation.getBlockZ()));
        packet.getIntegers().write(1, stage);
        protocolManager.sendServerPacket(player, packet);
    }```
(If it repeat it every tick it looks extremely weird like it's just going away for a milisecond and coming back or something and it looks buggy asf)
acoustic shuttle
#

Also I just remove it with that peice of code its the same thing with the spigot api

#

It's buggy asf

#

It only sticks when u don't want it too 💀

#

Maybe im slow

smoky anchor
acoustic shuttle
smoky anchor
acoustic shuttle
#

progress 0 is the first one

#

and u cant go below 0

#

or above 1

#

and it just multiplies the float but 9

smoky anchor
#

Then docs are incorrect ig

acoustic shuttle
jaunty harness
#

Hi, i need help. So, how to sendMessage "Hello world" that contains link (Example: youtube.com). Like a vanilla command -> ||/tellraw @a [{"text":"Hello World","clickEvent":{"action":"open_url","value":"youtube.com"}}]||

jaunty harness
#

umh wait

jaunty harness
#

If the code above is correct, how do I put it into sendMessage()?

jaunty harness
summer scroll
vague dawn
#

hey, any idea how to check if args[1] is null or empty? Its not working like this

#

basically if its empy like player only type /vz create and not /vz create <name> i want to send the sender message something like &cMissing argument <name>.

remote swallow
#

if args lenth is 2 then create and <name> are present

#

if args length is 1 only create is present

vague dawn
#

oh okey, i will add it here

#

i thought that there is different way

#

I mean i added it into args.length == 0

#

i am begginer, so sorry for mistakes

acoustic shuttle
jaunty harness
remote swallow
#

spigot().sendMessage

jaunty harness
#

should I use this?

remote swallow
#

you should be able to use exerc.spigot().sendMessage(message)

twin venture
#

in theory can it work?