#help-development

1 messages · Page 1957 of 1

tender shard
#

I don't like optionals

#

why can't I do get() and it returns null when it's not there

quaint mantle
#

hey, so I have managed to get a working persistent data storage system using .json's but whenever it tries to save to the file i get this error

#

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72) ~[server.jar:git-Spigot-21fe707-741a1bd]

tender shard
#

there's a reason why stacktraces normally have more than one line 😛

#

so

#

send the full error pls

vocal cloud
#

?paste it

undone axleBOT
quaint mantle
#

it is literally just a repeat of that line

tender shard
#

still not the full error

quaint mantle
#

or maybe not it's so long the console won't even show the whole thing

vocal cloud
#

then use the log file

tender shard
#

the actual error message would start with something like "Uncaught exception ..."

quaint mantle
young knoll
tender shard
#

( i know, the reason is that there COULD be something present which is null, I just think it's weird nonetheless 😄 )

quaint mantle
#

full error

#

used logs

opal juniper
#

StackOverflowError

#

show code

#

are you using an event listener

quaint mantle
opal juniper
#

v1_8_R3

#

not supported

tender shard
#

you caused an infinite loop

opal juniper
#

he is probs doing the thing he is listening for tbh

tender shard
#

yeah probably

#

like spawning an entity in entityspawnevent

opal juniper
#

🙈

tardy delta
#

if you spawn an entity with api, is an entityspawn event called?

opal juniper
#

believe so

tardy delta
#

oh

opal juniper
#

i mean, why wouldnt it be

quaint mantle
#

my full class

tardy delta
#

probably because server handles the spawn

tender shard
#

OptionClickEvent

#

does that extend InventoryClickEvent?

#

it probably does

opal juniper
#

i kinda hope it does

tender shard
#

so you basically call a InventoryClickEvent in every InventoryClickEvent

#

so, at the top of your line 77

#

do

#
if(event instanceof OptionClickEvent) return;
quaint mantle
#

alright

tardy delta
#

kekw

new Runnable() {
                        public void run() {
                            p.closeInventory();
                        }
                    }```
tender shard
#

do you actually need a custom event anyway?

#

I doubt you'll need one

young knoll
opal juniper
#

it might be for an api

tender shard
#

yeah might be but even then, I wouldt make it extend InventoryClickEvent

tardy delta
#

delaying it y one tick smh thats stupid

tender shard
#

it would confuse other plugins

opal juniper
young knoll
#

The following should never be invoked by an EventHandler for InventoryClickEvent using the HumanEntity or InventoryView associated with this event:

HumanEntity.closeInventory()
HumanEntity.openInventory(Inventory)
HumanEntity.openWorkbench(Location, boolean)
HumanEntity.openEnchanting(Location, boolean)
InventoryView.close()
To invoke one of these methods, schedule a task using BukkitScheduler.runTask(Plugin, Runnable)

tardy delta
#

it doesnt extends inv click event :kekw:

young knoll
#

No one ever reads that though

tender shard
#

yeah closing an inv in an inventoryevent should ALWAYS be delayed

tardy delta
#

why too?

tender shard
#

otherwise it'll fuck other plugins listening to that event if they do stuff like if(event.getInventory() == player.getOpenInventory()) or stuff like that

young knoll
#

Because InventoryClickEvent occurs within a modification of the Inventory, not all Inventory related methods are safe to use.

#

According to the docs

tender shard
#

yeah that's what I meant

#

closing the inventory while other plugins will still get an event related to that inventory is not a good idea

neon minnow
#

How do you call another async function?

opal juniper
#

many ways

neon minnow
#

object : BukkitRunnable() {
}.runTask(plugin)

    object : BukkitRunnable() { 
    }.runTask(plugin)
opal juniper
#

use a CF

neon minnow
#

one to anotehr

opal juniper
#

or like a ForkJoinPool

neon minnow
#

dunno what those are

opal juniper
#

or just use the bukkit scheduler

#

there is a runTaskAsync in there

quaint mantle
opal juniper
#

CompletableFuture.supplyAsync(Supplier<T>)

neon minnow
#

Im trying to launch fireworks in a downwards motion starting from players y coords * 2 then for loop 6 to 1 and then slowly going down and down and it does work, but when i do it in an async function with a thread.sleep it looks funny (in which i mean it launches all the fireworks, waits for each number in the loop asyncly and w/ the thread.sleep timer) and instantly fires them one by one (i have an instantfirework function that makes one then explodes it immediately) but it does not seem to work the way in which i want it to, because rather than all launching at same time then slowly exploding one by one i want it to just explode one by one from top to bottom until it reaches the location 0

opal juniper
#

ok so i dont think stuff like that is threadsafe but i might be wrong

tender shard
#

of course you put it inside your event handler

opal juniper
#

otherwise its gonna be like runTaskTimer or something

neon minnow
opal juniper
#

what you want them to explode at different times?

neon minnow
# opal juniper what you want them to explode at different times?

maybe my explanation is bad but i want it to look a way in which it starts going from the top (location.y+20) and start going downwards, with each firework exploding at them times (i have the instantfirework function for that), but for some reason the async and thread.sleep with the loop doesnt make it look like the way i want it to where it would start going down

#

rather, it just waits... then explodes them (see gyazo) its weird, because im thinking about the logic behind it and it should work but doesnt?!"

tardy delta
#

maths ew

neon minnow
#

they literally explode at the same time wtf

#

so ugly

#

i just want it to go from top to bottom and each firework explosion wait like 10 ticks then go to the next one

#

shouldnt be that hard but looking at the gyazo video clearly it is

#

maybe im just not waiting for the instant firework function to finish

#

how can i wait for that to finish?

glossy venture
#

schedule them

tardy delta
#

maybe if you just send the code

crimson terrace
neon minnow
#

?sl

tardy delta
#

?tags

quaint mantle
opal juniper
#

So i am trying to evaluate whether you could walk to a current location safely based on the:

  1. Current location to check
  2. two previous locations
    Im not really sure to go about checking it tho. I did it before by checking the max height change over the three and then doing some logic with that, but it didnt work all the time
stiff zinc
#

Hey I need help with changing textures for specific items, this is the stick.json file { "parent": "minecraft:item/handheld", "textures": { "layer0": "minecraft:item/stick" }, "overrides": [ {"predicate": {"custom_model_data": 1000001}, "model": "item/chips/chip1"}, {"predicate": {"custom_model_data": 1000002}, "model": "item/chips/chip2"}, {"predicate": {"custom_model_data": 1000003}, "model": "item/chips/chip1"} ] }

#

And this is what I get

humble heath
#

how do you make text componatns link to another text componant

opal juniper
#

you would need to add a handler to the console logger. First work out what that logger is, then you need to add a custom ConsoleHandler iirc

worn tundra
# stiff zinc

Do you set it's model data to that which you specified there?

humble heath
stiff zinc
worn tundra
stiff zinc
#

But yeah this is what I get when I give the items with any of the custom data

worn tundra
#

Okay in that case I recommend you enable your client output console and check what it outputs while loading the pack.

#

There might be issues with the models

tardy delta
stiff zinc
#

@worn tundra it also works if I override the stick png

humble heath
#

so what do i need to put in because i want to make a simple 4 or five question quiz

stiff zinc
#

With the chip picture

#

But it doesn't work with custom models

worn tundra
#

If you use the official mc launcher, then you can enable it here:

worn tundra
#

Inside of assets/minecraft/models

tender shard
tardy delta
#

do you have a custom stick json file?

#

with the path for the actual texture file in it?

tender shard
opal juniper
#

does that duplicate every message?

#

like the publish call sysouts it

#

so if you run the plugin does everything happen twice?

#

cause you are adding a handler

#

implying that there are more than one

worn tundra
#

@stiff zinc Did you fix it or?

stiff zinc
#

Yeah thanks

#

Wrong path

#

😄

#

I'm a dumbass

opal juniper
#

ok so you can replace the sysout with your discord message send

#

yep, put your addHandler onLoad and load your plugin PreWorld, other than that nothing else you can do

#

Plugin.yml:

load: STARTUP
#

Main class:

@Override
public void onLoad() {
    // Code Here
}
#

cool 😄

manic crater
#
@EventHandler
    public void onChat(AsyncPlayerChatEvent e) {
        Player p = e.getPlayer();
        TextComponent message = new TextComponent(p.getName());
        message.setColor(ChatColor.GREEN);
        message.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT,
                new ComponentBuilder(ChatColor.GRAY + "Name: " + ChatColor.GREEN + "" + p.getName()).create()));        
    }

How can i bind this hover event to the user's name?

spare patio
#

wdym

neon minnow
#

IS THIS BAD

manic crater
#

like it wont bind it to the user's name when they talk in chat,

neon minnow
#

to use

#

OR CAN I USE IT

spare patio
#

oh

manic crater
#

So i was wondering how i can get it to bind to the user's name when they hover over it

spare patio
#

use a separate component

manic crater
#

ok but what component...

tender shard
#

YES YOU CAN USE IT

spare patio
#

oh I know what you mean dishy

manic crater
grim ice
#

is there a way to show a crafting table grid that cant be modified

#

so just view only

spare patio
#

cancel window events

manic crater
spare patio
#

that was for 2Hex

manic crater
#

o

#

lol

grim ice
tender shard
#

cancel inventoryclickevent and inventorydragevent

spare patio
#

^

grim ice
#

i know how to do that

#

but isnt there a way of sending a view only crafting grid, that isnt actually a gui open

tender shard
#

no

grim ice
#

no way of even doing it with packets?

tender shard
#

there are no "read only inventories"

#

you have to make them "readonly" by cancelling the respective events

manic crater
tender shard
#

why do you even need a crafting inventory if it's not going to be used?

grim ice
#

Alright and is there a way to show a player a crafting inventory

grim ice
#

it's a recipe book, I want it to look fancy

tender shard
#

just do Bukkit.createInventory(...., InventoryType.CRAFTING_TABLE) or however it's called?

grim ice
#

oh right

#

forgot about that

spare patio
manic crater
tender shard
manic crater
tender shard
#

ah okay

spare patio
#

kinda

tender shard
#

not sure whether setFormat or setMessage supports actual textcomponents etc

#

you'll have to try it

manic crater
#

ye ig

spare patio
#

"well you have to cancel the chat event and send the formatted message to everyone"

humble heath
#

anyone able to help me

spare patio
#

nop

#

string

quaint mantle
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

tender shard
#

but not sure if that still works for hover events etc then

#

probably not

tardy delta
#

nope

#

unless you write some sort of deserializer

spare patio
#

as I said, to add hover event to the player's username you'll have to cancel the message event and then broadcast the message by yourself

humble heath
#

i did

spare patio
#

you did what

humble heath
#

ask when i click true i want it to send another message with true or false

#

i dont want a command because i am creating a quizzing plugin for ranking up

#

if the players don't have permission to do the command can they still click it

tender shard
#

sure, it will show them "you don't have permission" when they click it

#

"clickable commands" are no different from normal ones

#

the server just sees "oh they ran command XYZ"

humble heath
#

o then i cant do what i need it to do because i dont want them to do tyhe command and just start giving them there own ranks

spare patio
#

🤦

manic crater
grim ice
#

to be ran by console?

humble heath
#

example

tardy delta
#

lemme show mine

humble heath
#

click true it sends another message with true or false and then if you click false it saends massge saying incorect

grim ice
#

related to the person clicking True

humble heath
#

yea still not exactley what i needed

quaint mantle
#

hello im working on a project and I'm not sure how to do something.
The current code has an EntityDamageByEntityEvent (To calculate and set fireball damage) and a PlayerInteractEvent (To launch fireball)
How would i add messages "You were hit by fireball from %distance away% for %damage amount% by %player%" and "Your fireball hit %count% entities for %total dmg%"
I know how to do message placeholders im just not sure how to link both of those listeners together and send a message when a player uses the fireball/takes damage from one.

eternal oxide
#

store data on teh Fireball entity when it is launched

#

?pdc or metadata

muted sand
#

how do big servers create seperate minigames?
do they just have a shit ton of plugins, and then an internal api to communicate?

spiral light
#

basically yes

#

also different servers for minigame

muted sand
#

o

signal fog
#

Whats the plugin for pvp ranks ? spigot

quaint mantle
#

yeah im using 1.8 before someone comments on it

#

i know its old asf

#

i have my reasons

eternal oxide
#

We don;t support 1.8 anymore

quaint mantle
#

"we" ?

tardy delta
#

go to the shame corner if you use 1.8

eternal oxide
#

This channel/Spigot/Everyone

quaint mantle
#

right ok

#

:/

tardy delta
#

:C

sacred mountain
#

bruh

#

lol

#

hi bursh

void mason
#

Hey

chrome beacon
#

Hi

tardy delta
#

they have oil

void mason
#

Does someone know if it’s possible to change the behavior of a block? Like making that we can place a cactus block on a netherite block and cactus can grow on it?

spare patio
#

yes

#

the server handles that

vivid cave
#

Quick question guys

can: you #do this kind of inline comment in yaml?```
#
or: do
#you have to give a whole line to it```
chrome beacon
#

Both work

vivid cave
#

oki

#

thx

void mason
#

And is it possible to stop updating or force updating a block if this block have a specific blockstate or blockdata?

chrome beacon
#

Yes

#

Now both things you've asked will be hard with just a plugin

young knoll
#

Cancel the physics event

void mason
#

Oh and how can I do it ???

young knoll
#

And potentially other events

void mason
#

Because I’m making new blocks with unused blockstates

#

And I use unused variants of tripwire to make new plants but I want to know if it’s possible to prevent their interaction with normal tripwire.

chilly haven
#

if (event.getAction() == Action.RIGHT_CLICK_AIR){
if (event.getPlayer().getInventory().getItemInHand().getType().equals(Material.COOKIE)){
if (event.getPlayer().getInventory().getItemInHand().getItemMeta().getLore().equals("hi")){
event.getPlayer().sendMessage("Yay");
}
}else{
event.getPlayer().sendMessage("This isnt a cookie");
}
}

Why this dont work?

chrome beacon
#

That will never work

grim ice
brave sparrow
#

getLore returns a list of strings, it can never be equal to a string

#

For one thing

grim ice
#

i mean it makes sense

tardy delta
#

list.equals hi ah

grim ice
#

but many people still use 1.8

young knoll
grim ice
#

tell that to owners not to devs

young knoll
#

We do

grim ice
#

its not our choice is it

young knoll
#

Sure it is

grim ice
#

u cant force an owner to change his whole server version becuz u told him to

neon minnow
#

i got my /msg command but how can i implement /r so the user doesnt have to type their name and they can automatically reply

young knoll
#

No but you can just not develop for 1.8 servers

young knoll
neon minnow
young knoll
#

You could just do a map<UUID, UUID>

grim ice
#

by learning java

neon minnow
#

Bruh stfu kid

grim ice
#

(aka what coll said)

neon minnow
#

u 12 or something

neon minnow
young knoll
#

To be fair they use Kotlin

#

We don't have a ?learnkotlin

grim ice
neon minnow
#

You are not adding anything to the conversation

grim ice
#

i mean if u learn 15 minutes of java from some yt vid

#

u will get that basic knowledge

#

wont you

grim ice
#

but then you dont get paid

#

from them

#

a ton of servers are 1.8

neon minnow
#

Blocked

grim ice
#

ok

blazing scarab
#

You are wrong

sleek pond
#

Anyone that calls other people 'kid' is sub 14

grim ice
#

so what is right

deft forum
#

can anyone help me how to acces my main files properties like getConfig()?

young knoll
#

There are plenty of not 1.8 servers to work with

brave sparrow
deft forum
#

from outside my main

neon minnow
undone axleBOT
sleek pond
brave sparrow
blazing scarab
neon minnow
grim ice
# neon minnow Blocked

I'll respect that you blocked me instead of continuing but honestly that would not make me lose anything

neon minnow
#

this guy is still talking

young knoll
#

So are you

sleek pond
young knoll
#

Anyway

neon minnow
#

instead of saying learn java, maybe add something to the conversatin

sleek pond
#

Lmao

grim ice
# blazing scarab

not sure but most of the people asking me for commissions are 1.8.8 servers

spiral light
brave sparrow
# blazing scarab

That’s not necessarily proportionate to the size of those servers though

young knoll
#

If you want to work for 1.8 servers, you should know how to handle things yourself

grim ice
#

if i stop accepting these, i will lose half of my profit

#

alr that makes sense

neon minnow
brave sparrow
#

It doesn’t matter if there’s 1000 1.18 servers and only 100 1.8 servers if the 1.8 servers pay more than half of the commissions

sleek pond
neon minnow
#

Get blocked

sleek pond
#

Lmao

grim ice
#

Wasn't there a story like that back in 2021

sleek pond
#

That's def a kid move

grim ice
young knoll
#

Same if you want to run a 1.8 server

grim ice
#

same thing happened to me last year

#

the guy just moved on after blocking most of the people here, and its not worth to make an argument

brave sparrow
blazing scarab
#

we are evil and do not support 1.8

brave sparrow
#

You don’t have to know how to do anything technical to run a server

#

You just have to have enough capital to make up for that

young knoll
#

No but you should have the resources to handle anything that goes wrong

#

You won't see hypixel coming here for help :p

brave sparrow
#

Most of the ones still running 1.8 do lol

tardy delta
#

would be fun seeing hypixel devs here

grim ice
#

since you can never memorize everything

young knoll
#

We have javadocs

#

And a fourm to search

grim ice
#

Live Chat provides better understanding

young knoll
#

I mean

#

We provide more legacy support than paper

#

They'll just tell ya to get hecked

brave sparrow
#

If you need that much help then they’re right, you probably aren’t ready to support 1.8 by yourself

grim ice
#

Same thing for forge

neon minnow
#

if you are talking about me, i came here for a general question, not a 1.8 specific question or help

#

🙂

grim ice
#

I'm happy that there are still people here answering legacy software questions

sleek pond
#

Not everything revolves around you

young knoll
#

Use an old PvP plugin and get with the times old man ¯_(ツ)_/¯

#

:p

brave sparrow
#

All you should realistically need are the Javadocs, wiki.vg and maybe a decent decompiler

grim ice
#

this has been an argument since years

sleek pond
#

Mhm

brave sparrow
sleek pond
#

True

#

Very true

grim ice
sleek pond
#

Also pre 1.14 textures yucky

grim ice
#

for example Mods

#

there are way too many 1.8.8 PVP Mods

#

to just switch over to latest version

young knoll
#

It's kind of an endless cycle

delicate lynx
#

1.8.8 move on challenge (impossible)

grim ice
#

although not many still use forge to pvp It's still a problem

young knoll
#

The servers won't update past 1.8, so plugin and mod devs keep adding support for 1.8

grim ice
#

you have to convince both clients and servers to move on, which is really hard

young knoll
#

Which makes the servers not update

blazing scarab
#

(Just stay on 1.9 pvp)

brave sparrow
#

Realistically the problem is that minecraft Java supports switching your version that easily

grim ice
#

and with moving on to newer version, some devices will stop running minecraft

brave sparrow
#

If they just forced everyone to update it wouldn’t have happened

grim ice
#

since it will require better specs

#

I know many people that cannot run 1.18.1

#

but can run 1.8.9 and they play it everyday

neon minnow
#

whys everyone talking about 1.8 again

finite inlet
#

Hi! I got two questions. How would I go by creating a gui like this? http://prntscr.com/26x519v this is the image that they have in the resource pack for it http://prntscr.com/26x51od , and secondly how would I create that number right that with the member count?

tardy delta
#

texturepack

young knoll
#

It's likely just a single item with a custom model

#

Or maybe a few items

grim ice
#

that's a good amount of work tbh

#

the creators of that resource pack made it look awesome

young knoll
#

Mhm

grim ice
#

and yeah its probably an item remodeled

finite inlet
#

the numbers or the entire resource pack? Cause they are no items underneath where the number is

young knoll
#

Not sure how that works

#

Maybe it generates a dynamic resource pack for you when you log in

#

Or it just updates the count in the global resource pack every hour or whatever

grim ice
#

maybe it detects the gui by nae

#

name

#

then changes the texture, if there is a way to do that

young knoll
#

Extract their pack and see if it's one texture :p

finite inlet
young knoll
#

Hmm

#

Might use the GUI name and a custom font

delicate lynx
#

found this

finite inlet
#

thanks

manic crater
#

Guys i registered events from another class into my main class, then i moved my gui work and all that to another class,

And the guis open and everything is set but for some reason i can still drag items around and stuff even though in the code it cancels it,

#

I don't know if that is a genuine spigot bug... or not..

grim ice
#

how do you register

#

them

worn tundra
#

Wait

#

The solution you got offered is very sucky

#

One of the worst ones really

#

ItemStacks have not been used for custom GUIS for a long time

manic crater
# grim ice how do you register

this is in my on enable area,

PluginManager pm = getServer().getPluginManager();
pm.registerEvents(new ranks(this), this);

#

( I used another from another plugin for an example

minor fox
#

Is there a way of differentiating between top/bottom slabs?

quaint mantle
#

how would i add subcommands in the onCommand() method?

#

when i try to use args[] it doesn't work

worn tundra
#

What doesn't work?

manic crater
young knoll
#

Also make sure to check with args.length

quaint mantle
#

thanks

worn tundra
deft forum
#

anyone know how to get the config's one of my section all values?

young knoll
#

?

deft forum
#

with like a for loop

#

i mean

#

to get a getConfig().getConfigurationSection("warps").getAll()
something like this

young knoll
#

You can use getKeys to get all the keys

finite inlet
worn tundra
#

Yeah, been studying those servers packs for more than a year now

finite inlet
young knoll
#

Can't you also make custom fonts and only retexture characters in that font

#

And then use that font in a component

worn tundra
#

Yes

#

That's one way you can actually display text anywhere on the screen in pure vanilla

#

(With only a < 1mb resourcepack)

humble heath
#

can i make text on a sign that is inviseble but code can see it

young knoll
#

I'm not sure the spigot component API supports fonts though

#

sadly

worn tundra
#

Not sure if that's right

young knoll
#

Oh it does

#

Sick

worn tundra
#

Ikr

deft forum
#

anyone know how can i fix this?

package me.andris.warppl.commandTabs;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.ArrayList;
import java.util.List;

public class warpTabCompleter implements TabCompleter {

    public JavaPlugin plugin;

    public JavaPlugin hello(JavaPlugin plugin) {
        return this.plugin;
    }

    @Override
    public List<String> onTabComplete(CommandSender sender, Command command, String s, String[] args) {

        if(command.getName().equalsIgnoreCase("warp")) {
            Player player = (Player) sender;
            if(args.length == 1) {
                List<String> warps = new ArrayList<String>();

                if(plugin.getConfig().getConfigurationSection("warps") != null) {
                    for(String names : plugin.getConfig().getConfigurationSection("warps").getKeys()) {
                        
                    }
                }
            }
        }


        return null;
    }
}

spare patio
#

fix what

worn tundra
#

Fix what

deft forum
#

it says an err at getKeys

quaint mantle
#

would something like this work for a subscommand?

#

if (args.length == 2) {
if (args[0] == "create") {
if (args[1] == "54") {
MenuStorageUtil.createMenu(args[2], 54);
}
}
}

humble heath
#

can i make text on a sign that is inviseble but code can see it

young knoll
#

getKeys takes a bool

#

Use your IDE

quaint mantle
young knoll
#

Yes?

spare patio
#

then no

young knoll
#

Can't use == for strings

humble heath
#

i am trying to make a quiz theat telepoets when you click true or false

olive lance
#

Better ways of using other plugins that don’t have an API than getPlugin(“plugin”) to get the main class ?

young knoll
#

Don't think there is one

#

gotta get the instance from getPlugin

muted sand
#

how do I force a player into a server, when it's at max player limit? (Bungeecord)

humble heath
# worn tundra Why

i am trying to make a quiz theat telepoets when you click true or false

deft forum
#

you must use .equals()

or equalsIgnoreCase()

spare patio
quaint mantle
#

i am stupid

#

i forgot

#

thanks

olive lance
#

Ok cool I figured that was the case but something I read led me to think otherwise let me find it quickly

young knoll
#

I do that sometimes

deft forum
#

anyone does those silly things like that

worn tundra
spare patio
deft forum
#

😄

young knoll
#

Please use an IDe

#

:c

olive lance
#

Nano and javac

deft forum
#

can anyone help me to loop a ConfigurationSection's all vales with its name?

quaint mantle
#

Hey, how can I do to throw the player back during the Move Event (it will be good if there is a raw code)

humble heath
#

i had an idea with invisable text

young knoll
#

Set their velocity to their direction * - 1

humble heath
#

how do i do invisible text

young knoll
#

And then maybe add some exta Y velocity

sacred mountain
#

hi how do i edit nbt data of a fireball

#

a thrown one

#

to contain the shooter's UUID

#

or name

young knoll
#

?pdc

young knoll
#

Also projectiles should have a setShooter

deft forum
#

can anyone help me to loop a ConfigurationSection's all keys with its name?

#

with for

young knoll
#

for String key : section.getKeys(false)
// get value from key

midnight shore
deft forum
#

wat does (false)
do?

young knoll
#

The boolean is for recursing

spare patio
#

you forgot a )

midnight shore
#

You should put your configuration section there

young knoll
#

No brackets now

#

:D

midnight shore
spare patio
#

that doesn't compile

tardy delta
#

section.getKeys(false).forEach uwu

spare patio
#

does it

#

it doesn't

young knoll
#

With no brackets? no

#

But if you don't know how to add the brackets you need to learn java

quaint mantle
#

ok for some reason this is not working

#

if (sender instanceof Player) {
if (cmd.getName().equalsIgnoreCase("mm")) {
if (args.length == 2) {
if (args[0].equalsIgnoreCase("create")) {
if (args[1].equalsIgnoreCase("54")) {
MenuStorageUtil.createMenu(args[2], 54);
}
}
}
if (args.length == 2) {
if (args[0].equalsIgnoreCase("create")) {
if (args[1].equalsIgnoreCase("45")) {
MenuStorageUtil.createMenu(args[2], 45);
}
}
}

#

and so on

#

wait let me use hastebin

tardy delta
#

nice indents

muted sand
#

does PlayerLoginEvent call for players connecting via bungeecord?

quaint mantle
tardy delta
#

smh the indents

#

unchecked cast

#

building pyramids

midnight shore
#

Guys how can I make a transition between two EulerAngles?

tardy delta
#

i just fking died

#

what are eulerangles? 👀

midnight shore
midnight shore
visual tide
#

dig up euler and ask him

tardy delta
#

oh idk

quaint mantle
#

wait after every if statement for args do i have to add a return true

midnight shore
midnight shore
quaint mantle
#

ohhhhhhhh

#

that is why then

#

or not.

midnight shore
#

I think… maybe

#

I don’t really know

#

I’m struggling to find out how to have an animation between two armorstand poses

deft forum
midnight shore
#

Anyone knows?

midnight shore
deft forum
#

no

midnight shore
#

That shouldn’t be a problem tho

#

Because you are checking for null

deft forum
#

thats why i created that if statement

midnight shore
#

Could you send the error please

deft forum
#

one moment

tardy delta
#

nice name

#

why is the variable public

midnight shore
#

But wait

tardy delta
#
if(plugin.getConfig().getConfigurationSection("warps") == null) {
                    plugin.getConfig().createSection("warps").set(args[0].toLowerCase(), loc);
                    plugin.saveConfig();
                }
                if(plugin.getConfig().getConfigurationSection("warps") != null) {
                    plugin.getConfig().getConfigurationSection("warps").set(args[0].toLowerCase(), loc);
                    plugin.saveConfig();
                }```if else?
midnight shore
#

Where is the this.plugin variable set?

tardy delta
#

please not by using the instance.plugin = this;

#

public variables 💀

#

anyways would anyone wants to check my lang file for grammar mistakes?

lavish hemlock
#

Sure

tardy delta
#

i could sent the actual yaml file if you'd like too

lavish hemlock
#

Eh looks fine

visual tide
#

comma after im sorry

lavish hemlock
#

I mean I just skimmed over it but it's passable

tardy delta
#

i'm sorry, but...?

#

looks weird

lavish hemlock
#

I actually don't think it's necessary to put a comma there.

#

Let's see what LanguageTool thinks...

quaint mantle
#

for some reason when i type "/menu create 54 example" it doesn't run the method i have set up

tardy delta
#

i'm sorry, but you don't have permisson to do that

quaint mantle
#

if (args.length == 2) {
if (args[0].equalsIgnoreCase("create")) {
if (args[1].equalsIgnoreCase("45")) {
MenuStorageUtil.createMenu(args[2], 45);
}
}
}

tardy delta
#

that comma looks weird :C

#

anyways

visual tide
tardy delta
#

it only says that everything is good with me

olive lance
#

i need an array of unordered pairs and no pairs can have the same 2 elements anybody know if this has a name?

tardy delta
#

hashmap? 💀

olive lance
#

that was my initial thought but

#

those are like ordered pairs i would think

#

k:v and v:k can both exist

tardy delta
#

ye obviously

#

you specify the generics and problems are gone

#

unless its a map with two times the same type (map<string, string> fe)

spiral light
#

if its String,String you need some extra checks i guess

ivory sleet
#

BiMap

olive lance
#

if you have a list<parent interface> with multiple child types inside and you do for(childtype : list) will it only iterate the child types? or does that not even let that happen at all

ivory sleet
#

BiMap has the notion of K -> V as well as V -> K

olive lance
#

oh

ivory sleet
#

so in principle a bijective function

olive lance
#

Ill check it out

ivory sleet
#

(not rly but yes)

#

yeah

#

HashBiMap.create() iirc

tardy delta
#

guava?

ivory sleet
#

myes

tardy delta
#

myes 🐮

#

:D

olive lance
#

i am having such a hard time trying to figure out how to get something from this yaml rn

    x:1
    z:1
    ....
    list_of_serialized_objects:
      - serialized_object
key2:
....
#

how do i get that list

ivory sleet
#

you can only have one "key" in one mapping

tardy delta
#

^

olive lance
#

wdym?

#

the key names wont be the same that was just me typing

tardy delta
#

because you are having a key value pair first and then it finds a list

ivory sleet
#

ah okay

tardy delta
#

wait

olive lance
#

so im looping through all the keys

ivory sleet
#

I believe you might wanna do sth like getMapList or if it was getListMap

tardy delta
#

getList("key.list_of_serialized_stuff") i guess

quaint mantle
#

would this make a working subcommand? }
}
}
if (args.length == 2) {
if (args[0].equalsIgnoreCase("create")) {
if (args[1].equalsIgnoreCase("18")) {
MenuStorageUtil.createMenu(args[0], 18);
}
}
}

mortal cedar
#

how can I get the arguments from the PlayerCommandSendEvent?

tardy delta
#

havent you fixed your formatting yet ._.

olive lance
tardy delta
#

wat

olive lance
#

lmao i am about to just make a separate file

tardy delta
#

when i dont have my ide open 💀

olive lance
#

Ill just share my full code

ivory sleet
#

ye

#

and full config perhaps

olive lance
#

yea

tardy delta
# olive lance yea

there is a FileConfiguration#getList which returns a List<?>, are you looking for that?

ivory sleet
#

theres getMapList which returns List<Map<?,?>>

olive lance
#

hold up im gonna get this looking nice and pretty

tardy delta
#

i thought he was getting the list of serialized objects?

olive lance
#

ok actually

tardy delta
#

actually ye but no

olive lance
#

I am not sure what the files gonna look like or if it will save with how im saving it

ivory sleet
#

well u need to know the format?

olive lance
#

Yeah i thought i did

ivory sleet
#

like if its json/yaml?

#

hm

#

ok lol

olive lance
#

hold up

#

ok its weird so i am

#

this file all the keys are just serialized objects

#

but then they have lists of different serialized objects

tardy delta
#

what are you trying to do?

olive lance
quaint mantle
tardy delta
#

fix your formatting please

quaint mantle
#

subcommands don't work

olive lance
#

should i include claim serialization too

#

what im getting at on my own thought is that to do this i need to give claims an identifier

quaint mantle
#

can someone just tell me why its not working instead of mindlessly critizing a closed source project

tardy delta
#

derserialisation sucks

olive lance
#

what does a list<map> look like in yaml

tardy delta
waxen plinth
#
list:
  - entry1:
      abc: 123
  - entry2:
      blah: thing```
#

Or

#
list:
  -
    abc: 123
  -
    blah: thing```
#

I think this is also valid

tardy delta
#

lul

olive lance
#

looks so confusing

quaint mantle
#

that is for opening the menu

olive lance
#

so the map doesnt need a name/id for the yaml then

#

/key

#

wait

waxen plinth
#

Like this is so much harder to read because of the formatting, just run it through a formatter

olive lance
#

are*

waxen plinth
#

Ctrl + Alt + L to reformat code in intellij

#

Ctrl + Shift + F in eclipse

waxen plinth
olive lance
#

can u show an example with 2 entries in each map for my small brain pls

waxen plinth
#
list:
  -
    abc: 123
    def: 456
  -
    blah: thing
    bleh: otherthing```
olive lance
#

ty

#

general question for yall

#

is looping through a array and 2d array the same speed if its the same amount of elements?

waxen plinth
#

More or less

midnight shore
#

Hi guys! I'm using a HeadRotation packet to move the head of an EntityPlayer (NPC). as you can see i'm parsing a byte (or a float ?). In the game it works fine for some rotations and completely wrong for others. Am i doing something wrong?

quaint mantle
olive lance
#

maybe negligibly slower for the 2d array because it might go back and forth though ram ?

waxen plinth
#

Yaw is a float

midnight shore
#

that packet needs a byte

#

not a float

waxen plinth
#

Well the float is in radians

#

So it will presumably never be higher than 2pi

midnight shore
#

it needs a byte

waxen plinth
#

Ok that's not adding anything

#

You can try rescaling it

midnight shore
#

yeah so how do i do it?

waxen plinth
#

I don't know

#

Try rescaling it

#

If the float is between 0 and 2pi

midnight shore
#

dividing?

waxen plinth
#

Try subtracting pi

#

Then multiplying by 127/pi

#

Then casting to byte

#

Probably won't work but it's the best I can think of

#

Otherwise I don't know

tardy delta
#

ew math

midnight shore
#

is it what you mean?

#

i changed it to a float

wet breach
#

this will do a narrowing primitive conversion for you

midnight shore
#

but yaw doesn't have any method

wet breach
#

it is a float

#

float has byteValue()

midnight shore
eternal night
#

Float vs float is a tough one

midnight shore
olive lance
#

uhm

tardy delta
#

new Float(float).byteValue() lol

eternal night
#

optimal speed

wet breach
#

suppose that works, not like it is hard to go from primitive to object

midnight shore
#

trying

#

thats still not working

eternal night
#

but like

wet breach
#

Float.valueOf(float).byteValue()

eternal night
#

why

#

whats the point

tardy delta
#

cant i set the string "#0ffffTest message" tot a fileconfiguration and prevent it becomes a comment? seems like the parser sees it as a comment and doesnt place " "

wet breach
#

the method I am suggesting does a narrowing primitive conversion AKA has to do with precision

#

you can cast to Byte if you want, but then you might end up with problems when you think it should be a certain byte value when really it isn't

eternal night
#

wat

#

narrowing primitive conversion is literally just discarding any bits larger than the size of the target primitive

#

"A narrowing conversion of a signed integer to an integral type T simply discards all but the n lowest order bits, where n is the number of bits used to represent type T"

midnight shore
#

as you can see from the eye of the enderman (which should be the right rotation) thats not even close

wet breach
#

back to my game I guess

eternal night
#

whats the issue here anyway

midnight shore
#

i'm trying to set the head rotation of an EntityPlayer to be the rotation of an another entity, however the value is not correct, i mean: the head does rotate but not to the right point

eternal night
#

yHeadRotp = MathHelper.floor(this.entity.getYHeadRot() * 256.0F / 360.0F);

waxen plinth
#

MathHelper??

eternal night
#

server internals

waxen plinth
#

Math.floor is a thing already

eternal night
#

server internals

#

that is the code run internally

#

that value is then new PacketPlayOutEntityHeadRotation(this.entity, (byte) yHeadRotp)

#

so might give it a try

midnight shore
#

trying

#

better than before but sometimes it makes a weird full 360 rotation

quaint mantle
olive lance
#

im booting up test server now about to get the real answers here

#

see what this yaml looks like

quaint mantle
naive bolt
#

could someone help me add a cache to my plugin. In dms?

quiet ice
#

Try using \# or using ""

tardy delta
#

cache for what?

#

hmm ok

quiet ice
#

Actually, no this is pointless. This probably could be a snakeyaml issue

naive bolt
#

baso i have a placeholder api placeholder that does a http request and i want to store it for 5 mins before getting it again

quiet ice
#

Unless you write the yaml manually

tardy delta
#

ye

quiet ice
#

There is a library called caffeine that should make this easy

#

Never used it myself however

tardy delta
#

or guava cachebuilder

#

mostly the same

#

i took a look at a class and it was exactly the same as guavas

quiet ice
#

Isn't guava technically unmaintained?

tardy delta
#

._.

#

idk

quaint mantle
#

i can't figure this shit out

quiet ice
#

what is the issue?

quaint mantle
olive lance
#

is there a way to join a string array if the array isnt null but not ugly?

quaint mantle
#

when i run a subcommand the function doesnt run

#

now

quiet ice
#

Yeah okay

quaint mantle
#

its not a function error, since earlier by just running one command it ran

naive bolt
tardy delta
#

why 20 try catch blocks?

quiet ice
#
                if (args.length == 2) {
                    if (args[0].equalsIgnoreCase("create")) {
                        if (args[1].equalsIgnoreCase("54")) {
                            MenuStorageUtil.createMenu(args[2], 54);

to access args[2], the array must be of length 3 or more

#

You'd probably want to do args.length > 3

tardy delta
quaint mantle
#

i will try

tardy delta
#

i see pyramids geol

wet breach
#

they still release updates to it

quiet ice
#

You probably forgot that java 0-indexes arrays

#

Then it was probably some other google lib

midnight shore
#

how can i get when a player shoots an arrow?

naive bolt
#

i want it to cache the api result for 5 mins

tardy delta
#

uhh

#

a simple map or something would be enough i guess

lost matrix
tardy delta
#

where you get it from

wet breach
#

?jd

midnight shore
#

ty

quiet ice
#

Map<Type, Map.Entry<Long, Object>>, where as the long is the millisecond the key was inserted and Object the cached value

lost matrix
#
  private final Cache<String, Consumer<Player>> actionMap = Caffeine.newBuilder().expireAfterAccess(Duration.ofMinutes(15)).build();
quiet ice
#

Then compare the current time with it and if it is over 5 * 60 * 1000 (too lazy to do the maths) milliseconds ago, then redo the operation and cache it anew with the new system time

naive bolt
#

rather than another dependency

lost matrix
midnight shore
tardy delta
#

isnt it exactly the same class?

young knoll
#

yes it does

tardy delta
#

just other name

young knoll
#

Event#getEntity

midnight shore
young knoll
#

no

lost matrix
midnight shore
#

then how do i get the projectile?

lost matrix
#

Pls read it

#

Really

midnight shore
#

I'm reading it already

#

oh get projectile

#

sorry

naive bolt
#

yes

lost matrix
quaint mantle
quiet ice
#

What code are you using right now?

naive bolt
#

how can i make my plugin work on any version. Do i just set the api version to lowest

quiet ice
#

13, but that usually does not work

quaint mantle
quiet ice
#

You are basically guranteed to have touched something that is 1.14+ or at least 1.13+ exclusive

naive bolt
#

i will use 1.14

quiet ice
#

In this case it needs to be >= instead of >

quaint mantle
quiet ice
#

> means "larger, but not inclusive"

naive bolt
#

whats the version name for 1.14

quiet ice
#

1.14?

#

Or do you mean the maven artifact version string?

naive bolt
#

maven

quiet ice
#

Probably "1.14-R0.1-SNAPSHOT"

naive bolt
#

thanks it worked

quaint mantle
#

THANK YOU

#

FINALLY

#

it worksss

olive lance
#

Keg[] kegz = (Keg[]) kegs.toArray();
'will produce 'ClassCastException' for any non-null value '

#

why would it do that

tardy delta
#

if kegs is null?

olive lance
#

oh i thought it was saying if one of kegs elements was null

tardy delta
#

also toArray(Keg[]::new) would work

olive lance
#

thats something ive never seen before

#

it works but idk what it does differently

tardy delta
#

toArray() will return an Object[] iirc

quaint mantle
#

Anyone know how to use the townychat plugin?

olive lance
#

ah i see

chilly haven
#

if (event.getAction() == Action.RIGHT_CLICK_AIR){
if (event.getPlayer().getInventory().getItemInHand().getType().equals(Material.COOKIE)){
if (event.getPlayer().getInventory().getItemInHand().getItemMeta().getLore().contains(ChatColor.GOLD + "CloseCall")){
event.getPlayer().sendMessage(pullmessage.replace("%ability%", closecall).replace("&", "§"));
event.getPlayer().getInventory().removeItem(event.getPlayer().getItemInHand());
}
}
}

This is the code i have rn, i am trying to remove the item that the player is holding from the players inventory but it doesnt do that, it only removes the other item stacks in different slots

brave sparrow
#

removeItem just removes the first one it finds

#

You want to decrement the item in their hand, or set it to null if they only have 1

chilly haven
#

Yes

brave sparrow
olive lance
#

Ok finally got it working @waxen plinth the way spigot saves it by default is like you said but the '-' is on the same line as the first k/v pair in each map

naive bolt
#

how do i make void run every 5 mins

chrome beacon
#

?scheduling

undone axleBOT
quaint mantle
#

ok i got this error

#

Caused by: java.lang.NullPointerException

at me.magnumsrt.MagnificentMenus.MagnificentMenus.onCommand(MagnificentMenus.java:117) ~[?:?]

#

menu.setOption(Integer.valueOf(args[2]), new ItemStack(Material.valueOf(args[3]), 1), args[4], this is the line of code that causes it apparently

vocal cloud
#

okay

#

If you want people to help you do full errror pastebin followed by class in which error occured pastebin

quaint mantle
#

first one is the error

#

second is the error class

young knoll
#

World has PDC now

#

Neat

ivory sleet
#

everything should have pdc smh /s

quaint mantle
#

no, not /s, you are correct.

#

persistent data management is very optimized for storage. /s

#

its not like there'd be a useless build up of data over time. /s

ivory sleet
#

undoubtedly the case, so colossally more scalable than what any database could possibly offer /s

quaint mantle
#

plugins need to start storing player login info as a String in the player's persistent data container. /s

ivory sleet
#

lol

quaint mantle
#

after all, the PDC methods dont require asynchronous calls.

#

so therefor, they are better than databases. /s

ivory sleet
#

🥲

visual viper
#

Hello, I am making a plugin, and I would like to know how to open a menu by shift + right clicking, can someone help me?

ivory sleet
#

right clicking empty handed?

vocal cloud
#

when player right clicks check if they're crouching

ivory sleet
#

^ basically a Player::isSneaking (or sth) and then PlayerInteractEvent::getAction and check if its right click

primal sequoia
#

Looking for a plugin so I can send a command (same one) to all servers at the same time for example a lp one through proxy

ivory sleet
#

Oo

primal sequoia
#

So I do not have to send a command in each and all servers

#

Anyone able to help

ivory sleet
#

Well this channel is probably the wrong one, so keep in mind until next time

primal sequoia
#

Sorry

ivory sleet
#

but regardless, I don't know of any plugins that do this

#

however whatever plugin that do this would need some sort of external resource

#

whether its just a socket server or perhaps a database

primal sequoia
#

Idea

ivory sleet
#

myeah

visual viper
primal sequoia
#

You install a spigot version and the proxy plugin sends the spigot plugin the command to send

ivory sleet
#

yeah I get your idea

primal sequoia
#

Someone should make this a project

ivory sleet
#

but its a bit problematic

#

since there's no developer api to solidly send messages between servers back and forth

visual viper
quaint mantle
primal sequoia
#

Or is this just for messages

ivory sleet
primal sequoia
ivory sleet
#

yes and no

#

you have to opt in for a "communication method"

#

" Plugin Messages" (the first one)

#

does only work if the receiving server and sending server have players online

primal sequoia
#

Is there a way to rank someone in luckperms with one command in all servers?

ivory sleet
#

yes

#

if you have sth like mysql

primal sequoia
#

Would it connect all my ranks or could I still have different donator ranks for different servers

ivory sleet
#

Ugh

#

well

#

when you do this type of stuff

visual viper
ivory sleet
#

you have a global collection of ranks usually (stored in database)

#

however you apply them to players for a specific server or so using contexts

#

and then whenever you update permissions or ranks for someone the server the change took place on would send an update signal to all the other servers so they can synchronize with the database

primal sequoia
#

hm

visual viper
# visual viper Okey

`@EventHandler
public void interact(PlayerInteractEvent e){
Player p = e.getPlayer();
ItemStack i = e.getItem();

    if(p.isSneaking() && e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK){
        if(i.getType() == Material.DIAMOND_SWORD){
            Enchants inv = new Enchants();
            inv.createInventory(p);
        }
    }
}`
ivory sleet
#

if you use a local database file this can be hard (or just flatfile storage)

ivory sleet
vocal cloud
#

I mean generally someone doesn't need to have a rank till they join a different server. You can always do a quick role check on a player when they join and fill in the gaps

visual viper
ivory sleet
#

well

#

open the inventory also for the player?

sullen dome
#

on PlayerDeathEvent, can the latest damage cause technically be null? i dont think so, but wanna be sure

ivory sleet
#

since the api does not do that inherently when just creating an inventory

#

send to whom?

visual viper
ivory sleet
#

Player::spigot Player.Spigot::sendMessage

#

oh

#

are you using adventure?

#

bungee chat api?

#

ignore the red

#

its just cause getPlayer is nullable

visual viper
# visual viper yes

`public void createInventory(Player p){
Inventory inv = Bukkit.createInventory(null, 27, ChatColor.translateAlternateColorCodes('&', "&1Encantamientos en la espada"));

    ItemStack sword1 = new ItemStack(Material.DIAMOND_SWORD, 1);
    ItemStack sword2 = new ItemStack(Material.DIAMOND_SWORD, 1);
    ItemStack sword3 = new ItemStack(Material.DIAMOND_SWORD, 1);

    ItemMeta s1 = sword1.getItemMeta();
    s1.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6Filo I"));
    List<String> ls1 = new ArrayList<String>();
    ls1.add(ChatColor.translateAlternateColorCodes('&', ""));
    ls1.add(ChatColor.translateAlternateColorCodes('&', "&7Costo: &a100 Coins")); 
    s1.addEnchant(Enchantment.DAMAGE_ALL, 1, false);
    inv.setItem(11, sword1);

    ItemMeta s2 = sword2.getItemMeta();
    s2.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6Filo II"));
    List<String> ls2 = new ArrayList<String>();
    ls2.add(ChatColor.translateAlternateColorCodes('&', ""));
    ls2.add(ChatColor.translateAlternateColorCodes('&', "&7Costo: &a300 Coins")); 
    s2.addEnchant(Enchantment.DAMAGE_ALL, 2, false);
    inv.setItem(13, sword2);

    ItemMeta s3 = sword3.getItemMeta();
    s3.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6Filo III"));
    List<String> ls3 = new ArrayList<String>();
    ls3.add(ChatColor.translateAlternateColorCodes('&', ""));
    ls3.add(ChatColor.translateAlternateColorCodes('&', "&7Costo: &a650 Coins")); 
    s3.addEnchant(Enchantment.DAMAGE_ALL, 3, false);
    inv.setItem(15, sword3);
    
    p.openInventory(inv);
}`
ivory sleet
#

he

#

should work

#

unless you forgot to register the listener

visual viper
quaint mantle
#

when i try to run the additem command in my plugin i get this error

hybrid spoke
#

null

#

at me.magnumsrt.MagnificentMenus.MagnificentMenus.onCommand(MagnificentMenus.java:117) ~[?:?]

quaint mantle
#

yes

#

i literally can't find anything wrong tho

hybrid spoke
#

you never set menu

#

MenuStorageUtil.findMenu(args[1]); is a dead store

quaint mantle
#

well that means it didn't find the menu

#

since that method is set to return null if it is not found

#

ok

hybrid spoke
#

no that means, whatever your method do, you are doing nothing with that

quaint mantle
#

public static Menu findMenu(String name) {
for (Menu menu : menus) {
if (menu.getName().equalsIgnoreCase(name)) {
return menu;
}
}
return null;
}

hybrid spoke
#

since you never defined menu

#

you just call that method

#

but never set menu with it

#

it would have to be
menu = MenuStorageUtil.findMenu(args[1]);

dense heath
# ivory sleet btw

Figured out your issue, after careful inspection I have determined that you're using Windows.

ivory sleet
#

Windows is what empowers me

quaint mantle
#

how do i change a string to a string[]

ivory sleet
#

context?

quaint mantle
#

or anything to a string[]

#

setItemNameAndLore(item, itemM.getDisplayName(), lore);

worldly ingot
#

by putting the string into an array ;p

quaint mantle
#

lore should be a string[]

worldly ingot
#

new String[] { lore }, or if it's varargs, just lore should suffice

quaint mantle
#

alright thanks

#

i misread

#

its a list<string>

#

how would i convert a list<string> to a string[]

#

i need to use it in a method

ivory sleet
#

.toArray(new String[0]) it

quaint mantle
#

finally it works