#dev-general
1 messages · Page 126 of 1
@remote goblet kot.lin.
@topaz bay Largest SLOC youve ever written?
¯_(ツ)_/¯
install statistic pluginininininininininininininininininininininininininininininininininininininininininininininininininininininininininininininin
I have the plugin
And I know you see me playing overwatch dammit
total source of odin is 5.8k
the parser is 1.9k
overwatch is a stressful game
especially when you lose 9/12 comp matches because europeans are braindead
it is my goal to get 100k lines in a program one day
That seems pretty pointless
tf is oding
dont you ever disrespect him like that
should be capitalized
idk why but i thought odin was 5 letters long
If I want comment commentable on all commentable (ICommentable) objects
Java is much better at having a bigger boilerplate
@ocean quartz thats a big kekW
intelliJ
is currently shitting itself

i'll be back in 3 years when this is done
innit
sxtanna
is it bad to just have interfaces for the sake of it
say
2 objects might have getOwners()
and I want
Ownable
is that worth it
@obtuse gale nice 👍
:)(:
give me examples of cases
Thats not what that phrase means
It means its a decision you make on a case by case basis
ok my case
Not something you would just apply everywhere
Photo
Airframe
both can have Comment
makes sense they both implement ICommentable
no
Are they ever generically accessed as icommentable?
Not really though...
If theres no logic to it, there doesnt really need to be an interface for it
How does that make sense?
Also the naming pattern ICommentable is trash
It should really just be Commentable or Commented
Actually IQuiteLikeIt
then go to c#
ok it is a temporary naming pattern 🙂
Actually IQuiteLikeIt
lmao
You have a serious issue of applying spring patterns to every situation
Spring is not the pinnacle of JVM programming
@hot hull nice one
**Dependency, luckperms, materials, nojquery, notowner, optimize, papibot, particles, paste, placeholders, player, plsnoarrowcode, requirements, roleperks, site, solid, sounds, spigot, spigotid, startuplog, tagess, tryandsee, welcome-screen, yaml```
smh
@static zealot,
=faq <key>
=faq <add/edit> <key> <message>
=faq delete <key>
=faq raw <key>
=faq list
?<faq key>
?kotlin-dependency
Dependency Injection
Dependency injection is when we pass a class through other class constructors to access that specific class in those other classes.
class Main : JavaPlugin() {
override fun onEnable() {
val other = Other(this)
other.method()
}
fun myMethod() {
/* Some code goes in here */
}
}
class Other(private val main: Main) {
fun method() {
main.myMethod()
}
}
"Main"
?java-dependency
Dependency Injection
Dependency injection is when we pass a class through other class constructors to access that specific class in those other classes.
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Other other = new Other(this);
other.method();
}
public void myMethod() {
/* Some code goes in here */
}
}
public class Other {
private final Main main;
public Other(final Main main) {
this.main = main;
}
public void method() {
main.myMethod();
}
}```
wait they are lol?
xD
lol @remote goblet, your issue is that you're connecting to an sftp server, via ftp
they're completely different protocols
https://kotlinlang.org/docs/reference/functions.html
Functions in Kotlin are declared using the fun keyword
oof
fn ftw
I mean it makes more sense than method
ew
^^^ rust
but like
rust bad
fn cool(even_cooler: CoolStruct) {
}
kotlin good java bad rust bad?
when do you know a plugin is to big in size? xD
it's never
i like rust's mut
when > 5mb for premium
Like my plugin only has 4 commands and a few other things and its already 1.6Mb
what
lol @remote goblet, your issue is that you're connecting to an sftp server, via ftp
@quiet depot i'm aware
what are you doing blitz
const mut number: i8 👀
if you're aware, then why is the issue still there?
just a random plugin xD
rust is trash
with what?
deluxechat have dependieces?
most of that 1.6mb will just be the kotlin stuff wont it?
ugh kotlin
rust is not trash
It wont be all the features in ur plugin
maybe it would be less trash
where is deluxecht channe;
#spigot-linking dog lover
with runtime trait checking
maybe you should just write code in the correct paradigm for the language you're working with
I have a plugin that adds a join/leave message also a /fake join/leave command and a /give and /give all command xD
yes piggy
hard to get used to
we are a team dedicated to porting popular Springs Framework to Skript
wtf?
what
what
where is that?
Lol
neat
i hate you
xD
does skript have an api then
loads of skript addons exist that extend the language
yeah
Wht
Hi
trash
dog lover, read #spigot-linking; follow the instructions and link your spigot account, you'll then be able to access #deluxechat
delete the whole planet
sxtanna
im down
I should do that at some point...
deleting the planet sounds great
i can write something in spring and still spend half the time talking here and be done quicker than anything written by hand
N.java remains
:)))
N.java is something that should be deleted
geniune question
N.java gives me nightmares
I never said I don't like Spring?
I thought you did
Nevermind then
N.java
is a feat of human engineering
The ultimate solution to dependency injection
Wrong
Ok
injekt is better
Picocontainer
not sorry
guice > all your shitty alternatives
guice is worse
only because you don't know how to use it
i agree with sxtanna
after I added it to kiteboard
and deleted it
pico container did the job just as good
because you didn't fully utilise guice
yeah i did
:doubt:
I have never used but out of the box i find guice pretty hard to understand
I even used a Provider
0
you call that full utilisation
jsch
i have no clue what im doing, shut up
yeah well I dont want 5mb addons just to do some stupid assisted inject
when I can make my own factories
5mb
wAHHt?
???
I just asked general question does it have dependecies
both
likely pebcak
?
pebkek
like annoying thing is
No wait
well
considering that specific question, I'm gonna assume you have bought the plugin, and aren't just asking pre-buy questions
you're going to have to link your account if you want any further support
Kk
Anyone got an anti-swear regex thing?
probably one that just like prevents people from doing things like
f.uCk
consider using a similarity algorithm instead of regex
Couldn't that be fooled by using a tonne of random symbols and capitolising the characters that make up your curse word
i think i do
i did this in discord.js
function swearCheck(message) {
let regex = new RegExp('[^!@#$%^&*]*(fuck|shit|bitch)[^!@#$%^&*]*');
if (message.content.toLowerCase().replace(/\s/g, '').match(regex)) {
message.delete();
}
}
``` if that helps 
scunthorpe problem
ew
i wrote a swear filter in go
(javacript)
It is magical
ahhh
I think I enabled something I shouldnt of lol
whats with all these gh emails
If I have a Number, how should I handle when the number is a plus or minus? since I can't do + - 1
you cant do + - 1?
I mean how would + - 1 make sense? wouldn't it just do + 1 and - 1
Meaning it'd be 0
or would it take the last operation?
well 1 - 1 is 0
Well no shit sherlock
I have a calculation, and rn it's jut +, but I want to make it so it takes an input, which is a Number meaning you can define + or - infront of it
yes
Yes what
How does that solve my issue?
ints can be negative?
frcstysShittyCalculation(-1)
frcstysShittyCalculation(1)
fun frcstysShittyCalculation(input:Int){
}```
...
^
input example: (-1, 0)
inputs: Number incrementX, Number incrementY
int x = posx (+-) incrementX
int y = posy (+-) incrementY
o
the (+-) part is what confuses me
if its a negative make it not a negative ez
I still don't understand lol
`Do you always want it to increment?
do you want the absolute value, i.e. ignoring if it's a negative?
Because if the input is negative it will de-increment
so just de-negative the input ez
No, I want to have a plus if it's a positive and a minus if it's a negative
See that's what I was asking, thank you
basic math lol
frosty this is really, really basic math
cos a + and a - will become negative
Lemmo, it's java who the fuck would know that
it's not java
shut up
this concept applies to math at it's most basic form
Okay mr smart ass
I can still remember back in year 7 when the teacher drew up a fucking graph like
+- = -
-+ = -
++ = +
-- = +
5 - - 5 = 10
0
0
null
fukn nerds
probably somewhere
Cool
Nothing?
is that a thing
no... no, thing, no thing, nothing
im gonna forever pronounce it no-thing
java bad
Nothing is awesome
java bad
@obtuse gale who said that's java tho
except font awesome
who said I was talking about your screenshot
😏
smh
I couldve just been stating javas bad
bm has started a religion
but you didn't
the kotlinism religion
i still gotta figure out rust
It's a great religion
i agree
We have our lord and saviour Jetbrains
in the way traits work
🙏
whats the best way to fully lock someone from WASDing? Just cancel player move event
and the prophet Andrey Breslav
what a wise man
@obtuse gale yeah and probably sending packets to make the client think it's inside an invisible box
:what:
He could beat James Gosling in a fight easily
whats the best way to fully lock someone from WASDing? Just cancel player move event
@obtuse gale mount them to an immovable entity
Armor stand
35$ for 75 mbps
$35 more for < 1/10th of the speed
what
overpriced as fuck
wait and how much is the gigabit?
right now, our entire bill is $80 + fees for some devices
thats gigabit + tv + land line
And to get a lower speed of internet, it would be $35+ more
The logic... hurts
how caan I teleport a player behind another player
multiply the player's direction by -1, remove the y, and add that to the player's location
waiting till we reach 69420 https://i.lemmotresto.com/2020-07-09--12-43-23pm.png
wdym remove the y
y = 160
destroy y
like just set it to 0 lol?
yes, set it to 0
no
p l e a s e e x p l a i n
Unless ofc you actually want to teleport them behind the player's head
looks more like pron
arrow up your ass
FUCK
Read what I said
val loc = this.location.direction.multiply(-1).add(this.location.toVector())
dear god in heaven
lol
you'll get to the correct answer eventually
Thats just literally not what I said
multiply the player's direction by -1, remove the y, and add that to the player's location
val origin = targetPlayer.location
val destination = origin.add(origin.direction.multiply(-1.0).setY(0.0))
imma get yelled at
@obtuse gale did u expect anything less?
If you pester sx enough he will spoonfeed you
also for reference
Sx got a warning from BAAS saying too many caps
fucking dumb
=warnhistory @topaz bay
I found nothing on @topaz bay
nerd
idk cancel packet
lol what
when you spend ages trying to find why only a certain version of your bot (in my case, the development bot) will actually play music, to find this: https://github.com/BomBardyGamer/BardyBot/blob/master/src/main/kotlin/dev/bombardy/bardybot/components/JDAComponent.kt#L35
ooh I wonder who's HARD-CODED CLIENT ID THAT IS
honestly
anyone wanna test out my bot btw?
trash bot
KatBot™️ is superior
I have a corrupted world with player data files resetting so if someone has extensive knowledge I'd like to get in contact.
The world file that got corrupted along with essentials. Essential player files are there but when players login essentials reset so homes are gone.
Welcome to essentials 
@errant geyser since you need the sauce so badly, I will share it ._.
All of that stuff is only 5 lines long anyway
Anyone know how hard it would be to sync the movement of a player to the movement of an NPC
ie player moves forward NPC moves forward
what the fuck
so print(5 + " things") isn't valid python, but print(0.0 or False) is
this language just keeps on getting worse
lol
that's not a problem
I'd be fine with that, if it were consistent
but it's not consistent
strings, ints, floats, etc can't be converted to each other without explicit casts, but booleans happen to be the exception, where type coercion just magically happens
Yeah...
Do you have any idea why 0.0 or False is valid? 🤔
I looked at it for a while and I don't get it
in a binary represenation, 1 = true, 0 = false
Yeah, but 0.0? :p
how
following values are interpreted as false: False, None, numeric zero of all types, and empty strings and containers (including strings, tuples, lists, dictionaries, sets and frozensets)
All other values are interpreted as true.
I wasn't talking about the type coercion within booleans itself being inconsistent, I was talking about type coercion in python being inconsistent
why can it happen in booleans, but not strings?
so
print(5 + " things")isn't valid python, butprint(0.0 or False)is
I find it diabolically stupid that a language like python, doesn't have consistent type coercion, when that'd actually make the language even simpler, which is the only thing it's got going for it.
Thats only for boolean operators coz of how their result is returned I guess
The result isnt necessarily a boolean
ah that's true actually, and/or return one of the operands, not necessarily the boolean value. Regardless of this minor fact though, type coercion in python as a whole is inconsistent, due to this odd boolean semantic.
I guess they really wanted a shorter version of ternary or something for some reason lol
Just found out that saveConfig() in spigot deletes the comments in the config.yml
Whyh
because it uses snakeyaml
yaml is trash anyway
I mean I was just pointing out that I found out now even tho I have been programming w spigot for like 2+ years
comments at the top of the file (header) are preserved
It is still a big yikes
save default config literally just copies the file from the jar
But if I have set() something in the config, won't saveDefaultConfig() overwrite the changes
yeah
o
save default will only save the file from the jar if the file doesnt exist on the disk
dont use yaml?
I wanna use yaml for my config file thoe
Use a different library then?
Yeah I know, I'll probably do that but yikes
Like how would you do such in rust:
Command
HelpCommand
usually id store all sub classes into a Collection<Command>
dude.... google it
bump
bump
bump

bump
bump
bump
Like how would you do such in rust:
@heady birch bump
bump?
bump
Like how would you do such in rust:
Command
HelpCommand
usually id store all sub classes into a Collection<Command>
justin beiber
bump
anyone can?
I can't
also wrong channel
oof
?paste
@heady birch
Something like this ? https://paste.helpch.at/upeguhadof.cpp
lol
I love rusts enums
@hot hull that image is incorrect
no one secretly loves intellij while showing love to eclipse
Hello kaliber
everyone loves intellij, hates but eclipse
how are you this fine morning
not bad thank you
@onyx loom Love can be onesided tho
true
@remote goblet i found you
@quiet depot lies I'm not skilled
@remote goblet don't worry, skilled rank means nothing on that server
@steel heart Nice pfp
did somebody say it's rate my code time?
Ah good, that is me then
WARNING: Could cause severe eye strain, blindness, nausea, or other unwanted side effects
this is what you call a great example of: "Oh well, it works"
love how I've just killed the chat lol
🤔
This is why you dont do 3am programming
I dont wanna like change my theme or whatever but I want the connected == and =/= things lol, anyone know how id edit my thing so that works
ah
?
None
????
I answered my own question
coming from java rust feels different
no managers no services 😦
but i love the syntax
AbstractSingletonFactory
"singleton factory"
Anti Drug Games - JonTron
http://www.Facebook.com/JonTronShow
http://www.Twitter.com/JonTronShow
Credits:
Director/Actor/Head Writer - Jon Jafari
Writer/Cinematography/Assembly Edit - Paul 'Pop Smear' Ritchey
Writer/Crew - Dominic Moschitti
T...
I heard Rust's compiler picks up on a lot of things
there's like normal mode which will tell you about things, and then there's DIY mode
diy mode? 😮
yeah where it basically says nothing and lets you figure out why it's going wrong
lol
too... many... design decisions...
Thats literally just you trying to apply spring patterns to everything
lol
maintainable
Spring patterns shouldn't be applied everywhere
they're called Spring patterns for a reason
class Iter(val list: List) {
var index = 0
fun hasPrev: Bit {
=> index > 0
}
fun hasNext: Bit {
=> index < list.size() - 1
}
fun getPrev: All {
val value = list.get(index)
index--
=> value
}
fun getNext: All {
val value = list.get(index)
index++
=> value
}
}
Now THIS is maintainable
what dis
lol
lol
most of the time im joking
such as
looks like go
but
I'm getting used to rust
Wow.... surprised neither of you pointed out the logic flaw...
Completely missed my entire joke
;(
and the others
No, those are correct xD
@hot hull yeah :p
Thats how... iterators work
I mean atleast they're there
lol
fuck generics
Does anyone have a decent time utils class I could check out? Just need to do some calculations on getting timestamps in the future and whatnot.
Probably will end up making my own, I'm just feeling lazy today.
just use java.time ?
lol
Ngl Niall it suits you, since there's a pub mentioned
Ask for opinions here
We will definitely tell you
royal we, cause I'm referring to myself
Alright
Well last time i followed your advice and i didn't connect to a database directly anymore
i learned something about connection pooling and stuff
Sure, that's what it is
I demand competence, and I will fight to the death for it.
I would not want to live near Washington tho fr, I feel like you would go for a door to door search to tell me a certain class is aids and then stab me 127 times
I know its celcius
even if Fahrenheit id prefer that 🙃
I do not want to associate with that photo
Because the clothes they're wearing are awful
😂
Who actually dresses like that
theyre roadies what do u expect
oi blud come down Birmingham end yea I'm gonna fuck u up yeah me and the homies gonna stab you yeah your gon be dead blud if you fuck wid us
I do not wish my extended family to be represented by the birmingham roadmen
@onyx loom u from Birmingham boi?
yes sir
Dayum
Surprised you've not been jumped by four guys in puffer jackets in a black Vauxhall corsa with the shittiest little exhaust on it
cant get jumped if ur apart of them 😉
Fair enough
jk jk
My school is full of these idiots happy now barry?
its funny cus this guy i went to school with on the last day stole a car and rocked up infront of the school with a corsa
well i think he stole the car anyways
🤦
probably did
I'd imagine so
The uk is strange
It's like some areas are super nice and clean without being cringey about it, and others are just shitholes
yeah i could give u 2 examples in birmingham rn
well the nicer part is just the outer skirts of birmingham, as ud expect
hey did anyone know that Java is actually licensed under GPL v2
OpenJDK yes
Uhm, so I'm trying to make a Spigot plugin for my Minecraft server. I have some default files for a language system I'm building. I want to copy these default files with the folder structure into the plugin's directory.
that's the structure
What are you asking?
how would I go about doing that?
Stannia.instance.saveResource(Stannia.class.getResource("languages/").toString(), false);```
Tried this
what in the
saveResource("languages/", false);``` *should* do it, but it's possible saveResource doesn't work with directories, can't remember off the top of my head
Think I tried that too
Stannia.instance.saveResource("/languages/", false);
So I had this, but removing the first slash did something
However it just created the directory, it didn't copy the files inside it
and yes, katsumag, it's a static instance
Ur StAtIc InStAnCe BaD
this won't fix your problem but it's a good practice don't use static
well what do you propose I do?
?java-dependency
Dependency Injection
Dependency injection is when we pass a class through other class constructors to access that specific class in those other classes.
public class Main extends JavaPlugin {
@Override
public void onEnable() {
Other other = new Other(this);
other.method();
}
public void myMethod() {
/* Some code goes in here */
}
}
public class Other {
private final Main main;
public Other(final Main main) {
this.main = main;
}
public void method() {
main.myMethod();
}
}```
I believe in the actual jar, there are no "directories", so you can't just copy one in the same way
So Spigot supports DI out of the box?
either hard code the names, or do some hacky JarInputStream stuff (looping through each entry and copying if the name matches)
That's a java thing
^
DI isn't spigot stuff is Java
DI is nothing specific to spigot
in spigot most people use "classic" DI, or Guice
Guice is nice for bigger projects, but bumps the jar size up a bit
Yeah, Spring isn't ideal for Spigot plugins
which you may or may not care about
But that code snippet the bot posted works out of the box? 🤔
I thought that lmao
Good luck, Sxtanna
BM wanted to ask you if you could stab him 128 times rather than 127
I that a thing you do or?
???
What u on about mr mitten
yeah
wtf
nvm
is happening
good question
how many times?
No, I was referring to, well, what you just said sorta backs me up, and this #dev-general message
That's what I was referring to
Smh
Im so lost...
Great
🤨
what the fuck
Honestly keeps me alive
its great
Imagine Java
What are you covering up??
JAVA BAD
nothing lmao
OI OI
kotlin good java bad?
ok I propose a competition
...
To find out who hates Java the most
Gradle good Maven bad
This is 9/11 level conspiracy
Wise words
I demand an explanation.
Java is behind all of this
Java, it killed BMs family
and burned my house down
No
IM about to kill his fucking family
Did you not read the inspirational reddit post
I wrote about it on r/kotlinmemes
sub fucking sucks
UHHH
Ok that is a sin
My potato brain took way too long to do this holy shit (making it so it won't scroll past the amount of items it has)
This is ugly af
if (getPage() * 9 + getPageSize() > getPageItems().size() + 9) return false;
It's testing, I use magic numbers to make it work
I think we might have to stab him 129 times
😮
I dont think you realize how amazing I am at not forgetting things
U guys ever feel like Java is the reason you cant sleep at night so are stuck calling an internet stranger senpai for a few hours?
And I guarantee you I will bother you until the day you die
If I dont get an explanation
Java is responsible for every single disease known to mankind
This is the truth
My family are dead because of Java
🙂
DON'T SMILE
I look forward to it Sx, since you will never get an explanation, and I'm scared of what blocking you would produce
🤬 🤬
I'd honestly rather just block you all than to actually bother you about it
man wtf is happening
Much easier
Danke
I think we should start a gofundme to buy us all Java themed punchbags
yes pls
Imagine someone actually donates tho
True, true
lol
lol
big mistake
hes probably a java user anyway
🤮
i got him good with that
Damn
🙂
sxtanna - OWNED ✅
wow
I have no idea what's going on, i don't even know how to defend xD
imagine calling for backup in a fight
the great sxtanna is weak
not so great
@ocean quartz just like... cut them or something
Maybe a jab in the throat
That tends to startle people
Aight let me get a knife
I'll startle you
Thank you
idek why sx is mad
¯\_(ツ)_/¯
holy crap they added this thing to mobile ¯\_(ツ)_/¯
this is the best thing they've ever done
(╯°□°)╯︵ ┻━┻
┬─┬ ノ( ゜-゜ノ)
slash shrug
¯\_(ツ)_/¯
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
┬─┬ ノ( ゜-゜ノ)
what? xD
I already noticed this thing like 2 weeks ago
(╯°□°)╯︵ ┻━┻
┬─┬ ノ( ゜-゜ノ)
┬─┬ ノ( ゜-゜ノ)
Meanwhile, I'm learning japanese ._.
Same!
koun o
Duolingo is pissed at me for missing my session today tho
japanese
the real question is hows bms slovenian 🤔
Uhhhhhhhh
U given up on that yet BM?
Someone change the subject
I kinda got bored
And since frosty tried kotlin I just couldn't be bothered
Yugi isnt that "you"? Idk what the o means tho
I have no idea
seems
was google translated for "Good Luck"
Oh really
BM I despise anime and most Japanese things except their music. Japanese metal is sick
Is that your motivation?
I mean it's better than the people wanting to watch un-dubbed hentai
Why is hentai a thing?

