#help-development

1 messages · Page 476 of 1

rare rover
kind hatch
remote swallow
#

use winrar or something and check

rare rover
#

alr

kind hatch
# rare rover

Ok cool. I'd try deleting the generator.yml that was created on the server and restarting.

#

Let it try and refresh itself.

rare rover
remote swallow
#

delete the file#createNewFile

rare rover
remote swallow
#

thats most likely is what is breaking

#

also generators.yml and generator.yml

#

ur missing the s

rare rover
#

oh

#

😡

#

there we go!

#

tysm

rigid sage
#

Looping is counted in ticks or seconds?

kind hatch
#

Runnables use ticks, nearly everything else is in milliseconds.

rigid sage
#

How many ticks is 1 second and is runnables used for looping?

remote swallow
#

20 ticks is 1 second

rigid sage
#

Oh

#

Thanks. Slowly understanding stuff

rare rover
#

shouldn't this be ["ew"]?
java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.getStringList(String)" because "org.mobgens.api.GeneratorConfiguration.configuration" is null

kind hatch
rare rover
#

ohhh

#

my bad

#

wait

#

so

#

how would i get all the things in generators

#

like if its generators.ew and generators.eww

remote swallow
#

thats a config section

kind hatch
#

You are dealing with a simple string. So use #getString()

rare rover
kind hatch
#

Path subsections are separated using the period symbol. .
So you want #getString("generators.ew.test")

rare rover
#

so um

#
public static @Nullable Set<String> getGeneratorList() {
        ConfigurationSection section = configuration.getConfigurationSection("generators");
        return section.getKeys(false);
    }```?
remote swallow
#

that would return ew iirc

rare rover
#

epic

kind hatch
#

That will return a list of all the section names under "generators"
You will have to iterate over that list and use the string to complete the path.

rare rover
#

also

#
@Override
    public @Nullable FileConfiguration loadFile(@NotNull String path) {
        File file = new File(plugin.getDataFolder(), "generators.yml");
        if (!file.exists()) {
            try {
                plugin.saveResource("generators.yml", false);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return YamlConfiguration.loadConfiguration(file);
    }``` should this be returning null?
#

cuz it is

#

for some reason

#

java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" because "org.mobgens.api.GeneratorConfiguration.configuration" is null

private static final FileConfiguration configuration = utils.loadFile(plugin.getDataFolder().getAbsolutePath() + "/generators.yml");```
remote swallow
#

why

kind hatch
#

That depends on when you are calling that. Since it's a variable that's initialized out of any local scope, it will likely be null since you have not created the file yet.

rare rover
#

i noticed that

remote swallow
#

the un-needed static just hurts

#

and the either instanced utils or lower case class name

rare rover
#
private final YamlUtils utils = new YamlUtils();
private final FileConfiguration configuration = utils.loadFile("generators.yml");``` just these
remote swallow
#

utils shouldnt really need to be instanced

rare rover
#

i thought it would be better

#

instead of getting the instance every method

kind hatch
remote swallow
#

that is the correct time for static

#

if you need a plugin instance for example, you pass it in the method or have a static getter in your main class

rare rover
#

alr

#

but my loadFile method is still returning null

remote swallow
#

?paste the error

undone axleBOT
rare rover
#
java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.file.FileConfiguration.getConfigurationSection(String)" because "org.mobgens.api.GeneratorConfiguration.configuration" is null```
#

oh

remote swallow
#

full error

rare rover
#

yeah

rigid sage
#

Is it possible to implement/extend multiple things like command executor and bukkitrunnables at the same time?

#

I mean

remote swallow
#

you can implement multiple things you can only extend one

rigid sage
#

Same class

remote swallow
cobalt thorn
#

java.lang.LinkageError: loader constraint violation: loader org.bukkit.plugin.java.PluginClassLoader @549e60c5 wants to load interface net.rosamei.alixapi.commands.CommandInfo. A different interface with the same name was previously loaded by org.bukkit.plugin.java.PluginClassLoader @50a32b2c. (net.rosamei.alixapi.commands.CommandInfo is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @50a32b2c, parent loader 'app')
Somone knows why? never saw this error

rare rover
#
ConfigurationSection section = configuration.getConfigurationSection("generators");```
remote swallow
#

configuration is null there

rare rover
#

ye

remote swallow
#

i would recommend making the yaml utils class static now, then asigning the configuration in a constructor

rigid sage
#

Do we need to extend or implement anything to make items?

remote swallow
#

shouldnt need to

kind hatch
#

No, just use the ItemStack class

rare rover
rigid sage
#

Alr

rare rover
#

same error

#

doe

#

thus

#
public static @Nullable FileConfiguration loadFile(@NotNull String path) {
        Plugin plugin = MobCore.getPlugin();
        File file = new File(plugin.getDataFolder(), path);
        if (!file.exists()) {
            try {
                plugin.saveResource(path, false);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return YamlConfiguration.loadConfiguration(file);
    }``` is the problem
remote swallow
#

what are you pasing into the method

rare rover
#

well this is the variable that is null

#
private final FileConfiguration configuration = YamlUtils.loadFile("generators.yml");```
remote swallow
#

assign it on a constructor

rare rover
#

alrighty

#

same error

#

here

remote swallow
#

you have 2 instances of the class then somewhere

rare rover
#

my whole

rigid sage
#

Just realised something, when I'm gonna give the player the item, wouldn't the list of vanilla items pop up? How would I give an item I just created a little bit earlier?

rare rover
#

file

kind hatch
rigid sage
#

Uhm alright

#

Just checking, instance means like p in player p = sender eight?

#

Right?

kind hatch
#

More or less

rigid sage
#

Alr

#

Thanks

rigid sage
#

player.getWorld().getName().equals("world") is player here an instance or the entitiy

#

by entity i mean bukkits ya know

drowsy helm
#

wdym?

#

its both

rigid sage
#

alr

#

is it better to make item in another class or is it fine if i do it in the same as command class

drowsy helm
#

depends what the usecase is

#

in most cases i'd say another class

rigid sage
#

alr

#

instances from other classes can be used in another class right?

tardy delta
#

Yes

rigid sage
#

can i just implement commandexecutor for my item class? i know its kinda not needed but still it makes stuff easier

#

@Override
public boolean onCommand( CommandSender commandSender, Command command, String s, String[] strings) {
return false;
}
ItemStack token = new ItemStack(Material.DIAMOND,1);
ItemMeta itemMeta = token.getItemMeta();
itemMeta.

#

itemMeta acts asif its never heard of setdisplayname before

rare rover
#

any alternatives?

@Override
    public @NotNull Generator getGenType() {
        Map<String, Generator> gens = RegistryHandler.registeredGenerators;
        return gens.values().stream()
                .filter(gen -> gen.getMaterial().equals(getGenerator().getMaterial()))
                .findFirst()
                .orElse(null);
    }```
rigid sage
rare rover
#

which is why it's saying that method doesn't exist

rigid sage
#

oh alr

#

thanks

#

@Override
public boolean onCommand(CommandSender commandSender, Command command, String s , String[] strings) {

    if (commandSender instanceof Player)
        Player p =(Player) commandSender;

    getPlayer().getWorld.getName().equals("AFK");

    ItemStack token = new ItemStack(Material.DIAMOND,1);
    ItemMeta itemMeta = token.getItemMeta();
    itemMeta.setDisplayName(ChatColor.YELLOW + "" + ChatColor.BOLD + "AFK" + ChatColor.GREEN + "" + ChatColor.BOLD + " Token");

getworld dosnt work, how else can i do that?

#

and i dont even need.getname right? i just wanna get the world where this task will happen

remote swallow
#

replace getPlayer() with p

#

also you need () on it

#

?learnjava

undone axleBOT
rigid sage
#

alr

#

when i select from the menu it shows .getworld as red-

#

wait NO WHY DID I DO AN IF STATEMENT LMAO

remote swallow
#

because command sender can be console too

rigid sage
#

alr

remote swallow
#

you just need to add {} and put the rest of the code in it

rigid sage
#

got it

#

done, i gtg ill come back and finish the item

#

public class afkon implements CommandExecutor {
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s , String[] strings) {

        Player p =(Player) commandSender;

    p.getPlayer().getWorld().getName().equals("AFK");

    ItemStack token = new ItemStack(Material.DIAMOND,1);
    ItemMeta itemMeta = token.getItemMeta();
    itemMeta.setDisplayName(ChatColor.YELLOW + "" + ChatColor.BOLD + "AFK" + ChatColor.GREEN + "" + ChatColor.BOLD + " Token");
    itemMeta.lore(Collections.singletonList(ChatColor.BOLD + "" + ChatColor.GOLD + "Trade With AFK Villager"));
    



    return true;
}

private boolean getPlayer() {
return true;}

}
now i need to give the player the item then extend it to bukkitcollectibles, how to give it to the players

remote swallow
#

you need to extend it to bukit collectibles because?

vital sandal
#

how could I load a world without stopping the server?

#

with WorldCreator It stop the server for a few tick

icy beacon
#

also why are you blindly casting sender to player

#

why is there an "equals" that does literally nothing

#

why are you not passing meta back to item

#

why are you not doing anything with the item

sullen canyon
#

stop

#

asking

#

stupid

#

questions.

eternal night
quaint mantle
#

Runnable

remote swallow
#

?scheduling

undone axleBOT
chrome beacon
#

^^

sullen canyon
remote swallow
#

what

sullen canyon
#

not stopping

#

like freezing

remote swallow
#

thats what stopping means in this case

#

same way blocking would fit in

mossy marlin
#

hum i have question is that possible to have just unique jar file because i have 3 files

orginal-artefact.jar
artefact.jar
main-1.0-snapshot.jar

remote swallow
remote swallow
sullen canyon
remote swallow
#

i dont use paper api so i wouldnt know

#

spigot isnt designed to be async so it most likely wouldnt work

mossy marlin
remote swallow
#

that isnt normal, you should get that file every time you run package

mossy marlin
#

i found my problem

#

<finalName>bingo</finalName>

#

i was using that

desert spade
#

it's not within the scope

#

you need to set it as a global variable

remote swallow
#

public class ClassName {
    private static BukkitTask flyingTask;

    public static void createTask() {
        flyingTask = ...;
    }
}
#

or where ever you create the task

echo basalt
#

static

#

no

#

hell no

rigid sage
rigid sage
remote swallow
vital sandal
#

is it possible to load world in another thread

rigid sage
#

Uh

#

Okay.

#

Did not know that

rigid sage
desert tinsel
#

how to use firebase with spigot?

remote swallow
kind hatch
native ruin
#

keep user data i'm assuming

remote swallow
rigid sage
remote swallow
#

var is short for variable

rigid sage
#

@override for on enable

remote swallow
#

i can show you what i mean if you want

rigid sage
rigid sage
remote swallow
#

give me like 20 min

rigid sage
#

Alr

#

Also show me what its supposed to look like with on enable, thanks

vital sandal
#

is it possible to load world in another thread
or at least make it not causing the server to freeze

hybrid spoke
vital sandal
#

?

desert tinsel
#

is possible to use firebase in spigot?

vital sandal
#

but you need to learn java and maven/gradle stuffs first

desert tinsel
#

i just get this error Encountered an unexpected exception java.lang.SecurityException: Invalid signature file digest for Manifest main attributes at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:340) ~[?:?] at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:282) ~[?:?] at java.util.jar.JarVerifier.processEntry(JarVerifier.java:327) ~[?:?] at java.util.jar.JarVerifier.update(JarVerifier.java:239) ~[?:?] at java.util.jar.JarFile.initializeVerifier(JarFile.java:762) ~[?:?] at java.util.jar.JarFile.getInputStream(JarFile.java:845) ~[?:?] at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:173) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:144) ~[spigot-api-1.19.2-R0.1-SNAPSHOT.jar:?]

hybrid spoke
# vital sandal ?

you cant prevent the lag in spigot, you can only make it smaller by not preloading the spawnchunks

sullen canyon
rigid sage
rigid sage
#

Thanks for this btw

remote swallow
#

just testing it now

rigid sage
#

Alr

remote swallow
rigid sage
#

Thanks

#

Alot

#

Lemme see if it gets the job done

remote swallow
#

do /afkrewards set while holding the item you want as a reward, and change the world name in config.yml then /afkrewards reload and it should give them the item every however may minutes, set in config, they are there

rigid sage
#

WOW THANKS MAN

#

thanks alot, imma learn more java first before going into this, really appreciate it man

#

the config will generate once the pl has be loaded right?

remote swallow
#

yeah

rigid sage
#

thanks alot

#

also intellij idea is the way to go for bukkit coding right?

remote swallow
#

yeah

sly berry
#

how do I get the source code of a minecraft server?

#

do i have to decompile the server jar and apply mappings?

#

or is there another way

hazy parrot
#

?nms

hazy parrot
#

@sly berry ^

sly berry
#

alr

tender shard
rigid sage
#

Alr

vital sandal
#

or just a way to keep server running as well as loading the world

rigid sage
#

@remote swallow sorry for the ping, it detects player movement or just gives it to ppl in the world

remote swallow
#

gives it to each player in the world every X minutes they've been

#

you can change the world in config.yml

rigid sage
#

alr

#

thanks

#

it works! thanks alot

vital sandal
#

So is it possible to force chunk to not loading?

rigid sage
#

my spigot jar got skill issue i be3lieve

#

cuz

#

executable items aint loading

#

its in plugins folder but the plugin aint pluginning

young knoll
#

Read the startup log

native ruin
#

i installed the buildtools thingy and executed it, then i've added

            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>```
to my dependencies but it doesn't allow me to use nms
eternal oxide
#

installed?

#

did you run it?

#

?nms Follow this how-to

native ruin
#

i'll check it out

native ruin
#

nope, i can't get it to work

desert spade
#

what doesn't work about it

eternal oxide
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

echo basalt
#

Well

#

You'll need knowledge of both java & python for that

#

Basically you'll need to write a protocol

#

and send custom packets

#

you could use redis pubsub

#

subscribe on java

#

publish on python

#

but it's a rather complex task

#

I'd recommend you learn java first

#

if you want to make any sort of plugin

#

?learnjava

undone axleBOT
echo basalt
#

Java is very similar to C#

#

mm vulnerability

toxic tartan
#

Dear god

echo basalt
#

Time to break that system into a few steps

eternal oxide
#

Learn Java sockets

toxic tartan
#

Lor just use SSH

#

and host it on a virtual screen you can detach

#

on mobile use JuiceSSH as a good ssh client

#

means its secure compared to whatever you could create from scratch

eternal oxide
#

initial impression thsi will not work

#

it's using the same socket as Minecraft

dawn flower
#

it also uses this thing

eternal oxide
#

You can not do that, The socket is already in use

dawn flower
#

when i tried rcon it was hella buggy and sometimes wouldnt even connect

#

and idk how to even connect to rcon properly

remote swallow
#

if your server has a decent amount of ram use discord srv

echo basalt
dawn flower
#

discordsrv doesnt have remote console

remote swallow
#

it does

#

i use it

echo basalt
#

pretty sure it does

dawn flower
#

wait lemme try

echo basalt
#

I've worked with the creator of discordsrv before

#

he's smart enough to have done it already

remote swallow
#

whos the creator, is it scarz or vanka or whatever his name is

echo basalt
#

scarcz

remote swallow
#

oh they finally are back to being DiscordSRV support not NotcordSRV

dawn flower
#

aight i installed discordsrv now what

echo basalt
#

set it up

toxic tartan
#

Alright guy, I have a unique issue. There is unique world generation differences when comparing vanilla to spigot (and paper) 1.12.2 (Yes I know its old, its for 2b2t okay). This is specifically related to cave generation and it seems like some kind of rounding error. Screenshot is linked https://imgur.com/a/sbANNYt

remote swallow
#

create a discord bot instance and a server, invite said bot and add the token to discord and the channel id in the config

dawn flower
#

shoot its not webhooks?

toxic tartan
remote swallow
dawn flower
#

do i need to do any bot coding or is it auto

cinder abyss
#

Hello, how can I check if 3 specific items have been thrown on the ground?

echo basalt
#

auto

dawn flower
#

ok good

cinder abyss
echo basalt
#

hmm

toxic tartan
echo basalt
#

I'd probably do a scheduler thing

#

with proper handling to avoid memo leaks

#

just have a list of matching item uuids

#

loop through that list

#

group them together

cinder abyss
#

I'll test

echo basalt
#

something like

toxic tartan
#

I linked a folder of patchs that are used

dawn flower
#

where do i change the bot token

remote swallow
#

it might not even be in a patch, it could just be anything to do with world gen/chunk gen

toxic tartan
remote swallow
#

pretty much

#

if its not chunk gen it might not be in craftbukkit but spigot patches

echo basalt
#

nvm grouping them is annoying

remote swallow
toxic tartan
#

Yeah I compared my client mod to vanilla world generation

#

the chunks made match exactly in terms of caves

echo basalt
#

so the chunks that you're at might be generated in a previous version

toxic tartan
#

so im thinking only the patchs for paper/spigot could cause these world generation things

toxic tartan
#

all had the same phenomina except vanilla

#

I have tried

craftbukkit
spigot
paper
echo basalt
#

what about more exotic software?

toxic tartan
#

wdym?

echo basalt
#

forks of paper

toxic tartan
#

I havent checked those because it takes time to set up all of these servers and check them

#

😅

#

but basically the client mod generates the world using vanilla world generation

#

and compares it to the chunks the server sends

#

so vanilla server + vanilla world gen client mod == match

#

but anything else + vanilla world gen client mod == differences with cave generation

dawn flower
#

i cant find where to change the bot token in discordsrv :/

#

nvm i found it

toxic tartan
#

if you have a look at the screenshot it makes me almost think the blocks were being rounded the wrong direction

#

when using the noise to block placement

echo basalt
#

well hmm

toxic tartan
#

block placement/removal threashold etc

echo basalt
#

you'll need to severely reverse-engineer the whole world gen process

#

and compare numbers

#

basically make a spigot fork

#

and make a ton of debug lines

toxic tartan
#

Well i was hoping i could just read the differences made in paper/spigot that create this world gen change

echo basalt
#

printing out numbers

toxic tartan
#

In here I already checked the WorldGen patches

#

please lmk if you see anything else that may be related

#

to WorldGen or the noise used for such

#

or especially cave generation

toxic tartan
echo basalt
#

block populators could be a start

toxic tartan
#

or a group of patches

echo basalt
#

there is something about populators in the Chunk class

toxic tartan
# echo basalt there is something about populators in the Chunk class

Here is the only thing i found, unsure if its related to my issue

+            // CraftBukkit start
+            BlockSand.instaFall = true;
+            Random random = new Random();
+            random.setSeed(world.getSeed());
+            long xRand = random.nextLong() / 2L * 2L + 1L;
+            long zRand = random.nextLong() / 2L * 2L + 1L;
+            random.setSeed((long) locX * xRand + (long) locZ * zRand ^ world.getSeed());
+
+            org.bukkit.World world = this.world.getWorld();
+            if (world != null) {
+                this.world.populating = true;
+                try {
+                    for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
+                        populator.populate(world, random, bukkitChunk);
+                    }
+                } finally {
+                    this.world.populating = false;
+                }
+            }
+            BlockSand.instaFall = false;
+            this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
dawn flower
#

discordsrv works perfectly ty :>

echo basalt
#

it creates a new random with the same seed to not tick the existing random but

#

try it out

toxic tartan
#

I dont usually work directly on spigot/paper sorry

echo basalt
#

Random random = new Random();
random.setSeed(world.getSeed());

#

This creates a copy of the random so that when you call nextLong it doesn't interfere with the world's random generation

#

effectively making it maintain compatibility with vanilla

toxic tartan
#

Gotcha

#

Thanks

#

also might be related to this

#

Unexpected terrain generation change in the end

echo basalt
#

that was on 1.16

toxic tartan
#

true, and its only for nether/end

smoky adder
#

i tried to use InventoryOpenEvent but it doesn't work, i tried to send a message to the player when it runs but it doesn't work. In the same class I have an InventoryCloseEvent and it works can you help me?

eternal oxide
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

smoky adder
eternal oxide
#

Whats the issue? not working is not descriptive

smoky adder
#

When I open the inventory it should check "Inventory open" in chat and remove the arrow but it doesn't work. Invence onCloseInventory works fine

flint coyote
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

eternal oxide
#

you see no message on opening?

smoky adder
#

yes

#

i don't see message

eternal oxide
#

You will only receive an open event if it's an inventory other than the Players.

#

Player inventories are client side and fire no event for open

#

From memory

smoky adder
#

oh

eternal oxide
#

open a chest and it will fire

smoky adder
#

so I can't send a message when I open the player inventory?

eternal oxide
#

no

smoky adder
#

okay thanks

shadow night
eternal oxide
#

the client no longer seeds a packet when the player opens their own inventory. Only interactions

shadow night
#

When did it send a packet tho?

eternal oxide
#

many years ago

shadow night
#

Time doesn't work here, we're talking about minecraft, tell me the version

eternal oxide
#

Like I'm going to remember what version something stopped happening

#

thats current

flint coyote
eternal oxide
#

pretty sure that was a mis-quote

flint coyote
#

Nah it wasn't. I was just saying that there's no reason to remember when things like that changed

eternal oxide
#

ah

flint coyote
#

I was just a little late to respond

sly berry
#

but i cannot seem to find any packets in there

eternal oxide
#

packets?

sly berry
#

yeah

#

c2s and s2c packets

eternal oxide
#

?nms Did you follow this howto precisely?

eternal oxide
#

c2s?

#

don;t use abreviations

sly berry
#

client to server

sly berry
eternal oxide
#

what packets are you looking for?

eternal oxide
sly berry
#

i replied to the message

sly berry
eternal oxide
#

he told you to follow the nms howto and you are talking about packets so I'm assuming you are looking for NMS packets

#

if you followed the howto nms you will have all the packets available

sly berry
#

there's only one step on the website

#

java -jar BuildTools.jar --rev 1.18.2 --remapped

#

this

#

and I did that

eternal oxide
#

no theres a lot more

#

theres a lot of pom entries

sly berry
#

i have to put the entries in the pom.xml file in "Spigot" folder right?

wet breach
hazy parrot
#

Are you even using maven?

#

You have to put it in your pom

summer scroll
#

I'm trying to read a json file, what should I do If I want to get the value code from this json?
I have the JsonObject, but don't know what should I put on json.get("?")

{
  "data": {
    "id": 40,
    "code": "094006746161",
    "balance": {
      "starting": "60.00",
      "remaining": "60.00",
      "currency": "GBP"
    },
    "note": "My note",
    "void": false
  }
}
shadow night
#

how do I get the damage cause in EntityDamageEvent?

shadow night
round finch
#

aShakeEyes someone talking about packets ayo

sly berry
#

this is the buildtools folder

#

so where exactly is the pom....?

wet breach
round finch
summer scroll
wet breach
#

well try the way I said

#

and it depends on the lib you are using

summer scroll
#

I'm using Gson, what do you mean by try putting code in the get?

#

Oh I got you

wet breach
#

json.get("code")

summer scroll
#

Yeah, I was confused lmao.

#

Alright, will try that, thanks!

wet breach
#

the other way you might have to do it, is to get data and then iterate over that

#

I typically just use JsonSimple

sly berry
eternal oxide
sly berry
#

I am trying to see the source code

#

specifically the packets

eternal oxide
#

then add --generate-source to your buildtools commandline

#

once run you will have a work folder

wet breach
summer scroll
wet breach
#

what does the NPE say?

hazy parrot
#

you cant just get code

#

you have to get data json object

#

then get code from it

#

((JsonObject) json.get("data")).get("code")

summer scroll
summer scroll
hazy parrot
#

yeah that would work too

summer scroll
#

It works perfectly, thank you so much guys for the help!

wet breach
# hazy parrot you cant just get code

I figured that might have happened, however as I stated it depends on the lib. I am not super familiar with using Gson, I typically use Json Simple 😛

#

so a way you could iterate data is like so

#
JSONArray array = (JSONArray) JSONValue.parse(string);
JSONObject latestUpdate = (JSONObject) array.get(array.size() - 1);

Not sure if this works with Gson, but this is how you would do it with JsonSimple or a way anyways lol

remote swallow
#

at all have you asked chat gpt if it may know

wet breach
#

I don't need AI's help 🙂

remote swallow
#

we dont need it but it could stand the change to speed stuff up

eternal oxide
#

another few years and AI will be writing full plugins and you will all be out of work

flint coyote
#

X doubt

eternal oxide
#

Then it's onto full games

fluid river
#

it would need music writing, texture creating and other stuff for that

#

dialogue lines, story writing

eternal oxide
#

Yes

#

have you seen teh leaps AI has taken in teh past few years?

#

Look at some of the paintings it has created recently

#

It's even creating porn as good, or better, than real actors

ancient plank
#

Good porn is a low bar

eternal oxide
#

Deep fakes almost indistinguishable from the original

#

10 years ago AI was about the standard of canned responses to specific prompts

flint coyote
#

As in every (technical) aspect the acceleration decreases over time.
It will take at least another 30 years before AI can write code on request that is stable, maintainable and expandable for any project that isn't "give player a block when he steps on a GRASS_BLOCK".

eternal oxide
#

The improvements are accelerating

#

You are thinking about Human technical development

#

That slows down as time progresses

#

AI is accellerating.

flint coyote
#

No I'm not. And especially for games that receive updates AI will suffer.
It learns from challenges that were already solved. When a new feature is created it won't be able to solve it because it has no data. You would still need humans to serve it that data

wise mesa
#

AI is overhyped

eternal oxide
#

for a few years

#

There is a new AI just recently released which tests itself

#

It posits problems and judges it's own solution

#

then refines over and over

flint coyote
#

And even if AI could write code as good as humans you'd still have to give it very specific instructions. Including the handling of some edge cases - such specific instructions cannot be written by anyone. You still need technical knowledge. Also lets be real: There's a lot of simpler jobs to replace with AI than programming

eternal oxide
#

It will reach a stage where the AI designers no longer understand what the AI is doing, but the results will be what was asked of it.

wise mesa
#

Instead of coding directly you’ll be telling chat gpt what to code

#

But it’s not gonna build your whole app for you

flint coyote
#

Yeah but for the next 20-30 years it will see hard limitations + as I just said it needs very specific instructions.
Honestly I'd appreciate an AI that does the work for me by just knowing how to ask for it.
I'd rather spend 10 hours writing an essay for what it should do than to code it for 6 weeks.

Being that specific with your requests will be an uncommon skill that you will get a lot of money for.
Especially if you can review if the AI implemented everything correctly by taking a look at the code afterwards

fluid river
#

gl

eternal oxide
#

Eventually it will

wise mesa
#

You still have to be very explicit about each tiny part

eternal oxide
#

at the moment

#

eventually there will be near zero human input

flint coyote
#

That would require AI to understand exactly how humans think and that will not be achieved in the near future

eternal oxide
#

It will be AI deciding what will sell the best, another AI producing that product and yet another AI tricking people into spending your government assigned credits on it.

flint coyote
#

It will be AI deciding what will sell the best
If the AI uses internet to decide that, whatever you will create will contain nudity of some sort

eternal oxide
#

lol probably

#

They'll dress it up in drag so they can call it family friendly

tender shard
#

quick, I need a poem about enums

#

nvm I found one

eternal oxide
#

a chatGPT job if I ever saw one

flint coyote
# eternal oxide a chatGPT job if I ever saw one

Yup there it is
Enchanting enums, how they mystify,
With every value distinct and sly,
A set of constants, an ordered list,
Each one a symbol, not to be missed.

Some may hold strings, others just ints,
But all carry meanings, like subtle hints,
They organize data with neat precision,
Adding structure to code, a programmer's decision.

From weekdays to colors, to states of mind,
Enums make code more readable, easy to find,
They keep bugs at bay, errors in check,
Simplifying code, with fewer lines to trek.

Oh, the wonder of enums, a coder's delight,
A simple tool, that makes everything right,
From novice to pro, they make coding fun,
A powerful feature, a language has won.

wise mesa
eternal oxide
#

drag is political now?

tender shard
#

it wrote this for me

Enums, oh enums, so steadfast and true,
A list of constants, defined anew,
With each value named, a unique hue,
A powerful tool, for coders to imbue.

An enum's purpose, it's plain to see,
To give a type, a sense of identity,
A finite set, of values quite tidy,
To make code, more clear and tidy.

From colors to days, to states of play,
An enum can hold, a myriad of ways,
To classify data, in so many ways,
And make programming, a breeze and a craze.

Oh enums, how you simplify code,
By providing clarity, in the developer's abode,
You give meaning, to data untold,
And help coders, to lighten their load.

So let us cherish, these constants so fine,
And use them with care, in every design,
For enums are a tool, that can refine,
And make programming, an art so divine.

wise mesa
#

But I thought you were referring to the whole debate about the drag story times

#

And all that stuff

#

And let’s just not get into it

flint coyote
raw epoch
#

Hey can someone know hwo to import in gradle its own plugin ? Like i have 2 plugin and i want to use a custom event from one in the other ! 😄

flint coyote
#

I don't know gradle but I can explain how it works with maven, maybe you can do the translation

#

For maven it's really simple. You just run mvn clean install which install the jar inside your .m2 repository.
Then you just add it as a dependency like any other project (see example below)
Since maven (and I'd assume gradle aswell) checks the local repository before searching online it will find it.

        <dependency>
            <groupId>de.fabsi</groupId>
            <artifactId>eventengine</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
remote swallow
#

you need the maven publish plugin for gradle and you can gradlew publishToMavenLocal then just need the mavenLocal repo and your good

grizzled oasis
eternal night
young knoll
#

I’m guessing you never initialize the array

grizzled oasis
eternal night
#

share that logic too

grizzled oasis
eternal night
#

can you also share the full error ^

grizzled oasis
eternal oxide
#

Caused by: java.lang.NullPointerException: Cannot read the array length because "this.paginableSlots" is null

grizzled oasis
eternal night
#

its the slots

#

not the icon array

#

you set the paginable items list

#

but never the call setPaginableSlots

grizzled oasis
eternal night
#

in what update ?

grizzled oasis
eternal night
#

you call setPaginableItems

#

not setPaginableSlots

remote swallow
#

^^

grizzled oasis
#

im stupid

fresh timber
#

if I have a block location, how can I get every block in a 1 radius around that like so I would get all 26 around the 1 block

eternal night
#

I mean, three for loops and a simple if x == 0 y == 0 and z == 0 ?

#

alternatively, could use the blockface enum

#

and exclude the SELF variant

eternal oxide
#
Set<Block> blocks = ..
for (BlockFace face: BlockFace.values()) {
    blocks.add(block.getRelative(face));```
eternal night
#

Just exclude SELF ^ otherwise you end up with 27 blocks in that set

eternal oxide
#

if you don't want the origin

terse ore
#

?jd-s

undone axleBOT
fresh timber
eternal oxide
#

you are changing the origin block

#

for loop runs over teh same base block

fresh timber
#

wdym

eternal oxide
#

?paste your code

undone axleBOT
fresh timber
eternal oxide
#

looks fine to me

fresh timber
#

to do what

#

what it does in video or a 3x3 box

eternal oxide
#

select a cube

#

3x3

fresh timber
#

hmm

#

thats weird

fresh timber
#

hmm ok

#

how would a for loop like that work

eternal night
#

block face is just fucked KEKW

echo basalt
#

x = -1

#

x <= 1

#

x++

#

same for Z

#

and for Y if you want that

eternal oxide
#

use a Set not a LIst

#

list can have duplicates

fresh timber
#

o

#

ive not used sets yet I always just use lists

eternal oxide
#

actually I'd crteate your own enum setOf

#

theres a few odd BlockFaces you don;t want

#

Yep I'd do a static final Enum.setOf

eternal night
#

the block faces are fucked tho

eternal oxide
#

thats why you create your own, only using the ones you want

#

none of the stupid WEST_NORTH_WEST

#

Enum.setof(BlockFace.NORTH_WEST, BlockFace.NORTH, BlockFace.NORTH_EAST...

eternal night
#

I mean, it is missing some they need tho so like

#

like, its missing NORTH_WEST_UP

#

for a 3x3

#

just go with a for loop KEKW

eternal oxide
#

you can run it three times, one for y-1, one for y and lastly y+1

eternal night
#

I don't see the advantage over a for loop honestly

eternal oxide
#

Yours is probably simpler

#

mine would be easier to read is all

#

yours would be 3 for loops

#

so same

eternal night
#

yea

quasi pawn
#

Hello can somebody help me

#

I need a scoreboard skript

fresh timber
#

so, ehm, in here

        Location loca = event.getBlock().getLocation();
        for (int x = loca.getBlockX() - 1; x <= loca.getBlockX() + 1; x++) {
            
        }

would I just make like a list or set of all of the X's and do same for Y and Z then clear all those blocks with the first in each list and 2nd in each list and so on or what

fresh timber
#

u went to spigot plugin development to get help with skript

quasi pawn
#

yes

#

i did that

fresh timber
#

weird

young knoll
#

Skript has a discord

fresh timber
echo basalt
#

my man

fresh timber
#

?

eternal oxide
#
for (y = -1; y <= 1; y++) {
for (x = -1; x <= 1; x++) {
for (z = -1; z <= 1; z++) {
event.getBlock().getRelative(x,y,z).setType(Material.AIR);```
echo basalt
#
for(int xRelative = -1; xRelative <= 1; xRelative++) {
  for(int zRelative = -1; zRelative <= 1; zRelative++) {
    for(int yRelative = -1; yRelative <= 1; yRelative++) {
      Block relative = block.getRelative(xRelative, yRelatize, zRelative);
    // do whatever
    }
  }
}
small current
#

Im trying to clone a SlimeWorld, but no world is created and this shows up in the console
[19:29:09 INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'private-192909'
[19:29:09 INFO]: [ChunkHolderManager] Halted chunk system for world 'private-192909'

#

Someone can help here

#
        SlimeWorld slimeWorld = getSlimeWorld(world)
                .clone("private-" + now.format(formatter));
        SlimeNMSBridge.instance().loadInstance(slimeWorld);
#

SlimeWorldManager

orchid trout
#

contact the plugin developer

regal scaffold
#

Did something change in 19.4

#

Regarding player display name?

#

As in, nametags?

#

I'm doing player.setDisplayName(name) and I can see my own new name

#

But other players don't see it

rotund ravine
#

Got another plugin?

regal scaffold
#

No

#

I see my own nickname

#

But others just see "TSans_"

small current
orchid trout
#

what version are you using?

river oracle
#

Then find an alternate or make your own

regal scaffold
#

19.4

#

That's why I'm curious if something changed

orchid trout
#

@small current what version is your project?

small current
#

aswm latest

orchid trout
#

the last slimeworldmanager commit was in 2020

small current
#

ASWM

misty ingot
#

anyone know why when I am compiling my plugin IntelliJ sometimes fails to delete target and so I have to do it manually

chrome beacon
#

Run it again

woeful valve
#

Hello I have a question. They exist a plugin that execute bungee command with a gui? Pls

woeful valve
#

Ok

chrome beacon
#

putting it in every channel

misty ingot
regal scaffold
#

Olivo

#

Do you know of any changes in display name in 19.4?

#

I can see my own nickname I set using player.setDisplayName but others can't. they just see default name

woeful valve
chrome beacon
woeful valve
#

Ok

misty ingot
chrome beacon
chrome beacon
regal scaffold
#

I am big confused

tawdry echo
misty ingot
#

im on java 17

#

18*

chrome beacon
misty ingot
#

how can I update it?

chrome beacon
#

Change the version in the pom

regal scaffold
#

Feather

#

I'm literally loading up vanilla

#

Cause I had that feeling too

echo basalt
#

yeah

misty ingot
chrome beacon
#

The maven website

regal scaffold
#

It's not feather either

regal scaffold
#

Feather
I'm literally loading up vanilla

It's not feather either

misty ingot
#

it seems to have worked but now I have this

chrome beacon
#

It tells you what to do

misty ingot
#

oh right, theres a link

regal scaffold
#

Could it have something to do with offline mode?

#

Are displaynames handled differently?

#

Maybe by a plugin like authme to prevent stuff?

chrome beacon
#

Offline mode 💀

regal scaffold
#

Yeah I know

river oracle
#

Offline mode 💀

regal scaffold
#

As someone who has 5 accounts it's annoying

eternal night
#

Offline mode 💀

regal scaffold
#

But I either need to make sure it's a offline mode error

#

Or it's my plugin error

eternal night
#

what exactly are you trying to change with setDisplayName ?

regal scaffold
#

It's my prefix plugin

#

And it's the first time someone's said this issue

round finch
#

If(Bukkit.getPlayer(username)== null)return;

eternal night
#

I am surprised setDisplayName does anything beyond change changes to the nema

regal scaffold
#

It doesn't

#

I figured it out

#

It's something with auth

#

While the player isn't logged in

#

You can see

#

As soon as you log in, the display name is reverted

eternal night
#

makes more sense then yes

regal scaffold
#

Offline mode + auth things

eternal night
#

average offline mode problem

regal scaffold
#

Indeed

round finch
#

Anti vpn

#

Too

young knoll
orchid trout
#

how do i use completablefutures?

round finch
#

I have seen that shet in luckperms

young knoll
#

They are used to obtain a result at some point in the future

#

And then run a callback when the result is ready

orchid trout
#

yes

#

for sqlite

round finch
#

Sorry I'm handicapped on mobile

#

Pc so much better

echo basalt
#

@orchid trout

round finch
#

How to use it properly?

#

@echo basalt

echo basalt
#

Depends on the use case scenario

young knoll
#

It' s usually like

round finch
#

Oml that is advenced

young knoll
#

CompleteableFuture.supplyAsync.thenAccept

round finch
#

I'm a total noob in comparison

echo basalt
#

For example this is my CachingDatabase Interface

#

FancyFuture is my CompletableFuture wrapper that does some funky changes

round finch
#

You can use void

#

How and what

echo basalt
#

It's the boxed variant of void

#

basically a future with no return type

round finch
#

Usually i see voids in methods

#

That is new to me

echo basalt
#

this is the void generic type

rotund ravine
#

It’s the same as float and Float

#

Mostly

round finch
#

The more you freakin knows

ivory sleet
#

worth mentioning the term null can be expressed in terms of Void sometimes

echo basalt
#

yes

#

To create a completed Void future you do .completedFuture(null);

round finch
#

Generic types?

echo basalt
#

You know when you create a string list

#

it's a List<String>

#

String is the generic type here

round finch
#

How are you java devs not losing your head over all the crazy stuff

echo basalt
#

I use generic types quite often

misty ingot
#

anyone here have experience with AnvilGUI? (the package)

rich inlet
#

Hey!
When I call a static method from another class in the OnDisable() method, I get a NoClassDefFound error in console.

    public void onDisable() {
        InventoryMGR.restoreAllInventories();
    }```

Does someone know a solution or had the same problem? Thanks!
misty ingot
# misty ingot https://github.com/WesJD/AnvilGUI this thing

theres no third item for me to click on and complete the action even tho I set it in the code

    public static void openStoreAmountInput(Player player, ItemStack item, Inventory inv, String type) {
        new AnvilGUI.Builder()
                .onComplete((completion) -> {
                    if ((!completion.getText().isEmpty()) && completion.getText().matches("[0-9]+")) {
                        if (type.equalsIgnoreCase("buy")) {
                            buyItem(player, item, inv, Integer.parseInt(completion.getText()));
                        } else if (type.equalsIgnoreCase("sell")) {
                            sellItem(player, item, inv, Integer.parseInt(completion.getText()));
                        } else {
                            player.sendMessage(plugin.lang.getString("something-went-wrong")
                                    .replace("&", "§")
                            );
                        }
                        return Collections.singletonList(AnvilGUI.ResponseAction.close());
                    } else {
                        player.sendMessage(plugin.lang.getString("invalid-amount")
                                .replace("&", "§")
                        );
                        return Collections.singletonList(AnvilGUI.ResponseAction.close());
                    }
                })
                .title("Enter an amount")
                .text("Enter amount here")
                .itemLeft(new ItemStack(Material.ENCHANTED_BOOK))
                .itemRight(new ItemStack(Material.ENCHANTED_BOOK))
                .itemOutput(new ItemStack(Material.ENCHANTED_BOOK))
                .plugin(plugin)
                .open(player);
    }
harsh beacon
#

hello, I bought a plugin, who do I need to write to in order to receive the plugin?

misty ingot
#

also dont spam

misty ingot
echo basalt
small current
#

Can anyone help me with SWM or ASWM?

harsh beacon
#

I paid the money but I didn't get access

young knoll
#

once your payment is validated

small current
#

Can anyone help me with world cloning in SWM?

quaint mantle
#

how do i delete one of my spigot resources

young knoll
#

Report it and request deletion

quaint mantle
#

like this

young knoll
#

yes

quaint mantle
#

ok

haughty storm
#

How can I find the nearest biome of a type

twilit roost
echo basalt
#

why is it all in a single class

twilit roost
#

dunno in what to split them

tawny remnant
#

my npcs are having epileptic shocks and sometimes their body rotates like a helicopter anyone know how to fix it? I want to make them look at the nearest player
https://paste.md-5.net/coyiqutabi.cs

echo basalt
#

some things I'm seeing at a glance

#

invert your atan2 args for yaw

#

I'd create a dedicated runnable class for the look logic to not clutter your npc management class so much

rich inlet
twilit roost
orchid trout
#
  error.printStackTrace();
  return new ErrorData(); 
});``` what is errordata men
#

can i just replace with null

#

error.printstacktrace(); is handling it right?

twilit roost
hazy parrot
orchid trout
#

but it its exception then doesnt it mean it fail already

hazy parrot
#

?

#

It doesn't have to fail

#

But if it fail

#

Result be provided by exceptionally function

orchid trout
#

how

#

it only gets error

#

varibale

hazy parrot
#

?

#

It returns new cf

#

It's kind of handling, doesn't mean error wil happen

orchid trout
#

i dont understand

twilit roost
#

If error occurrs, the exceptionally function (content of it) will be executed and the return is what the function of yours returns

orchid trout
#

i know

twilit roost
#

u said u don't understand

orchid trout
#

do i have to return anything

twilit roost
#

u can return null, but handle that null in the places u use that method

hazy parrot
#

If you don't want to use return from exceptionally, why even use it? I mean you can always just return null yes

tawny remnant
#

my npc is weirdly rotating. He is flicking or something i dont know how to describe it. Also his head isnt turning towards a player can anyone help?

echo basalt
ocean hollow
#

how to find out if the player has chosen the right item? I use PlayerItemHeldEvent, but when I pick up an item, nothing happens, and when I remove it, the code is executed.

#

but there is no getItem method.

#

I thought about doing this, but it didn't work out for me

tawny remnant
tawny remnant
quaint mantle
#

Hello

#

I'm back to help my lovely community

#

?paste

undone axleBOT
quaint mantle
#

put it here

tawny remnant
quaint mantle
#

It looks fine to me

tawny remnant
#

chat gpt made that

#

to be honest

river oracle
#

ChatGPT can't code

quaint mantle
rough ibex
#

you can't depend on chatgpt

quaint mantle
#

i used chat gpt and it was fine

#

tbh

tawny remnant
quaint mantle
#

i also made a plugin out of chatgpt

river oracle
#

google is a better solution 100% of the time currently

tawny remnant
#

Y i guess

quaint mantle
#

the y ass is up to down

#

north to south

tawny remnant
#

Z then

flint coyote
tawny remnant
#

like this 🔃

quaint mantle
#

so it helped

#

W

#

i got muted for a week

#

but im back

river oracle
#

hopefully next time its a ban

earnest lark
#

?paste

undone axleBOT
quaint mantle
ocean hollow
earnest lark
#

target.getInventory().setItem(3,event.getCurrentItem()); this line of code is returning null for some reason

river oracle
#

null pointer error?

#

getCurrentItem may be null in that case

#

that or target

ocean hollow
# ocean hollow

it only works after switching from an item. and gives error

earnest lark
#

event.getItem is not a thing

#

goddam

#

chill out

ocean hollow
#

there is no such method

earnest lark
#

i saiud that

#

dummy

ocean hollow
#

1.16.5

quaint mantle
#

?google

undone axleBOT
ocean hollow
# ocean hollow

Yes, the result is the same as in the video @quaint mantle

#

Works only in case of switching from the block. If the previous slot is empty, then it does not work

#

there is no errors now

undone axleBOT
echo basalt
#

location.setDirection

#

and then grab yaw and pitch

ocean hollow
#

maybe this event works if it switches from item to item?

tawny remnant
#

it sucked ahh

lost matrix
#

If only there was a class to describe a direction...

#

You should honestly just get the yaw of the player and clip the direction to the nearest 45°

#

Saves you around 100 lines of code

rough drift
#

@ocean hollow Not tested, generated by BLOOM 560m

    private Direction getDirection(Location player) {
        if (player == null || player.equals(null)) {
            return Direction.NEGATIVE;
        } else {
            Direction dir = Direction.fromDegrees(Math.toRadians((float) player.getY()));
            dir.normalize();
            for (int i = 0; i < 4; i++) {
                dir.set(i, dir.get(i).negate());
            }
            return dir;

        }
    }

Try getting an idea from this, it's completely fucked

lost matrix
#

"player == null || player.equals(null)"
😄

rough drift
#
future.exceptionally(error -> {
            if (error!= null) {
                throw new RuntimeException(error);
            }
        }));
    }
}
rough drift
#

the intelligence of the version I am running is peanut

#

(It's already fuckin impressive that 0.15% of the entire model can do this lmao)

lost matrix
#

Oh didnt read that it was generated

rough drift
#

lol

rough drift
river oracle
misty current
#

can you get a subsection of a worldedit/fawe schematic?

torn shuttle
#

I wonder if this is a good idea, I want to at some point in the future make it so mobs can dig through the floor to get to you in cases where the mob is unable to get into your base for a different plugin, would it be a good idea for performance reasons to simplify the logic so that all mobs share the same routes if they determine something is inaccessible and cap the amount of routes to something like 2 routes per cardinal direction on a slow update speed?

misty current
#

how would I do that?

torn shuttle
#

with code?

misty current
#

yep

#

using the api

torn shuttle
#

easiest would be to just iterate through coordinates and get what is there

misty current
#

i have a Clipboard object

torn shuttle
#

might also be possible to use a mask for it but I have yet to look into masks too much

misty current
#

and i want to make a new Clipboard starting from xyz to x1y1z1

torn shuttle
#

just iterate through a for loop and get your points

#

you can get the blocks at the internal coordinates of a schematic

worldly ingot
misty current
#

that seems quite inefficient, since i need to get a section of the schematic to generate chunks

river oracle
#

really

#

lol

worldly ingot
#

But usually the reason why JIRA issues don't get touched for a while is because nobody PRs

torn shuttle
#

let choco cook, it's only been 8 years

river oracle
#

I'm just looking through jira rn lol

torn shuttle
#

actually I heard that choco is working on minecraft 2 as well

#

when is that coming out bud

misty current
torn shuttle
#

or via api I mean

#

I only read them

misty current
#

ah i see

#

thanks

#

i'll do some testing

#

also i can just run the cutting and reconstruction of the schematic async so no big deal

modest garnet
#

how do i open an inventory from the click of a itemstack in another inventory as just closing and opening dont work?

young knoll
#

Delay it one tick

modest garnet
echo basalt
#

ffs gradle multi-module never works

quaint mantle
#

So I created a custom item with a shaped recipe and was wondering how I can give it a custom texture, because in reality its just a wooden sword thats unbreakable and that has a damage modifier

weak meteor
#

First time using gradle, that .jar is the plugin?

#

well it worked

#

it is the plugin

#

lol

terse ore
desert shoal
#

I'm trying to find an item in a player's inventory with .getItemMeta() and cast it to Damageable, but am getting a ClassCastException exception because "CraftMetaItem" can't be cast to Damageable. Shouldn't .getItemMeta() return a copy of ItemData, not CraftMetaItem?

#

edited class names

young knoll
#

Make sure you have the right damageable import

desert shoal
#

Thank you, second set of eyes is all it takes 🙏

quaint mantle
echo basalt
#

this is wack

quaint mantle
#

Or what I should look for to possibly fix it

echo basalt
#

damage is something else iirc

#

just look at the vanilla resource pack

earnest lark
#

how can i modify a entity inside of a command

quaint mantle
#

Because right now it just has the wooden sword texture

#

So I made a resource pack

echo basalt
earnest lark
#

yuea

#

but then i cant put it into a spawnEntity

#

?PASTE

#

?paste

undone axleBOT
echo basalt
#

you either:

  • have multiple classes extending JavaPlugin
  • are creating a new instance of your plugin
echo basalt
earnest lark
#

yes

#

i want to modify the specific details

#

like making a creeper charged

echo basalt
#

you cast it to whatever and then apply metadata

#

Creeper#setPowered

#

etc

#

Already told you the problem

earnest lark
#

why dont you make a second class for your events

#

bro

#

line 162

#

line 19

#

they both extend JavaPlugin

#

like he told you not to do

#

bro

#

do you know java

#

im not an expert or anything

#

but i can understand you arent listining

echo basalt
#

?learnjava

undone axleBOT
echo basalt
#

It's always one thing here, one thing there