#help-development

1 messages · Page 772 of 1

upper hazel
#

pluginName

inner mulch
smoky anchor
#

My guess would be me.galtap.customblockdata

upper hazel
#

hm

smoky anchor
#

but again, not the problem
what jar are you using ?

#

it should generate like 3

upper hazel
#

i use 1.20.1

smoky anchor
#

that doesn't tell me anything

upper hazel
#

bukkit api

smoky anchor
#

I'm asking about the jar, not version

upper hazel
#

oh

smoky anchor
#

your plugin jar

upper hazel
#

java version?

upper hazel
#

not found class

peak depot
#

how can I have one main Team and of that I want to create copys of the team and set custom suffix for each player thats my code for the teams in general: https://paste.md-5.net/gofiqerogu.cpp

smoky anchor
#

when you run the maven build or whatever it creates these jars
which one do you use

upper hazel
#

i dont know what the path need

#

what the

#

i not find this

#

steves-fanny-liblary??

smoky anchor
#

that is my plugins id
yours would be different

upper hazel
smoky anchor
#

How did you get to Task Manager

upper hazel
#

write task Manager in search engine

opal carbon
#

they are asking why tf

grim hound
slender elbow
#

man what is going on lmao

deft thistle
#

Press control shift and esc at same time

river oracle
opal carbon
#

steve wanta to know why tf ur in task manager

smoky anchor
#

Guys, I do really bad with language barriers

upper hazel
#

what next

echo basalt
#

@ivory sleet is this accurate

opal carbon
#

not how to get there

opal carbon
smoky anchor
#

What plugin jar do you put into your plugins folder ?
You might be using the wrong one.
@upper hazel

upper hazel
#

BarrelMarket

smoky anchor
#

What is the full file name

upper hazel
#

me.galtap.barrelmarket.BarrelMarket

#

or not this

smoky anchor
#

That is not the name of the file

upper hazel
#

just BarrelMarket.jar

ivory sleet
slender elbow
#

thank you conclube

icy beacon
#

Gg

#

Now Illusion also deserves a role of Discord Helper

ivory sleet
icy beacon
#

When to expect that?

echo basalt
#

I'd probably be biased and remove magma's messages from my search index lmao

ivory sleet
#

Illusion, just… can variables be synchronized!?

echo basalt
#

p sure static variables can

icy beacon
#

Svelte reference

echo basalt
#

actually no

#

static methods can

#

variables can't

icy beacon
#

Still svelte reference

echo basalt
#

but there's volatile which ensures that cpu caches n stuff are synched between threads

#

innit

slender elbow
#

except for doubles and longs, field assignment is atomic

icy beacon
#

Why doubles and longs though?

#

What about other primitives

slender elbow
#

because it may happen in two 32-bit steps

icy beacon
#

Ahh

echo basalt
upper hazel
#

oh wait i now see i need shodow plugin

slender elbow
#

it's not guaranteed it'll be atomic, but it's also not guaranteed it won't be

#

but "jvm implementations are highly encouraged to make it atomic"

unreal maple
#

GSON - Expected BEGIN_OBJECT but was STRING

slender elbow
#

at the expense of boxing ofc

#

or just stick an atomicfieldupdater/varhandle in there and it'll do the job pretty well done

echo basalt
#

I have more to do with my life than learn about jvm internals thank you very much

dry hazel
#

very true

glad prawn
slender elbow
#

but then i got the itch

#

i get this itch, it's awful, i need to test all the time, keep testing

echo basalt
#

maybe you just need friends

slender elbow
#

i see you haven't played portal 2 D:

inner mulch
echo basalt
#

like 5 years ago

eternal night
young knoll
#

oof

eternal night
#

oh shit

eternal night
#

congrats collin

slender elbow
#

you're lucky i can't send images in here

inner mulch
echo basalt
#

you're too scared to verify

slender elbow
#

i hate my nickname on spigotmc

echo basalt
#

pay 10 dolla

slender elbow
#

can't

eternal night
echo basalt
#

broke

slender elbow
#

gov restrictions for international payments yada yada

inner mulch
#

@echo basalt how do i fix a socket leak

young knoll
#

What if you have MD fly to you and pay him directly

icy beacon
dry hazel
#

being unverified is cooler anyways

young knoll
#

You guys can change names still

slender elbow
#

i was about to say something very racist

young knoll
#

Can't ya

icy beacon
slender elbow
#

lmao no

young knoll
#

👀

icy beacon
#

This server is NOT family friendly

icy beacon
umbral ridge
#

How would I synchronize real life time with ingame world time?

young knoll
#

Not too hard, just gotta do some math to convert the time

umbral ridge
#

😢

echo basalt
#

first you need the player's timezone

#

then you just do uhh

young knoll
#

Well

echo basalt
#

rule of third

#

basically just make a ratio

eternal oxide
#

and resync now and then due to lag

young knoll
#

I was asuming you wanted to do it to a single timezone

icy beacon
echo basalt
#

no

#

math

icy beacon
#

Photography reference.

young knoll
#

Do you want just one timezone or do you want it per player

echo basalt
#

here it translates to "rule of 3 simple"

inner mulch
echo basalt
#

it's like

umbral ridge
#

I cant use the players timezone. Has to be the servers timezone and time since each player can join from different areas of the world

echo basalt
#

x - y
z - ?

? = z * y / x

young knoll
#

Alright

orchid gazelle
umbral ridge
#

what is z x and y

orchid gazelle
#

If you give me like 40 mins I can give you the whole code for it lmao, I wrote it once

echo basalt
#

literally any number

young knoll
#

You can get local time various ways

echo basalt
#

it's like

#

2 ratios

umbral ridge
#

No its ok Ill write it myself

orchid gazelle
#

Ok

umbral ridge
#

I like a challenge xD

echo basalt
#

let's say you have a 2:1 ratio

young knoll
#

LocalTime.now() seems good

#

:p

echo basalt
#

you can do like

#

2 - 1
100 - ?

? = 100 * 1 / 2 = 50

young knoll
#

One thing that might catch you, minecraft time is from 0 to 24000

echo basalt
#

and this works for anything

young knoll
#

But 0 isn't midnight, it's sunrise

#

Midnight is 18000

umbral ridge
#

So.. I use milliseconds as a time unit I guess

#

or seconds

#

do some conversion

icy beacon
#

Seconds should be the closest

echo basalt
#

you can use seconds and do the rule of 3 to convert it

#

add an 18000 offset

#

and mod by 24000

orchid gazelle
#

Yes exactly

umbral ridge
#

Alright thansk

young knoll
#

LocalTime has getSecond :p

slender elbow
#

LocalTime 🙏

icy beacon
#

Waiting for when Java API adds LocalTime.toMinecraftTime()

echo basalt
umbral ridge
echo basalt
#

lmao I have a MinecraftTime class at work

#

for scripting stuff

icy beacon
#

share

upper hazel
#

this my path - me.galtap.barrelmarket.CustomBlockData - but server not can find java.lang.NoClassDefFoundError: com/jeff_media/customblockdata/CustomBlockData - naven -> https://paste.md-5.net/atipavuwos.xml

echo basalt
#

lets me script stuff like wait 30 ticks

upper hazel
#

oh wait

echo basalt
#

something something

#

relocation

young knoll
#

Does it just schedule a task :p

echo basalt
#

maybe

#

I just have a Time class for my other projects with a basic parser

#

lets me do stuff like

#

TimeParser.parse("2 minutes 5 seconds").toTicks()

orchid gazelle
#

My life is an Illusion

young knoll
#

I should get something like that for my api

#

Maybe I should dedicate a day to working on my api

icy beacon
#

I currently have no use for it but it looks sick so I want it

inner mulch
icy beacon
young knoll
#

Nice

echo basalt
#

yes I could implement checks so that idiots don't put 1 second 1 second and end up with 2 seconds

#

but do I care

young knoll
#

I mean

#

Technically valid even if it's dumb

icy beacon
spare hazel
#

what item can i use for discord that is not a player head

icy beacon
#

Purple concrete ig

#

Why not a player head though

young knoll
#

Yeah the discord icon head looks pretty good

spare hazel
icy beacon
spare hazel
#

alr imma make a PlayerHeadCustomItem

icy beacon
#

Can't that be abstracted???

#

What is even

#

Ok I'm not questioning it

spare hazel
icy beacon
#

I'll keeop coding

spare hazel
#

public abstract class CustomItem {}
public abstract class PlayerHeadCustomItem extend CustomItem {}

icy beacon
#

I don't see why you would need to define specific logic for player heads

#

When it's an item like all others

spare hazel
#

would that work

icy beacon
#

I have no idea what your current system is and I don't have enough patience to study the code

#

So I can't say yes or no

#

But I can say that this approach feels scuffed

#

Because PlayerHeadCustomItem implies that it has different logic from other custom items

#

Which is simply not true

#

It has its own meta yes, that's not a problem though

#

Store it like any other meta

spare hazel
glad prawn
#

which class would extend PlayerHeadCustomItem

spare hazel
icy beacon
spare hazel
river oracle
young knoll
#

My custom item classes just wrap an itemstack

#

Then you can have interfaces to add for different stuff

icy beacon
#

please do not

#

do that

#

do not make a class

#

for every type

#

there is literally 0 reason to do so

glad prawn
#

imagine u have like 100 items

icy beacon
#

less code is better code

glad prawn
#

type

young knoll
#

You custom items shouldn't be bound to minecraft types

#

They should be bound to their different functions

echo basalt
#

I have my custom material class

#

that just wraps a custom namespacedkey class

#

and it all goes in a custom registry class

spare hazel
#
public ItemStack build(){
        ItemStack item = new ItemStack(material);
        ItemMeta meta = item.getItemMeta();;
        meta.setDisplayName(name);
        meta.getPersistentDataContainer().set(IranSkyLobby.getPlugin().getItemKey(), PersistentDataType.INTEGER, id);
        meta.setLore(Arrays.stream(lore).toList());
        item.setItemMeta(meta);
        return item;
    }```
its a pretty simple custom items api cuz its only for the lobby
young knoll
#

You could have a generic CustomItem
Then various interfaces like UsableItem, TickingItem, etc

lost matrix
echo basalt
#

and my custom itemstack class with my custom meta class handles all the item stuff which is then adapted with a custom adapter class into a bukkit itemstack

#

smile lurking

echo basalt
young knoll
#

I use my ItemBuilder class a ton

#

Tis nice

spare hazel
icy beacon
lost matrix
icy beacon
#

is using arrays

#

easier than lists

river oracle
spare hazel
river oracle
#

It makes arraylist as fast as arrays

young knoll
#

Does it really matter much

#

We are talking about tiny lists

spare hazel
river oracle
young knoll
#

Fair

young knoll
#

What is the default list size? 10?

river oracle
young knoll
#

Yeah but it has a default size

river oracle
#

I forge t

#

Not on pc so can't check

icy beacon
river oracle
#

I usually manually set it if I have a ballpark estimate

young knoll
#

Yeah it's 10

#

And then it grows by some amount if it gets full

#

Which I think depends on impl

river oracle
icy beacon
river oracle
#

@lost matrix do you know?

spare hazel
#

how can i modify the username of the playerhead

lost matrix
river oracle
#

After it fills

icy beacon
#

I have no idea what this means

young knoll
#

It's 50% in java 8+

#

int newCapacity = oldCapacity + (oldCapacity >> 1);

lost matrix
#

Wait, oldCapacity is right shifted?

spare hazel
lost matrix
#

Ah and added to itself

young knoll
#

Not easily

icy beacon
young knoll
#

You could do some custom display/interaction entity magic

#

Or a bunch of packet fuckery

lost matrix
young knoll
#

Oh wait playerhead item

spare hazel
young knoll
#

Not the name above the player

river oracle
#

No

#

Bukkit has an api

young knoll
#

No, heads just have a displayName like any item

#

ItemMeta#setDisplayName

spare hazel
young knoll
#

wdym the name

#

Like the owning player?

river oracle
#

Set the skin base64 in the PlayerProfile

young knoll
#

^

river oracle
#

You should really be using a new player profile

young knoll
#

Or you can pass an offline player directly

lost matrix
#

Copilot... why u know my ingame name?

river oracle
#

Copilot scaru

lost matrix
# spare hazel does it need NMS?
    URL skinUrl = ...;
    ItemStack head = ...;
    SkullMeta meta = (SkullMeta) head.getItemMeta();
    PlayerProfile profile = Bukkit.createPlayerProfile("Mr Bob");
    PlayerTextures textures = profile.getTextures();
    textures.setSkin(skinUrl);
    profile.setTextures(textures);
    meta.setOwnerProfile(profile);
    head.setItemMeta(meta);
echo basalt
#

why does it know my alts name ClownDistorted

river oracle
#

You guys use copilot?

echo basalt
#

yes

river oracle
#

I quot using it a while back tbh

#

It made me brain dead

echo basalt
#

wacky ass take: copilot should only be used if you know what you're doing

spare hazel
#

'setOwner(java.lang.String)' is deprecated
should i care? theres no way to create a new OfflinePlayer

lost matrix
#

I had it off for a while bc it kind of suggested a bunch of mumbo jumbo to me

lost matrix
echo basalt
#

oh yeah it turns to garbage if you invalidate your caches

echo basalt
#

and sometimes you gotta really insist

#

but it's still helpful

#

except when I want it to be helpful

echo basalt
#

it has days where it's great at making garbage but struggles to read a byte[] from a file

young knoll
#

Real important question

#

How do you order your classes

echo basalt
#

packages

young knoll
#

as in, public methods, private methods, getters/setters, static methods

echo basalt
#

well

#

stardards bruv

spare hazel
young knoll
#

Rip

#

No player profile api on 1.16, have fun with NMS

echo basalt
#

static fields
fields
constructor
most used / important methods up top
garbage / filler methods at bottom

young knoll
#

Yeah that's logical

lost matrix
#
// static fields
// static methods
// space
// class fields
// constructor
// methods

// public
// protected
// private
echo basalt
#

oh yeah I leave a line in between like every other line

young knoll
#

Interesting

#

Static methods at the top

spare hazel
#

is there a head database API that i can compile into my plugin?

lost matrix
#

I really like to separate static from the rest

#

But its more conventional to put them somewhere down

young knoll
#

mmm

spare hazel
#

nevermind imma just use blue concrete

lost matrix
#

Good think IJ has formatting rules for that 🙂

young knoll
#

fancy

lost matrix
#

The only thing im not sure about are the order of those two:

worldly ingot
#

init blocks above the constructors, always

#
static { }

{ }

Constructor() { }```
#

They're unnamed constructors

lost matrix
#

Hm? They get executed on class loading...

#

static init blocks *

#

If i see you write non-static init blocks then you get a slow headshake in disbelief from me

#

And the static ones are insanely dangerous bc they can create horrible classloader exceptions that are hard to debug

slender elbow
#

i mean sometimes you don't really have a choice, but they defo should be kept minimal

#

my favourite thing about init blocks is that you can have multiple of them lol

#

it's horrible

lost matrix
#

Oh yeah. That sounds nice 🙂

sterile token
#

Also welcome yo the stuff, really nice to see You un the stuff with Coll

rotund ravine
#

It’s great

icy beacon
#

Copilot is great for making mundane, routine tasks quick

rotund ravine
#

Ye

icy beacon
#

I don't really use it for coming up with code but holy hell it's saved me tens of hours just repeating code

rotund ravine
#

It does great at some tasks

spare hazel
#

how can i change project java version in IJ using maven

meager wolf
#

im trying to stop players from dropping an item from their inventory, they can move it but not drop it and this is what i made so far :

@EventHandler
    public static void onDropItem(PlayerDropItemEvent event){

        if(!hasCustomTag(event.getItemDrop().getItemStack())){return;}

        event.getPlayer().sendMessage("§cYou are not allowed to drop your §4§lRelic§r§c.");
        event.setCancelled(true);
        
    }

and it has a few problems:
1- if i open inventory and then click Q on items, they disappear but i get the "u are not allowed ..".
2- if i drag the item and right click outside of the inventory it gives me the item x2 (dup)

it only works well if i throw items from hotbar without opening the inventory

rotund ravine
#

Theres a few more eventd

#

Events*

#

Also what gamemode are you in

meager wolf
#

survival

meager wolf
#

i think

#

let me make sure

robust helm
tough mica
#

Hello, i want to code a gun plugin. Now I want to do this animation when player shoot like in this video? how is this possible? I mean that the gun in the itemHand gets down and then up:
https://streamable.com/c596in

rough drift
#

Does the TabCompleteEvent contain the command the player is tab completing?

smoky anchor
tough mica
#

okay, then i have to change my texturepack too?

rotund ravine
#

what

tough mica
#

?????

#

i just have to set a random nbt tag?

#

and then i will get this animation?

rotund ravine
#

That’s indeed what he suggested

smoky anchor
#

yep, just have some random boolean in
it should cause it

glacial narwhal
#

How can i spawn a platform in glass at world generation ?

rotund ravine
#

?blockpopulator

#

Oh wait just once

#

Look at world events or whatever is used for creating the worlds

tough mica
#

IT WORKS!

#

thank you very much

upper hazel
#

when i try use lib i have expetion notClassFound https://www.spigotmc.org/threads/custom-block-data-persistentdatacontainer-for-blocks.512422/ i was think bc i was do mistake when try paste path in configuration but my path written correctly

smoky anchor
#

How do you build your jar ?

upper hazel
#

wdym

wind veldt
#

Depending on the IDE, you probably can just run the code lol

#

It's gonna compile, at least on IJ

icy beacon
#

For gradle i think you just run gradle build

#

But I'm not experienced with it so I might be wrong

smoky anchor
wind veldt
#

I literally use maven in IJ and works fine

#

lmao

smoky anchor
#

yes, but you have to setup the run profile thingie

icy beacon
#

Just run the command

wind veldt
#

what

#

whats the setup thingie

icy beacon
#

You've built your plugin at least once

#

Why are you asking

smoky anchor
#

I am not asking

upper hazel
icy beacon
#

Ohh my bad

smoky anchor
#

I am asking the guy how he builts the jar

icy beacon
#

I thought you were asking for help lmao

rotund ravine
icy beacon
rotund ravine
#

Well if ur shading

#

You would need to add some extra options for build to shade

icy beacon
#

Ah, gotcha

rotund ravine
#

Otherwise the task would be shadowJar

upper hazel
#

so i need shadow?

wind veldt
rotund ravine
#

But it’s a way to include the libraries that you use within your jar

wind veldt
#

oh, alright

eager smelt
#

How is the Vault API used?

peak depot
#

wait wrong link

smoky oak
#

can i spawn a beacon beam as indicator or is that bound to the beacon block
nvmind its client side

peak depot
smoky oak
#

is it smart to make runnables used in exactly 1 class as static inner classes?

#

actually why does IJ suggest making inner classes static anyway if my code instantiates em?

hazy parrot
#

in that case, it can be static

smoky oak
#

'enclosing class members'?

#

oh that

#

like the Outer.Inner thing

hazy parrot
#

fields from class that is not nested xd

smoky oak
#

i mean, static fields for dynamic stuff sounds like a good way to screw stuff up

river oracle
#

Generally you shouldn't ever really come across inner classes that are non static

smoky oak
#

wait

#

afaik only inner classes can be static classes in the first place

#

ah the edit

river oracle
#

A non inner static class would signal a tight coupling with some non static field from the parent class

#

Which imho is just an anti pattern

smoky oak
#

are you implying that inner classes get instantiated with the outer one?

river oracle
smoky oak
#

hm

hazy parrot
#
public class Foo {
  private final int a;
  private final int b;

  class Bar {
    if (a == 2 ) {
        // you can access "a" here
    }
  }

  static class Bar2 {
    if (a == 2) { /*compile time error, "a" can't be accessed*/}
  }
}
river oracle
#

I'd give an example but I'm on my phone

hazy parrot
#

tldr to make instance of Bar you need instance of Foo

smoky oak
#

it can err

#

:kekw:

hazy parrot
#

there probably would be some comments if its not reliable lol

smoky oak
#

currently im just passing the required data on instantiation of the inner class in the constructor

hazy parrot
#

why not just use COUNT(*) for that ?

river oracle
smoky oak
#

why?

#

like im genuinely curious

smoky oak
#

i just thought its to make code cleaner

river oracle
#

Because then you'd have no need got a constructor you can simply just use ghe fields

smoky oak
#

ah

#

the outer class is a class called by an event handler

river oracle
#

Ig I'd have to see the code

#

?paste

undone axleBOT
smoky oak
#

the stacks basically this

Event
-> effectively static eventHandler method
   -> BukkitRunnable instance (of inner class of eventHandler class) for timed effect
river oracle
#

Yeah lemme see

smoky oak
#

the rest is just world scan stuff

#

actually those ints can probs be static

river oracle
#

Seems overcomplicated why can't this be done with a lambda and a util method

smoky oak
#

because with a lambda and util method it'll become one congested line of code and more importantly you cant debug lambdas

#

my priorities here are

  1. can be tested
  2. can be read
  3. everything else
river oracle
smoky oak
#

yea thats true but im not talking about that

slender elbow
smoky oak
#

im talking about that bug icon where you can go through ur code as it runs

#

which isnt available for lambdas

#

bc they get created at run time

#

like

river oracle
#

Debuggers people use those?

smoky oak
#

yea i do

#

helps out a lot too

river oracle
#

Wtf that's wild

smoky oak
#

half of this is math

#

so if i just get a black circle i ned to know when it fails

#

not just 'this block of 100 lines math failed'

river oracle
#

And sysouts

smoky oak
#

did that for a while, then i tried to get it to chat, then i gave up cuz that also took forever

river oracle
#

Otherwise yeah that should work though you can make ot non static

smoky oak
#

like is there an effective difference?

#

web says something about static nested classes not taking up memory

river oracle
#

Not really just is more logical considering your using it for botbing else

#

I'm sure theor are weird jvm quirks as always but I'm sure it's no big deal either way

#

Usually we're talking bytes of memory with those optimizations

smoky oak
#

eh tbf theres only going to be one instance of any of those at a time

hazy parrot
#

yeah List/Set definetly isn't a thing

smoky oak
#

it absolutely is a thing

#

its called serialization

#

u can just store it as blob

hazy parrot
#

nah i was just joking

#

because imo there is no need to return array here

smoky oak
#

btw

#

i have 2 runnables, 1st calls 2nd, 2nd needs a value from the code calling the 1st. should i pass it to the 1st runnable or do it some other way?

slender elbow
smoky oak
#

didnt work for me when i tried it

#

🤷

slender elbow
#

¯_(ツ)_/¯

smoky oak
#

like the code ran for sure

slender elbow
#

half my current project is lambdas and I can confirm that the debugger works

#

actually I wonder how many indys there are on this project

slate tinsel
#

Hello! How can I cancel so that a hen does not spawn from a certain egg?

#

Which event are you thinking of? So when a player throws a special egg, this egg should not be able to spawn chickens

scenic onyx
#

how i can add tnt in head like tnt tag

trim lake
#

How to make CraftItemEvent work with shift click? If I set current item, it will set only first item crafted. Ex. If I craft 4 pieces of shoes, the item I set will be crafted only once (first item)

storm crystal
#

I just want to make sure, is this how I pass an instance made in main class to another class?

#

so that I'd be using the same instance in two classes

candid galleon
#

yep

storm crystal
#

okay thats good

#

managed to figure it out without any external help

inner mulch
ivory sleet
#

What operations r u doing

smoky oak
#

Collection<Entity> nearby = center.getWorld().getNearbyEntities(center.clone().add(0,radius,0),radius*2,radius,radius*2);
there a simpler way of doing this?

#

(values subject to change)

ivory sleet
#

Because I’m a bit lazy and busy rn ill just point you to the NQ model

smoky oak
#

oh ffs

#

im using list

storm crystal
#

how can I store ItemStack type in config?

smoky oak
#

ItemStack::getType and Material.getMaterial iirc

storm crystal
#

as in Material.getMaterial(AIR) for instance?

river oracle
#

and add it to your config

storm crystal
#

Not really sure how to do it

river oracle
#

you got an itemstack ye

ItemStack blahblah = whatever;
Map<String, Object> configShit = blahblah.serizlize();
FileConfiguration myFunnyLittleConfig = stuff;
myFunnyLittleConfig.set("item", configShit);

conversely

ItemStack.deserialize(myFunnyLittleConfig.get("item");
smoky oak
#

hm. I want to apply a potion effect as if were the lingering potion on the ground (specifically instant damage) for faking a 3d effect cloud. Does anyone know the timing and damage value of lingering instant damage?
or if not where to find them? Googling only gives wiki entries which arent that useful

storm crystal
river oracle
#

also don't' prefix the materials with Material. in a config that's just terrible ux

#

your users will hate you

storm crystal
#

users of what

river oracle
#

the plugin

lost matrix
#

This looks like it has a few extra steps (just came here)

ItemStack item = ...;
FileConfiguration config = ...;
config.set("some.path", item);
// Later
ItemStack deserialized = config.getItemStack("some.path");
smoky oak
#

bold of you to assume i have users

storm crystal
#

yeah im not going to post any of my plugins public

#

nor my server will ever be public

remote swallow
#

still better to design it incase you werent using it

river oracle
#

you should always design with UX in mind

storm crystal
#

ux?

river oracle
#

User Experience

storm crystal
#

so I make it like that?

river oracle
#

oh my god

#

that is evne worse

#

do you hate yourself?

#
krystalowa:
  type: chest

what is wrong with this ^

#

why can't you just do that?

lost matrix
storm crystal
#

so why would it be ItemStack item = chest;?

river oracle
#

you can't load objects like that from a string

#

you need to first serialize then deserialize the configuration entry to do that for you

#

its not as striaght forward as writing the code in your config

river oracle
lost matrix
storm crystal
#

so I just do ItemStack chest = new ItemStack(Material.CHEST) and then use chest in config?

lost matrix
storm crystal
lost matrix
river oracle
lost matrix
#

And then i end up with meta information like that

river oracle
glacial narwhal
#

So, i restarted my server with my plugin and the plugin isn't on the server anymore, can anybody help ?

lost matrix
river oracle
#

must be another plugin trying to eliminate the competition. fr though ^

glacial narwhal
river oracle
#

I think you have an error on startup

#

I'd put 2 cents on it

lost matrix
river oracle
storm crystal
#

would it be good enough?

river oracle
lost matrix
storm crystal
#

why

river oracle
storm crystal
#

isnt switch case literally made to not make redundant stuff

river oracle
#

no not at all

warm mica
lost matrix
# storm crystal would it be good enough?

You can shorten this code and make it scalable

String typeName = lootboxConfig.getCustomConfig()... etc;
Material type = Material.matchMaterial(typeName);
ItemStack item = new ItemStack(type);

Now you support every item type there has ever been and will ever be.

river oracle
#

make sure to throw helpful errors if the type is null

lost matrix
slate tinsel
#

Hello! How can I cancel so that a chicken does not spawn from a certain egg? So when a player throws a special egg, this egg should not be able to spawn chickens

glacial narwhal
# lost matrix Then you have an exception on startup. Send the error pls.
[19:33:24 ERROR]: Error occurred while enabling uhc-ffa v1.0-SNAPSHOT (Is it up to date?)
java.lang.IllegalArgumentException: The embedded resource 'config.yml' cannot be found in plugins\uhc-ffa-1.0-SNAPSHOT_RunServer_plugin.jar
    at org.bukkit.plugin.java.JavaPlugin.saveResource(JavaPlugin.java:252) ~[patched_1.8.8.jar:git-PaperSpigot-445]
    at org.bukkit.plugin.java.JavaPlugin.saveDefaultConfig(JavaPlugin.java:239) ~[patched_1.8.8.jar:git-PaperSpigot-445]
    at be.artex.uhcffa.Main.onEnable(Main.java:24) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[patched_1.8.8.jar:git-PaperSpigot-445]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [patched_1.8.8.jar:git-PaperSpigot-445]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.8.8.jar:git-PaperSpigot-445]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [patched_1.8.8.jar:git-PaperSpigot-445]
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.8.8.jar:git-PaperSpigot-445]
    at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:203) [patched_1.8.8.jar:git-PaperSpigot-445]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [patched_1.8.8.jar:git-PaperSpigot-445]
    at java.lang.Thread.run(Thread.java:750) [?:1.8.0_382]
lost matrix
slate tinsel
storm crystal
#

I literally checked if its null

#

and it still says that it can throw exception

warm mica
river oracle
#

you should probably put that in a string variable

#

though

glacial narwhal
warm mica
storm crystal
river oracle
#

thats called you use it twice don't write the entire thing out twice otherwise its an eyesore. You have so much memory to use don't save it for something so dumb

lost matrix
warm mica
glacial narwhal
lost matrix
warm mica
storm crystal
#

oh yeah any idea why this happens?

river oracle
#

that's only there if another plugin has a command lootbox so your command can still be run

storm crystal
#

okay

slate tinsel
lost matrix
slate tinsel
young knoll
#

There's an event for when a player throws an egg

#

That lets you set if it'll hatch or not

slate tinsel
#

PlayerEggThrowEvent

young knoll
#

yes

icy beacon
#

So you've checked for null at some point but then magic happens and the value is not the same

#

Which is why you save it to a variable before doing the null check

#

Not only does it remove the possibility of the value being changed, it also makes your code more concise and readalbe

storm crystal
#

can I store list / array in config.yml?

icy beacon
#

Yeah

#

String List for example

orchid gazelle
#

hi, does anybody know a way to make the client update and start an Interpolation of a DisplayEntity at the same tick it is getting spawned?

icy beacon
#
abc:
  - hi
  - hello
getConfig().getStringList("abc")
lost matrix
storm crystal
#

I just want strings and integers

icy beacon
storm crystal
#

how can I access them in that case, do I just do this.that[0]?

icy beacon
#

list.get(index)

#

Have you worked with lists?

icy beacon
storm crystal
#

yeah I just dont know syntax for configs in this case

orchid gazelle
inner mulch
#

Is it possible to use player#setGliding(true), to let a player elytra fly without having an elytra?

icy beacon
#
List<String> myList = getConfig().getStringList("abc");
myList.get(1);
// in most use cases you don't get a certain item
// but instead iterate through the whole list
// but ofc i don't know your use case
// so do what you need to do
#

I think there's getList() that just returns a List<?> but I might be wrong

lost matrix
young knoll
inner mulch
#

im cancelling it but the player doesnt fly

#

am i doing something wrong?

#

?paste

undone axleBOT
inner mulch
orchid gazelle
#

alright, another question lol. How would I rotate an ItemDisplay so that it looks in the direction my Vector is going at?

lost matrix
orchid gazelle
#

hmm, well I think that's hard to do

#

I am spawning my DisplayEntities based on a List of ProjectionPoints where I can calculate the Vector from

#

how can I apply this Vector to the Spawn Location as a Direction?

lost matrix
#
Vector vec = ...;
Location loc = ...;
loc.setDirection(vec);
orchid gazelle
#

doesn't the Length and so on matter when setting Directions?

smoky oak
#

no

#

world.spawnParticle(Particle.DUST_COLOR_TRANSITION,l,1,colors[colorCount]);
colors array of Particle.DustTransition
->
Particle DUST_COLOR_TRANSITION requires data, null provided
chat, am i stupid? Am i bad?

orchid gazelle
#

oh well then, imma try, thanks xD

orchid gazelle
# lost matrix ```java Vector vec = ...; Location loc = ...; loc.setDirection(vec); ```

alright so I tried doing that with:

    List<Location> projectionPoints = getProjectionPoints(handLocation, player.getEyeLocation(), player.getEyeLocation().getDirection());

        Vector dist = projectionPoints.get(projectionPoints.size() - 1).toVector().subtract(projectionPoints.get(0).toVector());

        // divide by bullet speed multiplicator
        int duration = (int) Math.round(dist.length() / 7);

        ItemDisplay bulletDisplay = player.getWorld().spawn(projectionPoints.get(1).setDirection(dist), ItemDisplay.class);

Direction still stays the same

lost matrix
orchid gazelle
#

and yes it has a LOT of maths for Intersection and stuff haha

lost matrix
orchid gazelle
#

the raycasting is also a custom implementation of an algorithm I wrote

orchid gazelle
#

I came across the issue that you have to wait 2 ticks after spawn for interpolations to work, but yeah imma try if it still looks fine with 100ms delay

lost matrix
#

Im guessing that you are calculating the interpolation duration via the distance?

orchid gazelle
#

yes

lost matrix
#

Ok let me play around for a bit

orchid gazelle
#

sure, take your time. Thanks a lot already!

storm crystal
#

how can I get just the PDC tag string value with given key?

#

I keep getting this

glacial narwhal
#
Configuration.get().addDefault("lava", true);
``` can any body say why this ```java
if (Configuration.get().getBoolean("lava")){
   p.getInventory().addItem(new ItemStack(Material.LAVA));
}
``` doesn't work
sullen marlin
storm crystal
#

its of console

sullen marlin
storm crystal
#

I printed retrieved value of PDC

#

but for some reason

#

it prints that weird MemorySection thing

sullen marlin
#

I don't think the pdc can have a config

#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

storm crystal
#

...

sullen marlin
#

Nothing there prints to console

storm crystal
#

its in another method it doesnt matter

#

printing is for debugging purpose

storm crystal
#

yesterday when I was working with PDCs there would be no issue

sullen marlin
#

If you have an issue with what is being printed we need to see the printing code

storm crystal
#

...

#

it literally

#

prints

glacial narwhal
sullen marlin
#

So Maybe you stored the wrong thing in pdc

#

Where is the setting code

sullen marlin
storm crystal
#
 NamespacedKey key = NamespacedKey.fromString("lootbox");
 lootboxMeta.getPersistentDataContainer().set(key, PersistentDataType.STRING, lootboxConfig.getCustomConfig().getString(MessageFormat.format("{0}", strings[0])));
 lootbox.setItemMeta(lootboxMeta);
glacial narwhal
sullen marlin
storm crystal
#

still same

meager wolf
#

how can i stop an item from dropping from player inventory when he dies

sullen marlin
#

Playerdrathevent.setDropItems or something

#

Look at the event methods / docs

meager wolf
#

there isnt a method for that

smoky oak
#

oh md if youre here, do you know where i can see the damage a lingering potion of harm deals? I'm trying to find the timings + damage but google only spits out the minecraft wiki and the api neither of which seem to have the numbers

sullen marlin
sullen marlin
smoky oak
#

the damage yes

#

but what's the timing?

#

eh ill just guess 1 second and 1.5 dmg

grand flint
#

hi cute @sullen marlin

meager wolf
#

i see

#

my brain is not braining

grand flint
#

its the server that calculates light level right?

sullen marlin
#

Yes

orchid gazelle
#

md

#

when light level gpu acceleration?

#

when entity tick multithreading?

inner mulch
#
    public void onDoubleJump(PlayerToggleFlightEvent event) {
        Player player = event.getPlayer();
        if(player.getGameMode() != GameMode.SURVIVAL || player.getGameMode() != GameMode.ADVENTURE) {
            return;
        }
        
        if(player.hasPermission("Perks.perks.elytraPerk")) {
            event.setCancelled(true);
            player.setGliding(true);
            active.add(player);
            player.setAllowFlight(false);
        }
    }```

why does this event still fire even when the player is in creative mode?
orchid gazelle
#

because it's ToggleFlightEvent

#

when you hit double-jump in creative mode, you Toggle Flight

inner mulch
#

yeah but if(player.getGameMode() != GameMode.SURVIVAL || player.getGameMode() != GameMode.ADVENTURE) {
return;
}

orchid gazelle
#

well thats OR

worldly ice
#

Your game mode can’t be both survival and adventure

orchid gazelle
#

^

inner mulch
#

so i need there to be two statements?

#

this is a or statement

worldly ice
#

Just change your || to an &&

orchid gazelle
#

you need to use && instead of ||

#

yeah

worldly ice
#

Yeah

inner mulch
orchid gazelle
#

no

inner mulch
#

and means it needs to be those two

#

|| this is or

#

&& this is and

orchid gazelle
#

yes

orchid gazelle
worldly ice
#

Well let’s says you are in survival mode. The left part of the or evaluates to true, but the right side evaluates to false

inner mulch
#

okay thank you

#

it works

worldly ice
#

So your code continues

orchid gazelle
#

your current code tells "it needs to be EITHER not adventure mode OR not survival mode" which is always true

storm crystal
meager wolf
# sullen marlin KeepInventory

im a bit confused, when u use getDrops() u get a Set<ItemStack> and when u use .clear() or .remove() u do that to the Set<ItemStack> copy u got in return not the original one that will actually get dropped,
so how are you stopping the item from getting dropped
is my brain not braining or its a a bukkit thing?

river oracle
young knoll
#

Pretty sure the list is mutable

meager wolf
meager wolf
river oracle
river oracle
meager wolf
#

ig i will try it and see what will happen

sullen marlin
#

Yes

golden turret
#

does it makes sense to put the @NonNull annotation in the Optional type?

river oracle
#

Optional implies the result will never be null

#

also why anotate WorldHud with NotNull when an Optional Implies it could be null

#

if it is true that WorldHud can't be null then an optional shouldn't be used at all

golden turret
#

the Optional#get() never returns null

#

if the value is null it throws an exception, yk

river oracle
ivory sleet
#

it is

#

I mean mostly u prob wanna have a @NonNullByDefault or something wizardlybump

#

so u dont have to clutter it all with @NonNull

river oracle
#

Those annotations are redundant as hell and confusing when surrounding an Optional

lost matrix
orchid gazelle
shy wolf
#

?paste

undone axleBOT
orchid gazelle
lost matrix
river oracle
#

hold up chat I'm doing like actual stuff with the world in my plugins for the first time in decades

    /**
     * Checks if an area around the provided location is free of obstructions
     *
     * @param center the block to use as the center point
     * @param width  the block area around the location.
     * @param height the height of the expanse
     * @return true if the space is clear of obstructions otherwise false
     */
    public static boolean isSpaceClear(@NotNull final Block center, int width, int height) {
        Preconditions.checkArgument(width % 2 != 0, "Width must be odd to have a center point");
        Preconditions.checkArgument(height > 0, "The provided height must be greater than 0");
    }

Basically goal is to implement and check if a set area around the center block is clear of obstruction.
Kinda need to check top left and bottom right or vise versa of an area and need to iterate through those blocks and see if they are not filled by other blocks.
What would I do to grab the top left and bottom right of the area though.

orchid gazelle
river oracle
#

wait I think I got it

#

holy cursed

#
        Block corner0 = center.getRelative(0, height, 0).getRelative(BlockFace.SOUTH, width - 1).getRelative(BlockFace.EAST, width - 1);
        Block corner1 = center.getRelative(0, height, 0).getRelative(BlockFace.NORTH, width - 1).getRelative(BlockFace.WEST, width - 1);
lost matrix
# river oracle hold up chat I'm doing like actual stuff with the world in my plugins for the fi...
  public static boolean isSpaceClear(@NotNull final Block center, int width, int height) {
    Preconditions.checkArgument(width % 2 != 0, "Width must be odd to have a center point");
    Preconditions.checkArgument(height > 0, "The provided height must be greater than 0");
    int dw = (width - 1) / 2;
    Block upperCorner = center.getRelative(dw, height, 0);
    Block lowerCorner = center.getRelative(-dw, 0, 0);
  }
#

Ah height is not bidirectional for you

river oracle
#

oh shit I forget I ened the bottom corner on the second one

river oracle
worldly ingot
#

Yes

river oracle
#

ahhh okay

umbral ridge
#

hey

#

how do you check if player isnt moving? with getVelocity?

river oracle
#

that'd be difficult to find out tbh because being knocked back or other things that indirectly move hte plyaer would be impacted as well

umbral ridge
#

I just need to check it when im executing a command

#

at one specific time

river oracle
#

then their velocity would be 0 as they're neither accelerating nor moving

#

well technically they could be accelerating with out yet affecting velocity, but that'd be very nieche. I don't know if that is possible in minecraft

umbral ridge
river oracle
#

yeah pretty much

umbral ridge
#

Ok thanks

deft thistle
#

what if bro is riding a minecart is their velocity affected?

#

or a boat

river oracle
#

25% sure

umbral ridge
#

why isn't y in player's velocity 0 when standing still?

#

I dont have any potion effects applied or anything

#

I guess if y was 0 player wouldn't be able to jump? is that the jump "boost" value? or is that gravity?

grim hound
#

yVel(t) = (yVel(t-1) - 0.08) * 0.98

tepid ore
#

This might be the wrong place to ask, but is it possible to customize a Spigot store page by using HTML?

umbral ridge
grim hound
#

The 0.98 is a little bit off on some older versions but the general y Velocity is -0.0784 wjhen standing still

grim hound
#

As there is no previous "off ground tick" (which is the "t")

#

This is the recursive formula up until the 6th air tick

#

And here is 7+ air ticks

zealous osprey
# grim hound https://www.mcpk.wiki/wiki/Nonrecursive_Movement_Formulas

It's been a while since the last video hasn't it? I've made quite a bit of progress since the last update, and since one of the things I worked on was some procedurally animated characters, I decided to make a video about the subject. In particular, this video highlights the entire process from initial motivation, to the technical design, techni...

▶ Play video
river oracle
#

when working with a 3d array it goes like

int[x][y][z]

right

young knoll
#

If that’s how you ordered it then yes

river oracle
#

Ig we'll see

brittle geyser
#

int[][][] x

quaint mantle
brazen badge
#

I need help creating a project. So, I want to create a config system like the mmoitems skills example:
ability1:
ability2:

and I want the plugin to detect that there is 1 or more abilities, which can be omitted from the config file. At the moment I want to create a system that through a file a user can create items (taken via id from the oraxen api) and that for each item there is an id and a boost value like "1.5". I would like the file to be structured like this:

items:
1:
oraxen-id: "test"
boost: "1.5"
2:
...
...

And that a user can add as many items as they want. Anyone know how to do it?

tepid ore
#

Obv I use wrapper classes and have a custom made structure for it all, but essentially that is how I do it

brazen badge
#

butIf I create a class, with a constructor. And I run the constructor for how many items there are, changing the arguments inside it?

tepid ore
#

wdym you create a class with a constructor? You can might as well say you write code. Do you mean like a container class for a list of abilities?

young knoll
#

Why a uuid and not just a string

tepid ore
#

well it is stored as a string, but the string is a uuid

#

🤷‍♂️

young knoll
#

Yeah but you could just use a smaller string

#

Aka a unique name for each item

tepid ore
#

I could, but that would require that all names are unique. Say an admin made different loot box or whatever idk and wanted to call them all loot box or smth? It's dumb but they can. Also, using "invisible" uuids instead of customizable names allows me to guarantee that names do not clash or that dumb bugs appear

#

As all editing is done via GUIs (no configs ever) they don't need to know the uuid anyways so

brazen badge
#

just like this

hazy parrot
#

?conventions

tepid ore
#

It also improves performace? Although insignificantly. As the item id has to be linked to the corresponding list of abilities sometimes hundreds of times a second using .equals() on a uuid is faster than using .equalsIgnoreCase() on a string

young knoll
#

Why would you be using equals or equalsIgnoreCase

#

You’d be using map.get

tepid ore
#

Oh yeah, im dumb lol

young knoll
#

Well I guess that will technically use .equals, but yeah

tepid ore
#

Anyways, it seemed simpler to use an "invisible" uuid than a customizable name

#

The user can not see a difference, apart from the fact that there are no naming restrictions for the items in game

tepid ore
# brazen badge just like this

I have my plugin setup in a way that there are what I call scripts. Each item is linked to one or more scripts and when activated the script executes a list of abilities. So I'd suggest not doing what you've done here, and instead do a script class, map each id to a script or a list of scripts, and execute said script whenever you want them to

young knoll
#

I should make a yaml based scripting system

#

Everyone’s doin it these days :p

tepid ore
#

They are? 💀

umbral ridge
#

hey how do you get a direction to which player is facing? eg.: EAST, SOUTH-EAST, WEST, etc..

#

nvm I figured it out

tepid ore
#

Entity#getFacing right?

young knoll
#

mmoitems items has theirs, eco has libreforge now

tepid ore
#

Well that's great

#

I did that before

#

But remade it to a GUI based pl

#

Was scared too many were doing yaml based

young knoll
#

I mean

#

You can always have a gui for the yaml

#

It’s nice to have the direct file option for power users, it’s usually a lot faster

tepid ore
#

Ig

wet breach
golden turret
#

I am writting a plugin where I need to check the player inventory before he drops an item. The problem is that in the PlayerDropItemEvent the inventory is already changed. How can I check the inventory before the change?

tepid ore
#

Wait, why are you doing this? Cant you use the item from the event and the slot index to backtrack it?

#

I thought the event was called before change but ig not

glad prawn
grand flint
#

Just get the item(s) dropped

tepid ore
#

Or that if the slot is irrelevant ^

golden turret
#

I cant just use the item dropped

tepid ore
#

Why? This is kinda close to xy

#

What are you doing? Like what do you need it for?

grand flint
#

You are trying to get the inventory before the item is dropped

#

Get the inventory, add the dropped item to it

#

= You have the inventory before item is dropped

thin iris
#

omg

#

@young knoll

#

congrats

#

how do i. check the java version of my server

ivory sleet
#

java -version

#

iirc

thin iris
#

in console?

ivory sleet
#

but if on server, it should be at the start of the logs also, or maybe shown if u use like spark

#

yea

slender elbow
#

my favourite part about java -version is that -version and --version show slighlty different outputs

tepid ore
#

but why

thin iris
#

u sure?

ivory sleet
#

ah ur in the server

thin iris
#

i said console

ivory sleet
#

mye ma bad

thin iris
#

i’m able to access files tho

#

soo

#

does any1 know how to check

glad prawn
#

didnt your host let you choose your java version

thin iris
#

probably

#

but that was like.. 4 years ago

slender elbow
#

surely there's a setting for it somewhere

#

alternatively you can check the beginning of the server log

thin iris
#

oh thx

#

lemme check

steady sentinel
grand flint
#

Yeah what if they press q on an empty slot

heavy mural
#

Is there a way with nms packets to render an entity at the players y-level continuesly, without having to teleport that entity over and over?

#

Basically follow the up-and-down movement of a player

remote swallow
weak meteor
#

but a event can be null?

remote swallow
#

The instance inside a listener probably not but the nonnull is probably so someone doesnt call method(null)

weak meteor
#

K thx

ivory sleet
#

?learnjava! @lost matrix

undone axleBOT
lost matrix
young knoll
#

Damn

hybrid spoke
#

ew new orange names

inner mulch
#

When I'm creating a class with methods how can i create methods with children, for example player.getLocation().getX()?

#

so that after 1 method i see more ?

remote swallow
ivory sleet
#

RandomStroll.stroll(0.5f) to 2

lost matrix
#
val mat1 = Matrix()
val mat2 = Matrix()
val result = mat1 # mat2
quaint mantle
ivory sleet
quaint mantle
#

u2 conclube

rotund ravine
lost matrix
#

+ban janTuck

#

woops

quaint mantle
remote swallow
quaint mantle
#

well shit

remote swallow
#

coll is the other new helper

rotund ravine
umbral ridge
#

hey

#

what's a bigger operation, comparing Location's x,y,z and world variables or comparing an entire getLocation with other object

rotund ravine
#

Hello

#

How are you comparing them

umbral ridge
rotund ravine
#

I mean location

#

also has pitch etc.

umbral ridge
#

playerStartLocation and player.getLocation(), Yeah pitch and yaw doesn't matter..

#

only x y z world

#

Should I write more code and compare these values instead?

rotund ravine
#

In recall

#

Good ol’ days

umbral ridge
#

The runnable is just for delayed teleportation

#

like a cooldown

rotund ravine
#

.getBlock().getLocation().equals

#

Ahaha

umbral ridge
#

I could use that

#

?

#

getLocation().getBlock() ? xD

rotund ravine
#

It’s an easy way

umbral ridge
#

doesnt that have to go through both location and block

rotund ravine
#

You can also just compare blockx y z and world

umbral ridge
#

Ok nice thx

rotund ravine
#

Or distance squared

#

Less than x

umbral ridge
#

would that be optimal

opal juniper
#

Hmm, this seems like an xy, why do you need to be super efficient with this?

#

Comparing two locations with .equals is not that bad. It does depend on how much accuracy you need tho as they must be identical

quaint mantle
#

I doubt these have any impact on performance

wet breach
# umbral ridge I like efficiency xD

In order to compare location objects you need the xyz to be ints and not doubled or floats otherwise you will have lots of locations that wont match even if its essentially the same spot

umbral ridge
#

getBlockX,Y,Z I've finished the class :D

wet breach
#

And if we are going to go that route i will turn these into binary and do a bitwise compare