#dev-general
1 messages · Page 155 of 1
Ya
You can even compile to Java 6

Does it exist a book equivalent to effective java but in kotlin
?
Would really need to read that one if so
Aw man, you could write that one
Lmao
Chapter 1 - kotlin good java bad
That would implicitly be the message of all chapters


does anyone here have pathfinding experience?
@trim dagger Better if you ask your question rather than asking if someone has experience
Also #development might be better too
I have an abstract function abstract fun UserCommandExecuteEvent.onCommand()
is there a way I can make whatever code will be in here run every time i instantiate a new UserCommandExecuteEvent for a command lib type of thing
or just in general how would that logic work to make this event work
You mean something like a functional interface?
im not sure really
I have this (https://paste.helpch.at/odinuqewen.cs) method to handle a GuildMesssageRecievedEvent and check for if the message starts with a prefix then a command in a list of commands
when I make the UserCommandExecuteEvent instance, im looking for a way to call that abstract method that all Command classes will have
https://paste.helpch.at/midariviba.cs is the full command class so far
Hmm, i'm not sure
Though i wouldn't recommend doing commands with the command event
for example with your command framework what’s the logic from receiving user input to executing the stuff in your command/subcommands or would it not be similar at all
It uses the bukkit command system, the framework works more like a wrapper for it
Here if you want to take a look https://github.com/ipsk/MattFramework/blob/master/src/main/java/me/mattstudios/mf/base/CommandHandler.java#L156
ty
anyone here used CombatTagPlus? I want to make it so before this specific action I want it to check if the player is combat tagged or not
public void onCommandProcess(PlayerCommandPreprocessEvent e) {
if (!e.getMessage().equalsIgnoreCase("/pv")) {
return;
}
Player player = e.getPlayer();
HERE i want it so that if they are tagged then cancel, if not continue to stuff below :P.
player.openInventory(this.getVaultInventory(player));
player.playSound(player.getLocation(), Sound.BAT_TAKEOFF, 1.0F, 0.5F);
e.setCancelled(true);
}```
nvm got it
Is there a DeluxeChat API?
Inside the jar
Is there any way to send chat messages with TextComponent with DeluxeChat support
@ocean quartz whats that graph
Amount of time spent coding per day, the highest peak is 7h
The colors represent different projects
Why?
Few questions I wanna pm
bro really just ghost pinged BM lmao
._.
you left it for like 2 seconds lmao
in general just don't ghost ping lol
Does anyone know of a "cloud system" I can use? I can only find ones that have bad documentation or it's all in german. I would prefer one that's open source so I can edit it to fit my needs.
okay?
umm
that's not what I mean
I'm looking for minecraft cloud system
like server hosting?
Like a panel?
no
It doesn't matter but I would prefer open source
since let's be honest if it's not I'm just going to decompile it
umm
yeah
that one has bad documentation
hmm... weird. maybe I have the wrong link or something?
^ It explains almost nothing about what it actually does or how it works. I haven't even been able to connect to the bungee instance.
?
🤦♂️ thats why I'm in "help chat"
Can someone help me I'm trying to make a chat filter, I don't know how to make an if statement like if player.chatMessage = "sh1t", event.setCancelled(true); but idk how to get that out of pseudocode
use regex
I think it's string.replaceAll("<regular expression>");
ok I'll try that thanks
and then yeah use what @obtuse gale said
okay well I'll go bother someone else to see what I can find
later
i was thanking ftc, I already read through that I couldn't find what i was looking for, but thanks for trying i guess...
are you asking how to make an if statement
no I just don't know how to make it like if chatmessage = "sh1t"
equalsIgnoreCase*
yea
i know
thats what i just wrote out
lmao go easy
also its probably better to use contains coyote
as opposed to equals
hi is it possible for me to get a free subdomain for something for me to change url/ip with port to just domain. Like from serble.net:25561 to thing.subdomain.com. serble.net is a server btw pls join!
lmao what
. serble.net is a server btw pls join!
Noone cares
@verbal relic you can setup dns records to have sub domain point to a host and port if that’s what you’re asking
@empty flint declarative is telling the computer what to do (eg
listOf(1, 2, 3).map { it + 1 }.sum()), imperative is telling the program how to do it (eg a for loop creating a new list manually
@prisma wave What's the difference between telling it to create a list using listOf(1, 2, 3) and using a loop to do it? I don't think I get it...
As soon as I get a fun project I actually start doing work lmao
@ocean quartz What software are you using to track that statistic? Where's that graph from?
technically making a list declaratively would be doing ArrayList() and then calling add() a few times
It was just convenience
@empty flint wakatime
You mean imperatively
Yeah my bad
Imperatively*
Declaratively is telling the program what to do, imperatively is saying exactly how to it
And why is declarative better than imperative?
When a declarative option is available it is more understandable than the imperative implementation
@empty flint wakatime
waka waka e e e
And why is declarative better than imperative?
@empty flint because it's more expressive and lets you focus on the actual problem
Otoh it's too high level to be suitable for everything
But in java that is rarely a concern
otoh?
Usually declarative is more concise but for complex problems it can be more difficult to express
How can I get a user's details from bukkit.getOfflinePlayers() with a UUID?
"users details", such as name?
mhm
The uuid would be the player you want to check or what?
yeah
Cause if yes, then just use Bukkit.getOfflinePlayer(UUID)
bruh
laggy and slow
Are you calling it a thousand times a second?
yes, but no
I'm trying to make a leaderboard
and I'm storing UUIDs for the leaderboard data
Just use Bukkit.getOfflinePlayer
You'll have other shit be more laggy/slow than this is
And you're only calling that method?
String name = Bukkit.getOfflinePlayer(f.getKey()).getName() != null ? Bukkit.getOfflinePlayer(f.getKey()).getName() : "Unknown";
final OfflinePlayer targetPlayer = Bukkit.getOfflinePlayer(f.getKey());
final String name = targetPlayer != null ? targetPlayer.getName() : "Unknown";
I need what?
Lmao
I've got a strong feeling, that's not the thing that's causing you lag, and it's some other shit
Died in the middle of that
I mean... I do only get 2MB down, and like 0.1MB up
Died in the middle of that
@lunar cypress Should I call an ambulance ☹️
No im fine
I was just about to tell him how he can fix the issue
But i have to go now
how can i create a "simple date format"
%localtime_time_<SimpleDateFormat>%
@lavish notch What are you doing with the data? Are you just showing it to a user or something?
I just want to get the username
Do you need it instantly
what ?
What are you doing with the username
me ?
Not really... but ideally, yes.
I would put it in an async task or something
I'm simply pasting the name to chat
Oh okay
Yeah just make it async and send the message
You would have a little delay
anyone please help
how can i create a "simple date format"
`%localtime_time_<SimpleDateFormat>%
Mind spoon feeding me? - code
No spon feed
D:
Agam, #placeholder-api and you can google simple data format, and you'll see
thanks 🙂
new BukkitRunnable() {
final OfflinePlayer targetPlayer = Bukkit.getOfflinePlayer(f.getKey());
final String name = targetPlayer != null ? targetPlayer.getName() : "Unknown";
///send name to player
}.runTaskAsyncronously(plugin);
Class 'Anonymous class derived from BukkitRunnable' must either be declared abstract or implement abstract method 'run()' in 'Runnable'
%localtime_time_hh:mm aaa% like so ?
try and see
Mackenzie,
add
@Override
public void run() {
}
Cannot resolve method 'runTaskAsyncronously(ml.mackenziemolloy.Main)'
go figure
bur
Main bad
?
yeah
I mean yes, it's a time format..
12hr bad
Imagine being American
imagine
Imagine buying useless item
what do you think ?
https://i.imgur.com/K0Bb9Wf.png
I am not an expert but too much bold imo
make 0MS -> 0ms
@heady birch
Oh must be a new method
Just use runTaskLaterAsyncrounously(main, 0L)
But I can specc asyncronous very well so check that
Cannot resolve method 'runTaskLaterAsyncrounously(ml.mackenziemolloy.Main, long)
You need to put your code in the run section boi
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scheduler/BukkitRunnable.html you should just be able to do runTaskAsynchronously(SomePlugin)
declaration: package: org.bukkit.scheduler, class: BukkitRunnable
wth I just updated the intellij rust and toml plugin and now my font is all bold
Send code
@prisma wave Any advice on implementing serialization and deserialization methods in Kotlin?
I just read this blogpost and am more confused than before...: https://medium.com/@gurpreetsk/kotlin-serialization-how-the-serialization-process-works-b479633a7eb8
@lavish notch I am just wondering: aren't you getting the OfflinePlayer by using the name in the getOfflinePlayer(...) method? Why are you trying to get the name back?
I'm trying to get the player's name with their UUID
So f.getKey() returns the UUID? Why's the method call marked as deprecated though?
It probably returns the UUID as String.
https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html#fromString(java.lang.String)
@empty flint serialization to what exactly?
@empty flint serialization to what exactly?
@prisma wave To a stream or a string, I don't care really. Let's say stream.
I wanted to implement the Interface "Serializable" but doing
class Context private constructor(val id: String, val type: ContextType) : Comparable<Context>, Serializableresults in this error:Cannot access 'Serializable': it is internal in 'kotlin.io'
That's for Java Serialization
You have the wrong import
If you wanna do it that way
There is also kotlinx.serialization which is a more idiomatic way of serializing to JSON and similar formats
Or just gson / Moshi / Jackson will work fine
How do I tell it I want kotlinx.serialization instead of the java serialization=
Yea Java serialization was a mistake
https://www.infoworld.com/article/3275924/oracle-plans-to-dump-risky-java-serialization.html
How do I tell it I want kotlinx.serialization instead of the java serialization=
@empty flint
Change the import statement
🙂
Me and my team after exposing everyones passwords in the rest api
pub fn get_bits(message: &Vec<u8>, first_bit: u8, last_bit: u8) -> i32 {
let fbi: u8 = first_bit - 1;
let lbi: u8 = last_bit - 1;
let nbi: u8 = last_bit - first_bit + 1;
let fby: u8 = fbi >> 3;
let lby: u8 = lbi >> 3;
let nby: u8 = (lby - fby) + 1;
let shift: u32 = (7 - (lbi & 7)) as u32;
let top_mask: u32 = (0xFF >> (fbi & 7)) as u32;
let i: usize = fby as usize;
return match nby {
5 => { ((message[i] as u32) & top_mask) << (32 - shift) |
(message[i + 1] as u32) << (24 - shift) |
(message[i + 2] as u32) << (16 - shift) |
(message[i + 3] as u32) << (8 - shift) |
(message[i + 4] as u32) >> shift },
4 => { ((message[i] as u32) & top_mask) << (24 - shift) |
(message[i + 1] as u32) << (16 - shift) |
(message[i + 2] as u32) << (8 - shift) |
(message[i + 3] as u32) >> shift },
3 => { ((message[i] as u32) & top_mask) << (16 - shift) |
(message[i + 1] as u32) << (8 - shift) |
(message[i + 2] as u32) >> shift },
2 => { ((message[i] as u32) & top_mask) << (8 - shift) |
(message[i + 1] as u32) >> shift },
1 => { ((message[i] as u32) & top_mask) >> shift }
_ => {0}
} as i32;
}
@lunar cypress I ported this C method to rust- any way I can neaten it up a little
gets a bit range in the byte array
Looks decent
This would work right? or nah?
public void setMaterial(final Object material) {
if (material instanceof Integer) {
this.material = Material.getMaterial((int) material);
} else {
this.material = Material.matchMaterial((String) material);
}
}
?tryandsee
It still exists niall
don't really know where to put this, since it doesn't feel like a thing for #738969312051593249 ,
anyways,
i'm looking for someone to just chill with and code together, maybe show each other what were working on, or work on something together, just all around coding buddies, you know?
(im pretty new at this minecraft plugin dev thing, just fyi)
anyways, dm me
@coral hazel Have you heard of the Kotlin cult?
nope
convert him
Join us, we have null-safety and operator overloading.
🤦
Jk, jk. I switched from Java to Kotlin like 2 weeks ago to learn the new language and code my plugins in. Found my coding buddies right here in this channel.
People share what they are working on and you can ask for help with almost anything as long as you don't mention Maven, Kotlin and Eclipse in the same sentence.
Maven and Eclipse
Shouldn't ever mention these
Anyway, Kotlin good. every time

How does gradle with kts work again?
if its .kts its in kotlin not groovy
maven {
url("https://hub.spigotmc.org/nexus/content/repositories/snapshots")
}
this doesn't
does
maven("repo") work?
idk if it will, i use something weird
maven {
url = uri("https://jitpack.io")
}``` Thats what I use, but im like 90% certain theres a better way
yep that works
and the dependency?
compileOnly "org.spigotmc:spigot-api:1.16.1-R0.1-SNAPSHOT"
implementation("org.springframework.boot:spring-boot-starter-data-jpa") thats what ive used for a dependency
you know 1.16.2 is out :p
So, I need a good way to be able to work on the same project on both my laptop and my PC, is github the best way to do this or - Ill be needing to do this alot (Like twice a day ill need to move from my pc to laptop)?
In an ideal world Id just be able to open my pc and it would have automatically updated, and vice versa, but i dont think something like that exists?
I mean one drive would do that but not sure if it plays well with intellij projects
Yeah... I mean if both computers are pointing intellij to the same files on a remote server that should work, but im guessing IJ might not like that and might cause me issues
That is false information.
Staged evidence.
kotlin good java bad
@quiet depot i'm gonna try rewriting the java guide, it felt a bit messy and overwhelming.
do you think that episode one should pick apart a Hello world program (and potentially confuse people), or should we just say "we'll cover how this works later"?
yeah
i'm just thinking if someone has never done any coding before, will find it overwhelming?
atm I feel like we should only focus on the practical stuff right now, and go deeper into how it actually works later
anyone who possesses the ability to think logically, and is committed to learning, will understand it
however, with that in mind
there's probably a reason why what you're describing, is never done in the real world
probably
so while your suggestion is as I said before, interesting
you should definitely not do that
but for example, how would you explain static without previously explaining OOP, classes, etc?
Start with the concepts first before the language maybe?
it seems like some things have to be skipped because the hello world carries so much information compared to something like python
i'm really conflicted - obviously it should be informative, but at the same time I don't want to have to spend ages explaining all the keywords before people even know what OOP is
then perhaps hello world, is simply not the best introduction to java
no
no it's really not
so, with that in mind, you don't need to attempt to coddle the user
as I said before, they should already possess the ability to think logically if they're watching your guide
Very true
which is all they need to understand it's contents
and your full breakdown of the hello world
how about this - explain what the main method declaration and System.out.println does, but cover classes and static and things at a later date?
Source here: https://github.com/contextfreecode/hi
Exploring the cognitive load of Hello World programs in Java, C, C++, Rust, Python, F#, Haskell, Nim, & Scala, including coding practices and decisions that need made after hello.
Charles Petzold blog post on win32 Hello Wor...
It just feels wrong to be explaining the concept of a class before you've even covered basic syntax
@lunar cypress I saw that
very interesting
is there any way to change the players messages so that they use ChatComponent
Player.spigot().sendMessage
yuck
if i used that I would have to add the features of deluxechat into the message
sorry what
im trying to make a [item] plugin that supports DeluxeChat but I dont know how to use modify the message using ChatComponent instead of a string
It just feels wrong to be explaining the concept of a class before you've even covered basic syntax
@prisma wave the syntax you can cover is limited without explaining the concepts behind the syntax
exactly
I think for now I'll just move on to basic variables and stuff
and then revisit it later
honestly I always thought I was going to write a java guide
but seeing these problems come to light, might just skip that part, and get onto what really matters
the application of oop principles
that's probably wise
16 minutes
@quiet depot
Have you had a 1.5 hours lecture on Hello World program? xD
I can give you one if you'd like
hello world really is a perfect segway into the jvm in it's entirety
Please do
well context free uses the time to show many different languages
And I ooop
it's actually incredibly interesting
well
@onyx loom what do you understand of the hello world?
let's lay it out, tell me exactly what you understand
that sounds very philisophical
what does clojure?
what do you understand of the hello world?
lol
println("Hello world") outputs me a message 
Or does it 
package me.piggypiglet.hello;
public final class HelloWorld {
public static void main(final String[] args) {
System.out.println("Hello World");
}
}```
ew java
dissect it for me kaliber
Disgusting
I don't think he'll want to
On which level
merely syntactical right now
microscopical
do i have to dissect the package too
everything
😐
which will it be
ok so in Java are procedures called procedures or methods? Or is a method a general way to describe a function/procedure?
ok
I'm aware
methods are bound by their object's state
state bad
Its just I'm used to the python way of describing a function as a procedure that returns a value and a procedure as a function that doesn't return a value.
At least thats what my CS "professors" keep saying 
CS professors
I think this explains everything katsu
You're 117 and you've never seen it used like that, you should stop slacking Piggy
yeah well fuck python anyway it's not a respectable language
wat
Piggy, which languages would you say it would be nice to know for use in all around world applications
no cpus 😦
java is the best language to know
Kotlin better 
maybe
Rust
But no seriously, would you say kotlin/java can be applied to any application with ease (lemme know if I'm making sense
)
absolutely
the people at Linux.com needed a fast language so they made a python interpreter in assembly
a package is just a location for where ur classes are going to be stored
the class is called Hello World. i dont really know the technicalities of a class tbf. but it separates ur code so please dont violate SRP
it comes with the arguments of final. final means that the class cant be modified after its creation.
the method is named main which has parameters of a List<String>? might be an array (java bad). the static argument when declaring the method allows u to call and access this method everywhere in the code (theres more to static, but i cant remember what bm said, so ill leave it at that
static bad kotlin good it doesnt have static)
naming it main means that the method will be called upon executing the code straight away. which will then print me a hello world mesaage 🙂
how much of this am i wrong 
maybe python 4 won't be FUCKING SHIT
Good thing you pointed it out
might be an array (java bad)
You had me worried at first
I don't think any language uses lists as a replacement for arrays
does go have arrays?
Lists are cleaner imo tho :((
Lists are cleaner imo tho :((
Arrays are faster
Who cares about speed, pfft
oh my god this is how you know it's a google product lol
"moretypes"
you can't get more google than that naming
Does anybody know how to take an arbitrary number of nullable objects and create a hash with all of them as seeds?
What
^
erm
so like
how much did i get wrong
don't use nullable objects to calculate your hash?
build your own Null object
don't
idk how to explain what I mean xD

N was good
N.kt
ngl
☠️
❤️
Object theObject = object == null ? new Null() : object
So say I have 3 objects and I want a unique identifier that results from only those 3 objects being fed into the algorithm
if one of the objects change, the hash changes
I can give you one if you'd like
@quiet depot
Oh already went through one. The prof took 2 days. ( total of 1.5 hours) but was in C++ tho
ij won't generate hash codes for nullable objects
😦
also autovalue > ide
kotlin > autovalue
k
:)
@quiet depot
Oh already went through one. The prof took 2 days. ( total of 1.5 hours) but was in C++ tho
@old wyvern lol i bet you only got through the syntax in that time
just let IJ generate a hashCode honestly
@prisma wave Ye but I need one hashcode for the combination of 3 objects
i just wrote a long ass paragraph now no one even lecturing me 😭
maybe I just have to write my own hashCode method then
final means that the class cant be modified after its creation.
final means that the class can't be extended*
might be an array
it's an array
static argument
keyword*
that's a start
thank
to expand on what clojure said kaliber
final means that the class can't be extended at compile time
Nah he went into the whole preprocessing, compilation stuff and how everything works out
final means once you write the line you cannot ever change it again, only use final if your absolutley sure you will never change the statement again
which is an excellent segway into one of the more interesting java apis, the instrumentation api!
yea i wasnt really too sure on final classes
don't
@quiet depot Do you have an idea how I could use 3 objects as unique identifiers for a class?
instrumentation allows you to manipulate bytecode at runtime
for example
making classes on the fly
or making a class non-final
I could hash all 3 objects and then stringify them together actually...
idk if that's fast enough tho
so thats some big brain shit
borzan
so if I understand correctly
u've got a set, full of instantiated classes
which contain 3 objects, that are nullable
correct
is it possible that all 3 objects could be null?
actually screw it
just write it out yourself
see if it works
yes but I can filter those out, if all 3 are null, the resulting hash should always be the same so I can set it to 0 or something.
So let's just say for now that they are not all null
or rather none of them are nullable for a start
just get the hash codes of each non-null object and generate the hash from that
I believe this is a bad idea though
might be worth researching
Objects.hash(Object...)
the static argument when declaring the method allows u to call and access this method everywhere in the code
static makes the method part of a class, not an instance
Objects.hash?
Objects.hash(Object...)
@lunar cypress I did not know that was a thing. Ty
[13:41:04 WARN]: [SpawnerMechanics] Could not save types.json to plugins/SpawnerMechanics/types.json because types.json already exists.
[13:41:04 WARN]: [SpawnerMechanics] Could not save blaze.json to plugins/SpawnerMechanics/attributes/blaze.json because blaze.json already exists.
[13:41:04 WARN]: [SpawnerMechanics] Could not save iron_golem.json to plugins/SpawnerMechanics/attributes/iron_golem.json because iron_golem.json already exists.
[13:41:04 WARN]: [SpawnerMechanics] Could not save pig.json to plugins/SpawnerMechanics/drops/pig.json because pig.json already exists.
``` Any way to suppress these 
Shame it doesn't have a boolean so you can disable that
Or just didn't do that
just don't log anything
And I think didn't is correct if you view it as a continuation of your sentence
Would be best if saveResource was a boolean so you can send messages yoruself and shit
But hey it is what it is, any suggestions?
Can I just make my own saveResource method 
What would the out be?
bare with me, pc slow 
like what do these ints represent?
@quiet depot If I hash an object in Kotlin I get an int. If I hash 3 objects i get 3 ints.... They represent nothing but a unique hash for this unique object...
static makes the method part of a class, not an instance
@prisma wave im taking a course now anyway
Kali, I bought an interesting java course, I can give you access if you want
what course?
Tim Buchalka's Java Programming Masterclass
java
ah
You said it was decent 
it's possible the only decent one
Well atleast that the guy is pretty good
so I've heard
is that true so far?
although frankly I'm not sure what benefit you have of purchasing a course
as far as I could tell, your self study efforts had been successful
I haven't watched it yet cause it's 70 hours, and I've not really had any time to watch it, plus it's mostly basics
Yea, he does have a databases section which I will check out
Cause ya know, I'm a newb 
kotlin masterclass? 
If only
made by urself
Also Piggy, it was 12$, so couldn't really pass on buying it :p (down from like 140)
Kotlin has a free course on stepik thats good I think tbh
It does assume you know java tho
Sheesh assuming in 2020 😮
lol
Colors working nicely now ;p
Though still need to do a few more things like [#000000](/guild/164280494874165248/channel/000000/)**this** this won't work it'd need to be inside the ****, so gotta make it work even outside of it, also [#000000](/guild/164280494874165248/channel/000000/)Text **text** this will only color the first word there, same reason, and lastly actions are completely broken with colors xD
Damn that's sexy
ayy nice
thats so dope
Its very
😆
Not plain, mine's plain, but like, very eye assaulting when it changes to brighter colours
i guess
Holy shit I'm so close to having these mechanics done :OOO
uh oh
also discord.bm.me would look better imo 🙂
but up to you
i just like subdomains lmao
essentials is gae, why does it hijack my command :((
essentials should have like lowest priorty for commands im pretty sure
add a loadbefore to yours
/discord link should work now
smart 
bm speed up the background color change
yea it does
What y'all talking about 👀
bms website
link

its got like a wack color transition animation as the home page
wack???
That's trippy af
😦
say its good 
you ideally don't spend too much time on the home page so i guess its pretty good
retweet
this is probably a really stupid question
if i have a random number from 1-6, how can I make that a percent lol
?
@obtuse gale but can you have a completelly custom spawners system on 1.16 
A percent can be assumed out of 1 ina sense
You can divide the value by the max which is 6 in your case
probably
I just want something to have a 1 outta 6 percent chance of happening lol
yea so (x/6)*100 is the percent chance
I just want something to have a 1 outta 6 percent chance of happening lol
100 * (1/6) chance of it happening
where x is what? A random from 1-6 or
or ya know, have a random of 100, then divide 100 by 6
random from 1-6
In any case,
(A function returning a absolute value) / (Maxima of the function) => range of [0,1] 0 being 0% and 1 being 100%. Any intermediary value can also be converted easily with a simple multiplication by 100
then bop a % at the end
:what:
just ignore me you have it right lol
so then what do i chcek that with
Simply call the Math.random() function and check if its below 0.166
you could maybe check if ((1..6).random() == yourotherint)
but idk if thats like a good way lol
or less than simply (1/6)
if(Math.random() < 16.6){
ah
What's intellij's refactor short cut?
Ctrl + Alt + L
cheers
i never knew u could have an if inside of a ${} string 🤨
You can, but it's ugly
ur ugly
pro gamers write as much code as possible in ${}

I am 😢
Anyone know if there's a way to get rid of this hologram toggling at the top, kind of annoying (usin holographic displays)
Make your own holograms using an armour stand and just set its name, no more flickering 
yo frcsty is that overlay just incase you get confused what buttons your pressing on your keyboard or what
Im more than disappointed with you btw
keystrokes mod 
Yea I cba to disable it
labymod 
no
better ?
Make your own holograms using an armour stand and just set its name, no more flickering
@errant geyser ez Frosty
pr or shutup 

pr or shutup
@hot hull if u wanna snatch my hologram code, pls do. https://github.com/katsumag/ASpigotFramework/tree/master/src/main/kotlin/me/katsumag/aspigotframework/modules/holograms
Contribute to katsumag/ASpigotFramework development by creating an account on GitHub.
just got to remove the ExpireTime enum and make it a Long passed to HologramData instead
There we go, updated
I mean it's easy to make them, just effort, it's a commission, and it's only the litle flicker thingy so not a priority
Damn
dont use kotlin, gradle or intellij
Future development career ruined with this simple trick
IDEs are overrated, the compiler will tell you everything you need to know
Never look anything up on the internet
If you can't figure it out yourself you're not suited
u must open up ur pc and write the 0s and 1s onto the cpu chip itself
binary good everything else bad
yup
does anyone know how i can add a discord embed thing when i send a link to my website or is that handled by discord internally
Your website needs certain meta tags for discord to create an embed
It uses facebook or twitter ones i think
Just look at the source of some website that gets embedded
alr
Don't write ones and zeros. Solder fixed circuits onto the chips themselves
Is there any way to cancel a DeluxeChatEvent and its corresponding AsyncPlayerChatEvent
@prisma wave how do I add a member to a class that gets initialized in the constructor but not passed via parameters?
I have a val in the init {...} block but it doesn't seem to be part of the data class' toString() method
yeah because data class only generates based on constructor params
ah, so I gotta re-write the toString?
no
wait
that member isn't visible anyway
how does that work exactly?
I am confused mucho
Should I use HikariDB to manage MySQL in my spigot plugin? Why would I need a connection pool?
I am not too fond of using HikariDB, I still don't know how to set it up properly in Maven. Last time it upped my jar size by 1MB amd it also throws random errors when I get it to work
Show code Umpa
God, this server is confusing, now I see there is #development as well.. what's the difference?
This is for debate, aimed at the question you had, development is for support
Ok
Not really sure how this is confusing but mk
considering one is under the general category, and the other under a support category, its really not confusing
@deft patrol Hikari is usually a good idea
@hot hull I am new here, try to see all these channels through my eyes. When I first saw them, I was hesitant to comment in any of them cuz I didn't want to get the wrong channel, but I stil did somehow.. yeah, they are under different categories, but their names and their descriptions don't clarify anything. When I saw "support" I thought I'd get support, I think it can't be explained any easier than that. When I see "general" I think of free discussion, not necessarily a channel where I'd ask for support
That's correct
#development is for support, this channel is for circlejerking discussion
Good
java
BAD
thanks great example
My pleasure
@deft patrol Well yes but no, also don't hesitate to ask, we're nice people here (mostly)
hey whats the mostly for
When you mention eclipse, java, and maven in the same message
ah, makes sense

Heads up Minecraft modders: On Friday we'll change the legal text on our obfuscation mappings. We're hoping that this change will make the legal terms clearer for projects like MCP/Forge/Spigot/etc to operate going forwards, ideally using our maps, and make modding easier for...
128
802
very epic
You can't
In kotlin you could have your companion object extend a class
Impossible in Java I'm afraid
That's why kotlin good, java bad 

why hasnt sx replied to me in kotlinmemes 😭
trigger:
if player has permission "mc.broadcast":
broadcast "&7• &c OGLOSZENIE &7• %colored arg-2%"
command /bc title <text>:
trigger:
if player has permission "mc.broadcast":
send to all players title "&7• &c OGLOSZENIE &7•" with subtitle "&7%colored arg-2%" for 10 seconds```
Can somebody test it?
:puke:
Skript.
kotlin good
now that's a good language
i just can;t get behind clojure
Consider learning any language
no
Anything but skript
not python
Oh sorry
Python is still more useful than skript
command /bc text <text>:
trigger:
if player has permission "mc.broadcast":
broadcast "&7• &c OGLOSZENIE &7• %colored arg-2%"
command /bc title <text>:
trigger:
if player has permission "mc.broadcast":
send to all players title "&7• &c OGLOSZENIE &7•" with subtitle "&7%colored arg-2%" for 10 seconds
Way more
Lol
i hate skript even more than I hate java users
This is not for me
and that's saying something
I'm not using skript
It's your opinion
i hate skript even more than I hate java users
@prisma wave thats saying something considering the AWFUL incident 😔 💔
What even is that then?
nah it is skript. he is using skript but its for his firend
Yeaj
which is worse. you are an enabler
it was truly awful 😭
Not a good reason
Oh yikes, man's getting his hands dirty for a friend, that's friendship right there
enabler*
does anyone know of a plugin or any other way to get a list of all ip addresses that have ever connected to a server?
that sounds sketch
a little
why? seeing ip's is already part of most anti-alt plugins anyway
i just dont want to have to do it one by one until i find the alt im looking for
you probably gotta install it to start logging ips tbh but thats sketch for sure
just use litebans or something
which has features like that
where you don't need to log everyone's ip
we already do, but ipban only works if they log in from the same ip
change ip and it doesnt do shit
there;s /iphistory or something to view the players ip history
yeah i see that too, but that still isnt helpful. i ipban Player A who logs in from IP A, okay great right? except if they use a second account from a vpn, that ipban is pointless
then whats a plugin that logs everyones ips gonna do about that?
ull never know if its someones alt if theyve never joined the server on that accoount before
bc i know the location theyre in, so i wanted to find all the ip's on the server that have logged in from that state from a specific time period so that i can monitor them
also i might be wrong but iirc litebans sorta accounts for that by banning both the username and the ip
ipban is only useful if the banned player is too stupid to figure out how to use an alt + vpn
but the player im looking for straight up moved houses, so they wont be using a vpn
so all the antivpn plugins wont be helpful either
and how do u know its gonna be that guy that u have to ban?
it could just be someone else in the same city
which is why im not going to outright ban the player simply for logging in at the ip and why i said i was going to monitor them
you can do something like kotlin class Blah { companion object : OtherClass() { override fun blah } }
and therefore kind of force it
because you have to override the functions of OtherClass?
it's the closest thing you can get
although static inheritance is probably a really bad idea
yeah
could be an interface too ofc
just googled lol
you can give me an example plugin use case if you want lol
or just use case in general
of companion objects?
normally you use them for class level constants and stuff
don't have any specific examples off hand lol
alr lol
https://bukkit.org/threads/code-for-staffgui.417040/
The good old days of me being dumb 🙂
I'm making a staff GUI plugin that means when you do /staff a gui pops up with all the staff online. You can right click the staff's heads to insert...
That's exactly what what what what what what what whq
its not even the fact that u didnt know anything
its the fucking spacing that pisses me off the most
haha fr
Wdym it's great
what in gods name
Eclipse didn't change anything so it must be fine!
were you using notepad as an ide
lmao
is ur server still up !!! i wanna play !!
lmao this one has like 20 blank lines in between 2 methods
I'm making a staff GUI plugin that means when you do /staff a gui pops up with all the staff online. You can right click the staff's heads to insert...
honestly im more interested to know if you ever made the staff gui
giving up is not a good mindset!
i think we should find the source and then redo it in kotlin
make it the new HCCCE
yea
😂
we will make an intellij thing that autoformats it to look like shit
that might be hard to get used to, but sure
its gonna be really good code except for the spacing
so no one wants to steal it lmao
what is wrong with u

i love the way u have to mention this
Lmao
i consider myself new
it boosts my confidence
its nicer than saying "fucking dumbass"
that too
😎
why he gotta do u like that
I've noticed that most of the time new people just completely ignore at least half of the advice they're given
Well yeah but rather than asking for an explanation they usually just ignore it
yea
it's very weird
cause people dont wanna feel stupid
I guess
how am i giving u shit rn for this
i swear im the biggest dumbass on the planet yet still manage to know more than u at this point
you have no clue how long it took me to learn dependency injection lmao
i struggled for days trying to understand what "an instance of my main class" was
privat
shush
😔
Hm something bugs me about the default parameters in a method
@surreal quarry the thing is, if you don't have a clear understanding of what an object is, then DI is very confusing
yea
@empty flint why?
DI is probably a thing you guys explained to me a whole bunch and i just never understood it for the longest time lmao
if i wanna laugh at something i think i got plenty 😎
So when you specify a method with method(a: A? = null, b: B? = null, c: C? = null)
gonna bookmark this page for the future 😎
You can call it via method(a, b), but not (a, c) or even (b, c)
because there's ambiguity
method(
a = a,
b = b
)```
why would there be ambiguity
that's why I made that example!
I see your point
That falls apart when you apply things like subclasses
@prisma wave How so?
But idk it's probably a lot easier that way
If B is a subclass of A there's ambiguity again, I know you said distinct classes
But it's probably easier to have consistence over a somewhat rare case
Why wouldn't you?
I can do method() and method(a) and method(a, b) and nothing else makes sense
you can even do
method(
a,
c = c
)``` if you like it more
^
its great


