#help-development
1 messages ยท Page 2281 of 1
thats the only way fetching the blocks
okay
you can loop millions of times a second in java lmao
what do you expect
How else are you supposed to get every block without iterating? Magic perhaps?
a magic method which just provides all blocks instantly
it just depends on what your doing
can i send full code?
you can looop through probably 100 ChunkSnapshots in just a few seconds
?paste
if even that
allr because i created a custom loc class
Because then i have shity issue with mongo codec
๐ฌ
hf getting a chunksnapshot async in higher version
dont need to get async tbf
never mentioned getting ๐
if you wanna operate on it async afterwards its better to
Gettings probably the most taxxing part
also why using chuks async?
If i want the blocks from a specific region not a chunk!!
well get sync then operate async is current style because of bukkit limitations
thats awful
works fine for me
i see
should my cuboid class implements Iterable for the blocks?
no
Allr
in that case only option is to to super taxing loops
You need to setup a load balancing with multiple async tasks running in paralllel looping those blocks
So up to know is going okay
i reccomend converting cuboid to your own style of ChunkSnapshot somehow
it would be weird
but would be fast
not an easy setup tho
theres aguide on it
smile knows a lot more about it than me too bad hes not here
partitioning the task across multiple ticks?
task chain might be useful to chain those partitioned tasks accross threads tho
The getBlocks() was autocompleted by copilot, so it should be wrong
1.13
who tf uses 1.13
I dont reccomend calling getBlock
You should just store location referances and block types
getBlock is whats gonna be taxxing for this
Allright
and getChunkAt
Tht code was done by copilot
So i ill modify know to what you think and explain me
getChunkSnapshot is the best way to go for performance
Multiply the coordinates of chunk snapshot by 16 or bitflip by 4 to get real World Location
chunksnapshot is a 1.8 thing
why are you on 1.13 ๐
when you get a block in a chunk snapshot it returns the chunk location not real world
Compatibiltiies ith all words, starting from 1.13 and up
eg chunk 2 x 2 at chunk location 3 x 3
what he means is, you should store the locations of your region, convert then to a chunksnapshot and ask that snapshot for these locations
you would (3 * 16) * 2
(chunkBlockLocation * 16) * chunkLocation
only thing is, you would have to update the chunksnapshot everytime you query
if hes not holding the query should be fine
seems like hes running it straight through
its gonna be slow
you cant run it async
if you use referances to blocks you can run it async
So let try to do the faster way
and not to mention just using referances overall is gonna boost performance so much
first you should setup the referance system
You may not even need async with it depending on the size of Cuboids your looping through
good luck thought this is gonna be an all day thing to do haha
Im not storing anything, im just doing a getter
the getter is storing Blocks into a List
Doesnt matter how long theyre stored, its the getBlock thats taxxing
sec
im gonna try to make some type of psuedo code
Yeah i know what you means Chunk#getBlocks() ill shut down tps down
is there a reason you need the actual Block object of every single block in the region
you will never need every Block instance
No i dont think
hence why referances are key
So i would need a Map<Location, Material>
class MyBlockLoc {
public int x;
public int y:
public int z;
}
HashMap<MyBlockLoc, Material> map = new ...; // you can reverse the key/value if you like
only reason i wouldnt use Location is of the overhead
plus
i think it calls get to the world on creation/get
why dont you just store the block references once
God, burch told me that storing the block reference ill be overkiller
instead of unnecessarily holding new location instances over and over again
you could just store the block reference which never changes
and hes calling it thousands of times in a loop
(possible thousands)
maybe even millions
And not to mention
its all on main loop because you cant getBlock async
so just dont call it in a loop?
World#getBlock is pretty cheap btw
It is but added up over hundreds of thousands of times its horrid
Well
not really
but you dont even have to call it that many times
I mean, tbh, shouldn't matter
what are you actually doing with that method though
you mentioend that you didnt need the actual Block object so what is the end goal
in the end you have to loop anyways
getBlock only creates a super simply wrapper around the region accessor and the location
The "expensive" part is reading it's block data or type or whatever really
The problem is that i will use that api for mines managing
So it need to be efficient
oh youre filling blocks?
Yes i ill use it to fill blocks
Basically i ill manage mines regions over that cuboid
take a look at this
And i need to know the blocks because there will be some custom blocks that ill do something like crates or give things
Ahh yes i remember now
it was that as well as getting Locations too (in unloaded chunks)
getBlock does this under the hood
So in the end?
in the end unload the region, access the region file, edit it manually, save, load it back in, update
very efficient
or players in the area
In my case will be used for mines but other people will use it for ther things
wat
That could be made into a api, anything can
i'm at work anyway smh
I wonder is there any java library for editing region files?
grubhub smh
i work at a gas station
I want to achive something like world edit api but more simplier
good waters healthier
what gas station ill order gas
just make a WorldEdit API handler
or do what cipher said
if yo udo what cipher said
you gonna get all the girls
100%
wawa
only if its cold
What said god cipher
otherwise its trash
Too many messages
this
none that i know
its possible from what im seeing
i mean after all
if minecraft does it, its possible obv
so theres ways to serialize those files
i thought you were saying water uwuified
water -> wawa
so i was like ignoring wat was said xD
thing is
if your gonna do it right
you need to handle the chunk processing offshore
in a rest server
offshole?
where users can post theyre region files with coordinets of block referances they want
offshore = not on the main server
In a sense
this isnt easy
why do you think a million world edits dont exist lol
oh ok
but a million essentialsx plugins exist
dont talk me about that plugin i wanna take out from eats
Its has many amazing harcoded things
wait what
I
kind alike my hardcoded token
ive been off work for like 2 weeks
Me: "essentials is shit"
Also me: Posts a script with my github token hard coded into it
LOL
i had a repo with my minecraft login in it
F
Yeah that is another top level
Oh I'd suggest doing it in gradle ye
Also if i didnt told you, u will never realized it
Your ci then just runs the copy tasks that depends on the shadow task
my login was in my build.gradle
lol
A clever move
Burch
nope not at all lmfao
I was looking at fawe repo and is even more complex than world edit
๐คก my face ith 1 emoji
parelism?
paralellilismslms
fawe isnt actually async is it :thonk:
What have to do the name?
Fake Async World Edit
omg i should make that
wonder if spigot would take it down
make it a bedwars plugin
easy enough to do
code it like you started java yesterday
how to move variable to other class
static everything
So in fact there is no good api for managing regions and cuboid that they work okay, not being a resource fuck-er
add some memory leaks
shit might as well add a "invalid plugin.yml" and not even let it load
No but theres libs you could put together to make one
store it in a file and access it in the other class
Allr can i get nmes burch?
first answer tells you what you need to know about em
Also sorry for being assh-ole but i need a matcher for replacing variables based onvalues in mesages
Im gonna suggest regex and pretend i know how to use it
Why mca files?
I dont understand
its how mc stores files
fastest way possible
Ohh ok
whatever you did before would probably be enough and this is overengineering af
but who cares
you have to get the chunks from your x y z cuboid
from those chunks get the region files
Send region files with x y z to a offsite server to handle the actual running of these requests
On offsite server read the file and do what is needed to get readable blocks from it
i only say offsite server since you wanted this as an API
and you could easily monetize off this too
but you dont need it
can just process this on your machine
what means offsite?
Oh you mean code a backend which handle that conversions operations, ight?
dont you have to restart the server for the block changes to apply if you directly edit mca
yee, only if you want tho but its not a bad idea since your wanting it as an API
Im not sure
might be able to inject
mixin
something
no, you can just load it back in and update
well yeah your kinda doing that
just with chunks
theres a game
called second life that takes shit shit a step further
theyre chunks are seperate servers ๐
technically worlds don't fully unload
but really depends on what you are doing
Read our ideafrost
my computer that off:
minecraft world: *nananananananananaa*
We find a solution for easly loading structures and things
i remember seeing this guide but
i dont think it directly messed with mca but directly interacts with MinecraftServer
buuut
still fast asf
yeah no thats just the NMS method
if you want a easy way verano you can do that thread
but if you wanna be innovative do what we were all talking about
bc a fully functionaing system doesnt exist doing it that way yet
Probably for good reasons, but everything exists for a reason, even you ๐
have a good day i need a beer
Thanks burch
I need a wine
Its cold here
I love wine on winter
lmao why intellij gave new shits every day/month
wtf
fuck
thats good
starred that repo gonna use it one day
@sterile token try this ngl
wait thats actually cool lol
because where are trying to load structures directly using .mca format
Which is the most efficient way
this might not honestly be bad
bc of the async operations it provides
you may get similar performance using that class
i see, everyone instantly starred it
ofc editing mca is gonna be fastest, but that way its second best more than likely
yep 
looked at the code and instantly starred it
WAIT WHAT
EVEN HAS CUBOID METHODS
bruh
Oh
in one class too lmfao
only thing is verano
you should add methods
setCuboidAsync(int, int, MakeANewItemHandlerHere, false)
have the item handler take in multiple items with chances for each one
can PR it
cause for mines ur prolly gonna want that
not just one single block
{"providers":
[
{"type":"bitmap","file":"custom/admin.png", "ascent":7,"height":7,"chars":["๊"]}
]
}
Whats wrong here?
how do I throw a potion with an effect
idk how the new font image stuff rly works
yo
all o ican do for you ignius is give you a video that does it, thats all i know
Okey
never done that before ngl
r u talking to me
oh
ok
does anyone know
wait i just realise
i should reqword that
https://www.youtube.com/watch?v=-9bjbL1dYAE
You might of seen this
Thanks
how do i launch a projectile with a potion effect?
yea
it doesnt have potion meta data so you cant apply it to it, do you would apply it rather on ArrowHitEntity event and if its the same arrow apply the effects for that arrow you have stored via config
Ugh unicode thing doen't look working for now
as for potions idk how the potion api works but it should be relatively easy
I need characters
My freand knows how to do it, but for my its 04:31
Working for my dreams 24/7 ๐
how do i use potion meta
cast its ItemMeta to PotionMeta
make sure to instanceof check ItemMeta
if (item.getItemMeta() instanceof PotionMeta) { // do my stuff }
or you can just check ItemStack type
but intellij will warn doing it that way so just instanceof check
GRANT PRIVILEGE * TO 'user'@'host';
is that okay?
Im installing mysql again without used it for more than 1y
i beileve
its grant privileges on database.table to 'user'@'host' with grant option;
and afterwards
flush privileges;
will grant priviliges to all tables?
database.*
or all databases just *
like you have it
but
generally i wouldnt do that
if that accounts compramised whol db goes
rather than just a single instance of the db
Because we just installed mysql
And we want to create a root user
with all priliges
What for?
And then another user only for specific dbs
Generally i wouldnt make a "root user" for mysql bc its generally not good practice for security
unless
the mariadb is not opened to outside connections
so no one outside that machine can connect to 3306?
because you didnt make the user
No
you need to make user then grant
i will be used as localhost server
create user 'name'@'host' identified by 'password';
then you can run the grant command
already created it
this error says otherwise
CREATE USER 'xxx'@'host' IDENTIFIED WITH authentication_plugin BY 'xxx';
idk what by is
never used that
oh
wait weird syntax but okay its basically same thing
i ru nthat cmd
and said status okay
but still and error when giving grants
@noble lantern really thanks man you are a nice person
Also sorry for pinging you all time
๐
so i made a test plugin and when i try to load it, it crashes luck perms. do i need to register luck perms differently? here is yml ```main: com.skulls.skullsmain
name: Skulls
version: '1.0'
description: Runescape Style PVP Skulls
load: POSTWORLD
author: melon
website: spigotmc.org
depend:
- WorldGuard
commands:
skulls:
description: edits skull information
aliases:- skulls
- skull
permission: skull.edit
permission-message: You do not have permission!
usage: /<command> [add|remove] [time]
permissions:
skull.edit:
description: allows skull edit command
default: op
skull.:
description: Wildcard permission
default: op
children:
skull.: true```
How should I access this scheduler outside the method?
private BukkitTask bukkitTask;
public someMethod() {
bukkitTask.cancel();
}
Bukkit.getScheduler().runTaskTimer(plugin, task -> {
bukkitTask = task;
task.cancel();
Bukkit.shutdown();
}, 10 * 20L, 0L);
}
That's what I have so far but I haven't tried it. I was just wondering if that's a good way to do it
skull.*: true
skull.* causes error
needed to be skull.edit
fixed```
How can I increase sekelton's damage? like zombies and spiders? attribute damage, does nothing...
is there a way to edit this?
the armor points
and it is possible to edit the armor resistance without enchanting it?
For the last part yes
Its called toughness
Armor has two armor traits
toughness and then the armor bar amount
idk the forumula but it all calulates out somehow
alright
i thing toughness is the actual % blocked out
cause its max value is 0-1 iirc, higher values get ignored
what would be the name?
Im not sure
maybe this can help somehow
you might need NMS
cause its not a standard attribute iirc
Its whatever you want the attribute to be
here is an example of my attack speed
AttributeModifier attackSpeed = new AttributeModifier(UUID.randomUUID(), "GENERIC_ATTACK_SPEED", 0.5, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND);
meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, attackSpeed);
yeah its that.
GENERIC_ARMOR is for your armor bar
Yeah but toughness is something else
generic.armor.toughness
ahh
yeah
GENERIC_ARMOR_TOUGHNESS so its a standard modifier then
i know it used to not be in older versions
@golden turret
^
you guys think mojang will walk the global bans back?
seemingly you can get a 7 day ban for typing Nigel in a sign which is a pretty good feature in my opinion
I hate Nigel, fuck that guy
armorResistance is 1
so /4 is 0.25
Are you censoring the N word or does nigel actually get you banned
cause if so fuck nigel
I dont get am i missing something
it was on the minecraft subreddit, a user got banned from their own realms server for having the gall of typing Nigel on a sign
oh my god
what did they do to test the string lmfao
if str.startsWith("ni");
watch out night might get you banned
night*
it's a good thing that minecraft is an english-only game
honestly i dont see why it wouldnt
yeah multi languages has to be a pain for that
idek why companies bother with censoring chat
if imma say fuck imma say it
same with any 9 year old whos been on the internet for 6 months
and then you cant talk about alcohol in game either
they act like they have no 21 and plus playerbase
I have a suggestion, let's nuke the country of Niger so that way we don't have to take that into account for chat filters
just erase it from the map
no more nigerian princes, they'll all be nigerian bunker survivors
or better suggestion
Does this annotation types exists on java?
AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER
lets pretend like it doesnt excist
so when someone says
"Im from niger"
Ill just say "tf did you call me?"
No
use lombok
@Getter @Setter
sec
ill get import
we'll also have to nuke Nigeria I guess since they're two different countries
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
nah
not in raw java
I have to say it is a bit awkward to have two very similarly named countries adjacent to each other
but with this yes
I think someone wanted the name niger
and they lost a war
so they added ia to the end
idk
lmao
it does feel a bit like someone is copying someone else's homework
nice
ItemStack book = new ItemStack(Material.ENCHANTED_BOOK);
ItemMeta meta = book.getItemMeta();
assert meta != null;
meta.setDisplayName(ChatColor.GREEN + "Your Enchantments");
meta.addEnchant(enchantment, integer, false);
book.setItemMeta(meta);
How can I make this item be able to be in an anvil to be combined with another item?
ping upon answer please
API name please
pog dog
Bukkit
Oh ok its vanilla spigot api
thats spigot verano lmao
its in the api already
stupid discord send my message bruh
oh my goood
send my messages wow
fucking hell
PrepareAnvilEvent?
that event 
So make another listener?
yeh
would there be an easier way of making an enchanted book?
im trying to take off the enchants of an existing item, to then be reapplied to another.
well
then do this
cause you can just rename en EnchantmentBook
and it still holds vanilla functionality
One sec
need to find the class
?jds
?docs
?javadocs
fucks sakes
found it
declaration: package: org.bukkit.inventory.meta, interface: EnchantmentStorageMeta
When you have an ItemStack thats an ENCHANTMENT_BOOK, you can cast its ItemMeta to this

mhm sweet.. I'll try it out!
Im not sure if that class exists on 1.8ish versions; it might not sure
i know in around 1.12 the prepare anvil event doesnt exist
so i think around that version that class might not also exist
So I have a reload command, and I need to know how exactly to save config, cancel task get new config from config.yml then start the task again so it loads in the new config.yml save
I keep getting a crafting error,
Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMetaItem cannot be cast to class org.bukkit.inventory.meta.EnchantmentStorageMeta (org.bukkit.craftbukkit.v1_19_R1.inventory.CraftMetaItem and org.bukkit.inventory.meta.EnchantmentStorageMeta are in unnamed module of loader java.net.URLClassLoader @2e5d6d97)
Burch do you have experience with paginated menus?
can someone make me some example code of the EnchantmentStorageMeta. ๐
Can you show your code
You could be checking if ItemMeta instanceof EnchantmentStorageMeta
maybe, refresh me what that is exactly
you just reset the storage YamlConfiguration you have
eg re-initialize it like you do in onEnable
in fact
yeah i seconded its bit of extra rough draft I've been playing around with this alot
your reload should basicaly just be onDisable and onEnable
all good
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender instanceof Player player){
ItemStack mainHand = player.getInventory().getItemInMainHand();
ItemStack book = new ItemStack(Material.ENCHANTED_BOOK);
EnchantmentStorageMeta bookMeta = (EnchantmentStorageMeta) book.getItemMeta();
EnchantmentStorageMeta handMeta = (EnchantmentStorageMeta) mainHand.getItemMeta();
assert handMeta != null;
//get enchants and remove them
Map<Enchantment, Integer> enchants = handMeta.getEnchants();
for(Enchantment enchant : enchants.keySet()){
assert bookMeta != null;
bookMeta.addStoredEnchant(enchant, enchants.get(enchant), true);
handMeta.removeEnchant(enchant);
book.setItemMeta(bookMeta);
player.getInventory().addItem(book);
}
}
check if mainHand.getItemMeta is instanceof that
instance of what? instanceof enchant?
okay okay
its hard to read
your casting ItemStack to a typeof ItemMeta (The enchantment class)
No
thats a weird error ngl
ikr
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.EnchantmentStorageMeta;
``` all basic imports
-
I wouldnt use assert use
ifand handle the null value it shouldnt be null (If it doesnt need to be handled you use a guard clause, egreturnso the rest of the code wont fire) -
Always check if the meta is instance of the object you are trying to cast to
EnchantmentStorageMeta bookMeta = (EnchantmentStorageMeta) book.getItemMeta();
EnchantmentStorageMeta handMeta = (EnchantmentStorageMeta) mainHand.getItemMeta();
So remove these and make an instance?
do an instance if mainHand.getItemMeta EnchantmentStorageMeta
Yes just like you do with instanceof player
just with enchantmentstoragemeta this time
ah okay okay
Normally you always wanna check that when casting
as with this code, the item in a players hand may not have that type of meta
ohhh
hahaha
wonder why he did that cause the string == an imported class
would think he would be smarter than that
he does math for me
thats the main thing i use em for
or front end bloat for android
for me he just repeats my recipes, then I change stuff acordingly
If there a way to accomplish this, not sure how to explain it values.addAll(Server.getShownUsers().stream().toList().forEach(t -> t.getName()));
I am trying to add all my User objects names to a string list
uhmmmm
yes but i dont know the exact syntax one moment
I've been trying to google it but not sure how to search it lol
s = user data object
s -> s.userName != null
you receive a uhhh
Predicate i beileve
sec
no
List/Collection
oh no
lol
I thought this would be simpler than creating a bunch of for loops and manually adding each to the list
Basically you filter through users firt and you can use a method referance i nforeach
ew
?paste
oops
ignore > 0
should be != null
i would wrap it in a method
like so
there probably a way to one liner it
but it will be aids for user readability
Server.getShownUsers().stream().filter(t -> t.getName() != null).forEach(t -> {values.add(t.getName());});
This works lol
A menu with pages, like depending how much items are it create a new page
Yep its same thing as i did, i just made it so you can get it in a method style format to re-usability in code
Thank you!
In that case, yes i have
Server.getShownUsers().stream().filter(t -> t.getName() != null).forEach(values:::add);
ohh ok
otherwise would be perfect oneliner
so he is adding and calling a method?
yes his forEach parameter isnt a string
Server.getShownUsers().stream().filter(t -> t.getName() != null).forEach(values:::add).map(do an action here);
๐
read the filter
t != string
he needs t to convert to string via getter
method referances cant do that
oh i didnt understand he was doing
yeah its a UserDataObject
and hes getting all UserNames
so his forEach paremeter is UserDataObject
But i didnt something related convert all players name into a list of names
members.stream().map(Player::getPlayer).map(OfflinePlayer::getName).collect(Collectors.toList());
What a perfect one liner
Burch im having troubles setting up a filler to the menu
so @noble lantern that code would work?
cause im still a little fuzzy atm it does nothing atm
Is there a way to change the overhead name with scoreboard teams?
Yes you can
team.setDisplayName() doesnt work
Hve you setted the team back?
changing the color works
so its defo working
its just that the displayname isnt setting
You have to set the team's prefix, not its display name
even shorter
Changing the prefix only adds to the front..?
@cursive kite
Is that not your goal?
I want to change the actual name!
Oh you want to change the whole name. No. That's not possible
You'd have to change the user's profile
Which has all sorts of fun side effects
just ask the player very nicely to change his name

It's for a hide command for my moderators ๐ฆ
if your moderators wont change theyre name for you, are they reallly real moderators
jkjk
"Hey if you wouldn't mind changing your name to 'TotallyNotSus' for this quick 15 minute game, ktnx"
Burchard
Verano
like 0 and 8?
if slot != 0 || 8 return
ez
if you wanna make a border
math nvm
lazy
need math for that but its simple
like a full box border
yeah i want to make a border on every line something like this:
|------------------------|
| |
| |
| |
|------------------------|
int startingSlowFirstRow = 0; // always 0
int startingSlotLastRow = (this.rows * 9) - 8; // (Maybe 9 im bad at math)
using the for?
then for 8 iterations of both of those numbers put your item
use those for top and bottom row
for sides just check if slot == 0 or 8
unless your making a box smaller than that...
then god bless your soul
thats what i do
what i do is i set all the items first
and then fill the inventory with those items if material == air
sec
i have example
allr
really thanks
Man im stucked
Also with filling and paginated menus
The one that have pages depending how much items you have
i set the items for the slots that are allowed to have the paginted items i have, then use this method afterward to set my glass pane backgrounds
eg if i set slot 1 to a apple
and use this method, it will fill entire inventory with whatever, and leave the apple there in slot 1 (considering overwrite == false)
your method you showed will fill an entire inventory
i dont want to fill all inventory only the borders
Not empty slots nothing
Only a square
so then do what i said earlier
.
using thise for the top 2 rows
And all other rows set 0 and 8 slot to the item
Its rly not a lot of lines lol
its like 5-8ish
:thonk:
Burchard helping verano code? ๐ค
:troll:
int startingSlowFirstRow = 0; // always 0
int startingSlotLastRow = (this.rows * 9) - 8;
for (int i = 0; i <= this.rows *9; i++) {
if (inv.getItem(i).getType() != AIR) continue;
if (i == 0 || i == 8) {
inv.setItem(i, item);
continue;
}
if (i <= startingSlotFirstRow + 7) {
inv.setItem(i, item);
continue;
}
if (i <= startingSlotLastRow + 7) {
inv.setItem(i, item);
}
}
my math may be one off for the last 2 if statements and starting variable
you basically just need the math for getting the last rows first slot
Did you just type that out in discord ๐
yes
and for 8 slots after as well
Agtree
On my phone doesn't show up ๐
^
for pages you need to keep track of the max amount of items allowed in your inventory
๐
Yeah lol
if size >= stop loading current page and make a new one
its reccomended you have a highly abstracted inventory api for this
or its gonna be a pain
Hmn its really diff every code from my own code
I have looked on many github examples
But no one fit my menu api
i was working on pagintation for my lib api
Can i upload it to github and invite you to see it?
no but i will be soon
pagintation for inventories is a lot of work to get it right
What time is it in your state rn
Here is 15th July, 1:47 AM
How can I recreate this?
This was the best I could get
With return Arrays.asList(args[1] + "min", args[1] + "hour", args[1] + "day");
not 100% sure but you might have to take a deep dive into brigadier
Aw
Brigadier is a nightmare
Is posible to merge 2 branchs into only 1 branch?
I have a class for that
because github is sissies
okay?
But there is a big problem
I want to merge diff project modules (1 module per branch) and then add the readme and parent pom to the main branch
๐ค
Can I see it?
sounds hard
yeah im opening paste
thx ๐
Maybe burch told him if is okay my way or coude be a better one
my way would prolly be atrocious
i would literally store each string provided as characters and provide index + 1 on tab complete
There you have
Lmao i did my bes tthere ith shity regex
More than 2d shitting about regex to achive that
Wait what does this class do
Is this so I can type /tempmute username 4<press tab> then it will show s, d, m?
The method format you can pass something like 1h and will conver it into ms
long duration = TimeUtil.convert("10s"); // 10.000 ms
Does anyone know how to reduce times on gradle's first compilation before the daemon is running?
The build time for this project while daemon is running is like 200ms so 45 seconds is quite long (On my pc my daemon doesnt take this long to start but this is in a docker container)
The second image is my installation script when the docker container starts.
Is there any options to run gradle without any project cachine, or better yet even without the daemon and just straight up compile?
sorry
haha
didnt mean to spam entire channel thought those pics were smaller
now i cannot steal your token

I think we might be misunderstanding each other lol unless I am wrong, I am just trying to auto complete a suffix
I just want to make these letters appear without overriding the value
public List<String> getCompletions(CommandSender sender, String input, String[] args) {
if(args.length == 1)
return null;
if(args.length == 2)
if(MathUtils.isInt(args[1]))
return Arrays.asList(args[1] + "min", args[1] + "hour", args[1] + "day");
return Arrays.asList();
}```
I tried just returning "s", "d", "m" but if you tab it deletes the number and makes it "s" instead of "439s"
yeah ngl im stumped
maybe you do need brigader
thats how i would do it
Wait
You said it only makes it s?
@noble lantern did my time unit class help?
yeah
They needed something else, read up
I know lmao is what i sent him
No this is something else
this
paired with this
The TimeUnit#convert("time+unit")
Example: TimeUnit#convert("10s")
The method returns you the ms depending on the unit, and them you just use that ms to set the timestamp
๐ค
what
timestamp???
huh?
this is tab completion
the number value is ireelvent
its strings
I know but i already parse the tring bruh
Look the code crefully
I use regex to parse the diff time units "y", "M", "w", "h", "m"; "s"
They dont need the time unit though verano
they already have all this setup
this part is user user entry
not actually handling the time
They are trying to make TabCompletor auto add a time unit character at the end of a provided argument
in the array list
this code does that perfectly (presumably)
Anyways king this question here
see yah!
i would keep it like that ngl, i like it rather than the ladder option
If your wanting to remove user input from the tab completions, you will prolly need brigader i cant think of a way to do that with spigot
Also sorry for asking but for spawning particles should be in async?
Becaue im planning to do something like traiels and things like that
Thanks
The math can be async
But packets get synced anyway
So donโt just send it async cause that ainโt gonna help that much
Guys I wanna start coding plugins can someone help me with it
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
I would highly recommend that you start out with the java basics. At least to the point where you understand what an instance is.
Whats a Java
whats a computer
Thats a fork of JavaScript. Its not as clean but we had a jump of 57 billion devices in one day.
Yes. You can do everything. Even do super fast super clean checks like 10 ========= 'x'
how do I disguise it as a player?
Java is something that runs minecraft with coffee as its icon
Thats really hard to achieve. I would recommend LibsDisguises for this.
How to use duplication glitch in the server
How to enable duplication glitch in the server
Oh My god
have you tried to use alt+f4
did i not just kick you for not asking once
Sorry I am new I didn't knew that we can't do that
Yes
did it work?
Do we have to change any setting to do so?
Nope
then try again
Well you can programmatically induce all the duplication bugs you want.
not sure if you got answered or not
but no
Can someone tell me how to make a kit gui with command panels
Ok where you wanna start
Send me the config for it
What
does anyone use jetbrains space