#dev-general
1 messages · Page 343 of 1
where do u live brother
I will not answer that question unless you reset your nickname
SexBot wants to know your location
nein
SexBot has you covered
oh btw, what should I use for emitting events? tryEmit or just emit?
Want me to join and see if i can get it to work?
wrong channel oops
@surreal quarry https://github.com/Jaimss/terrible-plugin/pull/21
there we go
lol\
oh also, BM, filter { it is T } seems to say that it cannot filter by an erased type
lol/
well yeah...
and it can't be inlined because the super can't be inlined
uh.. cool fact ig
EventManager is an interface that's implemented
try filterIsInstance
so listen can't be inlined
cough requires a reified type parameter cough
confused because doesn't know what an inch is and interpreted that as cm
cough is interface method cough
this how JVM works
okay so EventManager has to be implemented in the API then I guess
Roughly 1.2 hamburgers
inline listen = listen(T::class)
like, just a flat ass bun and a thin ass slice of meat, or something that is double the size of my foot
Up to interpretation
sudge
ah yeah, that will work
has anyone dealt with github's 'free' maven repo service
wat
is not so good
everyone that want to you your library should add some token
it's kinda bullshit at the moment
I think he's talking about github packages
is just maven("maven.pkg.github.com/YourUser/YourRepo")
thats stinky
to use the package
the add a package of course you need it, it for your publish autentication
so to say use someone elses package you need their token too?
override suspend fun <T : Event> listen(`class`: KClass<T>): Flow<T> = events.filter { it::class == `class` } as Flow<T>
``` jesus christ that's a method and a half
without token, any one can publish
that's what you meant btw right Souza?
yeah for pushing an artifact having a token makes sense
already done that lol
but for pulling an artifact?... :(
yeh, make no sense
also, this means we kinda have Java interop
actually I'm chatting
thats good
Hello, I have repository with java project and configured GitHub Actions workflow, which publishes jar into GitHub Packages maven repository. I would like to use the published JAR package in other project, so I need to add it to pom.xml: my.group myartifact 1.0.1 I also need to add maven repository into pom.xml. github-m...
suspend = goodbye Java lol
suspend is not required if you are returning Flow
I'm sad with the Maven from Github because I really need one
JCenter is the only one free and decent
I need it for emitting though
and they should down everything
yeah JCenter be gone
but in the listen block?
also, Maven Central is good
this makes me feel better about my decision to selfhost my repo 🤔
what you will emit in the listen block
yeah not in the listen block
I was saying for calling
so you does not need it
override suspend fun <T : Event> listen(`class`: KClass<T>): Flow<T> = events.filter { it::class == `class` } as Flow<T>
This is one is not required.
The callEvent is required
or just use offer insted
offer?
yeah no
is only for Channels, I think
yeah
tryEmit I think is not a good idea, try in the name makes me scare
all it does is try to emit a value and return true if it was successful and false if it threw an error
or if it will suspend until there is buffer space available
oh, that's great
does using KClass preserve Java interop btw?
not that Java interop entirely concerns me
yeah I don't need it lol
if is for yourt minecraft server IMPL
I think that is not really a good idea, if any one wants java, it should, I don't know, use Sponge? the most Java API ever
for use java? is great, the best api
that's why I'm writing my own
Better than Bukkit
the way it does commands, with its causes, is really whack imo
I mean, that's not a very high bar lol
yeh, I never like the cause system
I'm like "just give me a fucking sender"
also, the last time I use it, the messages from the command API like permission you can change the localization
isnt this beautiful
static boolean trueRandom() {
int first = new Random().nextInt(10);int second = new Random().nextInt(10);int third = new Random().nextInt(10);
int fourth = new Random().nextInt(10);int fifth = new Random().nextInt(10);int sixth = new Random().nextInt(10);int seventh = new Random().nextInt(10);
if(first<second&&third%fourth==fifth&&true&&(sixth>>seventh==1)&&true&&true&&true) {
return first<second&&third%fourth==fifth&&true&&(sixth>>seventh==1)&&true&&true&&true;
}else{return false;
}
}
ikr
what in the name of fuck
lol
lol
might add localisation support at some point
or just let the messages by a default parameter
why didn't you call it theOneTrueRandom smh
¯_(ツ)_/¯
i forgot lmao
yeah i shouldve named it that
oh also, https://paste.helpch.at/ijufinuxig.cs nothing I'm forgetting is there?
(that's the command manager)
hmm in kotlin is there a way to use kt var x = "$variableTEXT" ? because rn it is looking for a variable that is called variableTEXT but I want it to look for a variable called variable and then just have text after like this basically: kt var x = variable + "TEXT"
@surreal quarry Check PR
merged
${variable}TEXT
@jovial warren Perhaps for the rewrite of the cmds framework 😉
oh well I deserve to be shot. Idk why I didn't think about that. ty
ohhh
Read the commit messages
smh dkim
classic
wait I have an idea for a listener. Will PR a bit later
kk
Should PR a kotlin class in the middle of all the Java
And a clojure one

is clojure 100% interoperable
I believe so
Not in the kotlin fashion afaik
They have like a slight syntax diff to call java objects
a dot or something
not sure
I think should be good enough for some goofs
true
Wait you writing mf cmd in clojure?
No xD
👁️
Was talking about terrible plugin
add every single popular language in there
ohh
Omg someone add in a Skript
Is their a skript interpreter api?
then use the kotlin class with lombok xd
lmao
loll
yesss
that makes it annoying to actually pr and fork
Add a build.gradle and a pom.xml
at least the .idea
yeah I guess it should be easy to make but terrible to use
what about jvmstatic
Add a build.xml
jvmfield covers that dkim
What about it?
what does jvmfield do?
JvmField doesn't make it static though
add jvmstatic 🙂
oh true
jvmfield makes it a field
i guess i've only used it in an object
That makes no sense
Normal kotlin fields are properties
JvmStatic can only be used in an object
With @JvmField its not
^
what did you guys do with this? IJ crashes when I try to open the project
then put in companion object 
build.gradle virus
xD
cool
public void onDisable(){System.gc();System.gc();for(int i=0;i<1234567891;i++){{{{{{while ((((((((((true)))))))))){{{{System.out.println("a");}}}}}}}}}}}
what the fuck
lol
there is literally clojure already in this plugin
group manager 2.9? 😢
Recursive suspend functions dont cause stack overflows right?
suspend fun screwIt() = screwIt()
Oh my, just runs forever
fefos addition lol
Until you run out of memory ofc
Creating so many jobs xD
Hook it up to a storage server with 1 petabytes and use swap memory 🙂
@static zealot when u pr register my block break listener too pls k thx
how do I tell IJ that the project I just opened should be linked with my github project?
looks like i forgot to do that 🥲
I will
^
no idea what vcs integration is
oh
this is beautiful
lol
I have an idea
btw why mc 1.8?
because its a terrible plugin
yep
because thats just too far
lol
we stuck to some kind of normality
bc then you gotta use like getbukkit or whatever its called
ic
so sticking to java conventions etc etc
i dont think 1.6 was on any repo i could find
gonna make a pr
pull my changes
i just pushed
actually it probably won't conflict
https://github.com/Jaimss/terrible-plugin/commit/2e29236b04ed799d29cd8d7c76c149cffa0ff718 just making the IntegerProvider better
hmm the BooleanFactory seems to be broken or IJ is going crazy
i havent touched it in a while so had to update it anyway james
oh I forgot to register my listener now fuck
just open them both at one time. merge conflicts are fun :)
well probably not going to happen at all. I just messed up the git integration somehow
I really need to know how to clone commit and push from git bash
git clone <url>
git add .
git commit -m 'message'
git push
ye but git is not a command apparently so I assume I have to connect to my account or something
you probably don't have git downloaded
oh?
oh well I thought it comes with git bash... xd
oh wait its there now?
u should have a pr now
I think I'm going crazy nvm
i do not kaliber
lol
there u go
xD
lol
pull changes blitz 🥲
this is an easy conflict to fix lol
or james can merge conflict 🥲
its just an import
wait what?
oh I didn't even notice
>>> master
import Sound;
======
<< master```
thats what it was like lol
time to log in to a server using the plugin
;-; the server owner i used to work for (not anymore) is complaining about my plugin and calling it a scam and unusable but not telling me about the issue
ok
that sounds like not a you problem lol
because i dont want to get bad reputation
i dont want him to say to everyone "this guys a scam"
call him a dickhead for not telling you what's wrong 👍
anyways
the new server i work for
is epiccc
owner is epic
server is epic
staff is epic
everything is epic
🙂
until he says your plugin and calling it a scam and unusable but not telling me about the issue
then not so epic 🙂
🥲

thats a thing?
what is?
The thing
Double.POSITIVE_INFITY
@surreal quarry
dont forget to leave a liek
d;jdk Double%POSITIVE_INFINITY
public static final double POSITIVE_INFINITY```
A constant holding the positive infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff0000000000000L).
w o w
you didn't know that's a thing?
nop
i get the sense that this is going to break the plugin
omg the errors
it's likely just 0 / +0 in most impls
and NEGATIVE_INFINITY is 0 / -0
oh my god yugi
🙂
what am i reading
petition to run this plugin on the helpchat smp server
you know division by positive 0 is positive infinity and division by negative 0 is negative infinity, right Fefo?
yea the server won't even start with this yugi
ah right
One moment
and if anyone here didn't know that there's two zeros, come on
you gotta read IEEE 754 lol
for floating point numbers yes, but not regular integer types
ah perfect
Lit
rad
stops in like 60 seconds?
or i guess if anything uses the server maybe
idk
whatever merging lol
xD
as long as the server starts. and the plugin loads
🌚
time to put it on spigot 🌚
not at all
actually, they allowed Conclure's, so why not yours?
if you try to do anything with the server theres a good chance it will npe
Make a new account and post with warnings, see how long it takes for it to be taken down
make sure to add every single contributor that contributed
in the box
lmao
lets make a circleci for it
lmfao
build automation for our terrible plugin
ci.jaims.dev 🌚
Yes
ill set it up
Kk lol
hmm is it possible to add different languages dictionaries to IJ?
LMAO
ayy xD
found it dw
Oh ok
the spelling only checks words in english by default
Why would you not use english?
wanted to add Romanian as I sometimes I use Romanian words in Strings
ew
well because I am Romanian !?
its just messages and stuff... not actual variable naming and others
Extract those to some config
Have english names for the keys
So people knows whats actually going on
Ktor's unit testing are so weird
I meant the key in the configuration
yeah I know what you mean
🤢
"just Runs"
holy
but also its just mostly private stuff that I use it on so it doesn't really mater
private meaning for me and my community
its not an excuse
No idea how they want me to add a test for this, it's so confusing
are interfaces "abstract"?
yes
is having a package named abstract good or bad
and i bet u know what its for ivan8or
i think i do
i mean does the name make sense in the context of the function of the package
if the name makes sense then it's fine
👍
😄
I wouldn't know what "abstract" means
i have never had so many maven repos in my build.gradle before 👀
Might as well name it "algorithm" or "data"
well it's for putting abstract classes and interfaces
i took what he said to mean that abstract was just a part of the name
proxy repos :)
That's not the way you should be organising your packages to begin with
why not
ummmmmmmm
^
okkkkkk
what do you think i should name it
what exactly is going inside of it
it doesn't
okay
ill call it config
oh
one more question
what is better - utils or util
xD
util
hmm now what should i name the interface,
a) ConfigFile
b) Config
c) Configuration
d) ConfigurationFile
e) other
lol
or ConfigProperties
what kind of stuff is going to extend this interface
any configs at all?
like for example for two completely unrelated plugins / features
hm
or multiple configs for a singular thing with a common theme
it's just a config "wrapper"
so I can do like #getToken
and stuff
with two entirely different config libs
okay then just use any one of those names, idk
what is your package name going to be
config
no i mean
this is something you'll eventually export as a maven artifact right?
or no
so all the configs you're going to use the interface for are for that server
in that case i'd probably call the interface <ServerName>Config
HCConfig?
sure
depends
ahhsdhfiuhdsafiwahsidhasdiuwhsaiud
ik
then it should be an easy answer
?
you're splitting your one mega plugin conglomerate into chunks right
you should figure out exactly how you want to slice it up
just "modules"/packages
and make classes accordingly
hm
😮
ah
Anyone know PojavLauncher?
Why did no one tell me it exist ;O
bc ur talking in #dev-general
It runs much better than mcinabox
...
You're welcome
how can you get a person's discord image url?
ctrl + shift + i
ez
although the better way is prob using discord api
I don't think there's actually a way to get it from inspect element
with jda its just user.effectiveAvatarUrl i believe
oh nvm you can
yeah I know with jda I was just hoping I can do it from discord
and yeah I found a way to do it from inspect element
oh
1.0.0-beta-rc-snapshot
the versioning system is very complex because its such a big, popular, and complex plugin
true
Are there any rules for PRs or can I just submit one with a bunch of random crap firing for no reason
basically just make sure the plugin still loads and the server starts
don't like intentionally Thread.sleep(1000000000) or something on a 30 second timer
but yea basically everything is free game
damn
I was dying laughing this morning when I checked it and found this
lmfao
wow
Keep the great commits coming 👌
u cant say c0ck :(
Hehe
lol
it's basically registering a billion things, and setting up a bunch of stuff
use reflection to register things 

or a classpath scanner if bardy is watching
i dont want to make a whole class on just registering something
but no one really cares
override fun onEnable() {
reloadConfig()
if (config.getBoolean("spigot-only")) {
setupBot()
}
setupPermissions()
register()
setupListener()
}
that registers like 40 something commands (estimated guess)
bukkits RSP or a singleton
wait u have to unregister vault?
in case of a reload
i would assume so
how do i unregister
unregister what
what is vaultEconomyProvider
oh
im providing the vault "backend"
because this is a core plugin
and i want people to have access to economy
vault doesn't do any actual storing of data for you, it just creates a common interface that all plugins can use to interact with the economy
but one plugin has to provide the implementation of that
wait really?
yep
o
VaultEconomyProvider be like () -> Bukkit.getServicesManager().load(Economy.class) ezpz
lol
i have done my part and added to that terrible plugin
as long as it doesn't like crash the server every time
kk
guess who is gonna learn f#?
might be this guy
i might be finding a new language to stan
who knows
i know
correct choice
fun fact
f# is one of the most loved languages in helpchat
source: me
good good
C# is used in gamedev for some reason
i will change that to f#
so help me rngesus
unity be like
lol
even godot has c# support built in
but the rust support works well in godot with nativescript
😉
how depressed must you have to be to actually decide using c# is a good idea
depressed enough to use unity
why when i load it in intellij it cant resolve the bukkit dependency for the terrible plugin
lmao
thats cause u need to use doom emacs
doesnt it depend on bukkit 1.6 or something lmao?
lol
Wait ik the best idea
ur steam is sadge now fefo
im going to create a maven
most of which I never even touched
nah dont even do that
oh god
maximum stupidity acheived
use the built in eclipse build tool
lol
xD
project.iml
bin
groupmanager mmmmph
commit the dependency jars to the github repo 🤯
lol
follow some conventions
its about bad code not a bad developer experience ;)
🙄
am i wrong
Yes
no
see hashtag slander
I'd say, give it a shot before saying its bad
The conventions only seem weird due to what we're familiar with
🤷
lol
how can i turn my json string to a json object
kotlin
i got kotlinx serialization thing too
@surreal quarry https://github.com/Jaimss/terrible-plugin/pull/29/files
merged
ty
@forest pecan List<?> uuids = Bukkit.getOnlinePlayers().stream().map(Player::getUniqueId).collect(Collectors.toList());
why
why not imperative??? we all know imperative >>>
plus more arrow code :)
List<?> uuids = Bukkit.getOnlinePlayers()
.stream()
.map(Player::getUniqueId)
.collect(Collectors.toList());
pog
https://github.com/Jaimss/terrible-plugin/blob/master/src/main/java/dev/jaims/terribleplugin/storage/SQLManager.kt lmao i just realized when i added this it was a kotlin file
completely on accident lmao
we need to diversify the languages, this is good 👍
we all know whos job that is
true
yes lol
@forest pecan where'd your nickname go :(
lol
Gordo
lmao
mhm
kk
imma go run the terrible plugin
lol
wait its so terrible that i can't even move it to my desktop

lol
its great moving around
also you can just ./gradlew buildToDevServer then docker-compose up
oy humans
is it possible to have an SQL statement that gets a certain row, but if that row is null then it instead gets a different row
or do i have to do two statements shudders
https://wiki.vg/Protocol#Tab-Complete_.28clientbound.29
Why does it say that there is only one integer (when doing PacketContainer#getIntegers#read) 
and its like -123874 or smth like that
it's the transaction ID
the other integers come from the Suggestions serialization
the tab complete packet class has 2 fields, the transaction id and the Suggestions field
what are you trying to do exactly?
i need help
There is no time to wait! Ask your question @balmy badge!
plz
There is no time to wait! Ask your question @balmy badge!
how to share my ip for my sevrer
and i changed my port to
is that ok
this is my first time with servers im used to making plugins
you running a server locally?
no i want it public and its on my pc
actually don't listen to me lol I'm no help with that
how do i get the suggestions field?
wdym
either
a) get a domain
b) restart your router or contact your isp 
no
i followed youtube
and i port frowarded
i tryed with my friends to join
but they cant
becoz i think the sevrers ip isnt working
@half harness
https://github.com/Fefo6644/SuggestionsTooltipShowcase/blob/main/src/main/java/com/github/fefo/suggestionstooltipshowcase/TooltipsWithProtocolLibCommand.java#L119-L120
https://github.com/Fefo6644/SuggestionsTooltipShowcase/blob/main/src/main/java/com/github/fefo/suggestionstooltipshowcase/ReflectionHelper.java#L31-L33
https://github.com/Fefo6644/SuggestionsTooltipShowcase/blob/main/src/main/java/com/github/fefo/suggestionstooltipshowcase/ReflectionHelper.java#L39-L41
does the IP that they are using to join look something like 192.168.x.x?
or start with 127
yes
thats bad
oh
lol rip
lol
198
oh
aaa
you sure you port forwarded?
correctly
make sure u also opened the port on ur router
frugal you've already went onto your router's internal website page right
changed the port forwarding rules so that your router port 25565 leads to the IP your computer is on
does that sound familiar?
how do i make static {}?
oops
sorry for ping
but
how do I do static {} in kotlin
or is that optional?
oh idk
ohhh so ur saying to go and put the ip and port in the router site
like this ip 198.#.#.###
what
just don't make the class static? lol idk
;-;
all you need as far as port forwarding goes is the local IP of your server pc
what is that IP for you? it should look something like 192.168.1.x
make it an object class idk
yes that it
isn't object like singletons or something?
just last 3 digis diff
idk man I'm not the one to ask for kotlin advise lol
ok good
@oblique heath ok then when i port froward which ip to give friends
srry for the tag
you need to give them your public IP
so go to https://whatismyipaddress.com/
i made a custom port
find your public IP
21234
okay if you made a custom port then you'll need to have them type in yourpublicip:21234
oh ty
now... did you also
if i need more help can i dm u
change the port in the server's server.properties
ok
did you do that
set your query.port to that as well
ok
and then you should be fine
then can i share the ip
dude can i dm u
i think it's better to do this in a public chat so people can pitch in if i say something wrong
it will be more safe then
wait
i c
are you going to give ME your public ip
right but why do i need it
i just really need help
what is Suggestions class?
like if u can help
with what
becoz my freidns still cant join
try connecting to your public IP from your own computer
ok
but before that you should try connecting to your server using your local ip: 192.168.1.x:21234
https://www.youtube.com/watch?v=X75GbRaGzu8 <- btw here the video i used
ok
might help
o
tell me if this 192.168.1.x:21234 works or not
are you able to connect to your server using that IP
wait ill c
(replace the 192.168.1.x with your actual local IP)
ok
@oblique heath its works but not for friends
That means your server isn't port forwarded
I don't recommend port forwarding personally, as it opens up a port on your firewall that could be abused on a home network
Oh yeah, btw, @hot hull you seen all the new fun you're going to be having with 1.17? xD
For my friends abroad
Lol
Gl with the new lush caves
I mean, lucky for you, all you have to do is the world generation
Could be worse, you could have to program in all the mob AI and spawning
Next update will screw so much up
To?
Then fix it
i dont wknow how
Anyone got any gucci hex utils which include gradients and shit
the fuck did i just find
ask @heady birch
KiteBoard does it really well lol
or just google linear interpolation algorithms
Has anyone used the Exposed lib for Kotlin?
if you dont know what it is, its just a database framework
should i use such a thing
in a way that’s very idiomatic to Kotlin ( @prisma wave )
but say if i want 2 applications accessing the same database, would i need to abstract the table objects into its own project?
so i dont have to change it twice if i update
or how would i do it
yeah abstract the table objects into a common project
