#dev-general
1 messages · Page 250 of 1
something == "something" is something.equals("something") in java
something === "something" is something == "something" in java
Not really
Use kt instead of java xD
.
i mean u can
but if nextChar exists then i suggest that as its cleaner
yes
same as?
It doesn't have nextChar
o
are you sure?
sad face
Yeah just tested
weird
One of its best features
when creating a kotlin project (in intellij) I'm guessing I pick native?
Jvm most of the times
ah aight
Don't know how stable native is
It's stable
But jvm is the one that can interop with java
how important is the java version?
Pretty much irrelevant
Kotlin was designed to work on java 6
Native is harder because it relies on C interop and you don't have any JVM libraries available, also it's made for embedded stuff
did someone say that java 15 support was added to kotlin yet?
I think it is yeah
pog
Or coming soon at least
Ew
I dissapear again, pce
then you don't need to make an uninitialised variable
Ij should have suggested that
Also println("You got it: --> " + result.roundToInt()) -> println("You got it: --> ${result.roundToInt()}")
javaplugin()
i hear tornadofx is good
yeah
possibly a bit advanced tho
if you use swing or JFX it'll be pretty much the same as java
Great plugin 10/10
whats first and second
0.0
Those are nullable iirc
possibly
val first = reader.nextDouble() ?: 0.0
how would I concat strings?
+?
$ :clojuremoon:
you can use any java library in kotlin
Which is a javafx wrapper for kotlin
suppourts typesafe css
has a dsl for view design
BUT
clojure plugin
val number = 5
val string = "The number is $number"
Most Importantly!
works fine for me yugi 🙂
Yes
maven bad, even without kotlin
Keep trying
You can just use Swing, built into the JRE.
tbf ive never actually compiled my tfx app, just ran it using the plugin
Niall get out
It will eventually end up not resolving types and gives you random errors
man everything is just there already
calling methods directly on a string feels right
specific with tfx + gradle
Copy from maven it'll convert
It's great
What do you want to do?
kotlin dsl 😬
Yeah, shit you have kotlin dsl there
kotlin dsl 😬
use implementation and specify the groupid, artifact and version
in dependencies
also yea, you should probably switch to groovy
groovy good kotlin dsl bad
it just looks disgusting imo yugi
Looks pretty much the same to me
especially in comparison to groovy
just diff highlighting
<dependency>
<groupId>group-id</groupId>
<artifactId>artifact-id</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
==
implementation "group-id:artifact-id:1.0"
Just reload gradle
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
paper right?
The example is still similar
whats the error
What is the error?
\
What does it say when you hover it?
ah yes, the infamous kotlinOptions bug
Likely the solution is to invalidate cache and restart lmao
i swear so many people have had this issue and i have no reason why
Yeah invalidate and restart
better than the rest
It's faster, simpler, can do more things than maven
still feels like a mess sometimes
@distant sun did u find a solution to kotlinOptions issue?
@obtuse gale is ur kotlin plugin in IDE up to date? idk
not sdk
plugin in IJ
so mine is always underlined like this, but it still lets me build anyways
Mine is white kek
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
Efe, press ctrl + alt + l please
im guessing ur white means its fine? but mine is still underlined even with JavaVersion 🤨
l not 1
Should have fixed your broken indentation
What, did you do it on the gradle file?
Means No candidates found for method call kotlinOptions.
Just ignore it, it's fine
Ye
hmm
Better than in java, because to have the same thing you'd need (@NotNull final CommandSender sender)
why use kotlin when you could not?
Yes
is is the same as instanceof
Lol, why would you not use Kotlin?
and also !is
you don't need to
it gets smart casted
try it
if (sender is Player) {
sender.setHealth(0)
}```
it gets automatically casted
but if you want an actual variable
val player = sender as Player
might need to pass a double
it was just an example anyway
also
health = 20
or setHealth(20)
Yup
It makes everything more confusing
it doesn't though
as efe is proving
that sounds like a you problem
i dont wanna interrupt but review this pls https://youtu.be/lHNW_9o4PcM :)
play around with an externsion function that utilises translateAlternateColorCodes
sendMessage(String).color() 🙂
@lunar cypress did I do this correctly?
because you have an error
?di
Dependency Injection
Dependency Injection is a way of providing objects with the objects they need ("dependencies"). This is usually done with a constructor, but can also be done for individual methods
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection
Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java
Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.kt
idk
whats the error
yea
then how do you know there's an error
same thing
without the new
does it compile?
what
yeah kotlin won't let you do that
it doesn't do implicit toString() calls for anything that isn't a number
because of operator overloading
either add a toString() to AQUA, or use interpolation
Good 👍
Awesome
Just making sure I didn't miss anything
is it too quiet again?
i cant tell lol
you'll need shadowJar if you're building a plugin
because you need to install the kotlin standard library
gradle plugin
it's very easy dw
well not just me
Yea it's pretty much the same as java
Although you can use extension functions too
Which is kinda cool
@EventHandler
public fun PlayerJoinEvent.onJoin() {
}
possibly cooler
yeah the autocomplete is slightly worse than java's
exactly
Definitely sounds like a you problem, just because you haven't put the time to learn it doesn't mean it shouldn't be used
I didn't say it shouldn't be used
why use kotlin when you could not?
Implies you shouldn't lol
No, I was asking a question.
?mf
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
@obtuse gale ^
You can't use me
It's on the link how to use it xD
The latest release is there 2.0.2
But i have a more recent one
You'll need to import it differently though
maven { url = "https://repo.mattstudios.me/artifactory/public/" }
implementation "me.mattstudios:triumph-gui:3.0.4-SNAPSHOT"
yo how do I update gradle in intellij
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
or downgrade?
I know you can manually edit it in the wrapper, i don't remember the command to update it though
extension function PLEASE
move the shadowplugin into the plugins block
apply plugin is outdated
and i think u need a version number for the plugin
its 6.1.0
and u need implementation for kotlin stdlib dependency
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
id 'java'
}
👀
matt?
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
ooo
use bms mf-gui for kotlin too
(p.s ive never used it myself)
what for
we are the tutorial 🙂
i approve
so u mean the yellow part?
the yellow is class
i guess it just easily represents the class
add a toString() to the enum
is that always necessary?
#dev-general message goes back to this conversation
well preferably, dont use ChatColor enums 🙂
ty 🙂
oh i must of missed that my bad
yes, it's always necessary
is there really a better way?
I always assumed it was the better option
translateAlternateColorCodes
yea
create an extension function for translateAlternateColorCodes
i guess
or just make some constants of their things
val BLUE = ChatColor.BLUE.toString()
``` or something
if you really want that
fun String.color() = ChatColor.translateAlternateColorCodes(this)
yeah aight makes sense
what
isnt that in the item stack?
ItemBuilder.from(Material.SOMETHING).setName("NAME").asGuiItem()
Yes gui items have no concept of name
Yes it is
?tryandsee
implementation kotlin stdlib
dont need that in 1.4
poggers
Could put sender.playSound(sender.location, Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 1f, 1f) into the open action
:)
except for the fact that it doesnt affect me, because pdm 🙂
val item = createItem(Material.STONE_BRICKS) {
name = "Hello"
lore = listOf("The", "Lore", "Here")
enchantments {
ARROW_DAMAGE level 3
}
nbt {
"key" to "value"
}
}
🙄
how boring
sorted
it's easier in kotlin
https://paste.helpch.at/pifomoyapo.css omg anyone know what is going on?
ChunkNibbleArrays should be 2048 bytes not: 0
How would the code for that look?
ye
yeah ages ago
lemme put it on my repo actually
Oh, nice
yeah it's fairly simple
Nothing means the function will never complete
while(true){}
``` returns Nothing, throwing an exception returns Nothing
o
and because something like ItemBuilder.amount is an Int, the get() has to return an Int
Nothing is a subclass of every type so we can use Nothing instead
So it is basically capable of blocking a thread
Ye
but Nothing is just a type
Nothing is basically Void without the nullability right?
that's more like Unit
but similar
https://img.bristermitten.me/18-40-50.png
This is another interesting example
efe it’s nice if u wanna compact code Ig
the Nothing type is to mark that getting x will never succeed
interesting...
Does a while loop naturally evaluate to Nothing? Or is Nothing language space magic to some degree
I think it's just a compiler trick
if the compiler can infer that the function will never return a value, either because it loops forever or breaks because of an exception, it lets you use Nothing
while loops aren't expressions, so I don't think it does anything special there
it's clever
u only scratching the surface of kotlin 🙂
also, things like val x = listOf(null) evaluate as List<Nothing?>
Nothing is a class that can't be instantiated, correct?
Then Void is more like Nothing than Unit
and the others barely know kotlin
how would you set up the gradle build jar to go into another directory?
thats a completely invalid reason
Was wondering why i kept getting a deprecated value in my code, vault adds in bukkit 1.13.1 wtf
No
It's just a minor inconvenience at most
why the frick is vault shading in bukkit 
relocate 'org.bukkit', package
There
disgusting 😔
no its not that its worse but why introduce a new language when java works absolutely fine
and everyone knows it more or less well
adapt, innovate, overcome
hard when ya got a deadline
That is a very weak argument conclure, "why use something better if you can keep using the old one?"
thats not my argument but ok
read above?
this is ur argument
no lol
this didn't/won't work for me Could not find method libsDirName() for arguments [my directory]
the argument isnt because I can keep using the old one
any ideas as to why?
but because its fine?
Create a task to copy the file
its because everyone in the team knows java and since we got a deadline using kotlin and enforcing every developer in the team to learn kotlin isn't a plausible option in this case
its not the same nor equivalent to keep the old one because we can use the old one
no its not minor
This is dumb, Conclure is arguing at why he and his team won't use kotlin, while we're talking about something completely different lol
still doesnt paint a picture as to why kotlin is worse
never said kotlin is worse
yeah just in general, why is kotlin worse than java, i just want a valid point lol
kotlin>java // We're talking about this
arent u using kotlin // Conclure is talking about this
Lmao
kotlin is better than java in terms of developer convenience although it comes with its "grokkability" ig
why is assembly better than java? collab, not everyone knows java
:clojuremoon:
Oh look it's conclure
And it's another server that doesn't let me use external emotes 😒


do I have to call this task somewhere?
once ive created it
Something like:
task copyJarToBin(type: Copy) {
from 'build/libs/<file here>'
into "<path here>"
}
Then call the task after it's built
Something like build copyJarToBin or shadowJar copyJarToBin
yep facts
yes
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
to stop spam
tier 2 or smtng
Very lame
can this be setup so when building not through console it runs this task? (intellij)
yes
Yeah, just create a custom configuration for it
An example, just put that in the task
I mean, same goes for the spigotmc discord lmao
In here you just need to be tier 2 instead
did u do this? gonna fool around with it now
np
Nay
val list = mutableListOf<Type>()
No
mutableListOf is the same as a normal list in Java
While listOf is immutable
i cant remember if specifying the type is necessary?
It is unless you're initializing values

wha-
Kotlin is no that much different from java
you know you're still on a java thread
with the exact same semantics
but yeah as the guys mentioned earlier, you rarely use actual types in kotlin - it's much more idiomatic to use setOf(), mutableListOf, mapOf, etc
If the main thread terminates the program is over
well... a loop
any loop, really
just make it infinite
for i in Range
?
so wrap ur code in the for loop
that way itll repeat until the for loop has finished
is readLine not a String?
a nullable String (String?)
id recommend adding an elvis operator such as val input readLine() ?: (doing something here if readLine is null)
that way u dont have unnecessary toString()s
You could remove the toString()s even if you didn't do that
Why 10000? You could while (true) it
btw coins will be reset every time the loop iterates
idk if thats what u want, prob not
unlikely
i have no idea what's going on anyway
you're just switching from 0 to 5 and then printing the balance
java 11
is more strict about reflection
intellij uses it to run the scratches ig
it's just a warning though, you can ignore it
🙄
I wonder how much will break in that future release
no no do for(;;)
Not possible tragically
strictfp
hey would anyone here have any idea what the cause of https://hub.bg-software.com/job/WildInspect/3/console might be?
it seems to build just fine in IntelliJ, but Jenkins can't seem to do it
package net.coreprotect.database.lookup does not exist I'm going to assume that the path to core protect is on your maven local, so it's reachable on your pc but not by jenkins
it's not on maven local, it's on a public repo that's in the build.gradle
Not sure then
illegal
It does 😬
Yikes
Yo u guys know whyt this is giving me salmon someitmes?
Item caught = (Item)e.getCaught();
caught.setItemStack(godlyfish());```
like it gives me that item stack only if it's a normal fish
CCE 😮
If player has fished successfully, the result may be cast to Item.
Returns:
Entity caught by the player, Entity if fishing, and null if bobber has gotten stuck in the ground or nothing has been caught
why doesn't it return an Item lol it already says you can cast to an Item
@Nullable
public Entity getCaught()```
Gets the entity caught by the player. If player has fished successfully, the result may be cast to Item.
Entity caught by the player, Entity if fishing, and null if bobber has gotten stuck in the ground or nothing has been caught
d;spigot Item
public interface Item
extends Entity```
Item has 8 methods, 1 extensions, and 7 super interfaces.
Represents a dropped item.
d;methods spigot Item
org.bukkit.entity.Item#getOwner
org.bukkit.entity.Item#setItemStack
org.bukkit.entity.Item#setOwner
org.bukkit.entity.Item#setPickupDelay
org.bukkit.entity.Item#setThrower
org.bukkit.entity.Item#getPickupDelay
org.bukkit.entity.Item#getThrower
org.bukkit.entity.Item#getItemStack```
d;spigot playerevent
public abstract class PlayerEvent
extends Event```
PlayerEvent has 1 fields, 2 methods, 1 extensions, and 48 sub classes.
Represents a player related event
public abstract class Event
extends Object```
Event has 4 methods, 1 extensions, and 15 sub classes.
Represents an event. All events require a static method named getHandlerList() which returns the same HandlerList as getHandlers().
d;spigot handlerlist
public class HandlerList
extends Object```
HandlerList has 9 methods, and 1 extensions.
A list of event handlers, stored per-event. Based on lahwran's fevents.
What is an extension?
There was no direct match for that query, did you mean any of the following?: java.security.cert.Extension java.security.cert.X509Extension java.beans.Expression javax.net.ssl.ExtendedSSLSession java.awt.event.TextEvent
You have disallowed characters in your query. Allowed characters: a-zA-Z0-9.$%_#\-
Give me the link for handlerlist @obtuse gale im on mobile and it doesnt work for some reason
extension is something that extends it probably
might be Object
public class PlayerJoinEvent
extends PlayerEvent```
PlayerJoinEvent has 5 methods, and 1 extensions.
Called when a player joins a server
d;spigot apply
There was no direct match for that query, did you mean any of the following?: org.bukkit.entity.Player org.bukkit.map.MapPalette org.bukkit.material.Sapling org.bukkit.CoalType org.bukkit.block.data.type.Wall
d;spigot apple
There was no direct match for that query, did you mean any of the following?: org.bukkit.map.MapPalette org.bukkit.block.data.type.SeaPickle org.bukkit.block.data.type.Hopper org.bukkit.entity.Player org.bukkit.map.MapView
d;object
This object is too big to be viewed in discord, please refer to it's javadoc page: https://docs.oracle.com/javase/8/docs/api/org/omg/CORBA/Object.html
d;spigot asyncplayerpreloginevent
public class AsyncPlayerPreLoginEvent
extends Event```
AsyncPlayerPreLoginEvent has 14 methods, and 1 extensions.
Stores details for players attempting to log in. This event is asynchronous, and not run using main thread.
corba smh
Tf is that fefo
corba
idk lmao
It probably refers to "extends Object"
his favorite package
A CORBA object reference is a handle for a particular CORBA object implemented by a server. A CORBA object reference identifies the same CORBA object each time the reference is used to invoke a method on the object. A CORBA object may have multiple, distinct object references.
Kinds useless since only one class can be extended
oh yeah fefo I forgot but need to supply you your daily code
d;jdk Object
This object is too big to be viewed in discord, please refer to it's javadoc page: https://docs.oracle.com/javase/8/docs/api/org/omg/CORBA/Object.html
Nah
d;jdk Object#hashCode
This object is too big to be viewed in discord, please refer to it's javadoc page: https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--
d;jdk java.lang.Object
d;extensions playerjoinevent
There was no direct match for that query, did you mean any of the following?: javax.print.event.PrintEvent java.awt.event.PaintEvent javax.swing.event.HyperlinkEvent javax.sound.sampled.LineEvent javax.print.event.PrintJobEvent
d;extensions spigot playerjoinevent
org.bukkit.event.player.PlayerEvent```
i see
d;extensions object
Object does not have any extensions.
d;extensions factory
There was no direct match for that query, did you mean any of the following?: java.security.KeyFactory javax.xml.soap.SOAPFactory javax.swing.text.ViewFactory javax.sql.rowset.spi.SyncFactory org.omg.IOP.CodecFactory
d;extensions oliver
There was no direct match for that query, did you mean any of the following?: javax.naming.spi.Resolver java.sql.Driver javax.xml.ws.Holder java.text.Normalizer javax.swing.JSlider
d;extensions HOBOBOBOB
There was no direct match for that query, did you mean any of the following?: javax.swing.JComboBox javax.swing.ComboBoxModel javax.swing.plaf.ComboBoxUI javax.swing.ComboBoxEditor javax.swing.plaf.synth.SynthComboBoxUI
d;lolhoblol
There was no direct match for that query, did you mean any of the following?: java.awt.image.ColorModel org.omg.CORBA.LongHolder org.omg.CORBA.FloatHolder org.omg.CORBA.LocalObject java.awt.image.LookupTable
d;corba
There was no direct match for that query, did you mean any of the following?: org.omg.CORBA_2_3.ORB java.sql.Clob java.awt.Color java.sql.NClob java.awt.Scrollbar
d;org.omg.CORBA_2_3.ORB
public abstract class ORB
extends ORB```
ORB has 6 methods, and 1 extensions.
A class extending org.omg.CORBA.ORB to make the ORB portable under the OMG CORBA version 2.3 specification.
org.omg.CORBA_2_3.ORB#lookup_value_factory
org.omg.CORBA_2_3.ORB#set_delegate
org.omg.CORBA_2_3.ORB#ORB
org.omg.CORBA_2_3.ORB#unregister_value_factory
org.omg.CORBA_2_3.ORB#get_value_def
org.omg.CORBA_2_3.ORB#register_value_factory```
ORB extends ORB implements ORB
I love how there are no links for that shit
I wonder where piggy got his jdk jar from lmao
Bruh these lombokers in the spigot discord
I don't even read that chat anymore
I mean md5 uses it so expected that more there do
yo guys how would I make it so that if someone mines these diamodn ores they turn into bedrock BUT then if the server reboots they automatically turn into diamond ores?
@EventHandler
public void PlayerMineMethod(BlockBreakEvent event)
{
if (event.isCancelled()) {
return;
}
Player player = event.getPlayer();
Block block = event.getBlock();
if (inRegion(event.getPlayer()) && event.getPlayer() != null) {
if (block.getType() == Material.DIAMOND_ORE) {
Location loc = new Location(event.getBlock().getWorld(), event.getBlock().getX(), event.getBlock().getY(), event.getBlock().getZ());
event.getBlock().getWorld().dropItemNaturally(event.getBlock().getLocation(), godlydiamond());
event.getPlayer().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 10, 0);
event.setCancelled(true);
loc.getBlock().setType(Material.BEDROCK);
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, () -> {
block.getChunk().load();
loc.getWorld().getBlockAt(loc).setType(Material.DIAMOND_ORE);
}, 20 * this.regenerateTime);
}
}
}
}```
You'll have to save the location of the block to a file
Nice
can gh count project lines?
from oracle I think
do you have the dependency?
wut
if I ctrl + click some of the classes in bukkit
I get a billion errors bc of that
if im making a JsonDeserializer for gson what would be null in the deserialize method if the class's field was not provided in the json
override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext)
public final class JsonNull
extends JsonElement```
JsonNull has 1 fields, 4 methods, and 1 extensions.
A class representing a Json null value.
ah so its probably JsonElement#isJsonNull
java.lang.NullPointerException I am getting this when i am running a method in my on disable
Hard to tell anything without seeing the method, also #development might be more appropriate
@quiet depot Do you sometimes stage files then commit them on GitKraken and right after 1 or 2 new files appear unstaged?
Ikr
it also happens to me on ij though
i don't think it's a problem exclusive to gitkraken
Oh okay, seems like a git thing then
tbh I don't usually commit on gitkraken (unless I need to merge)
I use it for everything else
so i was scrolling on the forums
cause i was bored
and what the fuck
is this code
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
p.sendTitle("NightyNight", "Sleep Well.");
Oh hell nah
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
what
https://i.funnycube.net/TXyWW9.png 11/10 spigot api
ah yes my facebook is funnycube#0001
https://i.funnycube.net/frd4hf.png gians is also great
xD
Howdy fellas, am back
i need to extract the parameters from this
the result should be an array of two items
split by , then proceed, screw regex
That is hideous tho btw
blame jda
Hmm
@CheckReturnValue, @Nonnull
static accumulate(Nonnull Collection<? extends RestAction<? extends E>> actions, Nonnull Collector<? super E, A, ? extends O> collector)
throws IllegalArgumentException```
Creates a RestAction instance which accumulates all results of the provided actions. If one action fails, all others will be cancelled. To handle failures individually instead of cancelling you can use mapToResult().
IllegalArgumentException - If null is provided or the collection is empty
RestAction - Type: List of the results
actions - Non-empty collection of RestActions to accumulate
collector - The Collector to use
yeah it can't even
wait
what
i'm blind
it can
oh no nvm that's just from the actual parameter description
Should I start using java 15 for projects 
what do you recommend?
Though I'm wondering what your goal is anyway?
it's for docdex, gotta split the parameters up to get their types & names
What's wrong with leaving it like it is in the original?
because then to search you'd have to go restaction#accumulate(@Nonnull Collection<? extends RestAction<? extends E>> actions, @Nonnull Collector<? super E,A,? extends O> collector)
instead of restaction#accumulate(actions, collector)
at that point you may aswell just link the javadoc and skip the bot
ah true
jesus butler is just as bad as mine
not a fan of their solution
it's too tightly coupled to their other functionality
I'm not good enough at regex to extract the bit I need
Need help with regex?
Oh okok ;p
thanks though
Probably wrong place to ask but could any dev help me compile some source code into a jar please? I'm having some trouble. Thanks
Hi, does any dev here know anything about EFS files, if so, please dm me, its very important
(basically cant access any of my University Files)
@quiet depot I need structure advice
> listener
> registerable
- ListenerRegisterable.java
> base
- SignListener.java
> event
- RealEstateSignEvent.java
- RealEstateSignCreateListener.java
This fine, or should the listener itself be in a seperate package itself? (Create listener)
that's fine but get rid of that registerable
register all your listeners at once
via some form of classpath scanning
😄
smh
KB4 RPF?
l
hi
d;spigot servicesmanager#load(service)
@Nullable
T load(@NotNull Class service)```
Queries for a provider. This may return if no provider has been registered for a service. The highest priority provider is returned.
provider or null
service - The service interface
Lol
d;spigot Player#getDisplayName
@NotNull
String getDisplayName()```
Gets the "friendly" name to display of this player. This may include color. Note that this name will not be displayed in game, only in chat and places defined by plugins.
the friendly name
Did they remove colors on mobile again
i need help please
Feel free to ask your question in the relevant channel
d;spigot servicesmanager#loada
There was no direct match for that query, did you mean any of the following?: servicesmanager#load(class) servicesmanager#load(service) simpleservicesmanager#load(class) simpleservicesmanager#load(service) server#reload()
Oo
Server reload mmmm 
Wait is that based on parameter name or type?
d;LuckPerms UserManager#getUser(String)
There was no direct match for that query, did you mean any of the following?: usermanager#getuser(uuid) usermanager#saveuser(user) usermanager#getuser(uniqueid) usermanager#loaduser(uuid, string) usermanager#getwithpermission(string)
Why are they all lowercase 
Nop Yugi
ah
Was testing what was the fastest string replace util and the results are interesting
Java replace: 0.184038ms
StringUtils replace: 0.092409ms
StringUtils replace: 0.004715ms # This one uses constant placeholders instead
Kotlin regex: 0.045017ms
Surprised that Kotlin's regex replace is very speedy, but string utils damn
esp second
Esp?
Oh
Yeah
Let me check
Hmm it just uses Java's normal regex, i thought i'd be something different
lol java slow
hard coded means values can't be edited or smth like that
Average of 500 runs each
Did you use jbench
Just normal measureTimeNano
You know that on its own is hardly usable
If you want a proper comparison you should use a benchmarking tool
Oh yeah this isn't anything usable, just to have some notion
Not trying to get anything precise
Well it may be rather misleading
Since the order of the tests is significant as well
There are a lot more factors to this
Even if kotlin ends up winning the fight the proportions may be off
which jbench johnny?
I can do other tests with jbench though still think commons string utils will be the fastest
It's actually great, you just do [Method]
what if the method is from another class?
I think it'd be [Class.method]
oh yea
ty
I assume I can't target a certain method if more than 1 have the same name?
I guess no
F
imagine not doing Class.method(Type) 
whaaat
KDoc is pretty new
I found that here https://github.com/Kotlin/dokka/issues/80
lol sx has a comment on that thread
Yeah, someone should take the bullet and PR it
dokka says they cant do anything about it
dokka is just the documentation tool
this would be a thing in the language spec
probably
yea they said JB would need to do something so thats prob right
Yeah, god dammit Andrey
yet another TERRIBLE mistake made by the kotlin designers!
how much more must PUNISHMENT must developers take?!
its been 4 years since the issue was posted on JB lol
it cant be that hard to add that, can it?
not at all
I bet ElDocs will have that
obviously!
ElDoc >>
El Docs, spanish for The Docs lmao
❤️
For vault, is gradle repositories { maven { url = 'http://nexus.hc.to/content/repositories/pub_releases' } } dependencies { compileOnly 'net.milkbowl.vault:VaultAPI:1.7' } and ```gradle
repositories {
maven { url = 'https://jitpack.io' }
}
dependencies {
compileOnly 'com.github.MilkBowl:VaultAPI:1.7'
}
jitpack 🤮
JitPack contains the latest prolly
then use the top one?
ok
You can't import both versions anyways
I was just asking if the 1.7 for both was the same
you solved mine tho 🙂
whats the problem
how do you make it so when somebody drops a feather with a certain name it activates an execute command? any suggestions?
@loud inlet would require a custom plugin
k
/scoreboard players set @e[type=Item] OBJECTIVE 1 {Item:{id:minecraft:feather}} i read that you could do it with scoreboard with this command, but it didnt seem to reconize the last part
you think i could do it with skript?
not the s word
lol
Settings > Editor
wtf is wrong with you efe
ohh
Wow
lmfao what
How..
loll
Rainbow Brackets
javax.imageio.IIOException it looks like
You could also try Indent rainbow
Looking for useful libraries/frameworks?
Here are some which have been deemed useful by the community and are used daily.
-> Menus: https://mf.mattstudios.me/mf-gui/gui
-> Commands: https://mf.mattstudios.me/mf/mf-1/getting-started
-> Messages: https://mf.mattstudios.me/message/mf-msg
Used to have that, but started to annoy me over time
yea it kinda forces you to use its style unless you wants loads of red indentations xD
yea?
Its easier to see blocks
Yes
Makes reading blocks much easier
Also kinda warns you about bad indentations
Where is the font?
I use Vuesion
I like fira code
Vuesion
Atom one dark
With custom colors
Can you send a screenshot Yugi?
Not bad
Bright?
Oceanic
My internet keeps disconnection
Smh
Tools
Also you said mine is too bright but liked yugi's xD
The brightness is almost the same on both, just different hue
xD
I have huge glasses
What power?
Blindness
5+?
I think mine is 5 on left and 4.75 on right
Use material icons
o.o mines at 3.25 and 3.75
Probably above 4 by now
Havent checked in a year or so
Both myopia and astigmatism, generally fucked 
matt what'd you do to get the bold font in your editor window
😬
Bold where? ;o
Nothin
Nope
Yea
the SS you sent in #development looked like it had bolder font
may just be that its a different font than me idk
Oh, it's not bold, it's just my font
youtube
This would be bold
ah yea
It's just thicc
It's fira code medium
Retina is good too
Objects too
And base Kotlin files
Interfaces
Interfaces
imagine not knowing avicii 🙄 😭
lol
Uh, create a minecraft server implementation
Think of how you can use kotlin specific features to improve it
and its fun to compare how many fewer lines each file is :)
And watch this https://www.youtube.com/watch?v=6P20npkvcb8
Let Andrey teach you the ways before he leaves the team
🤢
Kotlin has everything as expressions
Functions that dont return anything meaningful return Unit
functions that do no return at all return Nothing
Offered by JetBrains. The Kotlin programming language is a modern language that gives you more power for your everyday tasks. Kotlin is concise, safe, pragmatic, and focused on interoperability with Java code. It can be used almost everywhere Java is used today: for server-side development, Android apps, and much more. Kotlin is 100% compatible ...
there is
basically
if it works in java, it works in kotlin
oh actually
lol
nvm what i just said
kotlin has a different String class
its just replace in kotlin
huh
im pretty sure ive used replaceAll before
it's just replace(Regex)
mhm
replace("hello".toRegex(), "replacement")
KDocDex when?
Piggy said it'll be hard i think
ah
You could also possibly create a helper extension function to translate for ya
🙄
🙄
🙄
🙄
🙄
wtf
tf
no
loll
?
no
no
ChatColor.translateAlternateColorCodes('&', "§") What is the point of this?
weird variable name tho

