#help-development
1 messages · Page 888 of 1
yeah if there's no signature conflict, it will use a as often as possible
How would I cancel player walking particles without events, is player walking a server-side packet or not?
Other players particles probably send a packet
But your own are probably client side
could also be that its hardcoded in the client, that player characters have walking particles by default
If they are server-side would I have to intercept a packet before sent and not send it?
that would block it, if you want to achieve that
Yeah there are no events afaik
but looks like its clientside
I mean even if they are clientside for the player itself, I just need others to not see it
which you cant do if its clientside
you could try some hacky way like intercepting the player position packet and set on ground to false
maybe that removes the particles
yes, that's always a good idea. I usually use sth like this to do it:
https://github.com/mfnalex/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/ReflUtils.java
Do you mean it is clientside for all players not just the player itseld?
yeah
Then I will just leave it
ofc that only works if you know the field name. So you'd wanna rewrite this to get a field by type if you wanna do it like that.
If you only need to cache one field, then I'd just do it like you already did
sth like this for example:
private Map<Class<?>, Field> fieldsByReturnType = new HashMap<>();
public Field getFieldByReturnType(Class<?> clazz, Class<?> returnType) {
return fieldsByReturnType.computeIfAbsent(clazz, c -> {
for (Field field : c.getDeclaredFields()) {
if (field.getType() == returnType) {
field.setAccessible(true);
return field;
}
}
return null;
});
}
then you can just do getFieldByReturnType(ServerGamePacketListenerImpl.class, Connection.class)
and it also caches it automatically
yeah that's what you need now, what about tomorrow? 😛 I'd just throw that code above into a ReflectionUtils class and then use it. even if you only use it once, it'll declutter your actual class
@EventHandler
public void onBlockBreakDrop(BlockDropItemEvent e){
if(e.getBlock().getType() == Material.COAL_ORE) {
e.getBlock().getDrops().clear();
}
if(e.getBlock().getType() == Material.IRON_ORE){
e.getBlock().getDrops().clear();
}
Can anyone can help me?
So i trying to check the material in the one if with array or || but dont work
Show what you tried
Im still trying to understand the last sentence..
i dont know english very well
sec
They want to combine the two if statements to prevent duplicate code
Ah ok. Then lets see what he tried so far.
you would have to loop over the list and check each
and for the OR you have to write an actual condition
not just the material
Just use contains with a material list?
List is a collection which means you can just call contains(Object) on it
true tho
could even use a EnumSet
mimimi material will be gone mimimi
A normal HashSet is preferred now over an EnumSet because material wont be an Enum for very long
Ah
in the current state of spigot an EnumSet would be the best option
but yeah use a hashset then
So your solution is:
Create a List<Material> or Set<Material> as a field (not as a variable in your method)
and then call contains(Object) on this List or Set. I think in your case it doesnt really matter if you use a List or Set.
Yeah you probably won't get a noticeable performance benefit either which way, but a HashSet is technically the correct implementation to use here given you're using it exclusively for #contains() operations
Lucky for you, there are factory methods in Java 17 😎
private static final Set<Material> ORES = Set.of(Material.COAL_ORE, Material.IRON_ORE);
Correct, but you still won't reap all that much benefit from an EnumSet because the Material's universe is so large
Ok
yeah that would just lead to you creating an enormous array from which you may only need 2 indexes

Outside the method
can i just do loop for contains(Object)?
idk how to say it
if you want to check if a material is contained in your collection, use contains
advantage from using a set is your lookup being O(1), meaning it doesn't grow in complexity with the amount of elements there are added to it
No need to loop
so i just like would put one?
for example:
public boolean isOre(Material material) {
return ores.contains(material);
}
and, depending on what you want to achieve with this, you can for example test against a block broken, or clicked, or whatever by using Block#getType() which returns the material
ohh
so basically, if you inline your method:
if (ores.contains(event.getBlock().getType()))
// ... do something with ore
anyone know how I can fix this?
Remove the suppression
Or switch it to all 😎
the issue is that getMainHandItem is annotated with NotNull but I've seen cases where that's just not true
i'd like to see that being the case because it is never null
@Override
public ItemStack getItemInMainHand() {
return CraftItemStack.asCraftMirror(this.getInventory().getSelected());
}
public static CraftItemStack asCraftMirror(net.minecraft.world.item.ItemStack original) {
return new CraftItemStack((original == null || original.isEmpty()) ? null : original);
}
not in spigot, but in stupid spigot/forge hybrids
why do you care about supporting those
because if it's just a simple additional null check, then why not
You can either do a null check or say spigot/forge is out of scope and not supported
or ignore the warnings
I can't think of any other options.
You could tell the hybrids to get their shit together
alright alright I'll just ignore it kek
anyone know how to set the attack speed of a hit?
is there a way to increase a fireball's damage using the spigot api?
@EventHandler
public void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
if(event.getDamager().getType() == EntityType.FIREBALL) {
event.setDamage(200.0D);
}
}
maybe?
You will maybe need to change the attribute of the item u are using to change that
btw do Fireballs have PDC?
PDC ?
Doesn't all entityhave PDC?
(but what the point of using pdc for a fireball since it's lifetime is really small?)
then how can i tag a fireball to modify its damage
Just save the reference to this fireball in a variable
its not 1 fireball
In a list then
@Override
public void onRightClick(PlayerInteractEvent e) {
HypixelPlayer playerAccount = HypixelCustomItems.getSkillCore().getPlayer(e.getPlayer().getUniqueId());
if(playerAccount.getMana() < getManaCost()){
e.getPlayer().sendMessage(ChatColor.RED + "Not Enough Mana");
return;
}
playerAccount.setMana(playerAccount.getMana() - getManaCost());
Player player = e.getPlayer();
Location spawnAt = player.getEyeLocation().toVector().add(player.getEyeLocation().getDirection()).toLocation(player.getWorld());
Fireball fireball = (Fireball) player.getWorld().spawnEntity(spawnAt, EntityType.FIREBALL);
fireball.setIsIncendiary(true);
fireball.setBounce(false);
fireball.setShooter(player);
fireball.setDirection(player.getEyeLocation().getDirection());
fireball.setVisualFire(false);
}```
I don't know how is your architecture but you have multiple choices.
- Use PDC to Tag this fireball
- Use a list of fireballs in somewhere
- Use a list inside your player object
- Other
There are plenty possibilities. Take the one that fits the better for your structure
The easiest one and most understandable one would be to use PDC
alright thanks
And this Fireball is an entity, it implements a PersistantDataHolder interface
from which you can Fireball#getPersistentDataContainer
hello does anyone know how to make multi version support project with maven multi module. like that ?
Hi how to draw text on the screen ? like this https://imgur.com/a/MbNPZWc
Font magic
Those "HUD" are drawn using custom fonts that can "move" the text. They're displayed through titles, action bars, chat or even bossbar/scoreboard
It's quite tricky to get it correctly but once you did that in place it's quite straightforward
i saw this but is it looks like to my project?
i mean hierarchy of modules
and for image drawing ?
For reference of the negative chars : https://github.com/AmberWat/NegativeSpaceFont
Those are also fonts. You can put pretty much anything in the font
okay thx !
The idea is the following : draw gray background chars, input negative chars to move to the left, right text you want (can include custom chars). (you can also adapt along up/down and right/left)
And so on we need the player download a ressource pack with the font in it
Right
Only drawback. But I truly enjoy all the possibilities the resource packs bring nowadays and encourage you to use them
(You can also take advantage of it by adding new items, etc)
Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...
that was very helpful thanks
Heyo guys
How would one go about creating a resourcepack server-side and then sending that to the player
without the need of uploading it somewhere and then putting the link to server properties
A link to some resource would be appreciated
You need to upload it somewhere
Never saw a public plugin doing so. you can decompose it in three steps:
- Generating the resource pack
- Expose this resource to the internet : you can wether create an HTTP server, or push the resource pack to some hosting content
- Make a plugin that send the corresponding resource pack to the player when it joins
Well that sounds hella complicated
Thank you for this guide tho
What do you want that for ?
Nothing specific really
Just in case I ever want to use resourcepacks, I don't want to bother updating it on some host manually
Was hoping some easy way (an existing plugin or something) already exists to handle that for me
Then you'll maybe find some more help in #help-server -> People often share plugins or existing tools!
Actually, I remember homosexualdemon's MusePulse plugin does this
Looked through sorce, he used SparkJava and it is literally just 4 lines of code for the host
So that's great! :D
Hi everyone,
I want to create an economy, and this one you earn when you kill players, break a culture, with a kind of percentage
How can I do it?
By being dedicated, vigilant and tenacious
It's not what I'm looking for, but rather your advice on how to create this plugin.
Vault had an economy api maybe use that
But I already have an economy that uses Vault, (essentials)
hi guys,can someone help me out with a listener? So,i am creating a sort of handcuffs custom item and the last thing that I need to do is the listener that listens when a player right clicks on another player,can someone tell me what is the best event that I could use to create that?
Mind you, it can (probably) fire twice for each hand, so handle that too somehow.
The PlayerInteractEvent may be called once per hand. If you only want code to be executed once, you can check the result of https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/player/PlayerInteractEvent.html#getHand(), then decide functionality.
For example, only executing code if the main hand was used:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getHand() != EquipmentSlot.HAND) { // * if the hand used is NOT the main hand:
return; // do not progress past this point |
}
// provide functionality
}
probably because it's an entity and you can execute stuff as an entity using the execute command
Ok, use the events then
There is no PlayerRightClickedWithItemCalledCuffs, you have to make checks for that yourself
event.getItem(): 😑
You can just proxy it otherwise, that's what I do. Works equally fine 🤷♂️
i need help i have a little problem... I have an velocity network and me or the 2 nd owner uploaded an plugin with an cryptominer exedently and now every plugin on every server has an javassist package , the javassist package is the cryptominer . can i just replace all plugin jar file or have i reinstall every server
replace all jars
and don;t get plugins from bad places
so only plugin jar casue server.jar hasnt the javassist folder
They can't easily infect teh server jar as that is active when their injection happens
i shut the server down and only the plugins are infected should i send one infected plugin?
We don't need your infected plugin
Delete all jars on the server
plugins, libraries, servar jar etc
if you dont mind the playerdata and worlds then sure
but you could just delete all the jars
umm i put very much effor in the server
then replace just the jars
can i keep the folders from the plugin?
Generally yes
ALL jar files?
All
Hey, probably a simple question but I know next to nothing about this topic. Is it possible to buy a domain and attach it to my VPS? I want to get a domain and then an SSL certificate for it and before I actually go ahead and buy a domain I was wondering if that's possible at all. If there are any articles on the matter I'd appreciate
Only rarely will plugins be smart enough to also inject stuff there
except for the server jar
Including the server jar
mojang_1.20.1.jar like even this in cache folder?
isnt it running during injection?
The cache dir can be nuked no problem
You can still alter the contents of it
ah
how im suposed to get all the new jar files
Just how you got them in the first place?
ONLY download from reputable sites, like Spigot
^
many jar files were there before i became the server
especially dont download cracked paid plugins
Uh, via DNS it should easily be possible
a lot of stuff can be autogenerated on server run
Can you briefly outline the steps I should take?
As long as you have a stable IP address there is no issue at all
ig i download all plugin folder and reinstal server than i upload new good plugin and upload the folders
pretty much yeah
Get the VPS and Domain (from the same provider is usually the simplest) and see from there
I already have a VPS but they do not sell domains
I have just an IP address and a subdomain of theirs
I mean I will most likely be moving away from that vps soon
Then go with any reputable domain provider
thats all you need
Because it fucking sucks
it would help if server owners learned about security
Cloudflare is nice 
?paste
how can i download folders?
From where
Tarball them?
plugin folder
here is a service script that lets you launch as many server jars as you want, modify to your needs but be mindful of the security settings in it. This service script is designed to prevent processes from doing anything outside of its directory its running in. This means if you get an infected jar again it only affects the server and plugins for that server and not everything outside of that. Also prevents the process from being able to see outside of its directory as well along with it can't modify its perms it started with
zip them
Id be surprised if they knew anything about systemd
They're probably just using a Minecraft host
So pterodactyl
yea
Perhaps they even have a negative opinion of systemd
why doesnt my custom event get called?
listener: https://paste.md-5.net/ovukisidiw.java
the event itself: https://paste.md-5.net/hocakivunu.java
calling the event: https://paste.md-5.net/bucaguzefa.coffeescript
not sure why unless they just don't know how to use it?
makes sense I suppose on the lack of security
ooh thats neat
also restarts the process if it dies 🙂
well since its a service, the script can kill the process at will
the odds of it ghosting is minimal
seems like the perfect tool to install pirated jars ( joke )
well systemd is just a service handler
all processes started under systemd isn't above it
so this means if systemd wants a process to die that it has control over, it will most surely die but it does require a user still to have the appropriate permissions depending on the type of service
Well a lot of Linux "influencers" are bound to not like systemd (like X11). And if that is the only source of information they may have (given no hands-on experience exists) that is the opinion they could have
so if systemd is run as admin and the user is admin it should kill any process under it?
Well systemd already runs as admin well kind of
it has two different sides to it
it has system services, and then there is user services
I suppose also network services
anyways, the root user can always kill systemd if they wanted to I guess but to do that you would need to install another system handler
but any processes started from systemd, is killable by systemd if it needs to do that. A user can always force kill processes especially root, just use the nice command
as long as you respect the categories for the services and use them appropriately you shouldn't have issues with a process becoming a ghost. Always a pain dealing with them ghosts >>
I aint afraid of no ghosts.
maybe not, doesn't mean getting rid of them isn't a hassle though
typically ends up you need to reboot the system to just get rid of them XD
so typically what you do if you can't get rid of the ghost process is you just ignore it
pretend its not there, consuming the small bit of resources and you keep doing that until you need to reboot to free up those resources if it starts consuming too much 🙂
Silly, you call teh ghost busters. Have you not seen the advert?
Yeah, but not sure if I want to risk them destroying stuff >>
maybe if like something important depended on the server not rebooting then maybe
@vagrant stratus how do i set up a premiumconnector bungeecord plugin in minehut
instead of pinging random staff members that are not here
why don't you ask minehut?
or the author of whatever plugin you are trying to use
ok
How can i grt the itemstack of the placed block in blockplaceevent
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/block/BlockPlaceEvent.html#getItemInHand()
probably
declaration: package: org.bukkit.event.block, class: BlockPlaceEvent
Try reading the docs a little too
could use material?
getType()
Ah yes i just remembered it.
why do you need 1.7 for it?
no you don't
they didn't remove the pvp past 1.7
its not the same
you can still fight people
The rod is literally 2x thicker
yeah obviously that is the point of updates, to not be the same as the previous otherwise what point was there to provide updates?
They probably didnt even make 1.7 version for pvp but that version is the best of the best of pvp
Who’s spending 3 dollars a year on that domain
there is also https://howoldisminecraft188.today/
Too old! (Click the link to get the exact time)
a wise person
pvp wasn't really a thought out mechanic, hence being able to just spam click. However it makes sense when the game isn't designed centrally around pvp to begin with and rather just a fun feature added that was is not meant to be some hardcore pvp thing XD
people who like owning domains
Ok
hi frosted elf are you in cali yet
why would I be in Cali?
If everybody spam clicks then its no longer spam click but mechanic of the game. Thats what makes the 1.7 a pvp game.
why would you not be in cali
because Cali sucks
XD
fuel prices are high because the citizens of the state decided to vote for a stupid tax that increases every year for 10 years. Cali is trying to outlaw the combustion engine even though there is no public transport to get from one end of the state to the other and its power producing abilities sucks right now and they make it nearly impossible for gas stations to setup EV stations so even if you wanted to go EV you won't get far due to lack of power and ev stations lol
you have your basic rainbow colors
I'm trying to get an SSL certificate with Certbot and install it to the domain provided by my vps. I now have a certificate (fullchain.pem) and a private key (privkey.pem). I have no idea what to do next. Certbot gives this instruction but seeing as I have absolutely no idea what I'm doing, I'm failing to understand where I can find this file
Wdym there is wools on the game but not in spigot
should be in ./certs
you need to use the magic meta number thing irrc
1.7 uses damage values to distinguish the variants
oh the joys of legacy api
Where is that, like the absolute path?
Or is that the absolute path
that is the path
Yeah I don't have that..
what about certificates?
hmmm.....check the directory you ran the command for certbot
you should have the pem files
I am talking about the instruction prvided by certbot
there should be 2 pem files and a key file
I know where my pem files are
Do.you mean flattening after 1.13?
But struggling to understand step 7 (screenshot)
Yes
you need the 2 pem files and in the webserver configuration you input the path to them
We love the flattening
Yes.. that's what I'm asking. WHat is the webserver configuration? Is it a file or something supposed to be provided by the hosting?
depends on what webserver you are using
Do you even have a webserver?
then you need to install a webserver
I was like "How can I install an SSL certificate on a domain of your vps"
A webserver is something that runs on port 80/8080
They were like "go install it"
my custom events doesn't get called
Like bitch yeah thanks for the help
I do have a REST API running on port 8080
oh so they gave you the answer and you just ignored it >>
"Install it" is not an answer to "how to intsall it"
you don't really install certificates per-say, you just tell the various things that need certs where the certs are located to use
literally anything that can use SSL or HTTPs
But nothing like apache's httpd, lighttpd or anything else
I doubt it
1 sec
They aren't intsalled
Then why do you want SSL?
Then point your rest API to those certs
That's why I've come here. trying to comprehend this
It.. was that simple?
Ye?
it was never difficult to begin with?
I'll reiterate that I have 0 understanding of ssl, certificates, and other shit. I thought it was wired to the domain itself in some way
Alternatively proxy the REST API with something like httpd or lighttpd and install the certs for httpd or lighttpd
I'll take a look at the docs of ktor now
well it is tied to the domain in a way yes
that is what the pem files are for
the pem files outlines information in regards to the cert
then it provides the cert
(there are more options out there, but I use those two as an example that I can think from the top of my head)
Not exactly what I mean, my initial understanding of how SSL would work is that the provider of the domain would somehow attach the SSL certificates to the domain. Very scuffed but now I think it is somewhat more clear
Ty for the help and helping me clear my misconceptions
I'll scout the ktor docs
The SSL certs are pretty much just a public/private key pair signed by a CA
At least that is how I understand it
aren't SSL certs also somewhat client sided? Like, I could make my own SSL cert, the only limit is that most browsers don't know of it so they just won't accept it as a secure connection
technically you could use DNS to hold certs
however, it won't work for https though as that must be provided by the webserver because it needs the fullchain pem file
the fullchain is how a visitor can verify your certificate is legitimate because it can follow the chain to verify
if there is an object held in memory, and I hold on to the same object in another class as well, does the object exist twice now, or do both reference the same one that existed in the first place?
well, depends
i save the object in the other class, not with a getter of where it was, i save it in the constructor, so its probably a second instance?
uhh what?
if you have made it in one class and passed it through the constructor or another method into another class, then it's the same object. If you have specifically recreated (copied) the class, then you will have two identical classes
okay, so in the first case that you mentioned, if i now change one in one or the other class, do both receiver the changes, as they are supposed to be the same object?
They reference the same, if I understood your question right
okay
new Object () allocates a consecutive amount of memory in the heap, which represents the data (attributes) of that object. The returned value is just the memory address (pointer) to that object referenced in memory. If you share the same pointer, the memory is still the same place
okay nice
i was worried I'd be using double the memory
if i refer to the "same" object twice
and it seems like it is really the same
Thats pass by reference and pass by value are different. Java is pass by reference for non primitive data types, and pass by value for primitives. So if you pass a primitive, such as an int, it's copied, since it's a different stack frame in memory, that is "allocated"
oh thats good to know
java is all pass by value
Strictly speaking, yes
it means you don't have to worry about it
when you pass a List around, unless explicitly done, the list is not copied as a whole
it is "shared"
ok
for example, if you add an element to the list in one class, and the same list was passed to another class, since it's the same list then the other class will also see the new element
but it's a single list
okay
Hello
java.lang.IllegalStateException: Vault service not found
at com.trexmine.ffa.FFA.registerHooks(FFA.java:130) ~[FFA-3.0.jar:?]
at com.trexmine.ffa.FFA.onEnable(FFA.java:48) ~[FFA-3.0.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[slimeworldmanager-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[slimeworldmanager-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugin(CraftServer.java:563) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.enablePlugins(CraftServer.java:474) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:653) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1119) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[slimeworldmanager-1.19.4.jar:git-SlimeWorldManager-15076]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
why is this happening
private void registerHooks() {
RegisteredServiceProvider<Economy> serviceProvider = Bukkit.getServicesManager().getRegistration(Economy.class);
if (serviceProvider != null) {
VaultHook.register(serviceProvider.getProvider());
} else {
throw new IllegalStateException("Vault service not found");
}
new PlaceholderHook().register();
}
vault is enabled before and its in depends
Did you shade Vault into your plugin by mistake?
any help pls #1205131013613948939
Is there a way to bypass the restrictions on the form of a final value in a yadda expression?
i try create confortable argument checker
final int toDisplay = hourFrom;
this not confortable
just make hourFrom final as you are not re-assining it
no its compileOnly
why are you printing "Vault service not found" when you're clearly already interacting with Vault successfully?
you should rather print "Economy provider not found"
you don't have any economy plugin installed
i am going to go crazy
Rats? I was crazy once
i;'ve finally configured my rest api to run on an ssl certificate that i generated with let's encrypt and spent way too long turning into a jks keystore, launched it on the vps and it launched over https, then i test how it runs and it fucking errors with invalid certificate
im going to give up on life
rubber room
i have no fucking idea how to debug this shit and the only idea i have is to regen the certificate again again again
What errors specifically?
Well, that's a big library.
no shit
what did you expect to hear
had i seen my lines of code in the stacktrace i'd at least have a general idea of what might be wrong
Hi , been a while .. trying to save a location [world name , x , y , z ] into .json settings file
I usually just create a wrapper class that only has the information I need
public class SimpleLocation {
private String world;
private double x, y, z;
public SimpleLocation(String world, double x, double y, double z) {
this.world = world;
// ...
}
public static SimpleLocation fromLocation(Location loc) {
return new SimpleLocation(loc.getWorld().getName(), loc.getX(), loc.getY(), loc.getZ());
}
}
then I throw the SimpleLocation into gson
alternatively you can create a custom TypeAdapter
do you have any idea what's going on or should i just go regen
Well, it seems youre trying to use an HTTP response as a SSL/TLS record
yes googling the error mentiioned there miht be plaintex t or some shit
why even bother with https? just make your API run only http and then use a reverse proxy
what do i do with that info
because ktor supports ssl so why not
do you reckon it'd be easier
HTTPS also adds a bit of encryption overhead
although thats a bit of a microoptimization
reverse proxy would be much easier. your application doesn't have to care about https at all then
ok my second question is what is a reverse proxy or more specifically how can i set it up
Hi , how to set permission in command sender ?
Test for or set?
ensure you know what you wanna do
do you want the command to test for the sender's permission
- Make your API run only on localhost (HTTP)
- In your webserver, create a reverse proxy config for the vhost - it accepts HTTPS requests from anywhere, redirects it to http://localhost:12345 (your API), and returns the results through HTTPS again
<VirtualHost *:443>
ServerName myapi.mydomain.com
ProxyPass / http://127.0.0.1:12345/
ProxyPassReverse / http://127.0.0.1:12345/
# Configure SSL certificate here like you'd always do on your webserver
</VirtualHost>
it isnt very hard to do
you're running locally
and it's good exposure into networking
well for apache, HTTPS is as easy as giving it the path to your certificate
SSLCertificateFile /etc/letsencrypt/live/jeff-media.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/jeff-media.com/privkey.pem
i mso fucking tiredof this bullshit with ssl i'm going to have ptsd
i'll figure it out tomorrow
thanks for the lead alex
i used this :
but it throw errors
and see https://nginx.org/en/docs/http/configuring_https_servers.html for nginx
if you want to use nginx instead of apache
i known't the difference
location is null
but i guess i will be enlightened tomorrow
holy shit an actual type adapter
i use jsondeserializer/jsonserializer imo much easier
abstracts a bit of stuff out
should i do new Location ... ?
no, you should not pass null into your write method
the problem is that when you ask if (location.getWorld()) , location itself might be null, so null.getWorld() is an error.
btw you can't just write beginObject() and then return without having written endObject()
i got it working :p
the issue with that though is that you will never get a normal location again if you just register your type adapter globally
i see
its only 1 location
that's why I'd just create a separate data class for SimpleLocation, that just has 4 fields; name, x,y,z
then gson can also handle it automatically and you dont even need a type adapter
I have this config:
reset:
# Can be daily / weekly / monthly
frequency: daily
reset-hour: 23:59
Is it better to use scheduleAtFixedRate() or runTaskTimer() with a 20 tick repeatDelay ?
runTaskTimer imo
I assume if you use scheduleAtFixedRate, you mean ScheduledExecutorService, which on its own is fine, but first of all, you’re doing this in ticks (according to what u seem to be using) so BukkitScheduler is a more intrinsically intuitive choice, additionally whenever you carry a ScheduledExecutorService you most likely want to carry a dispatcher/execution ExecutorService as well to not put too much load on the ScheduledExecutorService, this can increase overhead due to underhood thread scheduling etc
I would probably just use cron-utils https://github.com/jmrozanec/cron-utils
That’s only for parsing, no?
and if i remove the reset-hour configuration, is it more easy to do right ?
hi guys! how can i set in a gui a custom head from the minecraft heads website
I assume you wanna support routines and exact dates? (Dates= run on a specific time and date) (Routines= run every week/day/month/interval at a specific time)
is there someone who can help me?
Which website exactly? And are you coding this?
IIRC it's able to give one a date object and then one could just use a TimerTask + Timer?
hm no clue then 🥲
i guess there is an api but idkj how to use that
I assume its some sort of rest api
anyway,can i insert custom heads in a created inventory?
Inventory#setItem
but the problem is that i need to create the itemstack
SkullMeta
Alright i got it i think
private void scheduleResetTask() {
long initialDelay = calculateInitialDelay();
Bukkit.getScheduler().runTaskTimer(this, () -> {
// TODO
}, initialDelay, calculateRepeatDelay());
}
private long calculateInitialDelay() {
LocalDateTime now = LocalDateTime.now();
LocalDateTime nextReset = LocalDateTime.of(now.toLocalDate(), resetTime);
if (now.isAfter(nextReset)) {
switch (resetType.toLowerCase()) {
case "daily":
nextReset = nextReset.plusDays(1);
break;
case "weekly":
nextReset = nextReset.plusWeeks(1);
break;
case "monthly":
nextReset = nextReset.plusMonths(1);
break;
}
}
return ChronoUnit.MILLIS.between(now, nextReset.atZone(ZoneId.systemDefault()));
}
private long calculateRepeatDelay() {
switch (resetType.toLowerCase()) {
case "daily":
return TimeUnit.DAYS.toMillis(1);
case "weekly":
return TimeUnit.DAYS.toMillis(7);
case "monthly":
return TimeUnit.DAYS.toMillis(30);
default:
return TimeUnit.HOURS.toMillis(24);
}
}
I hope this will not use to much resources to my server.
oh realy ? hmm
well
Yes, how can I set the head to be like the custom head
Error handling, and tps loss, and availability and persistence may not be fully supported, but I think you don’t need to care about all that
Provide it a player profile with the skin url
Bukkit#createPlayerProfile
?jd-s
declaration: package: org.bukkit.profile, interface: PlayerProfile
Btw UUID doesn't matter
Just use UUID.randomUUID
i want a head on a gui to look like a custom head
how can i do that without the uuid
I'm trying to make items non-stackable, is there a good way to do that, my first thought was just giving it a random uuid tag, but I'm not sure how to do that, is there a better way?
random tag seems good enough for me
I see and what is persistence ?
If the app is closed and it starts again (such as a reboot), then no loss of tasks that have been executed or were going to be executed etc
Is there somewhere which does this simply that I can just use? :)
?pdc
Works great, thanks!
ok good i have add a tps checker and delay the task if tps are not good 🙂
yeah, well at least u're using runTaskTimer() and not scheduleAtFixedRate() which would impose additional care regarding synchronization, visibility etc
Hi , how to play .mp3 for player ?
Convert it to ogg and put it in a resource pack
(and only use mono files, otherwise it always plays at full volume)
Ive not already solved my problem, can someone help me out?
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
plugin support using protocoLib from 1.17.x to 1.20.1 should change 4 times or more than 10 ?
what
Anyone know if Geysermc plugin support all forms of bedrock to join java servers? even mobile? thanks
Yes, mobile works too
consoles usually need you to change the DNS-Server on it
wym @orchid gazelle
What.
Only latest version of minecraft bedrock. But don't expect it to work perfectly because bedrock itself is very different than minecraft java
The one above it. It replaces it with the remapped obf jar
in IJ, how can I jump to the open class in the project sidebar?
basically I want this file to be selected in the sidebar
https://pastes.dev/ivg7CKOap3
https://pastes.dev/NW9cFWWstb
at this line this.wixiAccountSettingsDao.create(wixiAccountSettings);
help would be appreciated
show the full stracktrace
hello. can we add player leash to player with NMS ?
I want both players to withdraw while they are connected to each other with the lead item.
Yes
No idea what you mean by this
i mean there is event like PlayerToEntityLeadEvent
can we implement PlayerToPlayerLeadEvent with NMS
You can
after changed HumanEntity or Player interfaces
i want to add bidirectional leashing
i can but how i still wonder
if there is good resource can you link me
I don't see why you need to
You don't need to use NMS?
also when you're working with NMS you're mostly on your own
the best documentation is the code itself
Hi, what is the new supported method to parse a string to a potion effect type?
it's all deprecated
which one is deprecated?
static methods, getByKey, getByName, getById
Read the deprecation note
^^
declaration: package: org.bukkit.potion, class: PotionEffectType
Registry.EFFECT.get(key)
ah ait
wait
yes I see
thnx
I am still not getting what I need here, I just need to fetch a PotionEffectType, not a potion, and also not a list of effects from a potion
Goal is that I can store the type of the effect in a config, and use it afterwards to change it back to an effect
so what step are you still missing
I'm not sure, I can't believe I have to get a potion first to get a PotionEffectType
Especially not because there is still a depcrated version to get it by the key
didnt you already have the string?
Yes I do, the string I have
I just need to get the PotionEffectType
not the potion
okay nevermind
I was stupid -_-
I'm just not remaining up to date enough with the API's
Thank you both
Does Hashmap have decent iteration performance or is it more or less "required" to have it be a LinkedHashMap if you forsee the possibility of iteration?
I'm expecting up to about 200-ish elements for reference - but more are not impossible
Well, anything that wouldn't kill performance a-la #getItemMeta
I mean yea, LinkedHashMap carries what u seem to be looking for in ur latter question
Probably fine unsorted
However, HashMap is fine
And there is less overhead iterating over a HM iirc
Tho its negligible unless u fly to the moon
Thanks. What about my Mars java space software?
I was asking because LinkedList vs ArrayList is not much of a performance difference (at least on modern computers)
Oh that one? Well delegate it to… Geol!
Not really comparable to a HashMap and LinkedHashMap
I'm not going to read through the hashmap impl
Sorry, but I am not the person to use eclipse mars in the year of 2024. Though I do know a few people that do it anyways
But if we’re speaking at max n = 200 I don’t think you need to care about overhead that much between Linked vs non-Linked
for the average jvm
I was just wondering why these two objects aren't the same? (The rightclicked item is just Dice.get() in the furthest right hotbar slot, but it still prints 'no')
System.out.println("Rightlicked dice");
DiceMechanic.rollDice(player);
} else {
System.out.println("no");
}```
Anyone knows what could be the problem? (I also compared the ItemStack object in console and they were the same if I didn't overlook something)
Compare with equals or isSimilar
I'll try that thx
Okay, it works, but I've got another error ;-;
I used Bukkit.getScheduler().wait(100) to create a small delay but the thread isn't owner, so yeaaaa. Is there anything else I could try (that i can put right into my code without enclosing it or something)?
Is there any way to have two constructors with the same parameters, that do different things tho?
thats not how u use the scheduler
Schedule a task which is delayed instead
You cannot use Thread.sleep() or similar in a minecraft setting - (exception is the synchronized keyword, but that should only be used in relation to thread safety and nothing else)
Yes, but inside the brackets (also called lambda) you put in the logic that should be delayed
well, there's nothing that really has to be delayed, that's the thing. I need code to be executed instantly, then a 2 tick delay
For example if you wish to call the method this.runDelayed() every 2 ticks you do Bukkit.getScheduler().scheduleSyncDelayedTask(Catan.plugin, () -> {this.runDelayed();}, 2); or (short form, but is likely to be more confusing for you) Bukkit.getScheduler().scheduleSyncDelayedTask(Catan.plugin, this::runDelayed, 2);
Then what do you need the delay for exactly?
I'm making a dice, and I want it to 'roll' every 2 ticks
after 2 seconds it's finished and gives the final result
Repeatedly every 2 ticks or just a single delay of two ticks?
just a single delay
Then you put anything that needs to be executed after two ticks inside your lambda
Okay, ty
Just beware that the lambda will only execute after two ticks while the rest of your method should (ideally speaking) be instantly finished - so two ticks prior your lambda
Does anybody here know how I can check if my Location is colliding with any block? Needs to be really fast from a processing time pov
if(material != Material.AIR && material != Material.WATER && material != Material.LAVA) {
return new RayCastResult(RCType.block, current, null, null);
}
}``` got this shit, needs to be about 100-1000x faster tho lmao
running this for every 0.0625 blocks in my ray
and is also inaccurate
What is this for? I suppose bukkit's raytracing is too slow for your purposes?
Because depending on the usecase you might be able to do dumb hacks instead of properly raytracing
it cannot do everything I want to do
The trick when it comes to doing things fast is to do as little as possible
yeah
well, but how do I make this little lmao?
how is it that targetplayer is already defined in scope, even tho i call break?
Just add a {}
This plainly has to do with the fact that java local variables are valid until the corresponding closing bracket (}), even if it would be impossible to use these vars otherwise (which is the case in switch statements)
I currently have an auction house on my rpg server but it is really inconvinient for buying large amounts of items as it is limited to a stack per auction, how would i code something similar to hypixel's bazaar maybe?
Well, I cannot tell given that I have next to no information.
The code you provided cannot be improved further though, at least not as-is. (I guess you could make use of Material.ordinal() but that is too negligible of an improvement, if it even is an improvement. And even then it is too brittle)
The libGDX guys are quite fond of object pooling so I suppose you could use that, but it won't make much of a difference on modern hardware with modern software.
You could also use NMS instead of the bukkit equivalent (however I suppose that is not what you want) and perhaps even cache the world (or if using NMS - chunk section? I haven't used any NMS though, if you cannot tell already so take this with a grain of salt) if the code is called in a loop
I'd just use spark and work on eliminating or reimplementing the hot code in NMS if this was really required
Depending on the usecase you can use stupid amounts of caching too (especially if you expect to do basically the same action multiple times)
why not just get player before switch
Having two constructors of the same class with the same parameters is not possible
because not all cases get a player
how would you specify which one to invoke
Magic
cmarco with the real answers here
anyone knows any tool to visualize a group of block entities?
Constructor(A a, B b, C c) {}
Constructor(A a, B b, C c) {}
new Constructor(a, b, c)[0]; // Call the first one
😎
which language is this?
Some severely fucked up Java that doesn't exist
okay
Generally speaking your constructor shouldn't have any side effects - it should affect pretty much only the object instance itself. If still you need two different ways to instantiate an object, pass a boolean to the constructor
what does side effects mean?
oh
it shouldnt do something to other objects?
Correct
More of a general thing to keep in mind than a strict rule though
There will always be exceptions to said rule lol
what if my constructor does that :(? is this a bad design?
Depends on your object, depends on what it's doing ¯_(ツ)_/¯
im creating it, and save it instantly to the place it belongs once created
i save it in memory
hi, i am trying to use display blocks but it uses matrix, I haven't seen anything about a matrix even on school, there's any good tutorial to start learning about that? I have been browsing for some hours but most of it was of matrix of 2x3 but display blocks need a matrix of 4x4 and a value from -1 to 1. I would really appreciate if someone send a link to learn about this
its actually sometimes considered an antipattern in terms of concurrency because u may without intention publish this reference outside of its scope before the object has finished its construction
Spigot abstracts away a lot of the matrix math for you. You can use setTransformation() with a Transformation object which lets you specify individual components
What does translation value does on that method?
Translation is movement on the x, y, and z axis
And left and right rotation? Why the 2 of them are needed
Right rotation is applied first, then scale, then left rotation
You can just use right rotation if you'd like and set the left rotation to a unit quaternion (new Quaternionf())
Does a bukkitrunnable scheduler reset on server restarts? I want to have a timer that activates once every month.
Yes. It's only valid for the current runtime
You'll have to schedule a task that runs every hour or something that checks the current day
thanks
Ohhhh, thanks choco, I really had no idea how this worked
LMAO
Someone who knows about reflection, I have a plugin that I made in 1.20 and I want to make it compatible with 1.13+, the plugin is already finished but I was looking for reflection and the truth is I didn't understand anything lol, so I would like someone to help me understand how to do it, this is the repository, obviously I will give credits and contributions to anyone who can help with this problem
https://github.com/system32developer/Kit-Renamer
You dont use nms so lower the spigot dependency version in pom and api-version in plugin.yml
i need to use spigot 1.13 as base then?
Cancelling the InventoryClickEvent will completely prevent items from being moved between inventories.
Does this only occur in creative mode?
why does the moderator rank have the admin prefixes even though the one
own has this is my config
useChatFormat: true
useColorTranslate: true
chatFormat: '%chatPrefix%%playerName%&8: &7%message%'
autoUpdate: true
Prefixes:
- owner;&4Owner &7» &4;&4Owner &7- &4
- 'default;&7Player&7: ;&7Player&7 ➜ '
- 'Supporter;&2Supporter&7: ;&2Supporter&7 ➜ '
- 'Admin;&eAdmin&7: ;&eAdminstrator&7 ➜ '
- 'Moderartor;&aModerartor&7: ;&aModerartor&7 ➜ '
in the lucktab plugin
is it beneficial to any way to use a lib like skedule or mccoroutine over the bukkit scheduler?
i have to use some suspend methods to download files and make http requests
Creative mode inventories are like broken
I would not use a library for some simple IO
HttpRequests you can use the httpclient and pair it up with an executor service
how do I open an inventory which is created by command and then should be opened in the other class?
I cant make Inventory public or smth, so idk how
use something to contain it?
Wym exactly
so, im tryin to make a simple item-based backpack, when player executes command /getbag, he gets an item, which when u right click on it opens a small inventory
You can save the inventory for the player
to the variable?
Or you can save the inventory contents on the item, using nbt
You could save it in a hashmap for example
so, ill try, thnx
Good luck
and one more thing: when i set inventory's owner as player, can I get an inventory using player.getInventory?
code:
Inventory bagInv = Bukkit.createInventory(player, 9 "Small Bag")
no
🥲
Is buildTools needed to add NMS to a project?
and is it necessary to add all subversions from the main version for the plugin to work from 1.17.x to 1.20.1?
Skedule is a nice QOL
First answer, yes. Second, is it depends
Why does that sound like a scheduler for skript lol
but how can I create a dependency if the location where the server jar comes from is not specified?
Maven modules
then why i need use buildTools for this
pretty sure alex will have something on his site about multi module by now
buildtools gives you the source
?nms
Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...
why i need this source if dapandancy exists in maven repository
but how then intelji can know where source exists???
Local repo 👌🏻
NMS = net.minecraft.server, or shoudl really be called native minecraft code, as it now also contains other packages like org.mojang
Buildtools puts it in your local repo, as Jan said
For all dependencies located locally on the PC, you have to specify the location from where they are located, don't you?
no
if you specify net.minecraft.server, it looks in your net\minecraft\server folder in your local repo
local repo is usually somewhere like C:\users\name\appdata\.m2 or something like
That's the thing, I didn't specify anything.
you don;t specify a path, it's your imports
Just go read alexs' page
You specify the dependency just like all
spigot not spigot-api
I have yet to have the courage to learn nms
There is nothing “to learn”
don;t. Its a last resort
So it turns out that BooildTools automatically loads dependencies into the local repository ?
You won’t wrap ur head around all of it. You might be able to wrap ur head around the current issue ur facing and then it all changes mext version and u start again. All you gotta learn is to navigate and figure shitz out
So being a 1.8 dev has atleast 1 advantage
Being a 1.8 dev has too many disadvantages to look at advantages lol
if it pays it pays
its same shit, okaeri tasker implements bukkit scheduler xD
dude okaeri tasker is literally bukkit scheduler but simplified
how are you creating your skulls?
why?
and it works
Spigot have api for skulls
only in the very newest
no, since 1.18
Bruh I thought it existed since 1.12.x
so these ffers
API to get an offline player's skull exists since forever
but API to get a specific "base64" skull is 1.18+
and when people found a solution they just said "nah, we adding it now and telling you all that you're doing it wrong"
the way you've been using reflection has been wrong all the time
you will have to set all fields properly and then the warning won't appear
but why not just use the API on versions where it's available?
I just found it on the web
cuz
it
works
only the texture is necessary
for me
so why spam messages?
well you have two options, either
- You use the intended way, or
- you keep using your outdated way, but then you gotta stop complaining about that message
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
You can do sth like this:
wait, it has to be a web url?
what if I already have just the skull's value?
isn'
t that what's necessary?
if(isMc1_18orNewer()) {
// Do it like in the blog post
} else {
// Use your old reflection way
}
public static boolean isMc1_18orNewer()) {
try { Class.forName("org.bukkit.profile.PlayerProfile"); return true; }
catch (ReflectiveOperionException e) { return false; }
}
it's explained in the blog post
just keep reading
its same while making fake players for tablist?
idk I never made fake players
You can probably just spoof some packets
Ofc might need to switch up depending on version
player info packets
Yep
whaat im asking about setting custom heads on gameprofile
/ serverplayer
bruh
it's not deprecated
declaration: package: org.bukkit.profile, interface: PlayerProfile
you must be using some other API besides spigot
not for no reason lol
you can still use PlayerProfile, even though paper claims it's deprecated. As you see in the spigot docs, it is not deprecated in spigot
paper has its reasons
every seconds method is depricated in paper. Best to just ignore it
paper deprecations are more of a suggestion
like what
player quit console message
paper uses kyori instead of normal strings
console plugin logging
Just use the Spigot API if you want your stuff to be compatible with spigot.
For paper-specific features or adventure, you can still shade adventure manually, and use PaperLib
i personally thing that kyorii components are easier to use than basecomponents
use purpur api, paper is legacy :tf:
if you use paper-api, then you can expect your plugins to not work on spigot anymore
who gives a shit about that
yeah
true
i also use adventure / minimessage for everything but I still use Spigot API instead of paper api
paperweight is the best option if u want to use nms btw
plugin will work with this maven? https://paste.md-5.net/
i don't think so, it again forces you to use paper-api which might lead to you accidentally using paper-only features
that's an empty paste
u can use buildtools but it forces u to use maven again
who WANTS to use nms though x) i usually only use it when im forced to
the awnser would be no then xD
no, there's a lot of remapping plugins for gradle available
use multi modules dude for each version
no, this will not work
all those spigot versions provide the same classes, hence you'll always only see them from one version
idk, i found paperweight working so used it it also gives u ability to run test server in a second
@upper hazel https://blog.jeff-media.com/maven-multi-module-setup-for-supporting-different-nms-versions/ This is the proper way to use different NMS versions
Hi there! Today I’m going to explain how to setup a multi-module project using maven to support different NMS versions. Important notes about this tutorial: Every step will have detailled screenshots using IntelliJ. I explicitly chose not to include everything as copy/pastable source code, but normal screenshots (you can click on them to show th...
yeah it would be a great plugin if it wouldn't automatically add paper-api to the classpath
u can use purpur api 😉
i shold create should I create multiple plugins in 1?
people who care about being compatible with spigot will not use anything except spigot-api :p
no, you'll only have different modules for NMS-specific code
who uses clean spigot server jar
over 20% of people
non sense
I also use spigot
many actually
for what reason u wont use purpur for example
and there's another reason to support spigot: paper-only plugins aren't allowed to be uploaded on spigotmc
because
- it breaks vanilla mechanics
and - doesn't add anything that'd be useful to me
so why would I use sth that only makes my life harder
I don't have 385 players, I don't profit from purpur
I only have one player
why so specific lmao
purpur makes ur server more optimized i guess
buggier is the word
has some things in api that also makes ur life easier
What exactly?
Ik it had like one new event or sth
Wouldn’t say that was lifesaving in any meaningful way
well you're free to use it ofc. I won't, I want to be able to upload my stuff to spigotmc
is it worth selling stuff on spigotmc?
oh i just saw ur profile, no questions
well if you make things that are highly configurable and have many use cases then i think you can make a pretty penny with em
but that’s complicated as all of that stuff already exists
its easier to make custom plugins imo
ik, got skills but hard to come up with an idea
I mean if you have a spigot compatible plugin you want to sell, its probably not a useless idea to just put it on spigotmc, but I’d assume u have it on other platforms ntl
i think that creating minigames server and selling it would be worth more to put time in
Eh, well, if you really wanna earn cash I don’t think server sided mc dev is the hustle for you
scrooge mcduck made his first million with 1.8 plugins
is -1 allowed as custom model data?
yea, well I don’t believe your average purpor enjoyer will pull a scrooge mcduck, but perhaps
I believe so
oh no that's annoying
I’m actually unsure
let's fuck around and find out
💯
if -1 is allowed then my blackliast is broken 🥲
lol why?
because I'm using -1 to identify items without custom model data
Well items w/o CMD has a null value, no?
I didn't find it
how I could set the value directly
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOThiNWU5ZDVhZmFjMTgzZjFmNTcwYzFiNmVmNTE1NmMxMjFjMWVmYmQ4NTUyN2Q4ZDc5ZDBhZGVlYjY3MjQ4NSJ9fX0"
this is an example of a skull value
it contains the texture within
No it doesn’t, decode it
oh
did we change the flash particle recently for some reason
i used to be able to pass a size to the flash particle but now it throws an error when done so
saying the expected data is void
in which version were you able to pass a size?
like uh, 1.16 or something i dont quite remember
i guess i shouldnt say recently then lol
can you show some code that worked in 1.16? Because usually the data is a class like BlockData or ItemStack or MaterialData or DustOptions etc
hey must be created as a regular module "core" and not through bukkit plugin ?
wdym?
your "core" module will usually contain the plugin
unless you want to abstract it even further, then you'd have a separate plugin module
if you only want to have multi version NMS, then core/plugin can be one module
in the tutorial you create the base of the plugin using the usual method and not through plugin bukkit and then configure everything manually
no clue what you mean with "usual method" or "through plugin bukkit"
do you mean that I'm not using IJ's "Create Spigot plugin" project wizard?
Minecraft dev plugin
with automatic configuration rather than doing everything manually
yes but there isn't really any benefit from using that
I mean all it does is to add the maven-shade-plugin which you don't need
but sure, you can use that
ok
he creates a lot more. The differences between maven and a regular project with the main class are very different
"Main class"
Not that much difference
doesn't it only create a main class with an empty onDisable and empty onEnable method?
Yeah
Plus a package structure
https://github.com/mfnalex/Spigot-Plugin-Generator > mcdev plugin (at least for spigot) :p
I use a github template for my kotlin plugins
oh btw that IJ dev plugin will mess up your parent/child project structure
be sure to add the parent section to your core pom if you use the weird MC DEv wizard
https://paste.md-5.net/ziyuxeyifo.xml - this all need for maven apache?
no
it is generally needed for the plugin
?
it would be much easier if you'd just follow the blog post exactly
Gl alex
for example what even is your question?
whether you can use that as complete pom? no
D:
I was responding to your answer
"I mean all it does is to add the maven-shade-plugin which you don't need"
you only need the maven-shade-plugin if you want to shade any dependencies. and even if you do, you would want to use a more up-2-date version instead of maven-shade 3.2.4
but maven created through bukkit configuration and through the regular one are different
so i gess i not need this lines for plugin in here? - https://paste.md-5.net/ziyuxeyifo.xml
you're sending 3 things at once
- the maven-compiler-plugin - you need that to change the java version. You currently set it to 10, which is pretty weird. You normally either use 8 or 17
- the shade plugin - as said, only needed when you wanna shade dependencies. You also have set "createDependencyReducedPom" to false, which is very bad. And 3.2.4 is hella outdated
- resource filtering - usually you want to keep that
and I bet that your MC Dev plugin has not properly added the <parent> section to your pom
such lines were created automatically when I created the plugin using "bukkit builder"
I didn't change anything there
but apparently, as I understand it, some people like to create a template for the plugin manually
in any case, I think all these lines are not needed
Yes, I told you that
Yes, because then you don't end up with a bloated, broken pom
exactly, hence I said "the mc dev plugin adds useless stuff to your pom"
and I also bet that the mc dev plugin broke your pom by getting rid of the <parent> section
Would it be practical to convert pdc into a class to edit it and then push it back in or edit it all one at a time?
would be so much easier if you simply followed my blog post
I don't really understand what you mean. Do you have a bunch of PDC tags and want to turn them into an object? Like a custom serializer/deserializer?
I understand, I'm just not well versed in the maven system
that's another reason to just blindly follow the blog post instead of using the mc dev plugin, because then you end up with a different pom and have to understand why things are different and which of those changes are correct and which aren't
No, I just want to edit the pdc a bunch of times and it would be easier to convert it first in a class so it's easier to code.
because of the many keys idk if that would be efficient
what exactly do you want to convert to a class?
I don#t really understand what you're trying to do
map the pdc to a class so i can do var + 1 instead of getpdc().get(new namespacekey(plugin, key),int) + 1
ofc you could do that, but I don't think it matters. the PDC not much different to a HashMap kept in memory
so it would just be a waste of resources?
No, it‘d just be waste of time (premature optimization)
And you‘d have to remember to update the PDC itself
I would just use the PDC directly
it’s the entire plugin tbf
ty
as soon as I removed the dependency on org.apache.maven.plugins immediately sonarList complains about a vulnerability
" Provides transitive vulnerable dependency maven:com.google.code.gson:gson:2.8.0 CVE-2022-25647 7.5 Deserialization of Untrusted Data vulnerability Results powered by Checkmarx(c) ' for example
Hello, does anyone knows how to create firework charges (item) with color? in bukkit? Whats the best way to do it in bukkit? should I create them using the damage value? (1.8)
How to execute spigot command from bungeecord?
ik how to execute bungeecord command from spigot
but how to do vice versa
Bungeecord is just the proxy, im pretty sure you cant interact with spigot stuff in Bungeecord
ye
what exactly are you trying to do?
Send command from bungee to spigot using plugin messaging
But you can send spigot commands to bungee yet not vice versa?
Yes, spigot can interact with bungee but bungee not with spigot

