#help-development

1 messages · Page 612 of 1

rough drift
#

he's right

umbral ridge
#

Yeah that's ok

shadow night
#

no I'm not

native bramble
rare rover
#

Oh my.

#

He only criticizes it if it has a major flaw usually

#

Which yours definitely does

umbral ridge
#

Why what's the point, is it gonna use 100% of my server processors cpu? XD

#

that little compute method does nothing huge

rare rover
#

No, cache it

#

Dont make a new pattern everytime

#

Wastes performance

umbral ridge
#

I posted the code for help, not for other people to find every single wrong thing about it

rare rover
#

Well they on drugs

#

It's bad dont do it

#

Cache the pattern

umbral ridge
#

I'll cache it alright? xD

rare rover
#

😄

remote swallow
#

only when it hurts my head enough

#

dispatch the command and have them as sender or player.chat

dawn plover
#

bro, idk what is happening lol
anyone else faced the same problem?
I am trying to add an event listener to the pluginmanager
But the TeamSystem gives error for somea reason. it sais found TeamSystem, needs Listener
But the TeamSystem is a Listener

remote swallow
#

kotlin smh

#

is that the same format for the other systems

umbral ridge
remote swallow
dawn plover
remote swallow
#

blame the fact websocket comes up first

dawn plover
#

Bro, what did inteliJ think, i am building a website in minecraft?!?

remote swallow
#

yerah

atomic niche
#

Have furnace minecarts become any less jank in the past few years, or are they still painful legacy entities that don't understand how to survive within a modern server environment and don't understand basic physics?

tawny remnant
#

How do i edit the tab/player list? i cant find it anywhere

remote swallow
#

player.setTablistFooter and header

tawny remnant
#

thanks

native bramble
thin isle
#

Is someone of you experienced with jakarta persistence api? I want to use it with spigot but I get the following error: jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named persistence

cunning crater
#
@EventHandler
    private void entityChangeBlockEvent(EntityChangeBlockEvent e) {
        if (!game_running) {
            return;
        }
        if (e.getBlock().getWorld() != world) {
            return;
        }
        if (e.getBlock().getType() == Material.ANVIL) {
            e.getBlock().setType(Material.AIR);
            e.setCancelled(true);
            // now set to air the block under if it's quartz
            Block block = world.getBlockAt(new Location(world, e.getBlock().getX(), e.getBlock().getY() - 1, e.getBlock().getZ()));
            if (block.getType() == Material.QUARTZ_BLOCK) {
                block.setType(Material.AIR);
            }
            return;
        }
}

This is the code for an anvil spleef game i am coding. When anvils fall, they disappear and they drop a no texture item (1.8.8 server), and the quartz block below stays. Any idea why?

Turns out it was worldguard

rare rover
#

Sounds great

tender shard
umbral ridge
#

You guys are still interested in this? XD I've fixed that already a few hours ago

#

Thanks for improvement suggestions

rare rover
#

It hasn't even been an hour buddy

#

But yea

#

Cache patterns

#

👍🫡

umbral ridge
# rare rover It hasn't even been an hour buddy

that "buddy" posted a code to help the other person and not listen your bullshit criticism on other peoples code, I'd recommend you to focus on you and your code mistakes, which in fact we all do, as we're all learning. If you have any other questions/concerns send me a dm (don't want to spam here) 🫡

tender shard
#

lol imagine being triggered by someone suggestion a simple change

worldly ingot
#

Your server will unnecessarily suffer if you fail to listen to the advice of people that have experienced the same mistakes you’re subjecting yourself to

buoyant viper
#

this makes me wonder, what the fuck am I doing for color parsing

worldly ingot
#

Do yourself a favour and take the advice of others because they’re giving it for a reason

#

Move your RegEx patterns out into a static field. You have no reason to recompile the same expression each time

#

Or don’t and have worse performing code. Idc

buoyant viper
remote swallow
#

hukkit

buoyant viper
#

hukkit

odd cobalt
#

((CraftPlayer) player).getHandle().b.a(test, null);
'b' has private access in 'net.minecraft.server.level.EntityPlayer'

#

help

remote swallow
#

?switchmappings

remote swallow
#

use mojmaps

#

currently your trying to access the logger

#

i feel like you want to use c.a

warm light
#

any idea whats wrong with my ide?

remote swallow
#

reload maven or gradle

warm light
#

reloaded mvn, cleaned invalidate caches
but still same

tender shard
#

show the full error

#

the whole maven log

warm light
worthy moat
#

Can I just create a Scoreboard and then get it to change some lines?

tender shard
#

that's still only one line

worthy moat
#

Without passing it manually

#

Because there is a manager.getMainScoreboard

warm light
#

well, its very long error

#

I mean many errors

tender shard
#

?paste ^

undone axleBOT
warm light
tender shard
#

where did you get slf4j-api-2.0.0-alpha1 from?

#

that file is broken

#

try mvn clean and if that doesn't work, remove slf4j from your local maven repo

warm light
#

alright. thanks. Let me try

rare rover
hazy parrot
autumn cave
#

How can I listen for Chunk change?

#

Block / Entities have changed within the chunk

#

I only see these events:

buoyant viper
#

and a better config api

remote swallow
#

the first thing i can do

#

just steal the config api from jishlib

buoyant viper
remote swallow
silent steeple
#

ChatColor.translateAlternateColorCodes doesnt work on hex colors

#

what do i use

remote swallow
#

you have to manually format it

silent steeple
#

wdym

autumn cave
#

And there are alot of Block Events, but they don't cover all block change possibilities. For example multi block change or block change with block.setType(...)

remote swallow
silent steeple
#

whats sone min

#

oh

#

one min

buoyant viper
#

the format for hex's in spigot is §x§R§R§G§G§B§B

silent steeple
#

seriously

buoyant viper
#

u need to convert #RRGGBB to that urself

#

yes

silent steeple
#

does anyone have a method that does that

#

im not bothered to do that

remote swallow
#

public class Formatter {
      private static final Pattern HEX_PATTERN = Pattern.compile("&#[a-fA-F0-9]{6}");
      

      public String format(String input) {
          Matcher matcher = HEX_PATTERN.matcher(input);
          while (matcher.find()) {
              String color = input.substring(matcher.start(), matcher.end();
              input.replace(color, String.valueOf(ChatColor.of(color));
              matcher = HEX_PATTERN.matcher(input);

          }
          return input;
      }
}
silent steeple
#

thx

remote swallow
buoyant viper
#

boy i really chose the least optimal didnt i

remote swallow
#

ye

#

i chose the easiest and went with minimessage

buoyant viper
#

?paste for me

undone axleBOT
remote swallow
#

bungee chat api

silent steeple
#

spigot chat api

remote swallow
#

you shouldnt really ever use the bukkit chatcolor class

buoyant viper
silent steeple
#

why not

remote swallow
#

its outdated

#

and its an enum and fuk dat shit

buoyant viper
#

i think the irony is i basically did what ChatColor.of does in the substr'd loop

remote swallow
#

L

buoyant viper
mental nymph
#

Is this possible to check does player has resource pack or not ?

buoyant viper
#

the one in minimessage

remote swallow
#

format it with minimessage to Component then legacy-ify it

buoyant viper
#

isnt it convoluted to use bc of Audiences n shit

buoyant viper
#

useUnusualXRepeatedCharacterHexFormat DogJA

remote swallow
#

yus

buoyant viper
#

also hmm

#

i couldve sworn when i read it it said it would need a BukkitAudience or w/e

#

cos i looked at adventure/MM for my stuff before i wrote my formatter

silent steeple
#

?paste

undone axleBOT
silent steeple
remote swallow
#

my brain did a stupid

#

want the janky fix or the right fix

autumn cave
#

How can I listen for Chunk change? (Block / Entities have changed within the chunk)

silent steeple
remote swallow
#

input.replace(color, String.valueOf(ChatColor.of(color.replace('&', ''))));

buoyant viper
#

can use mine, can also change mine to use ChatColor.of

silent steeple
#

Empty character literal

buoyant viper
#

try '\0' there idk

silent steeple
#

ight

silent steeple
#

can i use urs @buoyant viper

remote swallow
buoyant viper
#

using double quotes should work, if somehow not yeah u can use mine @silent steeple

buoyant viper
#

oh i just saw ur @, Monero 💪🏻

silent steeple
#

haha monero is fire

#

ight

remote swallow
#

give me crpyto

silent steeple
#

var from lombok right

#

@buoyant viper

buoyant viper
#

oh, var from java 10+ lol

brisk estuary
#

Hey, does anybody know how to get a Biome's location? I want to create a custom compass that will point to the nearest x biome, which will be chosen by the player

buoyant viper
#

the types (in order of when they appear) are int, char, String @silent steeple

#

im guessing ur using JDK 8 for development?

#

or at least ur source version is set to 8?

silent steeple
#

no tis not

#

oh it is

#

why does it d otaht

buoyant viper
#

idk

silent steeple
#

yeah ur code works although what if its &#RRGGBB&L

#

for example to make it bold

buoyant viper
#

should work just fine

#

toSpigotHex will only convert hex's, formatColors does the rest/normal codes

silent steeple
#

what if its a hex and a modifier

#

cuz its not working

#

it does the hex but doesnt do the &l

buoyant viper
#

hmm

velvet shard
#

Sorry if this is obvious, but how do I check for a entities tag? I'm trying to check if a entity tag is one specific string

silent steeple
#

i have an idea

buoyant viper
#

i may be stupid, but im also about 1k miles away from home to fix my stupid

#

i hand off my errors to uhh @remote swallow

silent steeple
#

i think i got it

remote swallow
buoyant viper
#

vacation

silent steeple
#

why u on discord 😭 enjoy ur vacation

#

lmao

buoyant viper
#

and i forgot to leave my PC running so i cant VNC into it

buoyant viper
grizzled oasis
#

how can i get the block the player is facing?

buoyant viper
#

like what block theyre looking at?

grizzled oasis
#

yes

#

more specifically the coordinate

silent steeple
#

yep solved it

buoyant viper
#

there should be a method rayTraceBlock in World (or Entity/Player?) that u might able to use

buoyant viper
silent steeple
#

what i said

#

about the

#

&l

buoyant viper
#

oh no i mean like howd you fix it

#

so i can fix my code when i get home next week

silent steeple
#

this is my util class

#
public static String sColor(String s) {
        return ChatColor.translateAlternateColorCodes('&', s);
    }

    private static final Pattern HEX_PATTERN = Pattern.compile("#[a-f0-9]{6}", Pattern.CASE_INSENSITIVE);

    public static String sColorHex(String text) {
        StringBuilder sb = new StringBuilder();

        for (var i = 0; i < text.length(); i++) {
            var c = text.charAt(i);

            if ((c == '\u00A7' || c == '&') && i + 7 < text.length()) {
                var hex = text.substring(i + 1, i + 8);

                if (HEX_PATTERN.matcher(hex).matches()) {
                    sb.append("\u00A7x");

                    for (int o = 1; o < hex.length(); o++) {
                        sb.append('\u00A7').append(hex.charAt(o));
                    }

                    i += 7;
                    continue;
                }
            }

            sb.append(c);
        }

        return sb.toString();
    }
zenith gate
#

how can you get the name from an inventory?

silent steeple
#

and i used it like this

#

lore.add(sColor(sColorHex("|- &f&lGenerator Information:")));

#

for example

buoyant viper
#

yes

#

oh were u just forgetting to format the rest of the text

#

aka forgot to wrap sColorHex in sColor

#

i forget why i made them separate methods

#

probably bc i had spent so long trying (and failing) to properly parse the hex lmao

zenith gate
#

because you added it all into 1 line?

buoyant viper
#

ur not appending newlines by the looks of it

timid hedge
#

How do i split it up in lines?

silent steeple
#

add \n at the end of the strings

wild basin
#

Hey I have a question why is it when my config.yml file loads well it removes # and spaces?

timid hedge
silent steeple
#

ur doing it wrong

timid hedge
#

Isnt this right? String deathMessage = deathMessage1\n + deathMessage2\n

hazy parrot
#

deathMessage + "\n"

timid hedge
#

Thank you

upper hazel
#

?paste

undone axleBOT
timid hedge
#

How do i make bold text on discord in a plugin? ** dosent work

upper hazel
sick ermine
#

I am coding a player vault plugin. It will sort the items in order, not according to the slots placed. For this, the player saves the items according to the page every time he changes a page. But while inserting, I insert in order, but a few dupe issues arise. Does anyone have a suggestion for a different solution?

hazy parrot
#

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

upper hazel
#

wiki

hazy parrot
#

on discord

timid hedge
#

Ohhh.. yeah of course, i though i could use discord things because its a discord bot plugin..

hazy parrot
upper hazel
#

lol discorte chat gpt💀

river oracle
remote swallow
#

@worldly ingot ban

worldly ingot
#

lol, done that once before

#

I forget his username. I know he's in the Discord

#

@civic sluice

young knoll
#

I've done it too

#

👀

tender shard
#

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

civic sluice
remote swallow
#

i wouldnt do that

civic sluice
remote swallow
civic sluice
tender shard
#

pre commit hook? global gitignore? breaking buildtools? what are you all talking about lol. how can you even accidentally commit thousand files lol

river oracle
civic sluice
tender shard
#

oh well I just select the files I changed in intellij

#

and it never even suggested to add any other files than the ones I changed

pseudo hazel
#

yeah image using git from command line

remote swallow
#

have you done a craftbukkit nms patch before though

tender shard
#

Craftbukkit yes, nms no

worldly ingot
#

git add * should add only changed files

#

Or, no, wait, sorry. git commit -am that is

#

There's probably a flag on git add as well that does this

austere cove
#

nah git add does only add changed files that aren't filtered out by gitignore

civic sluice
small current
#

has anyone used it?

civic sluice
ancient plank
#

stash scares me

small current
#

@lost matrix hey

small current
#

i copied the DisturbedFiller
How to use it

timid hedge
#

Why dosent my text get formatted? when my discord bot is sending "test" it isnt bolded in my coded i wrote this §ltest but it dosent work

remote swallow
#

because you cant color stuff on discord

#

you can format on discord, you can format and color in minecraft

timid hedge
#

But §l dosent work and ** around test dosent work too

remote swallow
#

where are you putting it

timid hedge
#

String test = "**▌test**"

remote swallow
#

yeah, where

#

a message? embed?

timid hedge
#

Sry sent the wrong method

#

Embed

remote swallow
#

**test**

small current
#

Anyone used this?

small current
#

aight

#

@remote swallow where is the class used

remote swallow
#

read the javadocs

small current
#

i hate javadocs

#

you know where it is

#

tell me

remote swallow
#

its in the javados

small current
#

ok

remote swallow
timid hedge
small current
remote swallow
#

idk how ur internet can be that slow, i had 6 megabit down awnd could read them fine

eternal oxide
#

no way you are programming with an internet too slow to use javadocs

small current
#

yeah

#

i live in iran

eternal oxide
#

You could do it on dialup and be fine

small current
#

i sent this message like 16 seconds ago

#

it is that slow

timid hedge
small current
#

it gets boring, waiting for each page to load

remote swallow
#

i used to have 0.5 megabit up and could send messages just fine, i somehow doubt its worse than that

eternal oxide
#

unless you are on satellite internet

patent portal
#

Hi, I've installed spigot on my computer, the server works fine but I don't know how to put commands on my server without giving myself the permissions. Do you know how to help me?

#

I have a file called "commands" but I can't put commands in it

remote swallow
#

that file is for command alias's

tame fern
#

It's been a few years since I've used custom generators. I used to be able to override the vanilla BiomeProvider. So I could use a custom biome layout before the world generates. Can't seem to get it to work now. Overriding getDefaultBiomeProvider in my plugin class. Anything I'm missing?

carmine nacelle
hazy parrot
undone axleBOT
ivory sleet
#

And then instant

hazy parrot
#

whole embed please

#

not just cut off text lol

worthy moat
#

How can I make a still standing villager with no collision?

hazy parrot
#

That is not whole embed

ivory sleet
#

Hows code looking

remote swallow
#

its already bold

#

eitehr it isnt being encoded utf8 or discord is failing to read it properly

ivory sleet
#

iirc

#

Not all fields in an embed allow for markdown

#

Unsure but maybe it isnt

remote swallow
#

hold on ill make a project with jda

#

give me like 10 min

tender shard
#

underlines in embeds do work for me

worthy moat
#

How do I update a Scoreboard?

ivory sleet
tender shard
remote swallow
#

works fine for me

#

the author doesnt support markdown, the description does

#

exactly like my screenshot

tender shard
#

Just look at the EmbedBuilder class

#

Its pretty self explanatory

tender shard
#

Also using embedbuilder

remote swallow
#

is this really how you keep something alive

tender shard
#

Yes, whats the problem with that?

remote swallow
#

nothing

#

i just didnt expect it

tender shard
#

Thats a typical game loop

remote swallow
#

i didnt know that was how you keep something alive

tender shard
#

Many games have a while(true) or while(running) or sth in the main thingy, i just did the same for the bot lol

buoyant viper
#

how did u stay alive? expandssia

remote swallow
#

TIL

tender shard
remote swallow
#

someone used reflection and turned the queen off

#

correct

#

the author has no formatting

buoyant viper
#

reflection? she was just picked up by the Garbage Collector

remote swallow
#

she had a while(running)

tender shard
#

Fun fact: a letter from germany to UK only costs 30 cents more than germany -> germany

zealous osprey
#

really?

buoyant viper
#

damn yall gotta pay for in-country mailing?

tender shard
buoyant viper
#

jk u gotta use stamps for US too but i think it depends on the kind of mail

zealous osprey
tender shard
#

hm yeah I also paid 1.20€ lol

remote swallow
#

wdym

tender shard
remote swallow
#

wtf

#

oh wait

#

a letter

tender shard
#

normal letter is 0.85€

remote swallow
#

idk about letters

tender shard
#

national 0.85€ and international (every country) is 1.10€

remote swallow
#

is the class imported

#

Embed builder class

twin venture
#

what is the best way to fix a race condetion in mysql ?
saving data on quit .
loading data on join .. ?

remote swallow
twin venture
tender shard
#

it must show something

#

even if it cannot find the class, it'll show something

twin venture
#

so when player join :
i delay it to 1 second

#

but it seem to have no effect as it still load the old data ..

remote swallow
#

use futures

twin venture
remote swallow
#

also do it on the async pre join event

twin venture
remote swallow
#

read this

remote swallow
#

it should all run off uuids

twin venture
#

but iam setting it to the player ..

tender shard
#

Lets turn that into a blog post

twin venture
#

user.setplayer and player instance

remote swallow
#

what does setPlayer do

twin venture
#

iam using it in diffrence places :

delicate lynx
#

huh

remote swallow
#

how isnt static supported in java 8

icy bone
#

Is there a way to make a specific falling block stay a falling block even tho it hits the ground?

remote swallow
undone axleBOT
icy bone
#

Because if i try to use EntityChangeBlockEvent, the block just disapears and i think thats because this event stops it from going solid but the fallingblock disapears before hand

remote swallow
#

modify your code to not need a player instance and work off a uuid with the pre join event

twin venture
#

alright

delicate lynx
#

UUIDs my beloved

remote swallow
#

im so confused at this sentance

#

it just like

#

confuses me

twin venture
#

so technaiclly something like this can work?

#

and i won't need to set the player?

remote swallow
remote swallow
#

?paste your whole class

undone axleBOT
worthy moat
#

Hey i want to update my scoreboard so I set a new Score on the current one

#
Score map = online.getScoreboard().getObjective(DisplaySlot.SIDEBAR).getScore(
                    ChatColor.translateAlternateColorCodes('&', "&dMap: &l " + Cache.currentArena.getName())
            );
            map.setScore(3);```
#

Here comes the Problem

remote swallow
#

use fastboard

remote swallow
worthy moat
remote swallow
#

fast board will make ur life easier

twin venture
remote swallow
#

yeah

zenith gate
#

Do entities have something similiar to CustomModelData like ItemStacks do?

tender shard
#

no

twin venture
remote swallow
#

if anything you want to block on the async pre join, this ensures your data will be loaded

tender shard
#

wdym "getConfig()" doesnt work?

zenith gate
tender shard
#

visually?

zenith gate
tender shard
#

i don't think so

remote swallow
#

you cant have a static method in an inner class

zenith gate
#

like could a texturepack change their visuals based off of their name?

remote swallow
#

remove the static keyword

tender shard
remote swallow
#

?learnjava!

undone axleBOT
remote swallow
tender shard
#

getConfig() is an instance method

zenith gate
twin venture
#

the thing is EpicEbic its loading the data when moved to the SERVER [B] faster than its saving it on server A (the server you were teleported from). .

remote swallow
#

might wanna block on quit instead

twin venture
remote swallow
#

smh

#

when you do io on the main thread it pauses it, thats why you do sql and stuff async

tender shard
remote swallow
#

if you block when they quit they wont move untill the save is done

remote swallow
remote swallow
#

im pretty sure bungee knows when they quit proxy, or change server

#

could probably mix in redis pubsub

twin venture
#

the current code didn't work .

#

not sure if iam doing something wrong :

remote swallow
#

no need for the future

#

didnt realise u had task chain

tender shard
#

you could have a table that keeps record of whether a player is "still online" on any server, then only load the data when this is set to false again or sth. or use redis or sth for that

twin venture
remote swallow
#

use taskchain

#

just avoid doing most sql or stuff with bukkits async

twin venture
#

this is the requestConnection method :

tender shard
#

try setInvulnerable

#

or do you mean the visual fire effect?

twin venture
#

so how would i want it to work :

  • Player select quests in the lobby server

  • Player go play bedwars or smth , finish a quest -> update it in mysql

  • Player is sent back to lobby to play another game or smth , and his data is loaded there

remote swallow
#

load data on bungee and give it to servers as requested with redis pubsub

twin venture
#

alright thank

remote swallow
#

then you dont save it and load it most likely on the same machine within millis

twin venture
#

never used redis before , do you have a tutorial or something i can read to learn it?

twin venture
#

same database , same plugin version , same server version

remote swallow
timid hedge
#

Anyone?

remote swallow
twin venture
#

without a proxy in the way it works just fine :
join server A -> select quest -> leave -> join server B -> I found the data there .

tender shard
#

dude what is this

#
  1. you didn't call setDescription if it's not there
  2. ever heard of String.join?
remote swallow
#

?learnjava! for the love of god

undone axleBOT
tender shard
#

this hurts 🥲

remote swallow
#

why is that even mutliple strings

#

you can do it in 1 string

#


String deathMessage = "Line 1 \n" + 
      "line 2 \n"
tender shard
#
String myString = "hello\n"
  + "this is a string\n"
  + "...";
#

or just

        String myString = String.join(System.lineSeparator(), 
                "First line",
                "Second line",
                "Third line");
zealous osprey
remote swallow
#

windows normally

#

windows sometimes wants \r\n for stuff

zealous osprey
#

weird

tender shard
chrome beacon
twin venture
#

bungeecord api + redis pubsub is the way to fix it ?

tender shard
#

granted, windows is the only thing still in use that doesn't use \n

remote swallow
twin venture
tender shard
remote swallow
twin venture
#

thanks for explaining ❤️ ..

olive valve
#

what is the default walk speed for a player?

zealous osprey
#

That? Or in blocks per second?

echo basalt
olive valve
rare rover
#

i got a question for y'all. I'm thinking of adding custom sounds to my server's texture pack but how would i play them? Since they wouldn't be apart of the bukkit api?

#

is there a way to play a sound with its name only?

#

i'm guessing

umbral ridge
umbral ridge
#

Why would you use static though? Now I know

umbral ridge
buoyant viper
fleet falcon
#

damn

umbral ridge
opaque scarab
#

How can I get the texture string of a player?

rare rover
tender shard
gritty juniper
#

Let’s say I have a plugin that needs to be refactored and my dev quit, where do I find a new one - how do I ask for one and where?

undone axleBOT
gritty juniper
#

Ty

echo basalt
#

d u k e

opaque scarab
#

Some reason adding a texture to a player NPC through gameProfile.getProperties().put(“textures”, new Property(“textures”, texture, signature)); only adds the inner base texture without the overlay (if that’s what it’s called). Does anyone know how to fix this?

gritty juniper
# tender shard ?services

Some any other place that doesn’t require me to have 20 posts beforehand? Is the a discord server for hiring people?

tender shard
eternal oxide
opaque scarab
opaque scarab
tender shard
#

there's no need to use mojang's GameProfiles anymore

eternal oxide
#

ClientboundSetEntityDataPacket

#

if it's still called that

opaque scarab
opaque scarab
undone axleBOT
tender shard
#
        PlayerProfile profile = Bukkit.createPlayerProfile(UUID.randomUUID());
        PlayerTextures textures = profile.getTextures();
        textures.setSkin(someUrl);
        profile.setTextures(textures);
eternal oxide
#

yeah his issue is not with setting a texture, he's not got teh right data set to enable the second layer

#

the getEntityData().set(Player.DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0xFF);

opaque scarab
quaint mantle
tender shard
opaque scarab
eternal oxide
#

second layer has to be enabled

opaque scarab
#

Oh, I see.

opaque scarab
#

I’m new to NMS

#

Well, I’ve done it off and on every so often. Not that much

eternal oxide
#

send that packet I posted above

#

but be sure you set the flag correctly in the data first

opaque scarab
orchid trout
#

tried googling it?

#

ok

hazy parrot
#

Idk what do you expect when asked that vague question in spigot server

#

we even don't know what wrapper are u using

#

or are u even using wrapper

vapid verge
#

is there a way to determine what caused the PlayerItemDamageEvent to trigger? Trying to have it where if a specific item, mining a specific block happens, then the damage event is cancelled. Looking through the docs doesn't seem to indicate a simple way to do this.

tender shard
vapid verge
#

Event driven code is still a little new to me. How would PlayerItemDamageEvent read the value from BlockBreakEvent?

quaint mantle
#

Because its the same item

eternal oxide
#

you'd probably have to flag what item it is as I guess it would be possible for an armor damage event to jump in the middle.

tender shard
#

something like this. Or maybe set the ignoreNextDamageEvent to false again automatically one tick later, in case for whatever reason the damage event isn't always called

echo basalt
#

I'd make that a set of player ids

#

because using a boolean can cause issues

tender shard
#

i don't think so

vagrant stratus
#

Any way to force and/or semi-force a top down view? 🤔

echo basalt
#

spectate an armorstand

#

pitch to -90

umbral ridge
#

Wouldn't there be navigation difficulties? 🤣

echo basalt
#

Why would there

wet breach
#

can easily get a top down view that way 🙂

#

if you still need them to move around

umbral ridge
vapid verge
#

I have event listeners in different classes, overriding onCall. Let me back up and that may help with a good solution. I’m modifying so that when a certain block is mined, it causes 100 damage to be added. OnBlockBreak checks for the block being mined and the tool being used. After that, PlayerItemDamageEvent is called. I want the damage to apply regardless of it the item has unbreaking, so if unbreaking procc s, it has to account for the damage that wasn’t applied.

wet breach
#

it will cost me like $500 to get one 🙂

umbral ridge
#

they cost that much?

#

I though they were like ~ $80

wet breach
#

No, the place I rent requires a pet deposit before they will let me have a pet. But there is other things I need first

umbral ridge
#

Oh rightt 👀

hybrid spoke
wet breach
#

not always, but I know plenty of places where it doesn't cost much or is free

#

but that isn't why it will cost me $500 lmao

eternal oxide
#

a pet can be quite destructive if the owner isn't responsible. I can see a $500 being resonable, if they risk having to replace skirting boards/doors/flooring

wet breach
#

oh I am not complaining about it lol

#

seems more then reasonable to me

#

just I have other things I need before I put more money down is all 😛

eternal oxide
#

I just hope you have a good landlord who will give it back when teh time comes. Often they become different people once you decide to leave.

wet breach
#

its illegal for them to keep the deposit and if you take them to court they will automatically lose if they can't show proof of any damages and the repairs made. You will get double the amount back if they refuse to give up the deposit and in some states its triple

eternal oxide
#

nice

wet breach
#

in other words it would be in my benefit they try to keep it when they are not suppose to XD

eternal oxide
#

here in teh UK its not so

tender shard
#

my best friend's former landlord still owes her about 1000€ of deposit but she's too afraid to sue her about it so I guess the money is gone lol

wet breach
#

that is actually quite a bit

#

I would sue, especially since I always have pictures of when I lease and when I leave

tender shard
#

Yeah

wet breach
#

but there is plenty of stuff though that the land lord simply can't keep the money for. For example painting

#

in the majority of states the land lord is actually required to paint between tenant leasing anyways, therefore they can't charge you for this

#

carpet, if its 3-5 years old already, they can't charge you for anything in regards to it because its considered wear and tear

tender shard
#

I am lucky that my landlord is my best friend‘s mother so she‘s quite friendly and doesnt try to do weird things

wet breach
#

Blinds are the same as well and basically everything in the unit has a wear and tear factor associated. Meaning they could only keep the deposit for something that would be unusual. Like putting a hole in the floor for example. That isn't really something that happens with wear and tear or big holes in the wall or maybe some broken windows

tender shard
#

Send the „player is sleeping“ packet

#

Idk which one it is exactly

wet breach
#

just send some random packets

#

until it works

tender shard
#

Probably something with EntityMetaData or sth with that in the name

wet breach
#

like if the fridge was brand new when you moved in, and now its not working anymore

#

XD

#

but it depends on how many years too, but lets say 1 year lease

#

that fridge should still be working lmao

#

and at the very least why wasn't the landlord notified

#

also, of note there is a lot of things that are landlords responsibility to repair. And the landlord can't increase your rent for it, except between lease renewals and you can withhold a portion of rent or all of it if they don't make repairs within a reasonable amount of time. Now that isn't to say they are not owed that rent, just don't have to give them what is owed until they fix problems

wet breach
#

Also, if you don't want to wait for land lord to fix it, you can fix it yourself and charge the land lord for it. However this is only possible if the land lord is taking an unusual amount of time to repair it, or you have at the very least notified them of the issue

shadow owl
#

Say I want to have an item that makes players run faster when holding it. Should I edit the player's GENERIC_MOVEMENT_SPEED (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html#GENERIC_MOVEMENT_SPEED) attribute or should I use setWalkSpeed (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#setWalkSpeed(float))?

#

I'd imagine attribute modifiers?

#

Wait, can attribute modifier be applied to player attributes? I don't see that as a thing

#

Sure, but I want it to affect the user even if they have speed or other things changing their walkspeed value

#

Ideally it'll just multiply their speed by 1.25x while active or something

random kestrel
#

how could i possibly set up the 1.7.10 spigot/bukkit? i want to do it with intellij community

delicate lynx
#

1.7.10 😭

shadow owl
#

I feel like this gets messy if other plugins are modifying walkspeed though, eg: if I apply my 1.25x multiplier, then they get slowed down (by something idk) and then I remove my 1.25x multiplier it may not be the same value. I feel like it'd be much cleaner if I could us attribute modifiers

river oracle
#

you don't you upgrade

#

atleast 1.8.8 my man

#

and that's saying a lot

#

1.7.10 still has log4j exploit xD wait I wonder how many 1.7 servers have that patched it'd be fun to go back and try xD

random kestrel
#

if all of you just want to say "why don't you upgrade" or do a "crying emoji" then do leave, i just want to do plugins for 1.7.10, i don't want to upgrade.

If it's not usable anymore then just tell me, don't say "why not upgrade"

buoyant viper
#

its not that its... not usable... but why work with such an old version?

#

you could save a lot of headaches by using the latest version (or at the very least, like 1.16)

river oracle
#

I mean you coulddd use it, its just you're opening a box of security vulnerabilities I doubt you could patch

random kestrel
opaque scarab
#

I'm trying to make a player NPC show its skin outer texture layer. The player spawns with the skin, yet still doesn't show the outer layer

SynchedEntityData entityData = npc.getEntityData();
entityData.set(npc.DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0xFF);
List<SynchedEntityData.DataValue<?>> valueList = entityData.packDirty();

ClientboundSetEntityDataPacket entityDataPacket = new ClientboundSetEntityDataPacket(entityID, valueList);
connection.send(infoPacket);
connection.send(addPlayerPacket);
connection.send(entityDataPacket);```
buoyant viper
#

ah, if youre working with Forge, why not... work with Forge

#

instead of Spigot

random kestrel
buoyant viper
#

or are you trying to create a hybrid

random kestrel
#

i want to do plugins for mod servers that use

#

1.7.10

river oracle
#

does spigot even host the 1.7.10 jar anymore?

random kestrel
#

1.7.20... unreal....

river oracle
sick ermine
#

Hello, I am coding a playervaults plugin, but the items will be sorted in order. For this I save the items by page and sort them in order but there are a few dupe issues
This item is on page 2
1st page has gaps
so he puts it in the spaces
but those items are still on page 2
how do i fix this

buoyant viper
#

i think BT only goes back to 1.8.0

random kestrel
river oracle
#

not supported

random kestrel
#

hybrid servers

river oracle
#

and dangerous

buoyant viper
#

is the Spigot 1.8 build still that strange protocol hacked one that supports 1.7.6-1.8.8? lol

river oracle
#

if you are going to use forge use forge

sick ermine
#
    private void storeItems() {
        List<PlayerVaultItem> playerVaultItems = playerVault.getItems().getOrDefault(currentPage, new ArrayList<>());
        playerVault.getItems().remove(currentPage);
        playerVaultItems.forEach(playerVaultItem -> PlayerVaultPlugin.getInstance().getDatabaseManager().getPlayerVaultItemRepository().delete(playerVaultItem).join());
        playerVaultItems.clear();
        for (int i = 0; i < PlayerVaultPlugin.getInstance().getConfig().getIntegerList("gui.paginated-slots").size(); i++) {
            int slot = PlayerVaultPlugin.getInstance().getConfig().getIntegerList("gui.paginated-slots").get(i);
            ItemStack itemStack = getInventory().getItem(slot);
            if (itemStack == null || itemStack.getType().equals(Material.AIR)) continue;
            PlayerVaultItem playerVaultItem = new PlayerVaultItem(player.getUniqueId(), playerVault.getVault().getId(), currentPage,
                    BukkitSerialization.itemStackToBase64(itemStack));
            playerVaultItems.add(playerVaultItem);
        }
        if (playerVaultItems.isEmpty()) return;
        playerVault.setPlayerVaultItems(currentPage, playerVaultItems);
        playerVault.save();
    }```

this method works before every page change and when the menu is closed
random kestrel
#

if i learnt 1.16, would the learning still serve for 1.7.10?

ivory sleet
buoyant viper
#

NMS-wise, not at all

random kestrel
#

i don't know what is nms

river oracle
buoyant viper
#

internals, net.minecraft.server stuff :P

river oracle
buoyant viper
#

nah?

river oracle
#

I mean think of all the convient shit we have now we didn't have back then

buoyant viper
#

true

random kestrel
#

so basically if i learnt 1.16 i wouldn't know how to use 1.7.10?

river oracle
#

I mean it woulda kinda transition over, but there's no point

#

just code a server sided mod with forge

#

it'll be way easier

random kestrel
#

thats not what i meant

random kestrel
#

but

#

ok

river oracle
#

if you want mods, and plugins, don't do that, just use mods

random kestrel
#

i'm really confused right now

random kestrel
ivory sleet
#

But its like if you if u code on the modern web, would you know how to code on the web infrastructure we used 10-20 years ago?

#

Probably not

#

A lot of things have changed for the better

random kestrel
#

idrk what to do, i want to make plugins for both 1.7.10 and 1.16 (and up)

river oracle
#

drop 1.7.10 support work with only 1.18.2+ at minimum

ivory sleet
#

1.7.10 sounds like a big one of those “shooting yourself in the feet” moments

river oracle
#

only 8% of servers run 1.8, and even less run 1.7.10 over 85% of servers run 1.18.2+

random kestrel
#

oh i also want to mess with the nbt from a mod thats 1.7.10 (or something like that)

#

nvm, i should probably do as you sai

#

d

#

just create a serversided mod

placid moss
#

thats just a plugin?

#

are you doing mod dev or plugin dev lmao

buoyant viper
#

its like Ghostbusters, dont cross streams.

#

hybrid servers are a mess of two independent codebases hacked together

#

if youre gonna work on Forge modded servers, its better to just make a Forge server-side mod

#

no matter what version of minecraft ur using

tender shard
#

my shit's names are too descriptive. i think I'll rename CustomBlockData to Paschinski, and MorePersistentDataTypes to Koslowski.

random kestrel
#

is it fine if you use 1.8.0 jdk for 1.16.5

tender shard
#

yes

random kestrel
#

gooood

tender shard
#

are you using maven?

random kestrel
tender shard
#

ok great

random kestrel
#

cant wait to learn..

rare rover
#

1.16.5 is java 16 i think

#

I'd use that version

#

Its more stable and has more features

placid moss
#

no streams or lambdas in java 8

delicate lynx
#

lambdas 😭

rare rover
#

I dont get why people dont like lambdas

#

I kinda like em

ivory sleet
young knoll
#

Yeah that’s 7

#

8 has streams and lambdas

rare rover
#

Ye

ivory sleet
#

Compiles to invoke dynamic

#

So very fast

tender shard
tender shard
placid moss
#

got confused rip

ivory sleet
#

na all good, same honestly

#

We’ve been feasting on it for so long its easy to mix it up

rare rover
#

Oh 1.17 is when they switched? I keep thinking it was 1.13 🤦‍♂️

opaque scarab
#

I'm trying to make a player NPC show its skin outer texture layer. The player spawns with the skin, yet still doesn't show the outer layer

SynchedEntityData entityData = npc.getEntityData();
entityData.set(npc.DATA_PLAYER_MODE_CUSTOMISATION, (byte) 0xFF);
List<SynchedEntityData.DataValue<?>> valueList = entityData.packDirty();

ClientboundSetEntityDataPacket entityDataPacket = new ClientboundSetEntityDataPacket(entityID, valueList);
connection.send(infoPacket);
connection.send(addPlayerPacket);
connection.send(entityDataPacket);```
ivory sleet
#

to avoid nested lambdas one has to adhere to the monad pattern

#

And just that adds complexity to ur code

young knoll
#

One of these days conclure could just start making up patterns

ivory sleet
#

Moreover streams aren’t that pure as they seem, there is a lot going on under the hood

young knoll
#

And I would never notice

tender shard
#

But nobody dares to say anything

ivory sleet
#

Lmao 🤣

wet breach
tender shard
#

Everyone just silently nods to not show up as stupid

rare rover
young knoll
#

Inb4 monad pattern isn’t real

wet breach
ivory sleet
tender shard
#

Ah yes, the vacuum pattern. Ofc i heard of it

ivory sleet
#

lol

wet breach
#

streams have existed even before lambda was really a thing in Java

tender shard
#

Java 22 will finally add rivers and oceans too

wet breach
#

ah yes to complete the collection

tender shard
#

Yeah lol

buoyant viper
rare rover
#

No way

#

W java 22

tender shard
#

NoteblockAPI still uses java 7

buoyant viper
young knoll
#

When do we get the more advanced stuff

ivory sleet
#

Java 23 aims to add hydro accelerated patterns to implant a bombastic side eye principle on the moon 🤡

young knoll
#

Like oxbow lakes

ivory sleet
#

Probably just me who laughed, im goofy

wet breach
#

lol

sick ermine
#

Can you help me

ivory sleet
#

Ask away

#

(:

sick ermine
#

O am coding a playervaults plugin, but the items will be sorted in order. For this I save the items by page and sort them in order but there are a few dupe issues
This item is on page 2
1st page has gaps
so he puts it in the spaces
but those items are still on page 2
how do i fix this

vivid cave
#

I see a lot of people use a bunch of APIs but frankly it's often just for a couple of actions they could achieve with nms or sometimes natively. So what does API really stand for ? Abscense of Programming Intellect ?

sick ermine
#
    private void storeItems() {
        List<PlayerVaultItem> playerVaultItems = playerVault.getItems().getOrDefault(currentPage, new ArrayList<>());
        playerVault.getItems().remove(currentPage);
        playerVaultItems.forEach(playerVaultItem -> PlayerVaultPlugin.getInstance().getDatabaseManager().getPlayerVaultItemRepository().delete(playerVaultItem).join());
        playerVaultItems.clear();
        for (int i = 0; i < PlayerVaultPlugin.getInstance().getConfig().getIntegerList("gui.paginated-slots").size(); i++) {
            int slot = PlayerVaultPlugin.getInstance().getConfig().getIntegerList("gui.paginated-slots").get(i);
            ItemStack itemStack = getInventory().getItem(slot);
            if (itemStack == null || itemStack.getType().equals(Material.AIR)) continue;
            PlayerVaultItem playerVaultItem = new PlayerVaultItem(player.getUniqueId(), playerVault.getVault().getId(), currentPage,
                    BukkitSerialization.itemStackToBase64(itemStack));
            playerVaultItems.add(playerVaultItem);
        }
        if (playerVaultItems.isEmpty()) return;
        playerVault.setPlayerVaultItems(currentPage, playerVaultItems);
        playerVault.save();
    }```

this method works before every page change and when the menu is closed
ivory sleet
tender shard
ivory sleet
#

But yes koalexis I’ll give you a short history lesson

#

Go back some years and the amount of features spigot had in its api was way less

#

Thus so many apis and libraries were created to provide features that were missing

#

Often this required to at some point reference nms, and just doing that is somewhat effort taking since you gotta setup up the project environment, write good code, maintain and so on

#

This is partly why people just use apis from applications as well as frameworks and libraries, features might not be available from whatever stuff you’re using so then its just too perfect someone else has written exactly what you need

#

There is also another term thats good to know called ABI

#

Which stands for application binary interface

#

And has more to do with the binary compatibility of an application interface

young knoll
#

Don’t forget about ABBA

ivory sleet
tender shard
#
buoyant viper
worldly ingot
#

Looks like it's taking advantage of types that are similar to one another, so probably not

young knoll
#

Plus we aren’t changing return types in that, are we?

worldly ingot
#

Correct

#

We don't want to remove the string methods

young knoll
#

We are making a new method with a different return type

#

Just uhh, make the component methods take a parameter that does nothing

#

And have people pass null

#

10/10 best api design

buoyant viper
#

return Object AbsoluteHalal

#

take in a parameter that lets u choose the return

#

and have a zero-parameter version that returns String for backwards compat

young knoll
#

I mean that could work

#

With generics

#

But still kinda eh

#

Up to @worldly ingot ig

buoyant viper
#

it would work, but at what cost?

#

looking a bit Fugly

young knoll
#

Both options are kinda fugly

buoyant viper
#

there is only one option, Removal!

young knoll
#

You don’t get strings or components

#

Cry about it

buoyant viper
#

True

echo basalt
#

damn I love how even after years of experience with packets and nms half my shit doesn't work

buoyant viper
#

coding 👍

flint coyote
# buoyant viper coding 👍

While I still have some bugs in more complicated functions I do notice a huge decline in issues after long coding sessions. It ain't a rare case anymore that after 3 hours of coding everything works first try. That's generally coding related, not packets/nms related. 1-2 years prior it was pretty rare to have no bugs after coding for hours

#

Therefore I learn a lot less from "basic tasks" which is a little sad. A fair tradeoff I'd say

#

Long story short: "Half my shit doesn't work" is a long lasting friendship but at some point you lose contact

rare rover
#

this seems like very messy code with all the appends

#

how could i improve it

#

i mean ig i could not use a StringBuilder

#

but

#

meh

flint coyote
#

other than moving the string build parts to seperate functions to clear up a bit I don't think there's a lot you can do

#

I wouldn't say it's that messy either. Have seen worse

worldly ingot
#

You really don't have to use a string builder here

rare rover
#

yeah

#

that's what i was thinking

worldly ingot
#

You're not getting much benefit out of it anyways

lavish musk
#

Mc ver: 1.20.1
hello every1
I am making a plugin that if or if it loads after another, the issue is that with depend on plugin.yml is not working because the plugin is injected by another which downloads that plugin I need any idea or I rethink otherwise the code?

rare rover
#

so just do this

#

now this looks considerably better to me

flint coyote
#

When not using a loop to build a complicated string this is the cleaner way, yes. As Choco already stated it will barely change anything performancewise

rare rover
#

alr

#

ima have to split all this up into different classes to follow SOLID

#

since this class is doing way more things than 1

#

but

flint coyote
lavish musk
flint coyote
#

If the plugin that loads those plugins loads first, can't it download and initialize the other plugins before the one that requires them as dependencies loads?

humble lynx
#

I'm trying to display frozen hearts onto the player. So far I've tried both
player.setFreezeTicks(100);
player.lockFreezeTicks(true); (This just locks the frozen effect on the side of the screen really).
Anyone have any ideas how to display the frozen heart effect?

flint coyote
#

is 100 equal or more than maxFreezeTicks?

young knoll
#

No

flint coyote
#

I'd guess you don't get those hearts before being fully frozen

young knoll
#

You need moar powah

rare rover
#

if im wanting to return 2 values in 1 method should i use a map or something?

humble lynx
#

Ah, I see

rare rover
#

since i dont wanna loop the inventory twice

young knoll
flint coyote
humble lynx
#

So can't instantly set freezing, have to wait the minecraft default time

flint coyote
humble lynx
#

It's 5 seconds, and default freeze time is 7 seconds?

flint coyote
#

Then use 7 seconds?

#

Or just use the getMaxFreezeTicks() function

rare rover
#

hmm

#

so like this

#
@Getter protected static final ImmutableMap<Material, Integer> sellableItems = ImmutableMap.of(
            Material.WHEAT, 25
    );

    @Override
    public Pair<Double, Integer> calculate(Player player) {
        Inventory inventory = player.getInventory();
        double amount = 0;
        int itemAmount = 0;
        for (Material material : sellableItems.keySet()) {
            for (ItemStack contents : inventory.getContents()) {
                if (contents != null && contents.getType().equals(material)) {
                    amount += contents.getAmount() * sellableItems.get(material);
                    itemAmount += contents.getAmount();
                    inventory.remove(contents);
                }
            }
        }
        return Pair.of(amount, itemAmount);
    }```?
humble lynx
#

I'll test it out, but if I'm still needing to wait 7 seconds then there really isn't a point to max freeze ticks

flint coyote
flint coyote
rare rover
#

alr well if that's all

humble lynx
#

Interestingly enough, 200 fixes it o-o

rare rover
#

i made the method into just

#

which looks 1000x better

#

imo

flint coyote
humble lynx
#

ah, max being 140 I'm assuming

#

i'm so dumb

flint coyote
#

that's why you just set it to what maximum returns

humble lynx
#

yeah, i was assuming it was like fire ticks

flint coyote
#

then even if another plugin for whatever reason increased it, you'll be fine

humble lynx
#

where it's a duration that lasts after the player leaves the area of effect

flint coyote
young knoll
#

max is a poor name

lavish musk
young knoll
#

It actually was a hard cap at first until I yelled at MD about it :p

flint coyote
flint coyote
young knoll
#

Yes but it meant you couldn’t make players take freeze damage :p

quaint mantle
#

If one was implementing a lang file how would you go about it, managing replacements ect

humble lynx
#

yeah, i eventually changed it to max and it didn't work, so just reverted back to 200

quaint mantle
#

I can't decide on how I want to execute it

flint coyote
#

otherwise you'll have to take max + ticks you want the effect to stay

humble lynx
#

and it would tick down instantly if they weren't, right

#

ah yea

wet breach
quaint mantle
#

I mean handling replacements like <player> ect

#

My goal is to mostly make configurable messages not so much language configuraton

wet breach
#

But you said a lang file

young knoll
#

Just use a standard placeholder string

wet breach
#

^

young knoll
#

Like {player} or %player%

quaint mantle
#

I mean should I write abstraction instead of spamming .replace

young knoll
#

Probably

wet breach
#

Well now you know its not a lang file lol

quaint mantle
#

yes what should it be called then

young knoll
#

If you are going to deal with more than a few replacements I would write some abstraction

quaint mantle
#

Do you have any idea of what the usage for it would be, im not quite sure how I want to use the abstraction

wet breach
#

Text or message file etc. Cause lang file typically means you want to setup translations etc lol

flint coyote
wet breach
#

That is what the i18n standard dictates

flint coyote
#

So you'd still end up with a bunch of .replace()

quaint mantle
wet breach
flint coyote
wet breach
#

There is

young knoll
#

Whatever placeholder api does

wet breach
#

But replace is the easiest

quaint mantle
#

I was thinking about using an enum or smth but im not sure

worldly ingot
#

Or {} and {1} if you want a less Java-specific option

young knoll
#

Yes but that’s ugly for end users

worldly ingot
#

And end user that's willing to edit the language file can pretty easily determine what %s replaces

#

"Gave an apple to %s"
"Okay, %s must be the player name"

young knoll
#

Fair

worldly ingot
#

Also also, Minecraft uses this exact same formatting in their language files

quaint mantle
#

But what about when u have multiple placeholders and want them to be able to change the order

Ex.

%player% has killed %target%

%target% has killed %player%
worldly ingot
#

That's what %1$s does

quaint mantle
#

ohh

worldly ingot
#

1 = first placeholder, 2 = second placeholder, etc.

young knoll
#

(Or {0} {1})

worldly ingot
#

Right

young knoll
#

That’s what I use because lazy

worldly ingot
#

That's the C# and C++ formatters if I'm remembering correctly

#

Or perhaps just C#

young knoll
#

It’s also usable in java

#

And I find it easier to read than %1$s

worldly ingot
#

fs

young knoll
#

Wut

worldly ingot
#

for sure

quaint mantle
#

whoops i messed up the get function but ye

young knoll
#

FS can mean too many thinks

#

Fuck sake, for sure, filesystem

#

Oh no Kotlin

#

I cannot give opinions for I have no idea what is happening

rare rover
#

Lol

#

How would one figure out good names for your classes/ interfaces. I follow all the java naming conventions but have a hard time getting the right name of them

quaint mantle
rare rover
#

Any tips?

quaint mantle
#

I dont like having the get function but i dont think there is a way to make the NO_PERMISSION be a string on its own but figures

small current
compact haven
#

@quaint mantle I mean you can add the operator fun get to Gang and Server so you have

#

Messages[Messages.Gang.NO_PERMISSION]

#

idk shrug

quaint mantle
#

Yeah ig

river oracle
buoyant viper
#

getting them out of spigots namespace would be poggers

quaint mantle
#
  Messages.Gang.NO_PERMISSION.runReplacements(
        Replacement("player", "Nopox")
    )

Alright guys how is this to use?

young knoll
#

You can’t have 2 methods with the same name and parameters

#

And getCustomNameComponent looks dumb

river oracle
#

Ik that I was just kinda talking about the paper approach

wet breach
upper hazel
#

who knows why the armmorstand does not update its position in the stream if the player is sitting on it

grizzled oasis
#

im trying making a way to spawn particle in a range selected by the player, how can i do it?

wet breach
wet breach
#

But you could take values in from a command of how far away

grizzled oasis
wet breach
#

Runtasktimer isnt a stream

upper hazel
#

lol

wet breach
#

That is a task. So it could be then you want to use futures

young knoll
#

Are you teleporting it

upper hazel
#

what ?? all bukit task not stream??

#

ea

young knoll
#

I don’t think teleporting entities with player passengers works to well

wet breach
#

You have to dismount the player teleport both then remount

#

Passengers do not automatically teleport with the entity especially more so players

#

The best way to do it in a seemless fashion is to not teleport the entity

upper hazel
#

Well, apparently, every time you also have to put the player on an armor stand

wet breach
#

How you do that is you would spawn the entity at a location. Dismount player teleport and mount on new entity as its already there and then kill the old entity

wet breach
#

Reason that works better is because you are not waiting on both to teleport at same time because there is times where they wont. So just having a new entity there ahead of time prevents that issue

upper hazel
#

oh i see

#

it's a teleport but better huh?

wet breach
#

Well the entity isnt teleporting just the player

#

So instead of trying to sync up teleports you just dont. Since you can just duplicate the entity lol

upper hazel
#

I generally need this for 2 saddle horses, but I don’t know other options

cobalt thorn
#

Hi, with breakNaturally you can't take the item drops, there's another method were the block are like being broken by the player but instantly?