#help-development

1 messages · Page 146 of 1

vocal cloud
#

Abort would be it isn't broken because they've stopped breaking it wouldn't it?

#

?jd-s

undone axleBOT
vocal cloud
#

Yeah looks like it

red sedge
#

alright

undone axleBOT
tall dragon
#

ahhh yes i too name my variables names that make absolutely zero sense!

if(6*blabla / blahblah == 0){
  momma.doRandomStuff();
}

💀

red sedge
vivid skiff
#

How can i set the gang name to indicate the path to where it have to add the player?

List<String> membersList = RPGangs.getInstance().getGangsData().getStringList(".gangs" + "." + gangName + "." + ".Members" + ".", player.getUniqueID);

crimson terrace
#

How do people do dependency injection? is there some way to have a di container from spigot to basically autowire the things or is it just basic constructor injection?

undone axleBOT
crimson terrace
#

thats all understood

#

just asking if theres more to it

#

Ive been hearing and seeing di containers with autowire capabilities like springboot and the likes. If that ever becomes reality in spigot ima be happy 😄

untold jewel
undone axleBOT
untold jewel
#

scheduler.scheduleSyncRepeatingTask()

#

you want this

red sedge
#

Should I try to support /reload or is it jsut not worth the effort

untold jewel
#

I understand, but he should just try to do something easier if he needs help with every single line

#

?learnjava

undone axleBOT
civic wind
#

Everyones go to is to type ?learnjava like thats not what people are already trying to do

red sedge
#

Ya but like, if I support it. I need to support it the entire way or else my brain wont be happy

red sedge
civic wind
#

Sometimes i can do normal java but when im doing bukkit api it gets more confusing

untold jewel
red sedge
#

Whats economyManager

civic wind
#

TRAP is because somethings null right

untold jewel
untold jewel
#

ik

#

I changed it now but still crashes

tall dragon
#

ur using amount before its even set

untold jewel
#

It did work tho just added a 0 after

tall dragon
#

try not using Objects requirenonnull

#

just make ur own null check

untold jewel
#

will that remove the crash?

tall dragon
#

i dont see anything else that could cause a crash so...

#

potentionally

untold jewel
#

ok i will try

undone axleBOT
#

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

wary topaz
#

its java idk why it rendered as cs

#

well still the error is in the .bash

#

error happend when:

#

[15:27:26 INFO]: EthanGarey issued server command: /gamemode survival EthanGarey

#

I compact it when it’s finished

#

Idk why it does

dim palm
#

isn't possible and it takes like 2 minutes to compile a file of 20kb 💀

untold jewel
#

removed the objects requirenonnull

#

still crashes the server

civic wind
#

I had this before and used try and catch to fix it

#

Its the itemstack

#

?learnjava

undone axleBOT
cobalt thorn
#

Runnable need to be registed and in case how?

untold jewel
#

this kilocodes kid cant be serious btw

civic wind
#

I had the exact same error when i was redeeming a heart item for lifesteal

#

Kid? Im 21

#

Your brackets are wrong, i gave u links for java

untold jewel
#

I'ts a figure of speech

#

It's*

civic wind
#

Morice

#

I’m aware its not your code

#

I was referring to it

#

But we all know its his code so i figured you’d put 2 and 2 together

untold jewel
#

?

civic wind
# untold jewel still crashes the server

Back to your problem i had this exact same error when i was redeeming a heart capsule (lifesteal), try and catch of the recipe fixed it and i also got it when i was in gamemode and tried to redeem it so i made a gamemode check, so maybe its something simple like that

river oracle
#

Try catching an npe is like putting a small bandaid over a bullet wond

civic wind
#

I am currently learning java

#

Lmfao

vagrant stratus
#

regex knowledge is once again needed lmao

#

?paste

undone axleBOT
civic wind
#

When did i say catch it, i was referring to something i had experienced

vagrant stratus
#

I suck at regex @river oracle

red sedge
#

do you ever just find what the issue was while writing a question about it?

river oracle
#

It's super helpful

#

Just a rec ofcourse

civic wind
#

?learnjava

undone axleBOT
river oracle
# civic wind ?learnjava

Lol don't expect help If your going to act like that. tbh also if your currently learning Java spigot api isn't the place to start

civic wind
#

Look how mad you get

#

I was explaining something i’d experienced and you are having a x generational melt down because im voicing an opinion

#

Im entitled to talk

red sedge
#

Do I have to do Player#sendBlockDamage every tick?

#

Seems like it disappears after the first one-

#

Imma try it

vagrant stratus
#

Method: https://paste.md-5.net/pazotobeva.cs

I need to rewrite the above to support the following

Dim dimName;
Dim dimName, dimName2, ... // Each of those would be considered a different VariableInit
Dim dimName : dimName = Array("", "", ...);

The above would return
dimName
dimName, dimName2, ...
dimName, dimName, Aray("", "", ...)

There's some other stuff, but I need to find examples

vagrant stratus
#

Not an option for all of those

river oracle
#

and exclude semi-colons etc

#

hmm hold up I'ma take a crack at this though my regex knowledge is limited

red sedge
unborn kiln
#

How would I disguise a mob such as a zombie as a player with packets?

red sedge
#

do you really want to bother w implementing that yourself?

#

if not just use a library

vagrant stratus
#

There's a lot of things that need to be taken into account @river oracle lmao

unborn kiln
#

Yes I do

#

Then I can control it all

river oracle
vagrant stratus
#

nope, that's not that this uses. There's no line ending

unborn kiln
vagrant stratus
#

Dim appOlk
Returns appOlk

Dim arrNormal21 : arrNormal21 = Array("元日,1,1","建国記念の日,2,11","天皇誕生日,2,23","昭和の日,4,29","憲法記念日,5,3","みどりの日,5,4","こどもの日,5,5","海の日,7,19,7,22","スポーツの日,10,11,7,23","山の日,8,11,8,8","文化の日,11,3","勤労感謝の日,11,23","大みそか,12,31")
ReturnsarrNormal21, arrNormal21, Array("元日,1,1","建国記念の日,2,11","天皇誕生日,2,23","昭和の日,4,29","憲法記念日,5,3","みどりの日,5,4","こどもの日,5,5","海の日,7,19,7,22","スポーツの日,10,11,7,23","山の日,8,11,8,8","文化の日,11,3","勤労感謝の日,11,23","大みそか,12,31")

Dim objConnection, objCommand, objRecordSet, objRype, objGroup, objUser, objType
Returns objConnection, objCommand, objRecordSet, objRype, objGroup, objUser, objType

Dim dif1(), dif2(), Diff() As Single
Returns dif1(), dif2(), Dif(), Single

Dim n As Integer
Returns n, Integer

Dim propArray()
Returns propArray()

Dim strArgSortDes(10)
Returns strArgSortDes(10)

@river oracle

#

That's most examples I can provide lmao

river oracle
vagrant stratus
#

Nope

#

VBScript

#

.vbs files

river oracle
#

what is VBScript for

jaunty crag
#

how can i display hex colors on scoreboards

vagrant stratus
#

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers with error handling, subroutines, and other advanced programming constructs. @river oracle

vagrant stratus
#

Found another 2 examples lmao

#

Dim Zvalue1(0 To 1) As Single
Not sure on this one, Idk VBScript

#
Dim fileName    : fileName    = ""
Dim min         : min         = ""
Dim max         : max         = ""
Dim strings     : strings     = "" 
Dim progressStr : progressStr = ""

These need to pass as well

#

Dim objConfig ' Dictionary object for configuration
This too, minus the comment. The comment being the ' and everything after it

jaunty crag
vagrant stratus
#
Dim arrArray(), _
    i

There's also this, not sure. Again I don't know VBScript

#

That should be the majority of them @river oracle

#

tldr; It's complex af

unborn kiln
vagrant stratus
#

Ahhh, the fun times of having 656 files to test with lmao

jaunty crag
jaunty crag
unborn kiln
#

Thank you for the suggestion though

jaunty crag
#

alright

#

do you know how to get precise scoreboard colors?

vagrant stratus
#

They most likely want either an NMS or ProtocolLib answer @jaunty crag

jaunty crag
#

i dont know what nms is but i do know what protocolLib is

vagrant stratus
#

net.minecraft.server

jaunty crag
#

ohh

#

do you know to get hex code colors on scoreboards 1.19

#

i know its possible i just dont know if it is on spigot

torn oyster
#

should I use assert?

vagrant stratus
#

ah, no idea for either of those

#

@river oracle
Here's a semi-complete list of things that need handled lmao

Dim dimName;
Dim objConnection, objCommand, objRecordSet, objRype, objGroup, objUser, objType
dim dimName, dimName2
Dim dimName : dimName = Array("", "", ...)
im arrNormal21 : arrNormal21 = Array("元日,1,1","建国記念の日,2,11","天皇誕生日,2,23","昭和の日,4,29","憲法記念日,5,3","みどりの日,5,4","こどもの日,5,5","海の日,7,19,7,22","スポーツの日,10,11,7,23","山の日,8,11,8,8","文化の日,11,3","勤労感謝の日,11,23","大みそか,12,31")
Dim dif1(), dif2(), Diff() As Single
Dim n As Integer
Dim propArray()
Dim Zvalue1(0 To 1) As Single
Dim fileName    : fileName    = ""
Dim min         : min         = ""
Dim max         : max         = ""
Dim strings     : strings     = "" 
Dim progressStr : progressStr = ""
Dim objConfig ' Dictionary object for configuration. This comment should be ignored
Dim arrArray(), _
    i
Dim varPivot, _
    intLoSwap, _
    intHiSwap, _
    varTemp
#

Not fun lmao

delicate lynx
red sedge
#

Ughhhhhhh I tried doing Player#sendBlockDamage every tick but it still has that flash between the client and the server

#

I tried giving mining fatigue

#

just made it wrose

vagrant stratus
#

Might be worth doing each of those as separate things actually Y2K

vagrant stratus
#

also just remembered I need to re-do the vbs stuff in general lmao

river oracle
vagrant stratus
#

case insensitive I'm pretty sure

river oracle
#

😭 I though tI was so close

vagrant stratus
#

Yea, this isn't easily lmao

#

There's still a fuck ton left to support too 👀

river oracle
#

the only thing i'm stuck on is recursively matching after cutting out the keyword than filtering again idk how to do that with one regex

vagrant stratus
#

since I'm not doing a BNF or anything like that, I'll probably just do a fuck ton of if statements given the complexity of this

river oracle
#

for example rn I have this
(?<=dim | Dim )(?![As])([a-zA-z0-9]+) which filters some keywords and such but it stops after first match 🤷‍♂️

vagrant stratus
#

more to come as I go through and test everything lol

quiet ice
#

Are you trying to implement some "obscure" scripting language in java or what

vagrant stratus
#

Analyzing, actually.
It's for analyzing malware, found it in html so I need something to deal w/ that lmao

quiet ice
#

Also just so you are aware of it - it is possible that ZipFile has a different implementation to the implementation used by the JVM

vagrant stratus
#

None of these are zip files lmao

torn oyster
#

can World.getWorldBorder() be null?

vagrant stratus
#

unless you mean the pk check, then yea. It's just a quick check

#

I need to go through a bunch and handle the various different types

vagrant stratus
#

Ah yea. I need to do more testing and figure out what to do w/ any files that break

quiet ice
#

The JVM zip reader implementation is based off this piece.

This is a zip format reader for seekable files, that tolerates leading and trailing garbage, and tolerates having had internal offsets adjusted for leading garbage (as with Info-Zip's zip -A).

But that's not all it does. That's just what that one comment says. Some other fun quirks of the JVM zip parser:

The end central directory entry is found by scanning from the end of the file, rather than from the beginning.
The central directory values are authoritative. Names/values defined by the local file headers are ignored.
The file data of local file headers is not size bound by the file header's compressed size field. Instead, it uses the central directory header's declared size.
Class names are allowed to end in trailing / which most tools interpret as directories.
vagrant stratus
#

If anything I find or make a library that handles multiple types :p

quiet ice
#

Latter quirk is definitely accounted for though

vagrant stratus
#

Err, only in the fix tool lol

#

I also need to rewrite the VBS code. Most likely gonna do that once I have it supporting more of the VBS functionality however

#

I have a collection of vbs scripts if anyone hates themselves enough to attempt that lmao

torn oyster
#

is there a way I'd make a method that tells IntelliJ that my object isn't null without a null check? i don't have a better way to explain it so i'll give an example

#

like I have the Bukkit player and I have the MinigamePlayer class

#

and I have a getMinigamePlayer method which can be null

#

how would I make intellij stop giving me warnings with a isInMinigame(Player p) which acts as a null check without it being directly a null check

eternal night
#

use the jetbrains annotations like @NotNull and @Nullable

torn oyster
#

but getMinigamePlayer(Player) can be null

#

but it won't be if isInMinigame(Player) is true

eternal night
#

oh so like

torn oyster
#

how do i let it knjow that

eternal night
#

ah

eternal night
#

you need to define a contract

#

which, those get a bit more complex

torn oyster
#

sigh

#

well what method would i do it on

#

the isInMinigame

river oracle
# vagrant stratus over 1k to be exactly lol

ok not sure if this is what your looking for, but for statements like this
Dim objConnection, objCommand, objRecordSet, objRype, objGroup, objUser, objType
(?<=[^dimDim])([^ Array][a-zA-z0-9]+) ok this one shoulddd work for this example and other similar examples to it I'm not sure how i'd shove array stuff into here so I didn't idk if you mind having another matcher for that or what

torn oyster
#

or getMinigamePlayer

eternal night
#

like

#
@Contract("null -> false")
public boolean isInGame(@Nullable Player player) {
    return player != null;
}
#

this would tell intellij

#

that your method would always return false for a null player

grim ice
#

relying on null for code logic:

eternal night
#

agreeing with 2hex, isInMinigame should not really do the nullcheck imo

#

null can never be in a minigame

#

so it being a valid parameter value feels a bit off

torn oyster
#

getMinigamePlayer(Player) should return a non-null value if the player is playing in that minigame instance

#

since there are multiple running at once

#

it's not how i find what game they are in

eternal night
#

Well yea but that certainly can be null

grim ice
#

yes

young knoll
#

Yes

eternal night
#

select a random element

#

from the values array

grim ice
#

Enum.values[random]

young knoll
#

Get the values array and select a random index

grim ice
#

random is a random number

#

generated with a random generator

tall dragon
#

not rlly a spigot question but has any1 here worked with AffineTransform's with Graphics2D?

#

since im drawing stuff on the screen
those are getting translated by the affinetransform. but i cannot figure out how to translate said drawings back to screen positions so that i can calculate wether or not the mouse is hovering said drawings...

vagrant stratus
# river oracle ok not sure if this is what your looking for, but for statements like this ```Di...
Text: Dim obj; Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 0
Text: Dim objConnection, objCommand, objRecordSet, objRype, objGroup, objUser, objType Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 1

end goal is having something similar for the first line, but for each of those in the array

i.e.

Text: Dim objConnection; Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 1
Text: Dim objCommand; Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 1
Text: Dim objRecordSet; Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 1
Text: Dim objRype; Type: class optic_fusion1.kitsune.parser.vbs.VariableInit Line Number: 1
etc, etc, etc
undone axleBOT
torn oyster
#
return getPlayerList().stream().filter(Objects::nonNull).map(ExtendedPlayer.class::cast).toList();```
#

how come this is immutable?

hazy parrot
#

because toList is immutable ?

torn oyster
#

oh

#

do I use collect?

hazy parrot
#

.collect(Collectors.toList

torn oyster
#

thought so

#

all good tho i think it's better being immutable

torn shuttle
#

I wish my bank account wasn't immutable

#

in terms of implementation anyone happen to know if getNearbyEntities iterates through all loaded entities in a world off the top of their heads?

soft tendon
#

how would i attach nbt to a dropped item? couldnt find any nbt stuff to use

hazy parrot
#

Hey, can anyone help me think of some non messy way of doing this:
So I have string in my config that looks like this:

|-
&8---&6%player &3Something&8---
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&3%placeholder - &6%timestamp
&8--------&6%current&8/&3%max&8---------

I want to make it TextComponent and only %placeholder parts clickable (each with different click event), but it seems to bit a little more complicated for me then expected

pseudo hazel
#

is that your own placeholder system or from placeholder API?

torn shuttle
#

@echo basalt imagine needing more than one line

getTargets(eliteEntity, directTarget).forEach(target -> getZoneTargets(target.getLocation()).forEach(livingEntity -> behavior.forEach(key -> scriptActionMap.get(key).runActions(eliteEntity, livingEntity))));
pseudo hazel
#

imagine wanting more than one line

wary topaz
vocal cloud
#

Dude seriously fix that code before worrying about those errors. Clean it up it's way more than it needs to be.

wary topaz
#

I compact it when I fix the errors.

vocal cloud
#

Compact it so you can figure out the errors.

#

That error is a java lesson #2 error

wary topaz
#

How do I compact it if I dont know how it works? (Errors going to be more painfull)

vocal cloud
#

That sounds like you need to rewrite it then if you don't know how it works

wary topaz
#

It took me 5 hours to code

#

I aint rewriting it

vocal cloud
#

It'd take me about 20m to clean it all up. Google functions and how to use them in java

pseudo hazel
#

okay so first split the string using that placeholder as the separator

#

then make the message and add an extra component in the middle that can be clicked

torn oyster
#

damn my code worked first try

#

how is that possible

hazy parrot
#

thanks, will try that later

fresh timber
#

How do I add arguments to acf commands

floral drum
#

you'll run into a bug

fresh timber
#

seriously

#

uh

#

they made the whole thing and never made you be able to make args in it

floral drum
#

uwu hi quared

torn oyster
#

why does this make their XP go negative 💀

    public void checkForLevelUp(Player player) {
        while (getXP(player) >= getRequiredXP(player)) {
            incrementXP(player, getRequiredXP(player) * -1);
            incrementLevel(player, 1);
        }
    }
#

hi

#

i could do -getRequiredXP(player)

#

actually

floral drum
#

wait

torn oyster
#

but that's besides the point

floral drum
#

lemme rewrite this for ya ❤️

torn oyster
#

the methods are sql queries btw

eternal night
#

🥄

floral drum
#

I'll expalin

#

😭

#

wow I'm tired

#

I can't tpe

#

typ

#

FUCk

floral drum
eternal night
#

lol xD

floral drum
#

I really can't type the coed

eternal night
#

I mean a) I'd highly suggest caching these values

#

instead of doing SQL query calls

floral drum
#

guessing the required amount of XP goes up each time? @torn oyster

floral drum
#

exponentially?

eternal night
#

what is the formula yea

torn oyster
#

its 240*level

floral drum
#

alr

torn oyster
floral drum
#

wonder if this is possible without a loop Thonk

eternal night
#

no just

#

like

#

locally

torn oyster
#

oh

eternal night
#

and in the end you set the xp and level once

#

instead of like 5 times

torn oyster
#

but multiple plugins are querying this same database

#

at once

floral drum
#

ok

torn oyster
#

that will be fine?

torn oyster
#

240 * (level + 1)

#

if that changes anything 🤷

eternal night
#

that forumlar seems a bit off

torn oyster
#

oh?

eternal night
#

I presume your level is actually the xp needed to get to that level

#

right ?

#

or does each level just require 240 xp more

torn oyster
eternal night
#

ah

floral drum
#
    public void checkForLevelUp(Player player) {
        long currentXP = getXP(player); // Cache the current XP of the player
        long requiredXP = 0; // The required amount of XP for a level up
        long currentLevel = getLevel(player); // Cache the current level
        while (currentXP >= (requiredXP = getRequiredXP(currentLevel))) { // Re-define the variable requiredXP to the new xp required to level up
            currentXP -= requiredXP; // Take away the amount of required xp from the current xp of the player (cached value)
            currentLevel++; // Increment the level if they have enough
        }
        
        setCurrentXP(player, currentXP); // Set the current XP value of the player in the database
        setLevel(player, currentLevel); // Set the current Level value of the player in the database
    }```

If I'm correct, you could probably do something like this. And you probably need to create a new method "getRequiredXP(long currentLevel)" and do your calculation in there.
torn oyster
#

yep

#

that one is better anyways

floral drum
#

Yeah, then you're not querying the database every time the while loop executes

torn oyster
#

yep

torn shuttle
#

it works

#

or so I assume I'm testing it rn on stream

echo basalt
#

Terrible way to wake up

#

Boutta have a bad day after reading that

torn shuttle
#

good

#

you should see the class now

#

it's grown

#

like a benign tumor

#

the cool kind that makes you grow to 7ft tall

echo basalt
#

Funky

iron glade
#

Does this not see I'm checking for null?

#

ah wait getMaterial could return null ig?

torn oyster
#

is it good to have a boolean as a method parameter?

floral drum
#

like what is it used for

buoyant viper
#

if it cant find the mitsubishi material

torn oyster
# floral drum in your case?

well i'm making a gameSummary method which increments their xp at the end of the game and gives them a summary

#

and i want a boolean win

torn oyster
#

to determine if they won or not

floral drum
#

so it's like "sendMessage(Player player, boolean won)"

#

or smtn

torn oyster
#

its a bunch of different sendmessages

#

like

#

if (win) {
player.sendMessage("Win Bonus: 100 XP");
database.incrementXP(player, 100);
}

floral drum
#

I mean I guess that should be fine

fallow valley
#

if win what?

#

if win == true?

#

or does it not have to specified

torn oyster
fallow valley
#

oh thats neat.

torn oyster
#

or !win

fallow valley
#

I never new that lol ty

torn oyster
#

that actually looks half decent what

floral drum
#

pop off king

fallow valley
#

That looks neat

torn oyster
#

i just forgot to use my colourize method on my two top things

#

that isn't good looking

iron glade
torn oyster
#

what's an average build time

#

with maven

hazy parrot
#

depends on many factors

worldly ingot
#

Yeah that will vary from project to project and what all is cached

subtle folio
#

After i do config.save(file), would I need to use YamlConfiguration.loadConfiguration(file) to update the config file's data?

desert loom
#

you should only need to load it again if you made changes to the file.

subtle folio
#

kk

fresh timber
#

I am getting a ton of errors on my IDE saying that Java can't find symbol when I'm trying to register my commands/listeners. This worked completely fine before and had no problems. Here is the part where it thinks it's wrong and all my classes:

torn oyster
#
                if (object.getItem().getType() == Material.PLAYER_HEAD) {
                    SkullMeta meta = (SkullMeta) object.getItem().getItemMeta();
                    meta.setOwnerProfile(Bukkit.createPlayerProfile(
                            item.getString("skull-owner").equals("self") ? player.getUniqueId() : UUID.fromString(item.getString("skull-owner"))
                    ));
                    object.getItem().setItemMeta(meta);
                }```
#

how come this throws the Caused by: java.lang.IllegalArgumentException: The skull profile is missing a name or textures!

#

error

fresh timber
#

restart what

torn oyster
#

intellij

fresh timber
#

and what do you mean by caches

#

ah ok

torn oyster
#

try that first

fresh timber
#

k

#

do I just it invalidate and restart?

torn oyster
fresh timber
#

k thx

young knoll
torn oyster
#

did i not?

#

isn't that what setSkullOwner thing does?

young knoll
#
Bukkit.createPlayerProfile(
                            item.getString("skull-owner").equals("self") ? player.getUniqueId() : UUID.fromString(item.getString("skull-owner"))
                    ));
#

That is the profile you make, you only give it a uuid

#
PlayerProfile profile = Bukkit.createPlayerProfile(UUID.nameUUIDFromBytes(texture.getBytes()));
        PlayerTextures textures = profile.getTextures();
        try {
            textures.setSkin(new URL(TEXTURE_URL + texture));
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

        profile.setTextures(textures);
#

Example of adding a texture

fresh timber
#

im getting an error when I run a command I made... can anyone help me?

floral drum
#

hi redempt ❤️

waxen plinth
#

Hi

waxen plinth
#

You're trying to read index 0 of an array that is empty

fresh timber
#

ok

#

ohhh

waxen plinth
#

So you need to check that the array has an element to get first

fresh timber
#

I ran the cmd without using an arg ;-;

#

oh ok

torn oyster
#

to prevent that from happening

fresh timber
#

yea ima do that

torn oyster
#

like what redempt said

fresh timber
#

uh I have another error... I have a cmd /particles and u use an arg and set the particles to something and the particles are not showing up. I have animations in video settings on in mc. Here is the code for the move event for particles to be summoned:

public class Particles implements Listener {
    public Particles(CoolPlugin plugin) {
        Bukkit.getPluginManager().registerEvents(this, plugin);
    }

    @EventHandler
    public void onMove(PlayerMoveEvent event) {

        if (event.getFrom().getX() != event.getTo().getX() || event.getFrom().getY() != event.getTo().getY()  || event.getFrom().getZ() != event.getTo().getZ()) {
            if (particlemap.get(event.getPlayer().getUniqueId()).equals("smoke")) {
                event.getPlayer().getWorld().spawnParticle(Particle.SMOKE_NORMAL, event.getPlayer().getLocation().getX(), event.getPlayer().getLocation().getY(), event.getPlayer().getLocation().getZ(), 5);
            } else if (particlemap.get(event.getPlayer().getUniqueId()).equals("hearts")) {
                event.getPlayer().getWorld().spawnParticle(Particle.HEART, event.getPlayer().getLocation().getX(), event.getPlayer().getLocation().getY(), event.getPlayer().getLocation().getZ(), 3);
            } else if (particlemap.get(event.getPlayer().getUniqueId()).equals("fire")) {
                event.getPlayer().getWorld().spawnParticle(Particle.FLAME, event.getPlayer().getLocation().getX(), event.getPlayer().getLocation().getY(), event.getPlayer().getLocation().getZ(), 10);
            }
        }
    }
}
young knoll
#

private static final String TEXTURE_URL = "http://textures.minecraft.net/texture/";

torn oyster
#

because the texture is just steve

#

and i put my uuid afet that

#

after

floral drum
#

are you wanting to get a texture from a UUID?

torn oyster
#

the texture is just sbeve though 🗿

floral drum
#

Alright, I'm not sure if there's an api for that in later versions

young knoll
#

It's not a uuid

#

It's a texture url

#

Use setOwningPlayer

floral drum
#

that's what the texture url is

torn oyster
#

how do i get that though

floral drum
#

it's a randomly generated string at the end

torn oyster
#

that weird thing

floral drum
torn oyster
#

oh

#

i didn't see that

#

okay

#

agh i have another question

#

i'm on fire today

#

anyways

#

what would be the best way to store a friend system in mysq?

#

mysql*

worldly ingot
#

As always with storage

#

it depends

#

👀

torn oyster
#

can you store lists in mysql?

worldly ingot
#

I wouldn't do that personally. I would opt for a friendship table

#

(CHAR(36) friend1UUID, CHAR(36) friend2UUID)

torn oyster
#

bruh

#

isn't that like

#

really painful to create

worldly ingot
#

No?

floral drum
#

this is why I love mongoDB

torn oyster
#

so you have to make friend3UUID, friend4UUID, et.c

#

etc..

worldly ingot
#

No?

floral drum
#

no

torn oyster
#

oh wait

#

AH

worldly ingot
#

Every unique friendship is put in there

torn oyster
#

i see

worldly ingot
#

They're not unique, ye

torn oyster
#

that makes sense

floral drum
#

choco what do you prefer

torn oyster
#

i'm slow asf 💀

floral drum
#

mongo or sql owo

worldly ingot
#

To get a player's friends you can do a quick query of SELECT * FROM friendships WHERE friend1UUID = ? OR friend2UUID = ?

#

(where the two ? are just the player's UUID you want to search for)

torn oyster
#

yep

#

so each player has 2 rows per friendship, one is where they are friend1, the other is where they are friend2, correct?

#

if that's the case, then you should only need to select friend1

#

since that makes more sense

worldly ingot
#

Actually, to add to that, I'd format that table with a unique identifier too. INT id AUTO INCREMENT, (CHAR(36) friend1UUID, CHAR(36) friend2UUID)

#

Where the id is the primary key

torn oyster
#

oh?

#

how come?

floral drum
#

or else it would overwrite

worldly ingot
#

No, not necessarily

floral drum
#

oh?

#

😭

#

cri

worldly ingot
#

The reason for it is so that if you want to associate data with specific friendships, you can do that in a new table with a foreign key that refers to the friendship id

#

Say for example you want to associate a level with each friendship

#

Now you can make a table with the columns (INT friendshipId, INT level), where the friendshipId is a foreign key to the id column in the friendship table

#

SQL is fun :)

floral drum
torn oyster
#

eh i think i'll just stick to plain ol' friendships

#

but thanks for your help

worldly ingot
#

(poor example - in the one above you'd just have a level column, but it's useful for the future in case you add more unique data!)

#

I really do suggest including a unique id with it. It will save you headaches in the future

floral drum
#

for example, friendshipTimestamp

#

owo

worldly ingot
#

I'd honestly put the creation timestamp in the friendship table too

#

Any basic information you expect to get from a friendship should go into it

floral drum
#

or if you want sneaky-peeky data like hypixel loves to have

#

they store a lot of stats

fresh timber
#

I am trying to use an if statement if the player's uuid is this and its not working. it is my uuid and it will give me an error if I put it in as anything but a string so I did this. How do I make it work?

if (event.getPlayer().getUniqueId().equals("f8725c52-c5e5-some numbers :)-8609-42b70fdbfb77")) {
drowsy helm
#

uuid isnt a string

buoyant viper
#

well a uuid is uuid object

fresh timber
#

it wont let me put it as anything else

drowsy helm
#

UUID.fromString("string")

fresh timber
#

how would I do the exact line I had up there as a uuid object

buoyant viper
#

could call uuid.tostring

fresh timber
#

uh

buoyant viper
#

getUniqueId().toString().equals("the uuid")

drowsy helm
#
UUID uuid = UUID.fromString("f8725c52-c5e5-some numbers :)-8609-42b70fdbfb77");
if (event.getPlayer().getUniqueId().equals(uuid)) {
buoyant viper
#

or that

drowsy helm
#

I'd really recommend learning java before doing plugin dev, it will help you a lot

fresh timber
#

I did a course on it

#

but how would a course tell me that a uuid in minecraft is not a string

drowsy helm
#

this is basic java objects

buoyant viper
#

well the course will teach u about types

fresh timber
#

ye

#

well maybe I just forgot

#

;-;

drowsy helm
#

have you verified that the user is in the map?

#

also please use local variables

#

will make your code so much cleaner

torn shuttle
#

the fact you can't do expandible code with yml highlighting in github wikis makes me a sad camper

#

best I can seem to make it is using the pre and code tags but that doesn't do any nice colors

worldly ingot
#

What do you mean? You can't do ```yaml?

#

GitHub uses Markdown

torn shuttle
#

not unless there's a different kind of spoiler to the one I'm using

#

it breaks ``` formatting

#

it doesn't break code but code isn't as fancy

#

well

#

it breaks code it doesn't break pre + code

worldly ingot
#

How are you doing spoilers?

torn shuttle
#

summary

#
<details> 
  <summary>Example </summary>
<pre><code>
particles:
  x: 0.1
  y: 0.1
  z: 0.1
  particle: FLAME
  speed: 0.01
  amount: 1
  </code></pre>
</details>
worldly ingot
#

Yeah you can definitely code block that, you just have to indent accordingly

<details> 
  <summary>Example </summary>

  \`\`\`yaml
  particles:
    x: 0.1
    y: 0.1
    z: 0.1
    particle: FLAME
    speed: 0.01
    amount: 1
  \`\`\`
</details>
#

Grrr

#

Stupid Discord formatting

torn shuttle
#

oh god this formatting is horrendous

worldly ingot
#

You get the idea

#

You just have to make sure things are indented properly

torn shuttle
worldly ingot
torn shuttle
#

oh

#

it requires a single blank linebreak

#

lovely

#

thanks lol

worldly ingot
torn shuttle
#

yay I can make my wiki marginally less daunting

#

boy

#

let me tell you

#

I've been on a crusade

worldly ingot
ancient plank
torn oyster
#

feedback?

kindred valley
#

do you have a site i can find minecraft models?

minor spoke
#
WorldBorder wb = Bukkit.getWorld("world").getWorldBorder();
wb.setCenter();

and the error is
Cannot resolve symbol 'setCenter'

#

why is that

drowsy helm
#

it takes a parameter

minor spoke
#

the getWorldBorder?

#

oh no no

#

wb.setcenter is just not working at all

#

and all other commands

drowsy helm
#

yesh setCenter takes a parameter

minor spoke
#

i cant send a photo but

#
WorldBorder wb = Bukkit.getWorld("world").getWorldBorder();
wb.setCenter(0,0);
#

error Cannot resolve symbol 'setCenter'

drowsy helm
#

are your imports set up correctly

minor spoke
#

yes

#

all of the imports thats needed is there

#

its just not working

onyx fjord
#

IDE should tell you what's up

#

What are you using?

kindred valley
#

NetBeans probably??

quiet ice
minor spoke
quiet ice
#

So 1.19.2?

#

?jd-s

undone axleBOT
quiet ice
#

And with using I mean declared as a dependency in maven/gradle

minor spoke
civic wind
minor spoke
#

yes

chrome beacon
#

Could you send your pom

#

?paste

undone axleBOT
kindred valley
#

well i handled

#

i just pasted load();method everywhere and fixed

#
public class Main extends JavaPlugin {
    private static Main plugin;
    TestConfig.load();
    @Override
    public void onEnable() {
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        plugin = this;
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new onDie(), this);
        getServer().getPluginManager().registerEvents(new onJoin(), this);
        TestConfig.setup();
        TestConfig.load();
        TestConfig.save();
    }
    @Override
    public void onDisable() {
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.load();
        TestConfig.save();
    }
}
crimson terrace
#

maybe try this?

kindred valley
#

customConfig

crimson terrace
#

ah

hazy parrot
#

Just check if file exist, if not copy input stream from resources to file

sullen marlin
#

Why are you repeatedly loading it lol

crimson terrace
#

YamlConfiguration#save() overwrites the existing file, so if you save the thing you loaded from it it will reset every time

twin venture
serene sigil
#

how do i kill the exp a player drops when he dies?

serene sigil
#

tysm

serene sigil
#

why wont this work?

rough drift
#

isn't there a take method

serene sigil
#

(Inventorycloseevent)

proper notch
#

I haven't used spigot in ages but surely that's trying to compare an ItemStack and a Material which won't equal each other.

rough drift
#

the inventory has a #contains(Material)

proper notch
#

Ahh oke

rough drift
#

it just checks for type excluding count

#

#contains(ItemStack) checks for nbt IIRC

rough drift
#

would make it easier

pseudo hazel
#

so you want the player to lose levels when they dont have a dragon egg when their inventory closes?

rough drift
serene sigil
serene sigil
#

if they put the egg in the inventory

pseudo hazel
#

what?

rough drift
#

if they put the egg in inv and close it it should remove 100 levels?

pseudo hazel
#

describe to us how it should work

pseudo hazel
#

and should it then not remove the egg or what?

rough drift
#

so you want to remove the !

#

because ! inverses

serene sigil
#

so basically i wanted it to happen as soon as they put it in the inventory (anything else than the player inventory) but this would also work out

rough drift
#

okay

#

so

#

if they remove the dragon egg from the player inventory, and put it in a chest, you want to remove 100 levels?

#

is that what you mean?

pseudo hazel
#

I mean I see what you are going for but this will subtract a lot of levels from a lot of people just playing the game normally

rough drift
#

and then what?

#

because if they put it in their inventory again and move it again it will still remove 100 levels

serene sigil
#

and if they put it back in their inventory they gain 100 levels

rough drift
#

oh

#

Well that's easy enough

pseudo hazel
#

okay so how would you write that part then

rough drift
#

causes a level dupe

#

but sure

serene sigil
fluid river
#

woke up

#

where are noobs

#

show me

serene sigil
# pseudo hazel okay so how would you write that part then

well i couldnt really fugure out how the player can gain -100 levels if it happens as soon as they put it in the chest (nvm i actually did figure it out but there are too many exp dupes..) but its also ok if u get the -100 levels if u close it

serene sigil
#

😛

#

yo

#

stiff23

#

wake up

fluid river
#

sucks to be you

serene sigil
#

yea 😦

#

help me @everyone

fluid river
#

what do you need

serene sigil
pseudo hazel
#

please use my actual username if you want me to help you

serene sigil
#

lol i was jk

fluid river
remote swallow
#

im confused what your actually trying to do

fluid river
#

setLevel(getLevel() - 100);

pseudo hazel
#

so what they essentially want is to give a dragon egg a value of 100 levels, i.e. when you pick it up it should give you 100 levels and when you get rid of it it should subtract 100 levels

pseudo hazel
#

so I would actually just not use events at all and make a bukkit scheduler

#

that just checks every x seconds if a dragon egg is in your inventory

#

but thats probably not the best solution

serene sigil
#

nah

pseudo hazel
#

but I believe it will prevent most if not all dupes

serene sigil
#

i tried that already but it didnt work

pseudo hazel
#

why not

serene sigil
#

it was too hard

pseudo hazel
#

which part

honest echo
#

how do i get click from upper chest inventory, i tried getView#getTopInventory but it also reads player inventory above hotbar

serene sigil
#

like i did the for loop part but i whenever i got the egg i always gained more and more levels

#

and also it isnt really efficient

#

so i sticked to events

fluid river
#

bro

#

list or map or pdc on player

#

to prevent adding more

pseudo hazel
honest echo
pseudo hazel
#

i see

remote swallow
#

im so confused, does #saveConfig(); remove strings for some reason

pseudo hazel
#

remove strings?

#

you mean comments?

remote swallow
#

Things in quote marks

#

eg i have

player: "The__Epic"
on the default config

after saving it becomes

player: The__Epic

pseudo hazel
#

oh

#

well for yml it doesnt really matter

#

unless you use quotes in the string directly

remote swallow
#

I dont, i was just wondering why it did that

pseudo hazel
#

but those 2 are still the same value when read

#

it probably does that since its the default way for strings to be saved

fluid river
#

if you do ''

#

it's gonna save as ''

#

but if you put a new string inside it won't have quotes

#

as far a i remember

eternal oxide
#

correct unless you use 'string' to wrap

kindred valley
#

can i get player name by uuid?

#

well yes Bukkit.getOfflinePlayers();

hazy parrot
#

Bukkit.getPlayer(UUID).getName

eternal oxide
#

getOfflinePlayer(UUID)

#

always try to use OfflinePlayer if you don;t need an actual Player.

#

If it exists the OfflinePlayer will always be there and will never change instance. Player is transient

river oracle
#

Doesn't offline player need to query something 🤔 I always thought it did

kindred valley
#

Does OfflinePlayers containts Online players?

eternal oxide
#

no, its cached

river oracle
eternal oxide
#

Player extends OfflinePlayer

river oracle
#

^

river oracle
serene sigil
grim ice
#

actually nevermind

pseudo hazel
#

why check every tick xD

#

that would be horrible

fluid river
#

ez

serene sigil
fluid river
#

is there even a method giveExpLevels

#

and does it really accept negative numbers

serene sigil
#

yes

#

player.giveexplevels(-100)

fluid river
#

if doesn't work then it doesn't accept negatives

hazy parrot
#

it should

fluid river
#

alr

serene sigil
#

lol

fluid river
#

then what's not working

hazy parrot
#

maybe condition was false

serene sigil
fluid river
#

maybe you didn't register listener/commandexecutor

serene sigil
#

jk

fluid river
serene sigil
#

lol jk

serene sigil
#

only the 2nd if

hazy parrot
fluid river
#

lol how much i slept

#

getInventory().contains(Material)

#

is this even spigot?

#

not paper

fluid river
#

here is itemStack

serene sigil
hazy parrot
serene sigil
#

oh

fluid river
#

i just didn't want to open the link

hazy parrot
fluid river
open siren
#

Can i create gradient ChatColor?

fluid river
#

Hex Color?

mighty pier
#

1.13+

#

pretty sure

#

uh

#

just put hashtag

#

then colors

fluid river
#

go to spigot and check any topic about hex color codes

mighty pier
#

👍

serene sigil
#

i think this will work

open siren
#

this one?

soft tendon
#

how would i go about assigning e.g. a texture_id to a skull? I've used setNbt via NbtCompounds on fabric, how does that work with spigot?

dim palm
#
        ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
        SkullMeta meta = (SkullMeta) head.getItemMeta();
        GameProfile profile = new GameProfile(UUID.randomUUID(), "");
        profile.getProperties().put("textures", new Property("textures", value));
        Field profileField = null;
        try {
            profileField = meta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(meta, profile);
        } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
            e.printStackTrace();
        }
        head.setItemMeta(meta);
        return head;
    }```
soft tendon
#

tysm!

young knoll
#

If you’re on a modern version there’s a profile api

soft tendon
#

nah, i can't use that, i get the texture_id from a web api

eternal oxide
#

you can still use it

kindred valley
#

Everytime i reload the server, the configuration list i made is being cleared

dim palm
kindred valley
#

I am using lists on a configuration

#

players: {}

dim palm
#

oh

eternal oxide
#

are you actually trying to save Player objects in a list?

kindred valley
#

UUIDS

eternal oxide
#

just UUIDs?

kindred valley
#

uuid.toString

#

yes

eternal oxide
#

then so long as you save teh config you will be fine

#

always save if you make changes

kindred valley
#
public void onJoin(PlayerJoinEvent e) {
        Player p = e.getPlayer();
        TestConfig.load();
        Main.getPlayers().add(p.getUniqueId().toString());
        TestConfig.load();
        TestConfig.get().set("players", Main.getPlayers());
        TestConfig.save();
        TestConfig.get().set(p.getName() + ".deaths", 0);
        TestConfig.get().set(p.getName() + ".kills", 0);
        TestConfig.save();
    }```When a player joins i load the config, add him to the list and save it
#
public HashSet newHashSet() {
        return new HashSet();
    }
    @Override
    public void onEnable() {
        plugin = this;
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new onDie(), this);
        getServer().getPluginManager().registerEvents(new onJoin(), this);
        getCommand("takestats").setExecutor(new TakeStats());
        TestConfig.setup();
        players = new HashSet<>();
        TestConfig.load();
        TestConfig.save();
    }
    @Override
    public void onDisable() {
        TestConfig.load();
        for(String z: players) {
            newHashSet().add(players);
        }
        TestConfig.get().set("players", newHashSet());
        TestConfig.save();
    }```This is the main
eternal oxide
#

you are wiping out the in memory config in yoru onDisable

dim palm
#

why r u loading everytime the config

kindred valley
#

I can not save configuration if i wont put it to onDisable();

#

its somehow clearing

eternal oxide
#

you also load it twice in the join event

kindred valley
dim palm
#

it just need to be loaded on the onEnable

kindred valley
#

after changing things, wouldnt i have to load it again?

fluid river
#

is some text channel deleted?

dim palm
fluid river
#

oh

dim palm
eternal oxide
#

You are also wiping the config in onDisable TestConfig.get().set("players", newHashSet());

#

ah not new HashSet

fluid river
eternal oxide
#

its newHashSet

#

odd naming is confusing

kindred valley
#
public HashSet newHashSet() {
        return new HashSet();
    }```its this
eternal oxide
#

actually yes, its a method, you get a new HashSet every time

#

you are literally getting a new empty Set every time you call that

river oracle
#

Why wouldn't you just do new HashSet lmao

eternal oxide
#

Yes, then you get a new one to save

#

you are getting a NEW Set every single call and adding a single player, then you get a NEW empty Set and save it

river oracle
eternal oxide
#

It is Java, but

#

You get a new piece of paper, write a single player UUID to it, then throw it away and do the same for the next.

kindred valley
river oracle
#

💀

eternal oxide
#

then you get a fresh blank pieve of paper and save it

fluid river
#
public class ImBadAtCoding extends JavaPlugin {
    private File configFile = new File(getDataFolder(), "bruh.yml");
    private FileConfiguartion config;

    public void onEnable() {
        saveResource("bruh.yml", false);
        // OR
        if (!configFile.exists()) configFile.createNewFile();
        config = YamlConfiguration.loadConfiguration(configFile);
    }

    public void saveMyConfig() {
        try {
            config.save(configFile);
        } catch (IOException ignored) {}
    }

    public FileConfiguration getMyConfig() {
        return config;
    }
}```
river oracle
#

Then might as well quit java lmao

kindred valley
#

It adds the list

#

all the uuids

fluid river
#

then in ur code of listener

imBadAtCodingInstance.getMyConfig().set("key", value);
imBadAtCodingInstance.saveConfig(); // SAVE CONFIG EVERYTIME YOU MODIFY IT

and for reloading with command

    public class ImBadAtCoding extends JavaPlugin {
        // all of the code from above

        public void reloadConfig() {
            config = YamlConfiguration.loadConfiguration(configFile);
        }
    }
kindred valley
#

like it fills the whole paper and clears it

eternal oxide
#

you are putting every player onto its own piece of paper and throwing it away

dim palm
#

why not creating a new HashSet and adding players into it

dim palm
#

instead of creating everytime a new hashset

kindred valley
eternal oxide
#

Every time you use newHashSet() you are fetching a new blank piece of paper.

kindred valley
#

because i tried it like this way either

fluid river
#

that's just the name of the variable

fluid river
floral drum
eternal oxide
#

No, from old age

fluid river
#

saving config in onDisable() is shit

#

onDisable() is mostly shit

#

only used it in plugins to send "Bye bye dumb server owner" message to console

dim palm
#

XD

fluid river
#

.

#

.

#

.

#

.

kindred valley
#

Why would it change

#

i have the same methods

kind hatch
onyx fjord
floral drum
#

do you play val too?

onyx fjord
#

no didnt and will not

dim palm
#

yoru??

onyx fjord
#

and cant

#

thankfully

floral drum
#

plat 1 😭

dim palm
#

noobie

onyx fjord
#

i dont enjoy comp games anymore

floral drum
dim palm
#

if i set a entity invisible the name will keep displaying?

kind hatch
#

No? That's now how that's intended to work.

floral drum
#

asc?

#

that's what everyone calls it 😭

dim palm
#

😠

floral drum
#

sorry ❤️

onyx fjord
#

#general

earnest forum
#

imagine not being immortal

#

yawn

floral drum
kindred valley
#

I am trying to get used to it

fluid river
#

then take

#

FREE JAVA LESSONS

checkmybio

#

from me

#

and become great

earnest forum
#

and i regret each and every one of them

kind hatch
# kindred valley wdym

What I mean is, the code you have given is full of logical errors. Then your response to people telling you what's wrong is backwards.

kindred valley
floral drum
kindred valley
fluid river
#

umm

#

you basically don't show half of your code

earnest forum
fluid river
#

make some methods kinda hard to understand

floral drum
#

pop off king

fluid river
#

and to refactor

earnest forum
#

i got it permanently banned

#

because i talked too much shit

#

spent 400 aud on that account 😢

floral drum
#

lollll

fluid river
#

And ask us to show where you mistaken

floral drum
#

F

kindred valley
#

I dont have another class

#

Just the things you texted

#

I put them in a class

fluid river
#

that's cringe my friend

#

what is a TestConfig even

#

and what are it's methods

earnest forum
#

assuming a handler for a yaml file ?

fluid river
#

probably

earnest forum
#

.get() returns a FileConfiguration

fluid river
#

clone of actual as i can see

kindred valley
#

Let me pass the pc

fluid river
#

or just instantiates a new one

#

somehow

#

so when he uses save() it wipes the file

kindred valley
#

Actually

#

It does not wipe the whole file

#

It just wipes the collections

fluid river
#

well then you overwrite

#

isntead of adding to

#

so they get wiped out

#

you need to get the collection from the config

#

to variable

#

modify it

#

and then put back on the same path

#

and .save()

#

and never keep anything except fileconfiguration instance in heap

kindred valley
#

?paste

undone axleBOT
kindred valley
#

I have problem with set

#
@EventHandler
    public void onJoin(PlayerJoinEvent e) {
        Player p = e.getPlayer();
        TestConfig.load();
        Main.getPlayers().add(p.getUniqueId().toString());
        TestConfig.get().set("players", Main.getPlayers());
        TestConfig.save();
        TestConfig.get().set(p.getName() + ".deaths", 0);
        TestConfig.get().set(p.getName() + ".kills", 0);
        TestConfig.save();
    }```And this is the class i set the list
tardy delta
#

tf

fluid river
#

what's this shit

dim palm
#

XD

fluid river
#

bruh

#

TestConfig.get().set("players", Main.getPlayers());

#

WHAT THE HECK ARE U STORING

floral drum
kind hatch
floral drum
fluid river
#

Sry just dropped my airpods case on caps

#

still sure you need

#

FREE JAVA LESSONS

#

or idk

#

free basic logic lesons

kindred valley
fluid river
#

why

#

and why for all players

#

and why as Collection

#

what

kindred valley
#

Because players are not plural right

rough drift
#

does Bukkit.getVersion() return like 1.8.9 1.8 etc?

kindred valley
#

Thats why im using list

dim palm
#

it returns a lot of weird patterns

rough drift
#

Oh wait

#

I am dum

#

that's the server impl

floral drum
#

1_8_R3 I think?

dim palm
#

public static String getServerVersion() {
return Bukkit.getServer().getClass().getPackage().getName().substring(23);
}

floral drum
#

oh yeah that

kind hatch
floral drum
#

You could do Bukkit.getBukkitVersion()

#

which returns a useful value

fluid river
#

@kindred valley can you call me

#

and explain why

floral drum
#

"1.14-R0.1-SNAPSHOT" for example

fluid river
#

why do you store all players in config

#

for what reason you might need this

kindred valley
#

I am checking if a command argument matches

dim palm
#

diab lo que piquete la chamaquita

floral drum
#

que?

dim palm
#

so

floral drum
#

no hablo espanol

kindred valley
fluid river
kindred valley
#

Of I/O

kind hatch
fluid river
#

explaaaain bro

#

what are you even trying to reach

dim palm
#

oh yeah

kindred valley
eternal oxide
#

node index?

kindred valley
#

I am trying to take that players kills and deaths

eternal oxide
#

Explain in plain english what you are trying to do

kindred valley
#

I just spoke english

dim palm
#

how can i simulate a block break particle

eternal oxide
#

No one here has any idea what you are trying to do limpeex

kindred valley
#

Mann

pseudo hazel
#

start from the beginning

#

what system are you tryna make

eternal oxide
#

You are showing broken code but no one has a clue what you are actually tryign to achieve

kindred valley
#

player section contains uuids and i check them if the command argument matches thats all

eternal oxide
#

what precisely are you trying to do?

pseudo hazel
#

so you want to use a player UUID as a command arg?

dim palm
#

if (section.contains(args)) {
//
}

kindred valley
pseudo hazel
#

then what are the UUID used for

eternal oxide
#

I'll ask once more then I'm out. Tell us exactly what you are trying to achieve. Not what code you are using or anything like that. What is your END goal?

kindred valley
#

Bukkit.getOfflinePlayers().contains(string[0]);

eternal oxide
#

you are trying to get an offline player by their name?

kindred valley
eternal oxide
#

then you should be using statistics