#help-development
1 messages · Page 899 of 1
And create a group inventory which holds quest items. Dont let them interact with it. Just place quest items in the groups quest item inventory.
i'd like to let players actually do quests separately in some cases
So depending on the quest type you change it
but if they are close to each other and both come to a quest giver, i can give quest to both of them
Then abstract it away. Have an abstract QuestHolder and PlayerQuestHolder, GroupQuestHolder.
Assign quests to each holder depending on if its a group quest or not.
but if one collects the knife, second get's quest state update same as first one
That sounds completely inconsistent?
maybe
Too many edge cases?
i still need to think about it
yeah maybe the way with having group quest item container and group quest list is a good solution
best actually
I think before thinking about a solution, you should try to properly fetch out the actual problem.
Because this sounds like you are not even sure what you are trying to do in the first place.
there are too many edge cases in every part of multiplayer
not just questing
then abstract them like @lost matrix said
let players modify the server world by doing quests
that's the only goal
no matter if they do it separately or together
world should change for both
First test them using QuestHolder and PlayerQuestHolder, GroupQuestHolder
In that case you will have to create a decent system for keeping track of who has which active quest.
And dont forget that offline players can have active quests which might be done when they log back in.
Afterwards make a system where it checks if they are in a specific radius
so true
also a funny case
for example player logged out in a dungeon
and other player triggered it's collapse
You just populate their active quests when they log in. Cycle over any they have ane remove dead ones.
what would happen to player when he logs in
Each POI should have a default safe spot. If a player logs in while inside any POI, they simply always get teleported to the safe spot.
Player logs in, you check their assigned quests and remove any that are dead/invalid
am i actually allowed to continue the game if some of the players leave during the playthough...
for example For The King doesn't allow it
Depends on what you are aiming for
if you store the active quest in the Players PDC you check if it's still actiuve/valid when they log in, if not you teleport them out
just trying to get if open world rpg is even syncable
i'm not coding it for minecraft
ah
same principle
I think i should actually copy mechanics from for the king
Its not an open world rpg but
It has some kind of separate questing
Even tho 3 players are in the same world
But what's actually interesting is that to continue journey you need to wait in a lobby for all saved players to connect
So if you start a coop with two playes, you need to wait for the second player to continue the next day
So the host player stores server saves
And if his pc gets smashed, play through stops for everyvody
What do you guys think?
No player should be dependant upon another for their game play.
They should have the option of restarting the quest
this is more of a general java thing but yea, can someone explain to me exactly how java's serialization's forward/backwards compatibilities work what i can do and what i cant do?
because the docs are rare sparse on this
https://docs.oracle.com/javase/6/docs/platform/serialization/spec/version.html
Also: What the heck do you need that for?
network communication not using the servers standard communication
also storing data to a database
Ok but the versioning is of no concern here. Thats an uninteresting implementation detail.
well i wonder for example, what happens if i add new fields to the class, remove no longer needed ones or rename fields
and then try to deserialize an older version on the harddrive back into an instance of the updated class
if data is simply lost if fields are deleted thats fine as theyre obv no longer needed but if it throws exceptions thats bad
I would just use json then. Serializing to binary blobs is kinda outdated imho.
hm
protobufs 🙏
whats the method to make an item enchantment not show in lore?
As in make the item glow
nvm discovered ItemFlags
Y2k NBT serialization api when?
Goofy ij
ill check if it suits my purpose
Or bson
i wonder does the server just crash when it tries to exceed the specified heap size limit?
Main reason I haven't is because of ItemStacks
They're a pain in the ass
and if every instance has the chance to trigger the OutOfMemory exception, shouldnt virtually everything be wrapped in a try block to avoid the exception being propagated across the stack to the server?
sec
If you're trying to recover from OOM you're doing something wrong
error
That's kinda irresponsible imho
so just let it crash?
Yes that's why OOM exists and why it's an error
by propagating to the stacks top that the jre terminates the process?
You're not supposed to recover from it
Errors mean oh shit this should never happen panic!!!!
Not yeah this happens sometimes whatever lmao
but by that logic, certain plugins or java programs in general simply stop working at certain complexity
Yeah all programs do lmao
?
if not run with more heap size limit
Yehs
If you run out of memory even your OS will crash
System requirements are a thing if you're talking about that
Well to an extent
i mean theres still the pagefile
in any reputable os
Os tend to recover but it's because it controls that
But that's the lowest level lol
I refuse to elaborate more but if you try and recover from OOM in a high level non important application you're stupid as hell
Has anybody yet figured out how to register an enchantment in 1.20.4+
I need dat glow on those items
Yeah
Compare different mappings with this website: https://mappings.cephx.dev
Yes
Unfreeze the registry
And use nms
but what about say terminating gracefully? e.g first save progress by reducing non relevant datas refcount to 0 to free up memory and then store progress before terminating?
You're out of memory good luck performing those operations without any memory
That is exactly what I implied I couldn't do
?mappings is all mappings, did you want me to browse everything
Compare different mappings with this website: https://mappings.cephx.dev
hm
You'd need assembly to keep things in the CPU registries and out of memory
i mean i could with the jni but that defeats the purpose of plattform independency
That is closer to the truth. The reason I'm asking in the first place is because I didn't know what classes were relevant
Dude
and i did before
Or you could use Unsafe to just kill all the memory and use the empty space
Did someone say unfreeze registry
Do you want me to guess blindly
ZBL wants to register enchants
Do you have any other idea how to add glow to an item
Teach the man
Anyways I gotta go ill stick to my pont don't be an idiot
Cursed code incoming
public static void unfreezeRegistry(Registry<?> registry) {
try {
Field intrusiveHolderCache = getField(MappedRegistry.class, Map.class, 5);
intrusiveHolderCache.set(registry, new HashMap<>());
Field frozen = getField(MappedRegistry.class, boolean.class, 0);
frozen.set(registry, false);
} catch (ReflectiveOperationException e) {
e.printStackTrace();
}
}```
I mean you were never supposed to register custom enchantments in the first place
Thxx
I gag a little each time you send this
Lmfao
Oh no choco is here to ban me instead
Technically they shouldn't be unfrozen at all
not that registering custom things there is remotely a "supported" thing even if you'd have a way to edit the registries 
So the best way is the worst way possible lol
I wish there was just a way to make an item glow
How is that not a thing
Why does it have to be hacky
Mojang pls
Yea, throw things at mojang
I mean, we have VisualFire
where is VisualEnchantment
Always forget about visual fire
Well, enchantments are server-sided, their translations are client-sided
sounds like texture packs
:p No I think they just straight up don't render non-vanilla enchantments
tbf
I don't see the reason why translations couldn't be done server-sided imo

Thew only reason the client doesn't understand custom enchantments is because they are communicated by id
Take the player locale, return the string
Translation strings are best hosted on the client so the server doesnt' have to have a bazillion language files
- you can change strings whenever you want
You don't want lolcats on the server?
I like pirate speach
Makes sense
conlang

I like the prereform russian langauge
No one is stopping you
Shh it works great, don't spoil my fun
i keep asking myself why NMS mobs have methods defined to set their bounding box when the bounding box is client sided
I mean yeah there is also the fact that you have to send lots of variable and potentially long String data to the client
And that's just for messages that get sent
Item data isn't sent each time it's looked at, for instance
What if my item is in English but I throw it to my friend who's language is French?
or LOLCAT? :D
Hi, is there an API or some way to make a passive mob attack a player, or do I have to just damage the player when the mob is nearby?
It's probably like "omg itme"
yea but i tried to enlarge mobs to create custom bosses which naturally didnt work as intended by creating a custom mob all the way up from the base class
You can make passive mobs angry yeah
to figure that the actual fields are private
It takes some... effort though
that determine size server sided
Qu'est-ce que cela signifie maintenant ?
- chatgpt
Yeah you can
Damn
Ik about pathfinding
Dk about attacking
You also need to hack an attack damage attribute on to them since they don't have it by defau,lt
It means you're shit out of luck as a French person trying to read an English-translated item 
pathfinder api but if u make them deal damage directly through the api of an aggressive mob the server crashes
Hence the attribute hacking
^^
I have code for that too but it might kill choco
plsno
because polymorphy
because this is a 2008 codebase
what about a 2008choco?
I remember doing that as well. It is some truly janky task to make a murder chicken
i did make a murder chicken to test xD
u cant make the chicken deal dmg but the player can take damage that in turn can be attributed to the chicken as source
It's not horrible, but it's no C++
Languages with actual templating make composition a lot easier
Choco avert your eyes
https://paste.md-5.net/liwaxobaxo.java
Java has to deal with generic hell
Your reflection utils are doodoo
u mean the winapi's COM model?
tbf, you can probably support a lot more versions if you're indexing by type rather than indexing by field index or by name
Yeah that's why I do field type and index
Since the name will just be some magic obfuscated letters
I'll get on that when Mojang hires me
tru
everytime i see code without forward declaration it kinda gives me chills despite java being perfectly adapted for it idek why

u mean make /rl safe to use for production?
🥺
The game just isn't designed for it
xD
ok I just had a genious idea
Coll I need your help because I do not want to browse mappings, what types are this map of
Im gonna put a zombie ontop of the cow (riding it) and make it invisible
when i wrote my server architecture in C++ i made sure to make my /rl command safe to use (dlls tho/different project) just because i wanted it to just work xD
If you don't remember ig I'll ahve to browse
Uhh
Lemme check
Thats more like "spigot thread safety"
My server starts up in like 3 seconds I think it's a pc issue
It should be a bunch of HashMaps and IdentityHashMaps iirc
private Map<T, Holder.Reference<T>> unregisteredIntrusiveHolders;
I presume T is Enchantment in this case?
Should be
Ty
iirc that was only one problem the other being that certain variables belonging to the servers vanilla functionality remain between /rls
i mean spigots "vanilla" functionality
but the whole server thread is by default single threaded anyways no?
Hello everyone
I'm looking for a spigot post explaining why we shouldn't use "Main" as a name for our spigot plugin.
Is there a command here ?
with only a couple more for chatserver and login queue
Pure spigot plugins should work perfectly when with rl but plugins thats depend on nms dont
Ah maybe, I've found it but I thought the one I was looking for was created during 2023
W/e, th
Ty
i mean yeah, at least everything that gets invoked in the game loop
a thread being single threaded ah yes that sounds about right
Has anyone else noticed that with maven § works but with gradle it doesnt
Non english characters also dont work with gradle
Ok ill check
Ok if this works I'm a magician https://paste.md-5.net/cisovuyiro.makefile
pfff this guy clearly doesn't know how maps work under the hood
wait till he figures out maps are just fancy lists with extra steps 
what does a NodeTuple do
what a NodeTuple does is kinda important 🥲
for example HashMaps have nodes too well atleast in separate chaining
@young knoll you gotta let me know when the slime merges something Commodore.java so I can begin the work I was put on this earth to do
question - are the address and telephony fields in the cla reeealllyy necessary? i know they're marked as such in the form but i'm not too comfortable providing those and email is good enough to contact me
How do I add a NMS enchantment to an item
Reason: this
its probably a legal requirement
yeah no i'm aware, but is it just a "gotta have this on paper" kind of thing/will anyone get in trouble if i leave the fields empty/gibberish?
its a legal document. If you leave the spaces blank your application will likely be rejected
MD will not leak your address or telephone they are purely used for legal filings
they are not public either
Y2K, any idea? 🥲 You seem to be somewhat familiar with nms
you can also specify your stash name to be a username instead of your real name if you are uncomfortable with that
Unfreeze the Enchantment registry
but yeah fuck it
this can be done with reflection
This
Really did not answer my question
idk exactly how to do it lmao @young knoll is the master of registry unfreezing
No like
This is literally not even close to what I'm asking
I'm not asking how to register an enchantment
you'll need to extend an NMS enchantment after that then register it
NMS enchantment extension should provide you all the data you need to setup your enchantment
you can than retrieve it from the bukkit registry using Registry.ENCHANTMENT
O
I'd reccomend making static fields with all your enchantments
then you have the bukkit version of your enchantment
I have direct access to the variable which is my nms enchantment
Can I just convert it to a bukkit enchantment
to do that you go through the registry with bukkit
Kk
Registry.ENCHANTMENT.get(NamespacedKey.fromString("key:myenchantment")
Wait uh
when you register it to the NMS registry you do
I asked this before but didnt get any ans so asking again
I dont know anything about plugin development. theres a plugin i want to use but it isnt up to date. the last version it was updated to was 1.19 and I want to know how much do I have to learn to update that plugin on my own
you have to specify a ResourceKey
kotlin cringe 
I provide a String though and it's also accepted
it might prefix it with minecraft then
I highly reccomend you use your own namespace though
if the plugin doesn't use NMS you don't have to change anything
how do check if it uses NMS or not
is it open source?
then when will it stop working
i mean at one point it has to stop working with the latest versions right?
Not unless spigot introduces a breaking change into some of the API you use
Or unless you use NMS (which you most often shouldn't and currently you don't)
alright then thanks
and i want to get into developing plugins for my server so can you suggest me how i should start
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
thats so long now
Not long enough
alright
baeldung my beloved
if you prefer learning from video you can learn both java (or kotlin) and spigot from Kody Simpson
Kaupenjoe also has a super great and short java series that learn most of the thing you need in a super short time period
has kody gotten better at coding?
much of the code from his videos is icky atleast the ones I watched
the real meta play is to watch The New Boston
i mean yeh sometimes he do questionable things (i still dont know why he used linear search instead of hashmap on his gson video) but i* think hes a great starting point
His videos shouldn't be used to learn coding but they are good to get a grasp of the Spigot API imo
yep i agree
Whats the keybind to make this appear on intellij? It sometimes does and it sometimes doesnt
Ok thx
Ctrl+P
i say you can learn spigot api and basic stuff from kody (u just need to watch 30 video at must) then u can learn designing patterns from Geekific series. (bc kody sucks at designing patterns)
no clue what you're talking about exactly, but sometimes linear search can be more optimized than hashmaps
for a small amount of elements
https://paste.md-5.net/owigajolew.cpp Any idea why this doesn't work? All the coordinates are right, the method returns 0 changes
Here's my mask -> Mask barrierMask = BukkitAdapter.adapt(Material.BARRIER.createBlockData()).toMask();
Ok apparently not always because this code works fine
Hi , uhh just a question does sqlite not work with latest version?
the file is being created , but nothing happens when player join , or leave it does not load , nor create , or save his data to the sqlite data file
did you register your listener
but if i use mysql it works just fine , and btw the sqlite was working for older versions
only for 1.20.4 it stoped working .
show code
the same code i use for other versions , for example 1.16.5 , or older it works , and the data is loaded ..
idk why it happens .. for only 1.20.4
lmao that class name
Longest class name award goes to
That is for real the longest name that is not a troll I've seen in a while god damn
May I introduce you to
SkyPvPSQLiteProfileDataManagerProvider dataManagerProvider = new SkyPvPSQLiteProfileDataManagerProvider(plugin);
Jesus
(no I don't use var)
What the frick
If you want a real-world example Spring Boot is cheating
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/support/AbstractAnnotationConfigDispatcherServletInitializer.html
declaration: package: org.springframework.web.servlet.support, class: AbstractAnnotationConfigDispatcherServletInitializer
haha thanks god , my class is not the longest xD
anyway , ihave another question .. about libraries
so for example i have been using a library but its removed from github , but i have the latest version my pc , i mean the source , how i can use it in maven? the one that is in my pc
it does not support 1.20.4 , and i want to add support for that cuz my plugin stoped working :p
if it was removed from github I don't think it should be removed from mvn repositories
https://mvnrepository.com
Look it from mvnrepository website
it was on github
You want to modify the code?
mvn install it
adding support to 1.20.4
If you can obtain the latest build, try contacting the developer if he allows the modification of the code
if you have source just modify andmvn install it
You can do that
Hi iam getting an error ..
iam trying to install 1.20.4 using buildTools , i downloaded the latest one from spiot just now
any idea?
?jd
declaration: package: org.bukkit.entity, interface: Golem
Hello I have a question related to redis/mongodb and designing my minigame network the right way
So, generally it would be better if I loaded statistics from database when I needed it instead of keeping the data in redis once the player joined?
For example for now I actually cache data so I do not ask neither redis nor db to get the data when I only need to display it. Also I load statistics from db to redis when a player connects to proxy and upload it from redis to db when a player disconnect from proxy. Is it a good way of doing this or there is something I would want to change to improve the current base I have?
(Also, when I need to change player's statistics and he is online then I do this on redis's side, when he is offline I directly change it in the db)
because as minikloon said it's overcomplicating and doesn't make much sense using redis since the query response time of redis and mongodb relatively unnoticeable
What is that class name
Would any help with configs on /quests /menus and real scoreboard?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!
Also this is for #help-server
Has anybody worked with both Kodein DI and Dagger? What is your preference and why? I want to use some DI lib for but not sure which one would be a better fit. Is it just a matter of preference? I already sorta have experience with Dagger (Dagger Hilt with Android but not just Dagger)
Ping me if you respond plz
it depends, how big is your playerbase? im working on an event (40 people, not more) and mongo works just fine for me, if ran non-blocking. if your playerbase is <100 people i think its way too overkill.
is there anything that can be done about your plugins ending up on black spigot
Yes you should be able to DMCA them since they're distributing your copyrighted stuff
might not be worth it though
that's unfortunate
does spigot about licensed plugins that are premium? seems like the rules kinda tie the hands of the developer and just say welp, nothing you can do to stop it.
There's not much Spigot can do
So you as the developer have to take action
which most likely will cost more than just letting it be
yeah, its not really about money. its just the point of it.
I make like .60 per purchase of my plugin after fees usually.
spigot could do things, by allowing developers to obfuscate their code, and allow for licensed plugins
Obfuscation and licensing won't stop anything
all it will do is introduce potential security problems
they why isn't intellij ultimate/webstorm, any jetbrains products being pirated? they're all java applications
I wouldn't say theres a need for it
besides you could probably find them pirated if you wanted to
but you might end up in trouble if you try to sell anything you make with it
Did you try rerunning in an empty folder
yeah i tried
Try running Spigot without the GUI using Git bash
99% of the pirating market for Intellij's software are students anyways. Jetbrains is smart and made the student license. They know it'll be abused but it's not what matters. What matters with Intellij is that when you join a company you'll want to use it and you'll have to pay or they can sue your company for millions.
There's a strong difference between you, a nobody developer, and IntelliJ, a software conglomerate with lawyers out the ass
for sure, that 's much is understood. I just mean that there's really not ample resources out there for pirated of 'cracked' versions of jetbrains products is all i was saying
They can usually enforce the legal documents they draft :p
counter to the "that won't help" claim
so its not a matter of the systems working, you're saying its the threat of punishment that works?
They may just be tougher on it. It's relatively difficult to find good Adobe cracks as well. They're on top of things like that legally
If a server steals your software you'll know because to provide support you ask for proof of purchase. Just ask Alex he gets plenty of pirates coming to him I'm sure. The secret sauce is the people stealing it probably don't have a server worth anything anyways.
I believe there are some Adobe cracks that do work, but they're severely outdated and at that point it's just not worth the effort because it drives interest to their newer versions and ultimately benefits them
"Hey, want new features? Now that you've tried it for free and your workflow relies on it, buy them!"
alright
they reel you in
People will pay for the convenience of having direct access to you for support. Providing good support to proof-of-payment customers.
It ultimately comes down to "Stay on top of things legally, anything willing to stay out there probably isn't worth your effort anyways"
No one has come here complaining about mass piracy. You could use bstats to track some metadata (or use your own API) but at the end of the day it's not worth the effort.
Reminds me of people that hide their /plugin list
I mean listen, hiding versions I can maybe understand. Hiding plugins and authors is annoying
I never put a permission behind my /<plugin> version commands so if someone really wants to hide that my plugin is installed, they have to install a plugin to block my commands :p
I'm not complaining about mass piracy. I don't have some super populate plugin. It was just a passion project in university that actually turned out pretty cool. I don't do it for money, I have nether even withdrawn the funds I've accrued from it. I have a career, it was just the ethics of it all that bothered me and I wondered if there's anything to be done.
Like, if you need to hide your plugins so you don't get copied, your server is shit
hypixel
/s
most servers hide their plugins..

not justifying it, but your statement is false
i have made a plugin and i got 91 buyer over 2 years of hard work , is there a way to get more customers?
hypixel has icanhasbukkit last time i checked so its good enough
Make something a bit more unique I suppose. It comes down to a good balance between unique but still useful enough
You could make tiktoks about it
they used to have /about I think
Good idea :p
and it said running on a modified version of Spigot
yeah so its not as easy to find a vulnerability in one of the plugins
TikToks might work, but it's a paid product so ehhh
Who would go to those type of lengths?
You've gotta convince a TikTok viewer to buy something
Lol security through obscurity has never and will never work
making a tiktok about it is going to be forced and disingenuous
? ?
sure, whatever the reason, they are hiding it. I just think the claims of "if you need to hide the list, you're a lame-o" is dumb
hiding versions I can maybe understand. Hiding plugins and authors is annoying
It's snuffing out the hard work of the plugin authors
sure thats fair
You did not make that plugin, it's not fair to hide our names
I think hypixel actually uses a modified version of Citizens
and they have a small base dependency on NCP
I can totally understand hiding version numbers though for vulnerability reasons
Bugs get fixed, bugs get abused, all that
If the exploit exists and there is someone who wants to abuse it hiding the plugin name won't stop you e.g. the Vulcan exploit I'm sure most servers hid that they had Vulcan but that didn't stop them from falling victim to the exploit
but i see some product (plugins ) that are not good , and it has like hundreds of buyers ..
That was the worst MC video I've ever watched ngl
dumb kids be dumb kids.
Yeah I get that. Either a stroke of dumb luck or they got there first
?? What video
There really are some dogshit premium resources that get way more downloads than they deserve lol
This crap
??
Log4J
Never seen it
indded
Is my first thought
the baitest thumbnail and title ever
lmao no it was them checking for GUI functionality via inventory names
Yeah, they claim that Log4J is a "java exploit" and therefore not applicable 
which is worse
So someone figured that out, renamed a chest to one of Vulcan's administrative GUIs, and allowed them to run any command
This is the reason you don't use inventory names to check for GUIs
Yep
Honestly impressed nobody found out sooner
This is why hashes rain Supreme lol
wow that is pretty bad
They attempt to brush Log4J off but they're still wrong
Is there even a reason to check for inventory name?
not even permission checking the actual actions?
if(getNearestPlayer(golem) != null) {
golem.setTarget(getNearestPlayer(golem));
}
if((count.get() & 30) == 0 && count.get() != 0) {
golem.setVelocity(new Vector(0, 1, 0));
}
if ((count.get() & 10) == 0 && count.get() != 0) {
golem.getLocation().getWorld().playSound(location, Sound.ENTITY_WARDEN_SONIC_CHARGE, 1.0F, 1.0F);
Bukkit.getScheduler().runTaskLater(HeeseDungeons.getInstance(), () -> {
drawParticleLineBetweenEntities(golem, getNearestPlayer(golem), Particle.REDSTONE, 10);
getNearestPlayer(golem).damage(5.0, golem);
golem.getLocation().getWorld().playSound(location, Sound.ENTITY_WARDEN_SONIC_BOOM, 1.0F, 1.0F);}, 60);
}
count.getAndIncrement();
}, 20, 20);``` Hi, is it not possible to run a runTaskLater inside of a runTaskTimer? The code at runTaskLater does not get executed later
no but it's the naive approach
Like, if you open the GUI then no need to check the name
its not log4j
You know what you're on
For the events you need to know
The best way to do this is hashing with a handler
Map<Inventory,Handler?
You can, yes. But I think your logic is a bit backwards
not going to work
No that's still naive
again, obscurity
Ok, whered I mess up?
also 'invisible character' can be defeated by a rspack
It's terrible design because you should only check permissions. If someone has permission who cares if they're renaming things?
Or, rather, you probably want %
also spigot says plugins can't be obfuscated, but I own multiple plugins that are heavily obfuscatred that I purchased from spigot. I guess its about who you know
Im trying to see if the number is divideable by 20 or 30
Yeah, you want %, not &
limited obfuscation
Oops
Obfuscation is allowed under certain circumstances.
yea just check permissions
literally one of them reports a virus on windows defender, and they say "just ignore it, its our plugin obfuscation"
If you believe a plugin is infringing on the rules big or small report it
i just laughed. i havent played in months but i stil lurk in the discord
Though why does the SONIC_CHARGE part get executed but not the SONIC_BOOM?
highly doubt anyone is checking code
Obfuscation to the level where it can't be read is not allowed
Code is checked for premium plugins
It's why it can take months to be approved
then whats the point of obfuscation
I imagine if reported it is
well i can guarntee you that this plugin IS compeltely obfuscated to the point where it cnanot be read, and windows defender thinks its a trojan
Then report it and let staff deal with it
Likely they'll give them a chance to change it then remove the plugin
this plugins has many thousands of downloads. dude its about who you know. they're not gonna do crap
plugin name?
You say that yet you've not tried to report it
That's not true. There have been premium plugins that have been taken down for introduction of malware. You'll also get notified when a resource gets removed.
i haven't played in several months, I just recently saw in the discord players complaining about a "virus" and they just responded with oh you can ignore that, its because of the obfuscation. so i looked at the plugin and its completely obfuscated to the point where you cannot make heads of tails of anything
then you should report it instead of being all doomer about it
its likely this was introduced after the plugin was approved
Java apps are commonly recognized as malware, so I don't see unusual stuff lol
im not going to, because i think they should be allowed to obfuscate it
what are u trying to achieve
im all for protecting your work
obfuscation is the least close thing to protecting your work xD if I had 14 dollars to spare I'd crack it open and de-obfuscate it
Then what are you complaining about
Its likely YOU can't understand it but basic obfuscation is permitted. Report it if you are concerned and believe it's breaking the TOS
You need me to spot you? lol
what a terrible thing to say/do
nah cuz I'd need to learn how to work deobfuscater tools
and I've got exams this week
maybe at a later date
with Cmarco's stuff
I'm not concerned with it in the slightest, I was just saying there are plugins who do it and get away with it. Tough crowd in here.
Just report them then?!
You do realize that java is an easily de-compilable language right?
Dude, no.
I'd report, but I haven't bought the plugin so I couldn't
so i can't see for myself
it's not even obfuscated - they only removed local variable names?
maybe theyt removed it after the virus warning and complaints? i don't know
You know, if windows defender is throwing warnings about a file, then something probably infected it.
yeah especially since it never touches jar files xD
i havent used it in like 8 months, i wouldn't know
Then why are you complaining? xd
I've run so many windows viruses jars you can do insane shit without getting detected
who's complaining?
you are
wrong.
I've seen a lot of poeple get infected jars from NON spigot site and end up having all their plugins infected.
you were complaining about 5 minutes ago
wrong.
is this BT?
league is crashing my audio but everything is up to date idk what to update anymore 😭
did you try running it through Gitbash?
Resource temporarily unavailable? tf is that error?
should i?
yes
also @twin venture show @kind hatch the full error
he is the GUI wizzard
?paste your log
Shadow my guess is that its GPU issues
But it says it happens in applyPatches.sh
It mentions some Cwlng I believe it was
well yes because the process terminates
Ohh
i could not use , this didn't work
use patebin then
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i have gtx 1050 ti oc editon 4vram ..
Trusted by PIka Network
lmao
gpu doesnt matter on bt
same
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
it does actually 
it fail here :
like it finish download and patching the classes
but after a while it send that
btw i run the buildtools in a empty folder nothing in there..
just try restarting your computer
That's a wild error.
my guess is the environment is totally fucked
windows usually fixes this itself on restart
lr gonna try to do that
When all else fails
May also want to check for system updates
A lot of stuff I see related to cygwin is around GitHub desktop.
^^ recent windows update fixed my stability problems and bugs
Not sure how LTSC ended up so unstable and bugged
Location l = target;
Vector direction = sheep.getLocation().toVector().subtract(l.toVector());
sheep.teleport(l);
sheep.getLocation().setDirection(direction);
I tried using this code to hava a sheep look in the direction it's "moving", but the direction stays the same
@twin venture Did that restart help?
Kindly, could anyone send me an example of a region setter using the PlayerInteractEvent event? I just need to know how to get the points and that there is only one player who can do this and therefore prevent the event from blocking if other players place blocks.
not really , still
i gaved up i will just use
https://paste.md-5.net/fanezaripe.cs
I had this but it doesn't work as correctly as I would like
can you get pitch and yaw from a vector?
You can calculate the angle between the vector and an axis. Other than that a vector doesnt really have a pitch.
yaw is what I want
Relative to what exactly?
I feel like this is a mega beginner version but the answers that appear on google doesn't clarify this. In CommandExecutor, the onCommand() method, is there a difference by returning true or false? They both just end the code, so I'm confused. Some forum commenter said that false is for misuse or bad usage but I still don't get it. Is it just to make your code more readable?
The yaw needs to be calculated relative to an axis. Presumably x or z
what entity?
returning false will send usage defined in plugin.yml
a sheep, why?
ok, I think I have a wrong understanding of yaw and pitch, will look into it
Ohhh
a lot of people just return true and send there own usage, but its designed for true for a valid and passing command and false for invalid or failing
What does the usage message look like
whatever you define in plugin.yml
and it just sends that?
iirc yeah
alright alright
^^
I would also be fine with a series of points of what I have to do
a sheep doesn't have a separate head so you can just set the direction
I tried that, but it didn't work for me
Location l = target;
Vector direction = sheep.getLocation().toVector().subtract(l.toVector());
sheep.teleport(l);
sheep.getLocation().setDirection(direction);
why teleport before setting direction?
because it has to move
set direction before you teleport
You need to set the direction of your teleport location and then teleport the entity to it.
why? I calculate the direction beforehand, so it shouldnt matter no?
because you are modifying a copy of it's location
speep.getLocation() returns a copy of it's Location
Just let the player select two Blocks and then create a BoundingBox using BoundingBox.of(Block, Block)
Does adding a permission on a command checks the player's permission for me instead of adding a permission check code?
yes
damn
my problem is to take the two locations with two different clicks
alright thanks
hm, still not changing direction on teleporting
Location l = koordinatenToLocation(targetKoordinaten);
Vector direction = s.getLocation().toVector().subtract(l.toVector());
s.getLocation().setDirection(direction);
s.teleport(l);
Save the first click somewhere
Like a Map for example
again you're modifying a copy of the location
and up to here. But if there is another player on the server who places blocks or does something else and the event detects it, how do I block the other players?
but setLocation is not a thing as far as I am aware and teleport doesnt have a direction parameter?
so how do I change it
Create a class like this and put it in a Map<UUID, BoxSelection> where every player has its own selection.
public class BoxSelection {
private Location first;
private Location second;
public void setNext(Block block) {
if (first == null) {
first = block.getLocation();
}
second = block.getLocation();
}
public boolean isComplete() {
return first != null && second != null;
}
public BoundingBox buildBox() {
return BoundingBox.of(first.getBlock(), second.getBlock());
}
}
modify l, then teleport
You want to stop other players from placing blocks while someone is creating a region?
no, I want the event to detect only who gave the command to start the region. P.s: I pass the name of a player into a map
Arent enums breaking the open closed principle?
Enums by nature contain all their possible values which will ever be available.
There is no need or reason to ever extend them, which makes them irrelevant for the open closed principle.
okay, so i guess its my problem for using them for extension?
yes
you made an OOPsie
yes :(
but in this case i would never use enums, as im never sure if i ever need to add categories
i might be sure in the momnet
so when to ever use enums?
you cant ever be 100% sure
When you know your set of values is final.
For example ordinal directions: North, East, South, West
okay, so settings for example should be java classes?
as there could be more settings in the future
Yes, as you're also storing state
I mean you could always add more values to your enum later on
i can but that would break the open closed principle
Well, sometimes you need to break those principles. You wont always be able to fully follow SOLID for every design decision.
But yeah, preferably you wouldnt want to edit them.
I know how but kinda confused i think im brain farted.
How would i make a check to test if player rode a minecart in last 10 seconds
SOLID is like a guide to get you to a good design spot
Store a timestamp of the last usage mapped to a players UUID somewhere.
This way you can look up how far the last minecart usage lies in the past.
Right thank u so much
Sorry. Stupid question. I feel dumb for asking
what would be the best way to create boosters? I was thinking of adding the multiplier to the player's PersistentDataContainer
although feels like there's a better way
Thats what the discord is for
also sorting the amount of time left when the player leaves ^
What exactly is a "booster" to you?
just right-clicking an item which gives you x amount of multiplier for x amount of time
ik how to do all of that just i'm wondering the best way to store them
What happens if your server crashes or restarts? What you going to do when players complain about lost boosters.
If its more than 20 mins for a booster id use mongo to store it
PersistentDataContainer values ain't lost over restarts
mongo is mid
Oh i thought it did
That's why it's called "persistent" lol
not persistentdata
During runtime you should use an actual instance mapped to a players UUID Map<UUID, BoostHolder>
Then on disconnect you can remove it from the map and store it in his PDC, in a file or a database. All of those are viable.
But i would not recommend constantly checking his PDC for values.
👍
Thank you for clarifying this
Not even joking, i was deadass confused ab PDC
wait since we are on the PDC topic, i am accessing the PDC everytime the player breaks a block (i am making a prison server), which checks for all the enchants. Is there a better way then? Since you said its not recommended
Now you know. Whatever you store is never lost unless you specifically delete it
on their pickaxe ^
could store in mem ig but thought that would've been a mid idea
Same pattern:
During runtime: Map<UUID, SomeStatisticTracker>
On session end: Store in PDC, file or DB
oh so store the whole pickaxe data inside memory?
help setup 1.20.4 into maven
ItemStacks are a different topic because their session is really hard to define.
thought that would've been worse but ig that works
well i mean i just need certain values of the pickaxe therefore i can store inside a custom class
Ideally you would apply the same principle to ItemStacks.
Adding the data directly to the PDC this way is fine
hi 7smile7 , do yk how i can fix my problem?
okay so my current system is okay? It is running async since i'm running it on a duplexchannel so
i dont see why i would need to worry too much
trying to build 1.20.4 into the maven , but with no avail
If i store data in PDC, is it for all worlds? Like lets say I travel to the nether will i have to also save data for this world in my code?
https://www.spigotmc.org/threads/working-with-data.562421/
"The states of data"
and
"The scopes of data"
could be interesting for deciding where to place your data.
👍 i will read that, tysm
If its the players PDC then yes. It is completely bound to the Player.
But there are other objects which hold PersistentDataContainers:
Is there a utility to get the cooked version of a food item?
When using classes extending from a superclass instead of enums, would i pass a new instance of the subclass or, would i just make the superclass and the subclass static like enums?
Hello i have 2 Questions.
First of all i have the: PacketPlayOutExplosion Packet.
What is the code for this: ``((CraftPlayer) target).getHandle().c.a(new PacketPlayOutExplosion(Double.MAX_VALUE, Double.MAX_VALUE
, Double.MAX_VALUE, Double.MAX_VALUE, Collections.EMPTY_LIST, new Vec3D(Double.MAX_VALUE, Double.MAX_VALUE,
Double.MAX_VALUE,
Explosion.Effect.a,
ParticleParam.a, ????
ParticleParam.a, ???
SoundEffect.a(MinecraftKey.) ????
)));``
the second:
In: PacketPlayOutScoreboardScore there will have the "NumberFormat"
unmapped 💀
NumberFormat ->package net.minecraft.network.chat.numbers;
Do yourself a favor and use mojang mappings
what you needed?
?nms
I can't believe I am asking this, but does anyone remember how the hell to launch a server and pass a command to it from the same bash?
java -args -jar whatever.jar --nogui
[something] stop
I'm trying to make it so that a server completes startup and immediately stops.
Trying now! (sorry, I'm a inexperienced with bash)
Never used expect before, but this seems to be exactly what I need
how i can make this lib :
used insted of this one?
mvn install it
i did , but it didn't update it
should i restart?
btw its not on github anymore :/ or any other website so i want to update it for my plugin usage until i make my own
let's go
Bukkit.getScheduler().runTaskAsynchronously(this, task -> {
frames.forEach(frame -> {
frame.getBlocks().forEach(block -> {
int x = block.getX();
int y = block.getY();
Location newLocation = location.clone().add(new Vector(x, y, 0));
Bukkit.getScheduler().runTask(this, task2 -> {
newLocation.getBlock().setBlockData(block.getMaterial().createBlockData(), false);
});
});
Bukkit.broadcastMessage("Displaying Frame");
});
how can i delay around after each frame
I tried to setup NMS how it is described here: https://www.spigotmc.org/threads/spigot-bungeecord-1-17-1-17-1.510208/#post-4184317
but I do not get the actual package to import despite maven running just fine.
?nms
This doesn't work...
java -args -jar whatever.jar --nogui
expect "[Server thread/INFO]: Done (*)! For help, type \"help\""
send -- "stop"
But I'm guessing it's because I have no clue what I am doing?
Can't you just make a script that's wait a bit and then sends it?
Yea that's what I did but when I try to import it it isn't there.
did you run buildtools with --remapped for the version you want
that's the question though; how do you send it?
is it possible to java -args - jar whatever.jar --nogui <<< stop?
I guess tehre's only one way to find out.
need some help with setting up a dev environment for craftbukkit
i've:
- forked the repository in stash
- cloned the fork
- ran buildtools in another directory
- applied patches from
/buildtools/path/work/decompile-latestwith shell script to the forked and cloned repo - opened the cloned&forked&patched craftbukkit project pom.xml in idea
at this point idea absolutely shits itself with several pom errors including, but not limited to
Could not resolve dependencies for project org.bukkit:craftbukkit:jar:1.20.4-R0.1-SNAPSHOT<-- like it's missing a respository definition in the pom?
Cannot resolve symbol 'describe'
Cannot resolve symbol 'project.build.outputTimestamp'
Cannot resolve symbol 'shadeSourcesJar'
Plugin 'org.apache.maven.plugins:maven-checkstyle-plugin:3.3.0' not found
Dependency 'com.puppycrawl.tools:checkstyle:8.45.1' not found
(I could launch a screen and send it that way, but I'd prefer not to
try and reload maven
already tried
it actually builds fine over maven>spigot>lifecycle>package if i open the cloned sources from the buildtools folder
Yea i did. Do I need to put it in a specific directory? I just have it in the Projekts root
it can be run anywhere as long as it runs sucessfully
what version do you want it for
1.20.2
thats good, did you change the dependency in your pom and reload?
but changes obviously get discarded every time i rerun buildtools and it's not referring to my forked repo, rather the main stash repo (maybe i have to set a different remote?)
Yea i changed it all to 1.20.2 and then did maven clean and then maven install. It also generated the jar files that are reobfuscated etc. But I still can't import it.
what class do you want to import
I tried to do just do net.Minecraft but what I need is tileentityhopper
...
compare them here https://mappings.cephx.dev/1.20.2/
223 packages
but even doing import net.Minecraft.*; it says Symbole not found
?paste your pom
you have the wrong dependencies
you only need the following ```xml
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.20.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<classifier>remapped-mojang</classifier> <!-- Important! -->
</dependency
you also dont have the special source plugin
?nms read this again
remove the spigot api dependency
still only get sugested md_5 when i do net.
A thousand thanks! I did. Last thing, how do I record the world?
It is java 17 and reparing didnt chang eanything
what happens if you import some random NMS class and then compile anyway? e.g. import net.minecraft.core.BlockPos;
have you already done File -> Invalidate Caches -> Invalidate and restart?
didnt help either
oh wow it solved itself... I klicked on the error in IntelJ and klicked add maven dependency. and now it is there. No idea how that makes sense as the pom.xml didnt change but well.
Thank you very much for the help!
bump
ahhhh clasic IDEA things
does it compile?
odd?
the main error is cannot resolve the bukkit dep
the pom.xml is unmodified straight from the craftbukkit stash repo
did you clone bukkit and install it?
huhh?
did you clone bukkit and install it using mvn install
shouldn't it do that for me?
no
the bukkit repo
separate folder
seperate folder
Wait wait
alright and then mvn install will set it up in my home ~ globally ?
Do IntelliJ people need 2 windows to edit Bukkit and craftbukkit
petition to make CraftBukkit a multi module project 😈
Ha
on windows, yes
and on linux
hmm okay that makes sense, i just thought the pom would do it magically for me
tafuq hoq
nope the pom generally goes fuck you do it yourself loser
Meanwhile eclipse let’s me have them both in my workspace
thanks for the help i ripped a bit of my hair out trying to solve this since cloning bukkit first isn't mentioned ANYWHERE in the dev guide
I can even control click on Bukkit classes from cb to jump to them
well usually BT should cover that, but for some reasons it seems it has not for you
show me the bllack magic
cuz if you can do this on linux it'd open a whole new world to me
oooh i might know why
i don't have maven installed at the system level
as in, the maven package from apt or whatever
yeah that'll likely do it
nah it's only on mac but it's also just a tabbed view
wtf no love for any other system!
why specifically mac
idk
probably a cash deal with Apple to keep all the important features on mac
I want that too -_-
oh, one more question, how do i edit wiki pages. i do not see any sort of edit/create page/whatever buttons
on spigotmc.org
@young knoll i make a janky version that works
yeah but if you do it badly I hear you get destroyed by the wiki police
they usually come to your house with the swat team and take you to jail
absolutely not there
which page?
probably not enough posts lol
which page exactly?
Oh no
eerrrm one sec
my guess is it'd be a post requirement
not being met
or he only tried locked articles lol
wanna see the jank
Maybe?
okay, if you are not coll1234567 do not open this you will want to jump onto the m6 infront of a semi, https://paste.md-5.net/inuhutiray.js
alright, third question - buildtools gui, on linux. how?
run the latest jar
@river oracle wake up
it's not that i struggle with the command line, it would just be handy having a little thinger running on my taskbar i can use whenever i want to without moving my tired fingers too much
i'll check the source
GUI only opens if ran through double click
if you do „java -jar …“ it will not open the GUI
i didnt even know it had a gui
It was merged in january
oh thats why
totally tripping this off yeah
i can't run thru double click because it opens it as an archive
i can try and add an alternative
Cant you create a shortcut to java -jar … that you can open with double click
you don't unless you have a jar launcher
yeah that's what i'm trying
you'd need to manually make a .jar launcher .desktop file or just double click in the file explorer if your distro comes with one automatically

mojang