#help-development

1 messages · Page 1501 of 1

vestal dome
#

sre

#

sure

wraith rapids
#

it's trying to load like the ban or ops list

vestal dome
#

will do

eternal oxide
#

Then in your onEnable add getServer().getPluginManager().registerEvents(this, this);

mystic terrace
#

I need to change this for public class Sunriseuch implements Listener ?

eternal oxide
#

no add it

wraith rapids
#

extends JavaPlugin implements Listener

eternal oxide
#

extends JavaPlugin, implements Listener

wraith rapids
#

no comma

mystic terrace
eternal oxide
#

grammar 😛

mystic terrace
eternal oxide
#

yes

mystic terrace
#

Let's try

#

NOW

#

FINALLY

#

AAA

#

THANK YOU SO MUCH

wraith rapids
#

you could also just have googled the things i told you to google

mystic terrace
#

I know it's something easier for you but I'm learning and all it's so confuse

wraith rapids
#

or followed the link conclure sent you

mystic terrace
#

Thanks ^^

wraith rapids
#

if you have problems with stuff we tell you to do or link for you, you should ask about it

mystic terrace
#

Now I need to see how I can do a title login

#

Because I was looking on YouTube and there's not tutorials

wraith rapids
#

it's pretty unintuitive on spigot

#

it's like player.spigot().sendtitle or sendmessage or something

eternal oxide
#

titles are simple, player#sendTitle

wraith rapids
#

is that on the player player now? or am i confusing it with the action bar

eternal oxide
#

action bar is spigot

wraith rapids
#

i remember something is super annoyingly tucked into the spigot() shit

eternal oxide
#

noob

mystic terrace
#

Lets try

#

nvm my bad

#

need to use a .

eternal oxide
#

player.sendTitle("title", "sub-title", -1, -1, -1)

mystic terrace
#

Thanks again ^^

sage swift
#

UCH

wraith rapids
#

TOTALEN KRIEG

lunar schooner
#

A little PSA for those publishing to MavenCentral, with Gradle. Some things have changed compared to Gradle 6 (Gradle 7 for Java 16 now). Here's a fully working configuration https://paste.md-5.net/mutiyowavi.nginx. Happy publishing 😄

mystic terrace
#

For a friends server

lunar schooner
#

I've also opened a ticket so they can update their docs, they still use the maven plugin which is no longer available

lunar schooner
#

Oops

#

Just noticed that error on the nexus repo manager 🙈

ivory sleet
#

🥲

wraith rapids
#

shame on you

lunar schooner
#

Now just to figure out how to disable strict linting in the javadoc plugin :/

#

In maven it's easy, but I havent yet seen how to do it in Gradle

mystic terrace
last sleet
#

Okay, so i've been trying for a long time but I can't figure out how to make a grindstone remove lore on an item.

wraith rapids
#

grindstones are cancer

#

all of the new blocks are

last sleet
#

I think I need to replace the slot 2 with the item without lore, but tbh idk how to do that

wraith rapids
#

see if there's a prepare grindstone event or something

last sleet
#

I got an inventoryclick even and test if the click is in grindstone

lunar schooner
last sleet
# wraith rapids all of the new blocks are

I made custom enchants, but no way of displaying them so i'm using lore to just tell the player the enchant is there. Is there a way of displaying the actual enchant? BEcause I dont think so

#

and so when a plyer grindstones a custom enchanted item it removes enchant but not lore, and i dont want that

wraith rapids
#

hmm

#

is your custom enchants plugin shit

#

because I need a not-shit custom enchants plugin

#

and haven't found one

onyx shale
#

ur asking for alot

wraith rapids
#

i'm a pretty demanding guy

#

there was one that was almost not shit

#

i think it was maintained by geolykt

#

but it had some cancerous issue with it that I don't quite remember

barren granite
#

So, Im pretty new to coding plugins, and Id like to know how to remove items that contain a specific character, specifically the * symbol, as on this server Im on, it has player heads enabled, but we also have bedrock support, so you also get their heads, which start with a *, yet when you place it down, it causes a lot of lag.

Point is, how do I delete items that contain the * symbol in their name? Sorry if this is the wrong chat to ask questions about code :/

shadow gazelle
#

Do you need to use lore to show custom enchants in 1.16?

wraith rapids
#

yeah

#

enchants are displayed by their translation keys

#

since the client doesn't have values for custom enchants in its locale, it can't display them

#

maybe with a resourcepack that overrides the en_US and other language mappings, but I haven't seen that done so I don't know if it's possible

shadow gazelle
#

hm

#

Well, you can do things like this in a resourcepack
"entity.minecraft.bee": "Beeralis",

wraith rapids
#

mm, is that specific to a single language mapping, or does it override them all globally?

shadow gazelle
#

English lang file

wraith rapids
#

you'd have to modify and bundle in all of the language mappings in the resourcepack, or people using other languages wouldn't be able to see the enchant

shadow gazelle
#

Just the .lang files, right?

wraith rapids
#

myeah

#

which I suppose is viable if you do it automagically, but I don't know how copyright and that shit goes with that

#

iirc bundling in mojang lang files is kind of a gray area at best

shadow gazelle
#

You can bundle them with a plugin?

#

Most people in the server where this will be used use English, anyway

wraith rapids
#

well, you could bundle them in a plugin, but I don't see much point in it

#

as you need the resourcepack to be used by the players, not the server

last sleet
#

Wait, you can't setCalcelled an inventoryCloseEvent?

wraith rapids
#

it's not cancellable, no

last sleet
#

aw

wraith rapids
#

best you can do is reopen the inventory after the event

#

which means delaying a player.openinventory call by 1 tick

last sleet
#

Im trying to give a player back his items from a GUI if he closes it by accident

#

Like in the crafting table, to avoid deleting items

wraith rapids
#

what does that have to do with cancelling the close event

last sleet
#

I tought i could just do a workaround by avoiding it closing the inventory

candid silo
#

updating my minigame plugin and when I right click any wants it throws this

[14:50:32] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to CWD v1.0-SNAPSHOT
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:499) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:466) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:462) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1591) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.network.protocol.game.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:28) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.network.protocol.game.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]```
#

        at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(SourceFile:151) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(SourceFile:125) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1124) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1117) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(SourceFile:134) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1101) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1030) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307) ~[spigot-1.17.jar:3099-Spigot-c9cea60-e2f5ea3]
        at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NullPointerException
#

also note I changed computers so could be some library thing

wraith rapids
#

Caused by: java.lang.NullPointerException

#

send the stack trace of the NPE

#

all of the stuff you've sent so far is useless and has no useful information

eternal oxide
#

the line after the caused by

candid silo
chrome beacon
#

It's the rest of the error

wraith rapids
#

that is not the full error

candid silo
#

ah

wraith rapids
#

you cut it off

#

you cut the important part off

#

always and every time include the full error

candid silo
#

didn't realize I didn't sorry

chrome beacon
#

And please..

#

?paste

undone axleBOT
candid silo
#

Im dumb

quaint mantle
#

@granite stirrup o.o Could you please help me to fix that? xd

candid silo
#

it's mad at this chunk

for (Entity e : p.getWorld().getNearbyEntities(p.getLocation(),7,16,7)) {
           if (e instanceof ArmorStand) {
               if (ProjectileInfo.TornadoTeam.containsKey(e)) {
                   if (!ProjectileInfo.TornadoTeam.get(e).equals(teamName)) {

                       Location entityLocation = p.getLocation().clone();
                       entityLocation.setY(e.getLocation().getY());
                       if (entityLocation.distance(e.getLocation()) <= 6) {
                           if (p.getLocation().getY() >= e.getLocation().getY() - 1) {
                               return false;
                           }
                       }
                   }
               }
           }
       }```
#

it just said that the for () line was where it's come from

wraith rapids
#

well

#

either p is null

#

or getWorld is null

#

neither of those should be easily achievable, though

candid silo
#

I also refer to p higher up in the method

wraith rapids
#

split each . onto its own line, or enable helpful null-pointer exception messages on your server

candid silo
#

wait it also says
"Caused by: java.lang.NullPointerException: Cannot invoke "java.util.function.Predicate.test(Object)" because "<parameter2>" is null"

wraith rapids
#

get the full error

quaint mantle
#

The plugin dosen`t load

#

It tells me "An internal error occured..." @granite stirrup

granite stirrup
#

show the error

candid silo
eternal oxide
#

StatusEffects.java:492

eternal oxide
#

that is line 492?

candid silo
#

the for() is

eternal oxide
#

then p is null

#

um, it can;t be

candid silo
#

it's not just checked

eternal oxide
#

You definitely have an odd error

wraith rapids
#

the exception is happening in the server source

eternal oxide
#

yep

#

in some predicate

wraith rapids
#

i don't have 1.17 sources so I can't really check what it's trying to do

eternal oxide
#

I have never seen an error like that

#

sec

#

813 is the iterator ```java
public void updateAdjacentComparators(BlockPosition blockposition, Block block) {
Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();

    while (iterator.hasNext()) {
        EnumDirection enumdirection = (EnumDirection) iterator.next();
        BlockPosition blockposition1 = blockposition.shift(enumdirection);

        if (this.isLoaded(blockposition1)) {
            IBlockData iblockdata = this.getType(blockposition1);

            if (iblockdata.a(Blocks.COMPARATOR)) {
                iblockdata.doPhysics(this, blockposition1, block, blockposition, false);
            } else if (iblockdata.isOccluding(this, blockposition1)) {
                blockposition1 = blockposition1.shift(enumdirection);
                iblockdata = this.getType(blockposition1);
                if (iblockdata.a(Blocks.COMPARATOR)) {
                    iblockdata.doPhysics(this, blockposition1, block, blockposition, false);
                }
            }
        }
    }

}```
#

why is it even in that method. Its supposed to be searching entities

wraith rapids
#

um

#

maybe it's a shulker? dunno

eternal oxide
#

thats possible, or a skull

eternal oxide
candid silo
#

it's the for loop itself not the contents

eternal oxide
#

thats why I asked you to comment out the internal code to be certain

candid silo
#

I did

eternal oxide
#

can you call just p.getWorld().getNearbyEntities(p.getLocation(),7,16,7)

#

no for loop

candid silo
#

that throws the error

eternal oxide
#

is there something special about where your player is? like very low down in teh world, or some odd block near?

candid silo
#

nope

#

one thing that maybe could be it

#

is that when I was setting up the world it threw an error related to the world so I gererated a single player world and copied the file in and it worked

eternal oxide
#

So its possible some corruption in your world somewhere

#

That would make sense

#

as no code you have should be capable of throwing that error

candid silo
#

imma redo my server setup

eternal oxide
#

just delete yoru world folder and let it be rebuilt on startup

quaint mantle
#

Heyyy, could somone help me with my headplugin?

i don`t get a head when i execute the command :(Ü

wraith rapids
#

you should quit while you're a head

eternal oxide
#

badumtish

wraith rapids
#

i'm a pretty funny guy

quaint mantle
#

Ehh i get heads, but only when i put hin the name if other players, when i do /head i don`t get one x

quaint mantle
#

You’ve been trying to help people for hours

eternal oxide
granite stirrup
#

i think spigot needs more api features to interact with nms really cuz if they did then no one would use nms

wraith rapids
#

most of the time when I'm sitting here I'm usually waiting for something else to happen

quaint mantle
#

Well too bad spigot will always depend on nms lol

wraith rapids
#

right now for example I'm waiting for my maven project to reimport

candid silo
granite stirrup
#

i think u should be able to send packets for example without nms in spigot

candid silo
quaint mantle
#

Sending packets is easy

paper viper
#

do you know now much api that must be covered then if you try to provide api for nms?

#

xD

quaint mantle
#

Idk, i only get a head when i do /head and a name, not when i do /head.

granite stirrup
paper viper
#

..bruh

wraith rapids
#

there's already an api for nms

proud basin
#

Quick question would you do if (this.plugin.getConfig().getBoolean("test.enable") == true) to check if its true or would you do test.enable.true

wraith rapids
#

it's called reflection

granite stirrup
#

without that flag and in future versions its gonna be removed

wraith rapids
#

neither would an api, then

quaint mantle
#

Spigot should just not override nms classes and force it into nms. Shoulda just included it all in the src

eternal oxide
paper viper
#

like for 1.17

#

a lot of package names changed

#

it aint really an api if it breaks a ton

#

lol

quaint mantle
#

If that was illegal they wouldn’t be able to use nms at all.

candid silo
granite stirrup
#

they patch nms

quaint mantle
#

You do know that spigot is just override nms classes

granite stirrup
#

they dont contain src of nms

#

patching is different from having it in src

quaint mantle
#

Not illegal

granite stirrup
#

and patching isnt illegal

#

but having it in src

#

is illegal

eternal oxide
quaint mantle
#

Lol show me where it’s illegal

granite stirrup
#

if you have nms code in your code its illegal

wraith rapids
#

laws are for pussies

quaint mantle
#

Show me

#

Where you figured this out

wraith rapids
#

real men use copyright as toilet paper

granite stirrup
paper viper
#

you can use the packets still

quaint mantle
#

Yea like what lol

paper viper
#

and interact with them

#

you just cant copy the code

#

its like any plugin using nms

granite stirrup
#

no i meant u cant distribute it lmao

paper viper
#

??

#

yes you can

granite stirrup
#

no u cant

quaint mantle
#

They could’ve easily put nms src in there

paper viper
#

you can distribute code that uses NMS, but you cant distribute code that has it

quaint mantle
#

Then applied more patches than they do

granite stirrup
#

ur not allowed to distribute nms

paper viper
#

so nms modules are illegal?

#

by your logic

granite stirrup
#

if u distribute spigot its illegal

paper viper
#

that isnt even the point im getting at..

granite stirrup
#

cuz it contains nms

wraith rapids
#

gstudios is probably talking about bomp's "Spigot should just not override nms classes and force it into nms. Shoulda just included it all in the src"

eternal oxide
#

If your module contains actual nms code, yes its illegal to distribute

paper viper
#

but if it uses it, its fine

eternal oxide
#

correct

paper viper
#

it just cant copy it

wraith rapids
#

as for what bomp actually means, I'm not sure

granite stirrup
#

i wasnt talking about using

#

i was talking about containing

#

lmao

wraith rapids
#

clone nms code into the spigot namespace? reimplement nms functionality with fresh code?

granite stirrup
#

tho the spigot jar contains nms so u cant distribute it

candid silo
#

that's not why I don't think

eternal oxide
#

it is

granite stirrup
#

it is

candid silo
#

I thought it was because bukkit shut down

granite stirrup
#

no

#

its cuz it contains nms

wraith rapids
#

bukkit was shut down because of it

eternal oxide
#

That is why spigot is built on your PC. so long as no code ever leaves your PC its "legal"

wraith rapids
#

being legal is overrated

granite stirrup
#

paper has a better solution tho

eternal oxide
#

"better"

granite stirrup
#

it doesnt take as long as buildtools to

paper viper
#

its not better

#

lol

granite stirrup
#

it is

quaint mantle
#

Nms is ass

paper viper
#

its less legal

#

xD

quaint mantle
#

So is everything built on it

wraith rapids
#

so you mean a full server reimplementation

quaint mantle
#

Just get rid of it and make your own server rasy problem

#

Solve

wraith rapids
#

yeah, there's plenty of projects out there that do that

#

the thing with them is that they all die before maturing

quaint mantle
#

Yes ofc

granite stirrup
#

anyway spigot cant just rip out nms and put it in they code

wraith rapids
#

or turn into forge

eternal oxide
#

with blackjack and hookers too

wraith rapids
#

which is probably still in 1.12

granite stirrup
#

forge dont have 1.17 yet

wraith rapids
#

the core issue is that mojang pays a big team of developers the big bucks to put together shit

quaint mantle
#

That’s somewhat true but there are some that are well in the works and doing well

wraith rapids
#

if you don't piggyback on nms, you need to re-do all of that yourself in a similar timeframe

paper viper
#

you know if everyone used fabric

#

the world would be a better place

granite stirrup
#

fabric doesnt support every mod tho

#

some mods only support forge

#

thats why its not a thing to switch to yet

paper viper
#

And forge has a stupid, messy api

#

do you know why many mod authors are moving over?

granite stirrup
#

i will switch once every mods

paper viper
#

including Phosophor's

wraith rapids
#

if you can't keep up, you end up using temporary solutions and accumulating maintenance debt

granite stirrup
#

will support fabric

wraith rapids
#

and eventually you run into the issue that mojang is working on 1.18

#

and you're still on 1.12

wraith rapids
#

with draft rewrites for 1.14 and 1.16

quaint mantle
#

Has somone 3 minutes for helping me with my plugin? xd

eternal oxide
# proud basin .

test.enable, but you don;t need to use the == true, as its already a boolean returned

paper viper
#

no cause that conditional statement

#

can be simplified

#

^ what elgar said

wraith rapids
#

lol

quaint mantle
#

Myplugin dosent work as it should, i only get a head when i put in /head and a name, not when i only do /head to get my own head :c

granite stirrup
#

i cant believe how quick optifine and fabric updated to 1.17

proud basin
#

but I need to check if they set it to true or false

eternal oxide
#

oh thats a person, I thought it was some bot with stars

granite stirrup
#

it took like 1 day

worldly ingot
#

i actually don't understand how Gradle can be this abysmal for me lol. stitchFrustrated
> changes plugin version in parent build.gradle
> builds project, generates VeinMiner binary with name including updated version
> plugin.yml still contains old version
like... wat

#

gradle cache presumably but how tf do I tell it to stop caching that?

eternal oxide
#

Use stern words

wraith rapids
#

write the number in your plugin.yml manually 🙃

worldly ingot
wraith rapids
#

can't trust machines to do anything right

worldly ingot
#

Clearly not :((

paper viper
#

never had that issue

granite stirrup
#

i just use maven

paper viper
#

.gradle/caches

granite stirrup
#

i dont mind the speed

paper viper
#

maybe try deleting that

eternal oxide
#

ping Conclure, he's gradle

quaint mantle
paper viper
#

@ivory sleet

#

only I

wraith rapids
#

@ivory sleet you're gradle

worldly ingot
paper viper
#

can ping him

ivory sleet
#

Oh hello

proud basin
granite stirrup
paper viper
#

it returns a boolean

ivory sleet
#

Yeah Choco that's a known bug

#

or Idk

worldly ingot
eternal oxide
ivory sleet
#

But I have a work around

#

1 sec

proud basin
#

it set to true but isn't doing anything I want it to when its true

eternal oxide
#

?paste

undone axleBOT
granite stirrup
#

if u wanna check against false its if (!statement) { if you want to check against true its if (statement) { not == true or == false

worldly ingot
#

am updating it manually. fuck Gradle. lol

granite stirrup
#

Gaydle

eternal oxide
#

mvn for life!

granite stirrup
#

tbh who cares about speed

#

just aslong that it works

paper viper
quaint mantle
#

Could somone help me? xd

paper viper
#

compared to the other benefits it gives

ivory sleet
#

@worldly ingot anyways

processResources {
    doFirst {
        file("${buildDir}/resources/main").listFiles().each {
            delete it
        }
    }

    def name = shadowJar.archiveBaseName.get()
    expand "pluginVersion": version,
            "pluginMain": "${rootProject.group}.${name.toLowerCase()}.${name}Plugin",
            "pluginName": name
}

I useed something like this to delete the old cached files.

granite stirrup
#

ayyyy 1.17 fixed performance issuess with servers on my pc :)

granite stirrup
#

my fan dont go high

wraith rapids
#

i am very seriously doubting that 1.17 improved performance at all

#

if anything it's probably from slightly to severely worse

eternal oxide
worldly ingot
granite stirrup
#

my fan isnt going loud

wraith rapids
#

you are the guy who said 1.14 outperforms 1.16

granite stirrup
#

like a jet engine

proud basin
wraith rapids
#

you are literally the last fucking person I will take a performance analysis from seriously

granite stirrup
#

lol

#

but it isnt faster

#

:(

eternal oxide
ivory sleet
paper viper
#

in nms

#

they can pass to constructor directly

paper viper
#

and it would be a little faster

granite stirrup
#

yeah but my fan in my pc isnt going like ultra jet mode when running mc and server

candid silo
granite stirrup
#

and the server actually runs

#

XD

#

i think mc ran in its backup java ?

#

cuz i dont have openjdk java

#

and it says mc is running with that

proud basin
granite stirrup
eternal oxide
eternal oxide
granite stirrup
#

@wraith rapids actually normally mc and the server uses more cpu than that so cpu usage is better

proud basin
#

I've got a delay on it

wraith rapids
#

@granite stirrup you're wrong

granite stirrup
eternal oxide
granite stirrup
wraith rapids
#

that is an useless metric

granite stirrup
#

well yeah fps isnt better but

quaint mantle
#

Could somone help me please with this:

package sircapalonge.cbsystem.commands;

import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Arrays;
import java.util.stream.Collectors;

public class Headcommand implements CommandExecutor {

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
    if  (label.equalsIgnoreCase("head")){
        if (!(sender instanceof Player)) {
            sender.sendMessage("§8[§eBeecraft§8] Du §3kannst §8diesen Befehl §3nicht §8nutzen.");
            return true;
        }
        Player player = (Player) sender;
        if (args.length == 00) {
            player.sendMessage("§8[§eBeecraft§8] Du hast §3erfolgreich §2" +player.getName()+ "§3 Kopf §8erhalten.");
            player.getInventory().addItem(getPlayerHead(player.getName()));
            return true;
        }
        player.sendMessage("§8[§eBeecraft§8] Du hast §3erfolgreich §2" + args[0]+ "§3 Kopf §8erhalten.");
        player.getInventory().addItem(getPlayerHead(args[0]));
        return true;
    }

    return false;
}
public ItemStack getPlayerHead(String player) {
    boolean isNewVersion = Arrays.stream(Material.values())
            .map(Material::name).collect(Collectors.toList()).contains("PLAYER_HEAD");

    Material type = Material.matchMaterial(isNewVersion ? "PLAYER_HEAD": "SKULL_ITEM");
    ItemStack item = new ItemStack(type,1);

    if (!isNewVersion)
        item.setDurability((short) 3);

    SkullMeta meta = (SkullMeta) item.getItemMeta();
    meta.setOwner(player);

item.setItemMeta(meta);
return item;
}

}

#

I only get a head when i put in /head and a random name.

Not when i do /head, when i do /head i should get a head but i don`t :c

granite stirrup
#

atleast i can run a mc server and mc together now

undone axleBOT
eternal oxide
candid silo
#

ElgarL it was world corruption and/or a bad build of spigot

paper viper
#

you have to tell us code, the issue

#

etc

paper viper
#

give us info

proud basin
#

I mean there isn't much else to show here is how I register the event ```java
getServer().getPluginManager().registerEvents(new OnJoinEvent(this), this);

quaint mantle
quaint mantle
wraith rapids
#

setOwner doesn't necessarily complete the profile and textures for an offline player

proud basin
#

and java getConfig().set("test.enable", "true");

paper viper
#

lmfao

#

also, you dont do if (label.equalsIgnoreCase("head")){

eternal oxide
paper viper
#

delete that

quaint mantle
#

i need help make server minecaft witch plugins

paper viper
quaint mantle
proud basin
granite stirrup
#

wait can u combine plugins?

granite stirrup
#

like make a plugin thats just a mash of other plugins thats opensource?

proud basin
quaint mantle
wraith rapids
#

yes

#

get a job

quaint mantle
#

Ahhh now is everythin red

#

:C

granite stirrup
#

i wonder how old the bukkitscheduler is

eternal oxide
proud basin
#

?paste

undone axleBOT
quaint mantle
#

@paper viper Now nothing works, bcause there are two errors o:

paper viper
#

also have you learned a bit of java before

opal juniper
#

Not just true

proud basin
#

ah

eternal oxide
quaint mantle
proud basin
#

my bad haha

eternal oxide
quaint mantle
#

Wait i am not able to send the screen

#

I dm you

eternal oxide
# proud basin my bad haha

saveDefaultConfig() will make teh dataFolder and copy the config from the jar to the folder if it doesn;t already exist

wraith rapids
#

@proud basin you have a wonderful chin

wraith rapids
#

it complements your nose

eternal oxide
wraith rapids
#

genuinely 5/5 combo

eternal oxide
#

you want to create it before you update it

opal juniper
proud basin
#

so I don't need if (!getDataFolder().exists()) in registerConfig

opal juniper
#

Nope

eternal oxide
#

nope

#

just saveDefaultConfig()

proud basin
#

Interesting

wraith rapids
#

the method is named poorly

proud basin
#

aw

wraith rapids
#

it's actually saveDefaultConfigIfNotExists()

proud basin
#

...

wraith rapids
#

but i guess saveDefaultConfig was shorter so they made do with that

proud basin
#

lambo

eternal oxide
#

to be precise createFolderAndCopyConfigResourceIfNotExists()

proud basin
#

That's way to long

wraith rapids
#

pretty much

#

no actual saving takes place

#

it just copies an embedded resource

#

which is why it's the only bukkit config 'save' method that doesn't nuke comments

opal juniper
#

Yeah but I think for the memes md_5 should change it to that just for the response from the paper devs when they are like wtf

eternal oxide
#

lol

gloomy edge
#

Would anyone know how to fix ```Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (default) on project World1-6Utils-Plugin: Error creating shaded jar: Problem shading JAR E:\project\Intellj-IDEA\Git\World1-6Utils\target\World1-6Utils.jar entry com/andrew121410/mc/world16utils/sign/screen/pages/SignPage.class: java.lang.IllegalArgumentException: Unsupported class file major version 60

atomic garden
#

where paper 1.17

opal juniper
paper viper
#

not released yet

wraith rapids
#

see this shitty reddit thread for what's up

eternal oxide
gloomy edge
#

Oh

proud basin
#

Is there any other way to comment in yml other than #

eternal oxide
#

no

opal juniper
#

No

paper viper
#

^

proud basin
#

how can I add a space between each config line like ```
water: true

candy: true```

eternal oxide
#

you can't if you are saving it

proud basin
#

oh

gloomy edge
proud basin
slate viper
#

im trying to change fish to they always think they are in water but i dont really know how can someone help me

eternal oxide
#

if you save it all comments and spacing is removed

proud basin
#

wym

eternal oxide
#

a config copied from the jar is saved just as it is, with all comments and spacing.
If you make changes to the config via code and save it all comments are removed.

granite stirrup
#

i only gave my 1.17 server 1gb of ram and its 20 tps

#

and im like on the worst hardware XD

proud basin
#

so type the config manually in the config.yml?

eternal oxide
#

yep

proud basin
eternal oxide
#

just don;t change settings via code, nor call save()

#

well just don;t call save()

proud basin
#

so I put ```yml
test:
enable: true

eternal oxide
#

yes

solid crypt
#

Anyone having trouble with NMS?

#

For 1.17?

proud basin
#
test:
  enable: true

water:
  enable: true
``` so like this
eternal oxide
#

yes

solid crypt
#

Mine isn't working out when I replace the 1_16_R3 to 1_17_R1

proud basin
#

yea no there isn't spaces still

eternal oxide
#

are you still calling save() ?

proud basin
#

maybe 🙂

granite stirrup
eternal oxide
#

🙂

solid crypt
#

Or do I just, well, fix the things that tail after it?

granite stirrup
#

yeah packages changed in nms 1.17 i think

wraith rapids
#

yes, 1.17 uses mappings

#

which means that everything is no longer in the same package

#

but actually in the packages that mojang uses

solid crypt
#

Can I get a doc or a change guide on it?

proud basin
solid crypt
#

Still a Spigot API noob. My plugins haven't updated in over a year D

#

xD

granite stirrup
#

i dont think there is one

#

nms isnt a api

#

or apart of spigot

#

it mostly should be avoided

solid crypt
#

Is there a better way for BlockEvents or MobGeneration than NMS?

eternal oxide
#

yes, the API

#

for blocks events at least

granite stirrup
#

u can spawn mobs without nms

eternal oxide
#

yep

solid crypt
#

I'll be seeking a different tutorial then!

eternal oxide
#

nms should always be a last resort.

granite stirrup
#

some things like packets is impossible without nms

#

atleast i think so

proud basin
#

Is there a method to convert tick into seconds?

granite stirrup
#

no

#

i dont think so

eternal oxide
#

If only there was some way to expand the API to cover packets

proud basin
#

I guess ima do some math to make one

slate viper
#

how could i use NMS in 1.17 i have never tried using it before but my friend asked me to try and code him something to change axolotl and dont really know what im doing

granite stirrup
eternal oxide
proud basin
#

ok

granite stirrup
#

(ticks*(0.05*60))

proud basin
#

actually

#

I have to convert seconds into ticks

granite stirrup
#

(seconds/(0.05*60))

wraith rapids
#

what

#

one second is 20 ticks

#

one tick is 1/20 seconds

granite stirrup
#

oh wait

#

oops

wraith rapids
#

to get seconds from ticks, divide by 20

#

to get ticks from seconds, multiply by 20

granite stirrup
#

ye

proud basin
#

so seconds / 20 ?

wraith rapids
#

no

#

seconds * 20 = ticks

#

ticks / 20 = seconds

proud basin
#

ah ok

wraith rapids
#

2 seconds is 40 ticks
2 * 20 = 40
40 / 20 = 2

proud basin
#

hm how am I gonna put a variable then L as it would count it as part of variable

wraith rapids
#

what

proud basin
#

this is for bukkit schedule

sage swift
#

you dont need to convert an integer into long

wraith rapids
#

what are you trying to do

proud basin
#

convert seconds into ticks

sage swift
#

seconds*20

wraith rapids
#

multiply by 20

proud basin
#

yes I know that

wraith rapids
#

it surely can't be that difficult

proud basin
#

but then I need to do timeL

wraith rapids
#

what are you concretely trying to do

sage swift
#

no you dont

wraith rapids
#

no, you don't

proud basin
#

I can't just put time

sage swift
#

hey i just said that

wraith rapids
#

i had a comma

proud basin
#

oh wait

#

I can just cast it

sage swift
#

and an apostrophe

wraith rapids
#

you don't need to cast it

#

an integer is upcast to long automatically

granite stirrup
#
public int ticksToSeconds(int ticks) {
  return (ticks * 20);
}

public float secondsToTicks(int seconds) {
  return (seconds / 20);
}```
sage swift
#

LOL

wraith rapids
#

don't listen to this guy

sage swift
#

that's exactly right!

wraith rapids
#

he doesn't know anything

granite stirrup
#

?

sage swift
#

good job idkidk123123!

granite stirrup
#

oh wait did i do something wrong in it?

proud basin
#

I can't put a comma you know that

wraith rapids
#
long myLong = 20;

20 is an int literal

#

however

#

java upcasts it to 20L automatically

wraith rapids
#

the same will happen when you are calling a method that wants a long

#

like runTaskLater

#

the int is automatically converted to a long

narrow vessel
wraith rapids
#

you don't need an L

#

you don't need to cast

#

it just happens

granite stirrup
sage swift
narrow vessel
#

public static final int TPS = Integer.MAX_VALUE

sage swift
#

^ literally 1.8

#

(best version)

proud basin
sage swift
#

no

#

you should just put seconds * 20

proud basin
#

oh

wraith rapids
#

or just runTaskLater(plugin, () -> {code}, seconds * 20)

sage swift
#

cod

wraith rapids
#

no need to make a variable

sage swift
#

cooked code

slate viper
#

how would i edit an entity

wraith rapids
#

entity.remove()

granite stirrup
#

my server is like loading 1 chunk per 2 seconds 🤣

sage swift
#

Bukkit.shutdown()

narrow vessel
granite stirrup
wraith rapids
#

tps can fluctuate, it doesn't really matter

sage swift
wraith rapids
#

the best you can do is schedule something asynchronously, so tps doesn't affect it

narrow vessel
#

seconds * getTPS()[0]

#

very professional

granite stirrup
#

how old is the bukkit scheduler

wraith rapids
#

as old as bukkit

granite stirrup
#

wow old

narrow vessel
#

was reading about whatever the fuck happened to bukkit earlier and jesus christ its a rabbit hole

wraith rapids
#

legal is bullshit, basically

narrow vessel
#

yes

granite stirrup
#

to sum it up really it was just illegal cuz it contained nms

wraith rapids
#

your mom contains nms

granite stirrup
#

same as urs

sage swift
#

yeah well your mom is api

#

easy to access

granite stirrup
#

yeah i saw the python ur mom lib

somber hull
#

Ok

#

I finally switched over to Intellij

#

How do i export with maven?

granite stirrup
#

u click build

#

but u have to be in a maven project

somber hull
#

Yea its a maven project that i imported from eclipse

#

Making sure it still works

#

Got no errors in the IDE

opal juniper
#

You need to make an artifact

granite stirrup
wraith rapids
#

you press r shift 3 times

#

write "maven please compile fuck you"

narrow vessel
#

if youre not cringe and you use intellij you can double click this 😳

wraith rapids
#

and find the maven package button

#

then you throw salt over your shoulder

#

hippity hoppity in a circle 5 times

#

draw a pentagram with virgin blood

#

and hit the package button

proud basin
#

quick question how could i use ' in config.yml because it just message up when its in a string

wraith rapids
#

''

#

or \'

narrow vessel
#

yeah

#

escape it

#

or use chad "

proud basin
#

oh I'm allowed to use "

wraith rapids
#

no, ' and '

#

not a double quote

#

two single quotes

granite stirrup
#

what i used ' ' without \

wraith rapids
#

yaml is weird about being human friendly

#

so it lets you escape ' with another '

#

which is dumb

eternal oxide
#

you can use double to wrap a string, then use ' inside

granite stirrup
#

ayyy a epic 2 chunks a second

eternal oxide
#

or escape it

wraith rapids
#

also that

#

the annoying thing about yaml is that it tries to be too human friendly

#

leading to like 50 different ways of doing things

granite stirrup
#

im going faster than the chunks loading

#

XD

opal juniper
#

What is this 1.17 bug which keeps world loading @ 0% - is it loading something else first?

proud basin
half sinew
#

how can i edit an entity in 1.17

narrow vessel
#

please elaborate on what you mean by "editing an entity"

granite stirrup
#

i can go faster than chunk loading

#

XD

half sinew
#

i want to make it so axolotl think they are always in water so they just swim everywhere

granite stirrup
eternal oxide
somber hull
#

Is there a way to build to a specific folder with maven in intellij?

granite stirrup
#

i think so

#

i think its called modules

wraith rapids
#

real men use don\u0027t

half sinew
granite stirrup
eternal oxide
#

UTF-8 code for '

somber hull
proud basin
narrow vessel
eternal oxide
#

which did you use?

narrow vessel
#

i think this could do it

#

no idea

proud basin
#

\'

eternal oxide
#

use the other

#

quotation marks around the whole string

wraith rapids
#

use unicode like a real man

eternal oxide
#

with quotation marks you can put almost anything in there so long as its not another quotation mark.

ivory sleet
#

either
' don''t '
or
" don\u0027t "
iirc u need double qoutes for the latter

somber hull
#

a

proud basin
#

um'

#

so yml No-Permission: "&cdon\u0027t"

granite stirrup
#

LMAO HE CANT GET ME

eternal oxide
#

or yaml No-Permission: "&cdon't" Should work

granite stirrup
#

use no "" or ''

#

:)

eternal oxide
#

its obviously " 🙂

wraith rapids
#

i think omitting the " s lets you use special characters all you want but I can't fucking remember

#

yaml and its fifty fucking trillion syntaxes for a string

granite stirrup
#

so i believe ' < u use these for unicode and stuff and u use " for strings

wraith rapids
#

no

#

' has nothing to do with unicode

granite stirrup
#

oh thats how it works in python or something idk

eternal oxide
#

\u is unicode

proud basin
#

bro i'm actually confused lmao

granite stirrup
eternal oxide
#

ah yes

proud basin
#

so what should I use

granite stirrup
#

any

eternal oxide
#

the one above I showed you will work

ivory sleet
#

arguably "don't" is most readable of them all

granite stirrup
#

what if i liked 'don''t' :)

ivory sleet
#

¯_(ツ)_/¯

granite stirrup
#

is there anything new in the new api

ivory sleet
#

new mobs

#

new materials

granite stirrup
#

we really need to have a packet api in spigot

wraith rapids
#
string: |
  don't
ivory sleet
#

I mean it wasn't any major additions to the api

#

I mean the api is kinda meant to abstract away the need of using packets

granite stirrup
#

yeah but u cant send ur own packets

#

without nms

wraith rapids
#

you aren't supposed to need to send packets

proud basin
#

aha works

granite stirrup
proud basin
#

man screw yml

wraith rapids
#

yes, well, the api doesn't support doing that

granite stirrup
#

cuz the api only does hiding player for a player

#

so we kinda need a packet api for spigot

wraith rapids
#

there already is one

#

it's called protocollib

ivory sleet
#

or just a pr to add that functionality to the api

granite stirrup
#

thats broken on 1.17

wraith rapids
#

packets aren't part of the core spigot api because they change wildly from version to version and there is no way to keep them constant

wraith rapids
#

still not constant

granite stirrup
#

how did protocol lib do it then

wraith rapids
#

protocollib's interface is not constant

#

it still can change from version to version

proud basin
#

Do you guys start your plugins at 1.0.0 then go to 1.0.1?

paper viper
#

that depends entirely on how you think

#

of versions

granite stirrup
#

0.1.0 -> 0.1.1

eternal oxide
#

I start at 0.0.1

wraith rapids
#

real men only have 1.0, because real men get everything right on first try

paper viper
#

Some start at 0.0.1, some start at 1.0

granite stirrup
#

but i start 0.0.1 for beta or alpha

paper viper
#

thats what i do too

halcyon topaz
#

Anyone else having issues with changing the player attack speed attribute? It always resets back to default after the first hit for me :/

granite stirrup
#

0.1.0 for release

wraith rapids
#

1.x is generally used for release

granite stirrup
#

and if u release like a major build or something u could do 1.1.0

#

i like major.minor.patch

wraith rapids
#

and release is a minor update?

sage swift
#

minecraft 2

granite stirrup
ivory sleet
#

the patch is used for tweaks where for instance the api doesn't change, minor might have an impact on api or how the api should be used and then major which basically is like new features I guess.

proud basin
wraith rapids
#

the first full release of the project is definitely a major update

#

even if nothing changes from the last patch

#

it marks a milestone in the project's lifecycle

proud basin
#

hm ok

#

but if you started 0.0.1 then you would go to 0.0.2 im guessing

ivory sleet
#

it entirely depends on the changes

proud basin
#

What if its just like a config update?

ivory sleet
#

Then we need to think about it, is it a new config feature? Does it have an impact on the api? What consequences will it have? etc

proud basin
#

Yes, no, It won't have any as it would allow them to customize more

ivory sleet
#

At the end of the day you decide yourself. But be reasonable about it.

proud basin
#

agh I don't know

ivory sleet
#

I consider patches mainly to fix and tweak bugs and optimizations.

proud basin
#

hm

wraith rapids
#

just use a build number and increment it with each change

proud basin
#

ok

#

going to 0.0.2 thne

wraith rapids
#

starting from 1

#

then 2

#

then 3

proud basin
#

like 1.0?

wraith rapids
#

no just 1

#

paper is currently at like 700 something

proud basin
#

what's the difference between 1.0 and 1?

#

aren't they really just same number

wraith rapids
#

that 1.0 would imply that there is a smaller increment than 1

#

there might be a 1.1

#

or a 1.2

#

with 1, there can only be 1 or 2

#

no in-between

proud basin
#

hm

#

agh

wraith rapids
#

if you have in-betweens, you need to decide whether an update is major (increment the bigger number) or minor (increment the smaller number)

proud basin
#

i don't know anymore

wraith rapids
#

so the solution is to have only one number

proud basin
#

Would a config update be a major update?

wraith rapids
#

one that you don't need to think about

proud basin
#

I don't think so

#

ok ok

#

so then I start at 1 then go to 1.0 then 1.0.1?

#

or..

wraith rapids
#

no

#

you start at 1

#

then you go to 2

#

then you go to 3

#

no in-betweens

#

no dots

#

just a number

proud basin
#

but what if it's a like a small update?

wraith rapids
#

then you also increment it by 1

#

there is no distinction between small or large

#

if there is, you need to make the choice

#

which is what you're having trouble with

hybrid spoke
#

i like to seperate the versions

#

like 1.1, 1.1.2, 1.2, 1.3, 2, 2.1

wraith rapids
#

also doable

#

in the only public plugin I have, I use a pretty fringe versioning scheme

#

plugin version, paper build it was written against, nms version it was written against

proud basin
#

hm

#

I hate this

wraith rapids
#

like 2.3.1 484 1_16R3

hybrid spoke
#

or you have builds instead of versions like some other projects.
Build#1 Build#2....

#

but i am not a fan of that

wraith rapids
#

yeah, that is what I was describing earlier

#

it's less informative, but because of that, it's less effort

proud basin
#

ok ok

#

I go start 1

#

if its small update then I do 1.1

hybrid spoke
#

i would handle it like chapter of your project.

chapter 1 = 1.0
an update to chapter 1 = 1.1
an update to the update to chapter 1 = 1.1.1
next chapter = 2.0

proud basin
#

hm ok

proud basin
hybrid spoke
#

^^

proud basin
#

ok ok

lunar wedge
#

I want to make my own placeholder in my plugin (without PAPI) so if the lang.yml sees {player} it'll use the players name. Any suggestions on how to do something like this?

wraith rapids
#

String::replace

sage swift
#

o papi!

gaunt hatch
#

omg ok this first step of the code going back to ofustaction to go to miencraft objects sucks, tbh should have waited till it was fully ready.

proud basin
#

Ok dope just released the update thank you @hybrid spoke

quaint mantle
#

I have a question: Is it possible, to create custom recipes, with custom items?

I created some custom items, and i want to use them as ingridents. Could somone please tell me if that is possible and how?

#

not with spigot/bukkit afaik

dusk flicker
#

You can

#

You can using the RecipeChoice#ExactChoice, I'll find a javadoc link quick;y

hybrid spoke
#

you have to use an event iirc

quaint mantle
#

Yes? o.o

#

er wait, im stupid. i know many plugins with custom recipes.

gaunt hatch
#

Anyone know much about gradle 7?

quaint mantle
quaint mantle
#

Wait, i send what i have coded, i want that instead of emeralds blocks, the recipe uses enchanted emeralds blocks:

dusk flicker
#

You would set the ingredient using the top javadoc link, and you would put a RecipeChoice using ExactChoice in with your itemstack and that has to match exactly

quaint mantle
#

Oh i can`t send screens here.

dusk flicker
#

You would need to verify

quaint mantle
#

Okay, wait tysm for your help, altough i don?t really understand what i have to do o.o

dusk flicker
#

Have you created a recipe arleady?

#

Using Shaped or Shapeless Recipe objects

quaint mantle
#

Yes!

Shaped.

#

I send you the screen o.o

gaunt hatch
#

Does anyone know how to include a dependency from a modular project in gradle 7?

hybrid spoke
#

you mean the module itself?

gaunt hatch
#

Yea so I have 38 projects in one solution and I am trying to add the dependency from one to the other,

In gradle 6 it was
complie(":<projectname>")

quaint mantle
hybrid spoke
#

implementation(":<NAME>") i guess

gaunt hatch
#

doesnt work

#

tried that lol

hybrid spoke
#

are you in your settings.gradle or in your build.gradle?
also are you in your dependency {}?

gaunt hatch
#

build and yes

sage swift
#

i made a whole plugin for custom recipes

#

supports RecipeChoice (exact and material) and multiple choices

hybrid spoke
gaunt hatch
#

yes

#

it takes it and accepts it on the refresh but the project does not see the dependency

hybrid spoke
#

ugh hm, i don't like gradle. @ivory sleet could help you i guess

hybrid spoke
granite stirrup
#

grADle (gaydle) is to complex

gaunt hatch
#

it does

#

modlue has not changed and its build that way

hybrid spoke
#

implementation project(':name')

#

🤔

sage swift
#

@quaint mantle for custom recipes, you should honestly just use a separate plugin instead of hardcoding it within yours (unless you're gonna publish it)

gaunt hatch
#

oh snap

#

the 'project' declare might have done it

#

let me update the 38 plugins and see

summer scroll
sage swift
#

so its not in the jar

summer scroll
sage swift
#

that's not the jar is it

gaunt hatch
#

So werid lol

hybrid spoke
#

fiiiiiiiiiiiiiirst of all

granite stirrup
#

lol u can run viaversion on fabric its called viafabric

hybrid spoke
#

why

summer scroll
sage swift
#

the final jar doesnt have it

gaunt hatch
#

So it works but gradle does not like it give me ui errors, but complie is fine lol

sage swift
#

use a decompiler

summer scroll
#

okay, i'll try.

hybrid spoke
sage swift
#

or that

summer scroll
#

ah yes, it's not on the jar

#

nvm

#

it is on the jar

summer scroll
#

it looks weird

sage swift
#

oh

#

lol

#

there's no plugins package is there

hybrid spoke
#

on the jar but not in your destination folder, right?

sage swift
#

so why are you trying to get it from plugins/TheOnly-MobCoins/categories/armor.yml

waxen locust
#

hey, I coded a plugin, built it, and added a copy of the jar to /plugins folder in my server, but when I run pl on console it says 0 plugins installed. Is there anything else I have to do?

sage swift
#

did you restart

waxen locust
#

yep

summer scroll
#

ahh i get it now

sage swift
#

did you look in the console for the error

waxen locust
#

still pl returns 0

summer scroll
#

so just get from categories/armor.yml

sage swift
#

yes

#

:)

summer scroll
#

smh

#

aight thanks

waxen locust
sage swift
#

look closer

waxen locust
#

ah i see

hybrid spoke
#

do you have a subclass of javaplugin? did you add the jar correctly?

sage swift
#

?paste if you're gonna send an error here

undone axleBOT
waxen locust
#

my plugin.yml isnt in the jar for some reason

#

ah sorry

#

that was a text wall

#

Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml

sage swift
#

not too bad but the error is self-explanatory

#

how are you creating the jar

waxen locust
#

just building and duplicating

#

plugin.yml is listed in my source packages next to the two classes in the plugin

summer scroll
#

the plugin.yml should be on the root of the plugin folder or whatever

waxen locust
#

ill try this, ty

ivory sleet
#

@hybrid spoke Conclure at your service

quaint mantle
#

Hi guys; so I have a file structure coupled with my config.yml

#

However, my other configuration.yml files are not being created by bukkit when I run my plugin. Do I need write a script that creates this? Is it not sufficient to simply add these files to your resources section with default values?

ivory sleet
#

Plugin#saveResource

quaint mantle
#

So, I'd have something like this:

[config.yml]
|
[config2.yml]//not in the directory
|
[plugin.yml]//not in the directory
|
+ [config3.yml]//not being created
|
[config4.yml]//not being created

quaint mantle
#

Where do I do this? I don't create these files in the code; I created these files externally in my IDE & have them packaged with the jar via Maven

covert bluff
#

there's no vcs tab

#

it's Git instead

summer scroll
#

The config is not loaded yet.

#

By moving the initialization

next stratus
#

Hey, using fastasyncworldedit in 1.16 or so whats the best way to load a schematic, paste it at a location and then loop the paste region finding certain blocks?

#

I've been trying to use its api but the docs are useless for it.

#

There's no decent docs explaining how to do things at all.

opal sluice
#

Use the WorldEdit API doc

#

It's the same unless you use specific FAWE things

next stratus
#

I mean, whenever I try and build using fawe it just doesn't wanna work at all.

opal sluice
#

Just make sure to use the fawe edit session instead of the worldedit one

#

yup, listen for the tab complete event and cancel it for that specific command

quaint mantle
#

@ivory sleet I tried what you said at the start of my plugin via the following lines:

    ``` plugin.getConfig().options().copyDefaults();
    plugin.saveDefaultConfig();
    plugin.saveResource(plugin.getDataFolder().getPath() + "\\capturables\\Nations-Config.yml", true);
    plugin.saveResource(plugin.getDataFolder().getPath() + "\\capturables\\Town-Config.yml", true);```

However, I am now running into this problem:
java.lang.IllegalArgumentException: The embedded resource 'plugins/nationsatwar/capturables/Nations-Config.yml' cannot be found in plugins\nationsatwar-0.0.1-SNAPSHOT-shaded.jar

Finally, I am using the maven build goals 'compile package'

next stratus
#

I just wish there was more resources on doing it you know?

opal sluice
#

The only thing that will change will be the edit session

#

and that's mentioned in their doc

next stratus