#help-development

1 messages · Page 1721 of 1

round elbow
#

i think i figured it out but i dont think theres a way to fix it

#

Enum Constant Details

NETHER
public static final World.Environment NETHER
Represents a nether based map ("hell)
#

copied from the spigotdocs

#

so it represents hell which is supposed to be a biome

#

but in later versions hell is replaced with something else and theres like another 50 biomes in the nether

#

i think that's the reason why it returns NORMAL in nether

young knoll
#

Doubt it

#

That was changed way back in 1.13

#

And world environment isn’t connected to biomes

round elbow
#

i haven't tested in end yet btw

young knoll
#

You should do that

#

Also

round elbow
young knoll
#

That’s probably why

#

It’s not a complete API

#

Neither is cardboard

worldly ingot
#

Oh, yeah, that would 100% be it ;p

#

Those are definitely important details to include

young knoll
#

A complete version of the bukkit API on fabric would be neat

#

But we are not there yet

round elbow
young knoll
#

Correct

#

Or write your plugin on fabric

round elbow
#

i've never done it before

#

but is it possible?

#

like a mod or something?

young knoll
#

Yes, you can write server side mods

round elbow
#

oh

#

my god

worldly ingot
#

He means rewriting your plugin to support Fabric using Fabric's API

round elbow
#

i never knew

young knoll
#

You can do it with forge too if you really wanted

round elbow
#

fuck

#

fabric uses gradle not maven

#

and idk gradle

unreal quartz
#

time to get learning then

torn shuttle
#

so I officially just found the shadiest name for a spigot fork

lavish hemlock
#

D a r k S p i g o t

#

(actually that's pretty close to this one site whoops-)

young knoll
#

VeryGoodSpigotNoVirus

silk tusk
#

Is there any way to get a list of all modified slots from an inventory click event? I'm trying to make a custom gui where the player can still modify their own inventory while it is open without either losing items in the gui or taking them out.

young knoll
#

Cancel any events where the clicked inventory matches the top inventory

silk tusk
#

The issue is things like the double click to collect action, where the click is in the player's inventory, but it still affects the other one.

young knoll
#

You could add random pdc data to all the items in the top inventory to prevent that I suppose

#

Or just cancel that click type in general

silk tusk
#

I guess I can just go through the list of possible click types and cancel the ones that can do that.

mortal hare
#

@silk tusk You can either create a wrapper around the Inventory class, or if you only want to cancel the event you can create array size of inventory view that holds booleans or custom slot objects which should be protected

maiden thicket
#

i always hear people speaking how fabric and spigot can be used together, is there an explanation on this anywhere

ivory sleet
#

This is not the channel to advertise

umbral pagoda
#

can anyone tell me good scoreboard libirary to use it with out flicker

eternal oxide
#

you don;t need a library. The API is fine

slow topaz
#

Hey everyone!
I had a question.. since I'm new to java and spigot stuff..
So I have a plugin named playershopgui+
There is a possibility to save data on a mysql database..
Item stack is saved in hashed string..

{
    ownerUuid: 'ee454be8-086a-40e6-990f-99bb432d769a'
    state: 'IN_PROGRESS',
    startTimestamp: 1633597692829,
    endTimestamp: 1633856892829,
    price: 100,
    itemStack: 'H4sIAAAAAAAA/+NiYOBgYMpMYeDLzcxLTS5KTCuxKk7MS2FkYHXOL80rYWQAADaxoS8iAAAA'
}

Is there a way I can decode this ?

onyx shale
#

Probably using same way you encoded it first? There should be a way to translate it back into a item in the source code

wide flicker
#

Depends on how you got that. If it's the hashcode, you're not likely gonna be able to reverse that. If you serialized it, then it could be reversed

#

That said, I wouldn't really recommend using serialization, since if there's any change to the itemstack class, now your data is useless.
Dumping the item's info to JSON or XML would be a better way to go imo. You'll still be able to save it in a database, and it'll remain functional even when the ItemStack class changes. (Just make sure you store all the properties of the item, e.g. durability, enchantments, lore, custom names, etc..)

paper viper
round elbow
chrome beacon
#

You really should change that question... the reason no one awnsers you is that no one knows what you're trying to do since there is no executing a line of code as a player

paper viper
#

in fact

#

its like literally another buildscript

chrome beacon
#

Gradle is cool. I do prefer maven for simple things though

mortal hare
#

maybe playershopgui+ provides API

#

for retrieving items

paper viper
outer steeple
#

How can i execute this Rcd.setScore(1); line of code as the player. (Rcd is a scoreboard)

paper viper
#

that literally makes no sense

chrome beacon
#

^

paper viper
#

Still doesn't make sense

round elbow
#

what is the best way to save data?
aka
after server stop/restart
YamlConfiguration is what I use for now
not sure if there's something better

proper notch
#

Try telling us what the wider issue is and what you're trying to achieve

mortal hare
#

with async tasks

paper viper
#

how frequent are fetch

#

Databases arent good unless you fetch data periodically

#

and not always constant

round elbow
paper viper
#

You may want to use a database for those

round elbow
#

some last for 30secs
some last until is deleted manually

paper viper
#

those are examples of things that happen once in a while and sometimes and stuff

#

but not always

round elbow
paper viper
round elbow
#

i only started coding with java like what a month ago or something?

paper viper
#

This isnt only subject to java...

#

Database is like a general topic

round elbow
#

oh i see

#

let me re-ask the question

#

how can i access them through java?

paper viper
#

or other databases

chrome beacon
paper viper
#

thats one example

mortal hare
#

well for tpa requests you shouldnt save data inside files

chrome beacon
outer steeple
#

ok

round elbow
paper viper
# round elbow what makes databases better than a simple Yaml file inside of the plugin folder?...
  1. Databases scale better with resources and more entries
  2. Databases are fast, so when you want to retrieve a value once in a while, it's ideal
  3. Jedis uses Redis, which is a native database written in like C or C++ that interacts with the Disk and native functions, allowing it to be much faster than Java
  4. When you load a YAML file, you have to load the whole contents, save and do all of that annoying stuff. Also, you don't want to end up with a gigantic YAML file at the end.
young knoll
#

SQLite is another good option

wispy monolith
#

what is the latest spigot(Not spigot-api) version?

paper viper
#

?latest

#

nvm lol

#

i think its 1.17.1

chrome beacon
#

Yeah

wispy monolith
#

like i tried:

        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

but it doesn't work

chrome beacon
#

Did you run BuildTools

wispy monolith
chrome beacon
#

Because NMS has copyright and can't be distributed

ancient plank
#

net-minecraft-server

wispy monolith
#

aha

ancient plank
#

its the minecraft server source code stuff

wispy monolith
#

but then how did i import that thing before usign maven?

ancient plank
#

you have to run buildtools and put it in your m2

#

local maven repository

wispy monolith
#

k

paper viper
#

Do you want NMS?

mortal hare
#

if you want nms you need to import jar to maven repo or use tools like paperclip with arguments to do that for you

#

idk how you can do it via buildtools

#

its already relocated the chunk

minor garnet
sage patio
#

Hello, i want to make all of items Unbreakable for players, but this method works from 1.9 to 1.17

event.getItem().getItemMeta().setUnbreakable(true);

Anyone can help me for 1.8 ?

ancient plank
minor garnet
#

sacarsm

eternal oxide
fervent gate
#

EntityPlayer craftPlayer = ((CraftPlayer) player).getHandle();
Property textures = (Property) craftPlayer.getProfile().getProperties.get("textures").toArray()[0];

#

I can't seem to import stuff like Property and CraftPlayer

slow topaz
#

looking for a developer who could create a plugin that saves inventory data in sql database.
itemstack data as json.
item save on playerleave & every 5 minutes.
If anyone is interested... please let me know.

eternal oxide
#

?services

undone axleBOT
slow topaz
eternal oxide
slow topaz
#

I dont have 20 posts tho 😄

fervent gate
#

@eternal oxide So how do I solve that, I will need both

eternal oxide
#

do you use maven?

fervent gate
#

yes

eternal oxide
#

then depend on spigot not spigot-api

#

and run buildtools

fervent gate
#

So I just change spigotapi to spigot

#

int pom

#

in

eternal oxide
#

yes, so long as you ran buildtools to create spigot

fervent gate
#

<artifactId>spigot</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>

#

if I change that to spigot there is an error

#

@eternal oxide

eternal oxide
#

did you run buildtools?

fervent gate
#

Where is that?

eternal oxide
#

?bt

undone axleBOT
eternal oxide
#

Corrupt chunk

#

you are as bad at my wife at listening.

#

not really

#

delete the corrupt chunk

outer steeple
#

How does Bukkit.dispatchCommand("",""); work?

eternal oxide
#

issues console commands

#

it issues console commands

outer steeple
#

ok

golden turret
#

how could i do something like this

#

i would like a thread talking about that

#

specifically that movements

outer steeple
#

Why does this Bukkit.dispatchCommand("@a" ,"/scoreboard players add @s Rcd 1"); give an error?

eternal oxide
#

No idea, perhaps the error could give you a clue

outer steeple
#

'dispatchCommand(org.bukkit.command.CommandSender, java.lang.String)' in 'org.bukkit.Bukkit' cannot be applied to '(java.lang.String, java.lang.String)' i dont get it

wide flicker
eternal oxide
#

ok, what about that error do you not understand?

wide flicker
#

aka a player object or the console command sender

outer steeple
#

ohhh ok thanks

#

Jesus fanaly AFTER DAMM 5DAYS OF NON STOP TRIAL AND ERROR I FINNALY MADE MY FIRST PLUGIN. NEVER AGAIN NEVER AGAIN.

#

LATER NERDSSSS

civic apex
#

gg

outer steeple
#

ban me

quaint mantle
#

How do i reference all players in my main class? I tried Player p = (Player) Bukkit.getOnlinePlayers();

eternal oxide
#

getOnlinePlayers returns a Collection

#

not a single player

quaint mantle
#

then how do i do it?

wide flicker
quaint mantle
#

idk how to do that im new

wide flicker
#

simplest way is a for each loop

#

e.g.

List<Player> players = Bukkit.getOnlinePlayers();
for (Player player : players) {
  // do what you need to with each player here
}```
quaint mantle
#

i would like to add something to all players tho, e.g. player.setHealth(20)

wide flicker
#

so put that inside the loop

#

it'll process each player one at a time

#

Say you have 3 players online: Jeb_, Notch, and Dinnerbone. player will be the player object for Jeb_ run all the code inside the loop, then it'll be Notch and run all the code inside the loop, then Dinnerbone and run all the code inside the loop

quaint mantle
#

oh ok

golden turret
#

so i found this

#

and i want it to be vertical

#

any help pls

quaint mantle
#

Is the main plugin class supposed to be unused?

worldly ingot
#

Yes. The server loads it at runtime but its not instantiated in the plugin itself

quaint mantle
#

Oh ok the more you know

worldly ingot
worldly ingot
#

Your animation is horizontal. So if you want it vertical, switch the x and y axis around, or the z and y axis

golden turret
#

thanks

#

so i decided to increase the RAD_PER_SEC and i saw this

#

that means that even if with a small value, the circle will increase and decrease

#

i would like it static

proud basin
#

yo that’s kinda swaggy although why is the quality poo

quaint mantle
#

if a player gets X blocks away from an armor stand i spawned with packets, the armorstand will disapear
and the x is entity tracking range

copper scaffold
golden turret
mortal hare
#

change your math calculations

lusty cipher
#

would there be any issue when I have a plugin and I want to link to some site that is unavailable in China? Would it maybe be unavailable there then?

mortal hare
#

or just don't loop it

golden turret
rotund lantern
#

[Ketchop_Tutorial] Plugin Ketchop_Tutorial v0.10 has failed to register events for class me.ketchop.pog.main.Events.MobHeads because org/bukkit/event/entity/EntitySpawnEvent does not exist.

#
    public void onMobSpawn(EntitySpawnEvent e) {
        List<EntityType> types = Arrays.asList(EntityType.ZOMBIE, EntityType.SKELETON, EntityType.VILLAGER);
        if (!types.contains(e.getEntityType())) {
            return;
        }
        LivingEntity entity = (LivingEntity)e.getEntity();
        entity.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));

    }
}
#

wth

#

help?

#

it does exist like wut

solid cargo
#

how can i make my custom itemstack not placable

#

wait wrong one

#

how can i make this not placable

worldly ingot
#

Ideally you'd give it some NBT tag in the PersistentDataContainer

solid cargo
#

o k

worldly ingot
#

Can then check for it in BlockPlaceEvent and cancel as necessary

solid cargo
#

i wish this worked :(

tardy delta
#

Completely not copied

solid cargo
#

completely

worldly ingot
#

Block metadata is set on the block in the world, not the item

#

PDC is similar to ItemStack metadata, I guess. If you want to think of it like that

#

Difference being that it's not. lol

solid cargo
#

aight

#

how can i correctly set the version of an nms thing

#

the red colored thing

worldly ingot
#

Use the PDC. We have API for this now

spare marsh
#

If you set some PDC data to an item stack which is an instance of a placable block the place it down and get it back later will@it still contain the same pdc?

worldly ingot
#

No

spare marsh
#

So then how to pass it on to the@block?

worldly ingot
#

You'd have to hold reference to that block and when broken, edit the item that's dropped

#

Save it to disk if necessary

#

I believe Chunk also implements PersistentDataHolder now so that's also an option. Can write the block to the chunk itself

spare marsh
#

But blocks also have pdc don’t they?

worldly ingot
#

Tile entities do

#

Regular blocks do not

worldly ingot
#

Would definitely avoid implementing PDH

#

Oh, PDC even. That's worse. Heh

#

Especially because there's literally zero reason to

spare marsh
#

So you’re that once a certain item is placed, if it has Pdc with values I need, to store the data of that block somewhere and once it is dropped, to apply pdc back into it?

#

Of that item*

golden turret
spare marsh
#

Like on Block placed event?

worldly ingot
#

Whoever wrote that, please inform them to not implement that interface. Just write wrapper methods. The implementation there is entirely useless and can still match the class, just remove the overrides ;p

#

Yes, on a place and break event, Daniel

spare marsh
#

Sounds good thanks

worldly ingot
#

More API-friendly way to handle the dropping might be BlockDropItemEvent though

wide coyote
#

add your command to plugin.yml

alpine urchin
#

Why do I get this error each time I open my project in IntelliJ.

#
Could not find spigot-api-1.17-R0.1-SNAPSHOT.jar (org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT:20210706.122143-68).
Searched in the following locations:
    file:/home/retrooper/.m2/repository/org/spigotmc/spigot-api/1.17-R0.1-SNAPSHOT/spigot-api-1.17-R0.1-20210706.122143-68.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
#

But building the project with Gradle works.

eternal oxide
#

command not in plugin.yml

#

nope

#

you missed one or formatted it wrong

#

post full error

#

?paste

undone axleBOT
opal juniper
#

^

#

paste it

#

lol

alpine urchin
#

lol

opal juniper
#

oh - hey retrooper

alpine urchin
#

are you an expert in gradle

#

i need help with a multi module project

opal juniper
#

Their chestplate is empty slot

#

so it returns null

#

and you cant getType on null

opal juniper
#

he is

#

or dm him

#

he will help fo sure

eternal oxide
#

um did all the peoples icons just turn square from round or did I miss something?

opal juniper
#

send pic

#

Just do a null check before you do the getChestplate()

austere beacon
#

I really need help with MiniGames and Server Links

#

Please DM me

eternal oxide
opal juniper
tame coral
opal juniper
#

thats a bug

#

lol

eternal oxide
#

No idea, they just all went square

tame coral
#

css didn't load properly

opal juniper
tame coral
#

true

austere beacon
#

I really need help with MiniGames and Server Links
Please DM me

opal juniper
#

no

austere beacon
#

Payment includede

opal juniper
#

?services then

undone axleBOT
austere beacon
#

Oh right tysm 😉

opal juniper
eternal oxide
#

mines been playing up for a few days. Its been blanking out or flashing

opal juniper
#

🤔 do you use canary?

#

or just regular

eternal oxide
#

Now I have everythign square. looks wierd

#

regular

opal juniper
#

maybe just uninstall & reinstall or repair it or summin

eternal oxide
#

maybe

opal juniper
#

its a method under InventoryView iirc

#

the get title

#

so InventoryClickEvent#getView#getTitle

eternal oxide
#

yep it was moved a while back to the view

opal juniper
#

what api version - are you devving against

#

what server version

#

there is your issue

#

yep it was moved a while back to the view

#

yes

eternal oxide
#

best to not check titles though

#

compare by instance

opal juniper
#

Ok, So if i have a List<Node> objects (where node is a custom object) and i do .contains(otherNode) what method is used to check? is it .equals? or is there another i have to override

eternal oxide
#

it will use equals, but hash may also be used

opal juniper
#

ok - ill override hashCode as well then

#

thanks

slow topaz
#

I have a question..
I save player inventory to database...
{id:"minecraft:efficiency",lvl:2s}
but when I try to parse it with javascript it gives an error because of lvl:2s since there needs to be lvl:2

#

it here a way to keep integer only ?

fickle helm
#

from my testing it appears to return true even if the one of the entities is facing away from it

quaint mantle
#
[18:34:09 ERROR]: Could not load 'plugins\HeroRushPlugin.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml

Everything is correct in my plugin.yml im sure

name: HeroRushPlugin
version: '${version}'
main: net.higherlight.herorushplugin.HeroRushPlugin
api-version: 1.17
authors: [ HigherLight ]
description: Heros collect ritual torches in order to perform dark ritual which will defeat Herobrine.
eternal oxide
#

that can;t be all your yml

quaint mantle
#

wym

eternal oxide
#

didn;t you have commands?

quaint mantle
#

its a new plugin

#

im using gradle this time not so sure how to build the plugin but i made a new artifact that builds all modules. Maybe it's not including the plugin.yml?

worldly ingot
#

e.g. how a zombie can still see you after you turn a corner

fickle helm
#

that would line up with the behavior I'm seeing. thanks

cinder plume
#

What's the issue with this?
Even tho it says this code works pretty fine.
Any idea?

wide coyote
#

full log and code please

#

?paste

undone axleBOT
cinder plume
#

the code is pretty big so wait ill just send the log

eternal oxide
#

the full error is enough

cinder plume
eternal oxide
#

mobkillcounter.java:28

young knoll
#

Something is null on that line

cinder plume
#

i will check.

#

wait a second

#

this is line 28

#

will this fix

eternal oxide
#

check there is a killer first, then check they have a display name

cinder plume
#

oaky

#

that should solve this right?

young knoll
#

No

cinder plume
#

?

young knoll
#

That’ll still throw an exception

young knoll
#

Yes

cinder plume
#

hmm

#

why so

young knoll
#

Because checking if things are null prevents null pointer exceptions

mortal hare
#

does any of you understand why bukkit CommandMap implementation, SimpleCommandMap, register is synchronized method while getCommand method is not.

#

wouldnt that lead to visibility problems?

#
    private synchronized boolean register(@NotNull String label, @NotNull Command command, boolean isAlias, @NotNull String fallbackPrefix) {
        this.knownCommands.put(fallbackPrefix + ":" + label, command);
        if ((command instanceof BukkitCommand || isAlias) && this.knownCommands.containsKey(label)) {
            return false;
        } else {
            boolean registered = true;
            Command conflict = (Command)this.knownCommands.get(label);
            if (conflict != null && conflict.getLabel().equals(label)) {
                return false;
            } else {
                if (!isAlias) {
                    command.setLabel(label);
                }

                this.knownCommands.put(label, command);
                return registered;
            }
        }
    }
#
    @Nullable
    public Command getCommand(@NotNull String name) {
        Command target = (Command)this.knownCommands.get(name.toLowerCase(Locale.ENGLISH));
        return target;
    }
mortal hare
#

afaik synchronized flushes its CPU L1-L3 thread cache to RAM, thus the main thread should see changes via getCommand(@NotNull String name) even if its not synchronized, right?

quaint mantle
#

Hi everyone I need an developer that can help the server from me if there are problems to fix it and also add plugings. Dm me if u want.

trim creek
#

You seriously are sending this to every text channel?

quaint mantle
#

Ye

#

Bc I really need one

#

so don’t judge

eternal oxide
#

?services

undone axleBOT
trim creek
#

Very well then

#

Even with the fact I do not have good feelings, let it be.

mortal hare
#

i hate multithreading ngl

#

im just trying to reverse engineer a bit

#

for fun (fact: its not fun)

solid cargo
#

what damage cause does ender pearl count as?

young knoll
#

Sysout to test

#

I imagine fall

azure nova
#

guys how do i wait for the player response?

for like: i created a GUI, in whcih when player clicks on a item, he is supposed to send a message in chat, which should not be broadcasted to the entire server and i want to take the input of his message.

If i even get ways of how do it, that would be helpful, i dont even know what to use to make that...pls helP!

young knoll
#

You can just add the uuid to a set and then intercept the next chat event

teal wagon
#

use the conversation api

azure nova
#

ohhh thank you guys

#

i will now see

muted sand
#

Is it a stupid idea to run an async task that retrives stats from a database every 20 ticks? will this cause any major server lag?

eternal oxide
#

depends on the database

mortal hare
#

well its stupid for me

eternal oxide
#

20 ticks = 1 second

trim creek
#

I think it is too stupid

mortal hare
#

i would store values in memory instead, in that case

opal juniper
#

async so not really any lag but every second is quite a lot - why not store in memory and purge to file?

trim creek
#

It is not basically able to load 1000+ variables (/datas) per second

muted sand
mortal hare
#

are you getting some kind of chat history or what

eternal oxide
#

you definitely don;t need to poll anything every second for discord

muted sand
muted sand
mortal hare
#

what about fetching chat history whenever you really need it?

muted sand
#

how am I supposed to check if I need this data now or later though.

mortal hare
#

also isnt logging chat kinda illegal in tos?

muted sand
#

oh wait nvm

mortal hare
#

well its not for me to talk about tos im using LightCord lol

muted sand
worldly ingot
muted sand
#
  • no one talks about how discord might log their own messages 🍭
worldly ingot
#

I mean it has to

mortal hare
#

im using lightcord just to disable its telemetry

#

discord records everything

worldly ingot
#

Otherwise I wouldn't be able to Ctrl + F for the first ever message sent in this channel

mortal hare
#

even things they dont need

#

just for data marketing

trim creek
muted sand
#

true & true

waxen plinth
#

"log their own messages" what

#

Are you seriously acting like storing messages is some sort of privacy invasion

#

It is literally necessary to the service

muted sand
#

so, thanks!
i'll just increase my polling time as 1second seems far too much

trim creek
#

2 seconds is still a low amount of time.

mortal hare
#

i still don't seem to think why don't you do query whenever you invoke the method or some sorts, there should be some kind of entry point to this usage

trim creek
#

You should set it to at least 10 seconds.

muted sand
#

i was thinking more of 60, but idk

trim creek
#

Or if you are sending too many datas/variables, you will need at least 1, or more minutes.

muted sand
#

oh

ivory sleet
#

What type of data is it?

mortal hare
#

logs

muted sand
#

message content

trim creek
#

For example: one of my project's has like 300 datas in it. It needs at least 5 seconds for me to send them all along the services.

muted sand
#

i am not literally logging my messages to the spigot server

waxen plinth
#

Wait why do you need to log anything at all here

#

Just listen for the event

trim creek
#

But since I changed host, the amount is way more shooter, and is able to send them in under 3 or 1 second.

waxen plinth
#

I read your initial use case, you're just trying to prompt the user to respond to something in chat, right?

ivory sleet
#

Theoretically you could save everytime someone sends a message just do it asynchronously.

muted sand
#

async would be fine if it was a short period right?

ivory sleet
#

Wym?

#

I presume you wanna save messages into a database, right?

trim creek
#

Syncing is not good with low amount of time.

muted sand
#

no

#

ah

trim creek
#

Wait.

#

You want to send a message in every other server?

#

'cuz it is basically not that easy but be ready

#

Wishin' thy best

muted sand
#

. . .
like discordSrv plugin, but more scuffed-

#
  • i do all my discord stuff in python, so i need a way to link them together, hence mongodb
trim creek
#

Isn't a MySQL better for that?

ivory sleet
#

Mongo works fine

trim creek
#

Then forget what I asked

#

🤣

#

It was never thee

#

It was asked by someone who is copying me. 😆

muted sand
#

mysql, idk how to use it 🍭

azure nova
muted sand
#

but anywhos, thank you!

mortal hare
muted sand
#

also is there a way i can somehow create my own event?
ie, an op event when someone got opped

trim creek
#

Check it in every ticks. 😆

muted sand
#

walp
also found the forum for this

trim creek
#

And set a variable to stop the event repeating itself.

azure nova
opal juniper
#

@ivory sleet did retrooper message you about gradle?

ivory sleet
#

Or well he sent conc

opal juniper
#

he may have fixed it then

#

he asked if i knew gradle which was a "no" lol

ivory sleet
#

Hehe

#

Maven user

mortal hare
#

me seeing thread unsafe code

#

failed gif

#

ok

opal juniper
#

i have no need for gradle

#

hence i am in no hurry to learn

ivory sleet
#

Ollie learning gradle 2030??

opal juniper
#

should make it a mission

#

never learn gradle

#

lol

ivory sleet
opal juniper
#

i tried once

#

but it was kinda a lot harder

#

so i left it

ivory sleet
#

Sadge

opal juniper
#

but hey

#

im sure it isnt that bad

#

just need to learn it first

#

i hate how many files it generates tho

ivory sleet
opal juniper
ivory sleet
vestal moat
#

wtf

#

size limit

#

this is the size of my plugin

#

wtf

#

its just 6mb

stone sinew
#

max you can post is 4mb

vestal moat
#

no i just shaded okhttp

#

its 3mb alone

#

so what do i do i cant just break my plugin bc spigot got a small limit

#

limit should be like 10mb

stone sinew
#

Depend on it rather then shade it

quaint mantle
#

or use the plugin.yml dependency thing

vestal moat
#

i dont want to add external site

#

i want my plugin on aternos for those users

young knoll
#

No one said anything about an external site

mortal hare
#

anyone would like to help me with synchronization of an object?

young knoll
#

Unless aternos blocks the new dependency system XD

quaint mantle
#

sounds like something aternos would do tbh

vestal moat
#

new?

#

never, my plugin must support 1.8->1.17+

#

there must be a way

young knoll
#

Legacy Support moment

vestal moat
#

wait how is discordsrv still on aternos if its external link now

mortal hare
#

lets say i have a map inside MapHolder.java:

public class MapHolder {
  public Map<String, Object> map = new HashMap<>();

  public synchronized void setMap() {

  }
}

and another class MapAccessor.java:

public class MapAccessor {
  public MapHolder holder;

  public MapAccessor(MapHolder holder) {
    this.holder = holder;
  }

  public Object accessValue(String key) {
    synchronized(this.holder) {
      //...
    }
  }
}

will these synchronized thread locks would "communicate" even if they're in different classes, but having the same instances as monitors?

#

will accessValue method be thread blocked until setMap() initializes?

#

cmon where are the experts

#

at this i really need some help this time

eternal oxide
#

no because they are sync on different objects

mortal hare
#

let say MapHolder instance and MapHolder instance in MapAccessor are the same

eternal oxide
#

you are using a method level sync on the setMap

#

and an object sync on the holder

mortal hare
#

isnt synchronized keyword is just synchronized(this) syntax sugar

eternal oxide
#

no

#

its syncs on an object

#

like two threads could enter accessValue and one would lock, however any thread could call setMap (if it has access)

#

as its a method sync anything that has access to the object coudl call it, one at a time

azure nova
#

I have a small problem, I logged in my server with 2 accounts, one of the account has operator, and another doesn't, and now I realized that I am not able to run commands with non op account....what do I do??

opal juniper
#

go back to the other acc

eternal oxide
#

but it would not be restricted by the accessValue as its already passed through that and got a reference

mortal hare
#

but synchronized method uses its own class instance to lock on

#

so it should be technically possible to make them interchange

alpine urchin
#

thanks my son

#

🙏

opal juniper
mortal hare
#

Synchronized method locks the entire object. Synchronized block just locks the code within the block.

eternal oxide
mortal hare
#

wdym by outer object

eternal oxide
#

your accessValue

mortal hare
#

but synchronized block inside another class is using the same instance as MapHolder instance class

eternal oxide
#

why do you not just use a SynchronizedHashMap? or TreeMap?

mortal hare
#

because its beautiful NMS

eternal oxide
#

oh

mortal hare
#

eh fuck it ill do my own test class to see if that's the case

ivory sleet
#

sychronized 🥴

crude hound
#

hello can you help me to replace my mapping, when I want to use an nms function it is always a,b,c etc... so how can I do (im in 1.17.1)

stone sinew
crude hound
#

yeah but im on it from yesterday and I didn't found so I request help here

winged ridge
#

Hello I would like to save a GUI inventory to a json, I already made so the inventory gets saved to a List with inventory.getContents() then save the List data to a .json file. This works but in the json this is what I find [[Lorg.bukkit.inventory.ItemStack;@1947a941], and I can't seem to restore that to an inventory. What should I save to the json? and how can I restore what I saved?

young knoll
#

Save each itemstack

crude hound
#

uh no I found (I said nothing lol)

mortal hare
#

iirc

young knoll
#

Ah json not yaml

pallid ferry
#

can i ask about plugins here?

mortal hare
#

yes

winged ridge
#

IMO I find json easier to use, I always have issues with yaml

mortal hare
#

well yaml kinda built of json,

#

but yeah i would prefer json too

pallid ferry
#

do any of yall know how to sync ultra permissions with nametagedits?

winged ridge
mortal hare
#

how would you iterate the itemstacks besides that

young knoll
#

You probably need to run them through base64 or something of the sort

#

No idea what the api has internally for serializing itemstacks

winged ridge
#

something like for(ItemStack item : inventory.???) but idk how to get each itemstack

young knoll
#

getContents

#

Watch out for null

winged ridge
#

if item!=null

worldly ingot
#

Worth noting that Inventory itself is Iterable

young knoll
#

Is it? cool

worldly ingot
#

for (ItemStack item : inventory)

#

Works as well

winged ridge
#

oh

mortal hare
#

itemstacks has implementation of ConfigurationSerializable

#

that way you can return Map of serialized objects and store it

winged ridge
#

so wait for each item that is not null inside inventory, I add it to the List?

mortal hare
#

whenever you would like to deserialize it you'll get that map from the file and use deserialize method

mortal hare
# eternal oxide yes, but not the outer object

my test is very dumb but i don't have time for proper test class, but this test shows that synchronized blocks and synchronized functions communicate with each other whenever lock object is the same

#

it is syntax sugar after all

#
import java.lang.Thread;

public class TestClass {

    public static void main(String []args){
        ObjectHolder holder = new ObjectHolder();
        ObjectAccessor accessor = new ObjectAccessor(holder);
        new Thread(() -> {
            holder.set();
        }).start();
        for (int i = 0; i < 9999; i++) {
            accessor.accessValue();
        }
    }
}

class ObjectHolder {
    public String value = "String havent been changed yet!";

    public synchronized void set() {
        try {
            System.out.println("Changing the value...");
            Thread.sleep(4000);
            this.value = "Value via accessor print";
        } catch (Exception e) {

        }
    }

}

class ObjectAccessor {
    public ObjectHolder holder;

    public ObjectAccessor(ObjectHolder holder) {
        this.holder = holder;
    }

    public void accessValue() {
        synchronized(this.holder) {
            System.out.println(this.holder.value);
        }
    }
}
shadow tide
#

I can't find a good, well, anything to find how to make a maven plugin. I added the spigot api and the repository to the pom.xml but when I do implements JavaPlugin to the main class, it doesn't exist

undone axleBOT
mortal hare
#

access value waits for lock of synchronized method instance lock to finish doing set() function

#

output:

...
String havent been changed yet!
Changing the value...
Value via accessor print
Value via accessor print
...
#

i've never written such dumb code before

#

but hey it works lol

mortal hare
shadow tide
mortal hare
#

JavaPlugin implements Plugin Interface

shadow tide
#

omfg lol

#

im dumb

#

just a little brainfart

#

wait

#

its still not working JavaPlugin cannot be resolved to a type lol

mortal hare
#

have you added spigot-api to maven pom.xml?

mortal hare
#

Intellij?

shadow tide
#

Eclipse

mortal hare
#

Have you tried reloading maven project?

#

in intellij context menu there's reload maven project button

#

it resolves dependencies then

shadow tide
#

I friggin didn't save my pom.xml 🤦‍♂️

mortal hare
#

you're tired

#

happens

shadow tide
#

I am brand new to maven as you can see, so where to I put my plugin.yml?

#

src/main/java?

young knoll
#

src/main/resources

mortal hare
#

src/main/resources

shadow tide
#

oh

mortal hare
#

i suggest you using intellij

shadow tide
#

y

mortal hare
#

it makes you not blind

#

during long hours

shadow tide
#

I am not blind

mortal hare
#

i mean light theme

#

it does have dark theme but its meh

shadow tide
#

I use darkes dark theme and its not meh

#

its actually really good

mortal hare
#

and intellij autocompletes plugin.yml for you

#

kinda

#

it provides you default keys of yaml values of plugin.yml

#

shows code smells

#

etc

shadow tide
#

I don't want to use intellij, I learned to code java with eclipse, i'm not switching and thats final

mortal hare
#

that's my personality regarding Sublime Text lol

shadow tide
#

lol

#

I agree

mortal hare
#

I don't want to use VSCode, I learned to use ST and im not switching, that's final

#

also vscode is SLOW

#

the only cons of ST4 is that it does have worse version control support

shadow tide
#

I used Sublime Text before I switched to vscode but I agree ST is really good, but I only used sublime text for a month so its not my personal choice

mortal hare
#

and annoying popups of free version

shadow tide
#

vscode 100% free just saying

mortal hare
#

but look how much ram does it eat up

shadow tide
#

open-source I believe too

mortal hare
#

its fricking electron app

shadow tide
#

not much

azure nova
#

is there a way to get a player object with just the player username string?

mortal hare
#

its basically chromium without the tabs.

#

if it was native win32 application, i would love to use VSCode and i would ditch ST away, but whenever i use VSCode i feel some kind of slight input lag while typing

#

while in ST4 its fluent

shadow tide
#

bruh

shadow tide
#

player#getName();

mortal hare
#

30 mb Sublime with opened files

shadow tide
#

cool

#

I was never trying to argue using vscode anyway 😆

young knoll
mortal hare
shadow tide
#

ooooh thats what he meant lol

shadow tide
mortal hare
#

i used offline player as an arg everywhere

shadow tide
#

bbbbb

mortal hare
#

without knowing it fetches the data from the net

#

lol

shadow tide
#

rrrrr

#

uuuuu

#

hhhhh

young knoll
#

Only the string version

mortal hare
#

I literally got so much bullied for using skript from my colleagues as my main scripting language that i've challenged myself to learn java lol

azure nova
#

ty @young knoll @mortal hare

shadow tide
#

I just figured out what skript was and if I was one of your colleagues no offence I'd be the one that is laughing the loudest

shadow tide
#

lol

mortal hare
#

i was so good at it that i've managed to beat some plugins on the market in terms of performance

#

i remember i skripted chunk collector skript that performed roughly 80% faster than native java plugin lmfao

#

and had a nicer gui

#

tbh i used java a bit

#

there was a addon for skript called skript-mirror if im correct

#

it would allow you to hook into java plugins

#

via skript

young knoll
#

How does one beat native java with an interpreted lang

mortal hare
#

idk

#

it was badly written

#

i've got so much lag out of it

vestal moat
#

I am lucky i had option to decrease my plugin jar but idk what other users can do now

young knoll
#

Avoid shading huge libraries

#

minimize may be a good option

vestal moat
#

Yes but some libs are requires for some plugins

#

Required*

young knoll
#

hence minimize

shadow tide
vestal moat
#

This is not development, this is just skript hmm

shadow tide
#

I know

mortal hare
shadow tide
#

so what

#

its still not code

mortal hare
#
import:
    java.lang.String
    java.lang.StringBuilder
 
expression convert minecraft font %string% to unicode font:
    get:
        set {_unicodefont::*} to ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") split at ""
        set {_minecraftfont::*} to ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") split at ""
 
        set {_minecraftstring::*} to expression-1 split at ""
        set {_minecraftstringsize} to size of {_minecraftstring::*}
        remove {_minecraftstring::%{_minecraftstringsize}%} from {_minecraftstring::*}
        loop {_minecraftstring::*}:
            if {_minecraftfont::*} doesn't contain loop-value-1:
                add loop-value-1 to {_converted::*}
                continue
            loop {_minecraftfont::*}:
                if loop-value-2.equals(loop-value-1):
                    set {_order} to loop-index-2 parsed as number
                    add {_unicodefont::%{_order}%} to {_converted::*}
                    continue
        set {_unicodestring} to new StringBuilder()
        loop {_converted::*}:
            {_unicodestring}.append(loop-value-1)
        return {_unicodestring}

this is an example of unicode converter i've made earlier

#

via skript-mirror

shadow tide
#

that still doesn't look like code

vestal moat
#

Why not use java instead of skript

mortal hare
#

i do use it right now

#

it was a long time ago

shadow tide
#

maybe on racket level

young knoll
#

indexof would be great here

shadow tide
#

you know what racket is, right?

#

no?

#

just me?

#

k.

mortal hare
#

this was written in 2019 iirc

#

in early 2020's i switched to java

#

and here i am now looking at NMS and frustratingly trying to hook it to my code thread safe lol

young knoll
#

I wonder if skript was around when I started

mortal hare
#

skript was made i think in 2014 iirc

young knoll
#

2012

mortal hare
#

i basically abused shit out of it

#

it was made only for simple commands

quaint mantle
#

imagine not writing all your plugins in x86 assembly

mortal hare
#

i made factions copies lol

quaint mantle
#

smh

young knoll
#

So yes it was around when I started

mortal hare
#

i had a 3k line skript which was complete replica of factions plugin

#

OOP isnt a thing in skript

golden turret
mortal hare
#

so imagine the spaghetti

#

there

golden turret
#

basically he tells his opinion about skrpit

young knoll
#

Skript is probably fine for commands

#

But there are other plugins for that now

mortal hare
#

i think skript is fine, for simple commands

#

i would still prefer skript over for example mycommand or deluxecommands due to the flexibility of it

#

if i didnt had any coding experience

silent vigil
#

How do I interact with worldguard regions in myplugin?

quaint mantle
#

yeah but for anything more than super basic stuff in a very small-scale environment skript is no good

#

its inefficient and generally just a terrible idea for anything other than like a basic command in a server with a few friends

mortal hare
#

yea i get it, its due to the way it interprets its slower than native java, but the performance is not that noticeable, at least at my end when I was skripting back then. I've ran a server with constant 150 player base, and i have no issues with skripts at all, but yeah java is way more better.

azure nova
mortal hare
#

it was inefficient af before, now its more optimised with newer builds

ivory sleet
#

Skript runs using Java so it must be as fast as Java 🤡

alpine urchin
#

Skript extends Java

golden turret
#

it is a

#

java

#

skript

mortal hare
#

javaskript

quaint mantle
mortal hare
#

it should have its own ECMAkript standards

#

get it? 😄

quaint mantle
#

java as a whole is a performance nightmare but an interpreted language written in java is so much worse

#

I wish notch had just used c++

ivory sleet
#

Java is nice

young knoll
#

Java isn't even that bad

mortal hare
#

if it was compiled language there wouldnt be mods that powerful enough

ivory sleet
#

The performance is inevitably worse however we got garbage collection in return

quaint mantle
#

compared with a language like c++ that gives you low-level control among many other things java is very slow

mortal hare
young knoll
#

A lot of the performance problems comes from jank code, not java itself

quaint mantle
#

java itself has an inherent overhead because of jvm

quaint mantle
ivory sleet
#

Anyways Java is providing new features like the new incubator api allowing us to interface with low level stuff.

quaint mantle
#

maybe but c++ will always be more efficient and give more control to the programmer

#

BUT

vivid cave
#

CUTE PFP CONCLURE

ivory sleet
#

Sure it gives control but the cost is that we have to concretely, manually do a lot of stuff for ourselves which take time

ivory sleet
quaint mantle
#

cpp requires waaaaay more skill and knowledge to use effectively and Java much less of a learning curve and some nice features

ivory sleet
#

Yeah

quaint mantle
#

and no boilerplate code or any stuff like that

ivory sleet
#

Though I love cpp cus vararg templates lol

mortal hare
quaint mantle
#

cant imagine what a leaky nightmare new devs' plugins would look like if they had to write them in c++ lmao

quaint mantle
#

doesnt require assembly knowledge

mortal hare
quaint mantle
#

windows uses the concept of a dynamically linkable library for example that could be used as a plugin

mortal hare
#

what if no api was provided

#

by mojang

quaint mantle
#

no java api was provided by mojang, but bukkit still happened

#

lol

mortal hare
#

due to high level decompilation

#

it happened

quaint mantle
#

yes

mortal hare
#

it not as if they written the server from scratch

quaint mantle
#

people have already written functional minecraft servers in c

mortal hare
#

that's just makes things harder to manage

quaint mantle
young knoll
#

I'm pretty sure people have written functional minecraft servers in everything

quaint mantle
#

yep

#

and btw

mortal hare
#

to have it analyse the game without knowing its source code properly

quaint mantle
#

the c implementation can use java libraries lol

#

just uses JNI for compatibility

#

and u could also implement a plugin system into the server software itself with an interpreter for something like lua

#

like basinserver did

mortal hare
#

but imagine updating your modded server software every time a new version releases

quaint mantle
#

Low memory footprint (13 MB for a 400-chunk spawn and one player on a 64-bit system) and you gotta admit thats pretty incredible

mortal hare
#

without any tools like Fernflower

young knoll
quaint mantle
#

thats why it would have to become more of a community situation lol

quaint mantle
mortal hare
quaint mantle
#

but auto updates on critical backend stuff (eg server jar) is a bad idea

young knoll
#

IL2CPP

#

Think that only works with stuff that was originally converted from C#

#

No idea

mortal hare
#

yeah that's unity compiler from c# to cpp

quaint mantle
#

C# also runs much slower than c++ afaik

mortal hare
#

because its interpreted

#

but tbh Java is only slighter slower than C due to JIT.

young knoll
#

Since when is C# interpreted

#

It's JIT like java isn't it

mortal hare
#

it isnt??

quaint mantle
#

its JIT

#

not interpreted

young knoll
#

^

mortal hare
#

well Java does have both interpreter and JIT

young knoll
#

C# is compiled to IL (Intermediate Language) which is later JIT'ed (just-in-timed) at runtime into instructions which are specific to the processor

quaint mantle
young knoll
#

Where is that chart

quaint mantle
#

a relatively new dev will write much more efficient java than c

mortal hare
#

just like Assembly can be WAY faster than C

young knoll
quaint mantle
#

wait holy shit since when is rust so fast

mortal hare
#

i knew it

#

python is worse in terms of performance than js

quaint mantle
#

yeah but like

mortal hare
#

i felt it somehow

quaint mantle
#

i wouldnt really want to use any other lang than python for API dev for example

#

even tho im not rly a python dev

mortal hare
#

i dont get the hype behind python tho

young knoll
#

I think it's all the libraries

mortal hare
#

i don't like it, maybe i should try it more

young knoll
#

Slap out a data analysis program in like 50 lines

quaint mantle
#

python is great for short stuff, apis, data science, among other things

#

best quick scripting language that can do anything

#

and u can learn the whole lang in like 30 mins

mortal hare
#

for some reason i like PHP, it feels strong typed,

cold pawn
#

I'm trying to make a custom chat plugin for my roleplay server. It's gonna have things like roleplay chat, global chat, and kingdom chat. What's the best way to do this and still have to code looking organized and expandable? Any references would be appreciated!

mortal hare
#

it feels like C sometimes

#

but without memory addresses and such things

#

although im not into web dev

tacit drift
quaint mantle
eternal oxide
#

not really

tacit drift
#

pretty much it was

eternal oxide
#

bukkit was created, THEN they were hired by Mojang

quaint mantle
#

pretty much is very different from yes lmao

tacit drift
#

Dinnerbone was hired later??

young knoll
#

Yes

tacit drift
#

oh

young knoll
#

Same thing happened with the Aether mod

mortal hare
#

yeah dinnerbone was hired after the bukkit iirc

young knoll
#

Dinnerbone from bukkit,
kingbdogz from aether,
slicedlime from youtube

#

Imagine a world where Minecraft used Swedish for all its internal stuff

ivory sleet
#

😌

young knoll
#

/give @p minecraft:krut 1

ivory sleet
worldly ingot
#

There are a few former Forge maintainers in there too

#

Fry for instance was hired by Mojang

torn shuttle
#

what's up default dancers

#

you know what would be really cool? an enum saying why the player item damage event got triggered

young knoll
#

A lot of things would be cool :p

#

But PRs are hard and scary

torn shuttle
#

ain't that the truth

sullen marlin
#

Isn’t that the cause?

torn shuttle
#

it says as a result of being used, could be block break or entity damage right

young knoll
#

The PlayerItemDamageEvent doesn't have a cause

#

You can somewhat detect by the amount

torn shuttle
#

or other use

sullen marlin
#

Oh item damage

torn shuttle
#

yeah PlayerItemDamageEvent is what I'm talking about

young knoll
#

Items take 2 damage for the wrong use

torn shuttle
#

Axe:
-1 for breaking any block
-1 for chopping wood
-1 for stripping wood
-2 for hitting a mob

young knoll
#

I thought they changed axes since they are a weapon now

torn shuttle
#

just to name a few "uses"

#

uh

#

Axes, pickaxes, and shovels:

Breaking a block that breaks instantly counts as 0 uses.
Breaking other blocks counts as 1 use.
Paving dirt or a grass block using a shovel to make a dirt path counts as 1 use.
Using an axe on a log or wood to strip it counts as 1 use.
Hitting a mob (hostile, neutral or passive) counts as 2 uses.

#

I mean if the wikis are right it should be like this

young knoll
#

I swear using an axe on stone is also 2 damage

#

Maybe

torn shuttle
#

I don't really need it to be as granular as telling me every possible use because there's quite a few but distinguishing between block damage, entity damage and other damage would be 💯

young knoll
#

I mean you could hack in a way to detect it

torn shuttle
#

yeah I am aware

young knoll
#

See which event was called last for that player

torn shuttle
#

I might have no choice here, still thinking about my options as I wait for that second cup of coffee to kick in

young knoll
#

PR

torn shuttle
#

this might be a 3 cups of coffee issue

young knoll
#

I have one bit of NMS in my plugin and it makes me sad

torn shuttle
#

I have no nms on my 50k line project and everything is sunshine and unicorn farts

young knoll
#

Cries in

if (!((CraftBlockData) material.createBlockData()).getState().canPlace(((CraftWorld) target.getWorld()).getHandle(), new BlockPosition(target.getX(), target.getY(), target.getZ())))
                return;
#

And yes it is ugly

torn shuttle
#

if I could assume that the event goes unmodified tbh I could guesstimate the type of damage based on how much damage was dealt

#

but that's a really fun hack that for sure is going to come back to bite me in the ass

young knoll
#

I would just use the last event triggered

torn shuttle
#

block break event vs entity damage by entity event with a player filter?

young knoll
#

I assume the durability event comes after entitydamage and blockbreak

torn shuttle
#

when you assume you make an assuredly good bit of code is what my grandma always used to say

young knoll
#

¯_(ツ)_/¯

#

Blah, to release now or to procrastinate by adding more features

torn shuttle
#

I am the world's leading expert on the latter

#

my highscore is 1 year and 1 day of continuous intensive work on my plugin with no public releases

#

and I think 50 something dev releases

young knoll
#

Honestly I just don't want to write the resource page

torn shuttle
#

correction, 45 dev releases

young knoll
#

A nice little site like the quark mod would be cool, but that requires money

torn shuttle
#

I even procrastinate on dev releases, half of them have changelogs so long they go beyond the discord character limit

#

ok well I realistically only ever need to know if the damage is coming from damaging another living entity so I'll just scan for that based on my own internal damage detection, which is the specific case I want to account for

#

it's a 2 cup of coffee problem after all

#

ah but this will trigger multiple times possibly in the same tick for the same player

#

actually certainly in the same tick

crude sleet
#

How can i disable the recipe book? I already try to cancel the PacketPlayInRecipeSettings but i doesn't work

young knoll
#

Hmm

#

You could remove all recipes from the player so it's empty

torn shuttle
#

oh no I'm becoming twitter

young knoll
#

Make it final and use UPPER~CASE

quaint mantle
#

and add a diamond operator

crude sleet
quaint mantle
torn shuttle
#

every time you tell me how to do it I will make it worse

ivory sleet
#

at least not transient and volatile

young knoll
#

Not yet

torn shuttle
#

don't make me pull over and turn it into an arraylist

ivory sleet
#

Oh god lol

torn shuttle
#

it is now an arraylist that keeps adding entries and has a separate hashmap that tracks how many entries it last had so if there are more entries than the last count it is valid again and should cancel the event

quaint mantle
#

why

torn shuttle
#

because I just want to see the world burn

young knoll
#

I mean

#

It's already working on that

quaint mantle
#

if i say p.sendMessage(ChatMessageType.ACTION_BAR + "§7You used §6STUN!"); in an event it rather sends it via the chat oddly like this: ACTION_BARYou used stun!

golden turret
#

Obejct[] that stores ArrayList<HashMap<Object, Boolan>> @torn shuttle

#

the world wont burn

#

it will skip to nonexistence

ivory sleet
#

Comma

quaint mantle
#

ohh 🤦

ivory sleet
#

p.spigot().sendMessage(ChatMessageType.ACTION_BAR,...); iirc

quaint mantle
#

uhh it gives this error

ivory sleet
#

new BaseComponent(...)

quaint mantle
young knoll
#

Specifically you probably want a TextComponent

quaint mantle
ivory sleet
#

Coll will help u im headin to bed

wide flicker
spare mason
#

how i can do a countdown that start when I put a command

quaint mantle
civic apex
#

how does choicemap work? for shaped recipes

young knoll
civic apex
#

i wrote a simple string to textcomponent parser

#

if you are interested

quaint mantle
quaint mantle
civic apex
young knoll
#

You still need the rest

#

With the .spigot and whatnot

quaint mantle
#

oh ok

civic apex
young knoll
#

What do you need to do with it

#

It’s a map of char to recipe choice

civic apex
#

what is a recipe choice?

#

and is the char the one on the recipe shape?

civic apex
young knoll
#

Yes

#

Recipe choice can be several things, the most basic is just a material

civic apex
#

how do stuff like different wood chests, inversed shears, axes and hoes work?

quaint mantle
young knoll
#

ChatMessageType should be outside the text component

quaint mantle
#

Oh ok thx

young knoll
quaint mantle
#

§§§§?

civic apex
#

wont show up in minecraft

young knoll
#

It will

young knoll
#

But you can’t use them with components

civic apex
#

since when?

young knoll
#

You need to use TextComponent.fromLegacyText

quaint mantle
#

shoot

young knoll
#

It’s used as the color character

civic apex
#

but the char itself wont show right?