#dev-general
1 messages · Page 123 of 1
Aj, this is gonna be fun, then you just disguise it and send it to random people
:))))))
I need to do it tonight otherwise ill wake up and think its a shitty idea
use the api BM
thats what its there for
actually wait
that wont work
You'd need a server
that costs money thooo
I can make a little web app to log it all perhaps
I've got a vps
Happy to contribute to this good cause
:))
It makes the world a better place
it does indeed
wdym have that .jar as the server jar?
Wouldnt that just start another server
Also how fast do servers auto-restart? Is it instant? If so wouldnt I need to delay the normal restart?
pro tip
add ur class to the server jar
change the meta inf to point to ur main
ez hijack
Use the CodeSource
use the codesource like brister said ages ago
Main.class.getCodeSource() or something
all this work just to try and rid 1.8 users...
its worth it
🤔
make sure to include the spigot dep not just api so u have access to Main
wait what?
so do I call ::class.java.getcodeSource on what class
any spigot class
o
3am here
yes its very hard to tupe on a phone i agree
I’m on phone and it’s 1am :^)
anyway
idk if getCodeSource is the actual method
it’s something like that tho
you might have to get the protectipn domain first
Yeah
idk if the protection domain contains the code source, or the code source contains the protection domain
private fun getShitJarName():URL? {
return Bukkit::class.java.protectionDomain.codeSource.location ?: return null
}```
Will that ever be null?
nope according to thingo
@ocean quartz should be usable via the script engine now
odin 1.0 babbbyyyy
if it restarts instantly do i need to somehow delay the re enable
or is that something I can worry about when i come to it
apply from: "https://voxmc.net/github.gradle"
repositories {
github "Sxtanna/odin"
}
dependencies {
implementation "com.sxtanna.odin:odin:1.0"
}
@signal tinsel ctrl alt shift K a Java class
Or just make a new kotlin project with gradle
I have to select java as well or it doesnt generate the src folder, but that might just be me lol
You only need kotlin/jvm
Ok
@topaz bay How would I run code in odin?
It actually generates the Java folder even with that
I don't use gradle actually so what do I need to do to import spigot
what's wrong with you
why not use gradle
Kotlin and gradle are literally best friends
like couldnt I just do this
override fun onDisable() {
Runtime.getRuntime().exec("java -jar FuckYou.jar")
}```
Listen
Lmfao
where Fuckyou just switches the things
then kills itself
Don't bully me for what I do or do not use lmao
Oh I see what you mean
misunderstood the question
Add the spigot repo, add the dependency
Basically the same as maven
if ur using ij, u can just paste the maven stuff in and ij will convert it
how do I copy a file from my resources folder to somewhere else?
@old wyvern
val engine = ScriptEngineManager().getEngineByExtension("odin")
engine.eval("""
fun sayHello {
push "Hello"
}
sayHello()
""".trimIndent())
Like how do i get the fil;e from my resources thing
Alrighty
Random question, on paper's repo what is that "Paper @ ######" folder?
That's cool piggy
Doesnt seem to be a normal directory
like this?
getResource("FuckYou.jar")?.copyTo(dataFolder.outputStream())```
could i do that to copy it?
@quiet depot U broke it :(
class Whatever: JavaPlugin(){
override fun onEnable(){
}
}```
wait here
import org.bukkit.plugin.java.JavaPlugin
class KotlinTest : JavaPlugin() {
}
Figured it out
No I created a new project
That's not what the plugin is for
Ok so
What are the syntax differences compared to java
Wait just gimme something to make
To learn kotlin
I need smth to make
To probably just throw away afterwards but I need smth to make
fucking xp whore
That's a bit advanced for a beginner
I would highly recommend you not consult with someone who uses the non null assertion operator
If you know Java and have a few brain cells you can learn kotlin easily
they are bad kotlin devs
AM I WRONG
Lol
I can probably learn kotlin yes
But I need a fairly standard project to make while learning it
no
yes
Brister
pro
Mitten
Bad
xD
Manners
......
nah admins did it :(
Sup matt ur bad
aw rip
ah
Was talking about BM 😢
No one has manners like you
Lmao
WHATS FUNNY
Your low manners
don't think anyone can disagree with that lol
Oof
HATERS
Damn no love
oh no
And they treat me like trailer trash
odin bad
beautiful sight of Odin



Sx right now
WOW
They ask you how you are and you just have to say that you're fine when you're not really fine.
Katy Perry Interview - The Project (2014): https://youtu.be/2XKOh28-8nc?t=4m14s
@old wyvern Some aussie spider right
You will all kneel before your king
@topaz bay
https://www.youtube.com/watch?v=C8iujof6IL8
The 'Hitler salute' is one of the most recognizable symbols of Nazism. Where did it come from?
Lmao
@old wyvern Some aussie spider right
@hot hull
He wanted a spider
😳
UHHHHH
I mean in theory hitler was a good guy, since he killed hitler
I was more thinking Loki and Hela kneel
xD
also why tf is caching in Spring so complicated lol
I mean in theory hitler was a good guy, since he killed hitler
@hot hull
Holy shit
sorry corrected message
So are we nazi to want to kill hitler then?
Ummm
😂
Shit
you walked right in to that one Frosty
I went outside for literally 2 minutes, and I feel like I've been bitten at least 500 times
Time to become a better person
But I need a fairly standard project to make while learning it
@signal tinsel hello world plugin
class HelloWorld:JavaPlugin(){
override fun onEnable() = Bukkit.broadcastMessage("Hello world")
}```
Proud?
https://hastebin.com/ixulemijok.cs what the .. fuck?
amazing aj
i did it in discord lol
oh yeah true
no excuses
too hard
smh
:():
whats a good way to test if my thing runs the jar right?
Cos like I wont have a console for it will i?
AHH
wtf happened
Try it out :))
😬
big thonk
fixed it :))
nice one
Somehow I put the kotlin SDK and IJ didnt like that
yeah dont do that
yeah so like
how can I test if this java program even runs?
Since I wont have a cosnole will i?
I would write to a file for logging
You'll have the server console tho?
Ah
You should be using the process api
how what where why
i swear there were 5 Ws back in grade 2
i remember they telling me something about it
Cant I just use
It allows you to specify the input and output streams
yeah there is
Runtime.getRuntime().exec("java -jar FuckYou.jar")
then 1 H
how
or will that not work?
why?
also am i just dumb or like
why isnt this creating anything when i run it in IJ?
fun main(){
val file = File("Fuckyou.txt")
println(file.createNewFile())
}```
Am I dumb or should there be a new
kot
lin
kinda big, but still
Using the process builder, you can tell it what to run, where to run it, which input and output stream to use, etc
This application downloads the spigot jar, and runs it in the current shell
well what I want to do is download the spigot jar, and replace the current server jar with this one
Well thats a terrible idea
which is why I was thinking id have this second jar file that would get ran onDisable
its for Fuck1.8
a noble cause
:)(:
what
tf does that even mean
Ditching Kotlin for Spring
that's such a weird thought process
It doesnt make sense
they're not mutally exclusive
"i don't like the piano, time to try cooking!"
Lmao
😦
I'm gonna try spring not because I don't like kotlin
Imma sleep
Just because I wanna try spring too
I don't like kotlin
bold words
No
Come at me
please explain your reasons for disliking kotlin
I'd be happy to prove them all wrong
@prisma wave You don't know slovenian yet
i know a bit
Ok fuck kotlin
@signal tinsel what... the... fuck
frigga can do a cool thing now
Oh?
type coercion between single types and producers of the types
Int can be coerced to () -> Int
there's probably a practical application for this
That sounds familiar
I've probably mentioned it before
ah
it means that you can do stuff like this https://img.bristermitten.me/idea64_bLURistUJF.png
because loop takes a () -> Bool, so it's reevaluated every time
kinda cool idk
is that an assignment as an expression?
Where?
the last line
It is an expression, but I don't think so in this case
Oh, were you talking about the first parameter?
yes
it's equivalent to loop(() -> someBoolean, { blah })
so when the value of someBoolean changes to false, the loop breaks
it's like passing by reference without the mutability
Was that an accidental feature or intended? xD
intended lol
sad
sad?
Lol
clearly an accidental side effect being masqueraded as a feature
Ah yes: Oh you didn't want me to add force op? Should've specified - scenario
force op is great
https://spring.io/blog/2019/04/12/going-reactive-with-spring-coroutines-and-kotlin-flow "Java is the obvious default choice" smh Spring
I thought they'd know better
Java literally is the default for spring
Can ya read
It then has 2 paragraphs about why you might want to use kotlin
okay me stupid
Not to mention the article is literally about kotlin lol
I think I'm gonna make some good use of Spring coroutines
also what happened to GlobalScope in coroutines?
its amazing maffie 🙂
Whats tjat
coroutines?
from my understanding they run tasks on a new thread without any major performance implications
wdym what happened to it?
coroutines are very lightweight threads
BM it's my fault I wasn't importing it properly I think
Ic
lol bad dev xd
Is it similar to python?
Just async shit?
yea
difference is though: you can run 100,000 coroutines that print "." no problem, with threads that would run out of memory
and that's just performance differences
Why is that tho
Because they aren't threads
Like visualize
A coroutine is equivalent to a BukkitTask
Kk
the scheduler switches between all the tasks, if a task starts blocking it moves to another and returns when the blocking is finished
Oh ok
True
Well said
5.13 am here
i tried to copy the tag from subreddit but dyno bot said fuck u
Let’s go
go sleep aj
Speaking of which we probably need a kotlin memes Instagram
🤔
also the one under that is funny
😂😂😂
My idol
Also someone tell me how tf I get my Instagram on dark theme
no wonder kotlin devs like to cause trouble by saying kotlin good
NO
Javagood has more things 😦
delete that
Including some interesting results
@lost river Easier if you just ask here you know
What a kotlin bad boy 😍 😍
he really is a bad boy
Kirkuk bad boy
what did his t shirt say
*korlin
i am a what
**kotlin
It also has
"dirty kid"
put it down
I would pay a lot of money to kick that dog
The image is just disappearing on my end lol
Is it showing for u?
The shirtless dude
I meaaan
Wait what, since when does dyno detect image nudity lmao
Idk if BM was joking but like
Literally didn’t let me upload until I crossed him out
Wow kotlin users are Toxic
stinky 🤢
#fuckjava is an odd place
i wonder why
my man needs to learn basic java
Then there’s the dude coding in sublime
Sublime ??
The really ugly one
he uses the ugly brace format
@prisma wave thats what voteparty uses haha
voteparty is allman
Oh god those indentations
that is something far worse
No wonder he hates java lmao
university of York
That’s not allman?
allman doesn't indent the braces like that
They stay vertically aligned with the start of the previous line
Mhm
looks about right
what does that even mean lmao
no idea
¯\_(ツ)_/¯
allman trash anyway so doesn't matter what it means lol
HAHAHAHA
The pinnacle of comedy
basically if u use allman in java then ur gay as allman is meant for c-type languages
thats what its saying
I mean allman is nice, so 
i dont mind it
it keeps everything organised well
its just too many brackets on new lines for me
If your company pays you per line of code it could mean more money 😏
Then again what company does that
lmao
writing in java must pay lots if that was the case 🙃
anyone actually know the average salary of a java dev?
from experience or whatnot
In USA it starts at like $40k afaik
Probably about the same here
Senior Java dev could pay upwards of £100k though
so its about the same as the average salary
Depending on the company
but has more potential
Kali hell naw
yea ofc
By average salary, you mean what?
Interesting
UK is only £25k 🙁
20k if not even less
(upper class ofc more, but the avg)
u deserve more !!!
oh wow sounds like every other country
Find ways to force a company to hire you, ez claps
gunpoint works well
Non illegal way
any developer looking for hire?
< 3
what's the most optimized paper version?
depends
if ur talking like which version is most optimized from spigot (excluding performance impacts of later versions) then probably 1.15
I mean the best to run in a server
but idk, that seems subjective
u cant really rely on a server jar for lag reasons
it depends what server gamemode u want
prison
id recommend 1.12.2 then
decent amount of new blocks, good performance
anything above 1.13 will start to hit performance drastically
ok so clip uses some IChatBaseComponent from nms for his JSON system where you can add together multiple messages with &&, is there anything like this in spigot / bungee api?
IChatBaseComponent icbc = ChatSerializer.a(string);
icbc.addSibling(ChatSerializer.a(string));
Not bad
Does anyone know of a place where I can like sell software? Like discord games, but for non games.
👌
Oh god
@ocean quartz if you can hook it up live to your web cam, in theory couldnt you hook it up to like obs or something and play another game in minecraft?
so like
play Rainbow six siege in minecraft or something
Lmao
Lmao yes
girls
kotlin?
🙁
kotlin is too good for me anyways
i have only scraped the surface with its endless possibilities
kotlin is too good for all of us
so who wanna see my sexy pc that is totally not bubble wrapped rn
We are not worthy
yes
lol
New pc?
kek
cute
tradie i moved house
ooh
That's what they all say
Its only broken because its kinda impossible to interpret this deep level of multi inheritance
traits and classes are too similar
I'm gonna redefine them
redefine it by deleting it
(trying to recall code from memory so might be wrong)
So if I have something like ```
someVar = 3
someFun = (someVar::Int, fun::() -> _) -> {
fun()
}
someFun(10, () -> println(someVar))
Because the lambda resolves to the parameter named someVar not the property
I cannot even begin to comprehend that syntax
I dont
I typed it on mobile so it might be wrong anyway
where is that fun() coming from?
The parameter named fun
what's this? void return type or optional parameter?
right well that's not clear imo
disgusting
Shorthand for Nothing
so someFun takes an int and a function that takes nothing and returns nothing
Yes
Is this just an issue of scoping then?
But because there's a parameter named someVar, the lambda prints that instead of the property outside the function
Probably
Just looking for a clean way to do it
I mean, the context should search in to out
I was thinking lambdas would resolve properties upon definition but that wouldn't really work
It should come across the parameter first
it does
And you dont want that?
parameters are resolved first which in this case is incorrect
it should print 3
not 10
I'll get another example hold on
No I completely get it now
I'm pretty sure for this exact reason, in Java functions carry a capture of their scope with them
I see
So defining a function would take a copy of the scope it's defined in or something?
Yes
Seems like an easy fix
probably why they did that
Ok let's give it a try
I mean it also just makes sense
Yeah it does
Also, I'm thinking about doing the thing that go does for "inheritance"
Instead of having actual OO inheritance, inheritors just copy the definitions into themselves
A sort of high level composition strategy
cobol 😁
how about we all have like 1 week to learn cobol and see who can make the best program of their choice kek
lol
fuck u
please dont
😁
zoomer
That is objectively incorrect
#1 best payed language
$100/hr
every cobol system should be replaced with Kotlin
That is objectively incorrect
@topaz bay Infact
ez pz
It is cobjectivley correct
😂😂
pelase
cobol is the best language i agree
SHUT UP
😅😅
thanks pig
😦
that HOG's opinion is irrelevant
cobol
kotlen
Would be nice to use my skype emotes here
i haven't used skype since 2016
boost the server 🙂
Absolutely not
why not
y not
meanie
no fuck u
your life revolves around this server sx
I wish you wouldnt
face it
he is too cool for you
not idiomatic, idiotic
Which seems like a good idea to play right now
who even plays that shit anymore lol
anything is better than overwatch
tf2 is kinda dead sadly
cookie clicker > overwatch
tf2 is still one of the most played steam games brister
tf2 was ass
true but it's full of bots now
last update was a case update that broke the game 😁
yeah you're probably right, definitely doesn't feel like a 70k player game
lonely life
ahhhhh day drinking
Nether
u can fill the knowledge if u wish
absolutely fucking not
shame
u can fill the knowledge if u wish
Im pretty sure thats public tho 😂
too bad
too bad indeed
Yeah hes not a STALKER like you @old wyvern
😂
although its not very hard
👀
look through the window sx
o
oh please dont fuck with my drunk mind
lol
i would check just incase
nah, hes too much of a pussy
Riighhtttt
👀
oh please dont fuck with my drunk mindI wish I had a shot rn
shit corona fucks up everything
stuck at home
you should get overwatch
shame
drunk overwatch is the best
no
I think I have it downloaded
do NOT get overwatch
Let me check
u know what's better than drunk overwatch?
Drunk life
literally any other game
beign thrown out of a bar?
drunk poghramming
😂😂
nvm dont have overwatch downloaded
no hes not
pig only states facts
yuuuhhhh get into ittttt
Overwatch is awful
maybe youre just awful at overwatch
get it BITCH
its impossible to be awful at overwatch if u play r6 siege @errant geyser
uh ok xD
what
kaliber they're completely different games
being a fucking god on rust doesn't make my grind on clash of clans any easier
not funny didn't laugh
thats not a joke
ye
its not on steam?
blizzard
yeah developers have been getting greedy relatively recently
imagine wanting to keep money for yourself
battle.net if that's what its called
instead of giving 30% to steam
honestly I wish valve would relax on the fees a bit so things like epic games store stopped popping up
how do you not have battle net
because activision sucks kekw
YOU SUCK
u hurt my feewings 🙁
@onyx loom its what you deserve
🙁
@obtuse gale Yeah, i did make it stream from OBS to minecraft
oo
Could you then like
hook into player move event or something
just thinking out loud rn
And somehow control another game from within inside mc
Robi did that
Yeah Robi did it already ;p
@topaz bay Lmao when i first saw your picture it looked like you were putting lipsticks xD
equally likely scenario @ocean quartz
Trying to use String#substringBefore
is there a way to ignore the carriage? (kotlin)
use a raw string maybe idk
as in the \r ?
Yeah, I got it.
Thanks 🙂
@prisma wave hey man have you ever used JB's Exposed framework?
nah never used it before, from what I've seen it's pretty nice though
hm
will be soon integrating a lot of databases in my plugin and not sure if i should use Exposed + hikaricp or just my own abstraction + hikaricp
Or spring data 🙂
it shouldn't be much of an issue since i download kotlin stdlib at runtime and load it
along with okio, okhttp and drivers
so shrug
but spring data seems pretty cool
Niall do you eat spring jesus, everything someone asks you mention spring
frostyy u need to expand ur horizons
kotlin good spring good
but u keep saying they bad 🙁
You have no proof that I said that.
This is also blasphemy, as you are saying non realistic things in order to make me look bad.
🤔🤔
😂😂
Inspect tool go brbrbrbrrrr
fr tho apparently spring is really good @hot hull
It takes literally hours to write up basic prototypes
days for some full fledged solution
planning literally takes 10x longer
@rotund egret That is falsified evidence. Continuation of such blasphemy shall result in legal actions to be taken against you.
awww frosty ♥️
I have yet to combine the power of spring with kotlin
what u waiting for
Anyone ever worked with holographicdisplays api?
So i am trying to make a stats leaderboard per player, which works. it creates fine, but i am having issues with updating the hologram.
Whenever i want to update the board for that player, i need to be able to access it. i was wondering how i would be able to do that. Because now it just creates everytime a new hologram and does'n delete the old one. But i need to be able to or clear the lines and re-add the lines, or delete the hologram for ONLY that player and recreate it. Anyone can help me out or does have any examples.
not again... https://bin.bardy.me/Hwiqnh34.pl
Need to get something clarified. If you have multiple projects using a gradle daemon, they will each spin up a new daemon for that project only to be utilized for future builds until the daemon turns itself off, right? Meaning I can just specify in the gradle.properties not to keep the daemon on in order to save ram after the build?
We read minds, ask away
This might be a dumb question, but would something written in C be faster than something written in Java/Kotlin (excluding JVM startup time). It seems like the answer should be yes, but if they both are compiled to machine code then maybe not?
C makes me cry
