#help-development

1 messages · Page 1047 of 1

icy beacon
#

yeaha

alpine urchin
#

it’s quicker communication

#

i’m saving you time

remote swallow
#

i dont care what your typing i wanna see it whole

#

id rather wait a bit longer to read the whole thing in one

alpine urchin
#

you want to see my hole?

#

oh ok

hard socket
#

should I use NMS to handle the mob movements?

#

like when the entity moves I run other methods at the same time

pseudo hazel
#

wdym at the same time

#

what other methods

#

what does that have to do with nms

smoky anchor
#

Are you talking about pathfinding ?

hard socket
#

no

#

like when the entity moves I want to move armorstans at the same time

#

is there another way that doesnt require NMS?

blazing ocean
#

mixins

hard socket
#

what?

smoky anchor
#

Two questions:
What version are you on
Are those armor stands supposed to be some kind of model ?

hard socket
#

1.16.5

spice burrow
#

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?

quasi gulch
#

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?

hushed spindle
#

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

quasi gulch
#

just cancel the EntityDropItemEvent when you want your custom stuff to drop

hushed spindle
#

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

slender elbow
#

you can alter the drops list in the entity death event

spice burrow
# quasi gulch but why do you need a database when u use pdc?

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

hushed spindle
#

like if i make a furnace recipe that turns raw pork into bread or something, pigs will drop bread when killed with fire aspect

slender elbow
#

that's, like, about it

hushed spindle
#

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

silent slate
#

how do i set an armortrim on a ItemStack?

hushed spindle
#

i would need to hard code everything about this and that doesnt seem like a proper solution

river oracle
quasi gulch
spice burrow
pseudo hazel
#

put it to databae every x minutes for the website

#

but for in game it can be pdc, why not

#

or whatever else

spice burrow
pseudo hazel
#

and maybe save to databae when the player leaves or something

dense oracle
#

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

spice burrow
#

yea thats what im doing right now

pseudo hazel
#

well you didnt say anything about a web api afaik

spice burrow
#

yea i left that out, my fault for that

pseudo hazel
#

which is kind of a huge deal as thats the only part that would justify a databse in the first place, in this case

buoyant sonnet
#

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
chrome beacon
#

you tell us

buoyant sonnet
#

i doesnt doe somthing the furnace recipe

chrome beacon
#

You're never registering it

buoyant sonnet
#

how you mean

#

the rest from the code is good

spice burrow
real lagoon
#

Cancel the digging event

halcyon hemlock
#

:(

#

well hope it gets better mate

pseudo hazel
#

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

spice burrow
#

gotcha ill keep that in mind for next time, appreciate your feedback

buoyant sonnet
#

cant get it to work

tardy delta
#

cant get what to wrok

buoyant sonnet
#

furnace recipe

lilac zenith
torn shuttle
#

I'm going to lose my fucking gourd

#

intellij keeps deleting my commit notes if I close it without committing

tardy delta
#

just write it to .git/COMMIT_EDITMSG

real lagoon
spice burrow
#

are you trying to save block damage progress

lilac zenith
lilac zenith
#

Just as Hypixel Skyblock does

pseudo hazel
#

adventure mode 💀

lilac zenith
#

I need the player to be in survival

pseudo hazel
#

same thing

lilac zenith
pseudo hazel
#

probably interact event?

#

and cancel if its at a block

#

idk if that works

lilac zenith
#

The client still makes block damaging predictions and damage the block client-side

real lagoon
lilac zenith
#

I have set some debug messages and they show

pseudo hazel
#

give mining fatigue? xD

real lagoon
lilac zenith
# pseudo hazel give mining fatigue? xD

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

lilac zenith
#

In 1.20.4 it works fine

dense oracle
#

if it doesnt you r doing something wrong

lilac zenith
dense oracle
#

yeah
what is your goal?

pseudo hazel
#

seems like there is no way then?

lilac zenith
#

Where the block damaging and breaking is handled by packets

spice burrow
#

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

dense oracle
#

i never played skyblock

bright sparrow
#

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?

lilac zenith
pseudo hazel
spice burrow
#

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

buoyant sonnet
#

how doi make custom in and output for furnace recipe

pseudo hazel
#

like the logic for how a world is generated can be replicated

buoyant sonnet
#

i cant find that

lilac zenith
#

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

spice burrow
bright sparrow
buoyant sonnet
#

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

lilac zenith
#

1.20.4 does not have that attribute

#

And that is the server version

spice burrow
#

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...

lilac zenith
#

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

humble lynx
buoyant sonnet
nova locust
#

Hey y'all. Using Spigot, can you change the piston push limit?

lilac dagger
#

maybe with BlockPistonExtendEvent and BlockPistonRetractEvent?

young knoll
#

nop

#

It doesn't fire if the limit is reached

#

You could reduce the limit with it ig

lilac dagger
#

but the limit is quite large

#

12 blocks or so

nova locust
nova locust
lilac dagger
#

but i saw people building insane constructions by doing it

pseudo hazel
#

yeah but you have to be a wizard

remote swallow
north hornet
#

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)

lilac dagger
#

contains

#

config#contains

north hornet
#

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

barren cedar
#

@kassisora

slender elbow
#

?

blazing ocean
dark moth
#

create rawpowder first

upper hazel
#

hey how obaut idea set DI to plugin?

blazing ocean
#

¿

#

?di

undone axleBOT
upper hazel
#

i mean use @Component, @Bean etc

#

like in spring context

blazing ocean
#

why are you using spring in a plugin 🤔

icy beacon
#

he wants it to jump up and down

upper hazel
#

not spring

blazing ocean
#

what?

icy beacon
#

you just said spring lmao

blazing ocean
#

kekw

upper hazel
#

spring CONTEXT

blazing ocean
#

that means that you're using spring kekw

upper hazel
#

I did this but I don't know if it will work)

kindred valley
#

?paste

undone axleBOT
kindred valley
#

?paste

undone axleBOT
slender elbow
#

?paste

undone axleBOT
cedar saffron
#

?paste

undone axleBOT
quartz basalt
#
    public void onPlayerClick(PlayerInteractEntityEvent e) {
        Bukkit.broadcastMessage("ttt");```

how do item display hitboxes work because im right clicking it and nothing is broadcasting
young knoll
#

They don’t have hitboxes

lethal knoll
#

Anyone else facing this in their plugins?
java.lang.IllegalArgumentException: missing required data class org.bukkit.Color

Is this a bug?

young knoll
lethal knoll
#

I saw some people mentioning the same for elite mobs

quartz basalt
#

so how would i detect if someone right clicks an item display

#

any way around it?

young knoll
#

Like I said, add an interaction entity

#

Or ray trace with an expanded ray but ehh

quartz basalt
#

ok thanks

lethal knoll
young knoll
#

The particle you are spawning needs a color as it’s data I guess

lethal knoll
#

Yeah but this wasn't an issue before

young knoll
#

What particle is it

lethal knoll
#

1.21 specific?

tender shard
quartz basalt
#
    public void onPlayerClick(PlayerInteractEntityEvent e) {
        Bukkit.broadcastMessage("ttt");```

when i right click an armorstand nothing is broadcasted
tender shard
#

did you register the listener? does it work for other entities?

#

Are you in the spawn protected chunks and aren't OP?

quartz basalt
#

it works on other mobs and yeah its registerd

#

its just armmorstands

frosty ridge
quartz basalt
#

idk why that worked but it did ty

frosty ridge
quartz basalt
#

👍

warm mica
terse raven
#

how would i modify the biome sizes of a world using spigot?

pseudo hazel
#

with a datapack

terse raven
violet blade
#

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

primal vector
#

don't mind me reading your code using jd_gui, but how does those few lines of code generate a whole void world wth

blazing ocean
lilac dagger
#

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

young knoll
#

An empty generator class is all you need for a void world

blazing ocean
#

exactly

#

i just throw in a void biome provider for it to not get confused with the biomes

young knoll
#

The he standard biome provider seems to work fine

#

But I just have a single biome provider class anyway

blazing ocean
#

¯\_(ツ)_/¯

blazing ocean
#

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>()
}
young knoll
#

Mine takes a biome in the constructor

#

But yeah

blazing ocean
#

yeah ig

hushed spindle
#

the HIDE_ATTRIBUTES item flag seems to no longer hide vanilla attributes, is this intentional?

#

(1.21)

pseudo hazel
#

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

hushed spindle
#

all good

#

i just set a dummy attribute

blazing ocean
#

no big diff

primal vector
#

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

icy beacon
lethal knoll
hazy parrot
icy beacon
#

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

hazy parrot
#

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

icy beacon
#

yeah i thought so too

warm mica
#

Previously it'd generate random colors if you didn't pass in color through offsets

celest gale
#

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```
hazy parrot
#

Are u running services inside of k8s?

#

Or any container

celest gale
#

what do you mean?

sleek estuary
#

on latest versions this works? (bukkit#onlineplayers method)

celest gale
#

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

sage patio
#

can .yml file saving and reading be async?

sleek estuary
sage patio
#

there's a public plugin called MTVehicles, their file saving has a lot of usage and causes tps drop

sleek estuary
#

.yml is not for saving when a player does something. It is for configuration.

sleek estuary
sage patio
#

not related to player

#

yes it does save and read data to a .yml file

sleek estuary
sage patio
#

they don't do that thats why tps drops

#

they just read, change and save it each time to the file

sleek estuary
#

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

sleek estuary
#

How often does the plugin save?

young knoll
#

(Yes you can read and write them async)

sage patio
young knoll
#

You can definitely do Collections.emptyList() without needing to specify the type

scarlet gate
#

Is it possible to get the skin texture value and signature from a spigot PlayerProfile? Or do I need to use nms?

icy beacon
sleek estuary
#

spigot (without bungeecord) have this classes?

lilac dagger
#

yeah

#

it's the chat component library of md

sleek estuary
#

thx

shadow night
lilac dagger
#

it is, isn't it?

shadow night
#

Idk

#

But net.md_5.bungee is sus

lilac dagger
#

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

tidal finch
#

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?

lucid cedar
#

Looking for develeports dms are open.

kindred solar
#

?code

shadow night
kindred solar
#

whats the command to get the link to post code?

tardy delta
#

?paste

undone axleBOT
tardy delta
#

use pastes.dev tbf

kindred solar
#

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

shadow night
#

You need to remap

#

Most likely

shadow night
lucid cedar
tidal finch
# real lagoon Provide the code
        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);
    }```
lucid cedar
#

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);
}
tidal finch
#

this is just test method in command executor.

sleek estuary
#

how i integrate with bstats?

real lagoon
tidal finch
#

I am. It just disables the whole plugin on server start

real lagoon
kindred solar
tidal finch
kindred solar
#

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"

celest gale
#

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

tidal finch
celest gale
#
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");
        }
    }
}```
real lagoon
celest gale
#

idk, how i can check it?

celest gale
#

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;
    }
}
clear panther
#

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.

celest gale
#

after first autocomplete connection is closed

kindred solar
sleek estuary
#

how i fix

clear panther
#

how do i suppose to make it exists

real lagoon
eternal oxide
celest gale
#

for what class?

real lagoon
sleek estuary
#

How do I remove this warning? The plugin is from 1.8-1.20

sleek estuary
eternal oxide
#

The error says you don't

sleek estuary
tardy delta
tidal finch
eternal oxide
real lagoon
sleek estuary
#

How do I remove this warning? The plugin is from 1.8-1.20

tidal finch
eternal oxide
#

it is ignored below 1.13

shadow night
eternal oxide
#

It will just be ignored if below 1.13

eternal oxide
#

don't use spaces in your paths

shadow night
eternal oxide
#

Yes

undone axleBOT
kindred solar
eternal oxide
#

You are not remapping

#

I can;t help you on Gradle to remap as Spigot is designed around maven

#

?nms

eternal oxide
#

?maven

undone axleBOT
eternal oxide
#

nope, Spigot provides the special-source plugin for remapping. A Maven plugin

blazing ocean
#

maven sucks

eternal oxide
#

Maven rocks so much that Gradle uses maven repositories 😉

sleek estuary
#

how i delete a plugin

blazing ocean
#

that's for interop...

eternal oxide
clear panther
blazing ocean
#

no definitely not that

blazing ocean
eternal oxide
#

C:\Your Path Uses Spaces\pom.xml

blazing ocean
#

don't have spaces in there

clear panther
#

ok

kindred solar
eternal oxide
#

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

sleek estuary
#

just me doing this and the plugin is integrated with bstats?

eternal oxide
#

yes

#

IF thats yoru plugin ID on bStats

sleek estuary
eternal oxide
#

charts?

sleek estuary
#

yes 1 sec

blazing ocean
sleek estuary
#

this

eternal oxide
#

Then he's adding stats into someone elses

sleek estuary
blazing ocean
eternal oxide
#

Would need authentication else

sleek estuary
sleek estuary
eternal oxide
#

no

sleek estuary
#

If someone puts my ID, even better

eternal oxide
#

how to delete a plugin? No idea. Probably have to request it in their discord

sleek estuary
#

but idk what is charts now

#

I didn't understand what it's for

eternal oxide
#

Its as it says, custom charts

#

you can create custom ones above and beyond the default

sleek estuary
#

oh ok

#

thank you bro

#

now I will have to wait 30 minutes to see if it is working 😭

#

1 hour*

clear panther
kindred solar
#

I am remapping indeeed

eternal oxide
undone axleBOT
kindred solar
#

only gradle

eternal oxide
#

yeah yeah

#

paste it

kindred solar
tidal finch
# real lagoon You may try

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

real lagoon
#

Nice

eternal oxide
kindred solar
#

already testing it

#

but dont think it would make the diff

eternal oxide
#

possibly but no clue as you are usign Gradle

#

does yoru remap task even run?

chrome beacon
#

You have two build depends on sections

#

Is that allowed

kindred solar
eternal oxide
#

in your gradle build log

chrome beacon
eternal oxide
#

and yeah not sure you can have two depends on for build as you do

kindred solar
#

and how could I have the 2 dependsOn but "not" have both?

eternal oxide
#

I don;t use gradle but I'd assume chain them

chrome beacon
#

Yeah I don't really use Gradle 🤷‍♂️

kindred solar
#

would it be hard to change it to maven?

eternal oxide
#
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'] }

kindred solar
#

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

eternal oxide
#

No clue

#

try whatever and see 🙂

kindred solar
#

still :/ java.lang.NoClassDefFoundError: net/minecraft/world/entity/player/Player

#

This must be so basic

eternal oxide
#

Silly question but your test server is the correct version?

kindred solar
#

yeah... 1.20.1

#

is there anyone here that knows about gradle?

chrome beacon
#

Are you shading any of your own modules containing nms?

kindred solar
#

wdym by shading? 😅

chrome beacon
#

That's what the shadow task is for

eternal oxide
#

shadowJar

eternal oxide
#

you only use shadowJar if you are including/relocating classes

kindred solar
# chrome beacon That's what the shadow task is for

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' }

eternal oxide
#

no

#

you shoudl not be including any of those

#

okhttp3?

kindred solar
eternal oxide
#

ah ok

#

why not just use teh one already provided?

#

no shading required

kindred solar
eternal oxide
#

yoru shadow jar shoudl not be including the remapper

kindred solar
#

now I have over 5k lines using it 😅

eternal oxide
#

remapper just remaps classes. its not to be included in the final jar

kindred solar
#

im so desesperated to do this :/

velvet plaza
#

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?

kindred solar
velvet plaza
#

yea i couldnt find it

kindred solar
#

listeners are the 1st thing you should look for

velvet plaza
#

there's timeskipevent but that is not what we are looking for here

young knoll
#

Use the scheduler

kindred solar
kindred solar
young knoll
#

somewhat

velvet plaza
#

if it wasnt for gradle and minecraft i would never touch gradle

kindred solar
#

can you help me solving this?

sleek estuary
#

Can I put the link to my website to download the plugin in my spigot topic?

chrome beacon
#

Why do you want to do that

sleek estuary
chrome beacon
#

Then probably no

sleek estuary
#

ok thx

#

and how change my nickname?

chrome beacon
#

?changename

undone axleBOT
#

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/.

chrome beacon
#

10$

sleek estuary
chrome beacon
#

The goal is not advertising their site

jaunty harness
#

Is it possible to change the damage that snowball gives?

lucid cedar
#

Does anybody have a good score board code?

#

or a teleport bow code?

icy beacon
#

?spoon

undone axleBOT
#

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.

real lagoon
jaunty harness
real lagoon
jaunty harness
real lagoon
#

Wtf?

sleek estuary
#

how i update the forum post

jaunty harness
real lagoon
jaunty harness
real lagoon
#

What's your problem?

shadow night
sleek estuary
#

i cant edit this?

slender elbow
#

edit/update resource button on the right panel

sleek estuary
shadow night
#

Not post resource update

#

Nvm

#

I'm high I think

blazing ocean
#

kek

kindred solar
#

I still need help..

jaunty harness
# shadow night You've been asked what event you are listening to and this is not a very clear a...
    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
blazing ocean
#

don't compare by display name

sleek estuary
blazing ocean
#

?pdc use this

shadow night
jaunty harness
blazing ocean
#

still

jaunty harness
blazing ocean
shadow night
real lagoon
real lagoon
real lagoon
jaunty harness
real lagoon
#

So? Which is the event class?

near mason
#

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?

hearty latch
#

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?

pseudo hazel
#

cracked is not supported

eternal oxide
#

ALL servers behind bungee should be offline

hearty latch
near mason
#

set online mode to false in server properties

hearty latch
near mason
#

i dont know then

hearty latch
pseudo hazel
#

then just dont support cracked at all

#

I dont see the issue xD

hearty latch
onyx fjord
#

is damage durability left or max durability - current durability?

pseudo hazel
#

its the amount of damage an item has so max damage - current durability

ashen ferry
#

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!

real lagoon
lucid cedar
#

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

hybrid spoke
clever lantern
#

how can i place a building from a .schematic file in a plugin

chrome beacon
#

I recommend using the WorldEdit API

clever lantern
#

but i dont see any examples on how to do this in their docs

#

idk maybe im blind

real lagoon
# lucid cedar Yes

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

torn shuttle
#

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

tame wolf
#

Cool

#

New imprisonment method just dropped

torn shuttle
#

it writes the modified movement speed attribute but forgets an effect was active

clever lantern
chrome beacon
#

You paste it

#

See the other part of the documentation on how to do that

clever lantern
#

ty

tame wolf
torn shuttle
#

where is that again

green prism
#

Hey everyone! Where can I find names for Location#playSound?

river oracle
#

?jd-s

undone axleBOT
river oracle
#

I feel like Location#playSound might be a paper thing

#

I do not see such a method in spigot

chrome beacon
#

^^

green prism
#

idk maybe it was Player# or it was something from XSeries

chrome beacon
#

Spigot only has World#playSound

#

and Player#playSound

green prism
pseudo hazel
#

yeah play a sound either in the world at a location or to a player from a location

green prism
#

Where can I find those names? Are they Enums or idk world.furnace...

pseudo hazel
#

anyways wdym by names

#

should be Sound.whatever i assume

chrome beacon
#

^^

pseudo hazel
#

like what does the function take

green prism
#

Yeah, I'm doing that from String

green prism
chrome beacon
#

playSound can take the enum value

green prism
pseudo hazel
#

then its probably just the same as the playsound command is used

upper hazel
#

who knows how placeholderAPI can load other plugins into itself without having to load a Jar into plugins

chrome beacon
#

The same way Spigot loads plugins

#

You use a class loader

#

Usually one based on the URLClassLoader

lilac dagger
#

@upper hazel

#

this is how i do it

blazing ocean
#

try catch catch catch catch

lilac dagger
#

or you don't catch and let the server owner to scratch their head on why it doesn't load

pseudo hazel
#

i didnt even know you could catch multiple times lmao

slender elbow
#

love a dangling class loader

lilac dagger
#

what do you mean?

tardy delta
#

so much code to do three simple things

lilac dagger
#

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

lucid cedar
#

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

lilac dagger
#

like a punish with a menu?

#

all you need is a gui

lucid cedar
chrome beacon
#

Stop begging for code

lucid cedar
#

Bro i nead help

chrome beacon
#

Use an existing plugin or commission someone

lucid cedar
#

i dont know how to code goot and im truing to learn

chrome beacon
#

?learnjava

undone axleBOT
#

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! 🎉

chrome beacon
#

^^ start with that

lucid cedar
#

Thanks

lucid cedar
lilac dagger
#

if you don't wanna code you can also use a punish plugin + a menu plugin

pseudo hazel
#

they are all different

lucid cedar
#

k

lucid cedar
#

or could you maybe help me

mellow edge
#

can I get a CraftBukkit server jar

#

from buildtools

eternal oxide
#

yes but you should not be using one

mellow edge
#

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

eternal oxide
#

it doesn;t build by default

mellow edge
#

can I set it to do it with a parameter or something?

lilac dagger
eternal oxide
#

?bt yes

undone axleBOT
mellow edge
#

oh

#

--compile craftbukkit

#

thank you @eternal oxide

blazing ocean
#

?gui before you start comparing by displayname or slot

lilac dagger
#

these + some google searches should get you going

#

and indeed for a punish system it's not a good idea to use display names

tall arch
#

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 ^
tardy delta
#

broadcast message is in game chat afaik

tall arch
#

They changed it?

tardy delta
#

idk
use getLogger().info()

icy beacon
#

CONSOLE: Reload complete.
probs should grow out of this habit before you start reloading complex plugins

tardy delta
#

i always reload my plugin ;-;

icy beacon
#

💀

tall arch
tardy delta
#

it just works

icy beacon
#

it's fine for dev

#

most of the time

tall arch
#

Just curious how else would I reload my plugin after changes?

icy beacon
#

restarting the server

tall arch
#

right..

tardy delta
#

(i dont actually have a real server)

icy beacon
tardy delta
#

cant say that word either

#

rad can

icy beacon
#

mоtherfucker

tardy delta
#

see i got no rights

icy beacon
#

skill issue

tall arch
#

oh my god they did change it, Bukkit.broadcastMessage() doesn't appear in console log.

pseudo hazel
#

wow

tall arch
#

wtf

pseudo hazel
#

I guess console isnt worthy of bread anymore

tall arch
#

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.

tardy delta
#

idk just test if the logger works

tall arch
#

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).

spice bough
#

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

chrome beacon
#

It wants you to add the @NotNull annotation to that parameter

#

so it matches the onCommand method that's been overriden

tardy delta
#

alt + enter and do what it says

spice bough
#

it says it for all parameters

chrome beacon
#

yeah

#

all of them

#

in this case

torn shuttle
# tardy delta

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

wind elk
#

Can someone whip me the basics of arraylists and hashmaps and maps and constructors in dms

hazy parrot
#

All of that is information publicly available on internet

torn shuttle
#

?learnjava

undone axleBOT
#

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! 🎉

wind elk
#

Sigma

#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
__**Admin:**__

selfrole Add or remove a selfrole from yourself.

__**Cleanup:**__

cleanup Base command for deleting messages.

__**Core:**__

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.

__**Downloader:**__

findcog Find which cog a command comes from.

__**Mod:**__

names Show previous usernames, global display names, and server...
userinfo Show information about a member.

__**ModLog:**__

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

__**Permissions:**__

permissions Command permission management tools.

nova notch
#

This dude really asked people to teach like half of java in dms

tidal kettle
#

you can't get sugar_cane, cactus, every non full block with getBlockAt??

shadow night
#

what?

#

getBlockAt returns the block at that location, no matter what it is

tidal kettle
#

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

mellow edge
#

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.

river oracle
shadow night
#

Aren't patches injected at the same stage as remapping

mellow edge
river oracle
# mellow edge 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.

  1. Compiling CraftBukkit, which excludes org.craftbukkit.bootstrap
  2. 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

mellow edge
#

ok, so this is basically CraftBukkit launch for minecraft server

shadow night
river oracle
#

its not really anything like paperclip. Paperclip, while also being a bootstrap has much different responsabilities.

mellow edge
#

but I am specifically stuck somewhere else

shadow night
#

Nms patching?

mellow edge
#

No, nms patching and this is pretty clear to understand

shadow night
#

So, what is it

river oracle
#

are you making a fork or something?

mellow edge
#

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

shadow night
#

And what are you trying to do specifically right now

mellow edge
#

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.

shadow night
#

"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

mellow edge
#

Ok, imagine I modified MinecraftServer.java, how would spigot put it into original minecraft vanilla server jar

shadow night
mellow edge
#

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

shadow night
#

That sounds like it should work

mellow edge
shadow night
mellow edge
#

sorry, I have been using too much maven

shadow night
#

Understandable

mellow edge
#

in general I should put minecraft server jar into classpath together with other libraries so it will compile correctly

shadow night
#

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

mellow edge
#

wait before I do that I think I need to run specialsource to firstly remove mappings from code

shadow night
#

Depends

#

If the jar is unmapped then yes

#

But you can perform remapping on a class file

mellow edge
#

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?

shadow night
#

It shouldn't cause issues, in theory

#

But I've seen a lot so just try it and see

mellow edge
#

I can try on vanilla jar and then simply run it

shadow night
#

Yeah try it

#

Dunno why

#

But Idk anything that's going on rn tbh

#

Gives me the vibe of a fever dream

mellow edge
#

interesting

mellow edge
#

now I understand why they used maven

#

it's just batter for dependencies

#

they can simply put <dependencies>mc-dependencies

shadow night
#

Yeah, finally, it's a build system

#

That's its purpose

mellow edge
#

it is indeed, but imagine using it without ide

shadow night
#

Not very bad

#

I used to code in neovim

mellow edge
#

off topic, but, why do linux people use neovim instead of actual IDE, I know 2 friends that do it constantly

shadow night
#

Because it's quick

#

And well, most langs don't really require a full IDE

mellow edge
#

well I'd just rather use dedicated IDEs and for other things idk maybe vsc

sage patio
#

Array<out String>

what does that out mean in kotlin?

mellow edge
pseudo hazel
#

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

hazy parrot
sage patio
#

didn't found a dark mode switch also didn't searched enough because i couldn't

#

is there any?

chrome beacon
#

Use Dark Reader uwu

eternal oxide
#

DarkReader plugin for firefox

sage patio
#

ow nice

tidal kettle
#

?paste

undone axleBOT
sage patio
#

even firefox addon page is in white

eternal oxide
#

not once you install it

sage patio
#

nice

tidal kettle
pseudo hazel
#

lol the dark reader firefox page is still loght for me after installing

sage patio
#

yes me too

pseudo hazel
#

we are getting scammed

sage patio
#

got hurt to check it

pseudo hazel
#

by a free addon

#

omg this addon is amazing, it makes javadocs actually readable

#

I got unscammed

sage patio
#

lol

pseudo hazel
tidal kettle
#

MemorySection[path='placed', root='YamlConfiguration']
this mean the path exist right?

pseudo hazel
#

yeah it means that the path placed exists

tidal kettle
#

so why when i use getList i got an error 😢

kind hatch
#

Probably didn't cast

pseudo hazel
#

can you show code?

tidal kettle
# kind hatch Probably didn't cast

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

kind hatch
#

Sheesh, static access.

young knoll
#

It’s not a list

#

It’s a section

tidal kettle
#

so getConfigurationSection?

pseudo hazel
kind hatch
#

I thought it was a list cause of the - in front of it?

#

The spacing also contains it

young knoll
#

Well apparently the api thinks it’s a section

tidal kettle
#

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

pseudo hazel
#

how did you put it there in the first place

kind hatch
#

You should be able to retrieve the location though.

mellow edge
#

@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

kind hatch
hazy parrot
#

Snakeyaml

#

Thare is also simple yaml or something like that which is abstraction over snake yaml, and looks identical like spigot API for configuration

young knoll
#

Spigots api is SnakeYaml

hazy parrot
#

I assume he asked outside of spigot

young knoll
#

At least 3

chrome beacon
#

configurate uwu

slender elbow
#

jackson is pogchamp skibidi toilet rizz sigma

kind hatch
#

Please never speak those words again

slender elbow
#

cap

mellow edge
slender elbow
#

you can tell I'm not hip because pogchamp isn't used anymore

young knoll
#

Which isn’t very pogchamp

slender elbow
#

I liked it :(

blazing ocean
grim hound
#

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 :)

▶ Play video
#

My other issue is determinating the rotation of the vectors

raw sky
#

Why not use display entities?

grim hound
grim hound
#

Need multiversion support

raw sky
#

Ah okay

#

Heard someone say viaversion handled this but I have no clue if it was true or not

grim hound
#

The server itself can be of lower version

raw sky
#

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

raw sky
#

alr then

#

goodluck, I have no clue how to help honestly

grim hound
#

xD

grim hound
#

Or if he used some sort of algorithm to convert detailed model into the skeletal outline

young knoll
#

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

pseudo hazel
#

yeah, or just the edges, since you;d have to ignore edges you have already done, or it will become twice as heavy

young knoll
#

Well you ignore lines you’ve already drawn in connect the dots don’t you :p

pseudo hazel
#

I mean I guess so

loud sierra
#

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.

pseudo hazel
#

what version?

loud sierra
#

1.21

pseudo hazel
#

hmm

young knoll
#

Idk if we have api for that new component

#

Lemme check

pseudo hazel
#

should be possible to use the component but idk if there is api yet

#

why would you have to use a datapack

loud sierra
pseudo hazel
#

oh

pseudo hazel
#

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

loud sierra
#

yeah its data driven as of 1.21

pseudo hazel
#

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

young knoll
#

You can host the resource pack from the plugin

loud sierra
#

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

slender elbow
#

do note that the itemmeta setter is not a way to avoid having to use a datapack

loud sierra
#

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

slender elbow
#

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"

turbid linden
#

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

slender elbow
#

if the json file you put in data/emily/jukebox_song/dumb.json then the key will be emily:dumb

loud sierra
#

and youre saying that has to be in a datapack or do you think that would work in a plugin data folder

slender elbow
#

the data pack is the one that tells the server that there is a custom jukebox song that exists

young knoll
#

I meannnnn

#

Technically registry hacking is an option

slender elbow
#

if you wanna go into nms land

loud sierra
#

i was looking at the registry stuff and i was wondering but idk if i want to do all that

slender elbow
#

data packs are dead easy, especially with generators like misode's

loud sierra
#

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

slender elbow
#

data packs are loaded waaaay before plugins are, so not really

young knoll
#

😩

loud sierra
#

ive tried reloading datapacks and resourcepacks but changes only ever take effect when restarting the server

young knoll
#

Mojang why

slender elbow
#

i guess there is minecraft's reload command but i don't know if that loads from scratch or just reloads existing stuff

young knoll
#

Iirc it loads from scratch

loud sierra
#

it seems like it doesnt reload from scratch unfortunately

slender elbow
#

lol

young knoll
#

But more features don’t support it

loud sierra
#

when i tried using it it didnt pick up on my datapack changes

#

or maybe it was somewhere else in the line idrk

young knoll
#

Huh, that may have changed then

#

I blame registry freezing

pseudo hazel
#

just thaw it out

river oracle
#

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

slender elbow
#

gradlePlugin definition?

river oracle
#
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

slender elbow
#

I'm all out of ideas

river oracle
#

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

slender elbow
#

why can't you use shadowjar lol?

#

and why can't you use gson 🤔

river oracle
#

however as you can imagine then I can't use any of my dependencies

slender elbow
#

you can't?

river oracle
#

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

slender elbow
#

I only ever wrote includeBuild plugins lol not external ones

young knoll
#

Make a wacky bootstrap jar

#

Kek

river oracle
#

I don't think you can bootstrap with gradle plugins unfortunately

#

otherwise I would

slender elbow
#

goooler's shadow or old shadow?

river oracle
#

goooler's

slender elbow
#

no clue

river oracle
#

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

slender elbow
#

copy all the gson classes into your sources :rierun:

young knoll
#

Is it only shadow that breaks it

river oracle
wet breach
river oracle
young knoll
#

You’re on the latest shadow ver too?

wet breach
#

I mean for shadow

river oracle
hybrid spoke
#

maven better anyways

#

have you tried to ask gpt

river oracle
#

yes as expected extremely not useful

hybrid spoke
#

can you send us your whole build gradle and the full error

river oracle
#

that is the full error, pointless stacktrace of gradle internals aside

#

?paste

undone axleBOT
river oracle
slender elbow
#

now that doesn't look like a plugin script

river oracle
#

its just the publishing portion

#

I'm using buildSrc

slender elbow
#

this sounds cursed beyond reasoning

#

what kind of setup do you have

river oracle
#

multi-module as of now I only have a core module and a plugin module

river oracle
#

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

slender elbow
#

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

slender elbow
#

i would never

river oracle
#

its only used in the plugin

young knoll
river oracle
#

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 👀

slender elbow
#

yeahidk let me test with the template plugin ig

river oracle
#

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

young knoll
#

So you used gradle to shade gradle

river oracle
#

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

young knoll
#

Ah yes shade an entire language with your code

river oracle
#

than expand out

young knoll
#

Then it can run without a language on the users computer

#

Personally I like to shade an entire OS into my code

river oracle
#

I think I'm just going to scrap this project and rewrite the build files from suqare one here

#

getting a working MVP than add shit