#help-development

1 messages ยท Page 76 of 1

charred blaze
#

Thanks

#

how do i tab like this?

#

??

echo basalt
#

I told the gangsta guy that he was a mofo and we got smacking

charred blaze
#

in eclipse

#

this

#

up

grim ice
#

what is a static keyword used for

charred blaze
#

how do i do this?

wet breach
echo basalt
echo basalt
wet breach
echo basalt
#

Can you explain the garbage collector as if I was 5?

echo basalt
#

clued pads to walls type of thing

grim ice
#

lmao

wet breach
echo basalt
#

future job if java falls off

grim ice
wet breach
#

How long it takes for GC to happen depends how large the heap is but allocate too much ram and it becomes inefficient. Analogy for this is, yes you can get a larger garbage can and thus wait longer before having to take it out, but then it becomes more difficult to take it out because it is now heavier. ๐Ÿ™‚

echo basalt
#

7smile7 typing an essay here

#

reminds me of that dude that made a whole thesis on minecraft modding

#

contents included setting up intellij and making a basic java program

lost matrix
#

What would be the console output here:

public class TestClass {

  private static final TestClass singleton = new TestClass();

  public static TestClass get() {
    return singleton;
  }

  static {
    System.out.println("ZZZ");
  }

  private TestClass() {
    System.out.println("YYY");
  }

  public void print() {
    System.out.println("XXX");
  }

}
public class Main {

  public static void main(String[] args) {
    TestClass.get().print();
  }

}
grim ice
#

btw why is a lazy singleton bad

echo basalt
lost matrix
echo basalt
#

and change one println to print to confuse further

grim ice
#

i heard some guy say that in a server

#

i always use lazy singletons instead of simple singletons

#

why not YYY @quaint mantle

#

or ZZZ

lost matrix
#

lazy singleton is an actual design patter. It helps with dependency problems but works against the fail fast principle.
It has its place.

tender shard
#

talking about lazy singletons...

#

me

#

whenever i'm abroad, I pretend that my name is jeff

#

it ofc isnt

grim ice
#

why would ur class be ur name

#

thats a bad idea

#

a class is supposed to be named about what it does

grim ice
#

mfnalex named his main class like that because his library is called JeffLib

sturdy frigate
#

I want to set a trail of blocks where a certain player has walked to a special type, currently I'm doing it via having a listener with a static list that takes in a player and a material, and then have a player move event handler that listens and finds if the player is in the trail list and replace it there.

Is there a better way to do this?

tender shard
grim ice
#

in usual java applications name it Main, or <ProjectName>Main

#

but

#

in a bukkit plugin

#

ur plugin isnt the main software

tender shard
grim ice
#

so it would be

#

<ProjectName>Plugin

#

or

#

<ProjectName>

#

its not his name

#

its his project name

echo basalt
#

SkyblockPlugin, EconomyPlugin.. etc

grim ice
#

his name is jeff, but his project is jefflib

#

that sounds ass

#

and i wouldnt name a library like that

#

its too vague and doesnt explain anything about what it does

#

nice

grim ice
#

and its a matter of opinion for the most part

#

that sounds good, it doesnt break any naming convention

#

its really up to you, as long as you follow java naming conventions, and not name your plugin main class "Main"

wet breach
lost matrix
# glossy venture ```java ZZZ YYY XXX ``` right

Yes. What does this print?

  public static void main(String[] args) {
    System.out.println(areEqual(1, 1));
    System.out.println(areEqual(10, 10));
    System.out.println(areEqual(100, 100));
    System.out.println(areEqual(1000, 1000));
  }

  private static boolean areEqual(int x, int y) {
    return Integer.valueOf(x) == Integer.valueOf(y);
  }
wet breach
#

he just doesn't want to admit it ๐Ÿ™‚

grim ice
#

it prints nothing

#

no

#

an int can not be null

glossy venture
#

does == call intValue()

grim ice
#

it can only be 0

tardy delta
#

Alot of false

grim ice
#

no

tardy delta
#

No

glossy venture
#

< does

#

but then its still true

#

because it holds a constant pool

#

for the values

#

i think

vale veldt
#
Packet<?> packet = new PacketPlayOutWorldParticles(particleEnum, true, (float) location.getX(),
(float) location.getY(), (float) location.getZ(), (float) 0, (float) 255, (float) 0, 0, 0, 0);```
How do I give colour to a particle like REDSTONE? I've seen several spigot posts where they explain it but none of them work, in fact this is something I've seen but the only thing it does is change the distance of the particle not the colour, when in the post it indicates that it changes the colour. 1.9
tardy delta
#

Constant pool for ints ;//)

#

Just stack values?

lost matrix
tardy delta
#

Tf discord

glossy venture
tardy delta
#

Heh

lost matrix
grim ice
#

wrong send

grim ice
#

thats weird af

vale veldt
tardy delta
#

Why not Four times false

quiet ice
lost matrix
quiet ice
#

Though either way the idea behind the constant pool is the same across all impls more or less

sturdy frigate
#

That's what I'm currently* doing, I was wondering if there was a way to make some sort of runnable that only stays for the specified time where the user is using the block trail, and do nothing other times

grim ice
#

OHH

lost matrix
vale veldt
grim ice
#

jvm caches integer values, therefore the numbers from -128 to 127

#

are the only ones that work

ivory sleet
#

unless u change it with a jvm flag ye

sturdy frigate
#

How would that work? Is it like the bukkit runnable that runs in an internval

lost matrix
grim ice
#

thats some new info

#

nice

sturdy frigate
quiet ice
vale veldt
quiet ice
#

It is rare to see a day where my brother is not complaining about 5-10 second lagspikes while playing on 1.8

grim ice
#

just to assure you

#

i play that version frequently, I never face such issues

quiet ice
#

At least that is my idea, I never bothered to debug that issue

grim ice
#

Oh well i get 1 fps spikes every 1 to 2 seconds

#

in 1.19.2

lost matrix
grim ice
#

its not my pc's problem btw

#

i get 300 fps then boom its 1

lost matrix
quiet ice
#

Nah, that is how mc is built

#

Or rather there is something (such as GC) being misconfigured

grim ice
#

i play heavily modded packs

lost matrix
#

Was about to say

wet breach
grim ice
#

in 1.16.5

#

theyre silky smooth

#

however anything 1.18 or above

#

dies

quiet ice
#

To be honest mods have always been poorly optimized

charred blaze
#

how can PrepareAnvilEvent have multiple viewers?

#

how it works?

wet breach
# grim ice dies

have you tried using JVM arguments on the client like you would for the server?

lost matrix
quiet ice
#

I remember the good ol days where it took half an hour to start a good modpack

grim ice
#

i played in single player

#

it was the same thing

charred blaze
#

who is executing everything?

wet breach
# grim ice i played in single player

single player isn't really different from the server. The client just runs a server internally on single player. There is some minor differences with some things but otherwise it is mostly the same

lost matrix
grim ice
#

lol

charred blaze
#

huh

wet breach
#

if not try it

#

might see some improvements ๐Ÿ˜‰

charred blaze
wet breach
#

not necessarily

charred blaze
#

why

wet breach
#

if the one who opened was originally at 0, and another came along and opened and are not at 1, but lets say the first one leaves

#

that second one that came by is now 0

charred blaze
#

'-'

#

lets explain easier

#

how to get player who's inventory is it?

lost matrix
charred blaze
#

then

#

how to get player who's anviling item?

#

anviling xd

quiet ice
#

PlayerInventory is the only class that you can 100% connect to a player

#

For anvil inventory it is safe-ish to get A player

wet breach
#

This is where it might help to implement some protection like stuff and primary reason why protection plugins exist or lock plugins ๐Ÿ˜›

lost matrix
#

The anvil could as well be prepared by code. So in the PrepareAnvilEvent you might not even have a player interacting with the inventory.
You need to do some extra checking with InventoryClickEvents.

grim ice
#

never missed with that shit before

wet breach
quiet ice
#

Yeah, aikar works good enough

wet breach
#

maybe don't allocate 10GB of ram though, only need like 4GB for the client

lost matrix
#

Well if you allocate 10gb then you can do some pretty greedy garbage collections

wet breach
lost matrix
#

Yeah probably

#

If he uses mods on the other hand...

wet breach
#

yeah might help with mods, needs lots of ram for mods anyways especially if you got like 50-100 of them

grim ice
#

-Xms3G -Xmx3G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1

#

3 is prob enough

wet breach
#

I have attempted to shrink the memory requirements and the lowest I could ever get it down to was 5GB minimum

grim ice
#

ive got 320 mods

#

could run it on 2gb if i wanted to

wet breach
#

I would love to see this

grim ice
#

maybe i would record it one day :o

#

it would run on 40 fps tho

#

๐Ÿ’€

wet breach
#

I have never got a modded client to get even remotely close to loading before crashing or running out of memory

grim ice
#

i tried running optifine only in 512mb

wet breach
#

and that was just with 100mods

grim ice
#

it worked

grim ice
wet breach
#

optifine isn't a super heavy mod

grim ice
#

ye

#

but 512mb

#

damn

#

thats real low

#

and it ran on 60 fps or something

wet breach
#

optifine changes the quality of the graphics but uses different methods to do so

wet breach
#

otherwise the client will complain about it

#

only works on paper

#

or if you have the paper api plugin

grim ice
#

-Xms3G -Xmx3G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1

#

this gud?

wet breach
#

yep

lost matrix
# charred blaze like how

You are a programmer. Do some programming ๐Ÿ˜„
Extract a model, write manager classes that keep track of states, listen to events, etc.

eternal night
mighty aurora
#

Ok, I'm very confused right now. I am currently working on a plugin(I'm very new to plugin creation) that will give custom abilities to predefined Items(These have been created in game already and I am trying to replicate them in the plugin so that I can have the proper trigger for the ability) As of now this is my code and its not working and giving me errors of not knowing what setDisplayName is and that their isnt a super constructor for the private class item(doesn't include the imports or package)

    private class item extends PlayerInteractEvent {
        final ItemStack item = new ItemStack(Material.SCUTE, 1);
        final ItemMeta meta = item.getItemMeta();
        meta.setDisplayName();
        PlayerInteractEvent(Action RightClickBlock, ItemStack);
    }

}```
quiet ice
eternal night
wet breach
#

you don't extend events unless you want to add functionality as well as provide a customized event, not what you are looking for

#

what you want to do instead is actually listen for that event and thus need to create a listener class

lost matrix
wet breach
#

?learnjava

undone axleBOT
quiet ice
#

Spigot is a lot more beginner friendly that ~~some ~~ all of the alternatives though

mighty aurora
#

I have done some of the basics of java. Also the reason most of my code is the way that it is is because when I wrote it the way I thought i should have(implementing listeners and such) it was spitting errors at me telling me thats wrong and that it needs to be extends playerinteractevent

wet breach
wet breach
quiet ice
#

It should be something like

public class ClassName implements Listener {

    @EventHandler
    public void /* did you know that it can be boolean too? (but that is deprecated and should not be used) */ methodName(PlayerInteractEvent event) {
lost matrix
#

I was pretty confused with a lot of the concepts at the beginning. Like the JavaPlugin class. I had no idea who instantiates it.
Or listeners. I didnt fathom the point of the annotations and i had no idea why the method names where irrelevant. Only after
fully understanding how the classloader worked and how you can reflectively scan for annotated methods, did i understand how spigot works.

wet breach
#

in that case, it is a matter of including the api dependency into your project

grim ice
#

:o

#

is it to cancel

quiet ice
#

Can't really remember

mighty aurora
#

As I am rewriting this(having actually recalled things and reread API docs) it does appear that I was merely putting in my code incorrectly. Thanks all of you for the help.

wet breach
quiet ice
#

paper will print a wall of text about this - which is how I found out about this syntax

wet breach
#

lol

#

just open up the implementation at some point or the api

#

and just look at stuff

#

be surprised what you might find that exists ๐Ÿ˜›

eternal night
#

the boolean never did anything iirc

#

you could return anything there

#

just that it fucked up our optimisations

wet breach
eternal night
#

ah

#

Well, pls don't use it

modern vigil
wet breach
#

please use the paste service

#

?paste

undone axleBOT
lost matrix
#

?stash

undone axleBOT
modern vigil
#

:I

lost matrix
#

Dig through here

modern vigil
#

I know how it works

quiet ice
#

That is working as intended actually

wet breach
modern vigil
#

It uses reflect to scan all the class methods

wet breach
#

and if you know that, then all you have to do is look at the implementation

quiet ice
modern vigil
#

?

quiet ice
#

that statement is wrong as hell. How can you use reflection on something that does not exist?

lost matrix
#

If the classloader would use reflections... that would be fun.

quiet ice
#

Let alone scan methods on non-loaded classes

#

(though there are frameworks that do that)

modern vigil
#

I mean the event handler

wet breach
quiet ice
#

(but they don't use reflection with reflections)

modern vigil
#

Not the class loader

#

I don't know anything about the class loader, that's why I'm asking about docs

quiet ice
wet breach
#

reflection can let you look at a class without actually loading it well initializing it really

quiet ice
#

Old Minestom's classloading logic was a treasure trove for understanding class loading for me

modern vigil
#

Bukkit uses something that scans the registerred classes for methods that have an parameter that extends Event and have the EventHandler annotation, right?

#

right....

lost matrix
#

Im waiting a little bit longer for Minestom to mature and then im gonna do a proper project with it.
Thats the sandbox i always wanted.

pulsar cliff
#

Im trying to create a Message.yml file, using Spigots YAMLConfiguration.
But im getting a weird result.

https://paste.md-5.net/mafenasefa.cs (both in here hopefuly)

Is there any way to fix it?
Thanks in advance

wet breach
atomic swift
#

how can i get a world using BlockBreakEvent

quiet ice
#

I just mismatched the dots and thought that you were referring to class loading there

modern vigil
#

There was a lil misunderstanding there ๐Ÿ˜…

wet breach
lost matrix
wet breach
#

so I mean makes sense to assume

modern vigil
#

Reflection happens at runtime

wet breach
#

would be interesting to have it happen at compile time

grim ice
#

so basically

#

minestom is just a

#

a tool for making your own server implementation

modern vigil
lost matrix
quiet ice
#

And that you have almost nothing to work with

wet breach
quiet ice
#

Which is the No 1 killer for me - especially after they removed Mixin/ASM-transformation support

chrome beacon
#

I readded that myself

wet breach
#

mixins are overrated anyways ๐Ÿ˜‰

grim ice
#

still though, minestom likes fucking amazing

quiet ice
#

Yes, I prefer raw ASM Transformation but for larger things it is a bit unfeasible to work with ClassNodes

grim ice
#

for pvp servers

#

and shit

#

or survival

quiet ice
grim ice
#

especially RPG servers

quiet ice
lost matrix
grim ice
#

u can make ur own bosses

#

it would be really awesome

quiet ice
#

Minestom has next to no world gen

grim ice
#

pathfinding would be easy tho

grim ice
#

well that sucks

wet breach
quiet ice
#

I think some world gen plugins have been ported to minestom though

wet breach
#

there is some decent ones out there that are opensource ๐Ÿ™‚

quiet ice
#

But not too sure

lost matrix
pulsar cliff
#

1.8.8

grim ice
#

you just said you use 1.8 to smile

#

you lived a good life

pulsar cliff
#

Ik right

lost matrix
# pulsar cliff 1.8.8

Then update to a newer spigot version and use the latest java version.
Should solve your problems.

pulsar cliff
#

But the server 1.8.8?

chrome beacon
#

No update

quiet ice
#

I mean even then there is nothing to worry about

#

The file's contents are just as you want

lost matrix
quiet ice
#

Nah, it's probably snakeyaml

#

Or better said it IS snakeyaml doing this. Why? idk

pulsar cliff
eternal oxide
#

It just took me far longer than I would like to admit to discover an exception was being eaten in my CompletableFuture making the whole method inoperable.

lost matrix
eternal oxide
#

yep, just quietly dies with no warning

lost matrix
#

Handling them is often so awkward

eternal oxide
#

It was my stupid fault, but I could have saved about 8 hours of debugging if it just told me

wet breach
#

instead of using the section symbol directly replace it with \u00A7

#

this should solve your problem

quaint mantle
#

Frostalf

#

where you get your name

wet breach
#

Before I answer, curiously where do you think it is from?

charred blaze
#

hi

quaint mantle
#

your wife gave u the nickname

charred blaze
#

i made this on inventory click event:
e.setCancelled(true);
e.getInventory().setItem(e.getSlot(), null);
p.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cYou cant change item's name while you are muted!"));

#

so

eternal night
#

imma say its one of the millions different elf like races in any of the games

wet breach
charred blaze
eternal night
#

close enough

charred blaze
#

i mean i can grab log

wet breach
eternal night
#

idk what game I am referring to xD

#

sounds like a dark elf

#

has some game of thrones vibes idk why

charred blaze
wet breach
eternal night
#

is that the game ?

wet breach
#
Dark Age of Camelot Wiki

The origins of the Frostalf date back many generations to the time of the twin Svartalfar princes, Hauk and Enar, who, when their parents both died suddenly, were left to determine who should rule. One, and only one, could rule the kingdom, but they did not know which twin was the firstborn and therefore the rightful ruler. Into this situation c...

charred blaze
#

;-;

#

someone help me

wet breach
#

see an entire wiki page just for me ๐Ÿ˜„

charred blaze
#

ignoring level 100

wet breach
#

not really lmao

wet breach
charred blaze
#

doesnt e.setCancelled(); on inventory click event cancells click?

charred blaze
charred blaze
wet breach
#

?paste

undone axleBOT
charred blaze
#

yes

#

here you go

#

500 lines

echo basalt
#

I always just end up logging all exceptions manually

mighty aurora
#

Quick question. When creating items using ItemStack and ItemMeta how do I have the names have custom colors and formatting?

wet breach
#

don't really have time to look over it all, multi-tasking between playing my game and what not ๐Ÿ˜›

quiet ice
#

I used the Flow class quite a lot this week. And accidentally black-holing exceptions is hard to avoid in concurrent multi-thread environments

wet breach
#

so maybe someone else here will look at it and help XD

echo basalt
#

I'd take a look but that thing's so nested that it won't fit on my monitor

#

I'm also busy helping a turkish guy setup mysql through anydesk

wet breach
# charred blaze ok wait

well seems some people are busy so will have to wait, in the mean time probably can fix the formatting of that class to look cleaner ๐Ÿ˜„

charred blaze
#

;//

wet breach
quiet ice
#

There is no point in attempting to pressure volunteers

wet breach
#

hopefully someone sees it, if not, ask again after you have slept or whatever else you have going on

#

always good to have a nice break from something after having some issues

#

who knows maybe after some rest and away time from it, you will solve it on your own ๐Ÿ˜„

charred blaze
#

cannot cancel event of inventory click event

quiet ice
#

You are cancelling the event LONG after it has been processed

#
@EventHandler
public onEvent(Cancellable event) {
     invokeLater(() -> event.setCancelled(true));
}

Or variations thereof are always asking for trouble

wet breach
#

well they created a thread, maybe good to post it there and they will see an answer when they get back ๐Ÿ˜„

quiet ice
#

This means you need to query your database synchronously... If you are lucky your code is structured in a way that it didn't make sense to put it async in the first place

charred blaze
#

im here

tender shard
quiet ice
#

I should really sign that damned CLA one day

tender shard
#

I just added @Deprecated to BlockState#getData

#

I just tried to find out for someone why their plugin always enabled legacy data support at runtime

#

I was like "do you use any deprecated methods"

#

"no"

#

yeah, because this fucking method is not deprecated although it returns MaterialData >.<

#

lol

tender shard
gray merlin
#

@tender shard Apologies but could you send me the github to jefflib?

#

I wanna do a PR.

tender shard
#

sure

gray merlin
#

ty

tender shard
#

what are you going to PR? ๐Ÿ™‚

mighty aurora
#

Sorry to bother. I'm going to repost my question from earlier so it doesn't get lost.

Quick question. When creating items using ItemStack and ItemMeta how do I have the names have custom colors and formatting?

ornate patio
#

This probably has to do twitch4j but I'm gonna post it here in case its not

I'm having an issue where disabling or reloading my plugin causes a bunch of weird errors to pop up. I'm using twitch4j in my plugin, this is my class used to handle it. The constructor is called when the plugin is enabled and the disconnect method is called with its disabled:
https://mystb.in/IncomeIctTalks

Using the TwitchClient#close() method doesn't cause issues in a normal non-spigot application.

#

Here are the errors I'm getting:

gray merlin
# tender shard what are you going to PR? ๐Ÿ™‚

Four methods: NMS Entity to Base64, Base64 to Bukkit Entity, NMS ItemStack to Mag32, Mag32 to Bukkit ItemStack
Actually I could also add in the NMS Inventory to Base64 (Using the ItemStack to Mag32) and vice-versa.

ornate patio
#

but it could be something entirely different

grim ice
#

anyone has advanced topics to learn about?

#

doesnt matter if they arent that useful

#

give me any somewhat-hard-to-understand topic you have

gray merlin
lost matrix
grim ice
#

i already do that

gray merlin
#

Collatz Conjecture solution

#

@tender shard In retrospect I'll do the PR in some time, there's something I need to do first

#

my bad lol

chrome beacon
dull atlas
#

Hey, does someone know how to spawn an armour stand as invisible from the start ? I have this little issue where my armour stand is visible for a fraction of second before it becomes invisible.
Here is my code:

armorStand.setVisible(false);```
grim ice
#

alr

#

well well

#

if u never find a solution

lost matrix
grim ice
#

oh

#

nevermind

dull atlas
quiet ice
wet breach
wet breach
#

because it is setup the API that is, to reconnect to channels if you disconnect

wet breach
#

this is obviously an oversight on their part when the disconnect method is called

#

that it should remove said user from the channels lol

#

unless this is intentional then they need to be a bit more clear for the usage of the disconnect method

ornate patio
#

yeah it should

atomic swift
#

this is my reload command but for some reason it doesn't reload the config

public class Reload implements CommandExecutor {

    
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("blreload")) {
            Iaddon.getInstance().reloadConfig();
            sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&3Reload complete!"));
        }
        return true;
    }
}
lost matrix
tender shard
atomic swift
eternal night
#

have fun with entity to byte[]

#

also, please don't encode shit in base64 for no reason whatsoever (if you are going forward with that PR)

ornate patio
rough drift
lost matrix
tender shard
#

I#d prefer Entity -> json string and json string -> entity

eternal night
#

json string kekw

tender shard
#

well why not

#

compoundtag has that builtin

eternal night
#

compound tag is not json

#

that is snbt

rough drift
#

that's better

eternal night
#

yes

tender shard
#

basically ALL entity data is inside its compoundtag

#

and compoundtag#getAsString returns a json

#

soooo

eternal night
#

it does not

#

that is snbt

#

not json

tender shard
#

ok true

#

it only looks like json

#

but thats what I meant

eternal night
#

I mean, yea spigot has some to snbt methods lined up

#

iirc for item stack choco has one

atomic swift
tender shard
#

anyway, a "kinda" json version of an entity basically holds everything that's needed to serialize a whole entity

lost matrix
grim ice
#

remember the old days

#

when i made a library

atomic swift
grim ice
#

to serialize entities without nms

tender shard
#

wasnt that like 2 months ago @grim ice

#

also theres nothing wrong in using NMS ๐Ÿ™‚

grim ice
#

even tho it just serialized it to the world file

tender shard
#

we got mojang mappings now

grim ice
#

prob 5 by now

tender shard
#

i started to love NMS

lost matrix
tender shard
#

i use it for sooo much stuff

eternal night
#

but yea

#

already exists

grim ice
eternal night
#

so item to snbt and back exists

#

no need to re-do that

#

at which point, adding inventory to snbt is a pretty meh addition imo

grim ice
#

is nobody gonna laugh about that joke it was my best one

#

:(

dull atlas
atomic swift
# lost matrix Send your code
if (config.getStringList("items").contains(namespace)) {
            if (
                    config.getBoolean(namespace.replace(":", "") + ".water-collision")&&
                    event.getBlock().getLocation().getBlock().isLiquid()
                    ) {
                event.setCancelled(true);
                MsgUtil.wrongblockconsole(player, namespace, bunder.toString());
                MsgUtil.wrongBlockMsg(player);
                return;
            }
eternal night
#

Best you can do is ItemStack[] to String[]

#

which, everyone can do that with 4 lines

tender shard
lost matrix
lost matrix
eternal night
wet breach
#

I can't really see anything else in the API

#

are you using the latest version?

ornate patio
ornate patio
#

i just copied the maven dependency lines from the api docs

wet breach
#

it is interesting though that is complaining in the error about zip file

ornate patio
#

am i maybe shading it wrong or something?

wet breach
#

do you by chance use reload?

ornate patio
#

but i havent even used it yet

eternal night
ornate patio
#

right now even when i just disable the plugin

#

the error happens

eternal night
#

does that also happen on server stop ?

ornate patio
eternal night
#

"disable the plugin" is not a spigot functionality

#

sounds more like a plugman moment

ornate patio
wet breach
ornate patio
ornate patio
wet breach
#

ok figured out why disable makes it error out

#

you have no onEnable() or onDisable()

gray merlin
wet breach
#

unless we are not looking at main class

ornate patio
#

its not my main class

wet breach
#

can we see that?

ornate patio
gray merlin
atomic swift
ornate patio
eternal night
#

NBTComponentTag

tender shard
#

cringe, ikr

#

ITS CALLED COMPOUNDTAG

gray merlin
#

SHHHH

#

compound, component, all the same smh smh

tender shard
#

also @eternal night

#

it's NBTTagCompound

#

not NBTCompoundTag

#

๐Ÿ˜›

gray merlin
#

It's "TTTHTED"

#

"The thing that holds the entity data"

#

>:D

tender shard
#

"the thing that PDC wraps"

atomic swift
#

this is the same thing right?

            // if the block should be whitelisted or blacklisted
            if (config.getBoolean(namespace.replace(":", "") + ".whitelist")) 
                // if the block under the placement is in the blocks list
                if (config.getStringList(namespace.replace(":", "") +  ".blocks").contains(bunder.toString())
                        || config.getStringList(namespace.replace(":", "") +  ".custom-blocks").contains(custom.getNamespacedID())) {
                    return;
                } else {
                    event.setCancelled(true);
                    MsgUtil.wrongblockconsole(player, namespace, bunder.toString());
                    MsgUtil.wrongBlockMsg(player);
                    return;
                    
                }
            // if the block should be whitelisted or blacklisted
            if (!config.getBoolean(namespace.replace(":", "") + ".whitelist")) 
                // if the block under the placement is not in the blocks list
                if (!config.getStringList(namespace.replace(":", "") +  ".blocks").contains(bunder.toString())
                        || !config.getStringList(namespace.replace(":", "") +  ".custom-blocks").contains(custom.getNamespacedID())) {
                    
                    return;
                } else {
                    event.setCancelled(true);
                    MsgUtil.wrongblockconsole(player, namespace, bunder.toString());
                    MsgUtil.wrongBlockMsg(player);
                    return;
                    
                }
tender shard
#

well

#

idk

gray merlin
tender shard
eternal night
#

idk, I don't care much for spigot mappings

#

CompoundTag

tender shard
#

tell us where the difference is except for the new line between the if and the return

eternal night
#

๐Ÿ™

atomic swift
gray merlin
#

There really should be a universal naming scheme for these things

eternal night
#

there is ?

#

mojang mappings lol

wet breach
# ornate patio https://mystb.in/ReceiversSunshineAntique
GitHub

Modular Async/Sync/Reactive Twitch API Client / IRC Client - twitch4j/WebsocketConnection.java at 92b05116aa31f7a5513b311206c42a371500926b ยท twitch4j/twitch4j

eternal night
#

literally the official namings

wet breach
#

if you can't find it called anywhere, then quite possible you might need to call that

gray merlin
#

Yes, that was satire.

#

:P

eternal night
#

oh

#

that one wooshed

gray merlin
#

xD

eternal night
#

Well anyway, please don't force base64 on people

tender shard
#

@eternal night can you help me quickly, only takes 30 seconds

eternal night
#

beyond that, gl with the PR, md_5 is really keen on nbt in the API

tender shard
#

I will DM you on spigotmc

eternal night
#

sure

tender shard
#

and you just reply to it

gray merlin
eternal night
gray merlin
#

:kekw:

tender shard
#

okay done, pls reply

eternal night
#

got you

tender shard
#

because if I am not mistaken, your reply will trigger my DM auto responder

eternal night
#

yea I did

tender shard
#

which is stupid since I started the convo

#

thanks ๐Ÿ™‚

worldly ingot
#

It does do that, yeah

eternal night
#

I am not looking for plugin support tho

worldly ingot
#

That bug has been around since forever

tender shard
#

yeah I just wanted to report this in the forums because it confuses people A LOT

eternal night
ornate patio
wet breach
#

well it needs to somehow disconnect from the websocket but I guess maybe you are suppose to do that?

#

wouldn't really make sense nor a good api if you are having to do all these extra steps to just simply disconnect XD

ornate patio
#

i cant even find a WebsocketConnection anywhere in TwitchClient

wet breach
#

which would be neovisionaries

#

I would probably at this point find something better then twitch4j

#

or just do it yourself or something lmao

#

their documentation is like not very helpful or non-existent

ornate patio
#

mm okay

#

although i rlly would like to use twitch4j because i did a lot of testing with it in a seperate app already

#

its also the only async api i found so far

wet breach
#

Well I mean you can use it, pull twitch4j into your IDE and maybe you can attempt fixing the dependency on it

#

odds are you probably just need to update that dependency and it will be fixed XD

ornate patio
#

mm okay

#

thanks for ur help ima get back to this later

#

i tried ```java
if (twitchClient != null) {
twitchClient.getChat().leaveChannel(channelName);
twitchClient.getChat().disconnect();
twitchClient.close();
}

#

same issue

#

whatever idk

tender shard
#

is twitchClient instanceof AutoCloseable?

ornate patio
#

no

tender shard
#

oh ok

ornate patio
tender shard
iron glade
#

Native speakers, do I say A message being added under / below / underneath the description ?

ornate patio
#

below

#

doesnt matter though really

iron glade
#

okay thanks :)

ornate patio
mighty bane
#
                plugin.getConfig().set(place, loc);
                size++;
                plugin.getConfig().set("tailsize", size);
                feed.destroy();
                plugin.saveConfig();```
Okay so here is the code I am using to store a list of locations in a config file however each location is being set to the same variable each time a new location is added to the file. Any idea how to get it to stop over writing every location stored in the file?
tall dragon
#

why dont you just use.. well a list?

iron glade
#

Can you give some more context to that code?

mighty bane
tall dragon
#

so turn list<location> into list<string>

#

and back

mighty bane
severe oak
#

?paste

undone axleBOT
mighty bane
tall dragon
#

and what was the problem

#

that works fine if you do it right

mighty bane
mighty bane
tall dragon
#

currently playing a game but willing to help if im done and ur still strugling

iron glade
mighty bane
#

lol

mighty bane
mighty bane
iron glade
iron glade
#

I think I've done that in the past, though I'm not sure if it is really the best method

#

but it works

mighty bane
#

The main problem I was experiencing was that the config would change all saved locations and not just the one referenced.

#

Like all I'm trying to do is delete a placed block after it has been around for 5 ticks.

reef lagoon
#

is there a way to check if a player is holding a charged bow or an uncharged one

tall dragon
# mighty bane Sure, I think I'm gonna try some other stuff first but if I have to use a list t...

as @iron glade described

    public void toLocations(List<String> raw)
    {
        List<Location> output = new ArrayList<>();
        for (String s : raw) {
            output.add(toLocation(s));
        }
    }

    public Location toLocation(String raw)
    {
        String[] spliced = raw.split(":");

        UUID world = UUID.fromString(spliced[0]);
        double x = Integer.valueOf(spliced[1]);
        double y = Integer.valueOf(spliced[2]);
        double z = Integer.valueOf(spliced[3]);
        
        return new Location(Bukkit.getWorld(world), x, y, z);
    }

you can figure out how to get it from Location to string yourself i trust

mighty bane
#

Thanks

mighty aurora
#

Quick question. I am currently trying to give blindness to all entities within a radius of a player. I know how to get the nearby entities(player.getNearbyEntities(x,y,z)) What I don't know is how to give those entities the blindness effect. I know how to add the blindness affect to specific players but not how to do this. Can anyone help me?

mighty bane
shadow zinc
#

can I cast JavaPlugin to my main class, even if I am using an API?

vague oracle
#

Depending on the version you might need to cast to living entity

mighty aurora
#

Im in 1.19

#

and it said it could not find addPotionEffect in Entity

#

And well I primarily want the effect to be given to players but I thought it would be easier to just do all entities. Do you know if I could just use p.getNearbyEntities(20,5, 20).forEach(Player -> Player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 10, false, false))

vague oracle
#

do you only want to get nearby players?

mighty aurora
#

Yeah

vague oracle
#

player.getWorld().getNearbyPlayers(player.getLocation(), radius).forEach(foundPlayer -> foundPlayer.addPotionEffect());

mighty aurora
#

it doesn't appear to

vague oracle
#

og

#

oh

#

that might be paper

mighty aurora
#

I was gonna use paper but several things weren't working so I switched back to spigot

vague oracle
#

damn paper is so nice xD

sly surge
#

yes but paper is better

vague oracle
#

I have a quick question, is it better to make a local PlayerManager that keeps track of all players on all servers and stores them in a map. This map will contain an object with a uuid, name, rank enum and maybe 1 or 2 settings like message requests and friend requests. Or should I just store all these players in redis. Pros is that it doesn't make DB queries, quicker for players on the server, easier to code as you don't have to worry about async stuff. I can't see it using more than 0.5GB (which I don't mind sacrificing) evem with like 5k players which the server wont have any time soon xD

tall dragon
#

"playerHandler" ๐Ÿ˜„

vague oracle
#

That is helping answer my question :/ On a real it seems like that is personal preference and seeing like im the only dev it makes it more readable

sly surge
#

who deleted the screen

iron glade
sly surge
#

i didn't have time to see it but it looked funny

sly surge
atomic swift
#

how can i pass CommandSender to Player

delicate lynx
#

you mean cast it?

atomic swift
sly surge
delicate lynx
#

just cast it like any other variable

vague oracle
#

Tbf that is a good point. I didn't think of that, I have the same idea running for servers as it can run on mutliple proxies but max there would only be 10 servers and they don't update as often so incorrect data didn't really matter. Then when it loaded it just read it from the cache. But players would join/leave/change servers update data more often so that's probably not a sustainable way to do it.

sly surge
#

Your data needs to be stored hard somewhere at some point

#

You can make DB async requests + cache some things. That way the players don't see the difference

vague oracle
#

For example how would I go about someone disabling their messages, as that needs to update asap. But lets say the player is cached and expires every 3 seconds, if it is already cached and someone tries to message them then they can, even though the player messages are off.

sly surge
#

If you update the cache when you change the option?

#

I would say imo that there's no perfect solution to this problem

atomic swift
sly surge
atomic swift
# sly surge Code?
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("bledit")) {
            if (!(sender instanceof Player)) return true;
            editorgui.openEditor((Player) sender);
        }
        
        return true;
    }
#
    public static void openEditor(Player player) {
        Gui gui = Gui.gui()
                .title(Component.text("GUI Title!"))
                .rows(1)
                .create();
        
        
        GuiItem guiItem = ItemBuilder.from(Material.STONE).asGuiItem(event -> {
            event.getWhoClicked().sendMessage("you clicked which means this is working");
        });
        gui.setItem(4, guiItem);
        
        gui.open(player);
    }
sly surge
#

NoClassDefFoundError: dev/triumphteam/gui/guis/Gui

sly surge
atomic swift
#

maven

sly surge
atomic swift
#

nope

#
<dependency>
  <groupId>dev.triumphteam</groupId>
  <artifactId>triumph-gui</artifactId>
  <version>3.1.3</version>
</dependency>
sly surge
#

you must unless you already have it on your server

shadow zinc
#

How am I meant to handle a dependency of my main class for my interface?

#
public interface Tps {
    DataManager DATA_MANAGER = NeoPerformance.getDataManager();
    default double getTPS(NeoPerformance plugin) {
        return plugin.getHeartBeat().getUpdatedTPS();
    }```
worldly ingot
#

Not entirely sure why that's an interface to begin with

shadow zinc
worldly ingot
#

If that's your only method, and it's a default method, it should just be a class lol

shadow zinc
#

No I have many methods

#

I am just showing the first few lines

#

?paste

undone axleBOT
shadow zinc
dim bronze
#

Looks like it can be a class to me as there is nothing to inherit

worldly ingot
#

Those are all default methods. Yeah. That should really just all be a class

#

No reason whatsoever for that to be an interface

shadow zinc
#

So whats the main reason to use an interface?

worldly ingot
#

It actually kind of looks like a good candidate for a utility class

#

Interfaces are a contract that guarantee an instance has a method

#

List, for instance, is an interface. Regardless of what type of List you're using (whether it be an ArrayList or a Deque), they all have #add()

shadow zinc
#

So if you define a method for an interface in one class can another class use that method?

worldly ingot
#

Sure, so long as you're passing the interface type

shadow zinc
#

thats cool

worldly ingot
#
public interface MyInterface {

    public void thisMethodExists(String value);

}

// Somewhere else
public void doSomething(MyInterface foo) {
    foo.thisMethodExists("Hello world!");
}```
#

So now no matter what, any class that implements MyInterface can be passed into that and it's guaranteed to implement that method

shadow zinc
worldly ingot
#

I think that's a Lombok annotation or something, which would automatically generate that code

#

But no you can make your own

public final class MyUtility {

    private MyUtility() { }

    public static void doSomething() {
        // Do something
    }

}```
wise mesa
#

is it possible to use special source with java 18

worldly ingot
#

Just means you finalize your class, have a private constructor, and it contains only static methods

shadow zinc
#

and its okay if I pass my plugin instance through the private constructor of that utility class?

worldly ingot
#

You wouldn't be able to because it's private. Utility classes aren't instantiated

#

Ideally you'd just pull a static instance of your plugin in that class

shadow zinc
#

I'm trying to keep everything DI

wise mesa
worldly ingot
#

None of those methods look like they need an instance of things though. At most, maybe passing in your plugin and DataManager instances

#

Hence the reason all those methods could be static. None of them rely on instances of things. They just seem like general utilities

shadow zinc
#
    default double getTPS(NeoPerformance plugin) {
        return plugin.getHeartBeat().getUpdatedTPS();
    }```
#

this needs the heartbeat class to get the tps

worldly ingot
#

Yeah. Though imho that just seems like an unnecessary class because anywhere you have your plugin instance you'd just call plugin.getHeartBeat().getUpdatedTPS() instead of running it through some utility

shadow zinc
#

true

worldly ingot
#

Design patterns like this take some getting used to and you'll get better with them in time

#

They're a little tough to wrap your head around

shadow zinc
#

Yeah thats why I am trying to learn of them now, I just understood builder patterns yesterday which has helped my code a lot.

worldly ingot
#

Even then, there's more than meets the eye. Builder patterns are generally used in cases of immutability

shadow zinc
#

Wdym by that?

#

Just a constant method and no variables that change?

worldly ingot
#

Sort of. An immutable object can be seen as "read only"

#

Nothing internally should be changed by its callers

#

I think the LootTable interface is immutable in Bukkit

shadow zinc
#

Oh right, but you have getters and setters?

worldly ingot
#

You would have getters, no setters. The setters would be done in the builder

#

(which LootContext has :D)

#

This is generally speaking by the way. More or less a practice a lot of people will abide by but it's certainly not written in stone

shadow zinc
#

Well I can see why its done, and generally it does make things cleaner

worldly ingot
#

Sorry, tangenting lol

wise mesa
#

does anyone know if theres a way to make special source work with java 18

worldly ingot
worldly ingot
wise mesa
#

tragic

tender shard
#

yo choco, seems like md5 considers the auto-reply to original DM initiator as feature and not as bug D:

wise mesa
#

i don't think j18 even has any new language features

shadow zinc
wise mesa
#

i just want to use simple web server ๐Ÿ˜ญ

tender shard
#

simple = lightpptd
kinda simple and powerful = apache
not simple, halfway powerful but fast = nginx

#

imho apache is the best balance between powerful, performance and easy to setup

wise mesa
#

my plan was to embed a web server in my plugin that people could proxy pass to from apache or nginx

tender shard
#

oooh

#

why would anyone use a spigot plugin for stuff like this

wise mesa
#

like in dynmap for example

tender shard
#

oh yeah but no

#

that might work for a server with less than 1000 requests per minute

wise mesa
#

its not that complicated i just want to automatically serve a resource pack

tender shard
#

oooooh

wise mesa
#

and the resource pack is built at runtime

tender shard
#

yeah then, go for it, use java's builtin webserver

hasty obsidian
#

Does anyone know why my code doesnt work?

wise mesa
#

?paste

undone axleBOT
ornate patio
#

Is it possible to detect when a player starts and stops jumping? I need a way to keep running a task as long as a player has the space bar held down

sly surge
ornate patio
#

damn

#

Is it possible to see if the player is holding down right click?

#

Iโ€™d assume so

waxen plinth
#

Short answer is no

shadow zinc
#

in the air it does nothing right?

waxen plinth
#

Not unless you check for them right clicking at the interval right clicks are sent at by the client when holding

#

But I'm not sure if that varies (in ticks) with serverside lag

tender shard
# waxen plinth Short answer is no

yo redempt I recently stalked redlib and I found out that you do something similar to me with this "getPlugin()" stuff that gets the calling plugin right?

waxen plinth
#

Yeah

#

It can be useful

sly surge
shadow zinc
#

Lol

tender shard
frank kettle
tender shard
#

meow

#

i know you from somewhere

shadow zinc
frank kettle
#

Sorry

#

I go back to my cave

#

๐Ÿ’€

shadow zinc
#

๐Ÿ˜ข

frank kettle
tender shard
tender shard
frank kettle
tender shard
#

ohhhh

#

you're the legacy material person haha

frank kettle
#

Shut up, don't call me that

#

๐Ÿ˜ญ

#

Not my fault the good thread about signs was old and used legacy materials

tender shard
#

people kept complaining about my PR btw

frank kettle
#

What's pr?

tender shard
#

pull request

shadow zinc
tender shard
#

๐Ÿฅฒ

#

anyway I hope it gets merged anyway

frank kettle
tender shard
#

IT IS

#

SINCE 1.13

#

i told you that yesterday already ๐Ÿ˜›

frank kettle
#

Oh, the old one

tender shard
#

there is no "new" MaterialData

frank kettle
#

But for me it wasn't showing anything

tender shard
#

MaterialData was a weird mixture between blockstate and blockdata

frank kettle
#

That's why you did the pull

wise mesa
#

imagine using materialdata when you could use recipechoice

wise mesa
#

well that only applies for custom recipes

#

ignore please

tender shard
#

ok lol

wise mesa
frank kettle
tender shard
#

OMG md5 was right, all of this shit should be deprecated

wise mesa
#

believe so

tender shard
#

I will write a script to PR making everything that uses it deprecated

wise mesa
#

yea that took me a bit to figure out when i was making custom recipes

late sonnet
tender shard
#

MaterialData should have been removed in 1.13

#

nah, for real

wise mesa
#

i was confused at first because the material data one wasn't deprecated

tender shard
#

it was announced for years that stuff like that must be gone

wise mesa
#

but the class itself is right

tender shard
#

even using material IDs is still possible

eternal night
#

only a few methods still return material data

tender shard
#

yeah but none of those is deprecated

wise mesa
#

well this one takes material data lol

tender shard
#

(at least not in spigot)

eternal night
#

:>

tender shard
#

i know that lynx is a paper freak, and this is one of the rare cases where I agree with them that it shouldnt even be deprecated, but removed completely

#

legacy material support is so unneccessary :<

late sonnet
#

Very strange see a removed thing in spigot ablobtrash

frank kettle
wise mesa
#

let's estimate what percentage of plugins with actual support for 1.19 use legacy materials

worldly ingot
#

None of its methods are deprecated because MaterialData itself is deprecated. Any attempt at using MaterialData would display at deprecated anyways so there was no real point in doing it

tender shard
#

if it all, I'd vote for the whole material enum to be replaced with sth like in vanilla - a blocks class for blocks, and an items class for items

eternal night
#

WIP

wise mesa
#

yea the function doesn't show as deprecated even though it takes a deprecated parameter

#

like in intellij or whatever

tender shard
#

If you do myBlock.getState().getData().getSomething(), then INtelliJ does NOT mark it as dep

eternal night
#

that single PR is worse than papers PR queue

wise mesa
#

you could avoid ever seeing the horrid strikethrough

frank kettle
tender shard
#

so saying "just because the return value is dep makes you know that you shouldnt use it" - nah, thats not true. at least not in intelliJ ๐Ÿ˜ฆ

late sonnet
#

The queue thing remindme check if need rebase again sadCatt

eternal night
#

๐Ÿ˜ญ

wise mesa
frank kettle
#

Maybe someday

wise mesa
#

literally take 2 minutes

frank kettle
#

When I actually release plugins to public

wise mesa
#

do you have a spigot account?

frank kettle
#

I have a few but don't feel like they are what I am right now

tender shard
#

inmho getData() should be "strikethourhg" / deprecated

#

on first glance, it looks "fine"

#

you literally have to know that MaterialData is dep

frank kettle
#

Gladly I had alex to assist me, or I would have legacy support on my servers forever ๐Ÿ’€

#

And server lag everytime after a restart ๐Ÿ˜ญ

tender shard
wise mesa
#
Block block = null;

ItemStack diamond = new ItemStack(Material.DIAMOND);
ShapedRecipe diamondRecipe = new ShapedRecipe(new NamespacedKey(this, "diamond"), diamond)
  .shape(
    "bbb",
    "b b",
    "bbb")
  .setIngredient('b', block.getState().getData().getItemType());
#

alex give that one a try

#

see if there's any strikethrough anywhere

tender shard
wise mesa
#

i feel like im in a similar position

frank kettle
shadow zinc
eternal night
tender shard
shadow zinc
#

๐Ÿคช

tender shard
#

that's why I proposed to mark it deprecated ๐Ÿ˜„

eternal night
#

perfection

#

Well does not look like too many places actually call it

tender shard
#

yeah it's like 10 things in total in bukkit

#

havent counted but its definitely not too many

eternal night
#

ahhh the good life

tender shard
#

fucking shit, I lost my keys

worldly ingot
#

MaterialData was a good attempt at abstracting out byte data pre-1.13

#

It had a great use

tender shard
#

I am literally in my apartment but I cannot find my keys

#

I CANNOT GO OUTSIDE

eternal night
#

true that xD material data worked

#

then got clapped

worldly ingot
#

It was incomplete, but yes it worked

tender shard
#

I still sometimes wonder, why are somethings BlockState and others are BLockData

#

arent both basically the same thing?

eternal night
#

no

#

not even close

tender shard
#

whats the technical difference?

worldly ingot
#

BlockState = tile entity
BlockData = the states a block can have

#

e.g. chest[facing=north] is a BlockData

eternal night
#

well block state does not have to be a tile entity

worldly ingot
#

the Chest tile entity is a BlockState

eternal night
#

but like, block state is the entire block plus any data attached

#

block data is yea ^

tender shard
#

yeah normal blocks also have a blockstate

eternal night
#

what choco said

#

block data is just a nice abstraction over the giant baked id map

worldly ingot
#

Normal blocks do have a block state, but it's not necessarily a TileState

#

TileState is a tile entity, BlockState is kind of just an abstract state, but it doesn't have much in it

tender shard
#

well sometimes it just feels weird. a sign can have text and a "direction". although you need the blockdata to get the direction but the state to get the text

worldly ingot
#

Right because there are actually 8 different sign blocks, they're just hidden

eternal night
#

Well they are completely different in mojang too

tender shard
#

it just feels a bit random but it's probably something to do with how mojang made it

worldly ingot
#

Every individually faced sign is a different block type

#

There are 6 stone buttons for instance. One on the floor, the wall, and the ceiling, and one for each power state on or off

#

Those are BlockData

wise mesa
#

quick question guys

#

how does getConfig().addDefault work

#

don't answer yet

eternal night
wise mesa
#

so I have some code that looks like this

#

but it never actually added anything to the config

eternal night
#

can we answer now ?

wise mesa
#

yes

eternal night
#

copyDefaults, crying

#

YAY

wise mesa
#

omg

worldly ingot
#

You have to tell it to copy defaults

wise mesa
#

my bad

#

that makes a lot of sense

#

i knew there was some kind of function like that

#

thanks guys

eternal night
#

don't thank us yet kekw

wise mesa
#

where is the copyDefaults function?

#

oh wait

#

ignore

#

don't respond

#

dumb question

eternal night
#

it is on the configs options

#

bam

#

responded anyway

wise mesa
#

๐Ÿ˜ญ

eternal night
#

here even the javadoc link ๐Ÿ‘

wise mesa
#

ok wait i actually wouldn't have found that

#

so thanks

eternal night
#

lmao xD

tender shard
#

omg

#

I found my keys again

#

I searched for 10 minutes

#

I said to my bf "omg did you see it, maybe its under the blanket you put on the couch for the dog"