#help-development

1 messages Ā· Page 1655 of 1

grim ice
#

bro what

vast sapphire
#

it's the spigot 1.8.8 jar

grim ice
#

whhat

lost matrix
#
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
      // Async code here
});
young knoll
#

Because they imported the wrong itemstack

grim ice
#

they imported wrong thing

#

ALSO

#

USE MAVEN

#

PLS

vast sapphire
#

I do

grim ice
#

Ok

silver shuttle
grim ice
#

import org.bukkit.inventory.ItemStack;

lost matrix
#

As expected. You need to import org.bukkit.inventory.ItemStack instead

grim ice
#

use this

#

HAHAHAHHA GET REKT 7SMILE

#

I BEAT U

#

EZEZ

#

jk

lost matrix
tardy delta
#

šŸ¤”

vast sapphire
#

yea did it manually import org.bukkit.inventory.ItemStack;

grim ice
#

HOW DID U EVEN IMPORT THE NMS THINGY

#

wait

#

you using eclipse

#

???

silver shuttle
#
        scheduler.runTaskAsynchronously(myplugin, task -> {
            variationTask = task.getTaskId();
            naturalvariation();
        }, 0L, variationSpeed);
lost matrix
#

runTaskTimerAsynchronously

vast sapphire
silver shuttle
#

thanks ā¤ļø

grim ice
#

thhen HOWWW

lost matrix
silver shuttle
#

yeah that is fully ok, I am only modifying the MySQL data with the function

#

thanks

#
String historyString = String.valueOf(history).replace(" ", "").replace("[", "").replace("]", "");

Can I somehow save myself from this abomination?

tardy delta
#

well i'm curious too

ivory sleet
#

Regex

silver shuttle
#

ty

quartz pike
#

replaceAll with regex

silver shuttle
#

how do I put [ into regex?

tardy delta
#

\[

#

two backslash

#

i think

silver shuttle
#

ah ty

#

replaceAll("[\\[\\] ]", "");
So like that?

#

wait

grim ice
#

?paste

undone axleBOT
grim ice
#

so uh i have an idea which is,

when a player is about to die it tps them to world spawn, says a random death msg in chat that you can edit in config(and at the end of the death msg you set it says (died from {how they died}, says a title on there screen that you can also edit and runs /event setdead {there ign}

How I did it :
https://paste.md-5.net/ipirodataw.java
What I want:
It's really bad and disgusting when I look at it, so i want ppl to help me make it better / function better.

tardy delta
#

isn't it possible to cancel the player dead event so keep all their stuff and exp?

#

and then tp

grim ice
#

no

tardy delta
#

oh

grim ice
#

its not Cancellable

#

which is so dumb

tardy delta
#

ah

grim ice
#

idk why spigot hasnt made it cancellable yet

tardy delta
#

that's alot of ifs

grim ice
#

YEAH THATS THE REASON I MTALKING Sad

dense goblet
#

@silver shuttle storing as string is not a good idea if you care about minimum size

grim ice
#

i think theres no way to simulate a death message

tardy delta
#

use switch

grim ice
#

oh yeah

silver shuttle
grim ice
tardy delta
#

ugh i have no time

#

lemme see

grim ice
#

BRO I WISH WHO MADE THE DEATH EVENT UNCANCELLABLE GET NON STOP DIARRHEA

lost matrix
#

Use a HashMap

grim ice
#

Who

lost matrix
#

Instead of ifelse or switch

grim ice
#

o

#

so like

#

String, DamageCause

tardy delta
#

DamageCause String

lost matrix
#

Other way around

grim ice
#

@lost matrix wait

#

cant i use

#

player.spigot().respawn;

#

in death event

tardy delta
#

i'm curious add them all to the map?

grim ice
#

or will it kill him

#

I really don't want to use entity damage event

#

is there another way

keen obsidian
#

I am making a plugin with an animated armor stand but the stand keeps moving does anyone know how I can fix that? This is my code: https://pastebin.com/rGVjARMy

lost matrix
grim ice
#

when a player is about to die it tps them to world spawn, says a random death msg in chat that you can edit in config(and at the end of the death msg you set it says (died from {how they died}, says a title on there screen that you can also edit and runs /event setdead {there ign}

#

@lost matrix

lost matrix
tardy delta
#

why when he is about to die?

#

i don't understand

quartz pike
#

death is inevitable , accept it

#

ā˜ ļø

tardy delta
#

šŸ’€

grim ice
#

bro thats plain english

#

wdym u dont understand

tardy delta
#

i mean there is a player death event?

keen obsidian
lost matrix
slim bough
#

Anyone have link to guide on how attributes work and how they effect players

grim ice
#

OANWEFUAWEBFAUEFABEUFAEFUEWF

dense goblet
#

@grim ice use damage event and check if hp - final damage <= 0

grim ice
#

WHO MADE IT UNCANCELLABLE MAN

#

I DO

#

BUT HOW AM I SUPPOSED

#

TO GET A

tardy delta
#

hmm dont cancel it but just tp them

keen obsidian
grim ice
#

DEATH MESSAGE FROM IT

tardy delta
#

or do you want to keep inv?

grim ice
dense goblet
#

Idk they're localised

tardy delta
#

oh yea then there is a dead screen

stone sinew
#

You could use Player.setHealth() and Playet.spigot.respawn()

quartz pike
#

@grim ice just stop being rude ? people are trying to help and can't understand what the fuck you are asking . you have "Minecraft Plugins Dev" on your bio, you don't seem like one ?

tardy delta
#

you can disable the death screen with gamerule

#

i'm pretty sure though

dense goblet
#

Use the damage cause provided with the damage event

tidal skiff
#

can anyone tell me why

           if(p.getInventory().getHelmet().getItemMeta() == ItemManager.hotHelmet.getItemMeta()){

                Bukkit.broadcastMessage("hey");

            }

isnt working?

tardy delta
#

maybe other meta

tidal skiff
#

its not

#

its the exact same meta

eternal night
#

ItemMeta instances are not compared using ==

tidal skiff
#

well even using .equals() it dosent work

#

ill try again tho

#

yeah still doesnt work

keen obsidian
# lost matrix remove the first line

I have one question I want that it animates smoothly in 1.5 seconds but I can increase the amount but that is not smooth do you know a sollution?

silver shuttle
#

What is the simplest way of making an event in my plugin that other plugins can register and hook into?

lost matrix
silver shuttle
#

thanks

lost matrix
tidal skiff
#

wait...

            if(p.getInventory().getHelmet().getItemMeta().equals(ItemManager.hotHelmet.getItemMeta())){

                Bukkit.broadcastMessage("hey");

            }

this code works when in an entitydamageevent when im holding an item but not if im not holding any item... wtf??

lost matrix
#

?pdc

gusty bough
#

I was using in my 1.16.5 plugin a trick to do an immediate respawn (without death screen), i was listening to playerdeathevent and healed the player at this time so the screen didn't appear. This seems broken with 1.17.1, any idea how to fix?

grim ice
dense goblet
#

No reason to not be

eternal night
#

actually 1.13+ :>

lost matrix
eternal night
#

only the real kids know about the first iteration of PDC in 1.13

ivory sleet
#

CustomItemTagContainer 😌

eternal night
#

the one and only

lost matrix
#

Before that ppl used the NBTApi

#

Which was a reflective mess back then

stark marlin
#

I'm trying to count all the blocks of a specific type in a region. This is how I'm trying to accomplish that but it doesn't work. It just doesn't add up anything even if there are blocks of that type in the chunks. Is there anything I'm missing?
https://gyazo.com/081d9f8a55a1bcc378b8d13d497670e6

lost matrix
#

idk if it still is

open perch
#

package me.pluginrq.plugin;

import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class Main extends JavaPlugin implements Listener{
public void OnEnable() {

    Bukkit.getConsoleSender().sendMessage("§a[Teste] > Plugin Habilitado com Sucesso");
    
    Bukkit.getPluginManager().registerEvents(this, this);
    
}
public void OnDisable() {
    
    Bukkit.getConsoleSender().sendMessage("§4[Teste] > Plugin Desabilitado com Sucesso");
    
    
}
@EventHandler
public void Entrar(PlayerJoinEvent ev) {
    
    
    ev.setJoinMessage(null);
    Bukkit.broadcastMessage("§eBem vindo"+ ev.getPlayer().getName());
    Bukkit.broadcastMessage("Logou no Mundo: "+ ev.getPlayer().getWorld());
    
}
@EventHandler
public void Sair(PlayerQuitEvent eq) {
    eq.setQuitMessage(null);
    Bukkit.broadcastMessage("§4-"+ eq.getPlayer().getName());
}

}

#

why my broadcasts don“t work?

#

i“m starting learning spigot

undone axleBOT
lost matrix
stark marlin
#

Oh, aren't they 16 blocks high nowadays?

#

Thanks! šŸ™‚

open perch
crude charm
#

?paste

#

?paste

undone axleBOT
lost matrix
stark marlin
#

I see

crude charm
#

?learnjava

undone axleBOT
lost matrix
# grim ice no

Unless you are a masochist that likes to tinker with ancient software

open perch
crude charm
lost matrix
open perch
grim ice
#

sometimes ancient software is better

#

for example

#

they fucked minecraft for bad pcs when they added the aquarium update

#

it used to use 1gb ram

#

now it uses like

#

2gb

crude charm
#

Thats a really bad example but I do agree that in some cases "ancient software is better"

grim ice
#

it is a good example

crude charm
#

no

grim ice
#

they couldve optimized the game in a better way / added an option to use the optimized version

#

liek a switch between optimized / normaal

crude charm
#

m8 as they add stuff it's going to be harder to run

grim ice
#

people use Mods to make it optimized

#

no

#

they added it in a bad way

crude charm
#

bud if I had 10000000000 mods reguardless of how good my pc is it's going to run worse then vanilla / optifine with no mods

ivory sleet
#

It’s the cost of adding more features and enhancing the code base... sure, however spigot 1.8.8 is ancient and magnanimously outdated, it contains many bugs and other vulnerabilities. It’s not the fact that 1.8 as the game is bad, rather that it’s not supported making it a disaster to maintain and support generally.

crude charm
#

noone really uses vanilla 1.8 anymore

#

99% of smart people using it have a custom fork

ivory sleet
#

Yeah and then they will have to fix all the vulnerability holes and adding/maintaining the api

crude charm
#

^

grim ice
#

tell tht to hypixel

crude charm
#

m8

#

are you thick

grim ice
#

with 1.16 u still will have a hit delay

#

even with their implementation

crude charm
grim ice
#

of fast hits

#

u will be at a disadventage

ivory sleet
#

Hypixel is irrelevant and a different story

dense goblet
#

Hex are you on 1.8 lmao

grim ice
#

its one of the biggest servers

#

so i taake it as an example

ivory sleet
#

They have like 50 devs if not more maintaining their own 1.7 software

crude charm
#

Bud they have their own very custom shit

grim ice
#

WELL

ivory sleet
#

I bet you have that

crude charm
#

1.7 / 1.8 or idk

grim ice
#

just get gud

crude charm
hybrid spoke
grim ice
#

u prob click 3 cps

hybrid spoke
#

idc its great

ivory sleet
#

You can change hit cooldown

lost matrix
#

One day Fortnite 2 will come out and all 1.8 servers will die out

ivory sleet
#

Lmao

hybrid spoke
#

i dont need more to fight against the enderdragon

ivory sleet
#

You can legit change iirc item attribute on an item making it identical to the cooldown in 1.8

crude charm
dense goblet
#

Yeah only thing that's hard to get back from 1.8 combat is sword blocking

lost matrix
grim ice
#

it wont be the same

ivory sleet
#

Literally will

grim ice
#

come pvp in hypixel with 1.16 HAHHAHAHA

#

u will get destroyed

dense goblet
#

Another 1.8 discussion xd

ivory sleet
#

Why are you referring to hypixel all the time? And ftr it’s not 1.17 which is bad rather that they haven’t added item attributes to their items for later clients probably because it wouldn’t work well with some other stuff.

#

Anyways this is not the place to glorify ancient software.

dense goblet
#

Honestly if people don't like 1.9 pvp so much then they could just code a plugin to make their own pvp that's actually innovative and not a 1.8 port, and it still would be less effort than developing for 1.8

#

Item cooldowns add a lot of potential to pvp if people learned to accept them correctly instead of trying to swim upstream

stone sinew
stone sinew
#

Let's take for example checking the item in the players hand. In 1.9+ you have to check for the hand instead of just checking the item in hand. (Using a deprecated method)

crude charm
#

player.getInventory.getItemInHand

dense goblet
#

I never found checking the held item to be difficult

crude charm
#

^

stone sinew
crude charm
stone sinew
dense goblet
#

You just specify which hand

stone sinew
crude charm
#

it still gets read by newer versions

#

and works fine

dense goblet
#

And you gain a whole new active inventory slot to work with

crude charm
#

wow

dense goblet
#

People would kill to have double handed combat before it was added

ivory sleet
stone sinew
ivory sleet
#

?188age

ivory sleet
#

Oh wtf

crude charm
#

people were begging for 2 hands

dense goblet
#

Clearly with the amount of people having 1.8 specific problems that's not the case

#

Stop complaining about bad pvp and use the tools we were given to implement it better

#

Makes the rest of your plugin development much easier

#

I think you don't even need text component

stone sinew
#

I hate when "developers" complain about having to support older versions. Like it's your plugin don't support versions you don't want to. But don't complain that other developers don't mind supporting versions you dont.

dense goblet
#

Just string and ChatColor

crude sleet
#

How can i check if a player place a slab on top of another slab? I want to cancel that.

#

I thought it was with getRelative

crude charm
#

to be completely honest I dont even know what side everyone is on anymore lmfao

dense goblet
#

You can support 1.2.5 but it's gonna be hard to get any help

keen obsidian
dense goblet
#

On a development help channel it makes sense for people to push for updating

crude sleet
# crude charm you cant?

I mean, when a player puts a slab on another slab, the slab is a new block. I don't want that, I would like to cancel it.

dense goblet
grim ice
crude sleet
crude charm
#

was just about to say that

#

Registering is for the main class

#

do it there

#

0 reason to have a class for it

grim ice
#

well

#

i want it like that, thats preference

#

OH RIGHT LEMME FIX THAT

ivory sleet
#

It’s objectively worse to have a Registration like that

crude charm
#

^

keen obsidian
crude charm
#

Also your package naming is odd in the gui package

ivory sleet
#

First of all the name is a lie

#

You’re bootstrapping and creating new objects there also

crude charm
#

Also sometimes you avoid nesting but other times you have brackets for 0 reason

#

^

#

also dont use static {

}

to begin with

#

no reason to make all that static

dense goblet
#

They can have fields like normal classes

#

private int tick = 0 above run()

crude charm
#

Also

#

dont check for config values like "first.second" make an enum or smth to check for it like Messages.NO_PERMISSION instead of "settings.nopermission"

#

removes room for error

#

@grim ice

#

Why not?

dense goblet
#

premium content

crude charm
#

idk lmfao

grim ice
#

o

dense goblet
#

full-length source code and behind the scenes footage

crude charm
#

I am

#

just dont commit alot

#

only commit after alot of work

#

I should do it more

#

but

#

yeah

dense goblet
#

Yeah commit as often as possible (though I tend to only do it a few times a day at most cause I'm forgetful)

crude charm
regal dew
#

@grim ice you are using a class variable for something that's per-player, you likely want this class to be created for each player, or use a datastructure like Map (such that you can track each player)

You open it here: https://i.fvdh.dev/XshotjFR.png
In that method you overwrite the class variable: https://i.fvdh.dev/SVZsWusy.png
And you use the same datastructure in the InventoryClickEvent: https://i.fvdh.dev/lOVftwar.png

tl;dr, this will break with 2 players accessing a gui at the same time, allowing the first player to take items out the gui

dense goblet
#

Best use InventoryHolder to implement gui OO style

#

Your event listener only needs to check if the gui handler is an instance of your custom gui, then forward the event

eternal oxide
#

or just create an instance per player using it

keen obsidian
crude charm
#

^

#

"you likely want this class to be created for each player, or use a datastructure like Map (such that you can track"

dense goblet
#

I suggest not map

dense goblet
#

Using a map is not very expandable since it doesn't lend itself to keeping track of many variables per gui

grim ice
#

thats not spoonfeeding

crude charm
undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

dense goblet
crude charm
#

^

grim ice
#

dw

#

also how would 2 ppl run it at the same time

crude charm
stark marlin
#

Is there any way to get an items' corresponding name in the game, or is Material.name() the best possible way?

grim ice
#

idk exactly how to fix it

dense goblet
#

Why? They are per-instance

stark marlin
#

Sorry, meant materials name

ivory sleet
#

If you want the locale name use TranslatableComponent

stark marlin
#

Cool, I'll look into that. Thanks!

dense goblet
#

Yeah it's a confusing bit cause say you have gui A which can take you to guis B or C. I need to keep track of the child gui per-player per-gui because if we both started on gui A, I might have opened gui B and you might have opened gui C. Then gui A has two different child GUIs depending which player you care about.

tardy delta
dense goblet
#

Using Inventoryholders is preferred over hashmap

tardy delta
#

yea that public things

#

brr

eternal night
#

using inventory holder is really not prefered over hashmap

#

injection of a custom inventory holder has always been consider unsupported API usage, afaik as far as an open PR to remove that possibility all together.

#

A simple Map<Inventory, DataClass> does the same for you and can easily be maintained by the InventoryCloseEvent

dense goblet
#

I heard differing opinions but it's one less thing to worry about when using holders, so if it is changed in the future an equally simple alternative should be added

#

I switched from map to holder and my code became cleaner

#

Marginally since it's only like one class but still

eternal night
#

if you have a stash account

#

?contribute

eternal night
#

well spigot xD

#

with?

#

You commit changes with git

#

if that is what you mean

#

oh like what I contributed ? šŸ˜…

#

I made that method xd

eternal oxide
#

?paste

undone axleBOT
eternal oxide
quaint mantle
#

hello

#

is there any way to remove all diamonds ore from ground

#

only if on ground

grim ice
#

do i remove the comments

#

comments bad

eternal oxide
#

Do with as you like, but comments are good

grim ice
#

and why r stuff not final

eternal oxide
#

final is not really required in most instances

grim ice
#

but

#

openMenu

#

the params

#

u uh

#

need a collection of itemstacks

eternal oxide
#

yep, I made it generic.

#

so you can pass it any Collection of Itemstacks

grim ice
#

well

#

do i have to check for each warp now?

eternal oxide
#

keeps the Item generation code outside the class

grim ice
#

and add it into a collection>

#

o

eternal oxide
#

yes, you use teh same code you had, just do it in a method outside the class and put them all in a List

#

Then call openMenu(player, list)

tired spoke
#

for creating an 1.8-1.16 plugin is better using 1.8 paper or 1.16.5 paper? i saw some plugins where have native version in 1.16 and will support from 1.8

grim ice
#

?paste

undone axleBOT
grim ice
#

@eternal oxide u think dis good

eternal oxide
#

yep

grim ice
#

i added if(section.getKeys(false).isEmpty())
break;

#

?paste

undone axleBOT
quaint mantle
grim ice
#

worldedit

#

replace all diamond with stone

#

ez

quaint mantle
#

you did not understand me

#

i want to remove it using commands

quaint mantle
grim ice
#

imaginedev

#

can u recommend a way to learn

#

idk i feel like im not progressing

#

will it happen by time or do i have to do smth specific

eternal oxide
#

Write more code. See how others write code

grim ice
#

o

eternal oxide
#

If you don;t understand some code, google it til you do

#

or ask

somber hull
#

yea lol

#

Just work on projects

#

The placeholder API server has a channel called "request free"

#

I use that a lot when im out of ideas

eternal oxide
#

oh and once your code is working, don't stop there. Look over it, tidy and try to make it run more efficiently

#

last bit of advice, comment everything

quaint mantle
# grim ice can u recommend a way to learn

1.Maps rarely are passed through classes

  1. Never hardcode if statements for things like quests, skills, create check objects

  2. Always create an API for your classes and allow everything to be changed

  3. Javadoc everywhere

somber hull
quaint mantle
#

its like leaking data

somber hull
#

why?

#

And you mean like a hashmap right?

quaint mantle
#

mhm

#

use getters

somber hull
somber hull
#

true

#

but

#

whats the difference between a getter, and just making it public?

quaint mantle
#

i guess getters are "safer", and just java tradition but in some cases public is used

#

example: local package dependent classes

eternal oxide
#

a Getter means you can change any of the type Objects when you want.

somber hull
#

teh backign Objects

#

what?

quaint mantle
#

the backing objects

somber hull
#

got it

eternal oxide
#

a getter just hands out the data, how you store that data is up to you in the class, but if you make Fields public you are locked in.

somber hull
#

ok

somber hull
quaint mantle
#

make the api then the plugin, everything is 10x easier if you do it right

grim ice
eternal oxide
#

2 means things like very specific if tests you should wrap in a consumer and store the consumer in your class, not very specific tests.

grim ice
#

i dont follow any of these

#

nice life ive got

somber hull
#

ok, i dont get how an API works

#

like if i make an API

grim ice
#

idk hwo to make apis

somber hull
#

can another plugin interact with the variables and stuff i have stored in my plugin?

eternal oxide
#

design your API using interfaces

#

Your implementation is code the end user never needs

somber hull
#

dont you have to use custom events for someone to edit stuff with your plugin?

quaint mantle
#
  1. static isnt to make life easier

  2. understand OOP

  3. abstract everything

  4. understand object constants vs enums and when to use them

somber hull
somber hull
#

I get how to make an enum

#

Just not when its appropriate to use it

eternal oxide
#

static is really simple but it gets abused. Basically assigning something static means there will only ever be one instance of that object across all your code.

somber hull
#

i use it a few times

#

leme show you

#
    public static void plantWateredHandler(BlockGrowEvent event, FarmingOverhaul plugin) {
        
        Block block = event.getBlock();
        PersistentDataContainer chunkData = block.getChunk().getPersistentDataContainer();
        long delay = plugin.configTalker.getPlantDelay();
        NamespacedKey blockKey = new NamespacedKey(plugin, block.getX() + "_" + block.getY() + "_" + block.getZ() + "_wateredTime");
        //Check if block is specific type of plant if not, exit the event
        if (!(block.getType() == Material.CARROT || block.getType() == Material.WHEAT || block.getType() == Material.BEETROOTS || block.getType() == Material.POTATOES))
            return;
        if (!(chunkData.has(blockKey, PersistentDataType.LONG))) {
            event.setCancelled(true);
            return;
        }
        if ((chunkData.get(blockKey, PersistentDataType.LONG) + delay) > System.currentTimeMillis()) {
            event.setCancelled(true);
            return;
        }
        chunkData.remove(blockKey);
        
    }

I have this being called when a plant is trying to grow to check if its been watered

eternal oxide
#

eg, if you create a class that you might create multiple instances of, but it has a map which ALL the instances need to access. You make the Map static.

#

private static

quaint mantle
#

i look back at my code in galaxyshop, and i realize everything has to be extended, and nothing is implemented
example

interface EconomyHandler {
    void sell(ItemStack i);
}

class MyApi {
    @Getter
    private static MyApi inst;

    @Getter
    @Setter
    private EconomyHandler h;

    {
        inst = this;
    }
}
waxen plaza
#

How do I change a player name over their head? do I need to use nms?

somber hull
#

wait why would i not implement things?

#

Can you extend a interface?

quaint mantle
#

?

eternal oxide
#

no

#

interfaces are implemented. Classes are extended

somber hull
quaint mantle
#

i mean I should make more interfaces

somber hull
#

Oh ok

#

So

quaint mantle
#
class A implements Interface
class B extends Class
interface B extends Interface
somber hull
#

Idk if this is a good system or not

#

The CustomItem is an interface

#

and the watering can, and breadier bread are items using that interface, and extending itemstack

slim kernel
#

Is there a event that fires when the player opens the inventory?

somber hull
quaint mantle
#

it should be ItemStack

somber hull
#

I check for it later

quaint mantle
#

new ItemStack(material)

#

its not hard and its stricter

#

and better

somber hull
#

But if i do that, and the item has some random NBT from a different plugin

#

Then the recipe wont work

quaint mantle
#

?

somber hull
#

leme show you my recipe thing

quaint mantle
#

seems like the other plugins fault

somber hull
#
    public void registerRecipes() {
        //Loop through items and create a recipe
        for (CustomItem item : plugin.configTalker.getItems().keySet()) {
            if (!plugin.configTalker.getItems().get(item)) continue;
            if (!plugin.configTalker.config.getBoolean(item.getName())) continue;
            ShapedRecipe recipe = new ShapedRecipe(new NamespacedKey(plugin, item.getName()), item.getItem());
            recipe.shape(item.getRow1(), item.getRow2(), item.getRow3());
            //Loop through the ingredients, and set those
            for (Character key : item.getIngredients().keySet()) {
                if (item.getIngredients().get(key) instanceof ItemStack) {
                    recipe.setIngredient(key, new RecipeChoice.ExactChoice((ItemStack) item.getIngredients().get(key)));
                } else if (item.getIngredients().get(key) instanceof Material) {
                    recipe.setIngredient(key, (Material) item.getIngredients().get(key));
                }
            }
            plugin.getServer().addRecipe(recipe);
        }
    }
#

so it just makes the recipe with material if its a material, and an exact itemstack if its an itemstack

quaint mantle
#

why are these booleans?

#

Map<RecipeItem, Boolean> ?

somber hull
#

Cause on server startup, it checks if the item is enabled

quaint mantle
#

why woildnt it be

somber hull
#

Config

#

user can decide whether or not to enable it

quaint mantle
#

then just remove it from the map aPES_Giggle

#

it should be a set or list

somber hull
#

Well

#

i have this in my config

#

wateringcan-enabled: true

#

and that also disables the wateringcan

#

so i dont want to also make them disable the recipe for it

#
        items.put(new WateringCan(plugin), isCanEnabled());
        items.put(new BreadierBread(plugin), true);
quaint mantle
#

just remove the item 😩

#
if (isCanEnabled()) {
    items.put(new WateringCan(plugin));
}
grim ice
#

@eternal oxide btw

#

now the click event doesnt work at all

#

LOL

somber hull
#

but

#

there was a reason i didnt do that

#

idk what it was

quaint mantle
#

just do it

somber hull
#

wait

quaint mantle
#

you shouldnt ever have a map with a boolean

somber hull
#

No..

#

I cant

#

Because the watering can doesnt have a config entry

#

so it would fuck up this line

quaint mantle
#

tf are you on about

somber hull
#

if (!plugin.configTalker.config.getBoolean(item.getName())) continue;

#

so i have to remove that line

#

and when i add the boolean to the map

#

add the getBoolean there

quaint mantle
#

you need to recode this entire plugin

slim kernel
#

Is there a event that fires when the player opens the inventory?

somber hull
#
package me.silentprogram.farmingoverhaul.configstuff;

import me.silentprogram.farmingoverhaul.FarmingOverhaul;
import me.silentprogram.farmingoverhaul.items.BreadierBread;
import me.silentprogram.farmingoverhaul.items.CustomItem;
import me.silentprogram.farmingoverhaul.items.WateringCan;
import org.bukkit.configuration.file.FileConfiguration;

import java.util.HashMap;
import java.util.Map;

public class ConfigTalker {
    public FileConfiguration config;
    Map<CustomItem, Boolean> items = new HashMap<>();
    FarmingOverhaul plugin;
    
    WateringCan wateringCan;
    BreadierBread breadierBread;
    
    public ConfigTalker(FarmingOverhaul plugin) {
        this.plugin = plugin;
        config = plugin.getConfig();
        initializeItems();
    }
    
    public int getPlantDelay() {
        if (config.getBoolean("enable-plant-timer")) {
            return config.getInt("plant-delay") * 60000;
        }
        return 1;
    }
    
    public boolean isCanEnabled() {
        return config.getBoolean("wateringcan-enabled");
    }
    
    public boolean isAntiInbreedEnabled() {
        return config.getBoolean("anti-inbreeding-enabled");
    }
    
    public boolean isSkyLightEnabled() {
        return config.getBoolean("sky-light-enabled");
    }
    
    public Map<CustomItem, Boolean> getItems() {
        return items;
    }
    
    public boolean isItemEnabled(String itemName){
        return config.getBoolean(itemName);
    }
    
    public void initializeItems() {
        breadierBread = new BreadierBread(plugin);
        wateringCan = new WateringCan(plugin);
        items.put(wateringCan, isCanEnabled());
        items.put(breadierBread, isItemEnabled(breadierBread.getName()));
    }
}

#

@quaint mantle

#

i see nothing wrong here

eternal oxide
somber hull
somber hull
#

mostly with initializeItems()

eternal oxide
#

Why a Map with your items and the enabled state? When you have methods to check the enabled state

#

Just create your items when you need them

somber hull
eternal oxide
#

why?

somber hull
#

Because wateringcan-enabled in the config also disables some listeners

eternal oxide
somber hull
#

yea

#

i guesse i shouldve seen that coming

#

damn...

#

im sad now

slim kernel
#

Why does my InteractListener trigger if I trigger my DropListener?

public class DropListener implements Listener {

    @EventHandler
    public void onDrop(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        event.setCancelled(true);
        player.sendMessage("pressed q");
    }
}
somber hull
#

i could be wrong

#

Elgar would probably know

slim kernel
#

but there is no Action Action.DROP such as Action.LEFT_CLICK

slim kernel
eternal oxide
#

However, when you drop an item you trigger an Interact event with the block the item lands on

grim ice
#

1s

eternal oxide
#

It could be a pressure plate

grim ice
#

ye it doesnt

eternal oxide
#

or farmland etc

eternal oxide
grim ice
#

"debug"

slim kernel
eternal oxide
# grim ice "debug"

You did notice the contains method now. It takes a player and an inventory

#

as this code should support multiple players

grim ice
#

BUT DUDE

#

HOW IS IT NOT WORKING NO

#

NOW

#

ITS LEGIT THE FUCKING SAME

#

WHAT THE FUCK?

#

IM GONNA SHOT MYSEL

#

F

eternal oxide
#

I've not tested it, but I see nothing broken in the code

grim ice
#

breh

eternal oxide
#

add some sysouts and see where its gets to in the event

grim ice
#

oh god here we go again

#

ok

eternal oxide
#

it only has like 4 places that could use a sysout

winged ridge
#

Hi, so I want ot make a poll plugin and the command would be /poll <"question"> <answer1> <answer2>, but how can I put the argument inside the quotation marks into one string and not multiple arugments?
This is what I have atm:

            if (args.length > 3){
                for (int s = 0; s < args.length; s++){
                    System.out.println(args[s]);
                    if (args[s].startsWith("\"") || args[s].endsWith("\"")){
                        System.out.println("arg starts/ends with \""+args[s]);
                    }
                }
            }```
somber hull
#

for(String i : args){
}

#

make a string builder

grim ice
#

when u get a debug at the beginning of the code: OH THANK GOD

winged ridge
grim ice
#

@eternal oxide

#

if (!event.getClickedInventory().getTitle().contains(ChatColor.GREEN + "Warps")) {
System.out.println("doesnt contain");
return;
}

#

this was triggered

young knoll
#

Ohno comparing by title

grim ice
#

yes.

eternal oxide
#

You shoudl not be using titles anymore

somber hull
eternal oxide
#

use teh contains method in GuiMenu

somber hull
grim ice
#

BRO

#

I DIDNT

#

NOTICE

#

IT WAS MENU:

#

not WARPD

#

AIIRJGHAUOEFHBAUOBGFAWUEOBGFAWOEBGAIBAIRBGRIUFBEGEBUERBGUERBGERUBGE'G

grim ice
eternal oxide
#

change to use teh contains method

grim ice
#

its 1.8

grim ice
somber hull
#

leme send you something

eternal oxide
#

if (contains(player, inventory))

young knoll
#

PDC on an inventory? Wat

somber hull
#

check if the item has that value

eternal night
#

pdc for inventory when

young knoll
#

Fair enough

somber hull
young knoll
#

I usually like to identify the inventory too

somber hull
#

for 1.8 NBT

regal lake
#

Need some Help with the ProtocolLib, i try to listen on the BLOCK_BREAK_ANIMATION packet.
But the listener will not be triggered, other packets worked fine for me.
Its my first time using ProtocolLib, maybe i did something wrong ?
https://paste.md-5.net/baciseyivi.java

grim ice
#

if (menu.contains(player, event.getClickedInventory())) {
return;
}

#

like dis? elgar

eternal oxide
#

yes but !

grim ice
#

Oh yes i forgot that

somber hull
#

AAAAAAAAAAAAAA

#

just give free github pro already

eternal oxide
somber hull
grim ice
#

what

somber hull
#

Works from 1.8 to 1.17

grim ice
#

is this like an pdc thingy

#

for 1.8

somber hull
#

Yea

grim ice
#

wooo

#

tbh i used to use pdcs in every plugin i make but now i make 1.8.8 plugins so i dont have it :<

#

if this thingy works well ill use it

somber hull
#

item = NBTEditor.set(item, "value", "key");

grim ice
#

wait thats actually easier than normal pdcs isnt it

somber hull
chrome beacon
#

I usually use NBTAPI

somber hull
#

But you should just use normal PDC

grim ice
#

pdc is easy af

somber hull
#

Yea, but the namespaced key thing is annoying

#

I have to pass plugin everywhere

quiet ice
#

but it also avoids clashing even if the devs are dum

somber hull
#

Yea

grim ice
#

its not

#

usually i pass plugin on every class i make

#

becuz config

somber hull
#

well, there are a few times its annoying

#

like

eternal night
#

there is also just ```java
NamespacedKey.fromString("mynamespace:key");

#

for the kids that know what they are doing

somber hull
#

actually?

eternal night
#

yea

#

just. well don't be stupid with it

somber hull
#

you lied to me

eternal night
#

what ?

#

don't call me a liar!

eternal oxide
#

It was added in 1.17.1

somber hull
#

wait

#

...

#

why is that not showing up

eternal night
#

well what pleb isn't on 1.17

somber hull
#

oh

#

i didnt make it static

#

is was doing NameSpacedKey().fromSDtring

eternal night
#

LOL

#

5head

somber hull
eternal night
#

key can be whatever key you want

somber hull
#

aight

eternal night
#

namespace should just be 100% unique to your plugin

#

and your plugin only

#

if you fail at that, be ready for explosions

tardy delta
#

kaboom

somber hull
#
        canData.set(NamespacedKey.fromString("isWateringCan"), PersistentDataType.BYTE, (byte) 1);
        canData.set(NamespacedKey.fromString("waterLeft"), PersistentDataType.INTEGER, 10);
eternal night
#

mp

#

no

#

you need to specify the namespace

#

see my example

somber hull
#

so, farmingoverhaul:isWateringCan

eternal night
#

yea

somber hull
#

and then

#

when i do get

#

do the same thing?

eternal night
#

or just be normal and create a public static final somewhere

somber hull
#

canData.get(NamespacedKey.fromString("waterLeft"), PersistentDataType.INTEGER);

lost matrix
eternal night
#

too slow :>

lost matrix
#

-.-

eternal night
#

just like your executor service

#

lol

lost matrix
#

XD

somber hull
young knoll
#

What

eternal night
#
public static final NamespacedKey IS_WATERING_CAN = NamespacedKey.fromString("farmingoverhaul:isWateringCan");
#

don't re-create the namespaced key every time you use it

somber hull
#

oh, what if i have like 100 namespaced keys

young knoll
#

Then you are going to have a lot of static final fields

somber hull
#

should i make a class that just has a shit-ton of static fields in it?

young knoll
#

Or you could use a factory pattern

somber hull
#

someone was talking about it earlier

#

and i tried looking it up

#

public class NameSpacedKeys {
    public static final NamespacedKey IS_WATERING_CAN = NamespacedKey.fromString("farmingoverhaul:isWateringCan");
    public static final NamespacedKey WATER_LEFT = NamespacedKey.fromString("farmingoverhaul:waterLeft");
}

#
        canData.set(NameSpacedKeys.IS_WATERING_CAN, PersistentDataType.BYTE, (byte) 1);
        canData.set(NameSpacedKeys.WATER_LEFT, PersistentDataType.INTEGER, 10);
#

like that?

grim ice
#

uh

#

how to stop players from stealing satuff from gui with hot keys

somber hull
grim ice
#

by the way im writing without looking at my screen because im looking at the tv

#

HOLY FRICK I WROTE THIS WITHOUT MISTAKES

grim ice
somber hull
prisma needle
#

I just installed IntelliJ IDEA on a new computer, and tried opening an old bukkit project. However, when I build the jar and reload the server, I get this error in console. How do I fix it?

org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: com/commandgeek/geektest/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0```
somber hull
#

in your project

#

idk how to do it in intellij

#

it just kinda works for me

#

in eclipse i know how

grim ice
#

go to settings

#

project structure

somber hull
grim ice
#

SDK

#

set it to ur liking

young knoll
#

Click event should be trigged for hornets as well

grim ice
#

make it match ur server java version

somber hull
young knoll
#

Yes hornets

somber hull
young knoll
#

always has been for me ĀÆ_(惄)_/ĀÆ

somber hull
eternal night
#

looks good

somber hull
#

wait

#

NamespacedKey blockKey = new NamespacedKey(plugin, block.getX() + "_" + block.getY() + "_" + block.getZ() + "_wateredTime");

#

should i just leave this alone

#

since the key changes depending on the block location

lost matrix
eternal night
#

I mean seems like a Chunk PDC key

#

which should use block pos

#

instead of x y and z

lost matrix
#

Fun fact: You can represent the relative location of a block within a chunk with a single 32 bit int.

grim ice
#

not fun :DDDDDDDD

quiet ice
#

exactly what I was about to say

grim ice
#

jk

#

but wdym

#

can you give an example

quiet ice
#

(x << 24) + (y << 16) + z

lost matrix
#

But for custom block data which is saved within a chunk i would def write a new PersistentDataType that loads all data into memory when the chunk is loaded
instead of constantly accessing the PDC of the chunk

quiet ice
#

Although no, y can be higher than 255 and smaller than 0 now

lost matrix
quiet ice
#

hmm, this would require rethinking

lost matrix
#
  public static int getRelativeChunkPosition(final Block block) {
    final int relX = block.getX() % 16;
    final int relZ = block.getZ() % 16;
    final int relY = block.getY();
    return (relY & 0xFFFF) | ((relX & 0xFF) << 16) | ((relZ & 0xFF) << 24);
  }
eternal night
#

people linking their own post smh

lost matrix
#

?pdc

lost matrix
eternal night
#

:/

#

at least you linked my post too xD

#

thanks

somber hull
#

how tf can getConfigTalker be null???

grim ice
#

if so, u look like mrbeast wtf

somber hull
#
    public ConfigTalker configTalker;
    
    @Override
    public void onEnable() {
        startup();
    }
    
    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
    
    public void startup() {
        //Initialize config
        saveDefaultConfig();
        //Register my config talker
        configTalker = new ConfigTalker(this);
        //Register listener
        getServer().getPluginManager().registerEvents(new Listeners(this), this);
        //If the watering can is disabled then ignore this
        new RecipeHandler(this).registerRecipes();
    }
    
    public ConfigTalker getConfigTalker(){
        return configTalker;
    }
#

how is configTalker null..

eternal night
#

somewhere you are running code on class init

#

or not ?

quiet ice
#

Did you use it in your constructor?

grim ice
#

ALSO

somber hull
#

oh

#

yea

quiet ice
#

or clinit (unlikely) or cinit (also unlikely)

somber hull
#
    public WateringCan(FarmingOverhaul plugin) {
        super(Material.CLOCK);
        isEnabled = plugin.getConfigTalker().isCanEnabled();
#

thats in a constructor

quiet ice
#

onEnable gets called after your constructor

#

so that is the issue

somber hull
#

Why...

#

wait

#

how

quiet ice
#

Because that is how java works

#

clinit > cinit > init (constructor)

tardy delta
#

this sounds strange, like if your main class has a constructor

grim ice
#

@lost matrix
public void onBeak(BlockBreakEvent event){
int value = config.getInt("path"):
config.set("path", value + 1);
}

#

ez

tardy delta
#

what ab doing it in one line

somber hull
#

wait

quiet ice
#

but for the same block it would result in two different int ids

somber hull
#

'so how do i fix it

#

cxause

quiet ice
#

call startup() within the constructor

somber hull
#

wait..

#

wich constructor

quiet ice
#

or push all the code you have in your constructor in the onEnable block

#

there should only be one?

#

the constructor of the main class that is

somber hull
#

for wich class

somber hull
quiet ice
#

OH

somber hull
#

I thought you were talking about smthng else

#
package me.silentprogram.farmingoverhaul;

import me.silentprogram.farmingoverhaul.configstuff.ConfigTalker;
import me.silentprogram.farmingoverhaul.listeners.Listeners;
import me.silentprogram.farmingoverhaul.recipes.RecipeHandler;
import org.bukkit.plugin.java.JavaPlugin;

/*

 -- Means it is finished

Animals:
  Breeding animals has benefit
   -- You cant breed the same family together
  Animals require space to live (maybe?)
Farming:
  Benefit to farming, probably potion effects/new food items
    Add breadier bread
  Enchant to break 4x4 crops
  Also find a way to make hoes useful
   -- If you dont take care of crops they dont grow
    --   To achieve this, add a NBT tag of the current time, or minecraft day.  And let them only water plants once a day
     --    then add a listener to check when a plant grows(BlockGrowEvent) check if it has been watered in the past day if not
      --   cancel the event, if it has let it grow, and reset the timer
     -- Add watering can or smthng,
      Make watering can require water
    Add a end-game block that auto-waters probably gained through farming or just a nether star
   -- If a plant is inside, it affects how it grows
     -- Use Block.getLightFromSky()
Possibly add:
  Falling trees enchant

 */


public final class FarmingOverhaul extends JavaPlugin {
    ConfigTalker configTalker;
    
    @Override
    public void onEnable() {
        startup();
    }
    
    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
    
    public void startup() {
        //Initialize config
        saveDefaultConfig();
        //Register my config talker
        configTalker = new ConfigTalker(this);
        //Register listener
        getServer().getPluginManager().registerEvents(new Listeners(this), this);
        //If the watering can is disabled then ignore this
        new RecipeHandler(this).registerRecipes();
    }
    
    public ConfigTalker getConfigTalker(){
        return configTalker;
    }
}
quiet ice
#

You showed me a completely unrelated ctor

somber hull
#

thats the whole class

somber hull
#

and it was erroring in another constructor

quiet ice
#

where do you call WateringCan

somber hull
#

inside the constructor of ConfigTalker

#

maybe thats the problem

#

yea

quiet ice
#

it is

somber hull
#
        configTalker = new ConfigTalker(this);
        configTalker.initializeItems();
#

should fix it

quiet ice
#

Wouldn't recommend it

#

instead, pass the instance of ConfigTalker through the Constructor of it to the constructor of WateringCan

somber hull
quiet ice
#

Creating another hyper-specialised method that is required and easy to forget to call

somber hull
#

i just moved it out of the constructor

#

and into onEnable

somber hull
quiet ice
#

I'm talking abt initializeItems this method should not be there

somber hull
#

why not?

#

it was in here

#

i moved it here

quiet ice
#

There should almost never be an initaliation method outside of the static init block, the non-static init block and the constructor

#

That being said, this is my opinion

somber hull
#

ok, so it wont cause problems

#

its just ugly?

quiet ice
#

yes

#

But it might lead to programmer errors

somber hull
#

ill clean it up later if i need to

winged ridge
somber hull
grim ice
#

WHY DOES

#

if (!(player.getHealth() - event.getFinalDamage() <= 4)) return;

#

NOT WORK

#

someone pls help it urgent

odd tapir
#

is libraries property, in plugin.yml, 1.17 or higher only?

chrome beacon
#

Latest 1.16.5 should contain it too

grim ice
#
@EventHandler
    public void onDamage(EntityDamageEvent event) {
        if (getConfig().getBoolean("toggle")) {
            if (!(event.getEntity() instanceof Player)) return;
            Player player = (Player) event.getEntity();
            if (!(player.getHealth() - event.getFinalDamage() <= 4)) return;
            List<String> worlds = getConfig().getStringList("world");
            if(!worlds.contains(player.getWorld().getName())) return;
            double x = getConfig().getDouble("deathrally.x");
            double y = getConfig().getDouble("deathrally.u");
            double z = getConfig().getDouble("deathrally.z");
            Location loc = new Location(player.getWorld(), x, y, z);
            event.setCancelled(true);
            player.teleport(loc);
        }```
#

why is this not working

#

why ?

chrome beacon
#

Add some debug messages

haughty summit
#
        if (!(player.getHealth() - event.getFinalDamage() <= 4)) return;

you might want to test if the player's health is updated before or after the event is triggered

young knoll
#

After

haughty summit
#

Yeah since its a Cancellable obviously

lusty cipher
gusty bough
#

Is the 1.17 bundle added to Spigot? I cannot find it.

stone sinew
eternal oxide
#

If you return you are doing nothing and letting the event happen

#

and instead of doing if (!( health <= 4)) just use if (health > 4)

chrome beacon
#

Evalute expressions are quite convenient at times

lusty cipher
#

Yeah, understandable

#

Also can get annoying if your server just crashes because you were debugging for too long

chrome beacon
#

True

true perch
#

I have a String set to an ItemMeta's displayName, I'm trying to figure out which color codes are at the front. How can I do that?

grim ice
#

but

#

why is it not working

#

when the player is 1 hp

eternal oxide
#

sysout the get health

#

perhaps you have some plugin thats adjusting the health multiplier

delicate fractal
#

What is a goos cheap hosting site?

quaint mantle
#

if you wanna test your plugins do it locally

narrow furnace
tardy delta
#

is to possible to send a sound not on the master volume but on something else?

delicate fractal
#

Who is ziga

grim ice
eternal night
#

LOL

grim ice
#

its free

#

it saves u 1gb ram from ur pc

#

dont complain about free stuff

narrow furnace
grim ice
#

if u dont like it, just shut up

eternal night
#

not being able to test your plugin locally is pretty trash

grim ice
#

you use your pc resources

eternal night
#

you loose the option to properly debug

grim ice
#

What?

eternal night
#

specs online are usually trash for free tier

grim ice
#

wtf r u saying

eternal night
#

setting up a database/anything external is nearly impossible on free minecraft server providers

grim ice
#

how to use chatcolor alternate color codes thing

vague mason
onyx fjord
#

hewwo

#

whats the context

vague mason
#

that free servers from hosting providers are always trash.

onyx fjord
#

depends

#

99.99999% discord free hosting thingys are bad

#

but yea

vague mason
#

true in most cases

onyx fjord
#

rabbit good

#

šŸ‘

grim ice
#

is having 2 for loops inside 1 for loop bad

#

i mean ofc it is but im asking for the severity lol

onyx fjord
#

depends

#

how fast is the loop

#

and what does it do

tame coral
#

I'm making an economy plugin with ValutAPI, if i understand correctly i need to implement Economy and Override all methods ?

#

(just making sure)

onyx fjord
#

wdym sir

#

i dont think so

lost matrix
#

You can get a root server with an old i7 and 32Gigs of ram for 30 bucks a month.
There you can host your server, proxy, database, website and all the dc bots you want.

magic dome
#

hey guys anyone know if its possible to change the max durability of an item?

onyx fjord
#

yea the worst part about hosting stuff is that you need a reseller for smaller machines

tame coral
lost matrix
onyx fjord
#

like you can get 128GB ram server for 60 eur but you dont need it

#

and it becomes really cheap per gigabyte

magic dome
vague mason
#

to split those dedicated servers and provide services for cheap price.

onyx fjord
#

yea

#

and then you see apex having like 1000% profit

#

or more

vague mason
#

hahaha yeah

onyx fjord
#

imo that kind of stuff should be illegal

lost matrix
# magic dome explain please? :)

You cant change the actual max damage but you can tag your ItemStacks pdc and only apply 10% of the damage events which gives the ItemStack
an 10x effective durability

arctic moth
onyx fjord
arctic moth
#

thx

onyx fjord
#

no problem sir

magic dome
lost matrix
#

And you cant change any numbers that would be of importance here in nms

onyx fjord
#

@magic domecheck oraxen source code

#

it has a cool method to do that

true perch
#

I have a String set to an ItemMeta's displayName, I'm trying to figure out which color codes are at the front. How can I do that?

magic dome
#

i could go through it but if you know it it would same me a lot of time :)

vague mason
#

I'm also looking for some beta testers, that would (click random things, try to break something and provide me some suggestions...) It shouldn't take you more than 5 minutes and you don't need to install anything you can just access it from website.

tame coral
#

Let's try it

vague mason
quaint mantle
#

how can I make sure that when taking an object in 2 hands, it is used only in 1?

#

if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {

arctic moth
#

how do u set an icon for ur plugin after it has been published?

#

nvm found it under resource tools

quaint mantle
#

anyone know how to force a raid to start?

arctic moth
#

is there any way to tell if something is a baby from getEntityType?

grim ice
#

?pastte

#

?paste

undone axleBOT
grim ice
#

pls help

#

@eternal oxide if u can lol

quaint mantle
#

@grim ice

grim ice
#

brb ill come bak and see what u guys said thx in advance

tame coral
#

Because players isn't empty ??

eternal oxide
#

what exactly is players?

tame coral
#

Also the for loop wouldn't run if players were empty

eternal oxide
#

ah a paste

arctic moth
#

is there any like isBaby() function for GetEntity()

#

cuz im not finding anything

wary harness
#

Curious question what would be the beast way to make gui shop

  1. checking slot on click and checking config for that slot what actions should be done
  2. Storing all data about that item to it's PersistentDataContainer
eternal oxide
wary harness
#

@eternal oxide you have any suggestions

quaint mantle
#

@wary harness

eternal oxide
wary harness
#

what is the best action is it PersistentDataContainer

#

good idea

arctic moth
wary harness
#

like store commands which will be runned

tame coral
#

Cast it to Ageable

wary harness
#

when item is clicked

#

or price of that item

#

like maning shop manger which load all items