#help-development

1 messages Β· Page 1115 of 1

onyx fjord
#

didnt know that was possible in java

#

i feel too much power

drowsy helm
#

Indeed, but youll get a method clash

azure zealot
#

Just look into the bungeecord PipelineUtils

#

There you can see the order

slender elbow
drowsy helm
# slender elbow huh?

If the names for methods clash compiler forces you to explicitly call them by class

onyx fjord
#

no issues so far

slender elbow
#

no?

onyx fjord
#

are you sure

#

if they collide intellij warns me

slender elbow
#

if any default methods' signature clash the implementing class has to explicitly implement it but nothing about calling

drowsy helm
#

Ye default methods

slender elbow
#

but like, if there are no default methods in the itfcs you also have to implement them

#

if you mean invoking the default methods via super on interfaces you always have to specify the interface name

#

regardless of clashes

grim hound
#

how does Metadata work on Worlds?

eternal oxide
#

MetaData is non persistent

grim hound
#

okay, but what does it change?

eternal oxide
#

change?

grim hound
eternal oxide
#

You are talking about Bukkit Metadatable?

grim hound
#

is it some internal system plugins use

slender elbow
#

it was meant to be an api for plugins to communicate and interact with each other

#

but it was never finished

#

and it's ass and it's leaky

eternal oxide
#

and itws leaky.; almost no one uses it now

grim hound
#

oh I thought it was something useful

#

aight then

slender elbow
#

it's basically just a Map for plugins

#

but bad

hybrid turret
#

sooo i did some more research and i found... nothing. i still have no idea how i would set a skin for a protocollib-npc ._.
If anyone can tell me how, please ping me :)

grim hound
#

use

#

protocollib

#

also, skins are set with PlayerInfoUpdate I think

hybrid turret
#

bruh 50% say do 50% say don't and i want to be able to interact with an npc

#

and apparently without protocollib, it's ass to code

#

bc you have to do funky netty pipeline shit

#

i don't know a lot about packets yet and i'm trying to learn xd

grim hound
hybrid turret
#

7

#

more or less

grim hound
grim hound
hybrid turret
#

potato potato

hybrid turret
shadow night
grim hound
#

he is out of times it seems

hybrid turret
#

don't these 2 do the same thing?

grim hound
#

it's not even a competition at this point

shadow night
#

I believe you can also shade packetevents right?

grim hound
#

literally beat pl in every possible way

shadow night
grim hound
#

altough, retrooper doesn't really like that

hybrid turret
#

hmmm

hybrid turret
#

i mean

shadow night
hybrid turret
#

apr 3 2022

hybrid turret
#

so not THAT old

grim hound
grim hound
#

for packet events

shadow night
grim hound
hybrid turret
#

o-kay

#

uhm

#

right, then i'll try PacketEvents

grim hound
#

that's why it's much faster

hybrid turret
#

uhmmm is there no tutorial on how to include it in the code?

#

on the resource

#

like "installing" i mean

shadow night
#

Hasn't retrooper been working on a wiki for pe?

hybrid turret
#

i think i found it :)

#

through the github and then it's on its own wiki

#

and i suppose i can replace NMS with PE as well?

#

or are there still certain things i would need nms for?

shadow night
hybrid turret
#

so e.g. changing the name in a gameprofile i suppose

umbral ridge
hybrid turret
#

catto

#

hi spex

umbral ridge
#

HI

#

im a cat

grim hound
umbral ridge
#

1 pound of cat food per day

hybrid turret
#

fat cat

onyx fjord
#

at least no usable ones

#

wrapper repo had last commit like 2 years ago

hybrid turret
#

damn

atomic niche
hybrid turret
#

probably only the best

buoyant viper
#

one million beers?

hybrid turret
#

PacketEvents is actually pretty cool. At least from the kody simpson tutorial i've watched

urban escarp
#

is there method to get players xp in for loop and calculate it?

slate siren
#

Aaa

alpine urchin
#

although still WIP, but should be a good introduction

hybrid turret
#

yeah i got that open rn

#

oh hi retrooper

#

the man himself

alpine urchin
#

very odd coincidence i saw the message

hybrid turret
#

i don't quite understand how i would create a WrapperPlayServerSpawnPlayer packet

#

i feel stupid xd

alpine urchin
#

Have you read the sending packets page on the guide?

hybrid turret
hybrid turret
#

it's about this specific packet

alpine urchin
#

what minecraft version are you on

hybrid turret
#

e.g. the EntityDataType

hybrid turret
alpine urchin
#

the metadata is optional

hybrid turret
#

my ultimate goal is to spawn an NPC with a skin fetched from mojang

alpine urchin
#

you can look at how our NPC class works

#

that provides such functionality

hybrid turret
#

(that in the end can be interacted with)

hybrid turret
alpine urchin
#

you can use it, but the moment someone makes a complete packetevents extension that fulfills the NPC feature, we might remove it

#

we have so many components in the API, we're not sure if it's ideal to also allocate time maintaining a tiny NPC library

#

while an extension could primarily focus on that

#

for spawnplayer you could add no metadata list

hybrid turret
#

oh

alpine urchin
#

but do you understand how metadata works in the protocol generally?

hybrid turret
#

since i started like 30 minutes ago, not quite, no πŸ˜…

alpine urchin
#

we have a community that can provide support, but wiki.vg has documentation for parts of the protocol

#

it would be a strenuous task if we also documented all concepts in the protocol

#

as its always changing

hybrid turret
#

i see

alpine urchin
hybrid turret
#

ohhh

hybrid turret
alpine urchin
#

i suggest leaving an empty metadata list in SpawnPlayer packet, and sending a EntityMetadata packet later

alpine urchin
hybrid turret
#

i see

#

are there docs for the npc class?

#

Oh right, i also kinda canβ€˜t find the doc to how to shade eventpackets :(

alpine urchin
#

expects you to know how to shade a dependency generally

hybrid turret
#

Why not advised?

alpine urchin
hybrid turret
#

so if i understand correctly an example would be this:

            <relocation>
              <pattern>com.github.retrooper.packetevents-spigot</pattern>
              <shadedPattern>shaded.packet.path.packetevents</shadedPattern>
              <minimize>true</minimize>
            </relocation>
alpine urchin
#

probably correct

#

looks good to me at least

hybrid turret
#

so shading results in performance issues?

alpine urchin
#

No, performance loss and performance issues are two different things.

hybrid turret
#

oh

#

i mean loss ig?

alpine urchin
#

Just, if two plugins shade the library, packets are encoded & decoded twice.

#

Now, think of this, tons and tons of plugins shade the library.

#

Some users really have servers running 5 or more instances.

#

This is just an unnecessary performance drawback and you would be contributing to the problem.

#

This is why we raise awareness.

hybrid turret
#

i see

#

okay then i'll not shade it

#

and if i understand this correctly users then will just have to add the api to their plugin folder?

alpine urchin
#

As people see, the pros outweigh the cons, it's not just because it makes me feel some type of way or whatever

#

it benefits your users, although they might not see it

hybrid turret
#

alright thanks for the explanation

#

:))

alpine urchin
#

As you see, it wasn't successful in that issue haha

hybrid turret
alpine urchin
#

Not really since then people start asking for more functionality and more stuff, when this is not meant to be an NPC library. But it's simple, create an instance of it using our classes, (you'll need to generate a random UUID, you can generate a new entity id using SpigotReflectionUtil.generateEntityId())

#

then call NPC#spawn on a player channel, you can use getAPI().getPlayerManager().getChannel(player) to get a player's channel

#

and the npc is visible to them

hybrid turret
#

ohhh

#

tysm!!

alpine urchin
#

@hybrid turret did you read the entire docs

hybrid turret
#

uhm, maybe, not all of them?

#

oops

alpine urchin
#

i was just asking

hybrid turret
alpine urchin
#

for a rating

#

yes

hybrid turret
#

i will

#

should i tag you when i read them and tell u what i think? bc i got to go for now

alpine urchin
#

sure

#

yea

hybrid turret
#

alright will do

stuck oar
#

how would i go about making my own chat formatting plugin?

i want it so that it sends a different version of the message to each player

visual tide
#

First thing to think about is what versions to support

urban escarp
#

    public static Integer FactionPlayersPower (FPlayer p){
        int playerPower = ExperienceAPI.getPowerLevel((Player) p);
        int i = 0;
        for (fplayer : i = 0 ; i++) {
        }
        return i;
    }
#

I'm not very in to for loops, but i really need one, can anyone pls explane? πŸ˜…

visual tide
visual tide
urban escarp
#

I want to get an mcMMo power int from all faction players list

visual tide
#

Well then you’re gonna need a list of players

grim hound
#

master microoptimizer

urban escarp
#

weird thing is that it returns Set not list

visual tide
#

And then you can use a for loop like
for (Player player : playerList) { /* your code here */}

shadow night
#

Imagine if packetevents, instead of making multiple instances of itself for all plugins, made one

visual tide
urban escarp
#

FPlayers factionsPlayers = p.getFaction().getFPlayers();

visual tide
grim hound
urban escarp
#

ow but how do I + each players power from faction to one integer?

shadow night
visual tide
grim hound
shadow night
#

I did that once using the bukkit service API, but you'd want to add some handling for breaking versions

grim hound
#

also, what about encoder and decoder names?

shadow night
grim hound
#

I guess just use the default, fair

shadow night
grim hound
urban escarp
shadow night
grim hound
#

hehe, so am I

shadow night
#

I had "mayo/naise" in my pronouns, that's why

grim hound
#

they are paper boys

grim hound
shadow night
shadow night
grim hound
#

when did they ban you?

shadow night
#

I thought people have been joking, but they haven't

shadow night
grim hound
shadow night
#

Idk

grim hound
#

like date

shadow night
#

I don't rememeber

#

I believe all my messages are gone too

fluid river
#

fa/va are my pronouns now

shadow night
#

Holy shit you still exist?

grim hound
#

how can I search for some text in a github project?

shadow night
#

Using the search button

slender elbow
#

impressive

grim hound
#

it's just that it didn't give me any results

#

of a thing that's clearly in a plugin

slender elbow
#

funny

shadow night
#

Skill issue?

slender elbow
#

are you logged in?

grim hound
#

I mean, it might be a new thing and he just hasn't updated the github yet

#

cuz else I dunno

slender elbow
#

are you logged in?

grim hound
#

yes

rugged fern
#

is there any way to detect if a player is holding rightclick on an item?

paper viper
#

holding? or just pressing once

rugged fern
#

holding like i want the player to hold an item to get back to the lobby to the player cant accidently click it or smth

sterile breach
#

if i have a task that executes on each tick, will this task be called before or after the events?

stuck oar
#

i reckon i could figure it out for 1.8 i just dont know the starting point

river oracle
#

It depends what events you're speaking of

#

But it'll be unlikely their is any guaranteed order nor should you bank on any guarneteed order

sterile breach
sterile breach
slender elbow
#

tasks are ticked before worlds tick

#

at the beginning of server tick

eternal night
#

is that before or after AsyncPlayerChatEvent

slender elbow
#

neither

shadow night
paper viper
#

Hmm, not sure why but sometimes when I end my minigame while the player is on the respawn screen still they get a "Chat disabled in client options." What could this usually entail?

slender elbow
#

i'm just a messenger

shadow night
#

so you do not know any reasons why that is so?

slender elbow
#

nor do i care

shadow night
#

Who do I need to ping to find out

slender elbow
#

md5

pseudo hazel
#

πŸ’€

#

even then, wtf are you gonna do with the reasoning behind the way it works

shadow night
slender elbow
#

because it fixes the bug linked

#

that's why

pseudo hazel
#

2016, thats like since 1.9

shadow night
#

Can I, in theory, make git believe I commited something before the project even existed?

halcyon hemlock
#

am I goog programmer guys

#

is this real chat

slender elbow
#

sure, rebasing exists

pseudo hazel
#

you are a goog

#

also that code is terribly beautiful

#

or I guess more like beautifully terrible

halcyon hemlock
#

It's my actual code from like 2-3 years ago

#

I guess you really do learn from experience

pseudo hazel
#

yeah

#

being able to look back on your code and seeing its cringe means you learnt something

halcyon hemlock
#

Not saying I don't write code like that anymore

halcyon hemlock
shadow night
pseudo hazel
#

its like wrong in multiple ways, thats usually the best part about bad code

hybrid spoke
#

we all do have code like this

halcyon hemlock
#

I didn't even know what AtomicIntegers were so I used arrays lmaoo

pseudo hazel
#

its never only bad in 1 way

hybrid spoke
#

you just grew out of it

halcyon hemlock
#

readability -10

hybrid spoke
#

but its cool tho, i can even follow the thought process from my old projects, so i can see with the experience i had back then why i did this and that

quaint mantle
#

IDE suggesting arrays instead of atomics: πŸ—Ώ

blazing ocean
halcyon hemlock
hybrid spoke
halcyon hemlock
#

I was scared to use them

#

too high level words you know

blazing ocean
halcyon hemlock
#

I love how garbage that code is bro

hybrid spoke
#

your garbage is others perfection

#

i love learning processes

halcyon hemlock
#

Yeah, you can't learn without making mistakes ykwim

halcyon hemlock
hybrid spoke
#

gotta risk something to achieve something

#

that being said, brb all in on green

halcyon hemlock
#

all on red

hybrid spoke
#

ew

#

red only after tripple black, trust

halcyon hemlock
#

πŸ˜‚

paper viper
#

for anything else breh

#

why cant they create like AtomicObject<T>

quaint mantle
#

Atomic<T>

paper viper
#

AtomicBoolean, AtomicLong, AtomicObject to fit the naming scheme

#

but actually OptionalInt, then Optional.. idk maybe Atomic<T> is good lol

hybrid turret
#

i suppose i cant set something like "1h 20min" as a score on a scoreboard? only integers?

pseudo hazel
#

correct

#

if you are talking about the red text yeah

#

but you can just hide it and show your own text

#

or atleast I think you can hide it

slender elbow
#

not with the api

#

:Clueless:

pseudo hazel
#

oh oof

#

thats a paper thing then I guess 🀐

eternal night
shadow night
pseudo hazel
#

anyways I think for my plugin all the scores are just 0

#

so it doesnt really matter anyways

shadow night
pseudo hazel
#

order is also based on team name I think

#

like it needs some way to order the scores

#

my code sets all scores to 0

#

but the line indexes are just the team names

#

like LINE_1

tardy delta
#

doesnt have hardware instructions otherwise

#

i mean theres AtomicReference<T> but that exists because a reference is pointer sized

slender elbow
#

i mean, the jdk doesn't care about available hardware instructions or pointer sizes

#

to the point where writing to a long or a double is allowed to not be atomic, but two 32-bit writes

shadow night
#

Is a 32 bit write just an integer

slender elbow
#

ints are 32 bits, yes

eternal night
#

next you'll tell me booleans are 8bits

shadow night
#

Why are things still called 32 bit and 64 bit instead of 4 bytes and 8 bytes

eternal night
#

its cooler

slender elbow
#

:Clueless:

eternal night
#

they'd never COPIUM

shadow night
halcyon hemlock
#

πŸ€“ πŸ‘†

eternal night
#

makes sense NODDERS

slender elbow
shadow night
shadow night
halcyon hemlock
#

I prefer them spread in a vec

#

if computers have memory, we should use it frfr

#

32 gigabytes vs a single byte. you can fit billions!

paper viper
#

Boolean enjoyers vs int enjoyers

#

if (0) πŸ™‚

shadow night
#

I use chars

paper viper
#

why cant they allow u to to use ints in conditionals like c++

shadow night
#

or f64's

paper viper
#

like 0 is false everything else true

paper viper
#

because it makes sense

shadow night
shadow night
paper viper
#

yes and c++ has booleans too lmao but many people use the int conditional

#

its much easier for doing stuff like array accesses, etc

#

if you have a huge integer array and want to check if the value is set or not, all you do is that

shadow night
paper viper
#

breh have u used c++ before?

shadow night
#

a few times

#

would've prefered to not

dark moth
#

frfr

#

i aint a game hacker bro

quaint mantle
#

#define false 0
#define true 1

paper viper
#

lmao

dark moth
#

and i couldnt get the syntax

#

its hard!!111!!

shadow night
paper viper
#

the syntax follows most C syntax languages like java

dark moth
#

i was just not tryna make it obvious that im lazy.

#

i dont even know java fully

paper viper
#

oh

shadow night
dark moth
#

thats why i fart everytime i code java

shadow night
#

Java is huge

dark moth
#

and abstract

#

or protected

shadow night
paper viper
#

assert is a keyword only used for testing purposes

#

it only works if u run it with a cmd line parameter iirc

shadow night
#

assert can be used to tell ur IDE to chill

paper viper
#

otherwise its completely ignored

paper viper
#

for ex a null check

shadow night
paper viper
#

whats metadata

shadow night
#

That's how I call my item meta variables

dark moth
#

i just saw assert when something was turning null and intellij was like "are u a fricking dum dum bro this is actually null u dumahh boy"

paper viper
#

well it can be null

shadow night
dark moth
#

and intellij said use assert

paper viper
#

itemmeta can def be null

dark moth
paper viper
#

theres a reason the hasItemMeta method exists

#

the method is annotated with @Nullable

#

thats on purpose for IDE's to warn users

shadow night
dark moth
#

@rough drift dude i hate forge teach me ur wayz in fabric plz

paper viper
#

then what is it for

dark moth
#

i couldnt get anywhere with forge

shadow night
#

getItemMeta either returns the current meta or creates a new one for this item (can be null with air)

dark moth
#

lets hope that i can do it on fabric

shadow night
#

hasItemMeta returns whether it has been created yet

paper viper
#

i guess for air stacks?

#

idk

pseudo hazel
#

whats the item meta factory

shadow night
dark moth
#

@paper viper@shadow night just wanna ask fabric vs forge in modding

paper viper
shadow night
pseudo hazel
#

oh right

shadow night
#

Which is not my scenario

pseudo hazel
#

would be the same as creating an itemstack and getting the meta from it

shadow night
#
  • hasItemMeta will not tell you that
pseudo hazel
#

iirc

paper viper
#

but thats why the ide is warning you

#

theres reason for it

#

and it doesnt hurt to just add a single null check

shadow night
pseudo hazel
#

the ide is warning you because the signature of getItemmeta is probably wrongly defined as nullable

shadow night
#

A single useless if doesn't hurt performance a lot, but imagine 200 if's

paper viper
#

thats why its @Nullable

pseudo hazel
#

okay so then why would the check be useless

paper viper
#

wdym

shadow night
paper viper
pseudo hazel
#

if you know its not gonna be air, you don't have to check it

shadow night
dark moth
#

bro these guys are fighting over of a method

paper viper
#

why tf would u have 200 null checks lol

shadow night
#

An if check is an operation, an operation consumes some time

dark moth
#

is it even neccesary ?

eternal oxide
#

Fabric community is nicer than Forge

shadow night
paper viper
#

and theres literally no performance issue

shadow night
paper viper
#

theres literally not omg πŸ’€

dark moth
paper viper
#

micro optimizations

#

like bruh

#

"micro optimizations add up"

paper viper
#

then in that case use final for everything cause its "marginally" faster lol

shadow night
worthy yarrow
#

Are stream methods slower than iterator methods? ie: stream.findFirst as opposed to iterator.next

shadow night
#

In this scenario, it increases readability, LOC and works as a micro-optimization

visual tide
#

Not supporting lex :p

shadow night
paper viper
#

i'm not arguing about this. computers are capable of billions of operations and a null check is literally a O(1) operation

#

probably even no overhead at all

shadow night
#

Just remove it

paper viper
#

its not bloat if you are covering an edge case...

#

nvm im done

shadow night
#

You'll never get an AIR stack in 98% of scenarios

paper viper
#

yea then the 2% chance u do... πŸ’€

shadow night
#

Most of the time checking whether the stack is null is enough

worthy yarrow
visual tide
#

One might suggest that forks could implement logic that yields AIR stacks where spigot would yield null πŸ€“β˜οΈ

shadow night
slender elbow
slender elbow
#

no

worthy yarrow
#

let me show you hold on

visual tide
worthy yarrow
#

Eh was just wondering cuz fourteen said use iterator not streams

slender elbow
#

eh

worthy yarrow
#

I'm trying to find the bit he was referring to hold on

visual tide
#

Using streams is not gonna kill your performance

paper viper
#

yeah use streams when they are convienant

slender elbow
#

i mean, unless it's stupidly hot code, it really doesn't matter

#

SequencedCollection#getFirst() 😌

worthy yarrow
#
public class InviteService {

    private final Map<UUID, Set<InviteImpl>> invites;

    public InviteService() {
        this.invites = new ConcurrentHashMap<>();
    }

    public void createInvite(UUID inviter, UUID invitee, Duration duration) {
        Instant expiryTime = Instant.now().plus(duration);
        InviteImpl inviteImpl = new InviteImpl(inviter, invitee, expiryTime);

        this.invites.computeIfAbsent(invitee, uuid ->
                ConcurrentHashMap.newKeySet()).add(inviteImpl);
    }

    public boolean acceptInvite(UUID invitee) {
        Set<InviteImpl> inviteSet = this.invites.get(invitee);
        if (inviteSet == null) {
            return false;
        }
        Optional<InviteImpl> inviteOpt = inviteSet.stream().findFirst();
        if (inviteOpt.isEmpty() || inviteOpt.get().isExpired()) {
            return false;
        }
        inviteSet.remove(inviteOpt.get());
        if (inviteSet.isEmpty()) {
            this.invites.remove(invitee);
        }
        return true;
    }

    public boolean rejectInvite(UUID invitee) {
        return this.invites.remove(invitee) != null;
    }

    public boolean hasInvite(UUID invitee) {
        Set<InviteImpl> inviteSet = this.invites.get(invitee);
        return inviteSet != null && inviteSet.stream().anyMatch(invite -> !invite.isExpired());
    }

    public void removeExpiredInvites() {
        for (Set<InviteImpl> inviteSet : this.invites.values()) {
            inviteSet.removeIf(InviteImpl::isExpired);
        }
    }

    public void clearInvitesMap(){
        this.invites.clear();
    }

}```

Idk you tell me if it's stupidly hot 🀷
shadow night
slender elbow
#

by stupidly hot i mean code that has to run fast because it's in a code path that gets called really frequently and you need to get it out of there asap

paper viper
#

Yeah

tardy delta
paper viper
#

what

slender elbow
#

which can be just as fast as native code..?

#

null checks are absordly cheap, like, single clock cycle cheap

shadow night
#

it's better to not have a useless line of code than to have one

slender elbow
#

"you're still coding in java" like what's your point

paper viper
#

python can be just as fast as low level languages like C

shadow night
slender elbow
#

i mean the runtime quite literally compiles your code to native instructions

#

via JIT, not JNI but yeah

shadow night
#

Yeah right

#

Got that stuff mixed up, oops

slender elbow
#

and it very well does compete with languages that compile directly to machine code

paper viper
tall dragon
#

someone managed 1.5seconds

shadow night
tall dragon
#

to parse 1billion line file

tall dragon
#

lots of hacky stuff yea haha

tardy delta
#

its all simd

blazing ocean
#

somebody doesn't just say "hey let's make a challenge to parse one billion rows"

#

and then do it in java

tall dragon
glossy laurel
#

Is there some easier way to create commands without needing to register them in 3 different places?

tall dragon
#

by default.. no iirc

#

but u can add them directly to the commandmap like most people here

worthy yarrow
#
public abstract class Command extends BukkitCommand {

    public Command(String command, String[] aliases, String description, String permission) {
        super(command);
        this.setAliases(Arrays.asList(aliases));
        this.setDescription(description);
        this.setPermission(permission);

        try {
            Field field = Bukkit.getServer().getClass().getDeclaredField("commandMap");
            field.setAccessible(true);
            CommandMap map = (CommandMap) field.get(Bukkit.getServer());
            map.register(command, this);

        } catch (NoSuchFieldException | IllegalAccessException e){
            e.printStackTrace();
        }
    }

    @Override
    public boolean execute(CommandSender commandSender, String s, String[] strings) {
        execute(commandSender, strings);
        return false;
    }

    public abstract void execute(CommandSender sender, String[] args);

    @Override
    public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
        return onTabComplete(sender, args);
    }

    public abstract List<String> onTabComplete(CommandSender sender, String[] args);

}

This is what I do

blazing ocean
#

...or you could just use a command framework

glossy laurel
#

instead of letting the first (command, argument, whatever) be handled by bukkit, just handle it urself?

tall dragon
glossy laurel
tall dragon
#

ur registering directly into commandmap like nuclear is doing

#

but ur best off making a framework around that

#

or using one

glossy laurel
#

how do I do that

#

whats a framework

#

😭

tall dragon
late abyss
#

Is there a difference between reading my plugin's config during onLoad or onEnable?

worthy yarrow
#

onLoad is on server startup after depends ofc, and onEnable is after world has been loaded right?

blazing ocean
#

i would've understood if it was minimessage or something

tall dragon
glossy laurel
#

what does this even do

tall dragon
#

it adds a command

late abyss
worthy yarrow
tall dragon
#

if u wanna know how it works u should read their docs

glossy laurel
tall dragon
#

so u dont have to register anywhere else

slate siren
#

I tested the code here and I think I didn't explain the system I wanted clearly. The system here works like this.

It calculates the damage dealt to the player, and when doing this calculation, the power of the sword, the armor the player is wearing, and everything else are taken into account.

But this was not the system I wanted. Let me explain it very briefly and concisely.

First of all, let me state this, the power of the player's sword or the armor he is wearing should not matter.

A player also has 10 hearts,
Now what we need to find out is this: Sometimes a player can be attacked by more than one player at the same time.What is important to us is the killer, (How many hearts did the killer use to kill this person?)

For example, 2 people hit that player at the same time and the murderer killed that player by taking 4 hearts. In this case, it should be reported as follows.

You killed the player named (....) with (4 hearts).

That's just it. I tried to do it, but I couldn't calculate how many hearts, i.e. how many HP, the killer actually took from the killed person when more than one player attacked at a time.

glossy laurel
#

Nice

worthy yarrow
#

I can send you an example of how it's used if you need tha spoonfeed kek

#
public class IslandCommand extends Command {

    private final Skyblock plugin;

    public IslandCommand(Skyblock plugin) {
        super("island",
                new String[]{"is", "islands", "nsb"},
                "NormalSkyblock: Island command, Usage: </island, /is, /islands, /nsb",
                "nsb.command.island.use");
        this.plugin = plugin;
    }

    @Override
    public void execute(CommandSender sender, String[] args) {
        if (!(sender instanceof Player player)) {
            return;
        }
        GUIRegistry guiRegistry = plugin.getRegistryManager().getGuiRegistry();
        player.openInventory(guiRegistry.getOrThrow("role_settings_" + Role.VISITOR.name()));

    }

    @Override
    public List<String> onTabComplete(CommandSender sender, String[] args) {
        return null;
    }
}

...


// In your main or wherever you register commands 


@Override
    public void onEnable() {
        registerCommands();
    }


private void registerCommands(){
        new IslandCommand(this);
    }

glossy laurel
#

Its fine

worthy yarrow
#

well there ya go

#

It's there if you need it

glossy laurel
#

Right

tardy delta
#

whats the plugin for

fluid cypress
#

is there any good library or something for making inventory GUIs?

glossy laurel
glossy laurel
#

Mb

eternal oxide
#

?gui

slate siren
#

WHAAAA

blazing ocean
blazing ocean
halcyon hemlock
slender elbow
#

if by "call into native code" you mean using Unsafe

#

unless reading the file is also calling into native code

#

then it's unavoidable 🀯

#

the claim that java is slow is so absurd

halcyon hemlock
tardy delta
#

write them in xml

#

thought id get a reaction

dark moth
#

forge,neoforge,fabric

#

throughout coidng and modding who do yall think alone is the honoured one

#

ima go with neo

paper viper
#

i really like fabric

dark moth
#

but i need that info

paper viper
#

id recommend neoforge or fabric

#

forge is kinda ehhhh

dark moth
#

ima code a mod for keybinding, tried with forge, gone wrong,dont try at home

tardy delta
#

write me a keyboard driver

dark moth
paper viper
#

i dislike it because the community has not had a good history

normal thicket
dark moth
#

they aint even that active bro

paper viper
#

No just straight up toxic

dark moth
paper viper
#

and jerks

dark moth
#

fno i hate it more

normal thicket
paper viper
#

all of forge's original developers except for Lex joined neoforge

tardy delta
#

forgecord πŸ’€

dark moth
#

is neo actuall goated

paper viper
#

"I want to be clear, Lex has been a problem in the modding community for many, many years. Almost every veteran minecraft modder has had a negative interaction with him over the past 12 years. I have, when able to, tried to steer people to not abandon Forge just because of Lex - defending him in many a private conversation with a frustrated modder who’d just been called a β€œC*nt” for 1,000th time by Lex, or banned from our online spaces for a trivial transgression like discussing Fabric or coremods."

tardy delta
#

curle and lex, damn we are getting a little story

#

sounds like a fairy tale

normal thicket
eternal oxide
#

Hes always been that way

normal thicket
#

just ban mf

eternal oxide
#

But forge was "his" project (I believe)

paper viper
chrome beacon
normal thicket
dark moth
paper viper
#

Yea

dark moth
#

i thought u were blaming out of nothing lol

eternal oxide
#

I was goign to start modding many years ago (7 to 8) but decided not to once I was banned by Lex.

paper viper
#

no there were lots of controversies and stuff

normal thicket
#

bro muted me cuz of nothing

eternal oxide
#

I posted in IRC that I imagined Lex had a huge pulsating vein on his forehead

paper viper
#

Lmao

#

and you still remember to this day? damn

eternal oxide
#

it was pretty much the only time I did speak in his IRC

dark moth
#

the problem is i couldnt find any neoforge tutorial

#

need help rq

paper viper
#

pretty much all the stuff you'd do for forge would work on neoforge

dark moth
#

oh

#

shit

paper viper
#

neoforge isnt hard fork right now

dark moth
#

im fckd up

tardy delta
#

what does hard fork mean

dark moth
#

dude i wanna give up on my modding project and go follow up a different way

paper viper
#

basically being completely independent of the parent project you forked from

#

right now forge stuff works on neoforge because neoforge isnt a hard fork and maintains some compatability

#

its not like neoforge hard forked and revamped the system so forge mods wont work on it anymore

hybrid trellis
#

When making a skyblock server, should I make it so the island has the data like owner etc, so when a player wants to go to a island with a offline owner I just load the data?

pure dagger
#

hey quick question, how to regenerate a player ?

#

for example 2 hearts

#

or max health

worthy yarrow
#

Do you mean apply regeneration the potion effect?

#

Or set their health?

misty garden
#

hello you can send me the depencies for the Factions plugin ?

worthy yarrow
#

Yes here you go

dependencies : Faction

misty garden
#

for maven pls

worthy yarrow
#

oh sorry

misty garden
#

no problem bro

worthy yarrow
#
<dependency>
    <groupId>Factions</groupId>
     <artifactId>Factions</artifactId>
     <version>Factions</version>
     <scope>Factions</scope>
 </dependency>
eternal oxide
#

artifactId shoudl be lower case πŸ˜‰

worthy yarrow
#

I just copy pasted lol

#

It's a bit anyway

eternal oxide
#

looks good to me

worthy yarrow
#

photographic memory doing me well

pure dagger
worthy yarrow
#

Past 2 days been redoing maven structure for multiple modules kek

pure dagger
#

like damage but

#

wait... damage(-2)

#

im genius

#

jk

worthy yarrow
# misty garden no problem bro

Anyways sorry for the bit, uh you should go to whatever factions plugin you're trying to get ahold of's git repo and see if they have their dependency information listed somewhere

tardy delta
#

love it when i get to patch a function again that already broke five times

pure dagger
worthy yarrow
#

Oh sorry

#

player has a .setHealth method that takes a double

pure dagger
#

umm

#

but how do i add the health? how do i get player health for example

#

oh i can get tht

#

actually, how do i get his max health?

worthy yarrow
#

.getHealth

#

Oh

tardy delta
#

maybe if you actually start using the docs

worthy yarrow
#

uh

#

Yeah that

tardy delta
#

attribute modifier

frail willow
#

How to use base64 to make a custom player head?

pure dagger
tardy delta
#

you dont know how to use the docs?

pure dagger
#

i dont think it would be easier to find how to set player's health to their max but imma try

ornate mantle
#

anyone have any resources on rotational matrices? I want to spawn a particle on the right and left of where the player is looking at

tardy delta
young knoll
#

Well I've managed to read the request just fine, but for some reason the client always ends up with java.net.SocketException: Unexpected end of file from server

@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    ByteBuf in = (ByteBuf) msg;
    final int magic1 = in.getUnsignedByte(in.readerIndex());
    final int magic2 = in.getUnsignedByte(in.readerIndex() + 1);

    if (isHttp(magic1, magic2)) {
        while (in.isReadable()) {
            System.out.print((char) in.readUnsignedByte());
        }

        HttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND);
        ctx.write(response).syncUninterruptibly();
        return;
    }

    super.channelRead(ctx, msg);
}
ornate mantle
#

thanks boss

worthy yarrow
pure dagger
worthy yarrow
#

read what it says

#

Why is it deprecated

pure dagger
#

oki wait

#

ohh

#

yay

worthy yarrow
#

This is why we read documentation, I promise it helps

pure dagger
#

didnt see that

worthy yarrow
#

?jd-s

undone axleBOT
pure dagger
#

oki thanks

ornate mantle
#

nvm i figured it out

#

i'll play around with angles

tardy delta
pure dagger
#

yes yes i red

#

read

#

so i should do it like that right?

player.setHealth(player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
eternal oxide
#

?tas

undone axleBOT
pure dagger
#

i think its better to ask because there might be some mistakes

tardy delta
#

please like subscribe comment and forget to click.. 🀑

#

never actually clicked that video

eternal oxide
#

actually I had not either

worthy yarrow
ornate mantle
#

factual

pure dagger
worthy yarrow
#

What does that have to do with me?

pure dagger
#

thanks for help?

#

i have mice in ceiling

#

cut

#

e

tardy delta
#

does that affect your discord experience?

worthy yarrow
#

Or speech center?

dawn flower
#

does Player#hidePlayer hide the player from tab as well

tardy delta
#

yes

pure dagger
misty garden
#

how i can get my other files for configuration ? because know i do main#getconfig

sterile breach
#

from how many packet movements sent by the client in one tick it becomes too much (considered as spam)?

tardy delta
#
BukkitWiki

The Configuration API is a set of tools to help developers quickly parse and emit configuration files that are human readable and editable. Despite the name, the API can easily be used to store plugin data in addition to plugin configuration. Presently only YAML configurations can be used. The API however was designed to be extensible and allow ...

young knoll
tardy delta
#

sees syncinterruptably

young knoll
#

Uninterruptedly aktually

#

Anyway if I remove that I still get the same issue

#

It either gets interrupted or it hangs forever

tardy delta
#

cant type that word

#

ah uninteruptably

#

guess i was blinded by all the other java bloat

#

πŸ˜‚

young knoll
#

The almighty google doesn’t seem to have much of help

#

I’m doomed

stuck oar
#

anyone know how i would detect a players armor change?

like if they put armor on or took it off

jagged quail
#

@young knoll how develop papermc plugin /s

eternal night
#

Lemme do what coll will do when he sees this

civic iris
#

(intellij) is it better to create the project using the Generator: Minecraft or create a new project and implement the dependency of like for example spigot? or is there no difference except it's little more time consuming to do it manually?

civic iris
#

?

#

last part?

quaint mantle
#

yes last part

civic iris
#

ok ty

stuck oar
#

        if (event.getDamager() instanceof Player);
        if (event.getEntity() instanceof Player){
            Player a = (Player) event.getDamager();
            Player p = (Player) event.getEntity();

            ItemStack boots = a.getInventory().getBoots();
            ItemStack helmet = a.getInventory().getHelmet();
            ItemStack chest = a.getInventory().getChestplate();
            ItemStack leggings = a.getInventory().getLeggings();

            if (boots != null && helmet != null && chest != null && leggings != null) {

                NBTItem nbtItem = new NBTItem(boots);
                NBTItem nbtItem2 = new NBTItem(leggings);
                NBTItem nbtItem3 = new NBTItem(chest);
                NBTItem nbtItem4 = new NBTItem(helmet);

                if (nbtItem.hasKey("armorsets-testset")) ;
                System.out.println("boots have key");
                if (nbtItem2.hasKey("armorsets-testset")) ;
                System.out.println("legs has key");
                if (nbtItem3.hasKey("armorsets-testset")) ;
                System.out.println("chest has key");
                if (nbtItem4.hasKey("armorsets-testset")) ;
                System.out.println("helmet has key");

                System.out.println(event.getDamage() + "old damage");

                double tenPercent = event.getDamage() / 10;
                double newDamage = event.getDamage();
                ++tenPercent;

                event.setDamage(newDamage);

                System.out.println(tenPercent + "tenpercent");
                System.out.println(newDamage + "newDamage");

            } else {
                System.out.println("not full set");
            }

        }

    }```

please dont grill me i know its bad i was just testing
is there any easier way to do this because it just crashed my server
maiden thicket
#

Hey, I have this sign and I have a map scanner that spawns NPCs at the sign's location. One issue I keep running into is that the NPCs won't face the direction of the sign. Here's the code:

                    if (lines[2].equalsIgnoreCase("warrior")) {
                        if (sign.getBlock().getBlockData() instanceof Rotatable rotatable) sign.getLocation().setDirection(rotatable.getRotation().getDirection());
                        final WarriorKitNPC npc = new WarriorKitNPC(sign.getLocation());
                    } else if (lines[2].equalsIgnoreCase("archer")) {
                        if (sign.getBlock().getBlockData() instanceof Rotatable rotatable) sign.getLocation().setDirection(rotatable.getRotation().getDirection());
                        final ArcherKitNPC npc = new ArcherKitNPC(sign.getLocation());
                    }
        this.serverPlayer.setPos(new Vec3(location.getX(), location.getY(), location.getZ()).add(0.5, 0, 0.5));
        this.serverPlayer.setRot(location.getYaw() - 90, location.getPitch());
        this.serverPlayer.setYHeadRot(location.getYaw());```
```java
        NMSUtil.sendPacket(player, new ClientboundRotateHeadPacket(this.serverPlayer, (byte) (this.serverPlayer.getYRot() * 256.0F / 360.0F)));
        NMSUtil.sendPacket(player, new ClientboundMoveEntityPacket.Rot(this.serverPlayer.getId(), (byte) (this.serverPlayer.getYRot() * 256.0F / 360.0F), (byte) (this.serverPlayer.getXRot() * 256.0F / 360.0F), true));
        NMSUtil.sendPacket(player, new ClientboundSetEntityDataPacket(this.serverPlayer.getId(), List.of(new SynchedEntityData.DataValue<>(17, EntityDataSerializers.BYTE, (byte) 127))));
#

this.serverPlayer being the nms entity

young knoll
unique shuttle
#

Hi! Just a question. Will the "Recipe" provided by this event always be a ShapedRecipe, or could it be another type of recipe?

#

Thanks 🐱

young knoll
#

Could be shapeless

#

Or complex

rugged fern
#

can i get full mapping method names and not just these a,b,c? was it with the spigot or mojang mappings?

young knoll
#

Mojang

inner mulch
#

how are client-server systems usually designed? (all the packet stuff)

young knoll
#

They just

#

Send packets between eachother

#

If the packet is very important you could add verification that it made it successfully

#

(Or just let TCP do that for you)

inner mulch
#

what are packets? just a data class, and how does the client or the server know what to do with them?

young knoll
#

At their core they are just bytes

#

You’ll probably use the first byte(s) as some sort of ID so the receiver knows what to do with it

silver hearth
#

is this compatible with bedrock realms?

inner mulch
#

instead of just bytes?

young knoll
#

Well they have to be serialized to bytes either way

inner mulch
#

okay

grim hound
#

How do proxies transfer players between servers?

#

And how do they reinitiate the packet login process each time?

remote swallow
#

spigot?

grim hound
#

And how do you know exactly when to resend each packet for each version?

young knoll
#

When a player transfers servers on a proxy

#

The client thinks it’s a world transfer

#

Or at least it used to

#

And then the proxy changes which backend server it redirects packets to/from

inner mulch
#

since when can you do something like that with generics in methods?

tender shard
#

at least since java 8

inner mulch
#

i have never seen some1 use this

#

i didnt know this was a thing xd

unique shuttle
inner mulch
grim hound
#

Also, how the hell does the client know when to send it

#

And when is it even sent?

#

Also, does the client resend any packets during a world change?

#

Cuz the server sure does

grim hound
tender shard
#

it was some weird util class or sth

river oracle
#

Prepare to cry

inner mulch
#

why :(

young knoll
#

I think you can put the client back into the config state and it’ll figure things out

#

Maybe?

inner mulch
rugged fern
#

What did i wrong here? ServerPlayer entityPlayer = ((CraftPlayer) player).getHandle(); the error says Caused by: java.lang.NoSuchMethodError: 'net.minecraft.server.level.ServerPlayer org.bukkit.craftbukkit.v1_21_R1.entity.CraftPlayer.getHandle()'

young knoll
#

Seems like you didn’t reobfuscate

rugged fern
#

hm?

young knoll
#

?nms

rugged fern
#

When the player is dying why do i get this error?: Caused by: java.lang.IllegalArgumentException: Cannot get property BlockStateDirection{name=facing, clazz=class net.minecraft.core.EnumDirection, values=[north, south, west, east]} as it does not exist in Block{minecraft:air} at net.minecraft.world.level.block.state.IBlockDataHolder.c(SourceFile:97) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a] at net.minecraft.server.level.EntityPlayer.startSleepInBed(EntityPlayer.java:1354) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a] at net.minecraft.world.entity.player.EntityHuman.a(EntityHuman.java:1522) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4226-Spigot-146439e-2889b3a] at eu.sabermc.entities.CorpseEntity.execute(CorpseEntity.java:37) ~[?:?] at eu.sabermc.listener.PlayerDeathListener.onPlayerDeath(PlayerDeathListener.java:14) ~[?:?] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?] at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?] ... 32 more Along this code: corpse.startSleepInBed(new BlockPos((int) bed.getX(), (int) bed.getY(), (int) bed.getZ()));

#

Why is this throwing null? ServerPlayerConnection connection = ((CraftPlayer) players).getHandle().connection;

magic thorn
#

Why is it giving me a null

#

1 sec

#

java.lang.NullPointerException: Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "pl.monkee.Main.getCommand(String)" is null

#

i cant send photos

#

but

#




@Override
    public void onEnable() {
        main = this;
        this.saveDefaultConfig();


        GiveMiecz giveMiecz = new GiveMiecz();






        new MieczListener(this, giveMiecz);
        getCommand("giveMiecz").setExecutor(giveMiecz);
        this.ladowaniePluginu();
    }```
#
name: Miecz_Kresu_PROTOCODE
version: 1.0
main: pl.monkee.Main
commands:
  giveMiecz:
    description: dupa
#

thats the config

#

and

#

everything should be good

#

i think

young knoll
#

?di

undone axleBOT
stuck oar
#

can anyone help

if (a.getInventory().getHelmet().getItemMeta().getLore().getLast().contains(ChatColor.stripColor("full set bonus".toLowerCase())) && a.getInventory().getChestplate().getItemMeta().getLore().getLast().contains(ChatColor.stripColor("full set bonus".toLowerCase())) && a.getInventory().getLeggings().getItemMeta().getLore().getLast().contains(ChatColor.stripColor("full set bonus".toLowerCase())) && a.getInventory().getBoots().getItemMeta().getLore().getLast().contains(ChatColor.stripColor("full set bonus".toLowerCase())))

I know its long but it just doesnt work

#

im trying to check if the player has the full set on

carmine mica
#

don't use lore to match against items

#

use pdc

stuck oar
#

if i use nbtitems it times out the server

#

anyway

#

the problem is

#

apparently the helmet doesnt exist

#

but it dies

#

does

young knoll
#

I smell 1.8

carmine mica
#

getLast
don't think so

young knoll
#

Then what is this nbtitems

young knoll
stuck oar
#

if i remove getLast it says "no armor equipped" if i add getFirst it gives the error again

#

im gonna tweak

young knoll
#

Why are you running stripColor on an uncoloured string

#

Or toLowerCase for that matter

stuck oar
#

idk

#

its 1m

#

1am

stuck oar
stuck oar
#

nbt makes my server time out

young knoll
#

Then ur doing something wrong

clear plaza
#

How can I add a LibsDisguises dependency in my project?

humble tulip
#

I tried doig the same by just reading a meta and modifying a pdc entry

#

However it causes the item to pop up

#

I'm frustrated cuz i have no idea why it works there

lost matrix
#

No need for the client to know all the pdc tags on an ItemStack

lost matrix
torn shuttle
#

guys, I'm sorry to say, I cheated on spigot

#

I made a java plugin for a program other than spigot

#

but I swear it's for a good cause

#

it bypasses youtube's api so livestreamers can merge their chatrooms from different platforms into one chat on screen

hybrid trellis
#

When making skyblock, should I make it so islands have their own database, and a player has a key that helps when teleporting home, or depositing to bank? While island has the owner, members, bank, sign commands, etc

lost matrix
#

Properties for the island are stored in the island data, properties for a player are stored in the players data.

lost matrix
torn shuttle
lost matrix
torn shuttle
#

sounds like it would be a document

hybrid turret
#

does an event fire when a player regenerates hp?

eternal oxide
hybrid turret
#

Oh

#

I just saw it

#

i'm sorry ._.

#

sometimes my fingies are faster than my brain :(

eternal oxide
#

Its ok, people take a while to get used to the documentation

echo basalt
eternal oxide
#

search is a real BIG friend

echo basalt
#

works aite

#

but I made mine in node.js

hybrid turret
#

i feel so bad lmao

lost matrix
#

I have a bit more than 4 now. Time flies πŸ₯²

hybrid turret
#

i'm doing it as a side hobby that sometimes gets more or less attention

lost matrix
#

Same, just as a hobby. Im still studying electrical engineering with a machine learning focus. So i write some C and Python there, nothing crazy.
I just went wild the first 2 years and i really like it. It replaced gaming for me πŸ™‚

#

So happy that i got accepted at the TUM for my CS master in a few weeks

glossy laurel
#

How do I save a big list of blocks in the folder of the plugin? Preferably binary or something so it doesnt take too much space

blazing ocean
#

tbh i'd just run them through dfu and save to nbt

rugged fern
#

Can I somehow set what tve player caught by fishing?

glossy laurel
blazing ocean
#

dfu is what minecraft uses for serialising stuff

glossy laurel
#

DataFixerUpper?

blazing ocean
#

yeah

#

but i think bukkit unsafe has some stuff for block serialisation?

#

lemme check

glossy laurel
#

Right, uhm, wanna spoonfeed me a lil?

blazing ocean
#

?jd-s

undone axleBOT
glossy laurel
blazing ocean
#

yeah no it doesn't have that

#

i'm sure there are better ways than through dfu tho, i'm not sure if blocks are codecified yet

glossy laurel
#

what the actual hell are you saying

#

😭

#

man, skript was easier lmfao

#

Right i got this

#

now tell me

#

what is "save to nbt"

#

bro nah, Named Binary Tag?

#

nah what's this bruh

#

@blazing ocean wanna send me some code? ☺️

blazing ocean
#

i've never really worked with serialising blocks, but do you mean a list of block states or materials

echo basalt
#

mfw smile is at my level with a third of the coding experience

grizzled fog
#

One message removed from a suspended account.

glossy laurel
blazing ocean
undone axleBOT
#

Name changes on the forums are granted to those who have donated to the project. Donations are processed manually and generally take up to 24 hours. The donation widget can be found on the home page of SpigotMC at: https://www.spigotmc.org/.

grizzled fog
glossy laurel
grizzled fog
hybrid trellis
#

So non relational

glossy laurel
#

What does the boolean in Block.getState() do? Either i'm stupid af or it's not in the docs

hazy parrot
#

Where is boolean in block.getstate?

glossy laurel
#

I cant paste images

#

wthhh

hybrid turret
#

is it possible to define colors in the plugin.yml?

hybrid turret
#

for example for the prefix

#

can i make the prefix displayed in the console colored?

blazing ocean
#

no

#

also please don't try to

#

it fucks up a lot of consoles and logs

#
  • screenreaders too, probably
hybrid turret
#

sadge

hybrid turret
blazing ocean
#

since you'd have to use ansi escape codes

#

and not all terminals and consoles support that

#

(and please don't even try to use chat colours)

hybrid turret
#

ah i see

hybrid turret
#

only tried that with the logger

#

and that doesnt support colors

#

so generally, should all messages going to the console be un-colored?

#

(bc rn all of them are)

blazing ocean
#

yeah keeping them like that is probably the best option

hybrid turret
#

*colored

#

i mean

#

oops

#
    ConsoleCommandSender sender = Bukkit.getServer().getConsoleSender();

    sender.sendMessage(
      PREFIX + formatColors("&aEnabling &6" + getDescription().getName() + " &7with &6v" + getDescription().getVersion() + "&7.&r")
    );
``` something like that
echo basalt
#

mfw bedrock has components but no rgb support

hybrid turret
#

bedrock πŸ’€

blazing ocean
#

and that is not something that should br happening

hybrid turret
#

it's not the logger, it's using sendMessage

#

and it works fine

blazing ocean
#

yeah but in your servers latest.log

hybrid turret
#

oh the .log

#

i never thought of that

blazing ocean
#

...yeah

hybrid turret
#
[10:20:35] [Server thread/INFO]: [Admin] Enabling VanillaUtility with v1.2.0.
#

oh no

blazing ocean
#

you see now?

hybrid turret
#

can i strip colors for the console sender?

blazing ocean
#

those are the ansi escape codes

hybrid turret
#

oof

hybrid turret
blazing ocean
#

just send users coloured messages, they support components

#

while the server logger doesn't fully

#

(i am aware paper has a component logger)

hybrid turret
#

i mean what if a user has a colored name