#dev-general

1 messages · Page 238 of 1

quiet depot
#

best way to learn is to look at other people's code

oak coyote
#

Yeah although factions has some interesting parts it does a lot right

quiet depot
#

I wouldn't be looking at factions for inspiration of anything

oak coyote
#

Like it was why I realised interfaces are cool

quiet depot
#

bad code

oak coyote
#

Yeah I mean likely just the interface use but still

#

About all it has going for it but still

#

Something I wasn’t using at the time so good to see

quiet depot
#

there's only like 2 projects in mc that have good code, that I can think of off the top of my head

#

sponge & luckperms

oak coyote
#

I still think my favourite development change I made was object oriented coding

#

It is so nice

quiet depot
#

it's old fashioned

#

I wouldn't get used to it

#

probably going to have to switch eventually

oak coyote
#

😢 to what?

quiet depot
#

idk

#

bm thinks functional is going to take over

#

or hopes it will

#

I personally don't care

#

i'll learn whatever I have to

oak coyote
#

I really like objects and being able to store lots of temporary data in one area

quiet depot
#

I like it too, but oop is the only paradigm I know, so there's nothing I can compare it to

oak coyote
#

Yeah I’m still debating whether to program my own game just for some change

quiet depot
#

game development is boring af

#

wouldn't recommend

#

although if ur wanting to learn a new paradigm ig it's fine

oak coyote
#

Yeah I kinda like optimising it’s quite fun

quiet depot
#

game dev is mostly dop/dod these days afaik

#

optimizing is a huge part of game dev don't get me wrong

#

but to get there, you've got to do a load of boring shit first

oak coyote
#

Yeah you can create games without any coding knowledge nowadays

quiet depot
#

like really really boring shit

oak coyote
#

Yeah sometimes it can be very tedious

quiet depot
#

@pallid gale u doing giveaways today or do I get to mess them up again?

oak coyote
#

But the result is always good eventually

#

You messed them up?

quiet depot
#

well

#

not exclusively my fault

#

bot fucked up

#

i tried to fix it

#

didn't go well

oak coyote
#

Poor Barry

quiet depot
#

not barry

#

giveawaybot

oak coyote
#

Ohh right yeah

quiet depot
#

this is why we don't outsource things

#

always goes wrong

pallid gale
quiet depot
#

oh no

oak coyote
#

It’s funny you have a community of devs but you still use a public bot for giveaways

pallid gale
#

Less chance of being rigged

quiet depot
#

never again

distant sun
#

Lmao pig

oak coyote
#

🙄 what does it do?

quiet depot
#

idek

distant sun
#

Exactly, nothing

oak coyote
#

That is a lot of rules

distant sun
#

The community at it finest

oak coyote
#

So if someone makes disgusting code I can’t fix it

#

That would drive me insane

quiet depot
#

yep

oak coyote
#

I’d rebel I swear

#

So what was the purpose of it? Just a test

quiet depot
#

was just a bit of fun

#

anyway if you were to rebel

oak coyote
#

Of course

#

That is a very small commit limit ngl

#

I swear that is like 1 maybe 2 methods per commit

quiet depot
#

yeah it was meant to be difficult

oak coyote
#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

oak coyote
#

My man zod wanting to watch the world burn

#

Like why!

#

Kotlin is neat with extended functions

ocean quartz
#

Kotlin is awesome

quiet depot
#

d;methods player

ruby craterBOT
#
1.16.4
org.bukkit.entity.Player
Methods:
org.bukkit.entity.Player#sendSignChange
org.bukkit.entity.Player#getLevel
org.bukkit.entity.Player#setPlayerTime
org.bukkit.entity.Player#getAllowFlight
org.bukkit.entity.Player#setPlayerListName
org.bukkit.entity.Player#getPlayerListName
org.bukkit.entity.Player#setDisplayName
org.bukkit.entity.Player#getHealthScale
org.bukkit.entity.Player#getPlayerListHeader
org.bukkit.entity.Player#isSprinting
org.bukkit.entity.Player#getAddress
org.bukkit.entity.Player#setAllowFlight
org.bukkit.entity.Player#setFoodLevel
org.bukkit.entity.Player#getFlySpeed
org.bukkit.entity.Player#playEffect
org.bukkit.entity.Player#setPlayerListHeader
org.bukkit.entity.Player#sendTitle
org.bukkit.entity.Player#isFlying
org.bukkit.entity.Player#resetPlayerWeather
org.bukkit.entity.Player#getPlayerTimeOffset```
Description:

Represents a player, connected or not

hot hull
#

Weak

quiet depot
#

it's off

#

there i turned it back on

hot hull
#

Imagine not making it so you can click a method in the embed and it shows details for that method

quiet depot
#

you'll have to do a new command lol

hot hull
#

d;methods player

ruby craterBOT
#
1.16.4
org.bukkit.entity.Player
Methods:
org.bukkit.entity.Player#setCompassTarget
org.bukkit.entity.Player#sendRawMessage
org.bukkit.entity.Player#setBedSpawnLocation
org.bukkit.entity.Player#getBedSpawnLocation
org.bukkit.entity.Player#resetTitle
org.bukkit.entity.Player#setSleepingIgnored
org.bukkit.entity.Player#isPlayerTimeRelative
org.bukkit.entity.Player#setHealthScaled
org.bukkit.entity.Player#updateInventory```
Description:

Represents a player, connected or not

quiet depot
#

also it's slow cuz it's on my pc

#

mad latency

hot hull
#

For what you need doesn't really matter lol

#

Not like you'll be spamming the shit out of this tuff

quiet depot
#

ye

#

there's loads of shit btw

#

not just methods

#

d;help

ruby craterBOT
#

d;help - this page.
d;test - test
d;extensions - get information on a specific component of a type.
d;sub_interfaces - get information on a specific component of a type.
d;super_interfaces - get information on a specific component of a type.
d;implementing_classes - get information on a specific component of a type.
d;all_implementations - get information on a specific component of a type.
d;methods - get information on a specific component of a type.
d;sub_classes - get information on a specific component of a type.
d;fields - get information on a specific component of a type.
d;implementations - get information on a specific component of a type.
d;doc - search a javadoc

quiet depot
#

wouldn't recommend doing fields on material

#

might break

hot hull
#

Hey Piggy, guess what we're gonna do today

ruby craterBOT
#
1.16.4
org.bukkit.entity.Entity
Methods:
org.bukkit.entity.Entity#getFallDistance
org.bukkit.entity.Entity#addScoreboardTag
org.bukkit.entity.Entity#removeScoreboardTag
org.bukkit.entity.Entity#setPersistent
org.bukkit.entity.Entity#setPortalCooldown
org.bukkit.entity.Entity#setRotation
org.bukkit.entity.Entity#getWidth
org.bukkit.entity.Entity#isInsideVehicle
org.bukkit.entity.Entity#isSilent
org.bukkit.entity.Entity#isCustomNameVisible
org.bukkit.entity.Entity#spigot
org.bukkit.entity.Entity#getPose
org.bukkit.entity.Entity#getBoundingBox
org.bukkit.entity.Entity#getScoreboardTags
org.bukkit.entity.Entity#setSilent
org.bukkit.entity.Entity#isInvulnerable
org.bukkit.entity.Entity#getServer
org.bukkit.entity.Entity#getUniqueId
org.bukkit.entity.Entity#getPortalCooldown
org.bukkit.entity.Entity#isOnGround```
Description:

Represents a base entity in the world

hot hull
#

efe, watch this

#

d;fields material

#

:))

quiet depot
#

i don't even think it's broken I think it's just loading

hot hull
#

yeye we'll wait

quiet depot
#

eh

#

should've been done by now

#

for some reason jda isn't printing errors from listeners to my console

hot hull
#

I don't have the balls to open the material class in IJ

#

cause pc go brrrrrrrrrrr

quiet depot
#

d;fields material

#

ugh

#

show me errors damnit

static zealot
#

Just du if args == field and material return. Ezz

quiet depot
#

nah

#

I need to figure out why errors aren't being logged

hot hull
#

Cause it's JDA

quiet depot
#

it looks like jda magically suppresses them for some reason

hot hull
#

and JDA gae

quiet depot
#

oh maybe they're on the debug log level

hot hull
#

"Could not be load"

#

english

static zealot
#

Amazing

quiet depot
#

doubt

#

nope frosty there's no hope

#

seems that jda suppresses them

#

and idk how to retrieve them

#

they're not even on debug log level

#

efefury i'm a native speaker and can barely pass high school english

obtuse gale
#

Is your code even really t hrowing an error then think

quiet depot
#

it has to be

static zealot
#

Nothing... Wasn't being sarcastic

#

Yes you do

quiet depot
#

imagine sleeping

hot hull
#

Imagine making a game where snowmans beat each other to death

static zealot
#

I got like 3 hours of sleep

hot hull
#

Couldn't be me

static zealot
#

Just woke up

obtuse gale
#

lol sleep

quiet depot
#

d;fields 1.16.4 material anyone got suggestions on how I can do pagination for this?

ruby craterBOT
#

You have disallowed characters in your query. Allowed characters: a-zA-Z0-9.$%_#

quiet depot
#

fuck off bruh

obtuse gale
#

sounds pretty WeAk to me

quiet depot
#

d;fields 1.16.4 material

ruby craterBOT
#
1.16.4
org.bukkit.Material
Fields:
org.bukkit.Material%LEGACY_MOSSY_COBBLESTONE
org.bukkit.Material%SPRUCE_PRESSURE_PLATE
org.bukkit.Material%ACACIA_WOOD
org.bukkit.Material%POTTED_DARK_OAK_SAPLING
org.bukkit.Material%NETHER_BRICK
org.bukkit.Material%FLINT_AND_STEEL
org.bukkit.Material%DEAD_BRAIN_CORAL_WALL_FAN
org.bukkit.Material%COAL
org.bukkit.Material%SPRUCE_LEAVES
org.bukkit.Material%BROWN_WOOL
org.bukkit.Material%DEAD_FIRE_CORAL_WALL_FAN
org.bukkit.Material%LEGACY_LOG
org.bukkit.Material%LEGACY_GOLD_HOE
org.bukkit.Material%SHEEP_SPAWN_EGG
org.bukkit.Material%TERRACOTTA
org.bukkit.Material%CAULDRON
org.bukkit.Material%SMOOTH_RED_SANDSTONE_STAIRS
org.bukkit.Material%POTTED_BIRCH_SAPLING
org.bukkit.Material%DONKEY_SPAWN_EGG
org.bukkit.Material%DEAD_TUBE_CORAL```
Description:

An enum of all material IDs accepted by the official server and client

quiet depot
#

anyone got suggestions on how I can do pagination for this?

#

cuz 9 emotes aren't enough

#

there's like 50 pages

obtuse gale
#

add another button where you can then type in a page number

hot hull
#

Just don't :kek:

#

Do what I do for litebans history on my bot

quiet depot
#

yeah maybe frosty

#

"There are too many values to be paginated"

blazing walrus
hot hull
#

Have an arg for range

#

As in from page to page

quiet depot
#

could also do that

hot hull
#

But that's poggers since noone is gonna wanna look through that

quiet depot
#

that's also true

blazing walrus
#

Or you can do ⬅️ ➡️ instead of numbers

quiet depot
#

eh

#

I think I'm just gonna say it can't be paginated and leave a link or something

blazing walrus
#

fair enough

quiet depot
#

I don't like arrows for pagination

#

more effort to implement

#

and slower to use

#

I've played it with friends

#

on localhost

#

oh you're talking about minecraft lol

#

I thought you meant gmod

#

i didn't know they made ttt in mc

old wyvern
#

d;methods 1.16.4 chat

quiet depot
#

I just turned it off

old wyvern
#

oh

#

welp

quiet depot
#

here i'll turn it back

#

i gotta go for dinner tho so don't make it die while i'm gone

#

lets see how it goes leaving it on for a while

old wyvern
#

Yea sure

blazing walrus
old wyvern
#

d;methods 1.16.4 chat

ruby craterBOT
#
1.16.4
org.bukkit.entity.Cat
Methods:
org.bukkit.entity.Cat#setCollarColor
org.bukkit.entity.Cat#setCatType
org.bukkit.entity.Cat#getCatType
org.bukkit.entity.Cat#getCollarColor```
Description:

Meow.

old wyvern
#

oh.. xD

quiet depot
#

use an fqn if you can't do exact matches

#

what is chat from?

#

player?

old wyvern
#

Was looking for related methods

quiet depot
#

oh nah

#

that's not a feature

#

but good idea

old wyvern
#

ah

obtuse gale
blazing walrus
#

💀

hot hull
#

Easiest is to save a WE region

#

And just paste it in when you reset it

obtuse gale
#

Bootstrap 5 migration:
Renamed .ml-* and .mr-* to .ms-* and .me-*. why....

#

I dont doubt there being a reason but like why...

#

also what do i do if i want more than 5...

hot hull
static zealot
#

the code looks too nice for me to break it

hot hull
#

There's nothing to break, if you don't try you won't learn. If you pr something breaking I'll fix it and let you know (or even if something can be cleaned)

#

It's currently only the base for the abilities made (not even tested) so there's really nothing you should be worried about

static zealot
#

ye so what am I even suppose to PR... I have no ideas

hot hull
#

Whatever you can think of that would suit the gamemode

#

Arena management and distribution would be nice

static zealot
#

how even do you want this to work? Would it be a free4all? or 1v1 duels? or teams like Paintball?

#

idk I'll see what I can do and if I manage to do something I'll PR xD

hot hull
#

4-12 players per arena

#

Randoms spawns free for all

#

Could eventually make a tdm but ffa as a start

wanton sentinel
#

I started making an NPC

#

i added the value and texture

#

But the top layer texture wont show

#

How would i fix that?

blazing walrus
#

You have to specify in the Entity's DataWatcher that it has its skin parts visible in a PacketPlayOutEntityMetadata update.

wanton sentinel
#

Thanks

blazing walrus
wanton sentinel
#

Perfect

#

Is this for protocolLib?

#

Becuase im not using protocolLib

blazing walrus
#

No it just shows the date you need through the packets

wanton sentinel
#

Perfect 😄

#

I should be able to figure it out

blazing walrus
#

If you couldn't I am here to help

wanton sentinel
#

I have "showNPCToAll"

#

it shows the NPC to all players

#

how do i make it to just show for the person who spawned it

#
        for (Player player : Bukkit.getOnlinePlayers()) {
            this.showNPC(npc, player);
        }
    }```
#

wait

#

i might have a fix

blazing walrus
#

That sends the npc packet to all players so everyone can see that npc

wanton sentinel
#

Sorted

#

i just did this XD

#

public void showNPC(NPC npc, Player player) {
npc.show(player);
}

#

Then onCommand /npc just do npc.spawn();

#

I got something ambitious (in my opinion)

#

is this possible

#

So when you do /npc it creates an npc of your skin

#

then for another person who does /npc it shows their skin

blazing walrus
#

Yes so onCommand if there's no args[1] or the input of the skin just make that argument the player's name

wanton sentinel
#

There is no args

#

How do i make it the players name?

#

becuase i have to manualy add the texture and signature/value

blazing walrus
#

name = p.getName();

wanton sentinel
#

thanks

blazing walrus
#

np

wanton sentinel
#

Like this?

#

NPC npc = new NPC(player.getLocation(), player.getName());

#

Oh crap

blazing walrus
#

yeah that could be it

wanton sentinel
#

ill move to support

blazing walrus
#

Ok

wanton sentinel
blazing walrus
static zealot
#

#staff

#

#staff-payment

#

nah

#

doesn't exist

#

neither

#

neither

#

#cool-guys-chat

#

exists tho

foggy pond
#

Anyone here know of any good A* pathfinding API or something for Spigot

#

Looking up online I am finding mostly outdated stuff

#

Most of the libraries are from 2012 and the download links are dead

distant sun
#

@ocean quartz

#

also, paper has one if you can use it

foggy pond
#

No way they have A* pathfinding

#

Is that A*? Does it avoid obstacles and such

obtuse gale
#

Doubt

foggy pond
#

Yep they don't lol

obtuse gale
#

It probably just invokes vanilla with the target you indicate

foggy pond
#

If mobs in Minecraft don't have a very clear path of getting to you they won't know how to get to you

#

Or actually idk

#

It's very buggy

#

I'll try using the paper pathfinder and see how it behaves

obtuse gale
#

It probably just invokes vanilla with the target you indicate

#

It's an API, not a whole library

#

An API to vanilla

foggy pond
foggy pond
#

Just instances of LivingEntityI'd assume

distant sun
#

Ah, I see what you mean by "A*"

obtuse gale
#

The algo

#

U nub

foggy pond
#

Trying to have some form of homing arrow which actually avoids obstacles and such

obtuse gale
#

Make it ride an invisible baby zombie

foggy pond
#

The arrow won't move upwards though 😂

#

I guess a bat maybe

obtuse gale
#

Vexes

#

Well but shit they go through walls

foggy pond
#

What if I create a class implementing Pathfinder, that way I can get access to all the methods and apply them to stuff that ain't just living entities

#

Okay that's not how OOP works

#

Is there no way to have a mob go to a location without NMS

#

What's the point of having the pathfinder available with paper if you can't actually have a mob walk through the path found... 😂

obtuse gale
#

That is the whole point of the pathfinding API

#

You just can't define the algo

foggy pond
#

Yeah but

obtuse gale
#

You tell it where to go, not how

foggy pond
#

If you can't have a mob walk to a location without NMS

#

Why would they make the pathfinding available with paper

obtuse gale
#

So you can change where the mobs are walking to

foggy pond
#

You can't though

#

You can use the algorithm

obtuse gale
#

How can you not

#

What?

foggy pond
#

with pathfinder.findPath()

#

But there is no walkTo() method or anything

#

mob.getPathfinder().findPath(new Location(world, 0, 100, -10)); this is how I am trying to test it

obtuse gale
#

You can set a target location/entity

foggy pond
#

Yes, but it doesn't do anything

obtuse gale
#

Mate tf you on

foggy pond
#

The mob just sits there without going to the location

#

How would you do it then

#

All that mob.getPathfinder().findPath(new Location(world, 0, 100, -10)); does is give a list of locations basically

#

It does not have the mob go to that location

#

That's the problem

#

And you cannot have the mob go to that location without NMS

foggy pond
#

:^)

#

I'm rarted

#

I was looking for the method in PathResult not Pathfinder

obtuse gale
foggy pond
#

Hopefully it actually works

#
    /**
     * Calculates a destination for the Entity to navigate to, and sets it with default speed
     * as the current target.
     * @param loc Location to navigate to
     * @return If the pathfinding was successfully started
     */
    default boolean moveTo(@NotNull Location loc) {
        return moveTo(loc, 1);
    }```
#

That's the method I am tryina use, but it never starts successfully so it doesn't work : ')

#

(Always returns false)

foggy pond
#

I'd assume 1.0f 1.0f

ocean quartz
half harness
#

Is NMS just coding but using code that spigot didn't make an API for?

prisma wave
#

weird wording, but yes

#

NMS (net.minecraft.server) is the actual server implementation

forest pecan
#

Player[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][].class

half harness
#

obtuse gale
#

72 dimensional players

#

love them

prisma wave
#

i wouldn't use vsc for java

prisma wave
#

yes

obtuse gale
#

what kind of problems mate

#

I mean I'll tell you to use gradle instead lol

prisma wave
#

what

#

why do you need a tutorial

#

you just make a new project

#

and code

#

...?

twilit thunder
#

where is the help chat plugin request chat ?

prisma wave
twilit thunder
#

yes

#

where is it

prisma wave
#

what

obtuse gale
#

. _.

#

those are the channels

twilit thunder
#

its not here anymore

obtuse gale
#

????

prisma wave
#

because you've been muted

obtuse gale
#

oh lmfao

twilit thunder
#

<why

prisma wave
obtuse gale
twilit thunder
#

?

obtuse gale
# prisma wave you just make a new project

A problem I've seen on people trying to work on a new totally blank project is that they kind of feel forced/encouraged to use static everywhere because the very starting point (main) is static

prisma wave
#

that's no excuse

obtuse gale
#

and it feels strange to "break out of it"

prisma wave
#

unless you're an absolute beginner

#

true

twilit thunder
#

i dont see the chat for the request plugin

obtuse gale
#

Another problem I often see is "what do I do" because there is literally no prepared environment for you to work with and you have to make absolutely everything yourself :^) but.. that's the point lol

twilit thunder
#

idk

prisma wave
twilit thunder
#

ok how do i unmute

prisma wave
#

idk talk to staff

old wyvern
twilit thunder
#

and why i have mute

prisma wave
#

i told you why

#

or rather lemmo did

#

ok

#

dear god

obtuse gale
#

Oh yeah adding the main classpath to the manifest is something some people know nothing of when coming from things like spigot plugins

#

That's a reason why "it doesn't run"

#

lol

prisma wave
#

is it normal for the output of AES encryption to be a different length to the original byte array?

obtuse gale
#

yikes

#

When making a java application, there is this thing called the Manifest, imagine it as some sort of plugin.yml but for bare jars, it contains basic information of your application such as version, the app creator and the "main" class

old wyvern
obtuse gale
#

embeds aagh

prisma wave
#

darn

#

in that case i have absolutely no idea what's going wrong

old wyvern
#

What are you trying to do?

#

to run a Jar yes?

prisma wave
#

Minecraft Server impl

old wyvern
#

ah

#

welp

prisma wave
#

have to encrypt packets

#

and the client is just totally ignoring any packets after the Play state starts

old wyvern
#

is the client receiving them at all?

obtuse gale
#

Read the first one in detail, then the second one to actually make the shit work on maven lol

prisma wave
#

It should be - sometimes the client errors because of invalid data, sometimes it doesn't which is even more confusing

#

but if it doesn't error then it just times out after 30 secs

old wyvern
#

weird.

#

This is for mineKraft right?

prisma wave
#

very

#

yeah

#

im pretty sure the NBT i'm sending is invalid, but i've literally copied it almost byte for byte from Minestom's impl which works fine

#

so my next guess was that encryption was corrupting it

old wyvern
#

Possibly, Did you compare with what they were doing?

prisma wave
#

Yeah it seems to be exactly the same

old wyvern
#

You can try a single class file efe

#

You dont need to use a ij project to start learning java

obtuse gale
#

You still have to do the manifest shit aPES_LulLaugh

old wyvern
#

You dont

obtuse gale
#

You.. you do?

old wyvern
#

You only need maniffest for jar outputs

#

You can run .java files with javac

obtuse gale
#

m tru

surreal quarry
#

fefo new color 👀

old wyvern
#

My prof forces us to use sublime and command prompt only

prisma wave
#

just use Gradle application plugin

obtuse gale
#

aye

#

Sadly the only cases I see myself using just a text editor and a terminal is for asm/c/cpp shit, adding every single import class in java, every single using class in c#, hell na

old wyvern
obtuse gale
#

I just #include the crap I need and boom

prisma wave
#

Packet 0/72 (re) was larger than I expected, found 3 bytes extra whilst reading packet 72

and now i'm getting this??? im not even sending a packet with that id

obtuse gale
#

well

#

you are now mmlul

prisma wave
#

im so confused

#

it just cycles between error 1, error 2, and nothing

#

wtfffff

old wyvern
#

Is it updated on git? @prisma wave

#

last commit seems to be a few months ago

prisma wave
#

yea this is a rewrite

old wyvern
#

ah

#

yup found the new repo

prisma wave
#

it's currently hardcoded to my UUID atm lol

#

ooh a new error

#

same problem but a different message

old wyvern
#

xD

prisma wave
#

i have an idea here that im not too sure about

#

should the packets be using Cipher#doFinal or Cipher#update? because if they are encrypted, how can the client know where one packet starts and ends? so surely it should use update and just encrypt the bytes as they go?

#

my current approach is:
write the packet data, id, size into a buffer
encrypt the whole buffer
write the buffer's data

#

but minestom does it more continuously

old wyvern
#

continuously as in?

prisma wave
#

it adds an Encoder to the netty pipeline that encrypts all the readableBytes() with cipher.update

old wyvern
#

ah

prisma wave
#

idk enough about Netty to know if that's called per-packet or per-byte though

#

probably per-packet, in which case it should be the same outcome?

#

hmm, temporarily turned encryption off and the error is persisting, so it's probably the NBT still

#

and the error has now become consistent

obtuse gale
#

How do I make like the kotlin DSL builder tihngy

#

Where its like

val thing = thing{
  firstThing = x
  otherThing = y
}```
prisma wave
#

just make some functions taking lambdas

obtuse gale
#

or is that even a thing

prisma wave
#
inline fun thing(builder: TheThing.() -> Unit) : TheThing {
  return TheThing().apply(builder)
}```
obtuse gale
#

oki and can I give it like values i also pass in?

#

like in my example

prisma wave
#

yeah, that's what your TheThing class is for

#
class TheThing {
  var firstThing = 0
  var otherThing = 1
}```
obtuse gale
#

oh right, so if this is for an itemstack do i need to make a class that wraps the itemstack?

surreal quarry
#

no just use ItemStack

prisma wave
#

not necessarily, you could use just use ItemStack

obtuse gale
#

but I wanna just be able to pass in name = x

surreal quarry
#

extension properties

prisma wave
#

then you will need a wrapper

old wyvern
#

use extentions

prisma wave
#

oh true

obtuse gale
#

o

surreal quarry
old wyvern
#

If you want to hide the actual item, then a wrapper would be your choice tho

obtuse gale
#

yeah im not tryna make likd a whole item builder, just a head builder...

#

wait

#

nvm

#

is this a weird way to do it?

inline fun head(init: Head.() -> Unit): Head = Head().apply(init)

data class Head(
    var name:String = "",
    var texture:String = ""
){
    fun build():ItemStack{
        val itemStack = ItemStack(Material.PLAYER_HEAD)
        val meta = itemStack.itemMeta as SkullMeta
        val profile = Bukkit.createProfile(UUID.fromString("4e64ea71-d8d0-4ba9-9de1-5e85f53dcc07"), texture)
        profile.setProperty(ProfileProperty("textures", texture))
        meta.playerProfile = profile
        meta.setDisplayName(name.colour())
        itemStack.itemMeta = meta
        return itemStack
    }
}```
surreal quarry
#

if it were me i would probably make head return an ItemStack and just call the build method but it depends how you're using it

old wyvern
#

@obtuse gale Did you just want named parameters?

obtuse gale
#

oh yeah that makes sense

#

wdym yugi

old wyvern
#

Currently you seem to be using it just for named parameters in a weird way

#

you can invoke functions with named parameters in kotlin without that

Head(name="Steve",texture="idkrggegeg")

is valid

obtuse gale
#

oh yeah true but head { } looks nicer imo lol

#

but yeah I did change head to return an itemstack

#

then make it build erit

old wyvern
obtuse gale
#

wait do bees have multiple anger levels.,....

#

what

surreal quarry
#

lol wot

obtuse gale
#

lol what

surreal quarry
#

ive never heard of that

#

but i guess they do

obtuse gale
#

there is nothing about that on the minecraft gamepedia other than this which.. the NBT is inherited from "mobs that can become angry"

#

so it's prolly that?

#

the AngerTime, idk

#

Ok so next question lol, how should i structure my code,

Im makiung a heads plugin and atm it just drops the mobs head for everything, however for few animals such as Bee, cat, fox, llama, mooshroom, sheep, vex, wither, wolf there are exceptions where the head is dependant on the state of the entity, ie, angry, colour, type etc, the messy way im doing it rn is just chucking it in a when statement and if its not any of those just do the normal head and if it is handle that, but thats getting messy quite quickly6

surreal quarry
#

if a function is an internal fun does that mean that it won't be accessible outside of the package? how does that work

prisma wave
#

No, it means it won't be accessible outside of the module

steel heart
#

Reflection?

surreal quarry
#

ah ok perfect

prisma wave
steel heart
#

Would reflection make it accessible

#

Like the #setAccessible thing idk

prisma wave
#

It's already accessible - internally it's just a compiler check and the function name gets scrambled with $'s to indicate you shouldn't use it

#

Which is a pretty messy way of doing things

steel heart
#

Ah

prisma wave
#

But it works lol

steel heart
#

Oh yeah true also kotlin and bytecode manipulation?

#

How’s that looking?

winter iron
#

For gradle, when should i be using implementation vs compileOnly or other dependency format things

steel heart
#

compileOnly is when the dependency only needs to be on the classpath at compile time

#

So not at runtime

#

Implementation adds for both compile/runtime

prisma wave
#

yeah, implementation for stuff that should be shaded, compileOnly for provided dependencies

winter iron
#

i see

steel heart
#

Idk might be something with trasitivity as well

#

transitivity*

winter iron
#

so something like luckperms api would be compileOnly

steel heart
#

Also

#

Yep

winter iron
#

say less

steel heart
#

Maybe api

#

depends Ig

prisma wave
#

No

steel heart
#

No?

prisma wave
#

api is different

steel heart
#

What’s even the difference

prisma wave
#

Everything

steel heart
#

It’s like implementation without transivity

#

Or the opposite?

prisma wave
#

api is like implementation, but the dependency is exposed for transitivity

#

It's with transitivity

steel heart
#

Ah yeah always mix that

prisma wave
#

Implementation hides it because, it's the implementation not the API

winter iron
#

what about compile when would i want to use that

prisma wave
#

Never

steel heart
#

Deprecated

prisma wave
#

Compile is an outdated version of implementation

winter iron
#

Oh

steel heart
#

It’s very misleading as you might have noticed

winter iron
#

mmm

prisma wave
#

Yeah I gotta say that's one of the few things Maven has - it's just shade, runtime and test - a lot simpler

steel heart
#

BM I don’t know but I assume you’d need something special for bytecode manipulation for kotlin?

prisma wave
#

not necessarily

#

It's the same bytecode in the end

surreal quarry
#

if I am making an API for a plugin, whats the best way to do it? should i make an API module with a lot of interfaces, then just implement those interfaces in my plugin

steel heart
#

yeah but it gets converted or whatever u say to java bytecode

winter iron
#
Required by:
         project : > com.comphenix.protocol:ProtocolLib:4.5.0```
Getting this when tryna add protocol lib to my project, idk why it just happened but it was fine a few days ago....
#

compileOnly "com.comphenix.protocol:ProtocolLib:4.5.0"

#

it downloaded protocol lib

steel heart
#

Possible you don’t have the right repo

prisma wave
winter iron
#

but not the other thing

forest pecan
winter iron
#

i got protocol lib

#

just not bukkit executors

steel heart
#

Hmm so I can automatically use mixin with fabric without any conflict?

prisma wave
#

Hmm

winter iron
#

and i cant find it as a seperate dependency

steel heart
forest pecan
#

mixins are sometimes

prisma wave
forest pecan
#

annoying

steel heart
forest pecan
#

to setup

#

too late

steel heart
#

Lmao

forest pecan
#

luckily

#

none of the admins are on

#

so they wont tell us to change our names

#

😊

steel heart
#

@winter iron well it’s not protocollib but one of its dependencies

winter iron
#

it automatically got it before

#

but now it wont

steel heart
#

The repo for it seems to have changed

#

Or smtng

winter iron
#

😦

steel heart
#

Yeah it’s big dodo

#

Just don’t care

quiet depot
#

hi im on now so

#

@steel heart

#

thx

steel heart
#

piggy

#

maybe add the docdex cmd in the channel desc #bot-commands

#

or like the cmd prefix

quiet depot
#

o

#

i added it to his presence i think i just forgot to restart him

steel heart
#

ah lovely

obtuse gale
#

yes

#

you forgot

steel heart
#

epic color

obtuse gale
#

shame on you

#

ebico

#

yes

steel heart
#

ebico

quiet depot
#

there

#

check his presence

steel heart
#

nice !

quiet depot
#

i need to limit that to bot commanss

#

so guys, pls only use it in bot commands

#

it’s kinda spammy otherwise

steel heart
#

for referencing stuff

quiet depot
#

just the help command that is

#

you can use other commands whereever

steel heart
#

ah yeah

#

ofc

static zealot
#

@quiet depot xD

#

sorry for that. a guy was requesting and didn't know if he should get a confirmation message or not

obtuse gale
#

Ok so next question lol, how should i structure my code,

Im makiung a heads plugin and atm it just drops the mobs head for everything, however for few animals such as Bee, cat, fox, llama, mooshroom, sheep, vex, wither, wolf there are exceptions where the head is dependant on the state of the entity, ie, angry, colour, type etc, the messy way im doing it rn is just chucking it in a when statement and if its not any of those just do the normal head and if it is handle that, but thats getting messy quite quickly6

winged mica
#

Can someone help me to improve my code?

blazing walrus
light jackal
#

anyone know why my forward and back buttons dont show up all the time?

#

on shopguiplus?

blazing walrus
old wyvern
#

Which method?

#

write down main and it ij should provide you a option to autocomplete the rest of the function

quiet depot
#

can also type psvm

frigid badge
#

live templates < 3

prisma wave
#

.soutv

quiet depot
#

what does that do

#

ik what sout does

#

but what does the v do

obtuse gale
#

soutv prints a value doesnt it

#

so it auto generates like the text inside the print

#

ie

val x = "Hello"
//soutv generates this
println("x = ${X}")```
#

something like that

quiet depot
#

aight

obtuse gale
#

and then your curser is placed at the start of the first x in the println and the second one

#

so when you change one it changes both in the println

prisma wave
#

yeah it prints the variable / parameter name too

obtuse gale
#

I hate how even if its just like one thing it generates with with the {} and then IJ yells at you for it lol

prisma wave
#

yea lol

#

kinda annoying

static zealot
#

anyone that can help me a bit? So I made a github page. And I wanted to set the domain to blitzoffline.com to set it to www.blitzoffline.com was easy just point a CNAME record. https://i.imgur.com/XO7AI4e.png but I want to use the apex domain instead blitzoffline.com I've followed their instructions: https://i.imgur.com/oaFn4IV.png and I have this: https://i.imgur.com/ZPWY81R.png but when I go to blitzoffline.com it doesn't work. I've also set it as custom domain in github pages: https://i.imgur.com/XsciycD.png

#

just because

quiet depot
#

show whole screenshot

#

yes

#

you haven't made a run configuration

#

what are you trying to do

#

run what??

prisma wave
#

just click on the arrow?

quiet depot
#

a build task?

#

the jar?

#

if it's the app, then just click the arrow on line 17/3

#

call them with your human object

prisma wave
#

pro tip you can use "they" instead of "he/she" everywhere, sounds much more natural

#

not that that's important lol

static zealot
#

yeah I should rly get used to that

#

I was told quite a few times to do that as well

prisma wave
#

yea it's much more practical imo

#

although even native speakers forget that they can be singular

#

¯_(ツ)_/¯

static zealot
#

good thing I'm not a native speaker fingerguns

prisma wave
#

you can Character.toUpperCase the first char and then concatenate to a substring

#

that probably works

quiet depot
#

if it's for a spigot plugin though, commons lang should have a util

prisma wave
#

^^

#

utils for everything nowadays

quiet depot
#

doesn't matter

#

keep it in mind for future reference

#

also pure java isn't always what you want

#

often the wheel already exists, and in a state far better than you'll ever be able to recreate it to

#

String#charAt

#

I'm not sure if you're asking for confirmation or being sarcastic

#

lol

#

oof i gotta make a decision

#

implement the needed features for docdex to scan the jdk

#

so I could've just done d;string#charat

#

or

#

watch the new nilered video

#

an index

#

help me choose pls

hot hull
#

Efe

#

WordUtils#capitalize

quiet depot
#

frosty he's not using any deps

#

and help me choose what to do

hot hull
#

What an idiot

quiet depot
#

rude

hot hull
#

Not you

quiet depot
#

ik

#

i would've banned you if you were talking about me

#

not just said "rude"

hot hull
#

Watch the new nilered video I suppose

quiet depot
#

ay

#

string + string

forest pecan
#

uh no

quiet depot
#

it's built into the syntax of the language

forest pecan
#

well stringbuilder

#

is one

steel heart
#

Isn’t that concat

hot hull
#

String#concat

steel heart
#

^

forest pecan
#

and there is also that

quiet depot
#

fix your name

hot hull
#

Ban them both

quiet depot
#

fixed it for you

hot hull
#

For impersonation

quiet depot
#

wait is pulse actually an impostor?

#

i'm not sure

#

but I feel like he is

#

because he's using eclipse rn

steel heart
#

Ye he was impersonating me ya know PES3_SusAlt

#

Oh wtf

#

Mad sus

forest pecan
#

Well

#

im doing the usaco

quiet depot
#

ah that clears it up

forest pecan
#

and i like the debugger

#

in the usaco

#

better

quiet depot
#

for the other people who may not know what the usaco is

#

what is the usaco?

#

i definitely know what it is

forest pecan
#

united states of america computing olympiad

steel heart
#

Dafuq

#

Damn

quiet depot
#

I find it more likely that you just don't know how to use intellij's debugger to it's maximum potential

forest pecan
#

yeah thats the reason lol

#

im more used to eclipse's

quiet depot
#

well that's what we're here for

#

ask questions

prisma wave
forest pecan
#

Yes

remote goblet
#

All I know IntelliJ debugger to do is to freeze ij for a few seconds

#

That’s it

quiet depot
#

potato pc

forest pecan
#

lol

steel heart
#

Pulse not saying kek

remote goblet
#

:(

steel heart
#

Omg

forest pecan
steel heart
#

Aww

hot hull
#

@obtuse gale substring probably

forest pecan
#

😊

remote goblet
#

I have amd ryzen 5 3600 :(

hot hull
#

Or replaceFirst

quiet depot
#

don't use replacefirst

hot hull
#

But that's ew

steel heart
quiet depot
#

relatively

#

you won't notice it in normal circumstances

#

but it's bad practice

steel heart
#

Tbf

quiet depot
#

only use replacefirst on compiled regexes

steel heart
#

Why not just work with char arrays all the time

quiet depot
#

assuming that's a method on them

steel heart
#

Ag

quiet depot
#

fairly sure it is

steel heart
#

Hmm also String.format

#

Is that one bad also?

quiet depot
#

dunno

hot hull
#

String#format should be fairly light no?

quiet depot
#

probably not as bad

hot hull
#

Since it's just replace with multiple params

quiet depot
#

frosty it's not that simple

#

string#format is actually really complicated

hot hull
#

Very simple!

quiet depot
#

it doesn't just replace %s

#

there's a fuck ton of different placeholders

hot hull
#

I know

#

It infers their types tralalala

quiet depot
#

idk i pretty much go by the rule that when in doubt, just remember compiled regex is faster

#

moral of the story: use compiled regex

hot hull
#

Idk but fair enough

quiet depot
#

it's the same process

hot hull
#

Make a new thread, sleep, ez claps

quiet depot
#

no

hot hull
#

Yes yes

quiet depot
#

I don't think I've ever ran into a situation where making a new thread manually was warranted

#

thread pools are the way to go

obtuse gale
#

Send it

#

I did ask you before that I would want you to send it to me

#

Sure

#

Put everything in it

#

Uuh yes? Why is that a question

#

Nice

prisma wave
#

hot

static zealot
#

yesn't

surreal quarry
#

very hot

quiet depot
#

iNConSistent

prisma wave
#

it's a bit better now

quiet depot
#

yes

#

but, why doesn't if have a =>

prisma wave
#

because we figured it was unnecessary boilerplate

#

You need it for ifs without braces still

quiet depot
#

okie

#

why is it necessary at all?

prisma wave
#

Hm

#

It might actually not be anymore

quiet depot
#

it's not 😉

static zealot
#

hello

prisma wave
#

But originally we were gonna have optional parens and commas so ```
if function a b c print "Hello"

#

So we needed to separate the condition from the value

quiet depot
#

it's only ambiguous to the user

#

but if the user writes like that they're fucked anyway

#

obviously they'll use indentation to clear it up

#

or braces

prisma wave
#

it's ambiguous to the parser in that or doesn't know where the condition end and the values start

quiet depot
#

when the statement stops being a boolean, that's when it ends

#

and it starts after if

#

sorry

#

condition

#

not statement

prisma wave
#

It could be if(function) a(b, c, print, "Hello")

quiet depot
#

the statement starts once the condition ends

old wyvern
quiet depot
#

why?

#

it's definitely decipherable

old wyvern
#

It hasnt built the parse tree yet

prisma wave
#

But to accurately parse that we'd need full contextual knowledge of the code, types, functions on the classpath etc

#

Yea

#

This is in the parse stage

#

No knowledge of types

quiet depot
#

then do post-parsing

#

come back to it, repopulate it with the correct info

old wyvern
#

no need?

prisma wave
#

This is why we've mostly scrapped the infixes idea, it's cool in theory but pretty difficult to reliably parse

quiet depot
#

what's the thonking for

#

is there a question inferred by that screenshot?

#

there should be

#

"why is my login button there"

#

there you go

hot hull
#

Question is why is Piggy so damn sexy

quiet depot
#

center it

#

wew

#

@onyx loom listened to under pressure and I'm fully convinced now

#

it's his best album

#

way better than no pressure

#

efefury ij has a gui designer

#

idk how to use it

#

but it's there

#

what library u using

#

javafx?

old wyvern
#

swing probably

quiet depot
#

why

#

isn't fx the new one?

old wyvern
#

xD

#

Yea

quiet depot
#

scrap everything efe

#

use fx

#

there's no point learning swing

#

javafx

old wyvern
#

JavaFX

frigid badge
#

javafx

quiet depot
#

it's the newer and better gui library

#

it's in the jdk

#

I think

#

depends what ver ur using

#

pretty sure it's in 8 at least

#

it was separated later

old wyvern
#

its separate in newer yea

quiet depot
#

yes

old wyvern
#

yea

quiet depot
#

colors

#

probs more

#

but I only know about colors off the top of my head

#

not irl

#

although gonna shave my head tomorrow probs, need a hair cut

#

no

hot hull
#

@quiet depot Please don't shave your head

quiet depot
#

why

#

I think so

#

haven't used fx in yonks

hot hull
#

Cause just don't

old wyvern
quiet depot
#

why??

onyx loom
quiet depot
#

yeah no pressure has like 2 good songs

#

it aint nothing compared to under pressure which is like 90% good

onyx loom
#

☹️

#

more than 2

quiet depot
#

can't remember how many i liked

#

btw

#

to answer your original question

hot hull
#

@ocean quartz How far along is triump chat?

quiet depot
#

trump chat

#

what's trump chat

hot hull
onyx loom
#

y

#

y

static zealot
#

message.create()

quiet depot
static zealot
#

jk

quiet depot
#

i can't help you

onyx loom
#

tornadofx 🙂

#

Alert?

quiet depot
#

i thought tornado was android

#

oh nvm it's just kotlin

onyx loom
#

just kotlin in general pig

surreal quarry
#

anyone know where the package-list is for the spigot docs

distant sun
surreal quarry
#

i think there is a file called package-list that dokka needs to configure the external documentation stuff but i can't find it

#

i tried that but it didn't work

candid moth
#

is there anyone who can help Takes 10 minutes maximum

distant sun
#

Ahh

compact perchBOT
#
FAQ Answer:
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait

Source

distant sun
#

@candid moth

candid moth
#

yes

quiet depot
#

lol

distant sun
#

Wonderful

candid moth
#

Is there a room where I can open a support request or should I ask here

quiet depot
#

what's the support request related to?

candid moth
#

deluxemenus

quiet depot
candid moth
#

❤️

hot hull
#

Nice

ocean quartz
ocean quartz
hot hull
#

I see

quiet depot
#

trump chat

ocean quartz
#

I'm so bad with configs, always feels like it's too clustered

hot hull
#

I'll PR perhaps

#

Did you go with multi file styled configuration or nah?

quiet depot
#

okie, got any idea why Javadoc#getActualLink is printing this link

ocean quartz
#

Not yet, still haven't decided

quiet depot
#

i'm so confused

hot hull
#

Is it up to date Piggy?

quiet depot
#

yes

#

i've fully cleaned it

ocean quartz
#

@distant sun Do you think i should do multiple files for the config?

quiet depot
#

umm

#

am I fucking blind

#

it's printing the right link

#

i'm so stupid

hot hull
#

Yea I was about to say lol

quiet depot
#

sorr it's late

hot hull
#

That looks like the right one

ocean quartz
hot hull
#

Why not have both be applicable Matt?

#

Since some people might have less complex configs and might not want that

ocean quartz
#

Sounds to hard to do, since my configs are not nullable

hot hull
#

Get gud Matt smh

distant sun
#

@ocean quartz like split one config into multiple files?

ocean quartz
#

Yeah, like, config, mentions, private message, channels, etc

dry coral
#

only if its like super large or can get large

distant sun
#

rn does it have support only for config.yml or smth?

ocean quartz
#

Yeah

distant sun
#

why lol 😄

dry coral
#

like stuff where u can set infinite formats etc with each format having options should have a separate file

distant sun
#

is not what you think @dry coral

dry coral
#

probably

distant sun
#

wait tf

#

are you talking about the config lib or your chat plugin? @ocean quartz

ocean quartz
distant sun
#

one config is good for me 👍

ocean quartz
#

Gotcha, I'll see, if it gets too big I'll split

distant sun
#

having each stuff in its own file might look "clean" but I find it annoying having to go through each file just to edit an option

surreal quarry
#

but at the same time its annoying to look through a 600 line config

static zealot
#

oh yeah don't make per file formats

#

unless you add it as an option

distant sun
#

ye

static zealot
#

so either make them all in config and be able to add them in separate files as well

distant sun
#

@ocean quartz if you add channels could split them into multiple files tbh

#

channels/global.yml channels/staff.yml

dry coral
#

lol

#

imagine

#

coding an option for multi file config

distant sun
#

^

dry coral
#

only an idiot would spend their time doing that

static zealot
#

xD

#

Clip did it ...

#

for deluxemenus

#

and its great

surreal quarry
#

loll

static zealot
#

so stfu please

dry coral
#

ehh

static zealot
#

thanks

dry coral
#

not really an option thing

static zealot
#

xD

surreal quarry
#

yea for DM its great lmao

static zealot
#

it used to be an option

hot hull
#

Scholtes

distant sun
#

pretty sure he didn't removed the support for config menus just to have "backwards compatibility"

hot hull
#

You're stoopid

dry coral
#

my point still stands

static zealot
#

ahhh

#

you mean 1 file for all formats?

#

thought you meant 1 file for each format

#

but you mean formats.yml or something right?

dry coral
#

yes

static zealot