#help-development

1 messages Β· Page 115 of 1

sterile token
#

Log4j isnt from Java?

#

Or is from apache2 shit

tender shard
#

log4j is from apache, yes

shell finch
#

yeah i was thinking of that, wanted to know if there was any other way lol

sterile token
#

Apache things always give problem

sterile token
dusk flicker
#

i've never had any issue with the apache resources

tender shard
#

does infinity work when not having arrows?

tender shard
#

maven, log4j, all working perfectly

sterile token
tender shard
#

or even apache itself lol

dusk flicker
#

in creative you dont need arrows

shell finch
sterile token
#

You need atleast 1 arrow with infinito

dusk flicker
#

I would just give them an arrow ghoul and cancel the event for firing

sterile token
#

πŸ˜‚ πŸ˜‚

#

I cannot said much

tender shard
dusk flicker
#

even better

shell finch
#

my plan was to let players use the bow if they had torches in their inventories

tender shard
#

you can basically adjust the whole Log4j config at runtime

#

e.g. with system properties

#

or by doing getConfiguration() and adjusting that

sterile token
#

I dont to harcoded it

sterile token
#

I mean just do it as simple as you can because u will only lost days and days

#

I can tell you as personal

scarlet creek
#

Would having a repeating runnable take up your memory usage on the server after you leave it on for awhile?

#

I realised that something is taking up memory usage on the server after leaving it on for awhile but when I reload it seems to disappear

tender shard
#

not unless you do weird stuff

scarlet creek
tender shard
#

but what does the list store?

#

if you add more stuff and never remove it again, then obviously that's weird

scarlet creek
#

Player uuids and it’s more of a hash map

tender shard
#

well a UUID is tiny

scarlet creek
tender shard
#

then it shouldnt cause any problems

chrome beacon
#

Sounds like an odd way of doing things

tender shard
#

yeah agreed

#

but having a few hundred UUIDs in a list shouldnt cause any memory issues

scarlet creek
#

Hmmm but I find it odd that my memory usage is increasing the longer I leave the server on even without logging on

tender shard
#

that's normal

#

it should however also go down sometimes again

chrome beacon
#

Ram usage goes in spikes

scarlet creek
#

Nope just increasing

#

I have been experiencing IntelliJ crashes even though I’m not running anything on it lol

chrome beacon
#

If it never goes back down take a memory dump

#

and see what's taking all the ram

scarlet creek
#

The only thing I’m running is the server and it’s a fairly recent thing and I’ve been getting weird spigot errors after closing the server sometimes

#

I hope I didn’t install anything bad πŸ‘€

#

Is there a way to check how many runnables are running though?

final monolith
#

Java question: The best way to compare two identical strings but with different bytes?

tender shard
final monolith
#

no, they are identical at the .toString()

#

but the bytes aren't the same

hazy parrot
#

?

final monolith
#

yeah???? thats crazy

#

xD

hazy parrot
#

String.equals

final monolith
#

No.

#

different bytes

hazy parrot
#

?

tender shard
#

which are basically scheduled tasks and stuff

scarlet creek
#

Thanks!

hazy parrot
#

Same bytes == same string

final monolith
#

String.equals doesn't compare the string, compare the bytes

tender shard
final monolith
final monolith
#

Same string

#

different bytes

#

i think its charset

hazy parrot
#

Then it's not same string lmao

scarlet creek
tender shard
#

show me two strings that are the same but have different bytes pls

tender shard
final monolith
tender shard
#

if you schedule a runnable to run in 10 minutes, then the list of active workers will contain it

final monolith
#

see?

#

different bytes

#

but same string

tender shard
# final monolith

it's not the same string, it only "looks the same". let's check those bytes manually. send them as text pls

rotund pond
#

Hello !
I have a little question

I'm creating a plugin where I have to deal with player's inventories.
Here is something:

    if (onlinePlayer.getInventory().firstEmpty() == -1) {

IntelliJ tells me that onlinePlayer.getInventory(), but how can this be null ?
Should I ignore it ? It's weird...
(onlinePlayer is a Player)

final monolith
#

.toString()?

tender shard
tender shard
final monolith
#

ooh ok wait

tender shard
#

so that I can copy/paste it instead of having to type it manually

#

πŸ™‚

rotund pond
tender shard
#

so onlinePlayer can be null if "player" is not online

rotund pond
#

Ah yes okay, that's why this could be an NPE

#

Thank you πŸ‘

boreal seal
#

guys i got an question

#

what would be more efficent

tender shard
#

yeah, so basically just do sth like this

  @Override
  public void give(@NotNull OfflinePlayer player) {
    Player onlinePlayer = player.getPlayer();
    if(onlinePlayer == null) return; // or drop the contents at their last online location or sth
    if (onlinePlayer.getInventory().firstEmpty() == -1) {
      onlinePlayer.getWorld().dropItemNaturally(onlinePlayer.getLocation(), this.getAttachment());
    } else {
      onlinePlayer.getInventory().addItem(getAttachment());
    }
  }
boreal seal
#

if(!compound.hasKey("text")){ return;

#

if material doesnt exist in an list

#

of many materials around 20

#

???

final monolith
#

thats the exactly that ive received

boreal seal
#

?

tender shard
#

not sure what the difference is

#

yeah sorry I meant please send the byte array as text πŸ˜„

rotund pond
final monolith
scarlet creek
final monolith
scarlet creek
#

Because it is an interface?

hazy parrot
#

Everything is interface inside of spigot api

tender shard
#

no idea what the Workers are

scarlet creek
#

Ah

tender shard
hazy parrot
scarlet creek
#

But you can’t use it as BukkitScheduler.getPendingTasks()?

final monolith
#

i cannot compare these moms

#

:,C

tender shard
#

@final monolith

final monolith
#

yo

tender shard
#

these are the strings you sent

final monolith
#

πŸ€”

tender shard
#

(I mixed up first and second, but yeah, they are definitely different)

final monolith
#

thats weird, why it is printing two same vars when i use .toString()?

tender shard
#

that's a good question lol

final monolith
#

πŸ˜†

tender shard
#

the only way I can imagine this happening is messing with the byte array using reflection

scarlet creek
scarlet creek
#

oop replied to wrong message, sorry

final monolith
#

xD

iron glade
#

kamasutra.yml hmmm

tender shard
#

works fine for me

#

oh wait

#

you used it as static method

#

you gotta use Bukkit.getScheduler().getPendingTasks()

final monolith
scarlet creek
#

Ohhh ahhh alright

final monolith
#

i think can be this

tender shard
tender shard
#

0.0.0.0 means "listen on all public IPs"

final monolith
#

its a public hosting

final monolith
#

how i can get my hosting ip then?

tender shard
#

yeah that's not easy

#

you can't really

#

you'd have to do a web request

#

one sec

final monolith
#

πŸ€”

tender shard
#

I do it like this

#

there simply is no reliable way to get the actual public IP without doing something like this

agile anvil
#

Since your ISP provide your public IP, you can't get it directly without asking another computer

#

Or you can have a static public ip but you'll have to refer it somewhere

tender shard
#

yeah but that's unreliable

final monolith
#

πŸ€”

tender shard
#

just imagine you're behind a router, and your local IP is 10.0.0.2

#

that's obviously not your public IP

final monolith
#

i think thats not gonna be a problem, im working with my rest API, requests aren't a problem

#

thanks guys

tender shard
#

np

final monolith
#

i will take a look

tender shard
#

it just returns it as string

final monolith
#

But the Bukkit.getPort() are safe, right?

tender shard
#

well well well

#

I'd say 99% yes, but

#

imagine you're NATing

final monolith
#

πŸ€”

tender shard
#

e.g. all my servers run in proxmox on 25565 but they get NATed to a different port on the host

#

but I guess shared hosters dont usually do stuff like this

#

Bukkit.getPort() is the only source you have, anyway

#

e.g. my servers all think that they run on 10.0.0.X:25565 but they are ACTUALLY reachable e.g. through <publicIP>:30006

charred blaze
#

how can i delete my resource from spigotmc?

tender shard
charred blaze
tender shard
#

he's even online now πŸ˜›

charred blaze
#

@vagrant stratus

#

xd

tender shard
#

but you definitely need to report it yourself too

final monolith
#

*incoming ban

#

xD

charred blaze
#

1 hour later: my account got removed instead of plugin

#

lmao

tender shard
#

lol nah

#

just report your resource and wait a bit

charred blaze
tender shard
#

it's quite hard to get banned from spigotmc lol

#

you really have to fuck up to get banned there πŸ˜„

tender shard
#

why do you wanna remove it anyway?

charred blaze
charred blaze
tender shard
#

btw your donation link is broken

#

you entered your discord name there lol

#

usually people toss in their paypal link or similar πŸ˜„

charred blaze
#

xD

slow granite
#

does anybody knows some mobmeta doc?

#

for getting mob skulls

#

skullmeta

vital sandal
#

i tried to serialize and deserialize spigot object(location/itemstack) and this happens why ?

hazy parrot
#

Can you show actual error/your code

eternal oxide
#

gson needs a type adapter to serialize a Location

tender shard
#

Location / ItemStack etc already implement ConfigurationSeriazable which means they have a serialize() method that returns a Map<String,Object>

gray merlin
#

Also, from experience, you should serialize ItemStacks using base64 and NMS. Bukkit does an awful job on serialization w/nbt.

tardy delta
#

gson doesnt know what to do with the WeakReference<World> within the location

gray merlin
#

[Reposting]
I have added my dependency into a module of mine, with the shade plugin, but it for some reason isn't getting added to the final jar. I have done this 10 other times in the same way and it has worked... what could be the issue?
Working Project POM (MC 1.16) https://pastecode.io/s/qwg0zbf3
Current Project POM (MC 1.17) https://pastecode.io/s/qfxx389r

arctic moth
#

"worldgen plugin"

tardy delta
#

damn

arctic moth
#

i didnt even think that was possible to do without updating one of them

gray merlin
eternal oxide
#

it needs scope compile

gray merlin
#

Yeah, it doesn't work.

#

And in my last 10 versions it has worked without it, too

eternal oxide
#

your example of the working one has the scope

gray merlin
#

Oh yeah, my bad there, I added it yesterday as a test

eternal oxide
#

Without a scope the shade plugin has no clue what to do with it, unless you provide a filter

gray merlin
#

Interestingly, scoping it doesn't seem to make a difference. I added the scope to the working one as a test yesterday to check that

arctic moth
#

"worldgen plugin"

#

its supposed to go underwater but not that far-

gray merlin
#

Double-checked with compile scope, still doesn't work.

young knoll
#

Imaging making a worldgen plugin

gray merlin
#

Ah, the dependency is the Commons one, btw.

tender shard
gray merlin
#

Oh, I think you did tell me that yesterday? It was 2AM though so I left for the day. Let me try

tender shard
#

yep, it will print a TON of useless lines but mostly it also has 2-3 useful lines πŸ˜„

#

e.g. mvn clean package -X

small current
#

how can i deal knockback to an entity

#

not the normal one

#

a little more

young knoll
small current
#

found nothing

#

what should i pass in the params

gray merlin
small current
#

there is no entityvelocityevent so i can multiply the knockback dealt to the entity

#

i have to cancel the damage event and deal the knockback myself

#

but like the entity going in the right direction

#

i found no code

#

can someone give me one ?
i know its spoonfeeding but im not good at the maths

shell finch
#

is there a way to get custom enchants to appear in enchanting table?

gray merlin
agile anvil
sacred mountain
#

so i have this in my api, i'm trying to add a feature that can check if the command failed or not

olive lance
sacred mountain
#

is that possible

#

i doubt it

agile anvil
sacred mountain
#

as in usage

#

not stacktrace

#

but thats handled by the plugin so idk

agile anvil
sacred mountain
#

and the only way around that would be to read the last message a millisecond or something later, and check for keywords which is unreliable and hacky

olive lance
#

i thin k my ide shit itself im retsarting i will see @agile anvil

olive lance
#

intellij

sacred mountain
#

think about it

olive lance
#

if the entity isnt a player I return

tender shard
#

what's the class it cannot find, and what's the dependency of that called?

sacred mountain
#

btw alex i like ur morepersistentdatatypes

#

very kewl

tender shard
#

especially the maps, collections and arrays part

sacred mountain
#

yess

olive lance
#

bro i am feeling like i had a stroke LightFury it still looks fine to me no matter how many times i read it,...

sacred mountain
#

read it

#

tell me what u dont get

#

i might be missing it

tender shard
#

huh? no

#

they RETURN if its not a player

olive lance
#

if the entity is not a player, then the first line will return the method

tender shard
#

so ofc casting it to player is fine

sacred mountain
#

am i just stupid then

#

lamo

tender shard
#

it will basically always be a player

#

lol

sacred mountain
#

i think the wrong way

#

when theres early returns

#

ignore me

gray merlin
# tender shard what's the class it cannot find, and what's the dependency of that called?

Oh, don't worry about it, it was an issue with artifacting. Maven is working correctly, and when I package my project, it works flawlessly; However, when I created an artifact of it to perform remote debugging, it broke apart, and I hadn't noticed that was what was happening. I created loads of artifact builders ahead of time without setting their dependencies in the POM, so it broke because it wouldn't jar the files.

sacred mountain
#

but yeah intellij will still say that

olive lance
#

still doesnt mnake sense why intellij thinks defender will always be null tho, i guess it doesnt really matter

sacred mountain
#

you can add an inline variable

tender shard
#

you HAVE to use maven, otherwise it'll break

#

using intellij artifacts will break it, that's normal

sacred mountain
#

if (!(e.getEntity() instanceof Player player)) return;
defender = player;

gray merlin
#

Well, no. I fixed the dependencies and now I can use them as usual.

sacred mountain
#

inline will remove the intellij warning

tender shard
#

oh okay, good πŸ™‚

gray merlin
#

In order to perform remote debugging I have to use intellij artifacts, so yeah.

#

Actually it's not remote debugging, it's Jar App. Debugging, but even with remote I still need jar artifacting so yeah

#

But for the final version, for sure, packaging is the way

terse ore
#

how do I check if a string is inside foo keys?

foo:
  asd: sad
  faa: foo
#

config.yml

arctic moth
#

"worldgen plugin"

hazy parrot
olive lance
#
            Bukkit.getScheduler().cancelTask(archerTagged.get(p));
        }``` i wrote this a while ago and now i regret
olive lance
#

not even i can read my code

olive lance
#

i wanna do tab completions but it seems like a bitch

hazy parrot
terse ore
#

it doesn't work

#

so what do I do?

hazy parrot
#

just do config.contains("rarities." + args[0])

terse ore
#

IT WORKS

#

ty

#

oops

#

it works*

tender shard
hazy parrot
tender shard
lost matrix
tardy delta
#

TabExecutor ftw

arctic moth
#

its an oceann

crude cobalt
#

Hello everybody, who know, how to change max water lvl in cauldron? For example, so that 15 bubbles of water intervene in the cauldron

tardy delta
#

nobody has told me that unittesting sucks so hard

tender shard
#
public void expectThrows(String term) {
  assertThrows(InputMIsmatchException.class, () -> parser.parse...(term));
}
#
@Test
public void testThrows() {
  expectThrows("1 +");
  ...
}
tardy delta
#

same thing lol

tender shard
#

yeah but less to type

#

I mean what's wrong with it?

tardy delta
#

its more like the amount of invalid expressions that i need to test lmao

tender shard
#

why do you consider "1. + 1" as invalid though?

tardy delta
#

yes

tender shard
#

doesn't 1. usually mean 1.0?

tardy delta
#

cuz nothing follows behind the comma

ivory sleet
#

also .1

tender shard
#

yeah both 1. and .1 look fine to me

#

bc also accepts "1." and ".1"

tardy delta
#

ah nice nothing thrown for "1 +"

tender shard
#

well that should throw something though lol

tardy delta
#

i made handling invalid expressions a pain by implementing operator priority

tender shard
#

what happens if you have stuff like "1.2.3 + 2" ?

tardy delta
tender shard
#

lol why did they include the floor in the address

tardy delta
#

made some nice exception handling for my operand class

tender shard
tardy delta
#

lets write more comments lol

shell finch
#

how can i add lore to a held item?

kind hatch
#

Get the item in the player's hand. Get the lore, add to it, then set it back to the item.

quiet ice
shell finch
#
            ItemStack item = player.getInventory().getItemInMainHand();
            //adding an enchantment to it
            item.addUnsafeEnchantment(customEnchants.Telepathy, 1);

            //getting its meta and then initiating a lore variable
            ItemMeta meta = item.getItemMeta();
            List<String> lore = new ArrayList<String>();

            //adding lore to the variable so the new enchant is before other lore
            lore.add(ChatColor.GRAY + "Telepathy I");

            if(meta.hasLore()){
                for(String l : meta.getLore()){
                    lore.add(l);
                }
            }
            //setting the lore to the item
            meta.setLore(lore);
            item.setItemMeta(meta);```
#

this should work right?

#

the adding enchantment part works but i cant get the lore to appear

vital sandal
#

is there any method to display String in level bar ?

kind hatch
shell finch
shell finch
vital sandal
shell finch
#

i dont think you can write on that

kind hatch
kind hatch
vital sandal
#

i seen people create custom name with colored-background characters

kind hatch
#

AFAIK, you can't change that without a resource pack.

quartz solstice
#

How do you store information about a player (tp requests) in an array?

kind hatch
tender shard
#

no need to bump your own question after literally ONE MINUTE

tender shard
#

using arrays for this seems weird in the first place though. a Map or Collection would seem way more useful than a fixed-size array

vital sandal
tender shard
#

isn't this PLAYER thing just a custom char in the font?

vital sandal
#

it is custom font

kind hatch
#

Oh, that's just custom characters with a resource pack.

torpid sapphire
#

is there a way to set the max durability of an item?

vital sandal
#

yeh i just found that out

kind hatch
#

I thought you were referring to the XP bar, which you can do some stuff with, but I don't have practical experience with it specifically.

vital sandal
#

i read some nms source code but nothing work

kind hatch
#

I mean, I believe that it's the same as any other modification. Mostly just custom characters tied to texture files.

upper vale
#

the font is a resource pack

#

nothing nms

vital sandal
#

i mean the xp bar ....

#

the font issue is already closed

kind hatch
#

However, it might be even easier for the XP bar considering it only accepts integer values. You could just map the values of the level to a certain texture and work off that. At least in theory.

upper vale
#

xp bar is the same thing

#

isnt it also resource pack

tender shard
#

XP bar accepting integers? it's using floats, doesn't it?

kind hatch
#

Uhhh, let me check

vital sandal
#

he mean the level

#

not the xp XD

tender shard
#

oh the level

#

I thought the "bar"

#

because that one is either 1 for full or 0 for empty or sth inbetween

mighty aurora
#

Added a condition to an if statement and it stopped my entire plugin from working...

terse ore
#

Why I am getting null when accessing a file made with str concatenation?

terse ore
#

there's no stacktrace

#

I am using YamlConigurator

#

if I use YamlConfigurator.loadConfigurator(new File("foo"))) without any string contatenation in the path it works fine

quartz solstice
#

someone sent me a link here a while ago

#

but i lost it

terse ore
#

but when I add string concatenation for modifying the path to the file it doesn't work

reef lagoon
terse ore
#

wait

#

isnt + for strings named concatenation?

#

what's + name?

reef lagoon
#

I thought u meant .concat()

terse ore
#

I mean

terse ore
#

I did

terse ore
#

name.toLowerCase().replace(" ","_") + ".yml"

kind hatch
#

"Hello" + " world!" will concatenate the strings together.

vocal cloud
#

Use a db 😭

terse ore
#
If I do this it works fine
// name = "John Smith"
name = "jhon_smith.yml"

If I do this it returns null
name.toLowerCase().replace(" ","_") + ".yml"

reef lagoon
#

works for me

kind hatch
#

A potential issue I see is that if the name already contains a ".yml" at the end, you will add an additional .yml to the string. You should check to see if it already ends with it.

terse ore
#
        String path = "./plugins/EcoEnchants/enchants/aquatic.yml";
        YamlConfiguration yml = YamlConfiguration.loadConfiguration(new File(path));
        System.out.println(yml.getString("display-name"));

        String concpath = "./plugins/EcoEnchants/enchants/" + enchant.toLowerCase().replace(" ", "_") + ".yml";
        YamlConfiguration concyml = YamlConfiguration.loadConfiguration(new File(concpath));
        System.out.println(concyml.getString("display-name"));```
terse ore
dreamy dove
#

Hi is it possible to start a function / datapack without command I could not find anything on Google. I usualy start the function ingame by command /function functionname:play now I have the problem that Players on my server not have permissions on the function command and I tryed things like this to execute the command for the player player.getServer().dispatchCommand(player.getServer.getConsoleSender(), "sudo JacksaYT function functionname:play");

tardy delta
#

you should be using File.separator instead of /

kind hatch
#

Also, why are you using the full path?

tardy delta
#

and dont hardcode plugin path

kind hatch
#

You have #getDataFolder()

tardy delta
#

^^

terse ore
#

I am accessing another plugin's folder

#

getDataFolder() + "../" ?

kind hatch
#

or #getDataFolder().getParent()

terse ore
#

what does this gotta do with my issue?

kind hatch
#

Nothing in particular, just some advice for cleaning up your code. As for your issue, I think you should re-read my initial reply.

terse ore
#

which one?

kind hatch
kind hatch
#

That still doesn't change what I said though. What guarantee do you have that #getDisplayName() doesn't end with ".yml"?

terse ore
#

Yeah, I'm pretty sure

kind hatch
#

Still doesn't change the fact, but alright. Assuming that your input is valid, what part isn't working as expected? Does it only work for specific items?

terse ore
#

I am getting that name

kind hatch
#

You're clearly missing the point. If for any reason, your displayname has the String ".yml" at the end, and it runs through your code. You will end up with a string that ends with ".yml.yml". Now, your current inputs may not end with that specific string, but if it ever did, you would more than likely get an NPE when it tries to retrieve the file.

terse ore
#
        String path = "./plugins/EcoEnchants/enchants/aquatic.yml";
        YamlConfiguration yml = YamlConfiguration.loadConfiguration(new File(path));
        System.out.println(yml.getString("display-name"));
        System.out.println(path);

        String concpath = "./plugins/EcoEnchants/enchants/" + enchant.toLowerCase().replace(" ", "_") + ".yml";
        YamlConfiguration concyml = YamlConfiguration.loadConfiguration(new File(concpath));
        System.out.println(concyml.getString("display-name"));
        System.out.println(concpath);```
#

now you see the issue?

kind hatch
#

I love that you are ignoring the other legitimate issues that we have been pointing out, but I might be wasting my time.
If it isn't clear by that output, it's clear that enchant isn't what you are expecting it to be.

ashen quest
dreamy dove
#

😒

terse ore
#

I am literally trying to send you the most debugging stuff for you to help me with the issue

kind hatch
#

Except you haven't. You keep showing me what you expect, but what you are getting is clearly different. Everything you have shown leads back to an issue with your input. Print out enchant and maybe you'll start to understand.

terse ore
#

I already did it

kind hatch
#

No, you didn't. You printed out concpath

#

There is a difference.

terse ore
#

have you seen the image?

kind hatch
#

Do you know java?

terse ore
ashen quest
#

I am pretty sure they dont

vital sandal
#

i tried to add this custom font but something wrong

terse ore
#

You told me to print enchant

#

I printed it

tender shard
#

String#replace simply cannot return null

kind hatch
#

Look, maybe we need more code being shown. Cause from what you have given me in the forms of screenshot don't exactly line up with what I would expect to see. When do you print out enchant in relation to the second block of code that prints out the paths?

heady spruce
#

Hello! I've got a question, I want to delete every item that does have a specific NBT Tag on the Item when the player dies. Does anybody know how to check if the item that got dropped by death has a NBT Tag?

kind hatch
terse ore
#
    public static Inventory enchantInventory(String enchant) {
        Inventory inventory = Bukkit.createInventory(null, 54, enchant);
        fill(inventory);

        String path = "./plugins/EcoEnchants/enchants/aquatic.yml";
        YamlConfiguration yml = YamlConfiguration.loadConfiguration(new File(path));
        System.out.println(yml.getString("display-name"));
        System.out.println(path);

        String concpath = "./plugins/EcoEnchants/enchants/" + enchant.toLowerCase().replace(" ", "_") + ".yml";
        YamlConfiguration concyml = YamlConfiguration.loadConfiguration(new File(concpath));
        System.out.println(concyml.getString("display-name"));
        System.out.println(concpath);

        System.out.println(enchant);

        return inventory;
    }
kind hatch
#

Ok, I do hope you understand that the output screenshot you sent doesn't line up with that code.
If it did, Aquatic would be at the bottom of the console and not the top. This is partly why I am so confused about this.

heady spruce
terse ore
terse ore
modest garnet
#

how to get server time?

agile anvil
#

System.currentTimeMillis()

kind hatch
modest garnet
#

ty

kind hatch
#

The only thing I can think of is a missing file. What does the contents of the enchants folder look like?

terse ore
heady spruce
#

Is it possible to add an itemstack custom NBT tags in 1.8.8?

terse ore
#

I already thought of this but you can see that the path on path and concpath are the same, so why would it be missing

kind hatch
#

Yea, I just realized that.

heady spruce
#

Ok

kind hatch
terse ore
#
[19:37:43 INFO]: Akex06 issued server command: /enchants
[19:37:44 INFO]: [EcoEnchantsInterface] null
[19:37:44 INFO]: [EcoEnchantsInterface] ./plugins/EcoEnchants/enchants/aquatic.yml
[19:37:44 INFO]: [EcoEnchantsInterface] Aquatic```
arctic moth
#

this is what happens when i try to use a free host for beta testers to try out my server lol

opal juniper
#

which packet is the brand in

eternal night
#

which brand

opal juniper
#

server, someone was saying that it has disappeared from wiki.vg

arctic moth
#

?

eternal night
#

should still be a custom payload packet

kind hatch
#

Then they never happen again once it fixes itself.

arctic moth
#

is this bad lol

#

7k ticks behind

#

took 10 minutes to load 3 chunks

tardy delta
#

yes.

arctic moth
#

ever again

crude estuary
arctic moth
#

nope

#

not using bukkit

crude estuary
#

not Getting a Joke

agile anvil
#

Feels like have 0,05% of a i3

arctic moth
#

πŸ’€

#

holy shit

#

its like 5 fucking chunks

crude estuary
#

load only one

#

there's a Plugin for that

terse ore
arctic moth
#

i had to remove dynmap just to run this server and i can barely even join

crude estuary
arctic moth
#

but the server can barely sustain one person

#

even though i removed like half of the plugins

crude estuary
#

to Something Crazy Fast

quiet ice
#

Is it possible that ConcurrentHashMap#entrySet will return an empty set even if ConcurrentHashMap#isEmpty is false?

#

I guess I'll move to ConcurrentHashMap#forEach, hopefully that one behaves better

arctic moth
#

how tf did i just upload 95 mb i dont have nitro

modest garnet
shell finch
#

Server is boosted

arctic moth
dire marsh
#

Anyone know how to spawn a falling block via protocollib? I kind of got it half working... problem is the falling block is invisible and I can see its hitbox flashing on/off with f3+b. Super weird.

arctic moth
dire marsh
#

Not really, as the falling block needs to have no gravity or collisions

quiet ice
#

I know that the no gravity part is easily doable in standard API, no collisions I am not too sure

#

Though I am fairly certain that someone on the IRC channels managed to do exactly that with standard API

arctic moth
arctic moth
#

they completely ignore collision checks

#

on both client and server

quiet ice
#

Looks more like the chunks are considered non-ticking for the server to me

arctic moth
#

blocks still work fine

#

in the surrounding chunks

quiet ice
#

Mostly because nonticking chunks mainly affect entities

rough drift
#

If I have a class Something<T> which has a method public Something<T> doStuff() and I have a class Somethong extends Something<String>, and a method public someStuff(Somethong somethong), how could I make it so I can call someStuff(mySomethong.doStuff())

#

or did I just forget how inheritance works

eternal oxide
#

yes

#

however if it extends the method should just be there without

#

super is to call a methodf in the parent with the same name as the one calling (usually)

mighty pier
#

do i have to try catch if i do #getMaterial(String) when string isnt a material?

eternal oxide
#

null check

mighty pier
#

k

shell finch
#

how could i have a block be placed for, say 5 seconds and then canceled?

shell finch
#

thanks ill search that up

candid galleon
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

old cloud
candid galleon
#

?scheduler

eternal oxide
#

ing

kindred valley
#

Hello elgar

quaint mantle
#

Whats the best way to make a lootbox that gives multiple things

#

store the items in a list and get a random thing from it?

agile anvil
#

exactly

quaint mantle
#

πŸ‘

shell finch
#

how coudl i summon particles in an area?

worldly ingot
#

Depends on the particle. Some of them can be spawned in bulk with the x, y, and z spread arguments

#

Though all particles are different

shell finch
#

alright thanks

lost matrix
# quaint mantle Whats the best way to make a lootbox that gives multiple things

My current loot system builds on a single interface which can be implemented to add loot to
chests, entities, achievements etc.

public interface Loot {

  void applyTo(Player looter, Location location);

  void applyTo(Player looter, Inventory inventory);

  default Loot withCondition(Predicate<Player> predicate) {
    return new ConditionalLoot(predicate, this);
  }

}

But its quite extensive

#

This is how ItemStack loot looks like

#

For multiple loot elements i used the compound pattern

mellow pebble
#

i get this error when i try to connect to my server

#

and i dont know why ?

eternal oxide
#

you are tryign to register a listener you already registered

mellow pebble
#

how hahaha

#

where

#

which line

eternal oxide
#

You tell me, its your code

mellow pebble
#

i really dont know where that could happend

terse ore
#

send code where you're loading listeners

eternal oxide
#

on a player joining I'd guess

mellow pebble
#
public void kitsGui(Player player){
        Inventory gui = getServer().createInventory(player, 9, getConfig().getString("MainColor") + "Β§lSelect a Server");
        List<String> kitss = new ArrayList<>(kits.getConfigurationSection("Kits").getKeys(false));
        for (String kit : kitss) {
            ItemStack stack = new ItemStack(Material.valueOf(kits.getString("Kits." + kit + ".Item")), 1);
            ItemMeta meta = stack.getItemMeta();
            meta.setDisplayName(getConfig().getString("MainColor")+kit);
            stack.setItemMeta(meta);
            gui.setItem(getConfig().getInt("Kits." + kit + ".Slot"),stack);
        }
        player.openInventory(gui);
    }
#

but i really dont see anything that could trigger that thing ?

eternal oxide
#

are you running that when a player opens a chest?

#

or clicks in an inventory?

mellow pebble
#

when player joins it runs this method

#

and it will run this method when player respawns

eternal oxide
#

delay it a tick or two

mellow pebble
#

so they can choose kit

mellow pebble
mellow pebble
eternal oxide
#

?scheduling

undone axleBOT
mellow pebble
#

ty for help tho

rugged topaz
#
        for (CustomCryptGhoul mob : CustomCryptGhoul.mobs) {
            if (e.getEntity() != mob.getEntity()) return;
            if (e.getEntity().getKiller() == null) return;
            mob.getDrops().forEach((k, v) -> {
                if (ItemUtil.calculateChance(v, 100)) {
                    e.getDrops().add(ItemUtil.createItem(k, "DROP_CRYPT_GHOUL"));
                    if (v <= 5) {
                        e.getEntity().getKiller().sendMessage(SkyblockBasics.replaceChatColors("&6&lRARE DROP! " + k.getName()));
                    }
                }
            });
        }
        for (CustomSkeleton mob : CustomSkeleton.mobs) {
            if (e.getEntity() != mob.getEntity()) return;
            if (e.getEntity().getKiller() == null) return;
            mob.getDrops().forEach((k, v) -> {
                if (ItemUtil.calculateChance(v, 100)) {
                    e.getDrops().add(ItemUtil.createItem(k, "DROP_SKELETON"));
                    if (v <= 5) {
                        e.getEntity().getKiller().sendMessage(SkyblockBasics.replaceChatColors("&6&lRARE DROP! " + k.getName()));
                    }
                }
            });
        }

rather than duplicating this code for each class type of Custom...MobType is there a way I would be able to refactor this code into a method? is this something possible with generic Class<T>?

quartz solstice
#

How do you make it so that when you click on a message it runs a command in the mc chat?

eternal oxide
#

its just a Mob so use that as a generic

rugged topaz
quartz solstice
#

ty

rugged topaz
eternal oxide
#

those mobs are basic extensions of Mob?

#

sojava public void doStuff(Collection<? extends Mob> mobs) {

#

or something close

rugged topaz
#

I just spawn the entity, and keep track of them in a reference.

eternal oxide
#

you could have both your Custom... classes extend a base class.

young knoll
#

Why not tag the entity with PDC instead

eternal oxide
#

put all teh duplicate code in teh base class, then just have the static list in the actual class

#

tagging them is better

#

No need to track them then

#

Just check for the tag on death and handle the drops

rugged topaz
eternal oxide
#

much better

haughty idol
#

how do i check if a string is the name of a Player? i'm trying to do a party command

young knoll
#

Bukkit.getPlayer(string) != null

lost matrix
#

Dont check custom items for equality by checking the ItemStack or ItemMeta.
Always use the PersistentDataContainer to check for custom items.

shell finch
#

How could i make a player take falldamage without falling?

vocal cloud
#

You fire a damage event and set the cause as fall damage

shell finch
#

can i do that directly onto the player or do i have to get a LivingEntity

vocal cloud
#

On whatever you want

#

Check what the event requires

shell finch
#

how can i set the cause?

eternal oxide
#

raising an event won't cause damage

#

you have to throw an event and check if its cancelled. if not then player.damage or setHealth

young knoll
#

Sadly that doesn’t seem to affect the death message

shell finch
#

hm

#

so no way to give cause? i wwanted featherfalling to make the player take less damage

young knoll
#

You can easily do the math on that

vocal cloud
#

Wait that's completely different from what you were asking before Thonk

shell finch
#

it is? haha sorry i must've expressed myself badly

#

yeah ill do the math myself

vague oracle
#

Was just thinking is there a reason spigot doesn't have a method to accept a List<Pair<EquipmentSlot, ItemStack>> instead of just 1 slot and 1 item for player.sendEquipmentChange().

quaint mantle
lost matrix
quaint mantle
#

Is there a way to cancel a scheduler?

eternal oxide
#

call cancel() from within it

quaint mantle
#

Since this.cancel()

#

Just

#

cancel()?

eternal oxide
#

?scheduling <- all covered there.

undone axleBOT
quaint mantle
#

Alr

#

Thanks

drowsy helm
#

You can just locally cache the stuff if you really want it to be easy

vague oracle
#

I was just curious as public PacketPlayOutEntityEquipment(int var0, List<Pair<EnumItemSlot, ItemStack>> var1) { accepts multiple so I wondered why not but I see

worldly ingot
#

Reason why is because it's an awkward API

#

Maybe, maybe, a Map<EquipmentSlot, ItemStack>, but it seems awkward

#

When I initially added that method, I didn't really consider the fact that someone would want to send multiple equipment changes. I wanted to kind of mirror the existing APIs that send client-sided changes, like sendBlockChange()

echo basalt
#

that's cool and all but when are we having a full client-sided block api

warm light
#

if I add/remove/move item in enderchest, it's "InventoryDragEvent" right?

echo basalt
#

with chunk support, maybe allowing entities to collide with client-sided blocks

#

so even entities have their own client-sided blocks

echo basalt
#

I wonder if it's possible to mask real blocks as air blocks if I modify all the collision code πŸ€”

#

mostly for players really

#

server seems to rubberband

worldly ingot
#

I mean literally none of that made any sense. You have a client-sided block API. The sendBlockChange() method. Sending chunk changes used to have an API but it was never updated past 1.13. It used byte data, which was removed later iirc. Though if you want the block to collide with entities, you would put it on the server.

echo basalt
#

what if I only wanted some blocks to collide with some entities

#

I mean

#

I ended up achieving what I wanted with tons of nms

worldly ingot
#

Then you're in a perfect position to draft up an API for us πŸ™‚

echo basalt
#

uhhhhhhhhhhhh

#

I had to go full on custom fancy entities

#

and override move methods

#

grr

#

it needs A TON of internal changes

#

but sure I could try forking spigot and doing that

#

by A TON I mean either modifying the block accessor to provide an entity, which breaks nms

#

or make each entity have its own map / cache

echo basalt
#

doesn't have any entity code

#

as I'm not gonna paste like 600 lines of nms

#

for 1.18.1 paper, in specific

worldly ingot
#

Looks like sendChunkChange() was removed in 1.16 alongside other deprecated API removals, but it can definitely make a comeback

echo basalt
#

I use multi block change for now

#

some annoying things are like

#

sending a fake block SOLID -> AIR will actually cause banding issues

#

can be fixed on the collision checking code for all entities

#

which is what I did

#

but I also had to modify the navigator to treat fake blocks as real

#

I'd end up burning like 20 hours on this api change

#

and maybe worry about persistence

warm light
echo basalt
#

both

#

they both handle different scenarios

warm light
#

But which event get called when a player put item on chest?

echo basalt
#

uhh

#

InventoryClick some times

#

Other times it's InventoryDrag

#

it really depends

#

Shift / regular click? Inventory click

#

If you drag an item across slots (even if it's just starting a click outside the inv, and dragging 1 item in), then it's drag

warm light
#

oh. got it

vague oracle
worldly ingot
echo basalt
#

let's see if I can hack together some code

#

because I don't want to post a PR

#

I wonder how the ChunkData class would do tho

#

maybe something similar to ChunkSnapshot ?

desert frigate
#

is it possible to apply night vision without giving a potion effect?

worldly ingot
#

No no, we have a ChunkData interface already

#

From the world generator

#

Can create one with Server#createChunkData(World)

echo basalt
#

wtf copilot

worldly ingot
#

All that would really need doing is adding a few methods into Player, sendChunkChange(int chunkX, int chunkZ, ChunkData chunkData, boolean updateLight)

#

Then we would have to account for the fact that that packet updates chunk sections, meaning 3D chunks. So it would probably have to send multiple packets

#

Should also account for,

Servers should avoid sending block changes in unloaded chunks [on the client] and clients should ignore such packets.

echo basalt
#

I hate that so much

#

what about optimizing the shortset to not send unecessary data?

worldly ingot
#

Which short set? Is there one in ChunkData?

#

(I've never looked at its implementation)

echo basalt
#

ClientboundSectionBlocksUpdatePacket(SectionPos sectionPos, ShortSet positions, LevelChunkSection section, boolean noLightingUpdates)

worldly ingot
#

Curious as to why that's a short. The serialized data is an array of longs

echo basalt
#

SectionPos - position of the chunk section to update at
ShortSet - set of indexes of updated blocks
LevelChunkSection - The section, where the blocks will be fetched from
noLightingUpdates - self explanatory

#

looking at the packet impl on 1.18.1 (version I have at hand atm, shouldn't differ), apparently the position is part of the serialized long

#

So the first 12 bits are position, then the other 52 are the blockstate itself

worldly ingot
#

Other way around

echo basalt
#

it's 3:23am have some slack

#

I was about to say 22 bits before I realized it was a long

#

I'm the kind of guy that uses a calculator to do 100-5 just to check out my trig math

#

But yeah, you can send that update sections packet, for only a few blocks

#

and have a much smaller packet

#

so the shortset is important

#

the constructor fetches the states at the positions from the shortset

worldly ingot
#

Mhmm

echo basalt
#

and if the section is null, it just assigns the state as air

#

So thinking about how to do it the bukkit way, we could have a map of offsets within the chunk

#

or make a chunksection api

#

or at least a chunksection location api?

worldly ingot
#

Again, I'd be inclined to reuse ChunkData

echo basalt
#

we still need to be able to indicate what section we're dealing with

#

if you want to send for the entire chunk, it's 1 packet per section

#

what if we're only changing 1 block? is it really worth it to send 4096 packets per chunk section

worldly ingot
#

That's fine. Create a child class that extends CraftChunkData that tracks changes to the underlying data, then you can get the modified sections by just dividing by 16

#

Sections are 16 tall, aren't they?

echo basalt
#

Ye

#

Maybe a ChunkChangeData class

#

that just has like

#

set(int x, int y, int z, BlockState state) type deal

#

or BlockData

#

set, get

#

maybe make it concurrent idk

worldly ingot
#

I'd just say edit the existing ChunkData ;p I really don't see any reason to not use it. It exists and mimics exactly what is needed

echo basalt
#

maybe make a wrapper with the chunk section pos or something?

worldly ingot
#

Would probably just update the existing implementation too. No reason for a child class

echo basalt
#

Sure we have the ChunkData, we still need the position where to display it at

#

what if you want to send the same data across multiple chunks

worldly ingot
#

Yeah. Track those changes in CraftChunkData when they're made

#

Store an array of longs

echo basalt
#

we can store that yeah

#

like a Map<Short, BlockData> changes maybe?

#

So we have both a ShortSet as the key

#

but also a matching set of blockdata

worldly ingot
#

Not sure how CraftChunkData is implemented. Haven't looked

#

I'm sure it can be altered slightly to support what's needed

echo basalt
#

it literally just changes it internally

#

so it's not ideal

worldly ingot
#

I figured it didn't modify the world, but perhaps it does for chunk generation

echo basalt
#

you try to send a fake chunk and end up breaking your world

warm light
#

Anyone can tell me how can I make this
if player open echest, and player try to put more then 5 shuklerbox in enderchest from his inv, it will block on 5

echo basalt
#

brother are you trying to ask us to code a commission for you or something

warm light
#

I am trying to do this. But its not blocking on player inv move.

And am trying to add a feature in my open source plugin ;-;

restive mango
#

Anyone know how to get a blockstateID for a given block?

worldly ingot
#

For what reason? Might already be API for what you're doing

echo basalt
#

if you want to dismiss choco's argument, Block.getId(nmsState) does what you want

restive mango
#

tankz

echo basalt
#

You can get the nmsState by doing CraftMagicNumbers.getBlock(MaterialData/Material/Material&byte)

worldly ingot
#

Might already be API for what you're doing

echo basalt
#

don't have nitro to use :eyeszoom: unfortunately

restive mango
#

@worldly ingot I'm making a projectile that looks like anything, including falling blocks

#

need the blockstateIDs to send the packets for falling blocks

#

the base projectile is actually a trident

echo basalt
#

we should make a full client-sided api for spigot

#

blocks, entities, players, behavior

#

just because

#

Then PR it, promise to maintain it and just vanish

worldly ingot
#

Client-sided entities is hard. How do you represent an entity on the server that doesn't yet exist?

echo basalt
#

by sending packets

restive mango
#

it's not too hard

echo basalt
#

I mess with client-sided entities all the time

worldly ingot
#

Right... but there is no concept of packets in Bukkit

echo basalt
#

mf I made clash of clans with client-sided entities and blocks

#

pasting schematics as client-sided blocks

#

all in 1 world

worldly ingot
#

There was API that did attempt to introduce an entity before it was added to the world, but it fell through. I think in 2017

restive mango
#

When I send the packet for the trident, so long as I change the initial packet to be what I actually want it to look like, I don't have to change the other packets.

#

E.g. I change it in the first packet to be an ocelot

#

I don't have to change future packets at all.

#

All players will see an ocelot flying through the air

#

they'll receive movement packets

echo basalt
#

we should make a game show where we grab like 3 funky developers

restive mango
#

but nothing that actually updates the appearance back to being a trident

echo basalt
#

and see who comes up to the most janky solution to a problem

#

why make minigame map management when you can make all maps and entities client-sided

#

that way you don't load maps, they're all in the player's imagination

#

it's like advent of code, but horrible

#

and we just give a participation trophy to the winner

worldly ingot
#

Yeah, there was a World#createEntity() API being proposed on 2018, but the author has since vanished

#

Virtual entities, he called it

restive mango
#

@echo basalt IRegistry.BLOCK.a(CraftMagicNumbers.getBlock(Material.ACACIA_SLAB));

#

so this gets me the int I want?

worldly ingot
#

Yes

restive mango
#

(acacia slab being an example)

echo basalt
#

uhh

restive mango
#

ty

echo basalt
#

you gotta treat it a bit

#

if the registry returns -1, you gotta return 0

restive mango
#

i mean this would just be the 'default' acacia slab im sure

echo basalt
#

yeah

restive mango
#

lolwat

echo basalt
#

registry returns -1 if it doesn't exist

restive mango
#

but it should only return positive ints?

#

oh

#

yeah

#

ty

#

@ancient plank give props to this guy

echo basalt
#

wot

restive mango
#

i'll show you once i've got this worked out @echo basalt

#

i am going to make an example cmd so i look like the avatar

echo basalt
#

uh okay

#

man's making an image -> block thing or something

#

nvm I'm tripping

#

you explained your concept lol

#

imagine if I made a spritecraft clone but as a plugin

vital sandal
#

i need a method for name above head :l without changing playername

echo basalt
#

πŸ€”

vital sandal
#

this is why ;-;

echo basalt
#

bruh

#

make like

#

armorstand that moves along the player with packets

#

onPacketIn -> if id is playerId -> send packet for stand too

#

idfk

restive mango
#

hey illusion

#

you might know the answer to this to

#

can i send multiple packets all of the same player to someone and make it look like that player is in multiple places at the same time?

echo basalt
#

lol wtf

vocal cloud
#

No because each packet would overwrite the last

echo basalt
restive mango
#

hum

#

well there's some way to do it, though

#

like i can have multiple players all disguised as the same player

#

using a /disguise plugin

vocal cloud
#

Or you can make fake players yes

echo basalt
#

yeah fake players in that case

sharp flare
#

might be offtopic, but what would u all consider laravel or express (both from different stack)

#

currently doing laravel but express is a pain in the ass after making my first app on it

echo basalt
#

thanks copilot

vital sandal
#

is it possible to display cpu and ram usage ?

haughty idol
#

so i'm trying to implement parties into my plugin, but i want to make them custom SO i decided to handle it with a hashmap

#

but i don't know if this code is efficient

scarlet creek
#

How do I add players to a team? The .addPlayer is deprecated

worldly ingot
#

addEntry(String)

vital sandal
#

Still addable

worldly ingot
#

Teams don't require players anymore. It can be any string

scarlet creek
worldly ingot
#

Yeah

scarlet creek
#

Ah ok

echo basalt
#

Why the name grr

worldly ingot
# vital sandal is it possible to display cpu and ram usage ?

Memory usage, yes. You can get this run Runtime.getRuntime(). There are some methods in there pertaining to memory available on the JVM. Regarding CPU use, it's iffy. You can get it with the OperatingSystemMXBean which can be one of two implementations, both of which are internal. You would have to access them with reflection.

#
var os = ManagementFactory.getPlatformMXBeans(OperatingSystemMXBean.class);```
scarlet creek
#

Doesn’t seem to work, it’s player.getName() right?

worldly ingot
#

Yeah

haughty idol
worldly ingot
#

What you have is fine. Though you're probably going to benefit from a Party object at one point or another

#

(you could also take advantage of a Multimap in this situation, but if you create a Party object like you should then this is no longer relevant)

sudden robin
#

Heya πŸ˜„

I have a really weird problem that I can't seem to find anything helpful about.
I want a command color that I have registered in my plugin.yml like this:

commands:
  color:
    description: Changes the color of your name in chat.
    usage: "/color <color> (type only '/color' to see the list of colors)"

However, when I try to register it in my onEnable(): getCommand("color").setExecutor(this); I get the error that getCommand is returning null.
(yes, I know I should be making a separate class as an executor, but it's just a really tiny plugin so I don't really care)

Is there something obvious I'm forgetting? I've googled this a bit and seen like half a dozen forum posts that seemed to have this problem, but all of them were either fixed magically with no explanation or had causes that I've already checked.

worldly ingot
#

Fun fact: you don't have to set the executor if it's executing in the JavaPlugin class

#

You can remove that line entirely lol

sudden robin
#

I know, I didn't have that line there originally, but the command wasn't showing up in the server so I thought that was missing for some reason.

worldly ingot
#

Possible that it's failing for some other reason then. What's your full plugin.yml look like?

#

No other errors on startup?

sudden robin
#

No errors whatsoever.
Full plugin.yml:

main: com.cicadacastle.minecraft.core.Core
name: CicadaCastleCore
version: 1.0.0
description: "The core plugin for the Cicada Castle server."
api-version: 1.19.2
load: POSTWORLD
authors: ["Kanashimi"]
commands:
  color:
    description: Changes the color of your name in chat.
    usage: "/color <color> (type only '/color' to see the list of colors)"
worldly ingot
#

api-version: 1.19

#

The minor versions don't exist

#

Also, POSTWORLD is default so you can remove that line as well. Though that's more of a minor detail

sudden robin
#

Yeah, I had that phase where I wanted to have everything in there explicitly, I just kinda carried that over from an older plugin of mine, should probably get rid of it lol

sudden robin
worldly ingot
#

Does your plugin show up in /plugins at all? And does main point to the correct class?

sudden robin
#

It does show up in plugins. And yes, main does point to the correct class.

worldly ingot
#

mind sending a server log?

#

?paste

undone axleBOT
sudden robin
#

Do I just save and then post the link?

worldly ingot
#

Yep!

sudden robin
worldly ingot
#

I was hoping for something more fun sadge I'm not entirely sure why your plugin's command isn't registered.

#

What's your command's implementation look like?

worldly ingot
#

I uh πŸ˜… I think I'm out of ideas. Implementation looks fine too

#

I've exhausted my list of "things that usually go wrong"

sudden robin
worldly ingot
#

Hey, you could have had a return false in there with a condition that always returned true!

sudden robin
#

I mean yeah but that would only appear when the command gets executed. It wouldn't result in the command not showing up anywhere or in getCommand("color") returning null lol

echo basalt
#

I'd just hack into the command manager at that point

sudden robin
#

I'd gladly do that if I had any idea how lmao

sterile grotto
#

how can I use gradient color in my plugin? Do I need to import some third-party plugins or can I just use the original spigot API to do that

sudden robin
#

Gradient color for what?

sterile grotto
#

for chat, player prefix or messages

sudden robin
#

Minecraft is limited to 16 chat colors, there's no gradient possible.

#

Pretty sure that not even third-party stuff could do anything about that. Adding more chat colors would likely require the game to be actually modded.

worldly ingot
#

1.16 introduced RGB colours in text components

sudden robin
worldly ingot
#

There are probably some frameworks to do gradients, though MiniMessage is probably the best. Note however it makes use of Adventure

sterile grotto
quaint mantle
#

Disgusting

#

Paper better

#

Sometimes

boreal seal
#

im wondering guys

#

i got an idea but not sure how should it be correctly to do

#

how should i move data from 1 plugin to other plugin

#

(no sql.)

#

i was thinking to move it thru chat

#

so it will output it into chat meanwhile the other plugin read the data i transfer

haughty idol
#

okay! so how would i make a party command that uses a hashmap and instantiated class

lost matrix
vague oracle
lost matrix
#

You can just depend on your plugin. Plugins can use each others methods and classes.

vague oracle
vital sandal
#

m1 is kinda op

lost matrix
#

Gets crushed by so many CPUs in minecraft and other java applications but ok

vital sandal
#

this took around 20% on my old potato computer

quaint mantle
#

Rip

lost matrix
#

Are you using MXBeans to read this?

vocal cloud
#

M1 is brand new. It should be better than a potato

echo basalt
#

m1 is like 2 years old now

vocal cloud
#

Still pretty fresh

vital sandal
#

i mind spent some one a dedicate m1 server :d instead of some x86 types

vocal cloud
#

What

lost matrix
#

Yeah probably spending quadruple the price for the same performance if something like this existed.

#

m1 would be a horrible choice for a dedicated server. Makes the efficiency cores pretty much useless.

echo basalt
#

still waiting for dedicated minecraft server hardware to optimize stupid stuff like chunk loading

#

just have a dedicated chip to run all the chunk processing

lost matrix
#

Just get one with a fast nvme, a ton of ram and then set the unloading cache to 20mins

echo basalt
#

I mean yeah but where's the fun in that

#

why make developer's life challenging and fun when you can just make a dedicated chip for managing chunks

lost matrix
#

Wait hetzner actually has a Mac mini as a dedicated machine now...

#

why

echo basalt
#

let's say you want to host a minecraft server but you're a mac user

vocal cloud
#

The first mistake is using a mac

echo basalt
#

you grab makeup as white as the mac mini chassis and get to work

vital sandal
#

i seen pp hide the red number on the scoreboard

#

what is the trick behind it ?

lost matrix
#

There is no trick. This is client side.

boreal seal
boreal seal
#

you can do a packet of different number

#

not really remove the red number