#dev-general
1 messages · Page 607 of 1
I can kick you out from mine, np
Mits will never be as fake as Emily
Okay can you tell me what's with the sass?
I’m talking about the other Emily excuse you
Sure right
Absolutely
She’s just scared to talk around the other Emily
Just following protocol
Mhm
Hello, not sure if this is the right place, but I'm looking for some help on setting up my own minecraft server. I have the server up and running, but I can't find any resources on how to properly manage the server past that. I am a software developer, and want to build similar deployment pipelines to what I am used to, but can't find anything explaining the process. Thanks and sorry if this is the wrong place, just trying to get my bearings still.
@frail glade You'll be happy! Multicatch and union types won the Kotlin survey!
Poor Bardy
Im so glad we finally have Multicatch
nice
Yeah
no collection literals 
Collection literals (KT-43871) have not made it into our current public roadmap but we’ve actually started some early prototyping to see what design approaches will play out well.
Multiple receivers (KT-10468) are really close to becoming available for preview. Soon, you’ll be able to play with them using a pre-release compiler switch. Stay tuned!
Multicatch and Union types (KT-13108) are the most popular potential addition to the language, but this is also the most complex one to integrate into the language. Its implementation will require the combined work of many experts on the core compiler team, so don’t expect us to make a lot of progress while the team is busy getting the K2 compiler frontend to production. But once that has been released, we’ll start actively working on union types.
Having “public” and ”private” property types (KT-14663) turned out to be relatively easy to implement in the architecture of the new K2 compiler frontend and will be available for preview with the new compiler.
what's 2nd?
Here they explain it better than I would https://blog.jetbrains.com/kotlin/2021/06/kotlin-features-survey-edition-2/#multiple-receivers
I thought the public and private property would be pretty easy, I mean it's just altering the generated getter
ah, nice
imagine using a language that supports proper union types which kotlin is inspired from
couldn't be scala 😌
"proper"
That implies Kotlin's not yet implemented implementation won't proper lol
that's the point, it's not even implemented
they took "so much" inspiration from scala but left the best things out
Scala had about 10 years more to implement those features lol
Sure it doesn't have it yet but that's the point of it being updated frequently
which is why scala is better 
OMG
which blocks can hold persistent data?
Any tile entities (blocks that have their BlockState implement TileState)
Union types might be enough to switch me over
to kotlin from java
Scala
TRUE
Holy shit. x1.75 speed on youtube is OP. I always was so confused when I heard people say they do watch stuff on higher speeds but now I understand them
Ayyyy @quiet depot just copped the fingerprint version of that key we discussed ages ago. Have you considered buying one yet?
Annoying phone format
I feel like the only thing I really talked about during that convo was how I didn’t see the point
LMAO
You saw the perk after
so no I haven’t considered getting one lol
Security >
yeah I’m not worried about my passwords getting cracked or anything
also this. lol. already shared my password online. like the master password for my password manager :)))
Oh see I’m anal with security I don’t chance being hacked
Everything is under 2fa
Mc, twitter, domains, etc
||anal is good||
ight bet
God do I fucking hate python
Forced to use it cause the robots movement software only supports that
I can agree there
LOOL I remember having to use it in secondary school, was so annoying]]
Hey! Is there Bukkit (or Java) function that modifies string to match Minecraft username requirements?
Replaces spaces, removes additional characters, matches length etc?
I know I could create easily my own, but why bother if there is built-in one.
Just simple regex
Aight, thought so
@marble plaza https://regex101.com/library/jM0zH5
Thanks! Though I thought 3 is min length?
Yeah the mc limit I believe is 3 now, Regex is prob old but as Frosty said, you can get 1 char but so rare these days
It's good to see there are others that appreciate nice things 😌
I did the AoC challenges with scala and it was epic!
my old idea for how to handle modification to the item drops wouldve been this
v- ToolsModifier
BLOCKBREAK -^
|
v
give items
when actually what i shouldve been doing is this
EnchantModifier -> give items
ToolsModifier -^
BLOCKBREAK -^
yess
ive only just realized that the old system was a really bad implementation even if it was possible to make it
👑
understanding is good, implementing it is better
sorry again for my non existing patience the time i tried to explain you how passing works :D
my confusion was based on my not knowing how certain things actually worked. it wasnt your fault
@EventHandler
public void blockBreak(BlockBreakEvent e) {
if (e.isCancelled()) {return;}
if (e.getPlayer().getInventory().getItemInMainHand().getType() != Material.AIR) {
new ToolModifier().toolModifier(e);
}
}
my listener is so empty
public void toolModifier(BlockBreakEvent e) {
Player p = e.getPlayer();
Block block = e.getBlock();
ItemStack tool = p.getInventory().getItemInMainHand();
int expDrop = enchantDrops.calculateXP(e.getExpToDrop(), tool);
Collection<ItemStack> drops = enchantDrops.calculateBreakDrops(block, tool, ItemDrops.calculateDrops(tool,block));
e.setDropItems(false);
e.setExpToDrop(0);
new EnchantModifier().enchantModifier(p,p.getItemInUse(),expDrop, (List<ItemStack>) drops,block,enchantMethods);
}
public void enchantModifier(Player p, ItemStack tool, int xp, List<ItemStack> drops, Block block, EnchantMethods em) {
Set<String> enchantments = em.getItemCustomEnchants(tool);
if (enchantments.contains("telekinesis")) {
for (ItemStack item : drops) {
em.safeBreakBlockEventAddItem(p,item,block);
}
p.giveExp(xp);
} else {
for (ItemStack items : drops) {
block.getWorld().dropItemNaturally(block.getLocation(), items);
}
block.getWorld().spawn(block.getLocation(), ExperienceOrb.class).setExperience(xp);
}
}
its still in early stages but damn this is so much better
i will change the method names at some point aswell
aand refactor stuff that are in the wrong places
such as enchantmethods, the majority of the methods should be seperated
Looking for suggestions to build a portfolio - as in plugin suggestions, any recommendations?
make a minigame plugin
World generation
is it worth adding MySQL support to a public plugin? 🤔
like, statistically, not many rlly use it.
And I suppose it depends on the case and plugin
Hmm I don’t think you should care too much about what the plugin does more than that you can substantially enjoy working on it, more importantly make sure to add well working features, for instance an api, a database configuration and what not. (:
Whats the plugin and use?
just a general homes plugin (with some extra fancy stuff but ye)
I think it could be ideal, if its requested by others and isn't hard to implement, why not
the thing is, rn I was thinking on using gson and hashmaps
aka loading the gson into a hashmap onenable
and hashmap into json file ondisable
using gson*
unsure if it would be easy to migrate to MySQL if I ever updated it in the future
java.lang.StackOverflowError: null when you make a hashmap loop
what does "make a hashmap loop" mean lol
like, the stack overflow gives me recursion vibes, but in a hashmap?
😂
my wording was not great
huh lol
what?
were you creating new instances of classes in each others' constructor
that's a classic stack overflow
ah, nice nice
at me.lunaiskey.ferncore.customitems.FernToolItemStack.<init>(FernToolItemStack.java:15) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.axes.PlankAxe.<init>(PlankAxe.java:16) ~[customenchantments-0.1-SNAPSHOT.jar:?]
-> at me.lunaiskey.ferncore.customitems.RegisterCustomItems.registerItems(RegisterCustomItems.java:22) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.RegisterCustomItems.<init>(RegisterCustomItems.java:18) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.groups.Netherrite.registerItems(Netherrite.java:24) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.groups.Netherrite.<init>(Netherrite.java:14) ~[customenchantments-0.1-SNAPSHOT.jar:?]
at me.lunaiskey.ferncore.customitems.RegisterCustomItems.registerItems(RegisterCustomItems.java:25) ~[customenchantments-0.1-SNAPSHOT.jar:?]
looping forever
i fixed the issue
How about a skyblock core plugin? That basically includes everything you need to set up a skyblock server, with minimal dependencies
Sure just make sure it’s not too big if you’re doing it solo, such that you perhaps burn out yourself.
i just made a very simple system for checking if a block is naturally placed or not
Does it work with blocks before the plugin is added to the server?
it doesnt, not the point of the system.
by hand?
its just a hashmap of <location,boolean>
ill probably shrink it to a hashset<location> and change the updateBlock() to remove if its false
the system updates the set if BlockBreakEvent,BlockPlaceEvent,BlockFromToEvent,BlockPistonExtendEvent and BlockPistonRetractEvent
it doesnt save to file yet
tho imma use sqlite to store the data
its built into my core so that i can keep track of certain things that arent just related to if a block was placed naturally or not
also the map for storing the data is static for now as a test to see if it would work
ill change it to not static cus its probably static abuse if i left it as is
@agile galleon is it static abuse?
im guessing yes but wanted your opinion
Yes
It is
Keep in mind that everything you add and remove stuff from, that is static, is technically static abuse
so nuke the static. will do.
i dont even really need to create the set, could just read and write the sqlite data directly since its a very small load
You should cache the blocks as chunks are loaded, that way you aren't loading data from a file every time you need to check if a block is placed naturally or not
And it would make more sense to do this, there isn't much of a point of using a map of <Object, Boolean> in my opinion when you can just do Set#contains
Yeah
if I have a code fragment
int a = n;
while(a > 0) {
a /= 2;
}
Big O would be log(n) right?
for that one it would be square root i think
im not sure how int casting works but i dont believe that a could ever be smaller then 0
if a is odd
not to do with even/odd
if a is negative, the entire thing will be skipped
if it isn't, it'll run forever, lol
Honestly, I’d just say.. don’t be negative
Ha.. ha..
you cant divide a positive by a positive and result a negative
which is what that statement would require to ever be false
yeah exactly
!false
It’s funny because it’s true
i seem to have forgotten how to keep this hashmap from resetting itself
hmm
are you setting the hashmap equal to a new hashmap more than once
that would do it
i am
sorta
idk
i wanna do it just once
actually i have a great idea
ill make the new hashmap on enable since that only gets run the once
is your hashmap stored in one of your other classes
or do you have it straight up in your JavaPlugin class
if i may be so bold as to recommend something
while you can put the map in your onenable and it would definitely probably work
it might be nicer if you instead made your new container class (assuming you have one) in your onenable
and then made the hashmap inside that
basically i'm saying dont give up on making it better the moment it works
idk what your code looks like so i cant really suggest anything beyond this
I have a class called Recorder, it needs Set, i want to call that class whenever i need it in whatever class through new, i dont want a new hashset i want the original hashset
so imma give it a new hashset in onenable
so i will hope for best
i want to call that class whenever i need it in whatever class through new
are you making a "new" Recorder each time you want to use it?
that is why your set is empty
i already know
okay
passing through a hashset is not my specialty
i usually just make every set and map static
which is apparently not a good practice
correct
regular instance variables will do just fine
like what hashset is inside your Recorder (i hope)
currently there is no hashset, just a uninitalized one
like how you have your
public class Recorder {
private Set mySet; // <-
public Recorder() {
mySet = new HashSet();
}
}
here mySet is an instance variable of Recorder, which means every Recorder will have it's own individual set
you can take this same idea and use it for Recorder
by making a Recorder instance variable inside your JavaPlugin
that way you won't need to make a new Recorder() each time but instead use the same one
well if you have it be an instance variable then it will never overwrite itself because you will only make it one time
you will make your Recorder object in your onenable just one time, and afterwards never remake it again
private final Set<Location> breakSet;
public Recorder() {
breakSet = new HashSet<>();
}
private Set<Location> getSet() {
return breakSet;
}
looks good
i will be using it in another class tho
yes
so you'll store a Recorder object as an instance variable in your main class
just like you store your set in the recorder class
and then you can use your one recorder object however you want, and it won't reset because you never redeclare it
Ouu instance stuff going on
i have confused myself again
i got it working for my registercustomitems and have confused myself
Now, lets say you have a vet class
That takes your dog as a parameter
Im sure you wouldnt want the vet to just check a new dog
You want them to check your dog
So you have to give it to them
Imagine:
var dog = new Dog();
var vet = new Vet(dog);
And you can lets say, do a kindergarten for dogs, or what its called in english lol
daycare 😎 🐕 🐕 🐕
now add there:
var amusementPark = new AmuesementParkForDogs(dog);
And agaib
You use your, the exact same dog
On everything
Not every time a different one
Your dog instance
Now we can translate this to the hashset
We have our hashset
And now we want to give this exact set to another class
Somewhat understandable?
maybe what we need to do is cover OOP concepts
specifically what a Class is, vs what an instance of a class is
i get the concept of oop
its just the implementing myself which i get a little confused with
ive already done this once
okay
well for implementing it, a good rule of thumb for now may be that you should only create a 'new' object for as many objects as you expect to have
that's actually pretty misleading in a lot of cases depending on how you look at it but it might work here specifically
you only want one hashset, so you should only create a new hashset once
and you only want one Recorder, so you should only create a new recorder once
You want one dog 
onEnable() calls RegisterCustomItems, RegisterCustomitems() calls Init() which calls CustomItem() which uses itemmap in its constructor.
round robin
RegisterCustomItems has itemMap = new Hashmap
I want to store a set in recorder, which has location data in it
and then beable to call recorder in another class such as my blockevent class
but i dont want to reset that set
what does Recorder represent for you
Methods and variable names please
lowerCamelCase
i call recorder in the other class because its being used elsewhere
lowerCamelCase for class names?
lowerCamelCase for method names
methods are what have parentheses after them so it's a fair assumption that what you mentioned were methods
other then init() the rest are class names
gotcha so they're constructors
yes thats what i ment
in the end up itemMap is stored inside FernItemStack because CustomItem extends FernToolItemStack which extends FernItemStack
i see
itemMap inside FernItemStack is never modified directly
FernItemStack never modifies itemMap you mean
yes
okay
what you want is what i think skyslycer has mentioned before
which is passing objects around as method / constructor parameters
and storing them as instance variables
which is what FernItemStack is the endpoint of
yes
well FermItemStack stores the itemMap yes
but you will want to pass around other objects too
like your recorder, since you want to use it in other classes
hopefully that makes sense, i still don't know if i'm imagining what you want the same way you are
im guess without making atleast 2 classes i cant store the map
in each class that i needed to get the itemMap i would do new RegisterCustomItems
no
your RegisterCustomItems is what stores your itemMap
so making a new one would mean it doesn't have the itemMap you want
im just overwriting the map with the same values as before
wdym
private void init() {
new CustomItem("PLANK_AXE",null, Material.IRON_AXE, Rarity.UNCOMMON,false, itemMap);
new CustomItem("APPLE_AXE",null,Material.IRON_AXE, Rarity.UNCOMMON,false,itemMap);
new CustomItem("THE_DOUBLER",new ArrayList<>(List.of("&7Doubles the drops from","&7every block mined.")),Material.DIAMOND_PICKAXE, Rarity.RARE,false,itemMap);
new CustomItem("NETHERITE_HELMET", null,Material.NETHERITE_HELMET, Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_CHESTPLATE", null,Material.NETHERITE_CHESTPLATE,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_LEGGINGS", null,Material.NETHERITE_LEGGINGS,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_BOOTS", null,Material.NETHERITE_BOOTS,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_SWORD", null,Material.NETHERITE_SWORD,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_PICKAXE", null,Material.NETHERITE_PICKAXE,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_AXE", null,Material.NETHERITE_AXE,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_SHOVEL", null,Material.NETHERITE_SHOVEL,Rarity.UNCOMMON, false, itemMap);
new CustomItem("NETHERITE_HOE", null,Material.NETHERITE_HOE,Rarity.UNCOMMON, false, itemMap);
}
init() is ran when i do the constructor
can you show me what the constructor for CustomItem looks like
public class CustomItem extends FernItemStack{
public CustomItem(String id, List<String> description, Material material, Rarity rarity, boolean isStackable, Map<String, FernItemStack> hashMap) {
super(id, description, material, rarity, isStackable, hashMap);
}
}
or any of the things that it extends that are relevant
can i see FernItemStack's constructor
public FernItemStack(String id, List<String> description, Material material, Rarity rarity, boolean isStackable, Map<String,FernItemStack> hashMap) {
this.id = id;
this.description = description;
this.material = material;
this.rarity = rarity;
this.isStackable = isStackable;
hashMap.put(id,this);
this.FernItemMap = hashMap;
}
so i don't understand what your goal with the hashMap is
is it meant to store all of these CustomItems that you are making
private final Map<String,FernItemStack> FernItemMap;
and then all of the items can access it from themselves
yes
okay
are you sure you need / want access to the map of all items from within each item
if you do that's fine but are you realllyyy sure you do
because that seems a little strange to want to do
like there might be a valid reason but idk if you have one
fernItemMap never gets called other then in this class
i wanted to get the map so i could query certain details based on the item i wanted
a vanilla itemstack has an nbt string called id which is how i identify a custom item
i originally just used static and then queried that map and got the object relating to the items id if it existed
because it was easier
before anything i'll say that i actually think in this case using a static map would actually be fine
but
since we've gotten this far why not learn how to do it in a non-static way correctly
and now that i know what you actually want to do let's come up with a simplified version of what you want
we'll use dogs since sky seems to love dogs
lets say we have custom dogs instead of custom items
like a new CustomDog("GOLDEN_RETRIEVER", DogSize.BIG, DogColor.GOLD);
it doesn't make sense to give the dog itself my map of all dogs
i'd rather store the map wherever i'm going to make my queries
like my main class
so let's make a Map<String, CustomDog> allCustomDogs = new HashMap<>();
and then just
initAllDogs() {
allCustomDogs.add(new CustomDog("GOLDEN_RETRIEVER", DogSize.BIG, DogColor.GOLD) );
...
...
...
}
i didn't have to use static anywhere
and i have a map of all the custom dogs that i can query by id and get their attributes
if i want a class besides my main class to have access to this map, i will probably pass the map in as a constructor to those other classes
and they will hold a reference to it as one of their instance variables
i saw and was told to not have stuff in the main class unless absolutely necessary
well how are you going to accomplish anything if you don't have anything in the main class
i believe this qualifies as necessary
and even if it wasn't don't stress about it too much 😉
anyways i hope you got something out of my lengthy example
well they will both be instance variables within your main class
and then you can use a very common trick called dependency injection which sounds a lot more complicated than it is
it involves two parts:
- you have a getSet() method in your main class that returns your recorder set
- you will pass your instance of your main class as a parameter to whatever objects need access to the set
then those objects can store a reference to the main class as an instance variable, and later do mainClass.getSet() whenever they need access to the set
you could instead skip the middleman and just pass the set to the objects rather than the main class, but that becomes painful the more things you want access to; it's easier to pass one main class object and call a method on it instead of passing 2+ objects that you may want access to
also what did you mean by this
you cant do Ferncore core = new FernCore()
which is what ive been doing to get access to methods from another class
is FernCore the name of your plugin
yes
when your plugin runs
and the code in your onenable and whatever else runs
it's running because an instance of FernCore was made
anything that is not static needs an instance in order to run
in your plugin's case you can get access to the instance by using the this keyword inside the main class
i dont want an instance of ferncore, i just want to get the methods from it and their results when im using it in another class atleast for most stuff
well you have to call ferncore's methods on an instance of ferncore
so i do want an instance but not a new instance ig
there is no other way
exactly
exactly right
like some methods require an instance of the plugin, which is what
public static FernCore getInstance() {
return instance;
}
``` is for
instance is uninitalized at startup, on enable does instance=this
yes
it can only be a static variable
exactly
exactly
oh i see
for a second i thought it was being set to this at the same time as it was being declared
which wouldnt make sense
anyways that's an example of static abuse
you don't need to do that, you can pass FernCore to whatever needs it through their respective constructor instead
the majority of my classes dont have constructors thinking about it
get used to making constructors that accepts your main class as the only parameter
some are just full of methods that dont depend on anything but the paramaters
doSomething(param)
return parambutmodifed
that's not necessarily bad but OOP is all about being stateful
so to take full advantage of the OOP paradigm you want to try to use instance variables and structure class relationships in a meaningful way when possible
not that what you are doing now is bad, it's just not very oop
you should see the project files, it is just a spagetti that works
and a lot of people here will say that having methods and no state like you are is better than doing things the OOP way
is using static in an enum class for a method ok?
sure since enums are essentially static anyways
i dont know if it's considered best practice or not though
i currently have a class thats 377 lines long and i reference the class everywhere cause of what its used for
cause its got a bunch of util classes in it
i wouldnt worry about it too much
especially since you're still learning
static is fine for util classes though, since like you said it's just a method that modifies the parameters it takes in
ive recoded the same thing about 4 times now, each better then the last
like i resolved an issue with telling if an inventory is one of my inventories and which one without using something like the inventory holder
customenchantments-0.1-SNAPSHOT.jar, sqlite-jdbc-3.36.0.3.jar define 1 overlapping resource:
- META-INF/MANIFEST.MF
using maven and the sqlite dependency, should i ignore it?
looks like recorder is working correctly with the set being in the main class
now to repair the registering of my custom items
Just relocate them?
you can't relocate sqlite
I mean there's nothing stopping you from doing so
but it will break lol
you can just ignore that warning
also just so you know, the server already bundles sqlite
Hey! Anyone knows what are plugin.yml variables are available in IntelliJ
I see this:
version: '${project.version}'
I would like this to be (date+time):
version: 22.01.11.1234
well, I think it looks like you're using maven (seeing project.version), not IntelliJ (specific)
ig from that maybe u can google 🤷 since I don't use maven and i also have to go 😩
I guess it's maven yes, I'll go with that. Thanks!
yo someone recommend an app to reformat a USB Stick please.
I've got windows or something installed on it at the moment
I'm on linux rn
I was following this https://phoenixnap.com/kb/linux-format-usb but the problem is after I unmount the usb I can't run mkfs.vfat on it
bcz its not found
ah got it
@wintry plinth Because fuck python, decided to control it using an arduino, meaning C#
hell yeah
LOL, did they allow that?
Mate I run the project, what I say goes lmao
Nice
what project do you run?
oh LOl i thought it was a college thing and you had to use python
Well I mean it is for school in collaboration with another company, however our hands aren't tied to using specific things
We're making an automated process using a robotic arm
ok. cool. no idea what that is
Stuped
yo @hot hull u worked with Toasts right? what's the difference between a Challange, Goal and Task toast?
Probably just the title from what I see on the lang file
The title ye
{
"advancements.toast.task": "Advancement Made!",
"advancements.toast.challenge": "Challenge Complete!",
"advancements.toast.goal": "Goal Reached!"
}```
Ic. thanks
blockquests have mysql support?
is everbody good
pls donate
as I've said. this is not the server for that. please stop sharing those links. thank you
any1 familiar with Angular and can tell me how to connect to a Socket (Kryonet Java library) as a Client?
Angular 😖
I know Matt, its just for one Project
Hey, if it works use whatever you want :P
Well I don't know what to use, thats why I am asking here
dm @compact perch
Okie done ty
.... -100% useful. Please read the whole conversation before attempting to Answer
Dude your question is stupid wdym
How do I connect to a socket
Just look up how you do the same shit you’d do with any other library.
Please don't answer if you don't have an actual useful Answer thanks
Just chose a library simple enough
yes picking a library for Angular is super simple 👌
Considering your client is using kryonet too. That example is useful
Shitty question and worded horribly yw
? you can't read.
As client
yes use angular to connect as a client
Yes worded very bad.
no you just can't read
Are you dumb bro. You say how to connect to a socket as a client
Remove the parenthesis
Then you throw them in with Leto
Kryo
Please just stop, this is a Dev general not a chit chat
Kryo is a Java library, Angular is js
And your question just sounds more idiotic
Obv
Your question is saying with kryo as a client. So fix your wording before you’re a cuck
Don’t deserve help prolly
no it says to a socket (Kryonet Java library) you know what those brackets are for? so people know what Socket Server I use
you are the only one who doesn't get it
Looks like nobody gave you an answer
so please stop talking about it if you aren't helping this is a dev chat not a talk channel
actually I did get an answer, people from this discord pinged me somewhere else but thanks 🙂
Ah they must love answering shitty worded questions for grinch like personality people
help
Today talk about Pokémon I don't know too. And repot me too.
Can someone help me make a loop that counts every args after arg[1] and stores it in text variable? (I have no idea how to do that)
no
Already solved it
String message = " ";
for(int i = 1; i < args.length; i++)
message += " " + args[i];
Thanks anyways
what's that?
yeah
That’s what they are doing
You should use a StringBuilder instead of appending in a loop
Maybe you'll be able to send me an example?
Are you just trying to join an array separated by spaces without the first element?
Because..
Arrays.stream(args).skip(1).collect(Collectors.joining(" "));```
WHO DARE'TH TAG ME
Sir
explain yourself boy
this explanation is unsatisfactory, as the problem has not been defined
Sir actually I am not getting any role mention and everyone mention in my recent mention tab from 3 days unexpectedly they are stopped
In my another account
Sir
Pls help
this is a minecraft support server
But sir u can help me as u know discord from many time
Can u give me link where can I get solution of this
@quiet depot
@quiet depot
@quiet depot
@sudden tree
@sudden tree
@sudden tree
@sudden tree
@sudden tree
@sudden tree
@sudden tree
yeah 2 secs
yes
you can't
it's a knowledgebase, look for an article to help you
@quiet depot
Do u know ?
no
@sudden tree no
This is not support for discord
Is there any server for that?@pallid gale @quiet depot
no
Any number for that?
Uninstalling also works
lets see how quick people notice the real issue
you mean the font?
absolutely
When the player spawns?
Thanks...
seems legit lol
+5 other emails
@static zealot Stop slacking https://github.com/Frcsty/FrozenJoin/issues/28
ugh. no.
gonna respond with this and close the issue lol
oh wait. this is the quit event issue
just gonna copy your response from the other issue
:kek:
how the fuck did they even load the plugin in 1.16.5?
old version I'd assume?
is setting the api-version to 1.17 not meant to stop the plugin from loading?
2.3.0 is latest release
and that's what they say they use
Nah it'll still load
tbf, I think it should still pretty much function properly on 1.16
I don't care lol. and it clearly doesn't
how do I update a plugin, without deleting the settings?
well that depends on the plugin my friend
yea don't add support for it, just tell em that it's no longer supported and close the issue
some plugins add the missing settings for you, some plugins just don't add the settings but will work
you can do that. xD
effort
also what caching system for placeholders did you have in mind?
or was that just an answer so you can close the issue?
Can you check if all placeholders get fucked when a player leaves, or just ess ones
ugh. well I believe %player_name% works. bcz I tested it the other day. but can do again. give me like 2 minutes
@hot hull
yeah. probably not.
luckperms seems to be suffering from the same thign
maybe a caching system like TAB has?
we let them declare placeholders and the time in ms.
cached_placeholders:
"%essentials_nickname%": 600
If you have an idea on how to approach that, sure
hmm. but that'd be hard
maybe just cache time for all placeholders. not per placeholder (only cache the placeholders they list tho)
cached-placeholders:
- "%essentials_nickname%"
- "%ur_mom%"
- "%etc%"
yeah. but what if the caching thing happens exactly when the leave event happens? there's still a chance they'll be broken is there not?
most likely yea, but still probably a rare occasion
well. I'll do it at some point. not rn tho. kinda busy
Mate even if it's next year, no rush kek
tho it will probably take a few minutes to implement
just have a map [key=placeholder, value=parsed-placeholder] and a runnable
hmm. well
we need to have them be per player
map in a map but yea
so [key=player-uuid, [key=placeholder, value=parsed-placeholder]]
nah, have placeholder first, then player
oh. is there really any difference?
doubt
but if you think that placeholder first makes more sense sure
should I Just copy this link and put it in the issue to remember about this?
shore
Is it possible to get vcl.h used in Embarcadero in CLion?
I need help
There is no time to wait! Ask your question @neat stirrup!
My discord has been locked
and i need a phone number
Anyone got a phone number I can use?
I need help 😭
i need help
There is no time to wait! Ask your question @neat stirrup!
F
I give nitro for who help
why dont you have a number?
but there are many trash numbers out there
Can you help me?
Just get a trash number
how
google it
This is not the place for this topic.
put then need to get the verification code from it
yes?
Again, not the place for this topic.
-> Minecraft/Dev
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.
he just dmed me asking if he could use mine 
@agile galleon sr
So I am writing a 3D game almost from scratch, with just a 3D rendering library, and I've come to a wierd issue;
I don't know what to design my map in.
I need to be able to export to something blender can read (so I can make a more detailed version for rendering only),
and I need to be able to export something super simple (either just a json array of rectangles, or something similar)
anyone have any suggestions for what sort of editor I should use to do this?
Wow, Java 17 is wack... Feels like they literally just dropped in a bunch of kotlin features lol, im good with it, just kinda weird
sealed classes, record, new switch statements...
17 only added sealed, the other two were from before
but yeah, it's pretty good
pattern matching switches are gonna be so fucking cool
Im still sticking with kotlin, dont see myself switching back anytime soon, but i love all the new stuff... I really never wanna touch 8 ever again
oh yeah, kotlin gang 4 lyfe
i recently tried clojure and it is actually pretty cool
just gotta figure out enough to use it in my classes and flex on my teacher lol
you should try scala 👀
i looked at it for a bit, but I don't see what it has to offer
it's just a halfway between functional and OOP
if i want good OOP ill use Kotlin, and if I want functional ill use Clojure
But have you heard of Skript?
🥶
Frozen in awe?
It does function
compared to kt? higher kinded types, better generics, stronger type system in general, traits, union and intersection types
AHHHAHA
i would use clojure if I wanted those things
the standard library is oriented a tad differently
i guess besides type system lmao
yeah but clojure is dynamically typed
Eww
also clojure higher kinded types? 👀
i mean eh
oh yeah implicits
if i want really functional ill go haskell or something
those are great
scala as a halfsie JVM lang doesn't really fit anywhere for me
I’m surprised BM didn’t instantly reply to that
he sleebs
"halfsie"?
half way between OOP and functional
it's fully OO with functional feats
as per here
could also describe Kotlin like that
I know
🤨
what are you confused about
OOP <-----------------------------------------------> Functional
yeah, and it's fully OO with functional feats
----------Kotlin ^ Scala ^
eeh
Switch to JavaScript
but you should try it fr
i did
it's big brain stuff
sad
on the other hand: have you tried F#
I have not
I would if i had something to work on with it
Star
Just gotta be honest
actually
Emilly this is more for you tbh
Ive been using the module loading stuff
And its freaking awesome
that was... not how i thought that interjection was going to go lmao
i thought you were going to tell me i was adopted or something
HAHAHAH
yeah it's a pretty cool system

When i was using them in java 9 it didnt feel fully incubated and gradle really didnt support it
but in java 11 and 17
omg
i love it
and that's on LTS babyyyy
star
i mean the architecture itself hasn't changed since then lol
comon star
gradle support is a bit iffy in general with it
you literally have been dissing LTS this entire time
but it's doable
what lol
Mostly talking about the gradle support, but ya
you want me to find the messages????
i guess?
i presume i said that i hate when people use lts versions cause they're out of date
then when you choice is between an lts and a non, especially when a latest is lts, that's an obvious choice lmao
lol
Also modules are MUCH MORE than just "expose this jar and don't expose this other jar but add it to the runtime"
good thing I don't care 
jlink, jmods
star, no one cares
keep going emilyy
lmao
you are appreciated unlike someone here
good thing I wasn't talking to you
Also, sealed interfaces can be used more flexible with modules
The only thing i find hard
on a serious note, i don't really see much of the point of modules
about modules
Is designing how modules should be loaded and then how the class loader heirarchy should look
since class loaders are tree based and modules are more, well, modular
Two major reasons:
- The actual primary reason was to modularize the jdk, rt.jar at the time was almost 70 MB, shipping that much extra, the majority unneeded with your application is… yeah
- Fail fast, the dependency graph is known way before the application actually runs, and if a module depends on another or uses a service, it will check everything is present on bootloading stage
oh I see, I always heard about it as a security thing
and I was like, "security from what? you have your entire java app probably lmao"
For libraries you can not expose internals both during compile time and at runtime, protect from reflection etc but those two things were actually the main reasons
Doesn't Java 16 and above protect against reflection though?
Time to use the TrustFinalNonStaticFields flag 
Oh also yeah reflection changed quite a bit conceptually
Things like final don't "actually exist" if you have reflective access
It's pretty weird
And reflective accessibility depends on what module wants to reflect on what other module as well
MethodHandles pog
Reflection will use MH as the backing system since 18 
Less stuff to maintain as things move forward
18 is kinda boring tbh
The http server is… cool ig?
But why lmao
This one is kinda neat as well https://openjdk.java.net/jeps/413 I like it
Lot of other languages have something comparable too, so I guess that’s why
Oh yeah, that might be some work for me…
Wait a minute… if this only affects javadoc, does that mean we get to use it even when we compile for --release older versions? :O Since, y'know, they're actually two different processes
Uh
javadocs are painful to work with, they aren’t really specified properly
And there are many broken javadoc comments in the jdk
Sven running through the forest with the dogs, kicking trees, farting, and just having a great time. It was a cool fall day and he was feeling very frisky. The dogs and horses are all great friends and play together often. Sven never hurts any of the dogs, they get along great, and he was just feeling frisky this day.
Sven is a Grulla Quarter ...
lol someone told me about exactly that video yesterday
Lmao
Celeron best CPU for Minecraft server confirmed? 
How does one turn on amoled dark on discord mobile?
you press the dark button like 10 times
Ahhh
Oh wow, this looks neat
But for some reason discord is laggy on this phone
Like very laggy
Discord mobile is laggy everywhere, it's complete trash
yeah. been like this for a few weeks now. well its always been laggy but lately its been very very bad
how long does spigot take to approve a premium resource?
well that's bcz you use discord mobile on an emulator on your pc...
Intel Pentium 4 ftw
I never had issues in older versions
Seems to be an issues on an update
How to get player name by uuid ?
d;spigot Bukkit#getOfflinePlayer
@NotNull
public static OfflinePlayer getOfflinePlayer(@NotNull UUID id)```
Gets the player by the given UUID, regardless if they are offline or online.
This will return an object even if the player does not exist. To this method, all players will exist.
id - the UUID of the player to retrieve
an offline player
use this to get the OfflinePlayer and then use that to get the name
Thank you.
If i want to teleport player to the location ,How can i to do it?
d;spigot Player#teleport
boolean teleport(@NotNull Location location, @NotNull PlayerTeleportEvent.TeleportCause cause)```
Teleports this entity to the given location. If this entity is riding a vehicle, it will be dismounted prior to teleportation.
location - New location to teleport this entity to
cause - The cause of this teleportation
true if the teleport was successful
Thank you.
Returns: true if the teleport was successful
i wonder in what situation the teleportation would be unsuccessful
well it can be cancelled can it not? like cancelling the event cancels the teleport? or am I wrong about that one?
Outside world border maybe?
that is also a good reason
@cinder flare do you know of an alternative of Optional for C#? can't seem to find one. one that's built in if possible
oh. I guess I could just give the parameter a default value. since I personally don't care if it has a value or not. just don't want the user to be forced into giving a value.
They got Nullable<T> iirc
🥴
Yeah probably not equivalen but well well duck duck
int? 🥲
Apparently something like val test = nullable.value ?: "or this" is string test = nullable.Value() ?? "or this" in C#
Yeeee blitz
tf
someone got a regex for math operations? lmao. I'm so sick of this. tried yesterday and today and this is what I ended up with:
Operators: ([\+\-\*\/\%\(\)])
Sin: (Math\.Sin\(\s*\-*\s*\d+\s*\))
Cos: (Math\.Cos\(\s*\-*\s*\d+\s*\))
Abs (Math\.Abs\(\s*\-*\s*\d+\s*\))
Min (Math\.Min\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Max (Math\.Max\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Pow (Math\.Pow\(\s*\-*\s*\d+\s*,\s*\-*\s*\d+\s*\))
Number ((-\s*)?\d+(\.\d+)?)``` but I've got a few problems with this. in this example `2 - -2424 (24- 2.4425)` it detects `2` as one group `-` as another `-2424` as another `(` as another `24` as another (so far so good) but then it detects `-2.4425` as an entire group. when I want `-` to be its own group. this is the way I've put the regex together. And also I am aware doubles are not supported yet inside functions. forgot to update those. Also another problem is that if I add random characters like `azfasa` inside it, I want it to be considered invalid. now I believe I can just use `matches` on the entire string and it will return false if there's parts of it that doesn't match. (will add another group for spaces). I don't have to necesarely use regex but its the only thing that came to mind.
please before you start destroying me note that its my first time actually "understanding" regex. the few times I've used it I just copied the pattern from somewhere. this is mostly made by me. (gaby helped me with the negative numbers part yesterday.)
You're insane sir
valid brackets are not a regular language, therefore they can not be recognized by a regular expression
that's not really a problem.
my problem is to tokenize the string. I use the sunting yard algoirthm to determin if its valid or not.
write a proper lexer, it's easier and more readable than such a regex mess
and the unary minus should be an operator too
I saw something like that before. It was a vulcan anti cheat addon for "cheat proof videos" and apparently automated. Never got to try it tho
thats different
it just replay stuff in mc
but he want video like video
well I was thinking about making web replay for vulcan
and I came up to 2 solutions
- WebGL (ThreeJS or smth like that)
- WebAssembly (Unreal Engine)
but none of them can be just video, its online replay thing where you can move w camera etc
budget $5-15 
that's really just not something you can do with a plugin since only the client would be able to record anything
Well
In all fairness, many people don't know much about java and how much work plugins actually are.
Let's not roast but rather educate
or there is 3rd option
modify replay mod
but webgl/webassembly is better option
or just compile Minecraft to webassembly 😈 (/s)
I'd be interested for a time estimate on that ngl
I feel like that would definitely require a client mod if you want to create a recording unless you want to lose your mind trying to recreate the scene from just the pure data available on the server
Wasnt my question but ok
not hard = not much time ok
but it can be used only for movement checks
If after c# 7, you have nullable types
T?
Compilesnto just Nullable<T> finally tho
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>6.1.1-SNAPSHOT</version>
Means it is red
Dependecy 'com.sk89q:worldgaurd:6.1.1-snapshot not found
On
Intelij idea
use gradle
have u added the repo
blah blah blah maven bad gradle good who cares
How to remove it sorry my freind helped me but is now not here
Can anyone help me with my servers pvp it’s been so buggy for so long
i need algorithm pro:
you have program where you enter number size like 2
so number can be 01, 02, 03, 10...
and you enter what those numbers have to add up: 9 example
09
18
27
36
45
54
63
72
81
90
my brain wont let me do it, i cant figure out the idea how i would do it
Kva
Ne stekam
pac ti vneses kak dolgo je stevilo idk 3 stevke
in potem kolk je kao vsota vseh teh stevk ko jih sesteje, in mores izpisat na kak vse mozne kombinacije lahk sesteva stevila
That doesnt look like its worded right
uh, do you just need to sum up n numbers?
okay so i enter how many digits there is in number
then you enter what those digits sum up to
and then i need to print out all possible ways to put number of digits up to sum up to that value
Ahhhh
and my brain doesnt know how to do it
i know its simple if its 2 digits.
but anything above lags my brain
what lang?
java?
c++
i mean i dont mind if its java i can go translate it to c++
as long as it doesnt use some wierd stuff that c++ doesnt, it should be as basic code as possible.
so basically you want
program that print numbers from 0 to 99? and 0 & 9 should be 00 and 09?
no
This ^^
i mean i found python solution
def get_tuples(length, total):
if length == 1:
yield (total,)
return
for i in xrange(total + 1):
for t in get_tuples(length - 1, total - i):
yield (i,) + t
but i have no idea how to convert that to c++
@hot hull look. a good review xD
xs´ddd
He gon suck your d next?
hopefully
but clearly. the problem were you and Star all along. lmao
also frosty. I am not going to remove the <#aaFF00> format. gonna keep both.
That's the best format
well I personally like #aaFF00 format. but minimessages support might be planned in the future which means a bit just a bit less work for people lmao
how to downgrade maven
why...?
Possible solutions:
- Check that Maven pom files not contain http repository http://maven.sk89q.com/repo/
- Add a mirror(s) for http://maven.sk89q.com/repo/ that allows http url in the Maven settings.xml
- Downgrade Maven to version before 3.8.1 in settings
@dawn hinge
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>6.1.1-SNAPSHOT</version>
Means it is red
Dependecy 'com.sk89q:worldgaurd:6.1.1-snapshot not found
On
Intelij idea
- Check that Maven pom files not contain http repository http://maven.sk89q.com/repo/
@sinful mason
Change it to https
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.sk89q.com/repo/</url>
</repository>
</repositories>
Like this
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>nl.gamerjoep.bankoverval</groupId>
<artifactId>BankOverval</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<!-- This adds the Spigot Maven repository to the build -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sk89q-repo</id>
<url>https://maven.sk89q.com/repo/</url>
</repository>
</repositories>
<dependencies>
<!--This adds the Spigot API artifact to the build -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>worldguard-bukkit</artifactId>
<version>6.1.1-SNAPSHOT</version>
<scope>provided</scope>
<type>jar</type>
</dependency>
</dependencies>
<build>
<directory>E:\Build\1.12.2\plugins</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
yeah
notting changed
Does it say the same thing?
Did you reload the project after you changed it?
no
Well, you should probably do that
i will try
Under file i did reload all from disk notting chaned
My freind normaly helps me
Click the maven tab at the top right then click the reload button
com.sk89q:worldguard-bukkit:pom:6.1.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced
Cannot resolve com.sk89q:worldguard-bukkit:6.1.1-SNAPSHOT
Clean up the broken artifacts data (.lastUpdated files) and reload the project.
Unresolved dependency: 'com.sk89q:worldguard-bukkit:jar:6.1.1-SNAPSHOT'
Could not find artifact com.sk89q:worldguard-bukkit:pom:6.1.1-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
take a look at the repository https://maven.sk89q.com/repo/com/sk89q/
worldguard-bukkit has only v7 and its group is com.sk89q.worldguard
So i have to remove -bukkit?
<groupId>com.sk89q</groupId>
<artifactId>worldguard</artifactId>
<version>6.1</version>```
Could not find artifact com.sk89q.spigot:bukkit-classloader-check:pom:1.8-R0.1-SNAPSHOT in spigot-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for nl.gamerjoep.bankoverval:BankOverval:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 42, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------< nl.gamerjoep.bankoverval:BankOverval >----------------
[INFO] Building BankOverval 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.318 s
[INFO] Finished at: 2022-01-14T09:56:08+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project BankOverval: Could not resolve dependencies for project nl.gamerjoep.bankoverval:BankOverval:jar:1.0-SNAPSHOT: com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Process finished with exit code 1
@distant sun ?
I make a 10K line plugin, shit load of calculations and stuff, put it for premium for 2 eur. - 0 downloads
This guy makes a "RePlant" plugin, which is like 30 lines of code, puts it up for 2.50 - 156 downloads
Spigot in a nutshell
Would you like some pepper to go along with it?
just bcz you made a comment of 9999 lines doesn't mean your plugin is good mate... xD
TRUE
[INFO]
[INFO] ----------------< nl.gamerjoep.bankoverval:BankOverval >----------------
[INFO] Building BankOverval 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT is missing, no dependency information available
How to fix this?
When i get a player's x coordinate w/ player.getX() it will show the full coordinate (170.0613975...) how do i make it only get 170? without the additional .0613975
Math.floor(player.getX())?
yes
I wiped my PC and installed my OS fresh. Along with it IntelliJ as well.
Now when I try to build my Plugin projects, all of a sudden I can't load the minecraft dependencies anymore. Anybody have an idea on why that could be?
Surely I don't need to run BuildTools and build that particular MC version, right?
Any ideas?
spigot is NMS, spigot-api is the api from their repo
well, your maven local repository might got removed if you have removed everything
yes. you need to run buildtools or whatever it is nowdays for spigot since you said you cleared everything
Hm alright I'll try that. I just thought that it should be able to get those dependencies from the repo.
Thanks guys
Someone said that Java streams clone objects which makes it cause memory leaks, is that actually true?
no that's dumb
nothing randomly clones objects (which might not even be clonable?), and even that would not cause memory leaks
That’s what I thought


