#help-development
1 messages · Page 1047 of 1
i dont care what your typing i wanna see it whole
id rather wait a bit longer to read the whole thing in one
should I use NMS to handle the mob movements?
like when the entity moves I run other methods at the same time
Are you talking about pathfinding ?
no
like when the entity moves I want to move armorstans at the same time
is there another way that doesnt require NMS?
mixins
what?
Two questions:
What version are you on
Are those armor stands supposed to be some kind of model ?
how do people usually handle database updates? i have an xp system that currently updates a player's xp through PDC. is using this system, and then updating the database on a separate thread with each players increase every X amount of minutes a viable approach?
When i work with databases i just load all data at server start from the database in for example an arraylist or whatever you need. And when i add something i add it to the arraylist and async to the database
but why do you need a database when u use pdc?
i just found out that killing a mob with fire aspect cooks their drops in the same was as furnace recipes, is there any event for this?
because its causing some strange effects from my custom recipes
just cancel the EntityDropItemEvent when you want your custom stuff to drop
i dont want my custom stuff to drop thats not the issue
its that my custom furnace recipe results are dropping when they shouldn't
you can alter the drops list in the entity death event
say that I have a 10 players on the server though, and they break 5k blocks every 10 minutes. if i were to update the database with the xp changes every block break thats 50k database calls in 10 minutes. which is why scalability would be an issue for me... i wasnt using pdc before and adding the xp to the database, but figured it was a bit much. I figured pdc would help me store the xp changes since it seems somewhat fast and allow me to limit the amount of calls i make
like if i make a furnace recipe that turns raw pork into bread or something, pigs will drop bread when killed with fire aspect
that's, like, about it
right but how would i even detect that they are unintended drops
and how would i go about replacing that with the vanilla drop again without it interfering with other plugins or loot table affecting datapacks
how do i set an armortrim on a ItemStack?
i would need to hard code everything about this and that doesnt seem like a proper solution
ArmorMeta
then save the xp the player got in an arraylist or somthing and update the database evry 5 to 10 min
i also have a scoreboard that updates the xp changes in real time, should i just be using the database value and a map together though? i guess my question is why I should do this instead of use PDC + database for backup/api display on a website
put it to databae every x minutes for the website
but for in game it can be pdc, why not
or whatever else
yea that's what my current solution is, was just asking if it was viable but justin said no...
and maybe save to databae when the player leaves or something
hey, is there a way to say, that the server is not reachable using the serverlistpingevent, but still setting the motd?
the thing i want is basically the "error" that occurs, when you r pinging with the wrong mc version, just with a custom text instead of the version
yea thats what im doing right now
well you didnt say anything about a web api afaik
yea i left that out, my fault for that
which is kind of a huge deal as thats the only part that would justify a databse in the first place, in this case
private static void createMagicPowder() {
ItemStack item = new ItemStack(Material.GLOWSTONE_DUST);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GOLD + "Magic Powder");
List<String> lore = new ArrayList<>();
lore.add(ChatColor.GRAY + "Used to make Magic stuff");
meta.setLore(lore);
meta.addEnchant(Enchantment.LUCK, 1, false);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
MagicPowder = item;
NamespacedKey powderkey = new NamespacedKey(plugin, "magicpowder");
ShapedRecipe sf1 = new FurnaceRecipe(powderkey, item);
FurnaceRecipe(powderkey, item, new RecipeChoice.ExactChoice(RawPowder), 5,200);
}
private static void createRawPowder() {
ItemStack item = new ItemStack(Material.GUNPOWDER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GOLD + "Raw Powder");
List<String> lore = new ArrayList<>();
lore.add(ChatColor.GRAY + "Used to make Magic Powder");
meta.setLore(lore);
meta.addEnchant(Enchantment.LUCK, 1, false);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
RawPowder = item;
} whats wrong
you tell us
i doesnt doe somthing the furnace recipe
You're never registering it
declaration: package: org.bukkit, class: Bukkit
that's true for the most part, but i also have some commands that will need to query top level/top groups/top balance which to my knowledge PDC isn't really something you should/can get from offline players. probably prioritize PDC but have the database as a fallback if the players are offline
Cancel the digging event
oh yeah that too
but yeah in general its good to provide reasons for why you are using a system before you ask if one system is better compared to another
gotcha ill keep that in mind for next time, appreciate your feedback
cant get it to work
cant get what to wrok
furnace recipe
That does not work, it still breaks
I'm going to lose my fucking gourd
intellij keeps deleting my commit notes if I close it without committing
just write it to .git/COMMIT_EDITMSG
I mean BlockDamageEvent
are you trying to save block damage progress
Yes, that event does not work (cancelling doesn't do anything)
What I am trying is completely stop players from damaging blocks
Just as Hypixel Skyblock does
adventure mode 💀
I need the player to be in survival
same thing
.
The client still makes block damaging predictions and damage the block client-side
Did you register the listener?
Yes, but the event#setCancelled(true) is not doing anything
I have set some debug messages and they show
give mining fatigue? xD
On what version are you?
There was a way in 1.20.4 and below that was giving a negative mining fatigue effect to prevent players from breaking blocks but at the same time, not affect the swing arm animation. But it was patched in 1.20.5
1.20.4, but I am trying to give support for 1.21 players
In 1.20.4 it works fine
BlockBreakEvent should work
if it doesnt you r doing something wrong
That prevents the player from breaking the block, not damaging it
yeah
what is your goal?
seems like there is no way then?
Make a mining system similar to Hypixel Skyblock
Where the block damaging and breaking is handled by packets
if you're having issues with the client predicting it, can't you check if the block should be mined or not, and if not then just send a -1 break stage packet
i never played skyblock
How is it possible that certain apps can predict the location of diamonds in Minecraft based on seeds and coordinates? How would such an algorithm operate?
Yes but it shows a flickering animation that looks really weird
I think pretty much by just generating a world and checking to see when it spawns diamonds
i have a custom block breaking system that's probably similar to yours that I haven't played with in a bit I can see if I can try to finda solution that works for me
how doi make custom in and output for furnace recipe
like the logic for how a world is generated can be replicated
i cant find that
I think I could easily fix it by sending an Update Attributes packet to the 1.21 client with the new attribute (block breaking speed) base value set to 0, but I don't know how to send that packet with an attribute that does not even exist in 1.20.4
you don't necessarily even need to send it as a packet, at least I don't, I can just straight up set the attribute and it works as expected in 1.21... can't you check what version the player is on and if its anything below 1.21 use a different method?
If anyone has an idea how to do this, i'll pay.
private static void createMagicPowder() {
ItemStack item = new ItemStack(Material.GLOWSTONE_DUST);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GOLD + "Magic Powder");
List<String> lore = new ArrayList<>();
lore.add(ChatColor.GRAY + "Used to make Magic stuff");
meta.setLore(lore);
meta.addEnchant(Enchantment.LUCK, 1, false);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
MagicPowder = item;
NamespacedKey powderKey = new NamespacedKey(this, "magic_powder");
FurnaceRecipe furnaceRecipe = new FurnaceRecipe(powderKey, MagicPowder, new RecipeChoice.ExactChoice(RawPowder), 5.0f, 200);
Bukkit.addRecipe(furnaceRecipe);
}
private static void createRawPowder() {
ItemStack item = new ItemStack(Material.GUNPOWDER);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GOLD + "Raw Powder");
List<String> lore = new ArrayList<>();
lore.add(ChatColor.GRAY + "Used to make Magic Powder");
meta.setLore(lore);
meta.addEnchant(Enchantment.LUCK, 1, false);
meta.addItemFlags(ItemFlag.HIDE_ENCHANTS);
item.setItemMeta(meta);
RawPowder = item;
}
whats wrong
But how can I set the attribute from a server that does not recognize that attribute?
1.20.4 does not have that attribute
And that is the server version
ah simple answer is you probably can't but there's probably more experienced people here that might know some sorta hacky workaround
best answer i could give is update to 1.21 and just add backwards compat instead...
I was thinking into serializing the Update Attribute packet sent from a 1.21 server and send it as raw data from the 1.20.4 using the ViaVersion Api
But I don't know how to serialize it into a ByteBuf correctly
I tried and the 1.21 client thought I was sending a Player Info Packet instead
I probably serialized it wrong but idk
What version are you using?
What do you expect to happen and what's happening?
Are there any error messages?
1.20.4 custom furnace recipe
Hey y'all. Using Spigot, can you change the piston push limit?
maybe with BlockPistonExtendEvent and BlockPistonRetractEvent?
welp frick.
not really. You can place 5 slime blocks and 5 blocks to those slimeblocks before the piston blocks
but i saw people building insane constructions by doing it
yeah but you have to be a wizard
it has to be very carefully planned
Anyone know how i can check if a value in a configuration file already exists?
Currently tried this but it doesn't seem to be working...
if(Configuration.getPlayerDataFile().get(PUUID + ".homes." + args[0]) == null)
thank you
alright another problem now this just doens't work for some reason, even though i used the same line in another plugin where it worked fine
Configuration.getPlayerDataFile().set(PUUID + ".homes." + args[0], p.getLocation());
PUUID is set here:
String PUUID = p.getUniqueId().toString();
nvm i forgot to save lmao
@kassisora
?

you are adding the recipe while RawPowder is not even a thing
create rawpowder first
hey how obaut idea set DI to plugin?
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
why are you using spring in a plugin 🤔
he wants it to jump up and down
what?
you just said spring lmao
kekw
spring CONTEXT
that means that you're using spring 
I did this but I don't know if it will work)
?paste
?paste
?paste
?paste
public void onPlayerClick(PlayerInteractEntityEvent e) {
Bukkit.broadcastMessage("ttt");```
how do item display hitboxes work because im right clicking it and nothing is broadcasting
They don’t have hitboxes
Anyone else facing this in their plugins?
java.lang.IllegalArgumentException: missing required data class org.bukkit.Color
Is this a bug?
Add an interaction entity as a passenger/vehicle
I saw some people mentioning the same for elite mobs
ok thanks
Issue seems to occur for spawning particles
The particle you are spawning needs a color as it’s data I guess
Yeah but this wasn't an issue before
What particle is it
1.21 specific?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
The javadocs tell you which particles expect which kind of data
declaration: package: org.bukkit, enum: Particle
public void onPlayerClick(PlayerInteractEntityEvent e) {
Bukkit.broadcastMessage("ttt");```
when i right click an armorstand nothing is broadcasted
did you register the listener? does it work for other entities?
Are you in the spawn protected chunks and aren't OP?
try PlayerInteractAtEntityEvent
idk why that worked but it did ty
You may also be able to use PlayerArmorStandManipulateEvent, which might be more helpful
👍
Yes, it got changed with 1.21
how would i modify the biome sizes of a world using spigot?
with a datapack
how would i enable that datapack on a newly created world?
you need to place your datapacks in the main world and it will work universally
iirc there is still no way to add per-world datapacks
don't mind me reading your code using jd_gui, but how does those few lines of code generate a whole void world wth
void biome provider and generator
check out my lib: https://github.com/IslandPractice/universes
thanks
if you want to create a world you'll have to specify where the bedrock, stone trees mountains, caves ores go
oceans biomes
and so on
but to create a default world, well, it doesn't require much
An empty generator class is all you need for a void world
exactly
i just throw in a void biome provider for it to not get confused with the biomes
The he standard biome provider seems to work fine
But I just have a single biome provider class anyway
¯\_(ツ)_/¯
same lol
literally all you need
/**
* An empty biome provider.
*/
object EmptyBiomeProvider : BiomeProvider() {
override fun getBiome(worldInfo: WorldInfo, x: Int, y: Int, z: Int) = Biome.THE_VOID
override fun getBiomes(worldInfo: WorldInfo) = emptyList<Biome>()
}
yeah ig
the HIDE_ATTRIBUTES item flag seems to no longer hide vanilla attributes, is this intentional?
(1.21)
thats a paper thing
which fixes a vanilla bug, is this item for a menu?
if so you can set the attributes to an empty map and then the flag works
you either need to set some custom attribute or just wipe them all for the flag to work
,or not use paper I guess
me, using java be like ;-;
no big diff
I think i'll just need some time to process this... and maybe a tutorial. I want to set it so that the overworld is a void with no structures, (0, 0) is a forest biome, and the nether to have structures
is there a difference between emptyList() and listOf()
also can't the compiler imply that the list is List<Biome> bc you're overriding a method that returns a List<Biome>, thus you could do emptyList() instead of emptyList<Biome>()? or is the compiler not this smart yet?
Got any view on this exact change by any chance?
emptyList returns same singleton empty list every time
oh cool
what about the second part
i thought you wouldn't need to specify the type parameter here
the compiler would know what the list is of
Idk tbh, let me try it in playground
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun main() {
println(foo())
}
fun foo(): List<String> {
return emptyList();
}
this compiles just fine
yeah i thought so too
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/Particle.java?until=b0a1d5b74806be6c64ac48b16fa91b3667fe7541&untilPath=src%2Fmain%2Fjava%2Forg%2Fbukkit%2FParticle.java
You can click on history, although color to SPELL_MOB/ENTITY_EFFECT was actually already added with 1.20.5
Previously it'd generate random colors if you didn't pass in color through offsets
Hi, Im tryping to connect plugin with mongodb and i have error
public class MongoClient {
private static com.mongodb.client.MongoClient mongoClient = null;
public static MongoDatabase database = null;
static CodecProvider pojoCodecProvider = PojoCodecProvider.builder().automatic(true).build();
static CodecRegistry pojoCodecRegistry = fromRegistries(getDefaultCodecRegistry(), fromProviders(pojoCodecProvider));
public static MongoCollection<Document> homeCollection = null;
public static void setup() {
try {
mongoClient = MongoClients.create("mongodb://localhost:27017/");
database = mongoClient.getDatabase("PrivMC").withCodecRegistry(pojoCodecRegistry);
homeCollection = database.getCollection("home");
} catch (MongoException me) {
Bukkit.getConsoleSender().sendMessage(Main.prefix + "Blad podczas laczenia z MongoDB: " + me.getMessage());
}
}
}```
```[13:01:09] [cluster-ClusterId{value='667e97eaa295ef5920b1851f', description='null'}-localhost:27017/INFO]: Exception in monitor thread while connecting to server localhost:27017
com.mongodb.MongoSocketReadTimeoutException: Timeout while receiving message```
what do you mean?
on latest versions this works? (bukkit#onlineplayers method)
mongodb im hosting locally
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-06-06 16:29:32 CEST; 1 years 0 months ago```
May 15 09:44:24 mongod[46524]: unw_get_proc_name(FFFF974F649C): unspecified (general) error
can .yml file saving and reading be async?
what do you want this for?
there's a public plugin called MTVehicles, their file saving has a lot of usage and causes tps drop
.yml is not for saving when a player does something. It is for configuration.
so i wanted to do it async
does it save in .yml when a player does something?
You know that the configuration file when read is cached, right?
they don't do that thats why tps drops
they just read, change and save it each time to the file
and when it is saved, it is to do so when the server turns on or when an admin command is executed, not when a player places a vehicle for example
🤡If you use Bukkit's FileConfiguration methods to read files, the reading is always cached.
How often does the plugin save?
(Yes you can read and write them async)
thanks
it's not that smart
You can definitely do Collections.emptyList() without needing to specify the type
Is it possible to get the skin texture value and signature from a spigot PlayerProfile? Or do I need to use nms?
😦
spigot (without bungeecord) have this classes?
thx
Why is it not seperated from bungee
it is, isn't it?
the name is unfortunate
but it's included in spigot as well
it was probably created for bungee and then saw use in spigot too
Hi, I have updated spigot api version in my plugin to 1.20.6-R0.1-SNAPSHOT and I just can't find a way to hide this "No Effects" tag on custom potions anymore. I used to be able to put an ItemFlag.HIDE_POTION_EFFECT on PotionMeta but this tag no longer exists. This item uses SlimefunItemStack but I tested with normal ItemStack too and it didn't work either. HIDE_ADDITIONAL_TOOLTIP doesn't work either. Does anyone know hot to hide this?
Provide the code
Looking for develeports dms are open.
?code
I think you deserve to be punished for posting this everywhere
whats the command to get the link to post code?
?paste
use pastes.dev tbf
java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player
https://paste.md-5.net/kawitepaka.java
Can someone help me figuring out why is it returning that error?
even I have NMS installed correctly
who cares
Your mom does
dam u got me there
ItemStack item = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) item.getItemMeta();
meta.setColor(Color.GRAY);
meta.setDisplayName("Name");
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
item.setItemMeta(meta);
player.getInventory().addItem(item);
}```
private void spawnTestPotion(Player player) {
ItemStack item = new ItemStack(Material.POTION);
PotionMeta meta = (PotionMeta) item.getItemMeta();
meta.setColor(Color.GRAY);
meta.setDisplayName("Name");
meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
item.setItemMeta(meta);
player.getInventory().addItem(item);
}
this is just test method in command executor.
how i integrate with bstats?
Are you sure that HIDE_ADDITIONAL_TOOLTIP doesn't work?
I am. It just disables the whole plugin on server start
Do you mean that the plugin crashes?
I did remap
sorry. It doesn't disable plugin when using this test method. It only gives me error in console on command execution. When creating items into slimefun menu using this method then i crashes the plugin.
Added this to plugins inside my build.gradle: id 'io.github.patrick.remapper' version '1.4.0'
And my spigot dependency is like this: compileOnly "org.spigotmc:spigot:1.20.1-R0.1-SNAPSHOT:remapped-mojang"
Send the log
why when i first time use command everythink is ok but at the end connection is closed?
its because of static?
i dont use connction.close
package pl.gornikowski.szymon.privplugin.database;
import pl.gornikowski.szymon.privplugin.Main;
import org.bukkit.Bukkit;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import org.postgresql.Driver;
public class PostgresClient {
private static Connection connection = null;
public static void setup() {
try {
DriverManager.registerDriver(new Driver());
connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/privatemc", "postgres", "postgres");
Bukkit.getConsoleSender().sendMessage(Main.prefix + "Polaczono z baza");
createTableIfNotExists();
} catch (SQLException e) {
Bukkit.getConsoleSender().sendMessage(Main.prefix + "Blad polaczenia z baza: " + e.getMessage());
}
}
public static Connection getConnection() {
return connection;
}
public static void closeConnection() {
if (connection != null) {
try {
connection.close();
Bukkit.getLogger().info("Rozlaczono z baza");
} catch (SQLException e) {
Bukkit.getLogger().severe("Blad rozlaczania z baza: " + e.getMessage());
}
}
}
private static void createTableIfNotExists() throws SQLException {
String sql = "CREATE TABLE IF NOT EXISTS player_homes (uuid VARCHAR(36) NOT NULL, name VARCHAR(255) NOT NULL, world VARCHAR(255) NOT NULL, x DOUBLE PRECISION NOT NULL, y DOUBLE PRECISION NOT NULL, z DOUBLE PRECISION NOT NULL, yaw FLOAT NOT NULL, pitch FLOAT NOT NULL, PRIMARY KEY (uuid, name))";
try (Statement statement = connection.createStatement()) {
statement.execute(sql);
Bukkit.getConsoleSender().sendMessage(Main.prefix + "Stworzono tabele");
}
}
}```
Does it extend AutoClosable?
idk, how i can check it?
bump
and for example autocompele:
package pl.gornikowski.szymon.privplugin.commands.home;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import pl.gornikowski.szymon.privplugin.database.PostgresClient;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
public class HomesTabCompleter implements TabCompleter {
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
List<String> suggestions = new ArrayList<>();
if (!(sender instanceof Player)) {
return suggestions;
}
Player player = (Player) sender;
if (args.length == 1) {
try (Connection connection = PostgresClient.getConnection()) {
if (connection == null) {
return suggestions;
}
String sql = "SELECT name FROM player_homes WHERE uuid = ?";
try (PreparedStatement statement = connection.prepareStatement(sql)) {
statement.setString(1, player.getUniqueId().toString());
try (ResultSet resultSet = statement.executeQuery()) {
while (resultSet.next()) {
suggestions.add(resultSet.getString("name"));
}
}
}
} catch (SQLException e) {
e.printStackTrace();
return suggestions;
}
}
return suggestions;
}
}
guys i tried to create a 1.8.8 local server for spigot but i got this error ''' [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] Child module C:\Users\ALPACA\Desktop\1.8.8 spigot bro\Spigot\Spigot-Server of C:\Users\ALPACA\Desktop\1.8.8 spigot bro\Spigot\pom.xml does not exist @ @ [ERROR] The build could not read 1 project -> [Help 1] [ERROR] [ERROR] The project org.spigotmc:spigot-parent:dev-SNAPSHOT (C:\Users\ALPACA\Desktop\1.8.8 spigot bro\Spigot\pom.xml) has 1 error [ERROR] Child module C:\Users\ALPACA\Desktop\1.8.8 spigot bro\Spigot\Spigot-Server of C:\Users\ALPACA\Desktop\1.8.8 spigot bro\Spigot\pom.xml does not exist [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.
after first autocomplete connection is closed
your pom file does not exist 0.o
how i fix
how do i suppose to make it exists
If you are using IntellijIdea you can check the class by clicking with the wheel on the mouse
stop using spaces in paths
the error tells you exactly what is wrong. Read teh bStats site for how to properly relocate it
for what class?
bump
Which api version does your plugin declare?
How do I remove this warning? The plugin is from 1.8-1.20
but I relocate as bstats asks
The error says you don't
uhh blocking the server for a tabcomplete doesnt seem very ideal
in plugin.yml under api-version? it's 1.14
org.bstats not org.bstats.bukkit
This item flag doesn't exist in 1.14
How do I remove this warning? The plugin is from 1.8-1.20
Ah when updating spigot api version I only changed it in pom.xml and reloaded maven. I should have change plugin.yml too right?
can I have a help?
add an api version to the plugin.yml
it is ignored below 1.13
You may try
And if you are on a version below 1.13, don't add it please
It will just be ignored if below 1.13
can i have help too
?
don't use spaces in your paths
But above 1.13 it will not enable legacy compat if you have the api-version attribute iirc
Yes
bump x5
?paste your pom
https://paste.md-5.net/abajasuvav.rb
is gradle btw
You are not remapping
I can;t help you on Gradle to remap as Spigot is designed around maven
?nms
?maven

nope, Spigot provides the special-source plugin for remapping. A Maven plugin
maven sucks
Maven rocks so much that Gradle uses maven repositories 😉
how i delete a plugin
that's for interop...
:copium:
what exactly does that mean
like this? java-jar-BuildTools.jar-rev1.8.8
no definitely not that
don't use the folder name 1.8.8 spigot bro
C:\Your Path Uses Spaces\pom.xml
don't have spaces in there
ok
i corrected the gradle.build and still :(
I can;t help you on Gradle
there is a gradle lib for remapping, but I can't tell you what it is
as its not by Spigot
just me doing this and the plugin is integrated with bstats?
what is the charts?
charts?
yes 1 sec
what if it's not 🤔
Then he's adding stats into someone elses
but is
love the fact that you can just do that
Would need authentication else
🤡
currently, not need right?
no
If someone puts my ID, even better
how to delete a plugin? No idea. Probably have to request it in their discord
i already see thx
but idk what is charts now
Examples for custom charts.
I didn't understand what it's for
Its as it says, custom charts
you can create custom ones above and beyond the default
oh ok
thank you bro
now I will have to wait 30 minutes to see if it is working 😭
1 hour*
i changed the file's name into BT but it still says that pom cant be found
I am remapping indeeed
NOT file name, PATH
?paste pom
C://YourPathFixed/pom.xml
Thanks so much for your time. It works now. Had incorrect version of api. I'll let you know when updating to 1.21 xD
Nice
latest version of that remapper is 1.4.2
would that make the diff?
already testing it
but dont think it would make the diff
how am i able to see it?
in your gradle build log
It wouldn't suprise me if the second one is overriding the first one
and yeah not sure you can have two depends on for build as you do
and how could I have the 2 dependsOn but "not" have both?
I don;t use gradle but I'd assume chain them
Yeah I don't really use Gradle 🤷♂️
would it be hard to change it to maven?
task cleanBuildPublish {
dependsOn 'clean'
dependsOn 'build'
dependsOn 'publish'
tasks.findByName('build').mustRunAfter 'clean'
tasks.findByName('publish').mustRunAfter 'build'
}```
so stackoverflow says
or it seems simpler task cleanBuild(type: GradleBuild) { tasks = ['clean', 'build', 'remap', 'shadowJar'] }
so, something like this? ```
tasks.build {
dependsOn(tasks.remap)
dependsOn(tasks.shadowJar)
tasks.findByName('shadowJar').mustRunAfter tasks.remap
}
tasks.register('cleanBuildPublish') {
dependsOn(tasks.clean)
dependsOn(tasks.build)
}
or am i too dumb
still :/ java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player
This must be so basic
Silly question but your test server is the correct version?
Are you shading any of your own modules containing nms?
wdym by shading? 😅
That's what the shadow task is for
shadowJar
you only use shadowJar if you are including/relocating classes
I wasnt, I had it like this: shadowJar { relocate 'okhttp3', 'org.athenacraft.myplugin.shaded.okhttp3' relocate 'okio', 'org.athenacraft.myplugin.shaded.okio' }
now i ve done this, am I correct? shadowJar { relocate 'okhttp3', 'org.athenacraft.myplugin.shaded.okhttp3' relocate 'okio', 'org.athenacraft.myplugin.shaded.okio' relocate 'remapper', 'io.github.patrick.remapper' }
yeah I make api requests
at the time this was the only one I found
yoru shadow jar shoudl not be including the remapper
now I have over 5k lines using it 😅
remapper just remaps classes. its not to be included in the final jar
im so desesperated to do this :/
i want to spawn en entity when the sun sets, (night starts) . do i need to use the scheduler or i can use something better?
would checking every 100 ticks if time > what i define be detrimental on the performance?
try to see if there is any listener for the time
yea i couldnt find it
listeners are the 1st thing you should look for
there's timeskipevent but that is not what we are looking for here
Use the scheduler
yeah I searched and you need a scheduler
coll! do u know about gradle?
somewhat
.
if it wasnt for gradle and minecraft i would never touch gradle
can you help me solving this?
Can I put the link to my website to download the plugin in my spigot topic?
Why do you want to do that
to promote my website
Then probably no
?changename
Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.
10$
essentialsx does this
The goal is not advertising their site
Is it possible to change the damage that snowball gives?
?spoon
Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.
Like the arrow teleports you when hit something?
Snowball snowball = (Snowball) damager;
Projectile projectile = (Projectile) snowball;
if (projectile.getShooter() instanceof Player) {
event.setDamage(20.0);
}
}```
I've got this code, but when I tested it, the snowball didn't do any damage.
Which event are you listening to?
snowball launcher
Wtf?
how i update the forum post
🤫
._.
um yeah, just practice. Any clues?
What's your problem?
You've been asked what event you are listening to and this is not a very clear answer
i cant edit this?
edit/update resource button on the right panel
not have the source code option
kek
I still need help..
bump
public void onPlayerInteract(PlayerInteractEvent event) {
Player player = event.getPlayer();
ItemStack item = player.getInventory().getItemInMainHand();
if (item != null && item.getType() == Material.BOW && item.hasItemMeta()) {
ItemMeta meta = item.getItemMeta();
if (meta.hasDisplayName() && "Snow Bow Test".equals(meta.getDisplayName())) {
event.setCancelled(true);
Snowball snowball = player.launchProjectile(Snowball.class);
snowball.setVelocity(player.getLocation().getDirection().normalize().multiply(10));
}
}
}```
Oh yeah, here
don't compare by display name
?pdc use this
Why don't you use the projectile launch event
that is just a test plugin😭
still
Oh nice info. Ty, skybidi sikma
💀 😭
Please don't talk to me ever again
This isn't the event where you try to change damage
.
But you didn't say the event class
You say this and this doesn't have any fucking sense
Hehe sorry
So? Which is the event class?
This
im making a system to know if a block is placed by a player or it is naturally generated which one would be more efficient storing all the placed blocks location in a list or an array of booleans for each chunk
btw i will have to constantly check if a block is placed by a player
or there are any other ways?
Hi i wana k that i have a bungeecord where 1 server is cracked and other 4 server have online mode on but i want that paid ppl can acces online server and cracked ppl can acces cracked server using my bungeecord. how i can do this?
cracked is not supported
ALL servers behind bungee should be offline
is there way that i do that?
set online mode to false in server properties
I don't support cracked ppl to join my own paid server
i dont know then
Can i use any alt of bungee to setup?
But there is a issue
is damage durability left or max durability - current durability?
its the amount of damage an item has so max damage - current durability
Hello, has anyone thought about how to set up a datapack from Island Floating into plugins from Iris World Pregen, or if it would be possible to combine it so that there is a normal world on the ground and the plugin is from Iris Dimension Pregen at this link: https://www.spigotmc.org/resources/iris-dimension-engine.84586/, and above there is a Floating Island from the datapack https://modrinth.com/datapack/revamped-floating-islands? Could someone help and explain how they would do it? I imagine a normal world below from the Iris plugin and above, above the sky, a Floating Island from the datapack. If anyone understands what I mean and can offer advice, please send me a private message on Discord. Thanks!
In this event handler you only launch the snowball, not manage the damage
Yes
Does anybody have a code so that whene a staff does /punish it gives them options of what the player did and it ortimaticly punishes them acordingly??
or know were i can buy something like that
probably a #help-server question
how can i place a building from a .schematic file in a plugin
I recommend using the WorldEdit API
It's too simple:
Listen to projectile launch event, get the bow and check if it's your custom one
Add some persistent data on the arrow shot by the custom bow
Listen to projectile hit event and check if the projectile is the arrow with your data
Teleport yourself to the arrow
cool, found a minecraft bug, if you apply the slow potion effect when a player dies it becomes permanent even through restarts
seems like it's new to 1.21
it writes the modified movement speed attribute but forgets an effect was active
yeah i load the file then what
ty
Make a bugreport at the bug tracker
where is that again
Hey everyone! Where can I find names for Location#playSound?
?jd-s
I feel like Location#playSound might be a paper thing
I do not see such a method in spigot
^^
idk maybe it was Player# or it was something from XSeries
Yeah, I'm using XSeries
yeah play a sound either in the world at a location or to a player from a location
Where can I find those names? Are they Enums or idk world.furnace...
^^
like what does the function take
Yeah, I'm doing that from String
a String
playSound can take the enum value
Oh okay, thank you
then its probably just the same as the playsound command is used
who knows how placeholderAPI can load other plugins into itself without having to load a Jar into plugins
The same way Spigot loads plugins
You use a class loader
Usually one based on the URLClassLoader
or you don't catch and let the server owner to scratch their head on why it doesn't load
i didnt even know you could catch multiple times lmao
love a dangling class loader
what do you mean?
so much code to do three simple things
yes, but a problem, how do you sanitize it?
also you need to point to the main class
all you can take away from here is the try catch
and the validations i guess
Does anybody have a code so that whene a staff does /punish it gives them options of what the player did and it ortimaticly punishes them acordingly??
or know were i can buy something like that
yer but do you have good code for it. I have the mod but whenever i try make it turns out horrible.
Stop begging for code
Bro i nead help
Use an existing plugin or commission someone
i dont know how to code goot and im truing to learn
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
^^ start with that
Thanks
What one is best to start with for minecraft coding?
if you don't wanna code you can also use a punish plugin + a menu plugin
they are all different
k
Could i pay you to make me one?
or could you maybe help me
yes but you should not be using one
I am doing something really specific, thus I won't even run it but if I run --rev 1.21 I can't see it anywhere
it doesn;t build by default
can I set it to do it with a parameter or something?
i can help you
?bt yes
?gui before you start comparing by displayname or slot
these + some google searches should get you going
and indeed for a punish system it's not a good idea to use display names
I'm trying to write a Plugin for 1.21, I mainly work on 1.8 and it works just fine. I use IntelliJ and the "Minecraft Development" Plugin to setup the project. The server registers the plugin because it states in log that it has loaded, but isn't Broadcasting the "Loaded!" Message. No clue to be honest.
Here is the code I'm using (just pretty standard, don't recognise anything wrong with it as it compiles properly)
package org.waetrmelon.stellarsmp;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class StellarSMP extends JavaPlugin {
@Override
public void onEnable() {
Bukkit.broadcastMessage("Loaded!");
}
@Override
public void onDisable() {
// Plugin shutdown logic
}
}
[StellarSMP] Loading StellarSMP v1.0-SNAPSHOT
[StellarSMP] Enabling StellarSMP v1.0-SNAPSHOT
Server permissions file permissions.yml is empty, ignoring it
CONSOLE: Reload complete.```
Server Log ^
broadcast message is in game chat afaik
They changed it?
idk
use getLogger().info()
CONSOLE: Reload complete.
probs should grow out of this habit before you start reloading complex plugins
i always reload my plugin ;-;
💀
It's the only plugin on the server
it just works
Just curious how else would I reload my plugin after changes?
restarting the server
right..
no no no i use it in production
(i dont actually have a real server)
mоtherfucker
skill issue
oh my god they did change it, Bukkit.broadcastMessage() doesn't appear in console log.
wow
wtf
I guess console isnt worthy of bread anymore
I'm in game and it's still not sending the chat message to my client?
with Bukkit.broadcastMessage()
So they didn't change it? wtf is going on I'm so confused.
idk just test if the logger works
The logger works
The broadcast msg doesnt.
Let me try just send a message to the player upon an event and see real quick
Right, OnJoin event sends the message.
Okay it works, it seems like Bukkit.broadcastMessage() just isn't doing shit for some reason like at all via the Client or Server, but otherwise it's okay for other methods (I think, hopefully).
i have an onCommand function but it has some warnings at function's parameters "Not annotated parameter overrides @NotNull parameter"
how can i fix it i didnt understand
It wants you to add the @NotNull annotation to that parameter
so it matches the onCommand method that's been overriden
alt + enter and do what it says
but where
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
it says it for all parameters
can't believe you're trying to use that fucking language in my christian minecraft discord server, I hope they get your balls for this
Can someone whip me the basics of arraylists and hashmaps and maps and constructors in dms
?learnjava
For Beginners:
Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/
For Intermediate to Advanced Learners:
Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/
Practice and Hands-on Learning:
Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/
Free Resources and Documentation:
Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/
Community and Support:
Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/
Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! 🎉
selfrole Add or remove a selfrole from yourself.
cleanup Base command for deleting messages.
embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.
findcog Find which cog a command comes from.
names Show previous usernames, global display names, and server...
userinfo Show information about a member.
listcases List cases for the specified member.
reason Specify a reason for a modlog case.
permissions Command permission management tools.
This dude really asked people to teach like half of java in dms
you can't get sugar_cane, cactus, every non full block with getBlockAt??
it don't work with sugar cane and cactus
but
idk if this is becase this isn't a full block
ok i'm dumb
is it just me that doesn't undestand the pom.xml for generating the spigot/craftbukkit jar? I now understand everything, except how then the patches are recombined with the minecraft's source code.
do you not understand the bootstrap?
Aren't patches injected at the same stage as remapping
not really
All it is, is just craftbukkit bundling a few of its classes to launch and setup things.
There are 2 main compile steps.
- Compiling CraftBukkit, which excludes org.craftbukkit.bootstrap
- Compiling the bootstrap at org.craftbukkit.bootstrap
The first step creates a jar and the bootstrap includes the jar inside of it. The bootstrap, ensures all dependencies are present, and does other misc setup before running the server
ok, so this is basically CraftBukkit launch for minecraft server
Isn't it kinda like paperclip but with less features
its not really anything like paperclip. Paperclip, while also being a bootstrap has much different responsabilities.
but I am specifically stuck somewhere else
Nms patching?
No, nms patching and this is pretty clear to understand
So, what is it
are you making a fork or something?
nah I am trying to create an executable vanilla mc server with some modifications just to prove I can do this. Otherwise it's pretty useless since it would take forever to update
And what are you trying to do specifically right now
firstly the steps I understand:
-cloning git repos,
-extracting mc jar, mapping mc jar, decompiling it
-applying nms patches (other patches I don't need but afaik they use the same patch system)
I am now stuck right here:
Compiling Spigot & Spigot-API
where I would like to somehow compile my patches and merge them with original server file. I cannot work it out how spigot does this step and haven't been able to for some time.
"compile my patches and merge them with original server file" what are your patches and what do you mean by original server file
I'm a bit high today, but I think with some extra explanation I can say something useful
Ok, imagine I modified MinecraftServer.java, how would spigot put it into original minecraft vanilla server jar
Likely by compiling it to a .class and then overwriting whatever it is in the jar?
ofc, but javac also requires other classes to not have errors, thus I am doomed, since using javac means every single minecraft server class would need to be without errors. Now here is where the problem comes you see
Just add the original jar (compiled) to the classpath
That sounds like it should work
I should use it as a dependency?
this one sentence has confused me
sorry, I have been using too much maven
Understandable
in general I should put minecraft server jar into classpath together with other libraries so it will compile correctly
yeah
I think it uses a seperator, like javac -cp minecraft-server.jar;joptsimple.jar MinecraftServer.java or something
Haven't used javac in ages
important thing apparently
wait before I do that I think I need to run specialsource to firstly remove mappings from code
Depends
If the jar is unmapped then yes
But you can perform remapping on a class file
well ofc I would like to map the whole jar with specialsource to it's mojang names, but that doesn't cause any errors unlike decompilation?
I can try on vanilla jar and then simply run it
Yeah try it
Dunno why
But Idk anything that's going on rn tbh
Gives me the vibe of a fever dream
interesting
!
now I understand why they used maven
it's just batter for dependencies
they can simply put <dependencies>mc-dependencies
it is indeed, but imagine using it without ide
off topic, but, why do linux people use neovim instead of actual IDE, I know 2 friends that do it constantly
well I'd just rather use dedicated IDEs and for other things idk maybe vsc
Array<out String>
what does that out mean in kotlin?
I am happy to say that the server runs with no problems remapped
does anyone here know if its possible to change the keybind for shift clicking items into inventory? I cant find the keybind, I wanna display a keybind component for controlling stuff with the menu intothe item lore, but idk how to represent shift corectly
Equal to Array<? extends String > in java
my eyes are sensitive to white light, i can't read this D:
didn't found a dark mode switch also didn't searched enough because i couldn't
is there any?
Use Dark Reader 
DarkReader plugin for firefox
ow nice
?paste
not once you install it
hey my config.yml look like this : https://paste.md-5.net/xosabokusu.diff
how i can put every Location in a list?
lol the dark reader firefox page is still loght for me after installing
yes me too
we are getting scammed
got hurt to check it
by a free addon
omg this addon is amazing, it makes javadocs actually readable
I got unscammed
lol
they are already in a list I think
MemorySection[path='placed', root='YamlConfiguration']
this mean the path exist right?
yeah it means that the path placed exists
so why when i use getList i got an error 😢
Probably didn't cast
can you show code?
System.out.println( BlockPlacedByPlayerConfig.get().get("placed"));
System.out.println( BlockPlacedByPlayerConfig.get().getList("placed"));
=
[22:39:26 INFO]: MemorySection[path='placed', root='YamlConfiguration']
[22:39:26 INFO]: null
WHYY
and also BlockPlacedByPlayerConfig is a .yml
Sheesh, static access.
so getConfigurationSection?
then how do you get the locations out of it?
ye me too
Well apparently the api thinks it’s a section
getLogger().info(String.valueOf(BlockPlacedByPlayerConfig.get().getConfigurationSection("placed"))); return MemorySection[path='placed', root='YamlConfiguration']
so we can't get anything of it?
or maybe i need to do another thing to stock a list in a .yml
how did you put it there in the first place
You should be able to retrieve the location though.
@shadow night you saved my day, it worked, I needed to put every library and original server jar on classpath, generate minecraftserver class, replace it in jar, then I needed to replace this jar inside the launcher jar
👍
Ah, it's probably a map instead of a list.
Snakeyaml
Thare is also simple yaml or something like that which is abstraction over snake yaml, and looks identical like spigot API for configuration
Spigots api is SnakeYaml
I assume he asked outside of spigot
At least 3
configurate 
jackson is pogchamp skibidi toilet rizz sigma
Please never speak those words again
cap
I do agree.
you can tell I'm not hip because pogchamp isn't used anymore
Which isn’t very pogchamp
I liked it :(
PLEASE step on a lego brick
https://www.youtube.com/watch?v=M-NRy6btuns
I can figure out how to make this up until making it just a skeleton. By this I mean that I have a full 3d object, but I'd want to have it be this have this skeletal look like in the video
I converted some 3D models into statues made of sticks (and other items too!) Each model consists of 1000-2000 invisible armor stands holding items at various angles. I got inspiration to make this from something new I learned in my math class :)
My other issue is determinating the rotation of the vectors
Why not use display entities?
Or do you think that just a model with vectors already like that?
Ah okay
Heard someone say viaversion handled this but I have no clue if it was true or not
The server itself can be of lower version
Could you use something like model engine? Not sure what your goal is with this
Not sure if you want to make a server, plugin, etc
Making this
Plugin
xD
I'm really curious whether he just used models that already looked like that
Or if he used some sort of algorithm to convert detailed model into the skeletal outline
I'm aiming to do this
Looks to be outlining the edges of each polygon
I imagine it just grabs the 3 vertices for each polygon and then plays a game of connect the dots
yeah, or just the edges, since you;d have to ignore edges you have already done, or it will become twice as heavy
Well you ignore lines you’ve already drawn in connect the dots don’t you :p
I mean I guess so
If I have a resource pack with a custom jukebox song, is there a way to programmatically add that song to a disc like you can with the /give command? I know with the give command you have to use a datapack as well and I would like to get around that if at all possible.
what version?
1.21
hmm
should be possible to use the component but idk if there is api yet
why would you have to use a datapack
thats just how minecraft has you add custom discs from what i saw
oh
thanks
well you need a datapack or resource pack to add to the songs I imagine
or with a resource pack you can replace existing ones
and maybe add new ones if its datadriven
yeah its data driven as of 1.21
hmm
actually I dont know if there is api for it then
like you can probably use a resource pack
like you have to get the source song from somewhere
I dont think you can download it to players from your plugin
You can host the resource pack from the plugin
thats what im doing
i would assume i can set the key of the jukeboxPlayableComponent but i dont really know how it would use that namespaced key
do note that the itemmeta setter is not a way to avoid having to use a datapack
yeah i was thinking that
i gave it a namespaced key with the datapack's namespace and the key as the name of the disc and nothing happened. If I use the plugin as the namespace I dont know where I would put the json file that holds the discs data. it seems like it needs to be in a very particular place in the datapack and i dont think it will work the same for a plugin
the plugin will simply set the key to the namespace of whatever namespace you use in the data pack + id of the jukebox song object (i believe that's gonna be the file name?)
it doesn't really "see it"
Yo, this might be a weird question, but my friend created a plugin for me a while ago, and now some parts of it aren't working (mainly playerdeathevent), and I would like to remove the part of the plugin that uses playerdeathevent and clears the players inventory on respawn. is there anyone here who is willing to spend some of their time to help me edit the plugin? I'm a noobie when it comes to decompiling and recompiling, so I'm really having difficultly basically deleting 10 lines of code.
if someone could help, please tell me
if the json file you put in data/emily/jukebox_song/dumb.json then the key will be emily:dumb
and youre saying that has to be in a datapack or do you think that would work in a plugin data folder
the data pack is the one that tells the server that there is a custom jukebox song that exists
if you wanna go into nms land
i was looking at the registry stuff and i was wondering but idk if i want to do all that
data packs are dead easy, especially with generators like misode's
yeah, right now i have my plugin generating one, i just dont know how (if its possible) to be able to add a song entry while the server is running
data packs are loaded waaaay before plugins are, so not really
😩
ive tried reloading datapacks and resourcepacks but changes only ever take effect when restarting the server
Mojang why
i guess there is minecraft's reload command but i don't know if that loads from scratch or just reloads existing stuff
Iirc it loads from scratch
it seems like it doesnt reload from scratch unfortunately
lol
But more features don’t support it
when i tried using it it didnt pick up on my datapack changes
or maybe it was somewhere else in the line idrk
just thaw it out
I'm going mad. I keep getting this error when trying to apply my gradle plugin
Could not apply requested plugin [id: 'io.github.cabernetmc.vineyard', version: '1.0.0-SNAPSHOT'] as it does not provide a plugin with id 'io.github.cabernetmc.vineyard'. This is caused by an incorrect plugin implementation. Please contact the plugin author(s).
> Plugin with id 'io.github.cabernetmc.vineyard' not found.
Any help is appreciated. So Far I've noticed that everything is in my local .m2 as it should be.
The jar referenced in the xml files generated is also the correct location and has the correct shadowed libraries
I've been going mad over this for almost 3 weeks now
gradlePlugin definition?
gradlePlugin {
plugins {
create("vineyard") {
id = "io.github.cabernetmc.vineyard"
implementationClass = "io.github.cabernetmc.VineyardInternalsPlugin"
displayName = "Vineyard"
description = "Environment setup for CabernetMC"
}
}
}```
I also double checked the implementationClass is added properly in the META-INF
I'm all out of ideas
right? I don't get it. It only breaks if I use shadowJar but if I don't use shadowJar I can't use GSON 😭. My idea of fun is not writing a JSON parser by scratch
the jar itself doesn't seem damaged or corrupted in any way either everything is there that needs to be
well it only recognizes the plugin if I don't use shadowJar for whatever reason
however as you can imagine then I can't use any of my dependencies
you can't?
well no they wouldn't be shadowed if I'm just using a jar?
I don't think gradle automatically downloads things off your classpath for plugins
I only ever wrote includeBuild plugins lol not external ones
I don't think you can bootstrap with gradle plugins unfortunately
otherwise I would
goooler's shadow or old shadow?
goooler's
no clue
hmhm this is such a headache
and I don't get it
I've even tried clearing all my caches etc nope I literally have no clue
copy all the gson classes into your sources :rierun:
Is it only shadow that breaks it
yeah idk how but if I use shadowJar in any capacity gradle just refuses to acknowledge there is a plugin even though all of the meta data is the same
Check to see if there is an updated version?
I clear my m2 each push so that can't be it
You’re on the latest shadow ver too?
Dont you have to specify version
I mean for shadow
yeah latest goooler
yes as expected extremely not useful
can you send us your whole build gradle and the full error
https://paste.md-5.net/epikepiyuw.m here is my build.gradle.kts
now that doesn't look like a plugin script
multi-module as of now I only have a core module and a plugin module
is the second the core?
one second I'm just going to send teh githubg
I've gotta push first though
almost accidently pushed MC source code kekw
this is my current setup, I'm adimant in sticking with multi module atm because I do want to use the core for something outside of the gradle plugin
besides the point that i don't see why you'd use shadow in core if you're gonna use shadow in the plugin, implementation(project(":vineyard-core", "shadow")) is probably what you want
also afaik you only need to apply the shadow plugin, not do any of the classifier and depend shenanigans, albeit i've never made a "binary plugin" so i could be wrong
anime pfp
i would never
I don't use shadow in the core anymore, I did at one point
its only used in the plugin
Hey wait
I'll try just applying the shadow plugin see if that gets me anywhere
yeah that doesn't do any good
Caused by: java.lang.ClassNotFoundException: com.google.gson.GsonBuilder
at org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader.findClass(VisitableURLClassLoader.java:187)
ughh
I always bounce between ClassNotFoundException Gson and this other error
when GsonBuilder is literally inside the jar 👀
yeahidk let me test with the template plugin ig
hmmm okay interesting...
I made my configuration kinda empty and uhm I now have a 90mb jar
Idk how or why but the default jar includes the entirety of gradle
So you used gradle to shade gradle
even worse than I thought
I somehow shaded groovy
idk how though lol like wtf
I might need to scrap this project and start from square 1 with a simpler format
Ah yes shade an entire language with your code
than expand out

