#dev-general
1 messages ยท Page 149 of 1
@split talon said he'd use it, as of rn only I use it mainly I think. Frosty was the one who originally wanted it, dunno if he actually uses it
ยฏ_(ใ)_/ยฏ
Iโm using it ๐
๐ฎ ๐ฎ
Conclure rewrote a lot of our internal stuff so you can handle persistency a lot easier
I need to stop procrastinating and actually finish my project LOL
YIKES
Sweet. Iโll just use the update to justify my procrastination
I've just got to update the readme so you know how to use it, then I'll push it. You don't get to procrastinate for long ๐
buuut I am going to update my IJ rn soo
Mfw SpigotMC crashes for a second when PlaceholderAPI updates.

PAPI is too powerful to be contained by spigot

Y
Kotlin is just so nice
doit
well then they can write in kotlin 
developers shouldn't support java anymore
I mean while it might be nice, kiteboard is already so nice.
I'd hate for that to changed
@obtuse gale I just updated to 2020.2 and your plugins broke
Also it uninstalled all my plugins and removed all my settings for some fucking reason
f
I literally made a wrapper class called Colour
So nice though
Beautiful english language
Yeah AJ your fork really doesn't wanna install
get gud katsu
guaranteed_rewards:
enabled: true
commands:
- cr give to %player_name% VoteKey
wont give me keys
yet
Where is #voteparty
When did you buy it?
yesterday
Aight, I'll be home in like an hour and I'll update the database and get you access to the channel.
bet
where should i get support for not being able to link acc?
Jax please not. we have a spigot link system for a reason. also that's not it
Ah apologies
also that xD
bruv
I honestly don't know why but prefer the first option
probs cause I only see it
oof
second one its better
YE everyone says that
but me not know why everyone says that
cause for me it's not "clean"
First looks empty
clean
Bland
= ?
anyone knows how i could specify in g2d to like recolor this black part to any color i want:
http://images.virtusdevelops.eu/shareX/n0j0oxsr.png
Very bland
Hm
Working on a command framework
Should I allow subcommands to have subcommands?
Like /<command> <subcommand1> <subcommand2> [arguments]
So like idk
/admin mines create [arguments]
or /admin crates create [arguments]
Just examples
Have fun with that
Imo it's pretty useless since it's easily achievable with just subcommands, that's why I never added that to mine
Yea again, have fun with that, it's a bish
I mean if you need subcommands for subcommands, you should really rethink your command structure 
just use create as one of hte arguments for the mines sub command and same with crates sub command\
"create" -> doSomething()
"other" -> doSomethingElse()
}```
ยฏ_(ใ)_/ยฏ
or whatever the args thing is dpeending on your command framework
Basically the same as a subcommand of a subcommand:
@SubCommand("crate")
fun crateSet(player: Player, @Values("#crate-type") type: String?) {
if (type == null) {
sendMessage("cmd.wrong.usage", player)
return
}
val lookingBlock = getLookingBlock(player)
when (type) {
"set" -> {
setCrate(lookingBlock, player)
return
}
"edit" -> {
editCrate(lookingBlock, player)
return
}
else -> unsetCrate(lookingBlock, player)
}
}
Yeah I'm building a completely new command framework
With a few more features
One of them is auto-generating help page, which is definitely handy for me
like luckperms?
I guess
Idk
With tab completions similar to matts
This is try number 2 at this framework lmao
i was gonna try to make one
then i just decided to use matts cause its better than mine would be
lmao
I was pretty close to not making mine, but acf's messages annoyed me a lot
My lib is gonna be a combination of a command lib and a gui lib for rn
The GUI lib is done for now
2 features that makes mine better than matts is auto generating help and a requirements system
So not just permissions
Like
I think it's similar to the requirements i have on the JDA version
I was gonna add that too, but boy I procrastinate too much xD
Plus i wanna try rewriting my stuff to be more abstract
i was like thinking about making VOIP over discord for mc
That's interesting
probably not that hard to do but i guess i will try it someday
You know what would be cool, something similar to one of MindCrack (i think) UHC but for discord, where you can only talk/hear people if you're close to them, thought about it, but it's pretty ass to do with discord, because of how the voice channels work
i mean thats what VOIP is.
there is already like paid plugin on spigot for that
but i was thinking of making free version
oh i didn't know what VOIP was mb
probably the easiest way to make v channel for each user and then if users are in range move them to same channel bam done
hate to interject but I've had an idea... has anyone thought about making a standalone editor which allows you to put minecraft sounds and noteblock sounds together and then process it to get the code needed to play those notes? essentially a DAW for minecraft sounds and then you could put the code into a class and use it as a background music player... Dunno what you guys think. I'm not adept enough to do this kinda thing but I'll think about it as i get better just wanna know what the general opinion on this would be
everyone would need to link discord and mc and you'd just add/delete channels like on player move or something
or if users arent together just make like waiting channel
Yeah, but sounds pretty annoying, i wish you could control each user's volume and stuff like that
isnt there an update coming out to make bots able to do a lot more
i doubt thats one of the things
but it would be cool if it was
true
discord shold make a way for the bot to request permission to a users account to change things like that lol
i mean they can but they probably dont want due to users that would do malicius stuff with this
yea that could go downhill real quick
Don't forget about rate limiting 
Make your own client, ez claps
discord isn't free software
??
It's proprietary
okay.
Bruh Johnny, shut your 4head
well as far as I'm concerned "free software" is a term to describe open source software to which you as the end user get all the rights
what?
He's not wrong lol
I mean
uhm yes free software does exist
Say hi to the fbi agent when you look at your pc cam
thats why i dont have cams
eh i use my phone as webcam ez solution
in which programing lang is barry coded?
js
interesting
Obligatory Kotlin better
typescript isnt that bad either.
Kotlin better
why is everyone so into kotlin?
because its great? ๐
Circlejerk, and it is actually a good language. The circlejerk is about to replaced with the Elara circlejerk soo
no idea which lang is that
lol
HEY
Don't trash talk Elara
We have a Trello board and stuff
And we registered sooo
lel
Do it yourself 
having a lil problem
https://hasteb.in/odefajiz.java
https://hasteb.in/olibucet.cs
the boolean isnt affecting the cancelling,
so im assuming either the getToggle method
or the java if (cmds.getToggle())
statement is wrong
but i dont know how or why. Someone give me a hand quick?
do the commands display the correct output?
yes, the message is sent to all players and each time it shows true then false then true then false
so the command is working
just converted java code to kotlin code and went from 134 lines to 66 ๐
p.s nothing is braced
yes
debug the output of getToggle() I guess
my main ```java
package me.mcacutt.stophunger;
import org.bukkit.plugin.java.JavaPlugin;
public class StopHunger extends JavaPlugin {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(new EventListener(), this);
new Commands();
}
@Override
public void onDisable() {
}
}```
ah
I knew it
2 different instances = 2 different states
new Commands(); this instance is different to the one in EventListener
๐
so the values of the booleans are different
np
no but for real, i got it now thank you
Clojure im starting to think i was wrong
public class StopHunger extends JavaPlugin {
Commands cmds;
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(new EventListener(), this);
cmds = new Commands();
}
@Override
public void onDisable() {
}
public Commands getCommands() { return this.cmds; }
}
i have screwed this up so badly
@EventHandler
public void foodEvent(FoodLevelChangeEvent event) {
/*NPE HERE*/if (plugin.getCommands().getToggle()) {
event.setCancelled(true);
}
}```
public class Commands implements CommandExecutor {
private boolean toggle;
public boolean getToggle() { return toggle; }
public Commands() {
Bukkit.getPluginCommand("toggle").setExecutor(this);
}```
plugin is null
but you're on the right lines
make everything that can be final, and you'll see where the problem is
@prisma wave wanna code review
sure
Player getWinner;```
that's a disturbing lack of private and a weird field name
smh
other than that it's not bad
the class is doing a bit too much imo
extends PlaceholderExpansion implements Listener, Cacheable, Configurable kinda obvious SRP violation
ยฏ_(ใ)_/ยฏ
public void clear() {
winner = null;
}```
because wouldnt papi do this for me?
you probably don't need that at all
yea
Configurable needs to be in this class, but should i put the event in another class 
its only an expansion anyways
but wanted a code review because java ew
Technically yeah it belongs in another class
yo bois anyone already used geyser?
anyone happen to know what this means? https://hasteb.in/ewegomuv.lua
Something's wrong with ProtocolLibs then
Or you are trying to use the server version that does not support it
Hello, i'm wondering how you would deny an item in a vault (private player inventory)
nvm
test
Yeah AJ your fork really doesn't wanna install
@errant geyser errr
um
is it just not enabling? Or is it throwing errors? Cos it could be something simple in the plugin.xml
Look at the screenshot I sent
Im trying to cancel the commands that are run if they are in the config but its not working
code
@EventHandler
public void onCommand(PlayerCommandPreprocessEvent e){
for(String command : getConfig().getStringList("disabled-commands")) {
if (e.getMessage().equalsIgnoreCase(command)){
e.getPlayer().sendMessage(command + e.getMessage());
e.setCancelled(true);
}
}
}
config
disabled-commands:
- tps
- heal
wait
i think i got it
why do you loop over it?
^
Why not just check .contains
i tried that but it did not work, i think i found out why
/
@quiet depot Not a fan of how you use 500 different bindings/keystraps, probs just cause I've not idea what the do 
they just control bits and bobs
this one collects all the commands
and makes a binding for it
Any benefit to using your way?
Imagine caring about srp :p
imagine thinking you're above srp :/
Smh
Why not just check
.contains
@obtuse gale would this work?
if(getConfig().getStringList("disabled-commands").contains("/" + e.getMessage().toLowerCase())) {
wait no
wtf am i doing
i realised that, i need to get rid of it not add it
also even if you were appending the /, it should be a character, not a string ('/')
ah ok
how would i remove the /?
yes
I see
@EventHandler
public void onCommand(PlayerCommandPreprocessEvent e){
if(getConfig().getStringList("disabled-commands").contains(e.getMessage().toLowerCase().substring(1))) {
e.getPlayer().sendMessage(Objects.requireNonNull(getConfig().getString("disabled-message")));
e.setCancelled(true);
}
}
config
disabled-message: "You don't have access to this command"
#Commands to disable
disabled-commands:
- tps
- kill
It does not cancel the commands now
Is the listener registered?
yes, it was working before, i just changed it to the contains thing
Try printing out the whole command
It wiill still pass through if you have "/tps <somethingElse>" or "/kill <something else>"
You are taking the whole command message and not the initial argument
i gtg now, ill do it tomorrow
Could anyone help me? I want to get the number of blocks of a certain block in a chunk. This is what I have: https://hastebin.com/sahusuqoba.cs
whats wrong with it?
Oow, you kinda have to iterate through all block in the chunk then which can be heavy I guess
Certainly Iโd go with storing the locations instead zits
You can use typeId, it's deprecated but it's more efficient
just finished mock online written exam....
now that was weird af
I had to add another table between my laptop and where i would write
sorry to whoever I just ghost-pinged..
๐
If you only need to check Hopper, loop through Chunk#getTileEntities(), check if it's hopper
So I have some concerns when it comes to efficiency of permission checks,
[Essentials] Permissions lag notice with (GenericVaultHandler). Response took 55.197533ms. Summary: Getting group for Frcsty
Using:
fun Player.luckPermsCheck(permission: String): Boolean {
val luckPermsAPI: LuckPerms = getProvider() ?: return false
val user: User? = luckPermsAPI.userManager.getUser(this.uniqueId)
if (user == null) {
Settings.LOGGER.log(Level.WARNING, "Failed to load luckperms user data for ${this.name}!")
return false
}
val contextManager = luckPermsAPI.contextManager
val queryOptions = contextManager.getQueryOptions(user).orElse(contextManager.staticQueryOptions)
val permissionData = user.cachedData.getPermissionData(queryOptions)
val checkResult = permissionData.checkPermission(permission)
return checkResult.asBoolean()
}
Not really sure what I can do about it to make it faster
howly how many values
private fun getProvider(): LuckPerms? {
val registration = Bukkit.getServicesManager().getRegistration(LuckPerms::class.java)
if (registration != null) {
return registration.provider
}
Settings.LOGGER.log(Level.WARNING, "Failed to load LuckPerms API provider! (Ensure LuckPerms is properly installed!)")
return null
}
Cache that somewhere
cant you use the elvis thingo for that?
nvm im dumb lol
I tohught that was == null
Yea I gotta put it to on enable, but that can't be that slow can it?
you never know
Indeed you can't
i feel like its the same speed as accessing mysql thats not on same server (latency XD)
I dont think looking up a registration is particularly fast
ye
eh still cant link my spigot ๐ญ
@heady birch 15ms down now that the provider is cached
๐
Still 35ms too slow
how often do you access that permission check=?
Every time a player joins/leaves
hm
i've noticed that to that essx randomly spams in chat that it took long time to get player permissions.
when someone joins
Yea LP does cache it, meaning it's only the first time they join, but 40ms per player is still too slow
In Java, the bellow works, but in kotlin it doesn't, any suggestions?
player.spigot().sendMessage(TextComponent.fromLegacyText(Color.colorize(message)))
this.spigot().sendMessage(TextComponent.fromLegacyText(message.color()))
What does the IDE tell you?
sec
are you in an extension function?
Yea
fun Player.sendTranslatedMessage(msg: String) {
val message = getTranslatedMessage(this, msg)
if (Settings.HEX_USE) {
println(message.color())
this.spigot().sendMessage(TextComponent.fromLegacyText(message.color()))
return
}
this.sendMessage(message.color())
}
hmm
The entire method ^^
try basecomponent?
BOOM
this.spigot().sendMessage(*TextComponent.fromLegacyText(message.color()))
``` Should work
Comparitively yes
Ah okay
I assume it would possibly optimize that in this case
what does exploding do?
Makes a BOOM
converts the array into arguments for a varargs
ah
I believe the actual name is the spread operator
I gotta remember this, cause this is the second time exploding it fixed an issue I had no clue how to fix
Doesn't matter, explode sounds better 
com.mojang.authlib.GameProfile@55f928e8[id=<null>,name=Frcsty,properties={},legacy=false] (/**.**.**.**:**) lost connection: Disconnected
Aj, this is why I prefer a 1.8 client
1.8 bad Java bad
^
km bad
Kotlin good
But still, if only mojang added a reload session button in the default launcher

Agreed
Lets agree to disagree
Nah, let's agree to agree
FJ update today 
fj bad
ew who even does updates
Could I just async this entire thing?
fun Player.luckPermsCheck(permission: String, provider: LuckPerms?): Boolean {
val luckPermsAPI: LuckPerms = provider ?: return false
val user: User? = luckPermsAPI.userManager.getUser(this.uniqueId)
if (user == null) {
Settings.LOGGER.log(Level.WARNING, "Failed to load luckperms user data for ${this.name}!")
return false
}
val contextManager = luckPermsAPI.contextManager
val queryOptions = contextManager.getQueryOptions(user).orElse(contextManager.staticQueryOptions)
val permissionData = user.cachedData.getPermissionData(queryOptions)
val checkResult = permissionData.checkPermission(permission)
return checkResult.asBoolean()
}
What in the hell are you doing here xD
Unless of course you used coroutines 
but wait
Does luckperms register the permission into bukkit?
Why not just Player.hasPerm
Well I mean I don't really have an option, it takes 30ms to check the perm on first join (after that it's cached),
Yugi because hasPerm doesn't account for inherited groups
ah
Async should be fine for FJ
no one would care if the join message is 30ms late than the actual join
Some fucker decided he wanted inheritence

Just do the checking in AsyncPlayerLoginEvent 
Or ya know, do the perm check in PlayerLoginEvent, so that when PlayerJoinEvent gets triggered, you already have the result 
so the bukkit scheduler entering synchronized tasks is just the thread going through a task queue right?
yes
Yeah afaik the scheduler just checks what tasks should be ran and runs them every tick
I meant as in how it functions in moving from one thread to another
it stores the synchronous tasks in 1 collection and ticks them on the main thread, and the others are ticked by a thread pool
Unless of course you used coroutines
@prisma wave Teach me
Async Task:
Do something
Sync Task:
run something that should be in the main thread
ah
I'm pretty sure that's how it works anyway
hmm, so coroutines have an implementation for main thread on android and jfx.ect
yeah
Would it be possible to create a sync dispatcher when needed?
You could make a bukkit one pretty easily
So we have move the thread to the required context
I believe so
ah
Alrighty, also is pdm somewhat stable for use rn?
Kind of
It works fine for the kotlin stdlib, not much else
Been working on some bugfixes though
Ah thats good enough for me rn
I really didnt want the 2MB extra from kotlin but wanted to try it in a plugin
Ah cool
I don't think I'm gonna be using pdm this update KM
But next update, for sure 
Is pdm limited to spigot plugins?
I'm gonna be updating in a couple hours KM, so :c
Today
@prisma wave do it
I am
Also, Kali, your server is just stupid cause the converter works perfectly fine for me
@old wyvern kind of. 99% of the code is decoupled from spigot but using it outside of a plugin is a bit trickier
๐ฎ
trickier as in?
you have to provide the ClassLoader yourself and things
idk what was happening frosty 
hmm
I'll send an example 1 sec
alrighty
Another question, is it worth allowing people to use like 7-8 different hex formats, or should I just stick with the one I currently have?
stick with one
when will there be a universal format for mc
Probably never
To be honest everyone has their own format lmao
I use #<FFFFFF>, Gaby uses <#FFFFFF>, There's also: &{FFFFFF}, &FFFFFF
And a shit ton more
I prefer the Clojure style (# :FFFFFF)
Best is ofc ยงxยงFยงFยงFยงFยงFยงF
hideous
&#FFFFFF
So KM, coroutines
yes
those magical things
continuation passing style combined with compiler generated callbacks
idrk where to start
alright
i've not actually used them much in spigot but I used them for a bot a while back
override suspend fun CommandEvent.handle()
{
val message = awaitReply("Please wait...")
val restPing = jda.restPing.await()
val gatewayPing = jda.gatewayPing
message.editMessage("""
**Gateway Ping**: $gatewayPing ms
**Rest Ping**: $restPing ms
""".trimIndent()).await()
}``` here's a very simple example
`suspend` means that the function can pause its execution (known as "suspending"). all the await functions are just wrappers for JDA stuff that signals to pause the function.
basically what happens is you write blocking code, and the compiler changes it into callbacks
but a coroutine itself is a lightweight thread (the best analogy is a BukkitTask on a much bigger scheduler)
so you can make thousands of coroutines and "block" all of them without suffering any performance issues
,
aight
@old wyvern here's how you use it outside of spigot ```java
classLoader = new URLClassLoader(new URL[0], getClass().getClassLoader());
libraryDirectory = Files.createTempDirectory("PDM").toFile();
pdm = new PDMBuilder()
.rootDirectory(libraryDirectory)
.classLoader(classLoader)
.applicationName("PDM-Test-Suite")
.applicationVersion("N/A")
.build();
whereas inside spigot it's justjava
new PDMBuilder(plugin).build();
๐คข
Clever though
what's actually wrong with that
(the class loader bit)
apart from being effort
oh yeah
well it needs a URLClassLoader
so that was the best way of doing it
Pdb.getClassLoader(class)
KM, how would you make your own await, instead of persay using the JDA wrapper in the above case
โน๏ธ
suspend fun <T> RestAction<T>.await(): T
{
return suspendCoroutine { cont ->
this.queue({ cont.resume(it) }, { cont.resumeWithException(it) })
}
}
``` @hot hull
ngl i'm not 100% confident on how this works, but afaik it pauses the current coroutine, then queues the RestAction, and when it finishes, it resumes the coroutine
I'll play around with it, and let you know if I've got anymore questions
alright
i don't fully get how it works myself tbh
but me and yugi can probably give an ok explanation

Afternoon
yo
greetings
WHYYY
it fails and then says it's already been published
KM, do I need a dependency or something, because RestAction doesn't seem to be a thing?
Ah I'm dumb fuck
i forgot you meant for plugins
Welp, good effort
testy 
@prisma wave If I do use a coroutine, I'm guessing everything that calls this function should also be a suspend function?
it has to be
eventually you'll want to use a dispatcher though
to avoid having literally everything be suspend
the most common thing is kotlin GlobalScope.launch { someSuspendFunction() } which makes a new coroutine to run the function
although that's something of a bad practice
yea use the CoroutineScope function
also, why do they have a function with capital casing
๐
to make it look like a class I guess
xD welp
borger
Yea I'm gonna have to use the dispatcher, since I'm calling that method on an event
ah the joys of kotlin
kotlin good
rust gooder
๐คฆ
no
all languages good
elara good ๐
๐
its an infection
the most common thing is
GlobalScope.launch {
someSuspendFunction()
}```
> which makes a new coroutine to run the function
Can you gimme an example?
rust user
@hot hull that literally is an example?
xD
have you ever yawned so hard and your jaw locks
Oh
Tetanus is often associated with rust, especially rusty nails.
I'm so confused
Additionally, the rough surface of rusty metal provides crevices for dirt containing C
C bad?
Anything inside a couroutine scope is switched to a CPA style by the compiler
So you had chained future calls in java
Those are now done for you when done inside the context of a coroutine scope
Every call to a suspend function is a chaining point or a suspending point
Do understand how it relates?
Imma just go back to sleep 
the gradle plugins portal sucks ass
i've literally changed the version 4 times and it still fails to publish it
rip ๐
Does Bukkit/Spigot create a new plugin class loader for each plugin when you reload the server?
Yes
Bummer
Ya know command line args?
--port 25565
Is there like a built in parser for that in java or not really
guess its just key value args[0] args[1]
not that I know of
Clojure has one 
You could use http://commons.apache.org/proper/commons-cli/

oh man instrumenting plugin classes is beyond horrible
who designed this shitty plugin system
i'd like to talk to bukkit's manager
Come talk to me @lunar cypress
are you responsible for this mess 
No
good
have you done something like this before and have any recommendations?
I'm currently hacking something together but it's not a beauty
Sometimes we have to take everything into consideration, not just looks lol
tbh Iโd have to see what you are doing
Join room 1 and share
Uh sure gimme a couple of minutes ima grab something to eat first
Ah yes, the pain of trying to do anything remotely clever inside Bukkit's classloading fuckery
In case you've done something with custom class loading before lmk what you know
I just went to talk to clip like he said but all that's coming from his mic are snoring sounds lmfao
omg my approach actually worked
the only problem is
now the legacy material transformations aren't applied anymore
well it's not
since I'm loading the classes myself
Do you know where the code for those transformations is located?
and if there are more things that happen during regular class loading
or does it use a java agent for this? I have absolutely no idea, can't find it
@obtuse gale Henlo pls fixes boi thanky
What's different on that fork?
Kotlin and Gradle by default
Saves about 10-30 seconds per plugin/project, but its useful
Ooh nice
What is Elara?
is it like your language lol
Shh
Mine, BM and Yugi's soon to be yeah

Oh nice
So what is Elara?
A language
That I understood
Or it will be
A multi paradigmn beautiful baby
anyways kotlin good
indeedalydoodaly
@old wyvern Not enough commitment and experience in that field if you ask me
I think I scared him off with the power of Kotlin
it do be pretty strong ๐ณ
lol
How would I parse \n?
to do what?
Very useful comment from our Bukkit friends
#development instead and Did you forget to define a modern (1.13+) api-version in your plugin.yml? it's in the error
Oh srry
@prisma wave The usual new line.
is this in a config?
Yeah
u dont. u get a List<String> 
Is there an easy way to apply that to all messages, or do I have to apply that to each individual message (I'm using ConfigMe)?
make a function ig
This is my config class https://paste.helpch.at/qeguquhadi.java
and I'm just doing config.(MSG NAME)
Could you add a simple way to pdm to create a PluginDependencyManager with just a Class<? extends JavaPlugin> or something? It's technically possible right now but it'd be nice to have a more convenient constructor for it. It'd be useful if you have fields with external dependencies
@prisma wave
Hmm
Could you give an example?
How exactly would that work? Just use JavaPlugin.getPlugin?
Or is it purely for convenience
@obtuse gale Henlo pls fixes boi thanky
at school rn, will try when im home
@Yugi Not enough commitment and experience in that field if you ask me```
@hot hull what were you replying to?
There's no possible way to change the default generated structures even with a plugin is there?
Hi.. wanted to ask if paper 1.16.1 is stable enough to have like 200 players +-?
Depends on the hardware you run it on
it will either be Intel Xeon E5-1650v3 3.8 GHz*
or Intel i7-4790K @ 4GHz
8-10gb ram
depends on what you say
next
But compitively 1.13+ performs worse than 1.13-
which means
both
I have a Ryzen 7 3800X with 15gigs
(good beggining)
are u expecting 200 or do u have confirmed 200 players?
1.15.2
are u expecting 200 or do u have confirmed 200 players?
@onyx loom just speaking high
probs wont be 200
just wanna do the IFs
Probably won't have a nice time handling that
oof
probs will have like 100
hopefully xd
also don't have high budget
so that kinda fucks up
If I thenApplyAsync or whenCompleteAsync an already completed CompletableFuture, will the callbacks be called immediately after? ๐ค
If I teleport an entity every 1 tick this can maybe do lag in my server?
Specially at tps?
(entity stills in the same chunk)
I don't think it will lag though
@old wyvern Development, making a bukkit fork from scratch


@south parrot Depends on the entity amount, if you have hundreds, that's lag
@hot hull its only an armor_stand but what about if I put another stand doing the same thing (tp every 1 tick) in another location
๐ค
These lag issues are practically thanks teleport void or the ticks that I do for teleport the entity?
Or is something special like chunks? OmO
Can you explain the purpose of it
how do i get only the first word of a string and delete all the words past the first word?
split it at " " and get the first element?
ok thanks
Or just use Arrays.copyOfRange
Can you explain the purpose of it
@hot hull Creating an animation using armorstand, for example up and down everytime
but with style
haha
for that i have to teleport the entity (armorstand) every tick for complete the animation that I want
You can use setVelocity for this
It's like pushing toward effect or smth
Itโs just a vector
Itโs just a vector
@steel heart thanks, captain obvious..

what's the diff?
i mean, so the void of teleport that has an entity can makes the server lag?
or this is thanks the time of ticks that I'm executing the teleport void?
Wym?
What he meant was that he wanted to make an animation which the entity will move up and down constantly
Just use Entity#setVelocity
Oh thats interesting
Is there a fancy way to export projects with IJ or do i just copy the folder & zip it
this might be a dumb question lol
no like just to send to a friend lol
yeah just zip it
aight
its open source?
It's already os, but it was very confusing to navigate
I found this in the main class
the main class is 1754 lines long
What is the point of creating a new thread to just let it sleep?
Don't ask me ๐
Lol
:what:
How exactly would that work? Just use JavaPlugin.getPlugin?
@prisma wave no, you could use the class loader to get the required data
(except for the logger maybe)
this would be useful for a few of my use cases, because it allows you to do it in a static initialiser (before the fields of the class are loaded)
Right now, if you have a field whose type comes from some dependency or that itself declares fields from some dependencies or anything like that it will throw
because it's loaded before the dependency can be put into the class path
the downside of this: since the class loader isn't public you need reflection
It already uses reflection so that's not such a problem
so it would be like java class PluginClass extends JavaPlugin { static { new PluginDependencyManager(PluginClass.class).downloadAllDependencies().join(); } }?
and (possibly) even parse the plugin.yml yourself (that I'm not too sure about, the class loader has a field as far as I'm aware but it may not exist in every version)
parse the plugin.yml for the name and version?
yeah
that's clever
alright I'll make an issue
still waiting on gradle to be able to actually update much though :/
I still haven't figured out how to view the source of a tag for a given spigot version so I can't tell whether it's necessary though lol
yeah
to look at the differences of PluginClassLoader across different versions
Why stupid kotlin not generate javadoc????
to see which fields are always there
that's a potential problem, I'd rather not deal with spigot version clashes
this shouldn't be too big of a deal
Hopefully not
some fields it should always have, like the jar File
so worst case scenario you have to go from there for compatibility
Yeah even that wouldn't be so hard
src/main/kotlin in maven right?
๐
That's like the worst possible combination
ew
can i convert it
gradle init?
Yes
no
gradle not found
please instruct me ๐
i did it with kite board and forgot how
do you have gradle installed
Wdym no
I said I didn't want to
you need to lol
bruh
sicne ur project doesnt have the wrapper
No
I don't want to install it
It installs stupid dependencies
5 different versions of Open JDK I dont want
No?
==> Installing dependencies for gradle: openjdk
==> Installing gradle dependency: openjdk
this is on a mac with home brewer
What u on about?
why wouldn't you want openjdk
How to shade kotlin with gradle
How do I change it to gradle file structure
Its still maven
Bump
w?
total rubbish
@prisma wave Proper way of making a kotlin executable
Shouls I use application plugin?
error
Cannot assign 'String' to 'Property<String>'
Access to 'mainClass' exceeds its access rights
Use mainClass.set(blah)
also how are you doing the main class?
it's a bit different in kotlin
fun main(args: Array<String>) {
There is a class in that file
But the fun is outside the class, right?
Worked fine with maven
Gradles fault
once again
at least its not xml
it can't be in a class
Its not
It needs to be either top level, or in an object with @JvmStatic
Its underneath the class
If it's top level wouldn't it generate to ClassNameKt.class?
check the compiled output
yeah that works
assumed kotlin application plugin would rewrite that
Now
Surely it will shade kotlin automatically
Being a kotlin project
no
๐
How is it done with gradle then
Taht third party stupid thing
Wat
why
Its so stupid
what does korm have to do with anything??
So you create a gradle project
And cant even use run kotlin
Without some other thing
Allowing you to shade kotlin
that's literally the same with maven
Thonk
Yes but thats different
How
Ok maybe I am a little baised
gradle is so much cleaner than maven, like damn 1 line to relocate a package, nice af
Where as XML = doodoo 
no
SOAP.
maven does need soap
Can anyone help me compile a gradle project? I have a few issues and I'm lost.
https://github.com/SpleefX/SpleefX is the plugin I'm trying to compile. I need to modify it.
Its missing libs that dont have repos
How do I include WorldGuardExtraFlags.jar
๐ฆ
Smh Niall
HMMM
absolute bs
So Aj, any progress with the animals?
Its actually gone and broek
yes
I think I have an old project that uses those for weird mobs, ill send it if I find it
I kinda don't want to see how other people did it :p
Makes it more of a learning experience, Aj, you got a repo made for it?
I will in a sec
Ah fair enough
