#help-development

1 messages · Page 1363 of 1

hard raft
#

here it is :,,,)

stone sinew
#

no space after : on author. And make sure you're not using tabs.

hard raft
#

how do i know if im using tabs?

eternal oxide
#

I just built fine using latest buildtools

stone sinew
#

High light the empty spots if it high lights more then 1 space its good.

warm raft
#

its taking forever to clone

eternal oxide
#

not for me

warm raft
#

I mean

hard raft
#

alright its good i think

open vapor
#

How would I generate a multi part structure like a bastion through a plugin

warm raft
#

1.15 MiB/s to clone Paper but 6 KiB/s to clone Bukkit?

#

I highly doubt its an issue with my internet

#

unless theres some broken thing between me and where the stash is hosted

eternal oxide
#

I just ran build tools in a few minutes. No longer than usual

warm raft
#

I get you ran it fine

#

but I'm more concerned that I can't even clone from the stash

#

so my question is this: can you try a fresh run in a fresh dir?

lusty raft
#

Just wondering does anyone know how to disable jumping or sprinting?

eternal oxide
#

yep, sec

stone sinew
#

Or toggle sprint event

lusty raft
#

Alright thanks

eternal oxide
#

running now

stone sinew
#

Np. And I think paper has a jump event.

open vapor
#

I'm seeing stuff about adding your own structures, but I want to generate a structure in an existing world

eternal oxide
#

Windows, so it has to download and install git

warm raft
#

unless you're using git-bash

#

which I am

hard raft
#

i dont have to export after every edit, right?

warm raft
#

git version 2.30.1.windows.1

eternal oxide
#

Windows uses PortableGit

warm raft
#

fair

eternal oxide
#

its cloning now

warm raft
#

I have a feeling something is up

#

#general seems to support that

#

considering I can't even view the stash via browser

eternal oxide
#

build finished

#

That was a clean buidl just from my newBuild script. that curl downloads BuildTools then runs it

hard raft
#

still zero plugins :(((

hollow bluff
#

I'm getting an error while running this part of my code (MySQL) com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value:

    public void addPoint(UUID uuid, int point) {
        try {
            PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("UPDATE test SET POINT=? WHERE UUID=?");
            ps.setInt(1, (getKarma(uuid) + point));
            ps.setString(2, uuid.toString());
            ps.executeUpdate();
        } catch(SQLException e) {
            e.printStackTrace();
        }
    }

    public int getPoint(UUID uuid) {
        try {
            PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("SELECT POINT FROM test WHERE UUID=?");
            ps.setString(1, uuid.toString());
            ResultSet rs = ps.executeQuery();
            int point = 0;
            if (rs.next()) {
                point = rs.getInt("POINT");
                return point; 
            }
        } catch(SQLException e) {
            e.printStackTrace();
        }
        return 0;
    }```
hard raft
#

[14:12:29] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5169ms or 103 ticks behind

#

i have that warning does that mean something?

#

like fro why it wont register my plugin?

warm raft
#

Then the route from EU to wherever the spigot stash is is messed up

eternal oxide
#

I'm UK

teal flower
#

how i can get bungee servers into ServerInfo[] or something else

eternal oxide
#

Do you mean on Spigot or on the bungee proxy?

teal flower
#

bungee

#

I need to get the names of all the servers and then use the command to output all their names separated by commas

#

sure, i can just add their names right into code but if i add server i don't want add servers in code

eternal oxide
#

getProxy().getServers()

teal flower
#

ProxyServer.getInstance.getProxy().getServers() ?

gritty urchin
#

How can I create a potion with a custom double amplifier because PotionEffect only accepts int amplifier values normally

teal flower
#

how do you imagine the potion level in decimal?

eternal oxide
#

whatever your plugin instance is

teal flower
#

plugin = main class or what?

eternal oxide
#

whatever class of yours extends plugin

teal flower
#

Command

eternal oxide
#

getServers() returns a map of all server names and their serverInfo

teal flower
#

and how get list of servers from this?

eternal oxide
#

getKeys()

teal flower
#

and how get servers amount?

eternal oxide
#

then you'd have to access the map and read the serverInfo mapped to each key

teal flower
#

i can get key if i know what equal this key but i don't know it

eternal oxide
#

You seem to not understand what a Map is

teal flower
#

okay
i write /servers and i get:
servers: hub, survival, grief

#

how?!

eternal oxide
#

how what?

#

I just told you how to get a list of all names

narrow pawn
#

How can I build Spigot excluding some set of patches?

teal flower
eternal oxide
#

plugin.getProxy().getServers().getKeys()

teal flower
#

what is "plugin"

#

main class?

eternal oxide
#

you already asked that

teal flower
#

yes

eternal oxide
#

and I answered

teal flower
eternal oxide
#

right at your cursor in that image

teal flower
#

plugin = MainBungee.class

#

...

humble stirrup
#

if you cant understand what elgar has said then you need to spend more time learning java

teal flower
#

...

#

я нихуя не понял, ебаный пендос не может ответить на 1 ёбаный вопрос

#

спасибо блять

unreal kayak
#

I think..... 70% of people come here and they don't know Java well

paper viper
#

Ahm. I think you just roasted yourself

sleek pond
#

it's fine if your talking

paper viper
#

lmao

sleek pond
#

so naturally they either want to make mods or plugins

unreal kayak
eternal oxide
#

oh wow I just translated that message

#

Sorry I helped and gave you ever answer you asked for

hard raft
#

anyone know why a plugin would not compile?

#

im trying to run a basic program

#

and my server isnt registering it

eternal oxide
#

doesn't compile? Do you get a jar?

hard raft
#

yep

#

its a jar file

eternal oxide
#

then it compiles

hard raft
#

3KB

#

but like the file is empty

eternal oxide
#

drop the jar in here

hard raft
#

when i open it nothing happens

#

ok

eternal oxide
#

you have plugin.yml but no code

graceful magnet
#

it's a jar, just nothing is included there. Only the plugin.yml

hard raft
#

so how do i comile eevrything?

eternal oxide
#

what IDE are you using?

graceful magnet
#

he's using eclipse and the built in ides tools, don't know about eclipse enough to help him with that

hard raft
#

yes

eternal oxide
#

goto export jar and in the left window expand the project and make sure src is ticked

hard raft
#

ok ill try

quaint mantle
#

Whats a best way to make a plugin that would work good with a resource pack? I want to import multiple custom made models with textures etc. to my resource pack, then for example create a custom mob with spigot, no problem, however I would also want to assign it a custommodeldata, is something like this possible? I thought this could work in a similar way like datapacks, I'm more experienced with Java than Command blocks 😄

eternal oxide
#

Untick .settings in the left, and in the right untick .classpath and .project

hard raft
#

hold on

#

so now it should work?

eternal oxide
#

yes

hard raft
#

swag, ill run it

toxic mesa
#

So I used this to remove an item from a player, but if the item is damaged it does pass the check but it doesn't remove the item. How can I fix this in the best way possible?

if (player.getInventory().contains(mat, amount)) {
    player.getInventory().removeItem(new ItemStack[] { new ItemStack(mat, amount) });
eternal oxide
#

why an array for a single item?

toxic mesa
#

Good point, got it from internet

#
                if (player.getInventory().contains(mat, amount)) {
                    player.getInventory().removeItem(new ItemStack(mat, amount));
eternal oxide
#

also check the return of the removeItem attempt. If it returns an empty map it believes it succeeded. If it fails it will contain the item that failed.

toxic mesa
#

So if it fails I can check what item failed?

eternal oxide
#

yes

toxic mesa
#

Alrighty

eternal oxide
#

in the returned map

toxic mesa
#

ty

minor garnet
pearl ridge
#

uhh quick question, how would this lead to a StackOverflow on spawn?

@Override
public void tick()
{
  ((EntityInsentient)this).tick();
}

Currently trying to override the EntityCat's tick method but trying to keep all the pre-stuff but as soon as I spawn the cat it crashes the server with a StackOverflow error spam

eternal oxide
#

um, you are calling the same method. Infinite loop.

pearl ridge
#

shouldnt EntityInsentient-ification for this call the tick from that class?

eternal oxide
#

you are calling yrou own tick method, try super.tick

pearl ridge
#

thing is super.tick wont do it

#

since I dont want the Cat's tick method, just the previous classes tick

eternal oxide
#

then don;t call tick at all and add your own logic

#

not sure you can cast super

quaint mantle
fervent cove
#

java.lang.IllegalArgumentException: Server lobby (priority 0) is not defined
what does that mean

#

its a bungeecord server so idk

quaint mantle
#

Did you make a plugin for bungeecord?

fervent cove
#

no should i

eternal oxide
quaint mantle
#

is the correct place to ask this question

#

Whats a best way to make a plugin that would work good with a resource pack? I want to import multiple custom made models with textures etc. to my resource pack, then for example create a custom mob with spigot, no problem, however I would also want to assign it a custommodeldata, is something like this possible? I thought this could work in a similar way like datapacks, I'm more experienced with Java than Command blocks smile

outer crane
#

Anyone notice spigot api maven builds are being weird?

quaint mantle
#

nvm lol

outer crane
#

my builds are failing

pearl ridge
opal juniper
outer crane
#

oh F is it fine in the UK?

opal juniper
#

Im in the UK.... and no

outer crane
#

probably an issue on my end then

eternal oxide
#

its fine in the UK

outer crane
#

thanks either way

opal juniper
#

Ohh, i mean that i am in the UK and it is down @outer crane

eternal oxide
#

it Must be ISP specific. Virgin here

opal juniper
#

some1 else in #general said it was down in the Uk as well

eternal oxide
#

oh ISP is Virgin 🙂

opal juniper
outer crane
#

Sky here

drifting halo
opal juniper
#

Yes, same here

drifting halo
#

not even the cloudflare timeout

opal juniper
#

Doesn't maven cache the api?

outer crane
#

lemme restart my system see if it fixes it

drifting halo
#

so not sure who's to blame here

#

yeah

#

you can put it in offline mode

opal juniper
#

ahhh, ok

drifting halo
#

still failing for me cuz my cache expired probably

eternal oxide
#

I refreshed and its fine for me, but thats not help for you

opal juniper
#

Nah, its defo down for me

eternal oxide
#

works foir me, even through proxy

opal juniper
#

works through the proxy fine

outer crane
#

ok restarted system and it works for me so it looks like it was an issue on my end

hollow bluff
#

I'm getting an error while running this part of my code (MySQL) com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value:

    public void addPoint(UUID uuid, int point) {
        try {
            PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("UPDATE test SET POINT=? WHERE UUID=?");
            ps.setInt(1, (getKarma(uuid) + point));
            ps.setString(2, uuid.toString());
            ps.executeUpdate();
        } catch(SQLException e) {
            e.printStackTrace();
        }
    }

    public int getPoint(UUID uuid) {
        try {
            PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("SELECT POINT FROM test WHERE UUID=?");
            ps.setString(1, uuid.toString());
            ResultSet rs = ps.executeQuery();
            int point = 0;
            if (rs.next()) {
                point = rs.getInt("POINT");
                return point; 
            }
        } catch(SQLException e) {
            e.printStackTrace();
        }
        return 0;
    }```
Asked a couple of times already and nobody have helped out yet so I'll just try to ask once more
quaint mantle
#

Is that the whole error?

hollow bluff
wary harness
#

does any one has any clue why age of sugar cane goes back to age 0 from max 15

#

is that a glitch ?

warm cloak
#

when i am coding tab completer do i need to use different classes with different onCommand methods?

quaint mantle
#

SQLGetter.java:65

hollow bluff
#

ima just send the full file ye

quaint mantle
#

do that.

hollow bluff
wary harness
quaint mantle
#

FYI there is a new feature where you can drag in your class and it will show us with a built viewer

quaint mantle
wary harness
#

tried

final fog
#
player.getInventory().addItem(item);``` how do I give a player a specific amount of an item?
wary harness
#

nothing usful to find

final fog
#

thats what I tried

#

but I cant find the amount part

hollow bluff
#

@quaint mantle, you know what might be the issue?

final fog
#

do I just loop it?

final fog
#

o I do it there.. lmao

chrome beacon
#

Off didn't scroll down ;/ sorry the other people already awnsered

eternal oxide
eternal oxide
#

no

#

just implement TabCompleter

warm cloak
#

okey so my command executor will be in tabcompleter yes?

eternal oxide
#

wherever you have your CommandExecutor you implement Tab completer

warm cloak
#

okay thanks

eternal oxide
#

I usually have an abstract base class and then override in my command classes

rugged topaz
#

what event is triggered on a spawn egg place? PlayerInteractEvent?

eternal oxide
#

it shoudl be ProjectileHitEvent

rugged topaz
#

why would that be

eternal oxide
#

because its a Projectile

rugged topaz
#

a spawn egg's a projectile?

#

is that because it can be dispensed?

eternal oxide
#

Check the event projectile to see if its a SpawnEgg

rugged topaz
#

sure thing

quaint mantle
#

use CreatureSpawnEvent

#

check if spawn reason is spawner egg

rugged topaz
#

ah okay thanks

sharp bough
#

is it possible to use

 slr.addIngredient(3, Material.FLINT);

but instead of having Material.FLINT, having an ItemStack

#

so far i have this

#
    public static void FlyCookieTier1(){
        //ingredients
        ItemStack ing0 = new ItemStack(Material.EMERALD,1);
        //ItemMeta ing0meta = ing0.getItemMeta();
        //ing0meta.setDisplayName("Fly Cookie Tier 1 ing 0");
        //ing0.setItemMeta(ing0meta);

        //final product
        ItemStack finalProd = new ItemStack(Material.COOKIE);
        ItemMeta meta = finalProd.getItemMeta();
        meta.setDisplayName(ChatColor.GOLD + "Fly Cookie Tier 1 ");
        ArrayList<String> lore = new ArrayList<String>();
        lore.add(ChatColor.GRAY + "Use this item for");
        lore.add(ChatColor.GRAY + "5 minutes of Fly!");
        meta.setLore(lore);
        finalProd.setItemMeta(meta);

        //item creation
        ShapelessRecipe recipe = new ShapelessRecipe(ing0);
        recipe.addIngredient(2,ing0);

        getServer().addRecipe(recipe);
    }```
#

but i get an error in recipe.addIngredient(2,ing0) because you cant use an item stack there

#

i found this the other day tho

#

new RecipeChoice.ExactChoice

#

wich worked with shaped recipe

heavy fable
#

Bonjour je suis français et j’ai besoin d’aide j’essaye de paramettee le plugin mysql player data bridge mais cela ne veux pas ce synchronisiez pouvez vous m’aider

sharp bough
#

but i dont know how to use it with shapeless recipe

heavy fable
#

Hello I am French and I need help I am trying to configure the mysql player data bridge plugin but this does not want this synchronize can you help me

wraith steppe
#

Guys what is the best source to learn spigot api????

chrome beacon
heavy fable
#

Yes thanks

rugged topaz
waxen plinth
#

Is there a way to get how many blocks a player has broken, period?

#

I know there's statistics

#

But that's per-block

#

It takes ~300ms to get all of the blocks broken by a player with that method

#

Which is far too slow

chrome beacon
#

Hm maybe just track it yourself

#

Loop through everything the first time and then track the rest yourself

rugged topaz
#
    @EventHandler
    public void onPlace(final PlayerInteractEvent e) {
        if (e.getAction() == Action.RIGHT_CLICK_BLOCK && e.getItem().getType() == Material.MONSTER_EGG) {
            Entity i = e.getPlayer().getWorld().spawnEntity(e.getClickedBlock().getLocation(), ((SpawnEggMeta) e.getItem().getItemMeta()).getSpawnedType());
            if (i.getType() == EntityType.GHAST) {
                // blah blah
            }
        }
    }

    @EventHandler
    private void onPlace(final CreatureSpawnEvent e) {
        if (e.getSpawnReason() == CreatureSpawnEvent.SpawnReason.SPAWNER_EGG) {
            e.setCancelled(true);
        }
    }

kinda ugly

wraith steppe
chrome beacon
#

I told you Javadocs

#

?jd

wraith steppe
#

Really javadocs will teach me spigot api!!!

chrome beacon
#

If you know Java you don't need anything else

quiet ice
#

Except if you need to understand bukkit-specific concepts

#

But for that we are here

dusty herald
#

Java can do anything

quiet ice
#

And most beginner things are not bukkit-specific

dusty herald
#

Java is all compatible

#

I bet you could run Java on a fuckin toaster

quiet ice
#

Well, JVM-languages are all largely compatible

heavy mason
dusty herald
#

whats something Java can't do?

quiet ice
dusty herald
#

:)

heavy mason
rugged topaz
#

c# > java

heavy mason
#

I mean it cant be able to do everything

dusty herald
#

name one thing it can't do

wraith steppe
#

Guys after learning java i cannot write a mobile app i have to learn its framewirks and api and librarys to make mobile app not everyone who learned java can do everything

heavy mason
#

Lmaoo idk, an OS written in java?

quiet ice
#

Android

rugged topaz
#

javascript* can do anything

heavy mason
#

Its probably possible

#

Idk

wraith steppe
#

HUMAN can do anything

daring sierra
#

na

#

human is limited af

dusty herald
#

physical media is forever

daring sierra
#

you ever tried changing an item meta with your bare hands?

dusty herald
#

buy laser disc

wraith steppe
#

@daring sierra are u boy dude ur name is weird!!!!

heavy mason
dusty herald
wraith steppe
dusty herald
#

no

#

I said my discord name

#

not my nickname

wraith steppe
#

It is weird too

dusty herald
#

I am a weird person ASsmug

wraith steppe
#

Yeah u r

daring sierra
ivory sleet
#

whats so funny

daring sierra
ivory sleet
#

I dont get it

wraith steppe
daring sierra
#

ruude

ivory sleet
#

he's just another troll + off topic

wraith steppe
ivory sleet
#

interestingly enough you never tried to end it

wraith steppe
#

I think minecraft have weird developers

ivory sleet
#

I think you have weird

daring sierra
#

😕

wraith steppe
daring sierra
#

tf is up with you?

ivory sleet
outer crane
wraith steppe
#

Guys ima joking

ivory sleet
#

funny totally laughed

wraith steppe
#

Ty

daring sierra
#

idk whats weird about me but thanks?

outer crane
wraith steppe
#

Ima joking guys

daring sierra
ivory sleet
#

lmao

wraith steppe
daring sierra
#

😐

outer crane
#

what is this guy trying to achieve

quaint mantle
wraith steppe
#

Dude ima not trying to achieve thing

daring sierra
#

probably a kid messing around in various discords.

ivory sleet
#

next comedian?

chrome beacon
#

Guys move to #general

ivory sleet
#

true

daring sierra
wraith steppe
daring sierra
#

Ima joke

ivory sleet
daring sierra
#

*points gun* laugh.

crimson jasper
#

how do i give player badomen effect

#

it's not in "PotionType"

daring sierra
#

Idk what's up with people asking everyone for their genders, its akward asf

chrome beacon
crimson jasper
#

thanks

compact garden
#

Hi im very new to coding, i was wondering how i open a .class file. I tried to open it with notepad and visual studio, Neither worked. I have java Oracle but dont know how to open the file

eternal oxide
#

class files are already compiled

#

unreadable without decompiling

lost matrix
compact garden
#

ok

lost matrix
#

I think its worth adding as a resource to spigot tomorrow when im sure that it doesnt trash the performance.

quaint mantle
#

in 1.16.5 when I spawn an ArmorStand, it spawn in invisible mode, how can I fix that?

lost matrix
eternal oxide
quaint mantle
#

I have this peace of code:

ArmorStand as = (ArmorStand) player.getLocation().getWorld().spawnEntity(player.getLocation(), EntityType.ARMOR_STAND);
                as.setArms(true);
                as.setBasePlate(true);
lost matrix
eternal oxide
#

nice

lost matrix
quaint mantle
#

I mean

#

when I spawn an ArmorStand, I know it spawned because the block where it appeared it can't be clickable, I need to destroy the armorstand to be able to click that block again

lost matrix
kindred solar
#

hey guys, i need help, idk why this is line is returning null ```
Location skyblockLobby = new Location(Bukkit.getWorld("skyblock"),0,150,0);
player.teleport(skyblockLobby);

#

i mean, its returning this error: Could not pass event InventoryClickEvent to Plugin v0.1 org.bukkit.event.EventException: null

paper viper
#

that means that it probably means the world "skyblock" isn't loaded

kindred solar
#

how do i load it?

paper viper
#

Is "skyblock" a world you defined and created?

kindred solar
#

yes

paper viper
#

did you create it first?

kindred solar
paper viper
#

Ok then use what ElgarL pointed out above

#

For example, in your case

kindred solar
#

okok ty elgarl

paper viper
#

new WorldCreator("skyblock").createWorld();

kindred solar
#

yes, i ill check if the world exists

#

then if not i create it

paper viper
#

Yeah

kindred solar
#

still not working

#

i did this if statement ```java
if(getServer().getWorld("skyblock").equals(null)){
new WorldCreator("skyblock").createWorld();
}

ornate heart
#

I'm using Mob#setTarget on a sheep, but it's not working as anticipated. The sheep simply doesn't follow the target. Any suggestions?

paper viper
kindred solar
#

ahhh

paper viper
#

And also, never EVER use .equals for null checking

kindred solar
#

makes sense

paper viper
#

always use ==

kindred solar
#

okok ty for the tip

paper viper
#

np

minor fox
#

does anyone know an efficient way of generating a name that's not a real MC account name?

ivory sleet
#

==

kindred solar
ivory sleet
#

yeah I see that

eternal oxide
#

.equals is to compare object instances. == is for primitives, enums and null

kindred solar
#

hmm ok ty

minor fox
# paper viper hmmmm

i can obviously just merge a random amount of words together and check it against mojangs servers but eh

ivory sleet
#

loop through all names and cache then just sync every second

#

and have a set of strings to check

#

🤡

paper viper
#

lmao

kindred solar
#

now it teleports the player but stills showing this error: Could not pass event InventoryClickEvent to Plugin v0.1 org.bukkit.event.EventException: null

eternal oxide
#

show the full error

kindred solar
#

?paste

queen dragonBOT
kindred solar
eternal oxide
#

Plugin.java:269

#

what is that line?

kindred solar
#

ItemMeta meta = clicked.getItemMeta();

eternal oxide
#

there is no meta

#

check hasMetaData() first

kindred solar
#

worked ty

eternal oxide
#

or actually, thats not it. clicked is null

kindred solar
#

i made another thing

eternal oxide
#

ok

kindred solar
#

i made this if you want to know if(ChatColor.stripColor(clicked.getItemMeta().getDisplayName()).equals("Skyblock"))

#

its not showing the error anymore

eternal oxide
#

It won;t you are just hiding it in the stripColor method

#

it will never be true if clicked is null

#

so no error but its never going to be true

kindred solar
#

it is true

eternal oxide
#

look at where you are setting clicked

kindred solar
#

but it is going inside the if statement

eternal oxide
#

where do you set a value to clicked?

kindred solar
#

ItemStack clicked = event.getCurrentItem();

eternal oxide
#

I'm beginning to thing line 269 was not your error line

#

it was the error, but perhaps you miscounted in your IDE

kindred solar
#

maybe

#

is there anyway to store the player inv or do i need to store it in database?

eternal oxide
#

ItemStacks are serializable

#

if you only need it temporarily you could use an InventorySnapshot

#

else database

kindred solar
#

im trying to make a network so for exemple now im making a skyblock and i need to store the player inv somewhere

eternal oxide
#

Do you mean you want to send the players inventory from one server to another?

kindred solar
#

no

#

i want to store for example the skyblock inv of a player in the skyblock map, the survival inv of a player in the survival map

#

etc

eternal oxide
#

then database/file

#

or

#

it would be possible to store in the PDC of the player, but that will get rather large if you have too many types.

kindred solar
#

so, how do i store them in the db?

eternal oxide
#

saving to file would be simplest as ItemStacks are already serializable

#

All you have to do is store the inventory slot and the ItemStack it contains.

kindred solar
#

so, i create an bidimensional array to store both things?

eternal oxide
#

just a map

#

Map<Integer, ItemStack>

slim magnet
#

hello I do playSound and the sound only plays for half a second

wary harness
#

why does age of cactus and sugarcane restarts back to 0 insted of staying 15 ?

#

other crops when they reach max age they don't restart

#

is there any way to fix that

eternal oxide
#

they loop to zero so they can continue growing. placing a new block on top

eternal oxide
slim magnet
#

Nvmm

eternal oxide
#

if its only 0.5 seconds then its only a 0.5 second recording

slim magnet
#

No it's a custom second

#

Sound

#

It was supposed to play ofr 40 seconds, but i discovered that it plays at a location not to the player

eternal oxide
#

I believe it needs to be a mono sound to play at the players location

slim magnet
#

i just increased the volume to 100

#

100

#

1000

eternal oxide
#

thats the range it can be heard at

slim magnet
#

yeah thats what i needed

eternal oxide
#

if you change it to a mono sound you can play it on the player and it will follow him

slim magnet
#

oh how do I do that

slim magnet
eternal oxide
#

no idea. I'm not an audiphile

wary harness
#

so 0 will represent fully grown

#

because I am droping tokens

eternal oxide
#

they can grow multiple times

#

but they only grow to a specific height

wary harness
#

yep I only need them so players can't spam

#

farming tokens

#

for example I am giving tokens when player farms

#

but if cactus age is 0 after they fully grow

#

that is the problem

#

because they can just spam click place old cactus block and try to get tokens

#

for the same block

#

so best option is in case player places cactus I should change block data age to 1

#

and then cactus need to to do 15 steps to get back to 0

#

and they need to wait

#

to get tokens

#

if u get what I mean

kindred solar
lost matrix
eternal oxide
#

Yep, only give tokens for the blocks that grow on top

wary harness
eternal oxide
#

yes, use 7smile7's plugin he just wrote and it tracks all blocks placed

lost matrix
eternal oxide
#

all you have to do is ask if its a player placed block

slim magnet
#

whats a anum in Sound that sounds like a WOOSH like flying etc

#

but a loud WOOSH

#

Aha

#

enum*

wary harness
#

all good guys got it solwed

#

thanks for help

lost matrix
wary harness
#

ok thanks I will maybe use it in future for mining drops xd

#

for farming age will do

cloud berry
#

anybrony know jooq? i need halp ;-; how exactly do u work with variables than can be null or not null

wary harness
#

solwed big time problem

#

those dudes which were glitching my friend server were so confused

kindred solar
#

xD

lost matrix
final fog
#

Is there a way to make a chest look like its open without using packets?

paper viper
#

not really

#

maybe you could get away with sending block packets

#

but not sure

#

(and that method for Player class)

final fog
#

I don't know shit about packets tho

#

is that going to be a problem?

#

I'm assuming that's going to be a problem

#

I'll go and learn them rq

sullen marlin
#

cc @paper viper

paper viper
#

oh

#

my bad

#

i didn't know that existed

#

sorry

#

🥲

#

in that case, you could do something like this

#
final Block myBlock = ...;
if (myBlock.getType() == Material.CHEST) {
  final Chest chest = (Chest) block.getState();
  final Lidded lid = (Liddeed) chest;
  lid.open();
}
unkempt peak
#

So i am trying to create a challenge plugin where random mobs fall from the sky and for some reason hostile mobs are not spawning but if i spawn a hostile mob using a test command from the same plugin it works fine. here is the method to spawn the mobs

https://paste.md-5.net/yicenubolo.cs

rugged topaz
#
>
[00:10:15 WARN]: [Skyblock] Task #16313 for (my plugin) v1.3 generated an exception
java.lang.OutOfMemoryError: GC overhead limit exceeded
>
[00:10:21 FATAL]: Error executing task

java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
``` on a 10Gb server with only me on it after around 40 minutes of uptime
#

memory leak? and if so, what r my possibilities for finding out what exactly it is

arctic summit
#

i want to use several lists in one function, i would use for (UUID playerID : blueTeam1v1) { for one list, but how would i also include redTeam1v1 for example?

unkempt peak
#

you could just create a 3rd list by adding the blueteam list to the redteam list and iterating through that

arctic summit
#

yeah but that takes processing power

#

is there a way to just use both existing lists?

slim magnet
#

Anyone know a white particle?

arctic summit
slim magnet
#

is that in Particle

#

i want a fly trail kinda thing yk

unkempt peak
arctic summit
slim magnet
#

Okay

arctic summit
arctic summit
# paper viper elaborate more

i have 2 teams which i want when the game is over to display a message in the big text that shows up on ur screen then tp them to spawn

arctic summit
paper viper
#

there's no way you can optimize that

#

either way, you need to do it for all players

unkempt peak
#

^

unkempt peak
#

just add both lists

paper viper
#

parallel computing would be overkill

arctic summit
#

so i should just make a combined list?

unkempt peak
#

yes

paper viper
#

you can either use two loops

#

or use a combined list

#

performance is still the same

arctic summit
#

ok

#

thanks

paper viper
#

np

unkempt peak
arctic summit
#

try adding System.out.println to your if statements and see where it doesnt pop u0p

unkempt peak
#

ok

#

its showing up for hostile mobs no matter where i sysout it

eternal oxide
rugged topaz
#

found the stacktrace

#

every 10 ticks, i call my class that runs through inventories applying custom stats and such, and in this class (idek if this is the reason of the memory leak, or if it just happened to run out of memory right here) but it's a class with around 25 final doubles per player, but the line is where i access my sql database and declare and initalize a final double to the user's health that's found in the sql database

#

the gc's meant to run through this and clean up though is it not? since it's not static, nor outside the scope of a function

#

the class is tied to a hashmap with the player(s)

eternal oxide
#

only if you are relasing all object when finished. You shoudl be reusing

rugged topaz
#

lemme try to visualize for you

eternal oxide
#

every 10 ticks is a lot. thats twice a second

rugged topaz
#

can't ctrl c since it's a terribly long class

#

eh

eternal oxide
#

?paste

queen dragonBOT
rugged topaz
#

#1 the system can surely take it, it's a beast of a pc

#

#2, it may be 15 or 30, unsure

#

plus it's only one player, being me

eternal oxide
#

then you have a serious memory leak

rugged topaz
#
public final class CustomPlayer {
    public static HashMap<UUID, CustomPlayer > stats = new HashMap<>();
    final private Player p;
    private double maxHealth;
    private double mana;

    public CustomPlayer (Player p) {
        stats.put(p.getUniqueId(), this);
        this.p = p;
    }

    private void setMana(double mana) {
        this.mana = mana + 100;
    }

    private void updateStats(final Player p) {
        final double health = MainPlugin.getInstance().sql.getHealth(p.getUniqueId());
        p.setMaxHealth(health + maxHealth + 21);
        p.setHealthScale(40);
        setMana(health);
    }
}```
#

an example of the class, shortened to the important parts and used parts

#

and again, it doesn't look like it could occur from here

eternal oxide
#

No way to tell without seeing actual code thats in use

rugged topaz
#

hence why i think the stacktrace only chose this place as it was allocating/creating new memory pointer or wtv for health at the time when it was around at 8.9Gb/9Gb and that's when it froze up

#

^ need you to verify if that's possible

#

and that the memory leak could be elsewhere

dry beacon
eternal oxide
#

impossible to tell just from that code

rugged topaz
#

and i'm like 98% sure it's that, because i've been using the same code for a while for that

#

hm

#

with me only happening to stand still throughout the entire duration, that means it has to be from a bukkit repeatingTask right?

#

considering the [Alchemy] Task #19200 for Alchemy v1.3 generated an exception being spammed with hella different task ids in numbers spanning out 100 of an interval each

eternal oxide
eternal oxide
rugged topaz
#

idk exactly how to do that

#

it's a project with probably over 100,000 lines

unkempt peak
#

bruh

eternal oxide
#

it sounds like you have a god class. Everything in a single class

rugged topaz
#

no

#

lmao imagine

arctic summit
#

how do i make the big screen covering text appear for a player

#

what are they called

rugged topaz
#

i might be able to diagnose it myself given that i simply just understood how the gc works and how memory leaks happen

sullen marlin
#

title

unkempt peak
#

title

arctic summit
#

ty

unkempt peak
#

.sendTitle()

eternal oxide
rugged topaz
#

i'm sure this isn't good to have, and neither do i think it's the cause, but inside one of my syncrepeatingtask i was creating a new instance of random every 13.5 seconds

#

given that the gc wouldn't have picked that up it is

arctic summit
#

is player.setTitle fade in, fade out and duration in miliseconds or ticks

rugged topaz
#

ticks always

arctic summit
#

alright ty

eternal oxide
rugged topaz
#

yea i just switched to my static one

arctic summit
#

to save me time playtesting it, whats a good tick amount for fading in and out?

rugged topaz
#

but is Random expensive enough to have caused it do you think, w 10gbs or no?

eternal oxide
#

but that would still not account for a 10 gig memory leak

rugged topaz
#

yeah

#

thought so

#

if i had some grafana monitoring

#

this would be a lot easier

#

since everytime i run my cmd to check mem usage it just looks fine

#

like i needa know if it just spikes immediately or slowly rises up

eternal oxide
arctic summit
summer scroll
rugged topaz
#

^ as long as you're not dragging over ftp everytime, why not just build and /rl

arctic summit
#

eh i guess

#

kinda annoying tho lmao

arctic summit
eternal oxide
#

-1 means use the default

dry beacon
#

I'm still pretty new to java, could someone explain why this code works perfectly ```java
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

    Player player = (Player) sender;
    
    if (cmd.getName().equalsIgnoreCase("rick")) {
        

        player.sendMessage(prefix + this.getCustomConfig().getString("messages.default.base-command"));
    }
    return false;
}```

but when I add String prefix = ChatColor.translateAlternateColorCodes('&', this.getCustomConfig().getString("messages.default.prefix")); above the function I get a null pointer exception

arctic summit
rugged topaz
summer scroll
eternal oxide
arctic summit
slim magnet
#

whats the particle that happens when a mob dies? The white poof

sullen marlin
#

I think -1 actually makes it use the last times sent

dry beacon
#

Why is it returning null? And can I change that<?

rugged topaz
sullen marlin
#

the defaults are in the docs though

summer scroll
rugged topaz
#

All timings values may take a value of -1 to indicate that they will use the last value sent (or the defaults if no title has been displayed).

sullen marlin
#
    stay - time in ticks for titles to stay. Defaults to 70.
    fadeOut - time in ticks for titles to fade out. Defaults to 20.```
dry beacon
#

The path is there, the file exists and works without declaring the string

slim magnet
#

whats the particle that happens when a mob dies? The white poof

arctic summit
eternal oxide
dry beacon
#

I'm really not sure, how can I give it one?

eternal oxide
#

then thats your null

#

?paste your config you are reading from

queen dragonBOT
slim magnet
#

hellppp

dry beacon
eternal oxide
summer scroll
#

oh yeah the prefix

dry beacon
eternal oxide
summer scroll
#

there you go

dry beacon
#

I'm guessing it would work if I put it under the command function?

eternal oxide
#

and remove implements Listener as that class is not using a Listener

dry beacon
#

gotcha

summer scroll
dusty herald
summer scroll
#

after you called the createCustomConfig method

dry beacon
#

How can I use this string in other methods and classes? I can't just make it public

eternal oxide
#

you have a getCustomConfig. just past an instance of this main class to any other class that needs access

#

so new ChatListener(this), this);

#

save the instance in yoru Chatlistener as plugin and you can get access in ChatPlugin using plugin.getCustomConfig()

#

you will also be able to access plugin.prefix as its public

dry beacon
#

Hmm, for some reason I can't use this.prefix in the same class though

eternal oxide
#

if you moved the whole thing into a method it has become a local variable

dry beacon
#

Yup, I can't make it public though

eternal oxide
#

you need to define it where you did in line 24 like public String prefix;

summer scroll
#

do the same thing as before but initialize the variable on onEnable.

eternal oxide
#

and intialize it after you create your config

dry beacon
#

gotcha, thank you!

#

Hmm, prefix and color still return null even though they were initialized after the config, any idea why this could be happening? ```java
public String prefix;
public String color;

@Override
public void onEnable(){
    getServer().getPluginManager().registerEvents(new ChatListener(), this);
    createCustomConfig();
    
    String prefix = ChatColor.translateAlternateColorCodes('&', this.getCustomConfig().getString("messages.default.prefix"));
    String color = ChatColor.translateAlternateColorCodes('&', this.getCustomConfig().getString("messages.default.color"));
}
summer scroll
#

you do prefix = ...

#

no need String prefix = ...

#

or you can do this.prefix = ...

#

you're creating local variable right there.

dry beacon
#

Yup, and I"m making it public above

eternal oxide
#

^ adding String at the beginning you are creating local variables that go out of scope outside the onEnable.

summer scroll
#

but you're not initializing the "public" prefix and color

dry beacon
#

So I should initialize the variables in onEnable and then "fill" them?

eternal oxide
#

remove String from before teh color and prefix in onEnable

#
    public String prefix;
    public String color;

    @Override
    public void onEnable(){
        getServer().getPluginManager().registerEvents(new ChatListener(), this);
        createCustomConfig();
        
        this.prefix = ChatColor.translateAlternateColorCodes('&', this.getCustomConfig().getString("messages.default.prefix"));
        this.color = ChatColor.translateAlternateColorCodes('&', this.getCustomConfig().getString("messages.default.color"));
    }```
kindred solar
#

guys, i was thinking, how can i store an hashmap into an yml file

summer scroll
#

depends on the key and value ig

kindred solar
#

like this

#

Map<Integer, ItemStack>

summer scroll
#

sure, you can do that since ItemStack is ConfigurationSerializable.

kindred solar
#

but how can i store an entire inv to an hashmap?

eternal oxide
#

getContents() then store by index

summer scroll
#

is inventory serializable? yk using base64

eternal oxide
#

Base64 would be bloat when ItemStack is already serializable

#

and theres no reason to encrypt it nor make it unreadable

#

just .getContents() and loop over storing each ItemStack thats not AIR or null against its index in the map

#

That can then be pushed straight to a file.

young knoll
#

You could put it in a list and just store the list

eternal oxide
#

you could but then you get nulls and AIR

young knoll
#

True

summer scroll
#

the index is the slot right?

eternal oxide
#

it would be

dry beacon
eternal oxide
#

yes, thats wrong

young knoll
#

Don’t create an instance of your main class

#

Use dependency injection and pass it through constructors

eternal oxide
#

I told you above to pass an instance. new ChatListener(this), this);

dry beacon
#

Why would I create an instance of the current class if I'm trying to retrieve some information from the main rickChat class

eternal oxide
#

You can only have ONE instance of your class which extends JavaPlugin. You pass that around (as I showed you).

kindred solar
#

never did that

eternal oxide
#

Thats fairly basic Java. Not something I'm here to teach.

quaint mantle
#

you will mostly use the put() and get() function

#

read up on them in there

kindred solar
#

ty

kindred solar
quaint mantle
#

put(key, value)

kindred solar
quaint mantle
#

get(key) ....... which returns that value

#

for spigot you could do ........put(player, "hello world")

#

.......get(player)..... returns "hello world"

#

hope that helps

kindred solar
#

what do you think about this? ```java
HashMap<Integer, ItemStack> inv = new HashMap<Integer,ItemStack>();
for(int i = 0; i < player.getInventory().getSize(); i++){
if(!player.getInventory().getItem(i).equals(Material.AIR) && player.getInventory().getItem(i) != null){
inv.put(i,player.getInventory().getItem(i));
}
}

kindred solar
quaint mantle
#

what are you asking about it

eternal oxide
#

getInventory().getContents()

quaint mantle
#

yeah if you are trying to get the contents

#

do that

kindred solar
#

in what line?

eternal oxide
#

I guess yoru code shoudl work

quaint mantle
#

you basically reinvented a list with indexes as keys

eternal oxide
#

check for null first using ==, then check for AIR

#

yep, he's putting it into a map so he can push to file

quaint mantle
#

ohhhhh i see

eternal oxide
#

So he need the slot index to store too

quaint mantle
#

sure yeah that makes more sense

#

if hes trying to save inventory contents though doesnt it get more complicated with enchantments and stuff

kindred solar
eternal oxide
#
HashMap<Integer, ItemStack> inv = new HashMap<>();
for(int i = 0; i < player.getInventory().getSize(); i++){
    ItemStack item = player.getInventory().getItem(i);
    if(item != null && item.getType() != Material.AIR){
        inv.put(i,item);
    }
}```
quaint mantle
#

is there a discord for ProtcolLib

kindred solar
eternal oxide
#

now you have the map you can simply getConfig().set("inventory", inv);

kindred solar
eternal oxide
#

ah sorry, item.getType()

kindred solar
#

npnp

#

ty

eternal oxide
#

only on the second one

#

I fixed it above

kindred solar
#

why am i getting an error while i try to set the inv data to my db?

#

'set(java.lang.String, java.lang.Object)' in 'org.bukkit.configuration.MemorySection' cannot be applied to '(java.lang.String)'

eternal oxide
#

show you line of code you are setting

kindred solar
#
    public void saveInv(Player player){
        HashMap<Integer, ItemStack> inv = new HashMap<>();
        for(int i = 0; i < player.getInventory().getSize(); i++){
            ItemStack item = player.getInventory().getItem(i);
            if(item != null && item.getType() != (Material.AIR)){
                inv.put(i,item);
            }
        }
        this.getSkyblockDB().set("");
    }
eternal oxide
#

thats not the line I showed you

#

.set("skyblock", inv);

kindred solar
#

but i have custom config files

eternal oxide
#

then put it in whatever file you want

kindred solar
#

oh

eternal oxide
#

it still needs a path and the data

kindred solar
#

nvm

#

it was showing an error that i never heared of and I panicked

eternal oxide
#

what you will do is instead of storing it under the "skyblock" path, you want to use the player.getUniqueId().toString()

eternal oxide
#

that way you have multiple player inventories in one file

kindred solar
#

yes, and thats what i want

eternal oxide
#

so this.getSkyblockDB().set(player.getUniqueId().toString(), inv);

kindred solar
#

yh

summer scroll
#

you can save a hashmap like that? xd

#

never knew that before

eternal oxide
#

yes, it becomes a ConfigurationSection

summer scroll
#

all the time I will loop through each keys and set it on the config.

kindred solar
#

is there any way to get the counted items from the config file? (like, i have 2 swords and 3 axes it ill return 5 items)

eternal oxide
#

not from the file easily, you can count Material types in the Inventory

kindred solar
#

im asking that cuz everytime the playe joins the skyblock i need to load the inv thing to his inventory

eternal oxide
#

You don;t need to know.

#

all you will do is the same in reverse and each item has the slot it came from stored

#

you will be putting every item back exactly where it came from

quaint mantle
#

can you cast PacketContainers in protocollib?

#

like im a similar way if you know an Entity is a Wolf you could cast it to a Wolf

kindred solar
#

i was thinking if i do for(int i = 0; i < 36; i++) but thats a kinda no sense doing that since i also have to place the armor

eternal oxide
#

no

#

you have to get teh ConfigurationSection from teh confgi and the loop the keys

summer scroll
#

so on join, get the ConfigurationSection.

eternal oxide
#
ConfigurationSection section = this.getSkyblockDB().getConfigurationSection(player.getUniqueId());
if (section == null) return;
player.getInventory().clear();
for(String path: section.getKeys(false))  {
    ItemStack item = section.getItemStack(path);
    player.getInventory.setItem(path, item);
#

Don't forget to clear the players inventory before you go about setting the new contents

dusty herald
#

wait ConfigurationSecions can pull itemStack?

eternal oxide
#

yes 🙂

dusty herald
#

that's fucking awesome

eternal oxide
#

You may also want to check section != null before you start looping

kindred solar
#

nvm

eternal oxide
#

check the section outside the for loop

#

fixed it above

kindred solar
#

is possible to save the inv at the event onPlayerQuitEvent?

eternal oxide
#

save when they quit or change worlds

quaint mantle
#

anyone know protocol lib here

dusty herald
#

I kind of do

lost matrix
quaint mantle
#

like in spigot how you can go from Entity --> Wolf

#

like if I knew a packet was a CHAT type could I cast it to something more specific with methods just for that packet type

lost matrix
#

No. The PacketContainer is just a wrapper for any arbitrary packet. But you can write more specific wrapper for the types you need.
I believe there is also a repo that has some of those.

lost matrix
kindred solar
quaint mantle
#

Ah okay, ill stick with the container for now. Im just having a problem understanding how exactly someone would know to code this

kindred solar
quaint mantle
#

like how would they know that .getDoubles() etc etc will change those specific field you know

eternal oxide
#

Integer.parseInt(path)

quaint mantle
#

is there documentation on each specific packet like the Explosion one

lost matrix
kindred solar
eternal oxide
#

that will fix the error. As for loading, did you save the inventory and checked it is in teh file?

quaint mantle
summer scroll
quaint mantle
lost matrix
quaint mantle
#

ohhhh

#

i see that, X Y Z

#

0 1 2

#

great that makes sense!

#

so would there be any reason this isnt working for me?

lost matrix
quaint mantle
#

right im looking at the chat packet right now

#

isnt is server-bound though

quaint mantle
kindred solar
lost matrix
#

(Scroll to the top)

quaint mantle
#

okay ill try to wrap my head around it

#

i was hoping it would be as easy as sending a string back

summer scroll
#

on the getUniqueId()

kindred solar
#

yes

eternal oxide
#

and yes toString()

#

your .inv is empty, so you have not saved your config after adding an inventory

eternal oxide
#

good. thats not the one you posted

kindred solar
#

it is a glitch cuz when i get back on the server it dont loads the inv and then when i disconnect it clears the inv in db cuz i has no items

eternal oxide
#

show us the code that sets the inventory

#

on joining

kindred solar
#

when the player joins i call this method

eternal oxide
#

are you getting the message or is the for loop running?

lost matrix
# quaint mantle thanks for the help

This might work. Didnt test:

  public PacketContainer createSimpleChatPacket(final String message) {
    final PacketContainer container = new PacketContainer(Server.CHAT);
    
    // Write the chat message using ProtocolLibs chat message wrapper
    final StructureModifier<WrappedChatComponent[]> chatStructureMod = container.getChatComponentArrays();
    final WrappedChatComponent component = WrappedChatComponent.fromText(message);
    chatStructureMod.write(0, new WrappedChatComponent[]{component});
    
    // Setting the display type
    container.getChatTypes().write(0, ChatType.CHAT);
    
    // Setting the UUID to 0 | 0 so it always gets displayed (according to the protocol specifications)
    container.getUUIDs().write(0, new UUID(0L, 0L));
    return container;
  }
kindred solar
#

cuz im not getting the msg

quaint mantle
eternal oxide
#

do a getLogger().info in the for loop of path to make sure it is running. If it is you will need to delay calling the method for 1 tick after you join

young knoll
#

Packet listeners are async

quaint mantle
young knoll
#

You need to sync back to the main thread

quaint mantle
#

whats the difference between the two

#

in terms of this

lost matrix
quaint mantle
#

because my event handler for AsyncPlayerChat adds all the different rankings and colors and stuff to the message

#

and when i just do Player.sendMessage() it goes around that i guess

kindred solar
lost matrix
quaint mantle
#

so if I used just PlayerChatEvent it would work?

eternal oxide
tight shadow
#

how to install

quaint mantle
#

whats the main difference between Async and main thread events?

lost matrix
young knoll
#

PlayerChatEvent is depreciated

quaint mantle
#

that might be why im using Async

lost matrix
young knoll
#

You still have to call the event from the main thread

kindred solar
quaint mantle
quaint mantle
eternal oxide
young knoll
#

Bukkit.getScheduler.RunTask

lost matrix
quaint mantle
lost matrix
#

And you can always get a sync context by using the BukkitScheduler and running runTask() like Coll suggested

eternal oxide
quaint mantle
kindred solar
#

some1 can help?

quaint mantle
#

would it even make sense to call an AsyncEvent from Sync context

kindred solar
#

this is returning null ConfigurationSection section = this.getSkyblockDB().getConfigurationSection("Players." + player.getUniqueId().toString() + ".inv");

lost matrix
quaint mantle
#

@kindred solar idk what the rules are but you are sending every error and piece of code you have and not doing any of your own debugging it seems. try some print statements and stuff

eternal oxide
#

try java MemorySection section = this.getSkyblockDB().get("Players." + player.getUniqueId().toString() + ".inv");

quaint mantle
quaint mantle
kindred solar
quaint mantle
quaint mantle
#

it will pay off to learn the skills

eternal oxide
#

I'm off to bed within the next few minutes so be quick

eternal oxide
#

have you tried the MemorySection?

lost matrix
#

My bud got sunburned 2 days ago and now we literally have 10cm of snow on the streets. What is happening?

kindred solar
#

not working

eternal oxide
#

still null or what?

kindred solar
#

wait

quaint mantle
kindred solar
# eternal oxide still null or what?

class java.util.HashMap cannot be cast to class org.bukkit.configuration.MemorySection (java.util.HashMap is in module java.base of loader 'bootstrap';

eternal oxide
#

ok its working. The reason you got that is because its not a fresh start

#

it currently has your Map that you inserted. If it was a fresh start it would be a MemorySection

#

You can easily stop that error by reloading yoru config

#

so after you save, reload

#

let me know it works so I can goto bed

kindred solar
eternal oxide
#

no, just reload it after you save it

#

.load()

kindred solar
#

yayyy

#

its working

#

tysm

#

but now i think im going to sleep too (5:24AM) xd

eternal oxide
#

same UK here

kindred solar
#

tysm

#

gn

eternal oxide
#

night

summer scroll
covert urchin
#

but then like, include screenname so you could look it up anyway 😮

#

@summer scroll depends, is it like, serialized and how?

summer scroll
#

so it will only have 2 strings.

#

and 3 colums on the sql

#

player uuid, inventory, and armor

quaint mantle
#

si

#

you should put it to base64

final fog
quaint mantle
#

Hey i have a problem bungeecord only forwards uuid to one server and the other one is random

dusty herald
#

Enable bungeecord mode in all spigot subservers

quaint mantle
#

I did

vivid cove
#

Someone knows how to cancel villager's trade event? :c

dusty herald
#

🤷

quaint mantle
#

Or ill rather check again

#

Oh i had bungeecord false on one server

#

I have a question where do i get uuid from what event at bungeecord preloginevent it gives me null

crude charm
#
[16:47:44 INFO]: [Core] Enabling Core v1.0-SNAPSHOT
[16:47:44 INFO]: [Core] [MONGO] Attempting to connect to the database...
[16:47:44 INFO]: [Core] [MONGO] Connected to the database! Using MongoStorage as storage.
[16:47:44 INFO]: [Core] [MONGO] Initializing collections, this may take a while!
[16:47:44 INFO]: [Core] [MONGO] Successfully initialized the collections!
[16:47:44 INFO]: [Core] Setting up maps...

setting up maps takes 10 years

worn tundra
crude charm
#

@worn tundra can u mb plz help me

peak depot
worn tundra
#

lol

worn tundra
#

Is that your plugin?

crude charm
#

yes

worn tundra
#

What is setting up maps doing?

#

You have given no details yet

crude charm
#

getting a file

#

one file

worn tundra
#

What file?

crude charm
#

1 sec

worn tundra
#

What's it doing with that file?

crude charm
#
  private static void setupMaps() {
        printConsole(CC.GREEN + "[Core] Setting up maps...");
        if(Core.getInstance().doesStorageFileExist()) {
            Core.getInstance().getServer().getConsoleSender().sendMessage(CC.RED + "MongoStorage " +
                    "is required to get the inventory map!");
            return;
        }
worn tundra
#

Nice

crude charm
#
    public boolean doesStorageFileExist() {
        return getResource("filestorage.txt") != null;
    }

worn tundra
#

and #getResource?

crude charm
#
@Override
    public InputStream getResource(String filename) {
        if (filename == null) {
            throw new IllegalArgumentException("Filename cannot be null");
        }

        try {
            URL url = getClassLoader().getResource(filename);

            if (url == null) {
                return null;
            }

            URLConnection connection = url.openConnection();
            connection.setUseCaches(false);
            return connection.getInputStream();
        } catch (IOException ex) {
            return null;
        }
    }

worn tundra
#

Interesting.. Have you tried deeper debugging with the advanced debugging method called Sout?

crude charm
#

no

#

also

worn tundra
#

Try placing some print functions inside the getResource method at different points

crude charm
#

another thiong

worn tundra
#

and see how far the code goes

crude charm
#

I tried runniong it on my vps

#

and it doesent start

#

at all

worn tundra
#

What doesn't start?

#

The plugin?

crude charm
#

ye

worn tundra
#

Strange

#

And no errors?

crude charm
#

oh wait

#

just got one

worn tundra
#

Ahh yep