#help-development

1 messages Ā· Page 1974 of 1

red sedge
#

dw

eternal night
#

good šŸ‘

red sedge
#

now about the uuid collision

#

ig i can assign that to a value and do a while loop

eternal night
#

LOL

wary harness
eternal night
#

preferably striking people that want to while loop their list of uuids to prevent collision

wary harness
#

not to big

white root
eternal night
#

you'd be actively implementing an O(n) loop to prevent something that would hit 50% possibility after 2.71 quintillion uuid creations

white root
#

heh

eternal night
#

I'd interpret it as active sabotage if you worked in a company

#

ngl

red sedge
lost matrix
#

Very interesting results for my Optional vs nullcheck benchmarks.
For single operations a simple null check is ever so slightly faster (~5%) but for
higher throughputs, optionals are somehow faster?
It might have to do something with the single Optional object that is used for every empty Optional...
I need to investigate that further with a more isolated benchmark and more jvm forks. But it clearly shows
that optionals are in no way inferior to null checks. Sadly i dont have any values on the memory consumption
and how much the GC would suffer with so many optionals but its probably nothing significant.

full forge
#

How would I get started with nms, I can't find any good web pages on it

maiden thicket
#

because its not a topic thats supported directly by spigot but there are few threads u'll find on their forums

lost matrix
maiden thicket
#

or u can ask here and hope someone will not cry about nms because nms makes me cry

#

ā˜¹ļø

white root
#

It does that to me as well

maiden thicket
#

unobfuscated nms has less tears

full forge
#

Sounds daunting

maiden thicket
#

yes

full forge
#

I guess I'll not do anything with that lol

lost matrix
#

Its more likely that a neutrino flips the wrong bit and makes your jvm crash before you generate colliding UUIDs. 128 bits are no joke.

maiden thicket
#

in all honesty its not that bad but if ur not using unobfuscated nms w mojang mappings u'll have fun /s

sacred mountain
quaint mantle
sacred mountain
#

(Player) ((CraftLargeFireball) e.getEntity()).getHandle().shooter.getBukkitEntity();

thats for getting a fireball shooter

#

very usefl

lost matrix
#

?npe

#

We really need that

sacred mountain
quaint mantle
#

what does npe mean

lost matrix
#

NullPointerException

sacred mountain
#

non player entity

#

damkn

#

nulls are funy

maiden thicket
#

can u not get a shooter without using craftbukkit

#

???

sacred mountain
#

you can but

#

im nt using

#

pdc

lost matrix
#

Those are in most cases the easiest exceptions to fix...

sacred mountain
#

you read the code

#

you see what the null is from, track that all the way

#

and see if it can possibly be null

quaint mantle
#

but... my array is not null.

#

i don't even get the character it occured on in the line

lost matrix
#

ItemStackSerializer.java:38
You are trying to serialize a null itemstack. Either dont do that or serialize it properly,

quaint mantle
#

so i have no idea what else could cause it

quaint mantle
#

i have itemstacks loaded from a json

lost matrix
#

Holy... how did you butcher that serializer this much?

lost matrix
quaint mantle
#

but i can't access them since if i call a return in a loop i can't use the method

quaint mantle
#

at the time of writing this is fixed

#

but it caused this problem

lost matrix
#

Is your backing file a json file or a yml file?

quaint mantle
lost matrix
#

why

maiden thicket
#

doesnt itemstack

#

have a built in

#

deserialize method?????

lost matrix
quaint mantle
#

yes but the file i am trying to deserialize has other data

lost matrix
#

First we need to figure out if this is a xy problem

maiden thicket
#

oh

lost matrix
#

Why do you use json instead of yml?

quaint mantle
maiden thicket
#

yml shows package names??

lost matrix
#
  1. Not true
  2. Why would you want to hide them?
quaint mantle
maiden thicket
#

wat

lost matrix
maiden thicket
#

o

quaint mantle
#

because i am fed up with json

grim ice
#

show it

#

you can remove it

#

show how it looks

quaint mantle
#

ok

lost matrix
grim ice
#

by removing it the same as any other text

quaint mantle
#

Menus:

  • !!me.magnumsrt.MagnificentMenus.Menu
    menuitems:
    • ==: org.bukkit.inventory.ItemStack
      type: REDSTONE_BLOCK
      meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: red
      lore:
      • coolred
        name: placeholder
        size: 54
lost matrix
quaint mantle
grim ice
#

o

quaint mantle
#

it will autogenerate it

grim ice
#

what 7smile7 said might be the problem though

grim ice
quaint mantle
lost matrix
#

Ok you guys have fun fking up your data irreparably. Ill go get something to eat...

grim ice
#

does the deserializing part

#

require the package

quaint mantle
#

no

grim ice
#

is the package in a fixed place

quaint mantle
#

i litererally just put: config.set("Menus", MenuStorageUtil.menus);

olive lance
#

Make Menu implement serializable

#

And then implement the serialize method and deserialize method to call a constructor that takes a Map which is made with the serialize method

quaint mantle
#

Hi, is there a way I can get the texture of an item?

#

The main thing I want to do is get the color of the item, and translate it into a name, like #000000 -> "black"

#

No, a regular item

#

Can be anything, a dye, a sword, a pickaxe

lost matrix
#

You cant just do this on your server because it has not access to textures.
Rather write a separate java or python application that generates a yml or json file using the images from the minecraft client jar.

grim ice
#

?paste a sec

undone axleBOT
fierce salmon
#

?learnjava I am typing this for myself btw

undone axleBOT
lusty cipher
#

how do I "place" a block at a location

lost matrix
#

get the Block on that Location and set its type.

#

Location#getBlock()
Block#setType(Material)

grim ice
lusty cipher
#

on another note

grim ice
#

according to you, it does work with the package removed

lusty cipher
#

in Bukkit, when to use Block and when to use BlockState?

lost matrix
grim ice
#

He said it's fine without the package so I assumed it is

#

eitherway listen to 7smile

quiet ice
#

Block -> Current state of a Block
BlockState -> A state of a block

lost matrix
# lusty cipher in Bukkit, when to use Block and when to use BlockState?

Blocks represent an Object in the world that can have different states.
BlockStates are snapshots of that state. Usually you need BlockStates for
more specialized actions like filling Beehives or editing spawners.
For type specific actions like rotating Logs or Signs you would use the BlockData.

lusty cipher
#

ah yeah so its the same as forge iirc

#

idk have not been doing much mc dev recently

quiet ice
#

Yeah, BlockState/BlockData contains more specific metadata of a block

patent horizon
#

how can i concat a list into a string

viral crag
#

Anyone know if there some reason I am missing on why child permissions in plugin-annotations is not repeatable?

patent horizon
quiet ice
#

I know that there is Arrays#toString, but that includes [ and ]

lusty cipher
quiet ice
#

At worst just go the

StringBuilder builder = new StringBuilder();
boolean first = true;
for (var obj : iterable) {
   if (first) {
      first = false;
   } else {
      builder.append(',');
   }
   builder.append(obj.toString());
}
String stringed = builder.toString();

route

lusty cipher
#

its what Arrays#toString uses internally iirc

quaint mantle
#

how can i get data from the config.yml and put it in an arraylist on enable?

ivory sleet
#

String::join is a thing innit

quaint mantle
#

so players do not lose their data

grim ice
#

what sort of data

quiet ice
#

yes, however it must be a list of string

grim ice
#

^

ivory sleet
#

No

grim ice
#

well not string only

quaint mantle
quiet ice
#

Well, there aren't that many char sequences

ivory sleet
#

Iterable of anything that outs a CharSequence

#

And String derives it

grim ice
#

i said what type of data is ur "Data"

quaint mantle
#

it is

#

an

#

bruh

quiet ice
#

that was more descriptive

grim ice
#

yep probably

quaint mantle
#

arraylist<class>

grim ice
#

bro

quiet ice
#

Oh no

grim ice
#

u cant have an arraylist<class> in yaml

#

wtf

quaint mantle
#

arraylist<menu>

grim ice
#

ic

quiet ice
#

You can

grim ice
#

?

tender star
#

JSON > YAML

quiet ice
#

But jesus, it's stupid to have a List<Class> serialized

quaint mantle
grim ice
quiet ice
grim ice
#

just say

#

"How to deserialize an arraylist from yaml"

quiet ice
#

So any valid JSON is valid YAML

quaint mantle
#

i can't even serialize fucking itemstacks

ivory sleet
#

There’s no objective superiority

quaint mantle
ivory sleet
#

And as geolykt said

grim ice
#

How did you serialize in the first place

quiet ice
#

Well, if you were to compare the two you can only come to the conclusion that yaml is better. It's parsers may suck however

ivory sleet
#

At least yaml is just json with cluttered comments that don’t belong anywhere according the yaml specs

quiet ice
#

(Or that they are both good, forgot about that one)

patent horizon
quaint mantle
tender star
# ivory sleet There’s no objective superiority

True. I do prefer JSON though as I find it easier to manage. Both can theoretically do the same. I'd say that the only thing that JSON doesn't have is comments and the only way of adding/ignoring them is by making your own parser that supports comments. For data storage I'd go for JSON, for settings and configuration I'd still go for JSON although YAML is equally just fine there

ivory sleet
#

WallyTube it’s basically a StringJoiner under the hood

#

But a static method that allows for basic joining of strings

patent horizon
#

can it join strings together with separators?

quiet ice
#

Does your menu implement config serializable?

ivory sleet
quiet ice
#

(honestly, for arbitrary data I'd recommend well crafted flatfile formats that is totally not going to blow up at some point when something has to change)

grim ice
quiet ice
#

uh, don't copy & paste that however

grim ice
#

Let's hope he understands it

tender star
ivory sleet
#

Can parse what?

tender star
#

parse JSON with comments

quiet ice
#

If you want comments, HOCON is the way to go

#

Sponge's configurate even has support for it

ivory sleet
#

Oh well Gson can parse lenient json such as yaml

#

for instance

#

It’s just that it’s extremely unorthodox

#

Because it goes away from the specs

tender star
#

ye

ivory sleet
#

So it is bound to confusion

#

Anyhow I detest comment specs in yaml since they’re detached from everything, in which parsers and such have to come with their very own ways of handling it

quaint mantle
#

arrayLIST sorry

patent horizon
#

how do i use a ternary operator that doesn't need an else statement

viral crag
#

did you really just ask that?

patent horizon
#

yes

glossy venture
#

its declarative

#

you need an else

patent horizon
#

why

glossy venture
#

you always need a value

viral crag
#

if(){};

glossy venture
patent horizon
#

you don't need an else in regular conditions

glossy venture
#

its declarative

grim ice
glossy venture
quaint mantle
glossy venture
#

or whatever its called

#

idfk

ivory sleet
#

I mean wally, ternary operator is a quick hand of if (blah) assign_value_1 else assign_value_2

quaint mantle
#

how do i replace an object?

ivory sleet
#

I have seen some ridiculous usages of it such as
x = condition ? y : x

glossy venture
#

nah its like doing

T get(boolean condition, T a, T b) {
  if (condition) return a;
  return b;
}

var val = get(..., ..., ...);
ivory sleet
#

Nah

glossy venture
#

what does it compile to

ivory sleet
#

Idk

#

But that’s irrelevant

glossy venture
#

because otherwise you wouldnt need the thrid part

#

it assumes that you assign something

quaint mantle
ivory sleet
tender star
glossy venture
glossy venture
ivory sleet
#

Even if a high level feature compiles down to some lower level feature the compiler and static analyzer might still perform additional semantic checks

#

hopefully that’s obvious to anyone

quaint mantle
glossy venture
#

replace ... with Object

quaint mantle
#

wrong reply

vague swallow
#

What is the beam that appears when reviving the ender dragon?

glossy venture
ivory sleet
#

No

#

lol

glossy venture
#

oh

ivory sleet
#

That’d be imperative but yeah

#

It was pseudo code

glossy venture
#

i guess well need to compile it to find out what it actually is

quaint mantle
ivory sleet
#

Some languages allow you to just use inlined if/else as ternary fyi

quaint mantle
viral crag
#

ternary is not exclusive to assignment and has limited value in java

glossy venture
#

i know

quiet ice
#

ternaries are a bit more intricate

glossy venture
fierce salmon
#

dont take my word

tender star
#

@quaint mantle May I suggest learning Java first? These are Java related issues you're having, not Spigot/Bungeecord

glossy venture
#

if you are 100% sure that obj instanceof Menu then just cast it

ivory sleet
quiet ice
#

It may need to be config serializable

ivory sleet
#

Or well some concise yields

quiet ice
#

I do not know to what exactly they get compiled to, but I do know that they are not compiled to standard if-else statements as they are a bit more optimized (if you ignore JIT)

ivory sleet
#

Probably

fierce salmon
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

vague swallow
#

What is the beam that appears when reviving the ender dragon?

viral crag
ivory sleet
#

If it’d compile down to if-else that’d imply somewhat of an issue when concurrency comes into play

quiet ice
#

It is likely that we are talking about java here

fierce salmon
quaint mantle
glossy venture
#

what the hell are you doing

#

show code

quaint mantle
#

ArrayList<Object> object = new ArrayList<>(Arrays.asList(obj));
menus = (ArrayList<Menu>) new ArrayList<>(Arrays.asList(object));

ivory sleet
#

That’s a lot of array lists

tender star
#

@quaint mantle what are you trying to achieve?

fierce salmon
vague swallow
#

but what is it?

#

a particle?

#

an entity?

#

How can I make it?

quaint mantle
vague swallow
#

Do you have any idea?

fierce salmon
glossy venture
fossil lily
#

How can I make it so that this wooden axe shows up as wand? In like pink bold letters. I know how to do chat formatting but idk about item formatting.

quaint mantle
#

class

#

a java class

#

oh wait

#

yes it is a class

glossy venture
#

what do you mean

tender star
fossil lily
quaint mantle
#

a class

glossy venture
#

OOOH

#

i thought you meant java.lang.Class

quaint mantle
#

lol

tender star
# fossil lily Custom, name

Get the ItemMeta from your ItemStack. With the ItemMeta you can change things including the display name. At last, set the itemmeta back to the itemstack

fossil lily
#

hmm okay

fierce salmon
vague swallow
#

Do you know what beacons are? maybe it's the same

#

I never found it out

fierce salmon
vague swallow
#

ty

fierce salmon
#

If you are trying to have a beacon beam show up to everyone on your server, it wouldn't work because they are client side

fierce salmon
next stratus
#

so the person who made revautosell puts a license on it and also fully obfuscates it to the max 😐
he's given me a copy and I had to try and work out how the api worked and it's a mess

ivory sleet
#

Yikes

tender star
#

F

ivory sleet
#

Hopefully the api is still an api

next stratus
#

one method is called IlIIIlIIllIlllIlIIIlIIlllIIlIllIIlIIllIIIlllIIlllIIIlIIIlIIllIlllIIllIllIIIlllIlIllIIIlllIIlllIlIIllIIIllIlIIlIlllIllIIlIIllIllIlIlIIlIIIllIIllIIlIllIIllIIlIIlllIllIIIllIlllIIllIlllIlIIlIllIIlllIIIllIlllIIIllIIlIIllIlllIIll

tender star
#

wth

ivory sleet
next stratus
#

I wish I was joking that's legit the method name

#

HE'S OBFUSCATED THE API

visual tide
#

:kek:
why make an api if its obfuscated tho

next stratus
#

FOR FUCKS SAKE

next stratus
#

I'm done

#

I'm completely done

lyric grove
#

Hi, im trying to convert this to a stream

#

but it isnt returning the hologram on the stream

vague swallow
visual tide
ivory sleet
#

allMatch is probably not what you want

fierce salmon
#

thats all i know

viral crag
ivory sleet
#

@next stratus

fierce salmon
ivory sleet
#

Maybe just ask the dude to ship you a jar where it isn’t obfuscated and tell him to make it not obfuscated

fierce salmon
#

Because he said that he wants it to work on Vanilla Client

ivory sleet
#

At least api

viral crag
tender star
#

Beacon beams can only spawn from a beacon block and only go up vertically. This is done completely client-sided and there's no way for the server to manipulate that

lyric grove
quaint mantle
#

wtf

#

java.util.ArrayList incompatible with me.magnumsrt.MagnificentMenus.Menu

glossy venture
#

?paste

undone axleBOT
quaint mantle
#

Object obj = config.get("Menus");
menus.add((Menu) obj);

glossy venture
vague swallow
glossy venture
#

idk if it got optimized out

lyric grove
viral crag
vague swallow
#

I don't want people to download clients to use my plugin, but thanks

lyric grove
#

a arraylist from a config isnt a menu

quaint mantle
#

like

#

what does that mean

ivory sleet
grim ice
lyric grove
grim ice
quaint mantle
grim ice
quaint mantle
#

public static ArrayList<Menu> menus = new ArrayList<>();

grim ice
#

No one will do that

#

ever

#

lol

quaint mantle
tall kite
#

Know how to fix?

grim ice
#

im doing it in a pure java application so i didnt do serializing shit u did

grim ice
sharp saffron
#

quick question i want to start making spigot plugins where do I get the spigot thing for intelij from?

chrome beacon
#

Spigot thing? Do you want the dependency or the Minecraft Development plugin?

#

Also do you know java

sharp saffron
#

let me send a screenshot im not entirely sure what its called

lyric grove
quaint mantle
grim ice
#

show me your code again

sharp saffron
#

basically i need the spigot tab

grim ice
#

u want the plugin

#

??

chrome beacon
#

^

grim ice
#

Minecraft Development if so

sharp saffron
#

ah ok

quaint mantle
#

Object obj = config.get("Menus");
menus.add((Menu) obj);

sharp saffron
#

is it just called "minecraft development"

fierce salmon
#

yes

sharp saffron
chrome beacon
#

Yes

grim ice
#

ya

sharp saffron
#

ty!

grim ice
chrome beacon
#

I doubt that get will work very well

grim ice
#

holy shit

#

ur casting an item to a player

#

to check its display name

tender shard
paper viper
#

lol

lyric grove
#

i think he just decompiled some random plugin by the look of the code lmao

tender shard
lyric grove
#

or the random gson

misty current
#

hey, i have an interface a developer can use to provide a custom implentation to manage power in my plugin. I have a method that decides on what channel (a string) should the energy flow for a machine, and i need to assign that id based on a factor the developer should decide. If he wants to make it player-based, the developer would need a player object in the method, but if he wants to make it location based, it would need a location

tender shard
#

I think it's more like they typed "getDisplayName()" then intellij suggested to cast it to player

misty current
#

how could i make my interface flexible so it accomodates to a developer's needs?

paper viper
#

eclipse has the dumbest casts sometimes

grim ice
#

prob not but i never used it

paper viper
#

i used it for a year or two

grim ice
#

is has that method

paper viper
#

before switching to intellij

#

it like defaults to cast to object

#

for anything

#

but tbh, this is so whack lol

tender shard
#

I hate the Intellij MC plugin

paper viper
#

i dont even think eclipse could commit to such sins

#

xD

tender shard
#

ALWAYS if intelliJ crashes, it was the MC dev plugin

grim ice
paper viper
#

yeah no why light mode

grim ice
#

eitherway it only happens for you mfn

paper viper
#

you use more power

#

Lol

#

and also your eyes

grim ice
#

@quaint mantle u have "
/**
*
*/
"

#

in ur code

#

i assume it had @author someAuthor

#

but u removed it

#

or did u make it

#

ur class has weird stuff tbh

quaint mantle
#

serial id

chrome beacon
#

?

quaint mantle
#

i used eclipses suggestion and it put that there

grim ice
#

thats a comment sir

quaint mantle
#

for

grim ice
#

oh he uses eclipse

#

ig thats why

quaint mantle
grim ice
#

eitherway so u have smth similar to

#

ArrayList<Menu> menus = new ArrayList<>();
Object obj = ...;
menus.add((Menu) obj);

#

and ur eclipse screams about it?

#

if so, just change to intellij

quaint mantle
#

no

#

minecraft

#

spigot gives an error

#

i showed u

grim ice
#

an error in console?

paper viper
#

That is going to error no matter what

quaint mantle
#

yes

paper viper
#

lmfao

chrome beacon
grim ice
#

he's deserializing

#

it's getting an object from the config

paper viper
#

storing objects in yaml šŸ˜®ā€šŸ’Ø

tender shard
#

eclipse actualyl suggests to cast itemstack to player

grim ice
#

LMAO

paper viper
#

so my assumption was right

grim ice
#

WHAT THE

paper viper
#

eclipse does indeed commit to such sins

#

lmao

grim ice
#

magn

#

try .getObject()

quaint mantle
paper viper
#

its not that hard i promise

#

if you have a proper guide

grim ice
#

i mean the code works for me magn

#

im on a pure java app though

#

but it should be the same

#

as ur trying to cast an object to a class, and adding it to an arraylist of the class

#

actually

quaint mantle
#

it happens when spigot loads the plugin, i am using a test server from server.pro

#

idk if that has anything to do with it

paper viper
#

it doesnt

quaint mantle
#

awesome

#

this is the entire error

#

nothing to do with eclipse (i hope)

paper viper
#

java.lang.ClassCastException: java.util.ArrayList incompatible with me.magnumsrt.MagnificentMenus.Menu

tender shard
# quaint mantle nothing to do with eclipse (i hope)

it has something to do with the fact that you blindly click on "fix this" in eclipse and then think you can blindly cast things to make them work. A proper IDE wouldn't even suggest this "fix" because as you see, it doesn't fix anything

grim ice
#

eitherway someone help him i brb

low temple
#

They’re prob much easier than storing objects as gsons

tender shard
#

well he's still casting between their custom Menu object and an arraylist, and I guess it's because of eclipse suggested to do this

quaint mantle
tender shard
#

yeah

grim ice
#

wait

tender shard
#

it should freka out

grim ice
#

u casted ur arraylist

#

to a menu

#

??

quaint mantle
#

yes

grim ice
#

show me

#

the code

low temple
#

Well there’s ur problem

tender shard
#

just learn java

#

you have no idea what you're doing

#

?learnjava

undone axleBOT
quaint mantle
#

menus.add((Menu) obj);

tender shard
#

that's like saying "look at my cat" while pointing at your fridge

grim ice
#

and the declaration

#

of ur menus

quaint mantle
#

public static ArrayList<Menu> menus = new ArrayList<>();

grim ice
tender shard
#

this is the Menu class

#

it implements Listener and Serializable, but what a surprise - it does not extend ArrayList šŸ˜›

grim ice
#

he didnt cast

grim ice
#

arraylist to menu

tender shard
quaint mantle
#

and no one told me

grim ice
paper viper
#

dude, it was just a statement

#

not an answer

grim ice
#

no

paper viper
#

...

grim ice
#

what

tender shard
paper viper
#

do not fucking extend ArrayList

grim ice
#

where

quaint mantle
tender shard
#

no idea, just look at the error message

tender shard
#

?learnjava

undone axleBOT
tender shard
#

there is no other way

grim ice
#

peace this is making me lose brain cells

tender shard
#

you didn't understand the basic concepts of objects

low temple
#

@quaint mantle are you modifying someone else’s plug-in or did you make this on your own?

lyric grove
tender shard
#

you can cast a Cat to a Pet or a Pet to a Cat if it actually is a Cat, but you cannot cast a Spaceshuttle to a Human...

grim ice
#

everything is a human if ur brave enough

quaint mantle
tender shard
grim ice
#

that wasnt a reference

#

you copy pasted it

#

but ok

low temple
#

It’s literally a copy paste of what they have

grim ice
low temple
#

Yeah but he should atleast understand what he’s copy pasting

grim ice
#

Not sure why you're using code from 2012 though.

tender shard
tender shard
grim ice
#

ic

#

10 years old software :troll:

misty current
grim ice
#

he is

misty current
#

oh i thought u were trying to store its aspects one by one

#

like the name, amount, etc

low temple
#

@quaint mantle bro please just use ObjectStreams to serialize if you can’t get json to work

quaint mantle
#

error after error

grim ice
#

lombok adds extension methods right

quaint mantle
#

i am done with plugin development as well, this is just unenjoyable

grim ice
#

that's not how it works sir

low temple
#

ObjectStream aren’t readable by the human eye but is the easiest and simplest way way to save data into a file

grim ice
#

you spend years to get knowledge

#

not aquire it in a few days

quaint mantle
tender shard
grim ice
#

i got screamed at to learn java like shit on my first days i still didnt just give up

#

im nowhere great but i still try to learn

tender shard
grim ice
tender shard
grim ice
#

kotlin extension methods in java woo

quaint mantle
#

opening and saving an inventory basically, i was going to make it really cool and have a lot of features

lost matrix
#

Are we still talking about the gson serialization?

quaint mantle
#

i quit

tender shard
lost matrix
#

gosh... ill add the 2 lines to make your damn serializer null safe. -.-

grim ice
#

config.set("inventory.inventory1", inventory);

quaint mantle
#

don't trouble yourself

#

i am fucking done

grim ice
#

you never tried learning forge on your first days of learning java didn't you šŸ’€

#

and on 1.8.9

#

and on a crappy pc

#

an amazing experience

low temple
#

@quaint mantle so you’re trying to make a plug-in to add a gui in the form of an inventory?

#

Where you can click different items to run commands or something?

grim ice
#

I wanna make a pokemon plugin tbh

quiet ice
#

Forge 1.8.9 is suicide

grim ice
#

smth that copies the whole entity

#

not just its entity type

quiet ice
#

There is no softer word to put it

grim ice
#

prob needs nbt

grim ice
#

ive made some forge mods before on 1.8.9

quiet ice
#

Meh, gradle is the main reason

#

And ForgeGradle is the other

grim ice
#

lel

#

not many options if u play Hypixel Skyblock

daring lark
#

Did someone know good tutorial about saving hashMaps into a file or maybe can explain this for me, thanks.

grim ice
#

check out a mod called

#

SkyblockAddons

#

and NotEnoughUpdates

#

theyre so fucking big

#

done on forge 1.8.9

low temple
grim ice
#

CodedRed is amazing

#

he does some mistakes sometimes

daring lark
lost matrix
grim ice
#

but he still teaches u the basics

#

7smile7

#

what do you think is better

low temple
#

Yeah he knows his stuff

grim ice
#

for nms

grim ice
#

Modules, or

#

Reflect

daring lark
# low temple ?

he's just writing code and saying "yes this is saving data into file like this" or sth

low temple
quiet ice
#

Compact or human-readable?

#

(and what are the keys and values?)

low temple
lost matrix
#

Depends. If you just need to use a single field or method which is
rarely used then you can sometimes get away with reflections.
But modules are superior in almost any way. The only benefit that
reflections have is that it will maybe be compatible with the next version.

low temple
#

If it’s not serializable by yaml then you have to serialize in a different way

grim ice
#

ic

quaint mantle
#

wait, does the bukkit plugin loader support haxe?

daring lark
quaint mantle
#

a language i am very good in

low temple
daring lark
#

i created this class

low temple
#

No what Data types for the hashmap are you using

quiet ice
#

String as key, Mafia as value

quiet ice
#

What do you mean with haxe?

lost matrix
grim ice
#

Haxe

#

is a language

quaint mantle
# quiet ice ?

haxe, it is a cross platform language that has a java compiler

grim ice
#

coding language

#

Haxe is an open source high-level cross-platform programming language and compiler that can produce applications and source code, for many different computing platforms from one code-base. It is free and open-source software, released under the MIT License

quiet ice
#

If it can compile to java bytecode, sure

#

Otherwise no

grim ice
#

yes it ccan

daring lark
low temple
grim ice
#

Sad

daring lark
grim ice
#

imagine coding plugins in fucking javascript

#

lmaooooooo

#

that would be funny

#

thats like using your own OS

low temple
#

Serializing through yml won’t make ur mafia class readable but the string key value will be

grim ice
#

ur living alone

daring lark
quiet ice
#

Don't use yaml for storing stuff

#

Especially if it is arbitrary data

quaint mantle
#

anyway it wasn't gonna be a good plugin anyway lmfaoo

quiet ice
#

For configs it is good

daring lark
low temple
grim ice
#

do u mind if i take the idea

quaint mantle
#

like

grim ice
#

I wanna make

low temple
#

Much simpler to save data to

grim ice
#

a photocopier

quaint mantle
#

being new to java or spigot is like walking into a burning building dude

grim ice
#

actually

#

MineXerox

#

or smth

low temple
#

If you try to sprint before you can walk you’ll fall

quaint mantle
#

since i actually know c++

low temple
#

Oh god bedrock is such a shit mc version

grim ice
#

a way to like

quaint mantle
ancient jackal
#

bedrock is bad

quaint mantle
#

but its my only option

grim ice
#

a plugin that copies

#

chests, inventories, entities, players

quaint mantle
ancient jackal
grim ice
#

u will end up coming back magnumsrt

ancient jackal
#

why do you guys say learning java is bad though

grim ice
#

it is

quaint mantle
low temple
#

It’s not

quaint mantle
#

something i was good at

grim ice
#

its pain in the beginning ig

quaint mantle
#

lol

visual tide
#

learn assembly smh

grim ice
#

learn writing bytecode

low temple
#

Learn writing binary

visual tide
#

write machine code

ancient jackal
#

it's not that painful in the beginning though

quaint mantle
#

farewell

tardy delta
#

write binary

low temple
#

Java compared to other languages is complex in the beginning but makes life so much easier in the long run

grim ice
#

learn Fortran

visual tide
#

cobol :troll:

grim ice
#

c++ šŸ’€

low temple
#

Like serialization objects in Java is so much easier in Java than C++

grim ice
#

c++ is living as a president

#

its cool BUT

#

you have a ton of responsibilities

low temple
#

GUIs are a lot easier in Java than c++

grim ice
#

java is living as a doctor or such

tardy delta
#

guis in c# lol

grim ice
#

You make money

#

but not as much responsibilities as c++

#

but ur code slower than some other languages

low temple
#

GUIs in c# are not too bad with WPF but JavaFX scene builder is unmatched

grim ice
#

a wise man once said

#

Java best.

ancient jackal
#

once said

low temple
#

It was me, I’m the wise man

ancient jackal
grim ice
#

whats the language yall hate the most

#

for me

#

python

low temple
#

Java best.

visual tide
#

any with weak typing

low temple
#

C

visual tide
#

:))

dusk flicker
#

Skript

low temple
#

Learning C was annoying as fuck

grim ice
#

c++ is better than c

low temple
#

Either C or React

grim ice
#

why would u even learn c

ancient jackal
#

bf

visual tide
#

arduino šŸ˜„

low temple
#

I had to learn it cause I was helping a friend in college

visual tide
#

make piezo go boop

grim ice
#

can u make arduino move an object

visual tide
#

yes

#

motor

grim ice
#

i wanna make a machine that hits my father's tv

low temple
#

Any language that isn’t OO can suck my nuts

grim ice
#

so it works

grim ice
#

so no

visual tide
#

you'll have to do that yourself 🤷

low temple
grim ice
#

what are some advanced topics in java

low temple
#

C++ isn’t bad though, I just haven’t done much w it

low temple
grim ice
#

my list now:
the executor api, java's module system, ClassLoaders and annotation processing api

low temple
#

Spring Boot API is pretty advanced

#

It’s got a lot of what you mentioned above

grim ice
#

tommorow

#

or someday

#

ill annoy a bunch of you with these topics

#

so get ready to block me

#

lul

low temple
#

I tried learning it and it made me wanna die

grim ice
#

shoutout to 7smile and frost tbh

low temple
#

It’s not that complicated but I just couldn’t get my head wrapped around it

grim ice
#

they still didnt block me

#

and elgarl

#

elgarL is the og one

quiet ice
#

There used to be another person who was as informative as uninformative from time to time but is now banned afaik

hasty prawn
#

Who was it lol

grim ice
#

btw

eternal oxide
#

all names in caps.

red sedge
#

what is considered static aboose

grim ice
#

public static Mother YourMother = new Father();

red sedge
#

what the actual fu-

grim ice
#

Main.YourMother.sayHi();

#

Main.YourMother = new Sister();

#

thats aboose

red sedge
#

that hurt my brain

grim ice
#

Anyways

red sedge
#

people dont do that...

#

right

grim ice
#

anyone knows how to exactly copy

#

an entity

red sedge
#

hm?

grim ice
red sedge
#

idk set the entitydata?

red sedge
hasty prawn
#

Some people think that even typing static is abuse

grim ice
#

Java main class main method be like: excuse you?

#

Anyone knows how to copy an entity

quiet ice
waxen plinth
#

Nnya

#

He was an ass

eternal oxide
#

at times

grim ice
ivory sleet
#

most of the times

grim ice
#

did he commit the oopsie

#

oh no

eternal oxide
#

His humor was dark and offensive (racist)

lusty cipher
#

converting seconds -> ticks is sec * 1000L * 20L, right? or is it 20sec/tick?

#

oh stupid question

grim ice
#

20tick/s

ivory sleet
#

20 * seconds

visual tide
#

20 ticks a second

lusty cipher
#

why would there be 20 ticks per m illisecond

#

wtf did I think

grim ice
#

haha get rekt slow typers

ivory sleet
#

lol

lusty cipher
waxen plinth
#

FOOL

grim ice
#

188wpm

visual tide
#

imagine sugar cane just isntantly growing back

grim ice
#

B)

waxen plinth
grim ice
#

on my broken keyboard tho

visual tide
#

200 wpm if the word is "a"

grim ice
#

which was way bigger than the one i use rn

opal juniper
eternal oxide
#

I did

lusty cipher
grim ice
#

anyways, anyone knows how to copy an entity completely

eternal oxide
#

kind of like an old school commedian

#

deep clone, but not easy

grim ice
#

de/serializing

#

isnt hard

ivory sleet
#

well he does arrive with new alts just every so often, I ges informed about it from some people from time to time

ivory sleet
grim ice
#

coming with alts is just sad imo

#

when i was banned i didnt go to that low level of desperation

waxen plinth
#

Why were you banned

eternal oxide
#

Half of the fun was seeing how long before he got banned

grim ice
#

For 'trolling'

ivory sleet
#

myes Elgar, we got a bit stricter after a while

grim ice
#

it was related to you redempt, but i dont rememeber how

eternal oxide
#

nah, it was usually for being offensive

grim ice
#

either way idrc anymore

ivory sleet
#

no nr

#

I used to just warn people and let them go off the hook

grim ice
#

i remember those days

#

when everyone got banned

#

lol

#

not everyone but many

ivory sleet
#

yeah, I mean at some point trolls would get banned shrug

grim ice
#

there is a secret way to get banned in one message

#

that not many know of

ivory sleet
#

lol

grim ice
#

conclure do u wanna know it

ivory sleet
#

I know it alr prob

grim ice
#

its offensive tohugh

#

though

#

what letter does it start with?

ivory sleet
#

keep it for yourself

grim ice
#

fine

#

lol

ivory sleet
#

šŸ‘

tardy delta
#

hewwo conslure

#

smh i cant type

grim ice
#

and for ur info it isnt racist

ivory sleet
#

hlw

grim ice
#

does Entity implement serializable

ivory sleet
#

nope

grim ice
#

fuck how do i serialize it then

wary harness
#

I am trying to copy attributes from one item to another



        ItemStack n = new ItemStack(Material.NETHERITE_HELMET);
        
        ItemStack item = p.getInventory().getItemInMainHand();
        ItemMeta meta = item.getItemMeta();
        

            meta.setAttributeModifiers(n.getItemMeta().getAttributeModifiers());
            item.setItemMeta(meta);```
but is not working am I doing something wrong ?
fervent gate
#

How would I get the values in the number pools? Currently using a for loop, but stuck at accessing it.

ivory sleet
#

uh, use mojangs datafixerupper thingy

grim ice
ivory sleet
#

yeah

#

their library which they incorporate when serializing and deserializing

grim ice
#

how to use it tho

#

i have no idea

#

i just saw their github

#

it doesnt look informative

ivory sleet
#

hmm idk if there are any good tutorials now speaking of which

fervent gate
#

that is the plugin config btw

grim ice
#

cant i use Kryo

lost matrix
ivory sleet
#

var poolSection = config.getConfigurationSection("pool");
for (String key : poolSection.getKeys(false)) {
var underSection = poolSection.getConfigurationSection(key);
}

#

or sth

#

iirc

#

also be aware its nullable (getConfigurationSection)

#

so might have to check for null

grim ice
#

conclure do u think i can use Kryo

#

or XStream

ivory sleet
#

maybe

#

I havent used those myself

#

so idk tbf

grim ice
#

7smile wdyt

hollow arch
#

What could be an easy way to add some artificial knocback whenever someone is hit with a fishing rod?

#

Just set their velocity somehow?

#

I guess that'd work yeah nvm

velvet minnow
#

Hi !
Do you know why the entity "phantom" are called "zombie" in the EntityTargetEvent event ?
When I get attacked by a phantom and then I do event.getEntity().getName() the phantom name is "zombie"
Is it a bug or may be I do something wrong ?

quiet ice
#

I'd avoid #getName

grim ice
#

gg

deft forum
sacred mountain
#

i accidentally included all my dependencies and now my plugin is 7mb lol

velvet minnow
quiet ice
#

Also, do you know what the EntityTargetEvent is?

velvet minnow
quiet ice
#

Yeah, it seems that you confuse EntityTargetEvent with EntityDamageEntityEvent

#

Or stops chasing you or any other mob

#

You might want to print the target reason alongside the entity type

#

It is possible that it falls back to

        /**
         * When the entity has no target, so the entity randomly chooses one.
         */
        RANDOM_TARGET

but I have never used this event so I can only speculate

velvet minnow
#

Oh didn't know that is also when it stops x)
I didn't think about the reason, I will try it, thanks for your help šŸ˜‰

sharp saffron
#

hey when i try to run my plugin i made it says Please use your plugin's logger instead (JavaPlugin#getLogger).

#

how do i fix it?

eternal oxide
#

thats a Paper error

sharp saffron
#

oh ok

#

ty

fervent gate
#

Is there a way to put the first variable into the ChatColor?

quiet ice
grim ice
#

btw after setting up build tools and stuff for nms

sharp saffron
#

i think its because i made a paper server but a spigot plugin

grim ice
#

do i remove my spigot-api and replace it with spigot or do i have both

quiet ice
#

No, it's because you use System.out or System.err somewhere

#

You need to use your plugin's logger at all times. This is for good reason

grim ice
#

geol u changed ur pfp?

quiet ice
#

Yes

grim ice
#

bruh it looks different to my eyes

quiet ice
#

Eclipse is out of fashion, time to embrace ukranian recaf

grim ice
#

eclipse identified u tbh

quaint mantle
#

Java development software pfp fetish

grim ice
#

politics bad

quaint mantle
#

yeah literally talking to the eclipse ide. This legacy developer who cares about any byte in his code

#

Jk

grim ice
#

the ide that suggests casting an itemstack to player when invoking ItemStack#getDisplayName()

quiet ice
#

You have to replace it

#

Technically you can have both, but this is not really needed as spigot is a superset of spigot-api

viral crag
#

Its been a few hours: Anyone else know if there some reason why child permissions in plugin-annotations is not repeatable?

grim ice
#

i have both jdk 8 and jdk 1777

#

17*

#

how to specify one to use

viral crag
#

where

grim ice
#

in my pc

tardy delta
#

jdk1777

viral crag
#

in your main path? windows or linux?

grim ice
#

im running build tools lol

#

windows

viral crag
#

system->advanced

grim ice
#

m y java home

#

is

#

C:\Program Files\Java\jdk1.8.0_291

#

but its using my jdk 17

viral crag
#

then you are specifying it to - btw what is "its"?

elfin atlas
#

How does custom model data works?

grim ice
#

buildtools

elfin atlas
#

In spigot

young knoll
#

It’s just an int

tardy delta
#

ItemMeta#setCustomModelData

viral crag
tardy delta
#

you can use it for resourcepacks

elfin atlas
grim ice
#

java -jar BuildTools.jar --rev 1.16.5

viral crag
#

C:\Program Files\Java\jdk1.8.0_291\bin\java -jar BuildTools.jar --rev 1.16.5