#help-development

1 messages · Page 514 of 1

tender shard
#

are you using the maven-shade-plugin? Well you must be, since you're also using my CustomBlockData library

edgy crystal
#

alright, then i am using it

tender shard
#

try using version 1.3.1 of the ts3 api

edgy crystal
tender shard
#

if that doesnt help, send your pom.xml file

edgy crystal
#

same error

tender shard
#

?paste your pom

undone axleBOT
edgy crystal
high dagger
#

Hi!

#

Guys, I need a plugin that prohibits taking more than one type of item in the inventory. Let's say I want to take a stone sword and I put it in my inventory. However, when I want to take exactly the same stone sword into my inventory, I fail to do so and the inventory does not accept the item of the same type. Is there such a plugin for version 1.19.2?

high dagger
undone axleBOT
high dagger
#

oh sorry!

tender shard
#
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/**</exclude>
                            </excludes>
                        </filter>
                    </filters>
#

it goes into the <configuration> of your maven-shade-plugin

#

(the proper way would be to only exclude the SF, DSA and RSA files, but whatever - for a spigot plugin, everything in META-INF is useless anyway)

edgy crystal
#

"Element filters is not allowed here"

tender shard
#

then you put it into the wrong place

edgy crystal
#

ah nvm, my fault

#

sorry

tender shard
#

I'm pretty sure that it should work now

edgy crystal
#

okay, ill try

#

seems like it works

tender shard
#

great

#

now go blame the ts3 api author for signing his jar lol

edgy crystal
#

your the best man

#

thank your very much

tender shard
#

np

fallow latch
#

i need help with the PlayerInteractEvent, i am detecting if the player is pressing right click on block or air, but the Event gets through a lot less when i am holding right click on a block. I tried giving the player haste, but i still want the normal speed attack indicator cooldown so that wont work. is there a way to speed up the frequency of the PlayerInteractEvent when holding right click on a block?

tender shard
#

I'm pretty sure that delay is client sided, as you can make it faster by manually right-clicking

#

instead of holding it down

fallow latch
#

yeah... then how about is there a way to keep the attack indicator cooldown unaffected by haste? (i am guessing no but im new)

agile anvil
#

you could compensate by changing the cooldown attack attribute but I guess it would compensate the haste effect so doing like if you changed nothing

tender shard
fallow latch
young knoll
#

That’s basically how I detect holding right click

#

200ms +- a bit

#

Not perfect but it works

tender shard
#

except that he only rarely works, he calls in sick on most days and gets paid for nothing

fallow latch
#

dream life

sullen marlin
#

wat

#

unlimited sick leave

tender shard
#

after 6 weeks, pay goes down to 80% or so

#

but in theory you can always be sick for 5 weeks, work 1 week, be 5 weeks sick again

#

but ofc you gotta find a doctor who also attests that you're sick

young knoll
#

Wow

sullen marlin
#

bruh

young knoll
#

So all you need is a quack doc

tender shard
tender shard
#

but this sucks because now my bf cannot finish his apprenticeship on time because of too many "sick days" lol

#

so shots fired back

sullen marlin
#

who couldve seen that coming

tender shard
#

¯_(ツ)_/¯

tender shard
young knoll
#

Fuck around and find out I guess

fallow latch
#

so the attack cooldowns are gonna be super high

tender shard
#

yeah dirty hack but I also wouldnt know a better way

flat lark
#

is it event.getClickedInventory.getName()

fallow latch
tender shard
#

only views have names. but why would you ever need it?

wise mesa
#

obviously to compare the name of the inventory instead of the instance for top tier amazing 100% punjab 😎 👍 gui programming

tender shard
#

yeah that's erm

#

not so great lol

wary harness
tender shard
#

here you got a 50/50 chance. some will only write you sick for a day, others are like "oh you're not feeling so well mentally? yeah well, maybe you just need 2 months off" -> ICD Z73

flat lark
round finch
#

Fr how do normal people know how their mental state is?

young knoll
#

Depends on mercury being in retrograde

round finch
#

With Autism i have a habit of dismissing it sorta

#

Gets overworked and breakdown

rigid otter
#

I have a trouble to prevent players from interacting Item Frame. Cancel PlayerInteractEvent doesn't work.

echo basalt
#

ItemFrame is an entity

rigid otter
#

Ohh, so do we use PlayerInteractEntityEvent instead?

echo basalt
#

try and see

rigid otter
#

ok

karmic phoenix
#
    @EventHandler
    public void onJoin(PlayerJoinEvent e) {
        Player p = e.getPlayer();

        if (main.getConfig().getLocation("spawn-location") != null) {
            p.teleport(main.getConfig().getLocation("spawn-location"));

        }

    }

    @EventHandler
    public void onBreak(BlockBreakEvent e) {
        Player p = e.getPlayer();
        World world = Bukkit.getWorld("spawn");

        if (world != null) {
            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }


    @EventHandler
    public void onPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();
        World world = Bukkit.getWorld("spawn");

        if (world != null) {
            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }


    @EventHandler
    public void onDamage(EntityDamageByEntityEvent e) {
        Player p = (Player) e.getEntity();
        if (!(e.getEntity() instanceof Player)) return;
        World world = Bukkit.getWorld("spawn");

        if (world != null) {
            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }

    @EventHandler
    public void onHungerDeplete(FoodLevelChangeEvent e) {
        Player p = (Player) e.getEntity();
        if (!(e.getEntity() instanceof Player)) return;
        World world = Bukkit.getWorld("spawn");
        if (world != null) {
            if (p.getWorld() == world) {
                e.setCancelled(true);
                e.setFoodLevel(20);

            }

        }
    }
}
#

Trying to disable these events in "spawn" world but for some reason it doesnt work.
Error: null

remote swallow
#

?psate the error

#

?paste

undone axleBOT
regal scaffold
#
gui-upgrades-slot-tier-config:
  1:
    price: 1000
    permission-node: upgrades.slot.tier.1
    value: 1.0
#

Isn't this path gui-upgrades-slot-tier-config.1

And then

gui-upgrades-slot-tier-config.1.price
gui-upgrades-slot-tier-config.1.permission-node
gui-upgrades-slot-tier-config.1.value
#

?

remote swallow
#

note != node

#

smh

#

but the rest is correct

regal scaffold
#

Typo

#

I'm getting null

#

In all

remote swallow
#

is the config on the sever actually there and have those keys

regal scaffold
#

Yes

regal scaffold
remote swallow
#

sout YamlConfig.values()

karmic phoenix
remote swallow
#

paste the error on the site and i can help

karmic phoenix
karmic phoenix
remote swallow
#

what is SpawnEvents.java:31 & SpawnEvents.java:44

karmic phoenix
#

31: public void onBreak(BlockBreakEvent e) {

#

44: blockplaceevent

remote swallow
#

the error isnt matching the code if its that

karmic phoenix
#

I changed the code just a little

#

added checks for nulls

remote swallow
#

okay then, run the code again and see if it errors

#

then give me those errors

regal scaffold
#
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-slot-tier-config
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-storage-tier-config
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-speed-tier-config
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-multiplier-tier-config
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-members-tier-config
[21:15:00 INFO]: [UltraStorage] [STDOUT] gui-upgrades-sell-quantity-tier-config
remote swallow
#

so the section exists, do the same (#values()) on the gui-upgrades-slot-tier-config

regal scaffold
#
[21:16:21 INFO]: [UltraStorage] [STDOUT] 1
[21:16:21 INFO]: [UltraStorage] [STDOUT] 2
[21:16:21 INFO]: [UltraStorage] [STDOUT] 3
#

And so on

karmic phoenix
#

i added returns

remote swallow
#

okay so the null check is doing what its meant to

#

remove the null checks or comment them out run it and send the errors

regal scaffold
#

It actually seems like

remote swallow
#

try putting the numbers in apostrophes

regal scaffold
#

gui-upgrades-slot-tier-config.1

#

Already does null

#

omg I bet it is that

remote swallow
#

it probably doesnt like the int key, wants a string instead

regal scaffold
#

holy fk

#

Right

#

I forgot

#

Jesus

#

'`'

#

'1'

remote swallow
#

is that an apostrophe, number then a backtick

regal scaffold
#

no lol

#

'1'

remote swallow
#

huh

#

looked like a backtick

regal scaffold
#

'1'

#

Ik

#

Funny stuff

tall saffron
#

Is there a way i can continue the development of my plugin easily in my laptop?

#

like when i save it it exports it and imports it into my pc automaticcly

remote swallow
#

if you can put the plugin on github yeah

tall saffron
#

yeah but is there a way like an extension to automaticly save and import?

remote swallow
#

all thats needed is just to commit and push everything before you close, there might be an option in settings to do something on exit but no idea

tall saffron
#

Oh okay thanks

remote swallow
#

whats SpawnEvents.java:33 & SpawnEvents.java:50

karmic phoenix
#
    @EventHandler
    public void onBreak(BlockBreakEvent e) {
        Player p = e.getPlayer();
        if (main.getConfig().getString("spawn-world") != null) {
            World world = Bukkit.getWorld(main.getConfig().getString("spawn-world"));

            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }

    @EventHandler
    public void onPlace(BlockPlaceEvent e) {
        Player p = e.getPlayer();

            World world = Bukkit.getWorld("spawn");
        if (main.getConfig().getString("spawn-world") != null) {
            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }


    @EventHandler
    public void onDamage(EntityDamageByEntityEvent e) {
        Player p = (Player) e.getEntity();
        if (!(e.getEntity() instanceof Player)) return;
        if (main.getConfig().getString("spawn-world") != null) {
            World world = Bukkit.getWorld("spawn");


            if (p.getWorld() == world) {
                if (p.getGameMode() != GameMode.CREATIVE && !p.hasPermission("brinkysa.admin")) {
                    e.setCancelled(true);
                }

            }
        }
    }

    @EventHandler
    public void onHungerDeplete(FoodLevelChangeEvent e) {
        Player p = (Player) e.getEntity();
        if (!(e.getEntity() instanceof Player)) return;
        if (main.getConfig().getString("spawn-world") != null) {
            World world = Bukkit.getWorld(main.getConfig().getString("spawn-world"));

            if (p.getWorld() == world) {
                e.setCancelled(true);
                e.setFoodLevel(20);

            }

        }
    }
}
#

New code

remote swallow
#

?paste the entire class, including imports and package

undone axleBOT
karmic phoenix
remote swallow
#

do you save a config on onEnable, eg saveDefaultConfig and include a config with the jar

karmic phoenix
#

Yes

remote swallow
#

oh i know whats up

#

the main param is null

#

?di

undone axleBOT
remote swallow
#

follow that

karmic phoenix
#

i dont get it?

#

What am I doing wrong?

remote swallow
#

you dont ever set the main var, you a need to make it private final, and you need a constructor to set it

karmic phoenix
#

Should I do MainClass.getMain().getConfig().getString("spawn-world")

remote swallow
#

i would advise not doing the static getInstance way unless its absolutely nescessary

karmic phoenix
#

so private final static BrinkySALobby main;?

remote swallow
#

public class SpawnEvents implements Listener {

    private final BrinkySALobby main;

    public SpawnEvents(BringSALobby main) {
        this.main = main;
    }
}```
karmic phoenix
static pulsar
#

Does anyone know why when I try to set the last location a player either teleported from it gets set to the location that the player actually teleported to instead of from?

remote swallow
karmic phoenix
#

aight

static pulsar
#

I added some debug and it looks like the event is being called twice, is there a way to solve this?

remote swallow
#

which event?

static pulsar
#

PlayerTeleportEvent sorry for not clarifying

remote swallow
#

?paste your event handler

undone axleBOT
static pulsar
#

I am not getting any errors, but when I teleport the server terminal says I moved too quickly

remote swallow
#

nothing there looks like its calling the event twice itself

remote swallow
#

if not its just you accidentally moving quicker than you should

static pulsar
#

It seems to work once then as soon as I see moved too quickly it messes up

remote swallow
#

oh im guessing that tps you back

#

very quickly

weak meteor
#

So, im coding HCTeams plugin vanilla in 1.8.8 and i dont know how to do the claiming part, i cant think what to do or how and im stuck with this, someone can help me?

static pulsar
#

What do you mean by very quickly? I just use player.teleport(location);, should I be doing it a different way?

remote swallow
#

the moving too quickly, it instantly teleports them back im guessing

static pulsar
#

Oh no it lets me teleport to the desired location but the /back just teleports me to the same spot instead of the previous location.

restive mango
#

What is the formula which determines how an entity decelerates in the air, given a speed?

#

I just need the code in moveEntityWithHeading, basically...

static pulsar
#

Is there a way to stop the server from thinking a player is moving too quickly? At least until I can find a fix for it calling the PlayerTeleportEvent twice.

fickle mortar
#

Someone help me, my holographic displays api is not working, I already put it in the pom.xml and dragged the .jar from spigot and holographic to intellij and still nothing

import com.gmail.filoghost.holographicdisplays.api.HolographicDisplaysAPI;
#

package com.gmail.filoghost.holographicdisplays.api does not exist

kind hatch
fickle mortar
#
<dependency>
    <groupId>me.filoghost.holographicdisplays</groupId>
    <artifactId>holographicdisplays-api</artifactId>
    <version>3.0.0</version>
    <scope>provided</scope>
</dependency>
#
<repository>
            <id>codemc-repo</id>
            <url>https://repo.codemc.io/repository/maven-public/</url>
        </repository>
remote swallow
#

why do you have com.gmail on the start of the import

fickle mortar
#
import com.gmail.filoghost.holographicdisplays.api.Hologram;
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI;
remote swallow
#

you shouldnt be adding imports manually, let your ide add th em and that package is wrong

#

it would be import me.flioghost.holographicdisplays.api.Hologram

fickle mortar
#

now it go, but "create hologram" and "add line of text" be red, why?

Location blockLocation = event.getClickedBlock().getLocation().add(0.5, 1.5,0.5);
Hologram hologram = HolographicDisplaysAPI.createHologram(this, blockLocation);
hologram.appendTextLine("Olá mundo!");
remote swallow
#

hover over it and click import class

fickle mortar
#

tried it but it just says to rename

remote swallow
#

did you make sure to reload maven?

static pulsar
#

If I want to create an enchantment that does something when the player kills a mob would I just have to listen to entity death event and check if the player has the enchantment?

fickle mortar
prisma jolt
#

Anyone willing to create a plugin for me?

#

I'll pay

remote swallow
#

?services

undone axleBOT
static pulsar
#

Is there any known bugs with PlayerTeleportEvent in 1.19.4? I can't seem to figure it out.

rotund ravine
#

?nowork

#

?notworking

undone axleBOT
#

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

static pulsar
#

@rotund ravine sorry I was previously talking about it and went to try figure out my issue, currently it seems like the PlayerTeleportEvent is being called twice, I am not getting an error but I am working on making a /back command and I am setting the last location in the PlayerTeleportEvent, it seems to work unless the server thinks the player moved too quickly in which case it seems to fire the event again and sets the from location to the original to location of the PlayerTeleportEvent.

wary mauve
#

If I pre-generate a world as a void world for like 100,000 block diameter, will that take up a lot of space, even if it's void?

echo basalt
#

uhh

#

somewhat

#

Let's see

#

100k diameter is uhh

#

100 000 ^ 2

#

divide that by 512 and that's the number of mca region files you have

wary mauve
#

okay

echo basalt
#

19 million mca files?

#

something like that

wary mauve
#

yeah...

#

will that take up a lot of space?

echo basalt
#

Each file is at least 8kb

#

which is its header

#

so yeah your 100kx100k world is at least 192gb

#

so no, not a good idea to pregen regions

#

There's also no point

#

just make a void generator

#

if you're doing a grid thing then like

#

either just use small disposable worlds or load stuff up on the fly

wary mauve
#

So my server uses 'microworlds', which is just what I call these 5x5 chunk areas. And in the background, it's copying microworlds from a reference world file into a void world. And the void world is where people play the game. Theres some lag when it starts a new microworld in a new spot, and I think its because its generating the chunks there

echo basalt
#

Generating void chunks wouldn't solve your lag

#

your lag basically comes from making the microworld itself

#

and copying it over

wary mauve
#

its work distributed

echo basalt
#

and?

#

Doesn't mean it's unstoppable, just means that it doesn't create all the lag at once

#

generating void chunks is nearly instant

#

I do it on my lil side project Cosmos all the time

wary mauve
#

Okay. So is the lag from just loading the chunks? Is it unavoidable if Im doing this?

final monolith
#

Some of the older versions (like 1.8)'s material enums isn't compatible with the newer materials from the newer versions, is there any public api/class that fix this?

remote swallow
#

XMaterial

final monolith
#

Thanks!!

wise mesa
#

Anyone know what mix of packets that BetterPortals plug-in uses to basically load the nether before you walk through the portal

#

So that the dimension changes almost instantly

#

When you walk through

#

I tried looking at the source code but it was confusing

chrome beacon
#

It would be the teleport packet

#

And preventing the client from thinking it switched world

wise mesa
#

Ah

#

But it still says loading terrain for just a moment

#

And do you have to somehow prevent the server from sending the regular dimension change packet

warm mica
#

Replace it with its regular packets and you are good

#

But don't mix it up with regular respawn due to death, as that will send two packets

wise mesa
#

Interesting

flat lark
#

How can I put my custom item into already existing loot tables.

orchid gazelle
quiet ice
#

Is there a difference?

torn shuttle
#

but you can't do that to blocks

#

also maybe this is a bit of a hack but I am pretty sure that if you are just copying the same chunks over and over you could probably cheat by not generating the chunks and just trying to duplicate chunk files to match the dimensions, not sure how much reverse engineering of the save chunk file structure that would require

#

but it should be a damned sight faster than doing it from in-game considering you can parallelize that as much as you want and your only cap is i/o speed

echo basalt
#

ehh

#

it's a bit picky

#

it depends on your grid

#

if you have enough of a distance you can ideally just copy over the .mca contents

#

if you have a smaller distance, if it's odd or a weird multiple you can run into issues where part of the contents may be segmented across multiple region files

echo basalt
#

or you can just use something like FAWE and make a clipboard

#

and not bother

#

just how I don't bother reading your 5th grader roasts

torn shuttle
torn shuttle
echo basalt
#

what the fuck is wrong with you

torn shuttle
#

I'm too sexy and too much of a gamer

echo basalt
#

also you don't return

#

on your if statement

#

which means

#

you're building shit twice

#

just a casual little side note

torn shuttle
#

I was in the middle of removing it, I just wanted to get a before and after screenshot in one go, it's called being efficient

#

not that you've ever heard of it

echo basalt
#

meanwhile I'm trying to figure out how to make those 2 map lines a bit cleaner

#

Because RandomMapPicker is one of many MapPicker implementations

torn shuttle
#

string ids are cringe

#

and not based

echo basalt
#

they're read from the config

#

and use a weird initializer system

torn shuttle
#

you heard me

echo basalt
#

"skywars" is the initializer id

#

weird ass logic but

torn shuttle
#

u-g-l-y you ain't got no aliby

#

I am adding static keys to every tower I make just so I don't have to call them by string

echo basalt
#

I could rewrite the map logic entirely, it's a bit scattered

#

true

#

but I gotta think this through

#

because like

#

you aren't limited to a single game impl per server

torn shuttle
#

you shouldn't because this is an easy thing I can keep making fun of you for not doing

echo basalt
#

and maps need to query a database for a schematic

#

idk looks like enterprise code

torn shuttle
#

not a single factoryfactory in sight

#

sad!

#

where are the generatorgenerators?

echo basalt
#

with some basic pasting logic

torn shuttle
#

where's the 15 years of code debt?

#

not enterprise at all

remote swallow
#

it always starts enterprise, ends up dog shit

echo basalt
#

pretty much

#

thing is

#

it's like 7:30am

#

I'm not gonna write peak code right now

torn shuttle
#

xcuses, I'm refactoring rn

echo basalt
#

especially because magma's bringing everyone's iq down with his stupidity aura

torn shuttle
#

and I'm close enough to you that I cold put you in a chokehold

echo basalt
#

I've put more thoughts into my lunch choice than you've put in your entire coding history

torn shuttle
#

that sounds like a mental illness bud

echo basalt
#

I didn't know you were a 14 year old depressed tik-tok addicted girl to be prescribing people like that

torn shuttle
#

I'm surprised you didn't realize that's exactly who I am

#

young and on fleek

echo basalt
#

if you're young then I'm a fucking toddler mate

torn shuttle
#

I tag the true love of my life xi jinping on every tiktok I make

#

you're just jealous of how young and hip I am

#

bet you've never seen such a beard on a 14yo girl

echo basalt
#

I have but it wasn't facial hair

#

welp I wiped the map code

#

gonna draw a diagram or something, can't think of anything at the moment

#

but I'd probably merge the registry and manager class

torn shuttle
echo basalt
#

are you mentally deranged?

sullen marlin
#

Wtf is going on here

echo basalt
#

I've seen seaweed more coherent than you

torn shuttle
#

illusion is trying to romance me again

echo basalt
torn shuttle
#

he can't resist the beard

echo basalt
#

I have a beard myself

sullen marlin
#

Who could

echo basalt
#

That's not the issue

torn shuttle
#

special service just for md5

#

I usually charge for these quality pics

#

but I just got myself a new forum signature with that quote

echo basalt
#

smiling with a black & white filter lmao

#

show the gun pointed at your face next time

torn shuttle
#

envy is a sin illusion

echo basalt
#

I'm so glad I'm not religious

sullen marlin
#

Ok nah it's too long now

#

Take it back

torn shuttle
#

that's blasphemy

#

a beard is never too long nor too short, it is always just right for the occasion

echo basalt
#

mans preparing for his downfall

#

can't wait for the day you end up on the streets and make a blanket out of it

#

keep going fam

torn shuttle
#

don't worry illusion I'm sure one day you'll be able to afford carpet of high enough quality to make something that resembles a fake beard

#

we're all going to make it brah

echo basalt
#

I can literally buy your entire city fym

torn shuttle
#

my city couldn't pay me to retain me, it's not exactly an accomplishment

echo basalt
#

maybe you should've gotten a van and some speakers. That's how circuses usually advertise, surprising you don't

torn shuttle
#

I've seen AI I can run locally that can keep better cohesion in a discussion than you

#

if you can't think of a good burn that continues the flow of the conversation you should ask gpt 1, it will do a better job

echo basalt
#

You've got 404 brain cells trying to figure out my very intricate reasoning that your circus business is running low on local customers and requires more advertising you pokemon

#

maybe you should get your gpt-1 algorithm to upscale your thoughts into something with a little more resolution

torn shuttle
#

ah I understand now, your brain is working on pokemon world logic. I'm surprised you've managed to stop yourself from saying your own name twice at the end of every reply

#

you did always strike me as a bit of a psyduck

echo basalt
#

ah, thought it was because resolution silently rhymes with illusion

torn shuttle
#

md_5 can I go back to having my cool username and then you can also change illusion's to delusion

echo basalt
#

just like cutifly rhymes with magmaguy, iq matching a literal butterfly, I'm rhyming with no particular reason why

torn shuttle
echo basalt
#

I can literally squish you between my fingers and you think life's all about being cute?

torn shuttle
#

that reminds me, I finally started dealifting

echo basalt
#

where did you stick the missing d?

torn shuttle
#

probably going to start clean and jerk in a few weeks

#

how much do you weight and how aerodynamic would you say you are?

#

I'm aiming for the 500m mark single handed delusional person throw off a cliff

echo basalt
#

how stab resistant is your lower abdominals?

torn shuttle
#

practically steel, I recommend you show up with a vibrating blade and an army

echo basalt
#

I wish we were on 2017 so I could monetize your death with a video titled "1000C hot knife vs hobo"

torn shuttle
#

is this one of those videos where it then shows up on the news how the person filming managed to stab themselves in their own confusion, sort of like a psyduck?

echo basalt
#

what's that shit you've been smoking and how much does it cost? cause I need some of it

regal scaffold
#

Anyone know how to convert BUkkit.location to CMILocation?

echo basalt
#

uhh

#

check how cmi does it lmao

chrome beacon
#

CMI 💀

regal scaffold
#

I hate having to support these ass plugins

#

But whatever

torn shuttle
regal scaffold
#

You're kidding me

#

It's in his lib

#

Not in his API

echo basalt
#

my man

#

yeah it's just a constructor

regal scaffold
#

I can't access it from the API though

#

So I need to include his ass lib too

remote swallow
#

you also need to depend on cmi lib

regal scaffold
#

Lovely

remote swallow
#

exacty

regal scaffold
#

I love this

remote swallow
#

this is why we hate cmi lib

regal scaffold
#

Players still use it

#

'

echo basalt
#

CMI's a fucking disgrace

regal scaffold
#

I despise it

torn shuttle
#

admins still use it

echo basalt
#

and it's marketed as the "properly written" version of essentials

#

I gotta step in eventually

chrome beacon
#

CMILocation is just a regular bukkit location with extra steps 💀

remote swallow
#

its awful, support is dog shite, docs are dog shite, api is dog shite

regal scaffold
#

Well guess what

#

Can't use location bukkit

#

Cause the idiot

#

Decided to not support it at all

#

Just to be a pain

torn shuttle
chrome beacon
regal scaffold
#

The constructor is in his lib

#

Not his api

torn shuttle
#

I really don't like plugins that implement custom location classes

regal scaffold
#

So I gotta add both lmao

chrome beacon
#

Yeah

torn shuttle
#

they don't even really do anything custom with it

static ingot
echo basalt
#

I do have my own 3d vector classes but those actually provide utility

regal scaffold
#

BRO

#

BRO

echo basalt
#

and by utility I mean

regal scaffold
#

???????????????????????????????????????????????????

#

This guy

echo basalt
#

I don't use them in a minecraft context

regal scaffold
#

Doesn't even know how to use

#

a proper repo

chrome beacon
echo basalt
#

and I can store them in a db and all

echo basalt
regal scaffold
#

I had to build his api locally

#

Now gotta do this dumb stuff with his lib too

torn shuttle
remote swallow
static ingot
#

isn't cmi a premium plugin anyway? so you have to buy his premium plugin to be able to do stuff that the api doesn't cover? lmao

torn shuttle
#

if you want to make an api the priority should be on the ease of use of the api not the ease of programming everything else

echo basalt
#

if you want a multi platform thing then you wouldn't slap a bukkit location constructor and allow all kinds of classloading issues

#

this looks wrong

#

no caching either yikes

#

this is used every time you send a command

tardy delta
torn shuttle
#

more like essentials 32.0

#

everyone and their grandma has made an essentials alternative

tardy delta
#

it took over my elytra speed lol

echo basalt
#

??

static ingot
chrome beacon
tardy delta
#

well when flying with an elytra it basically modifies your flying speed

#

i believe that was cmi

echo basalt
tardy delta
#

essentials is bad too

#

i once based my plugin design on that and it went brr

echo basalt
#

essentials is the definition of tech debt

#

cmi is the definition of mental asylum

chrome beacon
torn shuttle
#

eternaltd is the definition of a prototype with ambitions of feature creep

echo basalt
#

if... you can call that code

#

because it looks like someone just spat on my screen

torn shuttle
#

oh damn seems like I need to pay the cmi dev for a second copy then

chrome beacon
#

That screenshot doesn't contain the word CMI?

echo basalt
#

ahh

#

yeah it's cmi, same class I mentioned on the screenshot above

#

it also uses data from the screenshot above

#

not trivial overall

torn shuttle
#

well I think I'll figure out how I want to do elemental damage in this tower defense game tomorrow

#

ngl designing and tweaking waves for this is more of a pain than I ever suspected

#

every time I add a feature I have to replay the whole thing several times

regal scaffold
#

Hey

#

I just finished making a system so that any of 3 hologram plugins can be chosen

#

Using a abstract class

#

Is it possible to listen to plugin specific interact method using this system too?

remote swallow
#

is it 1 event u wanna listen to or multiple

regal scaffold
#

just 1

#

But they are different for each

remote swallow
#

one moment

regal scaffold
#

I'm thinking I can register the listener from within the implementation

remote swallow
#

i have code just for it lol

regal scaffold
#

That way it'll be different

regal scaffold
#

I did it

#

I'll look anyways

#

Thanks!

tender shard
#

why does everyone hate essentials lol

chrome beacon
#

It has some poor and old code

#

but I don't hate the plugin since it works just fine and I haven't found any bugs with it

grizzled oasis
#

How can I catch all the errors in one section and do the same thing for all the errors like a universal catch

tender shard
#

expect many gradle questions from me today, I try to create a basic multi module project in gradle

tender shard
ivory sleet
#

Groovy or kotlin?

tender shard
#

idk

ivory sleet
#

You can catch Throwable, but like that should be avoided unless very specific things where u risk dead locks or other severe states

grizzled oasis
#

Ok thanks for the help

tender shard
#

ok I'm already confused, I used gradle init and now it created a subfolder called "lib" where my build.gradle is inside?

#

is "lib" supposed to be my "parent pom"?

remote swallow
#

the reason we dont use gradle init

tender shard
#

okay so in settings.gradle I got the "rootProject.name" declared, is this also where I define the group id and version?

agile anvil
#

This is so weird

tender shard
#

and what is my "parent pom"?

remote swallow
#

this is my settings.gradle for my multi module project

rootProject.name = 'epicspigotlib'
include 'epicspigotlib-core'
include 'spigot-1_17_R1'
include 'spigot-1_18_R1'
include 'spigot-1_18_R2'
include 'spigot-1_19_R1'
include 'spigot-1_19_R2'
include 'spigot-1_19_R3'
remote swallow
tender shard
remote swallow
#

there is a parent build.gradle it wouldnt work otherwise

tender shard
#

this is their example and it does work without a "parent build.gradle"

remote swallow
tender shard
#

I want to do it the official way though

remote swallow
#

kotlin yuck

#

offical way gets you no help from me, i dont use kotlin or have it setup like that

regal scaffold
#

Love how CMIHologramClickEvent

#

Just doesn't work

#

Maybe I'll get a response in 3-5 business days

chrome beacon
#

Probably not

tender shard
#

I waited for more than a year and still did not get any response from zrips

tender shard
remote swallow
#

the plugins section is at the top, then in the all projects you do apply plugin: 'id'

tender shard
#

ok thx

#

another thing, I declared mavenLocal() in paret repositories:

#

still, the sub projects can't find spigot-api

remote swallow
#

is the maven local on allprojects or just in the parent

tender shard
#

ah, it's in the normal repositories. can I just move that whole block into allProjects?

remote swallow
#

yeah

tender shard
#

thx, that worked

#
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8

can I also move this into allProjects?

tender shard
remote swallow
#

yeah, thats only there bc paper want java 16/17 for stuff

tender shard
#

tbh now I don't understand how to compile

#

when I run gradle build i only get a javadocs jar

remote swallow
#

gradlew build

#

oh

#

do gradlew shadowJar

tender shard
#

thxx

#

worked

remote swallow
#

if its a plugin only you can remove all the javadoc and publishing stuff

tender shard
#

hm my javadocs jar seems to be empty

remote swallow
#

does the allprojects{} have the java { withJavadocJar() }

tender shard
#

@remote swallow I currently got this: https://github.com/mfnalex/lunatic
gradlew shadowJar properly creates a .jar with both my modules (core and data-structures). but the javadocs jar is empty

GitHub

Contribute to mfnalex/lunatic development by creating an account on GitHub.

tender shard
#

wait, withJavadocJar is inside subprojects, not allprojects - but that's how you did it too

remote swallow
#

thats fine

round finch
#

is it possible to include non spigot plugin apies into a plugin?

tender shard
#

sure

remote swallow
#

does the javadoc jar get contents on gradlew build

tender shard
#

lemme see

round finch
tender shard
remote swallow
#

aslong as you shade them year

round finch
#

where i put the jar api file?

tender shard
#

Why dont you shade it

round finch
#

shade it? wut

#

put it into the plugin resources?

remote swallow
#

how have you gotten this far and not know what shading is :skull

#

you include the jar inside yours, so eg i shade my lib into stuff so all its classes are in my project

round finch
#

lost confusion

tender shard
tender shard
round finch
#

I were thinking about taking any jar api I wanted and just extend it to my spigot plugin

#

maven is the way?

remote swallow
#

do you not use maven?

#

or gradle

round finch
#

idk gradle

tender shard
#

you don't know?

round finch
#

yeah i havn't learned it

tender shard
#

which library do you want to use?

round finch
#

Not... sure yet

#

i havn't thought enough about it

tender shard
#

ok then ask again when you know. almost everything is on maven central, which means you can just add it to your pom or build.gradle file

tender shard
round finch
#

i can do maven lel

#

but gradle i don't know anything about that

tender shard
remote swallow
#

i dont get aggregate java doc, but add ```
build {
dependsOn(shadowJar, aggregateJavadoc)
}

tender shard
#

when running build

remote swallow
#

you can also remove the ```
java {
withJavadocJar()
}

tender shard
remote swallow
#

thats what the aggregate javadoc jar does

#

look in build/docs

tender shard
#

yeah there it is, but the actual javadoc .jar is empty

remote swallow
#

isnt empty for me

#

idfk why they dont copy the aggregated jar to build/libs but it works

tender shard
remote swallow
#

that is empty

#

bc its the non aggregated jar

tender shard
#

Bc iirc i need that to be there so that publishing works properly i guess?

remote swallow
#

publishing doesnt care about that

tender shard
#

Hm ok thx then i‘ll try later whether publishing works, gotta go in 20 minutes. Thanks very much so far

remote swallow
#

in my publishing block i specify publication.artifact(jarTask) and it then adds said jar to the publish

tender shard
#

where do I declare the SECRET?

remote swallow
#

windows or mac

tender shard
#

win

remote swallow
#

open the search bar and type env then open the first otion, then press the Environment Variables near the bottom, then just create a new user variable called whatever you like which has the key, then you just add the System.getenv("whatyoucalledit")

tender shard
#

oh the general system vars? oh I'd rather not do that, in that case literally every process could read the secret

#

I mean it's only for the repo, but still

remote swallow
#

only other option is adding it to the global gradle.properties and using $name but that errors if anyone clones the project and the key doesnt exist

tender shard
#

hmm for testing I'll just insert it directly, then check out later how I can improve it

#

okay how do I run publish? first shadowJar, then publish?

#

or only publish?

remote swallow
#

just publish

tender shard
#

great, it works! thanks

remote swallow
#

oh also on the group, dont include the artifact id, thats added as the rootporoject.name

tender shard
#

wdym?

remote swallow
tender shard
#

oh ok I wanted to do that because in maven, I used to have
com.jeff_media.jefflib.jefflib-core
com.jeff_media.jefflib.jefflib-spigot1.19
etc

#

I just see, gradle ONLY publishes the whole thing, not each module - can I make it publish both? the "aggregated" total project, and each single module?

remote swallow
#

yeah gradle doesnt require that lol, we can directly depend on the jars built

remote swallow
tender shard
#

I'd like my repo to look like this:
com/jeff_media/lunatic
| lunatic (the whole thing)
| data-structures
| core
| etc

tender shard
remote swallow
#

aggregate javadoc jar adding and javadocJar adding

#

wouldnt work sadly

sullen marlin
#

Why are you gradle

remote swallow
#

he does it every few weeks

tender shard
#

to learn things. and because one of my projects takes 3 minutes to build

remote swallow
#

this is the furthest we've gotten

tender shard
#

I'll try publishing the modules separately when I'm back from uncle doctor

#

boyfriend needs a new "sick leave notice" lol

sullen marlin
#

Sus

tender shard
#

I'm really uncomfortable using gradle, e.g. this, the syntax is so weird

#

but maybe, someday I'll understand lol

#

my goal for today is to just get it working, then I'll spend time on understanding why it looks like it looks. e.g. why are some things project.shadow.component(publications), others are { } blocks, sometimes there's a -> sign, sometimes it's just a normal like "url = ..." and sometimes it's just apply plugin: 'java'

#

that's like 50 different syntaxes lol

#

ok gotta go now, bb

sullen marlin
#

Yeah idk why there's a shadow specific to publication? That seems weird. How do you replicate it without publishing

remote swallow
#

what

sullen marlin
#

Also isn't there a config file for the password? Rather than your project lol

remote swallow
#

system env, or gradle.properties

#

2nd one is worse

eternal night
#

yes, you usually want them in your ~/.gradle/gradle.properties

remote swallow
#

that makes it error if someone else doesnt have the key too

eternal night
#

this does too ?

remote swallow
#

system.getenv doesnt error for others

eternal night
#

I mean, it still errors on upload ?

remote swallow
#

well that will, the gradle.properties thing i mean it errors if you try to do anything

eternal night
#

Well, you don't directly ref them

vestal sinew
#

I want to make a plugin for drawing on map (canvas) that hang in a itemframe, but I don’t understand how to get a pixel on this map in a itemframe that the player clicks on with, say.. orange dye.

keen ferry
#
        if (block.getBlockData() instanceof Bed bed) {
            bed.setPart(Bed.Part.FOOT);
            block.setBlockData(bed);
        }
        if (block.getBlockData() instanceof Directional directional) {
            directional.setFacing(BlockFace.EAST);
            block.setBlockData(directional);
        }
        if (block.getBlockData() instanceof Waterlogged waterlogged) {
            waterlogged.setWaterlogged(true);
            block.setBlockData(waterlogged);
        }

I change the block data of a block based on its type, however, I don't want to update the block data multiple times if it fits into multiple if statements, any ideas on how I could set the block data once?

rough drift
#

How can I check if a player successfully blocked an entity attack w/ a shield?

rough drift
eternal night
#

I mean

final BlockData blockData = block.getBlockData();
final BlockData currentState = blockData().clone()
if (blockData instanceOf final Bed bed) {
  bed.setPart(...);
}

if(!Objects.equals(currentState, blockData)) block.setBlockData(blockData);
primal goblet
#

I need to handle a cracked server login with two bungee servers
Ia there's a way to make the login server outside the bungee or smth like this?

remote swallow
tender shard
#

I'm on the laptop now, waiting in the car lol.

keen ferry
keen ferry
west scarab
#

Hello, Im trying to load in a plugin i made. however when i do /plugman load it doesn't show up and if i type it in it says invalid plugin.

remote swallow
#

a) dont use plug man b) check console

west scarab
#

nothing is in console it wont even load when server restarts

tender shard
west scarab
remote swallow
#

check console on startup

#

send the erro

remote swallow
west scarab
#

says invalid plugin.yml

tender shard
west scarab
#
name: Combine
version: '${project.version}'
main: com.combine.Combine
api-version: 1.18
prefix: [Combine]
softdepend: [PlaceholderAPI]
authors: [_Name_12_]
description: The best of both worlds, Combine!

commands:
  setlink:
    permission: backlink.admin.setlink
  discord:
  link:
  ban:
    permission: portal.ban
  mute:
    permission: portal.mute
  kick:
    permission: portal.kick
  warn:
    permission: portal.warn
  mutechat:
    permission: portal.mutechat
  clearchat:
    permission: portal.clearchat
    aliases: [ clearc, cc ]
  autoperm:
    permission: portal.autoperm
  vanish:
    permission: portal.vanish
  staffchat:
    permission: portal.staffchat
    aliases: sc
  vanished:
    permission: portal.vanish
  unban:
    permission: portal.unban
  unmute:
    permission: portal.unmute
  report:
    cooldown: 1 minute
    cooldown-message: you can't do this that fast!
  autogroup:
    permission: portal.autogroup
  freeze:
    permission: portal.freeze

permissions:
  staff:
  portal:
  portal.ban:
  portal.mute:
  portal.kick:
  portal.warn:
  portal.mutechat:
  portal.clearchat:
  portal.autoperm:
  portal.fly:
  portal.unban:
  portal.unmute:
  portal.vanish:
  portal.mutechat.bypass:
  portal.staffchat:
  portal.*:
  portal.autogroup:
  portal.freeze:```
#

edited ^

remote swallow
#

that permission sectionis currently pointless, same with the discord + link in commands

tender shard
# remote swallow give me a few min to just test some stuff

I thought changing the "moduleName" var in the publishing section to "lunatic-" + moduleName, but I guess that would break dependencies, because if someone would clone the original repo, it'd look for "core" but can only find "lunatic-core"

#

basically, all I wanna do is change the module names to "lunatic-modulename" without actually renaming the folder

remote swallow
#

ah, that isnt too hard

west scarab
#

i removed permission section

remote swallow
#

add a description to them atleast so it isnt an empty section, doubt its happy about that

tender shard
tender shard
west scarab
#

yeah i fixed that

remote swallow
#

?paste

undone axleBOT
west scarab
#

thx

#

error that im getting

#

weird cause there is a plugin.yml under resources

remote swallow
#

how are you building

thin frost
#

Does minecraft monsters marked as persistent take up CPU resources even when no player is near?

west scarab
#

just the run package button on intellij

remote swallow
remote swallow
west scarab
remote swallow
#

upload the jar here

west scarab
remote swallow
#

yeah that jar doesnt contain a plugin.yml,

#

?paste your pom

undone axleBOT
west scarab
remote swallow
#

the pom is correct, press controll twice and type mvn clean package

#

then try with that jar

west scarab
#

building rn

#

restartin

remote swallow
#

which jar do you take out of /target/

west scarab
#

Combine-1.1

remote swallow
#

im confused how that doesnt have a plugin.yml, send a ss of your filetree

west scarab
remote swallow
#

this in ij

west scarab
remote swallow
#

the resources folder is in src/main/ right, in that ss it looks like its in your package

west scarab
#

here's a better screnshot

#

ur right that shouldn't be there

remote swallow
#

yeah thats in the java package, it needs to be in src/main, so its path is src/main/resources

west scarab
#

that's really weird i don't think that's ever happened before,

west scarab
remote swallow
#

the shardManager in ur main class is null

west scarab
remote swallow
#

do you create a jda instance onenable

west scarab
#

onenable?

remote swallow
#

onEnable

west scarab
#

OH

remote swallow
#

im gonna say its the new Object[] for the listeners

west scarab
#

i fixed it

#

i believe everything is fixed now, thank you so much for helping me i wouldn't have caught that.

remote swallow
#

iirc that accepts varargs so you can do builder.addEventListeners(new chatEvent(), new readyEvent(), new slashCommands())

flat lark
#

Is "LootTables.ABANDONED_MINESHAFT" a proper loot table. I'm using an arraylist

rough drift
#

yes

rough drift
#

Is there a way to check if a player is blocking when they get attacked?

#

(Like if there should be damage applied or not because of a shield)

chrome beacon
#

player#isBlocking

tender shard
rough drift
# chrome beacon player#isBlocking

That only checks if they have the shield up even if they are turned around, there is DamageModifier.BLOCKING but that's deprecated for some reason

chrome beacon
#

All damage modifiers are deprecated since they were planned to be removed

#

that never happened though so you can use them

rough drift
#

oh

#

thanks

tender shard
#

gradle is confusing. I moved the maven-publish plugin from "subprojects" to "allprojects". then it complained about "what is groupId" in publishing section of subprojects. then I moved subprojects BELOW all projects, and now it seems to work again lol

#

@remote swallow Sorry to bother again, but ALL the published artifacts (lunatic-core and lunatic-data-structures) are the fully shaded jar with all modules included

rotund ravine
#

Yeee the order is important

remote swallow
#

oh tf?

tender shard
#

current code: https://github.com/mfnalex/lunatic

goal: I want it to publish "lunatic" with all modules shaded, and all modules separately (lunatic-core, lunatic-data-structures) with only that one module in the .jar
issue: all published .jars are the "fat jar"

GitHub

Contribute to mfnalex/lunatic development by creating an account on GitHub.

remote swallow
#

im so confused why its the all shaded jar for all of them

#

oh

#

i realise what i did

tender shard
#

I also don't understand why it complains about this, while it does work fine (except the above mentioned issue)

rotund ravine
#

Groovy always complains

tender shard
#

hm ok lol

remote swallow
#

so its not what i thought it was

tender shard
rotund ravine
#

Idk not home to look at it for 4-5 hours, just responded on my phone.

tardy delta
#

me dealing with a 500 lines build.gradle 🥲

remote swallow
#

im so confused

#

building gives the correct jars

flat lark
rotund ravine
#

Ok?

tender shard
#

it however is the correct jar, but why does it have this name

remote swallow
#

i noticed that and im confused why tf its always the fully shadedjar

tender shard
#

I think I fixed it

#

lemme try

#

first, I switched the subprojects publishing setting to use "maven" instead of "shadowJar" and "javadocJar" instead of "aggregateJavadocJar"

#

and sth else, lets check first whether it works lmao

#

my current version seems to be working fine @remote swallow

#

except for the fact that core/build/libs is still only called "core.jar" instead of "lunatic-core-1.2-SNAPSHOT.jar"

remote swallow
#

thats what the shadowjar was doing

#

oh

#

the build/libs doesnt matter

tender shard
#

ok lemme try publishing to maven local

remote swallow
#

thats onlyever needed for running gradlew build

tender shard
#

if that works fine, I'm all good :3

remote swallow
#

i think it should

tender shard
#

yep, all works fine I guess! :3

#

also got junit working

remote swallow
#

yeah junit isnt hard to add

tender shard
#

yeah but I was confused about whether to add it to subprojects or allprojects

remote swallow
#

you can move everything in all projects to subprojects because its all in modules

tender shard
#

I am also still confused why I have to declare "plugin: java" at the top of root build.gradle but then still apply it to allprojects

#

true

remote swallow
#

this is the furthest we've gotten with you and gradle

tender shard
#

you have to admit, it took hours and was much more complicated than in maven though 😛

#

but yeah I'm learning and managed to fix the last thing myself, I am very proud of myself lol

#

now I'm at 1% gradle skill, instead of 0.5% that I had before lmao

#

so, thanks again

remote swallow
#

it did take hours but we did fix it

#

this is weird

#

it doesnt compact test packages or add formatting to test classes

tender shard
#

It does for me

#

Maybe you gotta right click -> mark as test sources root

#

On the java folder

hybrid spoke
tender shard
#

Why is it weird

hybrid spoke
#

looks like an off-by-one situation and assertions should only be made at the end of the test

tender shard
#

Wdym with off by one

hybrid spoke
#

it could fail in the next step

#

you tested for 6, but what if it fails at 7

#

you shouldnt have fixed numbers in your tests

tender shard
#

It cant, the turnaround is at 5 already

tender shard
hybrid spoke
#

isnt one enough?

tender shard
#

Cant hurt to test it anyway

young knoll
#

What is lunatic XD

tender shard
#

my testing project to learn gradle

#

i couldnt decide whether to call it "Lunatic" or "Crackpot"

remote swallow
tender shard
#

very bottom

remote swallow
#

oh it was the mark as

#

now i can do unit tests

river oracle
#

You gotta mark it in intellij? Shouldn't it just recognize src/test

proper notch
#

In theory it should just pick it up from your build tool yh

tribal quarry
remote swallow
#

i found it

tribal quarry
#

Nice

river oracle
remote swallow
#

hi mr 2k

west scarab
#

is it possible to make this not send to console?
[12:12:14 INFO]: Named entity EntityEndermite['sadcece's Endermite'/161927, uuid='a837dc10-1edb-4ae3-9bc2-fc158290e11d', l='ServerLevel[plots]', x=617.80, y=-13.00, z=581.18, cpos=[38, 36], tl=128, v=true] died: sadcece's Endermite fell from a high place it spams console for different mobs it there a way to disable all that

agile anvil
west scarab
#

thx

rose trail
#

i want to make a bungeecord plugin with an api, will the api be available on all servers connected to the proxy?

remote swallow
#

if you have a way to message between th servers yes

#

redis would be the better option

rose trail
#

i want to create api for economy

#

what to choose?

remote swallow
#

if its global eco you can load it from a db when they join a sub server, then save it when they leave

rose trail
#

thank

tender shard
#

Can I exclude generating javadocs for all modules inside nms/ folder epic?

#

somehow generating javadocs takes AGES once I add paperweight userdev

#

and that module only has one method lmao

tardy delta
#

💀

#

id probably use reflection for that

tender shard
#

good luck

#

you do realize it has a different name in every version right? lol

tardy delta
#

map it 💀

tender shard
#

why the heck does gradle take 7 minutes to aggregateJavadocs

remote swallow
#

i dont have that issue

#

run aggregateJavadoc once then it should fix it iirc

tender shard
#

maybe the issue is that I moved my nms module sinto a subfolder

#

I had it inside nms/1.19.4, then declared it like this

include '1.19.4'
project(':1.19.4').projectDir = new File('nms/1.19.4')
agile anvil
tender shard
remote swallow
#

my builds take like 3 seconds, including publishing

tender shard
#

can you check my repo again pls?

#

I only added a nms-1.19.4 module with paper usershit, and now it's completely broken

remote swallow
#

yeah

#

there is none of the nms stuff on the repo

tender shard
#

oh huh mb wait

remote swallow
#

oh i found it

#

wait

#

nope there isnt an nms module

tender shard
#

now

remote swallow
#

yep just waiting for intellij to cooperate

#

1 issue is userdev 1.5.4, doesnt support gradle 7

#

in /gradle/wrapper/gradle-wrapper.properties change the gradle-7.3.3 to gradle-8.1.1

tender shard
#

ok I'll try

#

I wonder why it used 7.3.3 in the first place on a fresh project

#

but it's weird because it did decompile etc just fine

#

ok paper wants to set itself up again

#

did it work for you though?

#

or is it also stuck at aggregateJavadocJar?

remote swallow
#

im just waiting for paper to download its dev bundle

#

bc gradle made me clear caches

tender shard
#

still stuck at aggregateJavadocJar on 8.1.1

remote swallow
#

so i just ran javadoc by itself and thats erroring

tardy delta
#

looks like i fucked up

remote swallow
tender shard
#

gets better and better

west scarab
hybrid spoke
#

?notworking

undone axleBOT
#

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

remote swallow
#

dont replace the plugin jar while the servers still running

worldly ingot
#

Avoid plugman if possible

remote swallow
#

hi choco

worldly ingot
remote swallow
worldly ingot
#

I dunno man. I hate Gradle lol

remote swallow
#

you literally use it on veinminer

west scarab
remote swallow
#

yeah, jda doesnt like you replacing the jar or using plugman to reload it

tender shard
#

this is the issue I'm getting with the current version from github epic:

worldly ingot
#

I still hate using it

remote swallow
tender shard
#

I set the toolchain to 1.8 for the parent, and 17 for the NMS thing. I could easily fix this by just telling gradle to ignore javadocs for nms modules, but... how?

west scarab
remote swallow
#

yes

remote swallow
west scarab
# remote swallow yes

what do i do for the future, as i have players online and can't restart the server everytime

remote swallow
#

test locally

remote swallow
#

yes

#

thats nice

#

i cant even generate javadocs

tender shard
#

thx, that worked. now it complains about mockbukkit requiring java 17. can I set a toolchain specifically for the test task?

#

omg I think I got it to work

remote swallow
#

uh idk, im just debbuging the agg javadocjar thing and it looks constantly locking a registry

tender shard
#

also it's general gradle questions, nothing specific about paper

#

also paper people tend to just reply "just use java 17"

#

my current gh version seems to be working fine :3

remote swallow
#

is the aggregate javadoc working now

tender shard
#

yep, I had to ignore the NMS classes, set the general toolchain to 1.8, set the toolchain for compileTestJava to 17, and the paper one to 17 too

opal juniper
#

you failed at ban evading!!?? omegalul

tender shard
#

wdym?

remote swallow
#

oh my aggregate javadoc jar

opal juniper
#

you

remote swallow
#

it just worked

opal juniper
#

your alt got banned

tender shard
#

my spigot alt got unbanned

opal juniper
#

cause you leaked your actual username in an image

tender shard
#

wdym

#

I have many accounts that could join paper but I don't see any reason to, first of all almost everyone there's quite unfriendly, and second whenever I would send any of my code, people could already see from the groupid it's me

#

people here are like, way more helpful lol

opal juniper
tender shard
urban mauve
#

why event.getBlock() #BlockBreakEvent return not exact block what was broken?
i checked it and for unknown reason it return not this block

eternal oxide
#

how did you "check" it?

urban mauve
eternal oxide
#

I ask how you checked it because they are correct

#

event.getBlock() is the block which was broken

urban mauve
remote swallow
#

im so confused what aggregate javadoc is stuck on

eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

tender shard
#

it breaks whenever it needs to access any of the NMS classes

#

is there a gradle scope for "compileOnly and testImplementation"?

#

so I don't have to declare everything twice?

#
    compileOnly project(':data-structures')
    testImplementation project(':data-structures')

    compileOnly project(':nms-generic')
    testImplementation project(':nms-generic')

    compileOnly project(':nms-1.19.4')
    testImplementation project(':nms-1.19.4')

Is there sth like compileOnlyAndTestImplementation lol

orchid gazelle
#

compileOnlyAndTestImplementationAndDebugAndFixMyCodePlease

eternal night
#

well

#

not a configuration

#

but you can configure the testImplementation configuration to extend from the compileOnly configuration

remote swallow
#

no idea if it'll work

eternal night
#

yea or just normally extend it

#

¯_(ツ)_/¯

tender shard
#

yeah well this won't work

#

because gradle toolchains don't allow to specify a target level, and paperweight requires toolchains

#

is there any workaround for this?

eternal night
#

I mean, use a multi release jar I guess ?

tender shard
#

this is a library I wanna shade into all my plugins, would be extremely annoying if I wouldnt be able to simply tell gradle "use jdk 17 but don't use the --release option, but just --target and --source"

#

I already tried printing out the compilerArgs but it's empty, however when I add "-target 8" to the list, it complains that can't be used together with --release

#

so the --release arg somehow gets added later, and now I'm trying to remove it

eternal night
#

toolchain won't let you

#

what prevents a multi release jar ?

tender shard
# eternal night what prevents a multi release jar ?

then I'd have 2 versions of my lib, which means I would also would have to create 2 versions of each of my plugins, that means if there'D actually be any updates needed for 1.20, I#d have to upload 40 versions to spigotmc

#

but I think I did the job by getting rid of any toolchain / source/target declarations in the parent build.gradle, instead set the toolchain manually to 8 for all modules, except the NMS modules that require 17 (where I set the toolchain to 17), and in the actual core module that depends on all other modules, I have set the source/target level to 8, without a toolchain, and run gradle using jdk 17

#

and that seems to work

#

holy shit it actually worked

eternal night
#

just make sure to depend on the reobfuscated sub modules then

tender shard
#

yep, sure

#

seems correct

#

I'll just test it in 1.19.4 and 1.16.5 and if it actually works, I will be very happy

#

it works :3

slim wigeon
#

Since you the creator of these plugins @tender shard , how did you obfuscate the code to where its hard to read?

tender shard
#

hm would you people rather throw NMSNOtSupportedException, or just return false if NMS is not supported for this version?

slim wigeon
#

Thanks

zealous osprey
zealous osprey
charred blaze
#

how do i check if my plugin's optional dependency is installed on the server?

tardy delta
#

Bukkit.getPluginManager().getPlugin("x") != null

#

or isPluginEnabled

zealous osprey
#

^

slim wigeon
charred blaze
#

how do i register dependency as optional one?

#

(in plugin.yml)

tardy delta
#

soft-depend: x

charred blaze
#

Plugin's original name right?

tardy delta
#

or softdepend, nobody knows, and yes

#

name from their plugin.yml

charred blaze
#

SuperiorSkyblock2

#

for this one

#

right?

tardy delta
#

uh ig

charred blaze
#

ok

spare prism
#

?paste