#help-development

1 messages · Page 1315 of 1

outer ember
#

type

thorn isle
#

send your entire class, along with the imports at the top

smoky anchor
#

?paste

undone axleBOT
thorn isle
#

also this doesn't seem to be world-associated information since you only ever access the "main world"

#

this is lossy and generally speaking bad practice

outer ember
#

just copying thos time

thorn isle
#

save to a .json/yaml in your plugin directory instead

smoky anchor
outer ember
thorn isle
#

yeah, that's bad

#

what if the admin wants to change their main world? they have no way of moving your pdc data over to the new main world and all of the data will be lost

#

the main world is no place to store your plugin data

#

that's what databases and your plugin directory are for

outer ember
#

its not economy or ban time or something

thorn isle
#

storing it in a .yml via the bukkit config api will also be easier

umbral ridge
#

yeah

outer ember
smoky anchor
#

Do you know why they don't ?

outer ember
#

package com.NovaDevs.novaPolice.Wanted;

import com.NovaDevs.novaPolice.NovaPolice;
import com.google.gson.Gson;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.World;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;

import java.util.HashMap;
import java.util.UUID;

public class WantedManager {
HashMap<UUID, Integer> wanted = new HashMap<>();
NamespacedKey key = new NamespacedKey(NovaPolice.getInstance(), "wanteds_info");
World world = Bukkit.getWorlds().get(0);
PersistentDataContainer data = world.getPersistentDataContainer();
String json = new Gson().toJson(wanted);

}

thorn isle
#

they don't use pdc either

outer ember
smoky anchor
#

Well then don't try to blindly follow their steps

thorn isle
#

and most certainly they don't use the world pdc

#

you should blindly follow their steps and not use the world pdc for this

smoky anchor
#

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

outer ember
outer ember
#

why?

#

nvm
i'm gonna just make a data.yml

slender elbow
slender elbow
outer ember
#

Ok

smoky anchor
# outer ember why?

I'm not gonna explain basic concepts of java
But the TLDR would be "the code should be in a method, not just a class"

outer ember
#

Tysm guys
i made a data.yml file and my code is alot easier and cleaner!

quaint mantle
#

What the helly?

sinful kiln
#

hey, so I was wondering what the "official" (intended of the api) way of handling custom virtual inventory UIs would be with the bukkit api at the moment

sinful kiln
#

I've personally always used the InventoryHolder which I know is not intended by any means but I was still wondering what is the "go-to" official way of doing it is right now

pseudo hazel
#

the intended way is to use createInventory and then set it on a player

#

anything else is dependend on your goal

#

there is an article for inspirations on larger systems

#

?gui

sinful kiln
#

So its basically remember the inventory in some map and go from there is what I get

pseudo hazel
#

in my own plugin I have a stack system where a player can have multiple menus open in a stack

#

eah

#

in my case its a map of uuid and list<MyInventoryWrapper>

#

and I show the top inventory in that list to the player

#

but just having a simple map of uuid and inventory is good enough

#

and then probably a central inventory listener that can pass the events to the inventory in question

sinful kiln
#

I've recently seen the "new" InventoryView api for creating virtual views and was wondering if that may have introduced something else other than pushing stuff into a map and call it a day kind of thing

pseudo hazel
#

if it aint broke

thorn isle
#

supposedly at least on spigot the InventoryHolder approach is bad because getting the holder from an inventory will clone the backing tile entity if it's a block inventory, and that is very expensive

#

on paper you can pass false to the method to not clone it, but i don't think that exists on spigot

#

at least for inventories created with Bukkit.createInventory, the inventory identity is stable and reliable, so just a Map<Inventory, Handler> where Handler represents your business state for the gui, is sufficient

#

i see many people use UUID -> Handler/Inventory maps but that relies on accurate tracking of inventory opening/closing or else you'll be firing logic for the wrong gui on inventory click, which is why i've avoided this approach

#

all that said, imo, the performance ramifications on spigot aside, the InventoryHolder approach is the most principally correct

#

since it most closely resembles the relationship between a gui/menu and its state as already exists with vanilla block menus and containers themselves; the "holder" acts as the controller for the inventory state

zealous scroll
#

Does anyone know how to make this hover effect? I know the yellow text is part of a font, but I don't know how it's rendered ONLY on hover. I'm not even sure if it's being rendered on hover or it's always being rendered but some rendering shenanigans cause it to show on hover.

thorn isle
#

core shaders perhaps, don't really know

smoky anchor
#

WAIT

zealous scroll
#

Nuvguard

pseudo hazel
#

looks like it

smoky anchor
echo basalt
#

Is minecraft:selected what I think it is

#

no

smoky anchor
#

Ye I sadly don't think there's an easy way to add "hover model"
I was misremembering probably

thorn isle
#

yeah can't find one in this list

#

it's most likely core shaders in that case

#

the "picked up" condition is quite interesting though

tawny osprey
#

When cancel() is called in a BukkitRunnable, does it finish the iteration its currently in

#
        new BukkitRunnable() {
            int secondsRemaining = 5;
            @Override
            public void run() {
                p.sendMessage("Time Remaining: " + secondsRemaining + " seconds");
                secondsRemaining--;
                if (secondsRemaining == 0) {
                    cancel();
                }
            }
        }.runTaskTimer(this.main, 0, 20);
    } ```
smoky anchor
#

I doubt it, just do return under it

tawny osprey
worldly ingot
#

It will proceed through the rest of the method

#

So yeah, return if you don't want to execute anything after your cancel()

thorn isle
#

cancel is not a flow control statement like return, it has zero control over whether the current iteration finishes or not

#

it just makes it so that run won't be called again

tawny osprey
#

Ahh I see

#

Thanks

chrome beacon
#

Do you have any experience with Java?

thorn isle
#

omegalul

violet blade
#

someone pay this man a full kangarko plugin dev course

mortal vortex
#

fax

surreal blaze
#

yo, i have this plugin for custom item drop from mobs

and is there a list of mob codename? cuz i tried ELDER_GUARDIAN it works, but when i try WARDEN and RAVAGER, it doesnt works or do they have a specific name?

buoyant viper
#

?jd-s

undone axleBOT
buoyant viper
#

should just be WARDEN and RAVAGER yeah

daring light
#

EntityDeathEvent.getDrops() is a mutable list, correct?

#

As in, if I change it, it will change the end result of the entity drops

chrome beacon
#

You can remove items

#

but not add any

#

(iirc)

pseudo hazel
#

that sounds weird

worldly ingot
#

In death event you can add items, yes

#

You're thinking of BlockDropItemEvent where you cannot add items

#

Although to be fair, you probably should be able to. There's no reason you shouldn't

chrome beacon
#

ah I see I was thinking of the wrong event

daring light
#

Alright thanks

hybrid mist
#

how can i make a plugin that makes potions last longer so and i can configure it

chrome beacon
#

You can either modify the effect on the itemstack itself via the PotionMeta or listen to the EntityPotionEffectEvent and change things there

hybrid mist
#

thank you

#

also can people brew it?

violet blade
#

mojang please give us data driven potions already

hardy spoke
#

Hey. So I am having this bug where I want to cancel item dropping. But if you drop the item from the inventory via the hotkey it duplicates for some reason. And I can't seem to find a fix. It works fine in all other scenarios however.

violet blade
hardy spoke
#

No actually. Didn't test that. I suppose it's fine in that case. But it's still strange. And the behaviour is weird too because it always puts the dropped item into the currently selected slot.

onyx fjord
#

Creative is a pain with inventory handling

violet blade
#

the creative inventory behaves differently from survivals

hardy spoke
#

I see

onyx fjord
#

As far as I remember on creative the client generates items on its end

#

So you get the dupes

#

And messed up items

hardy spoke
#

huh. strange

onyx fjord
#

Especially noticable with dynamic lore

violet blade
#

yeah i think it clones the item stack everytime you pick, drag or anything

onyx fjord
#

I've made an enchant plugin once

#

That added the lore to look like vanilla

#

But using packets

#

However creative client could dupe the item and upon interaction the lore ended up not client side...

#

Because the client recreated it

#

Hope you understand

hardy spoke
#

That's weird. I guess as long as you can't dupe in survival I can tolerate it.

rotund ravine
hardy spoke
#

Who am I to question the client?

ancient plank
#

good ole clientside creative experience

#

I usually just prevent interactions with my plugins if someone is in creative mode if there's fear of exploits, since the server I write code for has a limited creative option for groups

tight compass
#

Do async tasks ran via BukkitScheduler or BukkitRunnable spin up new threads or do they reuse threads in a pool? This is all to ask if I should bother doing my own scheduling?

tight compass
#

Okay, thanks

sly topaz
#

(I was looking at the paper source)

#

it is a cached thread pool

tight compass
#

Ah, alright

wooden relic
#

Hey @smoky anchor sorry for the ping 🫣 I've been messing around with trying to get the texture working for the last two hours but it's just not getting anywhere :/ I'm stuck with the gorgeous undefined texture hahaha. I've changed up my folder structure a bit to get it to this point, but still, it's not working. I've tried to run it through ChatGPT and it's pushing to use CustomModelData instead of just ItemModel via the setItemModel() of ItemMeta. I'm spinning in circles here 😭 Any advice?

/**
     * @return The Diamond Arrow.
     */
    public ItemStack getItem() {
        ItemStack item = new ItemStack(Material.ARROW, 1);
        ItemMeta meta = item.getItemMeta();
        if (Objects.nonNull(meta)) {
            NamespacedKey key = new NamespacedKey(AranarthCore.getInstance(), "arrow_diamond");
            meta.setItemModel(key);
            ArrayList<String> lore = new ArrayList<>();

            meta.getPersistentDataContainer().set(ARROW, PersistentDataType.STRING, "diamond");
            meta.setDisplayName(ChatUtils.translateToColor(getName()));
            meta.setLore(lore);
            item.setItemMeta(meta);
        }
        return item;
    }
smoky anchor
#

lemme take a look

#

I mean, works for me XD

#

My guess would be that the namespaced key is wrong
NamespacedKey key = new NamespacedKey(AranarthCore.getInstance(), "arrow_diamond");
Can you do sysout of the key @wooden relic

wooden relic
smoky anchor
#

The result should be aranarthcore:arrow_diamond for it to work

wooden relic
#

just gonna revert what I was trying and adding the sys out, gimme a couple mins!

smoky anchor
#

Why tf is your Diamond Arrow crafted with prismarine lol :D

#

Also, I used this command to verify that the RP is correct
/give @s arrow[item_model="aranarthcore:arrow_diamond"]

#

And in the RP you sent, you can remove the minecraft namespace (unless you do plan to use it in the future)

wooden relic
smoky anchor
#

Oh I see!

wooden relic
#

So the print displays exactly what you mentioned: aranarthcore:arrow_diamond

I still get the pink/black squares

smoky anchor
#

do you... have the RP on ?

wooden relic
#

And the command yields the same thing

#

I'd assume so?

#

If you'd be open to it, I'd happily give you the IP so you can join and check it out as well? 🙂

smoky anchor
#

I'd rather not

wooden relic
#

No problem c:

smoky anchor
#

so, I tested this on 1.21.9, what version are you using

wooden relic
#

1.21.7

#

I thought maybe the version in the mcmeta was too old/new?

#

But I aligned it with the guideline correctly (I think?)

chrome beacon
#

guideline?

smoky anchor
#

The RP version should be 64, you have 48

#

But that is fine, it can still load

#

I'll try 21.7

wooden relic
#

I think maybe the server isn't properly detecting the resourcepack, but there aren't any logs on my client side or the server showing any issues

smoky anchor
#

ok fuck it gib ip

wooden relic
#

BAHAHAHA okok will pm you

chrome beacon
#

Did you provide a resourcepack hash

smoky anchor
#

That should't be needed ?

wooden relic
chrome beacon
smoky anchor
chrome beacon
#

yes it's optional but having it set can be good in cases like this

#

to ensure that the pack the client is loading is correct and not damaged or outdated

smoky anchor
#

I had it on client, the RP from server does in fact not owrk

wooden relic
#

Huh how did it fail to download? Downloaded fine for me .-.

chrome beacon
#

Time to open the client log

chrome beacon
#

and see if it redownloads correctly

smoky anchor
#

wait, we may have it now

chrome beacon
#

you chatting in Minecraft now?

smoky anchor
#

tldr: don't use github to host the RP :D

wooden relic
#

steve I'll deadass venmo you if this works

smoky anchor
#

gl, don't have that

wooden relic
#

(I'm canadian so we don't have venmo)

#

LMAO

smoky anchor
#

hahaahhaah

wooden relic
#

IT WORKED!!!

smoky anchor
#

wahoo

wooden relic
#

my dude 🥺 How can I ever repay you

smoky anchor
#

I just told them to use the mc packs hosting website

wooden relic
#

❤️ my hero

#

but fr I really would love to show thanks somehow hahaha you've taken a lot of time to help me out

smoky anchor
#

Happy to help

#

It's really nothing

wooden relic
#

welp uhhh here's my written endorsement!

~thanks @smoky anchor for being a huge help ❤️

torn shuttle
#

hm

#

I have a weird one for forum staff

#

this guy copy pasted the same message on 84 different plugins

#

this exact message

torn shuttle
#

well rip that guy

alpine solar
#

How do I prevent villagers from locking profession after a single trade?

smoky anchor
thorn isle
alpine solar
thorn isle
#

alternatively try looking at nms to see what logic fires the profession change and try replicating it yourself but without the trading xp check

azure escarp
#

guys. I am making a plugin rn and I am currently using this code

    @EventHandler
    public void onInventoryDrag(InventoryDragEvent event) {
        String title = ChatColor.stripColor(event.getView().getTitle());
        String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
        if (!title.equalsIgnoreCase(menuTitle)) return;

        // Cancel any drag that touches the top inventory
        for (int slot : event.getInventorySlots()) {
            if (slot < event.getView().getTopInventory().getSize()) {
                event.setCancelled(true);
                return;
            }
        }
    }

    @EventHandler
    public void onInventoryMove(InventoryClickEvent event) {
        if (!(event.getWhoClicked() instanceof Player player)) return;

        String title = ChatColor.stripColor(event.getView().getTitle());
        String menuTitle = ChatColor.stripColor(manager.getConfig().getString("menu.title", "Your Backpack"));
        if (!title.equalsIgnoreCase(menuTitle)) return;

        // Cancel all click types in top inventory
        if (event.getClickedInventory() == event.getView().getTopInventory()) {
            event.setCancelled(true);
        }
    }```
#

for canceling movement in the GUI

#

but its not working

#

I am able to take out items of the GUI

chrome beacon
#

?gui

median obsidian
#

for some reason buildtools just does not load for me. I have tried running it as administrator and closing background instances of it

chrome beacon
#

What happens when you try to run it

bright root
#

Is there someone well known in making resource packs?

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

chrome beacon
#

or

#

?services

undone axleBOT
median obsidian
bright root
chrome beacon
#

The ender chest block or the item?

#

also what's not right

smoky anchor
#

also version

bright root
#

Well idk how to really explain. I have my texture pack with these all .json, textures, etc hops on single player, block is invisible in inventory, when i place it down it appears as normal chest

Tried with datapack custom roleplay data and after using that my custom model data was only visible in a player inventory, when placed it appeard as regular ender chest

Also if u dont understand me i can use translator since english isnt my first language

smoky anchor
#

Yes, you can not change the model of a placed block with custom model data.

#

custom model data can only be used for items

bright root
#

So lets say ill make server for ppl, which plugin or smth i need to use to get model of a placed block?

quaint mantle
#

In theory to make custom blocks you would need to spawn item display entity that hides the actual vanilla block once it's placed

thorn isle
#

Alternatively, use the many redundant note block block states to render custom blocks, but this will require a bunch of protocol hacking and will impact gameplay for players without the resource pack

raw sequoia
#

How to add data to NBT "components" without wrapping it around on "minecraft:custom_data"?

{
  "id": "minecraft:gold_ingot",
  "count": 1,
  "components": {
    "minecraft:custom_data": {
      "components": {
        "minecraft:tooltip_style": "lzblocks:tooltip/legendary"
      }
    }
  }
}```

Tried alot of attempts using NBTAPI
```java
public static void giveTooltipGoldIngot(Player player) {
    ItemStack goldIngot = new ItemStack(Material.GOLD_INGOT);
    
    NBT.modify(goldIngot, nbt -> {
        var comp = nbt.getOrCreateCompound("components");
        comp.setString("minecraft:tooltip_style", "lzblocks:tooltip/legendary");
    });
    
    player.getInventory().addItem(goldIngot);
}
``` And for some reason it still wraps the data on "minecraft:custom_data":
chrome beacon
#

Are you running a modded server

#

or client

#

thought you were trying to define your own component there for a sec

raw sequoia
#

any solution how to get rid of it?

#

hmm

thorn isle
#

you can't

#

items no longer have free form nbt data

#

items have components, which are closely tied into registries, and have a fixed range of state they can represent

#

anything that does not fall into the item components defined by mojang gets dunked into the custom_data component as raw nbt

thorn isle
chrome beacon
raw sequoia
#

thanks, ima test it tomorrow, I kinda messed up the gradle part

tender mica
#

Hola necesito ayuda

smoky anchor
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

smoky anchor
tender mica
#

No abro inglés

thorn isle
#

skill issue

tender mica
#

Soy chileno

slender elbow
#

fate worse than death

bright spire
#

Ah he was banned uh ok

worldly ingot
#

He was not. He left lol

spring tartan
#

can anyone code a minecraft server

chrome beacon
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

chrome beacon
#

or

#

?services

undone axleBOT
mortal vortex
marble spade
#

It is possible with the new mannequin entity to add textures without a player profile? Using commands and a resource pack with a specific skin is possible, but idk if with the spigot api is capable of that

umbral ridge
thorn isle
pastel axle
# marble spade It is possible with the new mannequin entity to add textures without a player pr...

looks like it is, with setSkinPatch

Entity e = location.getWorld().spawnEntity(location, EntityType.MANNEQUIN);
String name = "YourNPC";
String type = "npc-skin-name";
Mannequin mannequin = (Mannequin) e;
PlayerProfile pp = plugin.getServer().createPlayerProfile(UUID.randomUUID(), name);
PlayerSkinPatch psp = pp.getSkinPatch();
psp.setTexturePatch(new NamespacedKey("mannequin", "entity/player/wide/" + type));
pp.setSkinPatch(psp);
mannequin.setPlayerProfile(pp);
mannequin.setHideDescription(true);

Thank you for giving me a reason to update my code to use Mannequins instead of Villagers 😄

onyx fjord
#

rip backwards compat

ivory gale
#

Is the mannequin the integrated equivalent of NPCs? I didn't even know this was going to exist, it's awesome

slender elbow
#

yep

#

they're pretty amazing

ivory gale
#

Sounds like a bad news for plugins/mods like Citizens or Custom NPCs, even though I suppose there are far fewer features. But this will allow us to implement it much more easily in our modern plugins which is great

slender elbow
#

it's only bad news for citizens if people stop using citizens, which i seriously doubt, reminder that it also offers a whole catalogue of features that a simple mannequin cannot, hell citizens even might start using mannequins for all we know and it'd be perfectly fine

ivory gale
#

true

cosmic arch
#

Hey, I've been working on a logic and have come across an Issue:

The player is holding 2 diffrent items in his main and off hand. Both items are interactable (main hand loaded crossbow and offhand shield). I want it so while the player is in a certain state, the user cannot shoot the crossbow, but he should be able to block. The only way to cancel the crossbow shot without the crossbow losing its ammo, is by cancelling the right click interaction, but that makes it so i cant hold the shield.

Anyone have any ideas on how to do it?

worldly ingot
#

You're kinda shit outta luck because it's client-sided behaviour determining which item should be interacted with. It sends the interaction start packet

#

I guess the only other option that might be worth trying is sending a cooldown for the crossbow to disable it, but I'm not sure if the client tries to use the offhand instead if the main hand is on cooldown

#

Or, as you said, remove its ammo. You can strip it of its loaded ammo and the ammo in the player's inventory if they have any, then re-add it when you want the player to be able to shoot. Not as pretty, but probably works

#

If the cooldown works though, that would be easier

slender elbow
#

the client will not send an item use packet for the offhand if it expects the main hand item usage to be successful, so like, yeah

#

gl

worldly ingot
#

Well, they said they wanted the player to be in a certain state. I took that as the state could be toggled at any time, not at the time of interaction

#

They just said their attempt was to cancel the interaction while the state was active

slender elbow
#

the wording of the question is certainly unclear

worldly ingot
#

Indubitably!

#

Quite the predicament!

slender elbow
#

"while the player is in a certain state, the user cannot shoot the crossbow"
like, yeah, you don't need to use the interaction event for this, but they're still talking about the interaction event

#

choco

#

you are a nerd

worldly ingot
#

tf

slender elbow
#

but you are my second favourite nerd

worldly ingot
#

Who tf took my first place?

slender elbow
#

gf

worldly ingot
#

Mine or yours?

slender elbow
#

can it be both?

#

runs

worldly ingot
#

Do we share the same girlfriend!? Excusemewhat

slender elbow
#

no

#

it was mine fwiw

worldly ingot
#

Ah okay. I was confused because the wording of your statement was certainly unclear

slender elbow
#

no

rain kernel
#

Hi, Could someone help me about this weird thing happening to me on my server?

Sometimes when im doing stuff on my server i get laggy and start to get like 3k+ ping for no reason, i went on other servers while that was happening and i didnt had any lag on those servers + did a speedtest which looks fine, so the problem isnt on my side. I tried resetting the playerdata of the server and checking spark profiler but there wasnt any problems too, so can someone help me about this annoying thing that doesnt even let me do my stuff on my server.

weak wasp
rain kernel
harsh bone
#

im tryna make a datapack where the warden drops a chirp music disk ill make a texture pack for it called ''warden heart'', but it isnt working PLEASE HELP 😭 IM LOSING MY SANITY 💀

weak wasp
#

Duno then

violet blade
#

its not the first time ive seen this, extremely high Latency, only one server and only one player

rain kernel
#

the server side is fine im the only one lagging

rain kernel
violet blade
#

cant say i haven't tried to solve it but never could, but its not an isolated case

marble spade
#

I kinda wish for mojang to use a more efficient way to use player skins in this way, instead of being dependant to a resource pack or the skin the player is using, something similar to how player heads are

slender elbow
#

i mean, you can do that too, no? the thing just works with a PlayerProfile

chrome beacon
#

^

marble spade
slender elbow
#

wat

#

you still need to provide a profile for player heads

#

like, it's literally the same thing

marble spade
#

I'm just saying nonsense xd srry

topaz adder
#

Hey! I'm creating a plugin for a tactical shooter in Minecraft and I want to add weapon recoil. Unfortunately, when I use teleportation, I can't move the mouse no matter what I do — even when I try something like player.teleport(coordinates, player.getRotation() + offset), rotating the player causes screen jitter and other issues.
I tried using ProtocolLib to add rotation instead of setting the player's rotation directly, but I'm not really sure how to do it, so I'm looking for help here.

chrome beacon
#

You want to teleport the player with the relative teleport flags set

#

unfortunately I don't think Spigot has API for that, so you'll need ProtocolLib for that part

#

or Papers API if you don't plan on posting the plugin to spigotmc and are using Paper

topaz adder
#

ive got protocollib

#

I tried using ProtocolLib to add rotation instead of setting the player's rotation directly, but I'm not really sure how to do it

smoky anchor
undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

topaz adder
#

can someone help me with that rotation? I tried everything but i cant figure it out

smoky anchor
#

It works perfectly on 1.21.10 using the /rotate command (again, using the relative ~)
at worst you can just dispatch that

topaz adder
#

how this command works? can i add rotation to player with it? (NOT set rotation)

pseudo hazel
#

get the rotation and then add something to it?

smoky anchor
#

yes, that's what the "relative" means

smoky anchor
pseudo hazel
#

oh

#

I guess then it has a dedicated way to set relative angles

#

which is the relative thing you mentioned

topaz adder
#

when im trying to set player rotation like that: playerrotation + offset. it makes screen jittery

chrome beacon
#

As I said you need to send the teleport packet with the relative teleport flag set

smoky anchor
topaz adder
#

chatgpt send me this. But it doesn't work. it's just not doing anything

var yaw = 300f;
var pitch = -30.0f;

    try {
        Location loc = player.getLocation();

        PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_LOOK);

        packet.getIntegers().write(0, player.getEntityId());

        // Konwertujemy float (0-360) do byte (0-255)
        byte yawByte = (byte) (yaw * 256 / 360);
        byte pitchByte = (byte) (pitch * 256 / 360);

        packet.getBytes().write(0, yawByte);
        packet.getBytes().write(1, pitchByte);

        PacketContainer headPacket = protocolManager.createPacket(PacketType.Play.Server.ENTITY_HEAD_ROTATION);
        headPacket.getIntegers().write(0, player.getEntityId());
        headPacket.getBytes().write(0, yawByte);
        protocolManager.sendServerPacket(player, headPacket);
        protocolManager.sendServerPacket(player, packet);
    } catch (Exception e) {
        e.printStackTrace();
    }
chrome beacon
#

yeah that won't work

#

that packet is for other entities

#

Now try what I told you to try

wet breach
#

probably wouldn't rely on chatgpt to fix your problems >>

topaz adder
#

what does it means its for other entities? I can rotate only mobs with that? Or i can rotate players but only other players will see this rotation?

topaz adder
#

please guys help

thorn isle
#

did you try what olivo told you to try

topaz adder
#

i dont know how i search for an half hour but i couldn't find how to use teleport packet

dark moth
#

How do i make a player open up the command block gui and let thr player perform commands in that gui if possible.

dark moth
#

And why the flippity flop my name is the conqueror

chrome beacon
#

That's the name of your Spigot account

dark moth
chrome beacon
dark moth
#

Nuuuuuu

#

Ig ill explore a lil hehee

thorn isle
#

dialogs will probably do what you want

#

they support text inputs and with a bit of elbow grease you can probably reproduce the command block gui using them

chrome beacon
dark moth
#

Nvm ima do nms and dive straight in

smoky anchor
pastel nova
#

hello

#

guys how do i expose some methods from one plugin to another one? Because i tried a method I found onlin which does the following:

    @Override
    public void onEnable() {
        instance = this;
        getServer().getServicesManager().register(
           BeaconomicsCoreAPI.class,
           BeaconomicsCoreAPI.getInstance(),
           this,
           ServicePriority.Normal
    );
    ...

And then In my other plugin, I am doing:

@Override
    public void onEnable() {
        instance = this;

        RegisteredServiceProvider<BeaconomicsCoreAPI> apiProvider = getServer()
          .getServicesManager()
          .getRegistration(BeaconomicsCoreAPI.class);

        if (apiProvider != null) {
            api = apiProvider.getProvider();
        }
        ....

But this doesnt work

#

when I reload i get:

Caused by: java.lang.ClassNotFoundException: com.swondi.beaconomics_core.BeaconomicsCoreAPI
    at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:197) ~[paper-api-1.21.4-R0.1-SNAPSHOT.jar:?]

I had another way of doing this which was to compile a 3rd project containing just a interface and calling it let's say BeaconomicsAPI, then both plugins would import that .jar and use it like that, but I doubt thats a good way.

ivory gale
#

What you are doing seems very complex for the desired result. Maybe you can simply add the first plugin as a dependency on the second and access its methods from there? Do you have any reason to use a ServiceProvider specifically? But in any case, if you try to access the methods of the first plugin, you will have to add it as a dependency to the second one

pastel nova
ivory gale
#

Are you sure that your second plugin is loaded after the first one? You can ensure it by adding the first plugin to the depend section on the plugin.yml file

pastel nova
#

even without the registration if i just use BeaconomicsCoreAPI.createNexus() or createGenerator() it throws class not found

ivory gale
#

BeaconomicsCoreAPI is the name of the whole first plugin, or is a lib shared between both plugins?

pastel nova
#

okay my bad i fixxed it

#

BeaconomicsCoreAPI is just a file that exposes some methods from the BeaconomicsCore plugin

#

although i really f'ed it up since I already had access to everything about my Core plugin, so why did i bother to register stuff when I could just use it

#

thats the bad part of coding for 12h a day

ivory gale
#

take a break ahah

pastel nova
#

although I don't like that I can access all files in my Core library

#

im not really an expert with java, is the fix a package-private type of visibility

ivory gale
#

you can use private/protected in your core and public only for your api class

pastel nova
#

I'll stick with the build system to handle that

#

i tried module-info, thinking it was cleaner but it requires you to filter all the used libraries and not only decide what to export, and for some reasons it cant find some other APIs im using so, ill stick with maven

ivory gale
#

if it's for internal use only, it might not be worth spending time on it

pastel nova
mighty wind
#

what happened to the mojang mapping guide

young knoll
#

?mappings

undone axleBOT
mighty wind
smoky anchor
#

?nms is what you mean I assume

mighty wind
smoky anchor
#

You can plop that into the wayback machine

#

I think someone asked some time ago if they could put this on the spigot forum, but not sure if anything came from that.

#

Doesn't look like it at least...

mighty wind
#

is the guide just gone

#

why

smoky anchor
#

ask Alex, it's his website
Maybe his business is gone idk

mighty wind
#

lol

#

i swear there was a guide on the spigot website tho

mighty wind
#

kk ill sus

smoky anchor
#

what

mighty wind
#

sus

#

like ill take a look

smoky anchor
#

im too boomer to understand ig

mighty wind
#

um

#

for libs disguise after updating

#

cannot access com.github.retrooper.packetevents.protocol.player.UserProfile

#

on PlayerDisguise playerDisguise = new PlayerDisguise(target);

#

i mean i updated the dependency but this screams i have messed up somewhere

#

oh wait im missing packetevents

#

am i just using old out of date shit that just sucks now

smoky anchor
#

what is "this"
show what actually is in your pom too

mighty wind
# smoky anchor what is "this" show what actually is in your pom too

i just put

<repository>
    <id>codemc-releases</id>
    <url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>

and

<dependency>
    <groupId>com.github.retrooper</groupId>
    <artifactId>packetevents-PLATFORM</artifactId>
    <version>2.10.0</version>
    <scope>provided</scope>
</dependency>
#

in repos/dependencies

smoky anchor
#

And did you actually read the instructions instead of just copy pasting

#

And where did you get 2.10.0 from

mighty wind
#

copy pasting

#

i dont like reading

smoky anchor
#

that won't get you far in this profession
You better learn to at least tolerate it

mighty wind
#

ok

#

i see where i went wrong

smoky anchor
#

latest version for spigot seems to be 2.3.0

#

at least based on the release repo

mighty wind
#

OH

#
        <repository>
            <id>codemc-releases</id>
            <url>https://repo.codemc.io/repository/maven-releases/</url>
        </repository>


        <dependency>
            <groupId>com.github.retrooper</groupId>
            <artifactId>packetevents-spigot</artifactId>
            <version>2.3.0</version>
            <scope>provided</scope>
        </dependency>
#

stll doesnt work hold on

smoky anchor
#

hm, seems like 2.10.0 is on modrinth

mighty wind
#

maven just says Unresolved dependency: 'com.github.retrooper:packetevents-spigot:jar:2.3.0'

smoky anchor
#

did you refresh maven ? theres a button in the maven tab
assuming you're using intellij

mighty wind
#

ye'

#

i did

smoky anchor
#

welp that's the extent of what I can do rn

smoky anchor
mighty wind
#

i see

#

glad it is not just me

smoky anchor
#

and it doesn't have 2.3.0
so that's my bad, sorry

mighty wind
#

ur allg bro

#

dno why i cant resolve the repo

smoky anchor
#

what is it telling you now ?

mighty wind
smoky anchor
#

ye I made a mistake, set it to 2.10.0

mighty wind
#

hold on

mighty wind
# smoky anchor ye I made a mistake, set it to 2.10.0

its trying to compile rn

NG] Failed to download examination-api-1.3.0.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download annotations-26.0.2-1.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download adventure-key-4.25.0.jar [https://repo.codemc.io/repository/maven-snapshots/]
[WARNING] Failed to download packetevents-api-2.10.0.jar [https://hub.spigotmc.org/nexus/content/repositories/snapshots/]
[WARNING] Failed to download packetevents-api-2.10.0.jar [https://repo.md-5.net/content/groups/public/]
#

wait

#

ok.

#

anyway.

#

works ig.

slender elbow
#

🫙

slender elbow
#

I hope i dont need nms for this
you don't need nms for dialogs
No one said such thing as that

#

confused

dark moth
#

My smol brain sorry

#

Lemme delete b4 anybody sees it

smoky anchor
#

a bit too late for that

#

somebody has seen it

dark moth
#

Uh oh

pseudo hazel
#

delete them too

graceful fiber
#

Hey guys! I have just tried to download the bungeecord-config package from the maven repo but I don't think it's available?

        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-config</artifactId>
            <version>1.20-R0.1-SNAPSHOT</version>
        </dependency>```
#

I checked the repo and only R0.4 and R0.5 were available

thick pecan
#

Yo wantet to ask smth i coded my own pl but in the gradel stuff rhe gradel.bat didnt generate what can i do

chrome beacon
#

What do you mean it didn't generate

#

How did you make your project

worldly ingot
#

Sounds like you're using an installed version of Gradle instead of the wrapper

topaz adder
#

hello guys. I want to change player rotation (relative pitch) with packets but whenewer i run this script it returns an error:

Field index 0 is out of bounds for length 0

i dont know what i'm doing wrong so i'm asking you guys

PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_POSITION_SYNC);
packet.getFloat().write(0, yaw);
packet.getFloat().write(1, pitch);

            packet.getDoubles()
                    .write(0, loc.getX())
                    .write(1, loc.getY())
                    .write(2, loc.getZ());
            packet.getDoubles()
                    .write(3, player.getVelocity().getX())
                    .write(4, player.getVelocity().getY())
                    .write(5, player.getVelocity().getZ());
            packet.getFloat().write(0, yaw);
            packet.getFloat().write(1, pitch);
            
            packet.getBytes().write(0, (byte) 0x18);

            try {
                protocolManager.sendServerPacket(player, packet);
            } catch (Exception e) {
                e.printStackTrace();
            }
thorn isle
#

i don't think that packet is for the player either

#

you need the teleport packet

topaz adder
#

PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.ENTITY_TELEPORT);

            packet.getDoubles()
                    .write(0, loc.getX())
                    .write(1, loc.getY())
                    .write(2, loc.getZ());

            try {
                protocolManager.sendServerPacket(player, packet);
            } catch (Exception e) {
                e.printStackTrace();
            }

when i'm doing it like that it returns the same error

thorn isle
#

that's entity teleport, not what you want either

#

you need to teleport the player

smoky anchor
#

try TELEPORT

topaz adder
#

there is no packet "teleport"

smoky anchor
#

POSITION I mean

topaz adder
#

okay

smoky anchor
#

but who tf knows what that does, the enum has no explanation

#

not enum, class
whatever

#

is PacketType.Play.Server Server -> Client ?

topaz adder
#

PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.POSITION);

            packet.getDoubles()
                    .write(0, loc.getX())
                    .write(1, loc.getY())
                    .write(2, loc.getZ());
            packet.getFloat()
                    .write(0, yaw)
                    .write(1, pitch);

            try {
                protocolManager.sendServerPacket(player, packet);
            } catch (Exception e) {
                e.printStackTrace();
            }

the same error

smoky anchor
#

just use nms man

topaz adder
#

but can i change player's relative rotation with that? (I dont know anything about it)

smoky anchor
#

well ye, I forget what NMS actually stands for but it's basically just the vanilla minecraft server
get your player entity, cast to CraftPlayer, getHandle() to get the NMS Player object, that should have the teleport method with the flags somewhere

#

calling that should handle everything for you
including the confirmation packet which idk what that does

thorn isle
#

that's the right packet i think, now what's this error you're talking about

#

but yea plugging into nms might be easier

chrome beacon
#

Are you just using GPT

smoky anchor
#

he is I'm pretty sure

chrome beacon
#

Don't bother with sending the packets manually

#

just call the nms teleport method

pseudo hazel
#

why even use nms at all

#

doesnt the api work fine?

worthy prism
#

Hey all!
I am currently working on a (almost) one of kind realistic medieval (historical) minecraft server. We are pretty far in our development but have noticed we are lacking JAVA coders. Our coders have gotten more inactive over time. If you are interested in helping plz MSG me!

dry hazel
#

?services

undone axleBOT
smoky anchor
pseudo hazel
#

oh

winter jungle
#

Very creative

wet breach
winter jungle
#

ohh didnt know that

rotund ravine
wet breach
# rotund ravine But we def modify it

sometimes, but I was just pointing out that NMS is definitely a term in the programming that it doesn't necessarily mean net.minecraft.server but can also mean non-modified source

#

maybe I should have made it more clear on that

#

but either way, now they know it has two meanings though

waxen mantle
#

How do I upload plugins to spigotmc

#

I made one of my first plugins

#

and I rlly want it to be posted

#

Wrong chat sorry

buoyant viper
young knoll
#

It’s obviously no mans sky

autumn cave
#

Is it possible to get Bukkit/Spigot for versions before 1.8? I see only versions after 1.8 are available on https://hub.spigotmc.org/versions through BuildTools. With the earliest build being 253

#

Where are builds 0..252?

sullen marlin
#

No longer available unfortunately

autumn cave
#

Any reason why?

sly topaz
#

you can probably still find binaries on the internet archive perhaps, I know there were some cb builds there

worldly ingot
#

Needless to say, if you somehow get your hands on a build prior to 1.8, it's not going to be supported here or practically anywhere else. You're wholly on your own

sullen marlin
#

?howold 1.8

undone axleBOT
worldly ingot
#

Worse,

#

?howold 1.4.6

undone axleBOT
sly topaz
#

that cannot be right

worldly ingot
#

Release cycles were very quick back in the day

#

They slowed down with 1.8 until around 1.18

sly topaz
#

I guess if a whole release was just horses it was pretty fast to ship

sly topaz
sly topaz
#

it kinda makes sense now how all I remember is 1.8 even though I actually started playing around 1.5, release cycle was so fast that I spent most of my time on 1.8 anyway lol

violet blade
#

1.6 also brought the new launcher

#

it was a catastrophic hit for cracked servers/players

wet breach
wet breach
buoyant viper
#

ill never forgive mojang for the microsoft store launcher

spring tartan
#

can anyone code a minecraft server

autumn cave
autumn cave
spring tartan
#

like help make one

autumn cave
#

What do you want to make?

spring tartan
#

idon't need oone it is for my friend and i am just helping him try and get someone

winter jungle
buoyant viper
#

1.6 was the java one with the tabs right

#

cant launch anymore woops but

winter jungle
#

Nostalgic

buoyant viper
#

yeah that

winter jungle
#

It was so simple

#

Today I always have to search for where I can create a new version profile 😭

buoyant viper
#

yeah i just use prism launcher lol

#

havent used the official launcher in at least a year or 2 now

winter jungle
#

Same tbh

#

Only occasionally when I want to test something on a snapshot

buoyant viper
#

u can still access snapshots on most other launchers..

winter jungle
#

Unfortunately not with the clients I use like Noriskclient ig

wet breach
#

And spigot versions i will have to make

mighty wind
#
[00:17:03] [Netty Server IO #3/ERROR]: Error sending packet clientbound/minecraft:set_entity_data io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:set_entity_data' at net.minecraft.network.codec.IdDispatchCodec.a(SourceFile:61) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.codec.IdDispatchCodec.encode(SourceFile:14) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.PacketEncoder.a(SourceFile:26) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at net.minecraft.network.PacketEncoder.encode(SourceFile:12) ~[spigot-1.21.8-R0.1-SNAPSHOT.jar:4530-Spigot-7c52c66-55f04da] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.118.Final.jar:4.1.118.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.jav```


i havent used packetevents before. updating from like 1.17, have to use netty as a dependency for libsdisguise.

dont really know what could be causing this the stacktrace doesnt poitn to anything, any known ideas/known culprits? im gonna take a deeper dive into it but was just wondering
sullen marlin
#

What are you doing

#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

mighty wind
#

i have made quite a noobish and disgusting error

#

um, i am on my phone rn i will send it soon its more i have 0 idea why an API ive only just made a maven dependency is causing a client to crash i havent called it in my code, i guess my high level question is packetevents like hooking into spigot and doing something on its own accord or

#

also im self conscious and dont want to publicly share my repo bc i will be judged

buoyant viper
#

we are already judging the unholy profile picture

#

cant help without code

mortal vortex
mighty wind
#

i am showing respect to the goat

mighty wind
#
    public void setGlowing(Player player, Entity entity) {
        playerMapping.computeIfAbsent(player.getUniqueId(), key -> new HashSet<>()).add(entity.getEntityId());
        entityMapping.computeIfAbsent(entity.getEntityId(), key -> new HashSet<>()).add(player.getUniqueId());
        touch(player, entity);
    }
#

it was this :3

echo basalt
#

the stacktrace isn't even complete and neither is the code

vapid badger
#

I'm trying to stop player-entity collision with Protocollib, anyone know what packet I need to be listening to?

chrome beacon
#

The client predicts player movement, trying to block/modify certain packets would only cause visual issues

#

Instead use teams and place the entities you do not want to collide in the same team and disable collisions there

vapid badger
#

yeah but that will not work pre 1.13

thorn isle
#

not sure if anything will work pre 1.13 then, i don't remember if there is any way of disabling collisions apart from teams

#

that said i'm fairly sure i remember plugins disabling collisions before 1.13, so maybe it will work pre 1.13

vapid badger
#

welp Imma try doing it with teams and test it on pre 1.13 server, we'll how it'll turn out

chrome beacon
mighty wind
chrome beacon
#

Teams have existed for longer

vapid badger
#

Oh ok thanks

thorn isle
#

the team command was originally a subcommand of the scoreboard command

mighty wind
#

is there api function to make smth glow for a specific player only

thorn isle
#

you can set the Scoreboard, along with its teams, per-player with Player::setScoreboard

#

i'm not totally sure if that affects glowing beyond just the outline color, though

mighty wind
#

bro got hacked

mighty wind
#

just want one player only

#

im starting out again feel so noob

thorn isle
#

no, Player::setScoreboard affects only that player, that's why it's on the player object

#

but i don't know if being able to set teams and scores on a per-player basis is enough to to per-player glow

#

what are you trying to make glow specifically? if it's not another player or something similar, you could use the per-player entity visibility api instead and have the whole glowing entity only be visible to the desired player

mighty wind
#

i just want their objective to be lit up

#

id probs prefer to do it with packetevents or protocollib but my protocollib solution disconnects the player bc its old... and was from 1.17

thorn isle
#

you probably have to do it with packet fucknuggetry then yeah

#

alternatively, i think libsdisguises might be able to do it for you

#

it supports setting entity metadata in the "disguise" properties, and does iirc support per-player disguises; so you could disguise the villager as itself, but with the glowing effect, only for that player

#

libsdisguises exists for a wide range of versions and is actively maintained, open source, and free

shadow rover
#

Hi,
I'm reaching your help due to development on intellij. I'm coding on spigot 1.8.8 and for some days, I have a problem on the spigot dependancy. This one can't reach bungeecord and I don't know why. Can you help me ?

#
[ERROR] Failed to execute goal on project UHCManagerAPI: Could not resolve dependencies for project fr.glerious.uhcmanagerapi:UHCManagerAPI:jar:1.0-SNAPSHOT
[ERROR] dependency: net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT (provided)
[ERROR]     net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://jitpack.io during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of jitpack.io has elapsed or updates are forced
[ERROR]     net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigot-repo has elapsed or updates are forced
[ERROR]     net.md-5:bungeecord-chat:jar:1.8-SNAPSHOT was not found in https://oss.sonatype.org/content/repositories/snapshots during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
thorn isle
#

i think the artifact got deleted from the repo at some point, 1.8 is older than many minecraft players at this point

chrome beacon
#

It was removed when OSSRH was EOL:d

mighty wind
#

ill try that then yeah ty

chrome beacon
#

grap them there and manually install them to the maven local

#

or add that as a fallback repo in the maven config

mighty wind
#

is there a resource to like understand/read how to use packets

thorn isle
#

the mcwiki protocol page is a good start, but it doesn't match 1:1

#

that page + nms sources so you can see the actual fields on the packets is the way to go

#

they don't match 1:1 because the protocol page doesn't document the actual fields of the packet objects (which is what protocollib accesses), but rather the serial form of the packet

#

e.g. on the teleport packet, the field for the relativity flags is like an EnumSet<Flag>, but the serial form is a bitset

mighty wind
#

lowkey i need to stop coding so late at night bc i probs cant learn much

#

also need to stop doing stuff like 10 versions apart

mighty wind
#

i have this bug where like, NPCs i spawn in sometimes their Y coordinates are off, idk if it has anything to do with the fact that i just disable travel by overriding it but i cant seem to recreate it consistently it seems compeltely random. anyone have any ideas

chrome beacon
#

I recommend using mappings to check what the nms classes contain

#

?mappings

undone axleBOT
mighty wind
chrome beacon
#

which mappings you use isn't super important

#

what is is the fields the classes contain

thorn isle
#

if you use protocollib, that is

#

since it only cares about the field type

#

i.e. you get the n'th int field in a class

chrome beacon
#

^^

#

I assumed ProtocolLib

thorn isle
#

packetevents probably works the same, dunno

sly topaz
#

packetevents provides wrappers for everything so you're never working with the raw types like that

tropic finch
#

My hat doesn't work in ItemsAdder, I'm doing everything the same as with the previous hat that worked for me. please help

#

pls help

smoky anchor
tropic finch
#

ok

autumn cave
chrome beacon
#

Checkout the git commit history

outer ember
#

how to make a timer for somone for something like jail time

sly topaz
outer ember
#

Oh my internet brooo

#

.

outer ember
umbral shoal
#

Would anyone here be willing to create a batch command execution plugin that communicates with the Fawe api?
I am willing to pay of course.

Basically I want a plugin that takes a file like a yml, containing a bunch of fawe commands, it then executes the commands in order, always waiting on a confirmation from fawe (an example would be waiting for a paste command to finish executing)

sly topaz
#

?services

undone axleBOT
umbral shoal
#

I uh, dont really want to make another account on another forum I will use only once. I really wish I could request this here..

thorn isle
#

i think fawe commands are queued naturally

#

so you could send them all at once and each will start as the previous one finishes

#

that being the case this would be simple enough for chatgpt to vibecode it for you

umbral shoal
#

I dont want to do this because the paste commands can take up to 14 minutes to finish sometimes with my large paste volumes, so I would like it to actually wait for a success command, incase something happens and things fail, I know where it left off and it didnt just skip a single command and completely fuck everything up

#

I honestly just didnt really want to set up the environment to make a plugin because that would be the most time consuming task.
And chat gpt is kind of completely stupid in this regard, I already tried asking it fawe api related questions and it made up like 50% of the answers lol

thorn isle
#

yeah it won't be good enough for anything worldedit/fawe api related

#

mostly because they change everything every 0.2 versions and have the most unintelligible documentation

umbral shoal
#

yup... Ive learned as much

thorn isle
#

to chatgpt's credit, most devs can't do it either

umbral shoal
#

I was hoping I could just check for the debug comands FAWE leaves in the console after every command but sadly other plugins dont seem to have access to those

thorn isle
#

either way i don't think anyone here is really interested in providing services, you're probably best off creating an account and posting there

thorn isle
#

we can guide you on it if you want to write it yourself but doing things with fawe as your first project might be a tall order

chrome beacon
undone axleBOT
outer ember
#

i don't think ts is related to my problem

chrome beacon
#

How is it not?

#

You wanted to make a timer?

umbral shoal
umbral shoal
#

yyeah setting up the environment is a fucking nightmare because why would it be simple

thorn isle
#

this is pretty old but roughly accurate still

umbral shoal
#

jesus

#

Every single guide I see has a a completely different process, this is just silly lol

chrome beacon
#

There are a couple different ways of setting up a project

#

with different pros and cons

sly topaz
#

you could definitely vibe-code 90% of it with codex or gemini code

umbral shoal
#

but building is the annoyying part

thorn isle
#

that's what maven is for, you just click the package button and it gets built

#

setting up maven with the dependencies is the part where most newbies lose hope because it's not super intuitive and it doesn't feel like you're doing le coding

chrome beacon
umbral shoal
#

I tried it, just threw a bunch of errors mostly lol. Trying another method

chrome beacon
#

🤔 what errors

chrome beacon
#

?services

undone axleBOT
umbral shoal
#

no

#

youre supposed to post it on the forums, not here

torpid widget
#

Ah sorry my bad

vapid badger
autumn cave
#

Who are considered to be the Authors of Bukkit?

#

And are there any sources on this?

chrome beacon
#

There are many people who have worked on bukkit over the years

#

but if you want to go way back EvilSeph and Dinnerbone were major contributors during the early days

autumn cave
#

does md_5 count?

#

did these two start the project?

chrome beacon
#

As I've said there are many contributors

#

The bukkit project is quite old

autumn cave
#

who started it?

chrome beacon
#

I wasn't around back then so I have no idea how it got started

#

you just curious or are you trying to do smth?

young knoll
#

Dinnerbone and grumm have some of the first commits iirc

wet breach
young void
#

Some really weird things happen with certain folders and certain stuff as you move on from versions

#

Texture size

young void
young void
#

1.21.4 comes suddenly decides to override item custom model data predication formats

#

Without offering a way to maintain previous formats

#

No warning just overriding

#

Disgusting

young void
worldly ingot
#

What the hell are you yapping with yourself about? lol

#

Also, yeah, new versions add newer, more powerful features to resource packs. I don't understand the complaint. Do you want them to never make improvements ever and just prefer that everything works as is? There's a reason resource and data packs provide version ranges. It's not to look pretty. It's to denote that they support a specific format

#

Item model definitions are just an objectively better way to handle things over custom model data

young knoll
#

It needs to be backwards compatible all the way back to 1.8

#

Like spigot

violet blade
#

bro is having a breakdown

ivory sleet
#

icl it is getting confusing since they have been switching things up, but i think the compromise is good in exchange for a good DSL over so many features and so much customizability

ivory sleet
#

new things are always announced in snapshots

#

u can find em also quite easily

young void
ivory sleet
#

i think major is very subjective

young void
#

Custom model datas were a big deal for me personally

#

And it took a long time for tools and me to adjust

young knoll
#

item model is way better

#

And the new custom model data system is also way better

young void
ivory sleet
#

i dont wna neglect ur work etc, but like, it lowkey should not take too much effort just re-designing to item model + new custom model data

young knoll
#

Tbf I don’t know how to use the new custom model data

#

Item model all the way

ivory sleet
autumn cave
ivory sleet
#

like supplying certain parameters to the item model

young knoll
#

Yeah but you can have all sorts of parameters now

ivory sleet
#

yea which is the point

young knoll
#

Before it was just a number

#

But item model takes care of that, you don’t even need to override any vanilla jsons

young void
young knoll
#
  • no conflicts
young void
ivory sleet
#

I mean if u wna support multiple versions u'd have to use "both"

#

tho i dont see why u'd shoot urself in the foot like that

young void
ivory sleet
#

i mean yea

#

but if ur using nexo

#

then u dont even need to change that much

young knoll
#

You don’t even need to redo anything json wise

young void
#

There were many instances which i had to do everything all over again

young knoll
#

Just add the item model tag to your items

young void
abstract fox
#

There are 6 circles

young void
#

For custom model data

abstract fox
ivory sleet
young void
#

A new system was introduced

ivory sleet
#

and that is in json

young knoll
#

You should already have those if you were using the old custom model data

ivory sleet
#

i mean depends on how old u date it back to

#

but u most definitely need to add new item model definitions

#

esp if ur migrating to where they added those

young void
#

What im saying is isnt it nice to have a resource pack or something from 1.11 that still works on modern versions alongside all of those cool things?

young void
ivory sleet
#

minecraft is in the works of making things like substantially data driven

young void
#

Though EVERYTHING has changed

ivory sleet
#

and like cyrus, for regular players things do work when u update from an old version to a new version

#

which is like the biggest audience of minecraft

young void
young knoll
#

There’s programs for windows 10 that don’t run on 11

#

So…

young void
#

My 20 year old game still runs

young knoll
#

Your 20 year old game is not in fact ever single program ever made

young void
ivory sleet
#

na

young void
#

😭😭😭

ivory sleet
#

depends hugely on what program

#

ofc its nice if legacy stuff work on long dated future versions

young knoll
#

There’s an xkcd for this

young void
young knoll
young void
ivory sleet
ivory sleet
#

like business requirements and goals specifically

young void
# young knoll

Idk what hes trying to do but i understand his struggle

ivory sleet
#

and they change all the time

young void
#

Im just complaining that everything breaks all the time and i have to fix it thats it ;(

#

Its bothering

ivory sleet
#

yea i suppose

young void
#

Its like playing catch up with mojang

ivory sleet
#

i think the benefits long outweigh the drawbacks

young knoll
#

Wait until you write mods

young void
ivory sleet
#

ye no api

#

i mean they kinda do

#

thats why they add so many new features and ability to customize

young void
ivory sleet
#

?

young void
#

For them

ivory sleet
#

id want to disagree

young void
#

Look like roblox

young knoll
ivory sleet
#

its a primary concern no?

young void
#

Is a multillayer gane

ivory sleet
#

just look how much stuff they add for modders etc?

young knoll
#

I mean it’s not Roblox

#

But there’s certainly far worse

young void
#

But minecraft is a singleplayer with the ability to play online, sometimes in servers, big difference

ivory sleet
#

roblox is different

#

its a really odd comparison given how different the games are if u think about it or more should I say platform vs game

young void
#

Its not a "multiplayer game" we just made use of it that way

young void
#

Theyre alike in many ways tho

ivory sleet
#

they are unlike in many more ways tho

ivory sleet
ivory sleet
young knoll
#

Roblox

#

Minecraft has blocks

young void
#

Mind blown

young knoll
#

Therefor same game, case closed

ivory sleet
#

blox = blocks 😭

young void
#

I had a fuckton of monster energy drinks and coffe together maybe thats why im yapping so much

#

Im usually quiet

#

It was mariposa

young void
#

And with each update

#

It seems like mojang personally hates me😭😭😭

#

Also a problem is

#

People try to join with 1.20 for some reason

#

And

#

I cant really make sense to why should ttf font interpretation differ so much from 1.20 to 1.20.4 to 1.21.1 to 1.21.4

#

I think people usually dont concern themselves with resource packs or at least the parts that i have problems with that much?

ivory sleet
#

i suppose

#

i mean yea ppl developed a set of hacks from resource pack

#

and ofc they might break as updates go on

young void
#

If i truly speak my mind people will lock me in a room

#

I always try to conceal my thoughts from the outer world

#

But sometimes... I fail

autumn cave
sullen marlin
#

UTC probably

#

That page is a nightmare though

#

Gonna have to strip all the non-version builds out or something

autumn cave
autumn cave
#

0.0.0 <> 0000

autumn cave
autumn cave
autumn cave
#

Also how does the -a versions work? these were built at very distinct times, but refer to the same version number for some reason

sullen marlin
#

They're hotfixes of a superseded MC version

potent atlas
#

Hello! I am making a custom magma cube but I get an error when I extend the EntityMagmaCube class. I don't fully understand it so I'll just paste the whole thing with my code. The thing is, I don't use the method it's talking about anywhere in my plugin
https://pastes.dev/T11UanLvlY

#

I do not know why it's talking about slimes :/

#

I do have a custom slime class but it's totally separate

mortal vortex
potent atlas
#

I had that o: but when I went to spawn it I got a different error

#

Hang on I'll paste it

#

Can you help me understand what that means?

#

Then I might be able to figure it out

autumn cave
sullen marlin
#

Why do you want a specific build number

autumn cave
sullen marlin
#

Those are pull request numbers

potent atlas
pseudo hazel
#

wtf is method l()

slender elbow
#

what

potent atlas
slender elbow
#

imagine not using mojang mappings

pseudo hazel
#

absolutely unreadable, no wonder the code doesnt work xD

potent atlas
#

works for every other mob 😛

#

I'll convert it though

violet blade
#

rawdogging nms as god intended

dark moth
#

Im using nms but fsr it says ClassNotFoundException: net.minecraft.network.chat.Component

#

Ill send photos in a sec

chrome beacon
#

How did you add the nms dependency

dark moth
#

Hollon sending thw photots!!11!!

chrome beacon
#

I hope you're not sending text as images

dark moth
dark moth
chrome beacon
dark moth
chrome beacon
#

or you didn't show it

#

Send the entire pom

#

?paste

undone axleBOT
dark moth
#

Alrighty!

#

There

thorn coral
#

is anyone good with creating custom minecraft powers

chrome beacon
#

yeah missing remapping

smoky anchor
# dark moth https://pastes.dev/3SpKrZH7P3
JEFF Media Developer Blog

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of �1.20.4� with the version you actually use. What are...

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

dark moth
thorn coral
# chrome beacon ?ask

i’m just look for someone that is capable of creating powers, mainly based off of lighting, using custom textures, that sort of thing

smoky anchor
undone axleBOT
chrome beacon
#

Then

dark moth
smoky anchor
#

the specialsource-maven-plugin
which you can see in the link I provided

autumn cave
chrome beacon
#

I guess something changed in the ci since the hashes are different

#

though since that's not public its a bit hard to know 🤷‍♂️

autumn cave
chrome beacon
#

Not sure, they're not used by BuildTools as far as I can tell

dark moth
#

Guys

#

Is MenuType.COMMAND_BLOCK a thing?

#

If so then why i cant reach it

smoky anchor
#

Are you trying to open it for player ?
Somebody said recently that it's client sided menu and it can't be opened from server-

remote swallow
young knoll
#

builded

autumn cave
chrome beacon
#

As I said something about the ci

autumn cave
#

Any ideas what it could be or who would know?

chrome beacon
#

md would probably know

remote swallow
#

(there is a 99% chance it doesnt matter to you)

#

and iirc the jar has timestamps in of when it was built so that would change the hash

autumn cave
#

Also I'm not sure how versions work when there's no Minecraft server side update like 1.21.9 to 1.21.10. Using BuildTools --rev 1.21.9 it still produces 1.21.10 jar. On https://hub.spigotmc.org/versions you can see that:
1.21.9.json = 1.21.10.json = build 4543, however the "Update to Minecraft 1.21.10" commits were at build 4541, so why is it not that:
1.21.9.json = 4540 (4541 - 1)
1.21.10.json = 4543

autumn cave
# autumn cave Also I'm not sure how versions work when there's no Minecraft server side update...

I'm particularly curious, because I know there's no difference between 1.21.9 and 1.21.10 except Spigot patches that support both versions, but this can cause confusion and this issue that points out that it changes the version number in the jar can lead to some issues with plugins: https://hub.spigotmc.org/jira/browse/BUILDTOOLS-734?focusedId=58705&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-58705

remote swallow
#

is there any reason you actually need this info? eg, 1.21.9 was superceeded with 1.21.10 so there isnt really ever a need for 1.21.9. this entire situation seems xy

autumn cave
#

I see

#

thx

slender elbow
#

bro has been asked like 10 times why they need all this information and hasn't dropped a word of it

dark moth
dark moth
#

Stop laughing grrrr !!!

simple osprey
#
    id 'java'
}

group = 'me.vesder'
version = '1.0'

repositories {
    mavenCentral()
    maven {
        name = "spigotmc-repo"
        url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/"
    }
    maven {
        name = "sonatype"
        url = "https://oss.sonatype.org/content/groups/public/"
    }
}

dependencies {
compileOnly "org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT"
}

def targetJavaVersion = 8
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}
#
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find net.md-5:bungeecord-chat:1.12-SNAPSHOT.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
       - https://repo.maven.apache.org/maven2/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
       - https://oss.sonatype.org/content/groups/public/net/md-5/bungeecord-chat/1.12-SNAPSHOT/maven-metadata.xml
       - https://oss.sonatype.org/content/groups/public/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-SNAPSHOT.pom
     Required by:
         project : > org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT:20180712.012057-156

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
remote swallow
#

should™ be on there

chrome beacon
#

it is on there

simple osprey
#

thanks guys

#

🤍

dark moth
#

Uhh

#

I still cant do the thing so ima ask

#

Is it possible to open a command block.

#

Could be in anyway since i dobt have any options anymore

violet blade
#

No u cant

thorn isle
#

haven't you been told that it's clientside and that you can't

#

like several times

#

i remember telling you that your best bet might be to replicate it with a dialog

dark moth
#

Alr ig

autumn cave
remote swallow
#

probably a failed ci build

harsh bone
#

im tryna make a plugin where the warden drops a chirp music disk ill make a texture pack for it called ''warden core'' BUT IT ISNT WORKING PLEASE HELP 😭 ive been trying for 3 hours im losing my sanity 💀

hybrid spoke
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

hybrid spoke
#

oh thats a new one

hollow reef
#

im using

import org.bukkit.craftbukkit.v1_20_R3.CraftChunk;
import org.bukkit.craftbukkit.v1_20_R3.CraftWorld;

but i updated to 1.21 and now these classes cant be found - how do i make a plugin backwards compatible?

chrome beacon
#

Either you have a module for each nms version

#

or you use reflection

hollow reef
#

oh okay thanks