#help-development

1 messages · Page 1547 of 1

chrome beacon
#

and how it's set

smoky oak
#

wdym? I showed you that already?

chrome beacon
#

You didn't

smoky oak
#

or do you mean the code for setting the config?

chrome beacon
#

Yeah how you set it

smoky oak
#

It's check if player+race is valid then does this:

UUID id = p.getUniqueId();
Echo.Instance().config_players.set(id+".race", args[1]);
Echo.Instance().savePlayerConfig();```
Where `Echo.Instance()` is `return Bukkit.getPluginManager...` and savePlayerConfig:
```java
public void savePlayerConfig() {
        try {config_players.save(new File(dataFolder, "config_players.yml"));
        } catch (IOException e) {
            this.getLogger().log(Level.SEVERE,"Could not save file 'config_players.yml' due to unexcepted error.\n"+e.getMessage());}}```
#

it actually produced the player_config.yml part i posted earlier

chrome beacon
#

Wait why are you returning the plugin manager instance of your plugin

smoky oak
#

since im dumb but it works

tardy delta
#

lol

smoky oak
#

I'll fix the glaring issue first

chrome beacon
#

It works but you should store the instance in a variable

smoky oak
#

^

chrome beacon
#

So I still don't see cfg that you're reading from

dense goblet
#

@smoky oak try logging every relevant string and boolean you're working with and see manually where it's going wrong

chrome beacon
#

You're settting config_players but reading from cfg

#

Is this intended

smoky oak
#

no

#

thats probably the issue

tardy delta
#

instead of this
meta.setDisplayName(ChatColor.DARK_GREEN + "Change to ready");
can i just use this?
meta.setDisplayName("§2Change to ready!")

smoky oak
#

why don't you try?
And that was the issue... a goddamed typo. Thanks for your time

#

As for FourteenthBrush, I think it should work, since minecraft java should run the same on every system. You should not get any weirdness along of File.Separator you need to take care of

dense goblet
#

So ChatColor.DARK_GREEN becomes just DARK_GREEN

chrome beacon
smoky oak
#

it takes a lot to insult me but you sounded friendly the entire time

#

new problem tho

tardy delta
#

oh ok

smoky oak
#

plugin.yml defines commands but /help does not show it

chrome beacon
#

Could you send the plugin.yml

#

And since it's a yaml file it's space sensetive so double check that

smoky oak
#
name: OfRaces4
main: io.github.moterius.ofraces4.Echo
version: 1.0
api-version: 1.17
commands:
   getrace:
     usage: /<command> <player>
     permission: ofraces4.info.races
     description: Retrieves information about a player
     aliases:
     - ofraces:getrace
     - ofracees4:getrace
   setrace:
     usage: /<command> <player> <race>
     permission: ofraces4.set.race
     description: Tries to set the race of a player (unimplemented as of now)
     aliases:
     - ofraces:setrace
     - ofracees4:setrace
   amimoterius:
     usage: /<command>
     description: Are you?
     permission-message: How in the ever blazing hell did you get this message, there isnt a perm on this command.```
#

as far as i can see i set the spaces right

chrome beacon
#

You have 1 space too much

smoky oak
#

eh?

#

you mean its supposed to be two spaces and four spaces?

chrome beacon
#

two spaces

#

I'm not sure if it matters but you can try

tardy delta
#

for some reason this isnt working

@EventHandler
    public void onKill(EntityDeathEvent event) {
        if (!(event.getEntity() instanceof Monster)) return;
        Player p = event.getEntity().getKiller();
        if (p == null) return;
        Random r = new Random();
        int amount = r.nextInt(11) + 10; // 10 to 20
        Main.getInstance().eco.depositPlayer(p, amount);
        Utils.message(p, "§2§l+ $" + amount);
    }

I kill a zombie and it does nothing

smoky oak
#

nope

chrome beacon
#

ah ye

smoky oak
#

did change to 2 and 4 but still empty result

tardy delta
#

yes

dense goblet
#

Try log a message at the very top of the function

smoky oak
#

nothing

#

is it a requirement for commands to have a permission?

#

tf?

#

okay

#

i reloaded the server instead of the plugin

#

now it works

chrome beacon
#

ah

tardy delta
smoky oak
#

quantum bukkit - you don't know if its the code until you reload

tardy delta
chrome beacon
#

Yeah try to always restart when using bukkit

#

For quick changes use hotswapping

smoky oak
#

lesson learned trust no one especially not yourself

dense goblet
#

Which line is that?

tardy delta
#

Main.getInstance().eco.depositPlayer(player, amount);

chrome beacon
#

is eco null

#

Also I recommend running with Java 16 it will give you better error messages

tardy delta
#

well this part gives it a value

  if (economy != null)
                eco = economy.getProvider();
            if (eco == null) {
                Utils.logInfo("No economy plugin found!");
            }
chrome beacon
#

Don't use eco if it's null

smoky oak
#

huh is there a standard list of functions for a economy plugin?

chrome beacon
#

kind of yeah

#

Vault is one of the most used APIs

tardy delta
#

well if vault is installed and an economy plugin it should have a value

chrome beacon
#

and as such almost all economy plugins and plugins that use economy hooks it

tardy delta
#

both are installed

chrome beacon
#

I suggest adding some debug messages and finding what's null

dense goblet
#

Log if it's null and see if that's the issue

tardy delta
#

lemme try

dense goblet
#

Main, getInstance() or eco are null

cold field
tardy delta
#

its not the instance

dense goblet
# tardy delta

Then your eco setting code may not be called or its flawed

tardy delta
#

i'll try starting up without and economy normally that will send a log message

#

its not called i guess

vast sapphire
#

how do i use 1.17 blocks in intellij, the api was not updated

sage swift
chrome beacon
tardy delta
#

its a soft-depend because i want let the users choose if they use the vault part or not

#

is that a problem?

sage swift
#

no just making sure it's any kind of depend

tardy delta
#

oki

vast sapphire
chrome beacon
#

Are you creating a new project

vast sapphire
#

ye

#

still 1.15.2

opal juniper
#

just import it using maven

chrome beacon
#

You should install it

#

It's great

chrome beacon
opal juniper
#

what does it do

tardy delta
#

well it does print this

chrome beacon
vast sapphire
opal juniper
#

are you shading it????

chrome beacon
#

Probably

#

Why though

sage swift
chrome beacon
#

Well just create a project with templates really

#

I should have just said that instead

#

...

opal juniper
#

eh - i probs wont bother for now

#

i have no problems with just the vanilla way

hybrid spoke
opal juniper
#

seems like a bug but idk

hybrid spoke
#

we can't tell you without having any piece of code

chrome beacon
#

^^

cold field
#

@EventHandler public void onPlayerMoveItem(InventoryClickEvent event) { System.out.println("fired"); event.getWhoClicked().setItemOnCursor(new ItemStack(Material.ACACIA_DOOR)); }

sage swift
#

delay by a tick

opal juniper
#

idk if that will do anything

#

but try it

hybrid spoke
#

should

#

since his click is probably overwriting this function

opal juniper
#

possible

cold field
#

Does it exists a more elegant way?

sage swift
#

nope

opal juniper
#

what is unelegant about it?

sage swift
#

click events are wack

tardy delta
hybrid spoke
#

accept an unnecressary consumer and make some fancy lambdas

sage swift
#

maybe try adding it as a soft depend too

hollow river
#

hey so i have a problem checking if an itemstack is a specific custom item. i have a snowball (cobweb shooter) which does work when i do .isSimilar(CobwebBall.itemStack), but it doesn't work on my custom armor piece, is there a better/general way to check if an itemstack is the same as a custom itemstack?

hybrid spoke
#

then its elegant enough

tardy delta
#

ah now i got this
[MagmaBuildNetwork] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin.

chrome beacon
#

..

tardy delta
#

i added it as a softdepend

hollow river
opal juniper
#

read the article

hollow river
#

sorry about the lack of details, ask away

opal juniper
#

I mean

hollow river
#

ohhh thought that was unrelated

#

will read thank you

opal juniper
#

it allows you to store data on the item

sage swift
#

peepee, see?

hybrid spoke
#

if you just want to check if its the same, use #equals

hollow river
#

sounds good, i tried to work with nbt tags but one time isSimilar worked on a custom snowball item, so i figure it'd have to work on my custom armor as well but for some reason it doesn't

#

is there a way i can apply a custom tag without an api? nbt maybe?

opal juniper
#

pdc is just better nbt

hollow river
#

.equals returned the same

ivory sleet
opal juniper
#

well

#

from the plugin side

#

forgive me

#

for i have miss-spoken

lusty cipher
#

I get a IllegalPluginAccessException when I use a BlockEvent without overriding getHandlerList, however BlockEvent wants you to override getHandlers. Why does org.bukkit.event.BlockEvent have a seperate method that seemingly does the same?

ivory sleet
#

Oh no but pdc is just nbt abstraction

lusty cipher
#

oh wait sorry no

#

Event has

    @NotNull
    public abstract HandlerList getHandlers();
#

but when creating a custom event you still have to create a getHandlerList method

opal juniper
#

Yuhuh

lusty cipher
#

wtf

chrome beacon
#

Yeah you need that method

#

?events

#

;/

opal juniper
#

lmao

lusty cipher
#

I know I need it

hybrid spoke
#

so add it

#

xD

lusty cipher
#

Why the heck are there two methods doing the same?

hollow river
#

oh wait persistentdataholder is already integrated i thought it was an external library of some sorts you had to use, will see what i can do thanks @opal juniper !!

lusty cipher
#

this looks slightly stupid

hybrid spoke
opal juniper
#

its not normally abstract

chrome beacon
#

?eventapi

undone axleBOT
hollow river
#

on that note though, is there a "best" way to create full armor set bonuses? like if i want to add movement speed on a full set i'd have to run code everytime any player walks which wouldnt be efficient i think? is there a better way?

opal juniper
#

i mean

quaint mantle
#

Hello, im working with mcpi with spigot and i was thinking where can i find the documentation for it

opal juniper
#

then you can apply efffects

#

but yes - dont check every time they move

hollow river
opal juniper
#

md69 doesn't like it when you say that

tardy delta
#

how can my plugin say this when i set vault as a softdepend

[MagmaBuildNetwork] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin.
tardy delta
#

and btw is it soft-depend or softdepend?

#

i use the first one

lusty cipher
#

softdepend, without the dash

tardy delta
#

ah...

#

lemme see

opal juniper
#

ignore the inconsistencies

tardy delta
#

?paste

undone axleBOT
tardy delta
opal juniper
#

does it work

#

and why 1.13 api ver?

#

seems like a random version

quaint mantle
opal juniper
#

What are you trying to do

tardy delta
#

it told me to do so

quaint mantle
#

use minecraft api for python with spigot

opal juniper
#

no

#

dont do that

#

do NOT use python

tardy delta
#

🤡

quaint mantle
#

welp

chrome beacon
#

Spigot doesn't support or run Python as it's made in Java

quaint mantle
#

there is a library for it though

opal juniper
#

yeah

#

it is shit though

#

dont use it

quaint mantle
#

yeah

chrome beacon
#

Probably yeah I'd expect there to be one

quaint mantle
#

theres no information about it

opal juniper
cold field
# sage swift delay by a tick

I've made a delay of a tick and it doesn't work. I had even tried a delay of a few seconds but the cursor gets deleted

opal juniper
#

🤷‍♂️

#

ask in paper

#

and if they dont know open an issue

tardy delta
opal juniper
#

yeah

tardy delta
#

yeah eco is still null

#

i dont know how to fix it

vague cypress
#

Hi, I'm trying to make a right-click main menu. I want to make it so the items can't actually be removed from the GUI. I used this but it doesn't work.

      e.setCancelled(true);```

Any help would be greatly appreciated!
opal juniper
chrome beacon
chrome beacon
quaint mantle
lusty cipher
#

Java Question:
Does the following still pass a reference to the other function or does it pass by value?

void filter(ArrayList<Player> players) {
  something.filter(friends);
}
quaint mantle
#

yep i think its this one

vague cypress
#

Instead of the color codes you're saying?

lusty cipher
opal juniper
#

yesah

chrome beacon
supple marsh
#

Hello, I have a problem I have been trying to solve for about 2 hours now and still didn't solve it, came here for help, here is the problem:
I want to cancel the ability to stack 2 of the same certain item in the player's inventory, so what I did is this:

    @EventHandler
    public void onAccessoryStack(InventoryClickEvent event) {
        if (event.getClickedInventory() != null && event.getCursor() != null && event.getCurrentItem() != null &&
                !event.getCursor().getType().equals(Material.AIR) && !event.getCurrentItem().getType().equals(Material.AIR)) {

            System.out.println("Bruh");

            if (event.getCursor().isSimilar(event.getCurrentItem())) {

                System.out.println("Bruh1");


                if (Accessory.isAccessory(event.getCursor()) && Accessory.isAccessory(event.getCurrentItem())) {

                    System.out.println("Bruh2");

                    event.setResult(Event.Result.DENY);
                    /*event.setCancelled(true);
                    ItemStack cursor = event.getCursor().clone();

                    new BukkitRunnable() {
                        @Override
                        public void run() {
                            ((Player) event.getWhoClicked()).setItemOnCursor(cursor);
                            event.setCursor(cursor);

                        }
                    }.runTaskLater(bc, 4)*/;
                }

            }
        }

    }

The part commented is my other approach, I tried 2 approaches which none of them worked, the problem here is that both event.setResult() and event.setCancelled() both cancel it, but also delete the item held by the cursor (event.getCursor())...

Anyone can help?

undone axleBOT
quaint mantle
#

on a local server

chrome beacon
#

Yeah it has support for bukkit

#

Ignore him

lusty cipher
#

🤔

quaint mantle
#

there is literally nothing about it online

opal juniper
#

lemme read it

quaint mantle
#

even on the github they didt explain shit

tardy delta
#

yea i killed it

#

and i got that error

lusty cipher
chrome beacon
quaint mantle
#

yeah im looking into it thanks tho

opal juniper
#

wait my bad

#

you said

dusty sphinx
#

Is there a way to get the default world?

tardy delta
chrome beacon
vague cypress
#

When I try to use chatcolor to create the inventory it says Operator '+' cannot be applied to 'org.bukkit.ChatColor', 'org.bukkit.ChatColor'

opal juniper
#

you have to space them out

quaint mantle
#

i think it would be better to learn java

opal juniper
quaint mantle
#

than spend time on this

opal juniper
vague cypress
#

Well I was trying to use chatcolor.BOLD

chrome beacon
#

Here are some guides

#

?learnjava

undone axleBOT
quaint mantle
#

tysm

vague cypress
#

How do I bold it if I can't use ChatColor.GOLD + ChatColor.BOLD + "Menu"?

supple marsh
#

Hello, I have a problem I have been trying to solve for about 2 hours now and still didn't solve it, came here for help, here is the problem:
I want to cancel the ability to stack 2 of the same certain item in the player's inventory, so what I did is this:

    @EventHandler
    public void onAccessoryStack(InventoryClickEvent event) {
        if (event.getClickedInventory() != null && event.getCursor() != null && event.getCurrentItem() != null &&
                !event.getCursor().getType().equals(Material.AIR) && !event.getCurrentItem().getType().equals(Material.AIR)) {

            System.out.println("Bruh");

            if (event.getCursor().isSimilar(event.getCurrentItem())) {

                System.out.println("Bruh1");


                if (Accessory.isAccessory(event.getCursor()) && Accessory.isAccessory(event.getCurrentItem())) {

                    System.out.println("Bruh2");

                    event.setResult(Event.Result.DENY);
                    /*event.setCancelled(true);
                    ItemStack cursor = event.getCursor().clone();

                    new BukkitRunnable() {
                        @Override
                        public void run() {
                            ((Player) event.getWhoClicked()).setItemOnCursor(cursor);
                            event.setCursor(cursor);

                        }
                    }.runTaskLater(bc, 4)*/;
                }

            }
        }

    }

The part commented is my other approach, I tried 2 approaches which none of them worked, the problem here is that both event.setResult() and event.setCancelled() both cancel it, but also delete the item held by the cursor (event.getCursor())...

Anyone can help?

hardy swan
#

?paste

undone axleBOT
opal juniper
# tardy delta xd

I mean - normally i pass the plugin instance thru the constructor and i dont get issues like this. so try that i guess?

supple marsh
vague cypress
#

Thanks

opal juniper
#

what i said lmao

tardy delta
#

i logged the plugins instance and it was valid so

opal juniper
#

i always do this and i have never had an issue

#

but

#

i have never used vault

chrome beacon
opal juniper
#

they are trying

somber hull
#

trying to build 1.17 and it crashes here

tardy delta
chrome beacon
#

Did you restart after fixing the softdepend

tardy delta
#

yes

sage swift
opal juniper
somber hull
#

alright

opal juniper
supple marsh
#

Hello, I have a problem I have been trying to solve for about 2 hours now and still didn't solve it, came here for help, here is the problem:
I want to cancel the ability to stack 2 of the same certain item in the player's inventory, so what I did is this:

    @EventHandler
    public void onAccessoryStack(InventoryClickEvent event) {
        if (event.getClickedInventory() != null && event.getCursor() != null && event.getCurrentItem() != null &&
                !event.getCursor().getType().equals(Material.AIR) && !event.getCurrentItem().getType().equals(Material.AIR)) {

            System.out.println("Bruh");

            if (event.getCursor().isSimilar(event.getCurrentItem())) {

                System.out.println("Bruh1");


                if (Accessory.isAccessory(event.getCursor()) && Accessory.isAccessory(event.getCurrentItem())) {

                    System.out.println("Bruh2");

                    event.setResult(Event.Result.DENY);
                    /*event.setCancelled(true);
                    ItemStack cursor = event.getCursor().clone();

                    new BukkitRunnable() {
                        @Override
                        public void run() {
                            ((Player) event.getWhoClicked()).setItemOnCursor(cursor);
                            event.setCursor(cursor);

                        }
                    }.runTaskLater(bc, 4)*/;
                }

            }
        }

    }

The part commented is my other approach, I tried 2 approaches which none of them worked, the problem here is that both event.setResult() and event.setCancelled() both cancel it, but also delete the item held by the cursor (event.getCursor())...

Anyone can help?

somber hull
#

thanmks

opal juniper
#

np

opal juniper
#

It is Just annoying

supple marsh
#

sry :( I just really want to get an answer

sage swift
#

dude said it himself

opal juniper
#

he hadn't stripped the colour

somber hull
#

?

opal juniper
#

thats not what they mean

sage swift
#

so what if someone renames a chest to that and opens it

sage swift
#

do you now have a custom inventory

opal juniper
supple marsh
sage swift
#

mmmmhmm

somber hull
opal juniper
quaint mantle
#

Hi guys, any Gson expert around here ?

I've created several Type Adapter for objects that works well.
But now I want to create an Adapter for a new object that has objects as Attributes, those objectAttributes being the type of my 1st TypeAdapter.

Please how can I do that ?

supple marsh
hybrid spoke
#

inventoryclickevent might be the wrong event for that

supple marsh
somber hull
#

Yea

chrome beacon
hybrid spoke
dense goblet
hybrid spoke
#

inventoryitemdragevent or smth

supple marsh
opal juniper
hybrid spoke
dense goblet
somber hull
#

yea

#

clone it then set it to the inventory again, if the inbventory is full drop it

supple marsh
tardy delta
#

but it has to work

somber hull
tardy delta
#

normally they do it in 2 methods i did it in one

hybrid spoke
#

dont change it

opal juniper
# tardy delta normally they do it in 2 methods i did it in one
    private static Economy econ = null;

    @Override
    public void onEnable() {
        if (!setupEconomy() ) {
            log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        setupPermissions();
        setupChat();
    }
    
    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }
   public static Economy getEconomy() {
        return econ;
    }
supple marsh
dense goblet
#

Maybe you need to clone before cancelling

chrome beacon
hybrid spoke
#

cancel the inventoryitemdragevent

#

thats the way to go

opal juniper
#

what?

tardy delta
supple marsh
supple marsh
dense goblet
#

(Pretty sure)

supple marsh
chrome beacon
#

It's much easier than just listening to a whole bunch of events

dusty sphinx
#

Can players in adventure mode hurt each other

dense goblet
#

How do you use isSimilar in other cases?

hybrid spoke
#

if you want to check if the itemstacks are EXACTLY THE SAME, overwrite the #equals method

dense goblet
#

Generally I'd advise against it in contexts that aren't stacking related since it breaks if you want to add extra nbt to items

#

For identification purposes you should be using persistent data containers

dusty sphinx
#

What is the alternative to Player.getMaxHealth()? It's annotated with Depreciated

sage swift
#

attribute

dusk flicker
#

Check the java docs

tardy delta
quaint mantle
#

Hi guys, any Gson expert around here ?

I've created several Type Adapter for objects that works well.
But now I want to create an Adapter for a new object that has objects as Attributes, those objectAttributes being the type of my 1st TypeAdapter.

Please how can I do that ?

tardy delta
#

ah maybe this looks better

somber hull
#

?paste

undone axleBOT
vague cypress
#

Would someone mind quickly explaining to me how this doesn't cancel an event? I'm trying to do this so that people can't remove items from the menu GUI and it's not working.

        Player player = (Player) e.getWhoClicked();

        if(e.getView().getTitle().equals("Menu")) {
            e.setCancelled(true);
...```

NOTE: The GUI Inventory's name is exactly "Menu" with no color or anything.
somber hull
#

i could be wrong, but i tried working with this a while ago and i dont think the Gettitle thing works

vague cypress
#

Alright. Any ideas what would I substitute it with?

lusty cipher
#

getTitle did work for me

vague cypress
#

hmm

lusty cipher
#

however it is much more safe to use InventoryHolders, which is why I switched a while ago

earnest sonnet
somber hull
earnest sonnet
#

@somber hull don't spam it, if someone knows, they will answer, also upload your coe.

earnest sonnet
lusty cipher
#

you need to install IF (inventoryFramework) or shade it into your plugin @somber hull

lusty cipher
#

No it isn't, or isn't properly atleast.

#

Otherwise it wouldn't crash

somber hull
#

maybe i did it wrong, hang on

#

It was working last week when it was in 1.16 lol

dusk flicker
#

Crap

#

?conventions

undone axleBOT
somber hull
# lusty cipher Otherwise it wouldn't crash

i forgot to add

    <properties>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
                <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
                </dependencyReducedPomLocation>
                <relocations>
                    <relocation>
                        <pattern>com.github.stefvanschie.inventoryframework</pattern>
                        <shadedPattern>me.silentprogram.inventoryframework</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
tardy delta
#

@opal juniper fixed it 🙂

shy wolf
#

?jd

tardy delta
#

can i set a "global alias" for my commands? for example instead of typing /magmabuildnetwork:freeze <player> i could just type /mbn:freeze <player>

earnest sonnet
#

I guess so

opal juniper
somber hull
#

ok

#

Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.1.0:shade (default) on project CraftedLore: Error creating shaded jar: null

#

im getting this when trying to package my jar

#

heres my pom\

undone axleBOT
somber hull
supple marsh
#

How do I cancel the stacking of all items of the certain item stack when you click fast? it doesn't cancel when I cancel InventoryClickEvent

earnest sonnet
frosty tinsel
tardy delta
#

ah rip

vague cypress
#

?paste

#

?paste

undone axleBOT
vague cypress
#

Sorry, I know I keep asking, but I want to solve this issue with items not being locked in my menu GUI. I thought this should work, but apparently not. Here's my full code file with what I think the problem line/area is having a comment on it. I just don't know how to fix it:
https://pastebin.com/qLEazE9X

tardy delta
#

when is the best time to save the plugins data in files? when the operation is executed or when the server shuts down?

tardy delta
#

you can take items out of the inventory you mean?

vague cypress
#

Yes

#

The item's aren't locked in the slots for some reason

#

They can be removed

tardy delta
#

use event.setCancelled(true)

#

i encountered the same issue

somber hull
#

how do i use a snpashot version of maven shade plugin

#

i have the plugin repository for the snapshots

#

and i have the version as 3.3.0-SNAPSHOT

#

and yet it brokey

vague cypress
granite stirrup
somber hull
#

How do you do that in intellij, i could look iot up but its easier to ask you

granite stirrup
#

its a button

#

LEGIT 1 click

#

lol

somber hull
#

yea, but wich button

#

the one that shows up sometimes in the top right?

#

its not there

granite stirrup
#

it should be in the coding space

tardy delta
granite stirrup
#

like the reload button

somber hull
granite stirrup
somber hull
opal juniper
somber hull
#

yessir

opal juniper
#

i had issues with that and idk how to fix them

somber hull
#

thats why i have to use a snapshot version of maven shade

granite stirrup
#

well try mvn install

somber hull
granite stirrup
#

in console

somber hull
#

oh

#

right

tardy delta
#

how can i compare a selfmade gui with the event inv?

tame wolf
#

use java 8

#

dumb dumb

granite stirrup
#

java 16 is evil tho

granite stirrup
#

java 11 is better :)

vague cypress
tame wolf
#

USE JAVA

#

8

opal juniper
#

nah its not that great

#

tis ok

somber hull
#

irght?

opal juniper
#

yeah it does

granite stirrup
#

it does

somber hull
#

oh wtf

tame wolf
#

java 8 is for everything minecraft @opal juniper

somber hull
#

why am i using 16??

tardy delta
granite stirrup
#

just u need java 16 for the server

#

XD

somber hull
#

Oh

granite stirrup
#

not for the plugin

somber hull
#

OH

granite stirrup
#

java 8 plugins will work should work

opal juniper
#

Use inventory holder

somber hull
#

So i can change my java build

opal juniper
#

mhm

somber hull
#

alright

tardy delta
#

yea its not my code but he makes the gui inside an interact event

vague cypress
#

How do you use an inventory holder?

granite stirrup
tame wolf
#

whast the best way to make a plugin that will change all tridents in the game to do more damage

granite stirrup
#

:)

tame wolf
#

*whats

somber hull
#

wait how the fuck do i change project java version on intelliJ

#

im used tyo eclipse

granite stirrup
#

if ur in maven

tardy delta
somber hull
#

oh really?

opal juniper
#

Inventory menu = Bukkit.createInventory(player, 9 * 1, "Menu");

Right So the InventoryHolder here is a player object.
This is not the way of doing it

@vague cypress @tardy delta

granite stirrup
#

i think that is it

somber hull
#

alright

whole stag
#

@tame wolf why java 8, use java 7

somber hull
#

so just use 8?

#

or 11

whole stag
#

Use 11

granite stirrup
#

8-11 is good

somber hull
#

alright ill use 11

granite stirrup
#

expect 9

#

we all forget about 9

#

do not talk about 9

tardy delta
#

?paste

undone axleBOT
whole stag
#

9 is EOL anyway

granite stirrup
#

u can still get it lol

whole stag
#

That doesn't mean it isn't EOL

whole stag
#

9 wasn't an LTS release

granite stirrup
#

LEGIT doing math that isnt needed

lusty cipher
#

it's just a formality

#

the compiler will make it a constant anyway

opal juniper
somber hull
#

ok, i have gotten this before

whole stag
tardy delta
somber hull
#

Unsupported class file major version 60

#

Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project CraftedLore: Error creating shaded jar: Problem shading JAR C:\Users\think\Documents\IntelliJ\CraftedLore\target\CraftedLore-1.0-SNAPSHOT.jar entry me/silentprogram/craftedlore/gui/ConfigGui.class: java.lang.IllegalArgumentException: Unsupported class file major version 60

lusty cipher
granite stirrup
somber hull
granite stirrup
lusty cipher
opal juniper
tardy delta
whole stag
tardy delta
#

thats for java 8

somber hull
tardy delta
#

ah

lusty cipher
#

it's 11

#

no?

somber hull
#

lets see

lusty cipher
#

it was 1.8, 1.9, 10, 11, 12, ...

tardy delta
#

i'm always using 1.x

lusty cipher
#

I think since Java 10 or 11 it switched away from 1.x

somber hull
#

yea same error

#

ill just try 1.8

lusty cipher
somber hull
#

oh

#

leme do it

#

in cmd prompt

#

or the intellij terminal

opal juniper
#

@vague cypress are you good now?

lusty cipher
somber hull
#

java 16.0.1 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

granite stirrup
#

hyper you might need to get java 11

lusty cipher
#

wut

granite stirrup
#

oops

lusty cipher
#

If at all you would need JDK 16 or 17 to compile for MC 1.17

#

anything lower won't work afaik

somber hull
#

I think i have jdk 16

#

how would i check

granite stirrup
#

it will work with lower

lusty cipher
somber hull
#

but anyway, i have

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

And im getting the same error

lusty cipher
granite stirrup
#

spnda you can run java 11 plugins on 1.17

lusty cipher
#

Yes

#

That's because JDK 16 can run Java 11 binaries

somber hull
#

oh shit

granite stirrup
#

oh your talking about the server....

somber hull
#

i was using a retarded version of the maven shade plugin

#

it worked

lusty cipher
#

But afaik you can't use JDK 11 to compile spigot-api:1.17, as those class files are Java 16 binaries afaik

granite stirrup
#

you sure?

lusty cipher
#

wait ill try

granite stirrup
#

im pretty sure you can

#

hyper said his builded

#

xd

granite stirrup
lusty cipher
#

oh it seems spigot is infact compiled as 1.8

#

huh interesting

lusty cipher
granite stirrup
#

lol

lusty cipher
#

nevertheless, it's still recommended to use JDK 16 over anything lower tbh

chrome beacon
#

Spigot is compiled with Java 16

#

(1.17)

granite stirrup
#

and if you use java 11 its lts

#

should be fine

chrome beacon
#

Not for 1.17

lusty cipher
granite stirrup
#

it should work on 1.17?

lusty cipher
granite stirrup
#

and it might work with 1.17

lusty cipher
#

It outright doesn't.

granite stirrup
#

you havent even tested

lusty cipher
#

I don't have to, it's a fact

granite stirrup
#

you sure

somber hull
#
[09:59:33] [Server thread/ERROR]: Error occurred while enabling WhoCraftIt v1.0.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because the return value of "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" is null
        at me.silentprogram.craftedlore.gui.ConfigGui.createBlocksGui(ConfigGui.java:111) ~[?:?]
        at me.silentprogram.craftedlore.MainClass.reloadGuis(MainClass.java:37) ~[?:?]
        at me.silentprogram.craftedlore.MainClass.onEnable(MainClass.java:21) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:495) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:409) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:608) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:264) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:987) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307) ~[server.jar:3164-Spigot-f773da8-b069f22]
        at java.lang.Thread.run(Thread.java:831) [?:?]
#

not sure whats wrong

#

leme send the thing

#

for (String i : plugin.getConfig().getConfigurationSection("blocks.").getKeys(false)) {

granite stirrup
smoky oak
#

isn't that point supposed to go before the blocks

lusty cipher
#

but it isn't.

granite stirrup
#

i meant plugins

#

lol

somber hull
lusty cipher
#

But who cares about the plugins?

somber hull
#

i tried blocks and blocks.

lusty cipher
#

The plugins won't load if the server doesn't run

smoky oak
#

try .blocks

somber hull
#

its not

#

cause blocks is the first key

lusty cipher
#

And yes, everything built from Java 1.1 to Java 15 will work in Java 16.

smoky oak
#

ah

granite stirrup
#

i was just saying plugins will work on 1.17 even if it isnt compiled with java 16

#

i didnt say anything about the server

lusty cipher
#

You tried getting them to get JDK 11

#

Eventhough they had JDK 16, which ultimately is better.

smoky oak
#

Are you adding the string you want to check the config for? Just asking

somber hull
#

?

smoky oak
#

wait

#

you need to grab a list

granite stirrup
#

its worser

lusty cipher
#

It is better in every way

somber hull
granite stirrup
smoky oak
#

"blocks").getStringList()

#

something like that

lusty cipher
granite stirrup
#

¯_(ツ)_/¯

somber hull
#

oh

#

wait

#

thank you

lusty cipher
#

You might need to export some internal JDK components if you want to access javac, but I doubt you want javac functionality in your plugin.

somber hull
#

i reused code from an old plugin

lusty cipher
#

Otherwise, Reflection has not changed, and if it has, it has gotten better.

somber hull
#

where i got the keys and not the list

#

i dont need the keys this time

smoky oak
#

fair enough

granite stirrup
lusty cipher
#

Has it broke for you?

dusty sphinx
#

How can I get an advancement by it's ID?

tardy delta
#

do i need to set both buildtools and spigot.jar as dependency in my project?

smoky oak
#

buildtools most likely not

lusty cipher
#

I've used JDK 16 and 17 for all of my development, Minecraft and servers in the past months. Works better with better performance due to ZGC than my JDK 1.8 and JDK 11 and JDK 15.

granite stirrup
lusty cipher
#

bruh

smoky oak
#

spigot definitively yes

#

usually people use the bukkit jar tho

lusty cipher
#

and you're telling people not to use it even though you've never used it?

granite stirrup
#

also you cant edit static final fields i heard

lusty cipher
#

what

tardy delta
#

what does this checkbox do?

lusty cipher
#

anything that works in JDK 11 works in JDK 16

#

it's all backwards compatible

granite stirrup
#

i used jdk 16 but i never used reflection

lusty cipher
#

??? how can you judge these things then

granite stirrup
#

from like 20 people saying it isnt working?

smoky oak
#

On another topic can you make a sceduler task wait for so many server ticks instead of so many seconds?

lusty cipher
#

I haven't heard a thing and all is well using it

quiet ice
smoky oak
#

really? let me look up the docs again

lusty cipher
#

yeah it is in ticks

somber hull
#

yea

smoky oak
#

oh youre right

somber hull
#

lol

smoky oak
#

nevermind then

#

making water into acid atm

#

also what's the better way to keep track of players for a sceduler

#

putting them in a variable or iterating through the online players?

lusty cipher
quiet ice
#

You cannot alter final fields if they are in another module that does not export the class to the caller module

#

Most reflection operations on such stuff is denied actually

lusty cipher
#

🤔

#

why would you want to alter final fields

quiet ice
#

Many reasons

smoky oak
#

many confusing reasons

quiet ice
#

There is a decent amount of these people

smoky oak
#

you're probably better off just using static variables tbf

quiet ice
#

The thing is you didn't write the other module

lusty cipher
#

I honestly wouldn't consider that to be bad, final should be final and not be modifiable

smoky oak
#

thats the whole point

#

use static instead if you want to change it

quiet ice
#

Like, you cannot alter java.* at all

quiet ice
smoky oak
#

its not object dependent

quiet ice
#

final != static, the use is fully different

smoky oak
#

theres like a 1 in 100 chance a final field shouldn'T be static too

quiet ice
#

And I want to repeat it again, YOU CANNOT alter the code at all - this is bukkit not fabric

smoky oak
#

wait can you just develop plugins with fabric?

lusty cipher
#

you can develop fabric mods for fabric servers

#

but they wont run on bukkit

quiet ice
#

No, because you repeatedly say that you can drop the final flag, which you cannot as this is bukkit

smoky oak
#

wait we're referring to a baked in value?

quiet ice
#

Bukkit technically allows this sort of stuff but it is out of reach for 99.999% of users

lusty cipher
smoky oak
#

which one?

lusty cipher
#

Where I don't see the point of why they would

#

Any

smoky oak
#

uuuh

quiet ice
#

There has been one that wanted to alter an value within a java class for some HTTPS client or something

smoky oak
#

can you not just download the server build files

#

change it

#

and build a server jar

lusty cipher
#

yes

#

but then you can't really distribute the plugin, if you want to

quiet ice
#

Well, you can alter final values within nm* anyways due to it not being modular

#

(in this case it was static final int, but the same would apply to non-static)

lusty cipher
#

Yes and how you say yourself and everybody else, its discouraged

quiet ice
#

Yes, but valid code in J11 but not valid in J16

lusty cipher
#

In the end, this is a edge case that should be discouraged and forbidden anyway (so I support JDK 16 doing this), and we should be using JDK 16 anyway

#

so that plugins etc. are compatible with 1.17

quiet ice
#

also there are a few other things that go whack with J11 -> J16, luckperms is the best example here

raven sigil
#

hello, I'm having difficulties with BuildTools, I can't seem to get it to build javadocs (latest buildtools, openjdk version "16.0.1" 2021-04-20 on fedora 33)

tardy delta
#

why does my package shows up like this?

opal juniper
tardy delta
#

and not like this

opal juniper
#

looks normal

lusty cipher
opal juniper
#

^^

lusty cipher
#

do that

tardy delta
#

where can i find that

lusty cipher
#

assuming intellij idea

tardy delta
#

that works but in my project structure it shows up like aids

lusty cipher
#

wdym

#

don't do "Flatten Packages"

#

only do "Compact Middle Packages"

#

or show what you mean

tardy delta
#

goes brr

lusty cipher
#

oh there it will probably just have to stay the same I guess

opal juniper
#

idek if u can change that

tardy delta
#

🙄

#

autism

quaint mantle
#

?

lusty cipher
#

also im surprised we're using the same theme

tardy delta
#

O

#

and also can't i just make a directory by right clicking on my package?

lusty cipher
#

you can?

tardy delta
#

'directory'

#

i mean folder

lusty cipher
#

yes that's a directory/folder

tardy delta
#

ow damn that works

granite stirrup
#

no dank memer dumb

#

they have 2 bad bots and like no good ones

tardy delta
#

is super.onDisable actually something?

#

i saw someone using it

lusty cipher
#

nope it seems to not do anything

#

unless spigot/paper/tuinity or whatever adds something to it, bukkit by default doesn't

tardy delta
#

oki

granite stirrup
#

when is there gonna be a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork of a fork

vague cypress
#

How do you call a method such as public void createMenuGUI() from a different file?

#

Such as a separate event listener

lusty cipher
#

If you're calling it from a different class, without using a instance thereof, you'd most likely want to use a static function.

granite stirrup
#

but it isnt a util class he doesnt have another reason to use static really

vague cypress
#

Ok. I want to call it from a different class entirely. The createMenuGUI method holds the info for my menu gui and I want to use it in a listener for a right-click with a nether star.

granite stirrup
#

then you want the instance

lusty cipher
granite stirrup
lusty cipher
granite stirrup
#

thats the only reason you can use static for lol

lusty cipher
#

what

granite stirrup
#

i mean you dont want to abuse static lol

#

i only use it ever for util classes

vague cypress
#

Here's how I have it(any recommendations are welcomed) :

        inv = Bukkit.createInventory(null, 9 * 1, ChatColor.GOLD + "" + ChatColor.BOLD + "Main Menu");

        ItemStack item = new ItemStack(Material.PAPER);
        ItemMeta meta = item.getItemMeta();

        //Welcome Paper
        meta.setDisplayName(ChatColor.WHITE + "Welcome!");
        List<String> lore = new ArrayList<String>();
        lore.add(ChatColor.GRAY + "Click to display welcome message!");
        meta.setLore(lore);
        item.setItemMeta(meta);
        inv.setItem(0, item);

        //Shop
        item.setType(Material.DIAMOND_BLOCK);
        meta.setDisplayName(ChatColor.DARK_BLUE + "Shop!");
        item.setItemMeta(meta);
        inv.setItem(1,item);
    }
granite stirrup
#

sometimes i never use it

lusty cipher
#

No probably not, but it's common to do something like that

public class SomeUtil {
  static Inventory createMenu() {
     return Bukkit.createInventory(...);
  }
}
raw coral
#

How can i make a mob only move if it sees a player

#

I cant really find anything online

vague cypress
lusty cipher
#

Well I asked for the class that the function is in. Is it an InventoryHolder or what are you trying to do with it?

vague cypress
#

I'm trying to put it in an OnPlayerClicks that looks for right-clicks with a nether star

raw coral
lusty cipher
vague cypress
#

    @EventHandler
    public void onPlayerClicks(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();

        if (action.equals(Action.RIGHT_CLICK_AIR) || action.equals(Action.RIGHT_CLICK_BLOCK)) {
            if (player.getItemInHand().getType() == Material.NETHER_STAR) {

                //I want to create the menu gui right here

            }
        }

    }

}```
lusty cipher
#

But they're incapable of answering that

raw coral
#

Oh

vague cypress
#

No, I don't think it's in an InventoryHolder

opal juniper
#

Hello Slimey

vague cypress
#

Hi jeff

opal juniper
#

We still going at this?

lusty cipher
#

oh no

raw coral
vague cypress
#

Yeah cause I'm dumb and can't seem to understand anything that's going wrong/how to fix it/what the best methods of doing things are

opal juniper
#

KK

raw coral
#

So.... can you send the class

opal juniper
#

so i sent you this class:
(imma repost it)

#
public class GUI implements InventoryHolder {

    private String name;

    public GUI(String name) {
        this.name = name;
    }

    @NotNull
    @Override
    public Inventory getInventory() {
        return null;
    }

    @NotNull
    public String getName(){
        return this.name;
    }
}

Bukkit.createInventory(new GUI("Menu"), 9, "Menu");

#

in order to make an inventory holder

#

and then u use the line at the bottom to make a new inventory

#

and then you can add whatever you want to it

kind coral
#

how to get the bukkit command map?

granite stirrup
#

reflection i think?

kind coral
#

i knew there was a way without reflections

raw coral
#

Anyway is anyone here experienced at using nms with entities

#

im really struggling

granite stirrup
#

not me

opal juniper
#

What about them?

granite stirrup
#

i think in 1.17 there is now

#

but in older versions i dont think it is

vague cypress
opal juniper
#

Ah - i see the miscommunication here

raw coral
#

And i couldnt find anything on google because i dont know exactly what to look for

vague cypress
raw coral
vague cypress
#

Oh so you want it to stay completely still unless someone comes near

raw coral
#

yes

opal juniper
#

Bukkit#createInventory returns an inventory

#

(weird that)

#

which you can then show to players + add itemstacks

vague cypress
#

Ooh, so I add the items in the listener when I use Inventory inventory = Bukkit.createInventory(new GUI("Menu"), 9, "Menu"); ?

raw coral
#

Wait jeff i had a question on why are you using an inventory holder?

vague cypress
#

Awesome, thanks, I'll try that

raw coral
#

I always just set the first value to null

granite stirrup
#

yeah it a paper thing only

opal juniper
opal juniper
raw coral
#

Oh

#

god thats so much smarter

granite stirrup
#

if you dont use paper i hate you

raw coral
#

ive been using inventory names for the longest time

#

.w.

granite stirrup
#

jk

opal juniper
raw coral
#

Anyway do you have any idea on the nms question

granite stirrup
#

dont use nms simple

opal juniper
#

you would need to override their pathfinding goals and shit

#

and idk if you can do that

#

on the fly

#

what is the point of this? what is the end goal

granite stirrup
#

i think paper makes it eaiser

raw coral
raw coral
opal juniper
#
@EventHandler
public void onInteract(InventoryClickEvent event) {
    Inventory inventory = event.getView().getTopInventory();
    if (inventory.getHolder() instanceof GUI) {
        GUI holder = (GUI) inventory.getHolder();
        String name = holder.getName();
    }
}

@vague cypress

opal juniper
#

just move their head?

tardy delta
raw coral
tardy delta
#

not really what it meant to be

opal juniper
opal juniper
opal juniper
#

target is an instance of CraftPlayer, so you just need to get its name @tardy delta

tardy delta
#

yea .getName i fixed it

opal juniper
#

wrong ping lmao

tardy delta
#

but another question

opal juniper
#

sure sure

tardy delta
#

can i set if the player is like burning or not?

#

tricky

tiny wolf
#

Whats the potion type for Nausea ?

#

Its not showing up for me for some reason

granite stirrup
#

PotionEffectType.CONFUSION

#

i think

vague cypress
#

Sorry, one more thing. How do I properly import @NotNull ? When I auto-import it, it does import com.sun.istack.internal.NotNull; but I get an error when I try to package it saying package com.sun.istack.internal does not exist

smoky oak
#

it is

vital ridge
#

?pastebin

smoky oak
#

'warps screen on teh client'

vital ridge
#

?paste

undone axleBOT
granite stirrup
#

"Warps vision on the client."

vague cypress
#

Oh ok

opal juniper
#

it no matter

tiny wolf
granite stirrup
raw coral
#

For spawning zombies is there any way i can ensure it will be an adult zombie and not a baby or a chicken jockey

smoky oak
#

its like the 4th entry

tardy delta
granite stirrup
#

it helps alot

vital ridge
granite stirrup
#

reading the name helps to

#

yeah its weird why its named CONFUSION tho

#

it should be named what it actually is

#

but i guess its just mojang

tiny wolf
#

dumb that it has a different name.

granite stirrup
#

CONFUSION is kinda meaning nausea

tiny wolf
#

its dumb it aint the same name

granite stirrup
#

ik

tiny wolf
#

no reason for that.

granite stirrup
#

but its mojangs fault

#

i think

tiny wolf
#

Doubt it

#

Spigot created the enum for it

granite stirrup
#

im pretty sure its mojans fault

vague cypress
#

Wait, now I think my right-click with nether star isn't working cause I set up a player.sendMessage() to check if it was even getting a right-click and I don't think it is. Here's how I have it:

    public void onPlayerClicks(PlayerInteractEvent event) {
        Player player = event.getPlayer();
        Action action = event.getAction();

        if (action.equals(Action.RIGHT_CLICK_AIR) || action.equals(Action.RIGHT_CLICK_BLOCK)) {
            if (player.getItemInHand().getType() == Material.NETHER_STAR) {
                player.sendMessage("This works");

gui stuff...

#

I swear this same thing was working just a few hours ago...

opal juniper
#

wrong event listener

vague cypress
#

Of course

earnest sonnet
#

xD

vague cypress
#

🤦‍♂️

earnest sonnet
#

don't worry mate it happens to everyone

opal juniper
#

🙂

tardy delta
#

already found it xd

#

player.setFireTicks(0) i assume

opal juniper
#

idrk

#

Sets the entity's current fire ticks (ticks before the entity stops being on fire).

vague cypress
#

In all honestly though I just realized I have no idea how I used the wrong event listener

#

I thought I did

earnest sonnet
#

What are you creating btw 😄

vague cypress
#

Just trying to make a menu where you right-click a nether star and it brings up a GUI

granite stirrup
vague cypress
#

Seriously though, what listener event do I use

hybrid spoke
#

you want to have an EVENT to CLICK in an INVENTORY

#

hmm.. what could that be called

earnest sonnet
#

wrong order, but it's acceptable

hybrid spoke
#

you want to have an INVENTORY to CLICK in an EVENT?

vital ridge
tardy delta
#

does cmd.getPermission() gets the permission from the plugin.yml file?

earnest sonnet
#

@hybrid spoke you're gold 😄

vague cypress
#

A player right-clicking with a nether star

vital ridge
tardy delta
hybrid spoke
vague cypress
hybrid spoke
#

oh ya, that event

tardy delta
#

just make a netherstar with a custom model id or how its called and check for that

#

not every netherstar

vague cypress
#

I was using PlayerInteractEvent but apparently that doesn't work

hybrid spoke
#

can't tell you the name of the EVENT to listen for a PLAYER to INTERACT

#

oh well

tardy delta
#

🤡

vague cypress
#

???

tardy delta
vague cypress
#

Im using a PlayerInteractEvent

#

Apparently that's wrong

hybrid spoke
#

its not

vague cypress
#

Hmm

hybrid spoke
vague cypress
tardy delta
vital ridge
#

?paste

undone axleBOT
dusk flicker
#

It would have to be by the plugin description file as it won't look inside your method.

tardy delta
#

if (event.getCurrentItem().getItemMeta().getCustomModelData() == 12345 // model data you set before

#

@vague cypress

hybrid spoke
tardy delta
#

wdym?

hybrid spoke
#

you add permissions to a command and print them out while executing that command

tardy delta
#

ah

#

ill test it tomorrow

#

sleepy

vital ridge
#

Is there anyway to stop MySQL connection from just randomly closing?

#

I have a plugin where my mysql connection just disconnects randomly after like 20 mins of usage or smthing like that.

tardy delta
wary harness
#

got small problem

earnest sonnet
#

?ask

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.

wary harness
#

how would I check if runnable is running on 1.8

#

like on current older version u have method isCanceled

#

but my plugin provides support from 1.8 +

#

problems is now I noticed there is an error

#

with missing method in old api

#

java.lang.NoSuchMethodError: 'boolean me.mraxetv.beasttokens.utils.shop.ShopRotatingData.isCancelled()'

vital ridge
#

You'll problaly have to work it out with booleans.