#dev-general
1 messages Β· Page 9 of 1
static method(var1, var2) {
// do stuff with var1 and var2
// should not touch anything outside
// return something as result
}
^ if they fit this, then you should probably turn them static instead
I have a class called ManagerHandler, which handles all the managers I have in my project. So I can simply use DI to get the ManagerHandler, and with it get whatever manager I wish, so the methods in it would be returning an instance.
Also, wdym with dependent on state?
so bad idea in general?
Mainly made it to make constructors smaller, since some classes were using like up to 8 other classes
and constructor was simply too big
stuff like "manager" "handler" usually encompass too much* functionality
and should usually be divided into multiple
Yes but then the consturctor would be visually quite confusing
similar in which way?
They manage stuff, I have a manager for my config, another for messages, another for guis, etc.
so they are basically caches?
thats a bit of a special case
i am guessing you want only one instance of those managers?
there wont be more than one config manager instance at a time etc
what it means is, does your method use anything from an instance
for example:
If one class depends on too many of those "managers", it's clearly doing too much
class Apple {
private variable 1
private variable 2
// this cant be static
method1() {
// uses variable1/2
//return or not return, does not matter since variable1/2 are state dependent.
}
// this method can be turned static, it does not care which Apple instance its in
method2(variable1, variable2) {
// doing stuff
return variable3
}
}
on the second method, so it doesn't use var1 and var2 while "doing stuff"?
it uses the passed variables
oh ye okay
and does not use the class fields
what if while doing something I am using another class inside that method?
that I injected with DI
one thing to be careful about is
^ exactly that use case
thats not static-able
method2 is only a good static method
if its self contained
as in it takes var1 var2, does stuff with them
then returns something or not
so I can only use static if the method doesn't use anything from any class, aka like additions, or Serialization, etc?
it can use other stuff from classes
for example
static goodStaticMethodUsage(serializerClass, serializableClass) {
return serializerClass.serialize(serializableClass);
}
^ this is still self contained
it takes 2 instances
does stuff with them
then returns
no
it can be this
class AppleSerializer {
String serializeApple(appleClass) {
// serialize the apple and return
}
}
serialize method itself
can depend on state
^ this method should be static normally right?
since its self contained
but another example
class AppleSerializer {
variable appleType
AppleSerializer(appleType) {
// DI
}
String serializeApple(appleClass) {
// serialize the apple **ACCORDING TO APPLE TYPE** then return
}
}
^ this one is not static
it uses the apple type stored in the class
to serialize the given apple
and both are fine to use in a static method
guice
hmm thanks I will see what I can do about my whole system lol
State bad
dont get pig started on his obsession for guice
I found a better, easier to use replacement Piggy, did you already hear about Toothpick? I'm using it for some time and it is amazing, you use it just like Guice, but with almost no boilerplate required, and it is easier to use in Kotlin
you generally should not need DI in kotlin anyway
How come? I don't think I agree with this
wat
its nowhere as bad there, you can just write functional half the time
"dependency injection" isn't just "pass the thing in the constructor"
passing variables to functions is also DI
learnt something new
it kinda makes sense since a constructor looks basically the same as a method and a constructor doesnt specify a return type because it always returns itself
it's not really about that "the constructor is also a function", it's more like, picture this
int sumOneAndTwo() { return 1 + 2; }
The second you want to use any other two numbers that aren't 1 and 2 you could use global state to manage where those values are coming from
int lhs = 0;
int rhs = 0;
int sum() { return lhs + rhs; }
Sure this is valid, but we know how stinky and painful it is to manage global state like that and it's still constraining you to always use those two, instead you could make them parameters
int sum(int lhs, int rhs) { return lhs + rhs; }
Which also allows you to bind one of the parameters to a specific value
int sum(int lhs, int rhs) { return lhs + rhs; }
int inc(int i) { return sum(1, i); }
This is still a pure functional style
Ehh that's a bit of a stretch imo
There's not really any point in having the term DI if any parameter passing is DI
type of parameter matters
emily said variable
not value
variable more like reference, in which case, i'd argue di
what
Yeah sure
But that paradigm is only really a thing in OOP
And so if you were going for a fully functional kotlin style, in theory you wouldn't ever do that
well in a purely functional style you would DI functions to other functions
applyBinary i j f
1 2 +, 3 5 *
ackchyually the new keyword creates the instance before it is then initialized by the constructor, which itself is void
true 
I still don't think that's the same as OO DI
Do map and filter use dependency injection?
does filterNotNull inject o != null into filter?
not in the same way
I read an article ages ago that said "currying is not dependency injection" but can't find it now
But if you say currying is, then having any closure is also dependency injection
And then we're back to parameter passing being DI
Okay let's take regular "values" out of the question
Then if passing objects to other objects is DI, then surely passing functions to other functions is also DI in its own paradigm, no?
Just use static everywhere, who even cares
static everywhere dounds fun
oh boy have i got a paradigm for you
ok
Vue ain't much better lol
Svelte is the best I've seen so far, but even it still has problems
It's web development, what you expect
the literal tens of thousands of people doing it making tools to not suffer so much lol
Anyways you can see my beautiful creation on my profile, it ain't finito yet tho
wow, that really didn't need Vue lol
It didn't but it was a heck of a lot easier using it.
this is a static website
Star
And?
vue is way way way overkill
how can you tell me to go touch grass
you learned vue to make a fucking static website
you could've just written actual HTML and it would've been like 90% faster lmao
of?
Hi mark
that website is pretty nice tho
ngl
Seems to not satisfy the almighty Star
maybe pHp?
Where was moved the ban button?
it's in the same spot
if you mean discord ban
Ah, found it
Anyone know how to replace text in gradle resources (src/main/resources for example)? But not the actual file
basically processResources -> expand but without ${}
Or just modifying the resource itself
The reason why I don't want the ${} is because it gives a warning since I'm trying to modify the plugin.yml file π
What warning?
Invalid child element in a block mapping
which I think it means that${stuff}isn't yaml π₯΄
oh it does that to everything
since I need a key & value
Hmm
${stuff: value}
I wonder if that would work
π₯΄
not sure if gradle allows that
filter
"${version}"
well this part is so that I don't have an intellij warning
huh?
my use case is putting dependencies in build.gradle.kts and it would be replaced in plugin.yml libraries without having to use a full plugin.yml gradle plugin
and this would allow renovatebot to update the dependencies (since it doesn't search in plugin.yml and afaik I can't make it search other files)
turn it off
I don't want to :((
it's not a problem if you are aware it's not a problem
since then won't it also not warn of anything else?
and also on other IDEs/computers it will warn again
unless theres a way to turn it off in the file itself
yeah you could uninstall the minecraft dev plugin
then there is no schema for the plugin.yml
yes but the thing is that I want to only turn off that one part, not the entire plugin
or the entire warning
which would still appear for other people with the plugin
you can't just do "that one part" without doing things that are just bad
wdym without doing things?
like
libraries:
- blah
and then find the - blah and replace it with everything else
that's just bad
oh I didn't think of that
that is terrible
I don't want to have warning laying around though
and you can't suppress in yaml files :(
a warning tells you "hey something in here could be wrong, just so you know you may not be doing what you're intending to do
suck it
D:
yes but that yellow triangle
what about it
oh
who ever mentioned errors
I was thinking of something else
so you're saying yml ${libraries: libs} is bad while ```yml
libraries: ${libs}
i mean for that matter just do ${libs} alone
But if I do ```yml
${libraries: libs}
no
why
i'm literally talking about just ${libs}
not libraries: ${libs}
and expand it to the whole thing
what does it say π€¨
Why dont you use a gradle plugin that handle this for you, dkim?
nice, let me know if you get stuck on something while setting it up because I already have a setup that works just fine for me and I might be able to help
Anyone know how to write a javascript that replaces placeholder outputs?
If region = spawn, display "Asterya Isle"
If region = auction, display "Auction House"```
(sry if this is the wrong channel)
i sent him code already
Oh, np
well, the event started at 9PM for me, so I assume they use a certain timezone
UH OH! YOU HAVEN'T MADE ANY PULL/MERGE REQUESTS YET. SUBMIT YOUR FIRST CONTRIBUTION TO A PARTICIPATING PROJECT TO GET STARTED WITH HACKTOBERFEST!
I guess it started
wait where do you see that
triumphteam/triumph-gui
Well. There's 2 PRs open
oh PAPI3
Wish they'd count already open PRs
Also they don't count commits to your own repos right? It makes sense, just asking in case it does
oooooooooooooooooooooooooo
does reordering enum constants break already-compiled switches?
i think i'm asking the wrong question because i know it does
but
i cannot find absolutely nowhere in neither specification how switches on enum constants work, jls cannot be more vague about it and jvms.. well... tableswitch/lookupswitch works on numbers, not "enums"
is the "compiles to switch on ordinal" specified absolutely anywhere?
I dunno
no you wouldn't
Yeah thatβs pretty unclear from the JLS, but it says this in https://docs.oracle.com/javase/specs/jls/se19/jls19.pdf#page514
That sounds like it would be wrong to rely on ordinals
What do you mean questionable
Imagine linking your fork instead of the original π
Imagine linking a dead original
Might revive the global version instead
Need to go over what even is made, and what could be added
Wanna hop in my dms and gimme some ideas on what features could be added?
haha
from what I've seen now, it shouldn't break. Javac generates a lookup array to map from ordinals to indexes, so I guess the section about the equality is correct and good enough
oh right the array is based on the runtime ordinals
somehow in my mind it was like well this is pretty stupid what is this inner class array nonsense but it's actually a pretty clever trick so it doesn't break when enum entries are reordered
I see now
Is it possible have a bunch of proxies all across the US, and send players to the one closest to them? I know using RedisBungee you can send people between bungee proxies, but is it possible to send them to the closest one? I think I could use IPs to get the general location.
no, issue being that all connection goes through the main proxy
so regardless of where you put all of your "close" bungee proxies, they will get routed from the main to there
ah
its a mc limitation, unless they disconnect then connect again sadly its not possible
and there is no way to redirect a client
so you can only route
@ Star π₯²
Any good ideas for a plugin i can make as practice?
just make something that uses the common stuff
like sql, gui with pagination etc
they are usually used in basically every plugin
inventory api 
if those feel too complex still, then something simple is probably better
something with cooldowns for example
i mean sure but i think handling inventories at least once is a good idea
they function kinda weird with all the cloning they do

"funny" cube is a dictator
i think all support channels that are not #development have embeds/attachments/external emojis disabled
no funsies
is it not just for small tiers?
no
ah true, people there probably are a bit more gullible
do people even believe those 
yes
Never underestimate people on the internets stupidity
While we are aware of this, it is very understandable for a user that doesn't usually spend 12 hours a day on the internet to not be aware of these kind of scams going on.
you gotta keep in mind the average discord user lacks large brain chunks
tbf, if the link comes from a friends discord that got hijacked
i can see why it can spread
It's not even stupidity.
yeah that's far more believable than in any random server
yeah, but its kinda like internet 101 to not click links etc
We are very used with the internet and with all the bad stuff that happens on it since we spend 8+ hours a day on it.
Yes
Tell that to my parents who don't care. They just want to see stuff on youtube. That's literally the only time they use the internet. And also messaging friends.
I'm not sure but they might be for boosters only.
they are enabled here and in #development
i just realized that they were disabled there tbf
You have to talk with cube about that. Idk
barry also seems a bit stricter there
Yeah. Because less experienced people are the ones usually going in those channels.
yeah it makes sense
I love how "Access to the HelpChat SMP Server" is still listed as a perk :))))
only one thats lowkey annoying is the caps limiting thing it has
Yeah. I do feel like it should be increase a bit as well.
maybe check past x messages as the % of caps or smt
its annoying when someone types in caps only, but feels quite limiting atm
yeah. Access to external emojis is listed as a booster perk. I knew I've seen that mentioned somewhere.
yeah saw it

can I use Intellij's profiler to profile bukkit plugins?
i mean not plugin specifically, you profile the entire runtime
elaborate?
so profiling would be useless?
pain
obviously different profiling tools have their own way to do different kinds of filtering
so would a profiler like spark be better?
not necessarily
My confusion levels are high rn
Spawn plugin? Parkour plugin? Maybe a combat tag plugin?
A plugin which gives you plugin ideas
Genius
Bro found a glitch in the system
Anyone know the differences in ```java
// org.bukkit.Particle
EXPLOSION_NORMAL,
EXPLOSION_LARGE,
EXPLOSION_HUGE,
Ha
:)
Can't really try it right now and can tomorrow so was seeing if anyone else already had a project with explosion particles
Aight
anyone good with fawe api?
I'm sure someone is
https://cdn.discordapp.com/attachments/347745984446726144/1025097409816174652/unknown.png
Basically, Im trying to make a prison explosive enchant. I get this problem every time
show code
Bukkit.getServer().getScheduler().runTaskAsynchronously(MineEnchants.getInstance(), () -> {
Bukkit.broadcastMessage("B");
try (EditSession editSession = WorldEdit.getInstance().newEditSession(FaweAPI.getWorld("World"))) {
Bukkit.broadcastMessage("C");
EllipsoidRegion explosiveRegion = new EllipsoidRegion(FaweAPI.getWorld(block.getWorld().getName()), BlockVector3.at(block.getX(), block.getY(), block.getZ()), Vector3.at(3, 3, 3));
Bukkit.broadcastMessage(editSession.countBlocks(explosiveRegion, new BlockMaskBuilder().addTypes(BlockTypes.SLIME_BLOCK).build(editSession)) + ": ");
for (BlockVector3 b : explosiveRegion) {
//if (quarry.withinMineWE(b)) {
//b.setBlock(editSession, BlockTypes.AIR.getDefaultState());
//b.setBlock(editSession, BlockTypes.AIR.getDefaultState());
block.getWorld().spawnParticle(Particle.EXPLOSION_NORMAL, new Location(block.getWorld(), b.getBlockX(), b.getBlockY(), b.getBlockZ()), 1);
//}
}
}
});```
hm i'm gonna assume FaweAPI.getWorld("World") is returning null, you should try debugging to see if it's null or not, print it or something
Uh there should be a null check probablyβ¦
I fixed btw forgot to say, Thanks
Was it the problem Emily mentioned?
https://github.com/Toshimichi0915/fetch
I made an expansion for PlaceholderAPI. How can i register my account and verify it so that everyone can use my expansion?
https://api.extendedclip.com/expansions/fetch/
I'm now waiting for my expansion to get verified
@hot hull but there's no pattern
it's boring
jb splashes have always been rather artistic
that "iJ" stylising is new tho, don't mind that
tbh I haven't coded much this year at all so I haven't seen the splashes
Nothing beats 2019 though
was that the wireframe one?
oh, no, that was the blobs
2018 had the best splashes imo
Yeah
Your font looks different
18 was cool too, but I still prefer the blobs
16 was quite cool too
I don't think I ever saw those splashes myself
Can we not just use our own images? π
I'm guessing I first used ij around 2017
you probably can
Pff, 2016
2016.3 was the best
for what lang?
Look up for a pets extension, nova
lots of people really like vsc
oh
C# I guess
But for C# i really dont know why we are still learning it
They say cuz its a basis language
but im like- What about python? Thats a basis language and its still used widely.
For real Matt
python isnβt really good for medium or large projects nova
C# is still used wdym
if you code well c# will scale to any project size
No im aware-
itβs a good lang to know
In all projects I've been on they were using C#, either for everything or just for some parts of the app
But what i mean is that they are trying to learn us the basis of coding.
And are giving us assignments from 2013 or somethin
I cant stand VS, that shit is ugly and confusing tbh
more langs are like c# than oython
fair fair
Agreed
But "Windows forms applications"
I know Iβd much rather learn c# than python in uni
Do they not allow ReSharper? Or whatever the jetbrains product name is
Tbh I prefer C style languages over python style languages
Nah
chances are most that know both, do prefer c style
We will do java for the next 2 years, one course per semester 
Oh im okay with it- its just that i know for a fact about 70% of my class is hella confused about everything.
Wdym you dont like when your code gets fucked up because you forgot a space?
I already got offered a job and im in my first year lmao π
I feel that-
Ran that for like two years on my 32bit potato
Was hella good

is there a new ij ui?
Yeah
Idk ij was looking great already
can someone post a pic
ΕΎ
whereβs replacement for top action bar
bottom left are some stuff
bottom left looks like stuff that was bottom left before hand
Honestly can't remember where anything was anymore
This new ui will be optional, right?
Yea
Great
yeah I didnβt really have any issues with the old ui tbh
Old one is great, I just like that this one is more compact
do you also like small keyboards that are missing 50% of the keys
Not having a numpad is already enough for me. The other day i wanted to type one of those alt combinations to get a symbol, but guess what, I cant 
ok good
Was gonna build a custom keyboard, but 99% of the frames are 60% or some shit
is that what a custom keyboard costs?
Idk, but probably 200$+
Depends where you buy it, but in most cases you can't get the configuration you want, which annoys me
My current one is an SS Apex 5, which is a great keyboard, but I was limited with the switch selection
E.g. 2$/switch * 100 keys = 200$
I think the great ones are pretty expensive, right? I remember I saw on amazon a small bag for like 40$
Or even those rings to make them more silent
I mean even normal keyboards are getting quite expensive nowadays
I got a red dragon keyboard without numpad for like 30β¬, it is not the best but it does its job
Tbh mechanic keyboards are a different kind, typing feels better xD
Can't imagine going back to the old keyboard
I will have to use my laptop's keyboard starting from monday. God i hate uni.
Yeah, I just dont like them 100%
π³
ew maven
exactly what I was thinking lol
Be able to use git (Setup .gitignore, create pull requests)
IntelliJ git plugin (?) ez
GitHub can't even use .gitignore xD
Am I having a mental break down or does m as a unit of time (eg. 5m) represent minutes and not months?
m is minutes, M is months
atleast going off datetimeformatter
Thank you- I don't know what it is but these services team I'm apart of all fricking think m is months.

id also say months would also be mo
This is what I said;
m should definitely be minutes
In Date isn't mm minutes?
That's date though, like hh:mm:ss- it's different.
m is and always has been minutes
careful
Ignore the .gitignore, therefore add all files?
Yes I see the 5th line, that's exactly what I mean
If you ignore the .gitignore there won't be a list of files to ignore therefore you add all files, so you can imagine you can't really ignore itself right
What does that have to do with what I said? lol
ignoring gitignore is not possible lmao
no it's not
you probably just didnt commit it in the first place
What if you use gitignore as it is supposed to be used 
you are not showing anything
Wait you mean to tell me that when you clone a repo and you commit you don't have to write the .gitignore again because it wasn't present in the repo?
Maybe π¬
https://github.com/TheCrappiest/TaskManagement
holy shit where is the piss.fart file! it must be in .gitignore!
no, it just doesnt exist / you didn't stage it
even with .gitignore you have to manually stage files
besides
you should not be ignoring .gitignore
it's a bad idea
.
and defeats the point in having it
cc: @prisma wave
I am loosing my will to live,
start and end timestamp
quote in unix timestamp 
or discord's epoch, whatever it's called.
who uses mi even
hey guys
does anyone know, i lost old discord account i mean has been disable anyway i need a datas and i cant go to (request all of my data) how can i get data's. Thank u
?not-discord
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
+1

JavaScript JDK
ATM Machine
PIN number
Is one if statement with several conditions inside the same as having several ifs (without else) in a row?
In terms of performance and maintenance.
(In this case its an OR if statement aka ||)
do you really care if it runs .03 nanoseconds faster?
(no you don't)
code for readability first
I care
Do server owners use the latest version of mc now or is there a preferred version to have a server on still?
If that makes any sense
I remember before ppl would have their base server on 1.12.2 and use via version
For performance reasons I believe
Thats my second question
I mean idk what you think, but I think this
if (foo.bar() || foo2.bar()) {
// thing
}
is more readable and maintainable than
if (foo.bar()) {
// thing
} else if (foo2.bar()) {
// same thing
}
which is based on bstats data but it shows how it evolved over time
That is very useful actually wtf
Thanks
Interesting, itβs mostly 1.19.2
So Iβm assuming that server owners will update their jar every time a new one comes out?
i think it shows the amount of servers and not the amount of players playing on the servers of those versions
for a lot of small friend groups etc, it makes sense that they are hosted on latest
I forgot to take that into account :/
what would be more useful would be a pie chart showing % of players playing on servers on x version
Agreed
rather than raw amount of servers using a version
this makes me happy and angry though
especially since i keep getting asked to make plugins for java 8

i mean its either j8 or j17 /18

wouldnt the second method be used for another purpose?
cus if foo or foo2 then do the same thing, the other is if foo do thing, else if foo2 do a different thing
like yeah do method 1 if you want foo and foo2 to do the same thing if they are true, but method 2 for if you want seperate functions depending on the outcome of this
sure
I was just providing an example to his original question
that would be the code without explicitly using a logical or op
whats the best way to save a player's reference? Like for instance if they were to have /veinminer on or /veinminer off, would I just save the hashmap containing that info to a yml file or is there a more conventional way to do things.
use a proper database
oh like h2?
h2 - sqlite if you want it local
or a proper sql
postgre - maria
or mongo if you dont want to deal with sql
only use yml if you want users to be able to edit
through files
okay, thank you
Hey! I'm making an essentials plugin similar to EssentialsX, except less bloated and with more useful features. What are some features you would like to see in a plugin like that?
/beezooka
20 aliases for all commands, the more obscure they are, th ebetter
beezooka is fun but its so unecessary
I think you should have modules
You can disable modules
Like a fun module
Idk
Hi bm
an essentials plugin similar to EssentialsX, except less bloated and with more useful features
hi kotlin =
sorry
that was a bit mean
but
it's treue
Do you know why essentials makes worse versions of vanilla commands
does it?
U can do that with kill cmd
Although ig it's more "difficult"
Kill all makes sense
But not kill
those commands exist for a long time already
Imagine typing /killall instead of /kickall π«
/kickall zombie
Yeah I love that idea, been considering it for a while
good point but its fun to develop and essentialsx pisses me off lol
Can't tp to coordinates, cant /give with nbt data, /give defaults to 64 for some reason, cant use @p @e etc, etc
lol fair
@e without like [] is possible
*
theres also ** but I've got no idea what it does
i've only really seen one plugin do a decent job at this, being CMI, but its full of bugs and costs money, whereas this is gonna be free & open source
I just remember seeing it in tab completion
true
modular one with extensions would be nice i think
you get to be bloated while being lightweight still
Can't tp to coordinates
this is false?
/tppos
yea lol
yeah, have a core plugin, with a Fun extention, a moderation extention, a holograms extention, etc
oh
ideally you would open it to others
Might bake it all into one plugin with a config to enable/disable modules but that may be a bit laggy
so they can add their stuff
Oh good idea
like how papi operates
oh right lol
onEnable doesn't have TPS
so as long as it doesn't take like 5 seconds
it should be fine
make it download instead
at that point it's just a plugin in a plugin though
the goal should be to have to only install 1 plugin
and, possibly, disable some stuff
yeah, but it can come with extreme basics
and let people add the stuff they want on top
like tp etc some use a dedicated plugin
while others want all in one
same with stuff like kits
yes but there's no benefit to that instead of just installing a regular plugin
ex holographic displays vs hologram module
PAPI (plugins/PlaceholderAPI/expansions) for example has its own API and aren't for normal plugins
i was gonna say if it had the api integrated for these that could actually be cool
but then you can just shade
also the default /give amount can be changed in config and you can pass nbt data to it

Or wait no
thats a good idea
the modular plugin can have an API
which can have like getEnabledModules()
and those can have APIs of their own
a shared hub for apis?
well no
saves the trouble of relocating and such i suppose?
no I mean like moderation module, fun module, etc all built-in to the plugin, and can be disabled in the main plugin's config
Β―_(γ)_/Β―
would make it easier for the users
yes but what about
if (foo.bar() || foo2.bar() || foo3.bar() || foo4.bar() || foo5.bar() || foo6.bar() || foo7.bar() || foo8.bar()) {
return;
}
and
if (foo.bar()) return;
if (foo2.bar()) return;
if (foo3.bar()) return;
if (foo4.bar()) return;
if (foo5.bar()) return;
if (foo6.bar()) return;
if (foo7.bar()) return;
if (foo8.bar()) return;
it's obviously an abuse of ifs lol, and the functions are the same in looks but imagine every method is completely different thing
at the end it's quite a preference thing I assume and depends on the use case
if (
foo.bar() ||
foo2.bar() ||
foo3.bar() ||
foo4.bar() ||
foo5.bar()
) return;
or however you wish to format it
I mean that's not really a real world example
If you have that many ifβs you could probably abstract them away into separate methods, it may look cleaner if thatβs what you are worried about
Or you know the true way
public boolean ifOr(boolean⦠bools) {
for (bool b : bools) {
if (b) return true;
}
return false;
}
Iβm on my phone so that is going to look so ugly
or use a fold because you're not a loser that uses for loops
public void moment
fail!
That would always return true if the first boolean is true anyways.
And it didn't reply. π€¦
guess.. what an or does
Was talking about what masterofthefish posted
yeah so was emily
yes me too
Oh it's not formatted right for me lol
Stream#any 
yes Fish your style disgusts me
foldl (||) False >
Fish ??
MOTF
Go away with this atrocity
No need to shout.
None
imagine not writing
if (condition) return value
if (another-condition) return value
if (yet-another-condition) return value
if (another-condition-!?!?) return value
actually any id is even more concise π
haters stay mad
^
I donβt know what you are talking about
Itβs not my fault
Itβs discords fault for how it works on my phone
Go in #off-topic and complain to the discord staff
Also I never use a for loop without brackets in actual code, itβs just such a pain to type on my phone
Iβm not a monster
But you still said exactly what it did?
Still gets me every time
final var
why
Cause, it's a "newer" thing
it is great
Indeed it is
Would be less annoying if you weren't using 1.8
"How do I do y in x?"
"Dont use x"
ty
np, anytime
Are you a stackoverflow moderator by any chance?
Thankfully not
Anyways, to actually answer your question, it's changed via material data iirc
itemstack data. but close enough
isnt something like uhh, new ItemStack(Material.WOOL, 1, 0-15?)
I think this is something
ItemStack wool = new ItemStack(Material.WOOL, 1, (byte) 14);
you can do that, you can also just do ItemStack#setDurability or something like that.
stack.setDurability((short) 0);
}```
like this?
yeah. tho 0 is white and the default one.
Any of you got any fine repos to contribute to?
Would this return the 1.8 equivalent of Material.WOOL_someColor
stack.setDurability(value);
return stack.getType();
}
public ColorToItem() {
this.setType(colorWool(itemStack, (short) integer));
}```
No. colorWool will just return back Material.WOOL.
colored wool did not have it's own material for each color in anything lower than 1.13.
I understand
What else should the answer be? No one is forced to give support for a 7 year, 2 months, and 10 days old minecraft version. It's your fault at the end if you refuse to update, so his answer is quite the best answer you could get.
I'm making a plugin for someone that uses 1.8, I really do wish I had enough influence to change what version servers are running but I don't.
So for now I kind of just have to deal with it.
Maybe tell your costumer to not use 1.8
Xd or try
I wish I could trust me.
Wut
ObjectMapper mapper = new ObjectMapper()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
Item[] items = mapper.readValue(json, Item[].class);
for (Item item : items) {
System.out.println(item);
}
I have this code and I this json (https://paste.gg/p/anonymous/b4babcabec414e048c8bd7b185da2fa8) and I have already figured out how to only get the id and count but now I cannot figure out how to tell jackson to ignore the null fields in the json array when deserializing.
Money talks I guess π€·ββοΈ
I have a few powerful dedis, and I was wondering what would be the best approach to a game like skywars. I am going to implement dynamic instancing, but should I also have multiple games per server? I know networks like Hypixel have a skywars game per server, but I also know that it is quite common to see multiple games per server. What is the best approach since I am not worried about performance?
depends on the playercount, but you can easily host multiple on one server
@long dagger
I am expecting around 300 people on skywars at once
for skyblock its a bit different
but in general, what you want to consider is how you handle the worlds
i mean in general, if you are not running a custom server implementation
its most likely always faster to share the server
it obviously depends on how your plugin functions in the end
especially how it resets the map
alright, I wasnt sure what was the best approach. I am not currently using my own server jar
the issue is the stuff that happens on init
its quite heavy and no point doing it multiple times
currently it tracks every block broken/placed and reverses it at the end
I wasnt sure if that was faster than a schematic paste
I haven't ran tests yet
depends on how you paste
if you paste using nms, then your method most likely is faster
it uses the world edit api to paste the schematic
no as in
your revert
bukkits set block is not that fast
since it runs light updates etc
but you can skip them using nms
lemme send you a resource that will prove useful most likely
there was a really nice thread about it on spigot
ok, thanks
here
in cases like minigames where players are not around
when the edits happen
you can skip A LOT of the steps
like sending update packets etc
yeah no players will be in the world/server
you still want to update lights (or even better cache them and just revert)
since worlds will be small (relatively) and just copies of each other
there are a lot of small optimizations you can do
to make the minigame generation blazing fast
some of those also become pseudo thread safe
depending on the implementation btw
so there is quite a bit you can do
it says in the setBlockInNativeChunk that the chunk needs to be loaded
yes, you can load through code
or just keep them loaded
since they will be reused
what you can do is also cache the chunks
before the game
then re set
cache the copy obviously and not the actual instance in use
yeah
that is simpler
I will look into this, thanks! π

Why does intellij Evaluator just suck so bad for kotlin... like i hate it so much, its their own language, why cant they just get debugging right
I think part of my issue is that im using the JPMS, but like... comon intellij, figure it out
What's wrong with it
Felt that something was wrong with latest IJ, forgot to reinstall rainbow brackets π
how homosexual
Shun the nonbeliever
So I changed something and it broke all of my AWT UI. https://paste.gg/p/anonymous/af4a261b4b274699b3f348f23ef0a7e8
Can some tell me why it won't fill width/resize when the label text gets longer? I cannot find the cause for it breaking.
It literally just wont evaluate the simplest stuff, like i put in a variable that has been declared and is still in scope yet it throws some wonky backend error
Works ok for me, odd
Am I able to run 2 Instances of the same project at the same time inside IntellIJ?
How do you mean
Like two ij instances?
Or like running multiple instances of tasks for the same project
just run it twice
Pretty sure you can configure the task to allow parallel runs
I am using maven rn, is it also possible with maven?
Never used maven, but I imagine so.
Most here use gradle I think
Oh I found a plugin on IntellIJ that does the job, its called MultiRun
how are people making PLAYTIME LEVELS
Tracking play time and adding ranks at certain mile stones?
with delexue menu
oh, gl
would anyone be able to help me with a texture pack? i followed multiple youtube tutorials for custom model data and it still wont work
I have a website I am trying to access the API of. This website has no documentation, and I dont believe the API is intended for developers, however is just a REST api that the website itself uses. I know someone who previously accessed the API of this website programatically, however no longer has access to their code. Just wondering how I would best go about finding the endpoints, and authentication system.
I have tried going to the network inspect tab and looking at the requests, however cannot find anything that seems to be of any interest, j
and authentication system
is cookie with some type of id (session id) sent on request that needs authentication to proceed successfuly? if yes, you just need to send header "Cookie" w value name=value
String[][] types = new String[4][];
types[2][index] = "test";
I'm working with multidimensional array again and was wondering why this causes a NPE that it cannot store the string because types[2] is null when I've initialized the multidimensional array.
you created an array of type String[] of size 4, how should java know what elements those 4 String[] objects should look like?
Soooo I need create another set of String[] and set types[2] to it and then I can do types[2][index] = "test"; right? I am not quite understanding the last part of that sentence.
basically yes, however there is a shortcut if you want all those arrays to have the same size. In that case, you cam simply write e.g. new String[4][5]
that will create 4 arrays of type String[] with each having a length of 5
Ah yeah sadly they are all different sizes so I will need to initialize them separately
thanks I'll try that!
yeah in such case there's no way for the language to know what sizes you want
Fixed it, thanks π
doesnt look like it
was there a change to statistics on how you read it from 1.18 to 1.19?
they changed the name from minecraft:play_one_minute to minecraft:play_time
about time
not sure when it was changed, my migration command I was just told it don't work on 1.19
didn't think it would be that simple of a fix
im sure theres a method for getting the server's version
its what other people do to get the nms version that they need
any dev that can help me without insulting me?? (happend in other server)
Ask away
i need a plugin that is like lifesteal but when you use an ender eye you get a shard and with 9 of those you make an heart, i tried code myself but im not really that good....
and im asking around if someone can do that for me
when you say use, do you mean throw?
yes
so you throw it and it breaks it drops this shard or just when you throw them in general?
#1025622445576683530 or #1025622446591713280 is probably your best and easiest bet
couldnt people just throw alot of endereyes and farm shards really easily?
i'm trying to make an smp but i dont know what extra to do
:C
and i've been thinking about it
thats the problem with smp's, trying to come up with stuff that wont completely break the experience, but tbh id say the experience gets dull when youve played vanilla for so long
the other idea that i had for the catch of the server was like when you get to 20 hearts you could trade them for like an OP item
"trade 10
I have a CSV file that contains text & numbers, when the number is bigger than 999 the CSV file generates it as "935,52,"1,9242",13" which is obviously causing errors π
The way I parse the CSV file is by splitting it at , so therefore its splitting at the 1
Whats the best workaround for this lmao
cant you save the numbers as 1.9242 instead of 1,9242?
tell them they're a dumbass and they should fix their shit
amen
otherwise, split at , rather than just ,
oh yeah that can work
then fallback to plan a)
unfortunately not an option π
its weird how theres multiple strings in the file
time to manually space the file :)
:what:
might have to resort to a cheeky spot of regex!!!
oh god
Regex("(\\\".*?),(.*?\\\")")
uhm but numbers that use , are in ""
so you could just firstly split by ,
and then split each by "
or smt like that
idk .-.
just an idea
you could split it at , and then check for example index 0 if it has a ", if it does, it continues checking the next index until it finds another ", then you just put that range together into one single number
if that makes sense?
@onyx river
but regex might also work lol
If ur reading this I hope you get patched
Since when is 1.19 so fast?
Probably because of the new chunk system
Hello good day!
I would like to ask a question.
on my server the player will have a menu of /items, the item will be available if the player has certain permission.
In the item he has the permission, I would like to put it in the lore showing that such a player who has the permission owns it. Does anyone have a solution?
uhh check player#hasPermission(String) while creating the lore of the item and add a string if or if not
you need to build the items when inventory gets opened
also make sure to open different inventories for multiple users
otherwise updates might update on other people's gui's too
can i add oraxen plugin to the deluxe menu?
I don't know
hello, i am looking for some help
my original discord has been hacked and I just need some guidance / help
Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.
Looking for opinions here- working on a new modern and minimalist design for my website (so that it can appeal to people outside the Minecraft space better) and I can't decide if I want the social icons to be black or their characteristic colours.
Thoughts?
fyi, that guy isn't me- purely a placeholder
That guy ain't 17
I know babes, don't worry- we can date soonβ’οΈ.
what?
Anyway, do you think the icons would be better in their known colours?
maybe





