#help-development

1 messages · Page 595 of 1

tribal valve
#

I didn't know you can even do that

#

U want like animate or what

torn shuttle
#

among other things, yes

tribal valve
#

Duplicate textures for different animation frames and different item name that is a head in armor stand and change it via plugin

torn shuttle
#

the plugin I made already works, I just wanted to see if someone knew the inner workings of resource pack origin points

shadow night
#

I restarted IJ because if this same shit just a minute ago and now again bruh

tribal valve
#

Item1, name:"frame1" - anim frame 1
Item1, name:"frame2" - anim frame 2
etc

tribal valve
#

Didn't remember how to fix it

shadow night
#

I don't even have the mc dev plugin

tribal valve
#

I don't even have 200mb while building

shadow night
#

insane shit

#

ah fuck now it's gonna be indexing shit 2 years again

tribal valve
#

Restart the PC 😎

shadow night
#

I don't have a PC 😎

torn shuttle
#

this is annoying because if the origin is over 64 or something around there the model starts getting offset

tribal valve
#

Restart phone 😎

shadow night
#

I don't use my phone for coding 😎

round finch
#

Restart brain

#

Don't tell me you are a robot

shadow night
#

nah, my brain got no memory leaks

tribal valve
torn shuttle
torn shuttle
#

no, you just don't know that you don't

tribal valve
#

Yes that could be the thing

#

I just worked with models and vanilla Minecraft command blocks for 2 years before I discovered that there's things called plugins

#

And now my brain's overloaded with things and mixes these things

shadow night
#

I CANT DO ANYTHING

#

IT FREEZES TO DEATH

#

whats up with these fucking memory leaks

mellow pebble
#

i have one technical question for example if lets say we are making factions plugin and obviously people have claims how do we get information if person is in someones claim for example claims will most likely be stored in database and then we are most likely going to check if current coordinates are coordinates of someones claim ?

#

but isnt that overkill to do

torn shuttle
orchid trout
#

lumbuck

torn shuttle
#

I never really worked with chunk-based data but I'm sure people have also found ways to rig data directly into chunks to make them easier to query

mellow pebble
glossy venture
#

by position

#

X and Z probably packed into a long or int

storm scaffold
#

Is there a way to get the theoretical break speed of a block? Basically if I have a BlockData/BlockState with no location of something like, for example, oak planks can I find how long a specific player would take to mine it?

quaint mantle
#

How do i set the durability of the players held item to max?

#

If i want to make a disposal sign
Should i just make a sign that opens a menu and that its?
Becuase when you close the menu everything inside will be cleared

echo basalt
#

It takes into account what tool you have, lot of stuff

tribal valve
quaint mantle
#

No, just so if example a diamond sword has 10 durability and i click on that sign i will just get full durability

tribal valve
#

I think it will automatically clamp at full when you change it to 999999

quaint mantle
#

So you dont know how to set it to full?
Becuase i think if i change it to 9999999 its going to bug

tribal valve
#

Try it

humble lynx
#

you want to repair the item?

hazy parrot
#

Can you do Google search for "chart.js java api? "

humble lynx
#

Damageable damage = (Damageable) item.getItemMeta();
Take a look at that

quaint mantle
humble lynx
#

obv do instanceof checks otherwise you'll just get a bunch of bugs as well

quaint mantle
#

hey can somebody help me with this skript

#

"else" has to be placed just after another "if" or "else if" section

#

command /sdaily:
permission: daily.use
cooldown: 2 hours
cooldown message: §cYou can use this command again for %remaining time%.
description: Player get a random crate key.
trigger:
chance of 70%:
execute console command "/crates key give %player% keyall_klic 10"
send "§cYᴏᴜ ɢᴏᴛ ɴᴏᴛʜɪɴɢ ᴛʀʏ ɪᴛ ʟᴀᴛᴇʀ" to the player
else:
chance of 40%:
execute console command "/crates key give %player% keyall_klic 10"
send "§5Yᴏᴜ ɢᴏᴛ ᴀ Kᴇʏᴀʟʟ ᴄʀᴇᴀᴛᴇ ᴋᴇʏ!" to the player
else:
chance of 35%:
execute console command "/crates key give %player% nature_key 1"
send "§2Yᴏᴜ ɢᴏᴛ ᴀ Nᴀᴛᴜʀᴇ ᴄʀᴇᴀᴛᴇ ᴋᴇʏ!" to the player
else:
chance of 25%:
execute console command "/crates key give %player% water_klic 1"
send "§bYᴏᴜ ɢᴏᴛ ᴀ Wᴀᴛᴇʀ ᴄʀᴇᴀᴛᴇ ᴋᴇʏ!" to the player

chrome beacon
#

?paste

undone axleBOT
torn shuttle
#

man I'm just going to have to give up on fixing this for the first release

quaint mantle
# humble lynx obv do instanceof checks otherwise you'll just get a bunch of bugs as well

I dont really know what i should do
I got this

 if (line0.equals("REPAIR")) {
                if (line1.equalsIgnoreCase("Click here to")) {
                    if (line2.equalsIgnoreCase("Repair item")) {
                        if (line3.equalsIgnoreCase("")) {
                            if e.getPlayer().getItemInHand().getDurability(e.getPlayer().getItemInHand().getDurability() > 0){
                                e.getPlayer().sendMessage("Your item got repairred");
                                e.getPlayer().getItemInHand().setDurability((short), Idk what to type here );
                            }
                        } else {
                            e.getPlayer().sendMessage("This item cannot be repaired");
                        }
                    }
                }
            } 
chrome beacon
humble lynx
#

yeah read through what I said again
Damageable damage = (Damageable) item.getItemMeta();

quaint mantle
#

this.getItemMeta(); dosent work

#

Fixed

humble lynx
#

kk

quaint mantle
#

But how did i repaire the item?

urban mauve
#

am i able to find an entity from a lead?

humble lynx
#

do damage. and look at the options you have available

quaint mantle
#

I dony have any available

humble lynx
#

is Damageable damage = (Damageable) ... anywhere in your code?

quaint mantle
#

Yes

#
 if (line0.equals("REPAIR")) {
                if (line1.equalsIgnoreCase("Click here to")) {
                    if (line2.equalsIgnoreCase("Repair item")) {
                        if (line3.equalsIgnoreCase("")) {
                            Damageable damage = (Damageable) e.getItem().getItemMeta();

                                e.getPlayer().sendMessage("Your item got repaiired");
                            }
                        } else {
                            e.getPlayer().sendMessage("This item cannot be repairred");
                    }
                }
            }
humble lynx
#

now when you type damage. options appear on what you can obtain/modify

quaint mantle
#

Ahhh, i though i should write damageable

#

So this right?

                            Damageable damage = (Damageable) e.getItem().getItemMeta();
                                damage.setHealth(damage.getMaxHealth());
chrome beacon
#

Wrong damagable

humble lynx
#

test it out, debug

chrome beacon
#

Use the other one

quaint mantle
#

Other one?

humble lynx
#

when you set damage to 10 it'll take 10 damage from the item

chrome beacon
#

Instead of the entity Damageable

#

Also Minecraft calculates damage insted of durability remaining

#

So set damage to 0

cobalt dust
#

How to rotate player head without stuttering

chrome beacon
#

Making NPCs?

#

Or is it a real player

cobalt dust
#

real

quaint mantle
#

I dont got a getDamage(); or hasDamange();

chrome beacon
#

Yeah as I told you

#

You have the wrong import

quaint mantle
#

So which import should i have

chrome beacon
#

The one I linked

quaint mantle
#

Theres no import here?

chrome beacon
humble lynx
#

import org.bukkit.inventory.meta.Damageable;

cobalt dust
#

no

#

My old code doesn't work

#

private final Set<PacketPlayOutPosition.EnumPlayerTeleportFlags> teleportFlags = new HashSet<>(Arrays.asList(PacketPlayOutPosition.EnumPlayerTeleportFlags.a, PacketPlayOutPosition.EnumPlayerTeleportFlags.b, PacketPlayOutPosition.EnumPlayerTeleportFlags.c, PacketPlayOutPosition.EnumPlayerTeleportFlags.d, PacketPlayOutPosition.EnumPlayerTeleportFlags.e));
PacketPlayOutPosition packet = new PacketPlayOutPosition(0.0, 0.0, 0.0, 0F, SpraySpeed.get(player), this.teleportFlags, 0, isFlying);((CraftPlayer) player).getHandle().b.a(packet);

#

its doesnt work

chrome beacon
#

?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.

chrome beacon
#

Also why unmapped

#

That's just annoying to work with

quaint mantle
chrome beacon
#

1.8?

quaint mantle
#

Yes

chrome beacon
#

Too bad

#

Outdated api

quaint mantle
#

What do you mean?

chrome beacon
#

It doesn't exist in 1.8

quaint mantle
#

So i cant do it on 1.8 or what?

chrome beacon
#

1.8 is too old

#

You can you just have to use the set durability or whatever you were using before

quaint mantle
#

That didnt work

humble lynx
#

Look for a thread online, I'm sure there'll be something- repair signs existed before 1.9

chrome beacon
quaint mantle
#

I am getting a few errors with this
But isnt this right?
e.getPlayer().getItemInHand().setDurability(e.getItem().setDurability(e.getItem().getType().getMaxDurability());
Errors:

';' or ')' explected
Identifier expected
Expression expected
humble lynx
#

Look at the error, it's expecting a ; or ) somewhere in the code

quaint mantle
#

How it says
'setDurability(short)' in 'org.bukkit.ItemStack' cnnot be applied to '(void)'

eternal oxide
shadow night
#

Hey guys, isn't there some nms mappings or something to make it readable?

humble lynx
shadow night
#

Dunno, I need to be able to understand what am doing

vivid cave
#

are empty Inventorys filled with itemstack of type Minecraft.AIR or with null ?

eternal oxide
#

null

vivid cave
#

oki thx

placid moss
#

and then reobf the plugin when you build it

spare hazel
#

?image

#

?img

undone axleBOT
quaint mantle
shadow night
eternal oxide
#

Every method call has a return type. If it returns nothign it's a Void type.

placid moss
quaint mantle
#

Okay its working now
But just in the wrong way
The durability is being setted to 0 and not full
e.getPlayer().getItemInHand().setDurability(e.getItem().getType().getMaxDurability());

spare hazel
#

i just woke up to seing all the classes, all the bukkit api thingies and all the java shit not be recognnized and now i have like 700 errors

#

how to fix it

placid moss
#

and if you are using maven, set classifier to remapped-mojang

spare hazel
#

tried that

shadow night
placid moss
zealous osprey
humble lynx
#

Try set durability to 0. It was said earlier twice.

spare hazel
#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.amirparsa</groupId>
    <artifactId>HypixelSkillCore</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>

    <name>HypixelSkillCore</name>

    <properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        ...
    </build>

    <repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
        <repository>
            <id>jeff-media-public</id>
            <url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.17.1-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.jeff_media</groupId>
            <artifactId>MorePersistentDataTypes</artifactId>
            <version>2.3.1</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>

i removed the build to get rid of discord imitations but its still there in the code

placid moss
#

try invaliadate caches?

spare hazel
#

just now, its reopening

#

ive done it just now

#

okay it got fixed thx

quaint mantle
chrome beacon
#

cast to short

strong hollow
#

What should I do if the animal sits down without being tamed?

wary harness
#

Hey anyone can tell is it possible to get FIle name from FileConfiguration object
So to check from which file is FileConfiguration loaded ?

quaint mantle
#

Thanks, its finnally working

eternal oxide
wary harness
#

dam it

quaint mantle
#

Why dosent this work?
This is the title of the gui, and i want it so you can edit the menu name in a config file, but when i am using this (underneath) it isnt working but if im setting it to example .title(Component.text("test")) its working
.title(Component.text(Config.get().getString("Vagtshop")))

chrome beacon
#

Is that value set in the config

#

print it and see what it says

spare hazel
#

how to check if the player has an inventory open?

eternal oxide
#

If it's teh players inventory you can;t

crystal latch
#

Could someone help me on a clear lag plugin? I have a problem
i send a code on dm please its to long

eternal oxide
#

if getOpenInventory() returnss a non Player inventory then they have an inventory open

#

You can't tell if they have their inven open or not

#

?paste long code

undone axleBOT
strong hollow
#

How to update spigotmc

quaint mantle
# chrome beacon print it and see what it says

But when i am using the command ingame and its set to this .title(Component.text(Config.get().getString("Vagtshop"))) i am getting so many errors in the console and the menu is not opening

chrome beacon
#

?paste

undone axleBOT
chrome beacon
#

Send the errors

eternal oxide
quaint mantle
spare hazel
#

what are the reasons to learn nms(except for packets bcz protocollib exists)

#

like what are things that you cant do without nms

quaint mantle
eternal oxide
#

Don't go near nms until you find something you want to do which can't be done with the API

chrome beacon
#

Now find what's null and fix it

icy beacon
#

do that if the problem is still there

zealous osprey
icy beacon
#

oh right mb

#

and it seems like amirparsa has fixed the problem

#

kk

eternal oxide
#

thats not a maven update error, thats a compile error

icy beacon
#

?

eternal oxide
#

it actually looks like a reflection eror

#

post the full log not just select lines

vivid cave
#

guys, because i send fake slot contents to players,
well in survival it works no problemo
but creative is a bit of a dumb fuck because most inventory operations are done clientside in creative mode, so it will actually believe in the fake bullshit i tell them and synchronise it with the server
Is there a way to prevent that ?

icy beacon
vivid cave
#

what is CreativeInventoryEvent for then ?

icy beacon
#

it could indeed be reflection

#

i have reflection in the lib

eternal oxide
#

to take the piss when people try to use creative in plugins 😉

vivid cave
eternal oxide
#

probably

icy beacon
eternal oxide
#

creative is client side and the server has to trust whatever it says

icy beacon
#

kinda just have to pray that the client side does what you want

#

and not what it wants

vivid cave
eternal oxide
icy beacon
#

sure

#

why arbitrarily 10?

eternal oxide
#

11+ breaks reflection

icy beacon
#

i tried 8

sullen marlin
#

See if there's an update to the staging plugin

icy beacon
#

fails

#

ah, perhjaps

sullen marlin
#

Or just don't use it, deploy is enough

icy beacon
#

oh actually?

#

i just followed the docs haha

#

ok one sec

craggy island
#

Hi

icy beacon
sullen marlin
#

Ye you just gotta then log into the web interface to release it

craggy island
#

Yes

#

Haha

#

Sorry

#

Good morning

icy beacon
#

??

#

i greeted you by saying morning

icy beacon
#

i'm not really sure how i would "release" it now

sullen marlin
#

I guess so

craggy island
#

Yes, yes, but I forgot to say good morning. xd

sullen marlin
#

In the old version you close then release the staging repo

icy beacon
#

where do i go and push buttons

sullen marlin
#

Staging repositories

icy beacon
sullen marlin
#

Close

#

Then release

icy beacon
#

i decided to also take a look here

#

my question is why the initial release was successful but the updates are not going through

#

i'm not using the maven-javadoc-plugin because i'm using kotlin

#

if i REALLY have to i can use java ofc

sullen marlin
#

Presumably kotlin can make javadocs too

icy beacon
#

i tried, but the javadoc plugin dropped errors

sullen marlin
#

You need javadocs for central

icy beacon
#

but the initial release worked...

shadow night
#

How are javadocs even created

icy beacon
#

alright i'll try to do javadocs

idle yacht
#

how do i make a player head in the latest version using texture

icy beacon
#

now it says that javadocs are required

#

but at least not the "module does not open" stuff

idle yacht
chrome beacon
#

That guide has link for old version

idle yacht
#

the latest authlib version doesnt have that put method...

eternal oxide
#

line 49 in your paste will error

undone axleBOT
eternal oxide
#

you assume there is a clicked block

sullen marlin
#

Also the error line numbers don't match up with your code

icy beacon
eternal oxide
#

and imports

sullen marlin
#

Ah ye

icy beacon
#

oh right

#

the package starts with 000 if the error is correct

#

why would you have numbers in the package

#

it's kinda weird

eternal oxide
#

his nick

icy beacon
#

000.vagtshop.signs.VagtshopSign.onInteract(VagtshopSign.java:61)

icy beacon
eternal oxide
#

he's very much a beginner

icy beacon
#

actually not yay

#

what would i name the files

#

and where would i put them

#

gosh it's hard to do kotlin in maven central

eternal oxide
#

use Java then 🙂

quaint mantle
#

So should i just remove BlockState bs = e.getClickedBlock().getState(); or what?

icy beacon
#

i can use java sure but i want to use kotlin

#

i wonder if this works

eternal oxide
icy beacon
#

using kotlin is not bad for me

#

it's just hard to work with maven central

eternal oxide
#

it is bad for your rep 😉

icy beacon
#

mmnope

icy beacon
eternal oxide
icy beacon
#
Javadoc Warnings
javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
#

what the fuck is this supposed to mean

#

oh my god

quaint mantle
eternal oxide
#

looks better

icy beacon
#

yes but

#

?arrowcode

undone axleBOT
icy beacon
#

read this

eternal oxide
#

worry about that later

icy beacon
#

the earlier you start to make clean code, the better you will be in the future

eternal oxide
#

nah, learn how it works first. Then worry about what it looks like

icy beacon
#

maybe yeah

#

but good habits 🙂

eternal oxide
#

yep

#

No ones first project is pretty

quaint mantle
eternal oxide
#

really you shoudl use early returns

#

so if (x == null) return;

quaint mantle
#

Idk what that means..

icy beacon
#

it's plain english

quaint mantle
eternal oxide
#

use early returns to exit the method. Prevent runnign any code you don;t need to run

#

That was an example

quaint mantle
#

That dosent show me how i could use it..

eternal oxide
#

it really does

#

I'm just doing an example, not writing the code for you

remote swallow
icy beacon
#

?learnjava perhaps

undone axleBOT
icy beacon
icy beacon
#

IMAAAAAJIN

#

maybe ?learnjava!!!

quaint mantle
eternal oxide
icy beacon
#

"help the person" is not spoonfeed the person the code that they need

#

they will NOT benefit from us sending the exact code that they want if they don't understand what the code means

#

and if you read carefully

chrome beacon
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

icy beacon
#

they don't

chrome beacon
#

Did they just leave the discord 👀

icy beacon
#

lmao 😭

young knoll
#

@KillerWolf_

icy beacon
#

HigherLevel you mean

young knoll
#

Killer wolf was their nick

icy beacon
#

ik making a joke

buoyant viper
#

theyre still here

icy beacon
#

they just came back yeah

young knoll
#

And now I’m back

#

From outer space

icy beacon
#

anybody here knows how i can generate javadocs for kotlin???

#

maven central won't get off my ass if i don't

quaint mantle
#

So what should i do with these brackets?

                                }
                            }

                        }
                    }
                }
            }
        }
    }
}
icy beacon
#

take every if-else statement (or if-statement) one by one

#

starting with the most inner

eternal oxide
#

combine conditions where you can

#

use switch where possible

mellow pebble
#

@eternal oxide can i ask you one question

#

how would you do something

quaint mantle
#

Does switch work on java 8?
Someone helped me some days ago and it didnt work there

icy beacon
#

of course it does if you get the syntax correct

eternal oxide
#

certain switches work

tribal valve
#

What is maven

mellow pebble
#

well two feathers

tribal valve
#

Oh

mellow pebble
#

that are crossed

#

and making letter X

eternal oxide
#

maven is a build system

icy beacon
#

speaking of maven

mellow pebble
icy beacon
#

how do i generate javadocs for kotlin so that maven central will stop bitching

undone axleBOT
#

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

mellow pebble
#

nononono elgarl has my respect and he probably knows that i am dumb so im asking !

icy beacon
#

oh my fucking god]

mellow pebble
eternal oxide
#

just ask 🙂

icy beacon
#

settings - user profile or something

#

not that hard

tribal valve
icy beacon
#

depends on what you want

quaint mantle
#

So how do i switch the world?
switch (world) dosent work

tribal valve
#

I use artifacts

#

Build

undone axleBOT
eternal oxide
icy beacon
#

no

#

c++ ides dont

tribal valve
#

Intelij idea

mellow pebble
eternal oxide
quaint mantle
#

Thanks

orchid trout
#

why are there 3 duplicates of src/main/java

icy beacon
#

i only see 1?

orchid trout
#

src

#

1 doesnt do anything

icy beacon
#

well yeah inside src there are directories main/java, main/resources, test/java and test/resources

mellow pebble
# eternal oxide just ask 🙂

lets say you are making HCF core plugin something on your own etc etc and you will obviously have claims that will be saved in database and im curious how do you check if player is in someones claim you know when there is message in chat like that you entered someones claim like i know that it would be too overkill to check when player moves with current coordinates and if it is in someones claim right ?

sterile breach
#

hello, i have 2 questions,

to know if the players want to receive chat messages, I use a database
so I could do it this way:

when a message is sent, I loop you players and I see if they want to receive the messages thanks to the db, but I think the most optimized would be to make a table, when a player joins the server, I see if he wants receive the messages and if so I add it to the board, and when a messqge is sent, I send it to all the people in the board is it better?

another question, my plugin being linked by database, let's imagine that the database is no longer accessible, too bad I don't do anything or I make a system that checks the database every x times and if so stops it server ?

eternal oxide
mellow pebble
orchid trout
icy beacon
tribal valve
orchid trout
quaint mantle
icy beacon
#

no

#

getPlayer() is a method

#

getWorld() is a method

eternal oxide
icy beacon
#

getName() is a method

#

do not forget the parentheses

undone axleBOT
icy beacon
#

because i know you will

icy beacon
quaint mantle
pseudo hazel
#

what ide are you using

icy beacon
#

getLocation().getWorld()

tribal valve
mellow pebble
pseudo hazel
chrome beacon
#

They do

chrome beacon
#

They just have no idea what they're doing

icy beacon
#

^

tribal valve
#

They don't know what they are doing

young knoll
#

What the fuck is a java

icy beacon
#

steaf perhaps you have any idea how to generate javadocs for kotlin?

tribal valve
pseudo hazel
#

you dont use build artifacts btw

tribal valve
#

Imagine speaking java

pseudo hazel
#

if you have maven you go to the maven tab and in the lifecycle you click package

mellow pebble
# eternal oxide yes

but isnt that overkill to check like that on player move like especially if there is large number of players

orchid trout
pseudo hazel
#

i dont use kotlin sorry

icy beacon
eternal oxide
pseudo hazel
#

any system requiring you to have javadocs is shitty anyways..

icy beacon
mellow pebble
tribal valve
orchid trout
#

none

young knoll
#

Check if getBlockX/Y/Z change

pseudo hazel
#

yeah im glad I dont interact with maven past simple dependency stuff

tribal valve
eternal oxide
orchid trout
mellow pebble
#

ill try thank you

karmic mural
#

Is it possible to use custom items in custom crafting recipes?

young knoll
tribal valve
eternal oxide
karmic mural
orchid trout
tribal valve
#

And see if it prints /discord

#

Check main

pseudo hazel
#

wdym by stopped working

#

is the server lagging

orchid trout
quaint mantle
#

It says Canot resolve symbole A, B and C and Cannot resolve method getWorld()

                               switch (getWorld()) {
                                    case A:
                                        new VagtshopA().open(player);
                                    case B:
                                        new VagtshopB().open(player);
                                    case C:
                                        new VagtshopC().open(player);

                                }
tribal valve
#

WHAT IS HE DOING 🔥🔥🔥

icy beacon
#

i am going to commit blanket

tribal valve
pseudo hazel
#

this looks like some python level code

orchid trout
mellow pebble
icy beacon
#

00000000

#

listen carefully

#

listen to me

#

read my every message now

young knoll
#

Nah even python can’t pull worlds from midair

icy beacon
#

learn java right now

#

go find a video

#

Bro Code has a good 12 hour video

#

take it slowly

#

earn syntax and coding basics

#

you cannot code SHIT if you don't know the language

#

it's like you came to China and you only speak Kazakhstan language or something

#

but in your case it's more like an infant that cannot talk at all

#

so please

orchid trout
#

writing an essay before knowing the alphabet

young knoll
#

The good news is once you learn one language all others will be much easier

icy beacon
#

for the sake of everybody's braincells here

tribal valve
icy beacon
#

?learnjava!

undone axleBOT
icy beacon
#

00000000

#

we are not going to spoonfeed you code

#

we can give you concepts and ideas

#

now proceed

#

@quaint mantle

tribal valve
#

Bro code>>>

icy beacon
#

agree

tribal valve
#

Learnt c# with him

icy beacon
#

i started python with him

#

so yep bro code is incredible

tribal valve
#

Also, cow language is FIRE 🔥🔥🔥

#

Very underrated

pseudo hazel
#

clearly they arent in the mood to learn so dont spend too much energy on it

icy beacon
#

new ban api?

#

oh what

#

1.20?

#

i haven't touched bans since 1.15 or somerthing

pseudo hazel
#

generics does not always lead to good code

tribal valve
#

How i can connect database with my plugin and on command search the whole database to find the value given by player in args

icy beacon
#

that looks fancy

young knoll
#

Doc worked on it for a while :)

tribal valve
# icy beacon elaborate?

On discord bot sends you a password also adding it to his database, and in Minecraft on command /verify (password) plugin searches for password in the database and if it found it, it connects the server account to discord server

young knoll
#

Oh no passwords

icy beacon
#

somebody is going to be looking for a new faster god particle farm now

icy beacon
tribal valve
#

Random

icy beacon
#

yeah hash

#

no

#

hash the string

tribal valve
#

Why though

icy beacon
#

because it's a terrible practice to store plain string passwords

#

very vulnerable

tribal valve
#

How would someone get to my database?

#

But okay I will

icy beacon
#

imagine if discord stored passwords in plain text

pseudo hazel
#

well they just need to get your db login

icy beacon
#

someone hacked the database

chrome beacon
#

If you're building an app or product, you need to store your users' passwords securely. There's terrible ways to do it, like storing them in plaintext or encrypting them, slightly better ways like hashing or hashing and salting, and even better ways like bcrypt, scrypt, or argon.

Sources:
https://gist.github.com/epixoip/a83d38f412b4737e99bbef...

▶ Play video
icy beacon
#

now they know your password

#

but if it's hashed they won't

tribal valve
icy beacon
pseudo hazel
#

everything is better with a pinch of salt

icy beacon
pseudo hazel
#

even passwords

young knoll
#

You should always hash and salt your passwords

icy beacon
young knoll
#

With a suitable modern hash algorithm

pseudo hazel
#

yes

icy beacon
#

😭

pseudo hazel
#

have you ever tried it?

tribal valve
icy beacon
pseudo hazel
#

exactly

tribal valve
#

Oh wait I just told this to myself

icy beacon
young knoll
#

Even if it’s just for minecraft people are dumb and will re-use their bank password

tribal valve
#

Okay nvm

icy beacon
#

so don't store plain text passwords and stuff

icy beacon
#

your system needs to be made so that the stupidest users can use it

tribal valve
#

(it's "password")

chrome beacon
icy beacon
tribal valve
#

Also, would I get sued if I could gain access to players passwords that they enter to register to server?

icy beacon
#

why would you need that

#

i don't know if it's illegal but it's immoral

serene sigil
#

how do you get the plugins folder?

#

in java

icy beacon
#

JavaPlugin#getDataFolder()

serene sigil
#

thats the plugins folder?

icy beacon
#

it's the plugin's folder

#

you can walk one folder out

young knoll
#

It’s probably illegal under some GDPR law

icy beacon
#

to get the plugins folder

serene sigil
#

oh

icy beacon
serene sigil
#

also, is there a way to get all plugins installed on the server?

icy beacon
#

PluginManager#getPlugins() i think is a thing

#

yeah

serene sigil
#

but that counts for the enabled ones, right?

icy beacon
#

currently loaded plugisn

serene sigil
#

alright...

icy beacon
#

if you want ALL plugins, go to the plugins folder, go through each jar file, read its plugin.yml and find the "name" field

serene sigil
#

cuz my goal is to make a plugin that enables only one random plugin in the plugins folder

icy beacon
#

oh

serene sigil
#

cool

icy beacon
#

yeah actually

#

JavaPluginLoader#loadPlugin takes File

serene sigil
#

alright

icy beacon
#

so just select a random .jar file in the plugins folder and pass it

serene sigil
icy beacon
#

ofc

serene sigil
#

nice

#

alright

#

tysm

icy beacon
#

but the problem with your idea is that some plugins have dependencies

#

so if the dependencies in question are not enabled the plugin also won't be

#

if you want to go above and beyond, read the jarfile's plugin.yml, find the dependencies and launch every dependency before launching the plugin

#

shouldn't be extremely hard

#

(for each of those plugins you'll also have to check their dependencies lol)

quaint mantle
icy beacon
#

even EASIER, JavaPluginLoader#getPluginDescription takes a File

#

there you can find the dependencies

#

you don't even have to read the file's contents manually

pseudo hazel
#

or just put all the plugins you want to select in a folder in your plugin folder

#

then you have flexibility and you can enable the dependencies always

icy beacon
pseudo hazel
#

yeah

#

but I didnt read that part

icy beacon
#

xd

pseudo hazel
#

so it was my idea

icy beacon
#

oh ok then

#

mb

sterile breach
icy beacon
#

if you have a table with all the players' data you can just fetch the entire table on startup

#

to a hashmap for example

#

like <UUID, Parameters> where Parameters is your custom class with the table data

#

write all the modifications to the hashmap

#

periodically upload it to the database asynchronously (like every 120 secs)

#

and upload it on shutdown

sterile breach
icy beacon
#

the time when performance arguably matters the least is the startup, thus you should query everything on startup

#

but indeed it would be optimal for the memory to query when a player joins

#

if you want that, you can do that

#

make sure to run the query asynchronously

#

are you creating a public plugin or a private plugin?

sterile breach
#

and even for example if I want to recover information in a table of 1500 lines is not much? knowing that between the start and the stop there will be a maximum of 50 different players

sterile breach
icy beacon
sterile breach
icy beacon
#

track your memory usage and tps and see what works best for you

icy beacon
#

not the best guide but it works

icy beacon
#

?

tribal valve
#

How to ban player from all servers with spigot plugin (bungeecord proxy ban)

sterile breach
# icy beacon ?

so in my place you will load all at startup or only when a player joins?

icy beacon
#

try both

#

separately

#

make it so it saves everything at startup, run the plugin for a couple hours with some players and track its memory usage and tps

#

then make it so it saves data on join, run the plugin for a couple hours with some players and track its memory usage and tps

#

with whichever performance you are most satisfied, you should pick yourself

sterile breach
#

ah also, I have a gui system where the player chooses his options, so asking the db for his options every time the player makes the command is not a good idea?

eternal oxide
tribal valve
icy beacon
eternal oxide
#

not unless you write your own bungee ban plugin

tribal valve
#

Well then how to ban player on other server?

eternal oxide
#

you don;t

tribal valve
#

What?

eternal oxide
#

when a player joins they should be sent to a specific server (lobby)

tribal valve
#

Yes so if I'm on other server like pvp and I want to ban a player on lobby how would I do that

eternal oxide
#

you ban on lobby. how you do that is up to you. Console, bungee plugin whatever you want

sterile breach
icy beacon
#

yes, query the table on startup into a hashmap (or load data from players that join into that hashmap), and apply all the changes to that hashmap

#

occasionally upload it to the database to not lose progress

#

you got it

tribal valve
#

Like if I'm on game #1, then how to ban player from lobby

eternal oxide
#

you would have to write a plugin to host on all servers to forward ban/kicks

#

or at minimum a bungee ban plugin

tribal valve
#

I can't use sql does it use it?

#

Well, I can

sterile breach
eternal oxide
#

it should work with or without

tribal valve
#

without

icy beacon
#

<UUID, YourDataClass>

#

why does saving a project as a template fuck up this stuff?

sterile breach
#

Ah okay dataclass

#

Is optimised ?

icy beacon
#

hashmaps are fast yeah

ivory sleet
#

what makes certain things not as optimal is if the end developer, you or me use these tools wrongly

sterile breach
#

yes thats what i was asking

serene sigil
#

what does the second one mean?

chrome beacon
serene sigil
#

can you teach me how to enable restarting?

chrome beacon
#

in the spigot.yml

serene sigil
#

where is the spigot.yml?

#

i only have plugin.yml and config.yml

opal carbon
#

in your main folder

#

the folder before the plugins folder

serene sigil
#

oh

#

youz mean like in the server itself

opal carbon
#

ye

#

le server folder

chrome beacon
serene sigil
#

which one?

chrome beacon
serene sigil
#

oh

#

but its already set

#

i think

chrome beacon
#

Do you start the server with a script called start.sh

serene sigil
#

im my server host, there are buttons to restart or to starrt

chrome beacon
#

Then you don't have a start file

#

so you can't use the restart command

trim creek
#

Have anyone here used LibertyBans API before?

undone axleBOT
#

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

icy beacon
#

is it acceptable to name a function in UPPER_CASE if the function acts like a getter for a constant value that needs a parameter, or should it be lowerCamelCase anyway?

fun DISABLED_KEY(plugin: JavaPlugin, enchantmentKey: NamespacedKey): NamespacedKey = NamespacedKey(plugin, "disabled_${enchantmentKey.key}")
icy beacon
#

alrighty

eternal oxide
#

only constants are upper case, and constants require no arguments

icy beacon
#

yeah good point

spare hazel
#

will the permissions be removed from the player after a restart?

eternal oxide
#

a player object does not persist through restarts

spare hazel
#

so lp adds permissions to the players each restart?

eternal oxide
#

upon joining

spare hazel
#

oh okay

eternal oxide
#

permissions are in attachments which only live as long as the player object

spare hazel
#

so even if the player rejoins the permissions are gonna be removed?

eternal oxide
#

yes

#

the player object is transient. It only exists while the player is connected

spare hazel
#

is the max size of an inventory (9*6)?

trim lintel
#

Hello. I change the block type from diamondore to bedrock and then back to diamondore in the code. A player with a pickaxe with an efficiency of 10 after switching to diamondore blocks the second time he mines slower. From what I understand, this is a client side bug, is it possible to send a packet to the player to fix it?

eternal oxide
#

your description is not clear

#

you are changing the block he's mining to bedrock to prevent/slow his mining?

#

would a Player#sendBlockChange achieve this?

spare hazel
high pewter
#

Sorry for bumping this, but I'm still unsure. I got a couple responses which I didn't quite understand but I think those responses were just for getting a list off such blocks, whereas I'm wanting to identify if a given block is one of these and then get the block it is attached onto

river oracle
#

Is Attachable block data er what

#

?jd-s let's see I suppose

undone axleBOT
high pewter
#

There seems to be a version for both Material and BlockData, but both are pseudo-deprecated

river oracle
#

Not deprecated

high pewter
#

Yes, Attachable itself isn't deprecated, but all the implementing methods are, which is why I said pseudo-deprecated. Like, as far as I can tell, everything that uses it is deprecated, so it might as well be deprecated itself

river oracle
#

No they aren't

high pewter
#

Oh right, ye the BlockData version only includes HangingSign, Tripwire and TripwireHook, so it's missing a lot of things such as normal signs, torches, ladders and chrorus fruit

trim lintel
river oracle
#

So that'd make sense

serene sigil
#

@icy beacon so i ended up doing this:

#

but it still somehow disables the plugins

#

can you help me?

high pewter
# river oracle Well those aren't attachable

How are they not Attachable? The Material version of Attachable includes all of those, and I understand Attachable to mean that the block breaks if the block it is placed on is broken. For example, if you break the block a torch is attached to, then the torch itself also breaks. And that's the specific thing I'm trying to identify

eternal oxide
river oracle
young knoll
#

Hmm

trim lintel
eternal oxide
#

no clue then

young knoll
#

Directional covers a lot of attachable blocks, but also some that aren't

high pewter
#

Yup, and I believe it misses some too because I don't think torches (not wall torches) are directional, but they depend on the block below them

#

Actually nevermind that must be wrong, Attachable itself extends Directional and Torch implements Attachable

#

But still, as you say, I need some way to filter between Directional blocks which can stand on their own and those which can't

serene sigil
icy beacon
icy beacon
remote swallow
karmic mural
#

Is there any simple, already made way, to check if a player is standing within a certain block?

Specifically, I have something like a "wand" that places blocks on the block relative to the face of the block they clicked. But I don't want that block to be placed if the player hitbox is inside of that block

#

As if placing blocks normally, basically. The block gets placed where you want it to, but not if you're standing inside the block

#

My initial thought is just to write my own method to check it, but I was wondering if I could avoid that

fluid river
#
if (block.getBoundingBox().overlaps(player.getBoundingBox())) {
    // code
}```
young knoll
#

Check if that intersects the players bounding box ^

fluid river
#

or you want to check it before the block is placed?

karmic mural
fluid river
#

don't you actually want to check it before placing the block?

#

like on the click

#

so block won't even be placed

#

not placed + checked + deleted

karmic mural
#

I was looking for that overlaps function

dawn plover
#

hello, i have a little problem
I cant seem to get the real name of an item when its not renamed or something

this is because when there is no name it is set do "" by defailt (an empty string)
but i want to get the default name then (and i could do that by doing item.type.name to get the material name, but thatone is full caps with underscore, i would rather not)

#

(code is kotlin, but dont worry, non of it is important exept the underlined)

dawn plover
#

more like: Kotlin😌 😍

#

XD

#

but all things in java work for kotlin, so shoudnt be a problem, i dont mind getting java selutions

quaint mantle
#

Maybe itemstack is null?

karmic mural
karmic mural
#

It can probably be better, but this is what I use

    public static String displayNameFromMaterial(Material material) {
        StringBuilder itemNameBuilder = new StringBuilder();
        String[] splitString = material.name().toLowerCase().split("_");
        for (String s : splitString) {
            itemNameBuilder.append(Character.toUpperCase(s.charAt(0)))
                    .append(s.substring(1))
                    .append(" ");
        }
        return itemNameBuilder.toString();
    }
dawn plover
trim lintel
dawn plover
dawn plover
karmic mural
dawn plover
#

i think so haha

#

amazing

#

btw, you forgot one thing :P

#

TNT

#

if word == tnt, all caps

karmic mural
#

💀

dawn plover
#

XD, stupid exeptions

karmic mural
#

I did use chatgpt for that rewrite just FYI

#

Now I gotta go over and figure out if there's any other names I need to account for lol

dawn plover
#

dont worry, thats the only one i think

#

because its the only name that isnt really a name but more a shortening or something

#

oh wait, but the of in potions >:)

#

they are not capital

karmic mural
hazy parrot
#

It assumes string have only one underscore

#

Also String.join exists, that for loop is not needed

#

Ok I misread, nvm

dawn plover
#
fun formatMaterialName(material: Material): String {
    val name = material.name.lowerCase()
    val words = name.split("_")
    val formattedWords = words.map { word ->
        when (word) {
            "of", "on", "a" -> word
            "tnt" -> word.uppperCase()
            else -> word.capitalize()
        }
    }
    return formattedWords.joinToString(" ")
}```
#

this is the correct one

#
public static String formatMaterialName(Material material) {
    String name = material.name().toLowerCase();
    String[] words = name.split("_");
    StringBuilder formattedName = new StringBuilder();
    for (int i = 0; i < words.length; i++) {
        String word = words[i];
        if (word.equals("of") || word.equals("on") || word.equals("a")) {
            formattedName.append(word);
        } else if (word.equals("tnt")) {
            formattedName.append(word.toUpperCase());
        } else {
            formattedName.append(Character.toUpperCase(word.charAt(0))).append(word.substring(1));
        }
        if (i < words.length - 1) {
            formattedName.append(" ");
        }
    }
    return formattedName.toString();
}``` and this might be it for java
#

Carrot on a Stick TNT Potion of Blabla

karmic mural
#

Why do I need StringUtils lib for capitalizing a word in java :(

young knoll
#

You don't technically

dawn plover
karmic mural
#

I know, I just did it on my own since I was tired of needing that lib just for one specific use

#

But if the word is TNT just return TNT right away?

young knoll
#

If you want all caps you can just .toUpperCase

rough drift
#

getMapList

young knoll
#

Otherwise .substring(0,1).toUpperCase + .substring(1).toLowerCase

karmic mural
dawn plover
#

yup

#

because they will all be split

#

oh wait, is it TNT_MINECART

#

cus that will be TNT Minecart

karmic mural
#

Yeah yeah

dawn plover
#

instead of Minecart with TNT

#

lol, welp, that uhm, stinks

karmic mural
#

Material name is TNT_MINECART

#

at least in 1.20.1

dawn plover
#

yea same 1.20.1

#

let me account for that

karmic mural
#

Dawg I forgot to account for potions in my plugin.. 💀 That's a whole can of worms I don't feel like opening up right now tbh

dawn plover
#

potions? you mean with the text? because thats only adding the "of"

#
fun getRealName(material: Material): String {
        val name = material.name.lowercase()
        var words = name.split("_")

        if (words.size == 2 && words[1] == "minecart") {
            words = listOf(words[1], "with", words[0])
        }

        val formattedWords = words.map { word ->
            when (word) {
                "of", "on", "a", "with" -> word
                "tnt" -> word.uppercase()
                else -> word.capitalize()
            }
        }
        return formattedWords.joinToString(" ")
    }```
#

this is the newone btw

karmic mural
torn shuttle
#

well mc decided to commit seppuku when trying to load it in 1.18 so I guess I'm only supporting 1.19+...

dawn plover
#

good luck translating it to java lol

torn shuttle
#

at least 1.19+ adoption is high, for once

karmic mural
quaint mantle
#

Why does the menu only open if i am op?
1, 2, 3 and 4 is getting sended in the console

                } else if (line0.equals("SHOP")) {
                    System.out.println("1");
                    if (line1.equalsIgnoreCase("-----")) {
                        System.out.println("2");
                        if (line2.equalsIgnoreCase("Click here to")) {
                            System.out.println("3");
                            if (line3.equalsIgnoreCase("Open the open")) {
                                System.out.println("4");
                                if(player.getWorld().getName().equalsIgnoreCase("A")){
                                    new VagtshopA().open(e.getPlayer());
                                } else if(player.getWorld().getName().equalsIgnoreCase("B")){
                                    new VagtshopB().open(e.getPlayer());
                                } else if(player.getWorld().getName().equalsIgnoreCase("C")){
                                    new VagtshopC().open(e.getPlayer());
                                }
                            }
                        }
                    }
                }
dull schooner
#

Hey guys is there a way to remove enchantment restrictions without doing it manually?

dawn plover
# karmic mural I kinda wanna swap to kt now ngl

i mean, you do what you want to XD
But i love kotlin, its way cleaner, everything you can do in java you can also do in kotlin (because it has everything from java)
but not vice versa
also its just way more fun to write (first and last time i am making this joke)
anyway, if you want to make a plugin in kotlin, it requeres some setup work so if you want to do it just hit me up and i show you what things need for your gradle file (because i use gradle)

remote swallow
#

im finding where you live and coming to steal your doors and batteries

#

and window panes

dawn plover
#

😳

remote swallow
#

you too

dawn plover
dull schooner
#

.

#

I asked earlier

karmic mural
remote swallow
#

?arrowcode

undone axleBOT
karmic mural
remote swallow
#

get @young knoll to tell you how he rewrote the anvil code and enchanting table code

dull schooner
tribal valve
#

How would I get entity damage entity event when player is damaged by an arrow

karmic mural
remote swallow
#

@young knoll stop being canadian and get in here

dull schooner
#

So the short answer is no

#

I have to rewrite the vanilla code manually?

karmic mural
young knoll
#

e

#

What

dull schooner
#

welp, thats not good

karmic mural
#

It means you get to control the entire flow yourself! :)

remote swallow
#

if you want higher protection levels you get to rewrite even more server code

dull schooner
#

haha thats actually a good thing tho

young knoll
#

It wasn't too bad to rewrite

#

You just have to work your head around the Mojang spagehtti

dull schooner
#

but it kinda makes sense, cause the calculation for the enchantments isnt actually part of the event, it is probably made outside the event

dull schooner
remote swallow
#

oh enjoy the math too

dull schooner
#

Cause the way i was doing rn is using the minecraft wiki

#

They kinda show the whole math

young knoll
#

Yes

remote swallow
#

wrong link

dull schooner
#

lul

remote swallow
#

right link

dull schooner
#

a minecraft decompiler?

remote swallow
#

you get to see the mojank spaget

dull schooner
#

spaghetti or not spaghetti, if it is saving my time i take it

quaint mantle
#

how do i load a world after creating it ? i searched up on spigotmc forum but none covered the case in which i want to create and load a world without restarting or reloading, kind of like how multiverse core does it

quaint mantle
dull schooner
#

but hey, is there any big game this days that doesnt have a spaghetti code?

quaint mantle
#

?paste

undone axleBOT
dull schooner
remote swallow
#

yeah

dull schooner
#

it gives me an option to decompile, but isnt he already decompiling?

remote swallow
#

no clue, used it like once a few weeks ago

remote swallow
#

@young knoll wheres ur anvil code gone

dull schooner
remote swallow
quaint mantle
#

so check decompile if you want to see the actual code and not only get the obfuscated jarfiles

#

i suppose, since im not sure

dull schooner
#

oh that makes sense. for some reason i thought the program would just decompíle

#

but i dont know why someone would need only the remap

quaint mantle
#

to download the jarfile and use it somewhere without it being decompiled, idk

#

where can i ask my spigot coding related doubtts

#

here

unborn sable
quaint mantle
#

alright i was thinking if i could check if player's helmet isnt air [ this part is done ] if isnt air then i want to add exact item to player's inventory and add something else to their helmet slot [ a itemstack ]

quaint tapir
#

public static void spawnOresShopNpc(Location location){ Villager oresshopnpc = location.getWorld().spawn(location, Villager.class); oresshopnpc.getLocation().setYaw(90); oresshopnpc.getLocation().setPitch(0); oresshopnpc.setCustomName(ChatColor.GREEN + "Minerals Shop" ); oresshopnpc.setCustomNameVisible(true); oresshopnpc.setAdult(); oresshopnpc.setInvulnerable(true); oresshopnpc.setProfession(Villager.Profession.NONE); oresshopnpc.setAware(false); oresshopnpc.setRemoveWhenFarAway(false); oresshopnpc.setSilent(true); oresshopnpc.setAI(false); oresshopvillager = oresshopnpc; } }
So for some reason this doesn't make the villiger face forward at eye level
It faces the direction that im facing when I do the command
it takes my location as the parameter "location"

quaint mantle
eternal oxide
#

use permissions not groups

quaint mantle
#

But i wont fix it

eternal oxide
#

the correct implementation is permissions not groups

quaint mantle
#

Okay so if im changing it to permissions your are saying that it would fix it?

eternal oxide
#

so long as you give the correct permissions

dull schooner
remote swallow
#

i didnt find it, coll did

quaint mantle
young knoll
#

For anvils?

#

It's in the anvil GUI class

dull schooner
#

not just anvils, when you're enchanting on the enchanting table

#

and when a villager offers you an enchanted book

young knoll
#

That's handled by each enchantment

dull schooner
#

i searched like "sharpness" and found only registration and name stuff

paper falcon
dull schooner
young knoll
#

Sharpness smite and bane are all DamageEnchantment.class

#

Assuming Mojang mappings

vague violet
#

Hello there! I need help with plugins.
1st. I am absolute beginner and I need complete guide of how to start.
2nd. I want to know exactly which one to choose between Spigot and Paper.
3rd. And also about Spigot/Paper documentaion with explanation of each component.

Could anybody help me, please?

young knoll
#

Do you know java

paper falcon
unborn sable
#

If I make a data pack with a custom item, can my plugin add functionality to it?

chrome beacon
#

Yes

vague violet
chrome beacon
#

?learnjava

undone axleBOT
unborn sable
dull schooner
chrome beacon
#

Does datapack register items in the registry?

young knoll
#

No

paper falcon
young knoll
#

Datapacks can't even make new items

unborn sable
#

Oh, how do I make new items in game then?

dull schooner
#

You modify a vanilla item and act like its a new one

young knoll
#

Pretty much

paper falcon
dull schooner
#

for people who struggle with java, is kotlin a good alternative?

eternal oxide
#

no

dull schooner
#

what are the downsides, or it's just a preference thing

unborn sable
dull schooner
#

if it is in the game, i dont know why wouldnt be possible

young knoll
#

Use a resource pack and customModelData

dull schooner
#

bukkit api has a feature called metadata, is very useful for this type of tasks

unborn sable
dull schooner
#

but if you want to change the texture a resource pack is required

#

idk if it's possible to change vanilla textures with vanilla textures without a mod or resource packs

spare hazel
hazy parrot
dull schooner
#

i'm not actually struggling, but its just so verbose, just to create a single class i get a bit tired

echo basalt
#

That's the point of java

#

It's so verbose that you never "not know" what you're doing

echo basalt
#

Kotlin is just java with a different vision

dull schooner
#

i mean, ok, it "forces" you do better code

echo basalt
#

not better

#

Just that it forces you to always understand what's going on

#

if you see a public void whatever

#

You know it's a method of the return type void, with public visibility towards other classes

dull schooner
#

i know but if you're doing something small or simple, it just overcomplicates it

blazing flare
#

What event gets fired when stripping logs?

echo basalt
#

well

#

That's java for you

echo basalt
#

Takes longer to write but you never end up confused

fluid river
#

java already simplified much stuff

dull schooner
fluid river
#

java has better community support

dull schooner
echo basalt
#

c++ is even more low-level

fluid river
#

everybody know "a bit" of it

echo basalt
#

sure it's less verbose but harder to read

fluid river
#

but imagine doubling amount of files in your project and doubling amount of code in first half of them

hazy parrot
#

just write all impl in header smh