#help-development

1 messages · Page 563 of 1

subtle folio
#

someone have a good explanation of maven modules and how I can use them in my project?

remote swallow
#

look at jefflib

echo basalt
#

Think of modules as sub-projects with their own little dependencies

subtle folio
#

what would be a use case though ?

echo basalt
#

One is NMS

#

A module for each version

#

Another is like uhh

#

A project that's made of multiple parts

subtle folio
#

Oh I see

echo basalt
#

For example I have a project that's like

subtle folio
#

like a library

echo basalt
#

spigot <-> web server

subtle folio
#

mhm

echo basalt
#

So I have a spigot module, a protocol module and a web server module

#

Spigot and web server both shade the protocol

subtle folio
#

okay okay

echo basalt
#

An that way I only do stuff once

#

Another use-case is like a plugin that has both bungee code and spigot code

subtle folio
#

yup yup

echo basalt
#

and a module for shared utils

#

you get it

subtle folio
#

yeah that makes sense thanks

echo basalt
#

I use modules on cosmos to have a sample plugin

subtle folio
#

do you have a doc or wiki page i can read

#

to learn how to make them?

echo basalt
#

baeldung's the goat

subtle folio
#

they truly are

wet breach
#

it makes it easier to provide an api jar

#

and the full jar

subtle folio
#

Like Bukkit and CraftBukkit

wet breach
#

yes

#

its one of the most common use cases for such things

subtle folio
#

craft bukkit being the implementation

wet breach
#

correct

subtle folio
#

okay cool,

#

would it make sense to made a library project that like

#

had a bunch of utils as one

#

but if i sepersted it into diff modules

#

you could pick and choose ?

wet breach
#

Sure, because maybe you want to also offer those things as separate jars if people only need those small things and not the whole thing

subtle folio
#

yeah yeah

wet breach
#

also, the other advantage is lets say multiple modules share a common dependency

subtle folio
#

mhm

wet breach
#

instead of all the projects having it listed in their pom

#

you can list it in 1 place and that is the parent

subtle folio
#

oh sweet

wet breach
#

and all the sub modules would have it included automatically

subtle folio
#

okay, and with that being said

wet breach
#

also, sub modules can override what the parent has by just listing it themselves

subtle folio
#

can other modules talk to each other ?

wet breach
#

so, anything in the parent is inherited until overriden 😉

subtle folio
#

mhm mhm

wet breach
subtle folio
#

like if I had a utility class that all modules used

#

would i define that in the parent

#

and then all modules could use it

wet breach
#

no because then the utility class would reference itself as a dependency

orchid trout
#

inventorydragevent literally does nothing

subtle folio
#

ohh i see so the utility would just be it’s own module that all the others could inherit

wet breach
#

Also, when your modules depend on another

#

you need to ensure your module list is appropriate

subtle folio
subtle folio
wet breach
#

so your example, you would need to have the utility class listed as the first module

#

so that it gets built first

orchid trout
#

nothing happens

subtle folio
#

uhhuh

orchid trout
#

i have debug messages

subtle folio
#

i see

#

are you registering your listener?

orchid trout
#

i literally cancelled the event and nothing happened

#

ofc i registered it

subtle folio
#

show code

#

?paste

undone axleBOT
subtle folio
#

also there’s a module hierarchy @wet breach ?

tardy delta
#

this gotta be the worst thing ive seen

orchid trout
#

    @EventHandler
    public void onClick(InventoryDragEvent event) {
        event.setCancelled(true);
    }

}```
wet breach
# subtle folio uhhuh

actually scratch that, it only needs to be listed first if you want to use the jar as a dependency lol. An alternative you could do is instead in the other modules is just specify additional sources and its relevant directory to take the sources from, in this case your utility module

subtle folio
wet breach
subtle folio
#

oh that’s simple

wet breach
#

so, if someone hit build on the parent pom

#

the order of building is how its listed

subtle folio
#

this is how multi version NMS is done?

wet breach
orchid trout
wet breach
#

you could go as far as just making your own maven plugin which is super easy to do, to do things you want it to do for your projects when you build

subtle folio
#

woah

#

damn

wet breach
#

and cool part

#

maven plugins work just like your plugins, pluck them in a repo that people have access to and maven pulls your custom maven plugin to build 😄

subtle folio
#

i don’t even know what i’d make a maven plug-in for

#

liek auto pushing builds over ftp to a file server ?

radiant glen
#

hello, begginer question but
if i have a shulker placed on the ground in a minecraft world, could i perform actions on it

void onSomething(SomethingEvent event) { 
    new Location(loc.getWorld(), x, y, z).getBlock().setType(Material.SHULKER_BOX); // can i perform actions on this shulker box
}
void doBoxStuff(ShulkerBox box) {
    // box.doSomething();
}

is this correct?

subtle folio
#

deployJar??

wet breach
#

you can absolutely make your own that you like

#

or does what you want

subtle folio
#

what are common ones? Javadoc?

wet breach
#

Yeah maybe there is a software that you like for making javadocs

#

you could make a custom javadoc maven plugin that integrates with that

subtle folio
#

i see

subtle folio
#

in theory that should work

wet breach
#

think of maven plugins, like bukkit plugins. Basically you can do whatever you want just as long as you follow the basic rules that are required

orchid trout
#

\

subtle folio
#

time to make a mc test server maker plug-in

wet breach
#

someone has done that

radiant glen
wet breach
#

its called MockBukkit

subtle folio
#

i thought so

#

Damn

subtle folio
#

World#spawnEntity

#

and put shulker box as the entity type

wet breach
#

but just because something exists, don't let that deter you from making one

subtle folio
#

i’m still having a hard time wrapping my head around how to use this but i think i just need to start coding

wet breach
#

maybe you have some bash scripts you need ran during the build phase for some stuff to be included in the final jar

subtle folio
#

i meant multi modules😉

#

maven plug-in seems easy

wet breach
#

a custom maven plugin would help with this because it would pause the compiling when your maven plugin is reached and wait for your plugin to say ok continue on

#

and your maven plugin could execute said scripts

subtle folio
#

yep yep

wet breach
#

oh multi modules

wet breach
#

this shows how I use a multi-module for this project, the only thing it doesn't show is how to fully utilize the parent pom for the modules

#

I think mfnalex might have some projects that show that

subtle folio
#

okay sweet

wet breach
#

yeah I like modules

#

because you can also as a user just build a module you need specifically

subtle folio
#

oh yes

#

with nms

#

yep yep i’ve done that before

wet breach
#

but yeah you had a good example though for multi-modules

#

where you have a utility stuff but don't want all those in a single a jar or project

#

or maybe that the utilities are vastly different from each other it doesn't make sense to have them in the same project

subtle folio
#

mhm mhm

#

i need to build

#

thanks for the help !

#

this is modules right?

quaint mantle
#
package Oreos.Builder.Extruder.RightClick;

import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;

public class GetBlocks {

    public String getOthers(Block block, BlockFace face) {
        Location[] blocksToCheck;
        if (face == BlockFace.NORTH || face == BlockFace.SOUTH) {
            // UP DOWN EAST WEST
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 1, 0),
                    block.getLocation().subtract(1, 0, 0),
                    block.getLocation().add(0, 1, 0),
                    block.getLocation().add(1, 0, 0)};
        } else if (face == BlockFace.EAST || face == BlockFace.WEST) {
            // UP DOWN NORTH SOUTH
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 1, 0),
                    block.getLocation().subtract(0, 0, 1),
                    block.getLocation().add(0, 1, 0),
                    block.getLocation().add(0, 0, 1)};
        } else {
            // NORTH EAST SOUTH WEST
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 0, 1),
                    block.getLocation().subtract(1, 0, 0),
                    block.getLocation().add(0, 0, 1),
                    block.getLocation().add(1, 0, 0)};
        }
        return String.valueOf(blocksToCheck);
    }

}

Any idea why it returns [Lorg.bukkit.location;@SomeRandomCharacters]

chrome beacon
#

Don't use string value of

quaint mantle
#

here are some examples:
[Lorg.bukkit.location;@1d06e7e8]
[Lorg.bukkit.location;@, c9ab0e]
[Lorg.bukkit.location;@1672b5]

#

How would I print it out then

#

to the player

chrome beacon
#

Use toString on the location

quaint mantle
#

Alr lemme try .toString()

#

Outputs same thing

#

1s

#

yeah

#

still same

kind hatch
#

You're trying to print an array.

quaint mantle
#

How would I convert it to a string

#

without getting it converted to some wierd Lorg stuff

quaint mantle
kind hatch
#

Arrays.toString() or iterate

lucid gazelle
#

how can this be null? (PlayerMoveEvent)

quaint mantle
#

.toString doesn't work, would I have to do a for loop?

subtle folio
#

I’m sure that can be shortened but I forget off top of my head

quaint mantle
#

there's no .forEach

#

in java 8

#

i don't think

subtle folio
#

what version are you on?

quaint mantle
#

1.12

pseudo hazel
#

idk if location can be easily printed like that

echo basalt
quaint mantle
echo basalt
#

Yeah but that's not the original intent

subtle folio
quaint mantle
echo basalt
river oracle
echo basalt
river oracle
#

something like %s, %s, %s

river oracle
quaint mantle
pseudo hazel
#

foreach does not work on arrays though? or am I mistaken

quaint mantle
#

(JOKING)

wet breach
#

therefore, getTo() in some weird way could be null

subtle folio
#

player could go to nowhere land

quaint mantle
river oracle
#

Anyways my stupiditiy asside you should prob do something like String.format("(%f.2, %f,.2 %f.2)", loc.getX(), loc.getY(), loc.getZ())

pseudo hazel
#

by that logic all objects can be null

quaint mantle
#

for some reason it just doesn't show up at all

pseudo hazel
#

whats your code look like

#

location does not have for each

wet breach
#

due to the way MC handles such things

pseudo hazel
#

oh okay

#

I thought you were talking about java in general

wet breach
#

ah

lucid gazelle
#

while getTo is nullable

pseudo hazel
#

its annotated because why tf not

wet breach
subtle folio
#

it’s safe to assume getTo won’t be null

wet breach
#

it is impossible to guarantee that where the player wants to move to actually exists

#

but its possible to guarantee where they are currently at

#

does exist

quaint mantle
wet breach
#

if that helps why getFrom() is not nullable 😛

quaint mantle
#

you could use catch,

echo basalt
#

I'd make a map and have a config honestly

wet breach
#

yes let me show you how

#

this is how I do permissions 🙂

silent steeple
#

how do i make my plugin safe from people who crack it

wet breach
#

you can't

#

the only sure way is to never put it on the internet

silent steeple
#

well how do i make it hard to crack

echo basalt
#

you don't

terse tangle
wet breach
#

therefore, any attempts to try to make it impossible or hard is futile since it was never designed into Java to begin with

silent steeple
#

what if i use like api keys or something, how do i make it so people cant see them when they crack it

orchid trout
#

config

#

then http request

#

i think

silent steeple
#

oh yeah

#

smart

orchid trout
#

people can still just change a false to a true

silent steeple
#

?

hazy parrot
#

just use env variables or config for api keys, dont hardcode it

silent steeple
#

yeah

#

alright

wet breach
#

just don't worry about cracking

#

as long as you are constantly providing updates and its of decent quality, people will use your stuff

echo basalt
#

You can just

#

provide so many updates

#

that all the cracks will be brokey

#

That's... a config section

wet breach
#

are you wanting to know how to obtain stuff that is dynamic in a config?

echo basalt
#
ConfigurationSection testSection = config.getConfigurationSection("Test");

for(String key : testSection.getKeys(false)) {
  ConfigurationSection subSection = testSection.getConfigurationSection(key);

  ...
}
#

Well

#

you could've just said that you wanted to get test.test2

#

I'd convert it all to cached data

#

Let's say you have something like

#
public class PlayerRank {

  private final String name;
  ...

  public PlayerRank(ConfigurationSection section) {
    this.name = section.getString("name"); 
    ...
  }

  public String getName() {
    return name;
  }

  ...
}
public class PlayerRankRegistry {

  private final Map<String, PlayerRank> rankMap = new HashMap<>();

  public PlayerRankRegistry() {
    // get the config and call load here
  } 

  private void load(FileConfiguration config) {
    ConfigurationSection rankSection = config.getConfigurationSection("Rank");
    
    if(rankSection == null) { // config error?
      return;
    }

    for(String key : rankSection.getKeys(false)) {
      ConfigurationSection subSection = rankSection.getConfigurationSection(key);
      PlayerRank rank = new PlayerRank(subSection);

      rankMap.put(key, rank);
    }
  }

  public PlayerRank getRank(String rankId) {
    return rankMap.get(rankId);
  }

  public ImmutableCollection<PlayerRank> getAllRanks() {
    return ImmutableList.copyOf(rankMap.values());
  }
}
#

That's how I'd do it

#

maybe do the config loading logic elsewhere but you get the idea

#

It would allow you to do like

#

rankRegistry.getRank("Member").getName();

#

Everything you do with configs should be matched with java objects

silent steeple
#

anyone know why i cant use this

#

ClientboundPlayerInfoPacket

#

1.19.4

#

in NMS

#

did they change it to

#

ClientboundPlayerInfoUpdatePacket

quaint mantle
#

Does NMS has Inventory#getOriginalTitle?

#

If so, was this added prior 1.20?

river oracle
#

essentially InventoryView#getOriginalTitle is just getting the first title you put in for the inventory prior to 1.20 getTitle will always return the original title unless you mess with InventoryView

quaint mantle
#

I am asking because I read that you used NMS for Inventory#setTitle

river oracle
#

this code is extracted from CraftInventoryView https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java#18,25

charred blaze
#

is there any zombie villager cure event in skript?

river oracle
#

is there a spigot event for it

#

in the Java API

charred blaze
#

idk

river oracle
#

?jd-s

undone axleBOT
river oracle
#

doesn't look like it

charred blaze
#

i dont need spigot event

river oracle
#

so no

tender shard
charred blaze
#

i need skrip

river oracle
#

oh yeah

#

EntityTransformEvent

#

is what you'd use

charred blaze
river oracle
#

does skript have separate events?

#

that'd be a dumbass idea

tender shard
#

idk how skript works, all I know is that it's total shit

charred blaze
#

i know its shit. i just dont want to create new plugin for client :/

#

is there any way to disable curing zombie villagers with skript

#

mhm ok

tender shard
#
import:
  org.bukkit.event.entity.EntityTransformEvent

on EntityTransformEvent:
  # your code
river oracle
#

lol

river oracle
#

skript has reflection now

#

jesus christ

#

some things shouldn't exist smh

charred blaze
#

ok ill use it

#

thx

#

skript>nothing

brazen violet
#

can anyone help me mb?

charred blaze
#

oh this one sounds better. checked now

#

what is reflect

#

i need thing that is called "reflect"?

#

On Entity Transform:
if event-entity is zombie villager:
if future event-entity is villager:
cancel event

brazen violet
#

i need some help ...

charred blaze
#

yeah ik

#

its still same xd

brazen violet
#

java.lang.NullPointerException: Cannot invoke "de.mentania.wartungssystem.MentaniaData.isStatus()" because the return value of "de.mentania.wartungssystem.MentaniaData.getWartungManager()" is null

#

any suggestions?

charred blaze
#

yeah

#

because of no code provided

brazen violet
#

its mine

charred blaze
#

lol

brazen violet
charred blaze
#

no worries. ill get skript support

brazen violet
#

You mean send the whole main class?

#

dont know how to send code in this grey list so i send my java if its okay

and for the record i dont code with bungee for long now

undone axleBOT
brazen violet
#

in pastebin?

undone axleBOT
brazen violet
silent steeple
#
Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.player.Player
    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>

how come i get that error

brazen violet
#

dont know i looked up in the internet nerver worked with a config.yml before

#

so what do i need to edit

#

public static MentaniaData wartungManager;

#

this?

#

what do you mean with initization?

#

okay done

#

should work now?

#

if (MentaniaData.isStatus()) {

you mean this

#

english xd date object can you maybe explain to me?

silent steeple
#

Caused by: java.lang.ClassNotFoundException: net.minecraft.world.entity.player.Player
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]

<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>

how come i get that error

silent steeple
#

i ran build tools with java -jar BuildTools.jar --remapped

#

i get no errors in the ide

#

only when i run the server

chrome beacon
#

eh that's not what they were saying

brazen violet
#

now i got this error morice

Non-static method 'isStatus()' cannot be referenced from a static context

chrome beacon
#

or just di

#

?di

undone axleBOT
brazen violet
#

its acctully not static

#

public boolean isStatus() {
return !this.status;
}

not static

public void setStatus(boolean status){

not static or do you mean something else?

#

public boolean status; not static

#

you mean my class or the error

#

public static boolean isStatus;

the error wants it to be static

#

the listener and command

#

says it

#

dont know

#

yes

#

instance how do i create one i dont work with bungee alot

#

true

#

wait

#

okay thanks

#

it wants a try and catch when i do new MentaniaData() in onEnable should i do this

#

what was the getter

#

i mean getter how do i do it

#

my brain is not working rn

#

yes thanks

#

WartungsSystem.plugin.

and now getMentaniaData or?

#

not working i dont see it if i try it

#

nop

#

is it

#

maybe i did it wrong

silent steeple
#

how do i make an npc show in the tab list

brazen violet
#

i can send my main class if you want

#

ah

kind hatch
chrome beacon
#

They don't appear to know basic Java

brazen violet
kind hatch
#

There's a thread that recommended doing that?!?!

#

Is it on the wiki or is it just a rando resource thread?

brazen violet
kind hatch
#

That would help.

brazen violet
#

i got it from there

kind hatch
#

That's the bungeecord configuration. Not the spigot configuration.

brazen violet
kind hatch
#

Oh wait, are you making a bungeecord plugin?

brazen violet
#

yes

kind hatch
#

My bad

#

Then disregard my comments. Thought you were making a normal plugin. :p

cedar lotus
#

Why the class is not found?
I tried to use reflection to get class from NMS from purpur fork but no luck. This class does not exist in NMS I assume that paper added it to rewrite chunk system. Any idea why the server says that class is not found? The server: purpur 1.19.2 build 1858

Class.forName("net.minecraft.core.HolderGetter")
brazen violet
#

btw getData didnt work aswell

cedar lotus
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

brazen violet
#

i mean Mentania.plugin.getData dont work

#

the getter dont work i think

#

can i rename getData to getMentaniaData

brazen violet
quaint mantle
#

How do I make my npcs show in the tablist

brazen violet
#

yes i know

#

i mean Mentania.plugin.getMentaniaData is not working

#

i still cant do if (Mentania.plugin.getMentaniaData) in my Command class

#

so what then

undone axleBOT
pseudo hazel
#

damn you beat me to it

#

😢

brazen violet
#

true

pseudo hazel
#

anyways knowing the difference between a function/method and a variable/property is like the actual most basic thing

lucid gazelle
#

this doesn't seem to work tho

winged mortar
eternal oxide
#

There is only ever one Player reference, You can't instantiate a clone

winged mortar
#

i dont know what i need type to core plugin

quaint mantle
#

Anyone know why my npc doesn’t show up in the tab list, do I need to do anything?

eternal oxide
#

send an add player packet

#

or is it update player now?

quaint mantle
#

Yeah I did but it doesn’t show up

#

Let me send my code

eternal oxide
#

you didn;t send it to all players then

silent steeple
#
if (sender instanceof Player p) {

            CraftPlayer craftPlayer = (CraftPlayer) p;
            ServerPlayer sp = craftPlayer.getHandle();

            MinecraftServer server = sp.getServer();
            ServerLevel level = sp.getLevel();
            GameProfile gameProfile = new GameProfile(UUID.randomUUID(), "Cole Gildea");

            ServerPlayer npc = new ServerPlayer(server, level, gameProfile);

            ServerGamePacketListenerImpl ps = sp.connection;
            ps.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, npc));
            ps.send(new ClientboundAddPlayerPacket(npc));
        }
lucid gazelle
eternal oxide
#

there is no clone on Player

lucid gazelle
#

ik that, so how would i do that?

ivory sleet
#

You don’t clone player

remote swallow
#

GameMode oldGm = p.getGameMode()
p.setGameMode

ivory sleet
#

But you can save old data in variables

lucid gazelle
lucid gazelle
#

currently im using maps to store it but was looking for a better way

silent steeple
ivory sleet
#

That way you have it structured compile time

#

class PlayerSnapshot {

}

lucid gazelle
ivory sleet
#

Na

#

You can use a record

#

Else you’d create instance variables

subtle folio
#

im not a huge fan of them and not sure why i’d use it

tardy delta
#

less bloat code

ivory sleet
#

Yea

#

hashCode and equals invokedynamic iirc

subtle folio
#

yeah but Record().value() and Record().getValue()

#

i’ll take the get

tardy delta
#

still waiting for record classes so mutable classes become less bloat too

#

ill probably have to use other langs for that

lucid gazelle
#

for getting the inventory, location etc

#

actually nvm, i figured it out

#

i was using it wrong

tardy delta
#

record Whatever(int x, float y) implicity makes x() and y() getters

lucid gazelle
#

so the old data is gone

hard socket
#

so this is my custom item.

lucid gazelle
#

that record class doesn't work for me either

hard socket
#

and I want it to change to kb thing only

ivory sleet
tardy delta
#

conclube wait what

#

that silly new discord thing

ivory sleet
#

I hope you’re not passing the player to the record

#

Discord didnt give me the name change in time

lucid gazelle
ivory sleet
#

Yikes bro

lucid gazelle
#

i thought thats wat u meant

ivory sleet
#

There’s the issue

#

Na u pass stuff from the player

#

Not the player itself

lucid gazelle
#

so seperately pass each thing?

#

then in that case why dont i just use local vars for it

ivory sleet
#

If you want to

lucid gazelle
#

i mean im currently doing that only

#

sort of

#

im using maps

ivory sleet
#

I mean if u wanna pass that data around to other stuff

#

Then its gonna be meh

lucid gazelle
#

nah its just needed in 1 class

#

so ig imma just stick to my current thing

ivory sleet
#

Sure

hard socket
#

how can I just change the knockback resistance and not other stuff?

remote swallow
#

attributes

hard socket
# remote swallow attributes
                    UUID.randomUUID(),
                    "generic.knockback_resistance",
                    0.2,
                    AttributeModifier.Operation.ADD_NUMBER,
                    EquipmentSlot.LEGS);
            itemMeta.addAttributeModifier(Attribute.GENERIC_KNOCKBACK_RESISTANCE, knockbackResistanceModifier);```
#

this is my code

quaint mantle
#

Storing a list of the player's pets in a yaml document

river oracle
#

for some reason my JSON is just saving to a 0 byte file when I try to save the file? I'm so confused on what I'm doing wrong.

    public static <T> void fileize(@NotNull final T object, Class<T> clazz, @NotNull final File file) {
        Preconditions.checkNotNull(object);
        Preconditions.checkNotNull(file);

        try {
            gson.toJson(object, clazz, new FileWriter(file));
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
    }

    public static <T> T objectize(@NotNull final Class<T> clazz, @NotNull final File file){
        try {
            return gson.fromJson(new FileReader(file), clazz);
        } catch (FileNotFoundException e) {
            throw new IllegalStateException(e);
        }
    }```
```java
        GsonUtils.fileize(this, (Class<DomainInfo>) this.getClass(), jsonFile);
#

it should serialize the object as I have the proper TypeAdapters

tardy delta
#

close writer

quaint mantle
#
    public String getOthers(Block block, BlockFace face) {
        Location[] blocksToCheck;
        if (face == BlockFace.NORTH || face == BlockFace.SOUTH) {
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 1, 0),
                    block.getLocation().subtract(1, 0, 0),
                    block.getLocation().add(0, 1, 0),
                    block.getLocation().add(1, 0, 0)};
        } else if (face == BlockFace.EAST || face == BlockFace.WEST) {
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 1, 0),
                    block.getLocation().subtract(0, 0, 1),
                    block.getLocation().add(0, 1, 0),
                    block.getLocation().add(0, 0, 1)};
        } else {
            blocksToCheck = new Location[]{
                    block.getLocation().subtract(0, 0, 1),
                    block.getLocation().subtract(1, 0, 0),
                    block.getLocation().add(0, 0, 1),
                    block.getLocation().add(1, 0, 0)};
        }
        String toReturn = "";
        for (int i = 0; i < blocksToCheck.length; i++) {
            if (blocksToCheck[i].getBlock().getType().equals(block.getType())) {
                toReturn = toReturn + blocksToCheck[i] + "\n";
                // Add block coordinates to array here
            }
        }
        return toReturn;
    }

I have a class which works, however I would like to add the blocks retrieved from around the original block back into the array... How would I do this?

river oracle
#

thanks Ig I'll just try with resources

tardy delta
#

probably also want a buffered writer

river oracle
subtle folio
#

if i show the same inventory to multiple people

#

is that like a thing

#

and if i update that inventory will it be reflected to everyone

river oracle
#

How can one remove the no usage warning from IntelliJ

#

its annoying asf considering I'm making API ofc its not used

pseudo hazel
#

lmao

#

just ignore it

ivory sleet
#

But File and FileWriter just stink in general

river oracle
#

just slow?

river oracle
ivory sleet
#

File legacy api

river oracle
#

hmmm is java.nio better in general

pseudo hazel
#

why are there a billion ways to read and write a file

#

just make 1 way thats good

river oracle
#

well you are probably supposed to use java.nio packages now adays

flint coyote
pseudo hazel
#

exactly my point

#

just make one thats not bad

#

and then we all use that

#

end of story

river oracle
# pseudo hazel lmao

:( I hate this cuz it changes the colors to all gray, and it annoys me also When I go to warnings I wanna see the warnigns not useless shit

pseudo hazel
#

I dont want to go shopping I want to read some text from a string

ivory sleet
#

I mean you have nio and io

#

Thats it

pseudo hazel
#

okay, so what class do I use for file io

river oracle
ivory sleet
#

You don’t

#

You do toPath() and then its nio

pseudo hazel
#

toPath what

#

what do you mean

quaint mantle
#

can i get all block in one tag ?

river oracle
tardy delta
#

or smth in that sense

pseudo hazel
#

so what gray things are you talking about

river oracle
#

but I fixed it

pseudo hazel
#

oh

river oracle
#

by disabling a shit warning anyways

ivory sleet
river oracle
#

like duh no one is using my Event internally smh

quaint mantle
#

can i get all block with one tag ?

river oracle
eternal oxide
#

what Tag?

river oracle
#

that defeats the points of tags

pseudo hazel
#

well yeah thats just to get the file path

#

so ur saying to just use File from nio

quaint mantle
river oracle
quaint mantle
ivory sleet
river oracle
eternal oxide
#

I'm not understanding yoru question

ivory sleet
#

File#toPath() yields Path

quaint mantle
#

good idea

pseudo hazel
#

what does a Path do

ivory sleet
#

Its the substitute for File

#

then you operate on it using Files utility class

quaint mantle
#

ah wait

#

oke

ivory sleet
pseudo hazel
#

okay

#

I never heard of this anywhere so thanks for teaching it to me

#

this sounds like teh one way everyone should do it then

ivory sleet
#

:3

#

Yea

#

Well a lot of old stuff still uses File

#

So thats why its still used

#

But usually you wanna question yourself if you touch io

pseudo hazel
#

yeah and so do like all tutorials I could find

ivory sleet
#

You can always ask here what’s the correspondence in terms of nio

eternal oxide
#

I've yet to see a benefit of using nio over io

pseudo hazel
#

its looks easier to use

ivory sleet
#

Non blocking being the biggest of them lol

#

Also the broken behavior in File

#

Also it doesn’t receive any updates any longer

eternal oxide
#

Doesn;t need updates if it does all it should

ivory sleet
#

But it doesn’t do all it should or promise by contract of the methods provided

pseudo hazel
#

yeah this is what I mean

eternal oxide
#

I've never had any issues with io

pseudo hazel
#

some other languages can just decide on a single api for file io

#

but java has all these different options

ivory sleet
#

I’ve experienced DoS from it, and unexpected crashes due to poor exception api and circular symbolic links

tardy delta
ivory sleet
#

Also the fact that it doesn’t provide any NIO behavior

pseudo hazel
#

what do you mean

tardy delta
pseudo hazel
#

yes

#

im not saying it can be fixed

#

its just fucked anyways

#

if the first one was good, there is no need for others

ivory sleet
#

It provides an api for operating non blocklingly in a safe and rich manner

#

Yeah but it wasn’t

#

Much like a lot of other stuff from Java lmao

pseudo hazel
#

yeah

ivory sleet
#

Ehm autocorrect being goofy

pseudo hazel
#

thats like the most annoying thing about java

ivory sleet
#

SimpleDateFormat being one of them

ivory sleet
#

Because back in the days memory was not something we had overly much of

#

Which resulted in certain paradigms and patterns becoming mainstream

#

But now that shifted, ergo shifting mainstream interests also

pseudo hazel
#

yeah I guess some things age worse than others

ivory sleet
#

Java was for instance the reason netty was created

#

Jota

#

Among other libraries

#

Or well the issues of java caused the creation of those libs

quaint mantle
#

i need do custom sapling u guys have a idea for this ?

#

i mean i need spawn schematic on sapling growth ?

eternal oxide
#

math

ivory sleet
#

^

round finch
#

spigot api

quaint mantle
#

for math

#

am i need schematics ?

eternal oxide
#

decide random height, branches, leaves per branch block etc

#

length of branch

ivory sleet
#

Yeah either that or if you use schematics

#

But then just save the offset the sapling will have, and spawn it based on that

eternal oxide
#

schematics though are bloat

#

you could spawn differing trees in a few lines of code

quaint mantle
eternal oxide
#

um

quaint mantle
#

bcs u said do without schematics

#

can i control tree blocks on spawn ?

eternal oxide
#

you can do random patterns but they are composed of blocks, so no extra data

ivory sleet
#

Spigot doesnt do the math for u

eternal oxide
#

Yep there is no tree api

quaint mantle
#

alright i will use schematic spawn

#

but can i check if sapling relative is null?....

#

i mean if i spawn custom tree with my schematic
but if there is a block on it

#

can i make it not happen?

round finch
eternal oxide
#

No a schematic is set area, it replaces all blocks

quaint mantle
#

but i don't understand

#

how can i do

#

which event ?

eternal oxide
#

growing one using math you can grow it only in open spaces

quaint mantle
#

or override ?

sour folio
#

how can i update my plugin from 1.19 to 1.20

#

i did

#

not working

#

ok]

ivory sleet
#

You just calculate the locations of the leaves and branches basically

sour folio
#

<version>1.20</version> has an error

#

ok

quaint mantle
#

only like vanilla trees ?

ivory sleet
#

That’s theoretically not impossible

sour folio
#

Doesnt work in game

ivory sleet
#

But the math could take some time since I assume you wanna cover edge cases

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

tardy delta
#

looks like procedural generation

quaint mantle
#

math is spigot feature or normal math funcs ?

ivory sleet
#

Math funcs

#

Normal math

quaint mantle
ivory sleet
#

Wdym

frail gale
#

Are I'm the only who's Discord font has changed?

ivory sleet
#

Affirmative

tardy delta
#

font change? when?

frail gale
#

Today

tardy delta
sour folio
#

It doesnt even try loading

pseudo hazel
#

same for me, but like over a month ago

tardy delta
#

didnt notice then

round finch
pseudo hazel
#

since you werent looking

round finch
#

🤨 hmm confusion

mortal hare
#

tabs vs spaces guys?

#

do you use tabs or spaces for indentation

eternal oxide
#

Most use spaces, I prefer tabs

mortal hare
#

i started to prefer tabs too

#

i found a neat feature with tabs on jetbrains products

#

when you switch to tabs you can select one tab

#

to see what if statement it belongs without scrolling to the top

tardy delta
#

someone seems to use my theme

mortal hare
#

its good

tardy delta
#

i found a good font too

#

arent tabs like 8 spaces

#

i thought i was using tabs but my ide was lying to me

eternal oxide
#

4 usually

tardy delta
#

the linux kernel code takes it to a whole new level 💀

#

8 spaces to be exactly

#

to decourage nesting

mortal hare
#

tabs are unique symbols

#

you usually make one tab from 4 spaces

#

but with tabs you decrease your filesize

tardy delta
#

dang

mortal hare
#

and you can make you indentation adjustable in pixels

#

cons that many developers despise using tabs for some reason

#

for example you cant code in python with tabs afaik

tardy delta
#

python kekw

mortal hare
#

Python disallows mixing tabs and spaces for indentation.

#

it apparently allows tabs

#

but you cant mix them with spaces

tardy delta
#

look at this amazing font uwu

round finch
#

nice lookin

tardy delta
#

bad decision to use vim keybinds, i want to use them in discord too now

subtle folio
#

is there a key bind to delete all content inside the () that i’m in

#

all at once

#

that deletes like words at a time

#

if i have multiple arguments then

#

it’s still a pain

tawdry monolith
#

does the PotionSplashEvent not for for the Uncraftable Potion?

fluid river
#

?tas

undone axleBOT
tawdry monolith
#

but im not sure if im just doing it wrong

fluid river
#

then if it doesnt work then yeah

tawdry monolith
#

is there a way to get it working with unfraftable potion 💀

fluid river
#

show your code tho

#

maybe you just forgor random stuff

tawdry monolith
#
public void onGrenadeUse(PotionSplashEvent event) {
        ItemStack item1 = event.getPotion().getItem();
        ProjectileSource source = event.getEntity().getShooter();
        Player player = (Player) source;
        assert player != null;
        World world = player.getWorld();
        Bukkit.getLogger().info("First");
        if (Objects.requireNonNull(event.getPotion().getItem().getItemMeta()).getLore() == Objects.requireNonNull(ItemHandler.grenade.getItemMeta()).getLore()) {
            Bukkit.getLogger().info("Seconds");
            ItemMeta potion_meta = event.getPotion().getItem().getItemMeta();

            event.setCancelled(true);

            if (config.getBoolean("grenade")) {
                world.createExplosion(event.getPotion().getLocation(), 5);
            } else {
                player.sendMessage(prefix + "§cThis item is disabled on this server, if you believe this is a mistake, tell the owner of the server to enable it.");
            }

        }
    }
#

there's @EventHandler at top, forgot to include when copying

tardy delta
#

dont compare lore by ==

fluid river
#

sheeit

#

that's so messed up

tardy delta
#

and no Objects.requireNonNull

tawdry monolith
fluid river
#

uncraftable potion might just have no itemmeta

tawdry monolith
tardy delta
#

ij is dumb

#

::equals

tawdry monolith
fluid river
#

then compare lore with equals

tardy delta
#

youre not checking anything

tawdry monolith
#

do I use .equals?

fluid river
#

also, stop comparing items by lore

#

you have PDC and NBT for that

tawdry monolith
quaint mantle
#
    @EventHandler
    public void sapling(StructureGrowEvent e) {
        if (e.getSpecies() == TreeType.DARK_OAK) {
            e.getBlocks().forEach(blocks -> {
                Block leave = blocks.getBlock();
                if (leave.getType() == Material.DARK_OAK_LEAVES) {
                    leave.setType(Material.SPRUCE_LEAVES);
                    System.out.println("test");
                }
            });
        }
    }```i tried this code  but not worked debug  not working btw
tardy delta
#

?pdc

tawdry monolith
#

im new to spigot stuff lmao

tardy delta
#

oh god ::forEach

quaint mantle
flint coyote
#

does your class implement listener and did you register the event?

tardy delta
#

creates a mess to read

fluid river
#

not to you bruh

flint coyote
#

Sorry I was talking to @quaint mantle

tawdry monolith
#

oh sorry lol

quaint mantle
#

i implement

flint coyote
#

Did you register it in your onEnable?

quaint mantle
#

yes

flint coyote
#

Then add a message at the start of the listener and see if that goes through

fluid river
quaint mantle
#

oke

fluid river
#

idk but it would probably spam

flint coyote
#

well he could add the species to the message

fluid river
#

so hard to tell if that's cuz of your action

flint coyote
#

also I just wanna see if that listener actually fires

#

after that we can take a deeper dive

tawdry monolith
#

but any uncraftable potion*

flint coyote
tawdry monolith
#

it gives me this when I

quaint mantle
#

@flint coyote alright i did this and i got this in console

    @EventHandler
    public void sapling(StructureGrowEvent e) {
        System.out.println("test1");
        if (e.getSpecies() == TreeType.DARK_OAK) {
            System.out.println("test2");
            e.getBlocks().forEach(blocks -> {
                System.out.println("loop");
                Block leave = blocks.getBlock();
                if (leave.getType() == Material.DARK_OAK_LEAVES) {
                    leave.setType(Material.SPRUCE_LEAVES);
                    System.out.println("test3");
                }
            });
        }
    }```
last "if" not working
flint coyote
#

can you print the block type before your if?

remote swallow
#

sysoutt the getType

tawdry monolith
#

it gives me this when I throw an uncraftable potion (besides the one that I want), no clue what any of this means though.

tawdry monolith
#

but im writing my thing in spigot, server is paper

flint coyote
#

Oh wait. Those aren't blocks - those are BlockStates

tawdry monolith
#

so I gotta join paper server now 💀 great

flint coyote
#

and then you do getBlock which is then again fine, nvm

#

lets see what the type will be

subtle folio
#

average spigot javadoc

quaint mantle
#

and i got this on console

flint coyote
#

huh worldedit

quaint mantle
#

i delete we

#

and try

flint coyote
#

ok

remote swallow
#

did you add the getType sysout

subtle folio
#

FAWE moment

young knoll
#

What goin on here

quaint mantle
remote swallow
flint coyote
#
    @EventHandler
    public void sapling(StructureGrowEvent e) {
        if (e.getSpecies() == TreeType.DARK_OAK) {
            e.getBlocks().forEach(blocks -> {
                System.out.println("loop");
                Block leave = blocks.getBlock();
                System.out.println(leave.getType());
                if (leave.getType() == Material.DARK_OAK_LEAVES) {
                    leave.setType(Material.SPRUCE_LEAVES);
                }
            });
        }
    }

try this @quaint mantle

#

Wanna know what the type is

#

it's not even "blocks" but one block - and not even that but a BlockState pepeshh

#

well it's for trees and mushrooms only. Idk why they would name it structure - but that makes it look pretty old, yes

quaint mantle
#

._.

#

so this sturcturegrow not checking leaves

flint coyote
#

how useless is that event if it gives you blocks BEFORE growth

#

wtf xD

#

Anyway, you can delay your loop by one tick and it should work

quaint mantle
#

how much time u prefer ?

young knoll
#

Remember that just changing the type of a state doesn't do anything

quaint mantle
#

20 ticks ?

flint coyote
#

also why would there be grass blocks?

young knoll
#

You need to call .update

flint coyote
misty current
#

what are you supposed to pass in Bukkit#createBlockData?

quaint mantle
#

oke

flint coyote
young knoll
#

via getAsString

flint coyote
#

or just a material, that method is overloaded

young knoll
#

^

#

Although I prefer just Material.createBlockData in that case

misty current
young knoll
#

Probably

#

I assume if you have the correct format it'll work

quaint mantle
misty current
young knoll
#

Try printing out blockdata.getAsString

flint coyote
#

I still wonder why a StructureGrowEvent would return the Blocks before growth. That's like 90% Air

young knoll
#

It's cancellable

#

Cancellable events pretty much always return the state before they run

misty current
#

so i'm passing minecraft:oak_slab[waterlogged=false,type=bottom] as the argument, and getAsString returns the same thing with waterlogged and type inverted

#

so im pretty confused

remote swallow
#

sus

flint coyote
#

choose custom and take something funny

remote swallow
#

weird

#

i cant see them

young knoll
#

Discords feature rollout is always scuffed

remote swallow
#

queue "ur mom is gay"

flint coyote
#

huh where my strikethrough

#

wow

remote swallow
#

yes

flint coyote
#

nitro pricing is also scuffed - for some emojis I barely use lol

eternal oxide
#

I only use discord because others do. I'd happily go back to IRC

flint coyote
#

just wait until they bring "stories"

young knoll
#

Can't wait for discord shorts

eternal oxide
#

yeah I have all shorts blocked

flint coyote
#

Or a discord AI bot chat like snapchat

late sonnet
round finch
#

Discord is gonna be the new Reddit?

remote swallow
#

if youtube shorts are a thing, does that mean youtube longs are a thing

flint coyote
#

Everyone hyping AI just like everyone was hyping among us and battle royal

#

I hate it

#

Sure AI will be more futureproof but not as a virtual friend, wtf

young knoll
#

AI amogus battleroyale when?

quaint mantle
flint coyote
#

Maybe doing something extremely stupid like that would stop every company from including useless AI stuff

#

oh I forgot squid game

#

pls include squid game aswell

young knoll
#

Alright so someone train a bunch of AIs on amogus and make them fight eachother in fortnite

quaint mantle
#

Investors have zero clue about ai

flint coyote
quaint mantle
#

They just believe

young knoll
#

Investors have zero clue about ai

flint coyote
#

yay a feature nobody asked for - just like the name thing

#

Dating servers pepeChrist

tardy delta
quaint mantle
#

#general duke

tardy delta
hard socket
#

does a normal armor pieces have no attributes by default?

young knoll
#

Correct

#

Default attributes are weird

hard socket
#

how do I keep the original attributes and change the kb resistance only?

young knoll
#

Get the defaults and then modify those

hard socket
young knoll
#

No

quaint mantle
#

Create atributes first?

young knoll
#

The defaults are not actually in the itemmeta

#

Like I said they are weird

bold gorge
#

I'm trying to completely replace the nametag of what's above the player's head and put a new one
Bukkit API or ProtocolLib is there a good way? I haven't found a way that works yet, and Bukkit API won't remove the player's username.

young knoll
#

Use Material#getDefaultAttributeModifiers

flint coyote
# young knoll Default attributes are weird

I remember when I had to use reflection to assign a damage attribute to a pig.
Was a funny moment when it walked to me to attacked me and the second it would have hit me - Exception

quaint mantle
bold gorge
quaint mantle
wise mesa
#

Google that exact message

#

Or yea

bold gorge
#

what packet do I even send?
what can I write?

hard socket
bold gorge
flint coyote
young knoll
#

It's an immutable multimap, you need to make a copy of it

young knoll
#

No, now you are just making another immutable copy

hard socket
young knoll
#

Just copy it with ArrayListMultimap.create(otherMap)

young knoll
#

Yeah that works

#

You don't need to declare a new variable tho

#

Multimap<blah, blah> multimap = ArrayListMultimap.create(material.getDefaultAttributeModifiers())

hard socket
#

ok will try that thanks

hard acorn
#

what are the conditions for a goalSelector goal to run a stop() method?

zenith gate
#

does anybody have a resource for loot tables? All google is giving me is ways to make loot tables with a datapack, and I just want to know if it's possible with a plugin?

zenith gate
# hard socket change drops for entities?

Yes, but it's not exactly what I'm looking for. I want dungeons, bastions, the stronghold, I want to change the loot tables for all of them, I have a bunch of crafting materials, and items I want to be given a chance to be found.

young knoll
#

There isn't API to make/modifiy loottables

remote swallow
#

can you add one

#

thanks

young knoll
#

However there is an event for when a chest is populated from a loot table

zenith gate
#

So I'd have to check for when a chest is filled with items, clear the chest, and add my own?

young knoll
#

Yeah

#

Or you can deploy a datapack with your plugin

zenith gate
#

Can the datapack access my plugin items?

young knoll
#

All items can be represented in a datapack

#

But it can be annoying to recreate them

cedar pine
#

Hey there, would somebody be able to help me with PersitentDataContainers?

zenith gate
#

Okay, well I am going to go learn how datapacks work and how to make them. 😂

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

cedar pine
#

Oh bet 1 sec

#

How do you format a snippet on disc mobile? Feeling big dumb rn

young knoll
#

Same way as on desktop

cedar pine
#

Nvm

young knoll
#

```lang
code
```

cedar pine
#

Man discord mobile trash

round finch
#

do the comment to show

cedar pine
#

Sec hold on

round finch
#

?codeblock

undone axleBOT
#

You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {

}

}```
Becomes:

public class MyPlugin extends JavaPlugin {
    @Override
    public void onEnable() {

    }
}```
round finch
#

here

cedar pine
#

Ty my phone was being dumb

round finch
cedar pine
#

    @EventHandler
    public void onBlockBreak(BlockBreakEvent event) {
        Block block = event.getBlock();
        Player player = event.getPlayer();
        ItemStack tool = player.getInventory().getItemInMainHand();
        NamespacedKey key = new NamespacedKey(plugin, "type");
        ItemMeta meta = tool.getItemMeta();
        PersistentDataContainer itemtype = meta.getPersistentDataContainer();

        // Check if the tool type is "mining"
        if (itemtype.has(key, PersistentDataType.STRING) && itemtype.get(key, PersistentDataType.STRING).equals("mining")) {

So it’s just going to the else statement, is this the correct format for a PDC and running an if statement for checking for one?

round finch
ember estuary
#

Just do
"mining".equals(itemtype.get(key, PersistentDataType.STRING))
That's nullsafe too and will save you one operation.

young knoll
#

getOrDefault is another option

#

But that's cleaner

ember estuary
#

and what the heck is a PDC? xD

ember estuary
young knoll
#

PersistantDataContainer

ember estuary
#

ah

#

never used it, but it looks right 🤔

ocean hollow
#

How can I do a serialization and deserealization of an object that has a list of others? I have "Board" class that has List<Task>, i need to do serialize method for Board.

That is my Board serelization: ``` @Override
public @Nonnull Map<String, Object> serialize() {
Map<String, Object> map = new HashMap<>();

    List<Map<String, Object>> serializedList = new ArrayList<>();
    for (Task obj : tasks) {
        Map<String, Object> serializedObj = obj.serialize();
        serializedList.add(serializedObj);
    }

    map.put("location", loc);
    map.put("tasks", serializedList);

    return map;
}```

Task serealization:

    public @NotNull Map<String, Object> serialize() {
        Map<String, Object> map = new HashMap<>();

        map.put("player", nickname);
        map.put("money", money);

        return map;
    }```

I have problems with loading, so how can I load it?
remote swallow
#

static deserialize method

#

all expained on the javadocs

hard socket
cedar pine
#

Not even home but yea

jade stump
#

Where should I start if I want to modify world generation? Specifically I want to force only certain types of plants to generate in specific biomes & prevent others from generating. Can someone point out where I find find a tutorial on this or something? Thanks.

ember estuary
#

Where can i find the code that Spigot/Bukkit uses to get the colors of the world to put them on a CraftMapCanvas?

remote swallow
#

?stash

undone axleBOT
remote swallow
#

craftbukkit

ember estuary
#

i meant in what class...

#

ive found this but i cant find there the colors array gets filled

ocean hollow
ember estuary
ocean hollow
remote swallow
#

im guessing the list will deserialize each entry

remote swallow
ember estuary
# remote swallow yeah

you know in what class?
i've been searching in MapItemSavedData, CraftMapView, CraftMapRenderer and CraftMapCanvas, but I can't find it, I'm searching since an hour
Maybe i'm blind

sullen marlin
#

It'll be an nms class

#

WorldMap or something

#

Though did we add an API for block colour? Might've

ember estuary
#

this? MapItemSavedData?

sullen marlin
#

ItemWorldMap#update

ember estuary
#

Ah nice, that's it, thank you

swift dew
#

(sorry if this is abit out of topic) is there a better way to log stuff on a server than discord logs?

sullen marlin
#

What stuff

subtle folio
#

I mean you can create a JSON file to store information with logs,

#

and have an ingame command to view it

swift dew
#

things like rare drops on a server with them

subtle folio
#

Wdym?

swift dew
#

lets just say mobs drops

subtle folio
#

Mhm.

eternal oxide
#

You need to explain exactly what you want to log, why you want to log it and why even discord

swift dew
#

i have a goofy ahh server and there areany things i need to log like rare drops

#

mostly rare drops

cedar pine
#

Why do you need to log it though

swift dew
#

refund and proof reasons

cedar pine
#

Oh

eternal oxide
#

Then just log to a file and add a command to check it

swift dew
#

ok

subtle folio
swift dew
#

if i log like that 50+ lines a second can it cause any lag more than expected?

eternal oxide
#

um, you should not be logging 50 lines a second

subtle folio
#

should be fine as long as no IO is involved