#help-development

1 messages Β· Page 727 of 1

zealous osprey
#

do you have worldedit and worldguard as plugins in your plugin folder of the server?

upper hazel
#

yes

cinder abyss
#

Hello, how can I get Registry.BIOME_REGISTRY in nms 1.19.4 ?

#

oh it's Registries.BIOME

small current
#
    private final ItemStack stack;
    private final int amount;
    public ItemStack getStack() {
        ItemStack clone = stack.clone();
        clone.setAmount(amount);

        return clone;
    }
ItemStack item = getStack();
...
addToInventory(player, item);
    private void addToInventory(Player player, ItemStack item) {
        PlayerInventory inventory = player.getInventory();

        switch (type) {
            case HELMET -> inventory.setHelmet(item);
            case CHESTPLATE -> inventory.setChestplate(item);
            case LEGGINGS -> inventory.setLeggings(item);
            case BOOTS -> inventory.setBoots(item);
            default -> inventory.addItem(item);
        }
    }
#

the amount is 10

#

but sometimes for some reason

#

it gives not 10

#

6

#

2

#

8

remote swallow
#

You need to use ansi codes for spigot

clever lantern
#

can i change flying speed on creative? bcs if I use
player.setFlySpeed it only speeds my fly using player allow flight but not the default fly speed in creative

radiant aspen
#

Yo, can somone here help me out quickly?

Im trying to code some stuff that restores a section of the world to its origional state.

Lets say I got a method like this, where I take in a block, how would I get the block's material type from the chunk generator, is this possible?

public void restoreBlockToOrigionalState(Block block){
    ChunkGenerator chunkGenerator = block.getWorld().getGenerator();
    // Do something here?
    Material material = Material.AIR;
    block.setType(material);
}

I just need to get the material type from the chunk generator, using the block's coords. so I can restore a section of the world to its default state. Is this possible?

lost matrix
#

The deprecated way was:

generateChunkData(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biome)

->

ChunkGenerator.ChunkData#getBlockData(int x, int y, int z)

Which returns the BlockData on this position

radiant aspen
#

ChunkGenerator.ChunkData#getBlockData(int x, int y, int z) that would be what I want.

Do you know why this was deprecated?

median bronze
#

how does hikari pooling work

#

ive got a ton of sleeping connections

lost matrix
median bronze
young knoll
#

Generally the default settings are fine

#

That's why they are default

median bronze
#

okay cool thanks, ill remove the changes

cinder abyss
#

Hello, I've got this class who returns a Bukkit Player, but when I build my project I get this error:

cannot access net.minecraft.server.level.EntityPlayer```
Code who does this error```java
public static @Nullable Player createHerobrine(JavaPlugin plugin, Location loc) {
        Player herobrine = switch (LibVersion.getVersion(VersionMethod.SERVER).toString()) {
            case "1.20.2" -> Herobrine_1_20_2 /* ERROR HERE */.createHerobrine(plugin, loc);
            case "1.20.1", "1.20.0" -> Herobrine_1_20_1.createHerobrine(plugin, loc);
            case "1.19.4", "1.19.3" -> Herobrine_1_19_4.createHerobrine(plugin, loc);
            case "1.18.2" -> Herobrine_1_18_2.createHerobrine(plugin, loc);
            case "1.17.1" -> Herobrine_1_17_1.createHerobrine(plugin, loc);
            default -> null;
        };
        return herobrine;
}```Here is the structure of Herobrine\_x\_xx\_x:```java
public class Herobrine_x_xx_x extends ServerPlayer {```The error appends on every `Herobrine_x_xx_x#createHerobrine`
median bronze
#

If i had player profiles saving to my MariaDB, would my best option be to just store the profile object in a list and just save it on leave/every 30 or so minutes? I havent used Hikari before so I really dont know what the best way of saving to sql would be. The profiles get updated fairly regularly so i dont think saving straight away would be the best option

lost matrix
#

On quit and every few minutes. 15-30

median bronze
#

and should i be doing anything after each query? Im already closing the result sets and statements but do I need to do anything to the connection?

lost matrix
#

btw, the connection you get from hikaricp is not an actual connection.
Its a ProxyConnection which implements the Connection interface. You cant really do much wrong
with it as hikari handles a lot in the background and doesnt let
you touch its actual connections

young knoll
#

Yeah just close it

lost matrix
young knoll
#

Which returns it to the pool

lost matrix
#

Then see if this solves the issue

cinder abyss
#

same error @lost matrix

lost matrix
#

ok lets see

lost matrix
cinder abyss
lost matrix
#

net.md-5:specialsource-maven-plugin:1.2.2 the remapper from spigot

shell robin
#

How do I cancel the player from wearing a diamond set with Jeff Media's ArmorEquipEvent API?

    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void onArmorEquip(ArmorEquipEvent e) {
            if (e.getNewArmorPiece() != null && e.getNewArmorPiece().equals(Material.DIAMOND_HELMET) || e.getNewArmorPiece().equals(Material.DIAMOND_CHESTPLATE) || e.getNewArmorPiece().equals(Material.DIAMOND_LEGGINGS) || e.getNewArmorPiece().equals(Material.DIAMOND_BOOTS)) {
                e.setCancelled(true);
    }```
cinder abyss
#

and how can I update it ? and where do I put the update ?

#

@lost matrix

cinder abyss
young knoll
#

I would guess an ItemStack, so you can't compare it to a material

remote swallow
lost matrix
cinder abyss
cinder abyss
lost matrix
remote swallow
shell robin
remote swallow
#

no

cinder abyss
lost matrix
remote swallow
#

e.getNewArmorPiece().getType().toString().contains("DIAMOND_")

lost matrix
#

I mean thats the naive approch...

cinder abyss
#

oh

remote swallow
#

it will work, could be better

cinder abyss
#

I've found

median bronze
# lost matrix btw, the connection you get from hikaricp is not an actual connection. Its a Pro...

Ahh i see. Also had one more question, currently one of the other things im saving to the database is causing issues, due to the fact that when I set it up it I made it save straight away when updated, rather than on leave/on a schedule. Currently when you spam changes, the hikiari database overloads, is that just because of the way im saving it (do i need to redo it) or can it be fixed with the config settings

young knoll
#

The better approch would be to cache a set at startup with the diamond armor pieces you want

median bronze
#

also wouldnt saving a ton of profiles at the same time also cause connection issues?

cinder abyss
#

I wasn't using the build for nms remapped mojang in the module nmsgate

lost matrix
cinder abyss
#

I also updated specialsources

#

thanks πŸ˜„

young knoll
#

What type of database is it

cinder abyss
#

maybe it will works

#

πŸ™

median bronze
#

MariaDB

young knoll
#

Should be fine handling a ton of operations per second

#

That's whay they are designed for

cinder abyss
#

@lost matrix not working, same error

lost matrix
# shell robin thanks

The type safe way would be

  private static final Set<Material> DIAMOND_ARMOR_MATERIALS = Set.of(
    Material.DIAMOND_HELMET,
    Material.DIAMOND_CHESTPLATE,
    Material.DIAMOND_LEGGINGS,
    Material.DIAMOND_BOOTS
  );

  @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
  public void onArmorEquip(ArmorEquipEvent event) {
    Material targetMaterial = event.getNewArmorPiece().getType();
    if(DIAMOND_ARMOR_MATERIALS.contains(targetMaterial)) {
      event.setCancelled(true);
    }
  }
shell robin
#

πŸ˜…

#

i wasnt comfortable with it πŸ‘€

#

thank you

cinder abyss
lost matrix
lost matrix
cinder abyss
#

hum

minor fox
#

Has anyone experienced missing chunks when loading a world?

cinder abyss
#

I updated every nms I think

#

oh I forgot one

lost matrix
#

Anyways, cant help more than that. Im a bit ill and should lay down...

cinder abyss
#

It will works this time

#

πŸ™

#

and it's not working!

#

perfect...

quaint mantle
#

Does the class loader matter? I've tried finding an answer online but I can't find one. I'm wondering if a specific class's classloader will be different because I can get a class loader from any class

worldly ingot
#

Yes, one class' classloader can differ from another

#

In fact, each plugin has its own class loader

zealous osprey
#

What do you even do with a class loader?

sage patio
#

any idea why a server .jar files launches with all this commands but now with double click?

#

JDK & JRE | 17 & 8

worldly ingot
zealous osprey
#

Please, god, no

median bronze
zealous osprey
young knoll
#

It's not per class, that's for sure

#

Well, normally

zealous osprey
#

What neat things can you do with the loader?

worldly ingot
#

No because a class loader can be reused

young knoll
#

You can load classes

topaz cape
worldly ingot
#

Yeah this isn't a super complex topic. A class loader lets you load .class files lol

zealous osprey
#

So you'd create a class loader, for example, if you want too use code from a different jar file?

worldly ingot
#

It's how Bukkit loads plugins

#

Yes

zealous osprey
#

ah, ok, then it really wasn't hard too understand XD

young knoll
#

Is each plugin loader just on top of the base classloader

#

Or is there another one in between

cinder abyss
topaz cape
# cinder abyss yes

you're using Java 8 in the IDE's project structure of the nmsgate module which makes it not access java 17 jars

zealous osprey
young knoll
#

You can use reflection for almost anything if you're brave enough

zealous osprey
#

I'm stupid, not brave.
I'll keep my hands away from doing that... for now

young knoll
#

Just load up ASM and start hacking apart the bytecode of the server

#

Why not!

#

paper isn't a plugin

young knoll
#

Well sure

#

But spigot uses ASM too if we are going at that angle

topaz cape
zealous osprey
#

What has this chat become?

young knoll
#

Who knows

topaz cape
cinder abyss
torn shuttle
#

I can't decide on whether or not I want to buy a new office chair

#

this one is starting to get really scuffed

cinder abyss
#
public static @Nullable Player createHerobrine(JavaPlugin plugin, Location loc) {
        Player herobrine = switch (LibVersion.getVersion(VersionMethod.SERVER).toString()) {
            case "1.20.2" -> Herobrine_1_20_2 /* ERROR HERE */.createHerobrine(plugin, loc);
            case "1.20.1", "1.20.0" -> Herobrine_1_20_1.createHerobrine(plugin, loc);
            case "1.19.4", "1.19.3" -> Herobrine_1_19_4.createHerobrine(plugin, loc);
            case "1.18.2" -> Herobrine_1_18_2.createHerobrine(plugin, loc);
            case "1.17.1" -> Herobrine_1_17_1.createHerobrine(plugin, loc);
            default -> null;
        };
        return herobrine;
}```
torn shuttle
#

it's like $400 and I'm moving out in a couple of years and won't be taking it with me

cinder abyss
#

zulu 17

zealous osprey
cinder abyss
#

just building

zealous osprey
#

There is an import of a 1.20.2 nms, right?
Because it could be that the compiler calls the class and notices that the import isn't allowed

cinder abyss
zealous osprey
#

Nvm, that error does not have a reference to a nms version

eternal oxide
#

Mojang mappings for 1.20 is not EntityPlayer it's ServerPlayer

eternal oxide
#

you have a proper multimodule setup?

topaz cape
#

dont you think it could be an issue that happened when building 1.20.2

cinder abyss
topaz cape
#

probably the "--remapped" flag was fprgotten

cinder abyss
eternal oxide
#

if his jar is erroring looking for EntityPlayer when using 1.20 his build system is set wrong

cinder abyss
eternal oxide
#

paste your pom for your 1.20 module

topaz cape
#

i can't see it atm tbh

cinder abyss
#

?

#

@zealous osprey

echo basalt
#

bro got a typo in his readme

minor fox
#

What could be the reason why loading a world using

creator.createWorld();```
will result in missing chunks/chunks not loading?
Adding the world before starting the server works just fine
shell robin
#

How can I cancel the player from using totem

young knoll
#

what

shell robin
#

its not probably

#

it didnt cancel it

echo basalt
#

EntityResurrectEvent yeah

#

just saw it in nms

shell robin
#

thanks

topaz cape
quaint mantle
echo basalt
#

oh fuck no

#

I did a whole presentation about the grammarly ad

quaint mantle
#

In the same module

echo basalt
#

at school

#

like a 10 minute rant

topaz cape
#

shut

echo basalt
#

I wonder if I still have my notes

topaz cape
#

i didn't mean it in a rude way

#

@cinder abyss reading your class

#

there is no reason for you to use nms in that module

#

you can just use the normal spigot api since nms is unused

echo basalt
#

I wasn't kidding

#

it's got more views than Martin Garrix - Animals

#

p sure

#

it also works like shit

#

Β―_(ツ)_/Β―

#

but you know what it is

topaz cape
young knoll
#

That's... a really weird point

topaz cape
#

i cant find whats wrong with expansion

echo basalt
#

Expantion

young knoll
#

"Too many people have seen this ad and therefor the ad is bad"

echo basalt
#

not exactrly

#

more like

#

"this ad shows up 19 times in an hour in Portugal but the product only works in the US"

#

"Stop advertising this shit to me I already know it exists"

topaz cape
#

omg i used a T

echo basalt
#

it only works with english

topaz cape
#

BRUH

echo basalt
#

you want good autocorrection?

#

toss it in a google doc

#

and let it underline half your shit

cinder abyss
topaz cape
cinder abyss
#

I get an error when not using spigot with nms

topaz cape
#

??

cinder abyss
#

the same error when building but directly in the ide

echo basalt
#

nms is fun

#

especially obfuscated

#

and on 1.8

young knoll
#

πŸ™ƒ

cinder abyss
remote swallow
echo basalt
#

how long do you think I've been around for

median bronze
echo basalt
#

Main.getInstance().getConfig().getString

#

also that ternary on your constructor is useless

topaz cape
echo basalt
#

bro has no clue what oop is

cinder abyss
remote swallow
median bronze
young knoll
#

You need to close them

#

We've told you that

remote swallow
#

it does manage the connection, you still need to close them

young knoll
#

Well yeah that is the best way

echo basalt
#

try with resources

echo basalt
topaz cape
young knoll
#

Can I be the one for today

echo basalt
#

let's pretend like it doesn't take a lot of work

remote swallow
#

plisssssssssssssssssssss

young knoll
#

Pfft it's easy

echo basalt
#

bet their codebase has like

#

1.5m lines

young knoll
#

Just save the island as a schematic

#

And just load it into a new world

echo basalt
cinder abyss
echo basalt
#

the hard part is making sure the codebase isn't shit

#

and works for more than 1 instance

remote swallow
#

give each island 4 worlds

young knoll
#

Pfft

remote swallow
#

and each world has 1 chunk

young knoll
#

Just put it all on one server

topaz cape
echo basalt
#

give it 30gb of ram and profit

#

is discord dying this shit feels slow

young knoll
#

I mean this people are gonna get like 10 players

#

So they can just shove it all on one server tbh

echo basalt
#

true but they'll also make sure to keep every single chunk loaded in memory for performance

#

and every single entity and block ticking

remote swallow
#

make sure to delete all player data if theres an error to avoid corruption

echo basalt
#

nah just constructor abuse

#

:)

echo basalt
young knoll
#

Mhm

#

More classes means more ram usage

remote swallow
#

same for methods

echo basalt
#

means you're straining the classloader more

#

static everything so that ram speed doesn't matter clown_2

remote swallow
#

everything needs to be static and everything that can be in 1 method

echo basalt
#

and when someone mentions code quality just say you're doing it for fun

#

and that "it's temporary and I'll clean up later"

young knoll
#

Hibernate hasn't merged that PR yet

#

blah

remote swallow
#

just downgrade to 1.20.1

#

make 20 fps

topaz cape
#

why did you ping me

#

he cant access the class because he cant access all ServerPlayer classes of all versions

young knoll
topaz cape
#

so he has to use a diff class that does that for him

#

why is it so hard?

remote swallow
#

shut up josh

#

use 1.20,1

#

get back to work

echo basalt
young knoll
#

Meanwhile old versions had extremely frequent updates

echo basalt
#

mm got some work for today

young knoll
#

So you only want change when it conforms to your definition of good, got it

remote swallow
#

who sean

echo basalt
#

need to do a trial thing for his business partners but I have a full-time job lined up at 25/h

young knoll
#

Ew roblox

#

That means you have to use LUA

echo basalt
#

bobox

#

not that

#

he makes bobox money

#

pays me for monkocroft plugin

remote swallow
echo basalt
#

yes they have female

#

gmail

#

zacken knows jasmine huh

#

I'm her core dev

jagged thicket
#

roblox has a system to make money but if you make money in mc its almost always illegal

halcyon hemlock
#

Hi everyone

young knoll
#

who tf is jasmine

#

got it

topaz cape
#

some annoying BBB member

echo basalt
#

annoying clown_2

#

sure she likes to bargain a lot

#

but we vibe

#

uhh

topaz cape
echo basalt
#

no

#

uhh yes

halcyon hemlock
#

Yes

#

U get a lot of free stuff

#

L

echo basalt
topaz cape
#

the other jasmine is nicer tbh

echo basalt
#

what did jasmine do to you

#

are you even sure it's the right one

topaz cape
young knoll
#

so far I picture a 16yo trtying to buy plugins for $4 an hour

echo basalt
#

nah I've made over a grand with jasmine

#

I was told

young knoll
#

Honestly I'm more interested in the server that has Females

#

What are those

echo basalt
#

lmfao

quartz pendant
#

hey dudes, im searching for an solution how i can modify entities.
they should not get an ai, but be pushable cause of water, etc.

any ideas?
currently i get this only to work with disabled ai - but not pushable, or enabled ai, but pushable

young knoll
#

setAware(false)

remote swallow
young knoll
#

I'm sure you will

quaint mantle
#

<dependency>
<groupId>org.util</groupId>
<artifactId>UUIDManager</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/UUIDManager - Kopie.jar</systemPath>
</dependency>

Guys, I made a little local library. Why does the consol throw me a NoClassDefFoundError?

icy beacon
#

I'm not sure if it's fine to have spaces in the systemPath. It's most likely not the problem but pls try renaming the file just to rule this possibility out

remote swallow
#

system scope bad

#

mvn install it

merry abyss
#

Hi, im trying to create a plugin api/base for all my player related data. This plugin main purpose is to serve as a service plugin that gets and sets player data.

Im having trouble importing the jar file into my new Plugin, through intelliJ. Can someone please provide some documentation or help?

chrome beacon
merry abyss
#

maven

quaint mantle
chrome beacon
icy beacon
#

It'll appear in your local repo after you run the command

#

And you won't have to carry that jar file everywhere

chrome beacon
# merry abyss maven

Run the mvn install command in your api project then in your plugin project add it as a dependency using the information specified in the api projects pom

quaint mantle
chrome beacon
#

That's it

#

Just copy paste it

remote swallow
#

just mvn install

quaint mantle
remote swallow
#

yeah

quaint mantle
#

Ooo

#

Okay

quaint mantle
#

No such command: mvn

remote swallow
#

do you use intellij

quaint mantle
remote swallow
#

use the install lifecycle

quaint mantle
#

Okay

quaint mantle
remote swallow
#

change the dependency info, reload maven and clean package

merry abyss
quaint mantle
remote swallow
#

remove the scope and path

merry abyss
#

To add the Jar file i did -> Project structure -> Dependencies and added the jar file scoped to compile

remote swallow
#

you said you use maven, you should only use maven to add it

chrome beacon
quaint mantle
merry abyss
#

Got it. But how does the pom.xml know where my jarfile is then?

remote swallow
remote swallow
#

maven scans there by default

quaint mantle
#

Ooo

chrome beacon
#

Maven will first look there and then try and find it online

merry abyss
#
cannot find symbol
cannot find symbol````
Gives me the following error when trying to import it


```java
package org.meyer.afterlifetestdeleteme;

import org.bukkit.plugin.java.JavaPlugin;

public final class AfterlifeTestDeleteMe extends JavaPlugin {

    @Override
    public void onEnable() {
        // Plugin startup logic
        AfterlifePlayerAPI playerAPI = AfterlifePlayerBase.getPlayerAPI();
        getLogger().severe(playerAPI.getNumber() + "FΓΈrste gang!");
        getLogger().severe(playerAPI.getNumber() + "Anden gang!");

    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}
chrome beacon
#

So did you do what I told you to

quaint mantle
#

org.util:UUIDManagerπŸ«™1.0 was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced
This is what I got I dont understand this

merry abyss
#

I suppose not

chrome beacon
#

or you put the wrong dependency info

quaint mantle
remote swallow
#

either the mvn install command or install lifecycle in uuid manager

merry abyss
#

Im new to Java and minecraft development, so I might not understand every thing :P

Here is my pom.xml from my new plugin:

    <dependencies>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.meyer</groupId>
            <artifactId>AfterlifePlayerBase</artifactId>
            <version>1.0</version>
        </dependency>
    </dependencies>```
Here is my pom information i used from my api:
```    <groupId>org.meyer</groupId>
    <artifactId>AfterlifePlayerBase</artifactId>
    <version>1.0</version>```
chrome beacon
#

That's correct

#

After you run mvn install in the api project don't forget to reload maven

quaint mantle
#

IT WORKS!!

#

YES!!!!

merry abyss
#

I just dont get how my Main plugin knows about my api just by referencing the package, without any repo to get it from

merry abyss
#

πŸ˜”

chrome beacon
#

It's on your pc

merry abyss
#

Maven creates a local repo on my pc?

chrome beacon
#

Yes

merry abyss
#

Okay

chrome beacon
merry abyss
#

Made it work by referncing the full path c:/xxx/xxx/.jar
is that best practice if the plugin were to be on a remote minecraft server?

#

Can we perhaps join a voice chat @chrome beacon ?

silent slate
merry abyss
silent slate
#

If i ban my alt account (geysermc) bedrock account it doesnt ban him and instead only executes the debugging message (executed oncommand event)

silent slate
#

idk why

merry abyss
#

Which part of the code is not being executed?

silent slate
#

the part banning the player, so i have 2 problems.

I can ban players for template resons like this: /ban PLAYER 1

or for custom reasons and durations (needs extra perms)

/ban PLAYER DURATION REASON

But if i ban the player using a template the teamplate code doesnt eget executed and the player doesnt get banned and if i ban them for a custom reason like this: /ban PLAYER 2h test
it says its not a valid duration

chrome beacon
#

If so it doesn't really matter. It's up to you

#

If you want others to use your lib then it might be good to have

#

If you put it in a buildable state on to github you can use jitpack as a repo

merry abyss
#

Would you mind joining the voice chat, i can't figure this out?

chrome beacon
#

Not right now

#

What part isn't working?

merry abyss
#

<dependency>
<groupId>org.meyer</groupId>
<artifactId>AfterlifePlayerBase</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${project.basedir}\AfterlifePlayerBase-1.0.jar</systemPath>
</dependency>

this isnt reliable, cause the path of the minecraft server could possibly change

#

Also by trying to use this dynamic path it doesnt work

chrome beacon
merry abyss
#

Okay

silent slate
#

any ideas why it wouldnt execute the part, i got over it again and it should switch using args[1] which would be the arg after the player... dont understand why this wouldnt go

chrome beacon
#

?paste

undone axleBOT
merry abyss
#

yea sorry

chrome beacon
#

Seems like you got a nullpointer

#

Somethings null

#

You'd need to figure out what

merry abyss
#

Yes the playerAPI seems to be null

#

But I belive it's because the dependency isnt setup correctly

remote swallow
#

is the player api a plugin

merry abyss
#

Yes

remote swallow
#

add it to ur plugin.yml depend then

merry abyss
#

How

remote swallow
#

get the plugin name from player api plugin.yml then add ```yml
depend:

  • name
undone axleBOT
merry abyss
#

Gives me this error

remote swallow
#

that is the main class name

#

not the plugin name

merry abyss
#

oh

#

yea ur right

#

should it also have the .jar at the end?

remote swallow
#

no

#

just the value of name: in plugin.yml

merry abyss
#

It gives me the same error

remote swallow
undone axleBOT
merry abyss
#

Yes

remote swallow
#

you included the version too

#

all it needs is the name

merry abyss
#

Yes i also tried without the version

#

with just AfterlifePlayerBase

remote swallow
#
depend:
  - AfterlifePlayerBase
#

make sure you clean build after changes to plugin.yml

merry abyss
#

Okay got a new error now i suppose. The server just shutsdown

remote swallow
#

check the latest.log

merry abyss
#

?paste

undone axleBOT
merry abyss
chrome beacon
#

That can happen if you kill the server process

#

or if you run the same server twice (on different ports)

merry abyss
#

You're correct dumb mistake

#

getting a null pointer again

#

?paste

undone axleBOT
merry abyss
chrome beacon
#

Show us where you're setting playerAPI

merry abyss
#

And then getting it:

        AfterlifePlayerAPI playerAPI = AfterlifePlayerBase.getPlayerAPI();
chrome beacon
#

and where is that code

merry abyss
#

wdym code. Want to see my interface or where im using it?

#

In my main plugin im trying to use

        getLogger().severe(playerAPI.getNumber() + "FΓΈrste gang!");
        getLogger().severe(playerAPI.getNumber() + "Anden gang!");```
remote swallow
#

im gonna recon the plugin hasnt ran onEnable by the time you call getPlayerApi

chrome beacon
#

Yeah

merry abyss
#

Oh so it'd just call it outside my onenable

remote swallow
#

move the setting to onLoad

merry abyss
#

can i just move it like this?

    public static AfterlifePlayerAPI getPlayerAPI() {
        if(playerAPI == null) {
            playerAPI = new PlayerSetting();
        }
        return playerAPI;
    }```
chrome beacon
#

That would work too

remote swallow
#

yeah

chrome beacon
merry abyss
#

Now that i made changes to my api should i do the nvm install again?

remote swallow
#

ye

merry abyss
#

okay

#

mvn*

chrome beacon
#

or if you plan on shading

merry abyss
#

Cheers guys it works

#

Now when moving both my plugins to another computer/server, would it still work?

remote swallow
#

the jars yes, the project no

merry abyss
#

Beautiful thansk for helping me out😍 Really appriciate it!

quaint mantle
#

Hi guys. I have another problem. I tried to compile spigot -api from buildtools and also added a class file. Whenever I add something to it, it throws me this error: There are test failures

young knoll
#

I mean

#

You can technically just skip the tests

quaint mantle
#

How?

silent slate
quaint mantle
#

Failed tests: testAll(org.bukkit.AnnotationTest): There 1 are missing annotation(s)
Tests run: 1296, Failures: 1, Errors: 0, Skipped: 3
I looked more deeper and found this

orchid tide
#

I don't want to spam it. And I won't. I'll just reply once.

young knoll
#

Lol you are missing an annotation

#

Probably a nullability one

silent slate
# remote swallow

thats a nice reply but it wont help me if no one sees it for gods sake

orchid tide
#

lmao. chill dude

young knoll
#

Goal might be before -DskipTests, idk

quaint mantle
young knoll
#

hmm?

quaint mantle
#

I created a new class inside.

remote swallow
quaint mantle
#

But I can only see the standard API classes

young knoll
#

After running mvn install?

#

TikTok does have an API

quaint mantle
#

Wait I added the missing annotation

#

One sec ill test it

#

No still the same

#

How is this possible? I add changes to the code but then everything remains the same as it was before

young knoll
#

Well

#

Is your local repo getting updated properly

#

Is your project depending on the right thing

#

Did you try refreshinf project dependencies

quaint mantle
#

What is this and how?

young knoll
#

Idk, what IDE do you use

quaint mantle
#

IntelliJ

young knoll
#

Uhh

forest pumice
#

Why is e.getClickedBlock just not functioning in any possible way I use it? I even tried doing if e.getClickedBlock != null, but yea idk

young knoll
#

Right click the pom and try maven -> reload

quaint mantle
#

Yes it didnt

young knoll
#

Okay then check the dependency in the pom

#

Make sure it matches what is in maven local

quaint mantle
#

Every method gets recognised except for the ones I added to it

remote swallow
quaint mantle
#

This is what it looks like when I have it opened in the spigot-api project:

#

x is the class I added

young knoll
#

Did you remove the spigot nexus repo

quaint mantle
#

Yes

young knoll
#

Alright then it should pull from maven local

#

Double check the jar in maven local

forest pumice
remote swallow
#

the yellow over getType

young knoll
#

We can't tell you why it doesn't work with just that line

#

We need your entire listener

remote swallow
#

?paste

undone axleBOT
quaint mantle
#

It doesn't contain the file

young knoll
#

Okay so it isn't getting put in your maven local properly

#

Ah wait you are depending on spigot-api

quaint mantle
young knoll
#

But if you build a change in bukkit it's going to be under bukkit

quaint mantle
remote swallow
#

any reason ur adding this to spigot

young knoll
#

You should depend on bukkit if that's what you are editing

#

iirc the group is org.bukkit and the artifact is bukkit

#

version should be the same

quaint mantle
#

Didnt work, Im editing spigot-api

young knoll
#

I see

quaint mantle
#

Im doing something wrong at the compilation

#

Classes and methods I newly add to it are getting marked. Does this mean something except for that I newly added them?

young knoll
#

Probably not

#

Idk I normally just edit bukkit and craftbukkit

quaint mantle
#

😦

orchid tide
#

that's why I asked here :)

quaint mantle
#

Can anyone help?

orchid tide
#

and i mean. not documented at all...

quaint mantle
#
[17:19:34 WARN]: java.nio.file.NoSuchFileException: Dungeons/Fairy_c.schematic``

Boom thats the error well I already have the folder generated "DungeonSchem/Dungeons/Schematicdlncinsdicosdnoic
but in the error where is it trying to get the file from the container directory or?

echo basalt
quaint mantle
#

why the sadge man

#

im trying my best 😭

echo basalt
#

read

quaint mantle
#

just what I said was correct or incorrect

quaint mantle
#

I need

echo basalt
#

These are not the same

quaint mantle
#

clarification

#

😭

#

thankie

#

also hi col

young knoll
#

Granted the official API requires a bunch of setup

#

But it seems to just be a rest api beyond that

silent slate
#

all errors of everyone fixed now?

#

cause my problems isnt that deep im just too dump in java

remote swallow
#

what even is ur issue

silent slate
#

exactly my argument, you cant even see it cause its that far up top

remote swallow
#

i scrolled up

remote swallow
#

yeah whats the issue, i dont the issue ur having

orchid tide
silent slate
#

part of my code doesnt get executed

remote swallow
#

?paste all relevent parts then

undone axleBOT
silent slate
#

look at the oastebin, i explained it in messages

kind hatch
#

Just repaste them. It's easier than hunting down messages in discord.

silent slate
remote swallow
#

this code is scremaing learnjava a bit

silent slate
#

and i am screaming, doing projects helps u learn

#

tutorial hell is not the way to go

young knoll
#

Sure but this isn't a java project

remote swallow
#

the stuff that is saying learn java is something you should really know before starting projects

young knoll
#

This is a spigotapi project

silent slate
#

right

#

only wanna use java for spigotapi

#

btw

remote swallow
#

?basics

undone axleBOT
forest pumice
#

Why is just right clicking a chest is null? How has that happened then

silent slate
#

i dont need a teacher, i need a solution

young knoll
#

You should still learn the basics first

kind hatch
#

Lmao, who added that command?

young knoll
#

Before you decide to tackle a third party api

undone axleBOT
#

The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.

For example, only executing code if the main hand was used:

@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
    if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
        return; // do not progress past this point  |
    }
    // provide functionality
}
forest pumice
kind hatch
#

It won't detect what the hand is using, but what hand was used.

young knoll
#

Seems like you are clicking a chest with nothing in your hand

remote swallow
forest pumice
#

How exactly do you even see what hand was used? What's the differecne

kind hatch
#

You have two hands in 1.9+

young knoll
#

One is the left hand one is the right hand?

kind hatch
#

Offhand for shields

#

OR whatever item

forest pumice
#

ooookayyy

remote swallow
#

technically anything

kind hatch
#

Event fires twice

#

Because of both hands

remote swallow
#

you can also swap ur main hand

young knoll
#

Most things can be used in the offhand, yeah

kind hatch
remote swallow
#

no i mean make ur left hand main hand

round finch
#

HAND and OFF_HAND

young knoll
#

Doesn't matter which you set as main

#

HAND is always your main hand, even if you change it

forest pumice
#

Here's the thing right, I am trying to detect on right click of a chest, and it doesn't make sense why its nulling. This is my code AFTER the whole hand thing. The server is on 1.20 and the player is on 1.8.9

@EventHandler
    public void CrateClick(PlayerInteractEvent e) {
        System.out.println("Print something 1");

        Player player = e.getPlayer();
        if (e.getHand() != EquipmentSlot.HAND) { return; }
        if (e.getItem().getType() != Material.CHEST) { return; }

        System.out.println(e.getAction());
        if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
            System.out.println("Print something 2");
...
remote swallow
#

getItem will be the item in players hand

young knoll
#

if (e.getItem().getType() != Material.CHEST) { return; }

#

getItem may be null, which will make this line error

forest pumice
#

isn't e.getitem the clicked block?

#

cause e.getClickedBlock doesn't work

young knoll
#

No

#

getClickedBlock is the clicked block

#

Believe it or not

kind hatch
#

#getItem() is the item the player interacted with

#

#getClickedBlock() is the block they interacted with

remote swallow
forest pumice
#

apologies, just because getClickedBlock was just not working whatsoever

#

I'll try it again

eternal valve
#

I want to make a very simple plugin but I don't know how to do it or where to start : I just want to make a plugin that can close the vanilla (original) fishing loot table

young knoll
#

close it?

kind hatch
#

Original loot table? AFAIK, spigot doesn't interfere with them.

young knoll
#

It does not

eternal valve
young knoll
#

Use a datapack

#

Itemsadder lets you add stuff to it but not remove? kinda wack

tidal kettle
#

hello
you can make 2 server on the same machine with paper?

eternal valve
frank kettle
#

Why does the error java.lang.ClassNotFoundException appear when the class is from it's own plugin?

is it because of too many data on the plugin or smth like that? the plugin contains a minigame and lots of variables with information about the players online. Can this be the issue? like the plugin has some limit before it starts to break?

kind hatch
eternal valve
eternal valve
tidal kettle
forest pumice
#

Is this the same thing as getItemMeta? I want to get meta and then persistent data container, or do I just get world and use the first option? Because I can't seem to get the specific data from the first one

#

Something like this

kind hatch
echo basalt
#

?blockpdc

undone axleBOT
frank kettle
#

and then my friend was testing the minigame and the error came up when i tried opening the menu.

#

and then i restarted server and it was working again after.

young knoll
#

Did you reload or something

frank kettle
#

super weird, if this error will appear out of nowhere, it will be very annoying cause he finished the minigame and it didnt save any data cause another class(saving data) wasn't found either

frank kettle
young knoll
#

Idk then

#

Could be a bug in the plugin or maybe you got that cosmic ray bit flip

kind hatch
#

What's the full error?

#

?paste it

undone axleBOT
frank kettle
#

let me try to find it again, j've restarted a fe wtimes

young knoll
#

Potentially dangerous download

#

Oh discord

#

That's not a download

frank kettle
#

it's a paste link 😐

#

very dangerous, be careful

#

btw the server is in paper but the plugin is in spigot, idk where to ask this, it seems more like a java problem than anything else

#

πŸ€”

#

i also have the spigot remapped version on it, but it's on the end where it says "Caused by class not found" the problem

kind hatch
#

That's usually caused by the files not being included in your jar file. OR you are relying on an API that doesn't have those files either.

frank kettle
#

it's my own plugin files tho

#

and it was working at the start

#

and then mid-way through, it gave the error.

#

not only that one, but another class also was not found(the menu class i said earlier) when i tried to open a menu.

#

this also has happened to me few months ago, restarting fixed it again but it's kinda annoying if midway, the plugin has classes "that disappear", speacially when it's the classes for saving Data on the database....

#

my feeling is that the plugin has so many objects/variables that it "turned off" every other class that hasn't used up to that point(Or something like that), is that even possible?

young knoll
#

No

frank kettle
#

then idk why that happened

kind hatch
#

Classes don't just dissapear. Not unless they were removed and unloaded from the JVM

young knoll
#

Time to make a JVM that just yeets classes at random

#

For extra fun

remote swallow
#

coll stop modifing classes when you compile them

kind hatch
#

Make it a game. See how long your program can last.

frank kettle
#

another friend of mine will test the minigame, let's see if this will happen again

young knoll
#

no

kind hatch
#

Longest time alive wins

#

Basically, write malware

#

So it always stays alive

young knoll
#

I will modify classes when I please

kind hatch
#

lmao

remote swallow
frank kettle
#

restarted too soon?

remote swallow
#

sometimes when building to the plugins folder it doesnt update quick so you get a no class def ex when it does exist just didnt load

frank kettle
#

hm

#

i always join the server after a restart, so i never end up restarting too early. and when updating i wait for the windows notification saying that the file was uploaded to the server before i restart it.

#

will see now if it happens again, hella weird

#

πŸ€”

winter flower
#

I have an InventoryClickEvent and the player is defined as so:

Player player = (Player) event.getWhoClicked();

I am having an issue where the code doesn't get past this point:

int amount = 0;

for (ItemStack i : player.getInventory()) {
  if (!i.getType().equals(Material.WHEAT_SEEDS)) continue;
  amount += i.getAmount();
}

player.sendMessage("yes");

The for loop works properly but then the .sendMessage after it doesn't fire.

tall dragon
#

well there must be an error then

winter flower
#

Nope, which is why I'm confused

tall dragon
#

well ru sure ur running up to date code on the server then?

muted anvil
#

Does anyone know how to send a message in the ActionBar with Spigot 1.20.1 ?

winter flower
tall dragon
#

well there would be a nullpointerexception then xd

young knoll
remote swallow
tall dragon
#

unless ur catching it somewhere and ignoring it

remote swallow
#

e

winter flower
tall dragon
#

thats alright

muted anvil
winter flower
young knoll
#

It's part of bungeecord chat which is included in spigot

chrome beacon
#

Make sure you depend on Spigot

#

and not Craftbukkit

muted anvil
#

Okay

#

Thanks

onyx fjord
#

can i get the PersistentDataType while having only namespacedkey?

#

or just retrieve data as String or Object

young knoll
#

no

#

You need a type

remote swallow
#

loop has

echo basalt
#

Try them all

young knoll
#

Yeah you can loop all the built in types

#

You should get something at least

onyx fjord
#

cant I use a dummy one?

young knoll
#

Dummy what?

onyx fjord
#

dummy datatype

young knoll
#

Actually

#

Maybe

onyx fjord
#

cuz how it works is

#

its a two way conversion

#

right?

#

primitive <-> complex

young knoll
#

yes

onyx fjord
#

so if i make one with Object on two sides it will be compatible with all datatypes

young knoll
#

So you could make a dummy type that reutrns an object

onyx fjord
#

yeah makes sense

young knoll
#

Just don't try to save anything with it :p

tidal kettle
#

hello i try to change the difficulty in server.properties but it didn't work

#

any idea?

kind hatch
#

Did you restart the server?

tidal kettle
#

yes

#

the difficulty is:
peaceful
easy
normal
hard

#

??

kind hatch
#

It should only be one of those

tidal kettle
#

yes

#

but when i launch my server it's always on easy

young knoll
#

that's only for new worlds these days

#

Change it via /difficulty

tidal kettle
#

time to create new world

kind hatch
#

Someone mentioned that a while ago.

young knoll
#

Are you using a panel of some type

kind hatch
#

Seems like the same problem they were having

young knoll
#

That may be overriting things

tidal kettle
kind hatch
#

Is difficulty tied to the world now?

young knoll
#

Should be

#

Yeah it's in the level.dat

kind hatch
tidal kettle
#

after delete the world and recreate one, its work thx πŸ˜„

shell robin
#

How do I find out how many sharpness 5 enchanted books a player has in their inventory?

        for (ItemStack itemStack : player.getInventory().getContents()) {
          if (itemStack != null && itemStack.getType() == Material.ENCHANTED_BOOK && itemStack.getEnchantments().containsKey(Enchantment.DAMAGE_ALL)) { 
            Map<Enchantment, Integer> enchantments = itemStack.getEnchantments(); 
            if (enchantments.containsKey(Enchantment.DAMAGE_ALL) && enchantments.get(Enchantment.DAMAGE_ALL) == 5) {
            carrot += item.getAmount();
            }
          }        
        }```
young knoll
#

you need to use EnchantmentStroage meta and getStoredEnchantments

#

They are different than the regular enchants

shell robin
#

i can google it

#

thanks

vital sandal
#

is there any way to serialize configuration section?

lilac dagger
#

isn't it already serialized?

kind hatch
#

ConfigurationSerializable#serialize()

young knoll
#

Serialize it to what

#

A configuration section is basically a Map<String,Object>

kind hatch
#

You can get the ConfigurationSerializable object with ConfigurationSection#getSerializable()

onyx fjord
young knoll
#

It's primative type probably needs to be a valid primative type

onyx fjord
#

hmm

#

i dont rly get it

young knoll
#

don't get what

onyx fjord
#

what would be a valid primitive type

young knoll
#

One of the ones PDC can support

#

Soooo

onyx fjord
#

isnt pdc value always a string tho?

#

just parsed somehow

young knoll
#

byte byte[] double float integer integer[] long long[] short String PersistentDataContainer PersistentDataContainer[]

#

No

remote swallow
#

no Strign][

young knoll
#

nope

#

You could use byte[] for that

#

Or PersistentDataContainer

onyx fjord
#

all i want is to get the raw value

distant wave
#

is there any way to set/unset permission without actually holding the permission attachment inside a map

young knoll
#

Vault api

#

And a compatible perm plugin

#

Other than that, no

sand owl
#

hello I search a dev to code a plugin for disabling bed spawnpoint in 1.12.2 (only bed spawnpoint). I need to set the player spawn by command but the bed spawn is problematic. I pay for that

young knoll
#

?services

undone axleBOT
sand owl
#

thx

slate coral
#

Hey! Is there a way to use bungeecord API to add and remove servers to the priorities list while the bungeecord is running?

quartz pendant
#

possible to clone an mob with same meta, aware settings, etc in an event?

alpine flume
#

hey,
I used the build tools to download the Spigot Source and now I (at least tried to) add a Command. Can I use the BuildTools to just recompile the folder again without it downloading the git respository again and with that deleting my pogress?

young knoll
#

You are adding the command to spigot itself?

alpine flume
#

Yea

#

I wanted to tinker with that a little bit

#

as some sort of "Challenge" to see how easy it is to make own Server Jars

#

Im in the Spigot-Server Directory and I now want to build it again but the maven jar:jar outputs nothing usable

young knoll
#

BuildTools can be run with --dont-update

#

Which according to the wiki means "BuildTools won't pull updates from Git."

alpine flume
#

it reapplies the "patches" I think tho wich also deletes my created classes and edited files

agile lodge
#

Anyone know how to access the scoreboard

#

It seems like all the things related to it are abstract classes or interfaces

young knoll
#

To edit the main scoreboard it's Bukkit.getScoreboardManager().getMainScoreboard

agile lodge
#

Muchas gracias

alpine flume
#

like I want to make a troll Plugin on my Friends Server (wich I backked up before) and want to install a Plugin without him knowing. I disabled the /plugins command / changed it to not display any but he has access to the server so he would see the jar in the plugins folder.

But I am sure he wont look in like /var/plugins/ or something

#

well its a "Vanilla" Server. Its an SMP so any plugin that gets put on there he will know whats going on xD

remote swallow
#

i mean, by changing it you may break some plugins that arent setup probably

alpine flume
#

You mean my plugin? because there isnt any other plugin on there yk

warm mica
#

You may also just recompile a plugin that is already installed. Don't forget to obfuscate the virus, otherwise an av might detect it

young knoll
#

Idk if a troll plugin is gonna trigger an AV

#

I think we have differnt definitions of troll

shadow gazelle
#

If a troll plugin triggers an AV then it's malware and not really a troll at that point

warm mica
#

Pranked my friend by installing a virus on his pc (check)

shadow gazelle
#

Imagine an actual virus plugin

#

I don't know how that would spread though

#

anyway

#

I'm working on a weather plugin, but I'm not entirely sure how I should store the climate and temperature of a biome. Any ideas?

#

I guess it wouldn't really change and would just match the biome, so maybe I don't need to store it at all?

#

Although, rivers

#

I should probably figure out how weather is actually going to be controlled before I figure out if I need to store it or not lol

lethal python
#

when should i use metadata over persistentdatacontainer

#

what's metadata for

young knoll
#

Well not necessarily

#

Meta is temporary and expires on restart, yes

undone axleBOT
lethal python
#

yes i am storing serialized inventory in pdc

young knoll
#

MetaData however does not need a plugin instance to access

#

It's mostly useful to make stuff easily available to other plugins

#

But it can cause memory leaks

#

Which isn't ideal

lethal python
#

ok i will ignore it

quaint mantle
#

I try and change the display name of an item and change it's colour, but when i do the colour code is applied to both the start and the end of the display name, and this only happens with one particular line of code, and i have an almost identical line that doesn't suffer from this issue.

The issue occurs on the line files.add(itemProperties(item, ChatColor.WHITE + path.getFileName().toString(), List.of("File"), "file")); But not on the line folders.add(itemProperties(item, ChatColor.YELLOW + path.getFileName().toString(), List.of("Folder"), "folder"));.

Code:

List<Path> paths;
try {
   paths = Files.list(Path.of(position.get(player.getName()).getCurrentPath())).toList();
} catch (Exception e) {
   log(e, player, Level.WARNING, "There was an error trying to get the files in that folder.");
   return;
}

//creates file and folder objects, then sorts them
ArrayList<ItemStack> files = new ArrayList<>();
ArrayList<ItemStack> folders = new ArrayList<>();
FileData data = fileData.get(player.getUniqueId());
for (Path path : paths) {
   if (Files.isDirectory(path)) {
       ItemStack item = new ItemStack(Material.YELLOW_WOOL);
       if (data.getDeleteMode()) item = new ItemStack(Material.RED_WOOL);
       folders.add(itemProperties(item, ChatColor.YELLOW + path.getFileName().toString(), List.of("Folder"), "folder"));
   }
   else {
       ItemStack item = new ItemStack(Material.WHITE_WOOL);
       if (data.getDeleteMode()) item = new ItemStack(Material.ORANGE_WOOL);
       files.add(itemProperties(item, ChatColor.WHITE + path.getFileName().toString(), List.of("File"), "file"));
   }
}```
#

itemProperties:

/**
 * Easy method for setting some basic item properties.
 * @param item The item to apply the properties to.
 * @param displayName The desired item name.
 * @param lore The desired item lore.
 * @param identifier Gives an item a persistent data with the tag "identifier". This is used to uniquely identify items when using guis.
 * @return The modified item.
 */
public static ItemStack itemProperties(ItemStack item, @Nullable String displayName, @Nullable List<String> lore, @Nullable String identifier) {
    ItemMeta itemMeta = item.getItemMeta();
    if (itemMeta == null) return item;
    if (displayName != null) itemMeta.setDisplayName(displayName);
    if (lore != null) itemMeta.setLore(lore);
    if (identifier == null) identifier = "";
    itemMeta.getPersistentDataContainer().set(new NamespacedKey(JavaPlugin.getPlugin(FileManager.class), "identifier"), PersistentDataType.STRING, identifier);
    item.setItemMeta(itemMeta);
    return item;
}```
#

i've tried removing teh ChatColour.WHITE and then teh issue doesn't happen, i['ve also tried chaning it to ChatColour,YELOW like the line above and the issue still persists.

#

I'm not sure where the error in my code could be so i'm wondering if it's somehow a bug in spigot?

kind hatch
# quaint mantle I try and change the display name of an item and change it's colour, but when i ...

ChatColor codes are based off of the ASCII terminal color codes. Which you need to end with the RESET character otherwise you'll end up with the behavior that you are experiencing. Alternatively, you can append the original color of the ItemStack which in most cases is WHITE, but this is how color codes are intended to be used.

It works like this
"&cHello! This entire sentence will be red. &bHowever, this sentence will be cyan because I started the sentence with a new color code.
This line down here will also be cyan because I never specified an end to the color code. &rNow that the reset color code has been defined, this text is back to normal."

It's not necessarily a bug, but an annoying feature. Also, there are some cases where information that is put on a newline in lore will not retain the color from the previous line and you will need to re-add it if you need the color to rollover.

In the (hopefully soon to be) future, Components will be the defacto standard which shouldn't have these weird edge issues.

young knoll
#

afaik new lines in lore never inherit color from the previous line

quaint mantle
#

on the item name for one the the items a colour code is duplicated and added back onto the end of the string

young knoll
#

Can you do a minimum reproducable example

quaint mantle
#

i will attempt one in a few minuets

#

just busy rn for a second

lethal python
#

can i make a dummy inventoryholder so that when i call inventory.getLocation() on my custom inventory i can get its location

kind hatch
#

IIRC, it was orignally a 256 chars limit, but is now a 512 limit.

lethal python
#

i am only guessing that's how getLocation gets a location, from the holder

kind hatch
remote swallow
#

that should be a server.properties setting now

#

bc theres nothing really that shouldnt support it

young knoll
#

Used to be 100

#

Moved to 256 in 1.11

young knoll
remote swallow
kind hatch
#

There's no setting in the server.properties or spigot.yml that effects that.

remote swallow
#

there should be

#

mc add it

vagrant stratus
#

It's useless but fine

quiet ice
#

Javac inlines constats

young knoll
#

What would the setting do

#

Compiler inlines constants

quiet ice
#

Literally one of the fewest optimizations javac does

young knoll
#

No

#

They are for readability

#

Well then yes

slender elbow
#

and maintainability

young knoll
#

What did you think they were for

#

Sure but it's not

#

since you don't have to write that

slender elbow
#

if you have the same constant used in 35 places, you'd very much prefer changing it once in one place than 35 times in 35 places

quiet ice
#

There are instances where it is actually not to be inlined

young knoll
#

I would much rather write PI than 3.141592blahblah

vagrant stratus
#

So still useless

quiet ice
#

For example if you were to do String X = "blahblahblah" + (Boolean.parseBoolean("false") : "" : ""); it would not inline the constant

vagrant stratus
#

For most people, yes

#

Eh

#

Like with most of your other projects, doubt it

#

You're going for what you need and want, not for what people actually want

#

They can just look at their time

quiet ice
#

But Timezones!!!

young knoll
#

Why not just like

vagrant stratus
#

Make something people want

young knoll
#

Make something that can lookup any constant they want

#

That would be at least a bit more useful

#

Or

#

You could use web requests

#

One of those is useful

#

Somewhat

vagrant stratus
#

Still don't get the point of a clock given you can easily check the time yourself

young knoll
#

Technically you can somewhat reliably determine their timezone from IP

#

But like

#

Every computer has a clock

vagrant stratus
#

Oh God

#

You need to learn to code better

young knoll
#

Imagine checking arg count

#

For no reason

echo basalt
young knoll
#

Who cares

#

Just show them the damn string

vagrant stratus
#

Isn't there a PI constant as well?

young knoll
#

yes

#

Not to that many decimals but yes

echo basalt
#

just one

#

who the fuck is your target audience

vagrant stratus
#

Who needs that many numbers

kind hatch
#

I'm pretty sure command line tools just work if they don't expect arguments.

vagrant stratus
#

Seriously

vagrant stratus
young knoll
#

How many does nasa use

#

(15)

echo basalt
#

like who the fuck goes "oh bonanza I wonder what pi is but I'm too busy playing minecraft"

#

and needs more than like 10 decimals

young knoll
#

Yeah the java constant is exactly what NASA uses

#

3.141592653589793

kind hatch
#

You mean Math.PI?

young knoll
#

mhm

vagrant stratus
#

Seems like Marco has no actual ideas so is just coding random shit

young knoll
#

Mayhaps

vagrant stratus
#

If you need ideas, look at bukkit requests

#

There's 1000s of them

young knoll
#

Can you at least use the multiline strings

#

No no

#

Not with the stupid +

kind hatch
#

Math.E

young knoll
#
"""
Deez
Nuts""";
kind hatch
#

That's a thing??

young knoll
#

Yeah it's new

#

ish

#

Java 15 full release

kind hatch
#

Isn't there a time command in minecraft already?
Smth like /time query?

young knoll
#

But that's for game time

vagrant stratus
#

they want to show your IRL time

#

....which is easy to do already

young knoll
#

Very useful

vagrant stratus
#

very /s

echo basalt
#

okay but hear me out

#

what if

#

you just looked at the corner of your screen

young knoll
#

No

#

What if I play fullscreen!!!!1111

echo basalt
#

press f12 like twice

#

or just use a watch

#

or a phone

#

y'know

kind hatch
#

Real talk though. Does anyone play minecraft in fullscreen?

echo basalt
#

if your computer time is wrong