#dev-general
1 messages ยท Page 29 of 1
don't understand much how configurate works tbh and dazzleconf looks better imo
but will see
doesn't configurate have annotation based configs like dazzleconf?
im gay
cool
And most important, outdated
;-;
it works anyway
if I go by that logic I prefer dazzleconf
was there any change on blocks broken in 1.20?
wdym
what would be a good way of storing an armorstand persistently?
aka be able to get the armorstand object after restarts and modify it, etc.
don't
just store the details about it and recreate it when you restart
ideally also don't actually spawn an armorstand, just do it packet-wise
but that depends on your usecase
if you actually want to save one, you can get entities by location iirc
its for a top 3 leaderboard, each armorstand representing one position
uuid?
I mean just spawn the armorstand would be the easiest way.
If its per player, you can save specific data to the players PDC
not the point, I need to modify it, so suppose uuid would the best?
didn't think of that, ty Alonso
I use uuid for my leaderboard plugin 
issue is that in old version there is not getEntityByUUID or similar
so yeah, loop 
What version doesn't have it?
mmm iirc since 1.12
yes, 1.12.2
(prob 1.12 too but no one uses that xd)
and method was getEntity(UUID), mb
Was gonna say I got entities with UUID can't check my code atm
Packet are the easiest way to handle that, just spawn and despawn based on player being around or not based on a saved location, no need to worry about getting the right entity or removing/adding them on start/stop
Though, for this display entities would be better ;p
I think he uses armor stands also for displaying the player that's on that position (e.g. use their skull) - not only for a hologram
exactly
tbh i would just use an existing made leaderboard plugin
how would you check if player is around, just wondering
Location#distance and compare that with the armorstand locations
what i meant was when to check, not how xD
global task, task per player, move event, other?
distanceSquared ๐
Async task per leaderboard
Or a single task for all leaderboards, doesn't really matter
so an async task per leaderboard checking near players using nearbyEntities or looping players in world and getting distance?
client wants builtin
Loop through players
how efficent is looping thru players if scale is over 400 in 1 world/
i would suggest you write a storage system for players like chunk cubes or something
so u just send to nearby cubes the packetts..
and move players from cube to cube depending on some task that can be highly optimized.
With 400 players in a single world you'll have plenty of other problems before this becomes one

in the grand scheme of things doing 400 iterations isnt alot
If a plugin isn't improving the severs tickrate to 30tps then it's basically trash ๐ ๐ ๐ค
On spigot/mojangs api it is xD
It is not lol
correct but operations like this can happen 50x a second
which is already way more then 400
honestly didnt encounter many with 300 players
in a 1000x1000 world.
not sure really what nearbyEntities does maybe ill take a look into bukkit
it probably loops as well and checks distance
It might check more things, you'll have more entities around than players for most of the time
for (Entity entity : location.getWorld().getNearbyEntities(location, radius, radius, radius)) {
if (entity instanceof Player) {
Player player = (Player) entity;
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}
i might write custom playerlocmanager so i can make a big difference in the chekcs
by splitting players into groups according to their location
oh i i cant send pics
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
sec it requires to register ill just find free service instead

anyway
So you'll .. loop through players to separate them into groups .. to avoid .. looping through players?
Which will constantly need updating because players move
way less often and change it upon some events
like teleport
players dont move that fast i either can write an faster check if player nears a border
You're over complicating a problem that doesn't really exist, it's juat a few players lol
we always aim from highest quality haha
You're probs better off checking on playermove then
If used wrong
Premature optimizations aren't really highest quality
But you can capture the players new location and run the check you need async
Could also add a delay so it only captures every 5 seconds or something.
yeah you can
you can do same with group things if player gets within from border short the check time
spatial indexing techniques were proven to be way more efficent in high scales
you can do math and write pre made numbers like caclulate how much time it can take a player to walk that distance
for example if player distance is above 100 20sec if below 25 then 4 sec
Could also only check the player not all entities.
if u write own storage map you dont store entites in it
u dont send packets to entities no reason to store them there...
but it really depends on the goal
also guys an question related to bukkit api is there an event fired if player moves an itemstack inside his inventory?
i work on an update for my plugin and i cant really find an event in the docs
i dont want to loop constatly over players inventory (heavy task on high scale.)
inventory interact event?
does it affects player inventory?
i have seen that event
but it dont work on client inventory
like self player inventory only on 3rd inventories
It affects all inventories
How to show hearths above head players?
Are you trying to make a plugin to do this or are you asking what plugin to use to do this? I think it might be also possible without a plugin at all just using scoreboard objectives but I can't guarantee.
should be smth like /scoreboard objectives add HP health {"text":"HP","color":"RED","bold":"true"}
then /scoreboard objectives setdisplay belowname HP
If i do Dark_Red
it doesn't work.
I see the colors not working XD
Has to do something with Placeholder API?
no? you're not using a plugin
also is there dark red? I thought &c is just RED
Yeah, &c is just red
4 is dark red
ah right. I forgot that exists
Dark-red?
dark_red
fixed
Back to figuring out why the new blocks are not being detect in Statz?
do some small debugging men probably the new API didnt register them or so
like if the server software unable to fire the event then listen to thee packet the player sends when he breaks thee block ~
maybe its also somehing on client side that causes no packet to be send from player but it no sense thing
if it dont fires you will have to write a class to connect server pipeline and do some tests to see the behavior also decompile mc to see maybe its client side thing , a cheap alternative if problem is not on server side and the client does not send the packet try to spoof the block to something else and retexture it ;p
just ask
#development
Thank you and sorry.
new github ui?
yeah
there is also file navigation etc
has been like that for a while for me though
Looks ew imo
what changed?
Ohhh. they released the experimental features. I see
the nav bar is different
Steam also updated their UI
The little icon on windows now pops this up for example
store aswell
steam has always had the most inconsistent of UIs, get don't really give a fuck lmao
Does anyone know a good Js/php library for putting text with shadow on an image?
canvas?
You mean the html canvas thingy?
I wanna add text with soft shadow to images in bulk, I dont think canvas can do that
grass
anyone knows a good chat prompt library/api?
Adventure supports clickable components, unless you're specifically looking for a library that wraps a timer around it?
meant like, the plugin sends "What's the name of the player?" and you answer in chat
and it gets that input and executes X
anvil api
oh I read that wrong, ups
yeah, the old af conversation api would do that
Or i mean, you can just use the chat event
is there no other option?
would prefer an easy way to do it and pref. not the conversation api
it is not that hard to use, it just takes a second to get the flow
you basically use the conversation factory class, add a prompt and then start the conversation
confusion
it's past midnight, my brain doesn't have enough processing power to figure that out
what are the main points that people use as argument on why mythic mobs sucks?
abuse packets?
Somebody knows how to put uclan v.6 clan name infront of name in chat.?
And im looking for a good anti x ray
paper has one built-in I think
here's a guide on how to configure it
all paper forks should also have it too
k k thanks!
I run a fairly large server and mythicmobs has never caused any issues for us
It performs very well assuming you don't do something silly with it
In maven pom, it says to use | as a separator when using a colon: https://maven.apache.org/scm/git.html
But sonatype ignores this rule: https://central.sonatype.org/publish/requirements/#scm-information
(Git hosted on Github should be ...github.com|simpligility/... instead of ...github.com:simpligility/...)
๐ค ๐ค which should I do?
when publishing to maven central
man have u ever had to copy like 20 classes cuz an api is so dogshit and doesnt use interfaces lmao
Me
stealing code !!! ๐ฑ
๐ค
any translation for english from the smart devs here? :/
when does this occur
version?
i updated from 1.19.4 to 1.20.1
paper?
ye
maybe report it to them ?
Is ur client on latest
my best guess would be mismatch of the data sent/read (server => googoo gaga iduno what to do with ur data)
ye
viaversion?
It could be a plugin incompatibility tho
Try removing as many plugins as you can while keeping the error
nop i dont have it :/
yee that would be a solution
binary search plugin removal xD
oh ye i found the issue and fixed it already ye it was caused by a plugin
may I ask which?
Use adapter pattern instead
Adapt their classes to ur interface
nah but the issue is
their classes use concrete implementations and dont use the interface version ๐
idek why
so the only way is to manually copy the classes and replace the concrete implementations with the interface ones
which the adapter pattern solves?
whats the issue with them being concrete
the other part is also exposure
the library doesnt expose some of the abstract classes/methods that its own implementations use
ye technically adapter pattern solves it, but big yikes regarding that api or library w/e
cuz like, sounds a bit smelly if u have to resort to adapter
uhm are there alternatives to the bukkit scheduler?
java.util.Timer or smth like that
ItemMeta meta = item.getItemMeta();
List<String> lore = meta.getLore();
lore.set(lore.size() - 1,"Ammo: " + (ammo - 1));
meta.setLore(lore);
item.setItemMeta(meta);
why does his update in super delay?
like other things afterwards it happen 2-3 times meanwhile this updates only once
ill debug to show behavior
then what are you
dont create xy problem right there
I would consider that asking for support but well
still don't understand what you are saying though
im not asking for spoon feed or what ever asking a general question why an itemstack updates in delay via bukkit api
help/support isn't spoon feeding either lol
other code executes 2-3 times meanwhile the itemstack only updates once
whatts the logic behind tha shit
it's where you ask questions and get answers but whatever, regarding the question
if I recall correctly it's a limitation on the bukkit api? I am not 100% sure
no wonder most gun plug-ins also have a delay on updating
imma just stick to map i guess to store the weapon serial ID and ammo loaded kinda sucks i will have to add a table for it into the ammo values when i clear the cache
i dont know didnt use any plugins in the past lol
me neither, but have seen them lol
where you storing those in lore/name?
why don't you use โจ PDC โจ
PersistentDataContainer
sorry im using dino version probably it does not exist
introduced in 1.14.4
im on 1.6.4
What the actual Frick?
I though people using 1.8.8 was already bad and you are on 1.6.4?!?!
why?
no reason ...
hell this gotta be rare, someone take a screenshot
then do yourself a favor and update to latest.
what?
i coded some commesions for newer versions
what the actual what
rich api
your players want that low version?!

1.7.10 is almost 9 years old
1.6.4 is more than that
how many players do you have and what type of server is it?
if I may ask
its a gun survival server
not like minecraftt survival
simillar to rusttt
i use texturepack to change blocks and things
around 200 at pick
at the moment server undermaintaince
so i decided to rewrite gun system
there many servers on old versions
probably forge servers moded and etc
and by t is broken so sometimes it just outputs few times
laptop ;/
classic 'we dont update cuz <insert-non-valid-reason>'
11 ^
lol
nah i do understand big networks like hypixel
they are also stay in old versions
they also*
why are
fuck
I would HIGHLY suggest updating. It's not worth the hassle supporting that old versions and you won't get any support on them either from almost anyone. Make a poll asking your player base and ask for an upgrade.
also, Hypixel started on 1.8.8 so they still support it, but they have a full custom api, not spigot/paper.
i want to update so badly because new versions allow multi textures over armor
and 1.6.4 to 1.8.8 is already a big difference
i dont really use spigot api i use nms..
๐
either i dont use spigot
itts bukkit ;O
but same thing + -
im not sure what they added when forked bukkit (spigot)
yeah I am going out of the convo, this is really triggering me, I can't handle people who refuse to update because X and Y.
You should do some research. That's what I suggest you doing.
nah i want to update to 1.12 at least
because it allows to display multi textures
at one itemstack
like using durability
if you are going to update from 1.6.4 to something then update directly to latest
simple.
more ram will be consumed
as well minecraft is single theard
server will blow up on 200 player on new version in single world of 1000x1000
but letts forget tthatt conversattion itts off ttopic
edit link missing on overview page on Spigot?
also all my resources the update button is this now
do what it says lol
ok, so Spigot wants to confirm its me a better way?
now I need to wait to see if I did it right
Has anyone ever had an issue with sqlite and an InstantiationError?
java.lang.InstantiationError: org.sqlite.jdbc4.JDBC4Connection
The stacktrace points to the JDBC4Connection line
final Path path = new File(plugin.getDataFolder(), "plugin.db").toPath();
...
final SQLiteConfig config = new SQLiteConfig();
config.enforceForeignKeys(true);
config.enableRecursiveTriggers(true);
// vvvv THIS LINE
return new JDBC4Connection("jdbc:sqlite:" + path, path.toString(), config.toProperties());
Is there anything else to the error? Like a caused by thing
I haven't gotten this error before but I hope there's more to it
There's nothing at all more to it and that's what's so damn confusing
Maybe u can find using where the stack trace came from
Like where in the sqlite code it came from
Idk
Doesn't even give me that
Wdym
I mean like where the stack trace is coming from
Idk I havent used sqlite so I can't really identify if u coded it wrong
fuck pasted wrong
the rest of the stacktrace is just standard loading the plugin from Paper/Spigot's side
ConnectionFactory.java:66 is the instantiation of the JDBC4Connection shown in the snippet
Oh
Yeah there's like no information at all to go off of
So the class isn't loading at all
I think?
For some reason
I'm not sure
Since it's not pointing to any constructor or anything
wdym
From javadocs:
Thrown when an application tries to use the Java new construct to instantiate an abstract class or an interface.
I've been playing around with gradle and shadow thinking it's an issue of either of those not including the files but i've checked, they're all there
But that'd error out at compile, and I get no compile errors
Not to mention, that class isn't abstract or an interface
it's the standard sqlite-jdbc library:
How does ConnectionFactory:66 look?
R u relocating
@drifting aspen
Tried with and without relocation, no change
You sure you should directly instantiate the connection like that?
It's based off of how LuckPerms does it
They use reflection/class loading stuff because of how they handle loading dependencies at runtime, but unless I'm missing something it's otherwise identical
I'd go with kyngs ^
I'll try the DriverManager version but I've used this method before and never had an issue so idk what the deal is now
In my plugin I'm also loading dependencies at runtime, yet I'm using pretty much the same way as the tutorial I sent
keep your ninja goddamn save
what kyngs stand for?
:(
Ask @drifting aspen ...
ok somehow the DriverManager technique worked
I don't understand howtf but ok
I think that directly instantiating is like internal usage
And shouldn't be used unless for a specific reason
I'd used that method before without issue too which is what's confusing
But it's just a guess
I'm honestly quite surprised it works for luckperms
Hey I mean
yeah this is why im confused
only thing I can think of is maybe it has something to do with it not being pre-loaded in the class path?
or something weird
You should use the DriverManager way with any JDBC connection
Nah, that should throw ClassNotFoundException
As I said, i've never had to with sqlite before when I've used LPs method, and I've never normally needed to use the DriverManager way outside of sqlite cus normally I'd use Hikari or something as a datasource
now let's see if i can turn on relocation and stuff
I mean, I also use Hikari for SQLite
not on 1.17+
Oh ok
Paper's way of loading plugins
kinda ruined it on minehut tho
What is that
sth i saw on minehut paper servers
Ik paper has paper-plugins but it's not called that
it keeps making plugman reloading impossible
Lol
Ok seems to be working, now time to see if my plugin actually works outside of that xD
i need to workout what the thing is for hot-swapping in a dev environment, i've forgotten
It won't work in this case tho
It doesn't support adding new classes and methods last time I used it
Which was a while ago
I'm testing the plugin itself now, not the sqlite thing; that seems to have resolved, for now anyway
Long while ago
Oh no, that's so horrible! It doesn't allow you to break plugins!
I'm the weird sort of person to write basically an entire plugin without testing it once and then test it all at once
Not weird imo
Unless we both weird
not impossible
Lol
I categorically reject unit testing
I think I have 2 projects with unit testing
i don't even understand how to unit test with MC
Oh I have unit testing in non mc libraries
But ig u could mock test
But difficult for medium to big plugins
Although there's things like MockBukkit to help although I haven't used it before so idk how well it works
anyone ever used https://gitrows.com/ ?

what
๐
don't wanna use it as an actual db lol
more like CMS lol
just use a CMS lol
Yeah but here is the thing, it's supposed to be an open collaborative project
and it's hard to do that with a limited 2-3 user cms lol
2-3 user cms? just use any open source cms
completely free, as many users as you want, etc.
self hosted though I assume
and it's more the thing of having triage and the PR feature
etc
Are you trying to find alternatives?
Oh you're currently on a cms. I think I'm just confused.
yeah I am on cosmicjs cms and probs going to github
Anyone know any alternatives to Guava Table that supports concurrent maps?
Sounds good but pretty sure its already used isn't it?
yesish, years old, outdated and abandoned craftbukkit plugin
A database
wot
How do you make the font larger
how has java changed for the past few years? like the major changes you guys deem useful?
Like literally 3 new versions or wdym
using records for configs sounds pog now that I think about it
oh yeah dude
that's what my favorite kotlin config library does, you just define a nested data class with a bunch of data classes in it and it converts em super nice
lmao i have no idea how i thought they meant minecraft java
just use lombok
@Getter
@Setter
@Builder
easy
and miss all the good features
can you like, click this pretty button?
๐
Does the PlayerMoveEvent not get called for every mouse movement?
The packet gets sent much more often than the PlayerMoveEvent
Its limted to 20 I think
per second
Rip thanks, guess I'll just have to use the packet
Also doesn't work if you're a passenger. Unless that has been fixed.
Are you sure that'll help? I think that the notchian client sends it once per tick if the location has changed even if the client is stationary.
The packet is definitely sent more often
Citing wiki.vg:
Vanilla clients will send Move Player Position once every 20 ticks even for a stationary player.
It kinda doesn't make sense to send it multiple times per tick, considering the server process the changes each tick
I donโt need it multiple times per tick, itโs just that the PlayerMoveEvent doesnโt fire for small changes in the mouse
Iโm listening to move and rotation
confused do you want or not to check for rotation?
Yes
That's intended behavior
honestly not as hard as i wouldve hoped
you cant return to exit early in a switch expression
its rly annoying cuz in a lota cases u might wanna do like
var message = switch (result) {
case Success -> { return; }
case Error(var message) -> message;
}
or stuff like that
im also pretty sure cuz of weird scoping rules u cant use message
this just looks cursed
yeah not being able to just use return statements is rly annoying as well
just enjoy the new feature instead of complainin it doesnt do x 
good solution
im not saying its bad
not as hard as i wouldve hoped
Im just saying how generally people react to new stuff
Is that your new favorite gif or something?
Perfect for the jeep
how do i get rid of this new gh ui
its so ugly
nvm
i needed to click the disable button apparently
you can, but you can't in switch expressions
and I'd say it makes sense to be rather conservative with adding new features like that, because it opens a large can of worms with limited benefit
Some mc server hosting company made a video about my smol plugin ๐ฅบ ๐ฅบ
https://www.youtube.com/watch?v=d7jVPIfzuEg
I am this (๐ค) close to reaching PAPI-level legend status ๐
What do I do with all this clout now, should I publish my own ebook?
Yeah cuz theyโre expressions not statements
Sure kotlin can but statements bad anyway
is there a spigot update tracker of some sort?
mmmm wdym
Donโt you have like yield for that shit tho in Java?
(iirc @hard dagger )
I think he meant to exit the method if you are using the expression to assign a value to a variable
E.g. if the value is invalid, instead of assigning null to the variable and then do a null check, you return directly
That the expression is inside a function and u wanna return the function inside the expression?
๐ฅด
Perhaps
Else yield should work pretty much :3
yield will probably only exit the expression, not the method
Anyways isnt like I will use java 21 at work anytime soon 
you still at 8?
fr 
Think 17 is our standard at least
Yeah I was just a bit disappointed
Thought we would get structured concurrency api fully delivered in 21
Ye ofc
Though we dont develop software so it is not relevant, we test software
โ ๏ธ pooper old version user alert โ ๏ธ
imagine not hopping onto the latest software version exact moment it gets released
bro's on the bleeding edge
โ ๏ธ bleeding edge or nothing at all โ ๏ธ
Yeah yield is just for expressions it doesnโt return from the whole method
Itโs a little annoying not being able to early return but also i reckon it might allow better performance
is that a kt thing?
yes
ah I c
but my theory here is that kt when has to just compile to if/else
whereas java switch can always be switch bytecode
yea sounds reasonable
ok java switch with constants is just a lookup table yeah
if you use pattern matching it does some funky MethodHandle stuff like with lambdas, but it's still also a lookup table
kotlin is being annoying because it's actually optimising things
YES i was right
fun main(o: Any) {
val x: String = when(o) {
is Int -> o.toString()
else -> "what"
}
println(x)
}
``` just compiles to if/else
though maybe thats for compatibility
yeah even with java 19, dunno if you can enable java preview things
but also this probably isnt true
Only for small when, if you have more cases it'll compite into a switch
Compiles into a var that gets reasigned in the switch, for your case, if it's more than 3 I believe
it can only compile to one of the switch instructions if the value to switch on can be somehow mapped to ints
^^ which is what this does in the java preview
i guess kotlin could do the same too
programmer humor forced to reopen? ๐ซก
indeed
uhm quick question, for instance, using Folia, when do I know if what I am executing should be ran at the location, at entity or whatever? I am a bit confused on each methods usage situations
if you're gonna do something on the entity, use the entity scheduler
if you're gonna do something at a specific location/block/chunk, use the region scheduler
if you're gonna do something that affects global stuff like, weather, time of day, etc, use the global region scheduler
if you're gonna do something async, use the async scheduler
although if you're certain what you're gonna do doesn't need scheduling (for example, changing a player's health in a player event), just do it
events will be dispatched on the region the action takes place, so for some cases you don't need to do any scheduling
#1113758470689263616 message
7+ years of development experience but started learning 5 years ago 
making minigames using like skript or smth for 2 years?
dkim
hi
It's going pretty well
Trying to learn android development
How's your day going Emily
๐ฅฒ
Awesome
me when I wait 1 (one) single minute
Days going ok
Nice
My shelf is almost finished, I just need to stain the wood
ooooooooo
it's alright
DIY shelf?
I used french cleats for the "hanger" part
i used my best at that "post your favorites touhou memes" already
but i got plenty more
โ๏ธ Quoting Emby ๐ฆ ๐ CEO, AX (@mcsquiddies)
who got that one touhou video
Kinda
dkim are you okay
Did you look up the cleat?
mhm
how about this
val message = (result as? Error)?.message ?: return
That looks like kotlin?
Hi. Is there a plugin that can disabled the nether and end and then enable them if u buy something trying to make a gui
but idk a plugin that will work
@obtuse gale if u respond pls
ty
This isn't a direct solution but note that you can use a plugin like DeluxeMenus
So all you need is a plugin that can toggle the nether and end (since you can use DeluxeMenus for the GUI)
Also note that this can be toggled in bukkit.yml and server.properties, but requires a server restart
And lastly, next time please ask in #general-plugins, #1007620980627230730, or #minecraft ๐
I don't think there's a public plugin for disabling the nether or end though because there's little use-case and the alternatives I mentioned already exist
but just wanted to point out deluxemenus in case you do find one
wait I misunderstood
buy something trying to make GUI?
wdym by that?
i will show u one sec
I want the world to be disabled at first then if they buy the end/nether it will open for them but only them.
Until other people buy it
are these specific portals? or an smp-like server where ppl can make their own portals
its a smp server where people can make their own portals.
what if I have to do stuff on both, entity, chunk and whatever, aka in several stuff, do I just run each specific part in their dedicated scheduler?
is material theme broken for someone else? Some things have the accent color and they are not supposed to
this is how it looks if I switch to a random theme and back to the one I use
make it a bit darker
make what darker?
anyone ever used https://vaadin.com/ ?
Build modern Java web apps faster with Vaadin. Our framework includes a large library of UI components and is designed for apps with a Java backend.
@static zealot Vadim https://www.youtube.com/watch?v=N62wiVO5-K8
works fine for me
Skill issue

is it still broken? 
Yeah
No need to ping me twice, just wait
does it make anyone else feel icky when you do things like getServer() instead of this.getServer()
it just feels wrong
not really
sometimes I use this. something I don't, I do not care cuz I am a big chad
@distant sun can you help out this dude https://discord.com/channels/164280494874165248/1121665184314949813
stop tagging me wth
ahh alright, apologies
oops, forgot to turn off reply ping ๐ตโ๐ซ
https://builtbybit.com/resources/itsmytraining-premium-prompt.27762/?ref=discover paying for chatgpt 
bro wth ๐
@lime gate how do you accomplish changing the size of the NPCs?
3/4 of the examples are just JavaScript lmfao
I wonder if all you get is a txt file with the prompts ๐คฃ
๐คฃ
Prompt sir
im using google font
oh nvm you mean logo
I'm using Blockbench xD
yess
I need a little help. I'm working on a rank gui to purchase ranks on my server. I want to make it so you have to be a certain rank in order to purchase the next rank (so players cant skip ranks and just purchase the highest rank) I'm using deluxemenus
view_requirement:
requirements:
rank:
type: "string equals"
input: "%luckperms_in_group_mystic%"
output: "yes"
thats an example of a view requirements in a rank upgrades menu i have in dm
it ll check i the user has the rank mystic which is my first don rank
so the price for the rest goes down etc
np :d
left_click_commands:
- '[console] eco take %player_name% 135000'
- '[console] lp user %player_name% parent add master'
- '[message] &a(!) You have successfully purchased the ὀff&n[Master]
&r&arank!'
left_click_requirement:
expression: '%vault_eco_balance% > 135000'
filler_item:
material: GRAY_STAINED_GLASS_PANE
display_name: ' '
slots:
- 0-9
- 17-27
Im having an issue now with the filler not working in my gui. Did I write the filler right?
any ideas why the src is not showing?
remove and re-add the project in settings > project structure
Didn't work? Unless I am doing smt wrong?
probably
i usually just completely delete the .idea & remove and re-add the project when it fucks up
it's a bit of a pain to fix
Prob have to set source set
If that doesn't work then @pastel imp right click the java folder in src/main/Java and set source set or smth
Idk
yeah do what dkim said
there is no option to set source
I've found out that opening the gradle tab and pressing "Reload all gradle projects" usually works
Any ideas how paper plugins work? like bootstrapping and loaders, I read the docs but failed to see the use case...
Are these dependency things like checking if PAPI is in the server or what exactly? I am a bit confused overall. Do I need the onEnable method if I use loaders? etc.
i mean
the docs kinda say that bootstrappers & stuff dont do anything atm, theyre to support future things
but they give a good example of downloading dependencies before the plugin is initialised
and having isolated classloaders so that you don't have to relocate every dependency and shit
downloading? like spigot's libraries thing does?
or what exactly?
and are these a replacement for the bukkit javaplugin or do I still need that one
https://mclo.gs/TmWzMVX
I need help. I just wrote this config for a menu and its not working at all
its for a ranks gui menu for deluxemenus
yes
half-replacement
man a pdm revival with this would go crazy
elaborate please?
pdm = ?
i mean i dont know for sure but the fact that it still says JavaPlugin implies it'll still be the same JavaPlugin class, maybe with a few breaking changes
wait wouldn't this make it a requirement to have access to internet? Making offline/local servers unable to use it?
possibly
i feel like you're misunderstanding me though
that's one of the potential uses, it's not like it's made specifically for that
but also dependency downloading is already a thing
there are various workarounds for offline usage
yeah true
You can just give them a zip with the jars
Also, I personally believe that the offline servers thing is just a dumb rule of spigot
Wdym
isn't that a rule only for paid plugins regarding their DRM?
wait what rule?
It also affects plugins that download libraries at runtime iirc, idk if it matters if the plugin is free
it wont have the downloading rule afaik, but it also doesnt allow premium plugins
but tbh i wouldnt be surprised if spigot gets entirely phased out in the next few years
hangar for most, bbb/polymart/whatever for premiums
That servers need to be able to run offline ๐คก
After paper hard fork it will mostly disappear tbh
exactly
I remember I once saw a discussion where it was mantioned that you should provide a zip with the jars or something like this
yeah thats the workaround
Although, the server itself doesnt need internet connection, but you do (???)
because it's not 100% offline, it's some weird rule which means that workaround can exist
@distant sun i don't know where you got that rule from but it is not a thing, there is no mention of "offline" or "internet" in the regular resource guidelines, and the only mentions in the paid resource guidelines are about DRM, DRMs requiring internet connection are straight up prohibited and code requiring access to an external server must be fail-safe and the plugin should continue working somehow
Man I swear this is mentioned somewhere 
But yeah, looks like it is not on the resources guidelines, welp
by offline I meant like, localhost without access to internet
also that rule for paid plugins isn't so much about the mc server being offline, but the target server the plugin sends requests to being offline or failing in some other way
you have bigger problems than a paid plugin not working if your mc server doesn't have an internet connection lol
Yeah ๐คฃ
So theyll have the internet to download the plugin but not install its dependencies?
maybe they installed the plugin and are testing it in local in a plane?
who knows
or there is an internet outage where they live, and they wanna continue work?
there are a few occasions where this could be an issue
I need help guys
ok
https://mclo.gs/TmWzMVX This gui I made using deluxemenus isnt working and im not sure why
im not getting any error in console its not loading at all
that's a question for #1007620980627230730 
thank you my apologies
Which plugin version does the big prison servers use? Most have compatiblity from 1.13 or so to 1.20 but yeah
Does that mean they just use 1.20 api?
Does anyone know how I can run code before the event happens?
what are you trying to work around?
and event handlers already do happen before
eh...
but yeah ^^ more appropriate question
Im trying to make it so the players sounds stop before they teleport, then they are teleported
I have regional music that seems to overlap when they teleport
@EventHandler
public void onTeleportResetSound(PlayerTeleportEvent event) {
Player player = event.getPlayer();
if(event.getPlayer().getLocation().getWorld().getName().equals("Hub")) {
Location from = event.getFrom();
Location to = event.getTo();
event.setCancelled(true);
player.stopSound(SoundCategory.AMBIENT);
player.teleport(to);
}
}```
I've tried this but I'm getting a Teleport is unsafe message from another plugin
(CMI)
don't teleport in the move/teleport event
call event.setTo instead of cancelling
wait what
you're just teleporting to the same target location?
what
Yea im just trying to stop their sound right before they teleport to whatever
it seems to do it after which stops the song from playing when they enter the region
well, the teleport event is called before the actual teleport happens
i guess just, cancel and teleport 1 tick later
simply cancelling the sound doesn't work?
won't that fire the teleport event again?
oh yeah lol
You'll probably have to use packets
Wait does teleporting actually play a sound? I would assume it doesn't unless using an enderpearl
i mean, stopSound does pretty much just send a packet
i suspect there's something with packet order processing on the client
could delay that by a tick ig
well that's the thing, the sound has to be stopped first, that's why the suggested solution is to delay the teleport
i finally finished updating all 20 of my plugins (locally tho ๐ญ)
now i have to update them on 5 platforms each ๐ (100 updates total)
When I create my own problems:
HEY
Just calling it like I see it ๐
what does this mean? ยง$2
context?
The $2 could be a replacement for something - maybe the color?
ah it's getting the 2nd group I think
my guess it replaces all colors with dark green
I think, it's in my code of a plugin I took over
here's an example usage
note that the $2 isn't any like special java feature or anything, it's regex-specific
$0 = whole match
$1 = first group
$2 = second group
code seems to work, even after I removed those lines
someone give me names for configuration library
UwU configuration lib? link?!
What type?
Also, Sparkfig? SparConfig? idk lol
wdym?
those are shit
is link a suggestion or u want the link
What type of config is it for? Yaml, json etc...?
me want the link
although its probs in kotlin
so pain
prob gonna have implementations for both
did you just accuse me of probably being a kotlin user!??
also i havent got a link cuz i need a name first
aren't you? or am I confusing you with someone else?
can be...
๐ค
so.... are you?
i mean ive got like 200 wakatime hours of it
but no
i used it for a bit now i only use it for adding kotlin support to my java libraries and gradle build scripts
imma just do spark config
you can change it afterwards anyways
but I am highly in need of a config library to use for my "essentials" remake
might just do my own simple one
lol
u still need one ๐ญ
actually nvm imma do warp config (definitely didnt ask chat gpt for this)
yeah dazzleconf is weird, cool but I am unable to work with it, just not comfortable
might just read the config and store data in a record, that's how I will do my simple system
how do you plan on structuring it? Like I said, I will be using records, would that be a good idea?
its gonna use interfaces and records
Records are final. Doesn't seem like a good use on something that is suppose to be edited lol
why would the application modify the configuration?
I mean that data is (should be) cached untill you set the file... So if you can't edit the cache...
it only gets edited on reload, at that point I can generate a new record and replace the old one
hopefully itll be smth like this
// record
@Configuration
record EpicConfiguration(@Property("some.string") String someString) {
// idk how imma do defaults for records yet
// wanna do an annotation but thatll be annoying when u have more complex types
}
// interface
@Configuration
interface EpicConfiguration {
@Property("some.string")
default String someString() {
return "some default";
}
}
Records are just perfect wdym yapp
I will never understand annotations so I will just not use them
well I still need to read the file.. might use snakeyaml? no idea
I mean if you're not gonna edit them obviously they would be fine. I was thinking more (cache -> edit -> set)
Defaults for records is a bit eh, I couldn't figure out how to do it with configurate ๐คฃ
Interfaces are an interesting approach
Maybe ill just have a diff annotation to mark a secondary constructor or whatever theyre called which can initialize its defaults
Thatll get messy tho with a massive this call
itโs a shame thereโs no real nice way of doing it
Yea 
are you able to easily get all fields of an interface? without annotations perferably
Whats wrong with annotations
not interface, record mb
My library does class generation at compile time which means you get a pretty clean interface imo, at the cost of a lot of silliness at build time ```java
@Config
@Source("database.yml")
@NamingPattern(NamingPattern.LOWER_KEBAB_CASE)
public class DatabaseConfigDTO {
String hostname;
String database;
String username;
String password;
int port = 3306;
@Nullable
String tablePrefix;
}
nothing, I am just not good enough to do my own
oh then yeah, easily with reflection
me who is not that familiar with reflection
what exactly are you familiar with then lol
Or rather, why are you asking this question
Is probably as easy as Class#getDefinedFields
getRecordComponents()
^^
And annotations are used for more context, different path than the field name, default value, whatever
hmm so might be able to do it how I wanted.
Was thinking on creating a record and when loading the config I would get all the components and get the respective values and then create the record.
Would that make sense?
Uhh yes?
suppose it's a thing of how I execute it
Thatโs how literally every library that does that works lol
Configurate is what I use most of the times
tried configurate and simply wasn't comfortable using it
It is a bit verbose ig, but not that hard to use
not about difficulty, just not comfy to work with imo
Fair
So a mix of records and something like snakeyaml would do the thing?
cost of silliness at build time? thats better. means annotations and stuff are validated at build time rather than runtime
idl the fields tho
i dont think libraries should be modifying your fields directly
Tell that to mojang xD
or just switch to kotlin and get default parameter values ๐ ||this is a joke i hate kotlin||
what did mojang do
can you send a link of this lib? or is it private? I actually like the structure of this
Alot of NMS has to be changed via fields
thats cuz most of the time you use nms you are doing something thats not "normal" which they obviously havent got apis for
if it was "normal" you wouldnt be using nms for it
can u guys help me
can anyone give me support on why this menu just doesnt open
https://pastebin.com/SAVZ1B18
NBT was pretty "normal" until PDC came out.
Creation of packets is pretty normal now a days still no api for it. (from mojang)
does nms' nbt require reflection?
Yes
also what packets require reflection? theyre just pojos afaik
I mean... "require" isn't really the right word. You could make modules of each supported version.
I mean silliness in that it was a pita to implement, not silliness as a concept
guys can you help me?
been using it in most of my plugins for quite a while so mostly production ready
though it's not super modular atm
you kinda have to use the full framework to use it lol
feel free to take / adjust code though
can u guys help me
can anyone give me support on why this menu just doesnt open
https://pastebin.com/SAVZ1B18
meaning theres still methods for it and constructors thatll do the same thing. you should be using those instead.
Constructors yes. Methods no.
A few packets I use don't have methods (atleast in past versions)
it's not, it generates a separate class with all the logic
annotation processors cant modify existing classes
like a class that doesn't even reference DatabaseConfigDTO?
it only references it for the default values of fields
iirc
copying the default verbatim could cause compiler errors wrt access modifiers
that's what it produces
bit of a mess, but in theory quite fast
Object portFromMap = $data.getOrDefault("port", dao.port);
still needs a lot of work though
nah thats another benefit of classgen
you can in theory get much faster loading
no reflection needed
not the nullability annotations in the method location (i hate this)
use type use location!!
ye
too tricky
๐ญ
sorry
but it has to fall-back to gson deserialization in a lot of cases (eg custom types that arent registered with my library), which kinda defeats the point
- they love backwards compatibility so the annotations mostly still have METHOD, FIELD, etc targets from java 7 even though java 8 has TYPE_USE
- I CBA TYPING
@NotNullON EVERY DECLARATION MAKE IT DEFAULT OR SMTH - works terribly with generics
- they encourage you to use
IllegalArgumentExceptionif a parameter isnullwhich we all know is wrong (obviously) - CLASS retention
how is 4 wrong lol
because thats what java chose and i think its more important to be consistent than whatever the argument going for IAE is
its not like users should be catching NPE or IAEs anyway. theyre programmer errors.
i dont rly have a reason
i just think it is
makes stuff slightly (like very slightly) less confusing
thats it rly
if anything i think IAE is better, it's more obviously "an argument value was wrong", whereas NPE is just generic "something was null"
but this is very deep into bikeshedding territory
preferrably the exception message should do that

