#dev-general
1 messages ยท Page 191 of 1
Oh oof. Thats why there's always the same group of people in #development and #dev-general
Oh oof. Thats why there's always the same group of people in #development and #dev-general
@analog crater Sounds like you feel like that's a bad thing?
No? I just mean that there is always the same people dominating those xhats. I believe this is causated by the discord primarily known as a support server for PAPI not a development server.
No....
Dominating the chats by talking about topics such as kotlin or shit like that
Honestly, I find it rare to see anyone new
I don't see how you could infer that from this server's relationship to papi
papi has absolutely nothing todo with kotlin
Oml thats not what I meant. It wa sjust an example of a topic. This server is known as a PlaceholderAPI not a hangout for developers. Thats why there's rarely any new developers who stay
ah
we have been trying to branch out a bit over the last year or so
the introduction of this very channel is an example of that
the problem is, we're also trying to get partnered/verified (ironically in the same timeframe)
so it's kinda one or the other
papi vs diversity
we chose papi
if/when we get partnered, I'm sure we'll push the development aspect of hc a bit more
๐๏ธ
Ei
But @quiet depot :( I need it
then fix it urself
Idk how
@distant sun wanna send over the source code? I could maybe take a look?
Or is that about something else?
Also, why does processResources get executed when running the build in IntelliJ?
https://github.com/games647/LambdaAttack I need 1.16.1+ support
I can try, ill probably fail but im really bored
@empty flint https://github.com/PiggyPiglet/LambdaAttack for a head start
the latest version?
mm
How
like the other day I think
Ah fuck then I gotta update my own shit as well
:((((
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
This doesn't specify anything about 1.16.3
wtf
me when 1.16.5 adds support for commonlisp scripting ๐ ๐
Probably isn't out on spigot yet
maven so gud
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project lambdaattack-version: Fatal error compiling****
maven bad
@dusky drum it will error in ij but maven can compile it
mvn package?
aha so compile doesnt work but package does wierd intellij
and @empty flint both spiglet and paper have 1.16.3 builds
I mean gradle is the same
no it aint
gradle literally canโt do what maven does here
which sucks
or maybe it can, I personally havenโt figured out how to tho
that is having multiple versions of the same dep
for me that lambada attack does nothing when i run it, like it just throws null
well duh, itโs broken
it throws null
imagine throwing entire error ๐
imagine null
I can
because spring is fucking giving me null for no reason and this is kotlin ๐
ez
make it throw Frosty
It is not spring's fault
Nah make it throw piggy
@quiet depot I mean it's the same in that compiling with intellij's system won't work
Elara build tool when?
im bored what should i make lol
a familiar question
one I usually answer by looking at other people's thingys and seeing how I could make them better
think of a simple idea and overabstract it
like?
I usually love making libraries
I wanted to convert a POJO to a GUI and ended up making a reflection library AND a GUI framework for a simple thing
I usually love making libraries
linraries for most things already exist lol
so?
Recreate it
and also, not true
But better / worse
Recreate it
this
like theres nothing wrong with command/gui libaries that already exist
no matter how useless, recreate it
get a gimmick
all of my projects are either commissions or just recreations of others' ideas
sounsd hard
yo bm do u know if conflicting file separators will fuck wit java?
is that something i should actually look into? itd be interesting but sounds very hard
I'd like to think they wouldn't @quiet depot
@quiet depot I believe Java should deal with that
@obtuse gale it's kinda tricky but quite fun
getting a java.io.IOException: The filename, directory name, or volume label syntax is incorrect
Even if it's very simple
Is this working for anybody else with gradle: Could not find org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT. ?
@empty flint you got the repository config?
@empty flint you got the repository config?
@jovial warren Not sure what you mean
What repo config are you refering to?
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } in Groovy DSL I believe
nah that didn't fix it bm :/
replacing / with \ or the other way around?
you sure Spigot even supports 1.16.3 yet btw?
\ with /
you sure Spigot even supports 1.16.3 yet btw?
@jovial warren Well I can build it with BuildTools so I think it should, right?
if you're using BuildTools, you need mavenLocal()
not sure why it is an absolute path
this is why Windows is annoying lol
because Windows likes to be stupid and do things differently from literally everything else
browsers use /, Mac & Linux use /, but Windows says "hey let's be dicks and say fuck everyone else, we're gonna use \ instead, just to make things more complex"
Get that pepper of there
Windows is underrated
doesn't it have like
It just works
more like 98%
(servers)
are you talking about windows being underrated for servers stef?
cuz if so
windows is overrated for servers
windows server sucks ass
Ah, for servers its overrated
But with WSL 2 it's getting better
Being able to run both windows and linux containers with native performance
WSL2 is nice
EEE
Apart from when it broke and I had to reinstall it lol
Embrace, Extend, Extinguish
meaning?
also can we all just sit back and admire Bukkit's deobfuscation of Minecraft server code
absolutely not
microsoft doesn't really do that anymore stef
nice one
imgur galleries ๐
wut
Yeah, they took a more open but the idea still stands
For example a company may rather want a windows server that has no worry running either linux or windows VS just linux
And yeah virtualisation but that's not the same thing
I genuinely can't see a use case for Windows server apart from domains in schools and things
when you're starting your type names with I, that's supposed to mean it's an interface
Favourite anti pattern
How do I include classes from another project in gradle that is on my disk without declaring them as submodules?
also, AbstractHorse = interface apparently
"Piggy's Barn"
always loved that name lol
use the flatfile repository format blocky
@quiet depot So I have to compile the other project into a jar and then I can import the classes from the jar?
Oh that's something else
repositories {
flatDir {
dirs 'libs'
}
}
How do I declare a dependency to that flatfile repo?
You just declare it as normal I believe
implementation name: "jar-name"
I'm still annoyed you name it placeholderapi instead of PlaceholderAPI as the project name Piggy -.-
you realise having it lower case is actually better right?
it's the convention
WebStorm actually has that built-in as of a certain update, where you can't have project names that have upper case characters in them
but still, placeholderapi > PlaceholderAPI
what's so stupid about that?
returning "test" instead of the field
omfg lol
annotations are used where appropriate
also what's that key system I've seen in the API for?
everything
Key, Keyable, Keys, KeyFactory, KeyWhateverTheFuckElse, the list goes on
player.get(PlayerKeys.NAME)
player.get(PlayerKeys.UUID)
player.get(PlayerKeys.INVENTORY)
etc
I assume all expansions will need to be rewriten for the new system right?
nah ima make a compat layer
ew nah, make it not compatible so all the expansions look nice 
for the first few versions
I'd say give people time to migrate over to the new system and then basically say "anyone who hasn't migrated their shit over to the new system can go fuck themselves"
yep
but in a nicer way than that
Basically the same thing that was done for the ez hook or whatever the fuck it was called
i'm still not sold on the api tbh
I'm not sure on having two ways to register placeholders
might change it up
Well then only have 1
what are the current methods Pig?
@Override
public void enable() {
System.out.println("Enabled test");
registerPlaceholder("name", context -> context.getPlayer().get(Keys.NAME).orElse("null"));
}
@Placeholder("uuid")
public String uuid(@NotNull final PlaceholderContext context) {
return context.getPlayer().get(Keys.UUID).orElse(UUID.nameUUIDFromBytes("null".getBytes())).toString();
}```
or with a method
j4rs stands for โJava for Rustโ and allows effortless calls to Java code, from Rust.
Some time ago, on a need to call Java code from Rust, I started the j4rs project. The main idea was to implement a crate that would give the ability to its users to make calls to Java easily,...
PDM for rust?
Absolutely not
Maven download
also what about doing a Spring and using classpath scanning to register placeholders internally
// Create a JVM
let jvm = JvmBuilder::new().build().unwrap();
// Define a Maven Artifact
let artifact = MavenArtifact::from("org.apache.commons:commons-lang3:3.9");
// Deploy the artifact in order to call it from our Rust code
jvm.deploy_maven(artifact).unwrap();
oh no
wym bardy?
wow they stole my incredibly original idea wtf
Rust in JVM
Rust scripting support
it's just implemented in the JVM I think
what about structs/objects
@quiet depot I mean basically looking for anything on classpath annotated with annotations for example and registering them internally
There are no natively implemented objects?
like what Guice does with it's DI
erm that's basically what we do
@jovial warren guice doesn't do that?
what does it do then?
@heady birch idk probably not
nothing
it scans classes you tell it to
Guice doesn't do classpath scanning
ah okay
code gen
isn't classpath scanning easier though?
yeah
And it adds a degree of complexity
I mean, VMware did it (VMware are the ones behind Spring), and well
wat
Spring does big brain things
rpf does big brain things
If you try decompiling it
All the actual project files are in like /boot-inf/ or something
yeah but RPF only works with Guice and it's still in-dev
Isn't spring boot just a wrapper for the XML stuff?
What's wrong with guice
Nothing
Poppycock
Guice isn't as idiomatic as say Koin is for Kotlin users
koin bad
no
Pico container
Koin uses field injection
Koin
Apart from being made in like 2000 its fine
dumb decision
val yourField by inject<YourClass>()
Field injection bad
very idiomatic for Kotlin
Constructor injection means that the object needs to be controlled by the DI framework
every used Jboss application server?
Which is what a DI framework should do
meaning you're basically taking away any instantiation
Which is what a DI framework should do
says who?
Both guice and spring heavily discourage the use of field injection
Because it makes the dependencies of a class too implicit
field injection isn't against the law
you're bad design
๐
I mean, don't get me wrong, I think Spring is better than Koin, but there are some situations where you need to be able to control the instantiation of the object, especially when you're working with Spigot
You are hereby being sentenced to life in prison for using field injection within a java application
๐ฎ
@quiet depot is there a way to use the + for jar versioning purposes?
you try using constructor injection with Bukkit then
wdym
I just always want to use the latest jar from the flatfile repo
with Koin, I can just load the modules in onEnable for use around the project
i use constructor injection exclusively with bukkit
Guice can do that too?
That's kind of the point
You initialise the modules upon startup
I think I'm confusing DI with Spring's method of DI
yes
because Spring and Koin are the only two DI frameworks I've ever used
Don't say guice bad if you've never used it
Spinjector
Elara inject
Also N had a better concept of DI
N.get("itemName")
N.el?
gives you the instance instantly
Are you making elara
Wonder how sxtannas odin is coming along lol
Bad
Odin sucks
Yugi is currently doing all the work for elara
Ima make an interpreter or something eventually
Add let mut and &
use a different synbol for pointers
use the hand cursor icon instead
'pointer'
โบor this lol
we will use = and == for pointers
emoji
ugly
Hmm I don't like that either
Why not use the common *
Not readable enough
I may be a fool, but atleast I'm not a weirdo who thinks that's nice 
Imo == is confusing because it's already an operator
it's whitespace sensitive
ยป use this
That one would be nice but it's not easily accessible
It isn't a character in english keyboard
julia moment
Imagine not having a numpad, weak af
wait what
I mean i have a numpad, but not everyone does
thats on the numpad?
Alt + 1 + 7 + 5
Every character is, Kali
lol
I use alt + 2 + 5 + 5 a lot because it's a blank character that isn't whitespace
Related to earlier
Here you can see same process used for 4 different messag types
It's funny cause you can only use alt and your numpad to write everything
It's all caps tho :((
@hot hull you think alt codes work on all systems?
they only work on Windows
windows good
and that's a problem when there are a hell of a lot of developers that use Linux for development
๐ญ
rust enum { }```
Lol speaking of Linux it randomly just stopped accepting my password
Linux is superior, but I ain't got the braincells to actually use it
@heady birch ```java
public enum MyEnum {
MY_ENUM_VALUE(1)
private final int value;
MyEnum(final int value) {
this.value = value;
}
}
no
because enums are kind of instances
apparently closest thing is a class heirachy
enums in Java are instances
Pretty sure it also worka on Mac
yes but arnt they singletons
yeah
rust enums are like non singleton
closest equivalent is probably sealed class + objects in kotlin
beans
No?
beans
closest equivalent is probably sealed class + objects in kotlin
yeah this maybe
Elara's logo doesn't exist yet afaik
E
ah okay
Looks nice ngl
ikr
not what's on the GitHub page matey
altho u need to make it transparent
is that you asking a question or making a statement
Will probably remove the background and use this one
Both
We've got lots of variants
also, still not sure about using let to define both variables and functions
Why should functions be any different?
If they're first class surely they're just variables?
because they do different thingys
a variable is for storing thingys, a function is for doing thingys
consider them as lambdas rather than functions
Except functions and lambdas are the same thing
strictly speaking no
But a lambda is basically just a function anyway
strictly speaking no
okay mate
yes
Because they are referred to as functions
Because they are named
a lambda is just a function without a name
And vice versa
a lambda is just a function without a name
wat
i.e a Function without a name
not really
actually, no, you're right
it's a function that cannot in any way be identified
In computer programming, an anonymous function is a function definition that is not bound to an identifier.
As far as elara is concerned, functions / lambdas are no different to any other variable
which seems a bit weird to me
since like pretty much every other programming language makes a clear distinction between those, as it's much easier to read
one of the reasons I don't like the language
(defn name [args]) is just a macro that expands to (def name fn [args]) i.e a lambda
Iirc anyway
๐
I'm so bored I legit just watched a guy clean his car for 40min..
like I said it's shorthand for def fn
I'm so bored I legit just watched a guy clean his car for 40min..
@hot hull boy do i have the video for u then
Avicii Tribute Concert celebrates the life and music of Tim Bergling - AVICII - live at Friends Arena in Stockholm, Sweden together with +50,000 fans from all over the world.ย ย Click here to make a donation to mental health awareness: https://www.aviciitributeconcert.com/stream...
honestly, this is a great watch
Already watched it
ow
Also if functions are first class, then logically they should be declared in the same way as variables
Having 2 separate syntaxes implies that they are different entities
when 3 and ```
(Int a) => a * 2
is it just me or is programming like the worst way to relieve your boredom lol
it just kinda makes you more bored
If you have a fun thing to work on it's actually a good way, atleast for me
I mean, don't get me wrong, I love programming, but sometimes, it can get really, really boring
Like right now I've finished a plugin so I don't have anything to do, so I'm just fiddling around with shit and it's hella boring
Also bruh why the fuck did youtube change the video size on mobile, like the entire video image is over the screen size
I like programming, I just don't have all that many ideas
Random idea generator 
Also bard, about your argument about functions not being similar to variables, look into von neumann architecture
yeah but if I google "programming projects" or some bull shit, I either get projects that I can't be assed to do or that I have no use for
also Yugi I think that was something we learnt in Computer Science at some point
still uses data and instructions though, both of which are different from each other
Not computer science, computer org. And arch
Von nuemanns style i.e, our current model stores both in the same place
Data alongside instructions
Dont see it not being readable in any way
Also consider the fact that functions act exactly like variables in elara
First class functions
yeah true
I think I prefer OOP tbh
Biased
also @prisma wave, making Discord bot not in Spring bad
ah you saw that
meh
Classgraph + guice is usually close enough
and no 40s startup time
wat
Everything is slow
Robert de niro is waiting
Yes I can agree
You lose a little start up time
For years saved on development
Lol
@prisma wave 40 seconds though? wtf do you have in this thing?
ยฏ\_(ใ)_/ยฏ
just think of all that precious enterprise time saved while developing in spring!
Some of mine takes 50 / minute
Spring >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Classgraph + Guice
wat
How about handle dependency yourself
Register all commands in like 8 lines
@heady birch kill this man
Spring overkill
DI frameworks were written to solve real problems and work very well, but I prefer to avoid using them. I will try to explain why, and also how I try to structure my projects to avoid those problems arising in the first place.
Support: https://www.patreon.com/andybalaam
Sli...
๐คทโโ๏ธ
test driven development
guice sucks
testIfThisMethodIsGoingToWorkWhenProvidedNullAndNotAndInteger
assembly best
because I have a habit of making software without writing a single test
justw rite unit 5est
for example, BardyBot is getting quite large now, and I haven't written a single test, at all
there are like 20+ classes in BardyBot and not a single test
EUT
Google?
One of the craft evets jakub
CraftItemEvent is cancellable iirc whereas PrepareItemCraft is not
Yeah tdd is not taught enough tbh
TDD?
yeah, test driven development
My whole 4 years in college and I think 1 class touched on how to write tests
but not enough to be useful
I test it manually rather than writing tests to test it automatically
yeah but they're not something that I've got in to the habit of doing
They're one of those things that if you're not used to doing them, then you don't do them ha
^
Or you don't even understand them, even if they are simple
I mean, I understand them, but I'm just not used to doing them, as you said
and as I said, I test manually
I'm the second one ๐
I just haven't had much experience with them
so i overlook them
I forget they exist
PIT is really handy though
mutation testing
basically tells you what you've covered in testing and what you haven't
a.k.a it tries as hard as it can to break your code and flags up where it wasn't able to break it
Never got that working
this was before I started using Gradle
these days, I've got in to the pattern of create new project -> gradle -> unselect Java and select Kotlin, select DSL build script -> put in group ID and artifact name -> done
because Kotlin DSL > Groovy DSL
I haven't properly used Groovy DSL since I made my first Kotlin DSL project (which was a Spring project, since Spring Initializr will give you a Kotlin DSL build script if you select Kotlin and Gradle)
Such assholes
that's a massive oof
Kotlin DSL bad
Let's see if War Thunder still works on my pc 
I think an elara dsl might actually be possible
Kotlin DSL bad
no matter how many times you say that, you're still wrong lol
Everything is possible if you try hard enough
Your only reason as to why I'm wrong involves personal preference
The groovy DSL is much more flexible
:((

@prisma wave technically, both of our views are just opinions, but this is #dev-general, "personal preference" and "opinion" are meaningless here
Mine is facts
all opinions are meaningless imo
@prisma wave that is wrong
Elaborate
the groovy DSL is more flexible than kotlin's, it's more mature (having more documenation etc), less verbose, and lets you say you know Groovy
what does kotlin have
nothing
except so called "static typing"
Kotlin DSL in my opinion is more readable, and it's more idiomatic towards Kotlin users meaning it's easier to understand
that's not really a point
"the kotlin dsl is more idiomatic for kotlin"
well yeah
that doesn't make it better
And your other point is just opinion
well so are your points
actually no, it's not your points that are opinions, it's you using them as reasons why the Groovy DSL is better that's opinion
the Kotlin DSL only has less documentation because it's been around for less time, that's like saying Java is better than Kotlin because it's got more documentation
in what way is the Groovy DSL more "flexible"?
Groovy is simpler
the Kotlin DSL only has less documentation because it's been around for less time, that's like saying Java is better than Kotlin because it's got more documentation
@jovial warren your analogy would only work if the 2 were not interoperable - the kotlin DSL usually has quite different methods of doing things so it needs documentation for everything
^
there is no reason whatsoever why a build language should be less verbose, and the Kotlin DSL isn't all that much more verbose anyway, and it makes much more sense in my opinion
For example shadowJar
shadowJar { vs task.shadowJar() {
Groovy has collection literals, less syntax, dynamic typing in this case is actually useful since you don't need to worry about types as much
Kotlin DSL in a way becomes more verbose
It is objectively more verbose
but tasks.withType<ShadowJar> means I can look at that and go "oh okay, so we're configuring the task ShadowJar"
whereas shadowJar {} looks like we're defining a lambda
Again that's subjective
So you can when looking at shadowJar { if you have a functioning neuron
You are only saying that because you're viewing it from a kotlin perspective
you're viewing it from a Groovy perspective
Because I'm talking about the groovy DSL
the word "better" itself is subjective anyway, it's relative to one's perception and interpretation
not necessarily
yes necessarily
I am not viewing it from any perspective only from the perspective of which is more intuitive and i am sorry but Groovy is way more intuitive
You can get the file and start to get it working without needing any sort of documentation explaining that it needs to be specific way
And even then you can write in many ways
Not just one
in your opinion, Groovy DSL is more intuitive, that's your perspective
but
tasks.withType<ShadowJar>means I can look at that and go "oh okay, so we're configuring the taskShadowJar"
@jovial warren
whereasshadowJar {}looks like we're defining a lambda
@jovial warren
This entire point is "it's ambiguous because it uses the same syntax as a different language for a different thing"
Also something can be objectively better
wrong (the above sentence)
Lol that doesn't mean i am looking at it from Groovy's perspective lol
Just means that when looking at it from an intuitive perspective, Groovy comes ahead
I just searched "objectively better" and copied the first thing I saw lol
lol
xml 
not objectively, subjectively, and no, I'm not agreeing with that since I haven't seen it
and I prefer Kotlin over Elara personally since I don't like the idea of functional programming without OOP all that much
Elara supports OOP
To a degree
It's just not the most idiomatic way to express most things
how do you call functions in elara?
like in Groovy DSL we call plugins {} and we do the same in Kotlin DSL, what do you do in Elara?
that doesn't sound good lol
since we are having a few problems
but it's usually either identical to kotlin / java syntax, or ```
function-name arg1 arg2
but the "infix" syntax might be a problem
there is a lot of ambiguity
We've not really got that far yet, at the moment you'd have to use something like plugins (config) => { config.id 'blah' version 'blah' }
jesus christ
might end up adding a shorthand and / or receiver functions
actually
that's partly incorrect
that's worse than a Java DSL would be
plugins () => {
id 'blah' version 'blah'
}
``` it would be this at the moment
I think
since receiver functions are a thing
kind of
so basically the Groovy DSL but slightly more verbose
kind of
and kinda worse
real talk it probably wouldn't try and replicate gradle
and we might add consice lambda syntax
making it syntactically identical to groovy
but this is a very small very niche example
monologue time
where Elara really starts to shine is the type system
this keyword just lets the language down
why though?
because it's just no
:/
let reads naturally
and is used in maths
so
val bad let good
and I will fight anyone who disagrees to the death
val good let good FINAL STRING NAME bad
nahhh
๐ฆ
define final variable with type STRING with name hello with value "lol"
Kali, this happened yesterday, was definitely not this person's lucky day 
lmao
how about Transcript lang
we circlejerk the gaming
Games also had to be developed!
๐ฑ
but they use stinky c++

the only circlejerking allowed is elara and sometimes clojure
we should start a rebellion against the monarchy after this
off with the King's head
๐
๐ฆ
meanwhile moons are idiomatic in elara
another W for the best language ever to be ever made ever
has the replit competition ended yet lol
yeah they haven't announced the winners yet though
I think we all know who it will be
clearly
what's the prize
10k
๐
lmfao
For your meme
lol
Edited on mobile
Hold on can you send images to this channel?
If so discord must think it was malicious or whatever lmao
Same rules for images as all other channels, tier 2+
Discord doesn't have such safety features, does it?
@chilly jungle https://img.mrivanplays.com/DiscordCanary_sZ6dprxHVX.png
yay tommorow i gotta rework line handler in my plugin
@jaunty maple was handled in #placeholder-api 
aaand the guy told me that you've told him that it can't be done @hot hull
why it can't be
...
why not implement player independent hooks
we said its not a thing yet ...
but the dev of the PlayerList expansion is working on adding that
ok it looks between us and that guy has some language barrier
Why does everyone just rush to conclusions lmao
Does anyone know if you'd be able to hide the items a player is holding in a plugin
i'm sure it'd be mostly server side but im not convinced
Yeah you just change the packet or send the packet saying they don't have anything in hand
@old wyvern are you going to complete my job?
Hey if anyone needs help with plugins or building or gfx then slide me a dm ๐ (Im really damn cheap lol)
can I add a dependency on a project to all its subprojects in gradle?
something like
subprojects {
dependencies {
implementation project(this_project)
}
}
I just don't know how to reference this_project properly without using its name
you can do this iirc
subrprojects.each { subproject ->
}
Else referencing project inside the closure should work
Anyone ever tried making a discord bot in js with kotlin?
What?
like with kotlin/js
I found this
Why in the everloving picklejuice is the project declared as its own submodule?
rootProject.name = 'Blocky Lib'
include 'Blocky Nms Lib'
include 'Blocky Nms Lib:v1_12_R1'
include 'Blocky Nms Lib:v1_13_R1'
include 'Blocky Nms Lib:v1_13_R2'
include 'Blocky Nms Lib:v1_14_R1'
include 'Blocky Nms Lib:v1_15_R1'
include 'Blocky Nms Lib:v1_16_R1'
include 'Blocky Nms Lib:v1_16_R2'
This is the settings.gradle
Why would spring be giving me a : Null value was assigned to a property... class A on a ClassBRepo#findById line....
oh wait
hol up
oh wait maybe not
@steel heart I figured it out. It had to do with spaces in my Module names. Gradle is dumb like that...

Do you guys know how I could publish a shadow jar to my local maven repo?
I can't get it to work with the maven-publish plugin for gradle
Ah I'm stooopid
shadowJar already does it for me
lovely
Please keep it to a single channel.
Ok so if any of you play 1.16 you would have noticed that cubecraft has hex colors in their motd but if you also play on a lower version of mc you will also see that they still have normal mc colors. Anyone have an idea of how they are determining if someone is using 1.16 or pre 1.16? Are they looking at the handshake packet then modifying the response?
Hello, i have question about SQL
now i'm getting an input from player and store it to database
if player input is an SQL keyword what's gonna happen
how can i prevent this
example sitiation:
>> input: SELECT //player wrote 'SELECT' to input.
SELECT 'SELECT' FROM menu #probaly it will throw syntax error
because of 'SELECT SELECT' section probaly it will throw syntax error
so players can find an bug or something to break server or database.
I'd assume so
i will try that thanks
i have a one small question too
storing symbols like that in sql
is it safe
shadowJar already does it for me
@empty flint Actually, if you want the true shadow jar type, you need to apply it in our publish configuration
if you are using Kotlin DSL:
@empty flint Actually, if you want the true shadow jar type, you need to apply it in our publish configuration
@astral quiver Yeah I found that on google
create<MavenPublication>("maven") {
shadow.component(this)
}
Didn't know shadowJar would do that so I didn't even consider it
stumbled upon it by chance
I will make a PR for PDM to have something like shadow.component(this) as well
Is a little different, because the focus is to add dependencies in to the Maven POM
I shift my library that was shading using shadow
to PDM
and all my projects kinda break because now, the PDM is Compile Only
I still use Shadow plugin for the bstats
But I still have this problem that all the transtive dependencies from my libraries
My plugin is not getting it because of the compileOnly
So I will add a Utility to PDM to be able to auto insert in the POM this dependencies
@astral quiver Do you happen to know how I can get a ReplaceTokens filter to work with shadowJar?
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens
task filter(type: Copy) {
from 'src/main/webapp'
into "$buildDir/explodedWar"
// Substitute property tokens in files
expand(copyright: '2009', version: '2.3.1')
expand(project.properties)
// Use some of the filters provided by Ant
filter(FixCrLfFilter)
filter(ReplaceTokens, tokens: [copyright: '2009', version: '2.3.1'])
// Use a closure to filter each line
filter { String line ->
"[$line]"
}
// Use a closure to remove lines
filter { String line ->
line.startsWith('-') ? null : line
}
filteringCharset = 'UTF-8'
}
Something like this
check if shadowJar task depends on it
@lost edge They will receive a packet and it will probably contain the protocol version
Using the protocol version they can tell if its below 1.16 and show old colours, else show the new colours
Yea I figured packets... I now wonder if its better to do something like via backwards and look for the closet color for each hex or just edit the response..
Depends on the content
If it's just static text might as well have two seperate strings. one for 1.16 and one for below
But it is possible to do that closest to thing.
thx for the input!
@heady birch static abstract String color()
hello, i need help i don't know how to do that
i have a folder named "kits" and there is {kit}.yml files
i want to load them and make configs and getting them
any tutorial any idea please
i searched a lot on google but can't find any usefull tutorial or resource
loop over the directory
and where can i save them config file variables
lets suppose i created yaml file and its ready but where can i save
@prisma wave is it okey?
private HashMap<String, FileConfiguration> configs = new HashMap<String, FileConfiguration>();
public FileConfiguration getConfig(String config) {
return configs.get(config);
}
public void createConfig() {
File[] kitsFile = new File(ShinySystem.getInstance().getDataFolder() + File.separator + "kits").listFiles();
for(File file : kitsFile){
if (!file.exists()) {
file.getParentFile().mkdirs();
ShinySystem.getInstance().saveResource(file.getName(), false);
}
FileConfiguration config = new YamlConfiguration();
try {
config.load(file);
} catch (IOException | InvalidConfigurationException e) {
e.printStackTrace();
}
}
}
:(
Liskov
i didn't try yet. i think its not done there should be something more
hmmm
well
initial observations
liskov
listFiles() can return null
and also, use File(File, String) instead of concatenating with File.separator
no need to catch a runtime exception too
Pointless to catch that
uh what
maybe use YamlConfiguration.load instead?
loadConfiguration
okay thanks a lot
Yeah you should have a FileConfiguration instance nonfinal which you redeclare with YamlConfiguration.loadConfiguration() when you reload your config.
nonfinal
i'll pass

what do you mean reloading config ?
Just loading it again
i don't have to reload that
^
immutablemap
ImmutableMutableMap
MutableImmutable
mutability inception sheesh
Just realized how much I hate static
rich hickey has joined weezer
We all do
No but I was kind of life with it in a sense
inmutablemaps are java 9 feature i guess
Guava


๐