#help-development

1 messages ยท Page 2115 of 1

golden turret
#

๐Ÿ‘ good idea

tender shard
#

so the whole PDC is stored inside an NBTCompoundTag called "BukkitValues"

quaint mantle
quaint mantle
#

in some cases

#

why isnt there a fucking wrapper for nbt then if its that simple???

tender shard
#

yeah I also don't understand that

golden turret
#

i will do it
block_coord:
1,1,1
old_block

tender shard
#

huh

golden turret
tender shard
#

wizard

#

do you want to store data for blocks?

golden turret
#

nop

tender shard
#

oh kk

#

looked like it

quaint mantle
#

no mfnalex you cannot advertise promote your blockpdc in this case

#

customblockdata

#

whatever

tender shard
#

"advertise" lol

tender shard
quaint mantle
golden turret
#

i would like to not save blocks

tender shard
#

you wanna map data in a PDC to a certain block "location"?

golden turret
#

and when the chunk loads, i will get the blocks that i need to set again

tender shard
snow compass
#

I advertise really good site download my plugin on.... spigotMC XD

tender shard
#

you can do stuff like this:

  1. Save the data you want for every block you like
  2. Listen to CHunkLoadEvent, then do CustomBlockData.getBlocksWithData() or similar
  3. reset your blocks
#

alternatively, I have a library where you can simply store a List<Location> or Map<Location,BlockData> inside the chunk's pdc

midnight shore
tender shard
golden turret
#

in my case i just need the block type

undone axleBOT
midnight shore
tender shard
tender shard
fickle helm
#

it sounds interesting but I'm just going to use the built-in bukkit stuff since it's a simple plugin

golden turret
#

im trying to avoid libs

midnight shore
waxen plinth
tender shard
midnight shore
tender shard
#

what's WilloMobTC line 22?

golden turret
#

i actually need to save the whole block data...

midnight shore
#

this is willomobtc

tender shard
#

it provides DataType.BLOCK_DATA

tender shard
midnight shore
#

22 is CustomMobs.values() for loop

tender shard
#

libs exist to make your life easier

golden turret
#

consider your code as stolen now ๐Ÿ•ต๏ธโ€โ™‚๏ธ

tender shard
golden turret
#

i like to copy others lib

#

this is why wlib exists

tender shard
#

if you steal it, you have to obey the license though ๐Ÿ˜›

golden turret
#

na

#

i will just look how it works

#

and code in my own

tender shard
#

alrighty

midnight shore
#

i don't know why but sometimes i just get this weird errors when initializing classes

tender shard
# golden turret i will just look how it works
GitHub

Adds a ton of new PersistentDataTypes, including support for all collections, maps and arrays to the Bukkit API! - MorePersistentDataTypes/DataType.java at 144995766335727fc6050c2d29b511a0d4103400 ...

midnight shore
#

well

#

i think so

tender shard
#

your problem is probably that you have a kinda "recursion" in your enum class

#

you are probably using values() inside the declaration of the enum itself

midnight shore
#

again the whole enum is what i sent, theres not mention of values there

tender shard
#

that is, one of your Mob classes accesses the enum

midnight shore
#

uhh

tender shard
#

which cannot be

#

it works like this:

#
  1. Java static inits your enum
  2. It creates one instance of every of your mobs
  3. one of those mob classess access the enum
  4. FAIL! Your enum class isn't fully loaded yet
midnight shore
#

could this be it?

tender shard
#

you can avoid this by not making it an enum, but simply a normal class with many public static final fields

tender shard
#

if yes, that's the problem

midnight shore
tender shard
#

yes. let me show you how I'd do it instead: (one second, I gotta open intelliJ)

midnight shore
#

okay

tender shard
#

Avoid this:

    public enum MyMob {
        FirstMob, SecondMob, ThirdMob
    }

ANd do this instead:

public static class MyMob {
        public static final MyMob FirstMob = new FirstMob("FirstMob", ...);
        public static final MyMob SecondMob = new SecondMob("SecondMob", ...);
        
        private static final Map<String, MyMob> BY_VALUES = new HashMap<>();
        
        public MyMob(String name, ...) {
            BY_VALUES.put(name, this);
        }

        public static MyMob valueOf(String name) {
            return BY_VALUES.get(name);
        }
    }
midnight shore
#

my goodness

#

but why are enums done like this?

tender shard
#

then make all your mobs extend MyMob and call super(name) in the constructor

tender shard
#

that's the whole idea of an enum

#

they are supposed to be immutable

midnight shore
#

okay... i'll see. Thank you

tender shard
#

np

#

e.g. take a look at bukkit's Enchantment class

#

it's basically a "fake enum" too

crisp steeple
tender shard
#

my bad, I typed it in notepad

crisp steeple
#

ok that makes more sense

tender shard
#

fixed, thanks

tender shard
#

I TYPED IT IN NOTEPAD; DON'T BOTHER ME BRUUUUH

#

I will only talk to imajin again after they played the 2015 or 2016 trivia with me

tender shard
# midnight shore but why are enums done like this?

to explain it again: you access the values() method before the $VALUES field has been "finished". Since enums are supposed to be "static final" and immutable, this thing doesn't exist yet unless the whole class has been initialized / until all your mobs have been created.

midnight shore
#

got it thank you

tender shard
#

oh btw another tiny thing

#

you used toString on the enum

#

you should rather use name() on enums

#

although actually it doesn't matter since it returns the same thing lol

midnight shore
#

lol

sterile token
#

Anyone has an api/library for loading spigot and bungee files without being all time changing the code?

tender shard
#

wdym "loading spigot and bungee files"?

ivory sleet
#

yeah

#

configurate

sterile token
#

Configurate?

#

Can you send the url

#

I saw it before but i cannot find

sterile token
tender shard
#

it's what bukkit uses internally

#

you can just shade it yourself

sterile token
#

Does it contains sections?

tender shard
#

no

sterile token
#

Oh ok

tender shard
#

well

#

yes

#

it does

sterile token
#

I done a simple one

tender shard
#

every "section" is simply a Map<String,Object>

sterile token
#

But i cannot implement the section part

tender shard
#

imagine this:

sterile token
#

mnfalex can you help me?

tender shard
#
section:
  name: "mfnalex"
  age: 27
#

now you can use SnakeYaml and do this:

#
Map<String,Object> section = myYaml.get("section");
#

section is now a map that contains:

#

name -> mfnalex (String)
age: 27 (int)

sterile token
#

Alex

#

Please dont disconnect

#

Wait me i want to send code

kindred valley
#

@quaint mantle getLocation always returns null

tender shard
#

then there is no location at the given node

sterile token
#

I dont know how to code the getKeys(boolean deep);

tender shard
#

Afk 5 minutes, then iโ€˜ll answer

sterile token
#

Allright

#

No problem

kindred valley
#
@Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
        Player p = (Player)commandSender;
        Cash cash = new Cash();
        Configs.load();
        if(command.getName().equalsIgnoreCase("paracek")) {
            p.sendMessage(Configs.get().getLocation("location") + "");
            if(p.getLocation().distance(Configs.get().getLocation("locations")) < 4) {
                cash.getCash().setAmount(Integer.parseInt(strings[0]));
                p.getInventory().addItem(cash.getCash());
                Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "money take " + p.getName() + " " + cash.getCash());
            }
        }
        return true;
    }
#
@EventHandler
    public void onBlockPlace(BlockPlaceEvent e) throws IOException, InvalidConfigurationException {
        Player p = e.getPlayer();
        Bank bank = new Bank();
        Location location = e.getBlock().getLocation();
        if(!(e.getItemInHand().isSimilar(bank.getBank()))){
            return;
        }
        if(!(e.getBlock().getState() instanceof TileState)) {
            return;
        }
            Configs.load();
            Configs.get().set("locations", location);
            Configs.save();
            Block block = e.getBlock();
            BlockState blockState = block.getState();
            TileState tileState = (TileState) blockState;
            PersistentDataContainer container = tileState.getPersistentDataContainer();
            NamespacedKey key = new NamespacedKey(Main.getInstance(), "blocks");
            container.set(key, PersistentDataType.INTEGER, 1);
            tileState.update();
    }
``` @tender shard
sterile token
undone axleBOT
tender shard
# sterile token Allright

so basically your getKeys(boolean) method should look like this:

if(!deep) return nodes.keySet();
return getKeysDeep(nodes, new ArrayList<String>);

and getKeysDeep:

private static List<String> getKeysDeep(Map<String,Object> origin, List<String> list) {
  for(String key : origin.keySet()) {
    list.add(key);
    Object thing = origin.get(key);
    if(thing instanceof Map map) {
      getKeysDeep(thing, list);
    }
   }
}
#

oh and of course you still have to join the inner keys using "." to the "parent" keys you already have

#

so getKeysDeep should also take a string called "parentPath" or similar

sterile token
#

If you ask why im using Jackson its because i will add Json support too

tender shard
tender shard
# sterile token Allright, thanks. Now i will have to look how its with lambda :D
    private static List<String> getKeysDeep(Map<String,Object> origin, List<String> list, String parentPath) {
        for(String key : origin.keySet()) {
            list.add(parentPath.isEmpty() ? key : parentPath + "." + key);
            Object thing = origin.get(key);
            if(thing instanceof Map map) {
                getKeysDeep((Map<String, Object>) thing, list, parentPath.isEmpty() ? key : parentPath + "." + key);
            }
        }
        return list;
    }
#

something like this should work, but I haven't tested it

tender shard
#

are you registering the same CommandExecutor class to different commands?

kindred valley
tender shard
#

hm okay yeah I also did that 10 years ago but it's basically totally useless lol

kindred valley
#

to entering if statement

tender shard
#

your onCommand method will never be called for any other command anyway

kindred valley
#

i dont know why but i feel like i have responsibility to enter an if

tender shard
#

what I also don't understand: you called the node "locations", but you always only save one location inside it? isn't "locations" supposed to hold more than one location?

kindred valley
#

actually

tender shard
#

I have told you that many times

#

use a List<Location>

#

and save that

#

and to retrive it, you can do

List<Location> locations = (List<Location>) config.getList("locations");
#

WHY THE HECK CAN INTELLIJ NOT AUTOCOMPLETE THE PUBLIC STATIC VOID MAIN METHOD

echo basalt
#

because you usin light theme

tender shard
#

not everyone lives in a basement

tender shard
#

oh my god

#

thank you โค๏ธ

#

it's psvm but yes, thanks โค๏ธ

grim ice
tender shard
#

nope

#

YamlCOnfiguration has no methods to save/load Sets

grim ice
#

Sad

tender shard
#

Set*

#

set noises

grim ice
#

pretty sure it used to be psv

tender shard
#

psm also works because autocomplete

grim ice
#

I mean that makes sense, cuz psv is only public static void

tender shard
#

actually even p works

grim ice
#

LOL

tender shard
#

but the actual shortcut name is "psvm"

#

ah yes

#

zero or billions of times

kindred valley
#

from command

#

p.getLocation().distance(Configs.get().getLocation("locations")

tender shard
#

does someone an idea on how to improve this?

    static String pad(String string, int length, char filler) {
        int originalLength = string.length();
        int difference = length - originalLength;
        StringBuilder stringBuilder = new StringBuilder(string);
        for(int i = 0; i < difference; i++) {
            stringBuilder.insert(0, filler);
        }
        string = stringBuilder.toString();
        return string;
    }
sterile token
sterile token
tender shard
tender shard
snow compass
tender shard
#

does this work here?

#

I'm afraid to ping @ everyone lol

tender shard
#

yet you are trying to get a location

#

however at "locations", there is no Location. There is a List<Location>

sterile token
#

Oh lmao i think its ?learnjava moment

tender shard
#

so use getList("locations"); instead

#

List<Location> != Location

hybrid spoke
kindred valley
kindred valley
tender shard
#

getLocation(X) obviously returns a location that's saved at node X.
If there is no location at X, for example because X doesn't exist, or because X is not a Location, but... a String, or a List<Location>, then obviously getLocation(X) returns null

#
List<Location> locations = config.getList("locations");
tender shard
#

?learnjava

undone axleBOT
kindred valley
tender shard
sterile token
#

Lmao i hate and love lambda at the same time

#

๐Ÿคก

tender shard
#

it basically fills the string with "filler" chars until the string has "length" length

grim ice
#

Ohh

sterile token
grim ice
#

then ig better the method name

tender shard
#

e.g.

    public static void main(String... args) {
        String string = pad("mfnalex",20,'0');
        System.out.println(string);

should print 0000000000000mfnalex

sterile token
tender shard
#

?

#

oh you mean because it's in my StringEncryption project?

sterile token
#

Yes

#

I want to know if the method its secure to be used for code

#

๐Ÿค”

tender shard
#

I need this for my string encryption because obviously %%__USER__%% has different lengths. some people have a user id of 1726, others have an ID of 1751261. So I need to "pad" the string to have a fixed length all the time

hybrid spoke
#

if its all about numbers convert it to bin, hex, whatever

tender shard
#

no that makes no sense, since spigot itself replaces the placeholder when downloading the jar

sterile token
#

So can or not?

tender shard
#

I cannot convert anything or whatever

sterile token
#

But could the method used for method obfuscation?

tender shard
#

I upload

String string = "%%__USER__%%adsasdasd";

then two people download it. some people get this:

#
String string = "123asdasdasd";

other people get

String string = "814561asdasdasd";
pastel juniper
#

Why I still can't extend EntityVillager, I have both Spigot and Spigot-Api

dense geyser
#

regex issue

grim ice
#

I need ideas to make

tender shard
kindred valley
#

mf

#

believe me if you are new in java(functional beginner) yml f*cks your brain.

tender shard
#

well

#

yaml doesn't have anything do to with java

kindred valley
tender shard
#

it's quite easy, look at this:

kindred valley
#

i forgot

tender shard
#
node1: Something
node2:
- something1
- something2
kindred valley
#

what the f*ck is hashsets

tender shard
#

obviously node1 is a string, node2 is a list of strings

kindred valley
#

yes thank you for helps

tender shard
kindred valley
grim ice
#

you definitely never knew what it was

#

You dont forget stuff like that this easily

sinful tundra
#

Does anyone know why this doesn't get my item in the main hand except for everything else?

for (int i = 0; i < 41; i++, itemStack = this.player.getInventory().getItem(i)) {
            if (itemStack != null) {
                Bukkit.getLogger().info(itemStack.getType().name());
            }
        }
#

nvm I figured it out

granite beacon
#

Is there a way to get the "weight" of an entity?

kindred valley
tender shard
granite beacon
tender shard
#

they all fall equally fast, don't they?

kindred valley
granite beacon
#

Nope

tender shard
#

can you give an example?

granite beacon
#

For example, a player falls faster than a dropped item

tender shard
#

hm

granite beacon
#

A player falls faster than a chicken

#

etc

tender shard
#

well nonetheless I have to armchair quarterback: gravity has nothing to do with weight

#

๐Ÿ˜›

dense geyser
#

I mean

granite beacon
#

I'll just explain what I want, I'm trying to make a function to launch an entity to a location with an arch

tender shard
#

a feather is equally attracted by gravity as an anvil is

granite beacon
#

I got this but it doesn't work 100% of the time (mainly to be attributed to the gravity variable)

#
    public static Vector calculateVelocity(Vector from, Vector to, double heightGain, double gravity) {
        // Block locations
        int endGain = to.getBlockY() - from.getBlockY();
        double horizDist = Math.sqrt(distanceSquared(from, to));

        // Height gain
        double maxGain = Math.max(heightGain, (endGain + heightGain));

        // Solve quadratic equation for velocity
        double a = -horizDist * horizDist / (4 * maxGain);
        double b = horizDist;
        double c = -endGain;
        double slope = -b / (2 * a) - Math.sqrt(b * b - 4 * a * c) / (2 * a);

        // Vertical velocity
        double vy = Math.sqrt(maxGain * gravity);

        // Horizontal velocity
        double vh = vy / slope;

        // Calculate horizontal direction
        int dx = to.getBlockX() - from.getBlockX();
        int dz = to.getBlockZ() - from.getBlockZ();
        double mag = Math.sqrt(dx * dx + dz * dz);
        double dirx = dx / mag;
        double dirz = dz / mag;

        // Horizontal velocity components
        double vx = vh * dirx;
        double vz = vh * dirz;
        return new Vector(vx, vy, vz);
    }

    private static double distanceSquared(Vector from, Vector to) {
        double dx = to.getBlockX() - from.getBlockX();
        double dz = to.getBlockZ() - from.getBlockZ();
        return dx * dx + dz * dz;
    }
fading lake
#

if we were being technical, weight = force of gravity * mass, or F=mg where g = 9.81ms^-2

grim ice
granite beacon
#

if only Minecraft used "mass" for entities

fading lake
#

iTS lATe

#

iVe hAD a LonG daY

kindred valley
tender shard
#

oh wait of course, yes
g = 9.81m/s/s

kindred valley
#

but i guess you are not

tender shard
#

I got confused by the notation you used

fading lake
#

N/kg

grim ice
#

a tall, fat beginner?

fading lake
#

wait N/kg = ms^-2 sometimes

#

nvm

granite beacon
#

So is there any way I can find the "gravity" of mobs?

grim ice
#

lmao everyone was a beginner

tender shard
#

anyway, gravity is not affected at all by the weight of the object

#

only air resistance is affected by that

fading lake
tender shard
#

which of course results in a slower fall

#

but the gravity itself doesn'T care about any air

kindred valley
#

๐Ÿ™ƒ

grim ice
#

u dont need to censor it tbf

kindred valley
#

no definitely not

grim ice
#

its allowed to swear as long as its not excessive

tender shard
#

fuck

granite beacon
tender shard
#

let me check if I find something

fading lake
#

ig you'll struggle then

grim ice
#

it just pissed me that ur trying to look like u knew what something is, when u clearly have read the term for the first time

granite beacon
fading lake
#

unless there's pathfinders that modify gravity but i dont think there are ;-;

grim ice
#

just to not feel embarrassed i assume

fading lake
#

oh theres a gravity speed in nms?

#

interesting

granite beacon
#

I don't think so

tender shard
kindred valley
tender shard
#

otherwise items would fall at the same speed

kindred valley
#

maybe not very functional but yes i know

fading lake
#

I think it'd be pathfinders more than anything

tender shard
#

can you please open a thread to mock each other, instead of doing it here?

grim ice
#

what is a TreeMap

ivory sleet
kindred valley
fading lake
#

a mapped tree

kindred valley
#

tree and hash

grim ice
ivory sleet
#

a map that sorts by a comparator

grim ice
kindred valley
#

alphabetical order i remembered as

granite beacon
ivory sleet
#

so no hashing in principle

tender shard
#

anyway pls stop this weird discussion, there's currently people actually looking for help

fading lake
#

Several people are typing...

granite beacon
#

There ya go @tender shard

tender shard
#

thanks lol

tender shard
sterile token
#

Anyone has a Bootstrap library for loading bungee and spigot plugins?

tender shard
#

there you'll probably see how "velocity" for falling stuff works, and then also see where that value comes from

ivory sleet
tender shard
#

bruh wtf

#

just include both a bungee.yml and a spigot.yml

#

erm

ivory sleet
#

but in reality just extract your bootstrap logic

tender shard
#

I mean plugin.yml instead of spigot.yml

granite beacon
#

@tender shard I love how you asked me to open a thread and then said it in here lmao

sterile token
#

No no you dont understand

ivory sleet
#

and then delegate and invoke from respective entry points

tender shard
#

I wanted the other persons to open a thread

#

they were like "ha you don't know java" "yes I do" "no you don't" - I wanted them to open a thread for it ๐Ÿ˜„

#

so that we can keep discussing actual questions here ๐Ÿ˜„

ivory sleet
#

ha you don't know java
sadge

grim ice
#

@granite beacon ur website is awesome btw

granite beacon
fading lake
#

who needs a topic

grim ice
#

I mean is it really off topic when there is no real topic going on

fading lake
#

this is spigot

granite beacon
#

big brain lol

fading lake
#

boooooooooooost

tender shard
#

So

#

I don't know who here was talking about entity falling speed

#

but

#

NMS Entity has an interface called "MoveFunction" with an "accept" method

#

I'll try to find something that implements this

rugged cargo
#

i may have just written the worst case of indentation madness (and i love it)

granite beacon
#

I was trying to figure out how on earth I can get the gravity variable to plop into that function

tender shard
#

every LivingEntity has a falling speed delta of 0.08

#

it's basically hardcoded into the method itself as a local variable

#

so there is no way to figure it out easily

#

this is the base value for all living entities

grim ice
#

wit

#

wait

granite beacon
#

what about non living entities?

echo basalt
#

that's too fancy

tender shard
grim ice
#

if u have an edited spigot version

echo basalt
#

it's a lot easier to read as 1 letter variables

grim ice
#

would that work out

ivory sleet
#

Poons what you could do is to super call it and override what needs to be overridden

#

or just override it completely

echo basalt
#

or use cheat engine to modify the variables on runtime

tender shard
granite beacon
#

^

ivory sleet
#

ah

#

well wont delta movement's y component do the trick

tender shard
#

but where would they get it from?

#

they want to find out "how fast would this entity fall if it would start falling now" AFAIK

urban trout
grim ice
#

u can do byte code manipulation to redirect to ur own method thoughh right

tender shard
#

I just checked the NMS Item class and couldn't find anything in there

ivory sleet
#

uh to some extent

tender shard
#

maybe it's inside the WorldServer / ServerLevel class

ivory sleet
tender shard
ivory sleet
#

the falling speed isnt constant tho, there are a lot of things taken into account

tender shard
#

I found it in LivingEntity but I just checked and "items" (dropped items) indeed fall slower but I couldn't find anything related to that

tender shard
ivory sleet
#

honey blocks, water, and slow falling just to name a few

tender shard
#

yeah sure

granite beacon
#

I don't need to worry about those though

tender shard
#

I am simply looking for where Items override the 0.08 value in air

ivory sleet
#

cuz all of that can be considered "falling"

urban trout
tender shard
#

the config resets, or the actual file resets?

urban trout
#

the actual file

#

just goes back to default

tender shard
#

then you are obviously saving it somewhere

urban trout
#

i thought maybe setup but thats only if it doesnt exist

river oracle
#
        final Map<String, ?> map = (Map<String, Object>) config.getMapList(path);
        
        Material material;

        Object objmaterial = map.get(ItemPaths.MATERIAL);
        if(objmaterial instanceof String){
            material = Material.getMaterial((String)objmaterial);
        }else{
            material = Material.AIR;
        }``` This code should handle npe's correct?
urban trout
#

i have a save in the onenable

#

shall i get rid of that

ivory sleet
#

well getMaterial is nullable

river oracle
#

oh yeah ๐Ÿคฆโ€โ™‚๏ธ

tender shard
#

why is save() returning null all the time

urban trout
#

what

#

oh

#

idk

fossil lily
#
TextComponentImpl{content="", style=StyleImpl{color=null, obfuscated=not_set, bold=not_set, strikethrough=false, underlined=not_set, italic=not_set, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[TextComponentImpl{content="ยง2Guild > ยงa[VIP] FabledLivid ยง3[E]ยงf: ", style=StyleImpl{color=null, obfuscated=not_set, bold=not_set, strikethrough=false, underlined=not_set, italic=not_set, clickEvent=ClickEvent{action=run_command, value="/viewprofile c5b96c06-149a-4c43-818c-eb2f883ee6b9"}, hoverEvent=HoverEvent{action=show_text, value=TextComponentImpl{content="ยงeClick here to view ยงaFabledLividยงe's profile", style=StyleImpl{color=null, obfuscated=not_set, bold=not_set, strikethrough=false, underlined=not_set, italic=not_set, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}}, insertion=null, font=null}, children=[]}, TextComponentImpl{content="bot is deing", style=StyleImpl{color=null, obfuscated=false, bold=false, strikethrough=false, underlined=false, italic=false, clickEvent=null, hoverEvent=null, insertion=null, font=null}, children=[]}]}

How can I get the string from [TextComponentImpl{content="ยง2Guild > ยงa[VIP] FabledLivid ยง3[E]ยงf: "

fossil lily
urban trout
#

oh nvm i fixed it

#

idk why i was setting

#

rookie mistake smh

ivory sleet
granite beacon
#

Oop embeds are turned off

ivory sleet
#

oh so given a max height, you want to be able to still make sure it lands where it should?

granite beacon
#

Correct

#

I did some searching on spigot/online and nothing lead me to a conclusive method I could use that was relatively accurate

ivory sleet
#

mye

granite beacon
#

?

ivory sleet
#

I mean problem is living entity kinda applies a lot of things when ever you apply a vector

#

one way would be to override w/a custom entity

granite beacon
#

I wouldn't be opposed to using one

ivory sleet
#

let me try a few things rq

granite beacon
#

Alright, really appreciate it :)

rain grove
#

Is there a function to see if there is a Worldguard protection in a location?

tender shard
#

do you only care about worldguard, or other protection plugins as well?

granite beacon
rain grove
tender shard
#

that's because there is no such thing as "protection" in worldguard per se

#

do you wanna check if there's a region at all? or do you wanna check if a player is allowed to build/break blocks there? etc

granite beacon
tender shard
rain grove
granite beacon
#

I just sent you the code you need to do that ^ @rain grove

tender shard
#

players can for example be allowed to build but not break blocks

rain grove
tender shard
#

so you have to tell worldguard what to test for

granite beacon
#

If it's empty then it doesn't have any region

tender shard
rain grove
tender shard
#

I also have this if you wanna check what regions are at a certain location

#

^

rain grove
#

I'm going to try and see what I can do with it

pastel juniper
#

I have add in dependencies both Spigot-Api and Spigot (version 1.18) but still can't extend to EntityVillager

sterile token
#

Is there way of doing something like a Boostrap<T> class (with methods: onEnable, onReload, onDisable, getPlugin) so i can use that method without knowing if T is either JavaPlugin or Plugin?

#

Because the class is done, but i dont know how to them register the all the things by getting the plugin instance

rugged cargo
#

who know would so cool, but also impossible?

#

the ability to put custom items in the creative inventory

opal juniper
#

thatโ€™s not how that works

tender shard
#

well you could just use reflection to call those methods

#

but

#

WHY

native gale
#

A question about opinions. What is the best way to handle the config files in the plugin?

river oracle
#

with a class

#

that isn't the default spigot getConfig() method in the main clas

native gale
#

I mean, architecturally. Placing everything in the onEnable isn't the only option, right?

fossil lily
#

How can I get data from a textcomponent?

#

I cant figure this out

noble lantern
delicate lynx
rugged cargo
#

can you change an item's texture based on nbt/meta data with spigot?

fossil lily
delicate lynx
#

are you using adventure?

rugged cargo
#

what's adventure?

delicate lynx
fossil lily
delicate lynx
#

I don't see anyway to get the text

#

from a Component

rugged cargo
#

oh. i think i found my solution.

fossil lily
delicate lynx
#

that could work

fossil lily
#

So I have the GSON object here: ```{"strikethrough":false,"extra":[{"strikethrough":false,"clickEvent":{"action":"run_command","value":"/viewprofile 248d876f-eb5e-42d4-ac53-7258ca5e12d0"},"hoverEvent":{"action":"show_text","contents":{"strikethrough":false,"text":"ยงeClick here to view ยงbLoudbookยงe\u0027s profile"}},"text":"ยง2Guild \u003e ยงb[MVPยง2+ยงb] Loudbook ยง3[STAFF]ยงf: "},{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"text":"tsdasdasd"}],"text":""}


How can I get a specific peice of text? Specifically this one:
#

There are multiple "text": so idk how to get the one I want

hasty prawn
fossil lily
#

my bad

hasty prawn
#

Did you get it working?

fossil lily
fossil lily
#

I have been doing this for so long

#

Lifesaver :D

delicate lynx
#

you could use PlayerItemConsumeEvent and check if it's a honey bottle

#

it doesn't return the item, so you could just delay check the inventory after

tender shard
noble lantern
#

i was actually gonna add a bunch of PDC types to this library as well

#

basically just start with Boolean/UUID and then go from there

#

however generic Collection sounds fun

brave sparrow
#

I donโ€™t think there is one

#

Youโ€™d have to basically cancel the drink event and replicate the honey drinking behavior yourself

noble lantern
#

isnt there

#

a PlayerConsumeEvent

#

or some shit

brave sparrow
#

There is

delicate lynx
#

see my message

brave sparrow
#

But that wonโ€™t return the glass bottle at the end

#

Which is what they want

#

The consume event fires before the glass bottle is added

delicate lynx
#

they could just check a few ticks later ๐Ÿคทโ€โ™‚๏ธ

brave sparrow
#

Thatโ€™s how you get glitches and exploits

noble lantern
#

you might not even need to run it one tick later

#

idk how that event works but i assume it would happen after the actual consumption of said item

brave sparrow
#

Thatโ€™s how you get some jerk with a modified client doing something stupid

delicate lynx
#

ehh let them duplicate glass bottles oh well

brave sparrow
#

The event is cancellable and therefore has to fire before the actual consumption

delicate lynx
#

probably gets called when a player starts eating/drinking

noble lantern
#

you could implement your own event

#

PlayerAfterConsumeEvent

brave sparrow
#

Lol

noble lantern
#

and fire it one tick after PlayerItemConsumeEvent

brave sparrow
#

Thatโ€™s probably how I would do it to be fair

#

Not one tick after

#

Iโ€™d just patch the spigot to call my event

#

But thatโ€™s not really viable for public plugins

noble lantern
#

well if you want it to be a public plugin then you couldnt really add a patch to spigot

Unless you mean PR your own event for it then yeah

brave sparrow
#

Yeah I donโ€™t do much public plugin dev these days lol

noble lantern
#

ngl im sure a PR for that event would get accepted

tender shard
grand perch
#

Can I use json for config?

brave sparrow
#

I mean youโ€™d have to make it a little more refined but the general gist might be fine

brave sparrow
#

Spigot uses YAML

grand perch
delicate lynx
#

you have to set it up yourself

noble lantern
grand perch
brave sparrow
#

If you write a system to read in/write out JSON files as configs or depend on a library

tender shard
noble lantern
brave sparrow
#

You canโ€™t use the normal spigot configuration api though

noble lantern
#

^

delicate lynx
#

just use any sane JSON library and you are good to go

brave sparrow
#

Gson is nice

noble lantern
#

Spigot provides Gson

#

so no need to even import it

#

since spigot provides ๐Ÿ™‚

tender shard
brave sparrow
#

I think minecraft provides it these days lol

noble lantern
#

oh shit fr

grand perch
noble lantern
#

it hurts theyre brain

grand perch
#

Oh

tender shard
noble lantern
#

i much rather prefer json for configs tho tbh

grand perch
#

My client is a developer himself he'll be fineeeeee

noble lantern
#

so much nicer to use

brave sparrow
#

JSON is way better, both for the programmer and the person manually editing configs by hand

#

But

#

Itโ€™s harder to ELI5

#

So itโ€™s not as popular with spigot

grand perch
#

Why doesn't spigot support json

noble lantern
#

look at ops.json for example

brave sparrow
#

Thatโ€™s minecraft

#

Lol

noble lantern
#

just not all files are in json

#

well, same thing in a sense i guess ๐Ÿ˜›

brave sparrow
#

All of the spigot configs are YAML

tender shard
# grand perch Why

Let me try to explain:

doSomething: true
someMessage: "%player% did something"
otherMessages:
  bossbar: "This is a bossbar message"
  actionbar: "And another actionbar message"

Easy, right? Nothing can go wrong

This however:

{
  "doSomething": true,
  "someMessage": "%player% did something",
  "otherMessages": {
    "bossbar": "This is a bossbar message",
    "actionbar": "And another actionbar message"
  }
}

It's so stupid. Admin edits a message, and forgets to add "," at the end, or accidently deletes a bracket = FILE IS BROKEN

brave sparrow
#

Minecraft went over to JSON a while back

tender shard
#

you should NEVER use json for config files

#

unless you hate your users

noble lantern
#

and is ez

grand perch
#

But my client is a dev he'll be fine

noble lantern
#

json parsers exist

tender shard
brave sparrow
kind hatch
#

Also, Yaml is a bit forgiving with it's string formatting. You don't need the "" marks in some cases

delicate lynx
#

as long as he knows how to read and format JSON, go for it

grand perch
#

He's a TS dev I'm very sure he'll be fine

noble lantern
#

Titty Sunday dev?

#

oh

tender shard
#

people pay you to do plugins, yet you still ask here for help for basic questions? your "client" must be very naive tbh

noble lantern
#

type script

brave sparrow
#

I always make my personal configs with JSON, itโ€™s so much cleaner than a YAML config

#

And it deserializes right into whatever object I want

grand perch
brave sparrow
#

I hate YAML

tender shard
#

{{{ is not cleaner than a yaml file

grand perch
#

They don't pay me

brave sparrow
#

I find it cleaner

#

Lol

tender shard
brave sparrow
#

Itโ€™s very clear nesting, it mimics the nesting of the code

grand perch
tender shard
#

I don't wanna say that yaml is better, I just wanna say that yaml is "cleaner" / "easier to use" for admins

kind hatch
#

JSON is easy for developers not end users. YAML on the other hand is very user friendly.

brave sparrow
#

Like I said before

#

YAML is easier to ELI5

#

Lol

tender shard
tender shard
grand perch
#

What if I had 2 config 1 is json the other is yaml

brave sparrow
tender shard
kind hatch
tender shard
#

why would you have 2 different formats for config files?

#

either go full json or full yaml

grand perch
#

Why not

brave sparrow
#

YAML is easier to use in spigot if youโ€™re doing a few large configs

tender shard
delicate lynx
#

what is the purpose

grand perch
tender shard
#

I could also make all my users use .uwu files instead of a yaml

#

but

brave sparrow
#

If youโ€™re doing a load of smaller config files JSON is easier long term

tender shard
#

obviously they'd rather use "normal" config files

#

there is no need to use Json EVER or configs

#

json just makes users go into rage mode

#

and it doesn't have any advantages either

grand perch
#

Change doesn't hurt :/

tender shard
#

haha

#

changes DO hurt

#

you never hosted your server

brave sparrow
#

JSON is a better format for technically skilled end users, Iโ€™m not disputing that YAML is easier for the masses to get a grasp of

kind hatch
#

Changes also take effort, which a lot of people don't want to exert.

delicate lynx
#

JSON to me is for APIs lol

tender shard
#

YAML is the superior version of json

grand perch
#

Yaml is dumb

brave sparrow
#

Itโ€™s just not lol

tender shard
#

YAML can do everything that JSON can, PLUS MORE

#

also the syntax is more friendly

brave sparrow
#

YAML is JSON dumbed down for the average individual

grand perch
#

It relys on tab to nest items

tender shard
#

YAML is JSON with additional features + easy to read syntax

grand perch
tender shard
noble lantern
#

Skript is yaml on drugs *

grand perch
#

Both

noble lantern
#

no yaml is yaml which is decent

brave sparrow
#

JSON is perfect for a config, you build a config object which can either be loaded from a file or created programmatically in a trivial manner, and in file format perfectly mirrors the structure of the object it represents

noble lantern
#

skript is basically yaml but its shit

vocal cloud
#

JSON is perfect for machine to machine messaging through an API. It allows different languages to communicate

tender shard
#

enjoy your json all you want, I don't care. facts are: yaml is superior to json.

  1. syntax is waaaay easier for admins
  2. there's not a single disadvantage

tl;dr: yaml = json for humans, without downsides

grand perch
noble lantern
#

what

brave sparrow
#

The syntax for YAML is clunky and itโ€™s not a great representation of the objectโ€™s structure

tender shard
delicate lynx
#

knowing how to read YAML/JSON doesn't make you a dev

kind hatch
#

Here's what I don't get. If your end users need to edit files and are get frustrated with JSON, why wouldn't you make it easier for them? You have to remember that what's easy for you may not be easy for others. That's part of the responsibilities developers have. Catering to your users.

tender shard
brave sparrow
#

Gotta prettify it at least

#

Gosh

grand perch
delicate lynx
#

that's not even valid JSON!!!!!!

grand perch
tender shard
#

json is a nice idea. but for config files?! wtf?!

noble lantern
#

I think this is the jaeger talking

tender shard
#

whoever uses json for config files is probably more drunk than I am rn

grand perch
#

You just hate trying new things

delicate lynx
#

I've def used JSON for configs before, but I would never in a plugin since most server owners are comfortable with YAML to somewhat degree

noble lantern
#

just make a in game config editor

tender shard
noble lantern
#

that stores the config in json

kind hatch
noble lantern
#

that too

tender shard
vocal cloud
noble lantern
#

web editor is nice just a pain to setup initially

#

why

delicate lynx
#

make a config editor like luckperms with syncing

tender shard
#

I just blocked them now

noble lantern
tender shard
#

I have to repeat myself: json is a nice thing. but it's shitty for config files

grand perch
noble lantern
#

wha

delicate lynx
#

then what's the point of the config

grand perch
#

Instead I'll make a config command

delicate lynx
#

if the user doesn't need to change it

kind hatch
#

If you were to make your settings modifiable via in game commands or web editor, then it really wouldn't matter what file format you store your data in. You could store your data in a .fuckyou file for all it matters. The difference is whether or not the end user will ever need to modify it manually.

If they don't then do what you want.
If they do, make it easy for them.

grand perch
#

It uses a frontend command to do so

noble lantern
delicate lynx
#

๐Ÿ’€

vocal cloud
#

Just cause they never use it doesn't mean you can't use something readable

grand perch
#

I would make the config accessible

#

But you can config it on the server

#

Like lp and stuff

noble lantern
#

you could always just make 2 different sets of configuration honestly

vocal cloud
#

Yeah but what if they want to modify while the server is off lol

grand perch
#

/setshop material name price

grand perch
brave sparrow
#

Here's an example of a simple JSON config I used recently:

  "minioConfig": {
    "endpoint": "",
    "accessKey": "",
    "secretKey": "",
    "region": "",
    "bucketName": ""
  },
  "redisConfig": {
    "host": "",
    "port": 6379
  }
}```

It's clear where each config object begins and ends, and the overall config object is a sequence of smaller configs that can be individually deserialized
delicate lynx
#

just make 2 configs, one JSON and one YAML and the user can use whatever one they one

delicate lynx
#

problem solved

grand perch
#

That's what I was thinkingtl

noble lantern
#

i wonder

grand perch
#

Then that guy came and showed his opinion

delicate lynx
#

both parties are satisfied

noble lantern
#

could you encode yaml to json??

grand perch
brave sparrow
#

you can transpile any language into another one lol

noble lantern
#

yeah but like i wonder if gson or something has a method for it

brave sparrow
#

no

#

it does not

noble lantern
#

or would i have to do that shit myself

#

damn

grand perch
#

My problem with yaml is tabs lol

brave sparrow
#

you'd have to support it yourself

vocal cloud
#

But why would you have 2 when one works FacePalm

noble lantern
#

stubbornness

vocal cloud
#

Something like that

brave sparrow
#

having 2 is a bad idea

#

lol

noble lantern
#

i just make my configs in json, if the end user doesnt like it oh well

#

cry about it end user

grand perch
#

What if I just hard coded the configs

noble lantern
#

._.

kind hatch
#

Then what's the point of it?

grand perch
#

Idk

#

What if I just cancel the project

kind hatch
#

The point of a config is so that you can configure settings. .-.

tender shard
#

?learnjava

undone axleBOT
grand perch
#

Yeah but yaml sucks

kind hatch
#

Does it really though? In what aspect specifically?

noble lantern
#

tbh yaml itself doesnt suck

tender shard
#

yaml is nice

vocal cloud
#

Unblocked speedrun

noble lantern
#

the only part of yaml i do not like is actually handling it with the snakeyaml library

delicate lynx
#

this argument ain't going anywhere

grand perch
#

I can not understand the yaml thing on spigot

noble lantern
#

i much prefer gsons way with serializing java classes to json

#

if yaml had an option for that ide suck the author of that lib off

kind hatch
vocal cloud
#

More tech illiterate people prefer yml.

tender shard
noble lantern
grand perch
#

Why can't i just use something like javascript or typescript for configs :(

delicate lynx
#

bro

noble lantern
#

WHY

#

WHY

brave sparrow
#

that's not a config anymore

#

that's a script

delicate lynx
#

mf runs javascript to produce values

kind hatch
noble lantern
#

i cant

kind hatch
#

They won't know what they are doing.

noble lantern
#

just, pick a config option and go with it

kind hatch
#

Also yea, not really a config file at that point.

brave sparrow
#

i mean it's a matter of knowing your users

noble lantern
#

yaml or json, theyre both simple asf to handle

#

just pick one and go with it

brave sparrow
#

i don't release anything for public consumption

tender shard
brave sparrow
#

anyone touching one of my configs is a developer who works for me

vocal cloud
#

Id say Alex needs a drink but my man maybe had too much at this point

noble lantern
brave sparrow
#

which one

noble lantern
#

he posted a video earlier and bottle was like

#

almost empty

vocal cloud
#

Maybe some fresh air

tender shard
noble lantern
#

bro this is some next lvl shit for me

#

how tf you gon expect me to learn that

brave sparrow
#

that's the most base form of JSON yeah

noble lantern
#

OHH

hasty prawn
#

whats a Map<String, Object>

noble lantern
#

yeah

tender shard
noble lantern
#

whats the little < > thingies do

vocal cloud
#

What's a mep

#

HELP CODE NO WORKY

noble lantern
#

wait code

#

i thought we were configurators

tender shard
#

anyway i'm going to the slep now, enveryone hnave a nice dnay ๐Ÿ˜—

noble lantern
#

you too alex!

tender shard
#

thnanks :3

grand perch
#

Anyways in my yaml i have this

Shop:
   Blocks:
       Grass:
         Name: grass
         Material: grass_block
         Prices:
            Buy: 10
            Sell:5
   Pvp:
      Sword: 
        Name: sword
        Material: diamond_sword
        Prices:. 
           Buy:10
           Sell:5
noble lantern
#

btw mike i finally looked into scanning packages for a specific class

grand perch
#

How in the world would i get all the items in blocks

noble lantern
#

wym

brave sparrow
#

you'd have to treat Blocks as a ConfigurationSection

delicate lynx
#

getConfigurationSection("Shop.Blocks")?

vocal cloud
#

I mean you can also have a config per thingy. You don't need one global config lol

brave sparrow
#

and get all the keys

vocal cloud
kind hatch
noble lantern
#

ngl i barely have any idea wtf it does

But basically is searches a specific package inside of its own .jar file and finds classes that extend/implement another class

grand perch
#

Will that get everything in a array?

kind hatch
#

Not exactly.

noble lantern
#

and then another class scans the received classes for an annotation, and registers whatever it is from there

kind hatch
#

It will return a list of strings, which correspond to the names of the sections in that list.

#

So in your case, it would just return an array with the value Grass

#

You can then use that to complete the path name you need to access those sub sections.

grand perch
#

I want it to be array so that
(My js brain is kicking)
I can loop over all the items in the array and make the corresponding item with said config

vocal cloud
noble lantern
#

i need a better chaining method though

kind hatch
# grand perch I want it to be array so that (My js brain is kicking) I can loop over all the i...

Take for instance this yaml file.

shop:
  stone:
    price: 12
  bedrock:
    price: 10
  grass_block:
    price: 13

If you were to loop over shop using #getConfigurationSection("shop").getKeys(false), you would then have a String array of [stone, bedrock, grass_block]

This is where you can take advantage of the for loop and use the current iteration to get what you need.

So while you are looping, you can use #getInteger("shop." + section + ".price")

grand perch
#

Ahhh i understand

#

New question how do I make it reload the plugin on config save?

#

Actually

#

I don't think it needs to

kind hatch
#

You will have to reload the config if you add anything to the file. That's why JavaPlugin#reloadConfig() exists.

#

Common practice is to just make a reload command as part of your plugin.

#

/yourplugin reload

#

It could do more, but all it would need to do is just run reloadConfig()

grand perch
#

If I change the config while plugin is active then i read the config i assume it won't break

delicate lynx
#

as long as you save any changes

kind hatch
#

The thing about spigot yaml files you need to watch out for is the cache.

grand perch
#

Ok cool

kind hatch
#

When you are editing the config.yml using the api, you are working with the cached version.

#

So if you make changes to the actual file that's on the disk, you will need to call reloadConfig().

#

Otherwise, if you are using code to set values, you don't have to.

#

You do have to save your changes with code though if you want them to be written to disk.

kind hatch
#

The spigot API.

#

The thing we are all using here.

grand perch
#

I won't be editing it with the spigot api

#

I'll just be reading it

kind hatch
#

You will if you are using ConfigurationSection or FileConfiguration.

#

Any class provided by spigot is part of the API.

grand perch
#

What

kind hatch
#

The thing that you are using to write code for your plugin depends on the spigot API. The API provides several classes and methods which you use to make your plugins. You know that thing you have to do at the beginning of every plugin? Extending JavaPlugin? That's part of the API.

#

Creating commands with CommandExecutor, part of the api.

#

Modifying yaml files with ConfigurationSection, part of the api.

#

If you were to remove the spigot dependency, you'd quickly see how many errors your IDE would throw since it doesn't know what things are.

golden turret
#

should not that set my name to the color i want?

brave sparrow
#

You have to set peopleโ€™s scoreboard to that scoreboard you created

golden turret
#

yes, 2nd screenshot

kindred valley
#

Hi guys, every time I refresh my server, my config file gets empty, probably because the lists and maps are empty after reload. How can I keep all data after reload?

river oracle
#

Tbh just stop using the spigot default configuration methods they kinda suck

#

?paste

undone axleBOT
river oracle
#

It preserves comments as well

#

Something which spigot just added iirc anyways this utils works preserving comments etc from 1.8 to latest

kindred valley
kindred valley
#

im saving and loading the config file but it still refreshs

sacred mountain
#

hey could someone tell me what 'clazz' is? is it just a variable name since you can't use 'class'

golden kelp
#

Yes

#

If u could give some context, we can give a more accurate answer

snow compass
#

What was the idea behind the InventoryMoveItemEvent (it work inconsistency)?

golden kelp
#

Seems like inventory drag

#

Ohh, it might be for shift click or stuff like that

snow compass
#

Because you get different result of amount if you have 1 stack or 2/3 stacks.

snow compass
golden kelp
#

Ohhh

snow compass
#

can also be from other container to hopper

golden kelp
snow compass
# golden kelp Depends on the time ig as its pretty fast

But spigot not provide the original item stack amount on the first item hopper try put in the chest. I could have made it better self ๐Ÿ™‚

Spigot modify first stack it try add to container and no option to get right amount.

golden kelp
#

U can make a PR in the GitHub repo and fix it for everyone

snow compass
#

only way is ether hacky or directly use nms self to fix it.

snow compass
golden kelp
#

Oh yea, they shifted to their own site

kindred valley
#

how can i get maps from config

supple elk
#

How can I teleport a player into a world to the last location they were in?

#

I'm guessing their location is stored in player data in the world file right?

golden kelp
kindred valley
#

code or config

golden kelp
kindred valley
#

sorry for values ๐Ÿ™ƒ

golden kelp
#

Can u just send it here

#

As it's hard to see from the img

#

Copy the whole thing into this chat

kindred valley
#
8b6619f9-f9a5-3bd6-8842-712369e22e19:
  playerdata:
    AhmetKeรงi: 313
    RonaldoMessi: 919
sacred mountain
#

wut

#

what is the uuid at the top

golden kelp
#

Just loop through all the keys in player data

golden kelp
kindred valley
golden kelp
#

Okay

kindred valley
golden kelp
#

It will return all the keys, loop through them, add them to a map while getting the values using the same key

golden kelp
#

U need to get the player data thing

#

Using the uuuid

kindred valley
#

yes what should i do next

golden kelp
#

Get config -> get UUID section -> get player data -> get all of its keys, loop through em, put em in a hashmap with their values (get using key)

kindred valley
golden kelp
#

It has a method called keys or smth

#

#getKeys() or just .keys

#

IIRC

kindred valley
#
for(String i: PersonConfig.get().getKeys(false)) {
               PersonConfig.get().get(i + ".playerdata").???????
           }
golden kelp
#

Get.get?

kindred valley
#

get() is getting the config

golden kelp
#

get().get() what does that mean

#

Okay

#

If u get the config and then get its keys, it will return the uuid

kindred valley
#

yes it is

golden kelp
#

In the ?????? Part, u can use get keys and store them

kindred valley
#

i cant

golden kelp
#

And then loop over

kindred valley
#

there is no specified methods

golden kelp
#

Wdym

golden kelp
#

What does .get(path) return

kindred valley
#

hashmap

golden kelp
#

I think that's what u want?

kindred valley
#

how can i loop for get

#

its not an hashmap

supple elk
#

wdym at which moment?

#

the last moment they were in the world

tardy delta
#

if they login they spawn at their last location?

supple elk
#

mhm

#

but I'm making multiple worlds

#

and the teleport method required a location

tardy delta
#

im pretty sure they will spawn in the correct world

golden kelp
supple elk
#

so when they switch between worlds using a command I'd like to get the location they were last at in that world

tardy delta
#

ah

kindred valley
tardy delta
#

save their location before they go to another world

golden kelp
tardy delta
#

get is the internal method

supple elk
tardy delta
#

wdym server resets?

golden kelp
supple elk
golden kelp
tardy delta
#

save it to a persistent storage

supple elk
#

it should already be stored in the world data tho

tardy delta
#

when they logout

kindred valley
tardy delta
#

thats only the last location they were in

golden kelp
supple elk
tardy delta
#

wait, maybe

#

dunno if theirs an api method for that

supple elk
#

it must do

#

each world has it's own player data

supple elk
#

saw that

#

didn't really help

golden kelp
#

?javadoc

tardy delta
#

means that you have to store their locations

supple elk
#

mk

#

well there was this

#

though the two links didn't provide any specific solutions to the answer