#dev-general
1 messages · Page 587 of 1
kinda fucking awesome
saves you repeating some code for no reason
Okay
comparer = if calcMax then (>) else (<) 😌
I love it already
I've been meaning to do a pluralsight Haskell course cause I'm really interested in functional stuff recently
I like to think about how I can think of stuff as like, a reduction or something right
Or like, I just did three baller list comprehensions in Python in a row
def weight_and_rank(votes, weight):
weighted_votes = {k: np.multiply(v, weight) for (k, v) in votes.items()}
weighted_votes = {k: np.sum(v) for (k, v) in weighted_votes.items()}
return {k: v for (k, v) in sorted(weighted_votes.items(), key=lambda item: item[1], reverse=True)}
look at these!
but have you been meaning to actually update FrozenJoin?
❤️
What a good idea!
Honestly as soon as you've got the concepts, whether that's from kotlin or python or what, everything becomes so much easier
good morning mr mitten
gm
What's the notation of this in kotlin dsl?
dependencies {
implementation project(path: ':api', configuration: 'shadow')
}
This does not work:
dependencies {
implementation(project(path=":api", configuration="shadow"))
}
"path" to ":api", "configuration" to "shadow" I believe
hm not it
shadow(project(BlockyCorePath)) works but I don't think that's a compileOnly dependency then, is it?
to, not =
oh my bad
hm not working 😦
the dependency is there but I can't import anything
and now I say "oh but did you try this" and then you say "oh yes/no" and then I say "/shrug well it works for me"
We had this dance before, I remember
so I'm not gonna put you through it again
I just don't get why it won't work and need to vent somewhere
is it enough to have the shadowJar task in the BlockyCore project declared or do I have tospecify the artifact somewhere?
imagine only running 1 os haha couldnt be me
yeah me neither. except that I dual boot lol
hi?
gday
what's that server about??
yoo. @quiet depot so on samsung's website this is 135 usd. https://www.samsung.com/us/computing/memory-storage/solid-state-drives/870-evo-sata-2-5-ssd-1tb-mz-77e1t0b-am/ just wanted to see if you have anything to say bad about it before buying lmao
then ig i will leave
u cant go wrong with samsung ssds
and yes thats a good ssd
possibly the best sata ssd
and yes my name is pig
thank you. you fucking pig!
God I love Samsung ssds
me too 😌
970 evo gang
970 evo plus 
well. now I'll just hope it will work lmao. also is there a way to like move all the data from my hard drive to my ssd when it comes?
Oooh~
Yes
Samsung has a really nice migration tool
does it come with the ssd tho? or is it separate? or do you mean like a software tool?
Nah, you gotta scoop all your hard drive data out and gently pour it into the ssd
Of course software lmao
that's just nvme tho is it not?
samsung magician
Nvme m.2
well. I've seen crucial had some sort of usb to SATA conector that you have to use
And wtf does "just nvme" mean lmao
and you'd have to buy it
Nah g
nvme uses pcie
Yeah obviously
well how would I connect my ssd to my laptop? bcz my problem is that I only have 1 connector
Why would I use old ass SATA
because you have an old ass laptop maybe?
Wait you want an external hard drive??
O
and I've only got 1 slot
that's used
so how would I connect both to move the data?
that's my question
Well do you have a desktop near you of any kind
That'll work!
well. don't think it has 2 slots either
Or you can buy like an external SATA enclosure I guess
A little bit
will try and find one on the samsung store.
@static zealot buy a 1tb usb off wish and transfer ur files to that
Lmao yes
oh ok
matt where's the docdex pr
Sorry haven't had time yet, still gotta do a pr for Frosty too 😩
smh
btw. you find at the end of the month if you were within the first 50k for hacktoberfest?
or when the prs "mature"?
also where do I see the 2021 design?
50k? I thought it was only 10k
Oh
How many do you need again?
but when do I find out if I got it or not? also where do I see the design?
4 PRs
"good" PRs
I made like 6 to FJoin. I basically made an entire update
bcz star lazy af
I really wouldn't worry about the 50k thing
last year 50k people didn't even do it by the end of october
if you remember they left it running, people could still qualify after october and receive shit
Gaby did one for me I have another open ready to merge, only 2 more then
oh...
so samsung doesn't deliver in romania
so I guess I have to pay 30$ extra to get it from romanian companies
does anyone have any prs for me to do 😄
you could probably make that into 2-3 prs
PR kdocs support
kdocs isn't consistent
i have thought about docdex
that's a problem me and bardy had
kdocs structure is like completely different on official docs and generated docs
and then u can theme it a bunch aswell I think
Yeah i tried it too it's pretty annoying
☹️
blame jetbrains
kotlin bad
does haskell have consistent docs?
I wonder if it'd be possible to make a plugin for dokka to get the needed info before exporting to kdocs
probably
iirc the structure changed between official docs and user generated docs
and they can also be heavily themed
so there's no streamline way to parse the docs
please correct me if that's not the case
why not just parse the source
because the source isn't always available
well it should be
Also Piggy does docdex support per guild docs?
wym
Like if i can add it to my server and add all my libs without needing to bloat for everyone else
sort of
you've got to remember docdex is actually an api, the discord bot is merely an implementation
and the api doesn't care about guilds
it doesn't even know about them
however with that in mind, the bot does possess some functionality like that
you can set the default javadoc for a guild
and you can also modify the javadoc list for a guild
but ultimately you can access any javadoc that the api hosts
if you wanted to restrict access to specific javadocs you'd need to host your own api & bot
Oh gotcha that should be easy then
people do actually do that
I know one guy hosts it for his uni group or something
he wanted to pr slash commands a while back when they were brand new
well if they all generate the same
(excluding changes to the docs over haskell updates, that's acceptable)
then it can be implemented
no
I wouldn't expect anyone to pr an entire implementation for a new type of docs
meant I could implement it
one day
Was looking at percentage of people using Spigot vs Paper and saw this wtf
😸
That emoji is very cursed lmao
😹
Is there a way to keep the github.ajalt:mordant dependency but kick out the kotlin-stdlin dependency from it?
I have it added as an api so the old kotlin version gets passed through the application and messes with my classpath
furry emoji
exclude it
How?
api("dependency") {
exclude(group = "org.jetbrains.kotlin")
}
soo. where do I see the design for hacktober tshirts for this year?
yes
ohhh. ty conclure. you're the best.
yes yw
oh this one?
😊
o:
hmm. 2020 looks the best from what I can see
anyone selling one?
lmao
its a collection tshirt and I am willing to pay a lot. I have about 25 euro cents but can do 27 for this
I never got the one I was supposed to get
o?
that's sad. did you message them?
I’ve got the 2019 and 2020 atm, now waiting for 2021 to add to collection 😂
And yes 2020 is so nice in comparison to other times
damn. wanna sell the 2020 one?
I'll do you one even better. 27 eurocents and a chestnut
exactly
I know about it for so long yet never participated
that's why I added the chestnut to the 27 eurocents
Oh that makes it worth it
only found out last year and also just started actually coding last year as well so didn't really want to do shitty PRs
so decided to not participate
yeah I’ve been programming for quite some time longer lmao
Same 😂 and didn’t know about Hacktoberfest until 2019
I knew about but just never cared about it lol
well. I Did 4 years of C++ in highschool but never took it seriously bcz they only prepared us for the final exam. and it is one of my biggest regrets. I expected highschool to teach me how to do it but they really didn't
I just do it because fancy free t shirt 😂 goodie bag idc about
It’s just brand stickers
I guess this year is 8 years since I started
Coding? :o
yeah
Mines 7 this year damn
I started in 2014 with Java
As my first coding Lang
Then 2015-2016 I started doing HTML css etc
well I guess I Did html css and js as well in highschool but that was just on the side and more having fun than learning
Yeah, then I believe it was 2017 when I dived into nodejs
imagine having fun with html and css
Hahah
I actually liked it
Tailwind makes it nicer now 🥰
that’s definitely true
just palying around with all the random shit css has
tailwind and some component frameworks
Just have to turn word wrap on within IDE
doing crazy stuff and then just deleting everything
otherwise endless scroll 😂😂
I don’t like css to be honest
speaking of such, I wanna try VIM soon, lots of guys in Laravel community are using it
Seems super cool
I’ve used vim for editing the odd config on remote machine, but guys have it setup for editing like Laravel
Seems super complex but so nice
yeah some people like the extra useless complexity
you should use laravel octane btw
https://youtu.be/BNphvGiUEi4 and yeah octane is brassy
Broadcasted live on Twitch -- Watch live at https://www.twitch.tv/robinmalfait
Beast**
You just need a nice machine
If you want super high requests
Above video he uses VIM setup, I’d love to get good at it
btw. I ordered an ssd today. feeling great lmao. now I need to find a cheap tool that works for transfering the data from my hdd to my ssd.
the cloud works 😛
With the 2019 MBP, you can get like 24k requests per second with Octane lmao
Crazy shit
yeah octane is nice and makes sense
well apparently with samsung you can literally just copy everything. which would be nice
I know you wouldn’t use that for production, but like CPU wise it’s apparently crazy
instead of literally executing all the same shit again and again for every request
Taylor Orwell shared it
but I still don’t like php lmao
just that this one huge project is written in laravel for work
Haha, how I see it - all personal taste, I used to say yuck this language, use x instead of y. Since joining Twitter I’ve changed my approach
Now I see it as, use whatever let’s you make something that people can use
And continue to use it until it starts to need adapting
I mean it has it’s pros and cons
Everything does, PHP can scale really well I’m surprised tbh
and I just don’t like the language
Yeah it’s all taste, like for me I can’t stand Kotlin, but that’s just my own self
I’d use ordinary Java in my apps if I ever do Java again
the only reason php can scale at all is because of all the extra bullshit we’ve had to build to make it scale
that's one of the reasons most people can't stand you
Good 😂
lmao
Hahaha
I wouldn’t mind even if that’s true to be fair, here to do business, not make besties 😂
Yeah agreed honestly
I hope you are using docker atleast
I am thankfully
Only for local dev ram
*atm
also. is there a laptop you guys would recommend up to 700 usd?
I haven’t got that confident
not apple
Idk how I’d deploy to production
wdym confidence
docker is made for that it works the exact same way
it should only make your more confident
lol
I have a nice docker setup for a Laravel project, but only using it locally, how do I set it up so people can access it
also its a lot over the 700 usd budget lmao
Like you have nginx and stuff inside of docker
So how do you tell your VPS use this for this domain
That’s what confuses me
I mean just like you normally would
just bind the containers
or use a service to just spin your containers instead of a full blown vps
Normally I’d have Nginx on the VPS serving the project, but then people show docker containers with nginx inside
That’s what baffles me
If that makes sense
So I’d add my docker container to my VPS, bind the ports, then what do I do to tell my VPS any “analyse.net” requests go to this container
so you are running nginx in a mini vm, the project in a mini vm, db in a mini vm etc
those can talk to each other via a docker network
and you can bind the nginx container to a port on the host
@quiet depot when you wake up can you give me your opinions on Acer Swift 3 SF314-42 (laptop)? the budget just went up to 700 usd from 450. if you got any other recommendations please do tell me. am looking into a few ones myself as well.
to say analyse.net goes to container x you need to setup the web server to do so
if you have multiple websites on the same vps you’ll want an extra nginx container which manages all your websites for the vps
and then sends all the requests to the correct containers
or have one nginx on the vps itself although I’d prefer a container
I’d explain it more clearly and maybe with visuals if I wasn’t on phone lol
This is what baffles me..
Usually, I’d specify analyse.net to point to 1.1.1.1 for example. Then, inside of a nginx config I’d specify that host name.
That then points to my correct website path, etc etc.
What confuses me is, if the idea with docker is to have Nginx on the container itself (so easy deployments), how do you tell the VPS that only has docker installed that when analyse.net comes in that it should go to this container.
How do you handle multiple domains? Each container has its own port? See my amateur confusion
And haha I understand, I know you covered some of what I said above so will read now
yeah I understand your confusion
for multiple domains you’d indeed have one specific container to handle all requests which you’d bind to 433/80
and that container which isn’t specifically to a project would route them to the correct (nginx) container for said domain
so like
VPS port 80/433 -> nginx in container for all domains -> route to specific container (which optionally is a nginx container) -> routes to whatever project containers it uses
Ah I think I understand now, thanks for explaining, so if I got this right..
Container 1
- Nginx
- Has a nginx file for each host name, e.g. analyse.net & analyse.org
Container 2 (.net)
- Has PHP, MySQL, etc (just no Nginx) in it.
Container 3 (.org)
- Same as above
Container 1 would listen on 443/80, and the other containers how would I tell my master container to send requests to them
yes that is an example only would mysql, php be a seperate container
Oh I thought you bundle MySQL together into each web container
no you really shouldn’t
you have a container for mysql and a container for php
Ahhhh
those talk to each other via a docker network
Right now with my local Laravel setup I have one container that has all of them
Node PHP Nginx etc
I thought I would have all of them together idk why
Maybe I saw somewhere and got confused
I’m a true amateur at this but do wanna get better, because I hate deployments rn it’s a pain especially when you upgrade machines
yeah
it gets even better with k8s or docker supported services like google cloud engine etc
makes deployment even easier
with 0 downtime
auto scaling
Yeah I’d love to autoscale eventually
This is why I wanna learn cool tech as I go, docker I’ve been slowly diving into
But still very new
docker is bae
is there a library in java that allows you to get gpu and cpu models?
Yeah. Look at what Minecraft is using. I think it's called Oshi
HELP!
I cant play rocket league because the discord hamster is covering my screen. How do I turn it off?
fkin help!!!!!!!!!!
wtf is the discord hamster
I cant paste a screenshot
https://discord.com/features this one
I start rocket league and it stays on my screen until I turn off discord. Apparently it's some kind of ester egg
wtf lol
or someone that can help me figure this shit out?
You probably haven't understood by now but this ain't "discord" help server. This is a help server on discord that focuses on minecraft and development my friend.
God damn it.... Is there a discord help server of sorts? I googled it and it gave me this.
Nope. They only offer support on the support.discors.com website. There are probably some unofficial ones out there but am afraid I do not know a y
BTW a part of it is a weird thing where if you click on the discord home icon on the top right you turn on "discordo" mode, some asian girl sais it and you know it's activated. Not joking
*click on it 15-20 times fast
That's an Easter egg I think
Do you happen to have overlay turned on in discord? If so, try turning it off
thats an easter egg
Anyone know an online api that shows the status of a server but doesnt cache it? And also shows the list of players? I need it for a discord bot im making
Will MF-MSG work on BungeeCord?
what

lol i dont even knwo the difference
uhh @ocean quartz do you know why this happens: https://paste.helpch.at/curicajuto.bash
Code: https://paste.helpch.at/baqilorepe.cs kt @Path("icon-overrides") val ICON_OVERRIDES = Property.create(hashMapOf("ExampleKit" to ItemStackData("PAPER", glow = true))) do you think it's something to do with ItemStackData?
|| sorry for ping ||
but it only happens if I have a map of ItemStackData
and also if I did Property.create(ItemStackData::class.java, mapOf) it would just put {} in the config
and i have other places where I use ItemStackData, but this is the only place it errors (because it uses a map i think?)
and I'm not sure if the solution from last time would work
although i could try
yes. I know exactly why it happens
I thought it was matt typing ;-;
👀
guess I'm different. never did this
DeluxeChat isn’t open source is it?
well. no.
Okay
did you know?
nope, it just puts ```kt
icon-overrides:
icon-overrides: {
}
Map and list properties are kinda funky for some reason
Easiest fix is to use a bean for it instead, just a
data class MapHolder(
@Name("icon-overrides")
var overrides: MutableMap<String, ItemStackData> = hashMapOf("ExampleKit" to ItemStackData("PAPER", glow = true))
)
Then just add it as a property with empty path
Hi hi
I tried but this happened #dev-general message :/
Show me what you tried
dkim you're just bad
data class IconOverridesConfig(
@Name("icon-overrides")
var iconOverrides: Map<String, ItemStackData> = hashMapOf("ExampleKit" to ItemStackData("PAPER",
glow = true)),
)
``````kt
@Path("icon-overrides") // oh so this is why there were two, but still the inner was empty :/
val ICON_OVERRIDES = Property.create(IconOverridesConfig())
I Knew this but dkim didn't believe me
🤨
MutableMap
I told you here
Also what even is ItemStackData?
Ah, try the empty path and the mutable map
yooo someone please recommend me an OK laptop. The maximum budget is $700. It is going to be mostly used for work (browser, communication platforms: discord, teams, etc., some IDES: Code::Blocks for start but there's gonna be more this is what they start, multimedia: movies, music and maybe some light gaming like minecraft or something )
it still just puts ```yml
icon-overrides: {
}
Also this is `ItemStackData`: https://paste.helpch.at/baqilorepe.cs
and no error in console
nvm gonna move to #off-topic 👋
Works perfectly fine for me
whaaaaaatttttttttttttt
implementation 'me.mattstudios:triumph-config:1.0.5-SNAPSHOT'?
Yup
aiusdhiusahdjnuwas
Reminder if icon-overrides already exists it won't try adding anything to it, because well an empty map is a valid map
ye i always delete the yml file
so that it generates new
just to make sure
@Path("")
val ICON_OVERRIDES = Property.create(IconOverridesConfig())
data class IconOverridesConfig(
@Name("icon-overrides")
var iconOverrides: MutableMap<String, ItemStackData> = hashMapOf("ExampleKit" to ItemStackData("PAPER",
glow = true)),
)
```this should work?
Yup, literally copied and pasted what you sent
huh
lemme try again for the 10th time ;-;
nope :(
okay ima try to remove everything from the config
._.
even imgur hates me 😭
okay ima try to remove the description annotation too
👀
theres only 1 other place that could be the source of error
SettingsManager.from(File).configurationData(SettingsHolder#javaClass).create() is this correct?
Yup
um
do u know anything else i can try?
object KitsConfig : SettingsHolder {
@Path("")
val ICON_OVERRIDES = Property.create(IconOverridesConfig())
}
data class IconOverridesConfig(
@Name("icon-overrides")
var iconOverrides: MutableMap<String, ItemStackData> = hashMapOf(
"ExampleKit" to ItemStackData(
"PAPER",
glow = true
)
),
)
data class ItemStackData(
var material: String = "BARRIER",
var name: String? = null,
var lore: List<String> = emptyList(),
var glow: Boolean = false,
var texture: String? = null,
)
```this is my exact code
No idea, that works just fine
hmm
data class IconOverridesConfig(
@Name("icon-overrides")
/* var iconOverrides: MutableMap<String, ItemStackData> = hashMapOf(
"ExampleKit" to ItemStackData(
"PAPER",
glow = true
)
),*/
var iconOverrides: MutableMap<String, String> = hashMapOf(
"Test" to "Other"
),
)
```so this works fine
data class ItemStackData(
/* var material: String = "BARRIER",
var name: String? = null,
var lore: MutableList<String> = arrayListOf(),
var glow: Boolean = false,
var texture: String? = null,*/
var test: String = "a",
)
```and this won't work either :/
nvm it does
data class ItemStackData(
var material: String = "BARRIER",
/* var name: String? = null,
var lore: MutableList<String> = arrayListOf(),
var glow: Boolean = false,
var texture: String? = null,*/
) {
```this works
is it the nullable properties?
how about you make them non nullable and try?
yep its the nullable properties
i change it to nonnull and it works
change it to nullable and it stops working
Works fine for me with the nullable though
🤔
welp
i just changed it to that
and now it works
also if i change a property to null, it just goes to the default value
like yml config-option: null converts to ```yml
config-option: "Default Value"
Yeah if you want a value that is not needed make it an Optional
ty
btw does ur lib do something special with Optional?
or r u just taking a guess that Optional would work
Yes it handles it differently
lets goo
I got my discord bot in go working with multiple prefixes, argument parsing, message sending, etc
Top investment 2021 <https://cdn.discordapp.com/attachments/555469074080202765/896420963296624640/unknown-2-1.png ||from paper hehe||
Embed:(
Ah
Pog
Real pog
Hehe
hey how can i set the slize of a slime
in a living entity
and whats the max size i can set it to?
iirc there is none, or if there is its like > 100
i set it to 255
wasnt good
good think if i die the boss despawns
im just trying to create a way to shoot a armor stand
at the player
Vector dir = new AbilityUtil().getMobTargetDirection(entity, null).multiply(.3);
Location loc = entity.getLocation().add(0, 2, 0);
player.getWorld().spawn(loc, ArmorStand.class, armorStand -> {
armorStand.setMarker(true);
armorStand.setVisible(false);
armorStand.setGravity(true);
armorStand.setSmall(true);
armorStand.setHelmet(new ItemStack(Material.SLIME_BLOCK));
armorStand.setVelocity(dir);```
it just stands on top of the slime
oh and another thing i spaned a falling block when it falls it turns into a block how do i dissable that?
Is there any reason ThreadLocalRandom.current.nextInt(min, max) doesn't give very random numbers?
It keeps returning either the min or the max, or the same number over and over.
ThreadLocalRandom 😵💫
Should I not use that?
It is generally not suggested
Make a SplittableRandom instance and keep it as a constant field
Yes
Okay thank you
Ideally you would use a seed based on timestamp or something you're gonna get once in a lifetime, use it as the seed for the rng, and store it in case something goes batshit nuts and you need to reproduce some behavior from the rng (obvious example of that would be an MC world seed)
With ThreadLocalRandom you essentially lose any kind of reproducibility
But eh ¯_(ツ)_/¯
Okay that makes sense, thanks
I don't think I've ever done that, lol
Oh that's cool, if you do split(), the new instance (theoretically) generates the same numbers as the original instance would?
It has the same distribution, but I don't think they will generate the same numbers
Oh okay
SplittableRandom is ideal for parallelism (precisely by splitting), and with a known seed you get predictable behavior every time regardless of thread
mannn I still am not used with this new pfp
with ThreadLocalRandom you don't have that control and since it's thread dependent, it goes to shit
you've had it for a while now
smh
That's cool
I see you've got a lot of jokes since you changed it.
ha ha ha ha
Can someone tell me what plugin this is, i took over doing stuff for a server and dont know what overlay would display on the right with the server name, player, balance, rank, and players online
what?
I believe you're in the wrong channel
#general-plugins / #general-plugins-2 might be more appropriate
might be = are
Ty sorry
btw @ocean quartz sorry for the ping again ;-;
but I'm doing kt ItemBuilder.skull(ItemStack(Material.SKULL_ITEM, 1, 3)).let { builder -> if (texture.isPresent) { Bukkit.broadcastMessage("4 - ${texture.get()}") builder.texture(texture.get()) } builder }.build() which shows this: https://i.imgur.com/rfIpGGk.png with this debug: ```
4 - http://textures.minecraft.net/texture/97f57e7aa8de86591bb0bc52cba30a49d931bfabbd47bbc80bdd662251392161
|| 1.8 btw, is there any alternative that works on 1.8? ||
What lib version, 3?
yes - dev.triumphteam:triumph-gui:3.0.3
https://github.com/TriumphTeam/triumph-gui/blob/master/core/src/main/java/dev/triumphteam/gui/builder/item/SkullBuilder.java#L83 this could be the reason, any errors on startup?
are you sorry tho?
you and everyone else keep saying that
but you always do it agian
and again
;-;
Is the server in offline mode by any chance?
not that i can find
yes
well
the server its prod on isn't
Help
Placeholders en Block Quest no funca
Wrong channel #general-plugins @long cape
Ola
Ah, dkim
Oka
You are supposes to use a base64 string
ohhhh
Lmao
which is basically {skin:{url:https://textures..}}
{"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/6555381209bf989e8caac3ae8d6b7e193373f1718088f5dbf122f71f5eaf90f0"}}}```
Could use a base64 string like everyone else or just turn that json (with your texture) into one
d;jdk base64#encode
public static Base64.Encoder getEncoder()```
Returns a Base64.Encoder that encodes using the Basic type base64 encoding scheme.
A Base64 encoder.
ty!
declaration: module: java.base, package: java.util, class: Base64, class: Encoder
should i use
No dkim
Thank you
Enough
um
No
I'm doing ```kt
Base64.getEncoder().encodeToString("{"textures":{"SKIN":{"url":${texture.get()}}}}".toByteArray())
(texture.get() = http://textures.minecraft.net/texture/97f57e7aa8de86591bb0bc52cba30a49d931bfabbd47bbc80bdd662251392161 btw)
Btw use text blocks, no more string escaping
really? 👀
It needs to be a base64 value
Ty matt, ty
Print it to console, it should be
wait does the json have to be encoded too
Ah, you don't have quotes around the texture
the debug isn't printing
Base64.getEncoder().encodeToString("""{"textures":{"SKIN":{"url":${texture.get()}}}}""".toByteArray())
```this is (i think) returning null?
add quotes around ${}
ohh
.
not possible
i mean then i'd have to tell the server owner to use base64 and that means 1 more source of error so i'd rather not go through that :p ¯_(ツ)_/¯
I think you also need the trimIndent method
o
Dkim, 90% of plugins that have heads support use base64
People are more used to that than texture url imo
the server owner gave me an example with the url so i assumed he didn't know about base64 ¯_(ツ)_/¯
Where did you find that texture dkim?
server owner
Oh
Head databases normally have the value for you
oh
It says on the image
Nice nice
Yes
If it did before, why wouldn't it work now
hmm
ooh it works
i just made it a lazy value
and it works now for some reason lol
TY


A lazy value? 
actually
laziness good
yknow
someone should make a language where everything is lazy
that's a good idea
the by lazy { } thing
oh wait
i didn't provide any context
before: ```kt
private val base64: String? = if (texture.isPresent) {
Base64.getEncoder().encodeToString("""{"textures":{"SKIN":{"url":"${texture.get()}"}}}""".toByteArray())
} else {
null
}
after: kt
private val base64: String? by lazy {
if (texture.isPresent) {
Base64.getEncoder().encodeToString("""{"textures":{"SKIN":{"url":"${texture.get()}"}}}""".toByteArray())
} else {
null
}
}
You were talking about Optional and then you mention you made it by lazy, while it has nothing to do with it lol
🥴
Does anyone know how to use tab completions with cloud command framework?
Pretty sure they explain it in the docs
@static zealot (sorry for the ping) I remember that you once worked with XP and had a bad time working with it, but then you found your solution somewhere, where is that place?
Well not a bad time I just had to make my own method to get the actual xp points someone has. Ended up using essentials's methods
I see, I'll look into essentials code then, thank you very much
What does essentials use xp for? ;o
I'm dumb, I thought there was a separate annotation, but it's just in @Argument
Oh i thought you were talking about custom xp stuff mbmb
yeah, I'm working with vanilla xp
😌
Add it to the issue
trueeeee
Do you know the link where you could find the sources jar for adopt open jdk 17 or smtng
Hello Im a owner of a 150 member SMP, in Searching for a dev to make a custom template for my tebex store Dm me!
Hello Im a owner of a 150 member SMP, in Searching for a dev to make a custom template for my tebex store Dm me!
anyone know how i can get the version with this module? https://pypi.org/project/mcstatus/
the version of a server
status().version from what I can see
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "main.py", line 56, in status
embed.add_field(name="Status", value="**Version:**"+status.version+"\n **Players**: {0}/{1}".format(status.players.online, status.players.max))
AttributeError: 'function' object has no attribute 'version'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'function' object has no attribute 'version'```
@bot.command()
async def status(ctx):
server = MinecraftServer.lookup("play.thepolygon.tk:25595")
status=server.status
embed=discord.Embed(title="Server Status", color=0x1ABB9B)
embed.add_field(name="Status", value="**Version:**"+status.version+"\n **Players**: {0}/{1}".format(status.players.online, status.players.max))
embed.set_footer(text="Information requested by: {0}".format(ctx.author.display_name))
ik this is python
but i thought this serer might know a bit more about the module
- paste.helpch.at pls cause its more readable and dont spam chat
Python 😩
hello matt, is your wiki working like
if line contains ## give class header to it or its already splitted with the class or its working somehow else
Uh, what? xD
MF-Wiki? 👀
Markdown?
mf?
Matt Framework
MFGUI, MFCMD, etc
actually its all renamed to TriumphGUI, etc i think
wat
and what class
oh
isn't that <h2>
css tag?
yes
idk about that
h2 {
display: block;
font-size: 1.5em;
margin-top: 0.83em;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
there ya go
wait no
¯_(ツ)_/¯
backend?
backend doesn't mess with html/css
wait
idk matt can talk
ive never made backend so i cant say much
.
how is that working on bsckend like
in editor you do
header1
and the backend do that it give html tag and class if needed you know
oh so you're asking how it automatically converts to <h2>?
yes and class im asking how is he doing it because there are more options
anyone?
go is so nice 😌
now I wonder why I ever dealt with the mess that is TS for discord bots
lmao
look at this:
func Info() module.DiscordModule {
return module.DiscordModule{
map[string]func(command string, args []string, s *discordgo.Session, m *discordgo.MessageCreate){
"test": func(command string, args []string, s *discordgo.Session, m *discordgo.MessageCreate) {
fmt.Println(command)
},
},
func(session *discordgo.Session) {
},
"test",
}
}
its not buggy
theres no nilability except for the session (because well, sessions are janky)
theres actual nice types
oh lmao @steel heart I just clicked on your name, and you're listening to the same song as me
It's a parser, it goes through the markdown and creates a tree of tokens which then can be converted into html
the one thing I'm kinda mad about is no Streams/Maps that I can find
ah
(java's stream, js's array#map)
https://pub.dev/packages/nyxx tried this recently (Dart) and is also really nice
yeah the higher order functions
delicious
oooh actually
might have to start using that
😳 wat could you give small example please
😌
oh
I cannot, it's a pretty complex thing
I use https://github.com/commonmark/commonmark-java which handles all that
like
soo is better to
save file as it is (like with ## instead <h1>) and convert it to html when user send request or just convert it back while editing
I store the HTML in the database and then respond to the front end with the result
Use Laravel and you’d have all that out the box ;)
php never
I love when stuff works first 10th try
and breaks on the 11th try
hey-
I made a whole module system
I'm still sad of the lack of streams
but turns out go's just not meant for them
and they shoulden't be used
😔
functional stuff is pretty horrible without generics so yeah
yeah I will just take interface{} and cast everything that sounds fun
🌞
go is a dynamically typed language developed by Google
dart is also developed by google
go has generics, no?
oh it doesn't
well
then
thats unfortunate
There's a proposal for them that's been approved so we should see them fairly soon
But atm it doesn't
About time
similar to c++
good good
and its compiled right?
GoLand just like runs it
so I assume it compiles behind the scenes
yes very much compiled
hey guys, just an fyi, docdex's auto updater is gonna be disabled for a while (probably ~6 weeks), because java 17 introduces more changes in the javadoc html structure that I don't have time to implement into the parser atm, and I don't want everything breaking till I can update it
hopefully nothing major happens in anything in the next 6 weeks
How do I publish to maven central with gradle? Does anyone have an example build.gradle?
Thank you
Cant disable it only for java 17?
that’s not the problem
as projects update to compile against 17, their javadocs will be generated by java 17, and face the same issue
Ah sorry
Yeah Gaby, get your facts right
🙄
gaby's a student
Ye 🥲
is it not nullable anymore?
It is, but it has an added contract which "fixes" it
is this spigot or just paper?
paper
how do chat plugins work? like deluxechat
does it cancel the event and send its own message or can I use the normal event at EventPriority.MONITOR and ignoreCancelled = true?
Deluxechat clears the recipients and sends its own
canceling the chat event can cause issues with other plugins like moderation ones and what not
oh
hmm
does deluxechat check if the event is cancelled? and what priority would it listen at?
Since I'm trying to make a plugin that checks for certain text, and cancel the event and run an action if so
and iirc the server I'm developing this for uses deluxechat
hmm
highest would be what you want
Since I presume you're making chat moderation so it should be executed first
btw LOWEST is called first 🙃
No?
it is
since HIGHEST gets last decision to change stuff
so it has to be called last
MONITOR is called last tho
and you can in practice mutate the event state there also but it is not recommended
Monitor isn't supposed to mutate though
Yeuaop
me.dkim19375.coolplugin.libs.mattstudios.config.beanmapper.ConfigMeMapperException: The generic type 0 is not well defined, for mapping of: [Path: '', type: 'class java.util.Optional'] -_-
Show what you have
Is it possible to tell when either:
A) a player is typing
B) a player is typing a command?
A - no
B - yes
How would you do that?
Couldn't you add a / infront when someone is typing and then it would count 
How would you know when to add though?
Commands trigger TabCompleteEvent
Would need to somehow detect when they open chat box
Me too
val FOOTER = Property.create(Optional.of("Text"))
```I just set it to blank = nothing
i assume I'd have to make a data class that "wraps" the Optional?
is this helping chat?
yuh
or well
there are better channels for it
people might troll you here in this channel (just a warning)
Property.createOptional
@desert horizon I was kidding lmfao
My intellij is on crack
Also
wtf is this language tierlist
Why is JS S tier??
why is PHP the same tier list as Java
You're wondering that but you're not asking why TS is miles below JS?
You just invented time travel
He put it on C tier
why tf is JS in S tier
and TS in C
is he insane?
I'd say its upside down, but PHP != Java
His explanation was "it's just JS with types"
Yeah lmao
am I going crazy? this MongoDB golang decode function doesn't seem to return any data
https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo@v1.7.3#SingleResult.Decode
just an error if present
I have no idea what that is
or what unmarshals means

unmarshal is just deserializing, basically
okay, makes sense
typically in lower level languages you pass pointers which get modified, to avoid unnecessary object creation and give you more control
you can see this in some older java code too, you pass an array which gets modified
got it
so with the go thing you'd pass it an empty struct or something, and the function would modify the struct with the values from the database
so I need this Ig?
var serverDB module.DiscordServer
err := coll.FindOne(context.TODO(), module.DiscordServer{ID: id}).Decode(serverDB)
then err checking
and such
how come you're creating 2 DiscordServers?
I got the message that I can now Publish snapshot and release artifacts to s01.oss.sonatype.org
but I still don't see my repository in Staging Repositories, am I supposed to do something else?
I'm trying to publish to maven central
the one in FindOne is for a filter
it just filters by ID
okay
also, @prisma wave you're probably better at this than me
is it terrible practice to set a mongoDB column ID (12 hex digits, or 24 char) to a discord server's ID (18 0-9's), with 6 0's on the end?
since it s not hex at all
but its like valid
idk mongo very well but that sounds like it could cause issues
what type of issues though? since any 2 0-9's is a valid hex char
again, it works, but seems a bit hacky
but idk a better way
and okay
mongo seems to not have an official discord
yeah that's what i mean, it seems hacky
hm,
argument to Decode must be a pointer or a map, but got { }
I'm probably insane, but how do I decode to an struct (a module.DiscordServer)
is that at runtime?
oh
use a pointer to the struct instead
im not sure if a nil pointer would suffice, probably not
empty := &module.discordServer{}
blah.Decode(empty)
yes
ooh *'s are pointers
makes sense
I get them mostly
didn't know the name
The repository isn't appearing
I'm just going to do it manually
Anyone here a Minecraft dev?
We all do roblox
What does that mean? What?
I don't even know.
I was able to manually do it. When I ran publishAllPublicationsToMavenRepository it didn't appear in my staged repositories or anywhere I could see.
Maybe it's because I didn't set it up to work with shadow?
Or is that not what it does?
Isn’t it supposed to publish it to maven central? Or am I supposed to do that manually after it generates the files?
Oh lol
But yeah it's still with the maven publish plugin lol
@half harness can you link the message of yours explaining all this to Chestly? I'm unable to do so right now
I would greatly appreciate it
The one time we don’t want dkim to pull the brb for rest of the day
Lol
