#help-development

1 messages ยท Page 2048 of 1

ivory sleet
#

so they would be equally good arguably

tender shard
#

exactly what I'm thinking too

#

but yeah my whole RecipeUtils is bad

#

but it works and I'm using it in 10+ plugins so I won't change anything there anytime soon lmao

grim ice
#

ic

#

makes sense

viral crag
#

Should call it mySecretRecipeForAwsomeTacosWithGuacamoleBaseAndExtraBeans

grim ice
#

i just thought it would be better to understand

#

at least for me

tender shard
viral crag
#

Just one

grim ice
#

descriptive variable names even in small scopes

#

would make it way easier for me to understand

tender shard
viral crag
#

Otherwise it would have an s to confuse people

tender shard
#

I mean

#

sometimes I also use overly ridiculous names for some stuff

grim ice
#

secret its not secret anymore

sterile token
#

Isnt there a library for working with locations and selections?

#

Like world edit, but much simplier

tender shard
#

boundingbox represents a cuboid "selection"

#

just like normal worldedit when using the wooden axe

sterile token
#

I think i would take a look atbounding box

tender shard
tender shard
#

when we talked about distance and distanceSquared?

#

No, I have already explained it many times

#

simply get the distance between your block and the nearest "protection" block

#

I even sent you some example code

sterile token
#

But wouldnt that cause lag in PlayerMoveEvent?

tender shard
#

that depends on the amount of protected locations you have

#

if it's 300, no

#

if it's a billion, yes

sterile token
#

My main problem is that, that i dont know how much would they have

#

๐Ÿ˜‚

tender shard
#

what do you need this information for anyway in the move event?

viral crag
#

You could learn to use frames - then it's all vector after on the frame

tender shard
#

I thought it was about placing / breaking blocks

sterile token
tender shard
#

okay so

sterile token
#

Yes it would cause lag

tender shard
#

I'd do some thing like this, just brainsotrming now:

#
  1. HashMap<World,List<Location>> (a map with worlds as keys and a list of pretected locations containing the center of your protected region)
  2. not using playermoveevent, but a runnable. I think running it once per second is more than enough
  3. have another map<UUID,Location> of players currently inside a protected region
  4. check every second if a player is inside a protected region. if yes, and he's not already in the map from #3, send the message and add them. if they are not in any area anymore but are in the map, remove them
#

and be sure to use locations instead of blocks

#

and of course only do your math if the player is in the same world as in the map's keys in #1

#

if you do all of that, no lag at all, guaranteed, even if you have 200 players and 500 protected regions per world

#

and be sure to always use distanceSquared

#

you never need the real distance

grim ice
#

do you need an index for the locations in n1

#

probably not

tender shard
#

if distanceSquared > MAX_DISTANCE*MAX_DISTANCE is true, then distance > MAX_DISTANCE will also be true, so no need to do any square roots

tender shard
#

if yes, yes. if no, no

grim ice
#

i would use Set

tender shard
#

that won't be the problem anyway, but yeah depending on the size, a set MIGHT be better

#

in fact the Map should contain Collections and not lists/sets anyway

#

and instead of Location you could do your own tiny class that simply stores X,Y,Z, so e.g. a Vector3

#

but my opinion is to not overthink everything a hundred times unless you actually experience any problems

#

premature optimization isn't exactly very helpful

#

especially since they have to loop over the collections contents, having a list or set makes no difference at all

#

in iterating they are equally fast

#

and in fact the list will be faster since it won't have to check contains() when adding a new location

#

so yeah that's why I decided to suggest a list here

#

somehow people always think that sets are faster than lists when in most cases, the opposite is true

tender shard
#

Map<World,Collection<Location>>

#

instead of Map<World,List<Location>>

tardy delta
#

ah i thought you were talking about the bad impl of the map interface

#

why does it matters tho

tender shard
#

it doesn't matter at all unless you want to switch from List to Set or other way around at some point

tardy delta
#

ah

tender shard
#

but in general, if you don't need any methods from List, you can as well refer to it as Collection

#

but yeah it won't actually change anything except to make the code more versatile

sterile token
tender shard
quaint mantle
#

Is it possible to use switch on arguments from a command?
What i mean is using switch on String [] args

tender shard
#

wdym?

sterile token
tender shard
#

Bukkit.getOnlinePlayers() you mean?

sterile token
#

yup*

tender shard
#

yes

#

it definitely returns either a list or a set, idk

tardy delta
#

what methods does list have that collections doesnt have?

ivory sleet
#

its a transforming list

#

afaik

sterile token
#

mfalex, people recommend me to based on the protection block calculate 2 corners (based on xyz)

quaint mantle
quaint mantle
#

Ohh I'm dumb, thanks!

tardy delta
#

but in my opinion the string parsing goes brr so i transformed it a little

#

Map<String, SubCommand>

#

still wondering how to implement sub-sub commands

sterile token
quaint mantle
#

Umm create <SubCommand, SubCommand> ? ๐Ÿ˜‚

sterile token
#

No

#

I done my own api

#

I explain how works

tardy delta
#

๐Ÿ‘€

quaint mantle
#

@tardy delta maybe use TabCompleter ?

#

Idk if that's spelt correctly.

sterile token
brisk estuary
#

Does anyone know how I could implement a way to limit the number of a specific block that a player can place per chunk? (feel free to ping me)

tardy delta
sterile token
tardy delta
#

lombok ๐Ÿ’€

vocal cloud
#

Lombok lol

sterile token
#

I didnt use it before

#

But i liked like 1 motn ago

#

And started using it

tardy delta
#

i guess the CommandExecutor class has to be extended by command classes?

sterile token
#

Look at the wiki

#

It has examples

sterile token
desert musk
#

how to I grab an entity's score in a specific objective? (as a value)
e.getEntity().getPlayer().getScoreboard().getScores("timealive")
this returns a bunch of addresses to the players' score entries

tender shard
#

unless you're on 1.16.2 or below

#

then you're fucked

sterile token
tender shard
#

my reply was not to you btw

sage dragon
#

Is the BungeeCord Plugin Messaging not both ways?

sterile token
sage dragon
tender shard
tardy delta
#

is there even a point of returning false in onCOmmand, that prints the usage message right?

sage dragon
tardy delta
#

but verano youre already printing the usage

vocal cloud
#

Doesn't your command executor still require plugin yml stuff?

sterile token
#

U dont need to register them via plugin.yml

#

Its already done by doing reflections

vocal cloud
#

Ah found it

waxen plinth
#

command library ๐Ÿ‘€

sterile token
# sage dragon That's how I can read it, yes, but I also need to send?

For reading use PluginMessageEvent

For receving

  @EventHandler
  public void onMessage(PluginMessageEvent event) {  
    // Do stuff here
  }

For sending:

  
  public void send(String data, ServerInfo) {  
      ByteArrayOutputStream stream = new ByteArrayOutputStream();
      DataOutputStream out = new DataOutputStream(stream);
        try {
            out.writeUTF(data);
        } catch (IOException e) {
            e.printStackTrace();
        }
        server.sendData("BungeeCord", stream.toByteArray());
  }
sterile token
#

If you have any recommendations let me know please

waxen plinth
#

For what to use or what to add to yours?

vocal cloud
#

Reminds me of what I'm doing. Except mine is a lot less focused on QoL for commands themselves

lavish hemlock
desert musk
#

getScoreboardManager().getMainScoreboard().getObjective("OBJECTIVENAME").getScore(e.getEntity().getName()).getScore()
^how to get a specific entity's score in an objective for the CTRL+F users ๐Ÿ‘€

#

looks ugly asf

sterile token
#

Because im too much confuse

lavish hemlock
#

No

#

Also

#

Use try-with-resources

sterile token
#

waht that means?

#

Idk

vocal cloud
#

Try catch finally

sterile token
lavish hemlock
#
public void send(String data, ServerInfo server) {
    try (ByteArrayOutputStream sink = new ByteArrayOutputStream();
         DataOutputStream out = new DataOutputStream(sink)) {
        out.writeUTF(data);
        server.sendData("BungeeCord", sink.toByteArray());
    } catch (IOException e) {
        e.printStackTrace();
    }
}
sterile token
#

I never liked that

lavish hemlock
#

Try-with-resources properly manages classes that implement the Closeable interface by closing them after the scope of the "ARM block" is over.

tardy delta
#

i do

#

do it for me

lavish hemlock
#

Always close closeables when you are done using them, and preferably with try-with-resources.

tardy delta
#

havent seen many people closing their scanner

lavish hemlock
#

There are some closeables that literally do not work properly if you do not close them, e.g. ZipInputStream

lavish hemlock
misty ingot
#

hey so I am trying to make a custom client, I am following a tutorial and it said to generate the mod skeleton using this https://github.com/ExtraCrafTX/GeneratorFabricMod
I got to the Usage and then where it says
Once the bin directory has been added to your PATH, navigate to the folder where you would like to create a new project. Here, simply run GeneratorFabricMod
how do I do this?

GitHub

Prompts the user for various information and outputs a skeleton mod for the Fabric toolchain - GitHub - ExtraCrafTX/GeneratorFabricMod: Prompts the user for various information and outputs a skelet...

tardy delta
#

im not very often using readers tbh

#

i was using a scanner to get console input

#

for my jda bot

sterile token
misty ingot
#

sadge

lavish hemlock
#

Imagine making a custom client for a custom client

lavish hemlock
#

Stop being a pussy, use MCP instead of Fabric

tardy delta
#

what is mcp?

#

๐Ÿ‘‰๐Ÿ‘ˆ

lavish hemlock
#

Probably one of the first Minecraft modding tools ever made?

#

Minecraft Coder Pack

sterile token
#

mcp isnt minecraft pocket edition but for pc?

lavish hemlock
#

It allows you to decompile/recompile the game alongside some other tools.

sterile token
#

Im so confused because minecraft has many shits

lavish hemlock
#

Pretty fuckin' historic uhh

tardy delta
#

is it still being maintained?

lavish hemlock
#

Forge used it

tardy delta
#

o

vocal cloud
#

Forge won that war

lavish hemlock
#

I think maybe ModLoader used it too?

regal dagger
#

how would I make a delay?

#

this isn't working

vocal cloud
#

Sigh

regal dagger
#

ignore the missing thing at the end

vocal cloud
#

Probably by learning java

desert tinsel
#

how can i create a spoiler on spigot plugin upload to spigotmc.org?

regal dagger
vocal cloud
#

Code a spigot plugin with no java experience

tardy delta
#

lol thats whats already happening here

regal dagger
#

solved

sterile token
#

Why every protection plugin works using fucked world edit ๐Ÿ˜ก

viral crag
#

They dont

sterile token
#

Send one without using please

viral crag
#

Prism doesnt

sterile token
#

I cannot find

#

Lol send link

#

Please

#

Im rlly annoyed

tardy delta
#

worldguard best protection plugin ever

viral crag
#

To the old one or the new one?

sterile token
#

prism is premium

viral crag
#

Nope

sterile token
#

Send the one which doesnt use world edit

#

And really thanks

#

But i get really confused since working with my protection plugin i will fork another and that all

viral crag
#

Neither do, prism is in the middle of being rewritten by the original dev

sterile token
waxen plinth
#

Yes

#

It's intended for player claiming though

sterile token
#

Lol send gith i will fork

waxen plinth
#

Not for general-purpose protections

sterile token
#

Oh but i should be possible to adapt to protect using a custom block i dont think it would be diff or ye?

waxen plinth
#

Currently everything is done with commands in it

#

You could modify it to work differently if you really want

viral crag
sterile token
#

Thansk you too LowExpresso and you redempt

crude loom
#

Plugin version

waxen plinth
#

Isn't coreprotect just for logging and rolling back changes

#

Not land claiming

viral crag
#

Coreprotect came up when prism started faltering under the last maintainers

tardy delta
#

correct

sterile token
#

Oh why every plugin isnt simply

#

I hate the ones that have many shit just for something not diff

viral crag
#

You can talk to viveleroi about features you think are missing

tardy delta
#

vive le roi?

sterile token
waxen plinth
#

Yes

#

It has regions and region protection

#

The library provides region protection tools, RedClaims just uses those and allows land claiming with them

sterile token
#

So i can create a cuboid based a radio?

waxen plinth
#

What

tardy delta
#

just create different methods in that class

sterile token
# waxen plinth What

For example i set my custom protection block, then i calculate coner a and b of the radio. And create the cuboid?

tardy delta
#
void onJoin(...)
void onQuit(...)
etc```
waxen plinth
#

You can create two methods that listen for that event

tardy delta
#

you cant have the same event twice

tender shard
#

Verano are you mentally challenged today? I have explained 3 times today on how you can make certain areas protected from a certain orgin + radius today lmao

sterile token
tender shard
#

lol

waxen plinth
#

With RedLib you can just:

tender shard
#

simply get the distance from the block to the nearest "protection" block

#

then check if it's above or below your radius

#

that's it

sterile token
#

But that would lag

waxen plinth
#
CuboidRegion cuboid = new CuboidRegion(start, end);
ProtectedRegion protectedRegion = cuboid.protect(ProtectionType.ALL);```
#

๐Ÿ‘

waxen plinth
tardy delta
#

why having two listeners for the same event?

waxen plinth
#

I mean, the issue with protections is that there are so many ways that blocks can be modified

#

That's why I created ProtectionPolicy

viral crag
#

If he is moving like he mentioned and is merging players as well ...

tardy delta
#

wdym different things, youre listening for the damage event twice?

waxen plinth
#

There are tons of events you have to check and the code gets incredibly repetitive so I made an abstraction that makes you not have to handle it directly

#

You just tell it which types of protections you want and it will do the rest for you

sterile token
# waxen plinth It wouldn't lol

With your lib not, but what about with this?

private static final int PROTECTION_DISTANCE = 20; // 20 blocks
private List<Location> protectedBlocks = new ArrayList<>();

@EventHandler
public void onPlace(PlayerMoeveEvent event) {
    for(Location protectedLocation : protectedBlocks) {
        if(protectedLocation.distance(event.getBlock().getLocation()) >= PROTECTION_DISTANCE) {
            event.setCancelled(true);
        }
    }
}
tardy delta
#

there isnt such like different things, you just write logic for all what might happen in that event

sterile token
#

Redempt so with your lib i dont have to listen to place, break, etc events?

waxen plinth
sterile token
waxen plinth
#

You can do

#

cuboid.enableEvents() on a CuboidRegion

#

Then you can listen for players entering/exiting it and cancel if you want

sterile token
#

Do you have a fully example but more simplier than your claim plugin?

waxen plinth
#

No

#

But it's fully documented

sterile token
#

Because my brains are to burned and im so idiot that i cannot do anything today

waxen plinth
vocal cloud
#

Take break then lmfao

#

Doesn't MC use AABB or whatever

sterile token
#

And sorry for being annoying

tender shard
sterile token
#

waht that means

tender shard
#

it means they are the Dancing Queen

sterile token
#

I wil ltake a break

tardy delta
#

money money money

sterile token
#

And then try to do it calm down

sterile token
vocal cloud
#

Jokes aside it's probably the simplest tool

tender shard
vocal cloud
#

And it has great features

tardy delta
sterile token
#

ABBA is for regions pupouse?

vocal cloud
#

It's how MC handles regions

viral crag
#

Needa conversion

tardy delta
#

this abba smh

#

noone?

sterile token
#

@waxen plinth which your library i can just do and would that

Location location = event.getBlock().getLocation(); // Custom protection block 
CuboidRegion cuboid = CuboidRegion.cubeRadious(location, 20);

So i think i will use your library

tender shard
#

why don't you just use BoundingBoxes

sterile token
waxen plinth
#

radious

tender shard
sterile token
#

And how i apply that class to my usage

golden turret
#

which event is called when the player stops to spectate an entity?

sterile token
viral crag
#

Gnoogle and radious great day for spelling

tender shard
#

unfortunately I am the only one using it

viral crag
tender shard
#

yeah, I'm using light mode, I already was outside today, I am coding for 1.18 but still using java 1.8, I know I'm weird

sterile token
#

Wait bounding box doesnt exists on 1.8 :(

tender shard
#

lmao

sterile token
#

How i would apply them?

tender shard
#

1.8 is dead

#

get over it

sterile token
#

Because my plugin would be multi version

tender shard
#

anyway I gotta go

quaint mantle
#

hypixel begs to differ

tender shard
#

I am actually meeting people, don't ask me why, I don't know why either

quaint mantle
#

wait what

tender shard
#

someone decided to "invite" me to "people stuff"

#

disgusting

quaint mantle
#

anyway anybody know what a configuration.getInt(); returns when the key does not exist?

ivory sleet
#

0

quaint mantle
#

ty

#

thought so

#

they should make it 69

#

ppl getting confused

#

xD

tardy delta
quaint mantle
#

What!?

tender shard
#

fun fact:

(0.0d / 0.0) == (0.0d / 0.0)

equals to false

quaint mantle
#

Not the drip

quaint mantle
tender shard
#

a disturbing fact?

quaint mantle
#

yes

vocal cloud
#

I mean it's better than what JS does

quaint mantle
#

js

#

I tried making a game using that

#

it did not work

tardy delta
#

i tried making a discord bot using that

#

and i copied the damn tutorial

quaint mantle
#

who doesn't

#

๐Ÿ‘ฝ

young knoll
#

I made one with Node

quaint mantle
#

well

#

same

#

that's js

tardy delta
#

nodejs is js without the browser

viral crag
#

Why copy only one tutorial when you can mash together 6?

tardy delta
#

i did ๐Ÿ‘‰๐Ÿ‘ˆ

grim ice
#

i need a library or project idea im so bored

tender shard
#

cya everyone tomorrow

quaint mantle
#

cya

tardy delta
#

cya

tender shard
#

I wish everyone a good Thread.sleep

viral crag
tardy delta
sterile token
vocal cloud
#

Bruh stop

grim ice
sterile token
grim ice
quaint mantle
grim ice
vocal cloud
#

Done now stop asking

grim ice
quaint mantle
#

:)

#

yes

sterile token
vocal cloud
sterile token
tardy delta
#

my eyes bro

quaint mantle
#

omg why is that obfuscated

grim ice
#

obfuscated LMAO

vocal cloud
#

Cause it's what MC uses

#

Just use it

quaint mantle
#

mojang get robbed

vocal cloud
lavish hemlock
#

What is the point of InventoryHolder?

tardy delta
#

i only use it with instanceof my own holder

viral crag
sterile token
#

MikeShadow and how would i create a cuboid based a location and a radiou?

quaint mantle
#

maths

sterile token
#

Literally im so dumb on math

tardy delta
#

maow why is ur pfp scary? it looks like a cute cat but when looking closer..

lavish hemlock
viral crag
#

Buckets hold things - bad pun

vocal cloud
tardy delta
#

it scares me in my sleep

lavish hemlock
#

it's made of crystal as well

tardy delta
#

monke

sterile token
vocal cloud
#

that's one corner. The max is the other

sterile token
#

Ahh allright

viral crag
#

InventoryHolder is just an interface

sterile token
lavish hemlock
quaint mantle
#

I don't think there is benefit of using it in your own code

viral crag
#

Depends if you want easy access to the inventory of whatever object you are interested in

quaint mantle
#

^^^

vocal cloud
sterile token
vocal cloud
#

Minecraft

#

But you can always make your own

viral crag
#

If you always know what the object is, probably not

quaint mantle
#

location

sterile token
#

So i have to create a vector 3 based on block placed location?

vocal cloud
#

No you just parse the location to it

sterile token
#

Allright

vocal cloud
#

Idk why you're having so much trouble making a simple cuboid

sterile token
tardy delta
#

its bad code lol

sterile token
tardy delta
#

my first serious plugin

lavish hemlock
tardy delta
#

ooh

quaint mantle
#

werewolf

tardy delta
#

static noises

quaint mantle
#

?

tardy delta
#

ur mom

#

๐ŸŽƒ

lavish hemlock
quaint mantle
#

public static final noises

quaint mantle
viral crag
tardy delta
#

inv holder?

viral crag
#

Yeah

tardy delta
#

what does that have to do with mobs?

quaint mantle
#

mobs have inventories

#

some

#

literally only piglin I think

young knoll
#

Villagers should as well

tardy delta
#

i havent seen a mob clicking in its inventory

#

kinda scary too

quaint mantle
#

and allay

sage dragon
#
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("death");
out.writeUTF(e.getEntity().getUniqueId().toString());
e.getEntity().sendPluginMessage(this, "cranked:crossrespawn", out.toByteArray());

This does nothing, or the event for receiving them is broken on bungee's side...

viral crag
golden turret
#

why not to have?

viral crag
#

Waste of server ticks?

golden turret
#

server ticks for something sent by the client?

viral crag
#

The client only sends on move afaik

#

I guess you could test for a lack of move change in a certain time?

#

Or you could write a client mod report it to yout

grim ice
#

wdym

viral crag
#

I guess the lack of something happening could be viewed the same way

frozen thorn
#

Hello, I got this error ```[20:07:01 WARN]: [FarmChest] Task #2 for FarmChest v1.0-SNAPSHOT generated an exception
java.lang.NoClassDefFoundError: jdk/nashorn/internal/ir/Block
at fr.twizox.farmchest.chest.ChestRunnable.run(ChestRunnable.java:14) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:783) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched_1.8.8.jar:git-PaperSpigot-445]
at java.lang.Thread.run(Thread.java:833) [?:?]

#

But I don't know from what it's from

young knoll
#

You are using some weird Block import

golden turret
#

nashorn ๐Ÿ˜Ž

frozen thorn
#

ty

grim ice
#

jdk/nashorn/internal/ir/Block

#

Lmao

#

idk why

#

but reading that package makes me laugh

viral crag
#

However how would you determine when a player stopped as opposed to network lag or disconnect only on the server side? All the server knows is that the client stopped sending location changes

viral crag
#

All I can think of is to track what player changed to spectator mode and specifically poll to see when they stopped.

hasty prawn
#

PlayerTeleportEvent is a TeleportCause of SPECTATE would probably do it.

young knoll
#

You can use a runnable mixed with that method

#

Or you can listen for packets

hasty prawn
#

And then use what Coll sent to check if they left or went in

young knoll
#

That is for teleporting in spectator mode

#

Nothing to do with spectating entities

golden turret
#

not when he leaves

young knoll
#

Wow I didn't think it would be called for either

hasty prawn
#

I mean it's still a teleportation so it makes sense that it's fired.

young knoll
#

True

golden turret
#

but not when the player leaves the entity view ๐Ÿ˜ญ

hasty prawn
#

Is there another way to leave spectating an entity besides sneaking?

#

Could just check PlayerToggleSneakEvent if there's not.

hazy egret
#

Hey, why i can't import the Arraylist? public class unmute implements CommandExecutor {
private smpmc.getter getter;

public unmute() {
    getter = new getter();
}
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
    if (sender instanceof Player){
        Player p = (Player) sender;
        String prefix = "ยงcยงlSMPmcยง8.ยงcยงleu ยง8| ยง7";
        if (p.hasPermission("smpmc.unmute")){
            if (args.length == 1) {
                Player target = Bukkit.getPlayer(args[0]);
                if (target != null) {
                    if (getter.getStringList().contains(target.getName())) {
                        getter.getStringList().remove(target.getName());
                        p.sendMessage(prefix + "Du hast den Spieler ยงc" + target.getName() + " ยง7entmuted.");
                        target.sendTitle("ยงc"+p.getName(),"ยง7Hat dich entmuted.");
                        target.sendMessage(prefix+"Du wurdest von ยงc"+p.getName()+" ยง7enmuted.");
                    }
                    else
young knoll
#

Does that even fire

hasty prawn
#

PlayerToggleSneakEvent?

young knoll
#

Yes

hasty prawn
#

Idk I can try

#

I can't imagine why it wouldn't

viral crag
#

Player cansee player

young knoll
#

That's for use with hidePlayer

viral crag
#

True true

hasty prawn
ivory sleet
#

well

quaint mantle
#

just use di

young knoll
#

Should work perfectly then

ivory sleet
#

getProvidingPlugin returns the plugin instance associated with the class loader from the class you pass

#

for instance Nuclues.getProvidingPlugin(this.getClass()) would also work (since your plugin class loader loaded the class)

hasty prawn
hazy egret
#

Sry im new. I have a StringList in the Class getter, and wiant to use this in the class unmute.

glossy venture
#

why is it saying that the condition will always be true (e instanceof NodeParseException will always be false)

tiny wolf
#

Heyo anyone used jackson serialization and know how to register a way for serializing enchants? I keep getting com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot find a (Map) Key deserializer for type [simple type, class org.bukkit.enchantments.Enchantment] when trying to convert an itemstack to a json

viral crag
glossy venture
#

?

#

catch (Exception) catches all exceptions right

viral crag
#

NodeParseException is a part of Exception is it not?

glossy venture
#
Exception
 |- CommandException
   |- CommandParseException
     |- NodeParseException
#

this is the tree

viral crag
#

Yeah

#

So how can exception be an instance of nodeparseexcption without being an instance of itself?

#

You would only ever get one return

glossy venture
#

it catches any exception right

#

so it should catch instances of NodeParseException

#

so why can it never be a NodeParseException?

#

oh wait

#

i didnt extend RuntimeException and nothing in the block throws it

#

so i think that might be it

viral crag
#

I think you want isInstanceOf

glossy venture
#

nah

#

that was it

#

it wasnt a runtime exception and nothing explicitly threw it so it couldnt be

#

works now

viral crag
#

Hmm

rough drift
#

how can i get the up vector of another vector?

viral crag
#

ToLocation ?

rough drift
#

no

glossy venture
#

some trigonometry shit

quaint mantle
#

uhmmmm

rough drift
#

yes

#

i got the right of a vector

#

i forgot how to get the up

#

lmao

glossy venture
#

just mess with the order of the sin cos tan shit

#

lmao

#

youll get iti

rough drift
glossy venture
#

eventually

quaint mantle
viral crag
#

?

quaint mantle
#

it already has getHandlerList right

glossy venture
quaint mantle
#

why not

rough drift
glossy venture
#

its abstract

rough drift
#

its a base class

glossy venture
#

sadly

quaint mantle
#

why can I listen to event tho

rough drift
#

you need to listen to things like

#

PlayerJoinEvent

glossy venture
#

thats the point, you cant

rough drift
#

or PlayerDeath event

#

etc

quaint mantle
#

I can listen to Event

#

but o

#

k

tiny wolf
#

I'm pretty sure I've used Event

quaint mantle
#

yes

#

it has handlerlist

rough drift
#

why listen to event?

tiny wolf
#

and Im pretty sure all events work

viral crag
glossy venture
brave sparrow
#

It has to have a HandlerList, PlayerEvent does not

rough drift
#

lmao

tiny wolf
rough drift
#

no

sturdy cradle
#

hi, does anyone know how to open an anvil gui in 1.17 in which i can rename items?

quaint mantle
viral crag
#

X y z ... no it would be getYaw() - pitch is z

glossy venture
#

Event is most certainly built-in
like whenever an event is called it just goes over the handlers

glossy venture
#

cant find a handler list

rough drift
#

because i need a vector pointing up from that vector

#

not its y

#

wait a second

#

i just need to rotate it

#

90d up

viral crag
#

Then set it

rough drift
#

brooooo i am dumb af

glossy venture
#

but if you want to listen to every PlayerEvent just do something like

public void handlePlayerEvent(PlayerEvent e) {
  // ...
}

@EventHandler
public void onEvent(Event e) {
  if (e instanceof PlayerEvent) { 
    handlePlayerEvent(e);
//    return; /* optional, if you only want to listen to the player event */ 
  }
  // ...
}
#

@quaint mantle

wintry fern
#

Hey guys

quaint mantle
#

yeah im doing that

#

rn

glossy venture
#

k

wintry fern
#

Is there any script that can make NPC from Citizens as a pets?

#

I tried command rewards to create npc from quests plugin but it didn't work

viral crag
wintry fern
#

What is this API thing?

rough drift
glossy venture
rough drift
#

orby are you ok

glossy venture
#

i thought they may have built it in but i guess not

quaint mantle
#

bruh

#

noo

viral crag
rough drift
#

or get a pets plugin

#

lmao

glossy venture
# rough drift orby are you ok

wouldnt it make sense for the bukkit devs to do something like

/* in PluginManager.java */

public void callEvent(Event e) {
  // ...
  callAllHandlersForEvent(e);
  // ...
}
rough drift
#

no

glossy venture
#

although that would produce massive lag if there are a lot of listeners

wintry fern
rough drift
#

ofc not

#

lmao

glossy venture
#

so i guess not

rough drift
#

lmao

wintry fern
#

For all players, I want to make like:

Atter completing quest, It will create new npc with same name, and it follow player around

#

Without deleting npc that gices quest

#

Hijacker gices quest and he join the party

#

Give

chrome beacon
#

Sounds like you might want to hire someone or make that yourself

brave sparrow
#

Yeah youโ€™ll probably need to write a plugin using their API to do it

wintry fern
#

How do I do it? :)

tardy delta
#

ah ohh

chrome beacon
wintry fern
#

Nooe

#

Nope

viral crag
#

is pretty sure the Citizens plugin has a discord somewhere that you can talk to the dev(s)

brave sparrow
#

This seems like the wrong channel for you to ask in then

#

Lol

chrome beacon
#

?services

undone axleBOT
chrome beacon
#

If you want to learn Java;

#

?learnjava

undone axleBOT
tardy delta
#

or look for a plugin

wintry fern
#

Ok but maybe you know good plugin that already exist and can be added like pet shaped as a person

viral crag
#

I broke me interwebs ...

brave sparrow
grim ice
#

public void onLive(Event e) {
if(e instanceof PlayerEvent && e instanceof Cancellable) {
e.setCancelled(true);
}

#

B)

brave sparrow
#

Idk about the other people in here but I know quite a lot about building plugins but almost nothing about what modern plugins are on offer these days

thorn lynx
#

How would I set the age of a crop in 1.8? Right now I have this:

byte b = (byte) (block.getData() + 4);
if (b > maxAge) {
    b = (byte) maxAge;
}
                                        block.setData(b);
brave sparrow
#

And does that do anything?

viral crag
#

Sanity check for old age crops?

thorn lynx
brave sparrow
#

Gives you a MaterialData

#

And then you can set data and state and all that

glossy venture
#

what the fuck is A & B

#

addComponent( NodeComponent, Node ) doesnt exist

tardy delta
#

i only know <? extends A & B> kek

glossy venture
#

what is it then

#

does it mean that it has to extend both A and B

brave sparrow
#

Itโ€™s ambiguous

#

I suspect I know whatโ€™s going on but letโ€™s see it

glossy venture
#

?paste

undone axleBOT
glossy venture
#

all four variations

brave sparrow
#

And letโ€™s also see the line throwing the error

glossy venture
#

the other error is just because it doesnt know the parameter type

#

as it cant resolve the method

brave sparrow
#

Change your method names

thorn lynx
#

Also what is the material for wheat seeds? I tried Material.WHEAT and Material.SEEDS and they are not working

lavish hemlock
#

ez

brave sparrow
#

Make the ones that accept a function different from the ones that accept a node @glossy venture

glossy venture
#

k ill call them makeComponent i guess

#

thanks

#

but whats going on here?

brave sparrow
#

I think

thorn lynx
#

ohhh

glossy venture
#

why was it confusing a lambda with an expression though

#

or like a value

vale cradle
#

is there an event for when the player stops drawing a bow but doesn't really get to shoot it?

brave sparrow
#

So if youโ€™re passing an Object it knows thatโ€™s not a function, but the other way around the function could be an object

#

So the method call is ambiguous

glossy venture
#

well it becomes Object at runtime

#

the compiler still knows the generics

brave sparrow
#

Right

vale cradle
crude loom
#

Is there no way of changing my name on the spigot website other than donating 10$?

brave sparrow
#

But the compiler replaces it with Object

#

So after compile time the generic info is gone

glossy venture
#

oh yea i understand

#

ight thanks

chrome beacon
brave sparrow
#

So at runtime the JVM wonโ€™t know what method youโ€™re trying to call

#

So the compiler wonโ€™t allow it

glossy venture
#

yeah

vale cradle
#

At the moment only Kotlin allows to keep generic data with reified keyword and some hackery (I guess with annotations)

brave sparrow
#

If thereโ€™s no bow shot I donโ€™t believe thereโ€™s an event

vale cradle
#

any hacky way to check it tho?

chrome beacon
brave sparrow
#

NMS

brave sparrow
vale cradle
chrome beacon
brave sparrow
#

Theyโ€™re asking about the situation where someone is drawing back a bow and then switch slots

#

So they stop drawing back the bow but they donโ€™t shoot anything

chrome beacon
#

I'm aware of what they are asking. My reply was for you

brave sparrow
#

I wasnโ€™t speaking generically about it

#

I was speaking about their specific situation

#

Lol

vale cradle
brave sparrow
#

If no bow is shot no event is fired

chrome beacon
#

Anyways NMS isn't that bad. Mojmaps helps quite a bit

vale cradle
#

but release the right click before shooting the arrow

#

no event for that (that I know of)

brave sparrow
#

NMS should tell you when they go from having a bow drawn back to not

#

Or you could listen to packets

frozen thorn
#

Hello, I got an error when I try this: ItemStack[] items = (ItemStack[]) FarmChest.getInstance().getConfig().get("Items.list");

#

java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class [Lorg.bukkit.inventory.ItemStack;

vale cradle
chrome beacon
vale cradle
tardy delta
#

i had an issue trying to get a Location from config a long time ago,
config.getLocation doesnt seem to work as (Location) config.get did so

#

weird stuff

golden turret
#

how do i align this to left? i tried that but did not work

tardy delta
#

the logo?

golden turret
#

yes

tardy delta
#

i would just do float: left but im bad at css lol

golden turret
#

nop

thorn lynx
#

How do I set the display name of an item with no item meta

glossy venture
#

create the item meta

#

but every item has meta

tardy delta
#

i did my site like this with basic css

glossy venture
#

except air

grim ice
rough drift
#

i still am not being able to find top and left correctly

grim ice
#

thats the reason i dont wanna make a website

#

its hard to make it look good

golden turret
tardy delta
grim ice
#

oo

tardy delta
#

im not a web developer im a programmer lol

glossy venture
#

i thought of this

public static ItemStack applyMeta(ItemStack stack, Consumer<ItemMeta> consumer) {
  ItemMeta meta = stack.getItemMeta();
  if (meta == null)
    if ((meta = Bukkit.getItemFactory().getItemMeta(stack.getType())) == null)
      return; // material cant have meta
  consumer.accept(meta);
  stack.setItemMeta(meta);
  return stack;
}
#
applyMeta(item, meta -> meta.setDisplayName(...));
grim ice
#

want to make something like that

#

but idk css or html or js

tardy delta
grim ice
#

also its unresponsive

#

also @golden turret is it worth applying for devnics

#

they seem to suck and ask for too annoying projects

thorn lynx
#

not all items have item meta like potato_item which im trying to set the display name

glossy venture
#

use the method above

#

but what version are you on

#

because on modern versions i think every item has meta

thorn lynx
#
if ((meta = Bukkit.getItemFactory().getItemMeta(stack.getType())) == null)
      return; // material cant have meta
``` My item can't have meta
glossy venture
#

except air

thorn lynx
#

My version is 1.8

viral crag
#

They are 1.8 the metadata for crops is 1.9

glossy venture
#

because every item can have their display name changed

#

so every item can have meta

thorn lynx
#

Idk

grim ice
#

i need smth to do

#

i feel like im wasting my time being bored

viral crag
grim ice
#

no that seemed boring

viral crag
#

Hahaha

quaint mantle
#

my build isnt including my dependencies

#

?paste

undone axleBOT
hybrid spoke
quaint mantle
#

mvn clean package

#

the final jar doesnt include the dependencies

grim ice
#

godcipher

#

i think im gonna make smth like

#

type

#

give me a diamond sword now

#

in chat

#

will give you a diamond sword

hybrid spoke
glossy venture
#

english parsing

grim ice
#

give me a golden sword after 120 ticks

quaint mantle
#

but its not working now for some reason

grim ice
#

though idk how would i acheive that

hybrid spoke
#

keywords

glossy venture
#
SystemParameterType.ENGLISH = (p) -> promptOtherPlayerToDoIt(p);
``` ez
grim ice
#

ig

thorn lynx
#

OOf i put potato instead of potato_item sorry

grim ice
#

but those switch() case

#

gonna get real long

viral crag
#

You could implement Oterlu into a MC Chat moderator

sterile token
#

Lmao im still so confused with cuboid

glossy venture
mortal cedar
#

Is it possible to let a player execute a command and ignore if they have the permissions for that command?
Giving op before and removing it afterwards isn't an option since permission plugin might override that

thorn lynx
#

Lol

glossy venture
#

inject a permissible

grim ice
glossy venture
#

or something

sterile token
#

I cannot figure how to create simple cuboid class

mortal cedar
hybrid spoke
#

or a converter

sterile token
glossy venture
# sterile token I cannot figure how to create simple cuboid class
// -x -y -z
final Vector3 negativeCorner;

// x y z
final Vector3 positiveCorner;

public Cuboid(Vector3 n, Vector3 p) {
  this.negativeCorner = n;
  this.positiveCorner = p;
}

public int getLengthX() {
  return positiveCorner.x - negativeCorner.x;
}

public static Cuboid of(Vector3 a, Vector3 b) {
  int nX = Math.min(a.x, b.x);
  int nY = Math.min(a.y, b.y);
  int nZ = Math.min(a.z, b.z);

  int pX = Math.max(a.x, b.x);
  int pY = Math.max(a.y, b.y);
  int pZ = Math.max(a.z, b.z);

  return new Cuboid(new Vector3(nX, nY, nZ), new Vector3(pX, pY, pZ));
}
hybrid spoke
#

2 points will always build a cuboid

sterile token
#

I was wondering if was possilble to buidl a cuboid from a specific block

viral crag
#

If in luckperms you cod/would just grant or use tracks

mortal cedar
#

I don't and won't use luckperms

#

it has nothing to do with my problem

#

as permission system not ignoring op players is simply stupid and insecure so most of them do ignore it

glossy venture
#

idk what you mean but thats a cuboid class

#

with anything you need

fierce glacier
#

how i can get the custom name of a monster ?

tardy delta
#

entity.getCustomName()?

fierce glacier
#

for exemple if i have a zombie named "Potato", how i can get the name ? ("Potato", not "zombie")

#

Let me check !

#

yup thank for your answer ! ๐Ÿ˜„

viral crag
#

Quaternion(new Vector(-x,-y,-z), new Vector(x,y,z))); is the fun with quaternion! Zoom zoom

frozen thorn
#

Hello, how can I set the default config from ressources in the .jar pls?

viral crag
#

Set?

frozen thorn
#

in my .jar I got a config.yml in resources that I want to set as default configuration

quaint mantle
#

saveDefaultConfig() as first line in your onEnable

frozen thorn
#

okay thanks

midnight shore
#

Hi! Do you know any tutorial plug-in? Like you are teleported in a world and you need to do certain stuff to learn how to play in a server

viral crag
#

Like adventure mode?

midnight shore
#

Wdym?

viral crag
#

Restricted actions with specific goals

midnight shore
#

Yes

pliant oyster
#

can u modify attributes for any entities or just players?

viral crag
#

Not sure that I've come across a plugin like that, well not a non-rpg one

viral crag
#

I recall the engineers pack having a sort of tutorial into

quaint mantle
#

How do I make WorldSpesificCommands?

#

AKA: Command only apepars in /(command) if you are in a spesific world

viral crag
#

Not easilly

glossy scroll
#

does anyone know the new generatorsettings specification in worldcreator?

#

previously in 1.18.1, i had

#
{
  "structures": {
    "structures": {}
  },
  "layers": [
    {
      "block": "minecraft:air",
      "height": 1
    }
  ],
  "biome": "minecraft:plains"
}```
pliant oyster
#

Is there a way to change the size of entities?

glossy scroll
#

but something in the NMS has changed a little bit

viral crag
#

3 types of air?

#

I thought they were in 1.18.1 as well though

pliant oyster
glossy venture
#

anyone have a suggestion on how i could do this better?
i have a few ideas like annotation processing but idk
all this massive code snippet does is make a command like

test <hello> <hello2> print
                      ^^^^^ optional subcommand

https://paste.md-5.net/vaquvequgi.java if you want the code

midnight shore
glossy venture
#

?paste

undone axleBOT
pliant oyster
midnight shore
#

I wanted to do the same and someone said that itโ€™s not possible

viral crag
pliant oyster
worldly ingot
#

#setBaby() haha That's the closest you'll get, really

viral crag
#

In one of the other forks it is possible for some entities

glossy venture
#

it is for slimes

#

right

midnight shore
#

You can probably change the aspect of a slime depending on its size, so then you can make a slime with custom size and having it like a big zombie

pliant oyster
#

wait, if I spawn an entity is there a way to never make it a baby?

pliant oyster
quaint mantle
#

... Is anybody able to help me out with that?
How can I make world spesific commands?
AKA it will only show /bal in the tab list if you are in a certain world

frozen thorn
#

Hello, I got this error ```[22:17:45 WARN]: [FarmChest] Task #9 for FarmChest v1.0-SNAPSHOT generated an exception
java.util.ConcurrentModificationException: null
at java.util.WeakHashMap.forEach(WeakHashMap.java:1031) ~[?:?]
at fr.twizox.farmchest.chest.ChestRunnable.run(ChestRunnable.java:19) ~[?:?]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59) ~[patched_1.8.8.jar:git-PaperSpigot-445]
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:352) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:783) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:378) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:713) [patched_1.8.8.jar:git-PaperSpigot-445]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:616) [patched_1.8.8.jar:git-PaperSpigot-445]
at java.lang.Thread.run(Thread.java:833) [?:?]

chrome beacon
#

You're not trying to have multiple gamemodes in one server I hope

quaint mantle
#

"multiple gamemodes"

frozen thorn
quaint mantle
#

there is a lobby and worlds for each thing

#

thats how 90% of servers work

#

:/

frozen thorn
# frozen thorn ```java @Override public void run() { ChestManager chestManager = F...
public class ChestManager {

    public final FarmChest farmChest;
    public WeakHashMap<Block, Integer> openedChests;

    public ChestManager(FarmChest farmChest) {
        this.farmChest = farmChest;
        this.openedChests = new WeakHashMap<>();

        startScheduler(farmChest, 20L);
    }

    private void startScheduler(Plugin plugin, long delay) {
        new ChestRunnable().runTaskTimer(plugin,  0, delay);
    }

    public void removeChest(Block block) {
        this.openedChests.remove(block);
    }

    public void updateCooldown(Block block, Integer cooldown) {
        openedChests.put(block, cooldown);
    }

}
undone axleBOT
quaint mantle
#

your spamming chat

chrome beacon
quaint mantle
viral crag
chrome beacon
west oxide
#

?paste

undone axleBOT
quaint mantle
chrome beacon
#

Why would I

quaint mantle
#

Multiple servers connected to 1 server?

#

Do you know how expensive that is???

chrome beacon
#

Yeah running a network is expensive. What did you expect

midnight shore
#

How do Consumers work?

#

Can anyone send me a tutorial?

quaint mantle
#

Ugh that sucks.

glossy scroll
frozen thorn
glossy scroll
#

it's outdated now

quaint mantle
midnight shore
#

Canโ€™t seem to find anything

quaint mantle
#

ah

viral crag
chrome beacon
glossy scroll
frozen thorn
rough drift
#

Help with resourcepacks

chrome beacon
frozen thorn
#

ty

quaint mantle
#

How do I remove an item from the inventory by slot?

viral crag
glossy scroll
#

?

#

what changes

#

youre not understanding what im saying

#

The old codec for the generator-settings property was this:

#
        return var0.group(RegistryLookupCodec.create(Registry.BIOME_REGISTRY).forGetter((var0x) -> {
            return var0x.biomes;
        }), StructureSettings.CODEC.fieldOf("structures").forGetter(FlatLevelGeneratorSettings::structureSettings), FlatLayerInfo.CODEC.listOf().fieldOf("layers").forGetter(FlatLevelGeneratorSettings::getLayersInfo), Codec.BOOL.fieldOf("lakes").orElse(false).forGetter((var0x) -> {
            return var0x.addLakes;
        }), Codec.BOOL.fieldOf("features").orElse(false).forGetter((var0x) -> {
            return var0x.decoration;
        }), Biome.CODEC.optionalFieldOf("biome").orElseGet(Optional::empty).forGetter((var0x) -> {
            return Optional.of(var0x.biome);
        })).apply(var0, FlatLevelGeneratorSettings::new);
    }).comapFlatMap(FlatLevelGeneratorSettings::validateHeight, Function.identity()).stable();```
viral crag
#

I understand that you said you had 1.18.1 custom generation that worked Nd now it doesnt in 1.18.2

glossy scroll
#

it is now

#
        return var0.group(RegistryOps.retrieveRegistry(Registry.BIOME_REGISTRY).forGetter((var0x) -> {
            return var0x.biomes;
        }), RegistryCodecs.homogeneousList(Registry.STRUCTURE_SET_REGISTRY).optionalFieldOf("structure_overrides").forGetter((var0x) -> {
            return var0x.structureOverrides;
        }), FlatLayerInfo.CODEC.listOf().fieldOf("layers").forGetter(FlatLevelGeneratorSettings::getLayersInfo), Codec.BOOL.fieldOf("lakes").orElse(false).forGetter((var0x) -> {
            return var0x.addLakes;
        }), Codec.BOOL.fieldOf("features").orElse(false).forGetter((var0x) -> {
            return var0x.decoration;
        }), Biome.CODEC.optionalFieldOf("biome").orElseGet(Optional::empty).forGetter((var0x) -> {
            return Optional.of(var0x.biome);
        })).apply(var0, FlatLevelGeneratorSettings::new);```
wide coyote
glossy scroll
#

The string that I have set as the generator settings no longer generates a void world, which is what i have been able to use since 1.16

wide coyote
#

if it is not annotated with notnull you can set the item to null

quaint mantle
#

thanks

glossy scroll
#

This is likely due to the way that structures have been changed, but I do not know what the change is, and how it impacts the generator-settings string

wide coyote
#

if it is then set the item to air

#

dont remember rn

viral crag
#

I dont see the second structure tag that is now needed

glossy scroll
#

you need to dig into the source code to understand what happens, but when i remove the structure tag altogether, still nothing happens

viral crag
#

wonders if that's what I did...

glossy scroll
#

and it should be optional, that's what is in the NMS

glossy venture
#

why are these deprecated?

ocean hollow
#

sorry guys, i am stupid. How I can send message to player if he left. I mean, if player is offline and if player joined(one time), it will send message.

chrome beacon
glossy venture
#

yeah

chrome beacon
#

That's why

glossy venture
#

i hate how it deprecates all of that shit

#

like the entirety of net.md_5.bungee.api.ChatColor is deprecated

chrome beacon
#

Make sense though. Paper has component api that should be used

#

Adventure

glossy venture
#

i dont need adventure

#

i dont care about adventure

chrome beacon
#

Then use deprecated methods

sand vector
#

If im following a tutorial on lets say 1.15 would most of the information(Code) be the same if I were coding in 1.18 or similar? I know forge is different and wanted to know if it were the same for spigot

glossy venture
#

ive been doing that

#

but intellij picks the non-deprecated one in intellisense so its tedious working with

chrome beacon
sand vector
#

ok cheers

#

way better than forge in that sense

quiet ice
glossy venture
#

ChatColor.of(Color) tho

quiet ice
#

Wha

glossy venture
#

i need that for my fancy shit

glossy venture
#

bukkit doesnt have that

quiet ice
#

Oh, bungee's chatcolor isn't an enum?

glossy venture
#

no

quiet ice
#

Either way, I have come to use other apis outside of bungee chat. I don't quite like it

pliant oyster
#

How do I make a leather armor piece colored?

quiet ice
#

Especially when it comes to the question of configurabillity bungee chat may not be the best choice as there are tons of fantastic libraries that convert strings to components in a very user friendly way

#

?jd-s

undone axleBOT
pliant oyster
quiet ice
pliant oyster
#

alr

quiet ice
#

If you do not know how to obtain a LeatherArmorMeta you are forgiven, otherwise- read the documentation

chrome beacon
#

I wouldn't count on the order to be consistent

#

Sort it yourself

quiet ice
#

I highly doubt that it is any consistent

pliant oyster
#

I thought I can just get the meta of a leather armor itemstack

chrome beacon
#

Yeah sort and find yourself

quiet ice
#

Sorting is not needed for this operation

chrome beacon
#

True

#

Just loop it

quiet ice
#
ItemMeta im = is.getItemMeta();
LeatherArmorMeta lam = (LeatherArmorMeta) lam;
lam.setColor(BukkitColor.RED);
is.setItemMeta(lam);
pliant oyster
#

thanks

frozen thorn
#

Hello, why my config doesn't support utf-8?

chrome beacon
#

It does if you're using the builtin system

frozen thorn
#

when I put "รฉ" it put "\xc3\xa9" in the config and the chat caracter is weird

chrome beacon
#

Make sure you're saving as UTF8 and not something else

frozen thorn
#

yeah my default config is UTF-8

#

and I compile in UTF-8

glossy venture
#

oh ye its just Vector

#

in bukkit

sterile token
#

Thanks

#

So how i can them check