#help-development
1 messages · Page 1207 of 1
but i dont so im stuck with a free oracle
theres fuck all commissions about that arent 9 years long or that dont want hypixel remaking for the 300000th time
I know
I had to restart my server ended up losing ssh Key, but hetzner console legit can't understand the character '@'
so I can't add my new ssh key
I'm going to go insane
kekw
try without the username@ip
mine worked without it on that one server so urs might too
how tf?

yeah ctrl+x won't work to exit
remind me to not have miles run anything remotely important
no clue this cloud console is legit scuffed
restarts a server
looses ssh key
remind me to not rely on miles adding my ssh key to anything
only lost ssh key because I switched computers
well switched OS's
i literally told you to save it
Do you not have them backed up??!?!?
I did, but apparently it was the wrong one??

why do you have multiple you dont keep track of
I have like 5 ssh keys, but I made sure they were all in my .ssh
idk why my one for my server wasn't seemingly there
wait I wonder if I have it on my laptop
might as well check
proton pass is actually so weird
some days i have access to TOTP and others i dont
You need to make sure to back up and save your SSH keys!
I only have two keys
How do you even get to five??
i only have 1 atm
I use a different key for everything
Why???
the only thing id do like that is a personal and a "work" one
Would be possible but also no reason to
There isn't really a reason to
one sec I might have had the right key and I was being dumb
gotta copy it back over
someone should send me 36 euros to get proton pass plus fr fr
yeah no idfk
Someone should get you a 1TB hetzner storage box where you just store your SSH keys and passwords
It's 3.81€ a month cmon
gonna ssh into it to get the ssh key to ssh into it
finally got back in
my ssh keys had bad permissions
that's why they weren't working
all is fixed
I use CIFS to mount it
@eternal night haha I'm not totally stupid only somewhat mostly (courtesy of rad) stupid
hi
i write a plugin named kill cooldown and compile it
it give a cooldown to any one who kills someone so it prevents kill farms
the problem is that the plugin is not showing in /plugins command
and its not working
mostly stupid
?paste pom.xml and plugin.yml
i dont have pom.cml bu ti cna upload plugin.yml and config.yml and the plugin itself
do you use gradle to build the plugin then ?
And don't send the plugin itself
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
i used this:
Oh god
ik
- I would recommend you fix whatever is wrong with your BT
- use an actual dependency manager, not just IntelliJ (which I assume you're using)
Are you able to manually download https://piston-data.mojang.com/v1/objects/45810d238246d90e811d896f87b14695b7fb6839/server.jar ?
can you suggest me a dependency manager?
yes
Maven
ok
i have errors about spigot api
what i have to put in C:\Users\user.m2\repository\org\spigotmc\spigot-api\1.21.4 ?
use a build system such as maven and use the repo
i have to download api from where?
im using maven but i get this error:
[ERROR] Failed to execute goal on project killcooldown: Could not resolve dependencies for project com.example:killcooldown🫙1.0-SNAPSHOT
[ERROR] dependency: org.spigotmc:spigot-api🫙1.21.4 (provided)
[ERROR] org.spigotmc:spigot-api🫙1.21.4 was not found in https://hub.spigotmc.org/repo/releases/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced
[ERROR] Could not find artifact org.spigotmc:spigot-api🫙1.21.4 in local-spigot-repo (file:///C:/Users/user/.m2/repository/org/spigotmc/spigot-api/1.21.4/)
[ERROR] org.spigotmc:spigot-api🫙1.21.4 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
you have your pom setup wrong
the url for the repo in your pom shoudl be https://hub.spigotmc.org/nexus/content/repositories/snapshots/
the version is wrong too
it works for me, unless it changed in the past month
where i haev to download 1.21.4?
you dont need to download anything, maven will download it
I wonder why the R0.1 is a thing
legacy bukkit
so i have to delet that url for 1.21.4-R0.1-SNAPSHOT?
the version for the spigot api dependency should be 1.21.4-R0.1-SNAPSHOT NOT 1.21.4
odd it only goes to 1.20.5 on that repo
any reason?
1.20.6-experimental?
no idea why bukkit has a 1.20.5 publish if thats what you mean
does the wiki need changing for the repo now then?
that is the correct repo for spigot-api
bukkit not having anything on there is deliberate im guessing bc bt doesnt even build it by default anymore
you should be using spigot api anyway at this point
Using the bukkit API in 2025 is crazy
I checked and https://hub.spigotmc.org/nexus/content/repositories/snapshots/ is the maven access, redirects to teh same place as your link when accessed using maven
the thing i linked is just the browser manual access of it
yep
Hey Id like to customize my plugin description adding some images for example discord logo that brings you on the discord server, so Id like to do an image that has a link, but Idk how to that.
thx
thx about maven problem bu ti have a new problem
my plugin is showing in /plugins command but theres a * before it and when i click on it its say: this server is not runing any plugin by that name
missing api version in your plugin.yml
its also red so it failed to start
check servers latest.log
thats my plugin.yml
name: KillCooldown
version: 1.0
main: com.example.killcooldown.KillCooldown
author: funnyman1389
description: kill cooldown.
whats missing?
ok
api-version probably
api version should bi 1.21.4?
Yes
thx
i pasted that
you need to copy the link it gives you to here
Is there a rest api for the spigotmc website? To search download etc plugins
To search download etc plugins
line 58
no clue you are not using spigot
i think purpor is fork of paper that paper is fork of spigot
yes but its not spigot
hmmmmm
paper and purpur do lots of fuckery on top of spigot
thanks a lot about maven and other things
You seem to be having a shading issue
Without seeing your pom I can;t tell if its your shading issue or the server you are using
are we shading spigot
he could be
paper/purpor org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: no/org/bukkit/shaded/event/Listener
hey guys, I used to code spigot plugins but I'm just now getting into it, does anyone know fi there's a way to make non-hostile mobs hostile? Like a chicken for example.
here is my pom:
https://paste.md-5.net/ugeqanoqen.xml
I don't mean to interrupt but it seems like every time I come here someone is alr talking lol
yeah~ who tought you to shade bukkit
feel free to figure ur stuff out first
yep you are tryign to shade/relocate bukkit for some reason
so what i have to do?
delete teh whole shade plugin entry from your pom
ok
personally, I would recommend changing the groupId
I'm sure his name is example 🙂
Why does the spigot source have as a dependency a more complete nms compilation than the one actually in the project?
what
Like, I'm looking at spigot-server, and there's org.bukkit and net.minecraft. But certain dependencies used throughout the project, like maybe GenerationChunkHolder, are from an nms dependency and not the net.minecraft package in the spigot-server src
I just don't get why
Or maybe I'm reading something wrong here?
are you talking about the fact spigot-server has some nms classes but a org.spigotmc:minecraft-server dep
yep
spigot-server only contains classes craftbukkit or spigot patch, the rest are provided by the minecraft-server dep created inside of buildtools
Okay so if I wanted to modify any of those classes I'd have to just add it to the net.minecraft package in the spigot-server src and change where it's used in the project?
alright
Yes
theres a guide on the readme afaik
Let me see
is makePatches.sh only if you're submitting a pr?
No
if you plan on putting it on git you'll want to run that too
john minecraft gets annoyed when any net/minecraft packages are on version control
what about john wolvereness
idk if hes submitted anymore
Man what
mojang havent submitted any new claims this year woah
how can i make a chunk be always loaded and ticking? adding a plugin ticket keeps it loaded, but if i plant a bamboo there it doesnt grow
did you use setForceLoaded(true); ? if that doesnt work then youll have to simulate it with a plugin that loops at the time a tick would. usually it truly needs a player nearby
that didnt seem to work
then yea youll have to fake the plant growth by randomly setting their ages +1
does maven clean compile package verify add the compiled plugin to .m2? im doing library stuff
install will
kty
does anyone know if its possible to use NMS packets to update an item's meta without updating the item and therefore causing the item to bob down/up in the player's hand?
yes you can spoof item meta, but what do you mean bob/up down in the hand?
not sure how you would achieve that with meta
anyone have a example of a portfolio?
coding portfolio?
https://mitchg.dev is mine if you wanna check it out
currently if a player is holding an item while its meta is updated, the item bobs down and back up in their hand as its been updated
the client does that, no way around that
also if you're wondering, yes I did copy papermc's website
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
nowhere to be seen :Clueless:
was just the console concept. I'm happy to add a note if that breaches the copyright
just being nitty
Nope you’re going to court
@drowsy helm
here's the item bobbing
https://youtu.be/1zJ2GzFntlQ
if anyone knows a method with nms packets or something to prevent this when the item is updated I would much appreciate it
D:
newest version, a resource pack
Create a custom item model definition, set the item to have that model
when compiling jars using md_5's specialsource maven plugin, what is the use of the third, very heavily obfuscated jar?
one of them is the original, as written.
one of them is the spigot-mapped / slightly obfuscated -> the one that runs on normal spigot servers.
one of them is a very heavily obfuscated jar. what's the purpose of this?
so setting hand_animation_on_swap to false will prevent the bobbing whenever the item's meta is updated by my plugin?
Describing if down-and-up animation should be played in first-person view when item slot is changed (either type, count, components or by swapping the item into the other hand)
It may have some side-effects that may not be desired, never tried it myself.
But it will resolve what you're asking for. Yes.
It's basically obsfucated, spigot mappings, mojang mappings iirc
yeah but what is 'obfuscated'. why is it provided
In case you can somehow get it to run on a vanilla server 
Ij isn't finding nothing lol
this is all i get
Could not find artifact com.github.MrArcane:Core:pom:main-SNAPSHOT in spigotmc-repo (https://hub.spigotmc.org/nexus/content/repositories/snapshots/)```
?paste ur pom
jitpack is using an old version of maven
Is your core in jitpack or compiled?
on https://jitpack.io/com/github/MrArcane/Core/snapshot/build.log it says its using java 3.6.1 but [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.6.0:shade (default) on project Core: The plugin org.apache.maven.plugins:maven-shade-plugin:3.6.0 requires Maven version 3.6.3 -> [Help 1]
so i gotta downgrade maven?
i would hope jitpack has a way to use a newer version of maven
i dont use jitpack so no idea, try repsy if you want a more common repo setup where you push the build from your machine
theres another way to do this?
try repsy
If your project requires a specific Maven version then you can use the Maven Wrapper.
https://jitpack.io/docs/BUILDING/#maven-projects
yeah looking into it now. thanks @remote swallow
i tried that
i mean, i don't see a maven wrapper in the repo xD
I thought it just meant to change my settings in maven to wrapper
When uploading to respy maven gives me
[IJ]-1-MojoFailed-[IJ]-source=LIFECYCLE-[IJ]-goal=deploy-[IJ]-id=me.arkallic:Core:jar:1.0-SNAPSHOT-[IJ]-error=status code: 401, reason phrase: Unauthorized (401)```
<servers>
<server>
<id>repsy</id>
<username></username>
<password></password>
</server>
</servers>
</settings>
yeah i followed that
did you add the distribution management section with the same id and correct repo info
yes sir
<distributionManagement>
<repository>
<id>repsy</id>
<name>core</name>
<url>https://repo.repsy.io/mvn/arkallic/Core/</url>
</repository>
</distributionManagement>
i swear maven just hates me
double check the settings.xml file is saved and run deploy again
if it still fails
?paste the full log
im stupid, sorry. i managed to fat finger my username -.-
YES FINALLY
thank you @remote swallow
making a crafting recipe, one of the ingredients is a dragon's breath and when it is crafted the dragon's breath becomes an empty bottle. is there a way to prevent the empty bottle from being a result?
Hi guys
I made an ender dragon you can ride but it destroys the player's armor. I see that the armor damage modifier is deprecated and googling didn't come up with any up to date options. Any help?
did your google search also tell you that deprecated doesn't mean unusable?
No it did not
Fixed it a different way anyways 🙂
it has been
My Shop Plugin eats a ton of memory i guess its poorly optimized can some1 help me??
Why do you think it's your plugin using the memory?
doesnt the spark profiler say that=
idk how to read it tbh
if i can read it correctly its using the second most ram rn
The percentage there is how much time of a tick it takes to process that
You should rather change that to the millisecond view
Idk how to use it aghh
is it just me of law of demeter just doesnt make sense sometimes? why should i create another function which parses the given data an returns result, when i can instead i can do it in one in less code and more readable approach? it just bloats your code with useless methods which you use use once...
it's just a matter of not having super intertwined method calls which break modularity
and also just following foundational SOLID principles. (Single responsiblity)
The chunk is not loaded and you’re loading the chunk, that’s my assumption.
It’s better to check if the chunk is loaded first. But Location#getChunk will load the chunk.
Here’s how to get the chunk coordinates (no markdown cuz on mobile):
int x = this.location.getBlockX() >> 4;
int z = this.location.getBlockZ() >> 4;
ah ok but there werent any shops created in the first place so i am wondering
java.lang.NullPointerException: null
[13:30:56] [Server thread/WARN]: [FadedPVP] Task #70 for FadedPVP v1.0 generated an exception
java.lang.NullPointerException: null
[13:30:56] [Server thread/WARN]: [FadedPVP] Task #70 for FadedPVP v1.0 generated an exception
java.lang.NullPointerException: null```
any idea what could be generating these stack traceless exceptions?
well its just an exception occuring in a bukkit task apparently from a plugin called 'FadedPVP'
and its an NPE
everything else is not directly known through the stacktrace
set a java flag to stop truncating stacktraces -XX:-OmitStackTraceInFastThrow
if they happen frequently they get cut off
oh.
Full stacktrace might also be available higher up in the log
yeah there is one
so it prints the full one a few times
but if it keeps on being
spamming*
then it just trims it off?
Yes the JVM will optimize away the stacktrace for performance
alr, thx
that'
s
really cool
I thought I lost the stacktrace
good day I have a problem why does not work hide attributes
its not hide attributes
Are you using Paper
also is that your plugin
it makes your code less cluttered and more readable when debugging
plus if it does have more than one usage then theyre really useful
yes used is paper 1.20.4
how can i clone an IntelliJ project whilst changing the name? Having to setup everything new for every project is getting a tad annoying
Do you have a project template?
I was just asking if the thing you're trying to clone is a template for your plugins
well i was cloning a fairly empty one
the problem i have is that it keeps displaying the old name in the top left
tried changing file names and project settings
Is it a gradle or maven project?
mvn
You mean this?
In the project window
Yeah
Right click and click rename
What your seeing is the module name
This for example is folder name SpigotMavenTest and module name smt
EDIT: changed project name to folder name*
Hello, i've got a problem with my plugin, it's actually my first time making one for the server and i don't know how everything behaves in-game according to the code. I'm trying to make sitting functionality, and so far i'm using the arrow method i read online about and my friend used to use this method too, back on one of his servers. The problem is, the arrow gets spawned and launched at wooden stair block, but it falls short under my legs, or goes through the stairs and ground in the basement. I used set player as passenger right away, but thought maybe if i check if arrow hit the block i could then set him as passenger thinking the positioning would need less adjusting, but now the player is never mounting one. I'm also not sure what to put for speed and spread? Like what is the range of these values? If there's a clear docs for it i apologize. ||```
for (Material stair : woodStairsList) {
if (block != null && block.getType() == stair && event.getAction() == Action.RIGHT_CLICK_BLOCK) {
//player.sendMessage("You clicked on " + stair + " stairs!");
if (block.getLocation().distance(player.getLocation()) <= 2) {
// The arrow speed is slow, and players position must be fixed.
Arrow arrow = player.getWorld().spawnArrow(player.getLocation(), player.getLocation().getDirection(), 1, 0);
arrow.addPassenger(player);
}
}
}```||
theres a raytrace method you can access through Player
Player#raytraceBlocks iirc
no need for an arrow
The arrow is not for finding blocks
it's for the player to ride on
You'd want to disable the gravity and such for the arrow to stop it from moving
Hey, what's the getPersistentDataContainer() equivalent for #chunk in version 1.12.2?
Yeah, i already successfully figure out if player is clicking wooden stairs in the direction he's looking
I'll try it
But still don't know what value to enter for speed
and change its velocity to 0
probably should avoid the arrow hitting a block unless there is a method to prevent it from sticking to blocks XD
nothing. NMS at best
That would be a bit difficult to do without patching the server
Or maybe use the latest version
why is strings not realizing its annotated here?
There's can be nulls inside array I think
you are annotating the array element type, not the array type itself
String @NN [] args
huh ty
unrelated but is there a way to get rid of the 'requires non null' warning for adding commands to a plugin?
do a null check
what im trying to say is i know how my plugin.yml looks like, and can say it WILL have a command like that
Undefined null ability 🗿
anyway. how do i deal with /help and duplicate commands? i cannot seem to declare what plugin i want it from.
does 'getPluginCommand' override the global command under the given string?
ok no minecraft:kill works
Disabling the gravity and setting velocity to zero just slows down the arrow, it hits the stairs only if you are right infront of it, but you still get on top of it the position isnt good
I remember using launchProjectile it sort of worked better but arrow gets despawned right away
Is there a way to keep it
can anyone help me to add a 1.20 jar to my buildpath on eclipse ide?
i add it but it doesnt work
?bootstrap
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
i can use all the features of 1.20 in that 1.18 jar?
im wanting to use the armor trims and the sonic boom
Follow those instructions but with the 1.20 jar instead
okay
but I would recommend using maven
i dont know how to setup it
public void setCreeperCamera(Player player){
player.setGameMode(GameMode.SPECTATOR);
Location location = player.getLocation().clone();
LivingEntity entity = (LivingEntity) player.getWorld().spawnEntity(location, EntityType.ENDERMAN);
entity.setInvisible(true);
entity.setInvulnerable(true);
entity.setAI(false);
setCamera(player, entity)
Bukkit.getScheduler().runTaskLater(PandemiaSchooldays.getInstance(), () -> {
entity.remove();
player.setGameMode(GameMode.SURVIVAL);
player.setHealth(0.0);
, 10L);
}
public static void setCamera(Player player, Entity entity) {
PacketPlayOutCamera packet = new PacketPlayOutCamera(((CraftEntity) entity).getHandle());
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
i want to have visual effects from mobs vision, i made it by killing the player (if i dont the player got a bug that i cant move) but i cant kill the players for some reasons, there isnt any other way?
Intellij can do it for you, no idea about Eclipse
for maven in general you can read through these https://www.geeksforgeeks.org/maven-tutorial
okay thanks
When spawning entities that you want to modify use the spawn method that accepts a consumer. That way the entity is spawned with the modification instead of spawned and then changed. As for killing the player I don't see why you'd need to do that?
If I don't kill the player the camera gets a bug and I can't move it
but the player keeps the visual effect
So you say it will only work if you kill the player but it doesn't work when you kill the player?
what exactly doesn't work
also you appear to be wanting to abuse a bug. So make sure that what you're trying to do still works in your version
If you do not kill the player, the camera stays still, you can not move for any reason, if I kill him I keep the visual effect and I can move the player, i.e. the player can move.
im adding the entire content of the bundler directory to the buildpath of my plugin and it still doesn't works
ill show you, give me a second
what if you just use a marker armor stand or display entity (dont know if displays work tho) as you alr know the position of the block
that way you dont have to worry about the arrow moving
So what's the problem
if i dont kill the player cant move their camera
thats the problem
and i cant kill them on my server
for some reasons
so im asking if theres any way to do it without killing him
Well that is possible, i did initially try something but it didnt work out completely, i might try again though
it exist?
Yes the server needs to be able to tell the player when to die
Whether this is a separate packet or if's just handled automatically with health
yes
push
wdym deal with
do u know the packet name?
it seems like /help <command> can onyl show the last registered command
so if i have two commands with the same name (say /kill) itll only show for one
No
I don't know if it's a separate packet or not to begin with
So you want it to show both?
ill search
well ideally in separate help commands
a la /help plugin:command
yeah, i guess...
im currently much more worried about not managing to setup my FTP lol
i made it but i cant respawn now lmao
i think i need a respawn packet or something
Yeah ofc you need to respawn the player
oof nothing else?
ig ill make my own file for it
Well no, that is why that method was added in the first place
what do you mean?
Use maven
im using maven
and the plugin doesn't work
Error loading plugin: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:70) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:47) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:101) ~[paper-1.20.4.jar:git-Paper-499]
at net.minecraft.server.Main.main(Main.java:120) ~[paper-1.20.4.jar:git-Paper-499]
at org.bukkit.craftbukkit.Main.main(Main.java:326) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
... 9 more
You need to put the plugin.yml in the resources folder
it is
Make sure you actually compiled with maven
how i compile?
mvn package
would be the command, as for how to do it in Eclipse I have no idea
I don't use it
i tried intellij idea and the same error happened
and did you run the mvn package command in Intellij
No
of my server?
yes
i only have one
thats what im doing
are you calling your plugins constructor
wdym
either you are calling the plugin constructor twice or you are using reload. You can't get that error any other way
If you don't have the plugin twice then you're calling the constructor
No reload in that stacktrace
yes im calling
They're calling the constructor of a diff plugin
does Test maybe extend JavaPlugin 
I... did not even think of that 💀
the class loads automatically if it extends java plugin?
If you specified it as your main class in your plugin.yml yea
why are you doing that in the first place
i have 2 classes, the main its permadeath and the second with all functionalities its test
you mean use test as main?
and why do you have two
im wanting to organize
then don't have it be a javaplugin
if i dont extends javaplugin many methods dont work
@blazing ocean
you have experience using eclipse ide?
Then make new methods?
What
No
Why do you not want to use a build tool lmao
it gives me many errors
Have you considered fixing those
i was using librarys of 1.17 until today and all worked
idk why with maven dont work
skill issue
yes
if you're using intellij make sure your IDE is up to date and you're on java 21 for latest version of minecraft
what reason do you have to switch from ant to maven?
also make sure maven and your maven plugins are up to date
all its correctly
how i can use bundler librarys as a build path?
Just use Maven. it works fine for all versions of Spigot with Eclipse
how do i use maven package in eclipse?
you create a run profile
maven build?
in goals type clean package
done
what do you mean with that
the buttons bottom right
below goals?
You use both IJ and Eclipse?
intellij idea gives me errors
the run is a pulldown you can pick which profile to run
Probably just an issue with your pom
whatever you named it, you select
Either that or you forgot to run BuildTools for the version you are developing for.
i can now just export the project as a jar?
Have you considered looking at and attempting to fix said errors
yeah but in eclipse that errors just dont appear
and the code work
What error specifically?
Error loading plugin: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
java.lang.RuntimeException: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
at io.papermc.paper.plugin.provider.source.FileProviderSource.registerProviders(FileProviderSource.java:70) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:47) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.provider.source.DirectoryProviderSource.registerProviders(DirectoryProviderSource.java:17) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.util.EntrypointUtil.registerProvidersFromSource(EntrypointUtil.java:15) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paper.plugin.PluginInitializerManager.load(PluginInitializerManager.java:101) ~[paper-1.20.4.jar:git-Paper-499]
at net.minecraft.server.Main.main(Main.java:120) ~[paper-1.20.4.jar:git-Paper-499]
at org.bukkit.craftbukkit.Main.main(Main.java:326) ~[paper-1.20.4.jar:git-Paper-499]
at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
at java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalArgumentException: Directory 'plugins\test.jar' does not contain a paper-plugin.yml or plugin.yml! Could not determine plugin type, cannot load a plugin from it!
... 9 more
3 hours trying to fix this
welll you need to build with maven
and use it on my server appears like that
How did you build the jar in IJ?
but it is builded
do not export, use run
and fix your pom
IJ has an entire side panel dedicated for maven. You should be using it to compile your jar file.
yes i compiled correctly
the problem is that when i build with maven it says up to date
Wut?
Have you already built it before
what do you mean?
i build the project with maven and later use the jar in my server
what jar did you use
normally
I highly doubt our individual here has configured their maven to output multiple jar files
you can produce more then one jar
I feel like this is a pom issue and they probably forgot to filter resources.
ideally they shouldn't filter resources
you only filter when you want to change something with the resources or check etc
I have a feeling they still did some build artifacts fuckery or something
kek
in scale of 1 and 10 how many errors are there
<filtering>true</filtering>
set that to false
also, your maven compiler is outdated
your java version is outdated for what you're targeting as well
and possibly the shade plugin, and since you don't configure shade plugin you will have multiple jars
one jar is the unshaded and the other is the shaded
pretty much everything is out of date version wise
you should end up with a jar that has shaded in its name

i should use the shaded jar?
yes
you shade nothign so delete the whole section
This cause issues for you before? Cause all it should do is swap out maven values in your files.
oh well if nothing got shaded I guess makes no difference XD
it does more then that
For simple plugins, shading is not needed.
What else does it do then?
filtering is not for replacing
rather it will filter your document and change encodings etc
im gonna die
in maven you should typically keep filtering set to false unless you have a specific need to do real filtering which for simple plugins you shouldn't need it
anyone has a base project with the things working 
probably all of us do
Well, I do have a need for it since I use maven variables in my plugin.yml. :3
i just want a 1.20 plugin nothing more 
well your an advanced/pro user now 😛
you are not the new developer you once were years ago
But I didn't know it changed encodings. But then again, I always have the defautEnccoding property set to UTF-8 anyways.
I kinda want to see that in action now
so like if you use special characters?
it will sometimes change those
which can be annoying lmao
1.20 or 1.20.4?
Your pom is sending mixed signals.
1.20.4
Have you updated your pom with the suggestions that everyone has mentioned?
i updated the filtering to false
you have to update your java version in there, one of the most important things
other then updating versions on the compiler plugin
currently you have it set to compile with java 1.8
oh
I think 1.20.4 still uses Java 17
remove the shade plugin completely since you are not using it, and the updated version for the compiler plugin is 3.13.0
yeah, try to not use a java version higher then what the MC version is using
so as shadow points out, probably should just set it to 17
Please paste your updated pom when you are done.
All you had to do is update your pom file though. 🥲
too many information in a single second
i was doing that
now, you should be able to compile, might have to compile twice since it has to pull in updated compiler plugin
but it might work on first run
You could probably remove the resource filtering altogether if it's going to be set to false.
If you wanted a shorter pom
i cant believe it works 🙏
thanks so much guys
i was in this for more than 3 hours
it happens, but hopefully you learned a bit
now something happens
when i write something in the file i can't see if its wrote correctly or not
like if i have errors
oh code completion stuff? well that is the editor
You're gonna have to send a screenshot about that.
But IJ should have a default theme
It has been too long since I last used eclipse.
Did they change their default color scheme?
idk
I thought keywords were that weird magenta / purple
ensure you are set to download javadocs
artifact javadoc?
yes
Then again, the last time I used Eclipse was years ago.
Back in Eclipse Luna and Eclipse Mars days.
colorws using dark theme in Eclipse
Yea... 2015 lmao
Can't belive I still had it on my drive.
What's the best way to support multiple different database types (e.g. sqlite, MySQL, mariadb, postgres) in my plugin? Is there a premade library for this?
Another IntelliJ W
Ain't that the question of the century.
No there are no premade libraries for switching between them, but there are guides everywhere on how to use each one.
Implementing them should be easy enough, but swapping between them will require some thought on your part.
jdbc drivers
It seems like something every plugin has though. So they're all just reinventing the wheel?
yes
Pretty much lol
I did all those in GroupManager
You might just have to look at how different projects do it to get an idea of how you want to handle it.
LuckPerms is interesting because it has hybrid storage
I know something like what I want exists though
That's just a connection pool
Oh an ORM is what I'm thinking of
They want different databases entirely, not multiple of the same type.
it has BasicDataSourceFactory class where you just need to pass driver class name and some other properties and it will create a DataSource for you
I'm gonna do this I think
https://www.spigotmc.org/threads/hibernate-orm-in-your-spigot-plugin.547594/
at least he's not on 1.8 😉
exactly ^^
1.12 for non-modded should be a crime
I mean yea, I guess I'll give him that
There probably was no entity event for that in 1.12 as only Endermen could place blocks back then
no i want to detect if a player placed a minecart
then player interact
ok
a minecart is an Entity not a Block
so is it PlayerInteractEntityEvent?
PlayerInteractEvent probably
ok thanks
check which type of click it is, make sure they are clicking a Block with a Minecart in their hand
and how do i then get the Minecart?
yes... i know...
you'd probably be best to cancel the event, reduce the Minecart stack size and spawn teh cart yourself
k
also does a parent category exist for all rails? it used to be Rail
in the new version
thanks
@blazing ocean i heard you use 1.5 and like shtie html docs https://helpch.at/docs/1.5/
its beautiful
beautifuk
fuck off
nuhuh
yuh uh
check catposting
besides using CreatureSpawnEvent & EntitySpawnEvent does anyone know of a decent way for spawning custom mobs?
on enable, i call this function:
public void discoverRecipes() {
for (Player player : getServer().getOnlinePlayers()) {
for (NamespacedKey key : scrollRecipeKeys) {
player.discoverRecipe(key);
}
}
}```
(also on join)
but it only actually shows up when i relog
its really annoying for rapid testing
is there a fix?
according to a spigot post with the same issue (in 2020) during a reload, the players are unregistered
let me actually try someoen tho 1 sec
yeah
it seems so
its fine
ill just relog ig\
Get online players shouldn't be empty during /reload if that's what you're suggesting
Hey guys, any trick for debugging errors that don't throw exceptions?
What errors
rubber ducky
Is it the one where you place down a rubber duck and explain your code to it
yes
Peak
Debugging software with a rubber ducky
hello, how i can get working the libraries of 1.20.2 in my project?
What IDE?
eclipse
Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163
i tried that
but don't work
1 sec
Show your project dependency configuration
i think i can't sent images
?verify
Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.
Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org
!verify
Usage: !verify <forums username>
!verify doggy223
A private message has been sent to your SpigotMC.org account for verification!
Hey I know this sounds stupid but what's the new way of ChatColor.translateAlternateColorCodes();?
asking in the paper discord id say
You might have to add each jar in the older? Idk eclipse
i can't use the imports or the methods of spigot
i have skill issue with that
What import do you have?
when i build or run the project the jar simply dont appears
in eclipse (without a build system) you export not run
if i export a maven project it shows a message error when the server its starting
the plugin.yml doesn't exist
you also don;t have the api in your libraries
try project menu -> clean
doesn't change
show your problems tab
makes zero sense
yeah
i tried many jars
sometimes it works but later if i try on other project it dont work
does eclipse have system where u have set source folder/package
show yoru project structure
im gonna say thats eclipse causing an issue, also it being in src/test not src/main
i create a new package named main?
shoudl be src/main/java
or just move into src
then expand your referenced libraries and show
you only have main so just right click on the Main.java and refactor -> move
Guys I have a funny bug
When player has their bow loaded and gets put in spectator
They can still shoot it
Intellij where
once its in teh right place, select main.java and press F5
no
package main. Then inside that package java
no
i mean to create the package inside main
try it
you can always just use file manager
it has because its now on teh classpath
magic
no idea why you added .com though
Does anyone know how to make the camera transition as smooth?
is that modded or vanilla
because if vanilla, that's extremely impressive
oh wait
it's probably the slowness effect, it changes your fov
This is vanilla, basically I only need smooth movement, what in the video when the player moves the camera returns it I don't need
And how to place coins above the food bar? I have their texture pack and there are numbers in a row that are used in the coin indicator, It's called "coin_hud_numbers"
It uses some method of displaying text (action bar, scoreboard, etc. - likely action bar in this case), combined with a custom font to offset the position of the text. It is quite limited, but it can be used to move text horizontally and vertically, to some extent. Theres some tutorials out there, but I dont make resource packs so I cant say for certain whether this one still works https://www.youtube.com/watch?v=EL2X6ppZSCQ
We cover how to make custom ui bars similar to the health and hunger bar, in Minecraft.
💡 Amber's Negative Space Font (included in example pack) : https://github.com/AmberWat/NegativeSpaceFont
📦 Download (Contains Resource Pack and Datapack: https://www.dropbox.com/s/1fa3byoz6ugrwx3/cw_mana_bar.zip?dl=1
🔵 Discord Server: https://discord.gg/Hy...
Hey, I'm trying to set both blocks of an IRON_DOOR back to their original type (which i saved in a Pair of Material), but instead of a door, it drops as an item. How can I properly place the door?
Use the physics false param
Did you find the solution? I've been struggling to figure it out myself
Pretty sure its this https://paste.md-5.net/ujaluyagel.cs
lmk if that one works
oh thanks! it works
this has became a mess 😂
if (requirementType == CollectRequirement.class && target instanceof ItemStack collected) {
CollectRequirement collectRequirement = (CollectRequirement) daily.getRequirement();
matches = collectRequirement.getItemStack().getType() == collected.getType();
} else if (requirementType == KillRequirement.class && target instanceof EntityType entityType) {
KillRequirement killRequirement = (KillRequirement) daily.getRequirement();
matches = killRequirement.getEntityType() == entityType;
} else if (requirementType == MineRequirement.class && target instanceof Material material) {
MineRequirement mineRequirement = (MineRequirement) daily.getRequirement();
matches = mineRequirement.getMaterial() == material;
} else if (requirementType == CraftRequirement.class && target instanceof ItemStack crafted) {
CraftRequirement craftRequirement = (CraftRequirement) daily.getRequirement();
ItemStack requiredItem = craftRequirement.getItemStack();
if (requiredItem.getType() == crafted.getType()) {
matches = requiredItem.isSimilar(crafted);
}
}```
can saddles have attributes to increase a horse's move speed?
looks like you should be utilising oop more
Ahaha great minds think alike.
public boolean matchesTarget(Object target) {
if (target instanceof ItemStack collected) {
return itemStack.getType() == collected.getType();
}
return false;
}```
boolean matchesTarget(Object target);
eH, not a big fan
What if instead you just get rid of it at the source
By using generics :)
generics?
the fancy <T> stuff yeah
I played around with a different structure at work the other day
lil bit
I could probably reuse some code by making the data have an abstract parent that loads the modifiers and stuff but cba
missed these two
The modifiers are just some funky stuff we use at work
Where you have objectives that you must do with certain conditions (kill 5 zombies in 15 seconds) otherwise it resets your progress
You can ignore them for now, implementation is a bit hacky
Do you need random access on the modifiers? 
yeah
Basically the system picks a bunch of objectives for the player to do
and if the player has it on hard mode or whatever it also applies a couple modifiers
I can probably toss the modifiers on the holder or whatever but it feels wrong
this is some serious "I gotta clock out in 10 minutes" code
I meant rand access on the List of modifiers. Otherwise this should probably be a Set
Ah ok
Ideally it's just a Collection<Whatever> because no one needs to know whether it's a list/set/whatev
implementation details like these can be hidden
and I pick it based on performance etc
Thats probably the way
It's usually the way
Now I'm writing a packet system on top of redisson with kryo :)
I'm so blessed I get to choose not to use jedis
Help i cant remove mending from my custom item lore
Cool, show some code where you create/modify the item
yes
It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.
I'm out of ideas
All looks good, and it appears to hide the other enchantments
just to confirm, the other enchantments do get applied, right
yes
and this only happens with mending
i am just using optifine and nothing else
What version you on, 1.12 ?
1.21
no you're not
one thing is i am running this spigot plugin in a paper server
1.21 will not show the item id number
1 sec
and the NBT hint would be components instead
how long does it take to do F3 and see version
sorry, I seem a bit cranky today
ok it was a viaversion problem
the server and plugin is in 1.21 with viaversion
i relaunched mc with 1.21 and its fixed
but its still a bug ima report it
Assuming your client was on 1.8 (why)
I could see that bug being the case as the enchantment does not exist on that version, viaver would just force that into lore...
For this, you'll get less and less support for paper here as they hard-forked
Does 1.20+ happen to have a built-in way to allow hostile mob spawns during the day or is it like... still NMS modifications lol
nope. damnit
Nothing in the spigot api
well ye, but you can make a datapack instead of touching nms
Not for what I'm trying to do
fair
or at the bare minimum it'll just main things a million times more difficult for devs & server owners
@worldly ingot can we have a spigot api method to allow hostile mob spawns or does one exist already lmfao
I know about EntityMonster#isDarkEnoughToSpawn but I don't think there's a way to modify this w/o using NMS (and even then idk how I'd get it to affect ALL hostile mobs)
why do all the fun things have to be NMS only D:
Need the ability to modify isSunSensitive too
I’m wondering if hackers, when hacking a server, can also attract the client due to the fact that the client runs the server part?
I was hear today cristalix was hacked and add virus to player clients
ugh it'd help if it weren't a protected method at least 😐
Their custom launcher
Hackers just pushed malware
This can be with classic client?
Nope
I mean I was hear long time ago one hack with logs but exists smth else ? Why client so buggy
hacking clients was only possible with log4j, and that was an exploit that got fixed as soon as it was "discovered"
You're talking about one exploit in 15 years of the game
I think the client is doing pretty well
Fixed core of server or clients?
Both
Nice
What what 15 years???
Lol
The game has been around for that long, yes
And I can't recall any vanilla exploit of that scale ever happening before log4j
May 17, 2009 MC's old
Related, this is the fun things you could do with it
https://fxtwitter.com/gegybeans/status/1469714451716882434
so fixing log4shell is great and all, but.. wouldn't it be ✨ amazing ✨ if we all just promised to be nice and instead use this power to make vanilla minecraft doom server 🤔
One day client scripting...
When I downloaded the server core for version 1.16 I saw a warning about it so it wasn't that long ago, was it?
In purpure site
🙂
?howold 1.16
Minecraft 1.16 is 4 years, 6 months old.
I NEED IT
LOOL