#help-development

1 messages ยท Page 391 of 1

tardy delta
#

mojang is a bitch, sometimes they make the recipe jsons return an object with a string inside and sometimes a string ๐Ÿ’€

#

mfs

#

both

weak meteor
#

omg

#

i have 8 errors, can someone help me to debug?

icy beacon
#

well start with something please

tardy delta
#

congrats i have 13

lost matrix
#

Runtime or Compiletime?

quaint mantle
tardy delta
#

i believe so, its a while since i used it

weak meteor
#

this.saveDefaultConfig() should create a config file, right?

tardy delta
#

yes

lost matrix
weak meteor
#

thats for the case im on a class, right?

weak meteor
analog thicket
#

Okay so im having a problem, i need to get all the block in the config, but it only gets the "ENDER_CHEST", anyone would have an idea to why?

This is what i have so far

https://paste.md-5.net/uqitejuqof.php

tardy delta
#

exposing collections lets go

#

well you break in the loop

haughty granite
#

via PluginDescriptionFile#getDescription(), how can I get this kind of info?

analog thicket
lost matrix
haughty granite
lost matrix
#

I mean technically the plugin.yml is just a yml file you can read whenever you want.
But you shouldnt.

remote swallow
#

you could just store that in your config.yml

tardy delta
#

i feel the anger people have against mojang

weak meteor
#

in config.addDefault has to be the same as the config.yml in resources?

remote swallow
#

you dont need to call addDefault in most cases

weak meteor
#

so i understand this: if i have certain value in the config.yml from my resources folder i only need to call the saveDefaultConfig

#

and not the addDefault

remote swallow
#

correct

haughty granite
weak meteor
#

'configFile has private access in org.bukkit.plugin.java.JavaPlugin'

#

what

chrome beacon
#

Use getConfig to access it

weak meteor
#

i do not understand what you mean

#

like if it says it has private access

#

i have to create a public method?

remote swallow
#

if you need to access the config call getConfig()

weak meteor
#

yes

#

nvm

#

now wtf is 'cannot find symbol' error: FileConfiguration config = this.getConfig(); // Create variable for the config file

analog thicket
# lost matrix

Well this works, but it sends the player.sendmessage three times..

#

A break under it does not work

#

After the else

icy beacon
#

and make sure to import FileConfiguration

analog thicket
icy beacon
#

how can I forcefully load decentholograms holograms? i need to access them in onEnable, but they only load after my plugin does (even though I hard-depend on the plugin)

#

i already asked in their discord server, but perhaps someone knows

#

debug log

[19:50:49] [Server thread/INFO]: All holograms: [] // my own debug
[19:50:49] [Server thread/INFO]: > Leaderboard: leaderboard_underscore_killstreaks_1 // trying to find this hologram
[19:50:49] [Server thread/INFO]: > Leaderboard: leaderboard_underscore_killstreaks_2 // trying to find this hologram
// the holograms weren't found, otherwise it would say that it did
...
[19:50:50] [Server thread/INFO]: Done (42.363s)! For help, type "help"
[19:50:50] [Craft Scheduler Thread - 1/INFO]: [DecentHolograms] Loading holograms...  // as you can see, the holograms
[19:50:50] [Craft Scheduler Thread - 1/INFO]: [DecentHolograms] Loaded 2 holograms! // are loaded too late
regal geyser
#

If i wanna learn mc plugin development, what should my java level be? For example beginners, intermediate or what?

pseudo hazel
#

well the better you know java, the faster plugin development will go

icy beacon
#

knowing git & maven/gradle will be a big headstart too

icy beacon
eternal oxide
#

no

#

that will only prevent clicking on a Block with a shield

tardy delta
#

distanceSquared pls

tardy delta
#

the company i visited today admitted they use chatgpt to write basic unittests lol

charred blaze
#

so how do i block shields exactly?

eternal oxide
#

thats also pointless seeing as the max range is 7 or 8 blocks?

eternal oxide
#

beyond that a block is untargetable

charred blaze
#

is there any event of shield use?

eternal oxide
#

no

charred blaze
#

so what do i use

eternal oxide
#

there is no simple way

charred blaze
#

WHAT is the hard way

remote swallow
#

if they hold a shield, check if the event isnt pyhsical cancel

charred blaze
#

what is hold event?

wet breach
#

could see if they right clicked

remote swallow
#

you use the interact event

#

you just check what they holsd

eternal oxide
#

^ check clicking a block and clicking air with a shield in hand

remote swallow
#

the interact event

#

has a physical type

#

you check if it doesnt equal that

charred blaze
#

whats that

#

what does that mean

remote swallow
charred blaze
remote swallow
#

people can still block with their shild on blocks

#

if you check if it isnt physical, you get all types

charred blaze
#

what are the other types

remote swallow
#

right click block, right click air, left click block, right click block

wet breach
#

and clicking entities

charred blaze
wet breach
#

interactatentityevent then if you need clicking entities

pseudo hazel
#

why check left click

#

you can only block with right click

tardy delta
#

mojank driving me crazy

wet breach
#

not just one or the other

charred blaze
#

why dont i just use player hit to player event?

pseudo hazel
#

that doesn't make any sense

charred blaze
#

why

pseudo hazel
#

why would it send both

#

i wasnt talking to you

wet breach
#

because one can be false the other true

pseudo hazel
#

wdym false

wet breach
#

it might have been some other event

pseudo hazel
#

its just an enum or am i confused

wet breach
#

either way, some of these events are weird sometimes ๐Ÿ˜›

pseudo hazel
#

yeah I agree with that

charred blaze
#

can i use EntityDamageByEntityEvent for blocking usage of shields???

pseudo hazel
#

idk try it

#

but probably not?

charred blaze
#

why

wet breach
#

?tas

undone axleBOT
pseudo hazel
#

I mean if you block you dont get damage

wet breach
#

however

charred blaze
wet breach
#

entities get a block effect though

#

if you block

charred blaze
#

i have an idea ill just block shields to be holdable

tardy delta
#

to make it even more fun, mojang sometimes changes "item" to "tag"

#

mfs

charred blaze
#

so like this?

remote swallow
#

you probably want to cancel the click even too

charred blaze
remote swallow
#

yes

smoky oak
#

?db

#

ofc

#

can we just get ?list back

icy beacon
#

?cc list is available at #bot-commands

smoky oak
#

thought they disabled it huh

gleaming lake
#

Could not pass event PlayerTeleportEvent to DeluxeHub v3.5.2
org.bukkit.event.EventException: null

Anyone know how to fix this?

icy beacon
#

DeluxeHub is not your plugin, right?

#

if so, please refer to #help-server and make sure to include the entire stacktrace

#

?paste if it's too long

undone axleBOT
regal geyser
regal geyser
pseudo hazel
#

object oriented design

regal geyser
#

Idk what thats yet, can u explain just a lik bit?

pseudo hazel
#

object oriented means that every class can be seen as its own object

#

design refers to ways in which these objects pass data and execute functions

regal geyser
#

So 10hrs course, gotta finish all of it?

pseudo hazel
#

i.e creating objects by using constructors and then calling methods and variables from that object

icy beacon
pseudo hazel
#

idk

icy beacon
regal geyser
pseudo hazel
#

10 hours sounds too much for one sitting though

chrome beacon
#

^^

icy beacon
#

don't do it in one sitting then

chrome beacon
#

You need to break it down in to smaller parts and actually try the code

icy beacon
#

and if you know a topic certainly, just skip it

regal geyser
weak meteor
#

config = this.getConfig(); (cannot find symbol) i know i have to define it but idk how. File config;?

icy beacon
#

like, if you are comfortable with if-statements, go on to the next topic

regal geyser
weak meteor
# icy beacon show the relevant code snippet

@Override
public void onEnable() {
saveDefaultConfig(); // Create config file from resources
config = this.getConfig();
FileConfiguration config = getConfig(); // Create variable for the config file

pseudo hazel
#

okay, scanners are pretty useful to know

icy beacon
weak meteor
#

yes i

#

know

icy beacon
#

you need to create the variable config at first

weak meteor
#

Yes, should be File config

chrome beacon
#

Can't set the value of a variable that doesn't exist yet

icy beacon
#

and you do exactly that on the next line

icy beacon
#

FileConfiguration config = getConfig(); this is correct

#

why are you doing it twice?

weak meteor
#

omg

pseudo hazel
#

looks like you need a java lesson as well

weak meteor
#

im stupid

#

im so sorry

icy beacon
#

?learnjava

undone axleBOT
chrome beacon
#

They probably don't know what this means

pseudo hazel
#

xD

weak meteor
#

just new with spigot

icy beacon
pseudo hazel
#

true lmao

icy beacon
#

similar

pseudo hazel
#

similar enough

chrome beacon
#

That wouldn't work in C# either KEKW

icy beacon
#

rookie mistake

#

but somehow worked out very well

regal geyser
icy beacon
#

wouldn't do that again

weak meteor
#

now im getting the same error of 'cannot find symbol' in getServer().getPluginManager().registerEvents(new JoinEventListener(joinMessage), this);

        saveDefaultConfig(); // Create config file from resources
        FileConfiguration config = getConfig(); // Create variable for the config file
        // Adding Defaults

        String joinMessage = config.getString("onJoinMessage");
        message();
        getServer().getPluginManager().registerEvents(new JoinEventListener(joinMessage), this);```
#

maybe for JoinEventListener?

icy beacon
#

did you import it?

weak meteor
#

import org.bukkit.event.Listener;

chrome beacon
#

So you didn't import JoinEventListener?

weak meteor
#

no i think no

icy beacon
#

well you should

#

?learnjava

undone axleBOT
icy beacon
#

that's what you should do

pseudo hazel
#

I just use auto imports ๐Ÿ˜›

#

but sometimes I need to correct it

weak meteor
#

and it worked

#

but idk when i deleted it

weak meteor
#

just need to import that

small hawk
#

iirc there was a method to breakNaturally block with no loot? U know animation, breaking particles but no loot from block?

lost matrix
quaint mantle
#

I have a Class Called ExampleAbility which extends thisZ

abstract class InteractAbility(override val id: String) : Ability<PlayerInteractEvent>(id)
abstract class Ability<T : Event>(open val id: String) {

    abstract fun getName(): String
    abstract fun getDescription(): String
    abstract fun getItemStack(): ItemStack

    abstract fun handle(event: T)
}
Type mismatch.
Required:
Ability<Event>
Found:
ExampleAbility
tardy delta
#

auto imports like in hitting tab on an import?

lost matrix
#

This looks ok

tardy delta
#

heh

lost matrix
#

Well... you might get a problem with the way you withdraw your currency.
This could lead to people having negative currency.

tardy delta
#

and mojang does weird stuff with their recipe files

lost matrix
#

Imagine if someone buys 100 scores super fast. The money is only removed 2 or 3 ticks later and in the meantime
the user can just spam buy scores

#

Yes remove the money directly but if the CF returns false then you add the money back.

tardy delta
#

this is a json object right?

"key": {
    "#": [
      {
        "item": "minecraft:sand"
      },
      {
        "item": "minecraft:red_sand"
      }
    ],
    "X": {
      "item": "minecraft:gunpowder"
    }
  }```
#

ah i see, mojang finds it funny to swap objects with arrays

raw epoch
#

Hello ! I need to clear a pretty huge area. I use this method, is the if (.isAir) making more lag or less ? i can't know right now :/ thx !

for (int x = min.getBlockX(); x <= max.getBlockX(); x++) {
    for (int y = min.getBlockY(); y <= max.getBlockY(); y++) {
        for (int z = min.getBlockZ(); z <= max.getBlockZ(); z++) {
            if (!world.getBlockAt(x, y, z).getType().isAir()) {
                world.setType(x, y, z, Material.AIR);
            }
        }
    }
}
rough drift
#

that's slower

raw epoch
raw epoch
#

it's around 500k blocks i've test it and it seams to be ok

tall dragon
pseudo hazel
#

how do I effectively split my plugin

#

like I am making a minigame plugin

#

and I am working on a manager that can manage multiple instances of teh minigame, but I want to build that as a separate plugin

#

so people can decide to get the big version or just the isolated version of the plugin

#

I assume I need to make 2 plugin files but im not sure what the best way is

native gale
#

Hi! Is there any way to figure out what plugins are listening to specific event?

tardy delta
#

isnt there somemthing on the handlerlist?

#

ahh

native gale
#

Ah-ha

#

Okay, this would work, thanks

smoky oak
#

explaining what this has to do with minecraft would take a while so ill just ask the question. Are gravity calculations between a few dozen to a few hundred objects faster performed on a CPU or on a GPU?

#

using newtonian gravity, thats precise enough

pseudo hazel
#

depends on how fast you can get it to and from the gpu I guess

#

all I know is that gpus are good at doing the same thing a lot of times

smoky oak
#

how would i know the bandwith of whatever my stuff would run on

analog thicket
#

Is it possible to make note plings longer like ding ding diiing?

pseudo hazel
#

no, noteblock sounds are just taken from audio files, there is no good way to elongate them

quaint tapir
#

you know how when a player takes damage theres a tiny amount of time where the player is invunerable to damage, is there a way to reduce this time
if anyone has played combo duels you know what I mean

pseudo hazel
#

the best way is to make a resource pack xD

analog thicket
#

Yeah but i would have to force it on players tho, i dont like that

lost matrix
native gale
#

How to determine if the server on spigot or paper?

quaint mantle
#

how do u get the title ofan inventory?

lost matrix
#

For what purpose?

quaint mantle
#

I thought it was Inventory#getTitle

#

but its not

quaint tapir
lost matrix
lost matrix
coral kelp
#

anyone know how to fix deluxetags it works to the point where it's {displayname} {deluxe_tag}: {messgae}

#

it shows {deluxe_tag} in chat when you type but don't show tag

river oracle
#

There's no other reason imh

lost matrix
#

Thats why im asking so i can suggest him to simply not do that

quaint mantle
#

Is it possible to get the topInventory view?

lost matrix
#

Im just gonna ignore Nopox from now on...

quaint mantle
#

so gay

#

oml

raw epoch
#

Hey/Re do you know how to make a trapdoor reopen after a click on it ?

@EventHandler
public void onInteract(PlayerInteractEvent event) {
    if(!GameState.is(GameState.GAME)) {
        return;
    }
    if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock() != null) {
        if (event.getClickedBlock().getType() == Material.SPRUCE_TRAPDOOR) {
            Bukkit.getScheduler().runTaskLater(RandomRace.getPlugin(), () -> {
                //code that didn't work xd
            }, 60L);
        }
    }
#

I can't cast my block to Opennable

lost matrix
#

You cant cast a Block to a BlockData. You need to get the BlockData from the Block and cast it to Openable.
Or even TrapDoor.

raw epoch
#

class org.bukkit.craftbukkit.v1_19_R2.block.data.CraftBlockData cannot be cast to class org.bukkit.block.data.Openable yes i know x')

thorn crypt
#

Yo @lost matrix, does the code you gave me to glow a block can work on a player too ?

thorn crypt
lost matrix
thorn crypt
#

What do I have to change to make it glow every other player for one player tho ?

raw epoch
lost matrix
# raw epoch yep i will try with trapdoor
  @EventHandler
  public void onInteract(PlayerInteractEvent event) {
    if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getClickedBlock() != null) {
      Block block = event.getClickedBlock();
      if (Tag.TRAPDOORS.isTagged(block.getType())) {
        Bukkit.getScheduler().runTaskLater(this, () -> {
          BlockData blockData = block.getBlockData();
          if (blockData instanceof TrapDoor trapDoor) {
            trapDoor.setOpen(false);
            block.setBlockData(blockData);
          }
        }, 60L);
      }
    }
  }

Take what you need from this

raw epoch
flint elk
thorn crypt
#

Yes it is because I know some plugin that do that for dd0s protec

chrome beacon
#

Since this is help dev I assume you're making a plugin now?

flint elk
#

Jep

chrome beacon
#

Get the server adress from the handshake packets

tawny remnant
thorn crypt
#

Olivo sorry to disturb, after you finished helping BitLukas, could you help me with something ? I'm trying to place a debug marker with packet but I can't figure out how to set it a color like red, magenta, aqua etc

lost matrix
chrome beacon
#

;/

lost matrix
chrome beacon
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

sterile token
#

mvn install:file -Dfile=C:\Users\Usuario\Downloads\Simple-Yaml-1.8.3.jar ??

thorn crypt
#

k my bad

#

Marker (ProtocolLib 5.0.0 Spigot 1.19.3)

sterile token
#

Mainly trying to install the jar in local maven repo

#

Where i run the cmd?

#

On a project or where?

#

oh right

#

I was doing it from inside aproject

#

haha

#

๐Ÿ’€

wet breach
#

should be fairly obvious what needs to be corrected

sterile token
#

I couldnt process your answer

wet breach
#

not sure why when you have no problems all other times

#

anyways, the output gives you what needs to be fixed

sterile token
#

I dont have admin permissions

river oracle
#

You need to use install-file goal

sterile token
#

Im really stupid i dont remember the password

wet breach
#

install:file doesn't exist install-file does

sterile token
#

he?

#

No?

#

Thats what chat gpt said

#

so its wrong them

wet breach
tawny remnant
#

On custom ExpBottleXp how do i set the condition of the item's name?

sterile token
mortal hare
#

i just realised that in 1.20 proper npcs could be created

#

without packet trickery

wet breach
#

will have to see

sterile token
#

๐Ÿคฃ

river oracle
mortal hare
#

yea

#

im hyped for that update

wet breach
#

most of the reasons for doing packet is because of some things

wet breach
#

but depending what they have changed, it may really just not be necessary and would be more work then necessary

#

IE, if they make it easy to give NPC's no AI, no Ticking etc

#

and some other things

mortal hare
#

the fact that you can transform entity models in 1.20

#

is revolutionary

wet breach
#

in 1.20 the new holograms are not ticked I don't think

mortal hare
#

yea, but it required resource packs

wet breach
#

making them more advantageous then your typical hologram

mortal hare
#

with 1.20 resource packs are not needed anymore

#

to stretch and manipulate models

wet breach
#

resource packs are probably still going to be needed for some things

river oracle
#

Easier Custom blocks ๐Ÿ’ฏ

wet breach
#

to stretch and manipulate models or the default ones, probably not, but if you want it to be completely different resource pack going to be needed

river oracle
#

Oh that's true

#

I wonder how'd that end up looking though

mortal hare
#

and by using minecraft education edition skin servers exploit

#

you can upload hd skins

#

apply them to the player heads

#

and have hq resolution textures

#

automatically downloaded from the server

#

you can upload skins

#

with that much quality

#

with education edition accounts

#

stretch those out

#

and voila

#

you have a custom entity

#

with custom textures

#

without resource packs

river oracle
#

You could also do that for custom blocks

mortal hare
#

yep

river oracle
#

Since you have hit detection

proper summit
#

Hi, guys

Who knows how to realize this?

#

So that the leash is attached to the block

hazy parrot
#

Someone was doing that here recently

chrome beacon
#

There's an invisible entity in that brewing stand

#

connect the leash to it and you're done

proper summit
chrome beacon
#

So why ask the question if you know how?

river oracle
proper summit
#

I want to do this in code so that I don't use an invisible entity

remote swallow
river oracle
#

To spawn the invisible entity

chrome beacon
#

You're going to need a mod if you don't want an invisible entity

river oracle
#

I mean if he is worried about server load I think packets is the way to go vs spawning it fr there

lost matrix
tawny remnant
kind hatch
candid geyser
#

What should I do when a plugin encounters an error and cannot continue?

river oracle
#

Contact the developer

candid geyser
#

No I mean like for a plugin that I'm developing

river oracle
#

Learn how to read errors and fix the bug

candid geyser
#

No I mean like how should I gracefully shut down execution of a plugin

river oracle
#

Iirc PluginManager had a shutdown method

#

Just log before you shutdown

#

?jd-s

undone axleBOT
candid geyser
#

thanks

river oracle
#

My internet is to slow to find the specific method sorry bout that

#

Damn data doesn't work in school

candid geyser
#

but something like getServer().getPluginManager().disablePlugin?

chrome beacon
#

Yeah use that

proper summit
dry yacht
smoky oak
#

cuz thats telling the client theres stuff where theres actually none server side

mortal hare
#

since that is how that is being rendered

#

if you use packets you will need to sync that with the server

dry yacht
mortal hare
#

you can do this with packets, but in that case you need to write your own mini server

#

that syncs your packet entities with the rest of the server

kind hatch
mortal hare
#

but instead of making player entities leashable

#

and it was all packet based

#

but that was sooo bad

#

in terms of how it was written

#

due to how much you need to handle to make them appear for all of the players

#

(dimension change, player quit, teleport, unload chunk, etc)

#

everything would needs to be synced

#

and you need do this asynchronously (thread locks, method sync, atomic vars classes) just because the packet handling is by default async

#

it was glitchy af

#

its just not worth it

#

unless you've written some packet entity api or smth

#

to take care of that

#

but even that would be inefficient to run, because you're still ticking the entity (but you've made your own entity ticking), so there's no need to make it packet based

dry yacht
# kind hatch IIRC, his system does utilize real entities. Back when he first started figuring...

I know that smile is better at abstracting than I am, and I would not think of this as hard or as destined to end up in a ratsnest. It's not that hard. You just intercept the packet stream of players, spawn fake entities and intercept packets interacting with them, to call your own callbacks. You could also even use the bukkit API to create and configure the NMS entities, while you'd just need to send spawn and meta packets. Not that complicated.

#

The great thing is that everything your plugin brought would disappear when it's unloaded. That would be pretty impressive, imo.

mortal hare
dry yacht
#

Yeah, sure, not necessarily.

crimson scarab
#

anybody know a good path finding library

mortal hare
#

your server unloads entities that are outside server's render distance anyway

dry yacht
#

If the server owner decides to remove the plugin again, I'd still think that it would be cool if all those things went by themselves.

#

So that just a database dump could bring it all back if they so desire.

mortal hare
#

you can just remove the entities when the server shutdowns

#

or when the plugin is unloaded

#

the thing is, by doing packet based entities, you're basically replicating minecraft server functionality

#

but in more of a glitchy way

#

its unsafe, not cross compatible and hard to maintain

kind hatch
mortal hare
#

if he does this packet based, imo that's overengineering

#

that doesnt add up any benefit

#

whatsoever

#

0 pros, besides that they are not ticked for functionality as much

#

i've already tried this year ago

#

but with npcs

#

it had a customizable render distance

tardy delta
#

welcome to brasil

mortal hare
#

in that case i had no choice but implement my own entity tracker since NMS player entities are very hardcoded to the networking classes

#

or use a citizens api

dry yacht
# kind hatch I mean, yea, thatโ€™s fair. Although, smile only started that project like 2 days ...

I hope I didn't come accross in a wrong way. I very much like the idea and I don't say that they have to do anything another way than the one they've decided on... would never do that.

I just like to keep the ideal in high esteem. In an ideal world, plugins don't leave temporary structures behind when unloaded. I'd like to see a world where resource management is actually taken seriously, which is why I even brought that up in the first place. Just as an idea, nothing more.

dry yacht
mortal hare
#

i'm skeptical because i've already tried this, and it was not fun ๐Ÿ˜„

#

well maybe because my fake entities were being moveable idk

#

maybe implementing static fake entities is a lot easier

kind hatch
dry yacht
# mortal hare i'm skeptical because i've already tried this, and it was not fun ๐Ÿ˜„

It wasn't fun because you didn't design it well enough. That's not on the idea, that's on you.

Why would you spawn and tick an invisible entity just to spawn a leash? Seems wasteful. That leash is basically static. The blocks, for example, I'd never spawn packet based. That's where I'd draw the line. But the armor stands definitely also would be candidates for packets. The server adds no worth there, so it doesn't need to know of em.

mortal hare
#

its not possible to that without a separate entity

#

and those leashed players can move

#

so i needed to keep the leash tracking entity to player's location

#

and handle all the edge cases

#

i could've done this with a simple invisible server entity

#

but i chose packet way

dry yacht
#

Of course, the more complex the idea becomes, the more cases you add! :). But for the leashes and armor stands, it's literally dead simple.

untold jewel
#

?paste

undone axleBOT
untold jewel
#

Could anyone help me with this error log?

#

occours when im using my /clan create <name> command.

analog thicket
#

Is the best way to make holograms just to use Holographic displays?

#

Their api?

topaz cape
#

why not call it E

analog thicket
#

But how easy would it be to create your own?

topaz cape
#

i love E

#

lol im messin

analog thicket
#

Oh thank you, ill take a look

#

oh damn its really easy

quaint mantle
#

how do i fix this?

Default system encoding may have misread config.yml from plugin jar I think its encoding my unicodes wrong

#

what itlitterly just logs that

#

are u stupid

#

[14:01:00 WARN]: [Plugin] Default system encoding may have misread config.yml from plugin jar

#

what code am i supposed to send

#

no

#

spigot logs that

analog thicket
#

Well shit i can a problem, /mobkill * does not work to remove this?

#

It works for other armorstands tho lol

#

Nope tried that too

#

forgot to add a remove in code, now its bugged lol -.-

#

Nope :/

#

Yep

#

Luckily its a test server so i guess it will stay there forever lol

quaint mantle
#

server

#

It does

#

it makes my unicodes gay

#

I get it form the config

#

xโ– 

#

v

#

โ– 

#

its supposed to be

#

but the config has that

#

like

#

it has โ– 

#

but in game it displays as that nonesense

#

NORMAL: "&aโ—€"

#

what

#

i can type it in chat tho

#

with no problem

#

no

#

im not gonna do that tho cause i need those

#

thats all it messes up

weak meteor
#

Hey, so i wanna start at this of developing plugins and stuff and i dont know if watching youtube videos is good bc i wanna rlly understand whats going on... I actually now that C# and Java are almost equal and i know very good C# OOP. I just wanna know some tips or where to start in this. ;)

chrome beacon
#

Javadocs, Forums and the wikis are also great ways to learn

mortal hare
#

try researching spigot api

#

javadocs

#

and then move on to NMS and packets

weak meteor
#

Yes but i dont actually now how to read a documentation

#

like how to use each thing

#

ya know?

smoky oak
mortal hare
#

what

weak meteor
#

Im using IntelliJ IDE

mortal hare
#

he doesnt know how to read the docs

#

not how to add them

chrome beacon
#

?jd-s

smoky oak
#

well yea

undone axleBOT
smoky oak
#

ctrl q

#

thats how you read them

mortal hare
#

lol

#

i didnt knew that hotkey

#

i always hover on the specific method

weak meteor
#

like, i know this things are classes that contain x commands and need certain params to work and do their thing but like, where to find how to use the listeners or how the listeners work in a class

chrome beacon
#

Use the searchbar in the javadocs

smoky oak
weak meteor
mortal hare
#
public void onEnable() {
  this.getPluginManager().registerEvents(new YourListener(), this);
}
smoky oak
#

on that topic, is there a way to add the source to maven such that F4 does show the source instead of the decompiled api?

chrome beacon
#

?eventapi

undone axleBOT
mortal hare
#

would register your listener

#

in the listener you specifiy annotated @EventHandler method

#

in which you provide one argument that correspond to the event type you're listening

weak meteor
#

Yes

mortal hare
#
public class YourListener implements Listener {

  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    event.getPlayer().sendMessage("Welcome to the server");
  }
}
#

this is a listener to the player join, in which player gets the message welcoming him to the server

mortal hare
weak meteor
mortal hare
#

since i dont have a constructor

#

inside the class

#

default one is provided without args

#

()

weak meteor
#

Okay

mortal hare
#

thus no args are passed

weak meteor
#

Let me try with a join

dry yacht
quaint mantle
#

no it doesnt

mortal hare
#

YourListener.class

public class YourListener implements Listener {

  @EventHandler
  public void onJoin(PlayerJoinEvent event) {
    event.getPlayer().sendMessage("Welcome to the server");
  }
}

MyPlugin.class

public class MyPlugin extends JavaPlugin {
  public void onEnable() {
    this.getPluginManager().registerEvents(new YourListener(), this);
  }
}
dry yacht
quaint mantle
#

i litterly just do config.getString

mortal hare
#

in order for the plugin to work

chrome beacon
mortal hare
#

you need to add plugin.yml file to your packaged jar

#

which contains the main key specifying your classpath to your main class file (in the provided case - MyPlugin.class)

weak meteor
mortal hare
#

and add other metadata properties of your plugin

dry yacht
weak meteor
#

ive got:
java
cirosanchezb.astralgkits.AstralGKits
AstralGKits.class
onJoinMessage.class
resources
plugin.yml

#

plugin.yml has authors, name, desc and version

quaint mantle
mortal hare
#

yea

weak meteor
#

name: AstralGKits
version: '${project.version}'
main: cirosanchezb.astralgkits.AstralGKits
api-version: 1.19
authors: [ CiroSanchezB ]
description: Astral GKits is a plugin for easy gkits or kits.

mortal hare
#

that's fine

weak meteor
#

in other for using event.getPlayer(); i need to import that

dry yacht
weak meteor
#

org.bukkit.event ?

mortal hare
#

yes

#

because PlayerJoinEvent is a class

#

belonging in the org.bukkit.event package

chrome beacon
#

You use the import for the event you're listening to

#

Intellij should be suggesting the correct imports for you

quaint tapir
#

?particles

weak meteor
#

nope isnt autoimporting

chrome beacon
#

You don't need to write them yourself

quaint mantle
#

?

#
    override fun onEnable() {
        instance = this
        saveDefaultConfig()

quaint tapir
#

whats the spigot command for particles

smoky oak
dry yacht
smoky oak
#

*1min

quaint mantle
#

litterly just Plugin.instance.config.getString("blah")

weak meteor
#

like look at this:

    public void onPlayerJoin(Event event){
        Player player = event.getPlayer();
        player.sendMessage("Welcome to the server!"+ player.getName());
    }```

im getting errors all along in 

> Player player = event.getplayer();
> sendMessage and player.getName;
#

And my little friend intellij isnt autoimporting as it should

chrome beacon
#

You need to listen the the player join event

smoky oak
chrome beacon
#

You're trying to listen to the Event interface which won't work

weak meteor
chrome beacon
#

PlayerJoinEvent

#

It's a class

weak meteor
#

yes

mortal hare
#

PlayerJoinEvent is what you should be using

#

not Event

weak meteor
#

Ohhh

mortal hare
#

method name could be anything

#

the event api doesnt care about the method name

#

all it cares is what method args annotated with @EventHandler are

weak meteor
#

but its like for anything? i refer like if someone clicked an inventory it has to be InventoryClick inventoryClick?

#

to make an example?

chrome beacon
#

Wdym?

#

To detect the inventory click you use the InventoryClickEvent

mortal hare
#
    @EventHandler
    public void onInventoryClick(InventoryClickEvent event){

    }
#

you basically add methods

weak meteor
#

So theres an event for everything?

mortal hare
#

for each of the event

#

you want to listen

#

basically yeah

weak meteor
#

k

smoky oak
chrome beacon
weak meteor
#

thank you both

mortal hare
#

not for everything but for the most part

weak meteor
#

sorry for being such a stupid

mortal hare
#

InventoryClickEvent class is just a context class

#

which has the information

smoky oak
#

the three things that have to stay are the @EventHandler, the public void and the EventType

dry yacht
mortal hare
#

about the situation at that moment

#

regarding your event

#

InventoryClickEvent holds the information about the clicked slots

#

allows you to get the current clicker

#

etc

weak meteor
smoky oak
#

also do take note that specifying WHICH event you want to trigger helps

weak meteor
#

only having trouble with listeners

mortal hare
#

all the methods of InventoryClickEvent

#

you can find every available method and fields here ^^

weak meteor
#

Thanks

smoky oak
#

doing this is just plain stupid but technically works:

@EventHandler
public void method(Event event){
  if(event instanceof PlayerJoinEvent joinEvent){...}
  if(event instanceof PlayerPreJoinEvent preJoinEvent){...}
}
mortal hare
smoky oak
#

so do it in separate methods

mortal hare
#

you just search via the search bar what you need

smoky oak
#

thats why you call specific events instead of just Event

chrome beacon
smoky oak
#

why

chrome beacon
#

It's static

mortal hare
#

is it called javadoc or javadocs

chrome beacon
#

So extending classes wouldn't be able to have their own if it had one

smoky oak
mortal hare
#

i've seen both used

smoky oak
#

idk what ur on about olivio

chrome beacon
#

?eventapi

undone axleBOT
weak meteor
#

this.getPluginManager isnt imported by org.bukkit.plugin.PluginManager?

ember ridge
#

hello, I'm kinda a beginner at developing plugins, I've been trying to figure out how to make a custom potion effect but nothing worked for me. is there a guide, some documentation for this specific issue? I just need the effect to have duration and name, nothing fancy

chrome beacon
#

You can't listen to abstract events nor the interfaces

smoky oak
chrome beacon
#

Since they're missing handlerlists

ember ridge
#

oh, so there is no way to do it?

smoky oak
#

but you have to do it separately

chrome beacon
smoky oak
#

what you can do is:

  1. Create potions and potion particles with non-natural colors
  2. write code to make the potion do what you want
  3. use scoreboard or titles, bossbars etc, to display the potion effect
weak meteor
#

in onEnable

chrome beacon
#

Yeah that's fine

weak meteor
#

thats the problem

#

IntelliJ isnt detecting the import

#

but im importing that stuff

smoky oak
chrome beacon
#

You probably forgot to import onJoinMessage

weak meteor
ember ridge
#

oh okay, makes sense. I'll use a scoreboard then. That's a bummer though, but thanks for letting me know

weak meteor
chrome beacon
#

What does the error say

smoky oak
#

maybe replace the luck potion thingy

#

thats not used by anything

mortal hare
#

the closest thing that i could think of is using toasts

#

to display potion effects

smoky oak
mortal hare
chrome beacon
smoky oak
#

ah

mortal hare
#

i believe you can set the time

smoky oak
#

can you edit them?

mortal hare
#

yes

smoky oak
#

ah

#

so i was outdated again

weak meteor
#

i got that

smoky oak
chrome beacon
#

?paste

undone axleBOT
weak meteor
mortal hare
#

or maybe you cant set the time

#

not sure

chrome beacon
#

Didn't see that earlier

weak meteor
#

yes

#

how to?

ember ridge
#

I might use that, thanks. I don't think it'd be a problem to use scoreboards in my case at all, if I can listen to the player drinking a potion or something

#

as I said, I'm a beginner but I'll figure it out

chrome beacon
weak meteor
#

just that?

#

just literally calling Bukkit.getPluginManager();?

chrome beacon
#

Yeah

#

And then use that to register the event

weak meteor
#

Bukkit.getPluginManager().registerEvents(new, this);

#

new listenerName?

chrome beacon
#

Yeah

mortal hare
#

if i create anonymous class, and pass outer class field which is final

#

does it copy the value of the variable

#

that is final to the inner class

#

nvm

#

i answered it myself

#

all objects are passed by reference

chrome beacon
#

Thought you were asking about the bytecode for a sec there..

smoky oak
#

theyre cloned

#

nvmind im dumb

worthy scroll
#

i'm trying to shrink the world border by a certain size every day, but it doesn't move when this is called.
is there anything i am doing wrong here?

smoky oak
#

whats ur shrink amount

worthy scroll
smoky oak
#

huh?

#

it should move

#

the codes correct

#

print out size and shrink amount before you call the border.setsize

#

if it does display correctly god help you cuz i certainly cant

worthy scroll
#

yea it's getting 0 for borderShrinkAmount for some reason

smoky oak
#

k good

#

trace it back

#

u probably forgot to pass or calculate it

#

imma be off now

worthy scroll
#

thank you for the help ๐Ÿ™‚

smoky oak
#

eh its my go to debug

#

print out shit

#

i have specific methods for that

#

i just call p(String s)

#

and it goes like [Plugin / Info]: s

#

good luck running a debugger on a spigot server lol

tardy delta
#

should be possible

#

only times out clients

swift sequoia
smoky oak
#

i mean how are you going to find whatver ur looking for

smoky oak
tardy delta
#

by clicking on the vars

#

as you would do normally

swift sequoia
weak meteor
#

?paste

undone axleBOT
weak meteor
#

just trying to call my listener

coral kelp
#

anyone want to help me make my server i need a really good scripter one space left!

glad prawn
terse ore
#

Best way to make a countdown?

#

2 minutes
1 minutes
10 seconds
...
3
2
1

#

Just make 3 runtasklater

#

and a repeating one?

weak meteor
#

and maybe with a algorithm on depending how much time the user wants adds x time on sleeps

native gale
terse ore
#
AtomicInteger i = new AtomicInteger(10);
                Bukkit.getScheduler().scheduleSyncRepeatingTask(Events.getInstance(), () -> {
                        Bukkit.broadcastMessage(Color.translate("&6The event will start in &e" + i + " &6seconds"));
                        i.getAndDecrement();

                        if (i.get() == 0) {
                            this.cancel();
                        }
                }, 0, 20);```
#

How can I exit it?

dry yacht
# terse ore Best way to make a countdown?

Good question, actually, xD. I think that it would be best to store the points in time at which a broadcast will be printed in a configuration file, either as <x><h/m/s> or just as second values, like 120, 60, 30, etc. Then, just loop these, create a delayed task for every point in time (delay = duration - point) and print the formatted value inside of it's callback. This way, you don't need a ticking countdown timer and save on quite a lot of calls, based on how high your value is.

dry yacht
terse ore
#

i have no idea of AtomicInteger tbh

#

I just accepted the intellij suggestion

#

I was reading info about it in the docs

dry yacht
#

decrementAndGet is equivalent to --x while getAndDecrement is x--

#

So instead of decrementing and wasting that extra get, you can combine both.

terse ore
#

what's the diff between --x and x--?

dry yacht
#

Post-decrement and pre-decrement. --x decrements first, then returns the value, x-- returns the value first, then decrements

terse ore
#

ooh

#

wait I did it in another way

#

but

dry yacht
#

Btw, you could get rid of the atomic all together by just using an anonymous runnable instance with the counter as it's instance variable.

terse ore
#
                for (int i = 10; i > 0; i--) {
                    Bukkit.getScheduler().runTaskLater(Events.getInstance(), () -> {
                        Bukkit.broadcastMessage(Color.translate("&6The event will start in &e" + i + " &6seconds"));
                    }, 20L * (10 - i));
                }```
#

could I do it this way?

dry yacht
#

Yeah, that should work. You'll just never reach zero, as you compare strictly greater i > 0.

remote swallow
#

use >= instead

twin nimbus
#

is there a way to make subtitles not go offscreen

#

if you use player.sendTitle to send a title and subtitle, there isnt any way to make it go on a new line even with \n

river oracle
#

not without a client mod

#

maybe components?

#

but that's the only idea

regal scaffold
#

How can I convert a project from gradle to maven

#

Should I make a new project on IntelliJ selecting the gradle build file?

remote swallow
#

create a new maven project and then convert the dependencies

glad prawn
#

And..

winged anvil
#

anyone know any resources that use specific textures for specific gui names?

#

im not 100% on how plugins do it, i havent done any messing about with resource packs up until now

fierce whale
#

I knew that in async task, It's unable to use Bukkit Method. But some of methods like setItemInMainHands, getLocation etc.. does work.
Does anyone know about that?

warm mica
twin nimbus
#

๐Ÿ—ฟ

pallid patio
#

Does anyone have a function to paste schematics with fawe api?

wet breach
#

Worse that happens is a bunch of cme's get tossed or weird things happen

lost matrix
lost matrix
kind hatch
#

WHAT? You actually made it packet based from the start? I thought you were using normal entities.

lost matrix
#

oof that would have been not easy on the server or i would have needed a custom nms implementation for every version.
Because leads sometimes just vanish on normal entities. Those lines stay forever and dont use any server resources hypers

ancient island
#
        if(entity.getLocation().getChunk().isEntitiesLoaded() || force)
            for (Player p : Bukkit.getOnlinePlayers()){
                if(p.hasLineOfSight(entity) || force)
                    ((CraftPlayer) p).getHandle().b.sendPacket(packet);
            }
    }```

so uhh why is isEntitiesLoaded erroring
lost matrix
ancient island
#

yep

#

idk why import org.bukkit.Chunk; keeps greying out

lost matrix
#

What version are you on?

ancient island
#

1.17.1

lost matrix
#

Thats too old. I believe this method was added to the API just recently

buoyant viper
#

this is why we need to start documenting what game or API version classes or their members were added in

#

:v

lost matrix
#

Yeah i think an @Since annotation or something similar would be useful. But someone has to actually go through the whole API and annotate every method...

buoyant viper
#

i think a forever ago (like january) i had talked abt it

#

#general message

#

jan 31st :p

hybrid turret
#

I was wondering, what's the difference between Bukkit.reload() and Bukkit.reloadData()? Is Bukkit.reloadData() part of Bukkit.reload()?

lost matrix
#

reloadData wont reload plugins. Only the mc part of the server.

hybrid turret
#

And reload does all of it?

kind hatch
#

One should reload stuff like datapacks, the other is the normal /reload

lost matrix
#

Even then it will lead to problems and inconsistencies eventually

hybrid turret
#

I'm doing a full overhaul of all commands in my big boy project basically. Including (sadly there's no other way since you cant override it) disabling the /reload command and replacing it with my own

#

Lol

#
  • more commands ofc
#

It's basically supposed to be the new Essentials but more

native gale
#

In general it is usually a bad idea to use /reload because some plugins break if onEnable is called more than once and you really can't do much about that

eternal oxide
#

yes and no

#

it does but it does more before

lost matrix
#

Use ThreadLocalRandom

#
  public int[] randomCoords() {
    final ThreadLocalRandom random = ThreadLocalRandom.current();
    final int x = random.nextInt(-500, 500);
    final int y = random.nextInt(-500, 500);
    final int z = random.nextInt(-500, 500);
    return new int[]{x, y, z};
  }

Also: You dont need to pass x, y or z

#

Sure. If a method needs no parameters from the caller then you dont need to pass anything.

#

Unless you want them to spawn in caves.

#

So only generate a random x and z and then use getHighestBlockAt(x, z)

half bane
#

What's the fastest way to make plugin for all versions?

eternal oxide
#

don;t use NMS

half bane
#

I'm serious

#

But not every version

#

I know

#

But speaking of programming itself

eternal oxide
#

everything he told you is about programming

dry yacht
eternal oxide
#

he asked for easiest

#

So implies no NMS

#

Build for 1.8 API and use nothing newer

dry yacht
eternal oxide
#

true

#

fastest is to not use NMS and build against 1.8

#

Most sensible is support latest and forget about older versions

dry yacht
# half bane Mhm

Again, I'd need a use-case, but I could show you an example of how I solve it, if you'd be interested. It's not final yet, but it's pretty fast in terms of getting it done.

dry yacht
eternal oxide
#

yes

#

you may want to .toLower as well

dry yacht
# half bane Sure

Don't know if this is of any use to you, but that's what I came up with, after trying many approaches: https://paste.md-5.net/eqeteyusew.java

It's my own library, but it's builder notation, so quite simple to read regardless. I specify version ranges on which certain ways of accessing APIs work, and the underlying system decides on which to use for the current version, then exposes a simple and unified API at the top.

There is still much to be done, but I think that it's way easier than to have to write one implementation for each version. That would only be viable - in my opinion - if you also only write those for breaking changes and patch the classes constantpool to allow for version ranges as well. But you'd have to know all versions.

eternal oxide
#

You could handle ALL commands in one class and still be oop

#

as it would then just be a command handler

#

However, with Spigot you would be much better having one class per command, as thats how it's designed

#

unless you are talking about args

tardy delta
#

acf my beloved

eternal oxide
#

I've never used a framework

#

always ๐Ÿ™‚

dry yacht
#

Yep. That's a good sign, :))

eternal oxide
#

Sometimes I look back and think, damn thats good, no way I wrote this ๐Ÿ™‚

tardy delta
#

i began using a framework cuz my onCommand was a mess

#

i tried to but it was a mess of functional interfaces and looked awful

eternal oxide
#

If my class is a mess I tend to try not looking at it

#

If I rewrite I get locked in a loop of constant rewrites

#

if it works ๐Ÿ™‚

tardy delta
#

50-75% of learning java?

#

being able to read is not difficult

#

about what reading are we talking

dry yacht
#

Try to stay under a gigabyte, LOL

tardy delta
#

thats gonna go brr when transferring it with sftp

dry yacht
#

A binary patch library? :-:

#

Alrighty, don't know what it's about, but sounds fancy! :)

buoyant viper
#

ayo Wtf is that IDE

#

NetBeans?

#

im judgin the Light theme if anything

#

bc i know what Eclipse and IntelliJ look like

#

and that was neither

#

so the logical answer is NetBeans, bc no one uses BlueJ

tardy delta
#

people in companies work with light themes too

dry yacht
#

Are we talking patching import statements and FQNs, or are you trying to modify actual logic? xD

buoyant viper
#

i can and i will

#

yes/no i think

dry yacht
#

I bet netbeans is actually crashing less than IJ

buoyant viper
#

full projects in IJ? no, not unless ur on Mac

#

but multiple modules? yeah

tardy delta
#

saw it yesterday

undone yarrow
#

I want to make a system where players can look around for scrap metal, which they can find by right-clicking blocks that have particles above them. How would I go about checking if a player has right-clicked a block, with a certain particle on it, that I specified in the same plugin

buoyant viper
#

PlayerInteractEvent

undone yarrow
#

I'll give it a look

buoyant viper
#

i think only on Mac whygodwhy

#

Eclipse also has a structure like NB

#

bc of "workspaces"

dry yacht
#

That's just a module, right? That's cheating.

buoyant viper
dry yacht
#

Why is External Libraries then only there once, and not once per project?

undone yarrow
# buoyant viper PlayerInteractEvent

But to check if I clicked a block that has a particle, I first need a block with a particle. How can I make a command that adds a particle to a block when looking at it (basically specify that it's a block which contains scrap)?

tardy delta
#

imagine hiding your username

dry yacht
#

Okay, then it's a maven project. Still not a full standalone project you're loading in.

undone yarrow
#

Bro look this name up, you'll find around 5000 people with the same name

buoyant viper
#

how to replicate? i cant find anything that could let me do this

#

all i get are Modules

dry yacht
buoyant viper
#

wtf do u need the parallel stream for

tardy delta
buoyant viper
dry yacht
tardy delta
#

no

dry yacht
#

Sad stuff

#

Is a teleport asynchronous?

#

Otherwise, why do you need to parallelize the iteration over the set

undone yarrow
lost matrix
#

"all at once" means within one tick. So a simple for loop will do.

dry yacht
buoyant viper
#

oh god u can do it w Gradle too

#

doesnt feel like a proper workspace tho tbh..

lost matrix
dry yacht
dry yacht
#

Their software is really buggy... either the badge doesn't work, or they don't push updates. I'm happy that it's at least free.

terse ore
#

in 0 I will send a message saying the event has started

#

instead of in 0 seconds the event will start

dry yacht
terse ore
#

but I is not defined inside it

#

and idk how could I fix it

dry yacht
#

20L * (10 - 1) is the last iteration, so you'll never reach the final full 10 seconds.

terse ore
#

ik

#

or I think I do

#

so when it gets to 0

#
                for (int i = 10; i > 0; i--) {
                    Bukkit.getScheduler().runTaskLater(Events.getInstance(), () -> {
                        Bukkit.broadcastMessage(Color.translate("&6The event will start in &e" + i + " &6seconds"));
                    }, 20L * (10 - i));
                }

                Bukkit.broadcastMessage(Color.translate("&6The event hast started"));
                Events.getInstance().event.joineable = false;```
buoyant viper
#

what if u just runTaskTimer

terse ore
#

let me check that

buoyant viper
#

wont need to do a loop, n can just set it to run every 20 ticks

dry yacht
# terse ore and idk how could I fix it

If you want to capture i in the state of your current iteration, you need to create a copy inside the for loop, but outside of the lambda. Something like int currentI = i. Then, the lambda can capture that "effectively final" variable.

buoyant viper
#

and then use like BukkitRunnable so u can cancel it after 10s

#

or whatever the Task thing is

#

BukkitTask?

terse ore
#

so should I use BukkitRunnable?

#

I used it but they told me not to

buoyant viper
#

sec

#

?jd-s

undone axleBOT
dry yacht
buoyant viper
#

oh yeah im thinking of BukkitTask

dry yacht
# terse ore

Oh, btw, weren't you saying that you're not going to print at every second, but at fixed numbers of remaining seconds? That's kinda not what you asked about initially, IIRC.

terse ore
#

I just asked how to do it because I had no idea

lost matrix
dry yacht
terse ore
lost matrix
#

Ah ok XD

terse ore
#

I did it

#
                for (int i = 10; i > 0; i--) {
                    int currentI = i;
                    Bukkit.getScheduler().runTaskLater(Events.getInstance(), () -> {
                        Bukkit.broadcastMessage(Color.translate("&6The event will start in &e" + currentI + " &6seconds"));
                    }, 20L * (10 - currentI));
                }```
dry yacht
#

right. No need to use it in the parameter to runTaskLater, just saying.

#

You need that copy because the callback will be called after the loop already progressed, and thus i would be different by that time. That's why java disallows it.

hybrid turret
#

If i use Bukkit.createInventory() and I add a title for the inventory, can I get that title again for a Listener? I can't find a method

terse ore
#

event.getView() ?

hybrid turret
#

um

#

oh

#

ty lmao

terse ore
#

np

hybrid turret
#

missed that