#help-development

1 messages Ā· Page 1799 of 1

hybrid spoke
#

or on git bash echo $JAVA_HOME

summer scroll
#

oh found it

#

C:\Program Files\Eclipse Adoptium\jdk.. smh

grave mason
#

no 1.18 ?

chrome beacon
#

Did you import 1.18 correctly

grave mason
#

just the same as others

pastel stag
#

thats not properly

#

read the news post on spigot front page of site

#

you can no longer just use the jar as a dependency

chrome beacon
#

System path dependencies šŸ˜ž

grave mason
#

now this ?

chrome beacon
#

And the other part

#

Also make sure to run BuildTools

grave mason
#

i have now this

#

and this

#

but i still dont have the 1.18 import

pastel stag
#

you cannot import the jar

#

read the first post on spigotmc website

fallow merlin
#

Hey is it possible to get these spectator mode items? (the 2d head and the arrows )

hybrid spoke
#

i think its clientside

#

but i am not sure

fallow merlin
#

even if its just packets

#

Because the player cannot teleport themselves?

summer scroll
young knoll
#

Add the API to your build.gradle

summer scroll
#

But I want to use the nms?

young knoll
#

You already have NMS in your build.gradle

summer scroll
#

Yes, it should have everything that the spigot-api have right?

#

There is no EntityArmorStand too

#

The thing is already exist on the .m2 folder too

eternal night
#

does the spigot 1.18 api still target java 8 ?

#

or better question, why are you

summer scroll
#

I'm trying to add a support for version 1.16, 1.17, and 1.18

young knoll
#

You need to use java 17 if you want to use 1.18 NMS

summer scroll
#

It works on 1.17 for some reason

summer scroll
#

oh

#

i think i forgot to add mavenLocal() to the repo

stone sinew
young knoll
#

Afaik you will get an error saying NMS has been compiled by a more recent version

stone sinew
#

Well I can't get a plugin to work only built with the 1.18 spigot version so I can't test that. But I have no issues with my minions plug in using NMS on 1.18

summer scroll
#

are you using the remapped?

paper viper
#

you would need to use java 8 with reflection, or > java 17

#

which is super ass imo if u are going the reflection route

summer scroll
#

i'm fine using java 8 as the source and target

stone sinew
summer scroll
#

for some reason

#

i was receiving compile error tho

stone sinew
young knoll
#

Yeah, spigots new system

#

Definitely wasn’t Mojang

summer scroll
#

does someone know how to use the remapped-mojang on gradle?

stone sinew
paper viper
stone sinew
paper viper
#

Having a more independent library loading platform is arguably cleaner

stone sinew
untold prism
#

Hi, for a while now i was using NMS to do a "raycast" to get what the player is targeting it may be a block or entities, is there a way to do that with the official API

untold prism
#

ok thanks i'll see if it works like my old system

spiral light
#

how can i change something in the class: net.minecraft.world.level.levelgen.GeneratorSettingBase
if it is not present in Spigot-Server ?

fervent chasm
#

Excuse me, small problem, why does this give me an error?

String ssd1item = "STICK";
Material ssd1material = Material.matchMaterial(ssd1item);

Material.STICK is valid, but this doesn't?

spiral light
#

can you try getMaterial ?

fervent chasm
#

hmm, Ill try that

next fossil
#

Does spigot 1.18 still use DataWatcher? I keep getting sudden errors with importing it

#

"The method getDataWatcher() is undefined for the type EntityPlayer"

fervent chasm
grim ice
#

hm

grim ice
#

do you mean on runtime?

fervent chasm
spiral light
keen spindle
#

hey guys, I'm having some trouble making my very first mc plugin...

im getting an error which is
package org.bukkit.plugin.java does not exist
and a few more similar ones

i followed a tutorial in a website, and did exactly what they said

spiral light
#

i want to access the constructor of GeneratorSettingBase during runtime

spiral light
#

for that i need to change the constructor from private to public

grim ice
#

i was talking with the other guy

keen spindle
keen spindle
#

and i have the api/package

grim ice
#

do you have maven

keen spindle
#

no

eternal night
#

gradle ?

keen spindle
#

the tutorial didnt say anything about maven or gradle

ivory sleet
eternal night
#

sounds like a trash tutorial then

grim ice
#

do you have IntelliJ

keen spindle
#

welp

#

i have javadoc

grim ice
#

until you learn maven and how to use it, use IntelliJ's Minecraft Development Plugin

next fossil
#

Guys what do we use for NBT packet injection in 1.18?

spiral light
ivory sleet
#

the api? What api are we talking about

#

And no I’m not sure since I haven’t read the entire convo 😁

quaint mantle
#

is there anywhere explaining PacketPlayOutWorldParticles ?

spiral light
#

i try to add stuff to the WorldCreator- Spigot-API, for that i need to change some stuff in Spigot-Server: CraftServer.createWorld

ivory sleet
#

What stuff are you trying to add?

spiral light
keen spindle
#

should i download intelliJ instead?

ivory sleet
#

I mean if you’re trying to pr something maybe just make the constructor public?

#

Then let md review

spiral light
grim ice
ivory sleet
stone sinew
#

Why is --remapped only giving me a bootstrap jar?

ivory sleet
#

might actually belong to the implementation

spiral light
ivory sleet
#

Ah yeah makes sense

spiral light
#

and, is there a solution for missing nms-classes in Spigot-Server ?

quasi flint
#

ctrl c ctrl v

#

no clue tho

quaint mantle
#

Does any1 have a link where I can read about the public and private void thingys In Java. It’s something I rly don’t understand

quasi flint
#

so java in general

#

?learnjava

undone axleBOT
quaint mantle
#

Yes

#

Nice ty

stone sinew
quasi flint
#

void is return type

#

void does not return

#

int returns number

#

etc

keen spindle
digital rain
#

hello guys, i just wanted to ask how do i use the inventory.meta.Damageable, since this doesnt seem to decrease the item's durability

spiral light
#
Check for ItemMeta:
if(itemmeta instanceof Damageable)

Cast:
Damageable damageable = (Damageable)itemmeta;
-> Change dmg to what you want

Apply ItemMeta:
itemstack.setItemMeta(damageable)

something like this should work

digital rain
spiral light
#

yes

digital rain
#

okay thx

late sonnet
digital rain
#

however eclipse errors me

late sonnet
#

unless you are using a very old version... because since a specific build you can do this with the Damageable

late sonnet
digital rain
#

method .setItemMeta is undefined for type (Damageable) use (ItemMeta)

digital rain
#

anyways it working like this so im glad

late sonnet
# digital rain 1.16.5

then you need cast again.. this was fixed in 1.17 where you can set the Damageable in itemmeta

digital rain
#

is the build for 1.18 out?

late sonnet
digital rain
#

oh yeah cool :d

spiral light
#

@late sonnet is there a solution for missing nms-classes in Spigot-Server to create an PR which needs a class to have a public constructor from nms?

late sonnet
spiral light
#

yes, net.minecraft.world.level.levelgen.GeneratorSettingBase is not in the Spigot-Server-Repo located

late sonnet
spiral light
#

i want to create a PR for spigot

late sonnet
spiral light
#

ok good thank you

keen spindle
#

could anyone help me setup spigot using intellij

#

im super confused

quaint mantle
#

Search for the minecraft development in intellij plugins search bar

#

It will pretty much do everything for u

#

?learnjava when btw?

undone axleBOT
keen spindle
#

ok

keen spindle
pastel stag
#

anyone have an idea how to get a server's remote IP if it is not specified in server properties.yml

pastel stag
#

dont think so

quaint mantle
#

And it mostly localhost:25565

quaint mantle
pastel stag
#

yes... and i am developing a plugin.

#

Bukkit.getServer().getIp()
just gives you whatever is in server properties

#

is there a way other than fetching data from like a whatsmyip url to get remote IP built into spigot/bukkit api?

quaint mantle
pastel stag
#

emphasis on REMOTE ip

#

external, if you will

quaint mantle
#

Nah im not replying to the bottom part i dont even understand it šŸ˜‚

pastel stag
#

it seems like you didnt/dont understand any of my question...

pastel stag
#

rest?

mortal hare
#

A RESTful API is an architectural style for an application program interface (API) that uses HTTP requests to access and use data. That data can be used to GET, PUT, POST and DELETE data types, which refers to the reading, updating, creating and deleting of operations concerning resources.

#

basically fetch data from the web

pastel stag
#

i mean this is kind of the thing i was trying to avoid

#

is spigot not self-aware of its own external IP?

mortal hare
#

well you can do it via java

chrome beacon
#

Why do you need the server ip

pastel stag
#

I'm using it as a way to create a list of servers actively using the plugin i'm creating

eternal oxide
#

just add bstats

chrome beacon
#

^

pastel stag
#

bstats doesnt do that as far as i can tell

#

i have bstats implemented already

eternal oxide
#

it tells you anythign you want it to track

mortal hare
#

Microsoft adds Buy Now, Pay Later tool to make purchases and pay later. Users aren’t happy with it because it’s unnecessary and enables people to spend money they don’t have.

#

wtf Microsoft

#

you're going to make people go into debt

eternal oxide
#

it tells you number of servers running yrou plugin, no users, OS, server adn all sorts of other things as default

pastel stag
#

but in order for it to give you a list of servers running it you have to add functionality to it

eternal oxide
#

you won't get a list of servers, that would probably be illegal unless you have a licensing agreement with the users

pastel stag
#

and the server has to be self aware of it's own public ip in order to list that information regardless of if you are using bstats or making something from scratch, as i am, all im trying to figure out is 1) is spigot self aware of it's own public address and 2) what is the method built into the api to print that info to a string

pastel stag
eternal oxide
#

public address is nto easy to get in java, you have to check the gateway. Its easier to query a whatsmyip site

pastel stag
#

before it well, died, you used to be able to even search on a master website i believe for all servers running a particular plugin so if you only wanted to play on servers w/ specific functionality you could

eternal oxide
#

used to have, is probably the key sentence there

#

If I remember correctly mcstats required teh server owners to register their server on teh site before it displayed them

pastel stag
#

i'm not sure about that

eternal oxide
#

it would be quite illegal (in all of europe) to do it without asking.

#

GDPR and all that

pastel stag
#

but you definitely do not need exclusive permission or a license agreement from a user to log their IP, if that were the case then every single minecraft server in existence is already breaking said rules

#

as your IP is logged on join, same with most every website you have ever visited, most websites log user IP for analytical reasons

eternal oxide
#

Well I can;t comment on that, however I do remember we are not allowed to discuss legalities in here.

#

md spanked my ass a while back for doing so šŸ™‚

pastel stag
#

well as i said before thats not what i was interested in discussing anyways just wondering if anyone can shed some light on if there is a way to do it without scraping data from an external URL

#

if not then no biggy, i will just do it that way, i would just prefer not to use an external source if i dont have to

pastel stag
#

yeah this more or less says not possible in java

#

website scraping it is

quaint mantle
#

guys what is the ParticleEnum for the cool blood particle that plugins use

spiral light
quaint mantle
#

yes

spiral light
#

what is the context ? you wanne spawn particles with nms ?

quaint mantle
#

no i can spawn particles

#

but there is a problem

#

i have the BLOCK_CRACK particle

#

but how can i modify the particle data

#

when i send the packet, it has no param

spiral light
#

what version ?

quaint mantle
#

1.12.2

spiral light
#

in 1.18 you change a lot ... dont know about 1.12

eternal oxide
quaint mantle
quaint mantle
#

i want the BLOCK_CRACK particle, type REDSTONE_BLOCK to be sent with packet

eternal oxide
#

API to display block damage to a player

#

doesn;t need packets

quaint mantle
#

dude

#

i want to do it with packets

#

please help

#

and its not only that

eternal oxide
#

dude, use teh API if teh functionality is there

quaint mantle
#

REDSTONE packet

#

the dust color

#

stuff like it

#

and i want it to be configurable

#

so i do EnumParticle.valueOf(string)

eternal oxide
#

there is also a full particle API

quaint mantle
#

with nms ?

eternal oxide
#

API!!!

quaint mantle
#

the api is made with nms ?

#

im developing a plugin for a server and they asked me to to do it with packets

#

NOT BUKKIT

eternal oxide
#

Everything should be API first, NMS/Packets if there is absolutely no way to do it with the API.

quaint mantle
#

i want to play a particle to players in range of 15 blocks

#

and i need NMS for it

eternal oxide
#

no, you want NMS

#

there is a partacle API to play any particle you want

quaint mantle
#

optimized ?

eternal oxide
#

oh my

#

I give up

quaint mantle
#

they asked me to do it custom, and with nms & packets

#

and i need help in that

stone sinew
#
public class FileTesting {
    private static FileTesting instance;
    public static void main(String args[]) {
        instance = new FileTesting();
        
        File f = new File("."+File.separator+"file.yml");
        try {
            f.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
        try(InputStream inp = instance.getClass().getClassLoader().getResourceAsStream("file.yml")) {
            Files.copy(inp, f.toPath(), StandardCopyOption.REPLACE_EXISTING);
            inp.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }    
}
```Anyone know why this errors with `java.nio.file.FileSystemException: .\file.yml: The process cannot access the file because it is being used by another process.` I've asked a few times now but never got a solution.
spiral light
#

at which location does the exception throw ?

stone sinew
eternal oxide
#

is this for a plugin or just java?

stone sinew
#

I have a few programs that use this and they have no issues but all my new projects have issues with this.

eternal oxide
#

have you tried it without calling createNewFile()?

stone sinew
#

Even without it, it errors.

eternal oxide
#

are you sure its not yoru location thats bad?

#

well, does the file get created but empty?

stone sinew
#

Even in a folder on my desktop I have this issue.

eternal oxide
#

all I can suggest without opening an ide is get the classloader from your current instance not the object you create as instance

stone sinew
#

Tried with FileTesting.class same output

eternal oxide
#

You shoudl be able to static access teh ClassLoader directly

#

But I see no reason for teh file to be in use

stone sinew
stone sinew
eternal oxide
#

I'd not set your instance and instead use ClassLoader.

#

ClassLoader.getResource

stone sinew
#

Nope same error

eternal oxide
#

no clue and no ide open sorry

naive knoll
#

Can anyone help?
I have a problem because I have npc that worked on 1.17, but when I rewrote it to 1.18, the swimming position I set for him does not work. Has anything changed since 1.18 with item setting for entityplayer?

karmic grove
#

whats the player break block event

#

name

tardy delta
#

BlockBreakEvent?

visual tide
#

BlockBreakEvent?

tardy delta
sour parrot
#

Any one know any cape plugin?

#

Sorry

#

Wrong channel

visual tide
#

also capes arent serverside pretty sure

karmic grove
sour parrot
karmic grove
visual tide
sour parrot
visual tide
#

which is why only optifine users can see other's optifine capes

karmic grove
#

is there a playerblockbreakevent ?

#

im reading the docs and cant see it

eternal night
#

The plain block break event represents players breaking blocks

karmic grove
#

ok

#

ty

mighty pier
#

how do i get the current date? like "2021/12/01"

#

and then i can send it to a player

#

or something

#

idk

sour parrot
#

Idk but i use place holder time for my scoreboard

mighty pier
#

e

quartz valve
#

how can i set the durability of an item?

waxen plinth
#

Cast ItemMeta to Damageable

#

Set damage

#

Set item meta

#

Is it possible to construct an InventoryView?

karmic grove
#

so can someone explain in clearer terms how to register events im unsure what to put here

#

uh

#

the tuturial just said to....

#

how do you do that

#

bruuuu

waxen plinth
#

To do what

hasty prawn
#

Yeah don't use that if you don't know what it means @karmic grove. To register events you just provide your plugin instance and then the class instance that implements Listener.

karmic grove
#

so i do "mainpackagename.eventspackagename.eventsclassname"?

hasty prawn
#

I wouldn't say that using reflection is a simple concept beginners should know how to use PauseChamp

karmic grove
#

like this?

visual tide
#

what's your event class called

hasty prawn
#

Registering events manually doesn't require NMS though

visual tide
#

and it's simpler to normally register events than reflection

karmic grove
hasty prawn
#

Thonk I don't see how that has anything to do with what we're talking about but ok

#

It's 1 line...

visual tide
#

yeah but when you get to the stage where that is messy you might as well turn to lombok to have everything done by gradle so it's slightly more readable

karmic grove
ivory sleet
#

How is it messy?

#

It’s as explicit as it can be, if you understand the spigot api.

#

Everything but messy.

#

That’s not messy, that just long.

#

What

hasty prawn
#

You probably shouldn't have 30 different listener classes anyways unless your plugin is just massive

ivory sleet
#

Lol it takes like 10 seconds

#

That’s a you-problem

#

If you hate that so much, create an abstraction of it

#

Exactly

#

But don’t come here and complain over proper api

#

because if you use reflections or something then you’ve coupled the shit out of your code

#

Your code becomes messy if you use something like completely automated registration where you use reflections and not talking about reflection, as I hope you understand they’re different.

hasty prawn
#

reflections is british 5Head

ivory sleet
#

And a library

visual tide
#

isnt reflections just lib to make reflection easier

ivory sleet
#

It is a runtime library

#

Though it doesn’t exactly replace the functionality of Java’s reflection, moreover just adds a bit to it I think

#

Haven’t ever had a need to use it

frail gale
#

hey guys i have a little bit of a problem in my plugin custom config playerdata.yml file so 1.I have made a custom config yml file especially just to store data for players. 2.So i have a command called /arms which first check if the player UUID is not already in the config file so if it's not the player UUID goes in the config.yml file with also some text i also have another command called /nv which also first check if the player UUID is not already in the config file so if it's not it sets the UUID + different text but it removes the other UUID line which makes data loss so it replaces actually the line which i don't want. and there is the problem if there is something which i can make so everytime it will be placed on another line not on the same

#

if you want i can also provide a some code

ivory sleet
#

Code thanks

eternal oxide
#

use a map under each UUID not a single entry

frail gale
#

@ivory sleet no problem i will provide some code right now

ivory sleet
#

But yeah what Elgar said is something very reasonable as it allows you to dynamically keep track of more players or less for that part.

quaint mantle
#

hey my spark report shows method for 20%, but when i open it I see only for 4%, how to analyze it properly?

red sedge
#

how do I make a entity invisible to a player

frail gale
quaint mantle
ivory sleet
#

Yeah

frail gale
#

also this is enable and disable command that's why i use to check if the player is already in the data file cause if it's not it's gonna enable the command and gonna save the UUID in the data file. and then for disable i check if the UUID exists and if it is i just do config.set(UUID + "special text for the command")

quaint mantle
# ivory sleet Yeah

no i mean how do you want to check this, my profiler contains some mysterious things

lapis lark
#

Who can help? How to add buildtools to maven. buildtools created on another disc than default maven local repos folder. I am integested in nms 1.18

ivory sleet
#

Don’t you have a link?

quaint mantle
ivory sleet
#

Hmm yeah maybe, might wanna talk to the spark devs

quaint mantle
#

they werent so active last time, but thanks ā¤ļø

ivory sleet
#

Oh you already tried?

frail gale
#

so yeah i will try Map but what is the way where i can save the uuids then remove them

#

so im saying one player have enabled the commands his uuid is saved in the file other one disabled the command how i would remove the other player uuid

ivory sleet
#

Kinder do you load the configuration often?

eternal oxide
#

don;t use UUIDs as flags

#

they should be keys with data under them

mighty pier
#

how do i make fake players in the server list?

eternal oxide
#

if the player enables a command it shoudl be something like

32231-2131-2131-123
    enabled: true```
spiral light
grim ice
#

anyone has experience with android apps? just wondering

frail gale
#

so uuid and then key with enabled and boolean

ivory sleet
#

Oh kotlin then

grim ice
#

no, java

ivory sleet
#

;\

#

I mean I know the basics

grim ice
#

wait main language is kt now??

#

ffs

ivory sleet
#

Yeah

grim ice
#

i dont know kotlin

ivory sleet
#

Very pog

#

It’s quite similar to Java

#

So don’t worry

grim ice
#

the syntax is a whole different thing

#

i dont get a singe thing from it

ivory sleet
#

Yeah but the approach is similar in many cases

grim ice
#

why is kt better than java

mighty pier
ivory sleet
#

Depends on the definition of better

spiral light
mighty pier
#

ok

grim ice
#

why did google start using kt

#

im annoyed as fuck rn

ivory sleet
#

But it supports first class function objects, is null safe and has a lot of other cool features

grim ice
#

i have to learn a new language now, ffs

ivory sleet
#

Btw 2hex

#

I believe flutter is still an option

#

Although then you’d have to learn Dart which in some sense is similar to Java also

frail gale
#

@eternal oxide thanks that's very good example right now i understand at some point how i would do it i just need some research how to make a string list in config file i'm bad at config files xd

ivory sleet
#

That’s not a string list buddy

#

That’s a nested configuration section

grim ice
#

wa

grim ice
#

wtf is flutter

#

oh

#

that thing

#

another god damn language

frail gale
#

yeah im bad at configurations but thanks again

ivory sleet
#

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

#

Lol

grim ice
#

cant i just use java

frail gale
#

so i know what i need to research

ivory sleet
#

Hmm maybe if you could find a transpiler 2hex

#

Altho that has its disadvantages as well

grim ice
#

but like

#

i wont have anyone to get support from cuz every1 uses kotlin

#

its like using mac

#

everyone uses windows so u barely can get help

ivory sleet
#

Lol true

#

Yeah I mean is it really so bad learning kotlin?

grim ice
#

its learning a new language

#

and the syntax makes no sense to me

#

like literally 0 sense

spiral light
#

learning a new programming language is still better then a national language ^^

grim ice
#

guess ill look for a java -> kotlin tutorial

#

lets hope to find some1 who wont teach me how to install an ide

#

wait wtf

#

its so similar

#

oh wtf this is cool

#

sry for spam btw

#

but whats that

ivory sleet
#

The ** ?**

grim ice
#

the whole thing

ivory sleet
#

Null safety

grim ice
#

thats in java too

silent vigil
#

1.8

ivory sleet
#

Allow me to demonstrate
abc: String? = null
defc: String = null

The second variable cannot be declared to null as its type is null safe so a compiler error would yield

noble spire
#

Because vanillia whitelisting is weird - is it a terrible idea to implement a custom whitelist that kicks a player on join from the 'playeronjoin' event, if they're not whitelisted

#

I'm more asking about opinion as I can get it to work fine with normal whitelisting

#

however it'd be much neater / easier to do it the former method

onyx fjord
#

Bad idea

silent vigil
#

i dont have any choice tbh

#

is there any solution?

onyx fjord
#

You do have choice

#

I don't see what's wrong with using new api

karmic grove
#
Health health = player.getMaxHealth();
#

so this will store it as variable right

spiral light
karmic grove
#

what

#

oh

#

right

tardy delta
#

does anyone knows what PublicBukkitValues refers to?
nbt.PublicBukkitValues.*=alien_chestplate

#

inside a optifine properties file

silent vigil
noble spire
silent vigil
silent vigil
#

aka im coding and he is running the server

spiral light
#

but there are methods to disable newer-version-pvp ?

silent vigil
#

wait how?

spiral light
#

attackspeed, attackcooldown ... dont know exactly but its possible

noble spire
silent vigil
#

thank you so much

#

really appreciate it

late sonnet
tardy delta
#

oh yea that could be

stray lily
#

Hi, can someone reccomend me a good MurderMystery-Infection plugin?

tardy delta
#

but i saw nbt.worldcraft=blue boots and i'm wondering where optifine is getting those values from

spiral light
#

is it possible to link Methods in the doc of constructors and other Methods ?

tardy delta
#

you mean ({@link #someMethod})?

spiral light
#

yes

#

ahhhh i see... "#" it is

stray lily
#

i did

#

but no one answer

noble spire
#

okay but this is for development

gritty urchin
wicked lake
#

You could use a master/slave system, have the first block placed be designated a master block, and subsequent blocks that are placed next to it will check adjacent blocks for a master block. If it exists, then it adds itself to the master's data. Then all you need to do is query the master

#

Personally what I do for multiblock structures

vital sail
#

hello

wicked lake
#

bit more complicated than what I typed there but you get the idea

vital sail
#

hi

#

can someone help me with this

#
This can often occur if you are running a 32-bit system, or one with low RAM.
Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar --rev 1.17.1
wicked lake
#

Make sure your java installation is 64 bit and not 32 bit

fickle helm
#

I'm messing with nms stuff for the first time. This code works but intellij is complaining about raw use parameterised class.
How can I get intellij to shutup without suppressing the warning?

    private @NotNull SynchedEntityData cloneEntityData(@NotNull final SynchedEntityData other, final Entity nmsEntity) {
        final SynchedEntityData entityData = new SynchedEntityData(nmsEntity);
        if (other.getAll() == null) return entityData;
        
        for (SynchedEntityData.DataItem dataItem : other.getAll())
            entityData.define(dataItem.getAccessor(), dataItem.getValue());
        
        return entityData;
    }```
vital sail
#

why i can't send pictures?

#

do i need to verify?

ivory sleet
vital sail
#

ok

vital sail
#
This can often occur if you are running a 32-bit system, or one with low RAM.
Please re-run BuildTools with manually specified memory, e.g: java -Xmx1024M -jar BuildTools.jar --rev 1.17.1```
#

help please

fickle helm
#

if you mean changing for (SynchedEntityData.DataItem dataItem : other.getAll()) to for (SynchedEntityData.DataItem<?> dataItem : other.getAll())
that adds a new error

ivory sleet
#

Which is?

vital sail
#

oh nvm

#

it worked

fickle helm
#

when using ?

frail gale
#

guys I'm still thinking what im doing wrong i understand that i need to create config section i already created one and here are the things i just wanted to make the command to be enabled and disabled when typed two times here is the code: https://www.toptal.com/developers/hastebin/xoyezaqibu.swift

ivory sleet
#

Or if you can pass the type T instead of the wildcard

fickle helm
#

I can't, that is internal bukkit code

#
net.minecraft.network.syncher.SynchedEntityData public <T> void define(net.minecraft.network.syncher.EntityDataAccessor<T> datawatcherobject,
                       T t0```
ivory sleet
#

Hmm might wanna go with a raw type then

#

Since generics and type erasure are kind of ugh

indigo cave
#

naa

gritty urchin
ivory sleet
gritty urchin
#

@ivory sleet

ivory sleet
#

Sure its useful for inheritance but it can be really annoying n disastrous as well when working with nested types

ivory sleet
mortal hare
#

Is there any Difference between calling URLClassLoader.getResourceAsStream(#String) and JarFile.getInputStream(JarFile.getEntry(#JarEntry))

gritty urchin
#

but for some reason it recurs

#

and crashes the server

#

the arraylist just keeps increasing in size

#

and I don't know why

frail gale
quaint mantle
#

what packet is for changing a block with packets

#

PacketPlayOutBlockAction ?

young knoll
#

Why do you need a packet

silent vigil
quaint mantle
young knoll
#

Player.sendBlockChange

quaint mantle
#

depracated

young knoll
#

What

blazing scarab
quaint mantle
fickle helm
#

yeah I gave up with trying to get it to work and just suppressed the warning

quaint mantle
#

Any caffeine nerds here? It is possible to remove a value from async loading cache?

hoary pawn
#

Can anyone see why it does not register the cmd?

ivory sleet
#

Though personally I just use a normal loading cache

#

(Yes implementations of loading cache are actually expected to be thread safe)

quaint mantle
#

Ah? Fr?

#

I think ill use regular loading cache then

#

Since Async one does not have some methods

#

trying to do smort odvonced code and my project slowly becomes a mess...

young knoll
#

Why do they have an async one if they are all supposed to be thread safe

ivory sleet
#

It’s if you want to choose the executor for certain things

#

In which it might be able to negligibly optimize some stuff

gritty urchin
mortal hare
#

?paste

undone axleBOT
mortal hare
#

does anyone have any idea what does this piece of code do in PluginDescriptionFile?

#

it seems deprecated in a way

#

From my understanding it creates ThreadLocal object which holds YamlObject with custom parsing constructor added on top?

quaint mantle
mortal hare
#

It seems it uses Flags enum which is deprecated. It was used for encoding checks if i understand correctly

quaint mantle
#

You already got answered

brisk estuary
#

how could I make a sword that causes weakness on hit?

#

I already made a custom weakness effect, but idk where I must add it

gritty urchin
mortal hare
#
 new PluginAwareness(node) {
   {
      this.this$2 = this$2;
      this.val$node = node;
   }
}
#

ah yes

#

decompilation quirks

#

it instanciates the interface

#

this must be how values are being passed to anonymous classes

mortal hare
quaint mantle
#

What are you trying to do

mortal hare
#

nothing

#

just reverse engineering

gritty urchin
#

How do I get nether portal size (min and max) from 1 portal block?

fickle helm
mortal hare
#

iirc spawners have nbt tag for that

#

idk if that's useful for you

fickle helm
#

well basically I'm replicating spawner behavior from scratch and wondering how that delay comes into play

onyx fjord
#

Take a look at spawner upgrade plugins i guess

mortal hare
#

this.name = this.rawName = map.get("name").toString();

#

hey

#

i didnt knew you can do that

#

2 vars initialized to the same function return value

ivory sleet
#

Yuh

mortal hare
#

it should return init value in boolean clauses too

#

right?

#

you can do something like if (this.name = map.get("name") == null) {}

#

right?

ivory sleet
#

might have to emphasize on the boolean expression
this.name = (map.get("name") == null)

quaint mantle
# fickle helm anyone know how a CreatureSpawner's utilizes the delay setting (<https://hub.spi...

Ticks until next spawn. If 0, it will spawn immediately when a player enters its range. If set to -1 (this state never occurs in a natural spawner; it seems to be a feature accessed only via NBT editing), the spawner will reset its Delay, and (if SpawnPotentials exist) EntityID and SpawnData as though it had just completed a successful spawn cycle, immediately when a player enters its range. Note that setting Delay to -1 can be useful if you want the game to properly randomize the spawner's Delay, EntityID, and SpawnData, rather than starting with pre-defined values.

ivory sleet
#

but yeah

fickle helm
#

actually I found the bukkit code which references it so was just reading thru that

tardy delta
#

does anyone knows if custommodeldata has to be unique for the server or if it's per material?

#

second one seems more logically

quaint mantle
#

Per material

tardy delta
#

just to avoid making mistakes šŸ˜„

grave mason
#

new nms ?

#

is there a list ?

tardy delta
#

@grave mason heh minetopia

grave mason
quaint mantle
tardy delta
#

which version?

grave mason
#

1.18

tardy delta
#

i don't even know version is the latest game release

#

oh

mortal hare
#

its stored inside NBT tags

young knoll
#

Per material

#

2 books with the same custom model data will have the same texture

tardy delta
#

yea but i mean to avoid confusing for the texturepack

#

alr thanks

hoary pawn
young knoll
#

The fact that it returns null implies it isn't actually in your plugin.yml

#

Are you sure the exported jar has the right plugin.yml

wicked lake
#

Or that the plugin.yml is in the correct location

ember estuary
#

I'm currently making a GUI and now i want to implement Hover-Functions for my elements. So for example you could specify, that on hover, the background-color and text of the object changes.

I thought of making it with a JavaScript kind of approach, where you just pass whatever should be done using an anonymous function. like

rectangleObject.addEventListener("hover", r => {
  r.setText(10);
  r.setBackgroundColor("red");
});

How would i do this "anonymous function passing" in Java?

ivory sleet
#

Yeah JavaScript has first class function support which can be "equivalent" to Java’s functional interfaces jep

spiral light
#

@ivory sleet is there a way to edit a patch
reason for this is that i made full documentation of my changes but already made the patch :?

young knoll
#

Wait functions get to fly first class

#

And I have to sit in economy

ivory sleet
#

Or like override instead of emend

spiral light
#

hmmm how ?

ivory sleet
#

Creating a new one which overrides what the previous patch did

young knoll
#

What are we patchin

abstract surge
#

hey how do i send a message to a player whitch is on an other bungee server

spiral light
spiral light
spiral light
abstract surge
#

yes

#

my enlish is not so good

young knoll
#

Ooh what are we adding to world creator

spiral light
abstract surge
spiral light
#

wrong link ^^

young knoll
#

Oh very nice

young knoll
#

Always good to get more worldgen API stuff

spiral light
young knoll
#

:p

spiral light
#

i wrote ~40K chars today

left swift
#

How can I get the texture from the player's head? i used reflection to get GameProfile, i have field profile but i don't know how to get to texture now

        SkullMeta headMeta = (SkullMeta) item.getItemMeta();
        Field profileField;
        try {
            profileField = headMeta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
        } catch (NoSuchFieldException | IllegalArgumentException exception) {
            exception.printStackTrace();
        }```
sullen marlin
#

--amend should do it

spiral light
#

at commit ?

sullen marlin
#

yes, git commit --amend

#

but I left some comments on your PR

#

they do need to be moved to Bukkit/CraftBukkit, so you may as well do that

#

it should be less complicated for you anyway

spiral light
young knoll
#

MD has passed judgement

spiral light
young knoll
#

This is true

ivory sleet
echo hound
#

Is this itembuilder good?

spiral light
#

its good enought for most things

echo hound
#

Okay thank u

young knoll
#

Looks alright

echo hound
#

I mean it says simple and it is simple

ivory sleet
#

Although should be said builder for ItemStack isn’t really necessary

#

As its in fact mutable and all

young knoll
#

Yes but one line

ivory sleet
#

I mean
itemStack.setX(); itemStack.setY();
lol

young knoll
#

😐

paper viper
#

ItemstackFactory

quaint mantle
#

ā˜¹ļø

ivory sleet
paper viper
#

lol

quaint mantle
#

BootstrapImpl

young knoll
#

Pull yourself up by the bootstrapimpl

spiral light
#

doesnt it need 2 forks now to add API stuff and then another for SERVER if i use Bukkit + Craftbukkit ? @ivory sleet

bitter ridge
#

Hey! I need with bit of reflection. I need these two methods in reflection. I think I got the first one but idk about the second one.

Thanks in advance!

young knoll
#

One for Bukkit and one for cb

sullen marlin
young knoll
#

Inb4 1.8

sullen marlin
#

no, it's people using reflection for API things that are crawling out of the 1.18 woodwork

young knoll
#

Oh? Why’s that

sullen marlin
#

because the methods are obfuscated when not using mojang maps

#

definitely an advantage šŸ˜‰

young knoll
#

Wasn’t that the case in 1.17

spiral light
#

what is an advantage ? using mojang maps or using API ?

young knoll
#

API is stable

#

And Mojang maps at least make things readable

sullen marlin
young knoll
#

Ah

#

You must learn to dive through the soup of A’s b’s and c’s if you don’t want to use mappings

sullen marlin
#

You must learn to use/make API

young knoll
#

I’ve found it’s easy for simple things

#

But some things are going to require a lot of work to APIify

bitter ridge
#

Can you send me link for that attribute api please?

young knoll
#

Item or entity

bitter ridge
#

it's a mob so entity

bitter ridge
#

tyty

left swift
spiral light
#

is it normal that a fork of craftbukkit has missing fields in other classes provided ? @ivory sleet

sullen marlin
#

wdym

spiral light
#

i made a craftbukkit fork and used git clone;
then i opend the project in intellij and now in CraftServer i have many errors about missing fields/methods

wild reef
#

Hey guys got a quick queston:
So I am trying to do a little "inventory animation" basically just adding some items and removing others in a loop. To make it look smoother I am delaying this process with Thread.sleep but it seems like the run() method ignores every Thread.sleep and restarts some seconds before the sleep is done.
Does anyone know how to actually tell the run method to wait?
My code:

sullen marlin
#

use ./applyPatches.sh

#

but easiest to let buildtools set it up for you

#

then just change the url to your fork

young knoll
undone axleBOT
young knoll
#

?scheduling

wild reef
# wild reef Hey guys got a quick queston: So I am trying to do a little "inventory animation...
@Override
            public void run() {
                for (int i = 0; i < 5; i++) {
                    ItemStack glass = new ItemStack(Material.GREEN_STAINED_GLASS);
                    ItemStack empty = new ItemStack(Material.AIR);
                    if (i == 0) {
                        inv.setItem(24, empty);
                    }
                    inv.setItem(20 + i, glass);
                    inv.setItem(20 + i - 1, empty);

                    long sleepDuration = 500;
                    try {
                        if (i == 4) {
                            Thread.sleep(sleepDuration);// msThread.sleep(sleepDuration);// ms
                            inv.setItem(20 + i, empty);
                            sleepDuration = 1500;
                        }
                        Thread.sleep(sleepDuration);// ms
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }

            }
young knoll
#

Why would you sleep in a runnable

#

That’s what repeating and delayed tasks are for

spiral light
wild reef
young knoll
#

Use a repeating one to have an animation

wild reef
#

That's how I start the runnable

#

So I basically do the same, but put the logic for the index and counting outside of it?

#

and just set items inside the runnable

#

if that's correct

young knoll
#

Pretty much

wild reef
#

okay, thank you!

wild reef
# young knoll Pretty much

final question, is it the correct way to have another runnable inside a top one?
Like one for repeating the whole process all over again and the inner one for waiting to place the new item?

young knoll
#

You should be able to get away with just 1

wild reef
#

I imagine it to work like this:

rootRunnable {

  clearItems();
  
  innerRunnable {
      setItem();
  } (shorter delay)  

}(some longer delay)

#

That's why it's a bit confusing for me rn to get it to work with one

eternal oxide
#

that would kill your server

#

every time the outer loop ran it would spawn a new runnable

#

if repeating

wild reef
#

yes, but is it still a problem when I kill the inner one when it's done?

eternal oxide
#

your inner task will not run before your outer

wild reef
#

I would kill the inner one after everyone, basically just a delayed action, the outer one would also be killed after the inv was closed

#

yes I know

#

I mean the outerRunnable is basically just a while(true) loop in my case with a delay

eternal oxide
#

ish

#

a repeating task

wild reef
#

yea

eternal oxide
#

if your inner is a straight task it could work.

#

just delayed it would fire once and end

young knoll
#

If you want it to get shorter each time just have an external integer that you change

wild reef
#

Alright thank you, cause I really have no idea rn how to go about it, not that much experience with it by now as you can see

young knoll
#

And you task will just count down said integer until it hits 0, then it’ll do the thing, and then it’ll set the integer again

wild reef
eternal oxide
#

no

#

an int inside the runnable but outside the run method

wild reef
#

ah okay

#

I put it outside of the runnable, that's why it didn't worked

#

sorry my fault

#

I will try a few things out, thanks for your help both of u

shy belfry
#

I need some help. I cannot for the life of me get the remapped jar to work with 1.18 is there something special you have to do when building Spigot? I run buildtools and then put the stuff md says to in my pom and it can't seem to resolve the remapped jar

young knoll
#

—remapped

sullen marlin
#

--remapped to buildtools

shy belfry
#

thank you

#

missed that part when speed reading

hollow spindle
#

Heyoo, I'm trying to store/retrieve item data from a SQL database. I managed to get the item's data to be serialized with enchantment data through the ItemStack#serialize() but how am I able to fetch that data back and restore it/create a new item out of it?

young knoll
#

Is there not a deserialize

hollow spindle
#

Oh there is, I didn't know it branched directly off the class

#

I'll give that a whirl

golden turret
#

use something like gson to convert the .serialize to json

#

and the json to map

#

to be used in the .deserialize

#

or you can use base64 for serialization and deserialization

young knoll
#

Same way you work with 1.17?

eternal oxide
#

jdk 16

#

doesn;t 1.18 require jdk 17?

young knoll
#

Only NMS

eternal oxide
#

k

young knoll
#

Anyway you can’t just add the jar anymore

#

Read the update post

twilit wharf
#

how do i teleport a armorstand with a 0 tick delay?

young knoll
#

Just teleport it?

twilit wharf
#

well

#

I get this weird delay

#

it is either slow packets

#

or a delay in the teleport

#

and I heard from another source that it is the delay, and I can just teleport it without that delay

twilit wharf
young knoll
#

Yeah that’s probably just delay

twilit wharf
#

so could I make the armorstand a passenger of the player?

young knoll
#

You could

twilit wharf
#

through Player.setPassenger(armorStand);?

#

but I dont think I can change the height in which the armor stand sits on the player

young knoll
#

Correct

#

You can sync it's position using packets

#

Not sure if that's any more accurate

twilit wharf
#

OnInventoryClick doesnt trigger

pastel stag
#

to check the value of whitelist=true/false in server.properties should you use Bukkit.getServer().hasWhitelist or Bukkit.getServer().isWhitelistEnforced

#

or is there a third completely different one

muted sand
#

How do I make it that blocks drop regardless of the item you're using?
Or something like, you need to use a shovel opposed to pickaxes to mine and receive ore drops

pastel stag
#

thanks homie

vagrant heron
#

Hey, I’m looking for a paid, working MobCoins plug-in 1.17. One searched but I can’t seem to find any, all other ones are outdated / broken

hasty prawn
muted sand
#

What are mappings and patches of minecraft? Or is that a java related thing that I should go learn more java for?

young knoll
#

Mappings translate the obfuscated methods and fields back into a readable format

#

Patches, you're gonna have to be more specific

sullen marlin
#

patches are edits of minecraft code

young knoll
#

Ah the NMS patches

iron tundra
#

I am trying to find where the usage of EntityPlayer got moved, before I just used import net.minecraft.server.level.EntityPlayer; to import it in. Perhaps I am not looking in the right place but if anyone knows what I should be using instead I would greatly appreciate the help.

muted sand
#

there's a few in NMS and then

young knoll
#

Yeah they are changes that are applied over minecraft code

muted sand
#

oh

young knoll
#

I am guessing you depend on the jar directly

sullen marlin
#

what is reading

iron tundra
#

Yeah I using the work around since I can't figure out the proper way

sullen marlin
#

like does anyone read this

worldly ingot
#

?

#

no

muted sand
#

what's reading

iron tundra
#

Yeah, I am using the correct bootstrap

sullen marlin
#

1.18 has really brought shoddy development practices to the fore

young knoll
#

TL;DR use gradle or maven

sullen marlin
#

you cant depend on the bootstrap jar

iron tundra
#

alright, I will figure out how to use maven

sullen marlin
#

'The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. '

iron tundra
#

I know, I am not using that

#

"You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar"

sullen marlin
#

well then idk what your issue is

#

why do you need NMS

#

what are you doing with EntityPlayer

iron tundra
#

I am using that instead of using maven

#

I am messing around with npc's and the method I found required usage of Entityplayer

native gale
#

I just wanna tell that md_5 is real magician. Never before I was able to update the server in just 1 day, it was the fastest update in the history of my server.

#

Oops, wrong channel, sorry

muted sand
#

lmfao

paper viper
#

no cause 1.8.8 😐

muted sand
#

How do I build my own server jar .-.
i remember discussing this but them /shrug

native gale
#

?buildtools

#

Ah

muted sand
#

--compile craftbukkit?

native gale
#

Just follow the instructions, step by step

quaint mantle
#

?bt

undone axleBOT
quaint mantle
#

same

muted sand
#

oh
how do I make my own edit to the files then compile it-

native gale
#

Why would you want to edit files?

muted sand
#

no reason, i just want to know how to (if it's possible)

young knoll
#

Make the edit in an IDE and then run maven install on the project

native gale
#

You really shouldn't, that's what plug-ins are for

quasi patrol
#

I hate when the placeholders I use for my plugin doesn’t support the offlineplayer type.

#

;(

muted sand
hollow spindle
#

What looks/feels better? Closing and reopening a new GUI or clear all existing content and replace it with new one? (Trying to create a Pagination component for the GUI system so I can't really test it out and see how it feels personally yet but it'd be nice to get some insight while im working on it)

quaint mantle
#

why not just open a new inventory without closing the previous šŸ¤”

hollow spindle
#

Yeah that's what I mean with the first part. (iirc) it has that little screen flicker of the gui closing then opening

#

Unless you mean I can open a new GUI and that'll just change the content smoothly?

quaint mantle
#

if you just call openInventory again it wont flicker

#

and its definitely smooth

hollow spindle
#

Ooooh interesting

#

okay that's cool, thanks!

#

It's very fast

fickle helm
#

is it an expensive operation at all to call Bukkit.getOnlinePlayers().size() to determine if anyone is on the server in a task that repeats often?
or would it be better to keep a variable that uses the PlayerJoinEvent to determine if anyone is on?

young knoll
#

Not really

#

The size of that collection should be cached anyway

quaint mantle
#

im storing player data in individual files, and for some reason setting things isnt seeming to work

#

after setting im calling .save(the file they have), then .load(the file they have)

#

what dont work?

quaint mantle
#

.set(path, value);

#

then saving it/reloading the file

#

idk what u talking so i'll gonna jump out the window

#

ok thanks for trying atleast

fickle helm
#

How can one spawn in a new entity with a specified SpawnReason? Do I have to use nms?

quaint mantle
#

anyone else?

#

u didnt even send code lol...

quaint mantle
#

then idk why is it isnt working

#

šŸ˜‘

#

the file dont have the new value?

#

or what kind of error

#

no error, the file has no new values

#

if i do /sethome, i get my home update message - but the file does not update

#

was previously this location, and still displays as this one

#

specifically, here's the code for setHome

#

Lang.prettyLoc works as expected

#

your get loads a new fileconfig every time

quaint mantle
#

how should i correct this

#

im not sure if FileConfiguration f; at the top, then specifying it would be any better?

#

Depends how you want to handle it

#

if you want to just instant save it's likely fine to save the get result in setHome and pass it into save

#

might be worth just caching the config in some class that you do uuid lookup for via some hashmap

quaint mantle
quaint mantle
#

im a FileConfiguration noob honestly

#

I'd do uuid > PlayerData or something if you plan to do more than just a home location

#

dont worry

#

im a skript user

#

then store the file in playerdata 🤷

#

🤔

#

or at least handle saving in that class

quaint mantle
#

the weird thing is that the file that I have in the /Users/ is fine? like it takes the information from there.. oddly enough

summer scroll
next fossil
#

I'm having a bit of trouble with creating NPCs in 1.18 with the EntityPlayer. The original method is:
EntityPlayer npc = new EntityPlayer(server, server.getWorldServer(), profile);

But the getWorldServer() methd is now obsolete, what do I use in replacement? I searched the EntityPlayer and MinecraftServer classes and others with a decompiler for Ecllipse, with only server.overworld() being another alternative but it doesn't work and the console just throws a MethodNotFound exception

young knoll
#

It’s obfuscated now

#

Use the Mojang remapped jar

wicked lake
#

Hey folks, any tips on how to make dataclasses serializable for saving and loading from the config?

#
  22537b13-6de5-4b56-8ef0-4428d4de86f5: !!me.wastashel.player.PlayerData
    level: 0
    race: Human
    skills:
      MechInvention: !!me.wastashel.player.skills.MechanicalInvention
        exp: 0
        level: 1
        maxLevel: 100
        name: MechInvention```
waxen plinth
#

Otherwise you can use standard serialization

#

Where you implement ConfigurationSerializable

#

Or is it ConfigSerializable?

wicked lake
#

Send me a link, I'll check out both and see what fits best for me :)

young knoll
wicked lake
#

Taking a look at that one now, just searching for some code examples

pastel stag
#

any way to add new things to server owner's existing configurations or do they have to delete their configuration in order to see new things you add? for example i have plugin version 1.0.1 which has 1 option in the config file, i push an update that adds 1 new option to the config for plugin version 1.0.2 for a total of 2 options. Is there a way that i can code new config lines in on startup and add them to version 1.0.1's config or do i need to delete me 1.0.1 config and let the updated plugin generate a fresh 1.0.2 config

eternal oxide
#

if you have no comments its easy

#

you load the resource (config) from your jar as defaults, then load their config and save

young knoll
#

You can just read the new config and add any missing entries to the old one

#

But yeah rip comments

pastel stag
#

when you say rip comments do you mean comments that the plugin creator has added into their default config file or do you mean any comments the server owner has put in themselves

eternal oxide
#

eg, This is how Bukkit does it java configuration = YamlConfiguration.loadConfiguration(getConfigFile()); configuration.options().copyDefaults(true); configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8))); saveConfig();

pastel stag
#

so like if i used comments in my config file when i made my plugin to tell someone how to use the file, those comments will be lost on implementing this method?

young knoll
#

Defaults are weird

eternal oxide
#

Only the header can be preserved

#

snake strips all comments upon save

pastel stag
#

hmmm

#

well shit

young knoll
#

We’ll get the new version soonā„¢ļø

fervent chasm
#

I have a PlayerCloseInventory event class like this:

public PlayerInventoryCloseListener(Main plugin) {
    this.plugin = plugin;     
    Bukkit.getPluginManager().registerEvents(this, plugin);
}
    
public void onPlayerInventoryClose(InventoryCloseEvent e) {
    e.getPlayer().sendMessage("Yes");
}

and i initiated it in the Main class like this:
new PlayerInventoryCloseListener(this);
but it just does not work. Like, it just doesn't send me any message when I close my inventory, or any gui

waxen plinth
#

You need @fresh templetHandler

eternal oxide
#

needs @fresh templethandler

waxen plinth
#

...

#

bruh

#

@EventHandler

#

Why does discord do that

molten hearth
#

Don't forget @fresh templethandler

waxen plinth
#

RIP even

fervent chasm
#

oh my god, I am so dumb

young knoll
#

There used to be an @Event

#

Wonder why they left

hybrid spoke
#

poor even guy

#

pinged 3 times

spare prism
#

Why does my code execute twice?
https://pastebin.com/DE6vhXeh
https://pastebin.com/i9WNPsTx

[08:58:45] [Server thread/INFO]: [null, null, null, null]
[08:58:45] [Server thread/INFO]: [null, ItemStack{DIAMOND_LEGGINGS x 1}, null, null]
[08:58:45] [Server thread/INFO]: PlayerArmorChangeEvent: player: EstrangedFury; armorType: LEGGINGS; armor: DIAMOND_LEGGINGS; armorAction: TAKE_OFF
[08:58:45] [Server thread/INFO]: PlayerArmorChangeEvent: player: EstrangedFury; armorType: LEGGINGS; armor: DIAMOND_LEGGINGS; armorAction: TAKE_OFF
young knoll
#

Is this a custom event

spare prism
#

yes

waxen plinth
#

Most likely the event is being fired twice

spare prism
waxen plinth
#

Okay so address it where you're firing the event

buoyant viper
#

does spigot support Brigadier instead of CommandExecutor

#

or would that need NMS

#

actually i wonder

#

?brigadier

#

no ok

eternal oxide
#

its safer to use CommandExecutor

#

CE is the API bridge. Using brigadier you are exposing yourself to breaking changes they make

sullen marlin
#

Also brigadier is pretty average

buoyant viper
buoyant viper
#

ex: Origins mod commands, wtf.

#

but thats a result of method chaining like that ig

brave goblet
#

Hey so I am busy making a plugin, I copied my listener class to a new plugin same mc version and spigot, But import com.mojang.authlib.GameProfile; gives me this problem Cannot resolve symbol 'mojang'
Both Pom.xml's are the same because I copied the working one to the new one. Here are both
Working
-https://pastebin.com/vbwAVRZS

Broken
-https://pastebin.com/YTf3mnk3

eternal oxide
#

com.mojang is in spigot not spigot-api

#

yoru other plugin must also have a manual jar import

brave goblet
#

but

#

oh

#

nvm

#

got it

native gale
#

Hello! I want my plugin to display ASCII art in chat, but I faced a problem

#

How do I learn how wide players chat is?

#

I mean, what is the safe width I can go for?

eternal oxide
#

there is no way to know the clients chat width

thorn merlin
#

How can i make a dispencer that will drop selected item for selected players ?

#

make plugin**

#

that drops **

eternal oxide