#help-development

1 messages Β· Page 293 of 1

remote swallow
#

im more tired than i would normally if i would code

#

mightjust sleep tbh

tender shard
#

I am fully awake but I need to pee

#

might as well do it rn

#

bb lol

remote swallow
#

go piss

sterile token
#

For some reason my maven properties are not being replaced from the plugin.yml

eternal oxide
#

you don;t have it set to filter

sterile token
sterile token
eternal oxide
#

it will not parse your files unless you have <filtering>true</filtering> in your resource section

sterile token
#

Wait i think that Elgarl already answered it

tender shard
remote swallow
#

im to tired to code so im going to bed

#

chances i miss some funny chaos? high

tender shard
#

I can ping you when something funny happens if you like

remote swallow
#

if you remember lol

#

i think today i woke up with the most pings ive had from here

#

at 4

sterile token
#

Something funny

sterile token
#

Didnt work

tender shard
#

is your .yml in src/main/resources?

#

do mvn clean package and it should work fine

sterile token
tender shard
sterile token
#

yes

tender shard
#

also did you even define a bot.token property in your pom?

sterile token
#

cannot share full thing, because token is there

tender shard
#

mvn clean package

sterile token
#

ok

#

now yes thanks

tender shard
#

np

#

you should usually always run "mvn clean" after changing anything in your pom

#

if you didnt change the pom, clean is not required in 99.9% of cases

eternal night
#

Is clean required after changing pom.

#

O.o

dusk flicker
#

probably not the best thing but I only run mvn clean package lol

sterile token
#

50 ms = 1 tick right?

remote swallow
#

yeah, when i ran maven i always used mvn clean package

tender shard
tender shard
dusk flicker
#

assuming your tps is 20 yes lol

remote swallow
#

i thought theres like 1000 millis in a second

sterile token
#

Okay something must be incorrect because the time is run every 5 seconds

tender shard
# eternal night Is clean required after changing pom.

but maven saw "oh the plugin.yml with the same timestamp is already in the target folder, no need to do anything". But they now enabled filtering. And yeah, that's why filtering only worked in this case after cleaning

eternal night
remote swallow
#

here

eternal night
#

maven things

sterile token
remote swallow
#

just use seconds

#

its way easier

sterile token
remote swallow
#

dont call .toMillis

sterile token
#

I dont udnerstand ticks conventions

remote swallow
#

20 ticks is 1 second

tender shard
# eternal night maven things

so tl;dr - no, clean is not always required, only in very edge cases. but these are the times where you spend one hour debugging it, so most people just always run clean before package

remote swallow
#

thats pretty much it

sterile token
remote swallow
#

what for

tender shard
#

yes?

#

no wait

#

seconds * 20

#

10 seconds = 10*20 ticks

sterile token
humble tulip
#

?paste

undone axleBOT
humble tulip
sterile token
# humble tulip ?paste
this.task = new BotTask(this);
this.task.runTaskTimerAsynchronously(this, config.getInt("Bot.Update") * 20L, 1);
dusk flicker
#

why not just shade JDA? No idea if this was going previously just it seems like a really weird way to make a discord bot

remote swallow
#

yeah

humble tulip
#

lol ik y'll were gonna say that

remote swallow
#

minion probably

humble tulip
#

i know

tender shard
#

show your pom / build.gradle

humble tulip
#

i'm trying to load it

dusk flicker
#

alex look at the code

#

why not shade it?

tender shard
dusk flicker
#

the code they sent, first link

humble tulip
#

just wanted to test if it's possible

remote swallow
#

on the other paste

sterile token
dusk flicker
#

what?

tender shard
remote swallow
#

most of the time by alex we mean @tender shard

humble tulip
#

no no

#

read the code

tender shard
#

Verano is called alex too, but nobody ever here calls you alex because it's not in your username lmao @sterile token

dusk flicker
#

VERANO I'm talking about the person's name who is 'mfnalex', I call people in here by nicknames not actual discord names

remote swallow
dusk flicker
#

^

sterile token
#

oh nice

#

thanks

tender shard
#

lmao

humble tulip
#

I'm trying to use jda without shading

#

is that possible?

tender shard
#

dude smoked too much "wheel" again

dusk flicker
#

why would you want to do that

#

just shade the freakin thing

tender shard
dusk flicker
#

is this even a plugin

tender shard
#

if so, no problem. just use the library loader in plugin.yml

#

good question tbh

#

doesnt look like one

sterile token
humble tulip
dusk flicker
#

yeah I dont think it is lol

humble tulip
#

it's a discord bot java program

tender shard
#

ofc you have to shade it

#

I mean

ivory sleet
#

at the end

tender shard
#

where do you expect that class to come from? out of the sky?

ivory sleet
#

every library needs to be shaded somewhere

dusk flicker
#

just shade it my dude stop making this so complicated

humble tulip
#

so how does spigot load libraries dynamically from the plugin.yml?

tranquil stump
#

rotate vector function causes server to crash?

sterile token
humble tulip
#

oo i'll try

dusk flicker
#

STILL not the thing to do with Discord bots

#

you are just gonna hate yourself later when you have to debug this and wonder 'why the fuck did I do this'

tender shard
sterile token
humble tulip
sterile token
humble tulip
#

except i dont need to download the .jar

sterile token
#

They does that

dusk flicker
#

im too tired for this convo

humble tulip
#

system class loader isnt a urlclassloader

tender shard
#

you either gotta shade it, or download it

humble tulip
#

the jar exists

#

i just want to be able load it at runtime and use it

hazy parrot
#

Well, if someone download your app, they will have to dl it somehow

hazy parrot
#

Download

dusk flicker
#

download

eternal oxide
#

On newer Java that classLoading is going to fail

sterile token
#

download

tender shard
#

download

dusk flicker
#

im still wondering why you want to do this

tender shard
#

yeah total shitty idea, just shade JDA

humble tulip
#

I'll just look at spigot code

dusk flicker
#

JUST

#

SHADE

humble tulip
#

it's not for jda

dusk flicker
#

IT

humble tulip
#

it's just to see if something like this is possible

dusk flicker
#

You can shade anything, not just JDA!

humble tulip
#

I KNOW

tender shard
tender shard
#

show your full code

humble tulip
#

wanna see discordbot class?

#

?paste

undone axleBOT
humble tulip
#

DiscordBot class

tender shard
#

the error is in line 15

#

your line 15 is empty

#

the error message comes from a .jar that has another source code than the one you sent

humble tulip
#

oops

hazy parrot
#

Is system maven scope deprecated or I mixed it up with something

hazy parrot
#

Right

tender shard
humble tulip
#

?paste

undone axleBOT
tender shard
#

if you actually need to include a local .jar, you are supposed to mvn install:install-file it to your local repo

humble tulip
#

@tender shard

humble tulip
river oracle
#

I'm so confused 😭 wtf sqlite?

    public void insertIsland(MinerIsland island) {
        try (final PreparedStatement statement = this.connection.prepareStatement(INSERT_ISLAND)) {
            statement.setString(1, island.getUuid().toString());
            statement.setInt(2, island.getLevel());
            statement.setInt(3, island.getBlocksMined());
            statement.setString(4, Boolean.toString(island.isPayedForLevel()));
            Bukkit.getLogger().info(statement.toString());
            statement.executeUpdate();
            Bukkit.getLogger().info("Inserted island: " + island.getUuid() + "into database");
        } catch (SQLException e) {
            Bukkit.getLogger().severe("Failed to insert island into database!" + e.getMessage());
        }
    }

why does this convert into bruh I even printed the statement out and it literally makes 0 sense all of the things are in the right order lmfao

tender shard
#

what exactly is the problem?

river oracle
#

setBoolean wasn't even doing anything πŸ˜•

#

I'll try again

remote swallow
#

does sqlite even support booleans

river oracle
#

no

sterile token
#

Lol

#

I used to use SQLite and support booleans

river oracle
#

😭 wtf okay lets figure this out

hazy parrot
#

It's using 0 and 1 for bool

sterile token
#

ohright

#

You have to conver them

humble tulip
#

why are u using strings for booleans?

remote swallow
#

i think this is the right time for me to disappear

#

sql is weird

sterile token
#

Im more a NOSQL user

tender shard
river oracle
#

so I tried strings, and it visualized this weird shit happening

hazy parrot
humble tulip
#

0 and 1 is used in place

#

not true or false

eternal oxide
#

Older SQLite drivers doesn;t support boolean

river oracle
#

<version>3.40.0.0</version> is my version

#

iirc this is latest

river oracle
eternal oxide
#

you can't shade a newer driver into your plugin

eternal oxide
#

it will use the default resource in the spigot jar

river oracle
#

oh

#

okay

#

well that fucking sucks

eternal oxide
#

yep, you can;t overwrite it

#

spigot shaded version will be used

river oracle
tender shard
eternal oxide
#

won;t work with SQLite due to native methods

tender shard
#

it uses native methods? o0

#

well okay then i dont know

hazy parrot
#

Yap, nearly like 60% of sqlite size is native

eternal oxide
#

I only added support for SQLite in GroupManager due to this annoying driver issue

#

Spigot 1.14+ has a driver which supports booleans

river oracle
#

spigot

river oracle
# hazy parrot Can you show query
[19:52:12] [Server thread/INFO]: INSERT INTO miner_islands (island_uuid, miner_level, payed_for_level, blocks_mined)
VALUES (?, ?, ?, ?);
 
 parameters=[4243cd84-defd-43e0-ac56-898311f464de, 1, 0, true]
#

this is my query

eternal oxide
#

then it supports boolean

river oracle
#

wait nvm

river oracle
#

why...

hazy parrot
#

And what is wrong there

river oracle
#

oh wait I see it

hazy parrot
#

I don't see problem

river oracle
#

πŸ€¦πŸ½β€β™‚οΈ

#

I'm going to go leave now

#

goodbye

eternal oxide
#

lol

remote swallow
#

what did you do

hazy parrot
#

Lmao

#

I guess he didn't notice that columns are in different order then his insert

river oracle
#

He?? did you just assume my gender??

remote swallow
#

oh is ee

#

i see

hazy parrot
remote swallow
#

i can english

eternal oxide
#

Just your sec

#

sex

remote swallow
#

im going to bed now

#

wait a minute

river oracle
remote swallow
#

elgarl why are you awkae

#

its almost 2am

eternal oxide
#

watching boobies on anime πŸ™‚

river oracle
#

good life ^

#

respect man

tender shard
river oracle
#

what else do people use for local dbs h2?

eternal oxide
#

yep

river oracle
#

guess I'll use that in the futrue

tender shard
#

LIAR

tender shard
eternal oxide
#

nah, currently watchign "The World's Finest Assassin Gets Reincarnated in Another World as an Aristocrat"

#

its a bit of a slog

sterile token
#

Hey with my friend we are having bot issue it doesnt want to join to the sever?

remote swallow
tender shard
remote swallow
#

how are you inviting it

sterile token
remote swallow
#

what url scopes do you add

sterile token
remote swallow
humble tulip
#

@tender shard figured it out

#

had to create a urlclassloader and explicitly set the parent to null

tender shard
#

what did you set the parent to earlier?

humble tulip
#

i didnt set one

tender shard
#

oh I missed that

humble tulip
#

it auto set to the classloader of the class constructing the urlclassloader

tender shard
#

yep

#

I didnt see that you didnt use a parent in your earlier code

humble tulip
#

works now πŸ™‚

warm mica
#

But yes, custom class loaders have gotten ass with Java 9+

humble tulip
tender shard
#

CB passes a reference to the "this.getClass()" classloader of JavaPluginLoader

#

but what that refers to, no clue

sterile token
#

LMAO i just realize how they have put so many shits on the discord api

#

mfalex, are you still alive? I need some help with JDA

#

Im trying to get an embed message from a channel and modified it, but im not sure how do i get the embed id

#

Hmn im messed

#

Because im not sending a message, im sending directly an embed

tender shard
#

hm the jΓ€ger is still half full

#

Bedtime is when the bottle is empty

#

"in a bedroom with no windows or doors"

#

hi

#

I stalk everyone all the time

#

it's kinda my job

drowsy helm
#

tastes like medicine

autumn ingot
#

is there a way i can make it so whenever i compile my plugin in intellij, the jar automatically gets uploaded to my server? i use a dedicated server on pterodactyl, is there a way i can use the pterodactyl api somehow?

echo basalt
#

You can, yes

#

Make it run a bash script that uploads to ftp

sterile token
autumn ingot
orchid gazelle
echo basalt
#

you can edit your pom.xml/build.gradle to run a script after it's done building

mighty aurora
#

Quick question. How would I go about teleporting a player forward from their position(make them go forward 10 blocks) and detect all entities within their path? This would also need to not allow them to teleport through blocks.

jagged monolith
mighty aurora
#

How do I use the rayTrace world function?

#

Specifically if I want to base it off of player attributes.

austere solstice
#

Hi guys. I wonder if can we detect loaded chunk is new or not.

#

I saw it thanks!

sour aurora
#

Can anyone tell if there is a way to reload my plugins without crashing the server or stopping and starting the server again?

#

Like i want to reload the plugins from inside minecraft?
Can i do that?

#

I should have asked that in help-server right?

mighty aurora
#

This is what I have for my raytrace: p.teleport(p.getWorld().rayTrace(p.getLocation(),p.getLocation().getDirection(),10, FluidCollisionMode.NEVER,true,1,null)); how would I use this to A: Teleport the player to the furthest position away from them(with a max of 10 blocks) and B: do damage to all entities within the distance they would be teleporting.(only ones they would collide with)

tender shard
tender shard
#

I mean playing it is nice

#

but watching it?

mighty aurora
#

How efficient is this? The desired outcome is to have a system to detect all entities that are within ten blocks in front of the player. ```List<Entity> entities = new ArrayList<>();

for (double i = 0; i <= 10; i += 0.5) { // loop through each block up to 10 blocks away
Block block = location.add(direction.multiply(i)).getBlock(); // get the block at the player's location plus the direction multiplied by the current loop iteration
entities.addAll(block.getEntities()); // add all entities at the block to the list
}```

ivory sleet
#

Dont u have getNearbyEntities?

mighty aurora
#

Yeah I figured out that didn't work pretty fast and had to make modifications. This is the new system I have. ``` List<Entity> entities = new ArrayList<>();

                for (double i = 0; i <= 10; i += 0.5) { // loop through each block up to 10 blocks away
                    Block block = location.add(direction.multiply(i)).getBlock(); // get the block at the player's location plus the direction multiplied by the current loop iteration
                    entities.addAll(p.getWorld().getNearbyEntities(block.getLocation(),0.5,1,0.5)); // add all entities at the block to the list
                }```
#

Is it better worse or...?

wet breach
mighty aurora
#

I figured out how to get the blocks now I have a raytracing issue

wet breach
#

Dont need it

#

Just get entities in surrounding area. Compare the location with your path. If they are not on your path they are obviously not in the way

#

No raytracing needed for this and would be less optimal

mighty aurora
#

Your saying its more optimal for me to run a loop to check each block in my path and determine if it is air or not and whether their are entities their and if their are entities to damage them and if not to move on until I have reached a certain distance and then teleport the player to said end point?

wet breach
#

Yes because you can do all those things at once with a loop. Raytrace is a separate function that requires its implementation to do other things for it to work

#

Thus would be less optimal. Since you need a path of blocks. Blocks have locations and entities have locations you can just compare the locations and get your direction of teleporting in a single for loop

#

No reason to over complicate when you have everything you need to implement your feature.

mighty aurora
#

What would the best way of storing the list of entities within the area to then compare against?

wet breach
#

You dont need to store them. The method to get entities returns a list just like the method for getting a list of blocks the player is looking

compact haven
#

whats the current ideal way to create inventories

#

is there a popular library atm or should I just use the API

#

and is there an up2date item builder?

echo basalt
#

I just use my own api

wet breach
#

Api isnt difficult. Depends what exactly you need to accomplish but overall probably better off just coding it yourself

echo basalt
#

similar to IF

compact haven
#

all right, and what about item builders

#

idrc what I use I just don't want to write all of the constructor and setter non sense

#

unless there's a builder pattern in the API now, though I doubt it

wet breach
#

Could use lombok to generate your getters and setters

compact haven
#

heh

#

I mean for ItemStack

wet breach
#

Still applies

compact haven
#

yes I can create my own builder pattern, but surely something exists already?

wet breach
#

If you dont want to create all the code to make setters and getters you can use lombok for that leaving you just with the actual implementation to code yourself

wet breach
compact haven
#

this is also true

#

@echo basalt am sorry for the tag but I checked your github for your api and I can't find it

#

will admit only scrolled around the first page for a minute but a name doesn't pop to me

echo basalt
#

probably because I didn't post it on github

compact haven
#

ah I see

wet breach
#

Lol

echo basalt
#

I made it for work, not for charity

wet breach
#

Explains the not finding part

compact haven
#

indeed

echo basalt
#

there are a lot of utils i don't share

compact haven
#

Interfaces is only for paper and that's the only one I'm quite certain about, Incendo things tend to be well written πŸ€·β€β™‚οΈ

echo basalt
#

triumph

mighty aurora
#
                    Vector direction = location.getDirection().normalize();

                    for (double i1 = 0; i1 <= 10; i1 += 0.5) { // loop through each block up to 10 blocks away
                        Block block = location.add(direction.multiply(i1)).getBlock(); // get the block at the player's location plus the direction multiplied by the current loop iteration
                        p.getNearbyEntities(10,1,10).forEach(entity -> {
                            if(entity.getLocation() == block.getLocation()){
                                ((Damageable) entity).damage(2);
                            }
                        });
                        if(block.isEmpty() == false){
                            p.teleport(location.add(direction.multiply(i1-0.5)).getBlock().getLocation());
                            return;
                        }
                    }```Sorry to be asking so many questions I just can't seem to get it to work... I have this code to check up to 10 blocks in front of the player for entities and blocks and to damage entities and to teleport the player to just before the block that is in the way. for some reason this doesn't work at all. when I used a raytracing method it semi worked as whenever I would be in any kind of indentation in the ground the teleport would then teleport me to ten blocks away from the block i was looking at. This was supposed to be better but either its not or I have no idea how to do it.
wet breach
#

Also entity location wont match a block location

#

Need to modify the block location to increase y value by 1 if the blocks are at ground level

#

But i assumed you would implement to check 1 to 2 blocks above your path for entities

#

Since some entities are on the ground and some others fly

#

Also why do you need to damage entities? Are you killing them or just want to hurt them?

#

If you want to kill them could just remove them lol

mighty aurora
#

I just want to do damage to them

#

not kill them

wet breach
#

Also the way you are obtaining your location isnt what i had in mind to do and probably shouldnt be multiplying either

#

Your final location object is going to end up far away doing that lol

mighty aurora
#

I'm sorry if I'm being annoying asking so many questions. I'm really tired and I really want this to work but I just cant for the life of me actually translate your help into my code(I know I can understand it normally but I just am struggling rn).

wet breach
#

This is what i was referring to in how you can get your path in the direction the player is looking

#

Would be best to use a floor method though in case they are looking up in the sky lmao

#

Floor method would then give you locations for blocks all along the ground

mighty aurora
#

The player is meant to be able to use this to go any direction(up, down, left, right, etc.)

#

and do damage to anything in the path

#

not just go flat on the ground.

wet breach
#

Ok then this method is perfect as is for your purposes

#

It gets all the blocks in their line of sight up to the distance specified

#

So if you put 10 for distance which ever way the player was looking it will return a set of 10 blocks out in that direction to include air blocks

#

Which is convenient for you because you can use it to detect non air ones in the set

#

From there, you can check while you are interating or looping for entities. And then at the end of the iteration or loop should have your final coord to teleport player to

#

Anyways i can only tell you how it can be implemented, up to you to learn how to actually apply it or implement it. This is how you learn. uwu

mighty aurora
#

I'm trying some stuff. Would you be willing to tell me if I do it wrong when I've made something?

wet breach
#

Nope. Currently at work on a phone

#

So my helping capacity is severely limited for the next 6 hours

mighty aurora
#

ah ok

#

thanks though

wet breach
#

In the mean time would have to illicit help for such things from someone who is more capable then me at present lol

mighty aurora
#

Just saying I still have the same issue I had with raytracing. If I am not facing straight it will teleport me to the wrong location. As in if I look at the block that is on the same level as my feet(so if I was in it the upper half of my character would be exposed lower half inside the block) it will teleport me backwards... on top of this when I teleport it forces me to turn south every time but teleports me to the right spot...

mighty aurora
#

This is the current code associated with the above: List<Entity> entities = p.getNearbyEntities(10, 2, 10); List<Block> block = p.getLineOfSight(null, 10); block.forEach(block1 -> { entities.forEach(entity -> { if(entity.getLocation() == block1.getLocation().add(0,1,0) || entity.getLocation() == block1.getLocation().add(0,2,0)) ((Damageable) entity).damage(2); }); if(block1 != null){ p.teleport(block1.getLocation()); } });

charred blaze
#

what does args[0]

#

returns

#

in bungee command?

trim creek
#

the first argument you type in

#

if not speficted

#

null :D

charred blaze
#

thx

chrome coyote
#

pls

#

i have a armor_stand industructible

#

how can i remove this

last socket
#

that might be client side

green prism
#

I'm using a HashBasedTable which allows me to record all the items in a custom inventory. The map contains <String (Action), CustomItem, Integer (Slot)>. Could you tell me why if one of these columns has equal value, they "merge"? I would like to prevent this.

tardy delta
#

whats a HashBasedTable?

green prism
#

It's like a Map<With, Three, Objects>

tardy delta
#

two keys?

green prism
#

Row, Column, Value

#

yeah

#

Row + Column = Value

buoyant viper
#

Based and hashpilled

green prism
#

hannah, could you help me?

buoyant viper
#

no, idrk wat ur trying to do tbh

green prism
#

Thank you so much!

echo basalt
#

Table

tardy delta
#

well its a Map<R, Map<C, V>>

echo basalt
#

Is a key-key-value

green prism
#

What am I doing wrong!!!?!

buoyant viper
echo basalt
#

But synchronized with shitty concurrent perf

tardy delta
#

if R has duplicate keys, it will be overwritten, same for the combination of R and C ig

green prism
#

...

#

give me a sec

buoyant viper
#

?paste maybe idk

undone axleBOT
green prism
tardy delta
#

yes

green prism
#

LOVE YOU, BROTHER

formal bear
#

[11:31:58 WARN]: Event ServerConnectedEvent(player=botprzemek, server=net.md_5.bungee.ServerConnection@41b3a42c) took 442ms to process! How to handle the events without latency

#

BungeeCord

#
    @EventHandler
    public void onPlayerJoinEvent(PlayerDisconnectEvent event) throws IOException {

        ProxiedPlayer player = event.getPlayer();

        discordWebhook.addEmbed(new DiscordWebhook.EmbedObject().setDescription(player.getDisplayName() + " quit the server!"));

        discordWebhook.execute();

    }```
lapis swan
#

Is there a Special bungeecord discord or am I allowed to ask a question here?

formal bear
#

Spigot and BungeeCord here

lapis swan
#

Is it possible to listen for a BungeCord chanel in a BungeCord Plugin? I would like to provide the possibility to tell my plugin I do not accept more players out of a spigot Plugin.

formal bear
round finch
#

what is the name of the different math formats?

#

really trying to figure it out so
I can learn to convert math equations into 1 lines

tardy delta
#

what math formats

round finch
#

just wanna learn how to format equations

hazy parrot
#

As you should with every Web request

remote swallow
#

or bidmas

#

Brackets
Indices
Division
Multiplication
Addition
Subtraction

round finch
#

sometimes google is a pain

remote swallow
#

ye

round finch
#

turn this

#

into 1 / 2

#

idk what it is called brainlet

#

google havn't helped me

wet breach
#

Not sure what you are asking

round finch
#

what is the type of formats?

torn badge
#

What are math formats

round finch
#

idk bruh
my brain lack knowledge

wet breach
#

Β½

torn badge
#

Your brain is not braining

round finch
#

sadly not all knowing

#

heh

torn badge
#

A fraction?

fossil pike
wet breach
#

Dont use it i guess or just use a custom plugin

fossil pike
#

oofer

wet breach
#

Personally i just always made my own. Paypal api isnt hard at all and paypall freely lets you use their stuff for web commerce stuff lol

fossil pike
#

wow they really just be out here flooding every server's logs? thats wild to me

wet breach
#

All you need the plugin for is to listen for callback stuff

#

Buycraft uses paypal api just fyi

#

So i mean nothing special

#

Only pointing this out to let you know it is easy to use something custom and dont actually need to pay for buycraft services that paypal already offers for free lol

#

Minus the plugin part but the plugin part is like 1-2 classes with minimal code lol

formal bear
hazy parrot
#

You can get scheduler with Bukkit.getScheduler

torn badge
#

He is on Bungee

hazy parrot
#

Bungee doesn't have smth like that?

torn badge
#

ProxyServer.getInstance().getScheduler().runAsync

hazy parrot
#

Ignore what I said, use this ^

round finch
#

woah
noted

wet breach
#

Not hard to use java scheduler stuff or make your own either

round finch
#

never touched bungee runnable
thanks for sharing it

hazy parrot
#

Yeah there is also Java api such as executors or completable future

wet breach
#

And runnables

#

Basically that is what spigot implements and extends

hazy parrot
#

Isn't runnable just funct interface?

torn badge
#

A Runnable doesn’t run on a separate thread by itself tho

wet breach
#

Neither do the bukkit ones

torn badge
wet breach
#

The async stuff in bukkit do not execute on another thread

#

Async is not threading

#

Two different concurrency mechanisms

#

I should re word

hazy parrot
#

There is smth different then threading in java? Afaik there is no thing as coroutines in java

wet breach
#

Async just means spread out processing

hazy parrot
#

Spread out where

wet breach
#

If it doesnt complete the job in one cycle it will continue it in a future cycle but not guaranteed to be the next cycle

#

It is also not guaranteed for it to run on another thread although it could

hazy parrot
#

Oh, thanks for clarification πŸ‘

wet breach
#

Yeah asynchronous processing is like a hybrid concurrency thing without necessarily needing threads.

torn badge
#

private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build());

#

That’s what the Scheduler is using for async tasks

hazy parrot
#

Well so it is another thread

#

Picked from cached pool

wet breach
#

Would talk more but time for me to head home from work uwu

torn badge
native ruin
#

can i ask for help for logic?

#

or is this the wrong place

hazy parrot
#

You sure can

rotund ravine
alpine urchin
#

my friend

native ruin
#

having an issue with some logic, I am trying to create roads, but the problem is that the road on the x-axis becomes vertical and i am having trouble debugging it

Vector direction = block2.toVector().subtract(block1.toVector()).normalize();
for (int j = -2; j <= 2; j++) {
                double xOffset = direction.getY() * j;
                double yOffset = direction.getZ() * j;
                double zOffset = direction.getX() * j;
                currentLocation = new Location(world, x + xOffset, y + yOffset, z + zOffset);
                OuterPath.add(currentLocation);
                xyz[0] = xOffset;
                xyz[1] = yOffset;
                xyz[2] = zOffset;
            }
lapis swan
#

Is it possible to listen for a BungeCord chanel in a BungeCord Plugin? I would like to provide the possibility to tell my bungee plugin I do not accept more players out of a spigot Plugin or something else.

native ruin
round finch
#

why is road up?

native ruin
round finch
#

just guessing you're testing vectors right

native ruin
#

i am using vectors yes

#

road is up because 2 parameters are given and one of the params was above the first one

delicate oak
#

How can I solve this error message?

#

I tried to compile my plugin with 1.8 and 18 java, neither of them works.

austere cove
#

compile with java 8 (and do it properly)

delicate oak
#

Okay, can you explaing what do you mean by do it properly?

austere cove
#

you said you tried compiling with java 8 and it didn't work, while it should, so my guess is you messed something up

#

hence the do it correctly

delicate oak
#

I don't even know what to ask. If I could do it correctly, I would have not asked for help..?

rotund ravine
austere cove
#

I can't guess how you're compiling your plugin

rotund ravine
#

?google

undone axleBOT
delicate oak
hazy parrot
hazy parrot
austere cove
#

and what does your maven compiler plugin config look like

delicate oak
#

or the inner configurations of maven

rotund ravine
summer agate
#

?paste

undone axleBOT
delicate oak
summer agate
#

at first glance, check source and target. Believe that has to be your java version

delicate oak
#

Hm

#

I found that if I run the compile

#

It uses still 18

#

where can I change it?

summer agate
#

in your pom there is <source> and <target>
18 stands for java 18, 1.8 stands for java 8

delicate oak
#

Ah. I see.

summer agate
#

you specified java.version, which I believe only works for spring boot projects

delicate oak
#

How can I change the instanceof part to compile with J8?

tardy delta
#

change sdk in project structure

austere cove
#
if (x instanceof Y) {
    Y y = (Y) x;
    // Code
}
summer agate
#

If you're developing for recent minecraft versions, change java to a newer version, (17 is LTS 19 is current)

tardy delta
#

ah i thought you wanted to change java version

wet breach
#

which is what I was trying to explain in what exactly Asynchronous is lol

#

@hazy parrot only pinging as it is relevant to our convo earlier

delicate oak
austere cove
#

no lol

tardy delta
#

if sender instanceof Player { Player p = (Player) sender }

wet breach
#

the JDK version in most cases is not relevant to the version you are compiling for caveats being if you are trying to compile for a higher version then the JDK version or a super old version that the JDK does not support.

hazy parrot
delicate oak
tardy delta
#

what error

delicate oak
tardy delta
#

show code

wet breach
#

show your pom

delicate oak
#

maven

tardy delta
#

bruh remove that p

wet breach
#

source code isn't going to matter here

tardy delta
#

gave you the code

delicate oak
wet breach
delicate oak
#

I don't have 17 jdk downloaded, does that matter?

tardy delta
#

is he willing to change his sdk to 17 or to 8 now

tardy delta
#

people talking thro each other

wet breach
#

change the source and target to the java version you have. To find the java version you have

#

type in command prompt

#

java -version

delicate oak
wet breach
#

you have java 18

#

so set the target and source parts to 18

#

why not?

delicate oak
#

yeah, but If I compile at java 18, I get an error from the server.

delicate oak
wet breach
#

you are allowed to set the target and source to a version lesser then the JDK because the JDK is capable of compiling for lesser versions

#

it has a range it supports

delicate oak
#

aight, I'll download 17

wet breach
#

no

#

no need

delicate oak
#

oh

wet breach
#

just set the target and source

#

JDK 18 can compile for 17

#

because 17 is less then 18

delicate oak
#

shoudl I change this to 17 too, right?

wet breach
#

why only 8?

lapis swan
#

Does someone knows which is the latest Bungee version working with 1.8.8 ?

wet breach
#

what message?

#

only see the one where it complains about pattern matching not existing in source 8

#

that is easy to fix

#

update the JRE

#

then they need to update their JRE and compile for 16, idk what mc version they are using

#

but I don't support old versions therefore anything I say should always be assumed for up to date versions

#

1.16 isn't too bad in terms of old versions

#

the fix is easy for them

#

update their JRE to 18

#

on the server

#

then they can compile for 18 etc etc

undone axleBOT
tardy delta
#

kotlin πŸ’€

wet breach
#

the others do

vivid hill
tardy delta
#

dont you have to shade kotlin or smth?

#

or std lib or whatever

hazy parrot
#

Idk who deleted message about kotlin, but they have to shade stdlib

delicate oak
vivid hill
wet breach
delicate oak
#

I can run the server from 1.8 only, higher versions reject the server from starting

wet breach
#

what mc version you using?

delicate oak
#

ye

#

with mohist.

wet breach
#

you shouldn't have problems running 1.16 with java 16 or java 17

#

not sure why it must specifically require 1.8

wet breach
#

don't even know what mohist is

#

obviously seems terrible if it requires outdated java versions

vivid hill
hazy parrot
#

You have to add it to pom

wet breach
#

then good luck to them

#

I suppose

#

we also don't support forge/spigot hybrids either and can't really help in some instances in regards to that

#

or just get the relevant mod

delicate oak
#

Well, thanks for the help, I try with other java versions and change the server.

wet breach
#

has a permission manager πŸ™‚

#

so yes it exists

#

also

#

forge has permissions api stuff

#

so...odds are you can find a mod for such things now πŸ˜‰

#

they didn't use to back in the old days πŸ˜›

#

but they have since progressed

#

anyways point is, odds are you can typically find relevant mods these days

#

thanks to them finally creating and updating their api

#

and as pointed out

#

pretty much unnecessary for hybrids

#

the only reason hybrids existed back in the day was due to the fact forge had non-existent api and thus certain things were plugin exclusive IE permissions being a big one lol

#

however that has since been rectified and thus hybrids are mostly obsolete now

delicate oak
#

okay, thanks bro

pine crescent
#

Im facing the problem where the BukkitRunnable is needing a plugin but Im in the event class is there a way to fix this?

@EventHandler
    public void onPlayerItemConsumeEvent(PlayerItemConsumeEvent event) {
        Player player = event.getPlayer();

        player.sendMessage("You consumed something!");

        if (event.getItem() != null && event.getItem().hasItemMeta()) {
            player.sendMessage("Item is not NULL and have ItemMeta!");

            if (event.getItem().getItemMeta().equals(ItemManager.potionBerserk.getItemMeta())) {
                player.sendMessage("You drank a Potion of Berserk!");


                new BukkitRunnable() {
                    @Override
                    public void run() {
                        getServer().dispatchCommand(getServer().getConsoleSender(), "say lol");
                    }
                }.runTaskTimer(this, 0, 20);
            }
        }
    }
rotund ravine
#

Dependency injection

#

?di

undone axleBOT
sly venture
#
BlockPosition blockPosition = new BlockPosition(location.getBlockX(), 0, location.getBlockZ());

        PacketContainer fakeSign = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.BLOCK_CHANGE);
        PacketContainer openSign = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.OPEN_SIGN_EDITOR);
        PacketContainer signData = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.TILE_ENTITY_DATA);

        fakeSign.getBlockPositionModifier().write(0, blockPosition);
        fakeSign.getBlockData().write(0, WrappedBlockData.createData(Material.OAK_SIGN));

        openSign.getBlockPositionModifier().write(0, blockPosition);

        NbtCompound signNBT = (NbtCompound) signData.getNbtModifier().read(0);
        IntStream.range(0, text.length).forEach(v -> signNBT.put("Text" + (v + 1), "{\"extra\":[{\"text\":\"" + text[v] + "\"}],\"text\":\"\"}"));

        signData.getBlockPositionModifier().write(0, blockPosition);
        signData.getIntegers().write(0, 9);
        signData.getNbtModifier().write(0, signNBT);

        try {
            ProtocolLibrary.getProtocolManager().sendServerPacket(player, fakeSign);
            ProtocolLibrary.getProtocolManager().sendServerPacket(player, openSign);
            ProtocolLibrary.getProtocolManager().sendServerPacket(player, signData);
        } catch (InvocationTargetException exception) {
            exception.printStackTrace();
        }
signData.getIntegers().write(0, 9);
quaint mantle
tardy delta
#

people still instantiating bukkitrunnables πŸ’€

quaint mantle
#

welcome

pine crescent
tardy delta
#

Bukkit.getScheduler().runTaskTimer(plugin, () -> {/* code here */}, x, y)

sly venture
pine crescent
#

oh u still need dependency injection?

#

ill give it a try

tardy delta
#

wdym di

primal goblet
#
File file = new File("spigot.yml");
        FileConfiguration yml = YamlConfiguration.loadConfiguration(file);
        yml.set("messages.unknown-command", Major.MU("&cUnknown command. Type \"&e/help&c\" for help."));
        try {
            yml.save(file);
        } catch (Exception e) {}

the spigot.yml is not saving? am i did that wrong?

pine crescent
# tardy delta wdym di

I was trying to execute a command after 100 ticks when a person finish drinking a potion

quaint mantle
sly venture
orchid gazelle
pine crescent
tardy delta
#

thats literally the same code

#

just put your code in the lambda and specify delays

quaint mantle
# sly venture

one moment, I'm actually in a Zoom meeting rn lol. I'll check it out in a second

sly venture
#

ohh,, sorry thanks

pine crescent
quaint mantle
pine crescent
#

Is there a way to merge the meta to ItemManager.potionBerserk.getItemMeta()?


                Bukkit.getScheduler().runTaskLater(plugin, () -> {
                    getServer().dispatchCommand(getServer().getConsoleSender(), "kill " + player.getName());
                    }, meta.getCustomEffects().get(0).getDuration());```
to 
```Bukkit.getScheduler().runTaskLater(plugin, () -> {
                    getServer().dispatchCommand(getServer().getConsoleSender(), "kill " + player.getName());
                    }, ItemManager.potionBerserk.getItemMeta().getCustomEffects().get(0).getDuration());```
rotund ravine
sly venture
#

I'm looking at this and making it.
\

quaint mantle
#

i think GUI shop might have an issue with the Sign Menu plugin, perhaps? Maybe try disabling GUI Shop and then running the server again.

mighty aurora
#

I have an issue with lineOfSight. If I am not facing straight it will teleport me to the wrong location. As in if I look at the block that is on the same level as my feet(so if I was in it the upper half of my character would be exposed lower half inside the block) it will teleport me backwards... on top of this when I teleport it forces me to turn south every time but teleports me to the right spot...List<Entity> entities = p.getNearbyEntities(10, 2, 10); List<Block> block = p.getLineOfSight(null, 10); block.forEach(block1 -> { entities.forEach(entity -> { if(entity.getLocation() == block1.getLocation().add(0,1,0) || entity.getLocation() == block1.getLocation().add(0,2,0)) ((Damageable) entity).damage(2); }); if(block1 != null){ p.teleport(block1.getLocation()); } });

sly venture
quaint mantle
wet breach
#

you have to wait till the done editing button is clicked from the client to then do whatever it is you want

wet breach
#

it all depends at what point you are trying to update the sign

#

if you just want a sign that exists or is generated by the server and isn't dependent on waiting for the player to place one

#

then you can easily do that with packets

#

however

#

there is a caveat

sly venture
#
signData.getIntegers().write(0, 9);
```There's an error in that part.
wet breach
#

not sure what getIntegers() does

austere cove
vale ember
#

Why does this code print ss instead of Β§rss?

var item = new ItemStack(Material.IRON_SWORD);
var meta = item.getItemMeta();
meta.setDisplayName(ChatColor.RESET + "ss");
item.setItemMeta(meta);
System.out.println(meta.getDisplayName());
worldly ingot
#

Because the reset character resets the colour and formatting to default

#

So, it's doing exactly what it should be doing πŸ˜›

wet breach
#

color codes are not printed when you use the ChatColor class api

vale ember
#

is there a way of getting the original string which would contain ALL color codes including reset

#

cuz when i get the string from getDisplayName and set it again it becomes italic

#

how can i avoid that?

tardy delta
#

ChatColor.stripColor

vale ember
#

wdym? what should i strip?

tardy delta
#

the colored string?

vale ember
#

when i set the stripped string to display name it becomes italic

tardy delta
#

makes sense?

vale ember
#

how can i avoid that?

remote swallow
#

ChatColour.reset

tardy delta
#

well you are coloring it using ChatColor.translateAlternateColors somewhere

vale ember
#

should i just add reset to the start of the string EVERY time i set a display name?

quiet ice
#

This behaviour was introduced in an early 1.16.0 build if I remember correctly

vale ember
#

so i the original string is lost forever

#

?

tardy delta
#

what original string?

#

the one with the color characters?

quiet ice
#

If you are talking about printing the string to sysout - then idk how you can escape Β§ there

vale ember
quiet ice
tardy delta
#

dont use Β§ anyways

#

use &

vale ember
#

i don't

quiet ice
#

I.e. Β§0Β§aΒ§bHello! will be cleaned to "Β§bHello!"

tardy delta
#

then use String.replace('Β§', '&')?

trim creek
#

". Β§0Β§aΒ§b" nice sense lol

quiet ice
#

There was a plugin that I forked due that reason

#

And it's almost definetly intended on spigot's part - so yeah, so much for cross-version compatibility

vale ember
#

so if i just add a reset code to the start of every string i am setting to display name, will it fix the italic problem

quiet ice
#

For display names yes

vale ember
#

k thanks

quiet ice
#

The MC Client implicitly adds italics and grey color to item names should they have a custom name

opal juniper
#

Bruh

vale ember
#

wtf

tardy delta
#

uhh

opal juniper
#

Choco is around

remote swallow
#

ping choco as well

tardy delta
#

@vagrant stratus do us a favor

#

optic fast asf

#

πŸ’€

#

ty whoever it was

quiet ice
#

inb4 it's OP

wet breach
#

did that guy just like go off?

#

or person

#

whoever

quiet ice
#

no idea

eternal oxide
#

I missed drama, heck I need to pay attention

wet breach
humble tulip
#

Wat happened

remote swallow
#

someone send a load of screenshots blocking the channel

#

didnt read what they said

humble tulip
#

Lol

tardy delta
#

some dude thought he was funny

#

it was in french

vale ember
#

btw is it safe to do doubleValue == 0 or should i do Double.compare(doubleValue, 0) == 0?

wet breach
tardy delta
#

tu es gay or smth

#

"you are gay"

wet breach
#

ah

#

the classic

tardy delta
#

very funny

austere cove
#

but if you really care you do

Math.abs(d - 0) < 1e-6;
#

(or some other epsilon)
-0 is just for completeness, you can omit it

wet breach
#

compare is really only useful for two things

#

locality and using custom comparison rules

#

more handy on strings then say numbers

#

with numbers you are better off with operator comparisons instead

#

unless for whatever reason you need its object form then it would be equals

tardy delta
#

comparing nearly identical numbers goes brr

misty current
#

what happens if i use a get method of ConfigurationSection and the key i provide doesn't exist?

#

does it return null or does it return a default value?

eternal oxide
#

null

#

unless you set a default

misty current
#

thanks

#

what about getInt?

eternal oxide
#

read teh javadocs. int is a primitive which can;t be null

misty current
#

aight thanks

crystal palm
#

quick question! whenever the server starts, the config is loaded to memory, correct?

#

so there shouldnt be any "big" perf impact if we're getting any values from it synchronously.. riiight?

hazy parrot
#

Yeah, they are loaded into map

crystal palm
#

sweet.

vale ember
#

is there a way of checking if a string is a valid color name via net.md_5.bungee.api other than using deprecated methods or catching IllegalArgumentExcpetion?

eternal oxide
#

its an enum so check the return of valueOf

vale ember
#

it's not

#

i am talking about net.md_5.bungee.api

eternal oxide
#

Color is an enum

austere cove
#

bungee is not an enum but

#

ye

tardy delta
#

Might happen at saveDefaultCongig() too

#

Iirc

crystal palm
warm light
#

can an enderman hold enderchest?

remote swallow
#

depends how the blocks they hold are rendered

#

if it just shows whats in their hand or something yes

#

if its an entity model in resource packs and some nbt data probably not

warm light
#

and it should be on .setItemInMainHand method right?

#

to set the item

austere cove
tender shard
austere cove
crystal palm
#

ah. should've checked the source myself. thank you!

tender shard
# austere cove

yeah I've seen that, but doesn't the java plugin loader already do that somewhere?

remote swallow
#

you might have to get their inv and set a slot

tender shard
warm light
tender shard
tender shard
remote swallow
tender shard
austere cove
warm light
tender shard
#

ofc Enderman extends LivingEntity and so you have the getEquipment() method

#

the question was wether the Entity interface declares that method, and it doesn't. It's declared in LivingEntity

crystal palm
# austere cove

so.. this should technically make it so that when I set a new value in the config, I can get it again later (without restarting, of course) without saving?

remote swallow
#

yeah

crystal palm
#

cool beans

remote swallow
#

but really you should cache the file and have a reload command

lapis swan
#

Is it bad style to use sender.hasPermission instead of super(name, permission, aliases); in bungee or does it not really matter ?
The second option seems not to work well with sub command permissions

tender shard
#

wdym with super(name, permission, aliases) ?

#

calling super in a command executor doesn't really do anything

lapis swan
#

I just saw that the command class hast two Constructor:
public Command(String name)
{
this( name, null );
}

/**
 * Construct a new command.
 *
 * @param name primary name of this command
 * @param permission the permission node required to execute this command,
 * null or empty string allows it to be executed by everyone
 * @param aliases aliases which map back to this command
 */
public Command(String name, String permission, String... aliases)

My Question is if using the one with no perms and than using sender.hasPermission later on is bad code style

tender shard
#

oh you're calling it in the constructor

#

both is fine, it depends

#

lemme explain

elfin atlas
#

Is there a way to remove from the boss bar the bar without a texturepack?

tender shard
#

if you pass the permission to the constructor, bungee will handle the permission thing for you. Your executor won't run if the player doesnt have the permission, they won't see the command in tabcomplete, and they will be shown the default "no perms" message

tender shard
#

if you check the permission yourself, ofc you can send any message you like

elfin atlas
tender shard
#

for subcommands, it depends on whether you have one "general" permission

#

e.g.

#

myplugin.mycommand.subcommand1
myplugin.mycommand.subcommand2

If you only have those permissions, then you cannot use the constructor option anyway

#

if however you have
myplugin.mycommand
myplugin.mycommand.subcommand1
myplugin.mycommand.subcommand2

then you could call the constructor with the "parent" permission myplugin.mycommand

lapis swan
#

Okay thats what I expected

minor garnet
#

some1 know how get the head point location of armor stand?? especially when rotates

tender shard
#

I would check the perms myself so you can make the message configurable

austere solstice
#

?paste

undone axleBOT
minor garnet
#

yes?

lapis swan
#

Maybe one additional question is it Really intended to Create commands like this:

public class CommandJoinMe extends Command {

public CommandJoinMe(String name) {
    super(name);
}

@Override
public void execute(CommandSender sender, String[] args) {
    sender.sendMessage(TextComponent.fromLegacyText("Β§8Β» Β§c Jey"));

}

}

and in on enable :
ProxyServer.getInstance().getPluginManager().registerCommand(this, new CommandJoinMe("joinme"));

?

Still Bungee related

minor garnet
#

yah i know i can #getEyeLocation() but i want the exactily point on the image understand ?

austere solstice
#

Hi guys. Is there any way to find a specific block in a chunk without for loops? When I fly with spectator mode, it is finding blocks with for loops but gets so much lag. Is there any way to improve the code?

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

vale ember
#

Why isn't ChunkLoadEvent called on the chunk in which the player is?

wet breach
#

get eye location, modify it with the height of the entity

minor garnet
minor garnet
minor garnet
#

tf

worldly ingot
#

Yeah the eye location will not ever change

tender shard
minor garnet
#

so thought consider rotating the head but I dont know if that could help me get that specific point

vale ember
tender shard
#

did you set your startup to LOAD instead of POSTWORLD

#

in plugin.yml?

wet breach
#

although not sure why you need to know this exact location

minor garnet
wet breach
#

well what is setting the pose to begin with?

#

Pose takes a Eular Angle, going to have to do use math to translate angles to coords

minor garnet
#

to make life easier i use player head rotation

sharp gust
#

How can I check what load type or level a chunk has?

#

I wanna check if a chunk is level 32 or higher since then its chunk ticks arent being processed

vale ember
river oracle
#

Not really especially if they are all your own keys I mean how many keys could you have

#

Generally I'd just do an o1 check though as that's definitely reccomended

vale ember
#

i have keys for custom blocks i need to initialize on startup

river oracle
#

You should be fine.

vale ember
#

k thanks

river oracle
#

I have something similar I have a class called
LightLocation that has a x y z double and I have a PDC type of chunk as a List of LightLocatiln

tender shard
minor garnet
#

yes then how i get the location?

vale ember
#

do i need to close InputStreamReader or URL#openStream manually?

tardy delta
#

i always tend to forget it πŸ€”

hazy parrot
#

try with resources supremacy

tender shard
#

or you let try do it for you

tardy delta
#

or you forget it

tender shard
#
try(InputStreamReader myReader = ...) {
  myReader.doSomething();
}
tender shard
tardy delta
#

basically me cuz i never know whether i should close it

tardy delta
#

like JavaPlugin#getConfig or smth opens a inputstream and never closes it

hazy parrot
#

Is there a way in maven to do for example if i run mvn clean package test it will use custom outputDirectory in shade plugin and if i do command without test, it normally exports it to target folder

vale ember
#

i don't need to put url's InputStream in separate variable right?

tardy delta
#

i always thought the reader closes the delegate input stream but im not sure

hazy parrot
lapis swan
#

Is there no ingame tabcomplete for bungee plugins ?

remote swallow
#

dont think so

lapis swan
#

So how to work around ? write a spigot plugin for tab completing bungee commands ?

tender shard
#

although I cannot give a concrete example for your specific question rn

#

wait, lemme check, I'm using profiles in jefflib I think

#

hm nah must have been some other project

#

okay so basically, you can just define properties

#

I'll try to write sth

#
  <profiles>

    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <jarLocation>.</jarLocation>
      </properties>
    </profile>

    <profile>
      <id>exportToServer</id>
      <properties>
        <jarLocation>C:\MyServer\plugins</jarLocation>
      </properties>
    </profile>
</profiles>

...

<build>
  <plugins>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <version>3.1.0</version>
  <configuration>
    <outputDirectory>${jarLocation}</outputDirectory>
    <finalName>MyAwesomePlugin</finalName>
  </configuration>
</plugin>
#

sry for formatting, I typed it directly into discord

#

and then mvn clean package -P exportToServer

#

actually you don't even need the default profile, you could just define it as normal property, the exportToServer profile would then override it

hazy parrot
#

wow cool, thanks

tender shard
#

np

#

not sure if this is 100% correct, but it at least comes very close to how it should look πŸ˜„

hazy parrot
#

yap πŸ˜„

tender shard
#
    <properties>
        <jarLocation>.</jarLocation>
    </properties>

    <profiles>
        <profile>
            <id>exportToServer</id>
            <properties>
                <jarLocation>C:\mctest\plugins</jarLocation>
            </properties>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <outputDirectory>${jarLocation}</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
#

this is all you need

misty current
#

is there an event called when a player stops mining?

tender shard
#

BlockDamageAbortEvent or sth

#

like that

misty current
#

something similar to how the player dig packet works

tender shard
misty current
#

thanks

tender shard
#

np

misty current
#

is it called both when a player stops mining and finishes mining?

#

with stops i mean doesn't mine the block but stops clicking

tall dragon
#

BlockDamageEvent is called when he starts iirc

tender shard
misty current
#

aight thanks

tender shard
tall dragon
#

yea i misread

#

:<

tender shard
#

that is unforgivable

misty current
tall dragon
tender shard
#

yeah okay it's alright

tall dragon
#

thank god

lapis swan
hazy parrot
tender shard
#

btw you can also make profiles activate automatically through criteria

#

e.g. "when OS is linux, activate exportToServer profile, otherwise not" or sth

lapis swan
#

I try to add tab complete for my bungee commands

tender shard
hazy parrot
tender shard
lapis swan
tender shard
lapis swan
#

the second thing is already working

tender shard
#

?jd-bc

humble tulip
#

?jd

humble tulip
lapis swan
#

exactly

tender shard
#

oh isn't there a bungeecord setting for that or sth?

lapis swan
#

subcommand is already working