#help-development

1 messages · Page 1918 of 1

latent zephyr
#

Where to find this plugin?
I was told that it can be found in the article Spigot & BungeeCord 1.17 & 1.17.1, but maybe because of my English I didn't find it :(

tender shard
#

the code I sent is part from my NMS library. In my "normal" code I can now just do stuff like this:

Object fakeEntity = createFakeEntity(EntityType.CREEPER);
showEntityToPlayer(fakeEntity,player);
#

@young knoll

#

otherwise i'd have to import net.minecraft....Entity

#

and that would make my NMS library unncessary

young knoll
#

I guess

quiet ice
#

A long time ago then

tender shard
#

a String? in java?

#

strings in C are char arrays IIRC, but in java? o0

quiet ice
#

hm, actually J8 uses char[]

wet breach
#

Strings are built on top of char array, but are not the same

quaint mantle
#

Chekx out compact strings

young knoll
#

I always though string was just a fancy char[] wrapper

tender shard
#

it's complicated but it's not just a fancy char[] wrapper

quiet ice
#

Unicode and Charsets are one of the reasons it isn't a simple wrapper

tender shard
#

a String's value is a byte[]

quiet ice
#

on modern versions of java (Java 9+) that is

tardy delta
#

👀

#

im confused

tender shard
#

oh right, I accidently opened java 17

young knoll
#

TIL @stable is a thing

tender shard
#

TIL?

#

yes in 1.8 it's indeed a char[]

#

anyway a String is way more than just a wrapper

eternal night
#

I always love the til til moments

young knoll
#

Today I learned

tender shard
#

oh

#

thx

quaint mantle
#

byte[] is used for compact strings - sometimes, you dont need 2 bytes for a char

tardy delta
#

what did we learn today?

young knoll
#

That the people developing java aren’t stupid

quaint mantle
#

To be honest it would be so much nicer if string would be an interface

tardy delta
#

why?

quaint mantle
#

instead, we would just have UTF16String and Latin1String

lavish hemlock
#

Problem:

#

String is a ctpool type

#

Or a constable type

#

The JVM automatically converts constant pool entries of type String to an instance of String

#

Which is how ldc "string constant here" works

#

That gets much harder when you add interfaces

young knoll
#

Big fancy words

lavish hemlock
#

Nope, just stating it as it is

#

So yeah the problem boils down to all strings automatically being UTF-8 by default

#

And the fact that the JVM classfile spec can't really handle inheritance in the constant pool

#

e.g. how does the compiler know what format you mean by "Hello, World!"?

tender shard
#

oh I have an awesome idea

#

allatori lets you define custom names for obfuscated field, method and class names

#

I'll just create a file full of those uwu utf8 emojis

#

decompiled classes will look like this

if((❀˘꒳˘)♡(˘꒳˘❀).( ͡o ꒳ ͡o ).equals(( ˶˘ ³˘(ᵕ꒳ᵕ)*₊˚♡)) ⋆⛧*﹤ಇ( ᵕ꒳ᵕ)ಇ﹥*⛧⋆();
young knoll
#

I’m sure spigot would love that

lavish hemlock
#

that is awful

#

and also great

tender shard
#

yeah haha I'll try it tomorrow

lavish hemlock
tender shard
quiet ice
#

I think using this is allowed for premium resources, right?

tender shard
young knoll
#

Iirc it has to be readable when decompiled

tender shard
#

currently I use keywords for fields and methods

#

e.g.

if(if.else().equals(done)) { for(); }
lavish hemlock
tardy delta
#

😂

tender shard
#

works in bytecode ¯_(ツ)_/¯

#

but I like the uwu variant even more

tardy delta
young knoll
#

Obfuscation / DRM
You are allowed to obfuscate your resources, however the decompiled code must be somewhat legible by staff.

tender shard
young knoll
#

Quick someone sick optic on him

#

:p

tender shard
#

optic mocked me already for my obfuscation twice

#

so I guess it's fine as it is right now

quiet ice
#

I mean, it is rather straightfoward to rename all unreadable names

true vault
#

I just switched from the jar library to maven and noticed this, i already asked this question and then found a solution for myself, but this one didn't work in my other project, which is weird.

#

Do i have to use ChatColor.COLOR instead of §?
I heard that you should do that but i never changed my old code

tender shard
true vault
#

I used <maven.compiler.source>8</maven.compiler.source> <maven.compiler.target>8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
or
<encoding>UTF-8</encoding>

tender shard
#

if your sources are in some weird CP12345 format it will probably break

true vault
tender shard
#

erm

#

intelliJ?

true vault
#

yup

#

wait i can look it up myself

tardy delta
#

on the bottom of your ide

tender shard
tardy delta
#

oh

quiet ice
#

isn't that present on almost every text editor?

#

except eclipse perhaps

young knoll
#

... shh

#

There’s an addon for it

tardy delta
#

HERE WE GO

#

lol

hasty prawn
young knoll
#

Yeah but that ones default

neon minnow
#

hi all

#

i have a question

#

how do i onEnable launch a cmd on server? thorugh console when plugin starts

#

like gamerule

#

thank you ❤️

tardy delta
#

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "gamerule")

#

idk if there has to be a slash before the gamerule

neon minnow
#

thank you

quaint mantle
#

Whenever I execute this (its part of command) i get internal error occured while attempting to perform this command

                World world = p.getWorld();
                ItemStack bow = new ItemStack(Material.BOW, 1);
                ItemMeta bowmeta = bow.getItemMeta();
                bowmeta.setDisplayName(ChatColor.RED + "Bow Of Dumbness");
                ArrayList<String> lore = new ArrayList();
                lore.add("Useless Bow...");
                bowmeta.setLore(lore);
                bow.setItemMeta(bowmeta);
                bow.addEnchantment(Enchantment.ARROW_DAMAGE, 5);
                bow.addEnchantment(Enchantment.ARROW_KNOCKBACK,5);
                p.updateInventory();
                p.getInventory().addItem(bow);```
tardy delta
#

what's the error in the console?

young knoll
#

addUnsafeEnchant

neon minnow
young knoll
#

Punch 5 is unsafe

true vault
young knoll
#

But set the gamerule with the API, not by running a command from code

delicate lynx
#

there is some function for adding unsafe enchants

young knoll
neon minnow
#

Oh one more qustion everyone. i was thinking of using an api to establish a connection to the database then using my mc game server to talk to api to get db stuff, would it drastically ruin performance and cause lag to players or would it be okay to talk to an api for db stuff rather than direct connection to db ?

red ridge
#

hello

i want to create a potion with a custom level
what i have so far is this:

private ItemStack createPotion(){
        ItemStack potion = new ItemStack(Material.POTION);
        PotionMeta pm = (PotionMeta) potion.getItemMeta();
        assert pm != null;
        PotionEffect potionEffect = new PotionEffect(PotionEffectType.JUMP, 30, 2);
        pm.setBasePotionData(new PotionData(PotionType.JUMP));
        pm.setColor(Color.WHITE);
        potion.setItemMeta(pm);
        return potion;
    }
neon minnow
red ridge
# true vault So whats your question

i can add a potion effect to a player with the level 2 or 5 so i can jump 6 block high or something like that
now i want this kind of effect in a potion

young knoll
#

See PotionMeta

tardy delta
#

run your code to do database stuff async (not on the main thread, or it will lag the server)

#

?scheduling

undone axleBOT
tardy delta
#

i guess your "api" is something like hikaricp

#

i'd recommend using that

red ridge
# young knoll See PotionMeta

okay i guess i found it now XD maybe its addCustomEffect() in PotionMeta what i need thanks
i didn't saw this method earlier^^

latent zephyr
mortal hare
#

dumb simple question

#

is using mojang's mappings in the plugin's source code legal?

young knoll
#

Wym no?

mortal hare
#

i've installed maven plugin which translates mojang's mappings to spigot mapping's whenever the maven project gets built

young knoll
#

Ah like hosting it on git

wet breach
#

well you can use the mappings, but you can't use the mappings for anything else but reference purposes

mortal hare
#

and im thinking if using the same field and method names is legal

neon minnow
young knoll
#

No you can use them for more than reference now

#

The license changed at some point

wet breach
#

what is the license now?

tardy delta
#

try with slash

mortal hare
neon minnow
mortal hare
#

that wouldnt work

wet breach
#

pretty sure it still has restrictions in regards to using them in projects lol

tardy delta
#

did you use the command correctly?

young knoll
#

“According to the License, such decompiled source code can only be distributed in a modified version or part of a larger project. This was changed from being available only for internal purposes before August 14th, 2020.”

neon minnow
#

Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "/gamerule doMobLoot false")

#

Unknown command. Type "/help" for help.

young knoll
#

Please use the API to set gamerules

neon minnow
young knoll
#

Use the WorldLoadEvent

mortal hare
#

im pretty sure its due to how brigadier commands have its own implementation of Command Interface

#

and server's .getcommand() returns PluginCommand objects only

tardy delta
#

oh right

wet breach
young knoll
#

Yes

#

Which isn’t being done

neon minnow
#

Unresolved reference: setGameruleValue

wet breach
#

So that means you can't just use the mappings in source and distribute which in other words means reference purposes only

#

unless you modify the mappings or only use partial I guess?

#

not sure what partial would mean in this case since it doesn't clarify

mortal hare
#

eh fuck it

#

im gonna use as a reference

#

i guess

neon minnow
#

fun onWorldLoadEvent(world: World) {

        world.setGameruleValue("naturalRegeneration", "true");

    }
#

help

wet breach
#

however what people choose to do is up to them

neon minnow
#

Unresolved reference: setGameruleValue

young knoll
#

I mean it seems fairly clear

#

We aren’t redistributing the full, unmodified mappings

tender shard
#
PotterPerson dumble = new Dumbledore();
mortal hare
#

the problem is, paper stopped using maven as their build tool for the project

wet breach
#

you can use still use maven

#

just have to manually set it up is all

mortal hare
#

install locally via install-file or smth goal?

young knoll
tardy delta
#

whats the point of returning false in CommandExecutor#onCommand when no usage message in plugin.yml is defined?

young knoll
#

I don’t know Kotlin

quaint mantle
#

Just use gradle lol

quaint mantle
tardy delta
#

ah and what is it?

wet breach
mortal hare
young knoll
#

Iirc it’s Unknown command, type /help for a list of commands

#

Or something

mortal hare
#

and using install-file goal

#

😉

wet breach
#

or it could be what Coll said

young knoll
#

Idk

mortal hare
#

i did it like this, before i realised there are proper ways to do this

young knoll
#

Honestly I never return false and provide my own usage message

tardy delta
#

im doing stuff like this

#

i always return true

young knoll
#

Maybe I should make use of the option in the plugin.yml

wet breach
#

I return false if the command doesn't hit any of the if statements

quaint mantle
#

Everyone uses command frameworks anyw2

young knoll
#

Not really

wet breach
#

I don't

young knoll
#

A lot of plugins don’t

#

Especially older ones

neon minnow
#

Parameter is not a subclass of org.bukkit.event.Event Compiling and running this listener may result in a runtime exception

#

what does this mean

#

class WorldLoadEvent: Listener {
@EventHandler
fun onWorldLoadEvent(e: WorldLoadEvent) {
print("Loaded world.")
}
}

young knoll
#

Pretty sure WorldLoadEvent is a subclass of event

tardy delta
#

or something custom designed

neon minnow
wet breach
young knoll
#

Idk, that looks fine to me

#

I think, I don’t really know Kotlin syntax

young knoll
#

Kotlin

tardy delta
#

yea lets make some fun

wet breach
#

so fun is void?

young knoll
#

fun is function

tardy delta
#

function?

#

and how to set the return type then?

young knoll
#

Idk

wet breach
#

event methods need to be void type if I recalled?

tardy delta
#

fun somefunc (e: SomeEvent) : bool

#

something like that maybe

young knoll
#

Yep

#

Return type is at the end

wet breach
#

so if fun doesn't equal void that could be the issue then

tardy delta
#

damn im smart

neon minnow
#

nvm

#

i fixed it

young knoll
#

Maybe void is an implied default

neon minnow
#

how do i use gamerule api again?

young knoll
#

?jd-spigot

undone axleBOT
tardy delta
#

kotlin seems fun

#

to learn it

wet breach
#

I guess, but I don't like it

tardy delta
#

i dont like many other languages either

young knoll
#

Fun fact

tardy delta
#

but if you wanna grow up

young knoll
#

In Kotlin void is Unit

#

Apparently

tardy delta
#

lol

neon minnow
#

e.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, true)

#

just says unresolved referenmce

tardy delta
#

i like languages which dont have a null value

young knoll
#

e is not a world

#

e is a WorldLoadEvent

neon minnow
#

how do i select world

young knoll
#

Check the javadocs

tardy delta
#

Bukkit.getWorlds().get(index) // 0 is overworld, 1 is nether 2 is end

young knoll
#

I bet that event has a getWorld

tardy delta
#

idk for kotlin

#

oh right

chrome beacon
#

There can be more worlds than the vanilla ones. Use the event

neon minnow
tardy delta
#

yea custom ones..

#

import it?

#

i thought john cena was a better coder

neon minnow
#

Lol

#

is it setGameRuleValue

#

that works#

pulsar karma
#

Any idea for setting the velocity of an armorstand (1.17)? I have tried with/out gravity, creating custom armor stand with nms and nothing seems to works. ArmorStand#setVelocity was working in 1.8 without problems.

tardy delta
#

i saw a generic GameRule<T>

#

and also one which isnt

young knoll
#

¯_(ツ)_/¯

neon minnow
#

whattt

young knoll
#

The other one is deprecated

#

The heck is SUN_OVERHEAD_TIME?

opal juniper
#

midday

grim ice
#

is kotlin that fun to code with

neon minnow
#

got it working now

#

lols

young knoll
opal juniper
#

oh right lol

young knoll
#

I think they are on an old version without setGameRule

#

👀

quaint mantle
grim ice
#

made me want to die

neon minnow
#

When does WorldLoadEvent even happn? i set up listener but my code does not work......

young knoll
#

When a world loads

neon minnow
#

um

#

i Printed enabled

#

but nothing in console

#

and my gamerules do not work

tardy delta
#

worldload happens when you startup the server

neon minnow
#

Yep

#

it should happen but nothing in console

young knoll
#

Did you register the event

neon minnow
#

Yeah

young knoll
#

So you’ve registered it and have @EventHandler

neon minnow
#

yes

#

class WorldLoadEventListener: Listener {
@EventHandler
fun onWorldLoadEventListener(e: WorldLoadEvent) {
e.world.setGameRuleValue("doDaylightCycle", "false");

    Bukkit.getConsoleSender().sendMessage(ChatColor.YELLOW.toString() + "test> " + ChatColor.WHITE +  "Enabled")

}

}

#

Bukkit.getServer().pluginManager.registerEvents(WorldLoadEventListener() as Listener, this as Plugin)

teal flower
#

I have DataBasePlugin and i wish to interact with it in another plugin. I tried use bukkit services but it not working(i did that same but on 1.12.2 and it working success)

young knoll
#

I think a service has to be an interface

neon minnow
#

Guys

worldly ingot
#

I don't think it's strictly required, but it most certainly should be an interface

neon minnow
#

why is my world listener not working 😂

#

i just used getWorlds get index

#

shity listener doesnt work lmao

young knoll
#

I can confirm they do work

neon minnow
#

weird, for me, it didnt, also no errors

young knoll
#

Idk 1.8 is 7 years old

#

I’m sure listeners worked then though

neon minnow
#

im using a lot of listeners just fine

#

world listener didnt work though

#

on server startup

#

thats the only one

young knoll
#

we don’t support 1.8 ¯_(ツ)_/¯

teal flower
#

Strange things. In 1.12.2 i just registering JavaPlugin class and it working

young knoll
#

Did you make sure your other plugin loads after the provider

#

Actually I guess it must for it to show in the loop

#

I don’t see either of the lower 2 messages in your log though

glossy venture
#

Make it so the service manager loads on start up

#

Or are the services not loaded yet

young knoll
#

No idea

teal flower
wet breach
teal flower
wet breach
#

getDatabase(String) is the method it is referring to

#

but you are showing loadManager() instead

teal flower
wet breach
#

if you are not going to show the relevant method and show what you think is correct

#

then not sure why you are asking for help

#

obviously you know the answer 🙂

teal flower
wet breach
#

my point exactly

teal flower
#

wait.

#

Am I here and asking you because I have nothing to do?

wet breach
#

how about show the method the error points to?

teal flower
#

you mean it?

wet breach
#

well that is a new error, but still points to a method you didn't display either

teal flower
#

i found

wet breach
#

is that class the DatabaseInstance class?

#

in that class you have a method called getDatabase()

teal flower
#

its EconomyModule.class

wet breach
#

if you are able to get it eventually in a loop

#

then it might be wise to then wait a few ticks after loadup

#

also, best to not return null either when you don't need to

teal flower
#

i found some kekw

#

i install 1.12.2 and its works

wet breach
#

well you are using paper too, not sure if they change anything between 1.12 and 1.16 in regards to services

stuck wraith
#

[21:20:32 INFO]: Star_WorK[/72.229.5.4:55633] logged in with entity id 266 at ([world]152.16049468859876, 64.0, 178.9883024604661)
[21:20:32 INFO]: Star_WorK lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Bad packet id 868

wet breach
#

but, anyways if it is solved now then cool, but next time it helps to show all relevant areas that the error points to and not what you think is is correct. Because what you think is correct in showing us might actually not be the problem and is actually elsewhere

#

Java doesn't always know the actual correct area all the time when an error is thrown

#

so anyways glad it is fixed now lol

young knoll
#

I’m confused how it knows the line in general

#

Are lines somehow preserved in bytecode

chrome beacon
#

Probably

teal flower
young knoll
#

Yeah but bytecode lines don’t correspond to code lines

wet breach
stuck wraith
#

frostalf

young knoll
#

Bytecode is generally much longer

chrome beacon
grim ice
#

how much u guys think itll take to finish this todolist

young knoll
#

What are we learning about bits and bytes

grim ice
#

idk

#

prob how bytecode works

#

IDK i just wrote shit on my head

#

that i feel unclear when i think about

#

rn im learning Data structures and algorithms

#

im not doing them in order btw

#

ill try to spend 15 days on each task

bright jasper
#

So basically how do I turn a T generic parameter on a method into Class<T>

#

Black magic is ok, Im familiar with it

grim ice
#

and ill finish on 1st january of 2023

quaint mantle
bright jasper
#

^ rust is really nice

#

I use it for every web API i write now

#

concurrency/parallelism to the max

#

actix ftw

grim ice
#

but ill spend 60days on rust instead

quaint mantle
grim ice
#

wtf

#

whyh

bright jasper
#

forces you to become a better developer

grim ice
#

how is it any more useful than what is in that todolist

quaint mantle
#

i spent 3 days learning rsut seriously and i made a reverse tcp shell with encryption

#

its so easy but very powerful

grim ice
#

fine but like

bright jasper
#

Rust forces you to become a better developer. Its heavily opinionated and will take some time getting used to but its worth it

#

Like literally it wont let you write bad code

grim ice
#

whenever i look at any of the stuff in that todolist

#

i feel like i suck

#

because i actually fucking suck

ivory sleet
#

Rust is amazing put simply 😌

young knoll
quaint mantle
#

the worst part about rust imo is abstractation

grim ice
#

doesnt rust look absolutely horrifying

#

oh wait

#

let a=if true
{
1
}
else
{
2
};

#

thats basically kotlin

bright jasper
#

EW what

grim ice
#

idk it looks like it

bright jasper
#

I mean yeah it has the match branching but let me give you an example

grim ice
#

or maybe im just blind

#

Prerequisite
Before learning Rust, you must have the basic knowledge of C++.

#

ok guess i cant

#

i dont know single shit bout c++

bright jasper
#

Nah not really

#
#[get("/info/{file_id}")]
async fn info(
    state: web::Data<State>,
    file_id: web::Path<String>,
    auth: Auth<auth_role::User, true, true>,
) -> impl Responder {
    match state.database.get_file(&file_id).await {
        Ok(mut v) => {
            if v.uploader != auth.user.id {
                MessageResponse::new(
                    StatusCode::FORBIDDEN,
                    "You are not allowed to access this file",
                )
                .http_response()
            } else {
                let mut file_url = PathBuf::from(&state.storage_url);
                file_url.push(&v.name);
                v.url = Some(file_url.as_path().display().to_string());
                HttpResponse::Ok().json(v)
            }
        }
        Err(_) => {
            MessageResponse::new(StatusCode::NOT_FOUND, "That file was not found").http_response()
        }
    }
}
#

Also heres a web example

grim ice
#

this looks like garbage im gonna be honest

bright jasper
#

Right but then you need to notice how it actually works

#

the match is an enum Result variant

quaint mantle
#
use magic_crypt::{MagicCrypt256, new_magic_crypt};
use uuid::Uuid;

pub fn generate_key() -> MagicCrypt256 {
    new_magic_crypt!(Uuid::new_v4().to_string(), 256)
}
use std::fs::File;
use std::io::Read;
use magic_crypt::{MagicCrypt256, MagicCryptTrait};

pub fn encrypt_bytes(bytes: Vec<u8>, key: &MagicCrypt256) -> Vec<u8> {
    key.encrypt_bytes_to_bytes(&bytes)
}
grim ice
#

yeah bro what the fuck

#

learning japanese is gonna be easier thaan this

bright jasper
#

🦐 I mean you could also keep dying in singlethreaded languages

quaint mantle
bright jasper
#

You dont even know what anything is yet and your forming an opinion on a programming language you dont know even basic details about

grim ice
#

if u find this "very easy" then go see a doctor pls

quaint mantle
#

if you know java you can learn rust easily

bright jasper
#

Not really. its medium level

grim ice
#

idk ill try it

mortal hare
#
std::cout << "Hello world" << std::endl;
bright jasper
#

the << is operator overloading

#

stream operator

#

C++ stuff

mortal hare
#

yea

#

you can overload operators

bright jasper
#

I need to keep writing my game engine honestly. Thats my main use for C++

#

Stopped a while ago

young knoll
#

Idk what the & is though

quaint mantle
bright jasper
#

reference

mortal hare
#

in C++ that's a reference

bright jasper
#

in rust its also a reference

mortal hare
#

its like a memory pointer

quaint mantle
#

because if you use the actual value in some cases it moves the value to make sure no more memory is needed

young knoll
#

Ah

mortal hare
#

but made in china

#

😄

bright jasper
#

rust is different, if you pass a value it doesnt copy. It moves the value

young knoll
#

Pass by value

bright jasper
#

No

#

So if you do

pass_here(v)
// You cant use v anymore here


quaint mantle
#
let y = 5;
let x = y;

println!("{}", y) // y was moved to x
bright jasper
#

because v was moved into pass_here

young knoll
#

Interesting

quaint mantle
#

its very cool

bright jasper
#

so passing a reference is a new variable

quaint mantle
#

and extremley usefil

bright jasper
#

which refers to another variable, so you can move the reference

#

the reason as to why is that rust automatically cleans stuff up when the scope ends

#

Its really weird to do in compiled langs like rust but it uses move semantics

#

prevents unnecessary copies and removes memory the moment its done being used

#

So if you pass into pass_here then v is actually deleted if you do nothing with it in pass_here

mortal hare
#

that's a revolutionary idea called the stack

bright jasper
#

Im explaining it in simple terms

#

I could go on and explain how functions are actually subroutines with stacks but nobody knows what that means

mortal hare
#

i love C++, but it feels like a C with some extension libraries pretending to be a separate language

bright jasper
#

It is a separate language when you go past C++17

#

C code is still valid but thats the point. the stuff C++ adds is huge though

mortal hare
#

C++ is C on steroids

#

cmon when that sore throat will be gone... I've grabbed anything that suppose to heal it, yet it still feels like i've drank couple cups of citric acid

young knoll
#

See I’m a smooth brain that only really knows non-memory managed languages

quaint mantle
#

it does it for you while still being super low level

#

its literally a better c and c++

young knoll
#

Oh

#

That’s cool

#

I can’t manage my own memory you expect me to manage that of a computer too? Smh

bright jasper
#

Ehh it still forces you to be aware of memory

#

Like if you write code that doesnt follow the rules it wont compile

#

and will tell you why you fucked up

quaint mantle
#

the error messages are great

#

but sometimes the messages make you debug the code yourself

#

which is normal for most languages

bright jasper
#

Also

#

Whats to stop some dumbass from looking on stackoverflow and wrapping whatever unsafe shit he is doing in a RefCell

young knoll
#

I mean I try to be smart about memory

bright jasper
#

Thats literally willingly loading the gun to shoot yourself with

young knoll
#

Like... I’ve used a short before

#

:p

quaint mantle
bright jasper
#

Atm trying to make my plugin fabric/forge/spigot compatible

#

having fun rewriting command systems

crude estuary
#

Copying from Stack Overflow is a Classic, and Obviously Dangerous, that must be what Happened to the FNAF Security Breach Developers

bright jasper
#

vibing

young knoll
glass sage
young knoll
crude estuary
#

Almost

#

but you Responded in time

bright jasper
#

SB isnt even a stackoverflow problem

quaint mantle
bright jasper
#

they just abused the fuck out of blueprints in UE

young knoll
#

Ah

bright jasper
#

and now their stuff doesnt work

young knoll
#

It’s like $40

bright jasper
#

Never liked the blueprint system in UE honestly

crude estuary
#

Really?

bright jasper
#

Yeah

crude estuary
#

xD

young knoll
#

Is at least more content than the originals for $40

bright jasper
#

The game size is just uncompressed assets

quaint mantle
#

we need a fully developed rust game engine with raytracing

#

it will be the fastest game engine

#

and memory efficient

bright jasper
#

I write my own game engines

#

In C++ because rust doesnt get others support

#

but yes regardless, i write my own engines

#

For like huge game projects i just use unity or some shit though

wooden fable
#

Is this the correct way to read a Itemstack array (inv) from a config?

ItemStack[] kit = ((ArrayList<ItemStack>) KitFile.get().getList("kit")).toArray(new ItemStack[0]);
#

If i use UE it will run at 15 fps lol

spiral light
#

no

glossy venture
#

If you dont write shit code

wooden fable
#

How else am I supposed to do it? Sometimes this works, but sometimes it returns a null pointer

quaint mantle
#

unsafe rust is the same levels as C and C++

#
unsafe
spiral light
#

is this the channel for JAVA coding ?

young knoll
#

No

#

Spigot is in rust now

glossy venture
subtle folio
#

is there a event in 1.18.1 for closing a GUI?

quaint mantle
quaint mantle
glossy venture
quaint mantle
#

you will have to check if its yours though

subtle folio
#

I cant cancel that event, is there a way to do so or do I have to just re-open the GUI

glossy venture
#

Closing is client side i think

#

So youll have to reopen it

subtle folio
#

Alright, thanks

vivid cave
#

when do MapRenderers runs their render their method?

#

If you know, please be more specific than "when player renders a map"/"views a map"

#

I need more context on when this is triggered cuz I want to change its behaviour

#

through packets or whatever

#

preferably a different solution than adding the extra checks/implementations within maprender.render function, cuz my goal is to make this function trigger less

woeful crescent
#

does projectilehitevent call before entitydamagebyentityevent?

spiral light
woeful crescent
vivid cave
#

@spiral light well what's the support channels if it's to get answers "try and see", obviously we could find out everything by self with a lot of patience and involvement, but it's to gain time and have benefit of others experience

#

that's the whole concept of sharing^^

woeful crescent
#

:)

vivid cave
#

🙂

spiral light
#

if someone would know it and is online he maybe would tell you ... but i just can say that you should try and see ^^ thats mostly faster then asking here for a guess on what happens first

woeful crescent
#

or maybe...

#

instead of responding to questions with the basic equivalent of "i dont know"

#

just dont answer?

spiral light
#

but then you wouldnt know that your msg was sended and recived >:)

vivid cave
#

it's fine, the dude's not toxic no need to extend this conv 🙂

woeful crescent
#

lol

#

yeah

neon minnow
#

How do I run buildtools with a specific java version?

#

*** The version you have requested to build requires Java versions between [Java 7, Java 8], but you are using Java 11
*** Please rerun BuildTools using an appropriate Java version. For obvious reasons outdated MC versions do not support Java versions that did not exist at their release.

spiral light
woeful crescent
#

no i think you just need to use java 8 for that version

neon minnow
#

it would be easier to startup a vm and build it inside of that

#

i downloaded java 8

#

but cmd still says that

chrome beacon
#

You can also install older java and use path/to/java instead of java in your command

neon minnow
#

huh path/to/java

#

what

young knoll
#

Specify the full path to the java install

neon minnow
#

in the buildtools command?

young knoll
#

Yes

#

In place of just “java”

buoyant creek
#

(i got low java skills) where can I store the class / money for each player ?

neon minnow
chrome beacon
#

Either

neon minnow
#

'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

chrome beacon
#

Surround with ""

young knoll
#

Woo spaces

spiral light
neon minnow
#

The system cannot find the path specified.

#

is it jdk/bin/

spiral light
#

C:\Program Files\Java\jdk-17.0.1\bin

#

for example

neon minnow
#

'"C:\Program Files\Java\jdk1.8.0_321\bin"' is not recognized as an internal or external command,
operable program or batch file.

#

"C:\Program Files\Java\jdk1.8.0_321\bin" -jar BuildTools.jar --rev 1.12.2

chrome beacon
#

Add \java.exe

neon minnow
#

Thanks

buoyant creek
young knoll
#

Yes

#

Load them when the player joins

spiral light
#

if you want them to be saved permanent you should use config files for each player seperated ... or PDC (but you cant read PDC when player is not online)

young knoll
#

I mean

#

Not easily anyway

neon minnow
#

wetf

#

wtf

#

}

Starting clone of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git to CraftBukkit
Exception in thread "main" org.eclipse.jgit.api.errors.TransportException: Unexpected end of file from server
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:224)
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:311)
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:182)
at org.spigotmc.builder.Builder.clone(Builder.java:1051)
at org.spigotmc.builder.Builder.main(Builder.java:333)
at org.spigotmc.builder.Bootstrap.main(Bootstrap.java:27)
Caused by: org.eclipse.jgit.errors.TransportException: Unexpected end of file from server
at org.eclipse.jgit.transport.BasePackConnection.lsRefs(BasePackConnection.java:308)
at org.eclipse.jgit.transport.TransportHttp$SmartHttpFetchConnection.<init>(TransportHttp.java:1538)
at org.eclipse.jgit.transport.TransportHttp.getConnection(TransportHttp.java:366)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:467)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:142)

#

Attempting to build version: '1.8.8' use --rev <version> to override
Found version
{
"name": "582a",
"description": "Jenkins build 582a (hotfix 2)",
"refs": {
"BuildData": "838b40587fa7a68a130b75252959bc8a3481d94f",
"Bukkit": "01d1820664a5f881665b84b28871dadd132deaef",
"CraftBukkit": "741a1bdf3db8c4d5237407df2872d9857427bfaf",
"Spigot": "21fe7077d9140e0f9db01587a39c2ffec29e3ec8"
}
}

#

it doesnt work

#

api error?

woeful crescent
#

how would i go about checking if an arrow is stuck in a block?

young knoll
#

isInGround iirc?

woeful crescent
#

doesnt work

neon minnow
#

if the spigot 1.8 jar already constains log4j xml

#

then do i have to do anything? and i dont have to use any jvm args?

young knoll
#

Javadocs have this info

woeful crescent
#

isOnGround?

#

Could I use that

young knoll
#

Idk

#

Maybe

#

But there’s a proper method for it

neon minnow
#

coool

tacit drift
buoyant creek
buoyant creek
sly trout
#

how to verify if a block has tile entity data?

tacit drift
#

check if at that location there is a TileState

#

i think

chrome beacon
young knoll
#

getState instanceof TileState

sly trout
young knoll
#

Yeah my college java class had no file io

chrome beacon
#

I finished my course early and personally I think it teaches things in the wrong order

#

Oh and it doesn't teach you about how to read stack traces

young knoll
#

Lol

#

Neither did mine

tacit drift
#

lol

chrome beacon
#

The last chapter is try catch

#

After learning Swing

#

...

tacit drift
#

reading stack traces is essential imo

young knoll
#

Our last chapter was javafx

#

Idk if we even did try catch

chrome beacon
#

Yeah I'm glad I could finish the course early..

#

We spent the first week on sysout

#

The pacing is way to slow for me

young knoll
#

Look sysout is a very complicated part of java

#

Have you seen how many methods there are?!

chrome beacon
#

We only learned about the string one

young knoll
#

I mean, same

#

I don’t think anyone gets taught about all the overloads

chrome beacon
#

We got a bunch of things to make it print. 2h 30 min not so well spent

young knoll
#

Honestly I don’t even think about the overloads, they just exist and java knows the one I want

chrome beacon
#

Yeah true

lavish hemlock
#

What is the exact difference between Player and OfflinePlayer?

spiral light
young knoll
#

Player has a ton more methods

spiral light
#

^^ PR

young knoll
#

Because they are online

#

Player also means all their data is loaded

#

Ooh block damage end event PR? Sounds nice

ornate heart
#

Is there any way to detect whether someone is left clicking on a map canvas?

chrome beacon
#

I'd check for damage to the item frame

worldly ingot
#

It's just that the title of your PR implied that you were adding a start event, Soccer 😛

#

Though I guess that's the fault of the issue linked

young knoll
#

But does the end event distinguish between cancel and finish

#

Actually I guess we have the break event for finish

worldly ingot
#

Yeah ;p

young knoll
#

So I’d be like the BlockBreakingCancelEvent

#

Idk

worldly ingot
#

This one specifically is for cancelling a break

spiral light
#

BlockBreakEvent and BlockDamageEvent just 2 of 3 states what can happen

young knoll
#

But MD encourages that

worldly ingot
#

No, including the issue at the start of the PR is fine KEKW It's just misleading is all

young knoll
#

I mean

#

Technically PlayerDeathEvent is another possible state :p

spiral light
#

if a player stops clicking no event is gonne tell

#

atm

worldly ingot
#

Yep, your PR is fine. It's just the title that's wrong because it matches an ill-informed issue

young knoll
#

BlockDamageEvent is a strange name

spiral light
#

thats why i added the text xD

#

i was writing with lol (who created the feature request) about the missing api and just realised there is an "start"-event ... just no "stop"-event

spiral light
young knoll
#

Ye

#

Like every tick or every time the crack visual changes

bright sierra
#

Can someone with a decent amount of experience that knows how to copmile plugins help me? Im trying to make a edited version of Slimefun and i can't figure out how to code it. If you can help me pls msg me i would really really appreciate it

spiral light
#

Who is Parker H. ?

quaint mantle
#

Parker Hockey

spiral light
#

Yes ... But here in dc

#

Didn't want to write complete name since maybe not Wanne Show it idk

young knoll
#

It’s Choco

ivory sleet
#

Chocolate 😋

spiral light
#

i know now who has to write my not existing future pr ideas ^^

young knoll
#

Forcing choco to write PRs for you is great

#

:p

ivory sleet
young knoll
#

Although now people do that to me... I guess I deserve it

short raptor
#

Is there any other cause for the " the return value of org.bukkit.Server.getPluginCommand(String)" is null" error APART from the command not being listed on plugin.yml? A person is having this error on their server and I don't get it on my two servers with the exact same jar

sterile token
#

And add it to player Collection?

ivory sleet
#

player collection?

#

I mean sure it’s possible

sterile token
#

Cuz im thinking

hybrid spoke
#

just

#

dont

sterile token
#

Cuz im its possible to add a custom player to Player Collection. And try to see if plugin message works

#

Without having a physic player

#

😂

neon minnow
#

im trying to make a tablist in kotlin https://ibb.co/4Srd5FC
converted from java,but im getting a couiple errors for the packet and Craftplayer and it just tellsm e to create a class but idk what to do

sterile token
#

I dont use packets for tab api

neon minnow
sterile token
#

Lol

neon minnow
hexed hatch
#

Yeah a unnecessary way

neon minnow
sterile token
#

You should do it vía normal way

hexed hatch
#

who

neon minnow
hexed hatch
#

You really should strive to use the api whenever possible

sterile token
#

Do it without nms and reflections. Cuz that consumes more resources

neon minnow
#

Yep

#

Okay

#

i understand

#

so bad tutorila then

#

what do i use

sterile token
#

And easier way of having errors

hexed hatch
#

This is 4 years old

neon minnow
#

Im using 1.8 anyway#

#

so

hexed hatch
#

Back when there wasn’t api coverage for tablist

#

Oh

sterile token
#

Check a already build tab api from github

neon minnow
#

Im using Kotlin.

hexed hatch
#

guess you’re stuck with packets, but I’m sure there are at least half a dozen maintained 1.8 tablist libraries you could use

sterile token
#

From Kotlin you can use Java library?

#

I never used Kotlin that why

#

I only know that Kotlin code its executed on JVM

hexed hatch
#

By design it’s fully interoperable with Java

sterile token
#

Idk I dont even understand C

#

I wouldnt understand Kotlin

dusty herald
#

kotlin is... kotin

hexed hatch
#

Based take

sterile token
#

Yeah but they are unredeable sintaxis

#

Really ugly

hexed hatch
#

Kotlin is extremely Kotlin

sterile token
#

I hate unredeable sintaxis thst are not typed

#

So only love programming on Java and C#

neon minnow
#

what is CraftPlayer? ???

#

and how do i fix

#

PacketPlayOutPlayerListHeaderFooter

drowsy helm
#

CraftBukkit stuff you have to import spigot-api instead of spigot

#

or other way around

#

cant remember

#

also why use packets for header/footer theres a spigot implementation for that

young knoll
#

Not in 1.8

ivory sleet
#

Poor 1.8

crude estuary
#

1.8 Died a Long time Ago

neon minnow
#

i need to use IChatBaseComponent and PacketPlayOutPlayerListHeaderFooter and CraftPlayer but they are all red in Kotlin

green flower
#

whats the proper event listener that I should be utilizing to detect when Endermen pickup/place a block, EntityInteractEvent?

drowsy helm
green flower
#

thanks

karmic grove
#

it says it cant find main class any idea why?

worldly ingot
#

I see no Main.java

#

So yeah I'd say it's right 😛

dusk flicker
#

are you editing decompiled files?

#

.java?

worldly ingot
#

Looks like it's just not part of the build path

#

It's not a source dir

brave sparrow
worldly ingot
#

Though unrelated to the actual issue, there is no Main class there unless it's cropped out

dusk flicker
karmic grove
dusk flicker
#

on another topic

#

?main

worldly ingot
#

You have your folders in src/<yourpackage>, not src/main/java/<yourpackage>

karmic grove
#

i didnt make plugin 💀

worldly ingot
#

Your classes aren't getting exported

#

Which would also explain why it's not a source dir

#

Basically shift your com folder over into src/main/java

#

Should look like src/main/java/com/...

karmic grove
#

ok ill try

#

ty

worldly ingot
#

But yes, Rack's link there is also relevant

karmic grove
#

should all these be in resources

worldly ingot
#

src/main/resources/

karmic grove
#

will i have to recode plugin so it can find the files

worldly ingot
#

Nope, you should be fine

#

Maven just uses src/main/java and src/main/resources as source dirs

karmic grove
#

ok tysm

worldly ingot
#

Once exported it'll all be shifted into the root of the archive

karmic grove
#

ive been working on this for so long this helps so much

#

oh wait

#

oopsies

worldly ingot
#

;p You might just now have some compile errors that your IDE otherwise didn't pick up on because it's in a source dir now

#

Always the simple mistakes that take us the longest to figure out. I was racking my brain for a day or so trying to figure out why my plugin message wouldn't send only for me to realize that I had to delay it a tick so that the player's connection completed

karmic grove
#

are these not part of spigot?

hardy swan
#

they are part of spigot's jar

karmic grove
#

spigots maven thing also right?

#

idk why it isnt working

hardy swan
#

show you pom.xml

#

?paste

undone axleBOT
karmic grove
hardy swan
#

if it is paper you are better off approaching paper's discord

hardy swan
#

what you are depending on is an api

#

at least that's what i gather from the artifact

#

you can find out whether papermc provides some artifact that includes nms packages

mint mesa
#

Hello! So I am currently using custom config files and everytime I load my plugin it makes the files in the config folder, like it should. But when I use a command that needs to use one of the config files, it makes a duplicate config file in the main folder and uses that one instead of the one in the config folder

#

any ideas what I am doing wrong?

hardy swan
#

a duplicate file of a same name?

mint mesa
#

its better if I show you

opal sluice
mint mesa
#

im making a report system, where it uses configs and such

#

and when I load my plugin it makes these

#

files

opal sluice
#

Check again how you create and acces your config instance

mint mesa
#
YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File("C:Users\\tanja\\OneDrive\\Desktop\\Spigot Plugin Server\\plugins\\ReportSystem\\reports.yml"));
        YamlConfiguration statsConfig = YamlConfiguration.loadConfiguration(new File("C:Users\\tanja\\OneDrive\\Desktop\\Spigot Plugin Server\\plugins\\ReportSystem\\stats.yml"));
opal sluice
#

And make sure that it use the right config folder

#

Firstly, use relatives paths

hardy swan
#

use File.separator

mint mesa
#

whats relatives paths?

#

im rather new to spigot coding

#

xd

opal sluice
#

That's not spigot coding ^^'

mint mesa
#

well new to java in general

opal sluice
#

Basically, a relative path is a path relative to the execution file

#

So you don't have to specify the absolute path like you do

#

check a simple tutorial on spigot to make custom configs

mint mesa
#

I did already

opal sluice
#

It explain it pretty well

mint mesa
#

in the tutorial they didnt mention the whole path like I did

#

however it didnt work for me like it did for them

opal sluice
#

Cause they do relatively

mint mesa
#

so I thought putting the whole path would work

#

idk why it makes a whole new yml file in the main class tho

opal sluice
#

Imagine you place your plugin in a different folder or on an other computer, your plugin is broken immediately ^^'

#

To get the relative path you can just do JavaPlugin#getDataFolder

#

And you'll be on the right folder right away

mint mesa
#

do I put the getDataFolder in whichever command file I use the config in?

hardy swan
#

You may want check out java's File

mint mesa
#

so YamlConfigblah blah reportsConfig = ReportsSyste.getDataFolder("reports.yml")?

opal sluice
#

Don't create multiple instance of the same config

#

Unless you save it directly

subtle folio
opal sluice
#

On which case it doesn't really matter

#

But it's bad for performances

low temple
#

@mint mesa File file = new File(this.getDataFolder().getAbsolutePath() + System.getProperty("file.separator") + "data.data");

zenith pendant
hardy swan
#

System.getProperty("file.separator") is equivalent to File.separator so use the latter instead

low temple
subtle folio
#

oh oops, I cant find anything on the actual event

opal sluice
mint mesa
opal sluice
low temple
#

ur plugin's folder

mint mesa
#

ah

#

sorry not folder

#

im dumb

#

I meant do I put that code

#

in the main class

#

or in each of the command classes

low temple
#

depends where you need it to save a file

#

do u have ur entire code?

mint mesa
#

yea

low temple
#

send it

mint mesa
#

@Override
    public void onEnable() {






        // Discord Webhook



        // Setup Configs
        StatsCustomConfig.setup();
        reportsCustomConfig.setup();



        StatsCustomConfig.get().options().copyDefaults(true);
        StatsCustomConfig.save();

        reportsCustomConfig.get().options().copyDefaults(true);
        reportsCustomConfig.save();``` main class
#

reportCommand

#

I have a couple more commands but im just gonna use the report command as an example

#

also I deleted the toggled config but forgot to remove it

low temple
#

ok so replace

#

wait u need to pass in ur plugin instance into the constructor of ur command class

#

@mint mesa do u know how to do that?

mint mesa
#

yea

#

wait

#

yea pretty sure I know what you're talking about

low temple
#

do that and then replace static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File("C:Users\\tanja\\OneDrive\\Desktop\\Spigot Plugin Server\\plugins\\ReportSystem\\reports.yml")); with
static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File(<plugin-instance-variable>.getDataFolder().getAbsolutePath() + File.separator + "reports.yml"));

low temple
delicate lynx
#

new File(this.getDataFolder(), "reports.yml"); also works, don't need to set a path

mint mesa
#
Plugin plugin = ReportsSystem.getPlugin(ReportsSystem.class);```
low temple
#

If that gets ur plugin instance then use that

#

static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder().getAbsolutePath() + File.separator + "reports.yml"));

#

static YamlConfiguration toggledConfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder().getAbsolutePath() + File.separator + "toggled.yml"));

delicate lynx
#

static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder(), "reports.yml"));
static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder(), "toggled.yml"));

#

a bit cleaner

mint mesa
#

and this would be in every class which uses the config

low temple
mint mesa
#

correct?

low temple
mint mesa
#

great

low temple
#

rather than setting it to a specific path its generic

delicate lynx
#

it's the same thing as what you are doing but cleaner

low temple
delicate lynx
#

getDataFolder() returns a file

#

you are creating a new file with a string path

glossy dirge
#

hello how do i make using a placeholders with {prefix} will get the value from the config like below ?

  Prefix: "(&7Inter&9Legacy&f)"
  message: "{prefix} &7Check out a new &aNews &7from our &9Discord" # {prefix} will get the value on Prefix config
low temple
delicate lynx
glossy dirge
delicate lynx
#

oh, didn't read that fully

#

you will have to look into creating custom placeholders

#

they probably have a wiki somewhere

mint mesa
#

so then when I save the configs when I run the command, this should work then

#

or should I do reportsConfig.save(reprtsConfig)

#

it still makes the file in the main folder

#

oh i know why nevermind

#

nope still doesnt work

#

the file isnt created anymore but it doesnt save the reports made

#
static Plugin plugin = ReportSystem.getPlugin(ReportSystem.class);
    static YamlConfiguration reportsConfig = YamlConfiguration.loadConfiguration(new File(plugin.getDataFolder().getAbsolutePath() + File.separator + "reports.yml"));
``` the instance and stuff of the reportsConfig

```java
reportsConfig.set(reportID + ".name", suspect.getName());
                    reportsConfig.set(reportID + ".reason", text);
                    reportsConfig.set(reportID + ".author", player.getName());
                    reportsConfig.set(reportID + ".time", dtf.format(now));
                    reportsConfig.set(reportID + ".id", reportID);
                    reportsConfig.set(reportID + ".server", suspect.getServer().getServerName());``` making the report itself


```java
reportsCustomConfig.save();``` and saving it
#

shouldn't this work?

delicate lynx
#

whats reportsCustomConfig

mint mesa
#

the class which makes the config

low temple
#

might not be getting the instance properly

mint mesa
#

its the saving that doesnt work

#

and thats what confuses me

delicate lynx
#

yeah that's def not getting the instance correctly

#

maybe try no static and see if that works

mint mesa
delicate lynx
#

gotta make an instance of the class and pass it around to other ones

neon minnow
#

How do i explode a firework but not launch a firework entity w/ a trail + its launchin sound?

#

thank you

delicate lynx
#

you would have to use the firework builder thing (idk what it's called) and set to not have a trail

cold pawn
#

Is there a way I can get the location of an npcs head?

neon minnow
delicate lynx
mint mesa
#

holy crap I finally did it

#

that was so annoying

#
reportsConfig.save(plugin.getDataFolder().getAbsolutePath() + File.separator + "reports.yml");```
neon minnow
#

How to give named item to player when they join

granite burrow
#

when they join give them an itemstack

karmic grove
neon minnow
neon minnow
granite burrow
#

getInventory().setItem(slot, item)

neon minnow
#

how do you give a named item?

granite burrow
#

do you know how to use item stacks?

neon minnow
#

no.

#

and what should item be

granite burrow
#

item should be the itemstack

neon minnow
#

just says Unresolved reference: STONE

#

ok how do i make

#

itemstack

granite burrow
#

Spigot doesn't understand just STONE, it would be Material.STONE

granite burrow
#

^ that

neon minnow
#

Type mismatch.
Required:
ItemStack!
Found:
Material

granite burrow
# neon minnow no.

watch this it talks about how to make a custom item:
https://www.youtube.com/watch?v=5npPUMrYaYE

Learn to code your own Minecraft Spigot plugin in this complete tutorial series! In this episode, we create a custom item that has some custom text, lore, and effects.

--- Important Links ---

● GitHub: https://github.com/TechnoVisionDev/Spigot-Tutorial
● Discord: https://discord.gg/m5fjByfrKP

--- Music ---

● Chill Out Records - Minute Mix

-...

▶ Play video
granite burrow
neon minnow
#

I am using Kotlin.

waxen plinth
#

That doesn't make it magically work

#

You need to create an ItemStack

#

In kotlin, ItemStack(Material.STONE)

sly trout
#

what is the event for using a totem of undying

waxen plinth
#

If I had to guess, it might be PlayerConsumeItemEvent?

hardy swan
#

PlayerResurrectEvent

waxen plinth
#

Oh, never knew that existed

hardy swan
#

or Entity idk

granite burrow
neon minnow
#

ok so i managed to give stone

    e.player.inventory.setItem(2, ItemStack(Material.STONE))
granite burrow
#

Entity

neon minnow
#

how do i name it

waxen plinth
#

?jd

granite burrow