#help-development

1 messages · Page 143 of 1

eternal night
#

somehow literally any issue is just "gimme valhalla and my life is good" xD

#

and I love it

ivory sleet
#

lmao

torn oyster
#

i'm aware but i check that?..

vague oracle
ivory sleet
#

yea

fresh timber
#

how do I do that

ivory sleet
#

I think you just scan the package at runtime

#

its a bit tricky since you gotta remember, classes load and unload during the server's lifetime

tender shard
fresh timber
#

hm ok

wind tulip
#

(btw if anyone is interested I've tested it and it returns a temporary value, you'll have to wrap the Vector#add return value in a Entity#setVelocity)

ivory sleet
#

@vocal cloud didnt you have some method for it?

tender shard
#

what happens if you split up your stream into different lines, so we can see where it actually comes from?

torn oyster
ivory sleet
#

oh wrong ping oops

#

@fresh timber

#

^

torn oyster
#

because this is a dependency i'm using for my server

#

but my plugin that uses the dependency is throwing the error

tender shard
wind tulip
#

Does anyone know how to set up the auto fill for commands with multiple "arg paths" in the plugin yaml file?

e.g.

/command set (autofill 1)
/samecommand load (autofill 2)

tender shard
torn oyster
#

i use mvn clena deploy

#

clean

wind tulip
#

instead of sharing autofill options for both first args

tender shard
#

ugh I was 10 minutes without internet

#

it was hell

tall dragon
#

oh no!

tender shard
#

had to connect the iphone to tether now

tall dragon
#

are the wounds bad?

tender shard
#

fuck vodaphone

tall dragon
#

how did you even survive!?!?

tender shard
#

yeah I'm still having tears in my face haha

#

I wouldnt wish "no internet" to my worst enemies

tall dragon
#

yea its just completely sucky to have no internet lmao

#

one of the reasons i have different providers for my phone/house

tender shard
#

ikr, PC is instantly useless without network lol

tall dragon
#

so. whats the score on the dino game then

fresh timber
#

@tender shard it wont load now

tall dragon
#

the library is not present

fresh timber
#

what does that mean

tall dragon
#

it prolly should have been shaded into your plugin right?

fresh timber
#

uh ig

tall dragon
#

well looks like it did not

fresh timber
#

hmm

tender shard
#

you probably used intellij's build feature

fresh timber
#

uh I think so but tbh idk what compile means

tender shard
#

you have to double click on "package" to compile your jar

tall dragon
#

double tap ctrl & type mvn clean package

tender shard
#

do NOT use intelliJs build feature

tall dragon
#

or that

tender shard
tall dragon
#

naaah

#

its not!

tender shard
#

huh

tall dragon
#

liar!

tender shard
#

oh

#

you're right

#

I didnt know about the double ctrl thing

#

I only knew about double shift

fresh timber
#

so I just need to click package

tall dragon
#

now you do 🙂

tender shard
#

thanks 😄

fresh timber
#

did I do something wrong?

tender shard
fresh timber
#

k

#

my intellij just crashed

tender shard
#

and then copy over the .jar file to your server

fresh timber
#

;-;

#

yea

#

I host my server on a vm so I have to send it to myself through teams and copy it on the vm cus it wont let me copy over ;-;

tall dragon
#

huh

fresh timber
#

eh dw abt it

tall dragon
#

why would you do that xD\

#

cant u just test locally

fresh timber
#

cus my pc is slow

#

no I use my plugins for a server

tall dragon
#

i mean. the vm runs on your pc no?

fresh timber
#

that I run

#

no

#

the vm runs on a server I have

#

in my house

tall dragon
#

oh

fresh timber
#

way faster that my pc but the servers default os is vmware so I cant use it to do everything else I do

tall dragon
#

cant u just connect usin ftp?

fresh timber
#

I just use vmwares remote console

#

there is a way to copy over

#

idk

fresh timber
tender shard
fresh timber
#

oh yea I see

#

I thought it was under project

tender shard
#

but you can also do what Epic suggested and hit ctrl twice quickly and just enter "mvn clean package" there

fresh timber
#

I just used ctrl 2x

tender shard
#

kk

fresh timber
#

and it finished with exit code 0

tender shard
#

did it say "BUILD SUCCESS" at the bottom?

fresh timber
#

ye

#

a few lines up but whatever

tender shard
#

then it worked. now go to "your project folder/target/" and you will have a file called "YourPluginName-1.0.0.jar" or sth

#

use that

fresh timber
#

oh ok

#

what do I do in that

tender shard
#

you copy that to your server and restart the server

#

and then it should work

fresh timber
#

oh so I dont use the out/artifacts one

tender shard
#

nope

#

you use the file in the "target" folder

fresh timber
#

ok well now I have 2

tender shard
#

how are they called?

fresh timber
tender shard
#

in 99% of cases, the top one is the correct one

fresh timber
#

ok

#

ill take the 1%

tender shard
#

the "original-..." one is without the shaded stuff, so it wouldnt work

fresh timber
#

k xD

tender shard
#

:3

#

the "original" one is basically what intelliJ would have made itself

#

while the other one includes all those nice additional maven things lol

fresh timber
#

bro microsoft teams wont let me upload it

tender shard
#

no idea

#

I cannot help with that

fresh timber
#

xD lol

#

k

torn oyster
#

how would i find the closest place inside the world border?

tender shard
#

a math question D:

#

basically you can just check if currentX > worldBorderX, if yes, set currentX to worldBorderX

#

same for Z

#

and then you go

#

or ofc < if you're below 0,0

#

I might be wrong but I think this should work

#

e.g. if your worldboarder is set to 50, and your current X is 60 and current Z is 40, then the closest point should be 50|40 I guess

#

I might also be completely wrong

fresh timber
#

I have another error

#

@tender shard

#

hello?

#

@tender shard can you help me make it work?

viscid ember
#

still hitting him just to update you

#

also thanks guys i didnt see that part of the entity.damage

tender shard
fresh timber
#

;-;

tender shard
fresh timber
#

k well can u help?

#

or no

tender shard
viscid ember
#

have you tried googling your problem?

fresh timber
#

nah

viscid ember
#

try that

fresh timber
#

nah

viscid ember
#

that looks like a very googleable question

tender shard
#

bunnygirlkiss ❤️

fresh timber
#

nah

viscid ember
#

i just invented a work

#

"googleable"

tender shard
fresh timber
tender shard
#

anyway, it looks you do so some method like this

@Default
public void myCommand(CommandSender sender, Command command, String alias, String[] args)
#

while obviously this wont work in ACF

#

whats line 30 of your main class?

fresh timber
#

hm

#

k

tender shard
#

it's probably where you do registerCommand(...)

fresh timber
#

acf.registerCommand(new GMC());

tender shard
#

yeah show your GMC class

#

?paste it pls

undone axleBOT
fresh timber
tawdry python
#

How do I bypass task code? resetting task time?

tawdry python
#
public void run() {
                    if (Main.fortune.isEmpty() && Main.efficiency.isEmpty()){
                        Bukkit.getConsoleSender().sendMessage("§cEmpty");
                          //Bypass task code and reset task time
                        return;
                    }
                    Main.fortune.forEach((key, value) -> {
                        PreparedStatement stm = null;
                        try {
                            stm = connection.prepareStatement("INSERT OR REPLACE INTO alphamining (playeruuid, efficiency, fortune) VALUES(?, ?, ?);");
                            stm.setString(1, key.toString());
                            stm.setInt(2, Main.efficiency.get((UUID) key));
                            stm.setInt(3, value);
                           i.getAndIncrement();
                        } catch (SQLException e) {
                            Bukkit.getConsoleSender().sendMessage("§cError to player " + key.toString());
                            e.printStackTrace();
                        }
                    });
                    Bukkit.getConsoleSender().sendMessage("§aSave §f" + i + " §ajogadores");
                }
            }).runTaskTimerAsynchronously(Main.instance, 0L, 18000L);
#

I try return, but dont work

tender shard
#
@Default
public void onCommand(Player player) {
  ...
}
#

you dont need any Command object, ACF doesnt use those

#

and the other stuff is also not needed

fresh timber
#

ah ok

tender shard
#

and you forgot to @CommandAlias your whole class

#

you should have @CommandAlias("gmc") at the top of your class

fresh timber
#

do I need that

tender shard
#

yes, it tells ACF the name of that command

fresh timber
#

ah ok

tender shard
#

ACF only works with annotations, it doesnt need anything in plugin.yml etc

#

you can also get rid of your permissions check by just doing @CommandPermission("coolplugin.command")

fresh timber
#

k

#

tysmj

#

tysm*

tender shard
#

np

#

you can basically reduce all this stuff to this:

fresh timber
#

ok

tender shard
#

and that's why ACF is so much better than spigot commands 😄

#

you don't have to check if a player is a player, you don't have to care about permissions, you dont have to care about what they entered as args, you can just let ACF handle all this

#

oh and ofc you can also ignore all the "commands: ..." thing in plugin.yml, also not needed anymore now

fresh timber
#

oh ok

#

do I delete that?

subtle folio
#

Am I just too smart? p.openInventory(p.getInventory());

untold jewel
fresh timber
#

im using player.getMaxHealth() and im getting a warning... is there anything wrong with using that?

quaint mantle
#

how would i "throw" a armor stand

fresh timber
#

uhh

quaint mantle
#

aka set the velocity to where the eye of the player is?

tawdry python
# untold jewel what is the problem?

I have a task and I want that when a condition is true, it doesn't execute the code but resets the task's time and only executes when the condition is false, I use task.cancel(), is that it?

untold jewel
#

Well you could make a boolean function and then decide when to return true or false

buoyant viper
quaint mantle
#

how would i teleport an armor stand beside the player?

#

at any yaw

vagrant stratus
#
    @Override
    public void show(Player player, World world, double x, double z, double size) {
        WorldBorder worldBorder = new WorldBorder();
        worldBorder.world = ((CraftWorld) world).getHandle();
        worldBorder.setCenter(x, z);
        worldBorder.setSize(size);
        worldBorder.setDamageAmount(0);
        worldBorder.setWarningDistance(0);
        ((CraftPlayer) player).getHandle().b.sendPacket(new ClientboundInitializeBorderPacket(worldBorder));
    }

    @Override
    public void hide(Player player, World world) {
        WorldBorder worldBorder = new WorldBorder();
        worldBorder.world = ((CraftWorld) world).getHandle();
        ((CraftPlayer) player).getHandle().b.sendPacket(new ClientboundSetBorderLerpSizePacket(worldBorder));
    }

Is there a way to do this in 1.19+ w/o needing packets?

tender shard
#

the worldborder thing? yes

#

that was added recently

#

there is now a "per player" worldborder api

#

I think it was added in 1.19 or 1.18

#

player.sendWorldBorder or sth like that @vagrant stratus

worldly ingot
#

Courtesy of yours truly Sunglasses

vagrant stratus
#

Fuck yea, I can actually update this plugin and post it lmao

untold jewel
#

Anyone here knows about BuildTools and NMS 1.19.2

worldly ingot
#

Bukkit#createWorldBorder(), edit it to your liking, then yeah, Player#setWorldBorder()

vagrant stratus
#

thanks for helping me take over the world @worldly ingot

#

lmao

tender shard
#

?paste

undone axleBOT
tender shard
#

you can paste it here ^

tawdry python
#

Hello, I wanted to cache 3 values ​​(player, a, b) but as ArrayList only supports 2 values, I did:
ArrayList<player,a> and ArrayList<player,b> is there an easier and more practical way to do this?

untold jewel
tender shard
#

e.g. you can create an ArrayList<UUID,Pair<FirstClass,SecondClass>>

untold jewel
# tender shard post the full error you got

This when I run buildtools
[WARNING] The requested profile "remapped" could not be activated because it does not exist

and this when I reload my dependency Unresolved dependency: 'org.spigotmc:spigot🫙1.19.2-R0.1-SNAPSHOT'

tender shard
untold jewel
#

It is the FULL error

vagrant stratus
#

Also no @untold jewel I'm not.
Learning Ukrainian though

untold jewel
#

so why would you have that in your discord bio

tender shard
vagrant stratus
#

Because I support Ukraine, duh

untold jewel
#

oh yeah duh u support them from behind the screen lmao

tender shard
#

it should at least have a ton of output that looks like this

untold jewel
#

just give me a second

tender shard
#

sure

vagrant stratus
#

How do I replicate the worldBorder.world = ((CraftWorld) world).getHandle(); part @worldly ingot ?
This is per-world lol

vagrant stratus
tender shard
#

you shouldnt do that

#

why would you want to use NMS

vagrant stratus
#
        @Override
    public void show(Player player, World world, double x, double z, double size) {
        WorldBorder worldBorder = new WorldBorder();
        worldBorder.world = ((CraftWorld) world).getHandle();
        worldBorder.setCenter(x, z);
        worldBorder.setSize(size);
        worldBorder.setDamageAmount(0);
        worldBorder.setWarningDistance(0);
#

I'm trying to get rid of NMS, but the API doesn't support the full functionality lmao

#

import net.minecraft.server.v1_10_R1.WorldBorder;
1.10 for example imports this

tender shard
#

this is usually all you need

untold jewel
worldly ingot
#

Worlds aren't at all relevant for client-sided world borders

#

Because it applies to whatever world the player is in

tender shard
vagrant stratus
#

Yes, I know this

#

I was showing the plugins code while asking how to replicate lmao

tender shard
vagrant stratus
#

Oh hey look, the reason I send the import

tawdry python
vagrant stratus
#

I'm updating a plugin to 1.19, hence the original question lmao

tender shard
vagrant stratus
#
        WorldBorder worldBorder = new WorldBorder();
        worldBorder.world = ((CraftWorld) world).getHandle();
        PacketPlayOutWorldBorder packetPlayOutWorldBorder = new PacketPlayOutWorldBorder(worldBorder, PacketPlayOutWorldBorder.EnumWorldBorderAction.LERP_SIZE);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutWorldBorder);

player.setWorldBorder(world.getWorldBorder()) Ig would be the replacement?

tender shard
vagrant stratus
#

Yes. I'm aware.

#

mfn, maybe you need sleep

worldly ingot
#

No it will fail. You just update the world border you create

#

Hold reference to it

tender shard
vagrant stratus
#
    /*
    @Override
    public void hide(Player player, World world) {
        WorldBorder worldBorder = new WorldBorder();
        worldBorder.world = ((CraftWorld) world).getHandle();
        PacketPlayOutWorldBorder packetPlayOutWorldBorder = new PacketPlayOutWorldBorder(worldBorder, PacketPlayOutWorldBorder.EnumWorldBorderAction.LERP_SIZE);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutWorldBorder);
    }
     */
#

The original question was if NMS had an API impl in 1.19+ @tender shard

#

So I could ya know, get rid of all this stupid NMS shit

worldly ingot
#
WorldBorder border = Bukkit.createWorldBorder();
player.setWorldBorder(border);

// then somewhere else
player.getWorldBorder().setSize(100, 100, 10);```
#

or whatever the methods are

vagrant stratus
#

Yea, I know that lmao

tender shard
worldly ingot
#

You can edit that WorldBorder as much as you'd like. It will update all players that have it set

vagrant stratus
#

This is specifically for "hiding" it, not showing it.
so ig using the worlds own border is good enough

worldly ingot
#

To hide it, set it to null

#

It will throw an exception if you set it to the world's world border iirc

vagrant stratus
#

ah

#
public class Border {

    public void show(Player player, World world, double x, double z, double size) {
        WorldBorder worldBorder = Bukkit.createWorldBorder();
        worldBorder.setCenter(x, z);
        worldBorder.setSize(size);
        worldBorder.setDamageAmount(0);
        worldBorder.setWarningDistance(0);
        player.setWorldBorder(worldBorder);
    }

    public void hide(Player player, World world) {
        player.setWorldBorder(null);
    }
}

oh hey look, more maintainable code base

worldly ingot
vagrant stratus
#

Now to finish the code clean up and then release this fork lmao

subtle folio
#

Are uuid's serializeable?

worldly ingot
#

I want to say yes?

#

Unless you mean YAML, in which case no

subtle folio
#

JSON

worldly ingot
#

Well, you can just stringify it

subtle folio
#

well yes but like

#

ain't no one got time for UUID.valueOf

worldly ingot
#

fromString() ;p

subtle folio
#

same diff

remote swallow
#

what would be the best method to get all args after the first 2

subtle folio
#

;p

vagrant stratus
#

reee uses dynmap and shit

worldly ingot
subtle folio
worldly ingot
#
StringJoiner message = new StringJoiner(" ");
for (int i = 2; i < args.length; i++) {
    message.append(args[i]); // It might not actually be append(). It might be add()
}```
worldly ingot
#

Joiner puts the spaces in there for you automatically and you don't have to deal with trailing/leading whitespace lol

subtle folio
#

too hip for me

#

I'll do it the old fasion way

#

sb.append(args[i]).append(" ");

worldly ingot
#

Oh I thought you were gonna do

String message = "";
if (args.length > 2) {
    message += args[2] + " ";
}
if (args.length > 3) {
    message += args[3] + " ";
}
if (args.length > 4) {
    message += args[4] + " ";
}
if (args.length > 5) {
    message += args[5] + " ";
}
// etc...```
subtle folio
#

LOL

worldly ingot
#

THAT'S the old fashion way Sunglasses

subtle folio
#

Thats the soft brain way

#

I feel like args[args.length-1] unti it == 0 is the most based approach

tender shard
subtle folio
#

then reverse the list

tender shard
#

you gotta do that yourself

subtle folio
#

why

#

fix it

tender shard
#

UUID.toString() and UUID.fromString

subtle folio
#

jkjk ty

tender shard
#

it's because UUIDs are part of normal java

subtle folio
#

can you pr to java

tender shard
#

probably not to the oracle one lol

subtle folio
#

or do i need to send them a strongly worded letter

tender shard
#

this

#

well they ofc implement Seriazable.

subtle folio
#

wait gson is included in spigot?!

tender shard
#

but spigot has their own ConfigurationSerializable interface

#

sooo

subtle folio
tender shard
subtle folio
#

not yaml

tender shard
#

oh ok

#

then you can just go for it

subtle folio
#

based bet

tender shard
#

gson should handle it just fine

#

wtf today I talked to people about what "based" and what "Bet" means

#

and now you use both in the same sentence

subtle folio
#

LOL

#

you had to talk about how based it is to use the word bettt?

#

betttttttt

tender shard
subtle folio
#

How is that "based"

#

bc its based

#

based reply tbh

tender shard
#

I'm based

subtle folio
#

no

#

you're base10

tender shard
#

oooh you bet I am

subtle folio
tender shard
#

YOUR MUM'S BASED

subtle folio
#

mom*

#

atleast insult me the amurican way

tender shard
#

iirc both spellings are fine. but what do I know about the english language ¯_(ツ)_/¯

#

nuhthing

subtle folio
#

as a man who's both dyslexic and cant spell, your mum is improper form

#

bc its not masculine

#

or plural

tender shard
#

hm well

#

last time I checked, my mom was neither masculine nor plural as well lol

subtle folio
#

but mine is GIGACHAD

tender shard
#

and that's why I love her ❤️

subtle folio
#

based

tender shard
#

lol best conversation today

subtle folio
#

honestly lmao

#

Am I able to make my own Logger

#

i dont like the bukkit one

#

or would I have to make my own fork

tender shard
#

but yeah anyway, haha. UUIDs should work fine when tossed into Gson

tender shard
#

you can even replace the original one

subtle folio
#

I CAN

worldly ingot
#

I mean you can create a new Logger instance if you want via the LoggerFactory

subtle folio
#

LES GO

worldly ingot
#

But I don't know why you would want to

subtle folio
#

How do i replace the original one

subtle folio
#

i wanna put color Troll

worldly ingot
#

Your plugin's logger is associated with your plugin, and it should stay that way

tender shard
#

there are 2 ways:

worldly ingot
#

pls God no

#

No colour in the console

subtle folio
#

we need some hot pink

#

and deep deep orange

worldly ingot
#

Plugin authors that do that should be crucified

subtle folio
#

guess im the next jesus Troll

#

did you see what luck perms did with their loading message

#

its mfing massive

tender shard
#
  1. Completely replace the original bukkit logger, and every plugin ones, with reflection (bad idea)
  2. attach a custom filter to your own logger or to the bukkit one, while ignoring other plugins (better idea, but still not a very good idea)
#

in fact you should not change bukkit's original logger at all

#

I mean why would you want to change it?

subtle folio
subtle folio
tender shard
#

uuugh

#

color in logs?

#

bad idea

#

admins will hate it

subtle folio
#

I am the admin

#

and the dev

#

and the owner

tender shard
#

yeah okay if you only do it for yourself, then go for it

subtle folio
#

i hate myself already its fineeeee

#

time to learn more reflection

#

all I can do is unprivate fields lol

tender shard
#

just setAccessible(true) them, and yuo are free to change their values to whatever you want

fresh timber
#

mfnalex I am using the acf cmds now and I have some problems, I have a cmd that I need it to stop at a certain point in the code if an if statement is true and I can no longer do that cus there is no return true; with acf so how do I do that?

tender shard
#

you can even replace the whole Bukkit.getServer() object

subtle folio
#

mess with every plugin

tender shard
#
        Class bukkitClazz = Bukkit.class;
        Field serverField = bukkitClazz.getDeclaredField("server");
        serverField.setAccessible(true);
        serverField.set(null, myNewBukkitServerObject);
#

no problem

#

but very stupid

fresh timber
#

can u help me?

tender shard
#

just do return;

#

instead of return false;

fresh timber
#

oh

#

will that stop it

tender shard
#

ofc

fresh timber
#

oh ok

subtle folio
#

return will actually make it stop

#

believe it or not

vagrant stratus
#

Feels nice to get rid of XSeries classes too lmao

tender shard
#

oh yeah

#

XSeries is a pain

#

I mean it's great

#

but who tf still supports 1.8 haha

subtle folio
#

i love xseries wdym

#

me!?!

vagrant stratus
#

I'm getting rid of it because I support latest version only, don't need it lol

subtle folio
#

are you making your own fork

vagrant stratus
#

Ye

subtle folio
#

y

vagrant stratus
#

The plugin I'm forking supports up to 1.17 and not higher because nms lmao

tender shard
#

I only go for 1.16+ when I do plugins and that's basically 95% of people who buy anything on spigot

vagrant stratus
#

I have a plugin on spigot that uses NMS as is, it's dead specifically because I don't want to touch nms lol

subtle folio
#

What are the main things ppl use NMS for

tender shard
#

NMS is indeed a huge pain but it got way better since 1.17

tender shard
subtle folio
worldly ingot
#

Things they're too lazy to PR API to Bukkit

vagrant stratus
#

The plugin uses pathfinding & custom entities lol

tender shard
worldly ingot
#

Spigot can send action bar messages

subtle folio
vagrant stratus
#

outdated versions

worldly ingot
#

I'd send my messages quicker but my internet is so shit that they literally send 30 seconds after I press enter

tender shard
#

I thought you asked about why OTHER people use NMS

subtle folio
#

.-.

subtle folio
#

I dont wanna make verisoned files

#

1.19-RO 1.19.1-RO

#

such a pain

tender shard
#

I use NMS for stuff like... sending toast messages, or send totem animations per player, ... stuff like that

subtle folio
#

make your own api

worldly ingot
#

(you can send totem animations too I believe)

#

It's an effect iirc

tender shard
#

we talked about this a few months ago

subtle folio
#

why wouldn't you be able to send them to only a player

#

do you mean only the player able to see it and not any spectators?

tender shard
#

idk but I tried it in 1.18 I think and there, every player could see it

subtle folio
#

oh lol

vagrant stratus
# vagrant stratus https://www.spigotmc.org/resources/better-mob-mechanics.81086/
import net.minecraft.world.entity.EntityInsentient;
import net.minecraft.world.entity.ai.goal.PathfinderGoal;
import net.minecraft.world.entity.ai.goal.PathfinderGoalLookAtPlayer;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomLookaround;
import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomStrollLand;
import net.minecraft.world.entity.ai.goal.PathfinderGoalSelector;
import net.minecraft.world.entity.monster.EntityGiantZombie;
import net.minecraft.world.entity.monster.EntityMonster;
import net.minecraft.world.entity.player.EntityHuman;

pain

subtle folio
#

then u need nms

subtle folio
worldly ingot
#

I literally can't even load a website to check whether or not I'm correct

subtle folio
#

n e v e r

worldly ingot
#

This is pathetic lol

tender shard
#

it includes all the NMS code I ever wrote lol

vagrant stratus
#

choco gib pathfinding & customentity api plz

tender shard
#

JeffLib has a pathfinding api 😛

vagrant stratus
#

ew no

tender shard
#

yes

subtle folio
#

and litterally do nothing helpful

#

🆒

vagrant stratus
#

removing XMaterial might of been a mistake

subtle folio
#

LOL

worldly ingot
subtle folio
#

XMaterial is the goat

worldly ingot
#

Player#playEffect() should support it

vagrant stratus
subtle folio
#

yes bruh

#

love Xmaterial

tender shard
#

I might be wrong though

#

I am wrong very often

#

I am very good in being wrong

vagrant stratus
#

most are now gone lol

worldly ingot
#

Looks like EntityEffect isn't even used anywhere

#

You can't send them. Unless I'm blind

tender shard
#

huh

#

that's weird lol

vagrant stratus
#

useless api that should be removed then????

tender shard
#

haha I love spigot sometimes

worldly ingot
#

No, just needs to have a way to send 'em

vagrant stratus
#

send them then lol

tender shard
vagrant stratus
#

as expected

tender shard
#

no

#

String

#

String success = "nope";

raw sky
tender shard
vagrant stratus
#

Hey @worldly ingot if I create a program that removes all legacy code and updates it to be modern, do you think md would finally kill off backwards compat?

worldly ingot
#

getVehicleConfig(fileName).getString(slot) is returning null

vagrant stratus
#

fuck

#

I'll do it anyways just re-up everything ever lmao

#

also ooo no more errors, nice

#

now that I think about it, I wonder what it would take for him to remove it all 🤔

fresh timber
#

mfnalex I did all of this and I got the new commands and the one goal I had was to make it not case sensitive and it's still case sensitive

tender shard
fresh timber
#

literally did nothing

tender shard
#

there is, as of today, not any proper alternative buitin to spigot to have configurable messages except "&cYeah This Is Red"

vagrant stratus
#

Material, old api, etc, etc, etc

#

doubt it'll all be removed

tender shard
#

I bet 50€ that "&cred text" will still work with regular spigot in 5 years

#

I mean what would it be replaced with?

#

json messages? probably not, they are too nasty for normal admins

#

minimessage would be a good idea but paper features never got any upstream PRs

fresh timber
#

so is there a way to make it not case sensitive with these now mfnalex?

tender shard
#

sorry but I also have a live, I cannot always reply to anyone here just because I tried to help before

fresh timber
#

hm

#

u have a live?

#

k

tender shard
#

Yes, it's not nice to always ask specifically me. There are many people here who can help 🙂

fresh timber
#

yea well u were helping me didnt expect u to quit

#

so is there anyone that wants to help me make my commands not case sensitive

tender shard
#

it's totally fine, just ask your question without mentioning me the whole time. If the AsyncPlayerChatEvent didnt work, then maybe try to listen to the PlayerCommandPreprocessEvent instead and change the message there

#

I have no idea whether this will work

#

it might work, but I cannot promise it lol

fresh timber
#

I didnt use asyncplayerchatevent

tender shard
#

huh but that's what I suggested earlier

fresh timber
#

I thought u said that if I got this acf it would not be case sensitive

tender shard
#

ooooh no

fresh timber
#

;-;

#

ok

tender shard
#

I think we had a misunderstanding

fresh timber
#

ima use preprocess event so I dont have to see if the first character is /

tender shard
#

or maybe I expressed myself not good enough

fresh timber
#

k

#

well this still helps

#

its better than what I was doing

tender shard
fresh timber
#

k

tender shard
#

the PlayerCommandPreprocessEvent should work fine for your usecases

#

I just read the docs and they say that changes to the message get "respected" by the server before trying to execute anything

#

so yeah, it should work

fresh timber
#

k

#

This should work, right... event.getMessage().toLowerCase();

tender shard
#

no

#

you also have to set it back

fresh timber
#

;-;

#

lol

tender shard
#

and you shouldnt lowercase the whole message

#

only the first word

fresh timber
#

hm

#

why not the args too?

tender shard
#

otherwise itd fuck up stuff like /msg etc

fresh timber
#

oh ig if ur doing like a /msg

#

yea

#

so...

#

what do I do

tender shard
#

sth like this would do

    @EventHandler
    public void onCommand(AsyncPlayerChatEvent event) {
        String message = event.getMessage();
        if(!message.startsWith("/")) return;
        String split[] = message.split(" ");
        split[0] = split[0].toLowerCase();
        event.setMessage(String.join(" ", split));
    }

You only gotta switch to the other event and remove the "startsWith("/")" part

#

that's what I sent you 2 hours ago or so

#

or 4 hours, idk lol

fresh timber
#

lmao

tender shard
#

wow I was really a bit stupid like 4 years ago haha

steady rivet
#

how would I go about using PlayerInteractEvent to listen for if a player right click, holds it, and then also clicks left click

#

Would I need to have a Map containing the data for a few seconds or could I do it in the method itself

worldly ingot
#

There are some that will use it thinking it just fixes NPEs

vagrant stratus
#

Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project LoginSecurity: Error creating shaded jar: Problem shading JAR LoginSecurity\target\LoginSecurity-3.3.jar entry com/lenis0012/bukkit/loginsecurity/commands/CommandAdmin.class: java.lang.IllegalArgumentException: Unsupported class file major version 60

nice. Not a damn clue why that doesn't compile if I bump the java version up lmao

#

Said class is even in the project that's being compiled, like bruh

remote swallow
#

whats the @SupressWarning for something might not be initialized. Or is this an intellij thing that theres a setting for

drowsy helm
#

if statement

quaint mantle
#

How would i "throw" an armor stand

#

Aka set the velocity to the players eye

#

Im not smart, i set it to the location of the players eye but doesn't move, because its already there

warm light
#

is it possible to change plugin version onLoad?

quaint mantle
warm light
#

I mean is it possible to change with code?

torn oyster
quaint mantle
#

^

drowsy helm
#

why would you want to do that

civic wind
steady rivet
civic wind
#

Yeah, check for itemstack, check to make sure its not null or air and then check for action, left click air, block, right click air block

#

What do you mean by holds it?

civic wind
hoary sierra
#

trying to make it so my gui lists the options in the order i did in a yaml but its ordering it alphabetically, can anyone help?

#

i figured out why its alphabetical

#

its cuz of the arraylist

#

its cuz of collections.sort()

#

but how do i sort it in a custom way?

#

rather than alphabetical

chrome beacon
#

Give it a comparator

#

(Second param)

kind hatch
#

If you are putting the config items in a list, it should preserve the order. If you perform any other form of sorting on it, the default approach is to use the natural ordering, which in most cases is alphabetical. If you want a custom sort, you're gonna have to find certain criteria to compare against. Otherwise, just loop over your config sections and put them in a list.

buoyant viper
hoary sierra
#

when it was removed it became randomly ordered

hoary sierra
#

not too experienced at this stuff

shadow zinc
#

I'm using the callback result to complete a future

#

however, I am not getting the results intended

#

Just wondering if anyone can see what I did wrong

desert loom
#

then make a new instance of it and pass it to the sort method.

or, you can use a lambda instead. Like so list.sort((o1,o2) -> /*code*/);

green prism
#

Guys, I have a HashBasedTable with these values: Int priority, UUID player, String server.

How do you think I can make it so that when a player exits the queue, all the priority numbers scale? Do I have to do a foreach? Is there any easier way?

torn oyster
#

is anyone able to give me some feedback on my Minigame library? i'm thinking about improving it, but i don't know where to start

echo basalt
#

HashBasedTable is not the ideal structure

green prism
kindred valley
#

?paste

undone axleBOT
kindred valley
green prism
green prism
#

then ItemStack stack = new ItemStack(Material.{youritemsadderMaterial});
and stackMeta.setCustomModelData({YourValue})

echo basalt
#

A LinkedList would be better for queues

#

I guess you could use a linked map if you want a queue per server

echo basalt
#

But I don't really see the need as you'd put like a Map<String, List<ConnectionInfo>>

#

Basically each server needs to have a Queue<ConnectionInfo>

#

where ConnectionInfo is a data object {playerId, targetServer}

#

A Queue can either be like a PriorityQueue or a LinkedList

green prism
#

I'm doing this;
```java
for(String server : ProxyServer.getInstance().getServers().keySet()) {

        if(!plugin.getManager().getQueues().containsKey(server)) {
            return;
        }```
echo basalt
#

or some other impl

green prism
#

using LinkedHashmap

echo basalt
#

ehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

return on a for loop lol

green prism
#

obv

echo basalt
#

continue

green prism
#

ouch

echo basalt
#

otherwise you gonna brick your code

green prism
#

thank you

#

I just understood what you mean, if there are multiple players for different servers, I can't do in the same hash as I couldn't get the priority

#

I would need an Hashmap<String, LinkedList<ServerInfo>>

echo basalt
#

ehh no

#

Map<ServerInfo, Queue<ConnectionInfo>>

green prism
echo basalt
#

fancy list

dim palm
#

Hi, i wanna create a queue to my bases plugin so it doesn't build while queue is more than X number

green prism
dim palm
green prism
kindred valley
#

out of topic but

green prism
#

do I need a one for each server?

kindred valley
#

@green prism Thank you so much. I handled it 🧡

smoky oak
#

does this work?

if(!(object instanceof Player player)) return;
Player.sendMessage("Found you");
hazy parrot
#

Just player instead of Player

#

And assuming object can be instance of Player

smoky oak
#

i assumed the scope might be limited to the {} of the if

hazy parrot
#

Oh, I didn't notice that, might be the case

#

?tryandsee

undone axleBOT
chrome beacon
tardy delta
#

Does it?

#

Afaik not

green prism
green prism
lost matrix
#

Get the CommandManager and register a new BaseCommand

#

There is actually a documentation for that

green prism
#
#

but it is not working

lost matrix
#

You did not create a BukkitCommandManager

green prism
#

what\

chrome beacon
lost matrix
# green prism what\
  @Override
  public void onEnable() {
    BukkitCommandManager commandManager = new BukkitCommandManager(this);
    commandManager.registerCommand(new YourBaseCommand());
  }
green prism
#

hum

lost matrix
#

Just like in the documentation

green prism
#

So it should work now?

lost matrix
green prism
#

BungeeCommandManager bungeeCommandManager = new BungeeCommandManager(this);
bungeeCommandManager.registerCommand(new QueueCommand(this));

lost matrix
#

Are you writing a BungeeCord plugin?

floral drum
#

clean code is the best code

green prism
lost matrix
#

Then this works

green prism
#

workkkSSSSSSS finally!!!!

#

thank you

floral drum
green prism
#

?paste

undone axleBOT
green prism
#

Runnable isnt starting?
https://paste.md-5.net/avihexajox.cpp

@Override
 public void onEnable() {
     adventure = BungeeAudiences.create(this);
     this.manager = new Manager();
     new JoinTask(this);
     new QuitListener(this);
     BungeeCommandManager bungeeCommandManager = new BungeeCommandManager(this);
     bungeeCommandManager.registerCommand(new QueueCommand(this));
 }```
#

help?

quaint mantle
#

What is the best anti vpn plugin? Is there any premium one?

lost matrix
quaint mantle
lost matrix
#

Nope

green prism
quaint mantle
#

Thank you!

lost matrix
lost matrix
#

Just creating an instance of a Runnable doesnt do anything.
You need to schedule the runnable.

queen niche
green prism
lost matrix
queen niche
floral drum
lost matrix
green prism
#

yes

#

oh wait

#

my bad

#

just one time

lost matrix
lost matrix
#

Same for getOnline

#

Because you dont wait for the ping to come through

green prism
#

what should I do

floral drum
green prism
lost matrix
#

If you can spare the overhead of the ping then you can simply use a Lock

floral drum
#

owo

#

hi smile

#

how are you

lost matrix
#

hi

#

im good

floral drum
#

that is good

#

we are gigachad because we are boosting

#

look at these non-boosters

#

so cringe

lost matrix
#

ok?

green prism
#

Smile

#

However, the JoinTask println print once

lost matrix
#

Here is the blocking fix

    public int getMaxPlayers(String server) {
        AtomicInteger max = new AtomicInteger(-1);
        CountDownLatch latch = new CountDownLatch(1);
        ProxyServer.getInstance().getServerInfo(server).ping(((result, error) -> {
            if(error == null) {
                max.set(result.getPlayers().getMax());
            }
            latch.countDown();
        }));
        latch.await();
        return max.get();
    }
kindred valley
#

whats the normal minecraft sound float?

lost matrix
lost matrix
green prism
lost matrix
floral drum
#

wouldn’t that freeze the main thread until it’s done unless ran async?

#

I’ve never seen countdownlatch before

ivory sleet
#

Bungeecord doesnt have a strong notion of a main thread

floral drum
#

alr cool

lost matrix
#

Yes this freezes the current thread. But Bungeecord is multithreaded

floral drum
#

fairs

lost matrix
#

Still not a preferable approach. Delegating the callback is cleaner. More reactive.

queen niche
ivory sleet
#

CountDownLatch is a class that has a countdown, any thread that isnt awaiting it through await() can count its countdown down, once the countdown hits 0 all awaiting threads get released

#

@floral drum

queen niche
#

I already did

lost matrix
ivory sleet
#

Latch here is better Id say

lost matrix
ivory sleet
#

Since you’re never really using the reentrant mechanics from RLock anyway

queen niche
kindred valley
#

Does an item's pdc pass when we put it as a block

lost matrix
#

Also not every Block has a pdc. Only TileStates

ivory sleet
lost matrix
#

But be careful with that. The size of a chunk file is quite limited so storing data for too many blocks is not advisable.

ivory sleet
#

Is it?

#

Thought that was fixed

#

Maybe not

lost matrix
#

People are even able to softlock chunks with data loaded chests and signs

floral drum
#

love you smile, but only if you’re 18+

#

Hi conclure ❤️

lost matrix
#

purple you alright?

floral drum
#

nah

#

tired asf

hybrid spoke
#

smile is 14

ivory sleet
lost matrix
#

no u

floral drum
#

ah okay

hybrid spoke
#

im 15 PepoRage

floral drum
#

damn

#

child!

hybrid spoke
#

hey hey hey thats racist

floral drum
#

sorry father :sob

lost matrix
floral drum
#

fuck emoji fail

lost matrix
floral drum
green prism
#

@lost matrix it doesn't work.
It repeat once and doesn't loop at all

lost matrix
green prism
#

can't find nothing useful on the world wide web

lost matrix
#

?jd-b

#

Huh?

#

?jd

lost matrix
#

There you go. You are missing a second long value.
Given those methods are named a bit stupidly.

floral drum
#

yea they should be deprecated and renamed no cap

#

scheduleRepeating/scheduleLater

lost matrix
floral drum
#

pop off king

lost matrix
floral drum
#

smart

civic wind
#

Smile is hella smart

scarlet creek
#

I’m trying to make it easier for me to send messages to players without having to type out chatColor and any repeated words but I keep getting this error and I am not sure why

torn oyster
#
@EventHandler
    public void onMove(PlayerMoveEvent e) {
        Player p = e.getPlayer();

        if (isOutsideOfBorder(e.getTo())) {
            p.sendMessage(ChatColor.RED + "You may not go past the world border!");
            e.setTo(closestPlaceWithinBorder(e.getTo()));
        }
    }

    public Location closestPlaceWithinBorder(Location loc) {
        Location finalLoc = loc.clone();
        double size = Objects.requireNonNull(loc.getWorld()).getWorldBorder().getSize();
        if (loc.getX() >= size / 2) {
            finalLoc.setX((size / 2) + 1);
        } else if (loc.getX() <= (size / 2) * -1) {
            finalLoc.setX(((size / 2) * -1) - 1);
        }
        if (loc.getZ() >= size / 2) {
            finalLoc.setZ((size / 2) + 1);
        } else if (loc.getZ() <= (size / 2) * -1) {
            finalLoc.setZ(((size / 2) * -1) - 1);
        }
        finalLoc.setY(finalLoc.getWorld().getHighestBlockYAt(finalLoc) + 1);
        return finalLoc;
    }

    public boolean isOutsideOfBorder(Location loc) {
        WorldBorder border = Objects.requireNonNull(loc.getWorld()).getWorldBorder();
        double size = border.getSize()/2;
        Location center = border.getCenter();
        double x = loc.getX() - center.getX(), z = loc.getZ() - center.getZ();
        return ((x > size || (-x) > size) || (z > size || (-z) > size));
    }```
#

this only works like 1% of the time

#

the rest it does nothing

#

can anyone help?

#

no errors

scarlet creek
civic wind
#

If the quantum nexus conjoined to the intergalactic force which would then form a metric spacer then the earth would spin 20000x slower and africa would be iceland

lost matrix
torn oyster
#

use dependency injection or make a static get() method

green prism
#

@lost matrix getMaxPlayers() seems to freeze the cycle

floral drum
#

L

#

or just use JavaPlugin#getPlugin

#

no kyap

floral drum
#

if it’s a util class

lost matrix
floral drum
#

?jd

green prism
# lost matrix Yes because it has to wait for the ping every time. Its gonna take a bit. But it...
   @Override
    public void run() {
        for(String server : plugin.getManager().getQueues().keySet()) {
            LinkedList<ProxiedPlayer> queue = plugin.getManager().getQueues().get(server);
            for(ProxiedPlayer player : queue) {
                Audience audience = plugin.adventure().player(player);
                audience.sendActionBar(MiniMessage.miniMessage().deserialize("<gradient:#00C63D:#4EFF00:-0.1>You are in position " + queue.indexOf(player)+1 + " in the queue for " + server));
            }
            int maxPlayers = getMaxPlayers(server);
            int onlinePlayers = getOnline(server);
            if(onlinePlayers < maxPlayers) {
                if (!queue.isEmpty()) {
                    ProxiedPlayer player = queue.getFirst();
                    Audience audience = plugin.adventure().player(player);
                    audience.sendMessage(MiniMessage.miniMessage().deserialize("<gradient:#00C63D:#4EFF00:-0.1>You are being connected to " + server));
                    player.connect(ProxyServer.getInstance().getServerInfo(server));
                    queue.remove(player);
                    plugin.getManager().getQueues().put(server, queue);
                }
            }
        }
    }```


It doesn't send the actionbar updated...
#

Should I create a new thread for that?

lost matrix
floral drum
#

goodbye smile, have a good workout sess

torn oyster
#
    public Location closestPlaceWithinBorder(Location loc) {
        Location finalLoc = loc.clone();
        double size = Objects.requireNonNull(loc.getWorld()).getWorldBorder().getSize();
        if (loc.getX() >= size / 2) {
            finalLoc.setX((size / 2) + 1);
        } else if (loc.getX() <= (size / 2) * -1) {
            finalLoc.setX(((size / 2) * -1) - 1);
        }
        if (loc.getZ() >= size / 2) {
            finalLoc.setZ((size / 2) + 1);
        } else if (loc.getZ() <= (size / 2) * -1) {
            finalLoc.setZ(((size / 2) * -1) - 1);
        }
        finalLoc.setY(finalLoc.getWorld().getHighestBlockYAt(finalLoc) + 1);
        return finalLoc;
    }```
#

now this method isn't working

#

specifically

floral drum
#

lemme type something up on my phone for ya

#

oh wait

#

just do e.setTo(e.getFrom())

#

to stop them from getting out

torn oyster
floral drum
#

or what are u doin

#

oh?

torn oyster
#

in this minigame the world shrinks

#

and i used that before

#

and people got out

floral drum
#

hm

torn oyster
#

like u could just idle

#

and it shrinks past u

floral drum
#

ah I see

torn oyster
#

and then from is = to

lost matrix
#

Use a vector approach

iron glade
#

What I used to do some time ago is "push" them back in

torn oyster
#

i mean

#

actually

#

yeah no i don't know that

civic wind
#

If you measure a piece of string and compare it to a piece of wood it will demonstrate how the two galaxies atomic particles fluctuate between nexus systems and photosynthesis then captures the hydrogen molecules and thus creating a zebra

tardy delta
floral drum
#

try that

tardy delta
#

Exceeding my 4g limit aaa

floral drum
#

F

tardy delta
#

Don't even have much

#

Stupid parents

fluid river
#

woke up

#

where are noobs

#

show me

vital ridge
#

how to I add a new section in the config? For example if i have:

#
categories:
#

how can I do this via code:

categories:
  wood:
    amount:
#

Like how can I add the path "wood"

eternal oxide
#

You can;t add empty paths, but you can if you set a value

#

getConfig().set("categories." + materialName + ".amount", value)

vital ridge
#

Thanks, i'll try this.

wintry ibex
#
C:\Users\Nurisantoso\Desktop\DE>gradlew build
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :version-support1_12:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':version-support1_12:compileJava'.
> Could not resolve all files for configuration ':version-support1_12:compileClasspath'.
> Could not find org.spigotmc:spigot:1.12.2-R0.1-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - file:/C:/Users/Nurisantoso/.m2/repository/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - file:/C:/Users/Nurisantoso/.m2/repository/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
       - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/repositories/snapshots/org/spigotmc/spigot/1.12.2-R0.1-SNAPSHOT/spigot-1.12.2-R0.1-SNAPSHOT.pom
     Required by:
         project :version-support1_12

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 5s
3 actionable tasks: 2 executed, 1 up-to-date```
Help
chrome beacon
#

?bt

undone axleBOT
wintry ibex
#

h-how

#

ok

#

already

#

still same

eternal oxide
#

There is no way you just ran buildtools in that time

wintry ibex
#

yesterday ;-;

eternal oxide
#

then run it again

#

build 1.12.2

cold jay
#

Best way to learn java for minecraft plugin development?

eternal oxide
#

?learnjava

undone axleBOT
wintry ibex
#

i need use
java -jar BuildTools.jar --rev 1.12.2
right?

fluid river
vital ridge
fluid river
#

yes

eternal oxide
#

yes

wintry ibex
#

where location i need to run BuildTools

fluid river
#

saveConfig() basically wraps method YamlConfiguration#save(File)

wintry ibex
#

i run it on Desktop location and same thing still happen

eternal oxide
#

buildtools take a few minutes to run

#

You are not running it if you are coming back this fast.

fluid river
eternal oxide
#

It will generate a buildtools log

#

check that if you are getting errors

wintry ibex
#
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Exception in thread "main" java.lang.RuntimeException: Error running command, return status !=0: [C:\Users\Nurisantoso\Desktop\BuildTools\apache-maven-3.6.0/bin/mvn.cmd, -Dbt.name=1573k, clean, install]
    at org.spigotmc.builder.Builder.runProcess0(Builder.java:973)
    at org.spigotmc.builder.Builder.runProcess(Builder.java:904)
    at org.spigotmc.builder.Builder.runMaven(Builder.java:873)
    at org.spigotmc.builder.Builder.main(Builder.java:698)
    at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27```
why is this happened
eternal oxide
#

My guess will be wrong java version

wintry ibex
#

i already use java 8

eternal oxide
#

delete your buildtools folder and start fresh

#

and don;t do it on yoru desktop

wintry ibex
#

and do it where

eternal oxide
#

anywhere you like, just not on teh desktop

wintry ibex
#

ok

fluid river
#

in folder on desktop

#

ez

eternal oxide
#

No

fluid river
#

do it there everytime

#

have no problems

wintry ibex
#

yeah i doin it in folder on desktop

eternal oxide
#

Don;t do it on teh desktop as (if you enable it) OneDrive will prevent buildtools working.

fluid river
#

who turns OneDrive on

eternal oxide
#

Peopel do, we get it in here often

fluid river
#

I basically disable it everywhere i install new windows

vital ridge
wintry ibex
#

i dont turn on OneDrive

iron glade
#

How many times I've seen ElgarL writing teh now is uncountable xD

vital ridge
#

the saveConfig() seems to wipe my default config which i manually wrote out

fluid river
eternal oxide
#

if you manually wrote it you have to load it

wintry ibex
#

teh in indonesia is tea

fluid river
#

if you want to get what's inside the file to YamlConfiguration, you need to use reloadConfig(), which is gonna read file and change YamlConfiguration in heap

cold jay
fluid river
#

too

iron glade
#

Tee in german is tea

cold jay
fluid river
vital ridge
cold jay
fluid river
#

one second

kindred valley
#

after cancelling an event, its not reading the code down below

#

why is it

iron glade
#

which event?

fluid river
eternal oxide
kindred valley
fluid river
#

or run a task which reloads config each 10 seconds or smth

#

or create a /reloadconfig command

eternal oxide
#

You can easily check the last file access time

fluid river
#

so when you modify it manually you get it to your memory

#

getConfig() will return manually modified version after reloadConfig()

#

when you use saveConfig() you overwrite file from YamlConfiguration

iron glade
#

do you have some condition that is never met?

eternal oxide
#

so before making changes in code..java reloadConfig(); // Make changes. saveConfig();

fluid river
#

yeah

#

if you want to add some stuff with code

#

and you manually edited config before

#

do this

#

reload() -> config.set("key", value) -> save()

kindred valley
#

?paste

undone axleBOT
wintry ibex
#

i run it like this right?

eternal oxide
#

and what happens when you run that?

wintry ibex
#

just asking its right or no the command line

eternal oxide
#

you will know if its right when you execute it

wintry ibex
#

ok

iron glade
kindred valley
eternal oxide
iron glade
wintry ibex
eternal oxide
#

ok

kindred valley
iron glade
#

well, is the event cancelled?

kindred valley
#

yes