#help-development

1 messages · Page 1008 of 1

tardy delta
#

arrow functions and const 🐸

short drift
#

Honestly, I don't know any JavaScript.

#

The code is horrible.

#

But it works.

charred blaze
#

this isnt printing anything

remote swallow
#

use your own logger not bukkits

#

do you have essentials installed now also

charred blaze
short drift
charred blaze
#

i just want it to tell me to install economy provider

remote swallow
#

?paste the class and show your plugin list

undone axleBOT
broken nacelle
eternal oxide
charred blaze
charred blaze
short drift
# broken nacelle ?

Well, like I explained. You can use the web interface to create smileys and register them with MC.

eternal oxide
#

looks fine

short drift
#

On a live server.

lilac dagger
charred blaze
#

oh thats what you were meaning

eternal oxide
#

Fine level will nto show by default

remote swallow
eternal oxide
#

use INFO or WARNING

charred blaze
#

ill take info

short drift
#

It's a pretty fun nifty concept. You couldn't do that 8 years ago.

#

I had the idea yesterday and thought I'd try it out.

#

I also implemented some basic features like detecting whether the player's skin is wearing a hat or not.

charred blaze
#

it worked

short drift
#

That gets reflected in the chat avatar.

#

Then you hook it up with some macro detection in the chat like ":-)" and allow player's to register the gzipped base64 strings with the macros for their own avatar.

#

So the players can draw their own smileys and stuff for their characters.

#

And register them with a command with no support needed from resource pack.

#

Sans for the 8x8 grid of characters.

#

Which is always the same. You just color the pixels.

icy beacon
short drift
#

It would be better if the website had a layer you can draw on above your character. Then the graphics could be merged on top of your avatar in-game.

#

But it would be more work 🤔

dawn flower
#

how do i make "floating" item displays

vast ledge
#

Spawn them in the air

dawn flower
#

like undespawnable, unpickable dropped item

dawn flower
vast ledge
#

Theres item displays on 1.20

remote swallow
#

item displays dont have gravity

#

they can be spawned anywhere

dawn flower
#

im talking abt the go up go down thing

remote swallow
#

transformations?

dawn flower
#

that wont be as smooth

#

and its lag affected

lost matrix
#

Have you tried a display entity? Not sure if the Item entity has an animation when its being displayed by the EntityDisplay, but i doubt it.

eternal oxide
remote swallow
#

so figure out why its lagging

blazing ocean
#

then slowly increase ir every tick

dawn flower
#

ok

eternal oxide
#

to best match the floating effect you need to apply a sine curve to it

#

well I used Math.cos

lost matrix
#

At that point you might as well spawn an Item entity and set its gravity and pickup to false

eternal oxide
#

?paste

undone axleBOT
eternal oxide
worldly ingot
#

Probably the easiest way

young knoll
#

It does

teal oracle
#

how can i use hex colors?

tardy delta
#

my old approach probably still works

echo basalt
#

why do I feel like we all have that exact same class

civic sluice
teal oracle
tardy delta
#

type it over

#

Matcher::group is probably a thing

teal oracle
#

thanks :)

teal oracle
#

wouldnt something like this be faster?

public static String colorizeWithHex2(String input) {
        StringBuilder out = new StringBuilder("§x");
        for (int i = 0; i < 6; i++) {
            out.append("§").append(input.charAt(i));
        }
        return out.toString();
    }
``` im new to spigot development and java generally so i might be wrong but it seemed like the old one just returned the string with §'s in between each character
tardy delta
#

that § fuckery is awful to look at

#

and you still gotta figure out all hex pattern occurrences

teal oracle
#

wdym

remote swallow
teal oracle
#

well it good enough for me so im gonna use it cause im scared of regex

fallen scaffold
#

Does anyone know why the sources are missing in IntelliJ? I still encounter this issue even after removing the .lastUpdated files. I have also disabled all compiler plugins.

lilac dagger
#

go at maven

#

and click download sources

fallen scaffold
#

I did, nothing happens ;c

short drift
#

So, um. How do I ban someone indefinitely using the Spigot API?

#

There doesn't seem to be a permanent option.

tardy delta
#

theres a player name ban and ip ban

#

maybe you can combine them too

eternal oxide
#

duration - how long the ban last, or null to imply forever

short drift
#

Well, yes. But all the addBan methods come with duration etc and none of them accept null.

worldly ingot
#

:p use null

tardy delta
#

they do?

worldly ingot
#

They're nullable arguments

short drift
remote swallow
#

cast the date null to date

short drift
#

Errors out on null.

eternal oxide
remote swallow
#

cast it to date

worldly ingot
#

It's because it's ambiguous

#

You have to cast it to either Date or Instant

short drift
#

Cast a null to Date?!? Java is insane.

worldly ingot
#

Date I think is the direct one

#

Yes

pseudo hazel
#

probably some overload stuff

worldly ingot
#

It's to avoid ambiguity because that could apply to either of the two methods

tardy delta
#

those calls are ambiguous

worldly ingot
#

Which method do you use when the signatures match? :p

short drift
#

This would never fly in C# where I'm from.

#

People would burn you as a witch.

tardy delta
#

?

short drift
#

(Casting null to a type as an API requirement).

fallen scaffold
lilac dagger
#

use the spigot api

#

and not build tools one

fallen scaffold
lilac dagger
#

i think you have to generate sources for build tools

tardy delta
#

just do double shift and type download sources

short drift
#

Using null seems to have done the trick. But now I have a problem. The duration is now shown as "never", which seems to be hard coded.

lilac dagger
#

this is so weird

#

it works for me

fallen scaffold
fallen scaffold
#

I create a new Project, it download something, but the same error:

lilac dagger
#

try reinstalling intellij

#

or invalidate caches

#

altho i don't think this counts as a cache

teal oracle
#

why does intellij crash every 10th second

lilac dagger
#

oh, maybe delete your local repo

#

or rename it at least

wet breach
lilac dagger
fallen scaffold
teal oracle
#

yes

lilac dagger
#

if you don't download sources you'll get crashes 😄

#

i've found this too the hard way

lilac dagger
#

probably why shiro wants sources too

teal oracle
#

or well it doesnt crash it just turns the cpu up too like 100% suddenly and then i crash it myself

lilac dagger
#

well, that sounds exactly like material crash

wet breach
#

just give it more resources

lilac dagger
#

material class is very long and intelijj's decompiler sucks

#

i mean it's a great decompiler

#

but not compared to material

fallen scaffold
wet breach
#

shame it doesn't show you compiled code

lilac dagger
#

maybe you're using jdk 17 for jdk 21 version @fallen scaffold

wet breach
#

NB does

tardy delta
#

download sources?

#

netbeans user spotted?

lilac dagger
#

why are you a netbean user for wanting the source?

#

why wouldn't i like sources and documentation on the api?

#

inside my project

tardy delta
#

cuz javadocs and general knowledge?

lilac dagger
#

you can't beat having the sources right under your nose

tardy delta
#

sources dont have a fuzzy finder, javadocs do

lilac dagger
#

it's one method click away from finding exactly what a method does

#

oh sure

#

for that i was javadocs

#

but where i can i just find the library and manually scour it for what i think i need

#

it's closer than java docs

wet breach
#

so is md 🙂

#

also, not sure why sources are an issue here when buildtools give you them

eternal oxide
#

BT has never created sources jar for me

#

it creates teh files, but no jar ever

fallen scaffold
wet breach
#

it does have the compiled classes that you can package yourself

lilac dagger
wet breach
#

and this ^

eternal oxide
wet breach
#

it is all you need

eternal oxide
#

yep, its just a pain to make a jar and add to maven

lilac dagger
#

i think it has a flag for packaging too, not sure

wet breach
#

or you can just point the source directory

#

if your IDE was good enough

lilac dagger
#

just use spigot api and click download sources

#

it's all you get sources for anyway

#

or need realistically

wet breach
#

unless you need NMS stuff

lilac dagger
#

i guess, but i was the remaps so not very helpful there i bet

fallen scaffold
#

I try to download all again

carmine mica
fallen scaffold
slender elbow
#

that's not what machine was talking about

#

did you follow Fr33styler's suggestion?

fallen scaffold
slender elbow
#

simply depending on the spigot-api artifact and clicking the download sources button

slender elbow
#

restart intellij, should fix itself, or maybe hit the choose sources button and point it to the downloaded file (it should be next to wherever it opens the explorer)

fallen scaffold
green prism
#

How can I create a 5-rows chest inventory?

#

45 doesn't really work

lilac dagger
#

why not?

dire marsh
#

what does "doesn't really work" mean

lilac dagger
#

5 row chest is glitchy

green prism
lilac dagger
#

you're creating the inventory wrong

#

i think

slender elbow
#

and, well

#

i ran out of ideas besides "it works on my machine"

lilac dagger
#

Bukkit.createInventory(null, 45, "Test")

#

try this

#

yeah, the title can't be null

#

and using the inventory holder is usually misused

tardy delta
#

TILEENTITY?

lilac dagger
#

click on the error

#

let us see which error you're getting

fallen scaffold
#

Its the error commes when download resouce from the jar itself:

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#416,DefaultDispatcher-worker-34,5,main] 1779701858 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#78,AWT-EventQueue-0,6,main] 1134316415
    at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
    at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:129)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:908)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.checkAvailability(DirectoryIndexImpl.java:145)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getOrderEntries(DirectoryIndexImpl.java:129)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getOrderEntriesForFile(ProjectFileIndexImpl.java:108)
    at org.jetbrains.idea.maven.utils.MavenAttachSourcesProvider.getMavenProjects(MavenAttachSourcesProvider.kt:138)
    at org.jetbrains.idea.maven.utils.MavenAttachSourcesProvider.access$getMavenProjects(MavenAttachSourcesProvider.kt:31)
    at org.jetbrains.idea.maven.utils.MavenAttachSourcesProvider$getActions$1$perform$1.invokeSuspend(MavenAttachSourcesProvider.kt:47)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
lilac dagger
#

you have read only

#

where are your projects located?

fallen scaffold
#

the project is local on my machine

lilac dagger
#

okay, but where?

#

because it seems like it's in a permission area or it has read only flag

fallen scaffold
#

let me see

slender elbow
#

might be something inside the project's .idea

#

wouldn't know which file exactly

fallen scaffold
#

Hmm. the mark means write protection. But i don´t think thats the problem

lilac dagger
#

probably not

wet breach
#

seems the write protection is the issue

#

probably would had helped if you visited the link the error gave you

sharp heart
#

Hello, do someone know how to play animation with packets (eat, drink, use bow... etc) ?

tardy delta
#

player action 0x21? doubt it tho

fallen scaffold
sharp heart
tardy delta
#

dunno, could be useful looking at wiki.vg

sharp heart
tardy delta
#

could be that some things are client side too

tepid flicker
#

anyone know how I would go about making a custom crops/plant plugin? I have been trying for while now and theres always errors.

tacit arrow
gentle inlet
#

?paste

undone axleBOT
chrome beacon
charred blaze
#

how do i make some entity sit on me? (player)

#

player.getPassengers().add(display);

#

i have tried this

eternal night
#

read the javadocs on that method

lilac dagger
#

you can't add

eternal night
#

The returned list will not be directly linked to the entity's current passengers, and no guarantees are made as to its mutability.

#

specifically ^

#

and then use Entity#addPassanger

charred blaze
#

oh ok

#

ItemDisplay display = location.getWorld().spawn(location, ItemDisplay.class);
player.addPassenger(display);

#

this doesnt work?

inner mulch
#

This allows you to save data to blocks

icy beacon
#

ocp ocp

inner mulch
#

😔

polar forge
#

Guys no WorldEdit for Spigot?

eager turtle
#

After running some tests it does appear that Entity.damage() does account for armor!

tardy delta
#

indeed

#

wait

#

thought you said doesnt

eager turtle
#

no it does now

#

at least in 1.20.6

#

i remember it used to not

pliant topaz
polar forge
pliant topaz
#

first google search

#

As Paper builds upon Spigot and Spigot upon Bukkit, Bukkit plugins are compatible with Spigot and Paper, Spigot plugins with paper

eager turtle
#

bukkit/spigot same thing

tardy delta
#

^

eager turtle
#

is there a way I can attach a custom Enum to an event i trigger in my code?

#

or even just a number

#

then get that later

eager turtle
#

nvm just gonna use a wrapper for the event

#

unless theres a way lol

polar forge
#

Hey guys

#

So I get Bozo was last seen on blah blah, but he never joined the server

#

Here’s where I code for this

#

I would like to remove the Was Last seen on

#

And put that only if a player was fr seen on a date

chrome beacon
#

well.. just check if they've played before

polar forge
#

That’s what I coded

#

if (!target.hasPlayedBefore)

chrome beacon
#

yeah I know it's in your code

#

but the logic isn't quite right

#

You don't want to send last seen when they haven't played before

polar forge
#

Yea

#

Only that Bozo was never seen on this server

polar forge
#

Should I remove it from the brackets of the command?

#

I don’t understand

chrome beacon
#

Just don't send the message if they haven't played before

merry cove
#

Is there some manual for nms for dummies? I have been making pluginhs for a few years but havn't touched nms yet. wanted to mess a bit with path goals etc with mobs, but am a bit confused on how I compile or "finailize" the plugin for use?

#

someone said I use a different compiler for it which confused me.

celest nacelle
#

Hello, how do I give a phantom gravity so it falls out the sky?

inner mulch
#
  1. set its velocity to go down
  2. calc nearest block down and teleport it
  3. set a really high amount of levitation (not sure how mcuh exactly) and it will levitate in the opposite
dawn flower
#

why is it that if i use streams for admin-only messages, it doesn't send it but if i use for loops it sends it

Bukkit.getOnlinePlayers().stream()
  .filter(player -> player.hasPermission("plugins.alert"))
  .forEach(player -> player.sendMessage(...);```

it used to work with for loops
tardy delta
#

should work

dawn flower
#

nope

rapid vigil
dawn flower
#

im pretty sure it'll work cuz i tried it afew minutes ago but i'll try again

tardy delta
#

show the for loop

wooden frost
#

Can anyone please give a good tutorial on how to add custom enchants 1.20+ (sorry if repeating myself :( )

rapid vigil
wooden frost
dawn flower
#

oh wait my dumbass was doing !player.hasPermission(...) in the for loop before and forgot to give owner rank the permission

rapid vigil
clear elm
#

is there a vault discord

dawn flower
#

speaking of that, how do u give ranks full perms

#

* just gives me some perms but not all

rapid vigil
#

if you want to give all perms, you should preferably op them

tardy delta
#

iirc * has never had any semantic meaning

#

yes

rough ibex
#

mhmmm

#

* is a bad idea

#

lucko has said stuff against it at some point

wooden frost
dawn flower
dawn flower
#

if u register one it shows up pretty sure

rapid vigil
dawn flower
#

otherwise there wouldnt be a single reason to register an enchant vs use pdc

dawn flower
#

why

#

its only for owner 🤷‍♂️

remote swallow
#

some plugins have features eg as disabling a feature. by giving that permission you might be accidentally disabling a feature

dawn flower
#

ah

stoic summit
#

anyone could help me compiling

#

a src of plugin

#

or can compile it for me

lilac dagger
#

but it's not that hard

stoic summit
#

i asked 9 people

lilac dagger
#

😄

stoic summit
#

they denied

#

:(

lilac dagger
#

try eclipse

stoic summit
#

actually

lilac dagger
#

it's easier to compile

stoic summit
#

idk anything

#

about these

#

im just a fresher

#

;=;

lilac dagger
#

i started coding with eclipse from scratch

#

it's possible

stoic summit
#

can u compile it for me

stoic summit
#

;=;

#

saturn

trim scarab
#

Hi @dreamy sleet

stoic summit
#

;-;

chrome beacon
#

Just buy the plugin

stoic summit
#

?

trim scarab
stoic summit
#

where

stoic summit
#

:)

#

;-;

quiet ice
stoic summit
#

;=-;

slender elbow
#

Doctor Java

stoic summit
#

;-;

lilac dagger
#

you don't need to set up a jdk

#

you just export as jar or something like that

#

and you're mostly good to go

chrome beacon
#

Intellij can do that too

quiet ice
#

I suppose so, but IJ should automatically download a JDK on first start

chrome beacon
#

^^

lilac dagger
#

i don't remember this

#

i just set my own

quiet ice
#

Well I remember this because in the IJ flatpak it's impossible to bring your own JDK

dawn flower
quiet ice
dawn flower
#

windows 95 ui looks more modern than eclipse

#

oh wait eclipse is here cough

#

how do i get the plugin that owns the command from this Bukkit.getCommandMap().getCommand(command)

dawn flower
#

also i noticed that even if you remove commands from PlayerCommandSendEvent and someone tries to execute it, it still executes

lilac dagger
#

but i guess intellij looks modern too

dawn flower
#

which means with a simple bruteforcer with all popular plugins it could theoratically get bruteforced

dawn flower
#

at least it doesnt pop up with bs "CoPiLoT" every second

lilac dagger
#

people here use eclipse

#

like choco

#

nothing wrong with it

remote swallow
#

coll uses it too

stoic summit
dawn flower
#

nothing's wrong but intellij looks more modern

#

(in terms of design)

lilac dagger
#

i can, but if it's premium plugin i won't @stoic summit

quiet ice
dawn flower
#

why tho

quiet ice
dawn flower
#

how tf do u even manage to get the source code of a premium plugin (stolen) but cant compile it

quiet ice
dawn flower
#

then compile it for him

quiet ice
#

Bruh, as if I'm gonna run gradle buildscripts I am unfamilliar with

dawn flower
#

dawg

#

u can get hacked from compiling?

quiet ice
#

yes

dawn flower
#

cough

#

i think im screwed

#

how tho? during the compilation process it doesn't run the file

quiet ice
#

I could verify the wrapper or install gradle manually, but I ain't gonna do that

dawn flower
#

if i do it through intellij would it be safe

quiet ice
#

Doesn't IJ warn you of this when importing gradle projects?

lilac dagger
#

this is so weird about gradle

dawn flower
#

idk

lilac dagger
#

the tools are so dangerous, maven is so much more safe

valid basin
#

How can I inject user data into my plugin when a customer downloads it?

dawn flower
#

who even doesnt compile their stuff and give it to people

valid basin
#

I see some plugins doing it

dawn flower
quiet ice
dawn flower
#

use bStats

quiet ice
dawn flower
#

legal way to spy on ur customers

#

oh wait

valid basin
dawn flower
#

ah

#

im pretty sure bStats gives u that info

slender elbow
#

the exact same problem exists with maven fwiw

dawn flower
#

but bStats can be disabled, ur better off just DMCA takedown all leaked resources

quiet ice
#

Don't have any. Kinda pointless under gradle as it bricks every few weeks. Where as maven does not

slender elbow
#

gradle bricks?

#

that's news to me

quiet ice
#

Well gradle 7 won't compile gradle 8 projects, and so on and so forth

valid basin
slender elbow
#

not strictly true but sure

valid basin
#

bstats don't have that feature

dawn flower
#

tfdym user id

valid basin
#

I'd make a license system if it was allowed but it's against spigotmc rules

eternal night
#

gradle 8 was released two full years after gradle 7 KEKW

valid basin
eternal night
#

idk I mean, if you are worried about gradle wrapper binary being compromised, they have a sha256 hash endpoint

quiet ice
#

well there are also java compatibility considerations and more

valid basin
#

last numbers are user id

dawn flower
#

yeah ic

quiet ice
eternal night
#

Right

#

smhduck mb mb

dawn flower
#

if they have the jar file they can just reverse engineer it (they all do), you could also do a discord thingi with /verify <userid> and if ur verified u download the plugin from there (not sure if spigot would like that)

#

this way u could have all user ids that own ur plugin

lilac dagger
valid basin
#

appreciate it bro

valid basin
slender elbow
valid basin
#

As u said DMCA probably works the best

quiet ice
remote swallow
eternal night
#

I did

#

I saw pineapple

quiet ice
#

(this is also the reason I will almost instantly accept PRs to most of my repos if they LGTM)

eternal night
#

I left

slender elbow
#

pineapply

remote swallow
#

smh

eternal night
#

new version of apply patches

young knoll
#

Them pineapple nerds can’t figure stuff out themselves? Smh

remote swallow
#

i just wanna have a normal shadow jar task time

eternal night
#

but nah, I have not run into that issue so I didn't have any comment

#

give --debug a go

#

it should publish a report with like, timings split up

remote swallow
#

it looks like its a load of aquiring and releasing workers

slender elbow
#

you mean --build-scan?

dawn flower
#

how do i remake hypixel skyblock in one line of code

eternal night
#

whatever the one is that sends your personal data to gradle

lilac dagger
#

executeImagination();

dawn flower
#

thanks

#

no way i just made hypickle skyblock

remote swallow
#

running with -d and looking at shadow jar i get

GRADLE SHADOW STATS

Total Jars: 63 (includes project)
Total Time: 5.072s [5072ms]
Average Time/Jar: 0.0805079365079s [80.5079365079ms]
*******************```
young knoll
#

Have you tried asking nicely for it to go faster

remote swallow
#

yeah

young knoll
#

63 jars?

remote swallow
#

i even gave it 8gb of ram

young knoll
#

Das a lot of jars

remote swallow
young knoll
#

Ayo wtf

#

Packing half of maven central in to that thing

remote swallow
#

nah

#

got have my logging

#

and my annotations

#

and my discord

#

and my guava and gson

#

and kotlin logging

#

and my optons

#

and my exposed

quiet ice
#

just compileOnly guava and gson, it's already included in minecraft \s

remote swallow
#

this isnt minecraft

#

is /s sarcasm or serious

slender elbow
#

software that isn't Minecraft?

young knoll
#

wtf is it exposed

slender elbow
#

impossible

remote swallow
#

i havent pushed in 6 months but hey ho

quiet ice
remote swallow
#

i could actually do that

#

would def make me build quicker

young knoll
#

What would one even program in java that isn’t Minecraft related

#

Insanity

remote swallow
#

bot

quiet ice
young knoll
#

Epic is the one programming those 18+ discord spam bots

#

I knew it

wintry elk
#

how would you spawn vex's that dont attack you but attack others?

young knoll
#

Add a pdc tag or use some kind of map to save who they shouldn’t attack

#

And then cancel the target event

worthy yarrow
remote swallow
#

its just a general purpose bot

#

that will only advertise to coll

wraith cliff
#

Is it just me that my IDE does not correctly index certain bukkit classes in the latest version (1.20.6)? Does anyone know how to fix this?

#

I'm using Intellij

remote swallow
#

update

wraith cliff
#

Intellij?

remote swallow
#

yeah

wraith cliff
#

it worked

#

thanks

dawn flower
#

what's a sound similar to laughing

#

oh wait witch laughing

rare rover
#

what's the best way to make a custom breaking system for client side blocks

#

i found a forum but its outdated

#

i got a system working but its janky

dawn flower
#

how do i spawn a frozen arrow

young knoll
#

What’s a frozen arrow

ornate heron
#

wdym by spawn

dawn flower
#

uh

#

an arrow with no movement

#

no gravity, no nothing

#

just exists

inner mulch
#

set velocity to nothing and setGravity(false)

young knoll
#

^

#

You’ll have to mess with the rotation as well

dawn flower
#

ah

#

by nothing u mean null or all zeros velocity

young knoll
#

All 0s

dawn flower
#

how do i get the hand position

vast ledge
#

explain the "hand position"

dawn flower
#

i want the x, y, z of this thing

#

just like "eye position"

vast ledge
#

I dont thnk you can get that..

#

Animations are handled Client side

dawn flower
#

not the animation

#

i just want the position of the hand

young knoll
#

You can approximate it with some maths

dawn flower
#

what part does getLocation give u

young knoll
#

Since you know where the eyes are and which way the player is facing

vast ledge
young knoll
#

getLocation is the bottom of the hitbox

quaint mantle
#

How can Arrays.asList(player.getInventory().getContents()) be throwing an NPE when getContents specifys the return value as NotNull

eternal oxide
#

paste teh actual error

quaint mantle
# eternal oxide paste teh actual error

[21:15:17 ERROR]: Could not pass event InventoryClickEvent to Plugin v2.01
java.lang.NullPointerException: Cannot invoke "java.util.List.set(int, Object)" because "this.items" is null

#

stacktrace doesn't have relevent info besides the Arrays.asList call

eternal oxide
#

?paste teh full stacktrace

undone axleBOT
quaint mantle
#

I'm not sure what info that will provide you with

eternal oxide
#

KitEditor.java:99

quaint mantle
eternal oxide
#

the code you posted is not throwing an NPE. wherever you access this.items is

#

this.items is not in the code you posted

quaint mantle
#

im sped

#

lmfao

#

I was thinking this.items was in the internal PlayerInventory

#

🤣

#

my faul

eternal oxide
#

np

ornate heron
#

When you're making a mini game, how do you handle multiple instances of the map? Do you make separate worlds, or paste the map multiple times within one world? Or do you make a "virtual world" which is not even a real world file?

eternal oxide
#

It depends

#

on teh size of yoru game

#

loading and unloading worlds is costly, soyou want to avoid it if at all possible

#

spreading out instances in a world is a good way to avoid that.

#

slowly restore an area after the game is finshed.

#

once done you flag it as available for the next game

ornate heron
#

could be like a duels arena, or like skywars

languid trout
#

does anyone have a list or resource for changes coming in 1.21?

#

from a plugin dev perspective

wet breach
fluid cypress
#

im having problems including a library and chatgpt literally told me to go ask to a gradle community. im trying to parse json, im using the kotlin-xserialization-json library, but apparently its not being shadowed into the final jar for some reason, even tho it is doing it for some other dependencies. im doing it in kotlin btw, idk if that matters. there is no output if i do theplugin.jar -tf | grep serialization. this is the build.gradle.kts file

#

the error is java.lang.NoClassDefFoundError: kotlinx/serialization/json/Json in case i wasnt clear

drifting ice
#

why do all CombatLogX addons say " Jar does not contain plugin.yml"

#

when i try to load my server, all of the extra addons i added to the server just dont load

#

combatlogx works fine

carmine mica
#

I'm guessing they aren't supposed to be loaded as plugins, but through some other system specific to combatlogx

drifting ice
#

it didnt work when i tried recreating the "expansions" folder and putting the plugins in

#

never mind im just stupid

wintry elk
#

how can i specify which potion for this recipe

unique shuttle
#

Hello! I would like to know if there is any change in PersistentDataContainer in version 1.20.6.

I have a problem in that in this method where I return an ItemStack, I assign a value to the key "entity_type". I assign the value "pig", so in that broadcast that says "saved value:", it has the value "pig", but then when I check the value again in the place where I call that method, it returns null. Do you know why this happens? I am also including the getStringData method for you to see. Thank you :)

#

It's pseudocode of what happens, it's not the actual code, which is why there isn't a PersistentDataContainer.set after getting the PersistentDataContainer from the ItemMeta, but in my real code, it is there.

eternal oxide
#

Nothing wrong with your pseudocode. So long as you are updating teh ItemStack instance

unique shuttle
autumn cave
#

Did spigot 1.20.6 remove ChatColor, GameMode, Material? All I did is update 1.20.41.20.6 and now a few classes are not found:

eager turtle
#

@echo basalt so i was implementing your tracker today and using a custom Wrapper of EntityDamageByEntityEvent that just also stores the special Weapon involved in the damaging if there was one. It works great for everything and for things like my gust spell when i just create my own EntityDamageByEntityEvent and Wrap it with the gust sword weapon and send it to the tracker. But the issue is when I try to use entity.damage() along with my gust spell that fires its own EntityDamageByEntityEvent and then inside of that listener i end up sending another Wrapper to the tracker just from using the damage() method. So basically its causing an extra entry to be made when there was only one attack. So i dont know how to basically ignore the event or just not trigger the event caused by damage(). I could just use that one and not send my own to the tracker but then I have to same issue of not being able to attach my Weapon to the event

#

And obviously i could just subtract the health manually but i want to account for armor and stuff and damage() does automatically

#

I was thinking maybe ill just attach something stupid to the entity.damage() like this and in my listener just not send a Wrapper to the tracker for this specific damage because it wouldnt be from an entity anyways. But there has to be a better way lol

#

wait i think im so stupid. this entire time ive been doing entity.damage(10, killer)

#

but you dont even need to add a second param

#

thus it wont have any entity attached and wont get sent to the tracker

#

sometimes it really helps to just type things out sorry all

modern ridge
#

hi, how can i report a spigot resource ?

sullen marlin
eager turtle
#

@autumn cave

pliant topaz
#

I have an enum and each one stores some unique values. I created a method which returns an itemStack with these values which works fine, except for PersistentData. It gets written to the itemStack correctly, the only problem I have is when I get a new instance using the method from the enum (which writes the default values to the itemStack) the PersistentData is the same as the one before (the PersistentData of the before one has been modified). Shouldn't it be item specific or am I doing something wrong?

(If u need the code I'll try providing it, I'm currently on vacation so over mobile I might take a while)

grave kayak
#

I'm making a fishing plugin and im trying to have the fish spawn in much like how they do in vanilla minecraft. I can't seem to get it working how i'd like it to. any ideas appreciated! https://paste.md-5.net/ekeyuriboy.cs

echo basalt
#

And then just filter out by it

echo basalt
#

Material -> BlockType

#

No clue about the rest

pliant topaz
#

but material isn't just blocks

smoky anchor
echo basalt
#

I believe so

smoky anchor
#

Lesgooo

echo basalt
pliant topaz
#

also deprecated

#

but there isn't info about what it got replaced with on the docs

glad prawn
#

While this API is in a public interface, it is not intended for use by plugins until further notice. The purpose of these types is to make Material more maintenance friendly, but will in due time be the official replacement for the aforementioned enum. Entirely incompatible changes may occur. Do not use this API in plugins.

pliant topaz
#

okay no, Material it still is

#

interesting

#

gotta change half my plugins updating it 💀

short drift
#

So, negative spaces can move text horizontally towards left.
But.
How do I move reliably and consistently text horizontally towards right - to position text, symbols, and graphics?

#

Do I just spam space characters?

drowsy helm
#

most negative space fonts have positive aswell

short drift
#

Oh, I see. So I should do that.

short drift
#

Well, I just thought I'd do this:

{
    "providers": [
        {
          "type": "space",
          "advances": {
            "\uF101": -1,
            "\uF102": -2,
            "\uF103": -3,
            "\uF104": -4,
            "\uF105": -5,
            "\uF106": -6,
            "\uF107": -7,
            "\uF108": -8,
            "\uF109": -9,
            "\uF111": 1,
            "\uF112": 2,
            "\uF113": 3,
            "\uF114": 4,
            "\uF115": 5,
            "\uF116": 6,
            "\uF117": 7,
            "\uF118": 8,
            "\uF119": 9
          }
        },
#

Should work, right?

drowsy helm
#

didnt even know that was a thing lol

short drift
#

Yeah, then you can just do something like:

#

It's pretty handy.

drowsy helm
#

use an enum

short drift
#

Although dealing with strings might have been a mistake.

#

Right, exactly.

#

I really should.

drowsy helm
#

this is how i implement mine

short drift
#

I didn't even know enums in Java can do that. I mainly use C#. Thanks for the tip.

short drift
#

@drowsy helmWell, I tried that and I can't find any errors in my syntax, but:

drowsy helm
#

you dont have a constructor

short drift
#

Oh, I see. It is required explicitly for enums?

drowsy helm
#

yeah it doesn't know what the string is by default

#

just like a class

blazing ocean
#

i just made an appendNegativeSpace(Short) method on my component builder that appends a translatable

normal canopy
#

How to get the player you are teleporting to in spectator mode?

echo basalt
#

new project time

pseudo hazel
eager turtle
#

It’s different than the actual name string you might have put in the constructor

#

Idk how you are doing it exactly

drowsy helm
#

I tend to use F-E range, you wont get many clashes, if any

pseudo hazel
#

I see

eager turtle
drowsy helm
#

yeah chatgpt says "BMP Private Use Area: U+E000 to U+F8FF"

pseudo hazel
#

aha

#

nice, thanks

eager turtle
#

Some dumb reason i kept putting entity.damage(float, killer) and was pissed the event had the killer 😂

#

Its working really really good now tho

#

Appreciate you sharing that with me it helps to see data structures like that

pliant topaz
pseudo hazel
#

without code its not really possible to determine what you did, like how you actually save the pdc to the item or how the enum stores this information

eager turtle
#

Also for everyone tweaking about no material in 1.20.6 this has been brought up so many times and the answer is your intellij or java jdk needs to be updated

#

Google imports not working 1.20.6 and the first thread is pretty much what you are all asking

charred blaze
#

if i set itemmeta of item will persistentdata reset?

pseudo hazel
#

if that meta doesnt have the updated pdc, then it will get reset

#

the itemmeta contains the pdc so if you use a different meta, the pdc will also be changed

charred blaze
#

bruh

pseudo hazel
#

but if you do getItemMeta/setItemMeta it should retain everything except the changes

charred blaze
#

mhm

pseudo hazel
#

a way to look at it is that the meta contains everything thats not in the itemstack and is persistent, and the pdc is a part of that meta that you can put stuff in

clear elm
#

how can i send a message with this color code ? &#2B7416

pseudo hazel
#

you mean from code?

#

player.spigot.sendMessage(ChatColor.of("#2B7416") + "my message")

#

there are better ways but this is the easiest one to explain

#

make sure to use the bungee chat color version, not the bukkit one

clear elm
#

okay

pseudo hazel
#

ideally you would make a message using the chat components from bungee like new TextComponent and then color it

#

or using the ComponentBuilder

clear elm
#

inv.setItem(10, new ItemBuilder(Material.EMERALD).setDisplayname(ChatColor.of("&#2B7416") + "ᴍᴏɴᴇʏ ʟᴇᴀᴅᴇʀʙᴏᴀʀᴅ")

#

why is this wrong

#

this is in a gui

eternal oxide
#

setDisplayName does not return an ItemStack

drowsy helm
eternal oxide
#

and a builder normally requires you to actually .build()

clear elm
#

now it works i removed the first &

eternal oxide
#

ok I was way off base then

eternal oxide
polar forge
#

Hey guys

#

I would need help in a plugin

#

So I’m making a Last and Seen plugin

charred blaze
#

this doesnt seem to work

hazy parrot
#

It sure doesn't

polar forge
#

When I send /firstseen Egitto in game, it sends 3 times this

hazy parrot
polar forge
#

How do I solve it?

charred blaze
tardy delta
#

setItemMeta

young knoll
#

You are sending the messages inside a loop

#

Idk what the loop is doing but my guess is that it loops 3 times

tardy delta
#

also why not getString(join_date_players. target.getUniqueId())

polar forge
#

I got also a LastSeenCommand class

#

But it only works when someone does /lastseen

#

So not possible

polar forge
short drift
#

So, anyway.
Is it possible to override existing Minecraft commands?

#

I was thinking I'd like add an announcement + delay to server restart. But I would prefer to keep the /restart command.

#

Instead of coming up with new names I can't remember.

sullen marlin
#

Plugin commands should generally override

short drift
#

Oh, hey md_5.
Okay, so I intercept commands going to /restart, I cancel that, and then I reroute the command to my own differently named command? Or can I directly hijack the command?

drowsy helm
#

restart is a bukkit command, not sure if you can override them the same way

short drift
#

A bit hazy on the details there.

#

Is that so? 🤔

pseudo hazel
#

its not vanilla atleast

shadow night
short drift
#

Command map. Hm. I will look into that. Thanks.

polar forge
tardy delta
#

sends what command

drowsy helm
#

get player by name, then their uuid

tardy delta
#

ah

#

Bukkit.getOfflinePlayer(args[0]).getUniqueId()

#

dunno the semantics of that method

short drift
# tardy delta dunno the semantics of that method
        if (args.length == 1) {

            UUID playerUUID = null;
            for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
                var playerName = player.getName();
                if (playerName == null) {
                    continue;
                }

                if (playerName.equalsIgnoreCase(args[0])) {
                    playerUUID = player.getUniqueId();
                    break;
                }
            }

            if (playerUUID == null) {
                sender.sendMessage("Player not found: " + args[0]);
                return false;
            }

You can do it like this.

tardy delta
#

oh god

short drift
#

With this method you have to iterate the collection, but you avoid using deprecated methods.

drowsy helm
#

why would you do that

#

lmao

short drift
#

To avoid using deprecated methods.

tardy delta
#

i mean the deprecated method aint gonna get removed

drowsy helm
#

at twice the cost

tardy delta
#

dunno if that was the one that could do a mojang lookup

short drift
#

But it is deprecated. I'm sure md_5 & co know what they're doing.

#

Or who who ever keeps deprecating useful methods.

tardy delta
#

theres no forRemoval=true

drowsy helm
#

It's only deprecated because seraching a player by name isnt reliable

#

its not going to be removed

short drift
#

Of course you can do it any way you want. Just an example.

drowsy helm
#

and your method functionally odes the same thing, less efficiently

eternal night
#

If only the reason for the deprecation was described in the javadocs Sadge

drowsy helm
#

Persistent storage of users should be by UUID as names are no longer unique past a single session.

short drift
#

It's amazing. It's been 8 years since I last modded Minecraft and the Javadocs are ... nobody has done anything to improve usability during that time.

eternal night
polar forge
#

I meant

#

It must be concerted from getName to UUID, since in the config, the players is saved in UUID

#

players sends /firstseen Egitto, Egitto must be converted to UUID, checks if the UUID matches any UUID in the file, if so, sender.sendMessage Egitto was…..

short drift
#

Well the command in question I drew the example from was a ban command, and I'm not going to write/copy paste UUIDs to ban people. That's just not happening.

#

So this is the best I can do.

polar forge
#

I’ll try.

#

But I guess it won’t work

young knoll
#

You can always run it async

#

In case it does make the blocking web request

pseudo hazel
#

not all deprecated methods have alternatives, so sometimes methods are deprecated because they had nothing better to do I guess or because it uses magic numbers, but are still perfectly usable

short drift
#

If something is marked deprecated in the API, I'm not touching it.

pseudo hazel
#

then you might get issues with some more advanced stuff

#

I think the meaning of deprecated differs wherever its used xD

drowsy helm
#

its more to scare off people who dont know what they're doing

eternal night
#

I mean, the non deprecated solution here is to just Bukkit.createPlayerProfile(name).update().thenAccept

echo basalt
#

having a fun argument at work rn

eternal night
#

tho that will be a web request

short drift
#

Oh.

eternal night
#

Well as much of a web request as getOfflinePlayer would have to be

short drift
#

I think I will stick with my "inefficient for loop".

eternal night
#

it is terrible tho

short drift
#

Yes, it is pretty terrible.

pseudo hazel
#

sometimes terrible is good enough

eternal night
#

no like, that loop is so inefficient, I think a web request is going to be faster

short drift
#

But I don't expect to ban people every 20 seconds, so it will be fine.

pseudo hazel
#

it works terribly, but it worksuwu

eternal night
#

Well it'll hang your main thread

#

given the method has to read all player profiles from disk

short drift
#

How many can there be.

eternal night
#

Unless you clear them, as many as your server had unique logins

pseudo hazel
#

depends how many different players logged into the server

short drift
#

My point exactly.

eternal night
#

which, that can be a number skyrocketing quickly

#

what

short drift
#

I mean, ok. Maybe I'll check out your suggestion. I guess it would the adde benefit of being able to ban people who have never visited the server.

polar forge
#

It tells me Bukkit.getOfflinePlayer() as being deprecated 💀

eternal night
#

just use the createPlayerProfile thing. Its going to use the profile cache if filled so like, if they are online, you are good too

short drift
#

As long as the servers are not down.

#

That would be embarrassing trying to ban someone and not being able to because Mojang servers are down.

drowsy helm
#

have you missed the conversation for the last 10 mins

echo basalt
#

is it me or has 7smile7 not been around lately

drowsy helm
echo basalt
#

and like 10 days ago

eternal night
eternal night
#

I can just change my name? xD

short drift
#

But it wouldn't change in offline players. I get the stored UUID based on the name.

eternal night
#

Maybe someone else took my name

#

and now you ban me

short drift
#

But still, it would have the UUID ..

echo basalt
#

IIRC at work we had a layered system to do UUID lookups :)

eternal night
#

Well if my offline player record on your server has the name "lynxplay", and now someone else has that name, you have two offline plaeyrs

#

do you ban both?

#

my old data file isn't going to get updated

short drift
#

So... what's the problem with that?

eternal night
#

I log onto your server in 2019 with my name "lynxplay"

#

I log off

#

change my name to ehh, lynxplayButCool

short drift
#

Yes. Your UUID is stored and same.

eternal night
#

in 2024 someone takes lynxplay

#

joins

#

you iterate over all offline player profiles, there are two with the name lynxplay

#

you are fucked

short drift
#

And UUID would not match.

eternal night
#

okay?

#

but you don't check with uuid

#

you check with name

short drift
#

But I do.

#

It was in the example.

eternal night
short drift
#

Yes, I think you did.

#

It has the getUniqueId call.

eternal night
#

you don't compare that to anything

#

because your caller only passes in a name

#

you have nothing to compare that to

short drift
#

If it's not null, I ban the bastard.

#

It wouldn't change on its own on the disc.

eternal night
#

Yea, what if your loop first runs into my old profile on your server with the name "lynxplay".

#

Which is outdated, my current name is "lynxplayButCool"

#

but I haven't joined your server since I changed the name

#

you are trying to ban coll, who changes his name to "lynxplay" since its now free

#

but your for loop first picks up on my old offline player profile that is outdated, it grabs my uuid and then bans me

short drift
#

I guess we can all agree it's complicated.

#

Much more so than I originally expected.

eternal night
#

Yea I mean, preferably the only people you ban by name is people currently online

#

if you ban people offline, you have to do so by uuid

short drift
#

That's a good point.

#

@eternal nightWhat was the "thenAccept" ?

eternal night
#

PlayerProfile#update yields you a completable future

#

CompletableFuture#thenAccept is invoked once the future is completed

short drift
#

Ah.

#

Does it need an action or do I just pass null to it?

#

"Action to perform before completing"

eternal night
#

Well you'd pass a Consumer<PlayerProfile>

#

which is invoked with the "updated" player profile

#

e.g. the one with uuid filled

short drift
#

On a second thought a web call wouldn't really help with the issues we discussed.
I suppose the ban command should just refuse to ban the person without UUID if that person is offline.

eternal night
#

Yea

short drift
#

But it's incredibly inconvenient.

eternal night
#

which is why usually your entire system (e.g. reports and whatever) all store uuids

#

they can display names for sure

#

but the actual banning should be done by uuid

humble lynx
#

I want to check if a player is at a certain location (example: between x:100 and z:100)
Instead of watching over the player move event, would it be better for me to run a task timer every 10-15 secs to see if the player is at the location, or monitor the PlayerMoveEvent?

I'm just using the above as an example, as I plan on doing this for a few regions

short drift
eternal oxide
#

if (event.getFrom().getBlock() == event.getTo().getBlock()) reeturn;

short drift
#

But on the other hand, you can do a lot of cool stuff with it.

humble lynx
#

I'm aware, but I know I can limit the amount of calls to it. I could probably make a custom event to somehow 'run' a call of player move event every x seconds (I guess a combination of timer & event)

humble lynx
#

actually maybe there's a chunk event or something I can look into

eternal oxide
#

depends what exactly you want to do

short drift
#

You could probably check all online players every 10 ticks, if you wanted to, with no problems.

humble lynx
#

It's just for a quest plugin, once a player reaches a certain area it would mark the quest objective done and move them to the next objective

short drift
#

I would likely use a timer or a hook from WorldGuard or something.

eternal oxide
#

I'd just do it in the move event. It has already fired, both locations and blocks are already in memory. and early ext and a simple check is not heavy

wet breach
#

the problem with the checkin all online players, is that the time to completion is linear. Thatt is, the more players that are on, the more time it takes to go through the list and so forth. Where as events you check the information the event gives and only when the event happens. Most of the time what you have going on in your listener isn't really causing that much of significant performance unless you start doing things that block or you running through massive lists first before the listern can be done with the event.

short drift
#

I guess you can do it however you want as long as you check what kind of performance impact it has.

wet breach
#

otherwise checking on player move some innocuous information isn't going to be detrimental

humble lynx
#

Yeah... my only checks would be to see if the player's quest objective is to meet at a location, other than that it wouldn't be too much. Thank ya'll

I just needed some convincing I think, I wouldn't want the player to miss out on the correct location during the timers being ticked

#

Imagine if it was a race, or a parkour of some sort, that would kinda suck

brittle geyser
#

Caused by: java.lang.NoSuchMethodError: 'void org.bukkit.entity.Entity$Spigot.sendMessage(net.md_5.bungee.api.chat.BaseComponent)'
how i can replace sendMessage method, server version is 1.8, i need to use BaseComponent

wet breach
#

and only do something once its matches, doing it this way the impact is so insignificant you probably could barely measure it

#

except for when it matches

humble lynx
#

^Even easier, the objective condition is saved on player data, so just need to match the condition with the event, instead of grabbing any locations

wet breach
#

and to make it more convincing

#

the player move event location given is going to not match more often then it is going to match

#

therefore the code is most of the time doing nothing

humble lynx
#

Sweet, okay- that's all I needed for now. I love programming 😝

brittle geyser
#

When the 'void org.bukkit.entity.Entity$Spigot.sendMessage(net.md_5.bungee.api.chat.BaseComponent)' method was invented?

pseudo hazel
#

a while ago I think

#

how so?

brittle geyser
#

i need to know the version when this method was invented

pseudo hazel
#

idk then

eternal oxide
#

a long time ago

#

if you are unsure just use a little reflection to check it exists before you try to use it

brittle geyser
#

U know?

eternal oxide
#

why?

brittle geyser
brittle geyser
eternal oxide
#

as I said, just use reflection to see if it exists. If it does, use it, if not don;t use it

brittle geyser
#

Why do you need to know why I need it?

eternal oxide
#

to see if you really need to know or you are just stuck on an idea]

brittle geyser
#

i cant not use it

hazy parrot
#

Look up commit history

eternal oxide
#

of course you can

#

reflection will tell you if it exists before you try to use it

brittle geyser
#

in my case, no

brittle geyser
eternal oxide
#

eg```java
public static boolean hasUpdateCommand() {

    try {
        // Method only available post 1.14
        Player.class.getMethod("updateCommands");
        return true;
    } catch (Exception ex) {
        // Server too old to support updateCommands.
        return false;
    }
}```
hazy parrot
wet breach
#

or just run git shell in the buildtools directory

hazy parrot
#

That can work too ig

brittle geyser
young knoll
#

There is

pseudo hazel
#

seems to be from before 1.8 even

sullen marlin
#

Yeah I'm pretty sure that method is from 1.7 since json chat existed

broken nacelle
brittle geyser
#

and working in 1.12 and higher versions

young knoll
#

Well there ya go

#

1.12+

eternal oxide
#

It exists in 1.8.8

#

its under Player.Spigot not Entity.Spigot

#

It was moved in 1.12 from Player.Spigot to CommandSender.Spigot

brittle geyser
#

ohh

#

thanks

eternal oxide
#

if you get it from Player.spigot().sendMessage it shoudl work in ALL versions

#

It will only work in 1.12+ from Entity.Spigot

brittle geyser
#

Its working, thanks!

icy beacon
#

Dead chat

#

Hi

inner mulch
#

why is this not possible :(

slender elbow
#
public <V, T extends V> void foo(Class<T> type) {
  ...
}

not that that is particularly useful

inner mulch
#

the class has V
the method has T

it returns T but ensures T is some kind of V
i do this because I want that depending on the type the casted class is returned

slender elbow
inner mulch
#

oh this works?

#

ok

#

nice

#

thanks

fair rock
# unique shuttle BUMP

Idk if that helps, but since some version minecraft reworked the entire metadata stuff

quasi gulch
#

When i use InventoryView.getItem(Slot) it gives me an IndexOutOfBoundsException. How do i check if the slot is not out of bouds i thought it would just return null if its out of bounds

quasi gulch
#

Thats for inventory not inventoryview

#

And the countSlots() says it can be bigger then the actual slots so idk if that works

#

I dont know what unsused inv slots are

valid burrow
quasi gulch
#

Yeah i read it but what means the note

valid burrow
#

no clue how about u just use getTopInventory()

#

lol

quasi gulch
#

yeah ok thats actually smart thanks

unique shuttle
# charred blaze this doesnt seem to work

Did you find a solution? I suppose it happens in 1.20.6 just like it does for me. It's fine that the ItemMeta is a copy of the original, but I think it should also copy the data contained in the PersistentDataContainer

turbid flame
#

How to get item id from ItemStack?

#

because item.getType().getId() is depracted

eternal oxide
#

explain why you want the id?

turbid flame
#

Why should i tell you that? I just want that

rare rover
#

💀

fair rock
#

Because its outdated af

eternal oxide
#

because your answer may affect my answer

turbid flame
#

I didn't know thanks god you told me

humble lynx
#

Why are you being so rude

eternal oxide
#

Why is everyone so contrary today?

turbid flame
#

To get the Item.byId(int id);

#

Don't ask me pls why do i want Item instance

humble lynx
#

If you're asking about a 1.8 plugin I'm pretty sure there's a website that says how old it is now

eternal oxide
#

generally you'd only neeed an id for sending packets, so it would not be API, which is why I asked

turbid flame
#

I am using 1.18

turbid flame
#

So could you now tell me if there is any not depracted way to get an id?

eternal oxide
#

then just use getId()

pseudo hazel
#

well its deprecated, but does it still work

eternal oxide
#

deprecated does not mean don't use

pseudo hazel
#

if it works youre good to go

#

deprecated usually means its an unorthodox way to do something

turbid flame
#

So there is not a not depracted way?

eternal oxide
#

no

turbid flame
#

Okay

#

Oh i forgot to tell something

eternal oxide
#

This is Spigot not Paper.

turbid flame
#

Or you just have no knowledge but you speak

#

Yea

#

I am pretty sure

#

Inventory system is VERY VERY similar

eternal oxide
#

Spigot says do not extend InventoryHolder

quiet ice
#

My source is @worldly ingot - I think. Blame him

turbid flame
#

Because it is coded by geol

turbid flame
quiet ice
#

also, I have no clue who you are

eternal oxide
#

There are cloning issues with InventoryHolders

#

I have a feeling there is a Spigot post about it

eternal night
#

Yea there are cloning issues on spigot