#help-development

1 messages · Page 1607 of 1

valid crag
#

or something along those lines

shadow gazelle
#

My projects are on a 7200RPM HDD

torn shuttle
#

regale us with a screenshot nnya

valid crag
#

now, that would be totally fine

#

BUT

torn shuttle
#

show us what your discord looks like

shadow gazelle
#

And it's only there for like a second at most on my bigger projects

valid crag
#

whenever the status text updates

#

it steals window focus

#

and takes intellij to the front

torn shuttle
valid crag
#

30 seconds for 1 file

#

which means that if I'm try to write here, in discord

#

while I'm opening a project

torn shuttle
#

even with just 50k lines it's already taking just about under a minute

valid crag
#

intelliJ steals the window focus

#

I press space, because i'm fucking typing

shadow gazelle
#

The one I'm working on atm only has 15 classes

valid crag
#

the cancel button is automatically highlighted

#

and the process of loading the fucking project is cancelled

shadow gazelle
#

lol

quaint mantle
#

I dont understand why getLogger is underlined red, do I need to import something into my project to make it work?

torn shuttle
#

lol that has literally never happened to me, didn't even know it could happen

valid crag
#

probably because it's only open for like a few seconds at most for you

#

but stealing window focus is still unforgivable in my books

#

why the fuck does it do that?

torn shuttle
#

I swear he lives in an alternate hell dimension and all he has for a computer is a rpi

valid crag
#

what compels the fucking developer to call some function that puts intellij window in the front when the status message changes?

#

like what the fuck

#

why

#

it's not something that's done accidentally

shadow gazelle
#

Very nice

torn shuttle
#

see that's not an issue when you have 5 monitors

shadow gazelle
#

Spigot being stupid

valid crag
#

someone needs to go out of their god damn way to make it happen

torn shuttle
#

I've never noticed it goes in front of anything

#

there is nothing for it to be in front of in the first place

valid crag
#

i have several monitors, too

#

but only one window can be focused at once

#

you know, the one your keyboard input goes towards

#

for me right now, the ripcord window, with its chatbox

#

the issue is that my keyboard input is suddenly fucking pipelined to intellij

torn shuttle
#

I need to test this again because I've actually never noticed it hijacks in and now I'm wondering

valid crag
#

where it does random things

torn shuttle
#

nope

#

didn't steal focus

valid crag
#

it may be fixed in the newer versions, I saw quite a bit of outrage about focus issues regarding maven on the support channels

torn shuttle
#

I was pressing a on discord the whole time it loaded

valid crag
#

i might update intellij if that is the case

#

it's super fucking annoying

#

intellij has a poor track record with window focus

torn shuttle
#

maven is just annoying on every ide I've used

#

gradle is marginally better

valid crag
#

it used to do the same thing whenever you reimported your maven project

#

but people raged about it and it got fixed

ivory sleet
#

I only use gradle because it’s faster altho it devours my ram like it’s sweet candy

shadow gazelle
#

Chrome 2.0

valid crag
#

i have 'plenty' of ram

#

i should move to gradle eventually

torn shuttle
ivory sleet
#

Hmm yeah, also xml is quite counter intuitive to work with once it gets too nested

valid crag
#

with 8gb of ram and a relatively fast SSD, i've never run into memory issues on this machine

shadow gazelle
#

bruh

valid crag
#

everything responds instantly as long as the fucking potato cpu isn't capped out

unreal quartz
#

IJ does not steal window focus for me at all when launching it

ivory sleet
#

batman do you play any games?

#

Usually some games can be very ram heavy also

paper viper
#

minecraft

valid crag
#

not on this machine

paper viper
#

🤡

ivory sleet
#

Also I believe forge is set to 8gb ram by default 😫

valid crag
#

i play games on a slightly older laptop

#

with less ram but a better processor

torn shuttle
#

oh no lol

ivory sleet
#

Ah okay

valid crag
#

i do sometimes play tanki online on this though

torn shuttle
#

does that laptop have a completely green filter?

valid crag
#

it's a flash game so it's pretty small

ivory sleet
valid crag
#

it's a russian bootleg of world of tanks

ivory sleet
#

Only thing I play on my pc is minecraft and mine sweeper rn literally, can’t handle anything else

torn shuttle
#

32gb of ram feels good

valid crag
#

i can probably barely play minesweeper on this machine

ivory sleet
torn shuttle
#

tbh I should probably get more

valid crag
#

i tried that one survival game or whatever it is, Forest I think it was called

#

it was many years ago but iirc I had around 3 fps

ivory sleet
#

oof lol

valid crag
#

fine is an exaggeration

#

it often completely grinds to a halt for like 20 seconds

ivory sleet
#

Alright fair

torn shuttle
#

between video editing and my shitty blender skills I eat ram for breakfast

#

also unity

valid crag
#

like, I have developed the ability to write entire classes of code without looking at the screen

ivory sleet
#

Sounds like you’re living in full harmony magma

valid crag
#

because sometimes intellij just shits bricks for 60+ seconds

#

and I can't be arsed to wait for it

#

so I just type shit and let it catch up eventually

torn shuttle
#

people say my specs are ridiculously overkill and I keep saying that my hardware gets pushed to 100% on every front on a daily basis

#

just never for gaming lol

valid crag
#

you just don't know how to micromanage

#

granted I suppose video editing and rendering is pretty resource intensive

torn shuttle
#

streaming is as well

#

if you want to create a blender model while you have unity open you're going to need a pretty beefy computer

valid crag
#

just suspend unity while you're making the model

torn shuttle
#

sure but if you just want to dish out a quick fix to a model you'd be surprised how long unity takes to open a project back up

valid crag
#

if you don't close it you don't need to open it back up

#

or did I miss something

torn shuttle
#

if you don't close it it's going to passively eat resources

valid crag
#

it's not if you suspend it

#

which is why I said suspend and not close or kill or whatever

torn shuttle
#

if you're tweaking a model you probably want to view the reference you have in the world in unity while you work on it

#

or maybe that's just me

valid crag
#

well then you can't close unity either

torn shuttle
#

yeah

valid crag
#

i prefer to scale horizontally

#

that is, buy more shitty laptops

#

and pile them on the same table

#

that way you can run your unity and your model shit completely independently

torn shuttle
#

that sounds absolutely terrible

#

but hey if that's what you want to do go ahead

valid crag
#

I have 3 mice on my mouse pad right now

#

they are colorcoded with the machines

torn shuttle
#

are they different shades of red?

valid crag
#

there's a gray and a blue and a red one

torn shuttle
#

ah yeah rgb

valid crag
#

there's also a dark gray fourth one for the desktop

torn shuttle
#

you must be a gamer

valid crag
#

my mouse pad is very small

#

so I've had to increase the mouse sensitivity a bunch

#

moving the mouse 2cm moves the pointer all the way across my monitors

torn shuttle
#

I will unironically pay you $5 for you to go around filming wherever it is your computers are in, catalog what you have and describe how your setup works and put it up publicly on youtube, because in my mind there is an 85% chance that if there is a window in the shot we will see one of the circles of hell through it

valid crag
#

rain is quite rare here

#

i'm on the coast, but there's some sort of a geographic thing here that makes it never rain

#

it's rained like 2 days all this year

shadow gazelle
#

Are there any examples of making subcommands in multiple classes on the forums?

valid crag
#

probably

#

they are also probably trash

#

i'm sure there is at least one decent one

quaint mantle
#

use a framework like acf if you want a decent solution

ivory sleet
#

Yeah or look into ACF or something like cloud

shadow gazelle
#

Okay

valid crag
#

i need to rewrite my command framework at some point

torn shuttle
#

could is good but it can not deal with reloads at all which is a shame

valid crag
#

never heard of this cloud tbh

#

let me take a look

paper viper
#

bri

#

gadier

torn shuttle
#

cloud command framework

#

it's good if you want something that will out right out of the box with no modifications

#

which I did

ivory sleet
#

Only con with cloud imo is that it’s too cumbersome to setup

torn shuttle
#

eeeeh

ivory sleet
#

Like you need to specify the command a manger, mchelp, audience, execution coordinator and so on

torn shuttle
#

it could be simpler

ivory sleet
#

Yeah

torn shuttle
#

the thing that kills me is genuinely the reload thing

ivory sleet
#

Lmao ye

torn shuttle
#

plugman reloads were an incredible shortcut

ivory sleet
#

😌

valid crag
#

what is the underlying issue with it not supporting reloads

quaint mantle
#

how do i check if a String[#] is not set

#

like

#

args[1] not being set

valid crag
#

is it something super irrevocable

#

or do they just need like a remove call to the commandmap on disable

torn shuttle
#

cloud has a bit of a dependency tower of pisa which doesn't help

valid crag
#

urgh

quaint mantle
quaint mantle
#

i didnt know that was a thing :D

#

thank u

valid crag
#

oh yeah, speaking of a pain in the ass

#

are there any oss vehicle plugins that aren't totally garbage

torn shuttle
#

I'm not sure such a thing is even feasible tbh

valid crag
#

i forked this one vehicle plugin a bit ago and it's slimefun levels of needs-a-rewrite

torn shuttle
#

the smallest amount of ping causes horrendous desyncs

valid crag
#

i mean

#

boats work fine

#

why can't other vehicles

#

i don't remember boats having clientside controls

sick portal
#

Hello, has anyone ever incountered a bug where if you teleport a player in another world, and then you try to change its gamemode, the gamemode doesnt change ?

valid crag
#

cound be wrong I suppose

quaint mantle
#

it is possible to save hashmaps to the server, yes?

#

or do those get deleted next time the plugin unloads

torn shuttle
#

so who knows

valid crag
#

from my little bit of testing I think it should be manageable as long as the vehicle speeds aren't super fast

quaint mantle
#

hashmaps dont save unless you save them to a yml file or database

quaint mantle
#

same with lists

valid crag
#

nothing is saved unless you save it

quaint mantle
#

ahhh

valid crag
#

list, set, map, object, whatever

#

all of it is in memory

quaint mantle
#

cbb to use a database

paper viper
#

database are actually super easy ngl

#

just put, get, some basic functions

#

easy to pickup

torn shuttle
paper viper
#

for basic actions of course

valid crag
#

until someone tells you not to do db queries in the playermoveevent

dusk flicker
#

but like

#

why would you do that

quaint mantle
valid crag
#

i'm pretty sure I've seen it done at least once

quaint mantle
#

databases just require proper caching

#

how hard is CSV variable saving

valid crag
#

not any more difficult than any other sort of flatfile saving, but probably doesn't have as many tutorials or tools in the spigot region of space as f.e working with yml files

quaint mantle
#

or yml

#

etc.

#

how can I set the display name for a custom tool

valid crag
#

get its item meta, change its display name, set the item meta

#

a file is a file, txt or yml or csv are all the same shit under the hood

quaint mantle
#

ItemStack result = new ItemStack(Material.DIAMOND_AXE, 1);
ItemMeta meta = result.getItemMeta();
this is what I have I just don't know how to set the name i try to use
meta.setDisplayName(ChatColor.RED + "The Enhanced Axe")

#

but the last line is always underlined

valid crag
#

and what does the underline say

#

red underline means a compile time error; hover over it to see the actual error and what it says

quaint mantle
#

the chat color one says its an unknown class

valid crag
#

did you import the class

quaint mantle
#

the setDisplayName says nothing and is a solid red line

#

yes I important org.bukkit.ChatColor

valid crag
#

send a screenshot or something

quaint mantle
#

ill dm it to you because it won't let me send it in here if thats ok

valid crag
#

you can upload it somewhere and then link it here, but sure

#

that isn't valid java

#

you can't write code in a class

#

you write code in a method

#

you need to declare a method and then put the code you've written in the method body

quaint mantle
#

ohhhh

valid crag
#

public ItemStack getMeAnItem() {

#

you can only declare methods, fields, and subclasses in a class

#

arbitrary code must be in a method body

#

you probably want to return the result but yes something along those lines

#

you'll also want to call setItemMeta on the item before returning it

quaint mantle
#

alright thanks

waxen plinth
#

Surround your code in triple back ticks so it formats properly please

shadow pulsar
#

There should be an event that triggers when a block was broken indirectly. Like when the bottom of a sugarcane block gets removed and all the other sugarcanes break above it

quaint mantle
#

you can make that pretty easily

dry beacon
#

How can I make my plugin work on older versions? I'm using the 1.17 API and the plugin does not work on servers below 1.17

quaint mantle
#

set the api version to 1.13

dry beacon
#

thanks!

quartz flicker
#

how can i copy area of blocks to another area?
im trying to build a minigame plugin with color party.
i tried the world edit api but it needed player session or somthing but i need it only from server.
this is where i want it to duplicate to: https://pasteboard.co/Kdv8m9t.png
and this is an example i want to duplicate: https://pasteboard.co/Kdv8Iat.png

hardy swan
#

If you gonna use worldedit api, chances are you gonna install it anyways too

#

Unless you wanna shade it into your plugin, then you must as well install worldedit haha

young knoll
#

Because no one resets mini games manually?

hardy swan
#

Ohhh reset

#

Well from his example it seems that he just wanted to duplicate a map

quartz flicker
hardy swan
quartz flicker
#

no

#

they spawn in the floor area

#

and every round a color picked

hardy swan
#

If not, the simplest way is to iterate through the blocks and set their type individually, you don't need any api

quartz flicker
#

and after couple seconds the floor disappear except the color

hardy swan
#

You have predesigned set of floor mappings right

quartz flicker
#

i got location of two corners of the floor

#

and locations of the floor presents

#

presets

quartz flicker
#

and i made this class for this

#
class Platform {
    public Location point1;
    public Location point2;

    public Platform(Location point1,Location point2){
        this.point1 = point1;
        this.point2 = point2;
    }
    public Platform(double x1,double y1,double z1,double x2,double y2,double z2){
        this.point1 = new Location(Bukkit.getWorld("RainbowMan"),x1,y1,z1);
        this.point2  = new Location(Bukkit.getWorld("RainbowMan"),x2,y2,z2);
    }

    public List<Platform> getPlatforms(){
        List<Platform> platforms = new ArrayList<>();

        platforms.add(new Platform(12,79,-3,-2,79,11));
        platforms.add(new Platform(12,74,-3,-2,74,11));
        platforms.add(new Platform(12,69,-3,-2,69,11));
        platforms.add(new Platform(12,64,-3,-2,64,11));

        platforms.add(new Platform(-4,74,-3,-17,71,11));
        platforms.add(new Platform(-4,69,-3,-17,69,11));
        platforms.add(new Platform(-4,64,-3,-17,64,11));

        platforms.add(new Platform(-4,74,13,-17,74,27));
        platforms.add(new Platform(-4,69,13,-17,69,27));
        platforms.add(new Platform(-4,64,13,-17,64,27));

        platforms.add(new Platform(12,74,13,-2,74,27));
        platforms.add(new Platform(12,69,13,-2,69,27));
        platforms.add(new Platform(12,64,13,-2,64,27));

        platforms.add(new Platform(12,69,29,-2,69,43));
        platforms.add(new Platform(12,69,29,-2,64,43));

        platforms.add(new Platform(-17,64,29,-4,64,43));
        platforms.add(new Platform(-17,69,29,-4,64,43));



        return platforms;
    }
    public Platform getRandomPlatform(){
        return getPlatforms().get(new Random().nextInt(getPlatforms().size()));
    }
}```
dusk flicker
#

what the hell

quartz flicker
#

what

dusk flicker
#

HARD CODING

quartz flicker
#

its just looking at chords

hardy swan
#

Before commenting on the code, i dont think you need worldedit api either way

quartz flicker
#

and copy paste 100 times

#

so what to do

#

can u help me code it?

quartz flicker
#

and the floor presets are rotated like 90 degrees

#

and i need to match it

#
private Location getLocation1(){
        return new Location(Bukkit.getWorld("BlockParty"),26 ,63, -21);
    }
    private Location getLocation2(){
        return  new Location(Bukkit.getWorld("BlockParty"),12 ,63, -35);
    }```
#

this is the main floor positions

hardy swan
quartz flicker
#

not every round

#

wait

#

ill screen shot it

paper viper
#

to store those

#

then read it from the file

quaint mantle
#

Hello, spigot ! I made a custom recipe with prepareItemCraftEvent with custom itemstack with custom amount, but when I craft item with 2x+ item matrix, the matrix doesn't remove.;
I tried to clear inventory, but it occurs many erros (in my case.). how can I solve this?
I followed https://www.youtube.com/watch?v=Q2KYeinuoME&feature=emb_title

GHG

Hello everybody! Today I will show you da wea of using ItemStacks inside of your crafting recipes! Don't forget to leave a like if you enjoyed :)


Full playlist: https://www.youtube.com/playlist?list=PL_MDptw3Zft_Xb8-i0WBGtwdUN14TMJ...

▶ Play video
young knoll
#

Version?

quaint mantle
#

1.15.2 - fork by myself

young knoll
#

RecipeChoice.ExactChoice

quaint mantle
#

Also, I use PrepareCraftEvent

#

not recipe choice

young knoll
#

Why

quaint mantle
#

because custom amount

quaint mantle
#

I copied thijs code

young knoll
#

I mean you’ll have to manually remove the items then

quaint mantle
#

I can't 😭

#

because I made a recipe book

#

(view player the recipe)

#

and when I clear, I can't craft

young knoll
#

What

quaint mantle
#

anyway, we can't use clear inventory

#

hmmmmm

young knoll
#

I never said to clear anything

#

Set the amount

#

In the CraftItemEvent

quaint mantle
#

thanks you for helping

#

but

#

CraftItemEvent doesn't detect for custom craft

#

but I think I can do it with inventory click event

young knoll
#

I mean if you are taking the item out of the result slot

#

Then it should count

hardy swan
#

what are you trying to achieve lol

#

isn't there a Bukkit.addRecipe or sth

#

why listen to prepareitemcraftevent? set recipe result's amount doesn't work?

young knoll
#

I think they want the ingredient to be stacked

hardy swan
#

like two sets of ingredient gets two times the amount of result?

#

then can the result go beyond the maxstacksize or sth lol

young knoll
#

No

#

Ex: 5 stacked sugarcane for 1 sugar

hardy swan
#

ah ok

#

then yea, you will need both craftitemevent and prepareitemcraftevent

#

don't quite understand his issue atm

quaint mantle
#

whats the data saver thing

#

data something something

#

for saving dataa

hasty prawn
#

PDC, PersistentDataContainer?

eternal oxide
#

?pdc

quaint mantle
#

Sorry i just dont understand how it works :/
Even with the simple map. idk how to get and add havent really gotten into maps

#

JUust asking if you could explain it so ik how it works

eternal oxide
#

?learnjava

undone axleBOT
torn shuttle
#

I just accidentally did the most pretentious thing of my life

#

I was wondering which day exactly my father's bday was in so I went and googled him expecting google to straight up give me an exact date, and it did

#

man universities just doxx the shit out of people huh

quaint mantle
#

was wondering if PlayerBedEnterEvent is deprecated?

#

doesnt seem to work..?

#

idrk

granite stirrup
#

"This event is fired when the player is almost about to enter the bed."

quaint mantle
#

wait what

#

so like

#

i should check its status

#

ídk what even to use when a player actually enters a bed

granite stirrup
#

also wdym its not working

quaint mantle
#

it doesnt call

#

i'll check if the result is "OK"

granite stirrup
#

how do you know?

quaint mantle
#

well thats the thing, i just thought it was if the player started sleeping in a bed

#

so i had it broadcast smt

granite stirrup
#

tf are you making a 1000 tasks?

quaint mantle
#

no lmao

#

the time is > 1000

#

having 50 added to it a bunch,

#

until its not 100

#

1000*

#

stil isnt calling though

granite stirrup
#

but thats still alot

quaint mantle
#

or just set it

#

that isnt the point right now though, i cant seem to get the event to function

granite stirrup
#

why do you even need that much?

granite stirrup
#

kk

#

so whats not working

quaint mantle
#

the event

#

it just wont call

#

like its not being triggered

granite stirrup
#

try using the player interact event and check if you rightclicked the bed

quaint mantle
#

@lost matrix i understand how to get the value now but idk how to add anything

granite stirrup
quaint mantle
#

Will it just add? like if theres already one with the key "strength" or smthing

#

does it add to the number?

torn shuttle
#

I really should've learned ctrl-shift-+ and ctrl-shift- - earlier on itellij...

chrome beacon
#

What does that do?

hardy swan
#

increase font size?

torn shuttle
#

expand and minimize everything

hardy swan
#

oh

torn shuttle
#

useful for when you start hitting 1k lines in a single class or more

hardy swan
chrome beacon
#

I always manually minimize 😅

quaint mantle
chrome beacon
#

Good to know lmao

hardy swan
#

if there is an existing mapping for the key, then the value will be replaced with the new map

quaint mantle
hardy swan
#

ain't you asking how to "add" into a Map<K, V>?

quaint mantle
#

No

hardy swan
#

ok i get what you mean by add

#

no

#

put will not add them up

quaint mantle
#

alr

#

im trying to recreate my stats system

#

cus i use persistent data containers rn

#

but i have to check ALOT of things when i wanna add/remove from the stat if i like equip an item

#

with armor its eas

#

y

#

but with items ill have to check so many events

#

So im trying to remake it with Custom attribute modifiers

hardy swan
#

i don't quite understand what you are trying to achieve as a whole

#

but if you are trying to update the value of a key's mapping

quaint mantle
hardy swan
#

you can use #merge(K, V, BiFunction) instead

quaint mantle
#

I have a GP class (Gameplayer)

#

Which has some stats rn

#

Example Strength

#

I have items with persistent data containers

#

which contains a key with an amount of the stat

#

and when i equip armor it will add stats

quaint mantle
lost matrix
#

But those states should not be coded as fields. Rather use a Map to have a more dynamic data structure.

hardy swan
#

final maps can be mutated

lost matrix
quaint mantle
#

No but i just dont understand how the classes 7smile7 send me work

hardy swan
#

I thought you just dun understand how to add the stats up under a certain key

quaint mantle
lost matrix
quaint mantle
#

I should do some more simple stuff first

#

then learn how maps work

#

i dont know that much about coding just a bit

lost matrix
quaint mantle
#

ik

#

Disabling collisions with entities is also kinda hard i noticed

lost matrix
#

If you want to learn how to use maps i would recommend you to write a simple home plugin.
It will help you learn maps and how to save data between restarts.

quaint mantle
#

a like a map with <String, Location> ?

quaint mantle
worn tundra
quaint mantle
#

i can use a GP class

#

and save the maps under the UUID of the player

lost matrix
#

If you only want one home that is

quaint mantle
#

o no i ment like String as in home name if u want multiple

#

ye

#

ill try 1 home first

#

also if id make multiple homes it would be a Map array right?

#

is that a thing?

#

HashSet would be good enough

#

Im confused there are
Maps
HashSet
HashMap?????

#

Sets are pretty much just maps except they don't allow duplicate entries

#

ahhh

#

Hashmap is just an implementation of map so yea

#

so hasmap is the same as map?

#

yeah

#

but you can't instantiate a Map

#

ahhh

#

in what version should i make like the practice plugins?>

#

practice plugins?

quaint mantle
#

oh just go with the newest version then I guess

#

1.17?

#

i normally use 1.16.5 but alr ig

#

sure that works

#

You can simply create an interface called Home and have it require both a name and a location

#

Also

#

sometimes my intellij

#

just doesnt work

#

like i cant press File

#

any fixes for that?

#

rn the only fix i got is restarting pc

#

Never had this problem, sorry

#

Personally I'd just go with a HashMap with the UUID as the key and a hashset of homes as the value

#

huh

#

So smthing like:
HashMap<UUID, Location> homes;
homes.put(Player.getUniqueID(), Player.getLocation())

#

?

#

@quaint mantle

hardy swan
#

Yes

quaint mantle
#

No

#

Because if you decide to store the location you won't have the ability to save it with a custom name

hardy swan
#

Oops i didnt read the previous message

quaint mantle
#

ooo

#

HashMap<String, HashSet<Home>> test = new HashMap<>();

#

so HashMap<UUID, HastSet> homes

#

ahh

#

But you still have to create the Home class

#

and that would be an enum?

#

No, you'd just create a new instance of the home. I'll type up a quick example

#
public class Home {
    public final String name;
    public final Location location;
    public Home(String name, Location location){
        this.name = name;
        this.location = location;
    }
}```
#

that'll do

#

ahhhhh

#

On the ./sethome command you can simply have it require an argument

#

ye

#

alr

#

then you do Home newHome = new Home(arg, p.getLocation()); which you then add to their hashmap

#

ye alr

#

If you don't want homes to have a name you can also just use locations, that's fine too

#

ye k

quaint mantle
#

Oh yeah, my bad

#

Just replace String with UUID

opal juniper
#

anyone know an implementation of A* in java for 3d use?

#

(that i can yoink)

tribal holly
#

Someone know how to remove all possible way to get a specific enchant ? (i wanna remove protection 4 possible enchant, fusion etc)

quaint mantle
#

@quaint mantle i have this

public HashMap<UUID, HashSet<Home>> homes = new HashMap<>();
#

in my GP class rn

#

is that right?

ivory sleet
#

SetMultimap tho

quaint mantle
#

wa

#

what is SetMultimap

ivory sleet
#

It’s effectively a Map<K,Set<V>>

#

Just more convenient

quaint mantle
#

do i have to use that

#

im still learning about maps rn

ivory sleet
#

Oh then maybe not so great of an idea

quaint mantle
#

cool

#

wat is this

eternal oxide
#

bad java is what that is

quaint mantle
#

😕

#

it no work :(

#

alos @quaint mantle

#

also*

#

The GP class

#

is for each player

#

so i can make the homes Map<String(name) , Location>

#

then you really don't need to have the hashmap with their uuid

#

bc else ill save the uuid twice

#

ye exactly

manic bison
#

hey, does anyone know how i can hide the potion effects particles ? as well as the little icon that says i have this effect

quaint mantle
#

I don't think you can hide the icon

#

but I believe passing a boolean to the effect removes the particles

ivory sleet
quaint mantle
#

The home class just holds both the name and the destination

quaint mantle
ivory sleet
#

Alr

quaint mantle
#

You can simply give the GP class a hashset with homes

quaint mantle
#

Yeah

#

so just go through their homes and check if it's in there

#

not that difficult

#

o u can do that

#

cool lemme test

ivory sleet
#

Map#containsKey ?

#

Or no?

quaint mantle
#

Yep

#

containsKey is only for maps

#

not for sets

ivory sleet
#

Well haven’t read the entire convo

quaint mantle
#

Well it'd be set here yeah

ivory sleet
#

Just use Set#contains

quaint mantle
#

Sets also have #contains so

#

i dont see the problem

ivory sleet
#

Most sets use an underlying Map anyways btw

summer jetty
#

How do i can put money in my crates

Plug-in= goldencrates

quaint mantle
ivory sleet
#

Sets aren’t lists

quaint mantle
#

They don't have values

#

just keys

#
gp.homes.forEach(home -> {
            if(home.name.equalsIgnoreCase(name)) {
                return;
            }
        });
ivory sleet
#

Yeah but check something like HashSet for instance

quaint mantle
ivory sleet
#

It uses a backing HashMap<E,Boolean> iirc

quaint mantle
#
     return;
}```
quaint mantle
#

I'd recommend at least sending the player a message btw xD

#

then i get this

#

ye ik

#

What is homes in your GP variable

summer jetty
#

How do i can put money in my crates. (Vault money)

quaint mantle
#

You might have to do the forEach because homes is a home object

quaint mantle
#

or a regular for ofcourse, might look better

#

But then you still can't compare it that way

#

it'd be home.name, not home

summer jetty
#

Can someone help me how to put money in my crates (Vault plug-in money)

ivory sleet
#

Elaborate

#

Are you coding a plugin?

summer jetty
#

No

ivory sleet
#

This is the wrong channel for server assistance

summer jetty
#

Oh oké

quaint mantle
#

yeah, this is where the competent people hang out

#

😎

#

return was giving me a warning so i did this

#
AtomicBoolean homeExists = new AtomicBoolean(false);
        gp.homes.forEach(home -> {
            if(home.name.equalsIgnoreCase(name)) {
                p.sendMessage(C.C("&cA home with that name already exists!"));
                homeExists.set(true);
            }
        });

        if(!homeExists.get()) {
            Home newHome = new Home(name, p.getLocation());
            gp.homes.add(newHome);
            p.sendMessage(C.C("&aSet a new home called: '&e" + name + "&a'"));
        }
#

God that's awful

#

ye ik

#

Use a normal loop, get rid of that dumb atomicboolean

#

return was giving me a warning for some reason

#

You can't return in a foreach

ivory sleet
#

Idk if that even would work might give you a ConcurrentModificationException

quaint mantle
#

done

#
for (Home home : gp.homes) {
            if (home.name.equalsIgnoreCase(name)) {
                p.sendMessage(C.C("&cA home with that name already exists!"));
                return true;
            }
        }
#

That's more like it

#

aaaah dammit

#

i made the project in 1.17

#

forgot to change the version

#

now im getting erros

#

errors

ivory sleet
#

lol

quaint mantle
#

is there a way to change it

#

like without recreating entire project

ivory sleet
#

Are you using something like maven or gradle?

quaint mantle
#

maven

ivory sleet
#

You change the version in pom.xml

quaint mantle
#

cna i just change the dependency?

#

is that it?

ivory sleet
#

Yeah and then reload maven project

quaint mantle
#

done

ivory sleet
#

That should be it

quaint mantle
#

yay

#

uhhh

#

still getting an error

#

O

#

plugin.yml

opal juniper
#

lmao yeah

ivory sleet
#

You’re enforcing your plugin to run on 1.17 or else it will shout

#

So I assume you don’t actually run a 1.17 server

quaint mantle
#

ye

#

i forgot to change the plugin.yml to 1.16

#

is there even any differences in the api

#

idk prob not

#

oops forgot the /home command

ivory sleet
#

Yeah some small differences

#

Barely noticeable

quaint mantle
#

@quaint mantle

#

i made the /home command

#

is this right?

#
String name;
            if(args.length == 0) {
                name = "Home";
            } else {
                name = args[0];
            }

            Home homeToUse;

            for(Home home : gp.homes) {
                if(home.name.equalsIgnoreCase(name)) {
                    homeToUse = home;
                    p.sendMessage(C.C("&aTeleporting to home: '&e" + name + "&a'"));
                    p.teleport(homeToUse.location);
                } else {
                    p.sendMessage(C.C("&cCouldn't find a home with that name!"));
                }
            }
#

i wanted to create a boolean again called foundHome

#

and if it dit

#

did*

#

it got that home and teleported to it

#

if not

#

other stuff

quaint mantle
#

You can shrink that code down to a couple lines

#

no need to make homeToUse

#

ehh true

#

just return after teleporting the user

#

false or true

granite stirrup
#

If gp.homes is a arraylist why not do . contains on it?

quaint mantle
#
        for (Home home : gp.homes) {
            if (home.name.equalsIgnoreCase(name)) {
                p.sendMessage(C.C("&aTeleporting to home: '&e" + name + "&a'"));
                p.teleport(homeToUse.location);
                return;
            }
        }
        p.sendMessage(C.C("&cCouldn't find a home with that name!"));```
quaint mantle
#

its a HashSet

quaint mantle
granite stirrup
#

Oh

#

I thought he had a home object

quaint mantle
#

he's iterating over Homes

#

I'd also limit the amount of homes a player can set, wouldn't want some dude to create a billion homes @quaint mantle

#

1 problem

#

on playerJoin

#

i load the players stuff from the config

#

but i get that

#

pl = FileConfiguration

ivory sleet
#

it’s just get() then

quaint mantle
ivory sleet
#

Yeah well you need to convert that into a HashSet

granite stirrup
#

Cast it?

quaint mantle
ivory sleet
#

Nono

#

What’s a Home btw?

quaint mantle
#
public class Home {
    public final String name;
    public final Location location;
    public Home(String name, Location loc) {
        this.name = name;
        this.location = loc;
    }
}

ivory sleet
#

Alright and how does the config look?

quaint mantle
#

what config

#

oh this?

ivory sleet
quaint mantle
#
public class Settings {
    private static final FileConfiguration pl = registers.pl.getConfig();

    public static void DestroyGP(GP gp) {
        String a = "players." + gp.getPlayer().getUniqueId() + ".";
        pl.set(a+"homes", gp.homes);

        gp.DestroyTimers();
        gp.Destroy();
    }

    public static void LoadGP(GP gp) {
        String a = "players." + gp.getPlayer().getUniqueId() + ".";

        gp.homes = pl.get(a+"homes");
    }
}
ivory sleet
#

Ye

#

No like the config itself

#

The file

#

How do you store the homes

#

In the file

quaint mantle
#

OH

granite stirrup
# ivory sleet Nono

Wouldn't it be fine if you cast it as long as you know thats it is a hashset full of home?

quaint mantle
#

1 sec

ivory sleet
#

thing is, get(path) never returns a HashSet

quaint mantle
#

for example

#

this

#
players:
  295c1422-92a6-4f5d-bd4b-690c3dfb6b70:
    homes: !!set
      ? !!quac.practice.Home
        location:
          ==: org.bukkit.Location
          world: world
          x: -79.57724830341647
          y: 64.0
          z: -85.09642026727794
          pitch: 33.299957
          yaw: -89.099434
        name: how
      : null
      ? !!quac.practice.Home
        location:
          ==: org.bukkit.Location
          world: world
          x: -84.93796836288155
          y: 64.0
          z: -85.12178193048537
          pitch: 33.299957
          yaw: -89.099434
        name: hi
      : null
      ? !!quac.practice.Home
        location:
          ==: org.bukkit.Location
          world: world
          x: -74.46921524648975
          y: 64.0
          z: -85.07537722526311
          pitch: 33.299957
          yaw: -89.099434
        name: are
      : null
      ? !!quac.practice.Home
        location:
          ==: org.bukkit.Location
          world: world
          x: -68.78277553498273
          y: 64.0
          z: -85.05154698815029
          pitch: 33.299957
          yaw: -89.099434
        name: you?
      : null

ivory sleet
#

Uh okay

#

Maybe it’s possible to cast it ¯_(ツ)_/¯

#

Probably have to deserialize that but who knows

quaint mantle
#

this tho

granite stirrup
#

A warning

ivory sleet
#

Yeah that’s cause of generics

quaint mantle
#

do i ignore that?

ivory sleet
#

//noinspection unchecked

#

Put that above

quaint mantle
#

nope i do not ignore it

granite stirrup
#

Mostly you could ignore tho but you just make sure you actually have a HashSet<Home> in the config

ivory sleet
#

Make Home implement ConfigurationSerializable

granite stirrup
#

Would that do anything?

ivory sleet
#

Not on its own

quaint mantle
#
@Override
    public @NotNull Map<String, Object> serialize() {
        return null;
    }
#

wat i put there

granite stirrup
quaint mantle
#

ye its there

ivory sleet
#

Map<String,Object> map = new HashMap<>();
map.put("name",name);
map.put("location",location.serialize());
return map;

#

Or smtng

#

Then you need to add a second method

quaint mantle
#

where

ivory sleet
#

public static Home deserialize(Map<String,Object> map) {
String name = (String) map.get("name");
Location location = Location.deserialize(Map<String,Object> map.get("location"));
return new Home(name,location);
}

#

That into ur Home class also

quaint mantle
ivory sleet
#

Then also add
static {
ConfigurationSerialization.registerClass(Home.class);
}

quaint mantle
ivory sleet
#

Oh yeah wrap that with ()

quaint mantle
#

wat

ivory sleet
#

(Map<K,V>) map.get(....)

quaint mantle
#

confused

#

Oh

granite stirrup
#

Isn't there a tomap method

quaint mantle
ivory sleet
#

Idk

#

Yeah ignore that also

quaint mantle
#

where

ivory sleet
#

Above the constructor

quaint mantle
#

alr

#
public class Home implements ConfigurationSerializable {
    public final String name;
    public final Location location;
    static {
        ConfigurationSerialization.registerClass(Home.class);
    }
    public Home(String name, Location loc) {
        this.name = name;
        this.location = loc;
    }

    public static Home deserialize(Map<String,Object> map) {
        String name = (String) map.get("name");
        Location location = Location.deserialize((Map<String,Object>) map.get("location"));
        return new Home(name,location);
    }

    @Override
    public @NotNull Map<String, Object> serialize() {
        Map<String,Object> map = new HashMap<>();
        map.put("name",name);
        map.put("location",location.serialize());
        return map;
    }
#

this?

ivory sleet
#

Uh sure

quaint mantle
#

and now

#

?

ivory sleet
#

Try again, remove all existing homes

granite stirrup
#

I see this

quaint mantle
#

getting error with /sethome tho

ivory sleet
#

Yeah idkidk but that’s slightly slower than what we did above and Idk if this guy is ready for higher order functions

granite stirrup
#

It's cuz your iterating over null

quaint mantle
#

this line

ivory sleet
#

homes is null then

quaint mantle
#

if(gp.homes != null) {

        }
#

??

#

put it in that?

granite stirrup
ivory sleet
#

¯_(ツ)_/¯

ivory sleet
#

Pjoens might wanna restart the server and try everything again

quaint mantle
#

nope still this

#

alr i stopped server deleted config

#

then started it

#

same error :/

ivory sleet
#

Yeah well send the relevant code

quaint mantle
#
String name;
            if(args.length == 0) {
                name = "Home";
            } else {
                name = args[0];
            }

            if(gp.homes != null) {
                for (Home home : gp.homes) {
                    if (home.name.equalsIgnoreCase(name)) {
                        p.sendMessage(C.C("&cA home with that name already exists!"));
                        return true;
                    }
                }
            }

            Home newHome = new Home(name, p.getLocation());
            gp.homes.add(newHome);
            p.sendMessage(C.C("&aSet a new home called: '&e" + name + "&a'"));

            return false;
#

entire command

#

gp.homes.add(newHome)

#

is line 41

granite stirrup
#

Where do you set gp.homes

ivory sleet
#

Send entire stacktrace also

quaint mantle
quaint mantle
#
 public HashSet<Home> homes = new HashSet<>();
granite stirrup
#

Hmm do you set it any where else

quaint mantle
#

no?

#

well yes

granite stirrup
#

Yeah you do

quaint mantle
#
public static void LoadGP(GP gp) {
        String a = "players." + gp.getPlayer().getUniqueId() + ".";

        gp.homes = (HashSet<Home>) pl.get(a+"homes");
    }
ivory sleet
#

That’s where it’s null then

#

Cause you can cast null to any type blindly

opal juniper
#

How to add the spigot 1.9 api to maven?

#

Some stupid ass library needs it

ivory sleet
#

1.9.4 is the version you want probably

opal juniper
#
<dependency>
    <groupId>org.bukkit</groupId>
    <artifactId>craftbukkit</artifactId>
    <version>1.9.2-R0.1-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>
#

i managed to get the spigot-api to work

#

but now it wants the craftbukkit

ivory sleet
#

O idk how you’d do that then

#

Stupid dependency

#

Might wanna exclude its trasivity

quaint mantle
ivory sleet
#

And then override with a spigot one

opal juniper
#

the thing is it depends on shit like:
import net.minecraft.server.v1_9_R1.IChatBaseComponent;

#

i guess i could delete them 🤔

ivory sleet
#

Pjoens of the player has no homes then that pl.get() returns null

#

Well

#

You’d run bt then?

opal juniper
#

yeah i ran 1.9 bt

quaint mantle
#

no but the error is when i SET a home

opal juniper
#

didn't seem to add shit to m2 tho

quaint mantle
ivory sleet
#

Yes pjoens exactly

#

It isn’t fail-fast

ivory sleet
#

But the issue is when the player joins

opal juniper
#

i am just deleting classes at this point

ivory sleet
#

Then it sets the home.gp variable to null

quaint mantle
#

Well idk how to fix it tho

#

cute dog btw just noticed

ivory sleet
#

do smtng like
home.gp.clear();
HashSet<Home> homes = pl.get(...);
if (homes != null) {
home.gp.addAll(homes);
}

#

Ye ty

ivory sleet
opal juniper
#

what

#

it works

#

i dont need them

ivory sleet
#

Alrighty

#

Not gonna complain then

#

But this gets me curious, what are ya doing

opal juniper
#

pathfinding

ivory sleet
#

Oh

#

Ew

opal juniper
#

but the only lib i could find was this shit one from like 2018

ivory sleet
#

Hmm I mean shouldn’t mappings help enough?

opal juniper
#

installing all the depends to m2 manually 😎

#

meh idk

ivory sleet
#

😌

opal juniper
#

it uses the A* algo

ivory sleet
#

Ah nice

opal juniper
#

was gonna have to write it myself so am trying it first

ivory sleet
#

Alrighty

opal juniper
#

conclureeee

#

can you turn a vec3d to a location

#

Vector3D*

ivory sleet
#

Yeah

#

Well you’d have to provide a world also

#

And yaw and pitch

opal juniper
#

is there a constructor?

ivory sleet
#

Believe not, going from Loc to V3d works not the other way around

#

Since Loc has more data than v3d

opal juniper
#

ok

eternal oxide
#

Bukkit Vector has a toLocation method

ivory sleet
#

Assuming it takes a world then?

eternal oxide
#

one takes a world, other takes world, pitch and yaw

ivory sleet
#

Yea then it’s an impure conversion

opal juniper
#

shit

#

java.lang.NoSuchMethodError: 'int org.bukkit.block.Block.getTypeId()'

#

too old i guess

ivory sleet
opal juniper
#

welp - thats an hour gone

ivory sleet
#

Sounds like me frankly lol

opal juniper
#

the one time a method gets removed is the time that i need it

ivory sleet
#

🥲

opal juniper
#

ElgarL's pathfinder did work, but it didn't really work around corners

#

was trying to find an A* implementation

granite stirrup
opal juniper
#

pitch & yaw

granite stirrup
#

Pretty sure you don't need it?

#

Doesn't it have like a default

opal juniper
#

u dont need it but it defaults to 0,0

#

yeha it does

ivory sleet
ivory sleet
#

?

stone sinew
#

Why was PacketPlayeOutTitle removed in 1.17?

chrome beacon
#

You sure it was?

granite stirrup
lusty cipher
#

yeah true

#

"unless it gets DMCA'd"... yeah lol

tribal holly
#

How to set a !permission.perm to a player ?

#

to set a negation did i need to unset a permission or set false a perm ?

stone sinew
grim ice
#

                while(e.getRightClicked().getPersistentDataContainer().get(key, PersistentDataType.STRING).equals("handcuffed")){
                    Location currentLocation = e.getPlayer().getLocation();
                    Vector Direction = e.getPlayer().getLocation().getDirection();
                    Direction.multiply(1);
                    Location target = currentLocation.add(Direction);
                    e.getRightClicked().teleport(target);
                }```
#

do you guys think

#

this is a good way of doing it

#

i want the player to continuously get teleported 1 block ahead of a player

manic bison
#

2Hex this is perfect my guy

#

i made handcuffs yoo yesterday

summer scroll
lusty cipher
#

yeah direction.multiply(1) is like doing 5 * 1, 150 * 1, 80 * 1 (for each of the coords) and does nothing lol

#

also agleer, that would be the Y coordinate, teleporting them up one

summer scroll
#

Isn't that 2Hex wants?

lusty cipher
#

they say "1 block ahead"

#

I don't think so

#

I would say they want add(1, 0, 0) and add(0, 0, 1) or add(-1, 0, 0 and add(0, 0, 1) depending on the direction.

tacit drift
#

what is the issue lol

#

SmartInvs is the api that i use for guis

lusty cipher
#

I assume this entry does not exist

#

and is therefore null

abstract sleet
#

tip- you can specify defaults when you are accessing the config for values
e.g. config.getString("path", "This text will be used if the path does not exist in the config.")

grim ice
tacit drift
summer scroll
#

ah my bad

tacit drift
#

yeah forgot to copy the path

grim ice
#

I thought about using XYZ but

tacit drift
#

assumed that it was the right path

#

:))

grim ice
#

it would change depending on the direction so i just multiplied

lusty cipher
#

well yes but whats 150 * 1

#

its still 150

#

so it doesnt do anything

grim ice
#

oh

lusty cipher
#

multiply isnt gonna get you far

grim ice
#

then

#

do u want me to check what direction the player is looking at or wat

lusty cipher
#

yeah

grim ice
#

bruh

#

there must be an other way

dire marsh
grim ice
#

i can just .add

lusty cipher
#

yes, but that would still have to be based on where the player is looking

#

if the player is going south

#

and you do add(1, 0, 0)

grim ice
#

no

lusty cipher
#

theyll go in the exact opposite direction

grim ice
#

                while(e.getRightClicked().getPersistentDataContainer().get(key, PersistentDataType.STRING).equals("handcuffed")){
                    Location currentLocation = e.getPlayer().getLocation();
                    Vector Direction = e.getPlayer().getLocation().getDirection();
                    Direction.add(1);
                    Location target = currentLocation.add(Direction);
                    e.getRightClicked().teleport(target);
                }```
#

so

#

is that what u mean

lusty cipher
#

no

#

you can try it out

#

its gonna move the other handcuffed player

#

but if you see what happens you might understand easier what I mean?

grim ice
#

Nevermind

#

add won't work anyways

#

ok i think

#

Location currentLocation = e.getPlayer().getLocation();
Vector Direction = e.getPlayer().getLocation().getDirection();
Location target = currentLocation.add(Direction);
e.getRightClicked().teleport(target);

#

will do it

torn shuttle
#

tfw you spend a while rewriting a system only to realize as you're finalizing it that it fundamentally will not work

#

man and I had such a clean implementation too

fair osprey
#

how 2 I set up VScode for spigot

#

plz help

#

i have maven and jdk set up

opal juniper
#

Most people don’t use vscode for java

chrome beacon
#

Just open a folder as a maven project

#

Not much difference from normal IDE

opal juniper
#

Eclipse/ IntelliJ are more commonly used

chrome beacon
#

^^

fair osprey
#

Dont think my laptop can run more than a text editor

lusty cipher
#

vscode is a bit more than a text editor lol

#

but if you want to stick to it, theres a "Java Extension pack" which helps a little

#

Still, IDEA or Eclipse are muuuuuuuuch better

fair osprey
torn shuttle
#

man I am not happy that my cool new implementation won't work

manic bison
#

hey
is there a way for a condition to recognize a taskid in another condition, like in this code ?

            if(clicked.hasPotionEffect(PotionEffectType.SLOW) && clicked.hasPotionEffect(PotionEffectType.BLINDNESS)) {
                System.out.println("if");
                player.sendMessage("demenoté");
                player.getActivePotionEffects().clear();
                Bukkit.getScheduler().cancelTask(taskid); //here problem
                
            }
        else {
            System.out.println("else");
            player.sendMessage("§6§l[GCA] §f§aVous avez menotté " + clicked.getName());
            clicked.sendMessage("§6§l[GCA] §f§cVous avez été menotté par " + player.getName());
            clicked.addPotionEffect(slowness);
            clicked.addPotionEffect(blindness);
            int taskid = Bukkit.getScheduler().scheduleSyncRepeatingTask(Bukkit.getServer().getPluginManager().getPlugin("GCAPlugin"), new Runnable() {
                @Override
                public void run() {
                    Location player = new Location(e.getPlayer().getWorld(), e.getPlayer().getLocation().getX(), e.getPlayer().getLocation().getY(), e.getPlayer().getLocation().getZ(), e.getPlayer().getLocation().getYaw(), e.getPlayer().getLocation().getPitch());
                    clicked.teleport(player);
                }
            }, 0 * 20, 1 * 20);
            Bukkit.getScheduler().runTaskLater(Bukkit.getServer().getPluginManager().getPlugin("GCAPlugin"), new Runnable() {
                
                
                @Override
                public void run() {
                    Bukkit.getScheduler().cancelTask(taskid);
                }
            }, 20 * 30);
        }```
grim ice
#

?paste

undone axleBOT
grim ice
#

why

lusty cipher
#

it tells you @grim ice

manic bison
#

on use.java line 53

grim ice
#

i mean its an npe

manic bison
#

can yousend code

grim ice
#

ill check it 1s

lusty cipher
#

Simple stuff, NPE means theres null somewhere where there shouldnt

manic bison
#

you have to do like if(player == null){
return;
}

#

or if your item is null

grim ice
#

WAT CHECK THIS OUT

#

there are 2 errors

manic bison
#

line 84

lusty cipher
#

It still tells you what your issue is.

grim ice
#

1s

manic bison
#

onUse.java line 53 and 84 are errors

quaint mantle
#

learn java

lusty cipher
#

Track that line down and make sure youre not calling on null values

grim ice
#

if(!e.getRightClicked().getPersistentDataContainer().get(key, PersistentDataType.STRING).equals("handcuffed")) {

#

thats line 53

quaint mantle
#

get is nullable

#

it may return null

manic bison
#

do

quaint mantle
#

which will result in a NPE in the subsequent equals call

manic bison
#

at the beginning

#

write e.getRightClicked() =! null &&

lusty cipher
lusty cipher
#

If it's per-player just add a HashMap<UUID, int> or sth and save the taskid using that and use that id to then cancel it

#

Easy

grim ice
#

Operator '!' cannot be applied to 'null'

quaint mantle
#

i reiterate

#

learn java

lusty cipher
#

learn java

manic bison
#

if its NOT null

grim ice
#

ik

#

that

lusty cipher
#

also it'd be !=

#

not =!

manic bison
#

oh yea

#

sry

grim ice
#

yes i know

#

bruh

lusty cipher
#

just making sure

quaint mantle
#

clearly you don't

#

Quick question, when compiling a plugin, what's the difference between the jar and the master jar?

manic bison
#

if(e.getRightClicked != null && !e.getRightClicked().getPersistentDataContainer().get(key, PersistentDataType.STRING).equals("handcuffed")) {

quaint mantle
#

get is nullable

#

it may return null

#

which will result in a NPE in the subsequent equals call

manic bison
#

i had the same error

lusty cipher
#

borats answer is better

manic bison
#

only, it was with my item

grim ice
#

itll always return true

#

so it wont matter

lusty cipher
#

yeah because getRightClicked() is probably annotated @NotNull

#

do what borat says

torn shuttle
#

how do you safely remove a bossbar? does #removeAll() make it so it can be caught and deleted by the java trash compactor?

quaint mantle
#

what does happen when you call getPdc on an air itemstack