#dev-general
1 messages · Page 17 of 1
maybe pee happens in levels idk lol
Well yeah you have to have some constraints otherwise you'd never actually write any logic
Which I guess is actually fairly common in enterprise java
In that case you can have Handler -> LevelHandler -> PeeLevelHandler
yeah tell that to dinnerbone
AbstractMegaPeeFactoryHandlerLevelBuilderSupplier
Handler -> ObjectHandler -> LevelHandler -> PeeLevelHandler -> PDCPeeLevelHandler
Yeah it's also important to not go overboard
what would your hirarchy be for pee stored in pdc and sql
flat
so two impls of something
Well not flat
Pee is stored in the pdc balls
and what would be in the api part and what only intern
Can we use a different name it's really hard to take this seriously
okay i think you got something wrong here, i hope your balls arent filled with pee
it is not uncommon for when you make an API to think like "I want to expose the implementation without exposing the implementation" and so you just end up with a one to one mapping of the actual impl - this is quite common if you make the API after you make the system
UltraPee?
UltraDiharrhea
API = what you can do
internal = how it's done
i have never spelled this word correctly
ye
okay
or i will commit dkim and delete my messages
so what i got from the pee filled commets here
If you want a really good example of proper API design and abstraction look at rust (THIS IS A JOKE)
bro
ObjectStorage<T> has functions set(T value, Player player) ->
PeeStorage implements ObjectStorage<Pee> (still an interface) ->
PDCPeeStorage implements PeeStorage (not exposed in API) overrides set(Pee pee, Player player)
what are you saying 😢
the mega pee handler ☹️
AAAAAA no I can't do it sorry that was a joke and sarcasm and a lie DO NOT
Looks good
PlayerStorage maybe
Yeah I was thinking playerstorage
storage is kind of fishy in my opinion
AttributeStorage perhaps
who thought pee was a good idea, i cant take any of these seriously now even though theyre legit ideas
Well if it's a supertype of PeeStorage maybe it should be FluidStorage
Misleading in the context of Minecraft, attributes are a thing in the game already
Then we can add support for other fluids down the line
Good point
other fluids 😨
stop right there
such as
blood
MongoDatabase fluid
what are the other implementations of BodilyFluid
Sweat
hair
hair implementing bodilyfluid is something you'd see in the support channel here
yes
diarrhea
I bet hair follows fluid dynamics
This is not a support channel (not configuration help)
the whole point of diarrhea is there is no storage
Alright folks this was interesting before, but now it's goodbye
NOOOOO

i thought we were an enough mature server to avoid it

thought wrong
well thenk you guys for enlightening me
you mean this conversation was your fault?
also by the way the kentucky anthem states that people become gay
it still enlightened me
and yes it partially was
especially because the last half was based around pee, how to store pee and other questionable bodily fluids (and how to store those)
My brother in christ you made a plugin called Mega Pee
guys talking about "partially"
why is your brother inside christ?
not yet
also this
i mean, id still respect him but he gotta tell me beforehand
christ was my friend
oh no
i have something sinful on my mind
he has a very close relationship with the lord
very pious
I wouldn't worry too much, you're already going to hell for the pee plugin
awesome
face_with_spiral_eyes
whats the difference between hi and hi
?
i can see it but i cant
``hi`` vs `hi`
nothing
ah
exactly
whats the difference between hi and hi
👏
@prisma wave hi
ik you put a unicode thing there
WHAT do you want
idk I just wanted to ping you
in my balls implements PeeStorage
@half harness
if anybody wants to make MegaPee or any affiliates reality, contact me and ill license you the idea
I'd sooner drive off a bridge
imagine not uploading ur plugin on github, modrinth, polymart, spigot, and bukkit
its going on mediafire with no description
when the inline isnt inline
What does megapee do
if you had told me any sooner i would have got it done right away lol
had quit minecraft 1-2 years ago
I didn't mean to start a war on API conventions oops
For plugins #general-plugins #1007620980627230730
ty
For development #development
For API naming #dev-general
apparently yeah lol
ok how do we feel about Impl at the end if it's just going to be a single implementation
For anything else #off-topic
like StackedEntityImpl implementing the StackedEntity interface which is exposed to the API
because I absolutely refuse to do IStackedEntity for the api version
I use I even tho it looks odd
I think it looks incredibly cursed when all you see in an API is just a ton of I classes
i thought I notation was used for C# mostly
Generally yes C# still uses it which is also cursed
at the place i interned we used that everywhere xD youd hate it
what
now that is the worst
I feel sorry for you
is that a thing
for c# yes it's an actual convention we worked with
I don't think it's in the official microsoft conventions but it's at least a decently common enough one
we should start a fake convention and pass it on to as many people as possilbe
like a global G notation
all variables are static 🙂
public static int Gs_Global_Variable = 17;
no final to make it extra cursed
public static int Gfs_Global_Variable = 17;
f = final
s = static
and G = global
>>> five = 5
>>> print(five)
5
>>> five, print, = print, five
>>> five(print)
5
>>> print(5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>>
So long as it doesn't pollute API space, you could suffix it with Norway for all that matters
are you norsk
IUserAPIInterface
Nope
IUserAPIInterfaceFactoryBeanFactory
<Doubleton>
Tripleton<
ok
it feels good

they do
the convention is kebab case
😠
I feel like C#'s conventions was done by a guy that thought to himself "what if we took all the worse conventions from every language and used it"
chatgpt not opening up for anyone else?
Works for me
chatgpt is disabled in my region sad
ah rip
hahahahahaha.
😭
someone help me. he is so right
Waiting for my professors to catch up with the world and realize 90% of their homework’s can be chatGPT’ed
Shh don't tell em
Or do and cause havoc 
we'll have in-person exams for every class
good
be annoyed
I'm gonna change them to all lowercase because it's started to annoy me more
I absolutely refuse to do this
the artifactId is still rosestacker but the project name will remain RoseStacker because it looks better >:(
Nicole, does rose stacker stop wither skeletons from spawning in nether from skeleton spawners, or zombie villagers from zombie spawners?
@tranquil crane bop
@tranquil crane bop
yes it does and I didn't even know normal spawners would do that
what about zombie villagers?
it only spawns the original entity type out of the spawner and doesn't change it based on the location or randomness
fair
things like sheep colors are randomized but I wasn't aware vanilla spawners would do that
what's rosestacker exactly?
mob, item, spawner, and block stacking plugin. block stacking for skyblock mostly, mob stacking I generally only recommend for spawner mobs to reduce gameplay impact
not the mob stacker!
I know the community generally frowns upon mob stacking plugins which is why I only really recommend using it to stack spawner mobs
well some communities, idk about this one specifically
like they won't spawn any more of the entity when there are X amount of them within Y radius
many servers are highly based on spawners + relocation, so 😬
yes rs takes that into account and has its own settings to expand upon it
okay nice
it's also a full spawner plugin allowing customizing conditions/timings and stuff
the main thing I've seen people use it for are skyblock servers where mob farms are extremely common and servers where the entire economy is based off just grinding mobs
yes
are java 9 modules worth using
in any other real world project 100000%
what does it do?
you can find my few dozens of messages in #developer-chat about it
alr
i don't really feel like going all over it again
Long-story-short: It is nice
getting deja vu here
remove the Impl suffix?
the interfaces are named BlockStackSettings etc
I guess I could just remove the suffix but then the names would be the same
ah I thought it is just BaseStackSettings
o no the basestacksettings implements stacksettings lol
I'm breaking the project out to use interfaces for the new api layer
I couldnt bother more so I went with Impl as well xD
welp alrighty
I have to do it for another 5 classes too
it just feels a little clunky
the I prefix on the other hand is 🤢
The I prefix is far worse
imagine opening an api for the first time and everything is just prefixed with I, disgusting

anyone has any idea why the chunk loading is so slow?
would ask in #minecraft but cant post videos zz
it doesn't look as bad now, but when I teleport to a player I have to wait like 10 seconds for it to load
Pregenerating the world should help
it's pregenerated
I think the issue is the server is very slow at sending the chunk data to the client
i remember that was an issue ages ago when 1.18 (?) had just released
latest?
dang that's slow slow for a 3900x
I have the same cpu and chunks basically load instantly
is the server using a HDD or an SSD
SSD
a spark report would likely give a pretty good idea of why it's so slow
well it's 130 players online, TPS is pretty stable at 20`ish
stable 20 with 130 players is rather impressive
MSPT sometimes is a bit bigger than I'd want but for the most part it's fine
that loading speed is abysmal though, could you run a spark profiler and load a bunch of chunks?
yeah there's like hundreds of mob spawners active too lol
damn
https://spark.lucko.me/83xhCB2q6b
that's 30 second of me trying to load chunks (probably other players too)
I can do a longer one if needed.
yeah, well, we have like ~60 plugins, and It's pretty stable at 20 with 160+ players.
btw update spark on your next restart 👍
12% spent by hoppers moving items around, plugin usage looks mostly good other than NCP being a cpu hog as per usual
yeah, lot's of mob farms
as for the chunks since paper does them async they don't even show up on the spark report 
yeah that's weird that the chunks would be going that slowly if the cpu is that low
the ping is also low so it's not an issue with internet/sending too many packets
and you have aikar's flags so idk what's going on there
that 206mspt is a bit sus
give me a minute to remember how to use that plugin properly
They have a guide on their web
/spark profiler --timeout 30 --only-ticks-over 75
yeah I remember using this one
that still probably won't help show why the chunks are borked
do I even want to know what this is
a plugin
I'm going to pretend I didn't see that percentage
File IO on main thread 🤔
old combat mechanics 😬
that plugin caused the entire spark report to go wack
welp either way doesn't tell anything about the chunks unfortunately
yeah, most of our player-base like the 1.8 combat, without hit delay, can't really do much there, haven't found any other alternatives
lame, but I feel you
poggers
is there a chunk limiter per tick or something that's causing it to slow down massively like that
cpu was still at only 10% so something else has got to be throttling it
I'm trying to look for causes but nothing really comes to mind what could be doing it
is this such a big problem? https://github.com/kernitus/BukkitOldCombatMechanics/blob/master/src/main/java/kernitus/plugin/OldCombatMechanics/module/ModuleAttackCooldown.java#L78 I've never used player#saveData
It seems weird that they're calling that manually since it's run in the PlayerQuitEvent, shouldn't that data just be saving on its own 
it seems redundant to call that
I might just go play around in the test-server and disabling plugins one by one
then again, the environment wont be the same, since it won't have that much players online lol
There is apparently a chunk rate limiter built in somewhere
could you share what you have for those in config/paper-global.yml
those are the settings for 1.19.3 so idk how much is gonna be different from 1.18.2
I don't have config folder in root dir
uh it might just be paper.yml on your version
probably
yeah
I'm guessing since you have so many players on it might be hitting one of the throttle caps
kinda lost on what's and why it's happening
why must java generics allow return values to be subclasses of the interface but it doesn't work with generics 
because that wouldn't be sound
if that works, I could put a StackedEntityNotYourImpl into your map, now what happens if you try to read it as StackedEntityImpl again?
question mark extends stacked entity
Alternatively, just return a Function<? super UUID, ? extends StackedEntity> 
smort
uhm actually it would be a PartialFunction? 🤓

pleading_face_with_3_hearts
Function???
Excel is the most used FP language
True!
According to SPJ
I love spj
it's !not
Oh, i see.. I guess you're right then
when chatgpt makes the plugin and midjourney makes the logo
and my only job is to slap the $400 paywall 😉
u forgot to add the command to plugin .yml
oh
guess im talking to myself
the voices the voices the voices the voices the voices
its thtat the right channel?
core:
description: core command
usage: /core```
anywya i did it
alright
@half harness what is roboref
everything works now after just a few hours in #development: https://srnyx.is-from.space/java_qjjqP9nO7y.mp4
this is so satisfying: https://srnyx.has.rocks/java_5jSEzzUyZW.mp4
satisfying too
i need permission to use this as my pfp
like pls
this pic is priceless
oh its literally the plugin you are showcasing lol
LOL
here's the original steve:
i just googled "steve with hand out" 💀
its from this apparently: https://www.reddit.com/r/copypasta/comments/b8awof
and the background is from googling "forcefield clip art"
which gets u this:
yeah indeed lol
maybe later you can make like a tornado mode?
like you are basically a tornado and blocks revolve around you
that would be cool too
btw how'd u find forcefield plugin? out of curiosity
just got on to spigot then found your plugin in the last update category
ooo nice ok
i mean i have no reason to not click on it
with that pic lol
plugin turns out to be really cool too
:)
u
OMG TIERIST, again
no I meant that as a compliment
mhm
lol i probably joined this server earlier than you
L dkim
it took me a whole minute to realize who you were
because i look at pfp
not username
I need pfp

ill make u one
u have to use it, or else ur hurting my feelings :(
its not, see how its squished on the left
its a tofu head
yeah whatever tofu is
add some white space around it
it doesn't fit
ok
any chance for transparent background
its a little bit distorted but here u go:
it adds character
its like a slime animation
@ruby dew https://www.spigotmc.org/threads/forcefield.583836/#post-4522920
New update coming soon that'll feature:
- Block pushing (maybe don't use this on production... lmao)
- Inverse forcefield, will make the forcefield pull targets instead of pushing them
- Some backend/internal improvements
Maybe coming in the future:- Special forcefield types, such as tornado, which will make targets revolve around you
i havent done tornado yet
that will probs take a day of attempting, a day of crying, and then a day of completing
this is just a comment so that other ppl see it too
my schedule:
day 1: procrastinate
day 2: procrastinate
day 3: get 5% completed
day 4: repeat
my schedule:
o i also havent done inverse yet but thats super ez cause i already accidentally did it while testing before initial release 💀
ok now inverse should be done
@ruby dew 💀
oops
i sent msg before video was done processing
anyways heres a screenshot of what happens in the video while we wait: || https://go-to.srnyx.xyz/java_I4twylrxuY.jpg ||
ok here's the video (too big to embed): https://srnyx.likes.cash/java_5HJllTc9GL.mp4
pc be burnin rn
💀
oh alr im still at school will test when im back home lol
im adding so many security measures to make sure ppl cant get access to blocks by cheating or smth
theres a config list of players who can use blocks, instead of a permission
and an enabled toggle in config too
will probs release tmr since its 12:30 AM for me
still gotta do some final tests
yo same timezone
Same, do you live in Australia?
this is horrible
turns out you can just do this and it works for some reason 
I have no clue how the type inference works anymore
so im a little confused event.getClickedInventory().getTitle() isnt working for me anymore how do you get the title of an inventory?
Because unmodifiableMap takes a Map<? extends K, ? extends V> and returns a Map<K, V>. This is safe as the Map can’t be modified anyways
as said here, in your previous example, you could add two different implementations.
since it's unmodifiable, you're putting only one type of implementation, and you won't be able to add a different one
It was moved to InventoryView iirc, but dont use titles to identify inventories
regarding yesterdays issue,
seems to be some sort of cap or limiter with high number of players, as @tranquil crane said (sorry for pingeroo)
the loading was fine with 70-80, but slowed down significantly with 100+ (not exact numbers)
I'm making an app like AirBnb. When the logged in user opts to check one's rating should I create a User object at that moment or what?
huh?
It's java so it's weird
Like when the user clicks on a profile which is a username
Should I create a User object at that moment so I can fetch all the info?
or should I just grab piece by piece from the file and not bother making an ojbect
what is "the file"?
seems more like it would be doing a database / backend query if anything
to get the user info
There are going to be files, like yml (It's a uni project so we're not using any dbs)
Everything is going to be a rep on github so I can't access servers for databases
It's going to be just a sample with like 10 users
Oh yeah, a database by means
your ui code shouldnt have any idea where the data is coming from
So I have this log in format where a user logs in and there's a method getActiveUser() that's why I don't bother makign more User objects
it should just be able to call some method to get a User from a username and then use the data stored in the user object
Hmm, okay, what about Buildings? I have made a BuildingManager class where it stores all the accomodations
So its basically a List of accomodations
yeah again, UI code should have absolutely zero knowledge of the underlying database (or lack of). it should just be able to lookup an object from the controller layer and render / modify its data
Yeah, I'm working on the API for now, trying to make sure that the UI won't have to implement any logic
yeah i can't really be more specific without more knowledge of the stack you're using but you may wanna look into the MVC architecture for a good way of structuring your backend
But, is it fine if I store all the Buildings in a List or should I go on the same path as the Users
As I mentioned, I have a BuildingManager class that instantiates all the Buildings once the program is running
oh so internally
Yes, but is that a bad idea or should I just instantiate a building object whenever needed?
I'm a little confused by your use of the word "instantiate" - if you're loading things from a database, typically you want a single object per database entity (or as few as possible) whereas you seem to want to create new ones every time
if they're mutable objects then you definitely want as few instances as possible
So, It's a Building class where I just create an object for every different Building stored in the database
Well yes
but that's different to "instantiat[ing] whenever needed"
i see what you mean though
instantiating I meant fetch the info then create the object
yeah
anyway you likely want some form of caching, on a larger scale it's probably not a good idea to load all the buildings at once (as there could be billions), so a Map is probably the best underlying structure as it'll let you query by ID faster. if you don't need that, a List is fine but a Set would be slightly better for the uniqueness guarantees imo
A Map? How could i implement the map
do your Buildings not have an ID / primary key?
Map<Id, Building>
But still, making so many objects is practical?
sure
the only thing you may wanna consider is lazily loading them rather than doing them all on startup
but that might not be practical depending on ur architecture
If I make them seriliazible objects do I need to convert them into an object before being able to fetch any info?
?
I'll serialize the objects so I make them into a file all at once then in order to get it back I need to call it
FileInputStream fi = new FileInputStream(new File("myObjects.txt"));
ObjectInputStream oi = new ObjectInputStream(fi);
// Read objects
Person pr1 = (Person) oi.readObject();
Person pr2 = (Person) oi.readObject();
show 😮
Which library should I use for json?
iirc gson is built into minecraft
I'm not coding a minecraft plugin rn
But I'm going with gson
Also, I have a question. What happens when I save an object in json file that has other objects in it?
Like I have a file for Building which I'll convert to json
But building has an object inside it BuildingAttributes which has some Strings and Lists of Stirngs
Will it "deserialize" the object on its own?
gson will yes
Is there a way to give the files the name I like?
yes?
How!
the important thing to realise is that converting to/from json is an entirely separate process to reading/writing to a file
so you're responsible for the file handling
Can't I write with gson?
which is why that's an odd question to ask
But
When i create the file with json
gson.toJson(user, new FileWriter("/data/users"));```
you can, in that there are methods that use a FileWriter but you're still responsible for actually making a file name
it doesnt just magically come up with a name
yes
Thanks Brister!
easiest way would be try-with-resources
dont create it inline
create it in a twr and it'll get closed automatically
Doesn't it close automatically the way I did it?
no
That's how it has it on the blog I'm reading
Also, another question. I want to have different types of Buildings. Should I make them enums or subclasses?
For the users I have made two subclasses one for Guests another one for Providers
subclasses is certainly a more OOP way
It's just weird because, how do I fetch, how do I instantiate object?
?
Like I know it's a building object but I don't know what subclass object im creating when im fetching it from json
then the blog forgot / doesn't realise - if you look at the source code gson doesn't close it automatically (bc that would be bad design)
I can't know whether it's a Bangalow or a Mansion
well hang on
if the 2 types are identical apart from a "tag" then you may as well use an enum
there's no real benefit to having subtypes there
Hmm then what about the case of User
In the Provider class there are extra stuff like a list of buildings the provider owns
really that seems like bad design
a user could be a guest and a provider
they're not mutually exclusive
In the project our professor mentions that the User is either guest or a provider. If he opts to be a provider he needs to have access to extra possibilities like Add Accomodation or Remove Accommodation
ah okay
well in this case you can use RuntimeTypeAdapterFactory which will let you add "tags" for each of the subtypes
eg ```java
RuntimeTypeAdapterFactory<Animal> runtimeTypeAdapterFactory = RuntimeTypeAdapterFactory
.of(Animal.class, "type")
.registerSubtype(Horse.class, "horse")
.registerSubtype(Cow.class, "cow");
Gson gson = new GsonBuilder()
.registerTypeAdapterFactory(runtimeTypeAdapterFactory)
.create();
Where does that code go?
To the file manager?
Is it like an extra field that I'm saving?
Yes
I'm really confused with this adapter thing
Wherever you're doing the serialisation
It just adds an extra field to mark which subtype it is
So what code do I need to implement in my subclasses then?
Oh no code?
It saves the subclass automatically in the json file
and when I fetch do i need to have 2 different methods for the User Type?
hmm that wouldnt make sense
?
Yes
When I fetch the file
what on earth does this mean
When I do the deserialization to get the object
how do I know which subclass to cast it with
I do User user = ... and it just returns a Guest?
yes
Btw how do I make sure that an actual User object never instantiates?
make it an abstract class
Abstract classes can have instances tho
No they can't
Oh
Why do I remember my professor saying "making them abstract classes gives you the option to instantiate but interfaces dont"
They probably meant that you can define constructors for an abstract class
oh yeah youre right
There are also anonymous subclasses but those are possible with interfaces too
Like creating a class in the class?
no like java new Blah() { @Override blah }
Huh? What's the difference with
class Subuser{}
}```
Anonymous subclasses, as the name suggests, don't have names
So they only exist once
those are inner classes here
No they're not
oh
what are anonymous classes used for
i use them to create small runnables
Yeah lambdas are just syntax sugar for anonymous subclasses of the functional interfaces
yes
what do you mean by this it confused me, is "subuser" not a nested non-static class? sorry dont mean to having you answering two lines of questions at once xD
oh wait yeah I misread it lmao
My bad
no worry
list.forEach(t -> t.blah())
``` is the same as ```java
list.forEach(new Consumer<>() {
@Override public void accept(T t) {
t.blah();
}
});
What's annoying about my java course is that our professor show us how to code in java and the general way around it but won't show us details like lambdas and stuff, or teach us ways to organize a project but straight up ask a whole AirBnb app from us
I don't remember what Consumer does tbh
Classic
i swear
It's just an interface with the consume method, i.e. something that does something with a T and doesn't produce a result, (it "consumes" the T)
we have no education on devops or design patterns (at my school)
this is why it took me the whole day to get worldguard dependency xD
so T is naturally the object inside the list i'm using foreach?
T is a generic type representing whatever the list elements are
Yes that's what I meant
Great
So, I create a RTAFactory, I create a Gson the gson builder then I save the User user type and it automatically detects its a subclass and saves the type?
Yes
small question for IJ IDE experts here
I have two projects, as shown in the image.
One is the root project (M0-Pagrindai) and the other one, module M0-PagrindaiDC.
In the root settings.gradle there's a line
include 'M0-PagrindaiDC', what that does is includes the compile output into the root project. I don't want that, but I still want to be able to build the both projects independently. If I remove the include .. part, then everything breaks
btw shouldn't have anything to do with IJ
it does not include the compile output - that only happens if you shade in the module afaik
using implementation
typically you don't have an src in the base module if you have submodules too
well, maybe there are some IDE tricks that I don't know that does the magic, wasnt sure, but anyways
I am, in fact, using shadowjar, but it's compileOnly, not implementation
yeah, well, I wasn't sure how to properly do it and so it happened I made a submodule
hmm
odd
by default I don't think it should be shading it in
Hard to tell without seeing the gradle files
yeah well I'm currently ripping my project inside-out, gonna re-do everthing, lol
@quiet depot sorry for ping-pong
Could you, by chance, extend this guide to feature connection to a remote server?
https://wiki.helpch.at/piggys-barn/java/how-to-run-your-minecraft-server-s-in-intellij
I tried connecting to a server that's running in an oracle vps instance, but had no luck.
eeeeee
eeeeeeeeeeeeeeeeeeeeeeeeeeeee
i lied
eeeeeeeeeee ee e eeeeee ee ee https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/invoke/LambdaMetafactory.html
let's say lambdas are a stronger form of anonymous classes
I have read somewhere that LambaMetaFactory does some optimizations to make it faster than anonymous classes
apart from performance
syntactic cocaine
Ik its performance but im pretty sure the main optimization is that it avoids class loading
Its not cuz it produces different bytecode
thats the cocaine part
Lmao
not exactly
it uses ASM to generate a new class so a class is being loaded anyway
🤓 but that's implementation detail and may not always be like that
not like loading a single class is going to make a huge difference in performance anyway
idk about other jvms but hotspot at least is able to do "singleton lambdas"; in both cases (anonymous classes and lambdas) you end up creating a new instance every time they're used, but on hotspot, if the lambda takes no captures the jvm will basically cache the instance as a singleton and reuse it
e.g. s -> System.out.println(s) can be optimised in that way, System.out::println cannot (var out = System.out; Consumer<String> c = s -> out.println(s);, out is a capture variable) (also in this latter case, an Objects.requiresNonNull(out) check is performed at every call as well)
Question: Metod reference is just a thing for the user? Like, at compile time it will be the same as x -> methodThatTakes(x) or are they evaluated differently?
it depends
Type::method would be the same as t -> t.method() / t -> Type.method(t)
variableOrFieldOrThis::method isn't (see above)
The first case, t.method() / Type.method()
honestly don’t know how, I’ve never tried
Happy new year!
A pre-existing mc server? Is the debug port open?
yeah.
well, as far as I could figure it out, it was open.
I don't remember exactly, but I think I tried to ping the port, it was fine, but I couldn't attach the debugger
well, I added TCP/UDP,
then I added all, still no luck
This is as far as I get
Sounds like it doesn’t get a response
Is the port on the OS firewall open? iptables or what has you
well, I added the port via ufw, still no luck. probably still missing something
also, wut
yeah I also added the ports in their subnet configuration
u need to use iptables as well as the web firewall
iirc
Running Uncomplicated Firewall (UFW) on Ubuntu images might cause issues with these rules. Because of this, we recommend that you do not enable UFW on your instances.
well, I disabled the ufw, and I removed the iptables via
sudo cp /etc/iptables/rules.v4 /etc/iptables/rules.v4.bak && sudo truncate -s 0 /etc/iptables/rules.v4
well you need to use iptables to allow the port lol
does telnet <ip> 5005 do anything?
yo
hello
am I dumb or what
it's --dport not -dport
alr
bruv
sudo iptables -I INPUT -p tcp -m tcp --dport 5005 -j ACCEPT did the job
splendid
pingpong
what image service
imgur?
etc.
if it keeps crashing the logs would probably tell you more than us seeing a screenshot
well it clearly says it's an issue with drivers
usually you fix by downloading correct and working drivers
or it's an issue with your graphics card and you might not be able to solve it. (not a certified technician here, might not be the case)
wat
isn't ufw literally just a wrapper around iptables?
in any case it works fine for me lol
yeah idfk
but
¯_(ツ)_/¯
ufw didnt work for me
back when my account wasnt banned
😒
hello
Ha
Did you use oracle linux
no
how do i fix EzRankupPro rankup per group? to make not reset by Luckperms group?
But the firewall on wrbsite
Mb
Solution to the whole problem of finding the right name for implementations of interfaces, just ask ChatGPT 
someone somehow make this an intellij plugin xD
?
yeah it's called github copilot
how do you ask copilot questions?
with comments or
yes
damn
yeah ive used that feature
copilot should say :nokotlin: when you try that
it wasn't a joke
When im using the Flame particle it creates like a explosion instead of just staying in place (trying to make a flame circle around a player). is there a way to fix this?
set the speed of the particle to zero. oops, someone already answered in a diff chat
right it should help you how to rewrite it into crab language
no it shouldnt
more like crap language
yes!
Stupid question that will become even more stupid after you read it. Any way to "force use" mongodb in a public plugin (or plugin that I am not able to change) that uses mysql? In some way "translate" it to mongodb?
PS: this is mainly out of curiosity, I know making it myself directly is simply better at the end lol.
no
not at all
User user = new Gson().fromJson(re, User.class);
re.close();```
is closing the bufferedreader enough or do i need to close the filereader as well?
okay thanks :3
Also, pros and cons on making a full custom coded server vs using public plugins?
its enough but use try-with-resources ```java
try (BufferedReader re = new BufferedReader(new FileReader("/data/users/" + username + ".json"))) {
User user = new Gson().fromJson(re, User.class);
}
Ive put the exception on the method
nono this isn't a try-catch
this is different
a try-with-resources automatically closes whatever you put in the () for you
you can also put multiple stuff by separating it with a ;
Oh okay
public abstract Collection<? extends AnimationTemplate<?, ?>> getAnimationTemplates();
for (AnimationTemplate<?, ?> data : multiAnimationTemplate.getAnimationTemplates())
Required type: Object
Provided: AnimationTemplate<?, ?>
What?
I feel stupid but why does this not work
I'm so confused
This is the AnimationTemplate class
public abstract class AnimationTemplate<T extends Animation, B extends AnimationBuilder<T, B>>
Any particular reason for using ? extends?
Just to see if it fixed it
I tried without it too
This is how I'm calling it
if (template instanceof final MultiAnimationTemplate multiAnimationTemplate) {
for (AnimationTemplate<?, ?> child : multiAnimationTemplate.getAnimationTemplates()) {
this.save(child);
}
return;
}
This doesn't work either
public abstract Collection<AnimationTemplate<?, ?>> getAnimationTemplates();
I just tried changing it to public abstract Collection<String> getAnimationTemplates(); and that doesn't work either
This is the whole class:
public abstract class MultiAnimationTemplate<T extends Animation, B extends AnimationBuilder<T, B>> extends AnimationTemplate<T, B> {
public MultiAnimationTemplate(BlockAnimator plugin, String typeId, boolean loop, boolean reverse, int tickDelay, List<PlayerFunction> playerFunctions, ListMultimap<Integer, AnimationEffect> tickAnimationEffects) {
super(plugin, typeId, loop, reverse, tickDelay, playerFunctions, tickAnimationEffects);
}
public MultiAnimationTemplate(BlockAnimator plugin, String typeId, boolean loop, boolean reverse, int tickDelay, List<PlayerFunction> playerFunctions) {
super(plugin, typeId, loop, reverse, tickDelay, playerFunctions);
}
public MultiAnimationTemplate(BlockAnimator plugin, String typeId, boolean loop, boolean reverse, int tickDelay) {
super(plugin, typeId, loop, reverse, tickDelay);
}
public abstract Collection<AnimationTemplate<?, ?>> getAnimationTemplates();
}
It works if I use an implementation of the class like this:
if (template instanceof final ChainedAnimation.Template multiAnimationTemplate)
idk why the abstract class wouldn't work
https://upload.skyslycer.de/Discord_AeGgvBUqR3.png what am i missing
yes
It doesn't work with that either
Like it still treats it as just an Object
I edited this
Please help me I am so confused
If I say Haskell is amazing will you fix it?
Wait I figured it out
I had to do MultiAnimationTemplate -> MultiAnimationTemplate<?, ?>
Idk why that would cause the issue, and also idk why IntelliJ didn't give a warning for not having the generics
If someone could explain why that would happen I would appreciate it too, because I don't understand why that would happen even if I didn't add the generics, because the generics weren't used in the return type of the method
you defo work at oracle
jesus fucking christ Fish what is that constructor
Does it make you feel better that the only time the constructor is actually used is in a Builder?
Also I can’t tell if this one is making fun of me or not
I probably should separate out the constructor at some point though
Realistically though separating it out would probably just end up being more of a pain then it’s worth, and I would have to figure out the best way to separate the parameters because they’re all pretty much related
Yes
Not you specifically 😃
lol
for (String l : meta.getLore()) {
if (l.contains(ChatColor.GRAY + "Raw Blocks Mined: ")) {
String numericString = l.replaceAll("[^0-9]", "");
int mined = Integer.parseInt(numericString);
newLore.add(ChatColor.GRAY + "Raw Blocks Mined: " + ChatColor.YELLOW + (mined + 1));
}
else {
newLore.add(l);
}
}
so i have this that executes every time someone mines a block but instead of just counting up by 1 every single time it adds a 7 in the front... does anyone have a clue why?
try ChatColor.stripColors(l).replaceAll(...) - if you're using gray as the color then it'll use the 7 from §7
(also #development)
!notdiscord
!discord
Well those eidnt work
This is not for discord help
Its for minecraft
hey can someone remind me of the name of the server software for Minecraft that is very barebone doesn't even have player data file storage. It was a server software in java but it was just the bare bone of a server, AI wasn't implemented yet and needed to be coded, its was meant to be a good template for anyone creating a minigame that doesn't need all the features that the base Minecraft server has.
Found it! ||https://minestom.net/||
is it possible to view and interact with a linux screen with the same user account?
issue is, the server owner usually connects to the console to monitor the server
then I can't connect myself
or the only solution is to use tmux?
the server is stuck at [14:17:17] [Server thread/INFO]: Preparing level "crmapin"
[14:17:18] [Server thread/INFO]: Reloading ResourceManager: Default, bukkit
how can I change global placeholder?
I have %event_active%
and I want to change it from one server, so it affects all servers under BungeeCord
If i convert an object to json file that already exists, will it replace the previous one?
probably
depends on how you're doing it
I'm just doing a toJson thing
that doesn't tell how writing to disk is done
💀
Well then youre overwritint obviously
yeah, file.write is what's writing to the file, not related to json at all
Maybe look at the documentation xD?
What I want to do is simply just overwrite. I don't think editing it would be efficient
documentation will tell you
extremely stupid question but its been a while since I have touched java and I forgor, how do you trim a double to only use 2 decimals?
I'm doing some physics simulations and the doubles are fucking huge
also dont ask why java
wouldn't you need the accuracy if you're doing physics simulation? why get rid of it?
but for the part when I'm showing to the user
its like an engine
for a project I'm doing
and I dont want to show the person who uses it absolutely huge numbers
use string formatting
emm where i can make suggestion?
anyway if someone developer read this: can you make when we can make more folder on deluxemenu?
bc im working on one big project where we use deluxemenu and we have over 100+ yml file, who is the same gui_menu and we starting testing if we can make multiple folder where we can working but deluxemenu only allow use 2folder main 😦
uhh afaik you can have more then one folder
like just specific the path
so like uhh menufolder/thismenu.yml or smth like that
it could be a backslash
i cant remember
you mean make inside gui_menus folder other folder?
yeah
but how to make to working that is inside that folder?
some like
ty
Hello, I am creating a server in 1.18.2 and I created my little shop with the currency of Vault and Essentials. I would like to put another currency system that people can buy on the store and create a small cosmetic shop on DeluxeMenu, however I would like to know another currency plugin that is compatible with DeluxeMenu ^^
@wind patio did you figure it out that quick
im not sure, maybe
changed the order of include, rebuilding now
cuz my sub B depends on A, but I include B first
There is no time to wait! Ask your question @pale timber!
cool
that's a big commitment
what if I don't know the answer
I don't trust you
I've never met you
I don't know you
is that link meant to crash your discord
I can only assume since they left after posting.
I banned them but think they left first
There is no time to wait! Ask your question @pale timber!
i need help
There is no time to wait! Ask your question @solemn laurel!
sad
resource pack
and im pretty sure that thats not the bubble ui
just custom font which has the letters much lower than normal
if you put the letters into the action bar, they appear there
That is really clever actually
So you recon there is no action bar messages
i know it's a resource pack, just couldnt figure out how this worked
You can still do action bar messages and have the actionbar be the UI at the same time
Wha
How even
