#help-development

1 messages · Page 1493 of 1

hybrid spoke
#

than check if the clicked slot is -999. return if it is

granite stirrup
#

Since getrawSlot returns the actual slot number.
when u have two inventories it return 0 for top and bottom for the top left slot if using getslot XD

quaint mantle
#

Huh

#

bStats?

granite stirrup
#

Bstats ?

quaint mantle
#

bStats?

granite stirrup
#

No

quaint mantle
#

bStats doesn't require bungeecord

granite stirrup
#

U get bstats by default on Ur spigot server

#

LOl

#

Cuz I always see bstats folder in there

quaint mantle
#

How can I turn off the display of notes when interacting with a note block, but allow it to be destroyed?

#

PlayerInteractEvent cancelling and BlockBreakEvent, because PlayerInteractEvent calls before BlockBreakEvent

eternal night
#

NotePlayEvent ?

quaint mantle
# hybrid spoke than check if the clicked slot is -999. return if it is
@EventHandler(priority = EventPriority.LOW)
    public void onInventoryClick(InventoryClickEvent e) {
        String Title = e.getInventory().getTitle();
        if (e.getSlot() == -999) return;
        if (e.getCurrentItem() == null) return;
        if (e.getCurrentItem().getItemMeta() == null) return;
        if (e.getCurrentItem().getItemMeta().getDisplayName() == null) return;
        if (e.getClickedInventory() == null) return;
        if (Title.equals(coloredChat.chat("&8My Profile"))) {
            Menus.MyProfileActions((Player) e.getWhoClicked(), e.getSlot(), e.getCurrentItem(), e.getInventory());
            e.setCancelled(true);
        }
    }```
It's not working
quaint mantle
#

i'll check

eternal night
#

it does. Tho I have no idea if that would also cancel the particles

quaint mantle
#

that cancelling and right click, and left click?

eternal night
#

any form of note playing

#

redstone as well

quaint mantle
#

hmmm

eternal night
#

guess that isn't what you want tho

valid vigil
#

How can I access an offline player's ender chest given I have their UUID?

eternal night
#

don't think that is possible with the API

quaint mantle
quaint mantle
#

he said check if slot is -999 returns it

#

but its not working

valid vigil
quaint mantle
eternal night
#

sweet

quaint mantle
#

It's working now lol

#

ty guys

#

how i can detect pressing left/right click on block?

wraith rapids
#

interact event

quaint mantle
#

PlayerInteractEvent detects only clicking

wraith rapids
#

it detects both

quaint mantle
#

i need pressing

wraith rapids
#

there is no such information relayed through the protocol

#

for holding left-click, you may be able to use the block breaking animation packets

#

but there is no api way

quaint mantle
wraith rapids
#

for right click, there is nothing

#

the client just sends a new click packet every x milliseconds

#

you can try to listen to them and keep track of the time and try to guess whether the button is still held or not

#

but it won't be super accurate

quaint mantle
#

i'll detect only left click

#

right click already working with PIE

#

Sorry for asking again but PlayerDropItemEvent it's not working

#
@EventHandler
    public void onPlayerDropItem(PlayerDropItemEvent e) {
        if (e.getPlayer().getInventory().getItemInHand() == null) return;
        if (e.getPlayer().getInventory().getItemInHand().getItemMeta() == null) return;
        if (e.getPlayer().getInventory().getItemInHand().getItemMeta().getDisplayName() == null) return;
        if (e.getPlayer().getInventory().getItemInHand().getItemMeta()
                .getDisplayName().equalsIgnoreCase(coloredChat.chat("&aMy Profile &7(Right Click)"))) {
            e.setCancelled(true);
        }
    }```
quaint mantle
#

I don't want to players drop item

wraith rapids
#

don't call getitemmeta multiple times

#

each get is a deep clone of the whole thing

#

which can be profusely expensive for more complex items

quaint mantle
#

Oh

eternal oxide
#

You are only checking the players item in hand

quaint mantle
#

I didn't know that

quaint mantle
wraith rapids
#

the player can drop more items than just the item in their hand

quaint mantle
wraith rapids
#

pressing the drop-item on a stack in an inventory drops it

#

clicking outside the inventory with a stack on the cursor drops it

quaint mantle
#

So what would i do

wraith rapids
#

check the item in the event

#

aka read the docs

quaint mantle
#

I did?

eternal oxide
#

if you want to prevent all drops, just cancel the event

wraith rapids
#

no

#

you are checking the item in the hand

quaint mantle
wraith rapids
#

like I just explained

quaint mantle
#

Okay

wraith rapids
#

there are more ways to drop shit than hold it in your hand

#

the dropped item is not necessarily in your hand

#

nor is there any guarantee that at the time of the event firing the item is still in the hand

quaint mantle
#

In Inventory

eternal oxide
#

it could be drag drop, pressed Q

wraith rapids
#

so, retrieve the item that was dropped from the event

#

not from the inventory

quaint mantle
#

Okay i got it i guess

#

Thanks for help

quaint mantle
#

?jd

quaint mantle
young knoll
#

Just don’t call it multiple times

wraith rapids
#

making it more efficient could be achieved with like a 2-3 line change to the ItemStack class

#

or, no, that's actually for equals/issimilar/hashcode efficiency

#

with the way how itemmeta and itemstacks are laid out currently, there isn't any good way to make the get not clone the meta each time

#

you just need to be mindful of only calling it when necessary

eternal night
#

where is that PR NNY 😭

zealous hearth
#

what is api version for 1.16.5?

eternal night
#

the one in plugin.yml ?

#

1.16

zealous hearth
#

yes

#

1.16?

eternal night
#

yes

zealous hearth
#

ty

eternal night
#

always just the major release version

quaint mantle
quaint mantle
iron condor
#

is there a way to respawn a player while hes alive?

#

I want to do a simple rtp by extending the minecraft's spawn area

quaint mantle
iron condor
#
        if (event.getItemDrop().getItemStack().equals(your item)) {
            event.setCancelled(true);```
#

inside the event

eternal night
#

Use ItemStack#isSimilar instead

iron condor
#

why?

wraith rapids
#

shouldn't really matter but it's more robust

eternal oxide
#

ignores stack size

iron condor
eternal oxide
#

if he's alive then teleport

iron condor
#

I need randomly teleport

eternal oxide
iron condor
#

did you reference your item in equals(your item) ?

quaint mantle
#

he said use this

#

not mine

eternal oxide
#

no he didn;t

vivid lion
#

wait wtf

iron condor
#

what is coloredChat.chat?

eternal oxide
#

you are comparing an ItemStack to a String

vivid lion
#

e.getItemDrop().getItemStack() returns ItemStack
coloredChat.chat("&aMy Profile &7(Right Click)") returns String

#

itll always be false

eternal night
#

would not have happened with isSimilar:>

vivid lion
#

lol true

quaint mantle
#
@EventHandler
    public void onPlayerDropItem(PlayerDropItemEvent e) {
        if (e.getItemDrop().getItemStack().equals(("§aMy Profile §7(Right Click)"))) {
            e.setCancelled(true);
        }
    }
tawdry cedar
#

Why not get the item in a different way rather than display name?

quaint mantle
#

still wrong?

tawdry cedar
#

Like the slot or type?

vivid lion
#

bruh did anything even change???

iron condor
#

smh

eternal oxide
vivid lion
#

if you want to

#

you can do

#

if (e.getItemDrop().getItemStack().getItemMeta().getDisplayName().equals("BLUH")) {}

quaint mantle
#

What about now?

@EventHandler
    public void onPlayerDropItem(PlayerDropItemEvent e) {
        Player p = e.getPlayer();
        ItemStack Item = new ItemStack(Material.SKULL_ITEM, 1, (byte) 3);
        SkullMeta Meta = (SkullMeta) Item.getItemMeta();
        Meta.setOwner(p.getName());
        if (e.getItemDrop().getItemStack().equals(Item)) {
            e.setCancelled(true);
        }
    }```
iron condor
#

bruh

eternal oxide
#

No

vivid lion
#

no

#

no

#

no

quaint mantle
#

lol

#

im suck at coding tbh

eternal oxide
#

We agree

vivid lion
#

just learn java basics

#

first

iron condor
#

learn that first probably

vivid lion
#

before heading into spigotMC

quaint mantle
#

I know java a bit

vivid lion
#

youll save yourself a lot of time

eternal oxide
#

You know a little. You need to know more

vivid lion
#

if you learn java first properly

quaint mantle
#

Okay

#

Where should i start?

vivid lion
#

java tutorialspoint

hasty fog
#

Or order a book

vivid lion
#

or go on youtube

#

and search it up XD

iron condor
#

youtube tutorials are bad tbh

hasty fog
#

Yup

iron condor
#

even knowing how to program they managed to confuse me

vivid lion
#

LMFAO

hasty fog
#

True

#

But I started with bukkit tutorials

#

Much worse

vivid lion
quaint mantle
#

I didn't know it was a bad idea

hasty fog
#

Atleast got me interested

hybrid spoke
#

its not

iron condor
#

what does deprecated mean?

#

im using PlayerPickupItemEvent

tawdry cedar
#

@quaint mantle Why can't you just do smt like this:

    @EventHandler
    public void onPlayerDropItem(PlayerDropItemEvent e) {
            if (e.getItemDrop().getItemStack().getType().equals(Material.WHATEVERMATERIALITIS)) {
                e.setCancelled(true);
            }
    }```
eternal oxide
#

it means read teh javadoc to see if there is an alternative

#

PlayerPickup has been replaced with EntityPickUp

iron condor
iron condor
#

EntityPickupItemEvent *

iron condor
#

Is there an event for time skip after sleep?

#

or a way to have a fake player in the server so there wont be time skip when sleeping

iron condor
#

🙏 thanks

wraith rapids
#

make all beds explode on bed enter event

eternal oxide
#

random teleport players when entering a bed

wraith rapids
#

ban the player when entering a bed

eternal oxide
#

That would fix it for sure

iron condor
#

I'll just sell the ability to sleep in the market for 5$ a month

#

so called VIP

sullen dome
#

is there actually an event that gets called when the consolesender is dispatching a command or smt?

#

couldnt find one

sullen dome
#

fuck

granite stirrup
#

There's only on command

sullen dome
#

yeah, the PlayerPreProcessCommandEvent or smt

granite stirrup
#

No

sullen dome
#

huh?

granite stirrup
#

The CommandEvent

#

I think

sullen dome
#

well... there's ServerCommandEvent... maybe that works

granite stirrup
#

That does both player and console

#

I think

#

I don't think CommandEvent is documented but I'm sure it's a thing

sullen dome
#

idk tho, if it includes commands, sent by #dispatchCommand();

granite stirrup
#

I swear it is

#

I swear I have seen people use it

sullen dome
#

i hope so

#

i mean, all i basically want is getting when i send a message from my discord console

granite stirrup
#

¯\_(ツ)_/¯

#

My mom's internet is shit

sullen dome
#

well

#

my ping is 17, i hate that

#

i mean, it could be worse, but still

iron condor
#

what problems do you encounter with 17 ping?

sullen dome
#

no problems, but the fact, that it could be better

#

when i see people with 1 ping xd

wraith rapids
#

marginally

sullen dome
#

and my upload is trash

wraith rapids
#

also, pinging requires 2 parties

granite stirrup
iron condor
#

trash upload is industry standard

sullen dome
#

oh wow

wraith rapids
#

your ping depends solely on whom you are pinging

sullen dome
#

this is really trash

wraith rapids
#

ping your localhost and you'll get 0ms

valid vigil
#

damn

sullen dome
#

LIE

wraith rapids
#

ping something across the globe and you're bound to get 50+ on minimum

sullen dome
#

1ms

wraith rapids
#

depends on rounding

sullen dome
#

xd

granite stirrup
#

89ms

wraith rapids
#

generally 0-1ms

granite stirrup
#

Ping

#

XD

sullen dome
#

iamgine 89ms to localhost

#

then probably your pc is broken xd

iron condor
#

imagine 89ms to brain

granite stirrup
#

My mom's network is shit

sullen dome
#

yea, pretty much

#

mom's be like
no, i don't need better internet, i dont use it

granite stirrup
#

O2 is shit

sullen dome
#

02 is shit???

#

go to vodafone

#

then you see what is shit

granite stirrup
#

Well the plan my mom has is shit

#

XD

sullen dome
#

most times, i dont even have internet

wraith rapids
#

just get your own contract if you don't like the one you get for free

sullen dome
#

because they do maintenance and stuff

wraith rapids
#

it's not like they cost anything

sullen dome
#

because vodafone literally only has broken cables

granite stirrup
#

My mom pays for her data

#

XD

#

And it's this shit

wraith rapids
#

yes, but negligible sums

sullen dome
#

i pay like 35€ per month for this trash

granite stirrup
#

Hang in let me test again I'm in a good signal area now

sullen dome
#

i mean, i would be cool if my internet would mostly work

#

but it doesnt lmao

granite stirrup
#

Fuck the signal is bad again

#

Bruhhhh

sullen dome
#

i mean, in normal case i could say okay, i dont wanna be at vodafone anymore, theres a reason, please fuck you. but they have the right to say:
noooo, you stay with us. i mean, we give you a free month, but you cannot leave lol

#

what should i do with a free month or smt, if my free month of internet doesnt work? lmao

#

feel like they dont care a single bit

wraith rapids
#

nobody does

sullen dome
#

yeah, but vodafone is worst

wraith rapids
#

literally nobody cares about you or whether the produce they sell you works or what you think about it

granite stirrup
chrome beacon
#

We internet flexing now?

wraith rapids
#

the only thing anyone cares about is your money

sullen dome
#

vodafone's instagram comments are literally only hate

#

hate, or bot comments

#

thats says everything

#

What would I like to have? Internet, telephone and TV, dear Vodafone! For 6 days nothing has happened anymore! The notification of the elimination of problems is extended from day to day. It is also not possible to tell whether work is being carried out on the fault at all. Neither your service number nor your WhatsApp service bring anything! Finally take care, otherwise you will soon have a few fewer customers.

vodafone in a nutshell

wraith rapids
#

they don't care about what you say

sullen dome
#

ofc they dont

wraith rapids
#

they don't care about your reviews because nobody who doesn't use their service reads them anyway

#

vote with your money

#

it's the only power you have in this world

iron condor
#

start your own service

granite stirrup
#

Lol

sullen dome
#

i mean, i probably will go with my lawyer against that dumb shit

granite stirrup
#

Oof speed test VPN is shit

sullen dome
#

you cant tell me they can go away with such shit like free months if their internet doesn't even work

wraith rapids
#

they have an army of lawyers

#

you will either lose or win a phyrric victory and it'll cost you several months or years of time and effort

sullen dome
#

well german courts aren't that bad

#

some youtube guy won against google lol

wraith rapids
#

yes, but after how long of a process

sullen dome
#

4-5 months?

wraith rapids
#

not worth a few dimes

sullen dome
#

well

#

if you lose your main income, i dont think so

#

without reasons

wraith rapids
#

if you already lost your main income and can't afford the $35 bill, you definitely can't afford the process

#

and if it does backfire, you are royally fucked

outer garden
wraith rapids
#

would you look at that

#

someone who actually links the image rather than the webpage

#

impressive

severe night
#

wtf is this Wrong location for EntityIronGolem['Iron Golem'/1636, l='world', x=145.51, y=65.25, z=188.54] in world 'world'!

iron condor
#

what does this mean? new ItemStack[0]

severe night
#

in CreatureSpawnEvent i teleport the entity, only this

wraith rapids
#

[] indicates an array

iron condor
#

and the zero in it?

wraith rapids
#

google "java arrays tutorial"

severe night
iron condor
#

ive just seen this
ItemStack[] inv = items.toArray(new ItemStack[0]);

#

made me confused

#
List<ItemStack> items = new ArrayList<>(); // initializing the future itemstack array
for(String key : cs.getKeys(false)){ // iterating over the saved keys (itemstacks)
    Object o = cs.get(key); // getting the object, String (if empty) or ItemStack
    if(o instanceof ItemStack) items.add((ItemStack)o); // if correct itemstack, adding it into the list
    else items.add(null); // not an ItemStack, adding null
wraith rapids
#

it's fairly straight forward

#

but you need to know some things about java and how java does arrays and generics

hybrid spoke
#

the zero is the capacity of the array. the reserved place in the heap

wraith rapids
#

basically, don't worry about it for the time being; items.toArray(new ItemStack[0]) just converts a List<ItemStack> to an ItemStack[] itemstack array

#

you won't understand why you need to pass it a new ItemStack[0] until you get into generics and shit

iron condor
#

alright... so is this ok?

            ItemStack[] playerInventory = savedItems.toArray(new ItemStack[0]);
            player.getInventory().setContents(playerInventory);```
wraith rapids
#

probably

hybrid spoke
#

yup

wraith rapids
#

depends on whether your savedItems has the right size and order

#

but code-wise, it's fine

iron condor
#

I dont understand the logic but ill go with it

rotund ravine
#

What logic

wraith rapids
#

new ItemStack[0] is an array constructor, it constructs an array holding elements of type ItemStack, of size 0

#

due to generics fucknuggetry, you need to pass a list an array of the correct type in order to convert it to an array

#

since due to type retention it can't actually figure out the type of array it should return by itself

#

of course that's all nonsense for you if you haven't gotten into generics yet, so just don't worry about it

iron condor
#

alright, thanks

winged portal
#

hi, to add money in a user balance having vault has a dependencie of my plugin is .deposit?

iron condor
#

ok so it wont work

    public List<ItemStack> getYamlPlayerInventory(String playerName){
        File file = new File(deathGhost.getDataFolder(), playerName + ".yml");
        YamlConfiguration yaml_file = YamlConfiguration.loadConfiguration(file);
        ConfigurationSection inventory = yaml_file.getConfigurationSection("Inventory");

        if (inventory == null){
            return new ArrayList();
        }else{
            List<ItemStack> items = new ArrayList<>();
            for (String index: inventory.getKeys(false)){
                Object item = inventory.get(index);
                if(item instanceof ItemStack) items.add((ItemStack)item);
                else items.add(null);
            }
            return items;
        }```
#
            List<ItemStack> savedItems = dataManager.getYamlPlayerInventory(player.getName());
            ItemStack[] playerInventory = savedItems.toArray(new ItemStack[0]);
            player.getInventory().setContents(playerInventory);```
#

nvm my bad had a typo

wraith rapids
#

that's the new maven project dialogue

plucky comet
#

does it mattr what iput

zinc saffron
#

Can someone help me with an error in intellij?

opaque bridge
#

what error

zinc saffron
#

I have fixed it

#

I can't send images here anyway

wraith rapids
#

nobody can help you with an error if you don't give any information about it

zinc saffron
#

I had an error when i was trying to install amazon corretto, i fixed it by invalidating cache

late dove
#

How can you determine that this is a specific inventory? For example, in one menu invetnore I have some actions on when I click on the slot, and in the other, others. Right now I'm using event.getView().GetTitle().EqualsIgnoreCase(inventory name) for this

#

are there any more ways?

eternal oxide
#

Don;t use title, use the instance. getView().getTopInventory().equals

granite stirrup
#

Ah yes the famous paper releases builds with no changes XD

#

Lovely

lean gull
#

can someone help please? i'm watching a tutorial on how to make an inventory (https://www.youtube.com/watch?v=dEwv7ay1RCI&list=PLDhiRTZ_vnoUvdrkTnaWP_hPmbj2JfPAF&index=8&ab_channel=TechnoVisionTechnoVision)
but i have come across a problem

CODE: (inventory is red)

        else if (cmd.getName().equalsIgnoreCase("delivery")) {
            player.openInventory(LudicrousyInventories.inventory.getInventory());
        }```
CODE: (in other calss)
```java
    @Override
    public Inventory getInventory() {
        return inventory;
    }```thanks in advance!
chrome beacon
#

?learnjava

undone axleBOT
lean gull
#

i watched a 2 hour and a half video on the basics of java

#

i didn't know what to do after it so now i'm just doing trial and error

chrome beacon
#

Well you should know that isn't how you access a (non-static) method then

lean gull
#

oh right i gotta add the class name with a dot

#

no wait i already have that

granite stirrup
#

if it's in the inventory class just do this.getInventory() or getInventory()

late dove
lean gull
#

it's in another class

granite stirrup
chrome beacon
#

No

granite stirrup
#

Just making sure

lean gull
chrome beacon
#

._.

lean gull
#

what? i am new to java

chrome beacon
#

Please learn Java basics

lean gull
#

and i'm used to skript

lean gull
granite stirrup
chrome beacon
granite stirrup
#

Abstract classes is basics

#

Lol

#

It's important to learn them

lean gull
#

no, the tutorial just didn't include this

granite stirrup
#

It's useful

#

Also interfaces

lean gull
#

it was mostly about maths

#

(which most of the syntaxes they showed i forgot too)

granite stirrup
#

Uh sounds like a bad tutorial

chrome beacon
#

^

#

?learnjava

undone axleBOT
chrome beacon
#

Follow these

lean gull
#

olivo please, stop helping. thanks!

chrome beacon
#

xd

lean gull
#

i'm not kidding

granite stirrup
#

Anyway I told u the syntax

lean gull
#

i'm not sure i understand how to use it

granite stirrup
#

If u actually have a instance of that class u can do classInstanceVar.method(args)

lean gull
#

what's an instance

chrome beacon
#

oh god

granite stirrup
#

Bruh

chrome beacon
#

Did that tutorial even teach you anything

lean gull
#

yeah

chrome beacon
#

Doesn't look like it

lean gull
#

my memory isn't quite the best

chrome beacon
#

I mean we've done our best. idkidk123123 has told you the exact awnser

granite stirrup
#

AClass classInstance = new AClass(parameters);
Is how you instance classes lol

chrome beacon
#

We're not going to spoon feed you code

#

nvm he just did

granite stirrup
#

Lol

chrome beacon
#

But hey at least that won't be possible to copy paste

lean gull
#

could you explain how that works? i want to learn for next time

granite stirrup
#

U need a constructor to instance a class tho but go learn java

lean gull
#

olivo i recall asking you to stop helping

chrome beacon
#

Bro I just sent the awnser to your question

lean gull
#

no you told me yet again to learn the java basics

granite stirrup
#

U need to

#

All u learned is nothing XD

lean gull
#

i find nothing funny in an insult

chrome beacon
lean gull
#

ok can i get literally anybody else to help me?

#

help isn't good help if it comes from a bad place

granite stirrup
#

Floofsy this is good help

#

We can't give u every code to copy paste

lean gull
#

no, both of you are being mean

granite stirrup
#

U have to learn it urself

#

Lol

granite stirrup
#

We gave u the awnsers

lean gull
#

you just said i learnt nothing

granite stirrup
#

Cuz u did

lean gull
#

and olivo keeps telling to learn the basics even though i said i did

chrome beacon
#

Yeah you didn't hence why I told you to follow a better tutorial

granite stirrup
chrome beacon
#

You don't learn a programming language in one day. It takes time and patience

lean gull
#

it took me like 3 days even though it was a 2 hour and 30 minutes tutorial

#

so... checkmate?

granite stirrup
#

It takes like 2 weeks to learn java a year or More for full java probs

chrome beacon
#

You never stop learning that's the way it goes

lean gull
granite stirrup
#

But u need to learn more

lean gull
#

why am i even talking to you guys

#

can someone else please help?

granite stirrup
#

Read a basic java tutorial

zealous hearth
#

what is going on

chrome beacon
#

Help with what. No one is going to give you a better awnser than a direct link to your question

granite stirrup
#

@zealous hearth someone's being a ||dickhead||

eternal oxide
#

its got a red underline because its telling you there is an error. hover over it and see what its says, then you can correct it

lean gull
#

i did, it doesn't really mean anything to me

chrome beacon
eternal oxide
#

I know

chrome beacon
#

However he refuses to read the guide about objects I sent ;/

granite stirrup
#

?learnjava @lean gull

undone axleBOT
lean gull
#

elgar do you know how to help?

eternal oxide
#

He needs to learn OOP as its the basics of Java. But until he learns to read his errors he'll get nowhere

eternal oxide
granite stirrup
#

I think everyone should just loose hope on this kid it's not worth it

quaint mantle
#

Floofsy what they are saying is right. Spend more time learning about java. It may seem insulting but trust us, you'll save a lot of time in the long run when you actually know what to do

granite stirrup
#

Java is like the most easiest to use language ever XD

#

Atleast for me it was

lean gull
#

found the problem

#

i was following the tutorial incorrectly

#

thanks for nothin guys

granite stirrup
#

We gave u every single awnser

#

LMAO

lean gull
#

in a very mean way

granite stirrup
#

And u said my stupid brain can't handle this crap

lean gull
#

i said that when exactly?

granite stirrup
#

Learn java basics

granite stirrup
#

We just said learn basic java

lean gull
#

nonono wait

#

i wanna know when i said your brain is stupid and can't handle this

#

because i have no recollection of that

granite stirrup
#

U said u don't understand it

#

Lmao

lean gull
#

"you don't understand" = "your brain is stupid and it can't handle this"?

tardy delta
#

what

#

is

#

happening

#

?

granite stirrup
lean gull
#

well then clearly you don't understand :P

granite stirrup
#

It is the same kinda

#

Not exactly

#

But it's similar cuz if you don't understand this Ur stupid

quaint mantle
#

I wouldn't say stupid, but rather ignorant to the advice to learn java

granite stirrup
#

well i guess lol

#

but Floofsy u wouldnt take the advice that olivo said

plucky comet
#
Player p = (Player) sender;
            Material item = Material.POTION;
            ItemStack pot = new ItemStack(item);

            Inventory inv = p.getInventory();```How would i give a player a splash pot of healing 1.8.8?
lean gull
#

what does description do in command sections in plugin.yml

granite stirrup
quaint mantle
#

It's...the description?

#

Of the plugin?

lean gull
#

what

#

i mean of commands

sullen dome
#

how is Location#getDistance(Location) actually measuring distance? like for example if i compare two blocks on the same line (left on the pic), it's obvious. but how is this working for example in the right side of the pic? if the blocks are not on the same line, same height, and etc

granite stirrup
#

if u do /help command

#

it shows the description

lean gull
#

oh

lean gull
#

good to know 👍

tardy delta
sharp bough
sullen dome
#

oops wrong reply

#

to see the distance between 2 loc's

granite stirrup
chrome beacon
sullen dome
#

really?

#

you give me math?

chrome beacon
#

Ye

sullen dome
#

oh wow

#

i can't even read that xd

chrome beacon
#

Well you were wondering how it does it

sharp bough
#

si this is static abuse right?

tardy delta
#

a²+b²=c² ?

sharp bough
sullen dome
tardy delta
#

just pythagoras?

chrome beacon
plucky comet
#
Player p = (Player) sender;
            Potion pot = new Potion(PotionType.REGEN);
            

            Inventory inv = p.getInventory();
            inv.addItem(pot);```Like this?
tardy delta
#

ah

granite stirrup
#

it says on that page AB=(x2−x1)2+(y2−y1)2+(z2−z1)2 so is AB like x and y?

sullen dome
#

i would probably consider everything as static abuse that is made to simply access it easily lol

tardy delta
#

ow yes i learned somewhere at school

sullen dome
#

but thats personal

granite stirrup
sullen dome
#

basically all i wanted to know is:

does it go like

o-------
|
|
-----------o

or more like directly via diagonal line

sharp bough
sullen dome
#

sure it works

sharp bough
#

after 6 hours

chrome beacon
#

If it's just 2d use the pythagorean theorem otherwise use the formula I sent

sullen dome
#

but it's bad

sharp bough
#

i managed to make it work

#

:c

sullen dome
#

i have no clue how formulas work ahhhhhhh

chrome beacon
#

But that's basic math?

sullen dome
#

yeah, tell that my discalkulia

#

or whatever its called

granite stirrup
#

is it impossible to actually return two things in java without making a class with two variables using those or returning a array lol

sharp bough
#

dislexia?

#

lol

sullen dome
#

if you ask me hey, what is 100+300 i can easily say obv, 400

but if you would for example ask me what is 7*8 i couldn't do that within like 20-30 seconds

#

and now imagine i have to read formulas and shit

tardy delta
#

56

#

took 2 sec

lean gull
#

i made a GUI but when i execute the command to open it, it sends internal error

tardy delta
#

ez

chrome beacon
#

That too

sullen dome
#

Dyscalculia () is a disability resulting in difficulty learning or comprehending arithmetic, such as difficulty in understanding numbers, learning how to manipulate numbers, performing mathematical calculations and learning facts in mathematics. It is sometimes informally known as "math dyslexia", though this can be misleading as dyslexia is a d...

granite stirrup
lean gull
sharp bough
#

no one wants it

tardy delta
#

haha true

craggy egret
#

Looking to hire a Server Manager.
Paid Postion

PM me if interested!

sharp bough
#

it sucks

#

but its true

undone axleBOT
granite stirrup
#

i can do complicated math in my head it just takes forever for me to process it XD

sullen dome
#

i can't really

#

i mean, i had problems yesterday, with making timber

mental jungle
#
public void TestEvent(PlayerAdvancementDoneEvent event){
Player p = event.getPlayer();
p.getInventory().addItem(new ItemStack(Material.NETHERITE_PICKAXE));



}``` I want to add only one pickaxe but it adds while advancement is on the screen.How can I solve this?
sullen dome
#

which basically is just this

#

without the distance btw

#

thats just temporarily

granite stirrup
#

what are u making

sullen dome
#

basically veinminer for trees

gusty bough
#

Hey, I want to get players from a command after the command is executed : Exemple : /team join [TeamName] @p
And I want to get something like "team join [TeamName] [PlayerName]"

granite stirrup
gusty bough
#

Is that possible?

ivory bay
sullen dome
#

not plugin, but function, yeah

granite stirrup
sullen dome
#

so what? i have a working timber lmao

lean gull
#

so can anybody help?

gusty bough
#

?

sharp bough
#

player.perfomCommand

sharp bough
#

if you want them to make the command

#

but

gusty bough
#

Perform command event is processing before the command

sullen dome
#

also, that plugin makes ads for bisect-hosting. so i would basically not get it lol

sharp bough
#

you can use args to check the [TeamName] for example

#

but you need something else, a team is something that you create

#

add each player to a list

granite stirrup
sharp bough
#

for example team1[and all players here]

sullen dome
#

yeah sure

sharp bough
chrome beacon
#

Since you might need some help understanding the formula let me explain it for you.

AB is the distance between the two points A and B.
A = (x1, y1, z1)
B = (x2, y2, z2)
(Just the cordinates)

AB = root of (x2−x1)^2+(y2−y1)^2+(z2−z1)^2

Using the built in java math library you can replace ^2 with Math.pow(<replace this with the number from inside the parenthesis>, 2)
When you've done that take the result from each of the values and combine them and use Math.sqrt to get AB

Hope I explained this well enough ;/
@sullen dome

sullen dome
#

but i mean... why should i use it? instead i can learn math lololol

#

oh god

gusty bough
#

I tested and it seems that i cannot get players, only @p

sharp bough
#

whats @ p

#

send the code

#

?paste

undone axleBOT
sullen dome
#
AB = root of (x2−x1)^2+(y2−y1)^2+(z2−z1)^2

what?!?

#

xd

past maple
#

use Pythagore theorem

sullen dome
#

using dyscalculia lol

chrome beacon
tardy delta
#

🙄

plucky comet
#
Player p = (Player) sender;
            Potion pot = new Potion(PotionType.INSTANT_HEAL, 2);


            Inventory inv = p.getInventory();
            inv.addItem(pot);```How would i ive the player a potion
gusty bough
#

Its something like this https://paste.md-5.net/yalonulege.cs
What i want is to get player name instead of the selector. Exemple : someone is doing /team join testTeam @p, i want to get the player selected by the @p, is that possible?

tardy delta
plucky comet
tardy delta
#

yes?

sharp bough
#

you want to make the player drink the potion?

#

just add the effect

tardy delta
#

oh that way

chrome beacon
gusty bough
#

last

#

one

plucky comet
chrome beacon
tardy delta
#

well you're litteraly doing it on the last lines

plucky comet
sullen dome
#

do formulas help me measure this fucking motherfucker-trees? xd

#

they always spread like fuck

chrome beacon
sharp bough
lean gull
#

anyone know why the last line makes it send internal error and stops the function from working?

        ItemStack blackStainedGlassPane = createItem("", Material.BLACK_STAINED_GLASS_PANE, Collections.singletonList(""));
        for (int i = 0; i <= 54; i++) {
            inventory.setItem(i, blackStainedGlassPane);
        }```
#

i mean 2nd last

chrome beacon
#

Remove the =

gusty bough
#

Nice, so I just use this function and it will 100% of the time give me the same selected entities than the command?

sullen dome
#

there wouldn't really be a BlockFace for (y + 1, x + 1) for example

lean gull
#

createItem is a function to create items with a name, material and lore

sharp bough
stone sinew
lean gull
#

ohhh

granite stirrup
lean gull
#

alright, thank you!

sullen dome
#

and i work with blockfaces lol

chrome beacon
granite stirrup
#

XD

round finch
#

does Item contain enchantment data?

#

quick question lazy to check

granite stirrup
#

float right i think it probs would be a float lol

sullen dome
#

i guess thats itemmeta

sharp bough
granite stirrup
#

or is it a int

#

actually i think sqrt returns a int

#

unless it is a float

past maple
#

double or float

sullen dome
#

seems like both does

round finch
#

so? item has Meta
Meta Has enchantments?

sharp bough
#

yes

chrome beacon
granite stirrup
round finch
#

ok thanks!

gusty bough
#

Oh and is there an event called after the command is processed? Right now i'm using ServerCommandEvent but this event is called before the command is done

chrome beacon
sullen dome
#
[18:00:34 ERROR]: Could not pass event BlockBreakEvent to SurvivalCore v1.0-SNAPSHOT
java.lang.StackOverflowError: null```
all i wanted, joke
chrome beacon
#

rip

sullen dome
#

i love that kind of error

#

just so spammy xd

granite stirrup
#

lol StackOverflow

sullen dome
#

oh god, and i know why

granite stirrup
#

it sounds like it wants u to go to stackoverflow

#

but it isnt

sullen dome
#

because i didnt assigned a variable lol

#

i forgot to, ahhhhh

gusty bough
#

Nevermind with the selectEntities it should be good.

sullen dome
#

no wait, nvm, i did

tardy delta
#

does this works?

ItemStack potion = new ItemStack(Material.POTION(PotionType.INSTANT_HEAL, 2));
    p.getInventory().addItem(potion);
sullen dome
#

yeah, first time i wrote that link from hand

tardy delta
#

its for @plucky comet

chrome beacon
#

;/

tardy delta
#

whats the problem?

chrome beacon
#

It's ```java
new Potion(PotionType.INSTANT_HEAL, 2).toItemStack(1)

sharp bough
chrome beacon
granite stirrup
#

LMAO i did ```java
class Main {
public static double distanceBetweenPoints(float x1,float y1, float z1,float x2,float y2,float z2) {
return (Math.sqrt(Math.pow((x2-x1),2)+Math.pow((y2-y1),2)+Math.pow((z2-z1),2)));
}

public static void main(String[] args) {
System.out.println(distanceBetweenPoints(0,0,0,1,1,1));
}
}``` it gave me 1.7320508075688772 is that meant to happen

tardy delta
#

Math.round or something

granite stirrup
#

is that correct or no

past maple
#

sqrt(3) = 1.73...

tardy delta
#

yes

granite stirrup
#

lol

chrome beacon
tardy delta
#

goh

#

never done before so i assume that's correct

chrome beacon
#

It's depricated any way and shouldn't be used in newer versions

tardy delta
#

aah then say that XD

chrome beacon
#

Since he's on 1.8 it's fine

tardy delta
#

just saying it's deprecated was enough for me XD

chrome beacon
#

In newer versions you use PotionMeta

#

Just cast item meta to it and add your potion effects

granite stirrup
#

i sometimes have 69 fps in 1.17

opal juniper
#

?paste

undone axleBOT
opal juniper
#

Hello! Atm i currently use this code to make an api request however i feel it may not be that efficient - i wondered if anyone could have a look over it 😄

https://paste.md-5.net/icepixituw.js

#

ParameterBuilder is normally in a different class

plucky comet
#
int amount = Integer.parseInt(args[1]);```What will this return if its not an int
opal juniper
#

NumberFormatException – if the string does not contain a parsable integer.

plucky comet
#

how do i handle that is there like try and excepts

opal juniper
#

You come from python?

plucky comet
#

ye

opal juniper
#

Ahh, i see

#

so in java we have try / catch

#

eg:

#
try {
    int amount = Integer.parseInt(args[1]);
}catch (NumberFormatException exception) {
    exception.printStackTrace();
    int amount = 0;
}
young knoll
#

That is

#

Still very wrong

plucky comet
#

ooop

young knoll
#

You’ll want to declare the variable before the try catch

#

Also you shouldn’t really be relying on an exception to determine if it’s a number

tardy delta
#

printStackTrace does not really matter

opal juniper
#

yes - declare b4 the try

#

and the printStackTrace was just to show them how

shut field
#

please how do I delay ticks

#

it does not run the code in "public void run()"

#

however it does tp me to "location"

#

it is supposed to wait 10 ticks

eternal oxide
#

don;t cast this to plugin

#

you are also not @override on yoru run method

shut field
paper viper
#

it has to be a plugin

eternal oxide
#

precisely. It requires a plugin instance.

paper viper
#

you cant pass in an event class

#

so use dependency injection where you pass the plugin through your constructor (preferebly), or use a static instance

#

or use JavaPlugin.getPlugin(yourmainplugin.class)

shut field
paper viper
#

then again, I did say to use dependency injection preferebly

#

do you know what that is?

shut field
#

nope, not at all

paper viper
#

here's an example

#

public MyTaskClass {

  private final MyPlugin plugin;
  
  public MyTaskClass(final MyPlugin plugin) {
    this.plugin = plugin;
  }

}
#

and MyPlugin would be your plugin class

#

then, when you want to initialize an instance of the class, use new MyTaskClass(...) and pass in your plugin instance in the 3 dots. For example if you were doing this directly in the plugin class you would use new MyTaskClass(this)

#

as it points to the current plugin instance

shut field
paper viper
#

That was an example

chrome beacon
#

So you just straight up copied and pasted that ._.

paper viper
#

is myPlugin your main class?

shut field
#

is that supposed to be the name of my class?

shut field
paper viper
#

No, it was an example

#

then again, it is strongly recommended you at least learn some basic inheritance in Java first

#

before actually coding plugins

paper viper
#

?learnjava

undone axleBOT
paper viper
#

start with some of these links

sullen dome
#
    private void cutDownTreePart(Player player, Block startBlock) {
        if (isLog(startBlock) || isLeave(startBlock)) {
            startBlock.breakNaturally();
            for (BlockFace face : blockFaces) {
                Block newBlock = startBlock.getRelative(face);
                Block newBlock2 = startBlock.getRelative(face).getRelative(BlockFace.UP);
                Block newBlock3 = startBlock.getRelative(face).getRelative(BlockFace.DOWN);
                if (isLog(newBlock) || isLeave(startBlock)) cutDownTreePart(player, newBlock);
                if (isLog(newBlock2) || isLeave(startBlock)) cutDownTreePart(player, newBlock2);
                if (isLog(newBlock3) || isLeave(startBlock)) cutDownTreePart(player, newBlock3);
            }
        }
    }

you guys have an idea, why this isn't including leaves? it breaks all logs, but not one single leave

paper viper
#

what is isLog

#

and isLeave

#

show us those methods

quaint mantle
#

Why my event is not working?

@EventHandler(priority = EventPriority.LOW)
    public void onInventoryMoveEvent(InventoryMoveItemEvent e) {
        ItemStack itemStack = e.getItem();
        e.setCancelled(itemStack != null && itemStack.getType().equals(Material.SKULL_ITEM) && itemStack.hasItemMeta() &&
                itemStack.getItemMeta().getDisplayName().contains(coloredChat.chat("&aMy Profile &7(Right Click)")));
    }```
sullen dome
#

one sec

quaint mantle
paper viper
#

show me

#

how you registered it

quaint mantle
#
public Listeners(LonelyPlugin pl) {

        Bukkit.getPluginManager().registerEvents(this, pl);
    }```
#

new Listeners(this);

#

@paper viper

sullen dome
#
private boolean isLog(Block b) {
        return (b.getType().equals(Material.OAK_LOG)
                || b.getType().equals(Material.ACACIA_LOG)
                || b.getType().equals(Material.BIRCH_LOG)
                || b.getType().equals(Material.DARK_OAK_LOG)
                || b.getType().equals(Material.JUNGLE_LOG)
                || b.getType().equals(Material.SPRUCE_LOG)
                || b.getType().equals(Material.CRIMSON_STEM)
                || b.getType().equals(Material.WARPED_STEM)
                || b.getType().equals(Material.STRIPPED_OAK_LOG)
                || b.getType().equals(Material.STRIPPED_ACACIA_LOG)
                || b.getType().equals(Material.STRIPPED_BIRCH_LOG)
                || b.getType().equals(Material.STRIPPED_DARK_OAK_LOG)
                || b.getType().equals(Material.STRIPPED_JUNGLE_LOG)
                || b.getType().equals(Material.STRIPPED_CRIMSON_STEM)
                || b.getType().equals(Material.STRIPPED_WARPED_STEM)
                || b.getType().equals(Material.STRIPPED_SPRUCE_LOG));
    }
    
    private boolean isLeave(Block b) {
        return (b.getType().equals(Material.OAK_LOG)
                || b.getType().equals(Material.ACACIA_LEAVES)
                || b.getType().equals(Material.BIRCH_LEAVES)
                || b.getType().equals(Material.DARK_OAK_LEAVES)
                || b.getType().equals(Material.JUNGLE_LEAVES)
                || b.getType().equals(Material.SPRUCE_LEAVES)
                || b.getType().equals(Material.WARPED_WART_BLOCK)
                || b.getType().equals(Material.NETHER_WART_BLOCK)
                || b.getType().equals(Material.SHROOMLIGHT));
    }```

could be made with enum's and stuff, i know that
paper viper
#

Ok dude there is quite a bit you can improve here

sullen dome
#

lmao

paper viper
#
  1. Material is an enum. You don't have to use .equals. Just use ==
#
  1. Store all the types into an EnumSet
#

instead of having like 20 or statements

sullen dome
#

that still doesnt fix my problem dude

#

and this was not my question

paper viper
#

It makes it clearer to read and faster

#

lol

quaint mantle
sullen dome
#

maybe i'll do. but you get what these methods do.

quaint mantle
#

this is constructor

paper viper
#

for the main class and event class

quaint mantle
#

?paste

undone axleBOT
sullen dome
#

so now ignoring because i dont do what he wants lol... love it lmao

quaint mantle
paper viper
#

lmfao

#

I will less want to help you if you have that attitude

quaint mantle
#

she is ignoring me i think

#

lol

sullen dome
#

she is not a she

#

if you meant me

lean stirrup
#

Tbh, I would ignore you if you ignored the question...

quaint mantle
#

not you

sullen dome
#

ok

eternal oxide
#

Tag.LOGS.isTagged(block.getType())

eternal night
#

^^ also Tag.LEAVES

lean stirrup
#

Idk. Who ever ignored the question. xD

paper viper
quaint mantle
paper viper
#

add some sort of println statement

#

inside the event

quaint mantle
#

are you trolling me?

paper viper
#

No

#

I want to make sure the event is being called

#

I am not trolling you

sullen dome
quaint mantle
#

Its working

sullen dome
#

that makes it really quite simple

quaint mantle
#

I mean it registerd

sullen dome
#

tho, i dont think LEAVES includes the nether-tree-leaves?

quaint mantle
#

but not working

paper viper
#

What is your goal then?

#

in this case

quaint mantle
#

to disallow a player to move an item called "My Profile"

paper viper
#

you may want to use slot ids

#

id use pdc

eternal night
#

Tag.WART_BLOCKS exits

paper viper
#

but i doubt you would use PDC anyways...

#

so use slot ids

#

instead of checking names

quaint mantle
#

What's PDC?

paper viper
#

PersistentDataContainer

#

basically you store nbt in a item

#

you can retreive data from it

unreal sandal
#

Hello, I have a problem for my Custom Chat Event. It is not working, someone can help me ?

unreal sandal
#

public class CustomChat implements Listener {

@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent e) {
    Bukkit.getServer().getPluginManager().callEvent(new CustomChatEvent(e.getPlayer(), e.getMessage()));
}

@EventHandler
public void onCustomPlayerChat(CustomChatEvent e) {
    Player player = e.getPlayer();
    if(!e.isCancelled()) {
        for(Player onlinePlayers : Bukkit.getServer().getOnlinePlayers()) {
            if(onlinePlayers.getWorld().getName().equals(player.getWorld().getName())) {
                onlinePlayers.sendMessage(player.getName() + " : " + e.getMessage());
            }
        }
    }
}

}

paper viper
#

what is CustomChatEvent

unreal sandal
#

public class CustomChatEvent extends Event implements Cancellable {

private static final HandlerList handlers = new HandlerList();
private Player player;
private String message;
private boolean cancel;

public CustomChatEvent(Player player, String message) {
    this.player = player;
    this.message = message;
}

@Override
public HandlerList getHandlers() {
    return handlers;
}


public static HandlerList getHandlerList() {
    return handlers;
}

@Override
public boolean isCancelled() {
    return cancel;
}

@Override
public void setCancelled(boolean cancel) {
    this.cancel = cancel;
    
}

public Player getPlayer() {
    return player;
}

public String getMessage() {
    return message;
}

}

paper viper
#

and did you register these events properly?

#

and please use a pasting site

#

?paste

undone axleBOT
unreal sandal
#

Okay sorry, I do that

paper viper
#

all g

sullen dome
#
  private boolean isLog(Block b) {
        return Tag.LOGS.isTagged(b.getType());
    }

    private boolean isLeave(Block b) {
        return Tag.LEAVES.isTagged(b.getType());
    }

so... are you good now? lol

quaint mantle
paper viper
#

I dont think there is a need to create an extra event class here

#

you can just directly listen to the AsyncPlayerChatEvent event

#

then you should be okay

unreal sandal
#

Yes but i want to do my Custom Chat Event because I want to separate world chat

paper viper
#

ic

opal juniper
#

Hello! I am currently needing to access an API from my code however i would like to make it as fast as possible:

https://paste.md-5.net/icepixituw.js

i am not really experienced with this tho - wondered what i could improve if anything?

unreal sandal
#

But in the chat there is nothing when i send a message ? Why is it not working ?

paper viper
#

the customchatevent

paper viper
#

like in your case, i doubt much can be done

unreal sandal
#

Okay, so I have to create another class and past my customchatevent code ?

paper viper
#

Yeah try that

unreal sandal
#

Okay, i try that

paper viper
#

make sure to register it too

opal juniper
toxic mesa
#

What's the best way to check if a block is a button? (Any button)

paper viper
#

Gson may also be a bit slow

eternal night
#

Tag.BUTTONS

#

works well to check if a material is a button

opal juniper
#

ill as some sysouts and have a look

paper viper
#

in fact Gson is probably one of the slowest json apis out there

#

xD

toxic mesa
opal juniper
#

oh lmao

eternal night
#
if(Tag.BUTTONS.isTagged(block.getType()))
unreal sandal
#

My plugin is named CustomChat, is it possible that my problem come from the name of the plugin ?

paper viper
#

No

unreal sandal
#

Okay

sullen dome
#

then it probably wouldnt even get enabled, if the name would be an issue

lean stirrup
sullen dome
#

wtf

opal juniper
#

?eta

undone axleBOT
#

There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

sullen dome
#

oh dude

opal juniper
#

?1.17

undone axleBOT
#

There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.

sullen dome
#

i feel like some people really cannot read right

ivory sleet
#

?ban @wintry blaze chill with the troll

undone axleBOT
#

Done. That felt good.

sullen dome
#

oh wow

opal juniper
#

thank you

sullen dome
#

i was right before pinging someone lol

#

wouldn't a kick be better for spam tho?

#

oh god

ivory sleet
#

?ban @quaint mantle

undone axleBOT
#

Done. That felt good.

sullen dome
#

i never said anything

quiet ice
#

oh wow

ivory sleet
#

oops forgot reason

vagrant stratus
#

I wonder who got the ban 😂

sullen dome
#

doesnt matter i got

quiet ice
#

meh, noone is going to miss them

ivory sleet
#

it was a troll so we should be fine

sullen dome
#

i think*

opal juniper
quaint mantle
#

What's the point of spamming

sullen dome
#

he wants to me someone lol

#

he probably wanted us to think "omg, he's so cool for spamming"

#

idk people are weird

unreal sandal
# paper viper Yeah try that

I changed my class name with ChatCustomEvent but now a message is sent but it's the normal message and not the custom chat

vagrant stratus
#

Aww, bot got it before me

sullen dome
#

lol

quaint mantle
#

People don't have a life

sullen dome
#

yea

quaint mantle
#

lmfao

vagrant stratus
#

Like me 👀

sullen dome
#

thats why i hate humans

quaint mantle
sullen dome
#

yea

vagrant stratus
#

😅

quaint mantle
#

lol

sullen dome
#

the human race kills itself

#

so why should i like humans?

lofty pebble
sullen dome
#

much humans are just dumb. and just hating everything and everything is pretty much fixing that issues

wraith rapids
#

i found a memory key in the spigot api i like

sullen dome
#

i identify as a army helicopter to be fair

wraith rapids
#

UNIVERSAL_HATRED

sullen dome
#

lol

quaint mantle
#

I hate events

sullen dome
#

only difference is... i can't fly tho

quaint mantle
#

what's wrong with this?

@EventHandler(priority = EventPriority.LOW)
    public void onInventoryMoveEvent(InventoryMoveItemEvent e) {
        if (e.getItem().getItemMeta() == null) return;
        if (e.getItem().getItemMeta().getDisplayName() == null) return;
        if (e.getItem().getItemMeta().getDisplayName().equalsIgnoreCase(coloredChat.chat("&aMy Profile &7(Right Click)"))) {
            e.setCancelled(true);
        }
    }```
sullen dome
#

probably i would more be like a broken army helicopter

lean stirrup
wraith rapids
#

you're calling the getitemmeta several times again

#

that is going too be absolutely horrible

sullen dome
#

getitemmeta.. it took me a sec to get the meaning of that lol

wraith rapids
#

inventory move item event is called for every individual item that gets moved by hoppers

#

which is potentially an enermous amount of items

#

now you're cloning the itemmeta 3 times for each such operation

quaint mantle
#

Is it only for hoppers?

wraith rapids
#

yes

quaint mantle
#

oh

sullen dome
#

who except players can actually call the InventoryClickEvent?

quaint mantle
#

thats why its not working

wraith rapids
#

a player puts a shulker box full of books in a hopper

#

and this code kills the server

sullen dome
#

probably villagers maybe?

wraith rapids
#

player is the only humanentity in the standard server impl and environment

quaint mantle
#

Is there any events like InventoryMoveEvent but for players

sullen dome
#

tho, why isn't the even instantly refering to the player, but HumanEntity instead?

wraith rapids
#

it reflects how it's done under the hood in nms

sullen dome
#

so, mojangs fault?

granite stirrup
#

i mean doesnt player extend HumanEntity

sullen dome
wraith rapids
#

what am i looking at

quaint mantle
#

how i can clear Pathfinder b field?

sullen dome
quaint mantle
sullen dome
#

ohh

#

true

quaint mantle
#

😎

quaint mantle
sullen dome
#

oh god. nms ahhhhh

quaint mantle
#

yup. custom NPC Library.

wraith rapids
#

i'm not seeing any difference between leaves and logs in your code, beyond the involved tag itself

sullen dome
#

nms always hurts me awful

wraith rapids
#

consider merging the two tags into an enumset and using a queue

sullen dome
#

thats not the problem probably tho

wraith rapids
#

probably not no but this is kind of illegible

sullen dome
#

i need some fix for my problem ahhhh
i dont get it

wraith rapids
#

(isLog(newBlock3) || isLeave(startBlock))

#

newBlock3 vs startBlock

#

is that intentional

sullen dome
#

oh

#

fuck my entire life

#

i love you

#

you never saw anything okay?

granite stirrup
#

lol

wraith rapids
#

👀

granite stirrup
#

we saw everything

quaint mantle
#

😳

sullen dome
#

no please close the eyes

#

all of you

rocky umbra
#

we didn't see anything