#help-development

1 messages ยท Page 2086 of 1

simple silo
#

the default world is just called "world"

#

in server.properties:
level-name=world

wet breach
#

I wonder if its because of your recursive call

#

or maybe the asserts not entirely sure because you only give us pieces of code

simple silo
#

it definitely goes over every file, the file.delete() call also returns true (because assert doesn't throw error) but the files don't get deleted

wet breach
#

are you deleting the files first before you unload the world?

simple silo
#

no

wet breach
#

hmmm, do you turn off world saving?

simple silo
#

you see the deleteWorld call is after the Bukkit.unloadWorld call

simple silo
wet breach
#

its a config option and there is api methods to turn it off

#

but without being able to see exactly what you are doing we can just keep guessing ๐Ÿ™‚

simple silo
#
package com.tlw.sg.gamestate;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.WorldCreator;

import java.io.File;

public class SettingsState extends GameState {
    @Override
    public void start() {
        title = ChatColor.DARK_GRAY + "SettingsState";
        World oww;
        World nw;
        World ew;
        if ((oww = Bukkit.getWorld("NW_OverWorld")) != null) {
            Bukkit.unloadWorld("NW_OverWorld", true);
            deleteWorld(oww.getWorldFolder());
        }
        if ((nw = Bukkit.getWorld("NW_Nether")) != null) {
            Bukkit.unloadWorld("NW_Nether", true);
            deleteWorld(nw.getWorldFolder());
        }
        if ((ew = Bukkit.getWorld("NW_TheEnd")) != null) {
            Bukkit.unloadWorld("NW_TheEnd", true);
            deleteWorld(ew.getWorldFolder());
        }
        World nwOverWorld = new WorldCreator("NW_OverWorld")
                .environment(World.Environment.NORMAL)
                .createWorld();
        World nwNether = new WorldCreator("NW_Nether")
                .environment(World.Environment.NETHER)
                .createWorld();
        World nwTheEnd = new WorldCreator("NW_TheEnd")
                .environment(World.Environment.THE_END)
                .createWorld();
    }

    @Override
    public void stop() {

    }

    public void deleteWorld(File path) {
        if(path.exists()) {
            File[] files = path.listFiles();
            assert files != null;
            for (File file : files) {
                if (file.isDirectory()) {
                    deleteWorld(file);
                } else {
                    assert file.delete();
                }
            }
        }
        assert path.delete();
    }
}

wet breach
#

if the directory is empty IE a path that doesn't exist, the methods you are using still return true

#

because well it checks if it doesn't exist

#

and if it didn't exist before, well its true ๐Ÿ™‚

simple silo
#
public void deleteWorld(File path) {
        if(path.exists()) {
            File[] files = path.listFiles();
            assert files != null;
            for (File file : files) {
                System.out.println("file.getAbsolutePath() = " + file.getAbsolutePath());
                if (file.isDirectory()) {
                    deleteWorld(file);
                } else {
                    assert file.delete();
                }
            }
        }
        assert path.delete();
    }
```like that?
wet breach
#

well yeah somewhere output the path being sent to the method

#

so you can see if its getting the correct path

#

I have suspicion this might be your issue

simple silo
#
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/session.lock
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/uid.dat
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/data
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/data/raids.dat
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/poi
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/poi/r.-1.-1.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/poi/r.-1.-2.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-1.0.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.0.0.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.0.-1.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-1.-1.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-2.-1.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-2.0.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.0.-2.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-1.-2.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/region/r.-2.-2.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/entities
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/entities/r.-1.-1.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/entities/r.-1.-2.mca
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/level.dat_old
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_OverWorld/level.dat
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/session.lock
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/uid.dat
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/DIM-1
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/DIM-1/data
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/DIM-1/data/raids.dat
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/DIM-1/poi
[11:33:02 INFO]: [SG] [STDOUT] file.getAbsolutePath() = /mnt/minecraftbukkit/./NW_Nether/DIM-1/poi/r.-1.-1.mca
#

there were more lines but the max length for a msg is 4000

#

but it seems right, doesn't it?

kindred valley
#

hello guys i made setspawn command its working normal but when i call it after reloading server, server teleporting me to 0 0 0.

#

when im reloading server the x, y and z is setting to 0

wet breach
#

So, are these files symbolic links at all?

#

if they are that could be the reason too

slim kernel
#

How can I make this in a yml? I need to be able to go through all the plots with for each or smth and check the coords...
Should look like the picture

wet breach
#

also, since this is a mount location, should ensure that the Java user in question has delete permissions

#

or that the mount flags are correct lol

wet breach
#

I thought maybe assert could have been the problem lol

quiet ice
#

It probably causes file.delete to not run

simple silo
simple silo
quiet ice
#

At least I think so. Lemme look at the bytecode

simple silo
#

Result of 'File.delete()' is ignored
what should I do against it then?

#

ignore it?

quiet ice
#
GETSTATIC de/geolykt/starloader/DebugNagException.$assertionsDisabled Z
IFNE E
INVOKESTATIC de/geolykt/starloader/DebugNagException.boolExpr()Z
IFNE E
NEW java/lang/AssertionError
DUP
INVOKESPECIAL java/lang/AssertionError.<init>()V
ATHROW
E:

Yep, it ignores it

wet breach
#

just remove asserts

#

not really needed

quiet ice
ornate mantle
#

is there a way in which i can disable the usage of smithing tables?

simple silo
#

yeah, it was it lol

#

thanks for help

simple silo
quiet ice
#

You can configure any IDE you know

#

at least any decent IDE

ornate mantle
#

i wanna disable the functionality of smithing tables

quiet ice
#

?jd-s

undone axleBOT
noble lantern
ornate mantle
noble lantern
#

prevents a player from ever opening it

quiet ice
noble lantern
#

you could

#

cancel the InventoryOpenEvent

#

if instance of SmithingTable cancel

#

either or works

ornate mantle
#

i mean

#

i want it to be usable as a building block

#

say i right click on it with a block

#

with the intentions of placing said block

#

will that cancel the block placement?

noble lantern
#

okay so then use InventoryOpenEvent then ๐Ÿ™‚

ornate mantle
#

lol alr

noble lantern
#

yeah your right

ornate mantle
#

thanks

noble lantern
#

that would indeed cancel block places when you place blocks against it

slim kernel
#

How can I make this in a yml? I need to be able to go through all the plots with for each or smth and check the coords...
Should look like the picture

quiet ice
#

I recommend to not store data as yml

slim kernel
#

where then

smoky oak
#

configs as yml are fine tho right?

simple silo
quiet ice
#

YML is around 100 times slower than bytebuffers from my experience. Probably around 200+ times slower than a raw DataOutputStream

quiet ice
smoky oak
#

im asking formy configs

#

which part is slow tho? reading in or handling?

quiet ice
#

Everything is slower if the data is less compact

#

Though IO will suffer the most

smoky oak
#

no i ask bc i do FileConfig config_struct = getRersoucr("config_struct") at the beginning of my code

#

then parse that

#

*pass

quiet ice
#

But for configs yml is fine as you will not have configs that are multiple MB is size

smoky oak
#

...maybe?

#

anyways, as far as i see, it's the I/O thats slow with yml right?

quiet ice
#

Yes, as you are probably going to discard all yml-specific containers afterwards either way

smoky oak
#

ok thanks

quiet ice
#

Basically the path of yml is: raw bytes (-> string) -> tokens -> java objects -> yml object -> your config object

simple silo
#

what is the best way to build a spawn area in a world?

wet breach
#

one block at a time

simple silo
#

oof

wet breach
#

depends what you are doing

#

generally easiest to just use schematics

simple silo
#

schematics?

#

serialize/deserialize block arrays?

wet breach
#

well your question wasn't really specific

#

so...if it was me, I would use schematics to store the structures to load up

#

schematic structure like what worldedit uses for example

#

just uses NBT data

simple silo
#

I got a random generated world where all players (around 16-32) are getting teleported into when the game starts, I need to insert a spawn area where every of these players have a specified spawn location then

cursive fulcrum
#

Hello, fellow programmers. Is there a way to detect if a PrepareAnvilEvent is the one called when a player clicks the result item?

noble lantern
crude loom
#

Is the ip passed to getServer().getBanList(BanList.Type.IP).addBan(ip,"reason",null,"some source")
The same ip I get from player.getAdress.toString()?

crude loom
#

What do you mean?

noble lantern
#

ie logging player.getAddress().toString()

crude loom
#

Oh, yeah I'm saving it in a config

wet breach
noble lantern
#

IIRC it doesnt return the same IP they're connected (IPv4) with it returns something else but you'll have to check (I think it returns IPv6)

crude loom
noble lantern
wet breach
#

banip doesn't automatically kick them

crude loom
#

Yeah I know, I mean they can still relog

terse arrow
#

I need a way to give a specific texture/model to a single block of any type. So if i have a row of lets say iron ore, i need to set the texture/model of just one or just two, without actualy changing the type. Same goes for entities and inventory items

noble lantern
#

?cmd

#

?custommodeldata

#

this damn bot

wet breach
#

second you also need to ensure they can't directly connect to your mc servers in a bungee setup

#

otherwise it is the same as if the network is in offline_mode

terse arrow
noble lantern
#

not the palaced blocks texture

#

but the item block yes

#

for the block texture you need to use something with a block state

#

or... armor stands but... block states are better performance wise

#

NoteBlocks are good for this

#

you can set the state while its an item

#

so when its placed it still has the same state

crude loom
terse arrow
#

the only problem is, that i cant change the actual type @noble lantern

noble lantern
terse arrow
#

basicly what im trying to do is something like a polishing plugin for viaBackwards to โ€žpatchโ€œ the visuals of a missing type in lower versions, by taking a texture stored in a res pack

#

well and do the same for entities and so on

noble lantern
#

so your trying to add in blocks for lower versions when they dont exist?

#

if so...

#

or are you trying to get your current plugin to support different version(s) without throwing errors?

glossy scroll
#

i dont think you can change block textures in the world

noble lantern
#

you indeed can

#

using BlockData

glossy scroll
#

Not without overriding other blocks?

noble lantern
#

you override the BlockState

#

so for noteblocks

#

you set the note and instrument

#

and you can change its texture that way

glossy scroll
#

Right but still

noble lantern
#

so in a way your overriding a block yes

glossy scroll
#

Right

noble lantern
#

but in reality your just overriding its state's texture

glossy scroll
#

Im talking about a completely new texture in the world

noble lantern
#

so you would basically register that state invalid by prevneting changes to that state

#

yeah completely new textures arent really possible

glossy scroll
#

Without overriding any existing textures

noble lantern
#

your gonna override something in some type of way

glossy scroll
#

You can have infinite block/item models

#

Those use nbt

noble lantern
#

yep, but as for blocks its relatively limited

glossy scroll
#

But arent visible in then world

noble lantern
#

as your limited to the different states a block can have

#

IIRC using noteblocks you can have around 150 new blocks added

#

then water logged double slabs

terse arrow
noble lantern
#

iirc only about 20 blocks suported that way

noble lantern
#

your better off asking the developer for help directly

#

instead of creating a hacky work around for it

terse arrow
#

its meant that way. For entities like glow squid as example its replaced by a regular squid with a โ€žglow squidโ€œ name tag, but only for those clients that use a version of mc that does not support glow squids

noble lantern
#

and your saying for clients that actually have glow squids its still doing that?

terse arrow
#

nope, for them its normal

#

copper ore looks like iron ore if your verison doesnt support ist, and thats what i mainly want to fix

noble lantern
#

i see

noble lantern
# noble lantern

so in that case your likely going to have to replace all generated ore with a custom block of your type like in here

#

Youll have to use BlockState and set a block in the world with that specific state, and from there prevent any state changes on that block

Then listen for braks and drop the RAW_IRON item that you have custom model data on

#

by no means this is simple at all

#

it takes lots of work to implement

#

this video should help get you going in the right direction if your 100% sure you want to go through with this

#

you can also use water logged slabs as a custom block too

#

youll need to use packets to change the mining speed unless you want to add in a mining fatige effect

glossy scroll
#

I personally would advise against this purely because these custom blocks are stikl acessible in normal multiplayer

terse arrow
#

In case of mining speed and all the game logic stuff, its is handled by viaBackwards, i just have to change the visuals

noble lantern
#

you would basically be creating your own custom block if your wanting to this

noble lantern
# noble lantern wym?

its a sacrifice if your wanting to add in custom blocks, youll lose functionality of certain states of blocks adding these in

#

you just have a event that prevents the state changes of blocks you want

noble lantern
#

also frost thats the first time trying the method you told me to try at 20tps and actually thats barely even noticable lmao

terse arrow
#

not entirely sure if i want to do it that way but thanks for the assistance ^^

noble lantern
#

theres a few different blocks that you can do it with not just noteblocks

#

ie mushroom blocks, unused block states like double waterlogged slabs

#

either way

#

your gonna have to make a custom block in some type of way using one of these methods

#

Block states are by far most efficient way to do this as they have no performance effect on your server

#

when you delve into the realm of Spawners and ArmorStands lag can get really severe with just a handfull of blocks

#

trust me i spent many hours and days working out the best way to handle adding in blocks :p

worldly ingot
#

Cancelling outgoing packets worked? Or did you end up going with something else?

mighty pier
#
        verybadwords.add("kys");
        verybadwords.add("ppnugget");
        if (e.getMessage().contains(verybadwords)){
            e.setCancelled(true);
        }``` how do i check if message contains something from arraylist
noble lantern
#

i ended up forcing a block update to the player directly and that made the actual flicker barely noticable

worldly ingot
#

PES_Think but you couldn't get it working before. What changed?

#

oic

noble lantern
#

you can slightly see a flicker but honestly im fine with that slight flicker compared to the previous flicker which was a full tick

worldly ingot
#

Yeah it's only noticeable if you're looking for it

noble lantern
#

better yet use regex but, that works

mighty pier
#

k

noble lantern
#

imma just say "no"

summer scroll
#

im the future theres gonna be a tutorial

#

how to add custom block no flickering

noble lantern
#

it will be written by me too

#

with 1100 words again

#

ill figure out the packet bs eventually

#

its just getting the block location from BLOCK_CHANGE that was proving difficult for some reason

crude loom
#

I'm trying to install this library and it says : Dependency 'com.github.cryptomorin:XSeries:VERSION' not found
Any idea why?

summer scroll
crude loom
#

Oh got it, thanks!

summer scroll
smoky oak
#

if i call item.getItemStack().setAmount(0), does it delete the item entity?

noble lantern
#

or

#

you can getItemStack().setType(Material.AIR)

#

both work

smoky oak
# noble lantern yessir

well cant in this case

private static void removeOneEach(HashSet<HashSet<Item>>[] iHHS_array) {
        HashSet<Item> collapsedSet = StructureScan.collapseNestedSetArray(iHHS_array);
        for(Item i : collapsedSet){
            i.getItemStack().setAmount(i.getItemStack().getAmount()-1);
        }
    }
summer scroll
#

In certain version it will delete the item if the amount is set to 0

#

But to be safe I add an amount check

#

Idk if it's a fact but it's from my own experience.

exotic jetty
kindred valley
#

Hello, is there any PlayerKillEvent

smoky oak
#

yes.

#

kinda

viral crag
#

generator-settings={} function in some reliable way yet?

#

is still guessing no, so it is time to dig out and override the generator

brave sparrow
viral crag
#

the entity one might be more suitable

noble lantern
#

Hes on 1.7 I think that name is changed on that version

viral crag
#

i hope not 1.7

noble lantern
#

Unless he updated hi project in recent hours

noble lantern
#

Its probably for modding i hope

viral crag
#

nothing like running an exploitable version! - living on the edge of self destruction

noble lantern
#

:))

#

I wish dragon block c mod would update from 1.7.10

#

It was such a damn good mod

crude loom
#

Is it possible to get an error from UUID.fromString("some string")?

noble lantern
#

Yes

#

I forgot the except exception thats thrown

#

But you can try catch it

viral crag
noble lantern
#

Theres another project called dragon block c being worked on but

crude loom
noble lantern
#

Its been 2 years my hopes are getting lower

noble lantern
#

Ie if I put BigButts as a string it would throw an error

crude loom
#

Oh alright

noble lantern
#

Normally you'll never run into this

viral crag
#

anything that does not fit the format would error

noble lantern
#

Unless a user edits the data manually

gleaming grove
#

Hi could someone give me example code of using Minecraft Server query connection?

viral crag
viral crag
noble lantern
#

Only thing is

gleaming grove
noble lantern
#

The OG author of that mod actually died (rip)

#

And his brother who is way newer to coding took on the project

#

So I assume that the code base would be pure tragedy to work with

viral crag
noble lantern
#

Someone is actively porting it though to 1.12

viral crag
#

yeah i saw dragonball super

gleaming grove
#

ok you think it's possible to extend minecraft query for custom packets?

noble lantern
#

Oh oof no updates since 2020

viral crag
modern vigil
#

What is a good Level to pass into log when logging a success message?

gleaming grove
modern vigil
#

Level.FINEST doesn't seem to have a handler

viral crag
#

most people already have to suppress the client blocklist lookup to prevent chat lag

viral crag
gleaming grove
#

one more question, is there other way to connect minecraft server with website besides of Query and Websocket?

viral crag
#

we will go with yes?

#

half of your questions are rather version specific and depends if teh server is online or not

noble lantern
#

Smh

river oracle
#

Bruh

viral crag
#

but most of the maps: sqauremap, bluemap, etc all communicate with the server for specific purposes. In general you would not want to query the server very much unless you want to increase latency

gleaming grove
#

I'm working on a piano plugin where by the Website client you are sending Melody and Notes information to the server so latency needs to be quite good

spiral aurora
#

hi im trying to make a villager go back to full health upon sleeping apparently this doesnt work

#
public class SleepEvent implements Listener {
    @EventHandler
    public void onVillagerSleep(EntityInteractEvent e){
        Entity entity = e.getEntity();
        if(entity instanceof Villager){
           Villager villager = (Villager)entity;
           if(villager.isSleeping()) villager.setHealth(20);
        }
    }
}```
#

did i use the wrong event?

viral crag
brave sparrow
#

EntityInteractEvent is when the player interacts with an entity

spiral aurora
#

ohhh

brave sparrow
#

i think

#

i may be wrong, i'm tired

#

let me check the jd

noble lantern
#

Also that methods deprecated on newer versions

#

The setHealth

#

Use Damageable

brave sparrow
#

never mind i'm wrong, EntityInteractEvent is when an entity interacts with a block @spiral aurora

#

but presumably the villagers aren't interacting with the bed

gleaming grove
brave sparrow
#

@gleaming grove you can write your own socket

noble lantern
#

^^

#

Or a REST server with spark

mighty pier
#

does getAbsorptionAmount() work on 1.8?

spiral aurora
brave sparrow
gleaming grove
brave sparrow
viral crag
#

the dynmap of pianos .....

viral crag
brave sparrow
#

@gleaming grove spin up a separate socket in your minecraft server

gleaming grove
#

I m not takiing about maps, but about piano player

spiral aurora
gleaming grove
#

i will try

noble lantern
#

From my experience in nodejs REST servers would be able to handle thousands up requests a second, yeah websockets are likely better though

Idk how java handles rest it might not handle it very well

brave sparrow
#

it's not about handling 1000 per second

mighty pier
#

how do i get player's absorption health?

brave sparrow
#

it's about how fast the connection is

#

with REST in any language you have to establish the connection every time

#

which is slower

noble lantern
#

Ahh I see now

viral crag
brave sparrow
#

yes really

noble lantern
#

Yeah webwockets stay open the whole time so its better

brave sparrow
#

he's sending each note from the UI as a separate packet

#

that's totally latency-bound

viral crag
#

doing it that way, yes it is

#

in reality though that is moot for most

brave sparrow
#

he wants a real-time piano to play from his website into his minecraft server

#

the architecture of the system is designed for what the system is actually supposed to be doing

#

REST has its place, this is not it

viral crag
#

yes dynmap performance shows that well just for realtime player updates

brave sparrow
#

the time between event and update is a lot less important for dynmap than it is here

#

if your REST call takes 0.5 seconds in this instance that's too long

#

you wanna be in the 1-10 ms range

noble lantern
#

Make tempo 4/4 and force requests to take one second

#

Ezzz

#

Worlds easiest metronome lmao

mighty pier
viral crag
#

@tropic idol which one has your registration in it?

noble lantern
gleaming grove
# viral crag yes dynmap performance shows that well just for realtime player updates

look REST is too slow to handle piece like that where each note is separated packet which has few fields with data https://www.youtube.com/watch?v=UbgMEcTMISc

The song "Korobeiniki" is based on a poem of the same name by Nikolay Nekrasov, which was first printed in the Sovremennik magazine in 1861. Its increasing tempo and the associated dance style led to it quickly becoming a popular Russian folk song.

Korobeiniki were peddlers with trays, who sold fabric, haberdashery, books and other small items ...

โ–ถ Play video
#

and there could be X users at the same time streaming this kind of music from own browser

mighty pier
#

oh right

#

its 1.18.2

#

im on 1.8.8

noble lantern
#

Was just about to link that

viral crag
#

you guys value player performance over server performance, i have no place in this conversation since there is no desire to mitigate the perceived issue

noble lantern
#

1.8 needs nms for that iirc

mighty pier
#

e

noble lantern
#

You can just run that socket server on a separate thread?

gleaming grove
#

for sure

modern vigil
noble lantern
#

It was just a baseline example

#

Not saying whats fastest or faster than what

modern vigil
#

Yeah, rust is way harder to learn compared to nodejs anyways

gleaming grove
#

I guess C server would be even faster

noble lantern
#

Assembly

#

Nah nah

#

Raw bytecode

#

Yes

gleaming grove
#

Binary

noble lantern
modern vigil
#

You need to manually manage memory

viral crag
#

looks for my generation bookmarks

brave sparrow
#

REST works through sockets anyway

#

it just disconnects immediately after receiving a response

tender shard
#

1.8 api is cursed

brave sparrow
#

there's no need to be passive aggressive about it lol

#

it's not personal

viral crag
#

not passive aggressive, our training obviously differs significantly

brave sparrow
#

trying to scale up sockets to a high number of connections isn't great, but in this use case it absolutely will not be a problem

#

the minecraft server will be unable to handle the players before these tiny sockets start to cause problems

noble lantern
#
  • slap it on a seperate thread
brave sparrow
#

it's not really about the threading

#

but also you can't just thread up to infinity lol

noble lantern
#

Its not but if one was seriously concerned about performance, running the socket on another thread is an option so your not on the main thread

hasty prawn
#

You can until your computer explodes WICKED

brave sparrow
#

i don't think anyone thought running the socket on the main thread was an option

#

you'd never do that

#

for this type of use case anyway

noble lantern
#

You'd be suprised

brave sparrow
#

if you did it you'd have done it wrong

#

that doesn't make it an option

#

lol

noble lantern
#

Ive seen people run discord bots on the main thread of a spigot plugin lmfao

brave sparrow
#

they're doing it wrong

#

that's not one option of how to integrate with a discord bot lol

noble lantern
#

Indeed they did lmao, I forgot who did it i beileve it was one of my friends a while back

hasty prawn
#

Conclure is here get your dictionary out

ivory sleet
brave sparrow
#

in which case it isn't running on the main thread

ivory sleet
#

^

noble lantern
#

Ide need to check what JDA runs as or the other lib java has

#

Java has 2 discord libs for some reason

ivory sleet
#

As far as I have witnessed, people just declare the callbacks synchronously

#

it has more than 2 I am afraid of

noble lantern
#

Oh no wtf

ivory sleet
#

but anyhow, a random thread pool won't help unless you can use it properly, that is knowing what implementation suits you the best, knowing the blocking coefficient and then making sure everything is still thread safe

brave sparrow
#

yeah

#

concurrent architecture is somewhat complex

ivory sleet
#

mye and sometimes devilish to test

viral crag
tardy delta
#

concurrency in rust is fun ๐Ÿ˜ณ

tender shard
#

what's the disease called again you can get when you cut yourself with rusty objects?

hasty prawn
#

Tetanus

#

?

tender shard
#

ah yes

#

i have to think about that everytime someone mentions rust

#

would be a nice name for some framework in rust

viral crag
#

what does the leading I mean?

tender shard
tender shard
#

interface

hasty prawn
#

Interface

viral crag
#

hmm, yeah not waht i am looking for

tender shard
#

but that's what it means

viral crag
#

Map<RegistryKey<World>, ServerWorld> map maybe

tender shard
#

what are you looking for?

#

World e.g. implements IWorldWriter

viral crag
#

overriding dimension order - so far I have figured out I need to set the keys before generation

tender shard
#

i have no idea what you mean with dimension order tbh lol

viral crag
#

setting intial spawn priority to nether, end, or overworld - default behaviour is forced to overworld

tender shard
#

in the constructor of ServerPlayer, the respawnDimension is set to Level.OVERWORLD. I don't think there's any "order" besides from that

viral crag
#

my other experiments resulted in mixed dimension chunk generation

tender shard
#

players also have an NBT compound tag called "SpawnDimension"

#

but it only gets read when players also have "SpawnX", "SpawnY", "SpawnZ" set

viral crag
#

i'll put that down as an additional note, thanks

tender shard
#

why tf is this working

public class Test  {
    
    public void doSth() {
        Test.this.hashCode();
    }

}
eternal night
#

why shouldn't it

viral crag
#

because you called it test?

tender shard
eternal night
#

That is not how that works

#

You can prefix your this access

#

With the class you reference

#

It is very useful in like lambda

tender shard
eternal night
#

Ye it's pretty useful

tender shard
#

wait, no

#

this works fine in lambdas without the class name

#
    public void doSth() {
        new ArrayList<>().forEach(element -> {
            this.doSth();
        });
    }
eternal night
#

Yes because you are not running into a name conflict

tender shard
#

when would I run into one?

eternal night
#

just plain names for fields ?

#

or actually

#

lemme give you an even better example

tender shard
#

oki

grim ice
tender shard
#

it makes sense when having an anonymous class

#

e.g. this

#
public class Test  {

    public void doSth() {
        new ArrayList<String>().forEach(element -> new Consumer<String>() {

            @Override
            public void accept(String s) {
                System.out.println(Test.this.toString());
            }
        });
    }
eternal night
#

oh yea

#

or that

tender shard
#

but for lambdas I don't really see any reason, they always only have one method

#

okay but yeah this makes sense for Class.this to exist

#

til

grim ice
#

Class.this sounds weird tho

eternal night
#

one gets used to it

tender shard
#

yeah that's why I wondered

tender shard
eternal night
#

Yea that is basically your usual usage

#

for lambdas it becomes kind of special

#

idk which release, but because your lambda basically becomes just a method invoke potentially, your thisstill references the "right" instance

viral crag
#

your class is self aware ๐Ÿ˜›

#

where did i put that purple square ?

#

intellij

tender shard
#

you called your intellij "purple square" and forgot where you put it?

crude loom
#

Is there a way to test if a material is a legacy material?

tender shard
crude loom
#

No? take for example acacia boat

tender shard
#

?

crude loom
#

It's enum is only: ACASIA_BOAT

tender shard
#

the enum is ACACIA_BOAT and it's not a legacy material

crude loom
#

Oh, did I confuse the terms?

#

I mean items the came out after 1.8

tender shard
#

material names changed in 1.13

#

before 1.13 it was just BOAT

#

since 1.13 it's ACACIA_BOAT, OAK_BOAT, etc

crude loom
#

Ah I see

#

Is there a way to detect the different names and convert it to the right version?

tender shard
#

there's XMaterial and XBlock

#

they support all versions

#

ofc they are ๐Ÿ˜„

#

they are called LEGACY_XY for a reason ๐Ÿ˜„

crude loom
#

I've tried to use XMaterial, but to be honest I am not succesful ๐Ÿ˜…

grim ice
#

racist

#

purple lives matter

viral crag
grim ice
#

no

viral crag
#

then do not throw down accusations

lunar yoke
#

Hi, I would like some help if possible with developing a plugin.
I am trying to load a class which is defined inside my plugin's jar file, but I keep getting the same error all the time: ClassNotFoundException.
The error trace says that the error happens in the method loadClass which is in the class java.net.URLClassLoader.
Has anyone experienced a similar issue or have any tips for what to do?

past brook
#

does anyone know how to add custom ore generation to my plugin? i have been trying to figure it out for a while but cant figure it out.

past brook
#

im trying to add custom ore generation but cant figure it out, i made a generator for a custom world but it needs ores

lunar yoke
#

So ig it's really caused by Bukkit's code

viral crag
#

i rather meant ide and maven or gradle

lunar yoke
#

Maven

#

Sorry, shade in which api?

viral crag
#

what does your plugin do? and do you have the full error?

lunar yoke
#

The classes I'm trying to load are present in the plugin's jar file

past brook
undone axleBOT
tender shard
#

ClassNotFoundException can have many causes, e.g. when the class couldn't be initialized

lunar yoke
#

I have a class from my plugin's jar that I'm serializing using Redisson, and I get this error when deserializing

#

The URLClassLoader doesn't seem to find the class in the jar

#

I have tried changing the classpath before starting the server, etc etc. However I always get this

vocal cloud
#

Pretty hard to know without the code.

lunar yoke
#

(presuming that the error is caused by it not being able to locate the class from the classpath)

lunar yoke
vocal cloud
#

I mean no one here is going to steal your code lol

viral crag
#

personally guesses they simply do not load their class

quick plank
#

How can i check if the folder for the plugin exists?

viral crag
#

look in the directory

quick plank
#

I fixed it

#

Thanks tho

tardy delta
#

plugin.getDataFolder().exists()

#

if you want it in code

quick plank
#

Ye ๐Ÿ‘

tender shard
#

this looks like the class really doesn't exist

#

btw your stacktrace doesn't reveal anything about your code besides the method and class names so...

#

not really a problem in sending it

#

what's "MarshallingCodec" line 148?

plucky igloo
#

Hey does anyone know how to show essentials money in scoreboard in version 1.16.5

tender shard
#

when you use code inspection too much and then annotated every method using other plugins APIs with this

@SuppressWarnings("NonThreadSafeLazyInitialization")
mighty pier
#

I want to make a config that stores playerdata and idk how to add playerdata in the config

tender shard
#

a custom config file or the included config.yml file?

mighty pier
#

custom config

tender shard
#

you can load existing custom config files with YamlConfiguration.loadConfiguration(File)

#

then you can use set(...) and getString(...) etc like usual on that config

#

then you can save it again using myCustomYaml.save(File)

mighty pier
#

ok ty

tender shard
#

if the file doesn't exist yet, just do YamlConfiguration myCustomYaml = new YamlConfiguration();

#

although IIRC if you try to load a "non-existing" config it just returns an empty one anyway

mighty pier
#

kty

tender shard
#

np

#

however, depending on what you wanna save, I'd suggest to use databases or the player's PDC instead

mighty pier
#

how do i use player's pdc

#

can i use it on 1.8?

tender shard
#

no

#

PDC was added in 1.14.1

mighty pier
#

k

#

idk how do make databases

tender shard
#

then stick to yaml files for now ๐Ÿ˜„

mighty pier
#

k

eternal needle
#

Hi i wonder if its a way i can hide a plyer but not hide in tab and not potions?

tender shard
#

Player.hidePlayer(...)

eternal needle
tender shard
#

really? I thought they did

#

then sorry, idk

#

well you could use packets

#

what MC version are you on?

mighty pier
#
        YamlConfiguration.loadConfiguration(playerdata);``` do i do it like this?
eternal needle
proper pawn
#

is there a useful link i can use so i know what .a and .b does for creating a npc with nms?

#

because youtube tutorials just have .getโ€ฆ

#

but i donโ€™t have that

eternal needle
tender shard
#

YamlConfiguration.loadConfiguration returns a new YamlCOnfiguration

tender shard
#

like this

tender shard
mighty pier
#

k

tender shard
#

then the methods aren't called "a" and "b" but have proper names

lunar yoke
proper pawn
tender shard
proper pawn
#

or is that a stupid question?

proper pawn
#

thank you

tender shard
#

np

#

it requires you to use mavne, though

#

for gradle, I have no idea how it works

proper pawn
#

yeah i have that

#

thank you so much

#

that would make it so much easier

lunar yoke
mighty pier
lunar yoke
vocal cloud
#

Just show the code

lunar yoke
# tender shard what's "MarshallingCodec" line 148?

It's a class used internally by Redisson, its job is to reconstruct the class objects that I've stored as bytes in my Redis server (sort of like how Java Beans works)
the problem is that it cant find the class I originally used to store the file into Redis

lunar yoke
vocal cloud
#

ic

tranquil dome
#

I am trying to run certain code the moment a player hits the floor. Which event should I use to check for Entity.isOnGround()?

viral crag
#

[21:00:59] [ServerMain/WARN]: Configuration conflict: there is more than one oshi.properties file on the classpath
[21:00:59] [ServerMain/WARN]: Configuration conflict: there is more than one oshi.architecture.properties file on the classpath

#

you might want to fix that too

#

[redisson-netty-2-11/ERROR]: Unable to decode data. channel: [id: 0xbf ... obfuscated code ?

lunar yoke
#

it's from when I was testing by changing my classpath (which didnt solve it)

viral crag
#

otherwise, that might be leading into the other if its confused

tranquil dome
#

What do you mean?

viral crag
#

when you say hits the floor, do you mean dead, swim, crouch , etc?

lunar yoke
lunar yoke
viral crag
#

well it can not talk to the server

#

eitehr the connection is incorrect or the data format is not matching

lunar yoke
#

I confirmed that it does talk to the server, because I managed to store a MyClass object into the server (the playerData.put line in the code).
When I try to load that MyClass from the server however, is when it throws all these errors

tranquil dome
viral crag
#

then you need to check your reading method

tranquil dome
#

It is for Player.isOnGround(), but what else could I use to check if the player hits the ground?

viral crag
#

bowevent -> delay -> check player on block

hot panther
#

Hey everyone, can someone pleeeaaase help me:

In the newest version, 1.18.2, I can't say entity#setInvisible(true), this Method does not exist.
So how can I create an ArmorStand entity that I can set Invisible?

lunar yoke
viral crag
#

goofy paste

lunar yoke
#

The code i sent is everything in the plugin

viral crag
#

then playerData.get(name) is incorrect for your data

lunar yoke
#

so, I actually tested this with other data types

#

If I use Strings in the map instead of MyClass objects, the playerData.get line works fine

#

I can get builtin Java types (such as String) from the map. But if I declare a map with my own types, I get these errors about it not being able to load my class.

viral crag
#

if i recall that would mean your constructor does not behave the way you think it should

hot panther
#

It does not...

chrome beacon
#

Use the API

chrome beacon
#

Don't use NMS

hot panther
chrome beacon
viral crag
#

that would be where you create your map for MyClass is it not?

chrome beacon
hot panther
#

But then this is not working...

grim ice
#

My mfing teacher

#

told me python which she spells (PITON)

#

isnt

#

object oriented

#

bro

#

what

#

fr?

#

damn i thought it was

#

google says it is

hot panther
mighty pier
#

path Players.UUID.kills?

coarse finch
#

how can i post an image here

#

ok

mighty pier
#

PlayerData.get().addDefault("Players. " + e.getPlayer().getUniqueId() + ".kills", 0);

#

like that?

coarse finch
#

damnit spigot blocked tor gotta wait till i get home

#

actually

#

i will try to describe teh issue

#

so i am learning plugin development, and in the premade file there are errors on the imports

#

how can i fix this

viral crag
#

blocked tor??

coarse finch
#

but

#

lets focus on the issue ;))

viral crag
#

intellij has tor support?

coarse finch
#

no

viral crag
#

then you should be fine

coarse finch
#

its not a tor issue

#

its an import issue

#

org.bukkit doesnt exist apparently

viral crag
#

where did you put it?

coarse finch
#

i didnt make it

#

i used intellij minecraft plugin

mighty pier
viral crag
coarse finch
#

ok how do i do that

mighty pier
#

but how do i add 1 to it

coarse finch
#

im using gradle

#

also spigot has tor blocked

viral crag
mellow edge
#

I use intellij Minecraft development plugin for spigot plugins

viral crag
coarse finch
mighty pier
#

how do i add 1 to it

viral crag
#

use a normal browser in incognito mode

mighty pier
#

i made it but i want the value to go up

coarse finch
#

its a block at the router level

#

incognito wont work

viral crag
#

vpn

lunar yoke
coarse finch
viral crag
lunar yoke
#

The only thing that goes wrong is reading out of the map

#

Not writing to it

viral crag
#

yes, as you stated: it does not behave as you think it should

#

so you either need to create access to how you think it should behave or use it as you currently have it setup

mighty pier
#

i dont know how to get the value

#

ok

coarse finch
#

where do i get the spigot api jar

viral crag
#

I have done this to myself before as well

lunar yoke
stuck flax
#

for plugin message channels an bungeecord how would you get the response

viral crag
#

okay, how do you think this works for you? : MyClass data = playerData.get(name);

regal lake
#

Has spigot no villager trade event ?

noble lantern
#

sec false

crude loom
#

Is it possible to create an ItemStack with the material id and not the enum?

noble lantern
#

and check if its instanceof MerchantInventory

regal lake
#

Really ?
Why... there are 3 other villager events ๐Ÿ˜„

Okay then i have to figure out how i get the trade ๐Ÿ˜…

noble lantern
#

when server starts up you'll need to get the villager and add MerchantRecipe's to the Villager

#

whats the events?

noble lantern
regal lake
crude loom
noble lantern
#

ah you can just use inventory click event and check if the slot clicked was the result slot and that the material isnt air

viral crag
regal lake
#

I would be so much cleaner with a dedicated event ๐Ÿ˜„

noble lantern
noble lantern
#

that sends out the selected MerchantRecipe

crude loom
lunar yoke
noble lantern
regal lake
noble lantern
viral crag
noble lantern
#

HandlerList.unregisterAll(this) after the event finishes

lunar yoke
quaint mantle
lunar yoke
noble lantern
viral crag
lunar yoke
#

I don't use it but that seems to be beside the issue since it crashes before I can get it. If there wasn't an error, I would infact be able to use MyClass

crude loom
noble lantern
#

like if you google RAW_IRON and go to the wiki

quick plank
#

Why do i get a warning Argument 'Main.getPlugin().langManager.getConfig().getString("noPerm")' might be null
From this? ```java
if (Main.getPlugin().langManager.getConfig().getString("noPerm") != null)
player.sendMessage(ChatColor.translateAlternateColorCodes('&',
Main.getPlugin().langManager.getConfig().getString("noPerm")));

noble lantern
noble lantern
crude loom
#

Thanks for the help!

noble lantern
#

you can null check it to get rid of that warning

quick plank
#

Am i not null checking it?

noble lantern
#

or is it a console error?

#

sorry i just saw that you are

noble lantern
quick plank
#

IntelliJ warning

noble lantern
#

okay so

#

String noPerm = Main.getPlugin().langManager.getConfig().getString("noPerm");

#

set it to an actual variable

#

and use the variable

quick plank
#

I know... I did that before, but

#

I need to be able to "reload" it because i have a reload command that reloads the .yml file

noble lantern
#

are you pulling that on every command

#

if so it will still reload it

#

if not youll need to reset the value with a reload() method

crude loom
#

That's what I'm trying to use๐Ÿ˜…

quick plank
crude loom
noble lantern
ornate heart
#

calling parse material gives you the material for that specific version

quick plank
crude loom
noble lantern
#

or you can just live with the intellij warning ๐Ÿ˜› either or

arctic moth
#

is there a way to change the server properties or do i actually have to go change the file

quick plank
#

But then i need to do the "reload" method in every class that is using the string, right?

noble lantern
#

its best to have a ConfigFile class that handles all your variables

#

that way you only have one class that deals with actually pulling the values

viral crag
#

public Map<String, MyClass> get(Object key) { return dataMapValue; } /me tries to recall if you need to create access functions for custom types? where is alex

quick plank
#

Yeah. But then i can just put the Strings inside the reload command?

noble lantern
#

you should be able to get("something") and it return MyClass

noble lantern
crude loom
keen basin
#

how to can i save hashmap Key(Location) value(ItemStack) i will save it in config and then restore it

quick plank
noble lantern
#

i cant remember if yaml supports saving a Map directly

viral crag
#

i like getOrDefault(Object key, V defaultValue) myself rather than just get

noble lantern
#

typically when i use HashMaps its something to do with data, so default value for me is just null which is what get() will return if non found ๐Ÿ˜›

keen basin
noble lantern
smoky oak
#
class a{
  Material m;
  public a(String s){
    new a(Material.getMaterial(s);
  }
  public a(Material m){
    this.m = m;
  }
}

Is this the correct way to do overloaded constructors?

viral crag
noble lantern
#

new a("hi") or new a(Material.AIR);

#

you can do same with methods too

#

a.hey("hey") or a.hey(Material.AIR)

ivory sleet
#

I mean that looks like the stack would overflow if you call a(String)

viral crag
#

time to eat something today

smoky oak
#

yea i just noticed

#

m is NULL

#

do you know why

#

lets see then

#

which causes the args to not get passed properly

#

yea that would explain it

#

okay now it fails wihotu an error

#

fun

#

at least the instanticing works

ivory sleet
#

instantiation?

smoky oak
#

whatever you want to call it

#

considering it actually failed in that class i know the code at least gets that far

#

apparantly not

#

welp

#

back to debugging

ivory sleet
#

ye

#

well Bradley told you I believe :3

smoky oak
#

wait

#

can someone explain the compiler error 'this has to be the first call'?

ivory sleet
#

context?

smoky oak
ivory sleet
#

oh

#

I mean thats just java

#

but well, its actually due to enforcement of initialization order

smoky oak
#

order in my code?

#

well I never!
๐Ÿ˜„

ivory sleet
#

wekk

#

well

#

this() has to be before anything else in the constructor

#

similar to super() in case you're invoking a super constructor

smoky oak
#

oh so thats what that is for

#

wait

#

that class is extending another abstract one

ivory sleet
#

I mean this() and super() calls another constructor of the same/super class without creating a new instance of the class

smoky oak
#

but if i write a constructor in that one i can call super() the same way as this(), right?

ivory sleet
#

mye if I understood u correctly, yes

smoky oak
#

that makes a lot of sense actually

undone axleBOT
ivory sleet
#

I mean not really

smoky oak
#

*similar to this(), calling the parent class constructor

#

thats what i meant

ivory sleet
#

ye

#

oh no worries, I am just picking on your words a bit

#

ye

#

thats very correct fingerguns

#

ye

#

they're succulent

smoky oak
#

im using maven to build do i need Kotlin?

grim ice
#

how do i make a player sit on a stair

#

I thought about spawning an entity

#

and assigning passenger

smoky oak
#

yea do that

grim ice
#

but that would be glitchy wont it

smoky oak
#

i recomend minecart

#

minecart wont

grim ice
#

oh

#

right

#

but cant the player move

#

if its a minecart

smoky oak
#

nope

#

nope

grim ice
#

how to make it invisible

smoky oak
#

set it invisible, remove hitbox etc. considering its an entity it should have functions for that

#

remember to remove the minecart when the player leaves it

grim ice
#

ic

viral crag
#

sit on a stair?

grim ice
#

lol

viral crag
#

apperently it still works despite not being updated since 2014

#

any money is too much for coc

#

yes

#

oof, you could have bought me a gold taco for that much

#

not really

#

woders if i battled you once upon a time

#

nope, played it for about a year or two when it first came out

arctic moth
#

how would i reset the seed

#

of a world

#

like comepletely regenerate it

viral crag
#

delete the world folders

#

thinks you need a different hobbie

arctic moth
#

and using a plugin

viral crag
#

that sounds like a very bad idea

arctic moth
viral crag
#

stop the server, delete the world folders, change seed in server.properties

#

if you have an admin console, some do it for you

sacred mountain
#

anyone know what this is lol

#

i just entered "/"

viral crag
#

its a message in your console

sacred mountain
#

i know but ive never seen it before

#

and i havent changed anything

viral crag
#

so... still a no

arctic moth
#

anyone else's testing server look like this lol

viral crag
#

you making a custom generator?

sacred mountain
arctic moth
sacred mountain
#

im mkaing an explosives

#

plugin

#

yeahhh

arctic moth
#

lol

viral crag
#

i hate this server - (fabric server i admin)

#

3/4 of the startup is garbage from incompatibilities, legacy warnings, and barfs from invalid code

#

is afraid that if I put it out of it's misery they will request another modpack

buoyant viper
lavish hemlock
#

Indeed

viral crag
#

of what? dumb ways not to maintain/support stuff?

buoyant viper
#

fabric is what happens when u give people too much power over the platform

#

(((mixins)))

hexed hatch
#

mixins do be kinda sexy tho

buoyant viper
#

oh yeah theyre amazing for modding

hexed hatch
#

yeah they're nasty but mmmfpph

buoyant viper
#

but when thats like the main way for people to really mod the game... ur bound to just kinda have a cesspool unless u use mods specifically tested for compatibility

#

forge has its incompatible mods too but

#

fabric is the wild west of mc modding

ivory sleet
#

so do u guys use yarn or mojmaps?

buoyant viper
#

yes

ivory sleet
#

(with fabric)

#

which one

ancient plank
#

yes

ivory sleet
#

myes

hexed hatch
#

yes

buoyant viper
#

whatever is provided by default so yarn

ancient plank
#

kappa

hexed hatch
#

yarn kinda yummy

viral crag
#

did you look at my server startup?

buoyant viper
#

oh yeah its fucking long

viral crag
#

it makes me want to cry

ivory sleet
#

Yeah I got a bit anxious as well

buoyant viper
#

wait wtf not enough crashes isnt just a client mod?

#

thats disgusting

#

at least client u could get away with like crashing while ur connected to a server

#

but server crashing??? why would u want to just ignore that

viral crag
#

it reduced the amount of messages

#

same with the Advancements Debug one

#

i found that and reduced the starup log errors from 8Mb to whatuver it is now

summer scroll
#

Um, I'm actually curious, when is the best way to use Record?

ivory sleet
#

the java class record?

summer scroll
#

yes

ivory sleet
#

They're by definition "immutable data carriers"

summer scroll
#

Is it fine to use it whenever I have only a private final fields on the class?

ivory sleet
#

mye

#

well main point is that its a shorthand to writing an entire immutable data class

#

like writing getters, constructor, hashcode and equals take some time

#

and it gets quite verbose

summer scroll
#

Okay, thank you

ancient plank
#

there's a button in intellij for generating getters!!!

summer scroll
#

Cuz I really loved it lol

ivory sleet
#

ye

summer scroll
ancient plank
#

or just use lombok

#

@Getter

summer scroll
#

xd

ivory sleet
#

well in addition records use invokedynamic for equals and hashCode

#

which is super fast :3

#

yes method handles

hexed hatch
ancient plank
#

I use it but also don't use it ngl

#

I like writing my getters/setters !

hexed hatch
#

it's cathartic

ancient plank
#

I'm gonna revolutionize the server I work for, gonna put menus everywhere.... chat messages overrated

ivory sleet
#

lol

hexed hatch
#

hot take but I hate menus as replacements for commands

#

I think when commands can be used, they should be used

#

and menus are good for when users need to manage data

ivory sleet
#

I mean when you can memorize a command, then its pretty much always faster to type than navigating a ui

ancient plank
#

zzzz

ivory sleet
ancient plank
#

players get angry when the chat is being spammed by command shite

ivory sleet
#

mye true

hexed hatch
#

well they should grow up

#

plus action bars ftw

ancient plank
hexed hatch
#

things that are ephemeral work just fine in an action bar

hexed hatch
ancient plank
#

I spent so long making this pagination interface, that I'm gonna use it >:(

quaint mantle
quaint mantle
#

ayo

hexed hatch
#

what

#

why did that escalate in that way

quaint mantle
#

indeed

ancient plank
#

there's a thing with the conversation api we have where you can't get messages while in it, iirc