#development

1 messages · Page 17 of 1

merry knoll
#

seems like you can stream the song but cant get it as a file

#

so you probably need to get it through the stream

#

altho i just checked it fast and not really in detail, it could be somewhere

brittle thunder
#

Give this a shot

vivid flower
#

the minecraft plugin i want to modify wants the mp3 files in plugins/CustomDiscs/musicdata/, it cant handle links

#

let me check it out

merry knoll
#

or just load directly if the plugin has the methods exposed

vivid flower
#

load directly?

merry knoll
#

gotta check the plugin

vivid flower
#

its able to hotload so to speak, no restarting needed for it to detect a mp3 file and use it

#

but idk if thats what you meant

merry knoll
#

yes, but the method it uses for that might be exposed

#

so you could technically just download through the api and load using their method (or your own)

vivid flower
#

never heard of exposed methods before

merry knoll
#

something you can access externally

#

most programs will hide implementation details since if you dont know what you are doing you can break stuff

#

and "expose" methods as an API so you can interact and use them

vivid flower
#

so when checking the plugin for exposed methods, what do i look for?

merry knoll
#

usually they are documented in the github or w.e. you find them

#

if not you gotta dig in and learn how it works sadly

vivid flower
#

yeah no

merry knoll
#

got a link for that plugin?

#

lemme take a look

vivid flower
#

its a third party fork of a fabric mod, ported to paper plugin

dense drift
#

Same question lol

merry knoll
#

this is open

#

under PlayerManager

#

not sure what voicechatserver api is though

vivid flower
#

so

#

theres this mod / plugin called simple voice chat

broken elbow
# dense drift Same question lol

I believe piggy added that at some point. there is some lore behind it, I just can't remember (also wasn't here, just was told)

merry knoll
#

if i were you, i would just add this plugin as dependency

vivid flower
#

users with the mod can talk to eachother in groups or proximity if the server has the plugin

merry knoll
#

then use its methods

vivid flower
#

this thing is an addon to that

#

as a dependency to what?

merry knoll
#

honestly you dont need anything else than that class

broken elbow
#

the answer is a long time

#

almost a year

vivid flower
#

im there rn

merry knoll
#

i think this class has all the logic for parsing the file if i am not wrong

vivid flower
#

the command however, it requires you to input the filename of the file in the folder

#

which is the CreateCommand java file

merry knoll
#

thats the easiest part

vivid flower
#

no idea how to do that

merry knoll
#

if you check the method there

#

it takes a path

#

in playerManager

#

that path is the file path for mp3 file

#

rest of the logic on how the command works is irrelevant

vivid flower
merry knoll
#

you just gotta get the api from the other voice plugin

vivid flower
#

ah i was in the other file

merry knoll
#

get the path

#

give it a player and a block

#

and it should just work

#

and for soundcloud part

#

you will have to download it as mp3 save it somewhere

#

then call this method with its path

vivid flower
#

whats the other part for do you mean, the "give it a player and a block" thing

merry knoll
vivid flower
#

sorry im being slow

merry knoll
#

method takes api, filePath, player and block

vivid flower
#

ahh

merry knoll
#

im guessing block is source of the sound

#

player is who you are playing to

#

path is the file you are playing

#

and api is there to pass its reference (aka address)

#

you should find where the reference to this class is stored though

#

it creates a thread

#

every time its initialized so creating a new instance

#

everytime you play is a bad idea

#

okay you are hella lucky

#

thats also exposed

#

so no need to edit this plugin what so ever

vivid flower
#

huh

merry knoll
#

you can make your own and hook up to it no issues

vivid flower
#

that sounds highly unusual

#

ok but wait

merry knoll
#

you are just gonna do this, simplified version

vivid flower
#

the command wont take links, only the file name

merry knoll
#

you are not gonna use its command

#

at all

vivid flower
#

oh?

merry knoll
#

you will make your own obviously

vivid flower
#

oh

merry knoll
#

but you dont need to make a new sound player thing (or understand how this one works)

vivid flower
#

can you tell i havent made plugins before

merry knoll
#

what you need to do is this:

take link from player
download mp3 from that link somehow(probably a lib for it)
save the mp3 somewhere
call PlayerManager.instance().playLocationalAudio(VoicechatServerApi api, Path soundFilePath, Player bukkitPlayer, Block block)

#

and it should just play

vivid flower
#

that sounds like something i could do

#

if only i knew how to set up a plugin

merry knoll
#

public void stopLocationalAudio(Location blockLocation)

#

this to stop the sound

#

PlayerManager.instance().stopLocationalAudio(Location blockLocation)

#

so like this basically

vivid flower
#

how do I get started with a plugin? like, whats the structure?

merry knoll
#

downloading the file from soundcloud is gonna be your main issue

vivid flower
#

found a plugin for idea that helps with the boilerplate code

magic whale
#

.

vivid flower
#

ok i got the template

#

how will it hook into the other plugin though? they're 2 separate jar files, 2 separate projects, how would that work

merry knoll
#

add it as dependency

#

in your ide

#

then add it to your plugin.yml as dependency

#

so it loads first

vivid flower
#

im not sure how to do that

#

working on it

#

so if i want to depend the original plugin (CustomDiscs) what do I put as the thing to depend?

#
depend:
  - CustomDiscs
#

like so?

merry knoll
#

yep thats it

vivid flower
merry knoll
#

you also want to depend on the other plugin

#

the one with the api

vivid flower
#

the simple voice chat?

merry knoll
#

yeah

vivid flower
#

gotcha

merry knoll
#

whatever its plugin name is

vivid flower
#

the original plugin also depends on protocollib to work

#

so i guess ill also depend on it

merry knoll
#

thats not your concern

vivid flower
#

nevermind

merry knoll
#

you are only depending on the voice one

#

since you have to use it

vivid flower
#

right

merry knoll
#

it takes it as first parameter

vivid flower
#

do i remove the commands line from the original plugin

#

in the yml

merry knoll
#

nah

#

just add a new command

#

not clashing with theirs

vivid flower
#

then i will rename the original one because i want to use that command

merry knoll
#

well

#

you cant just rename sadly

vivid flower
#
  customdisc:
    description: The custom discs command.
    aliases: cd
merry knoll
#

you would need to change the code too

vivid flower
#

cant just replace customdisc with whduhjwd ?

#

ah

merry knoll
#

no

vivid flower
#

true shame

#

okay then

merry knoll
#

make yours dvd or smt

vivid flower
#

genius

#

okay then

#

yml file done

#

i am making good progress for being my first plugin

#

dont you think?

#

now then

#

when the player types the command i want to take the link and download the mp3 to the folder, and then call PlayerManager.instance().playLocationalAudio(VoicechatServerApi api, Path soundFilePath, Player bukkitPlayer, Block block)

merry knoll
#

if you will use this

#

on a production server

#

then you probably want to do that on another thread

vivid flower
#

why and how

merry knoll
#

it doesnt really matter if its just your friends

vivid flower
#

its a server with like 20 people

merry knoll
#

reason being, io operations and downloading etc take time

#

meaning that server has to wait until its done to keep processing stuff

vivid flower
#

but i would like for it to be suitable for more than just whitelisted small servers

merry knoll
#

if you do it on main thread

vivid flower
#

then itll slow everything down

merry knoll
#

it wont slow

#

it will freeze

#

until its done

vivid flower
#

not async

#

right

merry knoll
vivid flower
#

so do i want to create a new thread on plugin startup?

merry knoll
#

you can use integrated methods for it

#

runTaskAsyncronously or smt

#

is the name of it

#

you get it from Bukkit.getScheduler

pulsar ferry
#

You can access the command map and rename the original command so you can add yours if you really want to

vivid flower
#

nah dvd is okay

#

thanks though

merry knoll
vivid flower
#

im completely new to plugins

merry knoll
#

you cant do anything to the server

#

if you are on another thread

#

99% of the bukkit methods are not thread-safe

vivid flower
#

my first project was converting my python discord bot to java, friend was basically doing everything for me for days and just quizzing me, but i took over bit by bit and now i do most of it on my own

#

but that means im basically just familiar with JDA (java discord api)

#

no clue how plugins work

merry knoll
#

reflection is a java thing

#

its not specific to spigot

vivid flower
#

okay

vivid flower
merry knoll
#

oh file operation is fine

vivid flower
#

oh

merry knoll
#

you cant touch bukkit from that thread

vivid flower
#

ohh

merry knoll
#

(or bukkit files)

vivid flower
#

should be fine right?

merry knoll
#

for what you want to do

#

it should be fine

#

just fire a new runnable

#

with the download and saving logic

vivid flower
#

callSyncMethod?

merry knoll
#

once its done return to main thread and play it

vivid flower
#

i believe

merry knoll
#

runTaskAsync - to use another thread

vivid flower
#

no idea how to return but im sure ill figure it out

#

oh

#

oh right

merry knoll
#

runTask to return

vivid flower
#

sync is not async

#

im so smart sometimes

merry knoll
#

using multiple threads in bukkit is simple ish

#

just make sure you dont edit anything from that thread while you are on it

#

use it in self contained sense basically

vivid flower
#

okay

#

so on startup create a new thread

merry knoll
#

no no no

vivid flower
#

on command issued?

merry knoll
#

use the bukkit method

#

it already has a thread

vivid flower
#

yes

#
        // Plugin startup logic

        System.out.println("end my suffering");

        Bukkit.getScheduler().runTaskAsynchronously();
#

wrong place?

merry knoll
#

look into schedulers

vivid flower
#

aha

merry knoll
#

thats not how you use them

vivid flower
#

i have one of those for my bot

merry knoll
#

you cant, this one is a bukkit specific implementation

#

you can use your own threading solution as well

#

but this is simpler

#

and 100% capable of what you want to do

vivid flower
#
    public void onEnable() {
        // Plugin startup logic

        System.out.println("end my suffering");

        BukkitScheduler scheduler = Bukkit.getScheduler();
#

yes?

merry knoll
#

not on enable though

vivid flower
#

how come

#

oh

#

dont answer that

merry knoll
#

it runs the code in runnable in another thread

#

and you want it to happen when a command happens so

vivid flower
#

should i make a separate class file for the command?

merry knoll
#

i would

#

you dont have to but its way cleaner

vivid flower
#

then I will

tight junco
#

keep everything in the same file, don't have any seperation at all

#

and you need to make a new line everytime you use .

merry knoll
#

unless you have 5k lines on one class

#

you are doing it wrong

tight junco
#

a space? nah, new line

vivid flower
#

of course

merry knoll
vivid flower
#

i have a confession to make

#

my python bot was one class file

#

it was.. fun

tight junco
#

average python user

merry knoll
vivid flower
#

yeahhh

merry knoll
#

gimme something to watch, need something on the side monitor while i finish boilerplate code

vivid flower
#

breaking bad

tight junco
#
public
class
MyPlugin
extends
JavaPlugin
{ 
  @Override
  public
  void
  onEnable()
         {
    this.
      getServer().
      getLogger().
      log("kek")
      ;
  }
#

my brain broke too much to go any further than that

merry knoll
#

who needs spacing

vivid flower
#

so im looking at the original plugins command thing

#

it has a public string getName, getDescription and getSyntax

#

guessing these are all needed in mine too

merry knoll
#

if you extend CommandExecutor

#

it will tell you the exact method you need

vivid flower
#

didnt know that existed

#

nor what it does

merry knoll
#

its how you set up commands in bukkit

vivid flower
#

it wants implements and not extends

#
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;

public class Command implements CommandExecutor {


    @Override
    public boolean onCommand(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {
        return false;
    }
}
#

it just kinda made all of this for me

tight junco
#

yeah thats what you're supposed to do

merry knoll
#

yeah

vivid flower
#

oka

merry knoll
#

could be, its been a while since i did it manually honestly

tight junco
#

yeah it'll manually do all of that

vivid flower
#

i do also want to add a permission and check if the player has the permission before the rest of the command continues

#

guessing CommandSender sender is the player

merry knoll
#

its as simple as

#

player.hasPermission(String)

vivid flower
#

and add a permission to the yml

tight junco
#

CommandSender is whatever sent the command

merry knoll
#

nah

#

ignore the yml for permissions

#

not needed

vivid flower
#

ok

#

so if i want the permission to be dvd.command then

#

player.hasPermission(dvd.command)

merry knoll
#

with ""

tight junco
#

you're gonna want to check if its a player first smil that CommandSender could be a player, could be console, could be a command block, etc

vivid flower
#

yes

merry knoll
#

since its a string

vivid flower
#

oh right

#

youre so right

tight junco
#

i always am

vivid flower
#

you always are

tight junco
#

d;spigot Player#hasPermission(String)

uneven lanternBOT
#
boolean hasPermission(@NotNull String name)```
Description:

Gets the value of the specified permission, if set.

If a permission override is not set on this object, the default value of the permission will be returned.

Returns:

Value of the permission

Parameters:

name - Name of the permission

tight junco
#

pog

#

look at me remembering how to use the command Wiggle

tight junco
vivid flower
#

oka i back

#

had to use the oval office

#

there

#
public class Command implements CommandExecutor {


    @Override
    public boolean onCommand(@NotNull CommandSender sender, org.bukkit.command.@NotNull Command command, @NotNull String label, @NotNull String[] args) {

        if(sender instanceof Player && sender.hasPermission("dvd.command")) {
            
            //stuff
            
        }

        return false;
    }
}
#

so far

#

this will work with luckperms yes?

#

if i give a player dvd.command thru luckperms then the command will work

#

so now comes the hard part, soundclouding

#

"take link from player
download mp3 from that link somehow(probably a lib for it)
save the mp3 somewhere
call PlayerManager.instance().playLocationalAudio(VoicechatServerApi api, Path soundFilePath, Player bukkitPlayer, Block block)"

#

so first of all i need to have a syntax for the command

#

./dvd create <url> <lore>

#

im gonna make it a subcommand instead

#

fancier

#

alright so its like 7:45pm

#

i think im going to continue working on this tomorrow

#

ty for the assistance @merry knoll much appreciated ❤️

hoary scarab
#

Does this make sense?

private Pattern mcFormattedHex = Pattern.compile("&x([A-Fa-f0-9&]){12}");
public String decolorHex(String s) {
    Matcher matcher = mcFormattedHex.matcher(removeColor(s));
    ConsoleOutput.log("DEBUG >> Decolorized: "+removeColor(s)+(matcher.find() ? " Matcher Found" : "")
    ConsoleOutput.log("DEBUG >> Match: "+matcher.find())
```Output: 
> DEBUG >> Decolorized: &x&1&8&f&2&7&d(10) ..... Matcher Found
> DEBUG >> Match: false
dense drift
#

Matcher#find is something like Iterator#hasNext 🙂

hoary scarab
hoary scarab
#

Thinking of something else when you said iterator.hasNext() so just read the bottom of the last message.

lyric gyro
#

Matcher#find mutates the matcher and tries to find the "next" match in the input string (or the first one if no finding has been attempted)

#

it doesn't return if there is a match, it returns if there is a subsequent match to continue processing the matcher and it "stands" the matcher wherever the potential match is at, if there is no next match, it'll return false

hoary scarab
#

I'll show my code when I get on PC. I do basically the same thing to color the string with hex. Just decoloring it doesn't want to work.

lyric gyro
#
Pattern pattern = compile("hi");
Matcher matcher = pattern.matcher("hi hi hi");
matcher.find(); // true "*hi* hi hi"
matcher.find(); // true "hi *hi* hi"
matcher.find(); // true "hi hi *hi*"
matcher.find(); // false "hi hi hi" no matches left
#

By calling find in the logging you're mutating the matcher's Internal state

robust flower
#

is there any way of changing the outline color of an entity without team packets (or real teams for that regard)?

hoary scarab
dense drift
gusty crest
#

Hey, is it possible to make playtime levels with DeluxeMenus?

#

if i use javascript type and expression %statistic_hours_played% >=

dense drift
#

Wrong channel

hoary scarab
charred ravine
#

I'm having trouble with how I can make chances, like for example how can I make a chance system where every kill it has to always drop something but the rarity of items is different? I've tried googling it but can't find anything :/

merry knoll
#

use random

charred ravine
#

yes but it only drops those items sometimes like it doesnt always just pick one

merry knoll
#

how did you implement it?

#

show some code

charred ravine
#

i need it to always drop an item but pick the rarity

merry knoll
#

random is the solution here, then you will set the rarities from it

charred ravine
#

well I deleted that code but it was someth like if (random.nextint(100) + 1) < 80) {

merry knoll
#

okay, then 20% it wont drop with that code

#

80% chance it goes into the if

charred ravine
#

yes so how do i make it 100% chance to choose something to drop but with differenty rarities

merry knoll
#

use else?

#

80% chance it drops x else aka last 20% chance

#

drops y

charred ravine
#

hmm

merry knoll
#

and for a lot of ranges

#

just seperate the number

#

int random = random.nextInt(100)

#

if(random < 20) // 20% chance
{
// 20% chance code
} else if (random >= 20 && random < 40) // another 20%
{
} else if .. repeat

charred ravine
#

ah thank you

merry knoll
#

if i were you though, i would just use a double

#

0 - 1

#

0.5 beign 50% chance etc

merry knoll
#

then pick randomly from the array

charred ravine
#

yeah was thinking of array

#

i get the idea now though

merry knoll
#

you can store the same object multiple times to change its %

charred ravine
#

thank you for the help 😄

merry knoll
#

["drop1","drop1","drop1","drop1","drop2"]

#

random pick from this gives you 80% drop 1 20% drop 2

queen plank
#

I have this code for a void world chunk generator in my plugin: https://paste.helpch.at/ekovirisah.java. However, I want to support 1.17+ version to be used and some of the methods from 1.18+ does not exist in 1.17. How would I go about doing this?

#

I assume I need NMS, but ChunkGenerator does not exist in 1.17?

merry knoll
#

ChunkGenerator has been a thing since 1.8

#

doubt its not there on 1.17

merry knoll
#

for lacking methods, you need to either do reflection

#

or even better different generators depending on version

molten nimbus
#
var datt = (async () => {
    try {
        const price = await Fetcher.getItemPrice({ 
            market_hash_name: market_hash_name,
            appid: 730
        });

        return price;
    } catch (error) {
    }
})();
console.log(datt);```
hi amm anyone can please tell me why this returns me on console Promise <pending>? pretty much clue less
stuck hearth
#

Js?

#

Basically it's because you're awaiting a response, there's a way to get the response. But I forgot how to do it.

Google await in js
It should give you a decent idea

molten nimbus
#

im not following

dense drift
merry knoll
dense drift
#

e.g. datt.then((data) => console.log(data))

merry knoll
#

when you fetch a data, it promises something will be returned in the future

#

since it takes time to get it

merry knoll
strange remnant
#

How do I fix this

grim oasis
#

wela is not aligned correctly

#

it's 1 over

#
main: me.ohlqvely.welamc.Main
name: WelaMC-Sabri
version: 1.0
description: CustomCommands
author: OhLqvely
commands:
   discord:
      description: discordlink
      permission: core.discord.use
      aliases: 
      permission-message: Geen permissie!
      usage: "Usage: /discord"
   wela:
      description: wela socials
      permission: core.wela.use
      aliases: 
      permission-message: Geen permissie!
      usage: "Usage: /wela"
strange remnant
#

I changed everything just for that

#

let me test my new thing

#

otherwise imma copy it

grim oasis
#

that's what I use

strange remnant
#

wela command not showing up

pulsar ferry
#

You put the wela command in the permissions block instead of the commands block

molten nimbus
lyric gyro
#

mixing await and .then is bad practice, in your example above you'd do console.log(await datt)

winged pebble
#

^ when you mix await and .then syntax, you get confusing behavior

molten nimbus
#
var price = getSteamItemPrice("AK-47 | Redline (Field-Tested)", 730); //returns undefined

function getSteamItemPrice(hash_name, appid) { 
    Fetcher.getItemPrice({
    market_hash_name: hash_name,
    appid: appid,
    callback: (err, price) => {
        if (err) throw err;

        callback(price);
    }
});```
Ok I made some arrangement in the mess and i came up with this but I don't understand why the var is still undefined.
#

I clueless on this

merry knoll
#

which actions are safe to do on an inventory thread wise?

#

can you for example edit it on one thread then display it on main? i know it does cloning with setting items and such but not sure on the exact implementation

winged pebble
robust flower
#

how does spigot order listeners with the same priority, are they ordered by insertion order?

merry knoll
quaint skiff
merry knoll
#

instead of editing the score itself, set a team to it

#

then edit the values of the team

quaint skiff
#

thx, I will try that 🙂

merry knoll
#

depending on the string length

sudden sand
#

How can I get how much tool is damaged at block break event with spigot api

proud pebble
leaden plume
#

Hey has anyone used vercel before with a single domain and multiple repos?

I have 3 repos one using domain.com/1 /2 and /3 and the normal way to set it up wasn't working for some reason as in https://drew.tech/posts/vercel-multiple-repos-same-domain so I did a hacky way to make it work but now its causing infinite loops and I am not sure how to fix it or make the proper way work.

How to do micro-frontends on Vercel with a single domain.

dusty frost
dusty frost
#

Then any reason for not combining them into a single app? Presumably they're in Next, you could just use Next's routing

leaden plume
#

landing page nextjs
Dashboard nextjs
docs / wiki
articles
web leaderboard

dusty frost
#

Yeah I mean I dunno man, sounds like a really good usecase for subdomains lol

dark garnet
#

any better way to store this data?

e907083e-5db6-41fc-9e32-5c4d99a08712:
  '1':
    reason: test
    mod: e907083e-5db6-41fc-9e32-5c4d99a08712```currently using this:```java
Map<UUID, List<Map<Integer, Map<String, UUID>>>>```which is... uh... yea..
merry knoll
#

make a wrapper

dark garnet
#

whats that?

merry knoll
#

wrap the objects that you need to store

#

into another object

#

so its actually readable

dark garnet
#

can u give me an example?

merry knoll
#

what is this supposed to be exactly

dark garnet
#

warnings

merry knoll
#

okay, then

#

create a warning object

#

with who it is targeting, reason and who applied

#

then create a profile object of sorts with a set in it

#

that stores these warning objects

dark garnet
#

i love when intellij just doesnt show me the new file menu ❤️

dark garnet
# merry knoll with who it is targeting, reason and who applied

is this right?

public class Warn {
    private final UUID player;
    private final int id;
    private final String reason;
    private final UUID mod;
    public Warn(UUID player, int id, String reason, UUID mod) {
        this.player = player;
        this.id = id;
        this.reason = reason;
        this.moderator = mod;
    }
    public UUID getPlayer() {
        return player;
    }
    public int getId() {
        return id;
    }
    public String getReason() {
        return reason;
    }
    public UUID getMod() {
        return mod;
    }
}```
merry knoll
#

yeah looks good

#

i would also wrap the player object

#

and tie it as value

#

to uuid as hashmap

#

(or concurrenthashmap if multi threaded)

dark garnet
#

what-

stuck hearth
#

classic POJO

dark garnet
#

cause intellij tells me that it can just be a record, but ive never used records before

stuck hearth
#

Pretty sure l

#

It's the same thing

dark garnet
#

👀

dark garnet
merry knoll
#

set is not ordered

dark garnet
merry knoll
#

if it doesnt matter, stick with set

#

its faster with lookups too

#

if you want to do .contains etc

#

especially hashset for ^ operations like these

dark garnet
#

ah alr then ill definitely use set

#

good to know for the future cause i usually just use List

dusky harness
#

and also fun fact: HashSet uses HashMap and iirc the set is just the keys of the map

#

and hashmaps can't have duplicate keys :)

dark garnet
#
public record Mute(UUID player, String unit, String reason, long time, UUID mod) {}

public class DataManager {
    public static final Set<Mute> mutes = new HashSet<>();
}```how would i get all muted players?
#

this is what i have rn but i wanna know if there is an easier/better way:

public static Set<UUID> getPlayers() {
    final Set<UUID> muted = new HashSet<>();
    for (final Mute mute : DataManager.mutes) muted.add(mute.player());
    return muted;
}```(inside `Mute` record)
winged pebble
#

I'm confused what you're asking

#

You want to do getPlayers() inside of Mute?

dark garnet
# winged pebble You want to do getPlayers() inside of Mute?

no im saying i have this:

public record Mute(UUID player, String unit, String reason, long time, UUID mod) {
    public static Set<UUID> getPlayers() {
        final Set<UUID> muted = new HashSet<>();
        for (final Mute mute : DataManager.mutes) muted.add(mute.player());
        return muted;
    }
}```
#

and i wanna know if there's a better way to get players

winged pebble
#

I would personally use a stream

#

And wouldn't have any of it be static

#
return DataManager.mutes.stream().map(Mute::player).toSet();
#

Or .toCollection(new::HashSet)

dark garnet
winged pebble
#

I don't think that function belongs in the Mute class tbh

stuck hearth
#

I don't either

#

This record represents a singular Mute, what players are you getting?

winged pebble
#

They are accessing a static Set in DataManager

stuck hearth
#

It was a question for them not their code.

stuck hearth
stuck hearth
#

Also maybe organize it better than one large list

primal otter
#

objects:
Account
Mute
PlayerStat
Spawn...

managers:
MuteManager
PlayerStatManager
SpawnManager...

dark garnet
stuck hearth
#

AbstractManager moment

dim hatch
#

hi

#

does latest version of deluxemenus works on 1.8.8?

broken elbow
daring sapphire
#

Hi everyone, I've got a little issue with my pom.xml could someone help me please.

#

(Caused by JDA 5.0.0)

robust flower
#

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

Re-run the build with -e flag

daring sapphire
#

Thanks everyone it's fixed !

proud pebble
daring sapphire
#

Maven version compiler was too old

proud pebble
#

lol

daring sapphire
#

😭

somber moon
#

hey guys, can i use a placeholder to return something in a javascript placeholder?

#

like i want to pick info from another placeholder

#

and save it in a javascript

merry knoll
quartz cloud
#

So who can give me my EZRankPro tag if there is one?

acoustic moss
#

Hi. I'm looking for a way to override whatever is the responsible of listening to/handling incoming TCP connections in NMS. I basically want to proxy everything. my goal is preventing "connection close" that happens after a "player kick event". any ideas?

stuck hearth
#

netty

dark garnet
#
public class Spawn {
    // Variables
    private final String team;
    public Location location;
    
    // Constructor
    public Spawn(String team, Location location) {
        this.team = team;
        this.location = location;
    }
}``````java
public Map<String, Location> spawns;```is there any difference between these?
dusty frost
#

well, the object can have methods and state

dark garnet
dusty frost
#

other variables

#

you could, for instance, keep track of how many players have spawned there, or something

dark garnet
#

oh ye

dusty frost
#

if you literally need nothing more than a mapping of String to Location, then a Map will work fine

#

but if you ever want anything more, or if you want to work with them together, then you'll want an object

dark garnet
#

alr, ty

sand ermine
#

Hey there,

So basically what I am trying to do is when a button is clicked edit an embed.

Now all I want to do is add 1 line to the already existing embed, I have got the message, and then the embed and am able to edit it and update it. But it deletes everything and then just sends the one line i added, anyway to get the current embed data and add it to the new embed?

#

anyone who knows js that could help?

dusky harness
#

Ask in discord js if u haven't already

#

(server)

vestal talon
#

I have a weird issue, when I'm trying to loop through all entities in the world while the server have 1+ players it's finding them all,
but once the server empty from players it's not finding them all and gives less results, why is it?
The current code:

for (Entity entity : Bukkit.getWorld(CustomPlugin.getInstance().getMainManager().getDataManager().mainWorld).getEntities()) {
        if (entity.getType() == EntityType.ARMOR_STAND) {
            entity.remove();
        }
}
#

I tried also if(entity instanceof ArmorStand) but same results...

sand ermine
hoary scarab
vestal talon
hoary scarab
merry knoll
#

and remove

edgy lintel
#

anyone know javascript

#
var scripts = document.getElementsByTagName('script');
        for (let script in scripts){
            console.log(script.src);
        }

why does this print undefined pls help

cinder forum
#

or you are trying to print the code?

edgy lintel
#

anyway thx so much tho thats cool

#

getAttribute is elegant

dense galleon
#

Can I not set a slime's base attributes with this code?

        mob.getAttribute(Attribute.GENERIC_MAX_HEALTH).setBaseValue(type.getHP());
        mob.getAttribute(Attribute.GENERIC_ATTACK_DAMAGE).setBaseValue(type.getDmg());
        mob.getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(type.getSpeed());```
#

It doesn't seem to work at least

#

I change the attributes after the entity is spawned, though I tried before as well and it didn't work

dense galleon
#

Also, do slimes deal X amount of damage based on their size?

spiral prairie
#

triumph gui apparently wants minimessage from oraxen

#

(gradle says the same)

dense drift
#

Is the right import of triumph-gui ?

#

And try to refreh gradle

spiral prairie
proud pebble
#

looking at the github it wants adventure's component

#

weird

stuck hearth
#

That's not weird

proud pebble
#

it feels weird

stuck hearth
#

Paper uses adventure components be default as well as spongepowered IIRC

proud pebble
#

in the ide it says it was oraxens component, but on the github it wants papers components

#

wants

#

thats whats weird

stuck hearth
#

Oh I see

#

Who's oraxen?

proud pebble
#

oraxen i think is a plugin

stuck hearth
#

That's just a relocated dep, how are you importing this dep? @spiral prairie

stuck hearth
#

That doesn't seem right

#

What is oraxen even for

spiral prairie
#

only need it for the api

stuck hearth
#

Is it provided at runtime?

spiral prairie
#

ye i guess so

stuck hearth
#

What are the imports at the top of the file?
Is the gui coming from triumph?

spiral prairie
#

i have the imports set to the correct thing

#

but crazy gradle still somehow mapps it to the oraxen thing

#

like why

vestal talon
#

I never messed with chunks and stuff like that so if you can explain a bit and send me reference from docs it will be much appreciated (:

hoary scarab
#

On chunkloadevent retrieve the entities, loop through them to find the armorstands and delete them.

spiral prairie
#

any good java libraries for just creating a simple interactive shell?

#

like

#

that has a loop and waits for user input and maps commands to methods

#

i tried picoli, but that was just running a command everytime your run the jar, not in a feedback loop

proud pebble
#

just make a while loop?

#

idk

spiral prairie
#

yeah thats like the low budget version, but i like it with ansii, auto completion and suggestion, history, fancy colors n stuff

#

i mean, i could do that but im lazy

lyric gyro
#

jline

spiral prairie
#

confusing

lyric gyro
#

that's like the best you're gonna get

#

so

#

L

spiral prairie
#

yep

#

ill use spring shell

shell moon
#

Someone using (Advanced)SlimeWorldManager?
I think i know how to create a new world and how to load a world, but
what if I wanna save changes made in the current world (like when editing a minigame arena), how would I do that?
Thanks in advanced

tidal canopy
#

Question to all the minecraft plugin developers

If I were to make a plugin where I check every block in a 100x100x100 area around the player, will I have to make it async or not? (Plugin that basically just searches for a type of block in an area, to help clean up event areas)

Why make it async or why not make it async?
Do you have any good reading material I can look at to learn about making my plugin multithreaded

sterile hinge
#

just be aware that it's unsafe to access anything world-related asynchronously

merry knoll
sterile hinge
#

?

merry knoll
#

you can clone the chunk data

#

loop over async

#

without any issues

#

concurrency issues only occur if you access a mutable variable

sterile hinge
#

yes, but that's something different

merry knoll
#

except that it isnt

#

direct access is thread-unsafe

sterile hinge
#

a snapshot isn't part of the ticking world anymore

merry knoll
#

yes, but for the purposes of what they want to do, its quite valid

sterile hinge
#

sure, still something different

merry knoll
#

other than looping over all blocks

merry knoll
#

limiting yourself to bukkit only resources is not a great idea, resources there are usually either bad or outdated

leaden plume
dense drift
#

According to the developers' roadmap, the SurrealDB 1.0 release is planned for release in September, 2022
I doubt

merry knoll
leaden plume
#

ya ^

dense drift
#

yeah I know it is realeased

leaden plume
dense drift
#

I'm just saying it is too new for many people to use it

leaden plume
#

damn 😦

merry knoll
leaden plume
#

hm

#

they started development back in 2015

#

😛

dense drift
#

And?

leaden plume
#

idek

#

It looked good just hoping not to good to be true yk

merry knoll
#

realtime data changes part and its syntax are the main hype points

#

but again, for a production db i would stick with something tested for now

dense drift
#

It looks interesting, but I agree with Aki ^

merry knoll
#

but syntax is not a huge deal once you deploy

#

do you need the real time synching ?

leaden plume
#

ya

merry knoll
#

its usage cases are quite limited i feel like

leaden plume
#

@merry knoll debating to duel database to just test it and see how well it is thoughts?

merry knoll
#

imho not worth the hassle

#

again, i would just go with something tested and port after if surreal is stable enough for production

leaden plume
#

atm I use mongodb / redis

merry knoll
#

using redis for the pubsub?

#

if not its kinda redundant i feel like

leaden plume
merry knoll
dusty frost
#

the pub/sub is just also a nice addon

merry knoll
#

and memory caching doesnt exactly scale well

dusty frost
#

what lol

merry knoll
#

i mean it has the whole slave - master thing, but its really not ideal

dusty frost
#

the whole point of caching is so that you can scale well

dusty frost
dusty frost
merry knoll
dusty frost
#

still, you don't really want to scale the actual redis itself

merry knoll
dusty frost
#

it'd be better to use it as a cache per server instance

#

i mean they don't serve the same purpose

#

redis is for caching, mongo is a persistent database

#

would you say you don't need both redis and postrgres?

#

or does mongo being nosql mean it's a replacement for redis lol

tired olive
merry knoll
#

we are saying the same thing but i am failing to articulate myself i feel like, a lot of use cases of redis that i see dont exactly need caching

dusty frost
#

we definitely aren't saying the same thing lol

#

redis is not a persistent database

merry knoll
#

yes i am aware

dusty frost
#

mongo is

#

so using both together

#

is a good idea if you want caching of some kind

merry knoll
#

my point was chances are the use case doesnt really require caching

dusty frost
#

depends on what you're doing

#

i've seen django with mongo for persistence and redis for session caching

merry knoll
# dusty frost depends on what you're doing

okay time to stop being lazy and type proper:
yes it 100% depends on the use case, its just that i have seen a lot of people abuse redis as a persistent database since it supports snapshot saving

depending on use case for them i would probably just go with an sql + redis if needed (postgre or any other enterprise solution)

#

instead of trying to use literally released this month db's that are untested in production

dusty frost
dusty frost
#

and I was like definitely not lol

merry knoll
#

no its more that 90% of the cases i see just basically abuse redis

#

while sql is 100% of capable of what they want to achieve

dusty frost
#

oh huh yeah, i haven't seen anyone abuse Redis I don't think actually lol

#

maybe I just don't interact with it enough

merry knoll
wintry grove
#

Redis is good for fast and large data caching across several servers

#

Mongo is good for also cross server data storage but faster and for smaller amounts of data

tired olive
#

...

dense drift
#

Due to spigot's shitty system for (anything tbh) dependencies management, what would be an optimal way to use adventure in a plugin and its api, and allow others to use their own version of adventure? I know people like luck published their own adventure artefacts on maven central and others can use that instead of the official one 😬

dense drift
#

Yeah.. but methods that expect my relocated components for example, won't accept yours 😬

merry knoll
#

just move it to dev.gaby.dependency.net.kyori or smt

#

ah, you mean for the api

#

just make a wrapper

dense drift
#

a wrapper?

merry knoll
#

wrap the component with your own

#

and take that as parameter

#

your component depends on the relocated package, whoever is using it depends on the wrapper

dense drift
#

I don't think I understand what you mean by that

#

Do you mean something that will hold the string value and also the component?

merry knoll
#

depends on how you want them to use it

#

if its just string values that will get parsed

#

then no need for component on parameter

#

but if you want to support components like it was intended, then you gotta wrap that

#

class YourComponent {
// relocated component here

// builder method
}

dense drift
#

Hmm, I see.

merry knoll
#

and parse it with minimessage

dense drift
#

Yeah, it might be

#

I will think about how messages will be implemented, maybe it won't be a pain xD

spiral prairie
#

so its just the source and you can use the unrelocated components ig

dense drift
#

If you dont relocate libraries it will cause problems

spiral prairie
#

yes but you dont ship the lib

#

and it wont be run on the server cuz its just the api artifact

stuck hearth
#

If it's not on the classpath then your plugin can't use it.
If it is on the classpath then it will clash if not relocated.

spiral prairie
#

just split your api and plugin with modules and interfaces

stuck hearth
#

So I need, for my project, an import of Caffeine;
Usually I would provide this by shadowing the dependency with my jar

You're saying, just split my api and plugin with modules and interfaces

spiral prairie
#

i have it in two of my projects and it seems to work fine

dusky harness
#

This allows the user to exclude dependencies

#

And view what dependencies your project is using in the api

grand zodiac
#

target.setFireTicks(60);
When I run this, it sets the target on fire for around a third of a second then stops, does anyone know why?

#

Same thing happens regardless of how high I make the tick count

cerulean gale
#

@grand zodiac

#

Cloud you help me?

grand zodiac
#

Wait nevermind I was in creative mode oops 😭

cerulean gale
grand zodiac
dense drift
#

And if you provide a different api jar, it won't work. You have probably seen APIs for premium plugins that have dummy classes and methods throw some kind of exceptions, that's because at runtime those classes will be replaced by the actual classes

lyric gyro
#

If you want to expose or interact with adventure in the API itself, and the plugin relocates adventure, the API has to provide the shaded & relocated version of adventure

dense drift
#

yeah 😦

lyric gyro
#

It is, for all that matters, not adventure, an entirely different class that is not net.kyori.adventure... that just happens to share the simple name

stuck hearth
grand zodiac
#
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (!(sender instanceof Player)) { return true; }
        Player player = (Player) sender;
        if (args.length == 0) {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&',"&d&lPowers &8» &7You must specify a player to cast lightning on!"));
            return true;
        }
        if (args.length == 1) {
            Player target = Bukkit.getPlayer(args[0]);
            assert target != null;
            World world = (World) player;
            world.strikeLightning(target.getLocation());
            player.sendMessage(ChatColor.translateAlternateColorCodes('&',"&d&lPowers &8» &7&dYou &7have struck lightning on &d" + target.getName()));
            target.sendMessage(ChatColor.translateAlternateColorCodes('&',"&d&lPowers &8» &dYou&7 have been struck by lightning."));
            return true;
        }
        return true;
    }```
Does anyone know why it gives an internal error whenever I run the command? It does not give one when running it without arguments, but does when running it with a player argument
#

I can provide the stacktrace if needed but I have no idea how to read them (i really should learn but i dont know where to start), thanks!

#

(sorry to anyone who read that earlier i put the wrong file lol)(

merry knoll
#

do post the stacktrace

tight junco
#

yeah can you send the stack trace, they're decent because they should tell you exactly what line they're on etc

stuck hearth
#

Yeah we can help you read it

grand zodiac
tight junco
#

i would like to point out that assert does basically nothing and you will have to check if the player is null

merry knoll
#

line 24

#

at dev.hepno.powers.powers.Commands.Lightning.onCommand(Lightning.java:24) ~[Powers-1.0-SNAPSHOT.jar:?]

#

it tells you here

grand zodiac
tight junco
merry knoll
#

World world = (World) player;

#

ah yes

tight junco
#

yeah

merry knoll
#

a player is not a world

grand zodiac
merry knoll
#

player.getWorld is the one that you want

#

(World) this

tight junco
#

intellij can be pretty stupid sometimes YesYes

stuck hearth
merry knoll
#

tries to cast the object into whatever you put in there

#

so (Player) sender

#

only works since the sender IS and can be a player

#

which is not true for a world on a player

grand zodiac
#

ahh makes sense, thank you

merry knoll
#

to get the world a player is in

#

player.getWorld()

grand zodiac
#

thank you so much guys for the help!

#

very much appreciated!!

tardy cosmos
#

Anyone have any idea for how to go about dynamically downloading dependencies that still works with Java 17? I know LuckPerms does it with some sort of jar-in-jar system but I have no clue how that works. I'm trying to download database drivers only if they're needed so my jar size isn't needlessly large and exceeding the spigot upload limits. Please ping me if you reply ty

dusky harness
tardy cosmos
#

regrettably I want to keep 1.8 support because people refuse to move on, thanks though, I'll look into that

dusky harness
tardy cosmos
#

oh it's yours lol

dusky harness
#

nope

#

temp fork

#

until yugi merges it

#

unless he fixed it

#

I think yugi merged it

tardy cosmos
#

alrighty thanks a bunch

lyric gyro
#

np

dusky harness
#

since his maven repo is down

tardy cosmos
#

would it be fine if I published it to my own

dusky harness
#

uhhhh probably not

#

it's compatible with CI though

#

just git clone

#

worked with github actions at least :))

#

not sure if I still have the script though since I moved to spigot libraries

#

nvm I have it

tardy cosmos
#

well time to go learn how to translate my mysql queries to postgresql lol

dusky harness
#

this is what I use

tardy cosmos
#

It was in fact a lot more similar than I thought it would be. Only major difference was how auto incrementing IDs work

round sail
#

Anyone got that picture of the inventory slot numbers for all the different containers handy?

#

Namely looking for anvil and enchant table rn.

winged pebble
#

anvil should just be 0-2 left to right

round sail
spiral prairie
#

is the sk89q maven down?

merry knoll
#

just type on your browser

spiral prairie
#

ye did and it was down

#

just wanted to know if its just for me or for anyone else

merry knoll
#

on phone atm can check in a min

spiral prairie
merry knoll
dense drift
#

one is a mirror of the other iirc

spiral prairie
#

alr

sterile hinge
proud pebble
#

Do entities save custom nbt data on server shutdown?

#

cause i remember seeing somewhere that itemstacks do, but entities and tiles dont

tardy cosmos
#

it is 1.14.4+ only though afaik

dense drift
#

yes

proud pebble
#

so im stuck using pdc, great...

hoary scarab
proud pebble
#

so im stuck using pdc, great...

spiral prairie
proud pebble
dense drift
#

whats wrong with pdc?

#

it is just bukkit's implementation of nbt

#

except that values are stored under a compound named BukkitPublicValues

proud pebble
#

what i dont like is that its pluginname:value

#

thats it

#

you also cant read/modify original values

dense drift
spiral prairie
spiral prairie
floral beacon
#

is it possible to detect ProxiedPlayer MC version (so basically i just need if it's 1.8 / 1.15 / 1.19)? Bungee plugin

#

Please tag me / reply with tag to my message whoever answer me

proud pebble
#

which is why i prefer nms over using pdc

#

cus you can modify them if you want to, or read them aswell

#

since currently there is no goat horn itemmeta so reading the goat horn sound type is impossible without nms

spiral prairie
#

I see

#

For that case, an nbt api would be good

#

Fot just storing and reading plugin data on entities, pdc is best

hoary scarab
dusky harness
#

I don't think so

#

Custom model data is for resource packs

#

Afaik that's its only purpose

hoary scarab
#

Yeah so is the audio of the horn

dusky harness
#

Well not really

#

Or

#

Ig I see what u mean

#

But custom model data is for mods/plugins I think

#

So they made a new tag

hoary scarab
#

🤷 there is data packs that add new audio for horns so the data has to be available somewhere.

dusky harness
#

Yea it should say on the wiki

#

I think

#

1 min

#

Oh the tag is instrument

proud pebble
#

yep

dusky harness
#

And for some reason spigot didn't add an api

#

:((

proud pebble
#

currently theres no way to get it without nbt

#

its quite sadge

dusky harness
#

There's nbtapi btw

#

But still unfortunate

proud pebble
#

currently i just use nms instead of relying on nbtapi

dusky harness
#

🤔

#

Interesting choice

#

How come?

#

U can shade it

proud pebble
#

im not just using nbt, im also using other nms stuff for custom mobs

dusky harness
#

Okay

proud pebble
#

cus spigot doesnt have api for custom mobs yet

#

i wonder when that will be added

#

probably never

#

idk

dusky harness
#

so what is the parameter (data) used for??

#

was it ever being used?

#

this is decompiling spigot-1.8.8-R0.1-SNAPSHOT.jar

icy shadow
#

it's probably overriden

dusky harness
#

ohhhh

#

that makes sense

icy shadow
#

iirc in nms there's 1 class per block type, so that would be for things like coloured wool

dusky harness
#

so I'm guessing that there's no way to replicate that method

#

:((

icy shadow
#

wdym

dusky harness
#

trying to update a plugin from 1.8 NMS to 1.18

icy shadow
#

ehhhh

#

not easily

dusky harness
#
    private void sendPacket(final Block block, final Location loc, final Player player, final Material material, final byte data) {
        final ClientboundBlockUpdatePacket packet = new ClientboundBlockUpdatePacket(((CraftWorld) block.getWorld()).getHandle(), new BlockPos(loc.getX(), loc.getY(), loc.getZ()));
        packet.blockState = CraftMagicNumbers.getBlock(material).fromLegacyData(data);
        ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
    }
```this is the full code btw
#

half updated half non updated

#

lol

icy shadow
#

well in later versions you wouldnt need the legacy data

proud pebble
#

im assuming that the method parameter is left unused just so it doesnt break older plugins?

icy shadow
#

it's just the material / block

dusky harness
#

oh

icy shadow
dusky harness
#

d;spigot Block#getdata

uneven lanternBOT
#
@Deprecated
byte getData()```
Description:

Gets the metadata for this block

Deprecation Message:

Magic value

Returns:

block specific metadata

dusky harness
#

so this is useless?

icy shadow
#

yes

dusky harness
#

got it

#

ty bm

#

:D

icy shadow
#

it will always be 0 on 1.13+ afaik

#

np

#

thats what the whole conversion was doing behind the scenes

dusky harness
#

Another question - is there a list of plants that are 2 blocks high?

#

basically Material.DOUBLE_PLANT but modern :))

#

can't find anything online

#

besides looking at all of them

#

ooh

#

found it

#

okay what is LONG_GRASS 🥲
legacy has GRASS and LONG_GRASS
but no GRASS_BLOCK

but newer has GRASS, TALL_GRASS, and GRASS_BLOCK

#

🤔

#

I wish there was a conversion chart

#

or actually there's XMaterial

#

so apparently an orange tulip used to be... RED_ROSE

#

might just use XMaterial

#

seems pretty neat

icy shadow
icy shadow
proud pebble
#

im having a fun time going down the chain of how minecraft crafting inventories work

hoary scarab
grand zodiac
#

I've tried adding VaultAPI to my pom.xml, but IntelliJ says "Dependency 'com.github.milkbowl.vault:1.7-3' not found"

dense drift
neat pierBOT
#
📋 Your paste: Hepno
https://paste.helpch.at/daniteloki

A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.

grand zodiac
#

Ahh right pastes, sorry forgot those existed

grand zodiac
dense drift
#

you copied the wrong artifact

grand zodiac
#

I've tried both vault and VaultAPI, vault being whats found on jitpack and VaultAPI on github, neither work

dense drift
#
    <dependency>
        <groupId>com.github.MilkBowl</groupId>
        <artifactId>VaultAPI</artifactId>
        <version>1.7</version>
        <scope>provided</scope>
    </dependency>```
This works 100%
grand zodiac
#

Nope same bug unfortunately

warm steppe
#

Use gradle bruuh

merry knoll
#

to use github repos directly you need jitpack as your repository

grand zodiac
#

On Maven?

#

Yeah

#

Hold on wha

#

I restarted IntelliJ and now it works fine

#

No idea why, maybe IntelliJ was just being weird

grand zodiac
shell moon
#

Someone knows a really easy to understand post (or class) to track positions for a race minigame so you can track (in real time) player positions and ofc prevent them from passing the start/finish line (and counting as lap) with the use of checkpoints or something? pepecatcry

high edge
#

boundingboxes

dusty frost
#

mario kart

#

no seriously, look at how mario kart does the checkpoints and shit

hushed badge
#

just don't look at mk64 or mkwii in that case

dusty frost
#

nah do, but just fix the bugs they have lol

#

or don't and let your people discover skips!

hushed badge
#

🥲

marble nimbus
#

Hey I am trying to move a non existent Entity (NPC / FakePlayer), basically I want to use its PathFinding to let it walk to a specific Location. I know I have to use Packets for that, since the Entity is not actually existing, but I am not sure which Packets I need. Does anyone know what Packet I need to use?

proud pebble
#

i wouldve assumed that wiki.vg would have the packets required

#

or atleast some of them atleast

round shoal
#

Anyone now how to add Custom Model Data inside a DeluxeMenus ? CustomModelData: <number> didn't work

tight junco
#

should be on the wiki though

forest jay
#

I am trying to set the contents of a shulker box, and this is what I am using. It isnt working, no errors. ```java
int slot = player.getInventory().firstEmpty();
player.getInventory().addItem(new ItemStack(Material.SHULKER_BOX));

            BlockStateMeta im = (BlockStateMeta) player.getInventory().getItem(slot).getItemMeta();
            if(im.getBlockState() instanceof ShulkerBox && kit.getItems() != null) {
                ShulkerBox shulker = (ShulkerBox) im.getBlockState();
                shulker.getInventory().setContents(kit.getItems());
                im.getBlockState().update();
            }
dusky harness
lyric gyro
#
               im.getBlockState().update();

this won't work, that's for updating a live block

#

and you need to setItemMeta

dusky harness
#

oh

#

oh thats an item

#

oh

marble nimbus
dusky harness
#

Packets don't handle pathfinding

marble nimbus
#

Well I need a way to let NPCs move automatically to a specific destination

dusky harness
#

you'd have to either somehow incorporate Minecraft's pathfinding api into whatever you're doing or create your own pathfinding system afaik

I'm not sure what Citizens does

#

if you're not using nms entities, then you have to make your own of everything: movement, health management, etc

marble nimbus
#

big oof, any hint how I could easily implement movement?

merry knoll
surreal lynx
#

Anyone know what could be going on here?

CF Pages is giving me this error https://pastes.dev/8z5B1AaHyG, but it works fine on Netlify. This is my build configuration:

#

(i didn't create this site myself, it was made by someone else for me)

surreal lynx
shell moon
stuck hearth
#

True

shell moon
#

I've seen it in some minigames but couldnt find any open source one xd

stuck hearth
#

Really just checkpoints and distance math I imagine

shell moon
#

Checkpoints as location you mean?

#

I'd need to then loop all checkpoints?

#

Or you mean checkpoint as interactive stuff (pressure plate)

dusky harness
#

I mean looping itself I don't think is that bad since after all, all it is is comparing some doubles

#

(xyz)

#

and the world, so ig a String or UUID, depending on how you want to compare the worlds

shell moon
#

loop it self?