#development
1 messages ยท Page 88 of 1
thats done in setupAnnoyingAPI with the JavaVersion.VERSION_21 parameter
but i added it by itself anyways
and still didnt work
try adding that anyways?
whats ur gradle wrapper version
8.12
and whats env var JAVA_HOME set to
------------------------------------------------------------
Gradle 8.12
------------------------------------------------------------
Build time: 2024-12-20 15:46:53 UTC
Revision: a3cacb207fec727859be9354c1937da2e59004c1
Kotlin: 2.0.21
Groovy: 3.0.22
Ant: Apache Ant(TM) version 1.10.15 compiled on August 25 2024
Launcher JVM: 21.0.2 (GraalVM Community 21.0.2+13-jvmci-23.1-b30)
Daemon JVM: C:\Program Files\Java\GraalVM 21 (no JDK specified, using current Java home)
OS: Windows 11 10.0 amd64
GraalVM 21
echo %java_home% if on windows
changed to regular Java 21, still didnt work
C:\Program Files\Java\Java 21
damn ur project ir cursed or smt
๐ญ
uh, try going
Settings >
Build, Execution, Deployment >
Build Tools >
Gradle
๐
but its also not working in cmd prompt so its not an issue with intellij
thats very odd, out of ideas tbh
which is?
o.m.g.
thats a classic ig
๐๐
I was about to say you could explicitly set javac in build.gradle
compileJava.options.fork = true
compileJava.options.forkOptions.executable = '/path_to_javac'
tho not sure if that would even help
lol
patch isnt 5+ ๐ญ
wouldnt 1.21 just return java 8?
nah 21 > 18
so it passes the 1.18 check for java 17
ok to check so this doesnt happen again
this is correct, right?
if (version.minor > 20 || (version.minor == 20 && version.patch >= 5)) return JavaVersion.VERSION_21
looks right
ok imma just account for minecraft 2.x.x while im here ๐คฃ
gonna assume it runs on java 21
i have a feeling that itll never go past 1.x
we will all be dead by then
unless we become an inter-planetary species
maybe in 200 years
if we dont destroy earth in the process that is
Anyone make use of Java22 Class File API?
Yea I touched it
Any example usage?
How does it compare to external libs?
- I think they had some good examples on their JEP page
- No clue, that was the first class file api I touched
Used the one from second preview btw
Still not seeing how to just change strings though. Looks like you can manipulate everything else.
i guess you can find all ldc that point to a string you want and change them to ldc another string you want
and then do the same for constant fields and annotations 
last i checked it didn't let you arbitrarily change the CP
I'm basically mimicking placeholders like spigot.
Just trying to modify the strings
lol yeah spigot does it the lazy way ^ given that
Also keep in mind that the placeholders will not work when declared inside a "static final" field
bump
override getPlaceholderList
Do you have an example? Or what class is getPlaceholderList? Not finding the right one to override. and I'm looking through various repos like the Player one and I'm not finding any trace of getPlaceholderList
Got a question that AI seems to be stuck on. I want to write a local desktop app using: frontend in React/electron, backend in Java. How can I get them to coordinate the port to communicate on and avoid clashes with already bound ports?
hey, i was trying to get shulkers to scale to 16x size with the scale attribute, but apparently its hard locked at 3. is that something that can be changed server side? do we know?
plugins, i mean
is your plugin the only plugin present?
Uh
can you show more logs than just that
lol
and the code for your gui
Hello i'm creating plugin for prison and i made an custom pickaxe item but its breaking blocks weirdly and i've tried alot of things, and i was not able to fix it so i need your help.
there's the bug
there's the code
https://paste.helpch.at/ruvasequzu.java
can anyone help me please?
So what's your issue
alright
so
im using intellji community edition, and the minecraft development plugin
for some reason, I can't build the plugin
Yeah I use it too
the run button says "The file in the editor is not runnable"
I think I know what ur on
I hope you do
U use maven or Gradle to build?
both dont work
yea
I love you
๐ซถ๐ฅต
โค๏ธ
Are you good at writing plugins?
Or u just starting like me?
mid
I started like 5 months ago but then I went over and started Luaua
Can you help me with my issue now?
whats your issue
.
Like when I'm 1 block away of block I'm breaking it's working good, but if I'm 2 blocks away from the block I'm breaking the hole is in weird position
I would love to help you but I have no idea man
if I see something that might help I'll try and give it to you
Can anyone help me, when I put the placeholder dependency in my plugin this appears:
[WARNING] Failed to download maven-metadata-placeholderapi.xml [https://repo.extendedclip.com/releases/]
[WARNING] Failed to download maven-metadata-placeholderapi.xml [https://repo.extendedclip.com/releases/]
Yk there's something like chatgpt exist nowadays?
The warnings you're seeing indicate that Maven is unable to fetch metadata for the PlaceholderAPI dependency from the repository (https://repo.extendedclip.com/releases/). This could happen if the repository URL is incorrect, down, or if there are connectivity issues. Here's how to troubleshoot and fix the issue:
- Correct PlaceholderAPI Repository
Ensure that your pom.xml includes the correct repository for PlaceholderAPI. Replace it with the following:
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
- Add PlaceholderAPI Dependency
Add the correct PlaceholderAPI dependency in your pom.xml:
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.3</version> <!-- Use the latest version -->
<scope>provided</scope>
</dependency>
- Check Internet Connection
Ensure your internet connection is stable, and Maven can access external repositories.
- Force Maven Update
Sometimes, cached metadata can cause issues. Force Maven to update dependencies:
mvn clean install -U
- Use a Local JAR File
If the online repository is inaccessible, download the PlaceholderAPI JAR manually from SpigotMC or its Maven repository and add it to your project manually:
-
Download the JAR file.
-
Add it to your project in a local libs folder.
-
Update your pom.xml:
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/placeholderapi-2.11.3.jar</systemPath>
</dependency>
- Verify Repository URL
Test if the repository URL is accessible via a browser:
Go to https://repo.extendedclip.com/content/repositories/placeholderapi/.
If it doesn't load, the repository might be temporarily down. Wait or use the manual JAR method.
Try these
Do you think I haven't already tried? I've already searched everywhere how to fix this.
@celest patrolhttps://repo.helpch.at/#/
HelpChat's public Maven Repository for our projects.
thanks
What is this dependency for?
what?
Can you help me too?
.
I speak Portuguese and I'm using a translator
What does this dependency do?
He asks what this website is for
I think it's like for pasting the code for us to see
alternative for the other repo
Like pastebin
I accidentally said dependency, it's a repository, what does this repository do?
ok
Or GitHub?
I think it worked, I'll test it in Minecraft
didn't work
I think I put the placeholder wrong in the plugin
it's not working
@dense drift
can you help me please
Can anyone help me, I put the right dependency in the plugin but the placeholder doesn't work on the scoreboard
Someone help me, I can't put placeholderapi in my plugin, I've already searched in several places including chatgpt
Why ur using multi account lol
I don't know how to help u
I don't know how to help u
Oh global mute lol
okay
I give up then this placeholder never works
it works
you are just not doing it right
dont shift the blame when you yourself dont know how to do it
and provide more information rather than "it does not work"
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
I speak Portuguese and I'm using a translator so if I say something wrong...
I dont help in dms
ok
Can you help me also?
.
hi guys i'm trying to integrate placeholderapi into my plugin and i'm running into errors in pom.xml
Dependency 'me.clip:placeholderapi:2.11.6' not found
did you add the repo
Hey how can I speak to support
make a question and wait for someone (who i presume is going to be knowledgeable) to answer
Can someone help me? I can't install PlaceholderAPI as a dependency in my plugin. I've searched in many places, even on the official website, but I can't figure it out.
or wait
uh
wdym
by install
oh
I've been trying to put the placeholder in my plugin for 3 days now.
but I can't do it at all
Have you seen https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Hook-into-PlaceholderAPI already?
yes
can you post your code? or a link to the project on github or something
so we can see what youve already done
all i can think is eww to skript
arent 1.12 and below ids hard coded? not sure why giving the id for healing 2 would give anything but
i am 1.8 because of hcf
what does your skript result in currently? dm me if you want to
Can someone help me put a placeholder in my plugin? If possible in Portuguese please.
Wrong channel
Is there currently a way to communicate with backend servers through Velocity, even if no player is online?
If you can install something like redis on your server, yes. Plugin messaging requires a player.
yes, i have redis. But not all users have access to a redis server. Im coding a economy plugin. Whats the best casual methode to synchronize local cache with the database ?
Can't you create your own messaging system if you create your own websocket
Why are you even caching it?
Might be a bit unneeded
Db queries are fast enough
Or done outside of the main thread
You can just use SQL or whatever
Database queries are not tha slow
Just do them async
and use CompletableFutures etc
Yeah but some stuff needs to be done same tick
ยฏ_(ใ)_/ยฏ
Although besides that it should still be done outside of the main thread imo
Maybe my wording was confusing so I edited the messages ^
I know ivan8or made smth https://github.com/Ivan8or/RadioScanner
A tick is 0.05s
And servers can have like a hundred plugins
So you don't want to fill that 0.05s up with a network and database request
And so a cache is required for some stuff
Especially in events
that's why DB queries are not executed on main thread?!
just run it async???
never do db/network stuff on main thread???
.
otherwise, caching is only required in very specific and small cases lol
this is not one
will check it out, ty
You don't know the specific use case and they asked specifically for sync/caching
caching is pointless
and sync is just database
u dont need fancy stuff
But I mean the specific use case
Also I never said caching is required
You guys are essentially saying caching is definitely not the way to go, which is why I said what I said
... Ok
caching is only good for single server
we 100% are not saying (at least I) caching is not the way to go, but simply pointless for a multi server system
unless you go the "microservice" route
and make a rest backend or smt
and handle things via that in all servers
"this is not one"
where it is required? yes, it is not required
lol
otherwise, db queries take 20-70ms, 100ms at extreme cases maybe, assuming a decently well made DB
storing it in cache for those extra few ms that arent even handled in main thread
might not be worth it
Well you don't know that
specially since handling caching and cross server stuff, is simply a mess
To put it simply: Just use a database and ignore the caching stuff
It's not worth the pain
Caching is harder for multiple servers
I would only use caches for single servers
Whatever
I'm not going to keep repeating myself so I'll just wait to see when - or if - they elaborate to respond to them directly
is anyone here good with cheat engine
Do I need database for Minecraft server with economy and stats like blocks broken etc?
I don't use the database directly without caching because third-party plugins use the VaultAPI, and there are no existing async methods. As a result, the main thread freezes whenever a plugin requests a balance or tries to deposit or withdraw something, as they need and wait for the EconomyResponse.
For now, I have implemented a Jedis Pub/Sub system for multi-server communication without the need for a real player (Plugin Message).
- As a bonus, by using Redis, extreme speeds can be achieved, allowing my economy plugin to process a massive number of users within milliseconds without the main thread ever freezing. This also includes better thread safety.
@serene cairn @worn jasper @dusky harness
if you have more than one server, of course
you can use SQLite for your single server; if you prefer sql storage
Oh u meant like server hosting?
Then idk yet
i mean if you use a proxy to conenct more than one server to your "network"
Yeah that was my first mind
than you need mysql/maridb as storage
Why I need it tho?
because sqlite is a local file storage system
Can't server write this data in plugins or something?
data in plugins are always temporarily. If you stop your server, all data is lost
Because this data is stored in the memory, which is a volatile storage.
Yh Ik
Also if I can ask which plugin is good for multi currencies
Like I want tokens and money as a virtual currency
But idk what economy plugin to choose
If you wait few days i release my Economy plugin as Beta ๐
Currently its in Alpha
Oh cool
Is it all going through vault?
yep, only the virtual currency is seperated
I need like trades with money and tokens inputs
like a /pay command ?
So if vault is supported in like trades plugin then your plugin is supported?
100% i wrote a dm to you
Nah like sign input money and then trade money for item
So there will be no scamming
sign input also supported
U make trade plugin along with economy plugin?
vault limitations be like
na /pay <name> opens a sign where you can enter the amount of money. If you looking for a Trade plugin, you can use Trade System from Spigot
Ik right
yeah also talked to the Towny dev and the new VaultAPI VaultUnlocked
But is trade system compatible with your plugin?
That's useless /pay nick amount is better imo
all plugins are compatible with my economy plugin, such as Towny (Fake Player Accounts)
appears it requires an extra port
ServiceIO is better
whats that ?
Ye ofc, how else?
can you send it ?
Can anyone review my code and tell me what I can improve in my developing of the plugins that's my 2nd day writing
They require worse, a player ๐
some servers are limited by hosts and don't have access to more ports
nah, thats not in active development
You can't have one size fit all
It uses vault API?
and who told you that?
1.21.4 latest
it isn't Vault, nor a fork, but has conversion from vault and full compatibility, aka any plugins using the vault api will work
?
So it's worth getting this over vault?
ofc
these thousands of versions are confusing ...
Like is it better in performance or smth?
but what you mean by better performance ? Its still an interface. So the Economy plugin itselfs contolles the speed/efficency
Ohh
i mean @worn jasper
yeah
ServiceIO addresses these issues by offering robust nullability annotations, comprehensive documentation, and well-maintained source code. In addition, ServiceIO enables asynchronous data loading and provides access to cached results, enhancing performance and scalability.
welp
ah it caches itself stuff ?
it appears so?
mhh sounds interresting.
so, third party plugins can still use the outdated non async economy implementer, but ServiceIO just store the balances in mem ?!
i dont get it
I can wait I want to start the server in August, now I'm writing plugins and starting preparations
I dont think you should worry too much about how it works as long as it does the job. If you are curious you can just check the source code.
Code review anyone pls?
you are using 1.21.3 spigot api in your code. Maybe update to 1.21.4 as the new default mc server version
Nah cuz I use purpur which 1.21.4 is still in development
many things changed here. For e.g the customModelData was changeing
never use purpur
Why?
because their enchanting registrar system is crap
Wdym by enchanting registrar system I don't get it
Small plugin, only thing really worth mentioning is that your RegisterPlugin is an util and you shouldn't need an instance of it, just having the methods be static instead, since well, it's an util class
weird use of "setupDependencies", rather bad name
you are not setting anything up
RegisterUtil is a variable and should be lowercase.
If its really just an util class it could probably just have static methods and no need for instantiation.
ditto ig
And on the other plugin, don't use sout use the logger
maybe call it HookManager or something like that
Which one
MysticPickaxe
also in BlockBreakListener dont create a new instance of Random at line 71
assign it to a static variable
and do not use displayName.replace("&", "ยง")
instead take a look into the AdventureAPI
Or use the old chatcolor translate something something method if you're still using legacy colors
also I dont really see the need for "RegisterPlugin" class. Personally I would keep those methods in the main class
if not, those methods should be static imo.
or use this methode if you dont want to use adventure
import net.md_5.bungee.api.ChatColor;
String text = ChatColor.translateAlternateColorCodes('&', someMessage);
I saw it on YouTube plugin tutorial
and BlockRegenerator line 36
thats great that you are learning, there are a lot of ways of doing thing though
hoping it's not a kangarko video
does not mean its a good practice
weird boy xd haha
There are only ChatControl ads
Lake country games
as for anything else, cant really see much on phone
You have create 2 times MythicPickaxe classes . For Commands and for the ItemStack
maybe call it GetPickaxeCommand
you can name them as you want
also util class named MysticPickaxe is kind of weird imo
id rename
or refactor appropriately
So how to name it
Split the register class in two
RegisterEvents
RegisterCommands
And always create debug logs.
not sure, up to you to decide
logs = console outputs xd
I only do if something is not working lol
Like a debug
util class with a single method, probably PickaxeCreationUtil with a "create" method or smt
trust me, if your project becomes bigger, you need to love debugs
I better like to make alot of smaller plugins than one bigger haha
Also with the blockresetlite I had alot of problems with worldguard
Because it's 7.0 API is f'ed up
Terribly weird
so i create a core plugin with all dependencies and relocations ๐ Its much easier to create new plugins from scratch
Older apis were more stable
Yeah that's right
Also I need to add /plugin reload to both of my plugins lmfaooo
The core plugin is approximately 6MB in file size, while your actual plugin is only around 100-500KB in the end.
spigot api detected, opinion rejected
If you need more config files you need to create a FileManager. I can send you my
Thanks y'all for code review recode tmrw
you are coding with the paper api ?
Nah one config file is enough
Spigot is universal
why wouldn't I?
hella false statement lol
U can use paper plugins on spigot?
not 100%
#HardForkBaby
latest versions xd
1.8 minecraft servers
Yeah that's why I'm using spigot because spigot plugins are compatible with paper because paper is fork of spigot
false
at least not true anymore
paper hard forked
So I can use paper plugins on spigot?
older versions are a fork. For now Paper add much own stuff to it
what? no
And that's why I'm coding.with spigot API in java XD
starting in 1.21.4, paper has nothing to do with spigot
while for now spigot plugins still work, it's just a matter of time till spigot loses support once paper start doing api changes
don't think you understand
lol
I got you now
use paper as server software, and code with spigot api. If Paper becomes the main api for coding stuff, then switch
easy
that's the worst advice I have heard ngl
whats the adventage of using paper instead of spigot ?
also, why would someone force themselves to use spigot api ๐คข
tons of better api
and more logical too
And why don't use purpur?
PluginMessages still only be triggering if a player is conencted
who said that?
@digital temple
But why
purpur is a fork of paper with more configuration
Can you explain it to me?
Fax
i hostet a network with purpur and many plugins are not working correctly. (Enchanting Plugins)
from ALL the paper forks, purpur is quite literally the single one that makes sense to have
probably because of misconfiguration on the user's side
as said, purpur provides way more configurability
and if you disable a certain feature
it can break plugins
lol
I need purpur to have more configuration for my prison server lol
customization comes at its costs
the only "better" thing is that some stuff are handled async
lol
i believe its the Food consumting or something else
just visualls
either way, if you want more options
there is nothing wrong in using purpur
it's essentially just paper with addons
and hard fork applies to it too
Yeah that's true tho
so, it will lose spigot support once paper loses it
spigot itself has legit no other fork besides those forks keeping 1.8 alive
there still people who use spigot as server software ?
if you forget those, spigot is the most irrelevant software nowadays
same as OptiFine
spigot is still used for a somewhat optimized server without losing much vanilla behaviour
Optifabric is good alternative to sodium ngl
since paper is performance focused, it's not the same
i heard about MultiPaper
so, mostly private smps use spigot
just use sodium and iris
the current state, yes. And you need a loooot of power
But you know on some pcs optifine is better than sodium lol?
but that's normal lol
and 99% of all existing plugins are incompatible
Folia also requires a beefy machine
no way xd
And for example on pojav
Is Folia not discontinued?
or was it multipaper
probs multipaper
cya
Gn
Yeah but it is much more configurable. In my experience I was able to get closer to the vanilla experience on Paper. It has been a couple years though so maybe that has changed. But at some point I remember needing to replicate some vanilla behaviour that was fixed on Spigot and Paper but Paper made it configurable.
What do you think about using skript instead of making plugins?
yeah, that is true, paper nowadays has a ton more configs, my statement used to be true before
Big no
we don't say that word around here
illegal
eh
it's alright
if you know what you're doing
The main reason it is disliked is because people that lack knowledge in the basic concepts of programming end up making lag machines.
No idea what the performance difference between a java plugin and a skript that do the same thing is.
huge
the diff grows exponentially
for a /site, essentially none
for a bedwars, huge
random ex. but ye
skript is made with lots of spaghetti code
help
With what
is it possible to host a minecraft server on a discord bot host?
๐ค
f.e. if i have a high end bot hosting, can i run a minecraft server on it
Technically yes. But your host might punish you for doing so.
Might as well pay for a vps at that point.
well unless you have a way to install a jre/jdk on it and have access to the terminal in general, then no
Blasix1x sent 1251 packets in a tick. Terminated the connection!
looks nice, but i'm curious about this code
if (nearbyBlock.getType().isAir() || nearbyBlock.getType() == Material.BEDROCK) {
continue;
}
// Trigger BlockBreakEvent for each block
BlockBreakEvent blockBreakEvent = new BlockBreakEvent(nearbyBlock, player);
plugin.getServer().getPluginManager().callEvent(blockBreakEvent);
// If the event isn't cancelled, break the block naturally
if (!blockBreakEvent.isCancelled()) {
nearbyBlock.breakNaturally(item);
}
is it really necessary to continue if the block is bedrock? and if so, why not continue for other unbreakable blocks eg. barriers, command blocks, etc
also pretty sure this message lies
plugin.getLogger().warning("Invalid mining area specified in config. Defaulting to 3x3.");
and never defaults to 3x3, and just cancels that pickaxe mine action entirely
How about this one?
also nice, the only issue i can think of is that you should be resetting the mines automatically on startup
since right now i think its possible for a scheduled block to be forgotten if the server restarts after it is mined but before it is refreshed
That's actually a good idea thank you I will add it too.
hi guys i'm trying to integrate placeholderapi into my plugin and i'm running into errors in pom.xml
Dependency 'import me.clip.placeholderapi.expansion.PlaceholderExpansion;' not found
Update: Still need help
Had the same issue
great, and the solution?
You need to add repository
<repository>
<id>placeholderapi-repo</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>```
Try these
life saver, thanks
I've tried to resolve this also but with worldedit lmao
yea, cant figure that one too
When asking for an user's input through chat is there any way to have tab completion?
I need the namespace key of a material and I want to help the user by suggesting them.
The only way I know is to register a dummy command or whatever and use that for completion.
pretty sure tab completion is only ran when / is present
the only tab completion in chat that I know of is the Player name one
which you can technically modify using PlayerInfoPacket but that would also change the tablist players
unless there is a way to bypass it
nah I don't want to bother working with packets
nope
When you say that you can not execute java 8, do you mean you can't run the program at all or does it fail at the java step?
You might need to mark the file as an executable before executing it
Hey, so I'm making a Temp-Fly plugin. It is also the first time using Kotlin and ConfigLib for me. But I'm kind of running into a problem... I've fixed a lot of bugs like one language file not generating or generating incorrectly, since I'm trying to use dynamic languages with configlib. But now, I need a way to reload those messages and I can't find a way :(
So if someone could help me, this is the repository of my (not that well coded) code: https://github.com/kitoxis/nxltempfly
The language object and the language manager are located here: https://github.com/kitoxis/NXLTempFly/tree/master/src/main/kotlin/lt/nxl/config/languages
Also, for some reason the files reload after a server restart/reload, but not when using /tfreload, but the settings file does.... (Reload fun in settings: https://github.com/kitoxis/NXLTempFly/blob/master/src/main/kotlin/lt/nxl/config/Settings.kt#L25)
That's a lot of companion objects with global nullable instances ๐ฌ
Anyways, just from glaring at your code a possible issue is that you're likely not updating instances in the locales map
Is this the right channel for asking questions about bukkit / spigot api
Yes
Does anyone know how to create large explosion particles now? I only see explosion in modern versions and explosion emitter which was huge, but what happened with large?
Well, that's probably the most i can do :D
So something like this should work, right?
fun reload() {
locales.clear()
loadLocales()
}
because it doesn't :\
This is how the particles were renamed:
EXPLOSION_NORMAL -> POOF
EXPLOSION_LARGE -> EXPLOSION
EXPLOSION_HUGE -> EXPLOSION_EMITTER
Source is a message in the PaperMC discord server: #555462289851940864 message
Thank you!
poof
poof
Hi, I have a problem with the NMS, when using the imports I get no error, but when compiling I get the error โcannot access net.minecraft.core.HolderLookupโ and other errors, using 1.20.6 on the NMS.
what IDE are you using
and what are you using to compile
you might accidentally be using multiple build tools - one that your IDE is using, and another that you're using to compile
I use Intellij Community and I compile with Maven
can you show your pom.xml?
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
โข HelpChat Paste - How To Use
and also you didn't touch any of this other than Project, right? (in ctrl alt shift s menu)
hmm ok
wait is this the maven output?
what command or button are you running to compile it?
pom.xml seems fine tho..
I compile with IJ or by using cmd, which is used mvn clean install
I didn't understand the question
class file has wrong version 65.0, should be 61.0
61 is Java 17 (what you have) and 65 is java 21
so possibly spigot might require java 21
When you save the config file, the comment lines are deleted. How i can save the config file properly?
You cant with the bukkit config api
Can you please tell me how we can do it?
Use a different library for handling configs.
Or dont write the config after you save it for the first time
Is there a library you can recommend?
This is my last resort unfortunately
I don't know any unfortunatelly.
Why is that?
Can anyone help me with this gradle task? I want it to run the other task but with given args
register("clearTables", JavaExec::class) {
dependsOn("bootRun")
doFirst {
bootRun {
args = listOf("clear")
}
}
}
that isn't really how tasks work, I'm afraid
that's a lie, I am not afraid of anything
bootRun is a task, what you want is to run a separate task from bootRun given that it has different parameters and configuration
idk what type of task bootRun is but let's say BootRunTask for the sake of it, you need to register a BootRunTask and configure it to your liking and depend on that
Yeah what I made makes no sense actually lmao
This should work tho right?
register("clearTables", JavaExec::class) {
group = "application"
description = "Run the JAR with 'clear' argument"
classpath = sourceSets["main"].runtimeClasspath
mainClass.set("cc.valdemar.shop.ShopApplication")
args = listOf("clear")
}
I don't really need the bootRun task actually, just want to run the jar with given args
yeah that'd do it
It just exits with code 1 and nothing else
Process 'command 'C:\Program Files\Java\jdk-21\bin\java.exe'' finished with non-zero exit value 1
Nothing else in the error
Ah there was something in the scan
Got it, ty
@proud pebble @river solstice sooooooooo ๐ https://x.com/notch/status/1875230756437479658
@JohnnyS89206078 I basically announced minecraft 2.
I thought that maybe people ACTUALLY do want me to make another game that's super similar to the first one, and I'm loving working on games again.
I don't super duper care exactly which game I make first (or even if I make more), but I do know
oops didnt realize this was development support 
Sorry for not answering you, thank you very much for the help, it helped me and I was able to compile
awesome! ๐
Can anyone please help? I have tried like 10+ methods to reload the dynamic language files... BUT NEITHER WORKS :|
https://github.com/kitoxis/nxltempfly
This is my first project using kotlin and configlib
Locale Manager: https://github.com/kitoxis/NXLTempFly/blob/master/src/main/kotlin/lt/nxl/config/languages/LM.kt
Locale Object: https://github.com/kitoxis/NXLTempFly/blob/master/src/main/kotlin/lt/nxl/config/languages/Locale.kt
My current try was:
fun reload() {
TempFly.log(locales.toString())
locales.clear()
TempFly.log(locales.toString())
loadLocales()
TempFly.log(locales.toString())
}
Where I tried debuging and the output I think was correct:
[11:51:33 INFO]: kitoxis issued server command: /tfreload
[11:51:33 INFO]: {en_US=lt.nxl.config.languages.Locale@2fc4fbae, lt_LT=lt.nxl.config.languages.Locale@74372dd5}
[11:51:33 INFO]: {}
[11:51:33 INFO]: {en_US=lt.nxl.config.languages.Locale@7d3b6bcb, lt_LT=lt.nxl.config.languages.Locale@59520e70}
How to use coins engine api
Whenever I try to use it
I get this
Caused by: java.lang.NullPointerException: Cannot invoke "su.nightexpress.coinsengine.CoinsEnginePlugin.getCurrencyManager()" because "su.nightexpress.coinsengine.api.CoinsEngineAPI.plugin" is null
Do you have CoinsEngine installed on your server?
You need the plugin installed.
Does this error contain a stacktrace or is it just this single line?
Idk can send u log file
Yeah. Put the log file in a paste bin service such as paste.helpch.at and send it here.
It is hard on phone tho
Here's the whole stacktrace
I have coins engine in plugin.yml dependencies
I have it in pom.xml as dependency
do not shade coinsengine
mark the dependency in your pom as <scope>provided</scope>
i need help rn quick
Cannot resolve symbol 'me'
placeholderapi
i have it in pom.xml dependencies
@olive fulcrum feel this isnโt a good link
Is it better to make smaller plugins for prison server and connect them
Or
One big plugin?
Like blockreset blockdrop rankups coinflip
I like to create smaller plugins vs one big plugin
^
How about like the same stuff
Like the same java class
I do the core plugin then?
i dont think youll get any performance deficiency if you do multiple plugins over 1 big one its sorta just up to you if you wanna do that or not
personally I'd prefer 1 big plugin to reduce duplicate code
but yeah I don't think there's any performance difference
just preference :)
Create libs ๐
Hey there! I was wondering what the development updates were for updating placeholder api for 1.21.4 please?
Does it not work on 1.21.4?
ACTUALLY
I recall reading a blog that stated that there was indeed a difference
I'm sure there is a difference but I wonder if it's significant
that's what I said xD, and if I am not mistaken, that blog states
We've not had any success with it on 1.21.4 and looking the spigot page there have been issues with 1.21.3
I don't think it's significant though
If you develop all the plugins then you can optimize it to be performant with each other
was just pointing it out
๐
i mean yeah there is also a difference in doing i + 2 than i + 1 + 1 but it's not noticeable
tbf there isn't any difference at allif you're using any complied language but yea
Yeah but idk to make
One big plugin, core plugin or modular small plugins connected with api
Like somehow I need to connect them
And I have duplicate code like database class and economyutil class
For now I have
Blockresetlite
Blockdroplite
Coinfliplite
Rankuplite
And need to connect blockdrop with rankup to check if rank is high enough to get drop from blocks
So for now I did it with api
Also as I want the same config file
There is the thing, I forgot what its called like jitlab or another service, where the github repositories automatically get uploaded as the api, so you can use that, then in the main plugin depend the plugins you want as the other plugins, and in the other plugins, depend the core. Then you will just have to figure out how to use that jitlab or smth
jitpack* but I would just do one big plugin
seems like you have a couple reasons to do 1 big plugin and no reason to do separate plugins so
weighing the options -> one big plugin
What about if I want to upload the plugins on for example spigot
And if I do one big plugin then it will have only one usage
For prison server
If I would make core or API for every plugin then they will compatible to each other but work without other plugins
sure
for my very own compiled language that I just made up, there is a difference
i need to start arguing like this more
true
https://xkcd.com/1172/
Tangential
Also
https://xkcd.com/378/
I have an API for a plugin made with interfaces. Some classes represent objects that will be loaded from config. Each clasa has an implementation, usually record ClassName() implements IClaassName.
I want to use Configurate to deserialize the objects but I run into an issue where it doesn't know what to deserialize IClassName as. Is there any way to tell configurate that the interface A is implemented by class B, like a map?
Polymorphic serialization, not sure if Configurate supports it, but you can try searching that term
why not just tell configurate to deserialize ClassName instead 
IClassName has methods that return other interfaces, and so does ClassName.
oookay?
What I meant to say is that it will then complain about IAnotherClass, but I have an implementation for that too.
No luck ๐ฆ
public class PolyDeserializer<T> implements TypeSerializer<T> {
private final Class<? extends T> clazz;
public PolyDeserializer(Class<? extends T> clazz) {
this.clazz = clazz;
}
@Override
public T deserialize(Type type, ConfigurationNode node) throws SerializationException {
return node.get(clazz);
}
}```
```java
.registerExact(ISpawnEgg.class, new PolyDeserializer<>(SpawnEgg.class))
.registerExact(ISpawnEggLevel.class, new PolyDeserializer<>(SpawnEggLevel.class))```
This seems to work for now.
@fringe spruce sus link help
I am trying to create some placeholders in my plugin but I think I am doing something wrong.
This it the logic
package com.striderdev.striderSimpleCloud.placeholderapi
import app.simplecloud.controller.api.ControllerApi
import kotlinx.coroutines.runBlocking
import me.clip.placeholderapi.expansion.PlaceholderExpansion
import org.bukkit.entity.Player
import java.util.logging.Logger
class GroupPlayerCountPlaceholderHook(
private val controllerApi: ControllerApi.Coroutine,
private val logger: Logger
) : PlaceholderExpansion() {
override fun getIdentifier(): String {
return "ssc_group"
}
override fun getAuthor(): String {
return "StriderDev"
}
override fun getVersion(): String {
return "1.0"
}
override fun persist(): Boolean {
return true
}
override fun onPlaceholderRequest(player: Player?, params: String): String? {
logger.info("onPlaceholderRequest triggered with params: $params")
if (params == "test") {
return "test works!"
}
if (params.startsWith("playercount_")) {
val groupName = params.removePrefix("playercount_")
logger.info("Extracted group name: '$groupName'")
return runBlocking {
try {
val serversInGroup = controllerApi.getServers().getServersByGroup(groupName)
if (serversInGroup.isEmpty()) {
return@runBlocking "0"
}
val totalPlayerCount = serversInGroup.sumOf {
val serverDetails = controllerApi.getServers().getServerById(it.uniqueId)
serverDetails.playerCount
}
return@runBlocking totalPlayerCount.toString()
} catch (e: Exception) {
logger.severe("Error processing placeholder: ${e.message}")
e.printStackTrace()
return@runBlocking "error"
}
}
}
logger.warning("Unrecognized placeholder parameters: $params")
return null
}
}
And this is in the start logic to register it:
if (server.pluginManager.isPluginEnabled("PlaceholderAPI")) {
GroupPlayerCountPlaceholderHook(controllerApi, this.logger).register()
logger.info("Placeholders registered successfully!")
} else {
logger.warning("Could not register placeholders: PlaceholderAPI missing.")
}
Using /papi list shows that ssc_group is registered but neither placeholders actually return. That first logger.info doesn't even run.
What am I getting wrong?
The identifier can not contain underscore @slow plinth
Why doesnt PAPI throw an exception tho
IDK. Worked though
I was thinking about that
Time to fix that.
Does anyone know if there is a consistent way to detect when a JVM process has "finished loading" regardless of server software?
I'm trying to make a sort of pterodactyl alternative, but am having issues with detecting when the server has fully started
Pretty sure there is an isLoaded method you can check in spigot.
Needs to be software independent, but thanks for letting me know about that
Does anyone know why my resourcepack isn't working, unzipping and loading the folder in game works but the zip version just isnt working
for context, my plugin zips resources of a resource pack
and its creating this zip
but its not working in game
1.21.4 resourcepack
Diamond custom model data 1
How to update a dynamic language values with configlib? The settings file auto-updates correctly. But since my languages are dynamic, they dont... but how do i make them to do that? My current code: https://github.com/kitoxis/nxltempfly
you forgot the .com lol
When they have @Deprecated annotation?
but they dont
oopsie im stupid
[22:02:35] [Server thread/WARN]: Legacy plugin ChatFilterLite v1.0.0 does not specify an api-version.
then they're not deprecated
plugin.yml -> api-version: 'version' e.g: api-version: '1.20'
Happens to best of us
I strongly recommend for you to use Minecraft Development Intellij Idea plugin, it generate boilerplate for plugin developemnt
i used it
but idk why it dont added api-version
to plugin,yml
that was the first time it did like this
ye
Then I have no idea what happened
this is sort of a development question
i manage a minecraft events discord server where users can post events through a discord bot that they're hosting for other ppl in our server to play
we need a way to detect when their events end so that we can add features that would utilize it (ex: VC for the event that's deleted when event ends)
some ideas we had were like:
- manual detection: host clicks a button when their event ends. cons: unreliable bc host might forget to click the button causing ppl to think event is still going on
- "ai" plugin: each host that wanted to utilize the features that require end detection would install our plugin. it would use factors such as online players, chat activity, player movement, etc... to "guess" when an event has ended. cons: also unreliable and could have false-detections
- manual with remidners: every like 30 mins the host is DMed or asked in-game whether their event is still going on. they either click Yes or No. if they dont respond in the next 30 mins, its assumed its ended. cons: some ppl have DMs disabled, it has 30-minute unreliability, if someones power goes out or something its false detection, its annoying cause hosts arent always looking in discord or paying attention to system msgs
- player feedback: players click a button in discord letting us know the event has ended. once its reached a certain amount of feedback, its marked as ended. cons: definitely will be groups of ppl who abuse this on ppl they dont like, ppl might just not provide feedback
- player feedback + manual: player feedback except it DMs/notifies host before confirming the event's been cancelled
if anyone's got any ideas please let me know, we've been struggling with this for months ๐ญ ping if reply
i mean, the only reliable way is surely just to have the host choose when it's finished
if they made the event and started it, i hope they can be responsible enough to say when it ends lol
maybe they could even do it through the game or something? that way it's easier than alt tabbing to discord or something, and it would just shut down the server and whatever they're using
Are the events timed based? Just end it after the elapsed time.
yeah if they can have the host specify the length beforehand, and maybe give them an option to add like 15min or 30min if the event is going longer than planned?
then it can end automatically but can proactively be fixed
If anyone much smarter than me has some spare time I'd appreciate some people looking over this (https://github.com/T14D3/Zones/blob/03151bc298077919f41429088d84e654d3e104cd/src/main/java/de/t14d3/zones/PermissionManager.java#L110-L176) pile of junk to figure out if there are hugely stupid design choices made by me that can be improved upon
idk why you dont just early return false on exception
and you shouldnt modify the original parameter via toLowerCase(), I would create a clone
Because the input can either be a valid UUID string or a ":group-NAME" string - if that exception occurs it tries to use the input as a group
Because I can't think of a better way to both include UUID's and some "group" value in the same parameter - and yes, it is extremely hacky, that's why I'm asking if anyone can find a "less hacky" solution^^
I mean, why are you reinventing permission systems? All of them already have some kind of group concept
poorly named method, it doesn't check permissions on the player object but if a player/group has kinda like worldguard "flags" permission values defined in a region object
Since when does that method modify the variable?
Yeah looks like it returns new String
ah right lol, regardless, I prefer assigning it to a new valuable
Hi ,Does anyone know? how make custom recipe with custom item? Example : I want craft a mythic sword with mythic shards(with custom model) how can make it?I searching on internet or ask ai but its wont wanna work
I'm not at my PC so I can't share my code but look into ShapedRecipe. Idk about newer versions but this use to only work with materials not specific items.
Could also check the craft or inventory click events.
from lightbulb.ext import tasks
ModuleNotFoundError: No module named 'lightbulb.ext'
WHen I try to run my bot it gives me this
I installed hikari and hikari-lightbulb?
Anyone know how to fix?
Good morning, I'm actually developing some plugins which offers its own menu API, only used for the same plugins for custom inventories, and some menus offers the chance to go back to the previous inventory. Some of my customers use DM to create custom inventories, and sometimes, some of the inventories contains a button which refers to a command related to my plugins. When they open the inventory, the back button is shown up, but when they go back, the DM inventory seems to lose all tracking. I assume that, once DM detects that a player has closed the inventory, it stops tracking their inputs. I was wondering if there was any other case which had the same issue with a solution compatible for this kind of cases or if the best would be to give support to DeluxeMenus and reopen them through the API
Hello i made a GUI with 6 enchantment books that have default enchantments like sharpness,unbreaking,looting etc and im trying to make an if statement that will check if item is ENCHANTED_BOOK with the name "Sharpness" for example anyone could help me with this?
๐ข I hate this
It's a bazaar plugin like the one of Hypixel
Yep
I thought you were talking about build tool plugins
<3
from what I see its a bit hacky
Downgrading ๐
true
maven 4 when
As long maven keeps using only xml, it won't have a chance to be superior to gradle ๐ฌ
Iโm pretty sure someone almost successfully implemented maven with a gradle plugin in gradle lol
huh
yea, like reading pom.xml, and then mapping the structure to some gradle equivalent stuff etc
Tbh that doesn't sound like too hard of a thing to do, for dependencies at least, plugins would be different
I dont really see the use case tbh
cuz things like this already exist (https://m0dii-dev.xyz/tools/maven-to-gradle):
The only good thing about maven using xml is that it is easy to convert it to gradle 
You don't even need a converter either, just gradlew init on a maven project
I can see how using a tool in your IDE would be more difficult or convoluted than using a tool somewhere on the internet
no i mean why would you need a plugin in your gradle project to convert pom.xml
ah yes, i forgot about that
init seems like a one time thing, what if I want to convert some kind of pom.xml of some project without opening the project itself
i want to transfer players using Player#transfer(...), is it possible without knowing the port?
cause u can run the /transfer command without specifying a port, but only if you dont specify a player (so only on urself), idk why
It probably defaukts to the default port
u know if theres anyway to figure out the port somehow?
nothing short of just trying every option, Minecraft will default to 25565 if unspecified both in the command and on the server list screen, it doesn't "figure out" anything
why it doesn't allow me to pass this into the document ?
I mean it wasnโt done to be useful, it was simply to point out, gradle can literally do anything that maven can do and more
Yea, Iโd assume one just provided some implementation around the most commonly used mvn plugins
Donโt you use # to link members of a class?
it should {@link} in javadoc
Yea but you donโt use Type**.**field tho
It should be a #, no?
Type#field, or #field if the Type is inferrable
oh right i forgot about that
ur good fam, nw
just like emily said, it always defaults to 25565 when port is not present
there is no "find out"
but what about custom domains that use srv records
like play.srnyx.com
thereโs no port and itโs not 25565
doesn't DNS translate it to an ip and port
lol
although actually
exactly
โฆโฆ..
should probs ask in paper discord
isn't it transferToHost()?
no
thatโs velocity
is .transfer on paper?
What are you trying to do though? Send players to a server that's not yours?
afonso's right
you can get the port using DNS
ยฏ_(ใ)_/ยฏ
but if it's SRV I wonder if putting just any random port will work
i don't think Minecraft does anything special to resolve SRV records when trying to join a server?
like.. just default to 25565 that's literally what the game does
and things automagically work
oh yeah I was probably overthinking it
yes
ok yeah ur right
only 25565 works which is interesting
even tho the server's port isnt 25565 (and theres a different server with 25565 with same underlying ip)
thanks
Hi !
I'm learning Java and I would like to know if there are some librairies I should learn to use ?
If you're learning Java I'd recommend sticking to base Java before diving into libraries, try learning by doing yourself what some libraries do
Once you get the hang of it then replace it with the libraries you want
highly depends on what you're doing
pluginq
Can I add a constructor in my main class that extends JavaPlugin or is that bad practice?
How are you going to... call that constructor?
Magic
yeah bukkit literally wonโt let you
If you want to do something on init do it in the enable/load method
Can't you have it if it's no-args?
You can probably
I don't want to call the constructor
I'm trying to make a fileManager so I can easily create .yml files as needed
Okay..?
And what does that have to do with the plugin having a contructor? 
yeah but you still canโt manually call it which I assume is the intention
What does one have to do with the other?
Oh yeah I just meant having a contructor, not calling it
it sounds like you want to inject the plugin instance into the file manager class
no like when I'm trying to do private FileManager filemanger;
it won't let me and says I need a constructor
That would be dependency injection but the wrong way around
thats why im asking
ah yeah then you can have a default and one with a few args like the plugin info file iirc
Did you set the variable as final?
what is your exact code
you could do = null
If so; either initialize it there, or don't
That's implicated
but are there any downsides to initializing it right away?
if you don't do anything else with it
Or you know private FileManager filemanger = new FileManager();
No? Inversion of control, if the FileManager needs a JavaPlugin then the JavaPlugin should be injected
Initializing it directly on the field or on the constructor are pretty much identical
yea doesn't work or smth
+ final :)
How so?
I dunno the IDE keeps complaining
what is the error
And the complain is?
Variable 'fileManager' might not have been initialized
You have two variables donโt you
one called filemanager and another called fileManager
oops sorry reply fail
methode in main:
public void createFiles() throws FileCantBeCreatedException {
fileManager.createFile(CONFIG_FILE);
fileManager.createFile(DEATH_MESSAGES_FILE);
}
Need more code than that
Change this instance-reference to a static reference.
Static member 'me. cozyleprechaun94.utils. FileManager. createFile(java. lang. String)' accessed via instance reference
here is main
here is filemanger class
Right so
Well you didn't even do what I sent lol
ah a sec
I personally recommend going the way of Java basics before Spigot plugins :)
Instantiation of utility class 'FileManager'
Iknow java BASICS bruv
I just never worked with files or ever got that error
No I meant having a constructor in the JavaPlugin would be the wrong way around since you'd need one in the FileManager for DI
Respectfully this is Java basics, thereโs nothing specific to files here itโs just instantiating fields
I'm no one to judge but you just sent a file where one might think that the basics aren't there yet
Oh right yeah I see, thatโs not what I was suggesting but youโre right
What does FileManager actually look like
Oh lmao
So why do you even need it as a field
Just call the static methods
FileManager.createFile etc
public void createFiles() throws FileCantBeCreatedException {
FileManager.createFile(CONFIG_FILE);
FileManager.createFile(DEATH_MESSAGES_FILE);
}
Yes
Yes
yea, but now it aint copying the contexts of the files from resources
Also, you can just switch out your custom exception for a RuntimeException I don't think you need a custom one for that
Ah interesting
I mean I guess it's better for clarity
Ideally you'd pass on the IOException with the original stack
ah
Because that contains the reason it failed
oh that's a simple fix
can still do that with a custom exception
change line 25 to add a second parameter to e
Yeah
and also "Define and throw a dedicated exception instead of using a generic one."
Never said you couldn't
do this and remove the e.getMessage() part @icy sonnet and ๐ช
AlwAys MakE cuStom ExcPtions blalala
when it makes sense to*
Youโve not written any code to do that
it doesnโt happen automatically
All your method does is creates a file
Imho an IOException is the perfect exception to throw on an... IO exception
I agree
wut so remove e.getMessage and leave e
e
My brain is so rotten I chuckled a little on ageee
laughs on bootstrapping with paper
I love when it starts correcting the real word to my version which I've misspelt 200 times over
out of curiosity
what word is it that you've misspelt 200 times?!
meant to type โyayโ earlier and it corrected to โyap fyโ
not even a word bro
hey, bootstrapping does allow you to pass args to the constructor of the main class
xD
It's usually something like many HAHAHAH