#help-development
1 messages ยท Page 758 of 1
Yea. So, multipaper recommends plugins with SQL data
Right?
But theres no guarentee it;d work
Yeah, that's so plugins can also share data with other instances of themselves
so if I leave on server A, that saves to the same database that server B is using
So how buggy is multipaper?
never used it
I've heard its super unstable
You can expect a lot of plugins to straight up not work on MultiPaper
stuff like WorldEdit might not, because yeah it would need to message other slaves for cross-server-region-editing
Theres a fork of worldedit/worldguard on multipapers discord
as well as a bunch of other forks from different plugins
essx
tab
etc
Oh okay
I mean would realistic seasons work?
I bought the plugin
And I'm just curious
I don't know that plugin
Sorry im not logged in with spigot on my smartphone
seasons but in minecraft
idk
winter, summer, etc
Fortnite seasons
easiest solution is to start removing stuff from the server that you don't need
like entities you are not making use of etc
Folia :aware:
What's the folia vs minestom benchmark look like
Genuinely curious
very
Ig depends what person wants you could prob go crazy with minestom
How many did you guys get in with folia during the test
1k
Dayumm
Makes me wonder how much minestom could handle if you threw everything you could at it
Considering the server doesn't do much at all base
if you keep it at a minimum then, uh, a lot lol
but like yeah not doing anything is cheaper than doing everything
Disappointing that 1k was the benchmark
they just target different things
After I'm done with my spigot PR I might try to do some funky stuff with minestom
One day i will release an implementation for load balancing
Impl for what
For load balancing
Well it wouldnt be spigot nor could it
odd take
What is the event for a cactus being destroyed from a block being placed next to it
Is it blockphysicsevent or some shit?
That partially fixes it because it doesnt destroy the cacti above/below it if cancelled but it still destroys the one directly next to it
Was the folia benchmark done on one server?
Cause if it was, 1K players online on one server sounds nuts.
That CPU must have gone through hell.
single server single CPU, yes
gotta love 16 cores for that though
we just need a cpu with high clock speed + super high core count
https://cubxity.dev/blog/folia-test-june-2023
cubxity wanted to make a 3rd 10k test but due to reasons we ended up deciding to not
^ blog post with all the deets
cmon ryzen make a 32 core cpu with the same clocks
Damn, you did it with the 6.1 kernel? Someone should rerun it with the 6.2 kernel as there was some AMD CPU bug in 6.1.
I believe in you ryzen!
Ok, there it is. 10Gbps. Was also wondering how it was managing 1K connections.
gotta love system stuttering
pretty sure even 1-2Gbps could do that imo
well actually on later versions... nvm maybe not
the major bottleneck was initially not giving enough threads for netty
so everyone joining at the same time was fun in that aspect
Hmm, any plans to do another large scale test in the future?
You could probably get more performance out of a threadripper.
Or at the very least more cores.
Hey, is there any way to change the color of the players' nametag above their head?
textdisplay
cubx was tempted to collab with other streamers but iirc leaf didn't really need any more profiling data
teams
You can easily do 1k connections with just 25 megabits. In fact you could as high as 10k
But it depends how much data is going through at any given time on those connections
i got the asset, pack.png, pack.mcmeta
in assets i got 2 folders, one with the textures, and one called "custom"
within "custom" there's another nmed "sound" and the .json file
within "sound" therer are the 2 custom sounds
I'm a bit confused, the commands a player does not have permission to execute won't be shown to them/the server will say "unknown command"?
What is the permission message for then??
unknown command is when a command does not exist. the command permission message is what is sent when the command DOES exist but you don't have the permission
yeah
the command exists
but when i remove op permissions only the commands that don't have permissions assigned to them in the plugin.yml is shown
when i op myself again, they're all there
i want to test the state of not having permissions lol
op gets * permissions
if i op myself i have all permissions.
then you need a permission plugin
nO
yes it is. i've been doing this for quite a long time. i just changed some things
before i checked for permission in the command and sent a permission message
* is not a permission that is recognised by Spigot/Bukkit
what permission plugin?
idk if LuckPerms parses it or sum but it does work
yes LP parses * as a wildcard
anyway, that's not really the problem. The problem is:
The command exists 100%, if i have the needed permission, it's there, if not it's now shown
thats teh correct behavior
if you don;t have the permission it's not sent in teh command tab packet
you are confusing op and permissions
teh command message works just fine
i tested it with op, i tested it with permissions.
is it bc i set the permissionMessage in the onEnable?? That wouldn't make sense but it's the only thing i can think of
possibly
set it in your plugin.yml and test
if it works in your plugin.yml and not when you set manually, test it without LP
its probably LP reading the permissions before you set teh command message
as LP uses reflection to set/process the Permissible object
not really
damn it
lp shoudl load before your plugin
oh okay
what you could do...
same thing when i set it in plugin.yml :/
set your command message in onLoad not in onEnable
hmm that's an idea ig
if you set teh message in your plugin.yml and it still didn;t work then setting in onLoad will not work either
from the sounds of it you have an LP issue
damn, luckperms wasn't the issue either
what's your issue?
-->
So you're problem is the presence of an existing command that doesn't work and says unknown command, isn't it?
yesnt
everything works fine, as long as i have the permission to execute the command
once i take the permission away it's like the command is removed
and that doesn't make sense
is it a plugin of yours?
Ok, send the plugin.yml
i mean it does the same with minecraft commands
i imagine it's intended
but it's dumb
?paste
eeh
all commands are made the same way
heal:
aliases: [ ]
description: "Heal yourself and other Players."
usage: "/<label> [Player]"
permission: "serversystem.heal"
send the whole file
why do u need the whole file?
I mean, paste it here
all of em ig? lol
even if i add the permission-message in there it does the same thing
btw why would you put an empty array of aliases?
they are all written the same (except the last to, forgot the permission)
Did you registered them?
yes.
And does the plugin starts too?
Any exceptions?
ah okok
so you're trying to change the insufficient permission message?
yes
Ok
Try this:
permissions.
the.permission:
message: "you don't have the required permissions bla bla"
before i tested it in the command with
if (!sender.hasPermission(<permission here>)) {
sender.sendMessage(<permission message here>);
return true;
}
Now a couple weeks ago, I asked here on the dc if I can remove those checks and just add the permission: "<permission>" and I set the permission Message onEnable bc of colors
Idk how to use code format on discord mobile sorry ๐ฅฒ
btw I never put them on the plugin.yml 'cause I organise project in commands with each permission in code
try mine
^
i mean that won't make sense really, would it?
Seems you are correct. Somthign changed. You no longer receive the usage message when you don;t have the permission
bc i set the permission custom
I prefer manage the permissions in code
that's so stupid ๐
i did too, but the code is cleaner if the permission check isn't needed anymore
If you still want to use the plugin.yml approach try that
you don;t need a permission check at all, just set a command executor
huh?
well then you can achieve this using a super with an abstract class
that sounds unneccesarily complicated
so long as each command has it's own executor you don;t need any permission check
wdym
yeah i know, if you add the permission in the plugin.yml
if you are using a generic onCommand in your plugins main class you do
aint no way ppl do that
that's on you
the correct way is each command has its own executor
try my snippet
i mean i could just change it back to the permission check but yeah mh idk if i want to lol
btw I heard folia has a constructor in the main plugin and not a onEnable method
it's just stupid, that it was changed
I guess it changed when they added updateCommands()
bro just use that snipett I sent you and then let us know if it has worked
i mean fine
if you add the permission in the plugin.yml on the command your onCommand will never be called if they don;t have the permission
thats how its always worked
uh
the only thing that has changed is the usage message is no longer sent
I've heard you can change its permission message
there is no message key ๐
damn that's stupid
usage is only sent if you error in the onCommand or return false
is it a bug tho?
i- what
if it is actually that bad you can still use a command library such as acf
if you have no permission it treats you as not having teh command so you get no help on it either
i mean ig i'll just set it back to the permission check
that's the solution
the way it is now is correct behavior
which is why the permission check is supposed to be the very first thing u check
which is kinda stupid :(
it's working perfectly
if it is called many times you can still manage it using an abstract handling
i want clean messages and not a pure red message like this
and each subclasses has an own permission
that red message is correct
if you don;t have the permission you shoudl not get any informational messages on that command
if you fake it then players can discover commands they should not know about
i mean they can discover it, they will just receive the permission message every time
until they find it, use a hacked client and access the command anyway
so also, i'm guessing
command.setPermissionMessage(<permission message>) is just useless now?
exploits exist
i mean i can imagine that a hacked client will find all the commands anyway, no?
or is this prevented by not even sending the info that the command exists
unknown
well yes
no permission these days means the client is never informed of the command
hmm i gues fine then, for security reasons i will just remove the permission message :(
egar do you know anything about the bukkit raytraceblocks method?
know like?
it is very clear actually but I can't achieve my result sometimes due wrong raytrace results
such as very close players
um rayTraceBlocks doesn;t detect players
yep but I use it to create a NametagHider plugin
If it finds a block midway it doesn't show the player tagname
you'd need to explain your issue
Anyone know why I canโt import the hickaricp library? I added it to my Pom, and reloaded and clean my project and still wonโt import
Have you imported the repository?
Developing
I'll do it 3m
i try save inventory in string format but some reason items not loads
i was get empty inventory
and the data?
data not null
inventory too
but items in data
not exists
i mean
exists but not loaded
I had to come up with my own serialization
Why strings? Do you use yml files?
Write inventory to FileConfig:
FileConfiguration configuration = ...;
Inventory inventory = ...;
List<ItemStack> items = Arrays.asList(inventory.getContents());
configuration.set("some.items", items);
Load inventory from FileConfig:
FileConfiguration configuration = ...;
Inventory inventory = ...;
List<ItemStack> items = (List<ItemStack>) configuration.getList("some.items");
inventory.setContents(items.toArray(new ItemStack[0]));
Does anyone know what the client expects as reply to the handshake here
I think handshake just tells the server to get into login state for this connection
Well the first part is client to server. The server just acknowledges with state set to 2
Yeah but the client isn't sending a login start so I'm guessing it's waiting for a reply
Just an TCP ACK
Alright ill figure out how to do dat tx
It should be automatic
Yeah well that's what I thought
Server doesnt do anything until step 3 lol
But idk even in the status handshake apparently the client didn't expect anything yet I found out it in fact wanted something
Well handshake should be tcp protocol level. If ack comes back client should set state to 2 and proceed
It wouldnt make sense to implement a handshake at packet level unless you wanted to tell the client something. But server doesnt say anything until client sends step 2 and step 3 is server response
I mean the handshake has a custom packet so I don't see why not implement it on a protocol level
Yeah well i need to implement their protocol lol
atm I implemented the pinging and now im implementign the login sequence
You could always just look at the source code
where does one find the vanilla jar src?
Mojang has their auth lib on their github as open source
oh tx
yeah but
the vanilla client seems to hang at handshake.sendPacket for me
it seems to be waiting for something
im quite sure node automatically sends acks but ill have a look
Are you implementing a client or a server?
server
yeah I mean your client seems to follow a similar login sequence anyway
it should be 1) Send Handshake, 2) Send Login Start, then continue
but atm im receiving 1) Send Handshake, ๐ด
Mobile coding? Bruh......
yeah I mean I have the login packet decoded
I can detect the client changed states to login
then the client just goes to sleep
lol
Then you dont properly end the TCP conv
wait im supposed to end the TCP conversation?
but then I just disconnect the client
lol
Usually this happens automatically *If you properly use the socket or whichever lib you are using
that doesnt seem like an epic gamer move
hmm
ill have a look
yeah no im pretty sure the ack is sent
Are you sure the next packet isnt sent by the client? Maybe its a problem further down the chain.
yeah i mean not even the wireshark dump is showing any further communication
o wait
im just dumb hold up
i sent the wrong dump
LOL
o shit theres quite a bit of shit going on
wait what now im receiving the packet
okay then
thanks i guess ๐ญ
or am I
yeah well its a bit hard when the minecraft client shits itself one second
yeah no okay it works now
i guess i was gettign scuffed results
thankz
lol ty
I need blessing to get through this ๐ฏ
hi i want to create the AttributeInstance to put it with attributeBase to my AttributeMap but i don't know what is consumer<AttributeInstance> somebody help
i am using nms mojang remapped 1.20.1
What the hell is that light mode editor
Eclipse
What are you making? Client or Server?
I'd recommend using intellij unless you are using eclipse because of preference or something
I use IntelliJ, I simply answered your question
server
The screenshot is not mine
looks like a Consumer so you can edit the AttributeInstance after creation
so what can i put in bro?
a lambda
How do lambdas work
In js lambdas are just the same as making a function, because function is a type there
a lambda is an anonymous function
And that means
void lambda
first answer breaks it down really well
what i didn't understood yet is how java can treat lambda methods as objects
well it depends
() -> 2 for example makes sense to treat as an object because it returns a primitive or integer if you want it in object form. Also can be typed as () -> {return 2;}
i see
thing you have to be careful with lambdas is that Java infers the context of what it is you are trying to do
so you can for example go wrong with a chain of lambda's because java chose the wrong context XD
Has anyone played around with custom items and "buffs" they may give to the player and can tell me which way to track this items would be the best?
I'm now implementing something on my server that will play around craftiny custom weapons and tools that will increase damage towards the world boss, and toold that can collect more stuff when breaking ores or trees.
So what would be the best way to check for this items? Like, everytime someone does damage to the world boss, I ran a for on the Lore Item and check if the weapon used had a lore like "+1 Extra World Boss Damage" or something like that
My problem with this is worrying if with every spam clicking damage and many players this will have some impact on the server and cause lag.
My other idea was creating an enum of items and their damage, and when a person damages something, a specific line of lore has an ID for this enum list of items and gets their damage output right away.
Or is there different better ways? ๐ค
PDC probably
?pdc
create a wrapper for ItemStacks making use of PDC. The reason for using a wrapper is it will make it easier to feed and obtain appropriate data you are wanting. No different then creating a player wrapper when you want to have the player object to hold custom data ๐
a recent one was having an "effects" system where, for example, a "BossDamageEffect" just registers a listener that checks if the target matches our criteria and adds however much it needs to
I've also made itemstack wrappers
Iterating over all items in each event is a bit more expensive than having a class which tracks your buffs and
changes when the player changes his armor or active item. The main problem with this approach are dynamically
updated items. It requires you to precisely check when any equipment changes and do a recalculation of your stats.
Other than that: Do what the others suggested and tag items with a PDC. Never use player-visible properties for custom
item detection.
I used to exploit the fuck out of slimefun by using /rename commands to make myself alloys :)
lol
think I got banned like 9x on that server
I mean... Yeah.
The item will still have the Lore informing the buffs it has, I was just worried about using it as a check.
I'll look into PDC, looks like what I need
Thanks for the info
I honestly like doing client-sided lore for stuff like this
allows you to easily change it across the entire server in case you want to rename stuff
Items can be dropped and sold on the market place, wouldn't that be affected? I would need to make another check for which item it is and then have it set that lore to that item for whenever that player drops it another or sells it, right?
If you want to be really clean with the information on your items:
Dont change the name or lore at all.
Read outgoing item packets and update how they look like before they get sent to the client.
This way you can change the design, look, format etc in later updates, without having to touch
already existing items at all ๐
Oh wait, yeha
๐ค
For client-sided lore there are a few points to keep in mind
Need to think really well on what exactly I want
You have 2 packets to handle:
- Window items (list of all the itemstacls + cursor, make sure to handle the cursor)
- Set slot
If you're on creative and you make a copy of the item, it actually copies the lore (go figure)
So what I've done in the past was to build the lore list, remove it from the real item if needed and apply it to the fake item
One thing right away:
Just dont touch the items in creative. You will create a mess bc the client has authority and will create scuffed lores/names.
just process it :p
I think for what I want to do, I won't need to do client side lore
Nah. Creative was out of question on production servers so we didnt bother.
Since the items will be costumizable, every item can be unique
last time I did this was on a youtuber server so sometimes they want to record videos on creative or copy items
The buffs can be applied, improved and removed.
it was also like 3 years ago
I think client side lore seems to not be what I want
I was thinking about getting into the youtuber scene. Seeing your work in videos must be very rewarding.
Not sure how to get connections going tho. There are probably some teams for hire out there.
it's not that great
I saw some youtubers post on the forum asking for devs to create custom mods and it seemed pretty not rewarding ๐ they were paying way below and asking for so many hours and never consistent.
- pay is mediocre, deadlines are tight sometimes
- you don't really have fun in the job as it's all very visual and there are no data structures, no databases no nothing
- you usually start over on every project
- little job security, I've had youtubers do multiple breaks after a couple projects
- no credit for your work, no one knows it was you
I've done work for 10-20 vids
it can be sometimes. Server tutorial at one point made it into a couple of youtube videos, and so did HoloAPI ๐
not worth it tbh
cool for the first few things but then it gets boring and monotonous
i find it cooler when random big ass servers are using your plugins
since they are usually very supportive
typically in this scenario neither party pays because its a mutual benefit. However, I have never had anyone ask me to specifically make something for doing youtube or whatever. Rather both plugins I mentioned above some were just doing reviews of plugins they thought were interesting or cool and occasionally we got asked some questions when they couldn't figure something out in regards to setting it up.
I personally enjoy doing large-scale projects
If you're working on a team you get great contacts with lots of experience
and if you're doing by yourself you learn a lot beyond spigot that can be applicable in other niche industries
Also people respect you because you're not doing monkey work, you're actually bashing your head against the wall and you become irreplaceable
I wish to work on large-scale projects to improve my knowledge but every forum post I see asks for "great knowledge of NMS" and I'm kinda new to it and afraid to message at all
nms isn't hard, ppl have no clue what they're saying when they ask for it
just shoot your shot
we use it maybe like 2% of the time
Or well
You write a big system that needs it and never touch it again
its weird for someone to ask for this really. Most servers who ask for this, actually would make due with a custom server instead. That is just modify the server code instea of messing with NMS lmao
ah wasnt there this sandal link
pull these 2 scripts, wonder why it needs that one specific jdk version, repatch etc
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
Reflection
Bad /old
bro wants to pull the mappings file directly from mojank's cdn and make magic
what's stopping you from making a multi-module project
reflection-remapper in shambles
Yes
thingy o.O
not paperweight
it is partly a gradle plugin
https://github.com/jpenilla/reflection-remapper
nvm it isn't
cool
most of the time not even necessary though
I've worked for content creators in the past. The only good thing about it is that pay is guaranteed. They have money so you don't have to worry about, say, a server not getting enough purchases in their store or something
Everything else is pretty much a downside. The tight deadlines are abysmal. Content brain is so bad to work with
Content brain?
Has to be done in < 1 week time, if you're lucky, and then they make last minute changes
I think the other advantage if its a decent channel, is you get your name out there/displayed
Nah why would they do that
Only time I see devs shouted out is if it's a dev-run channel, because it's them 
well if its just purely money you are after then sure I guess that works, otherwise I wouldn't bother with such channels
waste of time if they don't properly give credit for whatever it is
Smallant tends to shout out his devs
Meh
The tight deadlines and last minute changes make it a terrible job
I think heโs the only one Iโve seen do it
They usually have no concept of how long it takes to make something worth presenting
No matter how many times you tell them
content brain
you'd think that a content creator would know about that out of everyone
You would think huh?
sure
There is plenty that do, but I guess it depends on your purpose if you want to cater to them. If its money, as Choco said typically not an issue. However, if I was to do anything for a youtube channel it would be purely for the free advertisement to make connections later
I have yet to have that experience 
yeah i mean
Wonder how much money you could make with a marketplace team
Just shoving random shit on the bedrock marketplace
you'd think that they have gone through the experience of spending weeks if not months to create a really good video, but that just depeds on the type of content they want to present
if it's just a content farm channel, ๐คฎ
something something quality quantity
gamefreak has entered the chat
Only works if they're big youtubers
I have a friend doing work for smaller ~1-50k sub youtubers and they take weeks to pay
I've worked for creators with 6 million and with 3 million
I've worked for creators between 1 - 15M
If it's a channel geared towards a younger demographic, it's usually a content farm lol
oh yeah ofc
There's a lot of money flowing but you can never really take pride in your quality
Had to make like 20 custom items with particles and vector math in like 2 days for 150 bucks
Or sometimes they ask for stuff that you know will just blow up the server
like an item that when clicked makes a 200x200 hole or something
bro thinks I work 24/7
other times the content is super easy and boring and pays well
I've made 100$ for a plugin where you'd die if you touched the floor
so it was just a material whitelist
can thank India and Brazil for this
Great feature if i could id add it to hypixel lobbies for free
unrealistic expectations everywhere
"you heal if you're looking at the sun" and I'm like
Fr
you do realize the sun looks bigger when straight ahead and smaller when directly above you, with a really annoying picky mathemathical model
I've made one for 45 bucks before
im going to built by bukkit
I mean I guess, but I would never do this because my reputation I have built is based on quality and you can't guarantee quality like this
I've also made like this minigame event core for like 600 bucks
nope
nah
I have too much integrity for that
bahahaha
but tbf you need to learn to value your work and try to stay within ~80% range of your estimated hourly rate
why for such a low price?
I mean I guess if it was easy or simple sure
im a straving child
Money is money
incredibly
So if you want 20$/hr, you'd estimate the number of hours and aim to go over at most, 20%
or however many you need to still be over 16/hr
best bet is to find a few servers to work as a dedicated dev to do things for them
ohok
5$ ploogin with like 8 replies in 2 hours
where they ask you for your website n shit in order to make a /help command
with a ton of people with more marketing experience than development experience
Everyone I know that has a proper budget runs their own team
where
And reach out to devs they like with real offers
and don't under sell yourself or try not to. However do note the more you intend to charge you should at the very least ensure quality matches. Doesn't have to be perfect but it should match whatever they are paying XD
yeah no kidding ๐คฃ
in the business world, favortism is the game
"So do you know how to make a bedwars plugin? I can give you a vouch for that!"
"i only know scratch sorry"
You work for exposure right?
lol no
"ill give you a rank on my server"
doesn't matter, businesses make it obvious all the time. The way you compete with such things is connections. Connections are important. The more people you know that others also know, the better off you will be and your favortism starts to increase especially if you produce results ๐
I have my own little minigame core so bedwars is probably ~5-10 hours of work to impl
"You know coding languages?" Oh dear. Please tell me you didn't accept this
dude was just naive, doing a minigame for them
Yeah I know a coding language or 2
they had bad experiences with other devs before so I gave them a little deal
Scratch and lua
Skript and Byteskript
Speaking of, I'm going to a tech conference like 3 weeks from now for networking
anyone going to github universe?
it's like 2 hours away and I got free developer tickets
You mentioned this, hope you make some decent connections there for yourself
stephen @young knoll
kangarko lmao
Yeah that
oh
Kangaroo man
don't know who that is, not that I keep track of names really
you should
with challenges such as "steal 8 pens" or "draw an evil moustache on someone"
"unrelated old comment"
"sneak into a stage"
I do those for free in school
"Commit arson"
p sure binance was giving out free hoodies last year
sneak into a booth and pretend you belong all the while knowing the product XD
had a guy from a company called "datastax" invite me to have a 15min convo at their booth
Jetbrains made intellij right
about my work and stuff
lol, pretty sure JetBrains will partner anyone that uses their products and has a company
yes
I'll use their products if they partner me
did you accept?
had like 3 different CEOs add me on their app
I hope you did
eh sure why not
Id Die without intellij
about to blow my paycheck next week on housing
they work a lot with the medical field just fyi
What that
they work a lot with AI
that too
Is it better than intellij
that is what the general channel is for
How what why
and if you really wanted you could create a thread in here too
if you really want a dev general lol
yeah right now we're helping me develop connections with all the CEOs
I've had like 3 or 4 add me on their app
maybe next year I will attend some conferences
see if you can get free tickets
I got mine by literally just linking my github to their website
I was about to Google it
uh no, waste of time
Nope
yeah its not overly difficult to get free tickets somewhere
nah lol
especially if you do it in advance
CEO of mozilla, VP of AI at amazon, mayor, prime minister, president, hotel chain ceos
they announced minecraft festival in 2020 but it got clapped by covid and has yet to return
lot of ppl that are really good contacts
minecraft festival is dead :(
and after the conference they do exclusive parties at night "where deals get done"
I wouldn't mind getting in contact/meeting Mozilla CEO
the others I don't care about, except maybe the hotel chain one
hotel chain one is good if you want to do network related things as they always need someone to go repair that stuff lmao
ACID compliant transactional database with native graphing storage and processing. basically its handy for anything involving graphs that are created or need to be created from the data or you need to combine graphs etc
oh fun they have roundtables where ppl talk about their product for an hour and you can ask them questions directly
this is really awesome to participate in sometimes
other times can be boring if you get stuck at a table with boring products or stuff you really don't care about XD
thing is that I need to pick and choose what talks I want to attend because there's one every like 5 minutes in six different stages in this huge arena
try to diversify the talks by category. Like one for networking, another for AI, maybe another for Aeronautics or whatever
uhh
that is just examples
I'm attending one where dude talks about how we went from a minecraft youtuber and diversified into all sorts of industries
I personally wouldn't prioritize that unless at that specific time there isn't anything else interesting lmao
well it's the one that most hits home
well, idk who it is but its basically the audio version buy my book so I can tell you how to make millions
or sometimes they advertise their book on this topic during the talk
and don't really say all that much during the talk and just say generic things
hence why I said personally I wouldn't prioritize it, but if you want to go hear it then go for it ๐
maybe it turns out to actually be interesting
however, I am going to laugh if they convinced you to buy a book XD
Nah there are no books, dude's legit going to talk about his side ventures
most of the schedule looks like this
I would probably choose the social media one and the skills gap one
How to fix your shitty pitch
lmao
def going to that one
grr all the goofy ones are at the same time
lol
this might not be too bad
but I generally just ask my older brother since he has experience in marketing ๐
the two in the middle are probably boring
Filler content, there was nothing better
the integrating your brand into games is actually pretty straight forward or should be. If you are having issues in how to integrate your brand into a particular game then odds are it probably doesn't belong there to begin with
I'm thinking of like having a destinct branding to your games that makes them peculiar type deal
Y'know your unique style
Rather than trying to mash two things together
maybe, but then that means they didn't integrate their topic very well with the title
eh if it's boring I can just get up and leave
I was just pointing out the irony ๐
Hey with duration of being mute should I save the date and time and when they try and type keep checking until there time is up?
Perfect just checking before I start doing anything as Iโve never done anything with duration lol
Like there is little difference between long, Instant and LocalDateTime
The main diff is OOP and Timezones, but that is negible
I would get the time from the server
Hm? Shouldn't System.currentTimeMillis()/Instant.now()/LocaleDateTime.now() with </.isBefore suffice?
I figured out why
That tasks sometimes dont work
Dont cancel tasks on player leave event
it sometimes breaks
Have you ever released a premium plugin before?
Just wondering if I need to do things in a certain way as Iโm making a premium plugin
Thank you
Thank you, itโs not too bad then Iโm guessing mcm is roughly the same
do you meet the premiumplugin requirements?
My plug-in ainโt finished yet but I would say so
?premium these ones
Yeah itโs not a common plug-in I will provide updates and full support and itโs done in a good manor
8 week old account
80 messages (forum posts) + 20 positive ratings
3 free resources
Two-step verification enabled
I'm more insinuating the forums requirements
lots of people forget about them
Il have to check my messages but I have 3 free plugins already
Hello im having an issue rn, i cant quite find a solution
public void onBlockExplode(final BlockExplodeEvent event) {
Material ExplodedBlock = event.getBlock().getType();
Bukkit.broadcastMessage(ExplodedBlock.toString());
}```
i cant actually find a way to check what the block that was exploded was
Like bed, respawn anchor
it just returns air
You need to get the list of blocks what has been exploded look at the event api
I have another question if you brought a server core would you want a built in permissions system or use an external so like luckperms etc
i mean luckperms is extremely flexible, whatever "built in" means
avoid actually using spigots direct permission API
you're best off Using Vault
or Luckperms API
you really shouldn't need to touch permissions a ton though
Alright Iโm just trying to get user input so I can make the plug-in more built around the users
what are you doing that needs permissions anyways?
you can always just check Player#hasPermission
the only time you'd need an API is if you need to add and remove permissions which in most cases I can't see a reason a plugin would need to do this
unless well you're a permissions plugin
I wouldn't rely on a single core plugin handling everything
I was going to add something like setting permissions to players incase they wanted something extra to a player etc
Personally I think core plugins are a bad idea
plugins that are like apis?
seems like a job that really should be left to a permissions plugin
Why tho, it dose most things in one plugin
hmm how could I do the math here?
Core plugins as in plugins that try to do everything at once
Can I somehow see all subinterfaces of a class with IntelliJ? I think there was such an option, but I don't have it rn
Alright thank you for your input
like permissions and punishments in one plugin?
Yes
?paste
^^
'''
he keeps post andkeeps deleting lol
I know lol
?codeblock
You can use the discord code block format to display code or just text in a more pleasing way:
```java
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
Becomes:
public class MyPlugin extends JavaPlugin {
@Override
public void onEnable() {
}
}```
Hi what's wrong my code ```@EventHandler
public void Halรกlok(PlayerDeathEvent e) {
Player player = e.getEntity().getPlayer();
int deaths = 0;
if (this.data.getConfig().contains("players." + player.getUniqueId().toString() + ".deaths"))
deaths = this.data.getConfig().getInt("players." + player.getUniqueId().toString() + ".deaths");
data.getConfig().set("players." + player.getUniqueId().toString() + ".deaths", (deaths + 1));
data.saveConfig();
}
}```
I use google before asking in here because thereโs load of help using the spigot forum
spam console with error message
Ask yourself?
I don't know. What's wrong? What is not working? What is the error?
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
?notworking
"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.
I'd assume that e.getEntity().getPlayer() is nullable
Maybe I'm wrong
Check the docs
Could be the this.data is null
Yeah barely any info
no
Don't write to the file every player death
Whatโs the error
^^
If you really want to track it without using statistics, cache it in some map that you load on startup and save on shutdown
Just use statistics ^^
Could not pass event PlayerDeathEvent to WorldCraft v1.0.0
org.bukkit.event.EventException: null
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:899) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:820) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.world.entity.EntityLiving.a(EntityLiving.java:1484) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.world.entity.player.EntityHuman.a(EntityHuman.java:936) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.server.level.EntityPlayer.a(EntityPlayer.java:978) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.world.entity.Entity.au(Entity.java:696) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
at net.minecraft.world.entity.Entity.ao(Entity.java:623) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3871-Spigot-d2eba2c-3f9263b]
?paste
I can see why one wouldn't, that's in case your plugin is supposed to work across worlds/servers
But if not, then absolutely statistics
Is this the full error? I can't find any traces to your plugin
Also
Maybe debug each variable aswell
What was the issue
e.getEntity can be a mob
Bump^
Well yeah. Check the instance if itโs a player then run your code in that also always read the api of each event aswell
If you haven't changed your hotkeys seems like Ctrl+H would work
I've seen this thread, but I'm not sure if this applies to also showing it in the docs so I haven't tried it
Ones ec
This only seems to be showing the superinterfaces, and it's also not in the docs (Ctrl+Q)
Nvm these are subinterfaces
Still not the most convenient placement haha
unfortunately its not as esay as in the docs ๐
I remember being able to see the subinterfaces in the docs window. Maybe I'm remembering it wrong ๐
So there's this cool shortcut Ctrl+Alt+B
Closest thing I could find
oh that'd be nice for when I work with NMS
will keep that one in mind
especially since I changed my CTRL+H keybind lol
Identical behavior to this is holding Ctrl+Alt and LMBing the class, in case you need to do that multiple times on multiple classes ๐
that's what I do currently
Alrighty
like this (T) new Double(t.doubleValue() + 1); instanceof check would be better
thank you (cam on)
although I found it a really stupid way to calculate
lol I was kinda getting pissed when this wasn't working
forgot I use a modified combination of VSCode and Eclipse hotkeys
its f3 for me xD
Hey, is there any reason why
final Title.Times times = Title.Times.times(Duration.ofMillis(500), Duration.ofMillis(3000), Duration.ofMillis(1000));
final Title title = Title.title(mainTitle, subTitle, times);
audience.showTitle(title);
Isn't showing any titles?
It's all the same ๐
no?
In fact ours is just sendTitle(String, String, int, int, int)
the Times class looks ugly
erm ๐ค ackshtually adventure is platform agnostic
lib yes
oh i see
still the wrong place to ask lol
lol
to be honest most of the time people only pass a testcomponent
so why should we be forced is beyond me
waste of objects
Can anybody help me create a regex? I'm struggling to come up with one. I want to capture <c>, <e>, <h>, <k> (so basically any value encapsulated in angle brackets) with Regex, because I'm working on placeholders.
I've tried [.]*((<.+>)+)[.]* but it just captures everything between the first & last angle brackets (see screenshot, test case was a b <c> d <e> f g <h> i j <k> l m)
alex could help you
I believe Alex is not available rn
well, you can find him when he's online
.+?
isnt he in the hospital
or guess emily knows
That's any character from 1 to unlimited times
he's back isn't it?
If that's what you are asking
no, with the '?'
Afaik not
it
Oh, this does work, why does it work though?
What does it do
Haha, alrighty, thanks ๐
? matches the previous token between zero and one times
not in that ctx
When together, they are combined it seems
ah this one
what happened
oh
oh
avg mfnalex moment
\<(.*?)\>
the only thing is, you might want to break up the string into an array everytime it encounters <
Is it?
so maybe do a split on that character or the character before it
so it retains the diamond
then iterate the array with the regex
Yeah I'm still figuring out how exactly I'm going to be doing the placeholder system, I just got the general idea in my mind
unfortunately don't think regex has anything to split the strings for you
or to do some kind of counting XD
I hope I'll figure it out swiftly haha
That's what matcher is for
Pattern.split in shambles
Actually last time I've used Regex was like 2 years ago so I forgot everything and I have 3 tabs open that have the kotlin regex & java regex docs lmao
Ok Baeldung let's see what you're cooking
uh guys, a friend is asking me to make a plugin that adds cities with stuff, how possible is that considering the spigot api?
woah thats really nice how have i never used that syntax
Sounds quite possible, depends on what exactly your friend (or you) need
Kotlin's syntax sugar is lovely ๐
cities with npcs with ai and war and stuff
That sounds complicated but yeah you can do that
its my favourite feature of the language. some people hate kotlin because there's fifteen ways to do the same thing but the stdlib is so nice that i can write code without having to think about how the language wants me to do things
how hard is it tho
^^^^ I agree! I love how so much stuff is made to be easy and intuitive.
other languages i always feel i have to worry about how the language wants me to write, kotlin bends to how I want to write
Hello !
I try to use the PlayerInteractEvent event but when i right click on air with a fishing rod, i get two events :
- One with the action RIGHT_CLICK_AIR (correct)
- the other with the action LEFT_CLICK_AIR, but i don't left click and this second event comes only with a right-click on air with a fishing rod.
Someone know if it's a bug or not ? And if it's not a bug, somebody knows how suppress this second event please ?
that being said they absolutely could implement reified class generics with a bit of compiler hacks and they haven't. that pisses me off
public Inventory createInventory(InventoryHolder holder, MenuType<?> type) {
if (type == MenuType.ANVIL) {
return new CraftInventoryAnvil(null, new CraftInventoryAnvilSubContainer(2, holder), new InventoryCraftResult());
}
return null;
}
``` this is so unbelievably cursed can't wait to expand this
I mean different aspects are harder than others. E.g. depending on what type of AI you need, it can take you a long time or a couple minutes/hours. The basic concept of cities should be easy, and as you add layers to it, it becomes more and more complex
Haha, true
that doesn't look cursed?
well, I'll see if I can do anything lol
well
well the cursed part is having to patch every container
you could improve it by making each MenuType have an inventory factory
This looks very weird give me more
Happy coding!
I'm not sure if this is easily possible when backing MenuType with the MC registry
considering that minecraft doesn't do that
they only have a containerFactory
is MenuType a default MC thing?
Thank you!
yeah its called Containers with spigot maps IIRC but currently trying to fix Bukkits cursed system
could make a big hashmap mapping meu types to factories and do it that way? would avoid doing a million if-else statements
that's def the way to go
I already did that with Menus
or wrap menu types and just use a decorator
meh the former is probably more preferred within bukkit
probably
still it will be nice trying to get rid of CraftContainer
that class is actually cursed
quick Q: how is world.getPlayers() sorted? is it by login order or something more arbitrary?
\<(.*?)\> ok I tested this and it should grab the content in the diamonds as groups
so you could use the regex to then create a string array and that array should be all the content you are looking for ๐
its seems like login order may influence the order, but Don't rely on it
its by login
gotcha, I was hoping it would do the leg work for me since I'm making a board game map that relies on turn order. oh well lol
doing it myself is pretty easy anyway so no biggie
don't think its mutable either
well, doesn't return a mutable collection that is
well its not mutated by bukkit
bukkit copies the list
ah well there you go
yeah nothing else should really touch that list, only thing is I believe fake players may show up in it?
don't remember
but there's still a chance there's something at a lower level that might affect it, I take it?
only if there are fake players
I think there is a setting to shuffle players
but that should only affect the tab list right
?
didn't know spigot added that
@warped basin either way the proper way to track player turns should be kept by you i'd say its initially adventageous for you to use the player list given the aformentioned setting isn't on
Do you have any idea on how I could do this? Struggling for no reason lol
Can't figure out the fallback
how about you return the fallback and not a Type...
Like...
I think I'm gonna use my own system to determine the turn order just to be ultra safe, don't wanna run into any weird bugs later down the line because of it
return falback not T
Yup got it already ๐
probably better to implement it by making an enumValueOfOrNull<T>(name) and defaulting with ?:
no its not, but just make it
Lucky me
Yeah this looks cleaner
And how about safeValueLenient which capitalizes your string automatically lmao
I don't need it rn but it sounds funny
cant believe that already exists i reimplemented that myself i am so dumb
It does?
did you just write that
Yeah
i thought it was stdlib nevermind
Lol
I wrote safeValue like a week ago
And today I decided I needed a fallback method as well
also for KDoc you dont use @param and stuff like that you use [paramName]
For sheer convenience

