#dev-general
1 messages · Page 288 of 1
At least yours boots into windows 🥲
just did right now
;-;
Yes lol
then how do u login
oh
But I can't play any games 😔
rippppppppppppppppp
no hollow knight 😔
😭
yes minecraft tho
Actually I think that runs on linux
o
just make everyone game run on the jvm, no compatibility issues, ez 🥲
pls how does piggy do it
@half harness wtf
C# has a bootleg JVM clone I think
Sorry !
wot
CVM
oh yeah i heard about that, isnt it called like java or smth?
what have you done
actually IKVM
how do I fix
send build.gradle
XMLVM
guidfgdfuVM
elaraVM
@prisma wave ^
please don't make insensitive jokes like that.
Noam yes
xml 🤢
"people" that use XML don't deserve mockery
I see the image
They deserve death
i could only agree.
to the guillotine!
Compelling punishment

bm ur my only hope 😭
But is it possible to do as in the picture with the DeluxeMenus plugin?
@half harness what exactly did you do
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
I am so confused
i did exactly what piggy said
Is it possible to do this with the DeluxeMenus plugin?
https://imgur.com/a/ZVjokqH
The goal is to put this message when you don't have the permission to take a kit and when you have the permission to make the kit that marks another lore?
U fool

Sorry.
y r u confused
what does this have to do with gradle or piggys guide
Random dkim moment, did u install dcevm
and now im asking here for work
Put it in the right thing
^^
on the brightside pdm works good <- completely irrelavent to what u are talking about i wasnt watching
yes
Good to hear
configurations
So does my 20 runtime dependencies

lol
Wait dkim are you trying to copy the jar into the plugins folder?
how are those files even getting there
i think i know
Piggys guide doesn't say anything about copying the jar afaik
Or if it does I missed it
...
wait 1 sec
buildDir remaps the build/ directory
i may have fixed the issue
Obviously that's gonna happen
not really
😔
You should probably make a copy task rather than remapping the entire build and libs dir
I'd argue that's an anti-pattern
just Google it's like 4 lines
I can't remember off the top of my head
And I'm not googling code on mobile
Ask me again in about 9 hours
how to copy a jar file
I'll be there in 7 minutes. gotta finsih this rn
if noone else helps you
til then
"gradle copy jar task"
uhh how do I execute the task
No worries, thanks to you.
Just the name
task copyFile(type: Copy) {
from('build/libs/MobAIController-1.0-SNAPSHOT-all.jar')
into('test')
include('*.jar')
}
```ive got this
ok
shadowJar.finalizeBy yourTask
can I run this with hotswapping?
you don't need to use gradle at all when hotswapping
you just rebuild the classes with IJ
ah ok
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MobAIController'
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method finalizeBy() for arguments [task ':copyFile'] on task ':shadowJar' of type com.github.jengelmblahblah
oh
its finalized
I DID IT
THX
❤️
Lol
Pro coder
i got a nutella from my garage
and it was snowing outside
and then the spread literally turned rock hard
not capping
literally its solid
boutta beat intellij into submission unless it stops freezing
Ack
Lmao
[INFO] Including org.bytedeco:javacpp:jar:windows-x86_64:1.5.4 in the shaded jar.
<excludes>
<exclude>org.spigotmc</exclude>
<exclude>uk.co.caprica.vlcj</exclude>
<exclude>com.github.sealedtx</exclude>
<exclude>ws.schild.jave</exclude>
<exclude>io.netty</exclude>
<exclude>com.mojang</exclude>
<exclude>org.bytedeco</exclude>
<exclude>org.jetbrains.annotations</exclude>
<exclude>org.apache.httpcomponents</exclude>
</excludes>

hmm
Maven
you've got to be kidding
you've prob sent that message at least 10 times, 6 of them in #805698757411995648 and #805698761442590730
@chilly zenith maybe you're here?
can you ban him?
spam. he spammed that thing in like 10 channels
I know fefo
and free....
$275 = free
he started here and in minecraft, asked him to do it in request-paid he goes both, then development, then back here, the back to paid
xD
I do not trust that someone who spams shit and doesn't respect the rules would be a trustworthy person for a $275 plugin
^^
BSkyBlock/BentoBox, ASkyBlock
hello
xD
not even enabled for staff
ty piggy
imagine not boosting

how does the gc work?
@obtuse gale that's an extremely loaded question
which gc do you want to know about?
java
g1? zgc? shenandoah?
they're java garbage collectors
like if i make a variable somewhere does it get yeeted like how does that work
When its no longer referenced
when there's no references remaining to your object, it'll be purged by the gc
e.g. if u go
As in when* its not reachable from the root of the heap
public class Blah {
public String str = "cool string";
}```
and then somewhere else u go
str = null
the gc will come along and remove "cool string" from existence
when you assign things as null in java, or remove them from a collection, or whatever, the actual object is still in memory for a brief period of time till the gc comes and cleans it up
is that all you wanted to know?
or did you want to know the actual fine details
what happens if i reassign str after that
or will it not remove it if theres still a thing saying str = "something else"
@obtuse gale if u reassign it it'll still remove the old value
public static void main(things){
String x = "Hello"
print(x)
// More code here - program wont end
}```
so does x get removed after its printed?
or
if you eventually reassigned x to something else "Hello" would be removed
itll just stay loaded?
but if you make it null. it will right?
what if its in a method then the method ends
if the value is inaccessible then it'll be removed
so yes, if a variable only exists in a method's scope, and that method ends, the variable will be garbage collected
wait so why dont all java devs set their variables to null once theyre done with them? Or will the impact be minimal
or am i being dumb
You dont need to
You dont hold objects you dont need as fields. The ones in lexical scopes dont have a reference after the end of the scope and so everything referenced only under it also subsequently becomes unreachable
What would you call a class which handles async functions
There has to be something better
AsyncFuncs
AsyncFunc
ew
FunkyAsyncs
xD
I'll just have it as Function
How boring
What would you even call async and sync with one word
SyncASync 🤷♂️
xD
I have one called Task
@quiet depot Does this docdex have default docs yet 
no
sadge
bd;docs
Plugins for the various minecraft server platforms.
• plotsquared-bukkit • worldguard
• luckperms/lp
• antivpn
• fawe
• plotsquared
• traincarts
• fawe-bukkit
• bkcommonlib
• signlink
• worldedit
hmm
frosty go thru the different pages
does it even have an api
can only Frosty change the pages?
It has events :p
yeah only the command sender blitz
nice
It's nice yea Piggy
wait but if you save the sender I guess you can show the nick of the one that sent the command at the bottom can't you?
that sounds like effort
@static zealot can u run the command again?
bd;docs
Would serializing an inventory when a command is called be good enough, or should I store it serialized in memory?, asking because if I do store it, then I need to somehow implement an updater when another user is viewing someones inventory
@quiet depot suggestions? 
no clue
i'd probably go the storing route, but I don't know about that issue
pdm isn't prod ready afaik
o
should still be safe to use for most things
but I don't think things like jda work properly with it
and idk if relocations exist yet
Which is better? ScriptEngine#put or Bindings#put? Or they're the same?
@regal gale ScriptEngine#put uses Bindings#put (sort of, it uses the engine scope bindings)
they're the same
do I need to do some special shit when I change from 28 to 31? because gradle reload doesn't seem to be enough
d;scriptengine#put
void put(String key, Object value)
throws IllegalArgumentException, NullPointerException```
Sets a key/value pair in the state of the ScriptEngine that may either create a Java Language Binding to be used in the execution of scripts or be used in some other way, depending on whether the key is reserved. Must have the same effect as getBindings(ScriptContext.ENGINE_SCOPE).put.
value - The value of named value to add.
key - The name of named value to add
IllegalArgumentException - if key is empty.
NullPointerException - if key is null.
public interface Bindings
extends Map<String,Object>```
Bindings has 5 methods, 2 implementing classes, 1 extensions, and 3 super interfaces.
A mapping of key/value pairs, all of whose keys are Strings.
In the code, I have this: java engine.put("ParserUtility", Parser.class);
How can I make this efficiently so that the thing up there remain constant while evaluating, because const variable will add into the binding and I want to remove it after finished
@quiet depot Why did I get a random urge to want to work on papi ee
idk
I can't even find any discord that are really good at coding support at this point 
In SpigotMC, it's even worse
codecave 
TCD
@prisma wave any way I can do runtime dependencies like the MariaDB database driver with PDM? or should I just use runtimeOnly?
because I tried using pdm to depend on mariadb-java-client but Hikari still seems to not be able to find a suitable driver
also, there doesn't seem to be a way to do exclusions, so I end up with dependencies for both kotlin-stdlib 1.4.21 and 1.4.10 for example
and it doesn't override dependencies either
so I have 2 SLF4J's, 2 retrofits, 2 OkHttp's, 2 kotlinx.serialization's, 3 stdlib-commons and 3 stdlibs
also, java.lang.NoSuchFieldError: Companion tf?
runtimeOnly?
nah, pdm
it's on this line: .addConverterFactory(Json.Default.asConverterFactory("application/json".toMediaType()))
that's meant to just be Json.asConverterFactory, but I've tried both initialising it and using Json.Default and neither work
(Json.Default is the companion)
Have you tried using Class.forName?
to make sure it gets properly loaded
yeah I fixed that issue with driverClassName
a.k.a reading the Connector/J documentation
my issue now seems to be with kotlinx.serialization and Jake Wharton's Retrofit kotlinx.serialization converter
maybe it's because I manually depend on OkHttp 4 and Retrofit uses OkHttp 3 (OkHttp was rewritten in Kotlin)
can PDM not override dependencies?
e.g. a library I depend on depends on x library version 1, but I want to use x library version 2, so I manually depend on x library version 2 and that library uses x library version 2
java.lang.NoSuchFieldError: Companion
retrofit = Retrofit.Builder()
.baseUrl("https://api.mojang.com/")
.client(OkHttpClient.Builder().build())
.addConverterFactory(Json.asConverterFactory("application/json".toMediaType())) // this line is causing the error
.build()
```would you know why that line is causing that error?
Is someone good at math? I have noob question
So basically
Why is √(x) = -1 a false root? I mean if we square both sides it would be x = 1 and then if we place it back LHS = √1 = -1 = RHS ?
RuntimeOnly is a special kid
what?
just define a few terms first
what do you mean by "false root"? and what do you mean by "scare"?
square*
sqrt(x^2) = x no?
?
also, if x was 1, the sqrt(x) is not -1
but 1*1 is also 1
that's why you can't square root any negative numbers
every square root of a positive number has 2 solutions
I know sqrt(-1) doesn’t work but why is one false root?
From this
didn't know -1 was a false root
Hmm no
sqrt(x) = -1 can't be a false root
Probably the solution x = 1
Still don’t get why 
actually no, they are, just they aren't at the same time
if we say this:
let x = -1
sqrt(x) = i
i is what's known as the imaginary number
Uh okay
Well ik square root of -1 is i
the imaginary number in its definition is kinda a paradox
since it's a number that exists that represents a number that doesn't exist
But consider this:
sqrt(x) = -1
sqrt(x)^2 = (-1)^2
x = 1
This is what is considered to be a false root according to my math teacher and it got me hella confused.
I know squaring can be an irreversible action but still.
i
Why is it a false root ):
don't know
You’d also say that the solution set of x is the empty set
ask them for an explanation
can't find any definitions for false roots
Yeah I did and he just circle jerked around it
Not exactly the same
because x becomes positive when it is squared no matter what, some people use that reasoning to say that sqrt(x) is always positive
But I guess
square root is one of those thing that's kinda weird to calculate
The square root is not always positive
Johnny do you know?
and i isn't paradox
yeah I wasn't saying it was, but there are definitely two schools of thought on it
you cannot square root a negative number
in the realm of complex numbers you can
Well the square root has two solutions
it can't just be -1
that's a weird term
I don't know what that means
yeah
my point is the first equation cannot be on its own
you can say "sqrt(x) = -1 or sqrt(x) = 1" or "abs(sqrt(x)) = 1"
yeah exactly
so in theory the equation has more than one solution or nah?
actually no
nvm
but this false root still confuses me
there are always 2 solutions
Yes, it has 2 solutions
except 0
sqrt(x) = -1
sqrt(x)^2 = (-1)^2
x = 1
well if x would be -1 then we would go into complex numbers, so if we exclude complex numbers the solution is x = 1 right? I just dont get why its a false root
I still don't know what a false root is
me neither
And again, this is not an equivalence transformation
lol
sqrt(x) = -1 is not equivalent to x = 1
@prisma wave any ideas about overriding dependencies btw with PDM?
how do you mean?
you can only derive one way that x = 1
e.g. retrofit depends on okhttp 3, but I want to use okhttp 4
that sounds like it would break things even without pdm
yeah ofc
if sqrt(x) = -1 then x = 1
but
if x = 1 we dont know if sqrt(x) = -1
?
nah it's fully backwards-compatible for the most part
exactly
if sqrt(x) = -1 then x = 1
that's not true?
this is true
oh wait
yeah
im dumb
@jovial warren try excluding okhttp3 and adding 4 as a pdm dependency
sqrt(x) = -1 implies x = 1
sqrt(x) = 1 implies x = 1
but x = 1 does not imply one of those exclusively
im pretty sure it respects exclusions
okay so I guess a false root might be when a step in solving an equation loses its equivalence? Or am I nonsensing now
how can I exclude with pdm?
the same way you do it with any other configuration
Did you ask your teacher for a definition and are you sure you translated it correctly
pdm ('dependency') {
exclude group: 'blah'
}```
I can't find this term
hmm let me ask him
But yes, in order to solve equations through transformations you need equivalence in every step
Because otherwise you assume that the initial equation is already true
and every proof you derive from that assumption is worthless obviously
oh also, just another random question, any ideas if I could use it with Velocity?
theoretically
I could prove that any 2 real numbers x, y are equal
x = y
=> 0 = 0
okay this makes more sense
I had to literally google down every single syntax or statement of GDScript that I found on tutorial lol
Sorry to bother but... does anyone even get a random number this way 
GDScript?
mob_types[randi() % mob_types.size()]
ew
too many things are questionable on this projects ffs
// split action_type: action
String[] sp = action.split(": ");
if (sp.length == 0) return;
StringBuilder act = new StringBuilder(sp[1]);
for (int i = 2; i < sp.length; i++) act.append(": ").append(sp[i]); // add anything extra that has a colon```
Imagine if `action.split(": ", 2)` was a thing
oh wait, it is -.-
Use StringJoiner?
@distant sun compiled regex pls
a number that isnt complex
is-not-my-code @quiet depot
complex numbers have an imaginary part
but I get what you mean
i think aj learns about complex numbers this year
how old is he?
Yeah
aj what maths r u doing
It's called advanced here but I think elsewhere it's called methods or somwthing
duh
you learn complex numbers in year 12
we did it on 9th grade lol
Can someone halp me, https://github.com/op65n/VaultManager/blob/master/src/main/java/op65n/tech/vaultmanager/command/impl/PrivateVaultCommand.java
Is this not how you're supposed to do stuff? it just halts execution half the way
Like where?
ew
what the hell why would one use substitution for completablefuture when its not necessary
or like a helper
public final class Function {
/**
* Executes a supplied runnable async
*
* @param runnable to be performed
* @return {@link CompletableFuture<Void>} of the given {@link Runnable}
*/
public static CompletableFuture<Void> perform(final Runnable runnable) {
return CompletableFuture.runAsync(
runnable
);
}
}
``` bruh
who said Collection#size() == 0 should be used over Collection#isEmpty?
Conclure, don't bully me
idk, but it may be preferred as I don't believe Collection#size has a contract on how the function should work, which could mean it's either cached, or it's calculated o(n)
however I don't see why isEmpty would be any different
¯_(ツ)_/¯
I think sx was
I have heard isEmpty is platform dependent 😮
well that's definitely wrong lol
yeah but you know that completablefuture#runasync runs async
niall I don't believe any of the collections are platform dependent
Lol joke
@distant sun https://stackoverflow.com/a/9341835/7204468
oh
frosty what if you'd schedule a task on server thread for
vaultGui.open(player);
@hot hull fully tested my ass btw
lmao
you forgot to actually implement the default javadoc in the search command
so isEmpty is good?
yes
kek
yes
it makes ur code more readable so its less complex
size() == 0 is dumb
https://rules.sonarsource.com/java/tag/clumsy/RSPEC-1155 this is where I remembered the time complexity thing from btw
anyone know why a bunch of spigot transitive dependencies would suddenly stop working?
eg Validate.notEmpty from commons
Nvm seems to be an Intellij bug, builds fine with gradle
I actually use that over the isEmpty method
you should actually prefer isEmpty
let isNotEmpty col = isEmpty >> not
lol
u stupid
no im not, i use it for algorithmic programming
and there is a good reason to do so
I believe isEmpty, in the majority of it's implementations, will probably just go "check the first element, if it doesn't exist, return false, if it does, return true"
whereas size will iterate over all the elements and increment a counter each time (in the worst case)
O(1) vs O(n)
yeah, this is implementation detail, but isEmpty is definitely always at least as efficient as size
plus it reads better
arguably
yeah
that makes sense because the counter
depends on the implementation
why doesnt the class just store a size though?
as I said, in the worst case
as an integer?
tradeoff of memory usage vs speed
which class now
some collections do store size iirc
- quite wasteful if it's not being used
- what if an element gets added or removed?
Can we please clarify which class we are talking about
just lists in general
I think it's generalised
arraylist stores size
ArrayList's size is closer to O(1) I believe
linkedlist doesn't (afaik, didn't actually check)
because a lot of lists do store the size
LinkedList on the other hand is closer to O(n) because of the way linked lists work
well i guess the efficiency depends on what data structure you use
does the internal array get shrunk if you remove elements? because if not, arraylist.size would probably be o(n)
for a linked list, we have to follow the rabbit trail
linkedlist does store size
i think
just checked source
no
arraylist stores the size
Ah makes sense
how is it O(n)...
it's not, it's o(1). it would be o(n) if it had to iterate all the elements and count
if LinkedList stores size, it's closer to O(1)
still safer though to use isEmpty, as that is basically guaranteed to be O(1) if done right in all of it's implementations
in any case, there is no reason to prefer size() == 0 over isEmpty(). the strongest "argument" you can make is that it's just as good in most cases, but that is implementation dependent and you shouldn't care about that
yeah, size == 0 will pretty much never be better than isEmpty
in my case, i was dealing with arraylist, stacks, and queues
so there wasn't much of a difference
as i said
virgin JVM lists: O(n), O(logn), "implementation details"
Chad Elara Lists: O(1) for every operation including iteration
lol
jvm lists are virgin?
all of my algorithms are Ω(1)
lmao
fun fact
pigs can be made into bacon
lmao
that's from AbstractCollection

yeah
again, completely irrelevant
It would be relevant if isEmpty() were worse than size() == 0 anywhere
ConcurrentHashMap doesnt use the regular size == 0 iirc
btw
very irrelevant but ye
it doesn't
it iterates
that's a good example of an o(n) size impl
but its isEmpty() is also o(n)
but what if you call something like
keySet().size()
isnt size of sets faster?
but idk of keySet() method itself
has any stuff in it which makes it much slower
I think it just forwards the implementation of the map
so its an iteration?
mhm
sounds like a u problem
probably
paper i think
weird
1.8.8
paper does some funky stuff with classloaders I think
same
what dcevm ver?
openjdk version "1.8.0_232b09"
OpenJDK Runtime Environment (build 1.8.0_232b09-201911100919-dcevm8u232b09)
Dynamic Code Evolution 64-Bit Server VM (build 25.232b09-bdcevm8u23209, mixed mode)
it's not really a big deal
just mildly annoying
¯_(ツ)_/¯
how are you installing dcevm btw?
I recommend using sdkman for all things java related
dcevm, java installs, gradle, maven, etc
o sdkman has that?
they also have a java 8 trava which is really neat
because I didn't think dcevm was in trava 8
that's the sole reason I'm not using java 15 on docdex
because dcevm doesn't support it
and fuck i'm not developing on a version if there's no dcevm lol
til sdkman is written in scala
whats difference between dcevm and normal?
in theory hotswapping is better
in practice
Unnamed: verifier detected internal inconsistency or security problem
😦
👀
bm do you actually not know how to fix that?
it's really really really simple
oh god
o
lol
dcevm works fine
it doesn't know your relocations exist though, because you're compiling via ij, not gradle
then your hotswapping experience will be shit
and pointless
you may aswell /reload
Anyone got any explanation as to why only half of the code would be ran, and the rest wouldn't?
paste ur build.gradle
and clean ur build dir
and restart the server if u didn't already
also when hotswapping, do I have to build or reload chcanged classes? (im not at intellij rn tho)
It get's to constructing menu, then just stops https://paste.helpch.at/rovuwayewi.cs
thenAccept will run when the first CompletableFuture returns
https://paste.helpch.at/ukecotunit.coffeescript this is the only script i do relocations in
lemme clean and restart rq
that will probably fix
yeah you have to restart
Still doesn't make any sense Bardy
alrighty
oh yeah good point
yeah
yea ik, using that in other projects
jeez i3 is hard to get used to
@jovial warren you used to use it right?
I still do
ah ok
how do you update jars in plugins? on KDE i would just copy the jar from build/libs into plugins, but writing a long cp command is kinda annoying
ik
learning vim as well
to get the pro keyboard experience
thunar?
o you still use a graphical file manager?
bm
I either use rsync or cp
how is it not portable
do you not have an isolated test server per project?
yeah im using cp, but it's just a bit long and cumbersome to type out the full path, i was wondering if you had an easier way
no lol
should i?
yes
what's the benefit
no chance of conflict
i just have to re-run buildtools, regen the world, download essentials etc again
or you can just have a template
o true
or skip bukkit all together
ah yes because that fixes the issue
well you could do it per project much easier when using docker
i'm sure ij can do it
but copying is easier
i need to write a gradle plugin that automatically sets up my dev servers
plugins what?
fuck plugins
???
apply from: scripts are the best
my bad
oh lol
i thought you meant something cleverer than that
isn't there already a plugin that does that?
idk
What is one doing wrong here, I honestly have used futures once before and that's it, https://paste.helpch.at/azuyibideq.java,
yeeting everything sync if noone presents atleast a path to the solution
so it gets stuck at constructing menu frosty?
Yes
that probably means an exception is being thrown
it was hell to debug stuff like that in pdm, cuz the future just stopped with no information
o ye try adding an exceptionally thing
^
d;completablefuture#exceptionally
CompletionStage<T> exceptionally(Function fn)```
Returns a new CompletionStage that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function. Otherwise, if this stage completes normally, then the returned stage also completes normally with the same value.
fn - the function to use to compute the value of the returned CompletionStage if this CompletionStage completed exceptionally
the new CompletionStage
function's param is a throwable iirc
oh yeah, I was gonna make that point
sorry can't show type params in method params
thenAccept will only run if thenRun returns a value for it to accept
because the "c" in "clion" isn't "assembly" for "assemblylion"
knowing jetbrains they have a plugin that adds support for it though
they don't
that's a mega oof
yup
Wait, before I continue with this, is there a better way of doing things like this?
yes
your usage of completablefuture here is to merely make it async
you'd be better off with an executor service
Got a guide Piggy, cause I've no idea what you mean by that
no and you really don't need a guide because executor services are extremely simple
make an executor via Executors#newBlah
then submit tasks via ExecutorService#submit
it's similar to the bukkit scheduler
ohh the thingy you use in docdex ye?
ye i use them in docdex
k, thanks
kinky Piggy
Might wanna close the issue btw if the default stuff is sorted now
I see
System.out.println((!(String.valueOf(!(!(!(!true))) == false).equalsIgnoreCase("true")) == true ? String.valueOf(true) : String.valueOf(false));
delete this
final boolean bool = (!(String.valueOf(!(!(!(!Boolean.TRUE))) == Boolean.FALSE).equalsIgnoreCase("true")) == Boolean.TRUE ? String.valueOf(Boolean.TRUE) : String.valueOf(Boolean.FALSE);
you happy now lol
d;fields boolean
java.lang.Boolean%TRUE
java.lang.Boolean%TYPE
java.lang.Boolean%FALSE```
public static final Boolean TRUE```
The Boolean object corresponding to the primitive value true.
d;methods Boolea
There was no direct match for that query, did you mean any of the following?: boolean booleanflag booleantype booleanvalue booleancontrol
d;methods Boolean
java.lang.Boolean#valueOf
java.lang.Boolean#compare
java.lang.Boolean#equals
java.lang.Boolean#logicalOr
java.lang.Boolean#compareTo
java.lang.Boolean#Boolean
java.lang.Boolean#booleanValue
java.lang.Boolean#hashCode
java.lang.Boolean#logicalXor
java.lang.Boolean#getBoolean
java.lang.Boolean#logicalAnd
java.lang.Boolean#toString
java.lang.Boolean#parseBoolean```
public static boolean getBoolean(String name)
throws SecurityException```
Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string "true". A system property is accessible through getProperty, a method defined by the System class.
If there is no property with the specified name, or if the specified name is empty or null, then false is returned.
name - the system property name.
SecurityException - for the same reasons as System.getProperty
the boolean value of the system property.
what is Boolean%Type
Class<Boolean>
HashMap<UUID, HashMap<String, ArrayList<String>>> 😭
without it
why not?
well i want to get brew actually
for not just gradle
but just easier to install packages
and that requires xcode
yeah i've used homebrew before
didn't realise it required xcode
that's too bad
but I wouldn't call xcode shit
iirc it's a very capable ide
Wait so Piggy, what should the return here be kek?
no frosty
isn't it void?
that's not what I said to do
return null 🙂
at all
so you dont have to return?
use EXECUTOR.submit
not CompletableFuture
e.g.
EXECUTOR.submit(() -> {
System.out.println("cool");
});```
And how do I run the sync part afterwards?
bukkit scheduler
you could also run that executor shit via the scheduler instead of using an executor
ew, but okay
Future<?> submit(Runnable task)
throws NullPointerException, RejectedExecutionException```
Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.
task - the task to submit
NullPointerException - if the task is null
RejectedExecutionException - if the task cannot be scheduled for execution
a Future representing pending completion of the task
maybe use something like taskchain
Appreciated for the pointers mr porkchop
use completable future
what the fuck
one of the people in the developer channel in the spigot discord needed help
and this was their 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.
A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!
my mans never heard of an arraylist or a for loop
thinks
thats a good idea
please
youtube tutorial probably told him to do that !!! :)
lmao
//BUILD BEFORE TESTING
its clearly copied and pasted
getServer().getConsoleSender().sendMessage("[CGUI] Working version(s): 1.15");
createInv();
this.getServer().getPluginManager().registerEvents(this, this);
getServer().getConsoleSender().sendMessage("======================");
the random use of this
for getServer() out of nowhere
and its for registering events as well, everything else is sending messages but this one is this for no reason
Personally more fan of something like
Task.async {
// Async
Task.queue {
// Sync
}
}
Cleaner yea
suspend fun
@ocean quartz Can command completions be player specific
mhm
Indeed
web design mmmm
Web design is great, i really love it! /s
lolll
I don’t know why you still have that Function class it just makes it complicated. Just have a raw Completablefuture like
CompletableFuture.runAsync(() -> {
//async
BukkitScheduler.runTask(() -> {
//sync
});
}
You don’t need static helper methods and util methods for everything.
That's ugly Conclure
No it isn’t
They’re the same. Your is hiding stuff that it should not hide
It’s not clean because the class name Function does not even suggest what the class might be doing
Not even the static method names
I mean I'm down to hear a better name for the class, I didn't know what to call it
It just masks stuff it shouldn’t mask
Should it be Executor?
No it should be removed or justified why it’s used instead of the raw Completablefuture
Nein.
Yes that code is objectively more complicated than what it has to be.
I refuse.
Call it task
Task would be a better name.
I could see it being a potential win assuming you want to use a common executor for all tasks and therefore you create some sort of forwarding logic along with that. But those static methods themselves are just complicating it for no reason at all by masking away the information a regular completablefuture usage would provide. What’s wrong with completablefuture.runasync? It has its cleanliness. The factory method is informative so is the class name and it’s in java meaning anyone that sees it will directly know what it does as opposed to your helper method.
😭
I am a small youtuber and had saved up to buy a canon g7x mk3 I had used it for quiet a while till I dropped it in water and it damaged, I am only 15 years old so I cant afford a new one and my parents don't have the money to spend on it, so i came here to try making the money from your help and start recording again and hopefully make this my full time job in the future.
thats a lot of grammer mistakes ._ .
but why he leave
O_o
he probably just spammed in every server lol
ye
?plsnolombok
Why is Lombok bad?
- It's a compiler hack - the Java compiler isn't designed to modify code, so it can cause difficult to debug errors, or worse
- It requires an IDE plugin, so unless you've properly configured Maven, Gradle and your IDE, you'll get hundreds of compilation errors. This process takes time too, it's not easy
- Lombok'd code won't show in Javadocs
- The code generation is often unpredictable and difficult to debug, and often you'll have to do it "the hard way" anyway
- Java is supposed to be explicit, Lombok hides a lot of key functionality into a subtle annotation which can be easy to miss
- While IDEs support it with a plugin, it's usually more difficult to find specific things, like usages of a getter because they don't exist in the source code
- Finally, Lombok'd bytecode doesn't match the source code, so it causes a pretty annoying warning in IntelliJ
need this for another server
indeed
idk what to say now
I'm wondering how I could in theory create a tether, I saw a plugin where the lead didn't break and it was shot and attached via arrow
Lombok won't cause any issues at first, the issues are more hidden
You might be able to set a lead's holder to an arrow, never tried it before though. If not you can make a mob ride the arrow and hold the lead or something (like a wandering trader)
Specially on an API, cough bungee cough
@tranquil crane I haven't really messed with creating plugins however I've taken enough years of java and computer science to where I can probably understand most of it and figure it out, I'm just seeing if its an option
I have a big project that I'm wanting to start, I've only used premade plugins till now
this discord also has someone that uses:
eclipse + light mode + static variables and methods + public fields + java 8
:p
It's definitely possible I'm just not sure how you'd do it entirely lol
yeah, do u know if leads have a state option to where you can set them to break or not break?
