#help-development

1 messages · Page 2126 of 1

small current
#
Location location = player.getLocation();
location.setDirection(blockToFace.getLocation().subtract(location).toVector());
player.setLocation(location);
golden kelp
#

oh

sharp flare
#

Yeah possible

#

I can make similar one in a minute with that

earnest forum
#

track drop events and locations

sharp flare
#

All u need is drop item event then do ur work there

urban spire
#

hash map uwu

golden kelp
#

got any plugin ideas guys?

golden kelp
#

;( ok

#

not related to that, something more fun

rough drift
golden kelp
#

ok

manic crown
#

is there a way to delete the "world" and regenerate it, without server restart?

rough drift
#

iirc yes

#

Don't know how

manic crown
#

with the nether and end it works fine, but with world it does nothing

summer scroll
#

Can someone explain to me why Block#applyBoneMeal has BlockFace parameter?

trail oriole
#

This might not be directly related to spigot, but anyone knows a good tutorial to learn hash maps?

#

It seems like everyone uses them

#

And useful for a lot of stuff

undone axleBOT
trail oriole
#

Well they don't talk about maps there

#

I mean I didn't read all of it

crude loom
manic crown
#

This so Work Till delete, but it doesnt generate the world...

crude loom
#

To regenerate the world do:
Bukkit.createWorld(new worldCreator("worldname"))

manic crown
# crude loom To regenerate the world do: ``Bukkit.createWorld(new worldCreator("worldname"))`...
...
  { 
  World world1 = Bukkit.getWorld("world");


            Bukkit.getServer().unloadWorld(world1, false);

            File delWorld = new File(Bukkit.getWorldContainer(), "world");
            try {
                FileUtils.deleteDirectory(delWorld);
                delWorld.mkdirs();

            } catch (IOException e) {
                e.printStackTrace();
            }

            sender.sendMessage(DeathTimer.prefix + ChatColor.GREEN + "Generating overworld");
            Bukkit.createWorld(WorldCreator.name("world").environment(World.Environment.NORMAL));

this is what i´ve done, and that isn´t generating the world...

granite owl
#

who was the guy who asked about how to properly check if an inventory is a custom one?

#

like awhile ago no one replied

#

if u by chance read that ive found a great tutorial. not very nooby friendly but totally functional

golden kelp
#

any short "minecraft but" ideas guys?

dark arrow
dark arrow
golden kelp
#

What is your idea

dark arrow
#

I am working on a magic wand , with magical spells and we have to creaft the magical wand by throwing some magical items in a cauldron and to use spells we need to creaft a special book in order to use that specific spells

#

but i am stuck on making the wand part(i have made one spell tho)

golden kelp
#

oo isee

#

kinda big idea

dark arrow
#

yah

#

the idea was not mine compltely

#

i am mainly doing the coding part and my one fried is giving idea about spells and recipes

dark arrow
#
 @EventHandler
    public void onDrop(PlayerDropItemEvent event){
        Player player =event.getPlayer();
        Item item = event.getItemDrop();
        if(event.getItemDrop().getItemStack().getType()==Material.DIAMOND&&event.getItemDrop().getItemStack().getType()==Material.DIAMOND_BLOCK){
           player.sendMessage("Why are you so noob");
           player.sendMessage("Get nethrite");
           player.getWorld().spawnEntity(player.getLocation(), EntityType.LIGHTNING);
        }
    }```
dark arrow
worldly ingot
#

An item will never be both a diamond and a diamond block

dark arrow
#

its not the wand reipe as i was just doing some tests

fringe hemlock
#

Change && to || it can’t be both a diamond and a diamond block

dark arrow
#

i want to summon lighning if both are dropped on ground

worldly ingot
#

e.g. both at the same time?

#

Or just one of the two?

dark arrow
#

not really

#

suppose if a drop a diamond

#

then after few mins i will drop a diamond block

#

then also it should work

crisp steeple
#

…why would the event work like that?

harsh totem
#

if i try to get a player from a player name that doesn't exist will i get NPE or IllegalArgumentException?

crisp steeple
#

the event gets called when one item is dropped

eternal oxide
fringe hemlock
#

You could check for any items within a 0-1 block radius of the dropped item after 2-3 ticks

golden kelp
#

oh

dark arrow
#

ohh

serene plover
#

what is going on in here

fringe hemlock
#

Also you could do player.getWorld().strikeLightning() instead of spawnEntity :)

crude loom
crude loom
manic crown
#

yea

#

it just dont generates it

eternal oxide
manic crown
#

but with nether it works fine

eternal oxide
#

If its not been loaded it can

#

you can;t unload either

granite owl
#

lots of up and downcasting

#

but it works just fine

#

can even store additional data because the parent class doesnt get lost

#

due to the nature of inventories

#

unless the inv gets closed

crude loom
#

Yes that's what I mean haha

vestal dome
#

Does anyone know how to disable the ">" char and turn the bungeecord prompt to the normal prompt? My output streams don't work! Can't read the console!

granite owl
#

not video

quaint mantle
#

I saw one

#

D:

granite owl
#

anyways i let it run trough a for i to 10k loop couple of times to check for memory leaks

#

but it works just fine

quaint mantle
#

guess someone made a video from it

granite owl
#

let the instancing run for around 1m times

#

no increase in ram usage

#

so i suppose its not leaking

#

xD

quaint mantle
#

The only way it would leak is if the inventory is stored inside of a map and never removed or the reference is never cleared so garbage collection can't delete it from memory @granite owl

granite owl
#

yea ik as soon as the reference count of the inventory viewers hits 0 it should get GC'ed

#

even if its in a wrapper class

#

given the wrapper class has no other reference anymore

#

but since i actually pass the vanilla inventory with events and then upcast it without further reference like this

#
public static void onInventoryClose(InventoryCloseEvent event)
    {
        if (event.getInventory().getHolder() instanceof InventoryViewer)
        {
            //InventoryViewer inv = (InventoryViewer) event.getInventory().getHolder();
            
            //TODO
            //implement
        }
    }
#

there shouldnt be an issue

quaint mantle
#

static?

granite owl
#

its a callback

#

called from the callback

#

i dont implement my methods in the bukkit callbacks

#

cause it gets too messy too quickly

#
    @EventHandler
    public void onInventoryClose(InventoryCloseEvent event)
    {
        ViewInventoryCommand.onInventoryClose(event);
    }
echo basalt
#

you are special

granite owl
#

sure whatever

#

xD

#

oh no

#
public void onEnable()
    {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);
        
        Callbacks.init(this);
        Ranks.init(this);
        Admin.init(this);
        User.init(this);
    }
    
    public void onDisable()
    {
        Callbacks.disable(this);
        Ranks.disable(this);
        Admin.disable(this);
        User.disable(this);
    }
quaint mantle
#

also that code style breaks my brain D:

granite owl
quaint mantle
#

void method()
{

}

granite owl
#

^^

quaint mantle
#

lmaoo

#

it's fine, a compiler cleans it up anyway

granite owl
golden kelp
#

How to get the name of a advancement the player just completed

quaint mantle
granite owl
#

PlayerAdvancementEvent or such?

quaint mantle
#

I'm a walking talking java doc

granite owl
#

and in the end

#

the main reason for failed maintainability was always that it got too messy thanks to optimization

golden kelp
quaint mantle
#

getAdvancement().name()

#

It's an enum right?

granite owl
#

xD

quaint mantle
#

omfg it's not

golden kelp
#

nope its not

granite owl
#

its a key

#

getAdvancement().getKey()....

golden kelp
#

what will that return? the name?

granite owl
#

interface keyed

quaint mantle
#

Ok I didn't see that 👀

golden kelp
granite owl
#

Methods inherited from interface org.bukkit.Keyed

golden kelp
#

I have never used Keyed in the past

quaint mantle
#

.getKey().getKey() or .getKey().getNamespace() not sure

granite owl
#

java.lang.Object
org.bukkit.NamespacedKey

#

seems u retrieve the name of the advancement from the key

#

in the end its a string

#

but seriously

#

enough help

#

abit own effort now pls 😛

#

ive been told not to spoonfeed ppl

#

xD

granite owl
# golden kelp and then?

just read trough the docs u can lit apply the path u walk 1:1 in ur IDE in the end u want a string

#

@quaint mantle any idea how to implement the prefix in a chat msg in a better way?

#
@EventHandler
    public void onPlayerChatEvent(AsyncPlayerChatEvent event)
    {
        Team t = Bukkit.getScoreboardManager().getMainScoreboard().getEntryTeam(event.getPlayer().getName());
        if (t == null) return;
        
        String msg = "<rank><name>: <msg>";    
        msg = msg.replace("<rank>", t.getPrefix().replace("%", "%%"));
        msg = msg.replace("<name>", ChatColor.RESET + "%1$s");
        msg = msg.replace("<msg>", "%2$s");
        event.setFormat(msg);
    }
#

problem being that javas native string formatter thats being used here easily breaks

#

like with using %

quaint mantle
granite owl
#

ive replaced % with %% to make it work but it feels like a sloppy solution

#

to a bigger underlying problem

granite owl
golden kelp
#

What is Keyed used for

granite owl
#

well like the inerhited inferface tells u

#

to namespace things

#

minecraft:...

#

bukkit:...

#

pluginName:...

golden kelp
#

ohh that thing

granite owl
#

PDC for example is using it to namespace nms values so that they're seperated by plugin instance name

#

so to write metadata and seperate it by plugins

quaint mantle
#

Is there an method to send an message to an bungeecord player? like replying to an chat event or something.

#

didn't find anything

manic crown
#

how can i get the amount of an item laying on the ground?

quaint mantle
slim kernel
#

why cant I build my project after I pulled it from github?

quaint mantle
slim kernel
quaint mantle
quaint mantle
dark arrow
quaint mantle
#

yes but he didn't ask for when a player drops an item

#

just an item on the ground

dark arrow
#

oh

#

my bad

slim kernel
quaint mantle
#

You need to setup a build configuration if you want to do that

slim kernel
quaint mantle
#

Reason for that is if the project has a .gitignore and it ignores the .idea folder (which is normal practice for developers), all the settings for that project are stored in that folder

slim kernel
slim kernel
#

okay

#

thank you!

quaint mantle
#

no problem

#

You know how to setup a configuration for install too?

golden kelp
#
        String advancement = event.getAdvancement().getKey().toString();

This will return smth like minecraft:book. How I do get the advancement name from this?

midnight shore
golden kelp
#

show project structure & your plugin.yml

midnight shore
quaint mantle
#

I'm pretty sure

golden kelp
#

That returns the namespace?

#

like minecraft

quaint mantle
#

or .getKey().getKey()

#

just try and see

golden kelp
#

aight

trail oriole
#

Any ideas on how to make a cooldown without using a hashmap?

river oracle
#

Don't

golden kelp
#

Why

#

why dont u want a hashmap

#

Oofus dīñgüß doofus

river oracle
#

You make a cooldown without a hashmap by alt f4jng and never touching a programming language again

quaint mantle
#

yeah I'm pretty sure it's impossible unless you have a custom player object in a list

#

but that's a shit way

golden kelp
#

U can make one using Thread.sleep (jk)

river oracle
#

Ahahs

trail oriole
river oracle
#

Only the Chad's use thread.sleep

safe notch
river oracle
safe notch
golden kelp
crisp steeple
trail oriole
#

I've been trying for the entire day (somewhat)

river oracle
#

If you don't want to learn no point in you continuing coding much of anything just pay someone else to do it for you

golden kelp
#

Btw does thread.sleep freeze the server

river oracle
#

Yea

safe notch
#

ye

crisp steeple
river oracle
#

It sleeps main thread

quaint mantle
crisp steeple
#

use put (player uuid, current time) and use getOrDefault(player uuid, 0)

#

then compare if the current time minus the get value is less than a certain threshhold

river oracle
#

My hashmap is usually UUID Long for players

trail oriole
#

Thanks

echo basalt
river oracle
#

👍 👌 🙆‍♂️

golden kelp
quaint mantle
golden kelp
#

Oh ok got it got it

river oracle
#

AFAIK it's single threaded if you try to run stuff in other threads your server dies

golden kelp
#

Like ur own threads

river oracle
#

Related to bukkit directly atleast

echo basalt
#

some features are paralel

#

chat is async

river oracle
#

All I know is world creator is not don't try it

quaint mantle
#

aka stuff to do with blocks

river oracle
#

Isn't that mojangs fault tho

crisp steeple
#

anything that is dependent on game ticks really

#

you would probably only want to use async for external things like reading a file or connecting to a db

golden kelp
#

Does anybody know minestom

#

Sick thing

quaint mantle
#

yea

golden kelp
#

I saw a guy, he made a like COOOOOOL AF mod like thing using minestom and all of it was server side so no mods

midnight shore
#

java: non-static variable this cannot be referenced from a static context |

#

could anyone help me?

quaint mantle
midnight shore
#

the first image

tender shard
#

@midnight shore do you know what "this" means?

midnight shore
#

yeah but the fact is that i didn't ever use this

tender shard
#

?paste your whole class pls

undone axleBOT
midnight shore
#

wait i found a fix

#

ty anyways

tender shard
#

what was the problem?

golden kelp
#

java

midnight shore
dark arrow
#

how to get the player we are looking at

golden kelp
#

first google search

#

just check if its a player and boom

urban kernel
#

how can i read the config file in /src/main/resources/config.yml? i use bungee

golden kelp
#

just use the getConfig() method?

harsh totem
#

Is there an event for player killing player?

crisp steeple
#

entitydeathevent

pliant loom
#

Is it possible to detect when a fishing rod hook hits a fishing "fish" thing but before the player clicks it to get the fish?

#

I tried projectile hit event but that doesn't seem to be working

midnight shore
quartz sorrel
#

Does anyone know if commons-text is part of Spigot or if I have to compile it into the plugin?

dusty herald
#

those variables are so confusing bro ngl

golden kelp
#

yes

west orbit
#

am i meant to register command somewhere? whenever I go ingame and try to run my command, it tells me unknown command. i'm just messing around with stuff

golden kelp
#

yes

west orbit
#

how would one do that if thats not too much spoonfeeding

golden kelp
west orbit
#

ah i see, thank you

golden kelp
#

:)

crisp steeple
#

also yeah those variables are like unintentionally obfuscated

harsh totem
#

in EntityDeathEvent will event.getEntityType() return me the entity that died or that entity that killed?

crisp steeple
pliant loom
#

fishing hook hit fish before player pulls rod back

dark arrow
#

how to get targetted entity

harsh totem
golden kelp
#

give a bit of context as well please

dark arrow
golden kelp
dark arrow
#

oo

#

thanks

harsh totem
urban kernel
#

how do i fix

[15:23:54 ERROR]: java.io.FileNotFoundException: plugins/HubPlugin/config.yml (No such file or directory)
[15:23:54 ERROR]:       at java.base/java.io.FileInputStream.open0(Native Method)
[15:23:54 ERROR]:       at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
[15:23:54 ERROR]:       at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
[15:23:54 ERROR]:       at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:77)
[15:23:54 ERROR]:       at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:71)
[15:23:54 ERROR]:       at world.netherite.hubplugin.Main.onEnable(Main.java:38)
[15:23:54 ERROR]:       at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:315)
[15:23:54 ERROR]:       at net.md_5.bungee.BungeeCord.start(BungeeCord.java:290)
[15:23:54 ERROR]:       at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
[15:23:54 ERROR]:       at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
[15:23:54 ERROR] [HubPlugin]: FAILED TO LOAD CONFIG FILE!
harsh totem
pliant loom
#

Make sure the directory and file exists

urban kernel
#

how do i create it by default

harsh totem
dark arrow
urban kernel
crisp steeple
#

@harsh totem getEntity()#getKiller()

pliant loom
#

this.createDefaultConfig() is the easiest way, but you could also just use File() I believe.

upper vale
#

You should just compile a config.yml in your plugin

harsh totem
upper vale
#

Creating the file by code and then manually setting default values is pain

urban kernel
#

in my file structure

upper vale
#

In resources if you’re using maven

#

In project root if ur not using maven

urban kernel
#

yeah i've put it there

#

\src\main\resources

tender shard
#

weren't we talking about this like 2 days ago? 😛

crisp steeple
upper vale
urban kernel
#

it's not creating config.yml on my server

harsh totem
#

thank you

crisp steeple
#

np

upper vale
#

Open your jar as archive and make sure the file is there

#

It should be there as long as you’re compiling with maven

#

clean package

upper vale
#

and make sure you saveDefaultConfig on startup as well

midnight shore
#

i made it with public-statics

tender shard
tender shard
#

well

#

you initialize your Pet before you initiliaze the map

#

move the Map declaration ABOVE your PIGEON thing

midnight shore
tender shard
#

also your init() method is useless

midnight shore
#

and how do i put values in the hashmap?

tender shard
#

if you wanna keep it, at least make it static

tender shard
#

and PIGEON should be a static field

#

same as your "values" field

hybrid spoke
crude loom
#

Any idea on how I can generate a dome from my plugin?

midnight shore
#

but this is giving me an error

summer scroll
#

Can someone explain to me what is the difference between AttributeInstance#getBaseValue and AttributeInstance#getValue? I've read the javadocs but still doesn't understand.

midnight shore
#

..in this case

tender shard
tardy delta
#

well hover with your mouse over the error

crude loom
#

Like a glass sphere that cuts of in the middle

tender shard
midnight shore
tender shard
midnight shore
tender shard
#

e.g. let's say the "base value" of health for a player is 20 (which in fact it is)

hybrid spoke
tender shard
#

you can now have a "modifier" of 2

tender shard
#

which a ... I forgot the name... of "multiply". now 2*20 = 40

#

but you could have the "modifier" thing to be "add" instead of "multiply"

#

then the result would be 22 instead of 40

harsh totem
#

It says that this line has an error but it doesn't tell me what the error is.
getServer().getBanList(BanList.Type.NAME).addBan(dead.getName()); (dead is a Player type variable)

tardy delta
#

?paste the error

undone axleBOT
tender shard
summer scroll
crisp steeple
#

first ever null error glitch

harsh totem
crisp steeple
#

should be a tab somewhere for problems

#

if it still doesn’t show it complie it and it’ll say

midnight shore
coarse finch
#

what placeholders are built into papi

coarse finch
harsh totem
#

addBan(java.lang.String, java.langString, java.util.Date, java.lang.String) in org.bukkit.BanList cannot be applied to (java.lang.String)

#

wtf does this mean

tardy delta
#

that you have to provide it all the parameters

crisp steeple
harsh totem
#

ohhhh

#

ok

coarse finch
#

how can i replace <sender> in a string with something

ivory sleet
#

"<sender> says hi".replace("<sender>",token)

#

token being the replacement

coarse finch
#

thanks

#

the build failed ```Execution failed for task ':compileJava'.

Could not resolve all files for configuration ':compileClasspath'.
Could not resolve org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT.
Required by:
project :
Could not resolve org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT.
Unable to load Maven meta-data from https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.18.2-R0.1-SNAPSHOT/maven-metadata.xml.
Could not HEAD 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/org/spigotmc/spigot-api/1.18.2-R0.1-SNAPSHOT/maven-metadata.xml'.
The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.3/userguide/build_environment.html#gradle_system_properties
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

#

the previous build worked fine though

urban kernel
urban kernel
harsh totem
#

how do I add or remove health points from a player's max health using attribute?

tardy delta
#

:checkTheDocs:

harsh totem
#

?

tardy delta
#

?jd-s

undone axleBOT
tardy delta
#

Player#setAttribute blabla

slim kernel
#

when I have a for loop in a while loop and I break in the for loop does it only break out of the for or while aswell?

coarse finch
harsh totem
tardy delta
#

thats why you have.. uhh.. i forgot the name

slim kernel
urban kernel
#

how do i use saveDefaultConfig in bungee

tardy delta
#

like

for (int i = 0; i < 10; i++) {
  inner: for (int i // blbla blaba aa) {
    if true break inner;
  }
}```
harsh totem
#

I used this setMaxHealth(killer.getAttribute(Attribute.GENERIC_MAX_HEALTH) + 2) but it the IDE tells me to use attribute instead of setMaxHealth

tardy delta
#

dunoo how thats called

crisp steeple
upper vale
harsh totem
#

what does that mean setMaxHealth(double)' is deprecated

upper vale
#

Use player attributes instead

crisp steeple
harsh totem
#

how

harsh totem
#

if so then why does it exist

#

?

upper vale
#

They can remove it at any time

crisp steeple
urban kernel
upper vale
#

Player#getAttribute instead

#

and setBaseValue

#

The attribute is called GENERIC_MAX_HEALTH or smth

crisp steeple
upper vale
urban kernel
# upper vale what

what does this do then

        File configFile = new File(getDataFolder(), "config.yml");
        if (!configFile.exists()) {
            try {
                configFile.createNewFile();
                try (InputStream is = getResourceAsStream("config.yml");
                     OutputStream os = new FileOutputStream(configFile)) {
                    ByteStreams.copy(is, os);
                }
            } catch (IOException e) {
                throw new RuntimeException("Unable to create configuration file", e);
            }
        }
harsh totem
#

i tried to add health points to the max health but I get this error even when I parse the attribute to int Operator '+' cannot be applied to 'org.bukkit.attribute.AttributeInstance', 'int'

#

killer.setMaxHealth(killer.getAttribute(Attribute.GENERIC_MAX_HEALTH) + 2);

eternal oxide
tardy delta
eternal oxide
#

ah

crisp steeple
#

yea you can use labels if you want to break from an outer loop

tardy delta
small current
#

how can i make chances for my for example drops
like this, how

tardy delta
#

thought that was for inner loops

sterile grotto
tardy delta
#

Random random = ThreadLocalRandom.current()

#

random.nextInt(max) + min

#

or smth

upper vale
#

That doesn’t return a Random

tardy delta
#

first one does

worldly ingot
#

public class ThreadLocalRandom extends Random

upper vale
#

iirc int n = random#nextInt() * (max-min+1)+min

small current
#

what should i do like for example
i want a method to return one of these strings
50% chance for common
40% for uncommon
30% for rare
20% for epic
15% for exotic
10% for special
and 5% for mythical
how to do this

#

?

tardy delta
#

im bad at maths lol

worldly ingot
#

I'm personally a fan of weighted randoms but, yeah

urban kernel
#

[16:08:15 ERROR]: java.io.FileNotFoundException: plugins/HubPlugin/config.yml (No such file or directory)

it made the plugin dir

tardy delta
#

did you do saveDefaultConfig()?

brave sparrow
#

ThreadLocalRandom is more performant than Random, interestingly enough

tardy delta
#

that should create it

urban kernel
tardy delta
#

ugh

urban kernel
#

saveDefaultConfig doesnt exist

upper vale
urban kernel
#

mr demeng

crisp steeple
#

it has more methods than random as well though

urban kernel
#

the config.yml wasnt created

small current
#

in random.nextInt(5)
what numbers can be returned ?
1, 2, 3, 4 ?

urban kernel
#

the plugins/hubplugin folder was though

ivory sleet
#

0 to 4

small current
#

0, 1, 2, 3, 4 ?

upper vale
#

Yes

ivory sleet
#

upper bound is exclusive ye

small current
#

so if i + 1 the result
i will get 1, 2, 3, 4, 5 ?

upper vale
#

Yes

small current
#

cool

brittle lily
#

Guys When I Create GUI for each player Should I set owner's "player"?

sterile grotto
#

if I made a spigot API, where should I put my JavaDoc, should I rent a server then put it on, but will that cause some security issues?

tardy delta
urban kernel
#
        // LOAD THE CONFIG
        //MAKE DATA DIR
        if (!getDataFolder().exists()) {
            getDataFolder().mkdir();
        }
        try {

            Configuration configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(new File(getDataFolder(), "config.yml"));
            File configFile = new File(getDataFolder(), "config.yml");
            if (!configFile.exists()) {
                try {
                    configFile.createNewFile();
                    try (InputStream is = getResourceAsStream("config.yml");
                         OutputStream os = new FileOutputStream(configFile)) {
                        ByteStreams.copy(is, os);
                    }
                } catch (IOException e) {
                    throw new RuntimeException("Unable to create configuration file", e);
                }
            }
        } catch (IOException e) {
            e.printStackTrace();
            getLogger().severe(ChatColor.RED + "FAILED TO LOAD CONFIG FILE!");
        }```

output is the creation of the plugin dir but not config file
#

can anyone help

upper vale
#

Error?

brittle lily
urban kernel
# upper vale Error?

none making it but

[16:10:54 ERROR]:       at java.base/java.io.FileInputStream.open0(Native Method)
[16:10:54 ERROR]:       at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
[16:10:54 ERROR]:       at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
[16:10:54 ERROR]:       at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:77)
[16:10:54 ERROR]:       at net.md_5.bungee.config.YamlConfiguration.load(YamlConfiguration.java:71)
[16:10:54 ERROR]:       at world.netherite.hubplugin.Main.onEnable(Main.java:41)
[16:10:54 ERROR]:       at net.md_5.bungee.api.plugin.PluginManager.enablePlugins(PluginManager.java:315)
[16:10:54 ERROR]:       at net.md_5.bungee.BungeeCord.start(BungeeCord.java:290)
[16:10:54 ERROR]:       at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:67)
[16:10:54 ERROR]:       at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
[16:10:54 ERROR] [HubPlugin]: FAILED TO LOAD CONFIG FILE!```
upper vale
#

If you don’t need that it doesn’t really matter what you set it as

brittle lily
#

Thank you 🙂

crisp steeple
urban kernel
crisp steeple
#

your entire method is way more complicated than it should be

crisp steeple
urban kernel
crisp steeple
#

is that your code?

#

or somewhere in bukkit

urban kernel
urban kernel
#

i am using the bungee api

crisp steeple
#

ok same thing pretty much

#

i don’t think it’s nearly as complicated as you’re making it

#

a resource would be using a file from in your jar

urban kernel
urban kernel
crisp steeple
tardy delta
urban kernel
crisp steeple
#

what is getresourceasstream

ivory sleet
#

pretty much what the name says

urban kernel
#

i've deleted all the config code

crisp steeple
urban kernel
#

ok so how do i copy config.yml from the root of the jar to the data folder ( getDataFolder() )

crisp steeple
#

why would you do that in the first place?

urban kernel
urban kernel
sterile grotto
#

URL

tardy delta
#

to set it as a default

sterile grotto
#

you can use that

urban kernel
#

?

crisp steeple
#

make the config

sterile grotto
#

wait

crisp steeple
#

in the folder

#

lol

tardy delta
#

cant you just use getClass().getResourceAsStream()?

#

or smth

urban kernel
#

@crisp steeple great! thanks for the input! how?!?!??!!

crisp steeple
#

i’m telling you what you could do

chrome beacon
#

Spigot has api for this?

sterile grotto
#
 public static void main(String[] args) {
        URL name_of_your_res = Tester.class.getClassLoader().getResource("name of your res");
        InputStream inputStream = name_of_your_res.openConnection().getInputStream();
    }
crisp steeple
#

i don’t know off of my head directly how to do it

sterile grotto
urban kernel
chrome beacon
#

Ah

urban kernel
chrome beacon
#

Haven't read the entire conversation

crisp steeple
#

does it make a difference though?

urban kernel
#

or the plugin jar file

crisp steeple
#

it should still be more or less the same as spigot

chrome beacon
sterile grotto
sterile grotto
#

yes

#

but it's read only

#

as far as I know, it can't be edit by getOutputStream

harsh totem
#

when I try to ban someone what am I supposed to put in the source area of the ban code line?

urban kernel
sterile grotto
#

it's a reflection provide by java

urban kernel
#

so Main?

worldly ingot
sterile grotto
urban kernel
#

errrrrrrrrrrr

#

it throws lots of errs in the ide

sterile grotto
worldly ingot
#

PES_Think why are you using class resources though? If the goal is to get an input stream, JavaPlugin supplies you with getResourceAsStream()

#

Does all the hard work for you

harsh totem
worldly ingot
urban kernel
worldly ingot
#

That string can be whatever you want it to be, it's the source of that ban. Whether that's the player or server that issued the ban, or just some arbitrary string, or null if there is no source

sterile grotto
worldly ingot
#

You can do that

#

with getResourceAsStream() lol

sterile grotto
urban kernel
# sterile grotto can you show us your code?
        public static void main(String[] args) {
            URL name_of_your_res = Tester.class.getClassLoader().getResource("name of your res");
            InputStream inputStream = name_of_your_res.openConnection().getInputStream();
        }
#

legit the code u gave me \o/

worldly ingot
#

I lied, it's just JavaPlugin#getResource()*, not getResourceAsStream(). That's a classloader method

delicate lynx
#

bruh please don't blindly copy code

kindred valley
#

hello i want to make a cooldown for a command, how can i provide that

urban kernel
sterile grotto
worldly ingot
#

Even gives you a Reader you can read from

urban kernel
worldly ingot
#

Wrap that in a BufferedReader if you want it to be easier to read from

urban kernel
#

URL config.yml throws an err

sterile grotto
# urban kernel `URL config.yml` throws an err
public class Tester {
    public static void main(String[] args) {
        URL resource = Tester.class.getClassLoader().getResource("config.yml");
        try {
            InputStream inputStream = resource.openConnection().getInputStream();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
sterile grotto
urban kernel
urban kernel
delicate lynx
#

please understand at least some basic java

#

you are copying the main method

sterile grotto
#

god

#

is that true?

delicate lynx
#

there is also a much better way to copy files from the jar

sterile grotto
#

you copy the main method?

kindred valley
ivory sleet
#

Deveroonie you are on bungee right?

urban kernel
#

bnugeechord

#

lmao

#

err what the fuck

package jdk.internal.icu.lang is not visible

ivory sleet
#
try (var reader = new InputStreamReader(plugin.getResourceAsStream("config.yml"),StandardCharsets.UTF_8)) {
  var config = ConfigurationProvider.getProvider(YamlConfiguration.class).load(reader);
}```
#

in a nutshell

urban kernel
#

in the build

ivory sleet
#

I assume you do wanna use the bungeecord config api?

urban kernel
#

yeh

harsh totem
#

I have a condition that if a player gets killed when he has 2 hearts he gets banned but when it should happen I don't get banned and then if I leave the server and try to join again I am banned

#

if I dont leave I can respawn forever without getting banned

#
    public static void PlayerKillEvent(EntityDeathEvent event){
        if (event.getEntityType() == EntityType.PLAYER && event.getEntity().getKiller().getType() == EntityType.PLAYER){
            Player killer = event.getEntity().getKiller();
            Player dead = (Player) event.getEntity();
            if (dead.getMaxHealth() <= 2){
                getServer().getBanList(BanList.Type.NAME).addBan(dead.getName(), "You lost all your hearts", null,"Console");
            } else{
                dead.setMaxHealth(dead.getMaxHealth() - 2);
                killer.setMaxHealth(killer.getMaxHealth() + 2);
            }
        }
    }```
#

thats the code

visual tide
#

kick the player as well ig

tardy delta
#

instanceof is cleaner

midnight shore
tardy delta
#

org.bukkit.configuration.InvalidConfigurationException: unacceptable code point ' ' (0x0) special characters are not allowed

midnight shore
#

yes i've seen that but i don't understand what does it mean

#

i don't have any spaces in the name

#

you can also check it at the top of the error

tardy delta
#

that there are special characters somewhere

midnight shore
#

wardrobe_97fd4734-b7c8-4cb7-a0a0-ca682aa45f06.willodb

#

where's the special character?

tardy delta
#

idk

tepid ore
#

Are hyphens special characters maybe?

midnight shore
#

nope

#

you can create files with them

#

also i don't understand where position 500 is?

kind hatch
#

Are you encoding with UTF-8?

midnight shore
tepid ore
#

They are

#

new InputStreamReader(plugin.getResourceAsStream("config.yml"),StandardCharsets.UTF_8)

kindred valley
#

can someone send me pom.xml, im new in maven and dunno what to do

tepid ore
#

Just make a Maven project

#

You will get one for free

midnight shore
kind hatch
#

Oh input streams. One sec, I may have something for that.

midnight shore
#

also it worked a second ago

#

now it won't

#

what does position 500 mean?

#

maybe something in it?

tepid ore
chrome beacon
#

You sure it's not something in the file

midnight shore
#

i don't see any special characters

wary harness
#

Any one could tell how would I get TNT B puhed by TNT A explosion
entityDamageByEntityEvent is not working

kindred valley
# tepid ore You will get one for free
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>2.3.1</version>
      <configuration>
        <outputDirectory>/my/path</outputDirectory>
      </configuration>
    </plugin>
  </plugins>
</build>
``` i dont know how to add this, and it fucked my classes (Java file outside of source root)
midnight shore
#

could it be this weird line break at the end?

glossy venture
#

u sure it isn't the null pet

#

at the top

harsh totem
glossy venture
#

put spaces infront of them maybe

tepid ore
#

Its super wonky in a .txt file

crimson scarab
#

how can i reduce the gravity of a armor stand

midnight shore
tepid ore
kindred valley
glossy venture
#

like

hello:
 - a

instead of

hello:
- a
#

@midnight shore

tepid ore
#

Ohh, @midnight shore. It might be a tab

glossy venture
#

also where did u send the error

#

yeah

tepid ore
#

yaml hates tabs

kind hatch
glossy venture
#

ah

crimson scarab
tepid ore
kind hatch
#

Tabs yes, but the spacing between items in a list, not so much.

glossy venture
tepid ore
#

Yeah

glossy venture
#

reduce gravity

#

sort of

tepid ore
glossy venture
#

so idk i think its possible through attributes

tepid ore
#

I just made a gravity class my self

kindred valley
tepid ore
#

IDK if you can other than that

tepid ore
sage patio
#

I did something and my code looks like this in IntelliJIDEA, anybody knows how to fix it

tepid ore
#

Just remove the build part I sent, and add your own

quaint mantle
tepid ore
#

:>

glossy venture
#

usually fixes it

#

with stuff like that

kind hatch
sage patio
kindred valley
sage patio
#

randomly i did that

tepid ore
kindred valley
tepid ore
#

Remove the entire <build> part

rich inlet
#

Hi, I try to use NMS to spawn a EntitySlime, but when I create a class for my CustomEntity extends EntitySlime I get the following error, even after having a constructor:
'x()' in 'net.minecraft.world.entity.EntityInsentient' clashes with 'x()' in 'net.minecraft.world.entity.EntityLiving'; attempting to use incompatible return type
Does anyone know what the issue could be?

kind hatch
# kindred valley why this happens

Your project files are in the wrong path. That’s why you are getting that error.

Your project files need to be put into src/main/java. Right now you have them in src

tepid ore
#

Oh, I thought they meant the pom.xml error

#

Lmao

kind hatch
#

That could probably be fixed with a repository refresh. There’s a button for it in the Maven tab.

kindred valley
#

is it Main

kind hatch
#

Then create it. It’s just a directory.

#

It’s lowercase

kindred valley
kind hatch
#

That’s probably because one of your package names is Main.

#

Copy your files out of src then create the folder named main.

ornate patio
#

how do you get the "epoch time" of a minecraft world?

ornate patio
#

As in, is there any sort of timer that only ticks up when the server is on?

#

I need to use this to store in-game dates and stuff

tepid ore
#

There is one for worlds if I remember correctly

kind hatch
# kindred valley same

You didn’t create the structure I told you to in the first reply.
src/main/java
That’s where your files need to go.

#

Also, your pom needs to go in the root directory of the project.

#

Extra files like config.yml need to go into the resources folder.

tepid ore
#

And your resources should be in src/main/resources

kind hatch
#

^

tepid ore
#

:V

kind hatch
#

Another thing worth mentioning, there is a plugin for IntelliJ called Spigot Plugin Development. It can create the boilerplate necessary to get started creating plugins. That way you don’t have to do it from scratch every time.

#

It works with maven too

small current
#

I want to modify the login packet
But i cant inject a packet listener in
PlayerLoginEvent
And i dont want to use plib
How to do it

quaint mantle
#

netty?

small current
#

Yes

maiden thicket
#

u need nms

small current
#

I know

#

I cant inject a packet listener in PlayerLoginEvent

#

Cause playerConnection is null

#

And i want to modify login packet

maiden thicket
small current
#

1.8

maiden thicket
#

oh

#

awkward

small current
#

You can inject in PlayerLoginEvent in 1.18

maiden thicket
#

what do you need to do first of all

coarse finch
#

I'm pissed rn

small current
coarse finch
#

I had like 10 apps opened and my laptop gave me bsod

small current
#

With no plib

#

For 1.8

#

Like hypixel

maiden thicket
#

why not just turn on hardcore mode?

small current
#

You are very wise man
But its bedwars

tepid ore
#

So?

kind hatch
#

That shouldn’t change anything.

small current
#

I want to do it with packets

#

The game shouldnt be hardcore

maiden thicket
#

but why

small current
#

My own reasons

#

I tried that already

maiden thicket
#

its the same thing as telling a player theyre in hardcore mode

small current
#

Stuff bughed

#

Bugged

kind hatch
#

But it makes no difference internally for a gamemode like that

small current
#

It did

#

Ok nvm you guys wont help

#

Bye

maiden thicket
#

if you send a packet to tell a player they are in hardcore mode, that is no different than setting the overall world to hardcore

#

iirc

#

pretty sure hardcore mode is client side but i am not a protocol master

quaint mantle
#

when a player joins it creates the player connection and automatically sends it as soon as it's created

#

so.. it'd be hard without a modified version of spigot

#

@small current

kind hatch
#

Or… you know, use protocollib to intercept the packet.

quaint mantle
#

yea

#

I can't imagine being the guy that made protocollib

#

holy shit

maiden thicket
#

protocollib guy on diff drugs

quaint mantle
#

ikr

kind hatch
#

Some people are just built different

maiden thicket
#

man had to deal w nms from like what

#

1.7?

#

💀

echo basalt
#

packet68blockexplode go brr

kind hatch
#

It was probably pretty similar across some versions.

maiden thicket
#

nah that obfuscation

wary harness
#

Any one could tell how would I get TNT B puhed by TNT A explosion
entityDamageByEntityEvent is not working
I am trying to change velocity of second TNT entity which is pushed by first tnt exploding

#

making TNT double jump

ornate patio
maiden thicket
#

entityexplodevent?

ornate patio
#

or is it always running when the server is up

kind hatch
#

Wdym be epoch?

tepid ore
tepid ore
#

Ever

kind hatch
#

Gotcha

tepid ore
#

Not IRL time

#

Uptime

ornate patio
#

yeah

ornate patio
kind hatch
#

Then why not use the creation date of the world directory to calculate the time?

crimson scarab
#

how would i check if a armorstand is colliding with anything

ornate patio
tepid ore
#

^

ornate patio
#

then when i hopped back on and went to the overworld, it was night time

tepid ore
#

Noop, not at all

#

If the world is loaded by the server I mean. Not specifically that someone is in it

ornate patio
#

oh my bad, i thought world only loaded if a player was in it

river oracle
#

If you want to count the time the servers been up on enable make a task that counts up 1 second every tik

tepid ore
#

yeah I was gonna ask that

ornate patio
river oracle
tardy delta
#

thats influenced by lag

ornate patio
#

i'm tryna optimize my plugin as much as possible

tepid ore
#

Do you need to know the time for a server even if you plugin wasn't there when it was created?

ornate patio
river oracle
tepid ore
river oracle
#

1 counter

ivory sleet
tepid ore
#

You don't need to save the digit to a file every tick

#

Just add to an int

ivory sleet
#

ugh wrong reply

tepid ore
#

And save every min or so

river oracle
#

If your scared to increment by 1 over a scheduler just don't do uptime then

#

Lol

ornate patio
#

whatever i guess i'll just use a scheduler then lol

river oracle
#

Objects is something cool that are in Java

tepid ore
#

That timer is like, a few operations total. A regular processor can do a few billion per second

#

Just saying

crimson scarab
river oracle
#

If your server lags because of 1 number I personally take responsibility

river oracle
#

(It wont)

ornate patio
#

thats very much big brain

tepid ore
#

Otherwise no

ornate patio
#

true

#

yeah i'll just do scheduler then lol

tepid ore
#

You need to save every x min for it to be reliable

#

at least

ornate patio
#

i'll have a scheduler increase it by 60 every minute then

river oracle
#

Another thing you could do is store the server start time as a var if uptime is a command just do the math as it's requested

echo saddle
#

is spigot up?

tepid ore
river oracle
#

Looks pretty up to mw

echo saddle
#

oh. maybe cloudflare is being tempermental for me

#

only took 2 minutes to load

tepid ore
ornate patio
#

that much precision isn't too important

#

i'm not looking for milliseconds and stuff

tepid ore
#

Then it is fine lol

kindred valley
tepid ore
serene juniper
#

Can somebody help me,i found plugin what i need but i can't find any placeholder.Is there any way to see in plugin jar are there any ?

tepid ore
#

What plugin is it?

serene juniper
#

sec

tardy delta
#

if Bukkit.getPluginManager().getPlugin("name") != null

serene juniper
#

This

#

But i can't find anywhere placeholders

tepid ore
#

They would probably advertise any placeholders

kindred valley
serene juniper
tepid ore
#

Or at least mention placeholder API

#

On the spigot page

#

They would probably show them off

tepid ore
serene juniper
#

nono

#

you see this

kindred valley
serene juniper
#

there are npc's with placeholders

tepid ore
tepid ore
serene juniper
#

so is there,but i can't find it,so myb in plugin jar but how to find

tepid ore
#

I thought you asked if there are any

serene juniper
#

hahaha

#

no

tepid ore
#

Oh, yeah that is what I meant lol

serene juniper
#

so what i should do to find placceholders

kindred valley
tepid ore
#

Frick, maybe I can't link stuff

#

Look at the page

#

There is a DC link

serene juniper
#

yea i know

tepid ore
#

Ask there?

serene juniper
#

I,m there but server is dead

tepid ore
#

Like this

serene juniper
#

I can't dm owner before he send me friend req
And no body when i dm they say either idk,or ask someone else

tepid ore
#

Ahh, right

#

It is dead

#

Cool

serene juniper
#

So only option is plugin 🙂

tepid ore
#

Well yeah

#

You can find them in the code

#

But if there is a lot of code

serene juniper
#

one sec

tepid ore
#

It'll take you some time

serene juniper
#

this is just one exstansion

#

for plugin SaberFactions

#

@tepid oreso i open plugin via winrar?

kindred valley
serene juniper
tepid ore
kindred valley
#

i mean run icon

tepid ore
#

You need to find the placeholder class

serene juniper
#

sec

#

this

tepid ore
#

yeah

#

prob

serene juniper
#

and this?

tepid ore
#

Wtf is that code

quaint mantle
#

how do you spawn silverfish with only one target

serene juniper
tepid ore
#

It is that one

midnight shore
#

Hi! Does anyone have a tutorial on how to use GitHub and JitPack to share my project?

tepid ore
#

It is so chaos i mean

slow thunder
#
@Override
    public void onEnable() {
        // Plugin startup logic
        System.out.println("Free for all plugin enabled");

        //config.yml
        getConfig().options().copyDefaults();
        saveDefaultConfig();



      no work  >>>>> getCommand(name:"setspawn").setExecutor(new spawn(plugin: this));

    }```
serene juniper
tepid ore
#

Kinda busy, Apex rn. But yeah

#

lol

serene juniper
#

ou okay

rich inlet
#

How to I spawn an entity with no AI?

serene juniper
#

accept fr @tepid ore

slow thunder
rich inlet
#

I only find answers with NMS, and wondered if there was a spigot API way

slow thunder
#

i dont think so

ivory sleet
#

LivingEntity::setAI

ivory sleet
#

which can be invoked in the consumer

ivory sleet
#

in java we don't have this parameterName: value syntax

#

just pass the value

slow thunder
#

okay ty

hexed gazelle
#

Hello, How can I get this value from my JSON to my plugin ?

{
  "Levels": {
    "0": {
      "commandes": [
        "/Commande 1",
        "/Commande 2"
      ],
      "permissions": [
        "permission.ici"
      ],
      "blocks": {
        "STONE": 5
      },
      This Value >>>>>> "requis": 500
    },
    "Test2": "test2"
  },
  "maxLevels": 10
}

Ping me

brittle lily
#

Hey Guys I created Inventory on My Command Class How Can I Use This Inventory on my another class

coarse finch
#

how can i check if a player is banned (or just have an event when they are banned)?

undone axleBOT
river oracle
#

Passing things between a class is basic java

ivory sleet
#

?di might be to assistance ntl

undone axleBOT
river oracle
#

True

tardy delta
#

hes copying a tutorial vid lol

#

kinda cute

river oracle
#

Who

tardy delta
#

the mean potatoe man

river oracle
#

Ahha I just saw

kindred valley
#

i still couldnt do it can someone help

#

i dont know how to run it

coarse finch
kindred valley
coarse finch
#

the huh to the huh?

tardy delta
#

mvn package

kindred valley
coarse finch
#

the kick event reason would be the reason i specify when kicking right?

kindred valley
tardy delta
#

you got a maven windows on the right, just press it and and doubleclick package

tardy delta
#

yes click one of the arrows

tardy delta
#

?jd-s

undone axleBOT
kindred valley
tardy delta
#

lol no there are two tabs which you can expand

#

y clicking on the arrow in front of it

kindred valley
tardy delta
#

smh

kindred valley
tardy delta
#

you dont seem to have it as a dependency in your pom too

kindred valley
# tardy delta you dont seem to have it as a dependency in your pom too
<?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>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <outputDirectory>C:\Users\tekin\Desktop\ALL\1.16.5 KINGDOM ROLEPLAY\plugins</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <groupId>org.example</groupId>
    <artifactId>Roleplay</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
    </properties>

</project>
``` its this
tardy delta
#

why having the plugin config there too

#

you can just specify it as an ij setting

kindred valley
#

i just thought i can finally use maven

#

but i cant get a f*ck

tardy delta
#

make sure to change the version

#

i guess you just added the jar manually

kindred valley
# tardy delta make sure to change the version
<?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>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <outputDirectory>C:\Users\tekin\Desktop\ALL\1.16.5 KINGDOM ROLEPLAY\plugins</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <groupId>org.example</groupId>
    <artifactId>Roleplay</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
    </properties>
    <repositories>
        <!-- This adds the Spigot Maven repository to the build -->
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <dependencies>
        <!--This adds the Spigot API artifact to the build -->
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3.1</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>

```like this?
crimson terrace
#

Why is RecipeChoice.ExactChoice deprecated? what are the alternatives I could use to make a ShapedRecipe using my own special items?

#

or rather, why is it deprecated in 1.16.1 and not 1.16.5

ivory sleet
#

it was deprecated due to being a draft addition

#

aka subject to change

crimson terrace
#

oh ok, didnt know the deprecated tag could be used like that. Thanks 🙂

#

there should not be any problems with using that as it was a part of later API versions aswell, right?

ivory sleet
#

presumably no, no problems

coarse finch
#

how can i tell if a player is banned

crimson terrace
#

presumably this

vague oracle
#

player.isBanned()

coarse finch
#

ok

quaint mantle
#

For the BlockPlaceEvent, why does this not change the amount?

event.getItemInHand().setAmount(event.getItemInHand().getAmount() - 1);
#

Makes 0 sense

crimson terrace
#

it should change the amount. are you sure this line is being called?

tardy delta
#

fix the formatting btw

crisp steeple