#help-development

1 messages Ā· Page 1592 of 1

quiet ice
#

Myes

#

technically I just wanted runtime (as classes are loaded) ASM transforming - which would allow mixin support

hasty prawn
#

Well that goes over my head, good luck if you ever decide to make that into reality šŸ‘

quiet ice
#

so wat

#

Well, I have already created a "working" prototype, but bukkit plugin classloading is throwing a rock at me

waxen barn
#

Hmmm, maybe I got an theory. All unobfuscated fields/methods are the one, that are from Entity or Living entity and not from Mob

tame coral
#

use paste for big pieces of code

#

?paste

undone axleBOT
amber vale
#

Any1 with experience using bungeeapi and willing to make me a simple plugin for free pm me

undone axleBOT
errant drift
#

you should say what you want also

tame coral
#

ye

quiet ice
vivid temple
#

how to get the player's xyz coordinates but all separately?

quiet ice
#

player.getLocation().getX()

#

rinse and repeat for the rest (perhaps even cache the location object)

vivid temple
#

other question

vivid temple
#
@EventHandler
        public void onHit(EntityDamageByEntityEvent e){

            if (e.getEntity() instanceof Player){

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

                if (e.getDamager().equals(Guard)) {
                    player.sendMessage(ChatColor.GRAY + "You got hit! - " + ChatColor.RED + "Admin Tools");
                }
            }
        }

my player gets hit by my Guard entity but it does not send the message

quiet ice
#

Did you register the listener?

urban trout
#

how would i make it so a player has a potion effect active if theyre using an item

#

i cant find anything for it

prisma needle
#

How would I go about restarting/reloading a bungeecord plugin? (Without restarting the server)

amber vale
vivid temple
amber vale
urban trout
amber vale
quiet ice
chrome beacon
#

oh and that won't work perfectly either

quiet ice
paper viper
#

What’s are y’all feelings on @Unmodifiable

#

I know what it does, but what do you guys think about it?

oblique pike
#

If a player breaks a post of sugar cane, will BlockDropItemEvent be called on each of the canes?

quiet ice
#

from where does the annotation stem from?

#

ah jetbrains. Pretty stupid annotation then because it is highly likely not enforced

ivory sleet
#

like if you'd provide an immutable impl of List

pseudo raptor
#

Guys, I'm having a certain "error" that I can't describe very well. Basically, the player does not get the title packet the first time it is run after entering the server. Does anyone know what can it be?

pseudo raptor
#

What do I send you? It has a title API and the part where the player uses a test command

chrome beacon
#

All of it in a github repo would be good

vale cradle
#

Similar to the @NotNull and @Nullable annotations

#

Which are also pretty good

sullen dome
oblique pike
#

So the javadoc lies? šŸ¤”

sullen dome
#

did they change it? ohh

#

i'd say, give it a try :/

oblique pike
#

ive already

sullen dome
#

and?

oblique pike
#

but it works as youve said for some reason XD

#

And im thinking of how can i handle that then

sullen dome
#

which event do you use?

oblique pike
#

BlockDropItem

sullen dome
#

oh i were dumb

#

i thought you were using BlockBreakEvent lol

#

dumb me

#

BlockDropEvent should call for everything that drops, so in your case in chain-breaking too

oblique pike
#

But... this prints the player only once

#

Am i dumb and doing something wrong or what

sullen dome
#

the chain-blocks are not broken by a player tho

oblique pike
#

I thought it would print null then

#

At least

sullen dome
#

well

#

lemme see smt

#

it's annotated as notNull. dunno fully how that works tho, but i think thats why it just prints nothing

#

the blocks are broken from the chain-reaction tho, not by a player. so thats why they cannot have any player associated

near crypt
#

how can i null check on an InventoryClickEvent?

sullen dome
#

null check on what exactly?

near crypt
#

on what item the player clicks

ivory sleet
#

if (blah == null) {
//TODO
}

sullen dome
#

just if(whatever != null) i guess

#

^

near crypt
#

yes ik but i tried to check if the material != null and it didnt worked

sullen dome
#

well

young knoll
#

Check the item

#

Not the material

sullen dome
#

^^

#

check if the item that's in the slot is null

#

should be event.getItem(slot) iirc

near crypt
#

if(event.getCurrentItem() != null) this should work

sullen dome
#

currentitem is the hold item i guess

#

lemme see

near crypt
#

not in InventoryClick

#

CurrentItem is the item a player clicks on

young knoll
#

It's the clicked item

sullen dome
#

nvm yeah, it's currentItem

near crypt
#

yeah

#

okay thx šŸ˜‰

sullen dome
near crypt
#

šŸ™‚

oblique pike
sullen dome
#

depends on what you wanna do

oblique pike
#

Im trying to automatically sell all the items that player break with a specific tool

#

And with what i have for now, it does not work with chain-breaked blocks (as they are not broken by a player)

sullen dome
#

complicated

#

well... how should the server tell who the chain-reaction belongs to

#

as the block that you break is handling everything afterwards

oblique pike
#

Sadness

sullen dome
#

for which blocks does it apply?

oblique pike
#

?

sullen dome
#

like... it wouldn't be that hard for stuff like sugarcanes, but it'd get hard for example for these weird building bridge things, dunno their names rn

oblique pike
#

scaffolding

sullen dome
#

yea

oblique pike
#

i don't think that i would need to sell them XD

sullen dome
#

here's something i wrote quickly, that should work for sugar cane and stuff... didnt tested it tho...

    @EventHandler
    public void test(BlockDropItemEvent e) {
        Player p = e.getPlayer();
        Block b = e.getBlock();
        int x = b.getX();
        int z = b.getZ();
        for (int y = e.getBlock().getY(); b.getWorld().getBlockAt(x, y, z).getType() == b.getType(); y++)
            b.setType(Material.AIR); // if you want to set it to air...
        for (int y = e.getBlock().getY(); b.getWorld().getBlockAt(x, y, z).getType() == b.getType(); y--)
            b.setType(Material.AIR); // if you want to set it to air...
    }```
#

i guess that is what you wanted? if not tell me :/

tacit drift
#

how can i listen for any event that triggers?

young knoll
#

With many listeners

sullen dome
#

nvm

#

isnt there a command? lol

tacit drift
#

ĀÆ\_(惄)_/ĀÆ

sullen dome
#

or wait

#

you wanna know how to listen to events in general, or to EVERY event?

tacit drift
#

When a event triggers

#

to get it's name

#

any event

sullen dome
tacit drift
#

w/o makints tens of listeners

sullen dome
#

ah

hybrid spoke
#

you could try to listen for the super class Event

young knoll
#

tens

#

You cannot listen for the abstract classes

sullen dome
#

btw for info: Block#isPreferredTool is just checking if pickaxe/axe/shovel/etc

#

so not quite what i wanted.. sad

tacit drift
#

yeah so i found something

mental girder
#

you can't listen to Event

#

it doesn't declare a HandlerList

young knoll
#

And this is why they use reflection jank

mental girder
#

the spigot event bus is reflection jank to begin with, anyway

tacit drift
#

well idk it's made by MiniDigger

#

so i guess that it works

sullen dome
#

you guys have an idea out of the head how long the goldenapple-absorption lasts? don't have my mc open rn

young knoll
sullen dome
#

true, dumb me. ty :)

#

just for my interest... is there any difference between those two? :o

            Bukkit.getOnlinePlayers().forEach((p) -> p.sendMessage("Message"));
            Bukkit.getOnlinePlayers().forEach((p -> p.sendMessage("Message")));```
#

idk how to place that one bracket... does it actually matter?

tacit drift
#

if your ide says that it's right

#

then it's right

sullen dome
#

intellij says both are right

tacit drift
#

then it's ok

tacit storm
#

Even this works Bukkit.getOnlinePlayers().forEach(player -> player.sendMessage("a"));

sullen dome
#

thats why i wonder... is there any difference?

tacit storm
#

You dont need any extra brackets

sullen dome
#

intellisense made this automatically:
Bukkit.getOnlinePlayers().forEach((p -> p.sendMessage("Message")));

mental girder
#

Bukkit.broadcast

sullen dome
#

but i usually use the other one everytime lol

#

it shouldnt appear in console

mental girder
#

does broadcast appear in console? I don't remember it doing that

young knoll
#

No brackets is apparently the preferred way

sullen dome
#

iirc it does

mental girder
#

brackets are redundant; you can have them or you can not have them

young knoll
#

Only with 1 arg

#

For 0 or 2+ you need the brackets

mental girder
#

generally with any operation

sullen dome
#

oh

mental girder
#

adding more brackets doesn't change the semantics, beyond grouping multiple operations together

sullen dome
#

i actually refered to #broadcastMessage

waxen plaza
#

What minecraft version did PersistentDataContainer get added??

waxen plaza
#

Ok

eternal oxide
#

?pdc

young knoll
#

1.14

sullen dome
#

yeah was 1.16

#

wtf

#

1.16? who am i

eternal oxide
#

a good counter

sullen dome
#

i'm tired... lemme get some ā˜•

waxen plaza
#

so 1.14?

mental girder
#

for example, String nwo = "jews" is functionally identical to ``String nwo = ((("jews")));```

sullen dome
waxen plaza
#

oh ok

sullen dome
#

guys. what is your favourite theme in material ui? need a new one...

#

(dark pls)

mental girder
#

red and black

waxen plaza
#

Does anything look wrong here? The persistentdatacontainer is not working, when I try to get the data back I get null

eternal oxide
#

no, you are overwriting the pdc with the other meta

mental girder
#

getItemMeta always returns a clone

waxen plaza
#

so I need to set the new pdc?

mental girder
#

no, you need to all getItemMeta once

#

not twice

eternal oxide
#

no, just get the pdc from the meta you already pulled

mental girder
#

what you are doing right now is getting a itemmeta and then throwing it away

waxen plaza
#

right I messed up

#

Works fine now thanks

unkempt ore
#

When would you want to use the scheduler's async functions?

mental girder
#

when you want to schedule something to run asynchronously

unkempt ore
#

Oh wow, really..

mental girder
#

what did you expect

unkempt ore
#

I'm asking if there are common use cases

young knoll
#

Not really an easy thing to answer

#

Not a lot of stuff is thread safe

mental girder
#

yes, there are always use cases

sturdy patrol
#

I use it for packets, and when you have heavy code that you want to run async, then resync at the end

young knoll
#

File IO, Timers, Database Access

mental girder
#

literally anything that you want to run off the main thread is an use case

sturdy patrol
#

Good list. Fetching textures online, update checking, and online stuff too

mental girder
#

anything that involves any sort of IO

#

network, disk, or otherwise

unkempt ore
#

Yeah that makes sense

#

Things that would otherwise block you

#

And you don't need to wait for

mental girder
#

just make sure not to be a 1.8 anticheat developer and go overboard

#

doing a 1+1 computation off the main thread for the sake of doing it off the main thread is retarded

young knoll
#

I'm gonna make the async async!

unkempt ore
mental girder
#

significantly so

unkempt ore
#

You know what

#

Screw it

#

I'm making a plugin in JNI

#

Jk but I wonder how that would actually go

paper viper
#

You can’t make a plugin ā€œin JNIā€. You ā€œuse JNIā€ to execute native code within the JRE at runtime

#

And also, you can’t even do anything really tbh because it’s for modifying arrays and certain things.

#

There are pointers and stuff obviously, but for the most part

#

You can’t do anything like interact with the api in C++

#

Only certain data types

#

Anyways, it would be a fuckmess

paper viper
#

No, because what you said kinda makes people think JNI is some sort of environment

#

It isn’t tho tbh

unkempt ore
#

It’s not at all

#

I did it one time. It’s kinda…fun, actually, but I wouldn’t use it seriously

#

And it’s discouraged anyway unless you want to do something truly platform dependent or the efficiency from the natives outweighs their overhead when switching between

paper viper
#

In my case, I was using it for performance to dither an image

unkempt ore
#

Sounds good

#

Yeah I was looking into processing a video through ffmpeg and I found a cpp library which actually looked pretty clean

#

I considered using the interface

ivory sleet
#

@paper viper still there

paper viper
#

Yes

paper viper
#

So you can run a video using C/C++ in java, it’s pretty cool

unkempt ore
#

Nice

steady turret
#

Hey bot developer ?

proud totem
#

im looking for support on a error im having that is preventing my server from starting

mental girder
#

uh huh

proud totem
quaint mantle
#

Hello! I am trying to set an item frame rotation according to a player orientation. Do you know how I could achieve the conversion between my orientation vector and the Rotation enum?

quaint mantle
unkempt ore
#

Yeah

#

It was a little thought experiment

unkempt ore
#

Make a function to divide the orientation by 8 sections and spit out a proper rotation

#

Based on what numbers it falls between. Roughly expressed, but you get the idea

quaint mantle
#

may be something like that:

#
    private Rotation getRotation(double x, double y) {
        if (x > 0) {
            if (y > 0)
                return (y > x) ? Rotation.NONE : Rotation.CLOCKWISE_45;
            else
                return (y > x) ? Rotation.CLOCKWISE_135 : Rotation.CLOCKWISE;
        } else {
            if (y > 0)
                return (y > x) ? Rotation.FLIPPED : Rotation.FLIPPED_45;
            else
                return (y > x) ? Rotation.COUNTER_CLOCKWISE_45 : Rotation.COUNTER_CLOCKWISE;
        }
    }```
#

but it looks pretty ugly

vale cradle
paper viper
#

Like ffmpeg?

vale cradle
#

Naw, a custom one

#

Custom native lib

paper viper
#

For a custom native library, JNI is probably too basic level. What you want is likely JNA

#

But if there aren’t any bindings for it, yeah uh, you have to do that yourself

#

For ffmpeg I was lucky that it had an executable version I could execute via terminal

#

So I just used a Process and executed the command with necessary arguments and got what I want

vale cradle
paper viper
#

If you already have JNI, go for it

#

JNA is done java side, JNI is done native side, but they both do the task

#

So yes, JNA would be slightly slower than JNI, but it’s easier to use

vale cradle
#

Wait

unkempt ore
vale cradle
#

So JNA is something like Kotlin Native?

paper viper
#

Kind of

quaint mantle
#

here I used the orientation normalized vector

#

but I should use yaw, you are right man!

unkempt ore
#

Yes

quaint mantle
#

it would be so much better

#

thank you

#

I love you

unkempt ore
#

Divide the yaw into 8 sections

#

Uhhhh, sure

vale cradle
#

Any tutorial?

#

Guide or documentation?

#

Or a snippet

paper viper
quaint mantle
#
    private Rotation getRotation(double yaw) {
        return Rotation.values()[(int)(yaw*8/180)];
    }```
#

so something like that? @unkempt ore

unkempt ore
#

Try doing some sort of normalization

#

Use modulo

#

Yeah

paper viper
#

just extend the Library class then get the necessary methods

#

and you are good to go

quaint mantle
paper viper
#

(load it obviously)

vale cradle
#

thanks o/

paper viper
#

np

quaint mantle
#

and using modulo for angles would be a pretty bad idea

unkempt ore
#

Go ahead and prove that to yourself

unkempt ore
#

You'll want to normalize to 0-360, then divide by 45 and floor

quaint mantle
#

What's the easiest way to sort players by rank in tab? so Like Owner players, then Admin players etc....

unkempt ore
#

Pretty sure that's a self imposed thing, sooo ^^^

#

How so

#

What the

#

So it's useless

#

Can NMS hack it

quaint mantle
#
public class PlayerTeleport implements Listener {
    @EventHandler
    public void onPlayerTeleport(PlayerTeleportEvent event) {
        Player player = event.getPlayer();
        if(event.getCause() == PlayerTeleportEvent.TeleportCause.CHORUS_FRUIT) {
            if(player.getItemInUse().getItemMeta().getDisplayName().substring(0, 4).equals("warp")) {
                event.setTo(new Location(player.getWorld(), player.getLocation().getX() + 5, 80.00, player.getLocation().getZ() + 5));
            }
        }
    }
}

can someone pls explain how setTo() works to me so i can find out why this doesn't work?

#

s-so do i use it on event or something else?

#

do i use event.setTo() or smtElse.setTo()? since what i'm trying doesn't seem to work

#

i've tried different methods like cancelling the event and using player.teleport but that also doesn't work, but it does if it's an ender pearl

#

i printed it and it's true?

#

oh yeah i've done that

#

it goes through all the code and the player.teleport prints true but i'm not moved

#

it does work with an enderpearl

#
Bukkit.getScheduler().runTaskLater((Plugin) this, () -> {
player.teleport(new Location(player.getWorld(), player.getLocation().getX() + 5, 80.00, player.getLocation().getZ() + 5));
}, 1L);

i've commented that out since it also failed :(

#

however

It is more the opposite the chorus fruit works as intended while the enderperl (as well as PLUGIN, NETHER_PORTAL, END_PORTAL and END_GATEWAY) teleportation is broken. Only CHORUS_FRUIT, SPECTATE and COMMAND work right.

If you look into the java docs of PlayerMoveEvent#setCancelled(boolean) it says that:

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
 
If a move or teleport event is cancelled, the player will be moved or teleported back to the Location as defined by getFrom(). This will not fire an event
Which means after you teleport the player and cancelled the event the player got teleport back to the from location. Which is the intended behaviour of the event.

someone did try helping me with this answer but at that point i was too nervous of being annoying for a long while so i don't fully undrstand it

#

it's the last bit that i don't get

vale cradle
#

@paper viper hey, I have another question, I've seen a little how JNA works, it creates a proxy class which abstracts the methods of the Library you're targeting to load. Is there any prebuilt library abstracting the JNI methods?

#

Or JNA wasn't even meant to use JNI but any other C/C++ library

paper viper
#

Not sure, hm

#

it seems JNI and JNA are the most popular

vale cradle
#

I mean, if there is any approximation on the jni.h methods

#

In a JNA interface I mean

quaint mantle
#

I don't reaally think i'm right but i have a suspicion spigot missed something about the chorus fruits

torn shuttle
#

reasking from a few days ago, anyone have any idea if it is possible to load worlds on onload instead of onenable?

naive spindle
#

how can i play a sound at a specific location? I want to reduce the sound when player goes far away from the source of the sound

prisma needle
#
  1. Is it possible to send a message to the individual consoles of my bungeecord network? From a bungeecord plugin :)

  2. Is it possible to modify join/leave messages from a bungeecord plugin?

real spear
#

Prob not, but is there a way to broadcast custom sounds to players? I want to make a song for my server (totally not gonna be a rickroll...)

dusk flicker
#

You could make something with noteblocks with like I think its called NoteblockAPI

#

You may be able to also do it with a custom resource pack but that would require people to download it

hidden torrent
#

How can I prevent an entity from moving?

#

I'd like to avoid using NMS if possible.

hidden torrent
rotund pond
#

Hello !

I have a little question about Spigot API :/

What is exactly an InventoryHolder ?
I'm creating a GUI and I'm wondering If I should implement it so I can check easily if player is using my custom GUI

forest edge
rotund pond
#

Oh I see thank you, so I guess my idea is not that bad

forest edge
#

Yeah you are on track. Players being InventoryHolders just means that you can use getInventory().

quaint mantle
#

soooo besides using player.teleport(), setTo(), or player.teleport() but delayed by a tick, how can i change where a chorus fruit takes you? (and yes i cancelled the original event beforehand but not for setTo)

drowsy helm
#

do none of those methods work?

ripe veldt
#

How do I change a gamerule in the spigot API?

#

I saw world.setGameruleValue("keepInventory", "true"); somewhere, but it doesn't work, and Itellij idea doesn't show a class to import.

near crypt
#

why cant i use the PlayerChatEvent? Its deprecated

feral socket
#

AsyncPlayerChatEvent

near crypt
#

and what is the difference?

stone sinew
feral socket
#

Async

#

it should tell you all about it in the deprecation message

near crypt
#

okay and what is async?

feral socket
#

asynchronous, not running on the server thread

#

which all chat has been since 1.8(?)

dense geyser
near crypt
dense geyser
#

basically, if the servers struggling, the chat doesn't struggle with it

#

Sort of

stone sinew
dense geyser
#

^

near crypt
#

okay

dense geyser
#

(I know this isn't really spigot but) I've extended the EntityMagmaCube class from NMS and cleared its pathfindergoals, but when the server closes, the entity (when spawned) is destroyed, is this normal behaviour?

quaint mantle
near crypt
#

is there a way to get the last opened Inventory of a player?

fading lake
#

you could store a map of player to inventory, updated by the InventoryOpenEvent or someth

#

theres no real way tho

stone sinew
fading lake
#

thats a better idea

near crypt
#

okay because i work on a plugin that opens a Inventory with /admin and there is a item named kill when you click on it the inv closes and the player should write a name of a player and that player should be killed then. But i dont know how i just can Listen to the AsyncPlayerChatEvent when the player clicks this item does anyone know how i can do this?

spice sage
#

hi, i want to delete a plugin that i create and post in the web page, could you help me how can i do that?

near crypt
#

what web page?

errant drift
#

report the plugin and be like I want it removed

spice sage
near crypt
#

oh ok idk

errant drift
#

then spam @ Optic_Fusion1 and he will remove it

spice sage
#

so, thats mean that i need to report my own plugin to be remove of the spigot web?

near crypt
#

yes

spice sage
#

shit, ok thanks

near crypt
#

i work on a plugin that opens a Inventory with /admin and there is a item named kill when you click on it the inv closes and the player should write a name of a player and that player should be killed then. But i dont know how i just can Listen to the AsyncPlayerChatEvent when the player clicks this item does anyone know how i can do this?

opal juniper
#

There is a conversations api for this

#

You may have to look up a tutorial though

near crypt
opal juniper
#

Any, but iirc they api was not exactly the most straightforward

near crypt
#

but what do i have to search on yt?

opal juniper
#

Spigot Conversations Api Tutorial

near crypt
#

oh okay thx

#

is there no easier way?

#

@opal juniper

#

can i create a List and put a String inside of it when the player clicks the item and then i check if the string exists and if it does the item was clicked if it doesnt the player can type anything?

granite stirrup
#

chrome decided you know what im gonna use all your memory cuz im a big fat ram eater chrome goes yum yum yum and eats all my fucking ram and then mc cOuldnt get anything and it crashed :_:

undone aspen
#

How can i use the bungee api to send a player a resource pack when they join? There doesnt seem to be any methods like in spigot.

valid solstice
#

Incompatible types. Found: 'org.bukkit.util.Vector', required: 'java.util.Vector' im getting this error, how do you fix this?

fading lake
#

what method is that coming from?

#

cause all bukkit methods need org.bukkit.util.vector, not the java one

valid solstice
#

from .getDirection()

ivory sleet
#

Probably got the wrong import

valid solstice
#

so i would remove import java.util.Vector?

ivory sleet
#

Myes

candid galleon
#

Myes

fading lake
#

Myes

fading lake
undone aspen
near crypt
#

?paste

undone axleBOT
hardy swan
#

You can try deduce what each class do from the conversation API

near crypt
#

ive done it with a ArrayList now xD

chrome beacon
hardy swan
#

It is written right there

near crypt
#

@chrome beacon and how can i get rid of it?

hardy swan
#

you can use conversation

chrome beacon
hardy swan
#

^ or this

near crypt
#

okay ill try

hardy swan
#

@near crypt must the player input a valid string? Is there a prompt (if the string is invalid)?

#

from when do you stop listening to the asyncplayerchatevent? is there a timeout? what if the player leaves the game/arena?

vast ledge
#

Soo im trying to get a players ping from a /ping command but it just sends and error when i run the command

hardy swan
valid solstice
#
if (event.getItem().getItemMeta().equals(itemManager.bote.getItemMeta()))
``` is there a way that the if statement will get satisfied no matter what the durability of the item is?
#

because when durability is changed, the if statement is not being satisfied

#

ty

hardy swan
#

clone these items, if #getItem() doesn't already give you a copy, and refill durabilities

valid solstice
#

tysm

hardy swan
#

also consider using ItemStack#isSimilar

hardy swan
#

oops

#

but yea still have to refill durability

valid solstice
#

ill check more about that in documentation, thanks

stone sinew
hardy swan
# stone sinew not with `ItemStack.isSimiliar()`

oh?

/**
 * This method is the same as equals, but does not consider stack size
 * (amount).
 *
 * @param stack the item stack to compare to
 * @return true if the two stacks are equal, ignoring the amount
 */
@Utility
public boolean isSimilar(@Nullable ItemStack stack) {
    if (stack == null) {
        return false;
    }
    if (stack == this) {
        return true;
    }
    Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material
    return comparisonType == stack.getType() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true);
}
#

oh wait

#

this makes no sense

vague mason
#

this code makes no sense

stone sinew
oblique pike
#

whats the limit for the length of PersistentDatatype.STRING ?

quiet ice
#

I would assume the maximum NBT component size - 5 or so

oblique pike
#

And whats the maximum NBT component size? xD

quiet ice
#

lemme see

oblique pike
#

thx

hardy swan
# vague mason this code makes no sense

eh wait it makes sense, look closer to where the predicate is haha

(hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true)
quiet ice
#

8 TAG_String ... A length-prefixed modified UTF-8 string. The prefix is an unsigned short (thus 2 bytes) signifying the length of the string in bytes
So somewhere around 65k bytes

#

that being said, the region format will be a limiting factor here - it does not allow for infinitely large regions

vague mason
#

why do you even check if stack is equals to this?

stone sinew
vague mason
#

won't that always return true

#

?

stone sinew
quiet ice
#

?

vague mason
#

I'm really confused here XD

hardy swan
#

huh? wat you guys saying? XD

#

is to check the instance

stone sinew
near crypt
quiet ice
#

The code has it's inefficencies - but it 100% works as intended

vague mason
#

Doesn't that method already exists in Bukkit?

quiet ice
#

This IS that method

vague mason
#

then I don't know why do you write it in your plugin

#

it's strange

quiet ice
#

because isSimilar accounts for durabillity

chrome beacon
undone axleBOT
quiet ice
#

isSimilar basically just checks whether two itemstacks can be merged, though sometimes you want to get less specfic than that

vague mason
#

you can't stack 2 items with different durability..

#

so this method is correct

stone sinew
#

Example;

ItemStack item = new ItemStack(Material.STICK);
item.isSimilar(item);

//will return true because its the same class.
vague mason
#

don't know why would you change it

quiet ice
#

that is the whole point of isSimilar, yes

#

but the asker does not want to care about the durabillity

vague mason
#

why not?

#

then you can just check if material type is the same...

hardy swan
#

not only that

quiet ice
#

There is still the rest of the item meta to check

hardy swan
#

^

quaint mantle
#

Hey! How can I convert a Rotation enum to yaw (float) ?

quiet ice
#

switch-on-enum! ... jk

hardy swan
hardy pivot
#

Hello good evening. Does anyone know how to manage inventories from arraylist?
I added several but at the time of obtaining them I do not know how I can use them. Thanks!

near crypt
hardy swan
near crypt
#

okay

hardy swan
#

unless you tell it to #runTaskAsynchronously

near crypt
#

yeah ik thx

hardy swan
plain helm
#

I'm sorry suddenly.
I want to create an Anvil GUI with Spigot 1.12.2, but nothing works. I would like someone to tell me how to create an Anvil GUI.
I tried WesJD's Anvil GUI but it didn't work.

hardy swan
#

you mean retexture it? or use it for some custom mechanics

hardy pivot
#

u dont need anvil

hardy swan
#

or just to prompt user with input

hardy pivot
hardy swan
#

You can also try merchant's recipe

plain helm
#

just prompt the user for input.

hardy swan
#

yup then like what 2Gramsin said create an inventory, say of type InventoryType.MERCHANT

#

since MerchantRecipe prompts the player about the input

plain helm
#

Okay

hardy swan
plain helm
#

thank you for telling me both

quaint mantle
#

Hey I'm trying to make furnitures that you can sit on using horses. I disabled the horse IA but sometimes it still moves when I mount them, any idea to fix it?

maiden briar
#

I have never used a scoreboard before, I want to create something like this:

<ServerName>
24/07/2021
<empty>
&cR &fRed: 1 (You)
&cG &fGreen: 2 (You)
<empty>
website.com

Also I would like to add the players to team Red or team Green and also show that in the tablist

quaint mantle
#

there is no EntityMoveEvent unfortunately

stone sinew
hardy swan
#

Im just wondering how sitting on a mini armorstand would look like

#

Maybe can try using armorstand instead?

quaint mantle
#

Hmm that's not a bad idea

#

it looks great @hardy swan

#

thanks for the idea

tame coral
#

isn't it gonna be laggy ?

granite stirrup
tame coral
#

Yeah but if there's a lot of them

stone sinew
granite stirrup
#

and keep track in a map

#

probs

smoky oak
#

load configuration files static or dynamic?

tame coral
#

I see

granite stirrup
#

then you wont need 1000 of it

hardy swan
stone sinew
#

Can't be worse then PlayerMoveEvent lol

granite stirrup
#

so it doesnt count the slightest movement

#

like 1 pixel

stone sinew
granite stirrup
#

but its got a little limit

#

on it

#

so it doesnt active on the slightest

stone sinew
granite stirrup
#

of movement

granite stirrup
stone sinew
#

If you move your mouse 1 pixel it activates the event.

granite stirrup
#

im pretty sure it doesnt

#

oh apparently its limited to 20 times per second

stone sinew
#

oh you're right.
Still can cause issues when there are 10+ players all spinning in circles xD

granite stirrup
#

69 lol

stone sinew
granite stirrup
near crypt
#

xD

smoky oak
#

How do i read in a baked in config? This code does not seem to work

    private FileConfiguration getBakedConfig(String configFile){
        FileConfiguration ret =  YamlConfiguration.loadConfiguration(new File(dataFolder, configFile));
        InputStream defConfigStream = this.getResource(configFile);
        if (defConfigStream != null) {
            ret.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(defConfigStream, Charsets.UTF_8)));
        }
        return ret;
    }```
#

IE it returns an seemingly empty configuration file

eternal oxide
#
saveDefaultConfig();
...
getConfig().etc```
smoky oak
#

its not the default config

ivory sleet
#

First of all, try with resources, is this a resource of just a file?

smoky oak
#

its a ressource file

#

'structure.yml'

eternal oxide
#

then saveResource(path")

smoky oak
#

i dont want that

#

theyre static

quaint mantle
#

hey, is an entity id preserved between restarts?

smoky oak
#

probably

ivory sleet
#

saveResource("structure.yml",false);
YamlConfiguration.loadConfiguration(new File(dataFolder,fileName));

#

saveResource isn’t static

eternal oxide
#

do you mean you don;t want to explode the resources. Just keep them in the jar?

smoky oak
#

no i meant the ressource file wont change and as such i dont want to write it twice

#

yes

ivory sleet
#

You don’t tho?

smoky oak
#

i only want it in the jar like elgar said

#

what you're saying is write it down and read it

ivory sleet
#

Oh right

eternal oxide
#

Yes you can do that, I forget how. I'll have to fire up my IDE

ivory sleet
#

getResourceAsStream("structure.yml") then

eternal oxide
#

^

smoky oak
#

what import is that?

#

xml or jfr?

quiet ice
#

import?

ivory sleet
#

It’s a method from JavaPlugin iirc

#

Or maybe even Plugin

smoky oak
#

its not

quiet ice
#

It is

ivory sleet
#

Oh nvm getResource

eternal oxide
#

you can then FileConfiguration test = new FileConfiguration(). loadFromString(String) or load(Reader)

ivory sleet
#

It calls the getResourceAsStream from the class loader or something for you now when I think of it

quiet ice
#

correct

smoky oak
#

'FileConfiguration' is abstract; cannot be instantiated

quiet ice
#

Use YamlConfiguration then

smoky oak
#

tried

#

still []

eternal oxide
#
       FileConfiguration test = new YamlConfiguration();
        try {
            test.loadFromString(String);
        } catch (InvalidConfigurationException e) {
            e.printStackTrace();
        }```
smoky oak
#
FileConfiguration ret = new YamlConfiguration();
        try {
            ret.load(configFile);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (InvalidConfigurationException e) {
            e.printStackTrace();
        }
        return ret;```
#

that

#

returns

#

an

#

empty

#

config

#

imma try the string method

quiet ice
#

Is the config file empty or no?

smoky oak
#

well

#

getkeys returns an empty set

#

thats how i test it

#

because there about 60 entries in it

eternal oxide
#

Have you got yrou resource as a String?

smoky oak
#

yes

#

its this now

#
FileConfiguration ret = new YamlConfiguration();
        try {
            ret.loadFromString(configFile);
        } catch (InvalidConfigurationException e) {
            e.printStackTrace();
        }
        return ret;```
#

but it still gives me [] when i attemt to do getKeys

#

I'm pissed htat the only way i can get a working config is by saving it

#

wth are ressources for

quiet ice
#

What is the config even?

smoky oak
#

a bunch of strings that define structures to be spawned in

#

IE

quiet ice
#

so direct key -> value mappings?

smoky oak
#

its

#
KEY1:
  - "+XXX+"
  - "X+++X"
  - "+XXX+"
#

like that

#

the thing is

#

if i save the file

#

it WORKS

quiet ice
#

And the stream is returning the file's contents as inteded?

smoky oak
#

wait let me check

#

um

#

[Sat, 24. Jul 2021 12:53:46 CEST WARN] org.bukkit.configuration.InvalidConfigurationException: Top level is not a Map. [Sat, 24. Jul 2021 12:53:46 CEST WARN] at org.bukkit.configuration.file.YamlConfiguration.loadFromString(YamlConfiguration.java:61) [Sat, 24. Jul 2021 12:53:46 CEST WARN] at io.github.moterius.ofmagic.Echo.getBakedConfig(Echo.java:115)

eternal oxide
smoky oak
#

it doesnt find IOUtils what import is that?

eternal oxide
#

You will need to add a dependency xml <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.6</version> </dependency>

smoky oak
#

ah ok

#

how do i update the dependencies in IntelliJ in the pom.xml again?

eternal oxide
#

Sorry I don;t use InteliJ

dusk flicker
#

If you use maven there should be a button to refresh it

#

If you edit the pom it should pop up in like the top right in the editor

smoky oak
#

@eternal oxide

eternal oxide
#

yes

smoky oak
#

k

eternal oxide
#

if you are using Java 9+ you can just use String contents = new String(stream.readAllBytes(), StandardCharsets.UTF_8);

quiet ice
#

I really love readAllBytes

smoky oak
#

I cant do that now its blocking me with the update window

eternal oxide
#

Most of my projects are Source 8, so I can;t use it 😦

smoky oak
#

well luckily the plugin im working on is for 1.17 but

quiet ice
#

It's a shame they did not introduce it earlier

smoky oak
#

I'd much rather have something that works on java 8 too

#

but for now I'm gonna settle with 'works at all'

eternal oxide
#

good plan

smoky oak
#

which it doesnt

#

and thats the problem

eternal oxide
#

even with that code?

smoky oak
#

i cant run it yet

#

its still updating

#

something tells me the repo is about a GB in size

quiet ice
#

did you just download the entire repo?

robust forge
#

How do I check if clicked block is cauldron with water?

if(e.getClickedBlock().getType().equals(Material.CAULDRON)) { Doesnt work if cauldron has water.

smoky oak
#

by accident

quiet ice
#

that will take several days

smoky oak
#

it tells me its half done tho

#

ah

#

dammit

#

im updating the maven2 repo

#

crape that wont work

smoky finch
#

This is kinda math related, but if I have something like this:

      / Fireball
    /
  /
/
--------- Player

The fireball is going to be shot above the player's head. If I simply just do fireball.setDirection(player.getLocation().getDirection())
It'll do this instead

--------- Fireball


--------- Player

How do I adjust the direction so the final destination of the fireball's direction is the same as the player's?

smoky oak
#

If i had to guess trace the sight line of the player until it hits a block, draw a vector from that block to the locatoin of the fireball and send it flying along that line

quiet ice
#

the player has no such thing as a final destination

smoky finch
#

I know, I just don't know the word for it. The direction or whatever it is

smoky oak
#

its part of location

#

yaw i think

smoky finch
quiet ice
#

wouldn't you simply need to add to the y part of the velocity vector of the fireball?

smoky oak
#

you only need to do it once tho

smoky finch
#

nah just forget about that

smoky oak
#

also you need to get where the player is targetting one way or another

smoky finch
quiet ice
#

okay, actually no

smoky finch
#
Current traveling velocity of this entity
eternal oxide
# smoky oak crape that wont work

Here, using no extra imports. Tested and working```java
FileConfiguration test = new YamlConfiguration();

try (Reader reader = new InputStreamReader(getResource("plugin.yml"))) {
String text = CharStreams.toString(reader);
test.loadFromString(text);
} catch (InvalidConfigurationException | IOException e) {
e.printStackTrace();
}
System.out.println("KEYS: " + test.getKeys(false).toString());```

quiet ice
#

Are you sure that test.getKeys(false).toString() works?

eternal oxide
#

[12:16:17] [Server thread/INFO]: KEYS: [name, main, version, api-version, author, website, description, softdepend]

quiet ice
#

huh

opal juniper
#

is there a good way to work out which colour a location is in?

smoky oak
#

it actualy does work

quiet ice
#

that was more of a PoC

smoky oak
#

thats a new one

wraith prawn
#

Hello. I'm so confused using Maven. I'm working in a plugin with Intellij and I want to add an API (https://github.com/SpigotMC/BungeeCord) (I want to use "net/md_5/bungee/connection/LoginResult.java"). I want that Intellij download it to get what I want from the class above. How could I set that?

smoky oak
#

strg + alt + s then search for dependencies

#

if you added it it should show up there

eternal oxide
#

Yes, he needed a way to read yaml from resources directly

#

Yeah, you do that šŸ™‚

smoky oak
#

FileConfiguration ret = new YamlConfiguration();
        try {
            ret.loadFromString(configFile);
        } catch (InvalidConfigurationException e) {
            e.printStackTrace();
        }
        return ret;```
#

@mental girder that does not work

quiet ice
eternal oxide
#

You could

#

eliminates a String I guess

#
FileConfiguration test = new YamlConfiguration();

try (Reader reader = new InputStreamReader(getResource("plugin.yml"))) {
    test.load(reader);
} catch (InvalidConfigurationException | IOException e) {
    e.printStackTrace();
}```Cleaner
smoky oak
#

if it crashes it crashes

#

i had that problem for nearly aweek now

opal juniper
#

ie

smoky oak
#

that looks like c++ code

opal juniper
#

not diagonally but split it up into 4 squares

eternal oxide
#

yep, left over

smoky oak
#

well its not giving me one when bilding

#

*building

eternal oxide
#

no it does

#

from load

smoky oak
#

i meant the one liner

eternal oxide
#

ah

smoky oak
#

well in any case it works now

#

thanks guys

eternal oxide
#

void org.bukkit.configuration.file.FileConfiguration.load(@NotNull Reader reader) throws IOException, InvalidConfigurationException

#

one eye closed and a big nose? šŸ˜„

#

possibly

smoky oak
#
    public static YamlConfiguration loadConfiguration(@NotNull File file) {
        Validate.notNull(file, "File cannot be null");

        YamlConfiguration config = new YamlConfiguration();

        try {
            config.load(file);
        } catch (FileNotFoundException ex) {
        } catch (IOException ex) {
            Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, ex);
        } catch (InvalidConfigurationException ex) {
            Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, ex);
        }

        return config;
    }```
#

its baked in

#

same for reader

#

just wihtout filenotfound

final monolith
#
[08:32:55 WARN]: java.sql.SQLException: ResultSet closed
[08:32:55 WARN]:        at org.sqlite.RS.checkOpen(RS.java:63)
[08:32:55 WARN]:        at org.sqlite.RS.findColumn(RS.java:108)
[08:32:55 WARN]:        at org.sqlite.RS.getObject(RS.java:387)
[08:32:55 WARN]:        at net.redewhite.DataAPI.API$1.run(API.java:133)
[08:32:55 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
[08:32:55 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[08:32:55 WARN]:        at org.github.paperspigot.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:23)
[08:32:55 WARN]:        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[08:32:55 WARN]:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[08:32:55 WARN]:        at java.lang.Thread.run(Unknown Source)
quiet ice
maiden briar
final monolith
#
                final ResultSet result = statement.executeQuery("SELECT * FROM `wn_data` WHERE uuid = '" + player.getUniqueId() + "';");
                Boolean i = null;
                while (result.next()) {
                    i = true;
                    Bukkit.getScheduler().runTaskAsynchronously(Main.getInstance(), new Runnable() {
                        @Override
                        public void run() {
                            for (VariableAPI api : Main.dataapi.keySet()) {
                                try {
                                    Bukkit.broadcastMessage("Loaded: " + api.getName() + " - " + result.getObject(api.getVariableName())); // ERROR IS IN THAT LINE <<<<<<<<<<<<<<<<<<<<<<<<
                              
                                } catch (SQLException throwables) {
                                    throwables.printStackTrace();
                                }
                            }
                        }
                    });
                }
opal juniper
smoky oak
#

arent they?

wraith prawn
quiet ice
#

diagonally would be something like
if (x > z)
if (x + 8 > z)
or something like that

opal juniper
#

okk

ripe veldt
smoky oak
eternal oxide
#

world is a variable

ripe veldt
#

how do I define it

eternal oxide
ripe veldt
spice sage
#

i made a plugin but i cant remove [ ] of the string in the config, i'll post 2 more sreenshots of the code that do that. How can i remove it?

quiet ice
#

&k will lead to it being the gibberish you see

spice sage
#

&k work but i cant remove "[" as first caracter and "]" as the last

#

idk

final monolith
#

how make this?

spice sage
#

this is the problem

quiet ice
final monolith
#

oh thanks

quiet ice
#

that works too I guess

ripe veldt
#

Sorry, I probably did this wrong.

quiet ice
#

okay yea

#

You haven't read the docs at all, right?

dusk flicker
#

Lmao

ripe veldt
#

I am not that good with java docs

smoky oak
#

you should read the world docs and the gamerule related methods

quiet ice
#

Did you extend JavaPlugin anywhere?

dusk flicker
#

Would be a good idea to learn how to read docs

ripe veldt
#

Oh

fluid cypress
#
public static List<String> homeDefaultItems;
AddHomeCommand.homeDefaultItems = config.getList("default-home-items");

i get Incompatible types. Found: 'java.util.List<capture<?>>', required: 'java.util.List<java.lang.String>', how do i fix it?

spice sage
#

i tested it with sendMessage and sendRawMessage and both works with [ ] when it doesn't exist. i don't understand nothing of this

ripe veldt
#

It just clicked

#

Now I am getting this.

quiet ice
#

Bukkit does not make use of the magic static main(String[]) method, so your entrypoint is invalid, which is a more serious issue than your code not compiling

eternal oxide
#

static main is for Apps. Plugins are not apps

dusk flicker
#

If you actually understood java you would realize that it's not a string value

#

?learnjava

undone axleBOT
dusk flicker
#

And spigot itself

spice sage
#

it compiles and works so, it create [ ] in the message when the plugin send it to the player

quiet ice
#

Instead, you need to have a class that extends JavaPlugin and define that class in the plugin.yml (which behaves kinda like the MANIFEST.MF, but is mostly bukkit only)

smoky oak
#

isnt there that one plgin tutorial

#

most of that stuff also applies for IntelliJ

dusk flicker
#

Use the spigot wiki

#

It has one for intellij eclipse and netbeans

eternal oxide
#

The bukkit wiki one is the most comprehensive tutorial

dusk flicker
#

That page doesn't even exist for me lol

quiet ice
#

yea, the bukkit one is the best one on the market, even if it is severely outdated

tame coral
#

In intellij there's a plug-in made to automatically start a project related to minecraft

#

it's very useful

eternal oxide
#

Never to be used by a beginner

tame coral
#

I used it as a beginner lol

eternal oxide
#

... no comment šŸ™‚

spice sage
#

even if i kit &k (magik), it work as bad as with it

ripe veldt
#

How do I change the gamerule to true?

eternal oxide
#

Stop using your IDE auto code suggestion

eternal oxide
#

^ look at teh javadocs and see what methods you should be using

tame coral
#

ye

eternal oxide
#

there is even a search box on the javadocs to find anything you need

#

search for gamerule and see what it shows

ripe veldt
#

import org.bukkit.World;

spice sage
#

add ()

eternal oxide
#

you need a World instance not a static object reference

tame coral
#

it's a method, not a property

spice sage
ripe veldt
tame coral
#

Yeah that's the whole point of what they told you

#

You really should learn java

near crypt
eternal oxide
#

Not trying to be rude here, but if you took a few java lessons (online) this would all make sense to you.

ripe veldt
#

Oh, I know how to create an instance I'll try that.

eternal oxide
#

You need to GET a world instance, not create one

dusk flicker
#

You need to learn basic java dude

undone axleBOT
eternal oxide
#

?learnjava take a few courses and make your life easier

near crypt
ripe veldt
#

Oh.

#

Ok

near crypt
#

with the keyword new i guess

tame coral
#

Hint : Instances are often got with methods such as getTheObjectYouWantToGet()

#

So you can search for these in the javadocs

near crypt
#

cant he just create a new World Object world and then do world. ?

dusk flicker
#

They shouldent

near crypt
#

idk his purpose but i think he can

tame coral
dusk flicker
#

Should use the method to get the instance of the world from Bukkit

eternal oxide
#

well, actually you could šŸ™‚

near crypt
#

yes

tame coral
#

But it wouldn't work

near crypt
#

he COULD

#

xD

dusk flicker
#

Would it fire some errors? Probably

tame coral
#

yeah but there's no point in doing that ???

tame coral
ripe veldt
near crypt
#

okay

#

@ripe veldt ?learnjava

#

?learnjava

undone axleBOT
ripe veldt
#

I know about that, someone sent it earlier.

eternal oxide
#

Bukkit.getWorld(worldNameHere). or Bukkit.getWorlds() and find the world you want from teh returned Collection.

maiden briar
#

Using https://github.com/hfoxy/Spigboard/blob/8f07b186cff3d6285630e3776875e94cecb204f7/, but no scoreboard visible

@Override
    protected Spigboard getDefaultScoreboard()
    {
        Spigboard scoreboard = new Spigboard(new Component("&6DogLeader"));
        scoreboard.add(1, "test", new Component(DateTimeFormatter.ofPattern("dd/MM/yyyy").format(LocalDateTime.now())));
        scoreboard.add(2, "test2", new Component("&a"));
        scoreboard.add(3, "test3", new Component(DogLeaderTeam.HUNTER.getPrefix().toLegacyText() + " &f: &ap-hunters y-hunter"));
        scoreboard.add(4, "test4", new Component(DogLeaderTeam.RUNNER.getPrefix().toLegacyText() + " &f: &ap-runner y-runner"));
        scoreboard.add(5, "test5", new Component("&b"));
        scoreboard.add(6, "test6", new Component("&eplay.mcmanhunt.com"));
        return scoreboard;
    }

//Inside another method

this.scoreboard = getDefaultScoreboard();

for(org.bukkit.entity.Player player : Bukkit.getOnlinePlayers())
    this.scoreboard.add(player);
near crypt
#

oh @eternal oxide already wrote it sry

near crypt
maiden briar
#

I can try using less characters for testing

near crypt
#

try it

eternal oxide
#

add players to a scoreboard using their name. add Entities using their UUID

maiden briar
#

I only have players

eternal oxide
#

1.8 I guess then

final monolith
#

how make this?

maiden briar
near crypt
#

bruh

eternal oxide
#

then player.getUniqueId()

maiden briar
#

Ok

near crypt
eternal oxide
#

sorry player.getDisplayName() or somethgin like

final monolith
maiden briar
#

Ok I will try it

final monolith
#

how make this works?

near crypt
final monolith
near crypt
#

?paste and paste your class inside

undone axleBOT
final monolith
#

(line 94 = for() line)

near crypt
#

thx

#

no the class with the AsyncPlayerChatEvent

#

there is the exception i guess

#

@final monolith

rigid hazel
#

Hello. I have a block from PlayerInteractEvent and I know that this block i placed from a itemstack. Now I want to get the custom model data from the block, the item stack had before. Is that possible? If not: What else could I do?

#

Which method?

#

I didn't find it. What do you mean exactly with this?

near crypt
#

you mean spigot docs...

rigid hazel
#

I said PlayerInteract Event

near crypt
#

can you call Bukkit.boradcastMessage() in a async Event?

rigid hazel
#

I want to get the itemstack from the block, that is touched

#

Not the item in the hand

#

I wouldn't write here, if it's not.

#

For example: block.getItemMeta().getCustomModelData()

#

That is what I would need.

#

Okay. Any innovations?

#

Okay. Thanks.

eternal oxide
#

ItemStack is the item you are using to break the block. Entity would be the Player

rigid hazel
#

But is the CustomModelData still the same after breaking it @eternal oxide ?

eternal oxide
#

Thats resource pack data

next stratus
#

has anyone worked with aikar commands before? I have the issue of it not allowing me to run a give command via the console and was wondering if anyone would know a fix?

maiden briar
#

PlayerJoinEvent -> setScoreBoard, and for every player online updateScoreBoard

granite stirrup
opal juniper
#

If I wanted to move something 16 blocks with a vector, what is the way to calculate the vector?

next stratus
maiden briar
#

Yup kinda weird

opal juniper
#

Ok

granite stirrup
#

you mean add?

opal juniper
#

You seem familiar

#

Lmaooooo it’s you

eternal oxide
#

Totally not NNYa šŸ˜‰

opal juniper
#

Good to see you back

granite stirrup
#

lol hes gonna get banned again

opal juniper
#

I saw when you got banned, caught md on a bad day smh

next stratus
#

does md_5 actually talk in this discord?

eternal night
#

occasionally

opal juniper
#

just search and you will see

next stratus
#

last message 6 days ago

eternal oxide
#

Just depends if you are worthy

granite stirrup
#

i havent talked to md_5 yet only once

opal juniper
#

he normally ignores me Sadge

granite stirrup
#

oh well i need help to run 1.8 on java 16 cuz i had to cuz all the plugins didnt support newer versions lmao and he said to disable this thing and it worked

next stratus
#

šŸ‘

granite stirrup
#

i make my own

#

and i use commandmap

#

xd

#

i made a thing to add and remove commands lmao

#

it was pretty bad tho

#

aws does website hosting šŸ‘€

#

and theres a thing thats always free

#

loll

next stratus
#

they've done that for a while?

granite stirrup
#

to bad i dont want to enter my address to signup and i dont have a credit card

near crypt
#

what is aws?

quaint mantle
opal juniper
#

amazon web services

granite stirrup
granite stirrup
near crypt
#

databases from amazon?

opal juniper
#

its like vps

quaint mantle
opal juniper
#

pretty much anything

granite stirrup
opal juniper
#

you can dynamically buy more / less servers

near crypt
#

and its a database?

opal juniper
#

so people like netflix use them

near crypt
opal juniper
quaint mantle
near crypt
#

okay

quaint mantle
#

What is the best way to make a gui plugin?

hardy swan
#

just think of it as a computer

granite stirrup
#

theres free stuff in it to

granite stirrup
hardy swan
#

what is the best way to make a plugin?

quaint mantle
#

i`m gay

granite stirrup
#

wtf

#

i entered my actual address

quaint mantle
#

I want to make an inventory and click system for personal use.

#

Let it be as optimized as possible.

granite stirrup
#

and amazon says its invalid

eternal oxide
#

You don;t exist

quaint mantle
#

inventorey.getname is bad?

#

example.

#

What would you recommend to check the correct inventories?

eternal oxide
#

instance

granite stirrup
#

WTF

quaint mantle
granite stirrup
#

ITS MY ACTUAL ADDRESS

#

BRUH

quaint mantle
#

😩

#

not return

#

Equals method better

#

Smh

#

this?

hardy swan
#

your menuManger doesn't even inherit inventory holder

eternal oxide
#

compare inventory object directly

#

if inventory == menuManager.ruinsGUI

quaint mantle
granite stirrup
#

fucking pussy

quaint mantle
#

Would it be better to switch or use ifs to check inventories?

granite stirrup
#

i dont have a fucking credit card bruh

next stratus
#

lol

quaint mantle
#

how to?

quaint mantle
opal juniper
#

like this @mental girder?
vector = new Vector().normalize().multiply(16);

granite stirrup
#

:(

quaint mantle
#

oh

next stratus
eternal oxide
quaint mantle
opal juniper
#

oh yEAH

quaint mantle
next stratus
#

You spell like you're 8.

quaint mantle
#

Lol

opal juniper
#

so i just make one that is (1,1,1)

quaint mantle
#

I want to learn. I'm developing my server, I could just download other people's plugins.

granite stirrup
#

im not fucking 8

quaint mantle
#

😩

next stratus
#

You are 8 lol

hexed hatch
#

So it’s working

opal juniper
#

kk

eternal oxide
opal juniper
#

hmm true

#

yeah

#

makes sense

granite stirrup
next stratus
eternal oxide
#
Vector directionVector = targetLoc.toVector().subtract(source.getLocation().toVector());```
hexed hatch
#

You might as well be

granite stirrup
next stratus
ivory sleet
#

Sir this is help development

granite stirrup
next stratus
#

you make it obvious you're 8

maiden briar
granite stirrup
next stratus
#

but you are

ivory sleet
#

DevBukkit, idkidk please stop this nonsensical debate