#help-development

1 messages Β· Page 2095 of 1

rough drift
#

Ex: A player is sitting on like a horse, can you get that horse only knowing the player? or a minecart, boat, etc

onyx fjord
#

database?

rough drift
#

why is it called vehicle?!

#

jeez

onyx fjord
#

because it is a vehicle

rough drift
#

good point

night torrent
onyx fjord
#

doesnt it reset on restart tho?

last ledge
#
        PercentageBlocks.getInstance().reloadConfig();```
#

Why my config not reloading

#

;-;

raven ravine
#

Im using eclipse and I never did this before. What do I have to do?

eternal night
#

πŸ‘€ are you not using maven or gradle ?

raven ravine
eternal night
#

Well, you clearly have a need for it rn xD

#

IDE building generally is pretty scuffed

#

on top of that so few people use it that barely anyone has an idea what/how to even configure it

river oracle
#

I used to do IDE building and then I switched to maven can't ever go back it's so much better

river oracle
#

Add it or switch to maven which makes things 100 time easier

raven ravine
rough drift
#

you are just overriding it with the old one

night torrent
#

how do i check if a chest has a sign with specific writing on it?

eternal night
#

Well, get the chest, iterate over its neighbour blocks

#

check each block if it is a sign

#

etc

night torrent
#

and then check the nbt data?

rough drift
eternal night
#

I mean, there is A Sign interface

last ledge
rough drift
#

just cast the block data to a signblock

eternal night
#

BlockState

rough drift
#

and then just iterate over the lines

#

ye

night torrent
#

ok, thanks!

rough drift
#

sorry don't remember the names

rough drift
eternal night
#

lol xD just instanceOf the block state first

rough drift
#

you are SAVING then RELOADING

eternal night
#

and do a material check first too

rough drift
#

why no

eternal night
#

block states are a little expensive

rough drift
#

no need

last ledge
rough drift
#

oh

#

ok

rough drift
#

why do you need to save

#

what do you need to save

last ledge
#

i did only reload

#

still not working

#

so I entered save

rough drift
#

what is not working

last ledge
#

after I make changes

#

but the message comes, reload success

glossy venture
#

you are trying to reload

#

right

last ledge
#

yes

hard lion
#

Is the damage you receive from a fireball explosion considered DamageCause.BLOCK_EXPLOSION?

night torrent
#

chest.getInventory().contains(Material.RAW_GOLD, 25);

How would I check if there was 25 or more raw gold?

rough drift
#

Set passenger after armor stand teleported

manic delta
#

Guys, can someone help me, I have been testing with the blockBreakEvent event and I have a problem, how do I cancel the drop?

#

I tried with event.setDropItems(false)

#

But it kept dropping

chrome beacon
#

What are you breaking

manic delta
#

Blocks

chrome beacon
#

Any block?

manic delta
#

Yes

#

I want to make them not drop things

#

But I also want to get the drop

#

I'm making an economy discord bot and I want to know, for example, what items the ore would drop

#

Like Gold_ingot (x10)

#

But without dropping it

brave goblet
chrome beacon
winged lark
#

Hoping someone can help me with regex

chrome beacon
#

?ask

undone axleBOT
#

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

manic delta
#

If I cancel the block drop

#

The other will not be executed

#

Right?

brave goblet
manic delta
manic delta
brave goblet
brave goblet
manic delta
#

I was trying to get the drops without canceling the drop and it doesn't work for me either lol

#

Like COBBLESTONE (x10)

night torrent
#

16.04 14:52:11 [Multicraft] Auto-saving world...
16.04 15:02:15 [Multicraft] Auto-saving world...
16.04 15:12:18 [Multicraft] Auto-saving world...
16.04 15:22:21 [Multicraft] Auto-saving world...
16.04 15:32:25 [Multicraft] Auto-saving world...
16.04 15:42:28 [Multicraft] Auto-saving world...
16.04 15:52:31 [Multicraft] Auto-saving world...

For whatever reason my server console is only this message repeated, no errors visible, and when I reload the game nothing changes. The messages aren't even updating. Any help?

brave goblet
night torrent
#

I know, but when a player leaves the game, joins, or anything happens, it should say so

brave goblet
#

oh nothing else happens?

night torrent
#

yeah

brave goblet
#

right :/

night torrent
#

I'm restarting my server now

#

probably should have tried that before asking here though

brave goblet
#

Nah dw, asking is always welcome

night torrent
#

πŸ™‚

brave goblet
#

like they say, the only dumb question is the one asked after the test

night torrent
#

true that

kind hatch
#

Anyone got feedback for this?

night torrent
#

whaaaaaat

#

i restarted my server, spawned in an entierley different world with no items, and the console is still "Auto-saving world..."

#

wait is just suddenly went back to normal

#

wtf

#

this error looks very famillar, does it have something to do with incorrect versions?

#

16.04 16:10:53 [Server] INFO org.bukkit.event.EventException: null
16.04 16:10:53 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?]

upper crater
#

although the colors are coming, why do those unicode letters come too?

#

i don't have any unicode in my code that resembles that other than the color code character

kind hatch
upper crater
#

how do i do that on vscode again

grim ice
#

how to get the blocks between 2 boundingboxes spigot

kind hatch
grim ice
#

so 15x15x15

upper crater
grim ice
#

i want the blocks between it and

#

10x10x10

upper crater
upper crater
kind hatch
#

Maybe. I'm pretty sure there could be encoding settings in there as well.

#

Here's what I have for my projects.

<properties>
    <revision>2.0.42-DEV</revision>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
</properties>
upper crater
#

what's compiler source and target

kind hatch
#

The JDK version.

#

So like, Java 8 vs Java 11 or Java 16

upper crater
#

oh

noble lantern
#

?paste

undone axleBOT
noble lantern
#

I'm currently trying to paste a schematic into the world using WorldEditAPI (No this is not a skyblockplugin) https://paste.md-5.net/cetonufopo.java

However, I'm getting a "Not in GZIP format" this specific error happens on line 9 in this, the File exists as it's not an NPE error and the file exists on the server

The schematic I'm trying to paste is a .schem created from the server, I'm not sure if thats the issue here?

steel swan
#

how can i (without the effect) give like 10% more strength to a player with spigot?

noble lantern
steel swan
#

how would i use that?

noble lantern
steel swan
#

for 1.8.8*

noble lantern
#

events then

onyx fjord
#

πŸ’€

steel swan
#

how

#

like heres the code

#

for (Player player : Bukkit.getOnlinePlayers()) {
if(getSoul(player) == Soul.GREEN){
//here, give him 10% more resistance
}
}

echo basalt
#

we aren't here to spoonfeed you

steel swan
#

ik but u just said "use events"

echo basalt
#

you already use enums and such

steel swan
#

wich event, when , how

#

idk

echo basalt
#

I wonder what event fires when an entity takes damage

steel swan
onyx fjord
#

why do you use 20 spaces for indent

echo basalt
steel swan
#

i see thx i didnt thought of doing it this way !

onyx fjord
#

mind telling me the reason you use 1.8 api πŸ’€ ?

echo basalt
#

because he likes peeveepee

onyx fjord
#

no

#

1.4.6

noble lantern
#

only 7% of servers use it now-a days too :p

steel swan
echo basalt
#

1.5.2

steel swan
onyx fjord
#

na zoomer

noble lantern
#

beta 1.0? smh

onyx fjord
#

we use 1.4.6 these days

echo basalt
#

man's getting commissions but can't bother using entitydamageevent

#

πŸ’€

noble lantern
#

meanwhile me: The fucks a gzip format

onyx fjord
#

wdym yall

steel swan
#

so would this work

@EventHandler
    public void onPlayerDamage(EntityDamageEvent event){
        Player player = (Player) event.getEntity();
        if (getSoul(player) == Soul.VERTE){
            player.setLastDamage(2);
        }

    }
onyx fjord
#

ive seen people payin thousands for skripts

steel swan
#

nope

noble lantern
#

gotta be trolling

steel swan
#

i dont need to

onyx fjord
#

he doesnt need to guys

#

u cant force him

tranquil viper
#

How can make it so I can manually edit my config and then just reload it instead of stopping my server, editing the config, then restarting? Using .save() seems to reset it if I try to use it

echo basalt
steel swan
#

cuz only players get a green soul not entity

tranquil viper
#

Oh ok

noble lantern
#

petition to make help development verified users only

tranquil viper
#

thanks

noble lantern
echo basalt
#

check the last fireballs on the video

steel swan
#

?

echo basalt
#

I might've inverted the entire vector tho

tranquil viper
noble lantern
#

thats what i looks like, or the player positions gets updated while the fireball is fired and it is trying to use your old location

steel swan
#

bro if i did smth wrong, not my falt

noble lantern
#

and yeah eye location uses the block the player looking at (iirc)

steel swan
#

thats why i m asking

noble lantern
#

?learnjava

undone axleBOT
echo basalt
#

I'm not calling eyeLocation.getDirection so it shouldn't really shoot wherever I'm looking at

noble lantern
#

The last fireball does kind of look like its going directly to where you crosshair is

#

like it started going torwards you then did a U-turn

echo basalt
#

that's becuase I'm looking at it

tranquil viper
#

Doesn't eyeLocation return the location you're looking at?

#

Not your physical eye location

visual tide
#

no

#

it returns the location of your eyes

noble lantern
#

^

visual tide
#

getLocation is ur feet

echo basalt
#

it's kinda intuitive

tranquil viper
#

Try location

#

Debug a little

echo basalt
#

seems like a spigot bug

#

or vanilla

atomic zodiac
#

Is anyone interested in becoming a co-owner with me for my mc server? Its been pretty lonely tbh

tranquil viper
#

LOL

undone axleBOT
waxen plinth
#

Skeleton cannot be cast to player

echo basalt
#

because you're trying to cast a skeleton to a player

waxen plinth
#

.-.

undone axleBOT
waxen plinth
#

πŸ™ƒ

echo basalt
#

lmao ok the fireballs are going in the direction the cow looks at

atomic zodiac
#

Is anyone interested in becoming a co-owner with me for my mc server? Its been pretty lonely tbh

waxen plinth
#

Man get outta here

#

This is a development channel

#

And you're just reposting your shit because nobody's interested

#

Go somewhere else

noble lantern
waxen plinth
#

Β―_(ツ)_/Β―

echo basalt
#

.schem is for fastasyncworldedit

noble lantern
#

Yeah thats the imported library i have in my pom right now + installed on my server

#

but it just gives the not a GZIP format error in console

echo basalt
#

probably because your schematic is not that valid

noble lantern
#

it is, im able to paste it in the plugin itself just fine

#

fawe has no issue loading it from its own plugin

#

but when loading it via API it just say no, no gzip i cannot load for you > : (

atomic zodiac
#

import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import java.util.ArrayList;

public class TutorialCommands implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
        if (!(sender instanceof Player)) {  return true; }
        Player player = (Player) sender;

        ItemStack opium = new ItemStack(Material.POPPY);
        //meta
        ItemMeta opiumMeta = opium.getItemMeta();
        //name
        opiumMeta.setDisplayName(ChatColor.BLACK + "Raw Opium");
        //lore
        ArrayList<String> lore = new ArrayList<String>();
        lore.add("Highly Illegal");
        lore.add("Do not Consume!");
        opiumMeta.setLore(lore);
        //enchantment
        opiumMeta.addEnchant(Enchantment.DURABILITY, 10, true);
        //set the meta
        opium.setItemMeta(opiumMeta);


        //opium
        if (cmd.getName().equalsIgnoreCase("opium")) {

        player.getInventory().addItem(opium);


        }




        if (cmd.getName().equalsIgnoreCase("feed")) {
            player.setFoodLevel(20);
        }

        return true;


    }

}

Whenever I use /opium there is just something in chat that says /opium and there is no errors in console

noble lantern
noble lantern
atomic zodiac
noble lantern
#

typically you dont really need that field set, if you have it set

#

also checking the command name isnt needed either, since that class is registered directly to the command name

atomic zodiac
atomic zodiac
noble cloak
#

How to set up permission that normal people cannot see/acces that command

quaint mantle
#
mycommand:
  permission: pluginname.permission
#

@noble cloak

noble cloak
#

Where file?

quaint mantle
#

plugin.yml

#

under the commands section

atomic zodiac
#

@quaint mantle could you help me pls

quaint mantle
#

what u wanna do

noble lantern
#

If so ill try with your world getter maybe thats the root cause of this issue

noble cloak
grim ice
#

So uh

#

i wanna make a border type of system

#

but each time the border gets smaller

#

the blocks outside the border fall

#

is that possible

atomic zodiac
# quaint mantle what u wanna do

import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import java.util.ArrayList;

public class TutorialCommands implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
        if (!(sender instanceof Player)) {  return true; }
        Player player = (Player) sender;

        ItemStack opium = new ItemStack(Material.POPPY);
        //meta
        ItemMeta opiumMeta = opium.getItemMeta();
        //name
        opiumMeta.setDisplayName(ChatColor.BLACK + "Raw Opium");
        //lore
        ArrayList<String> lore = new ArrayList<String>();
        lore.add("Highly Illegal");
        lore.add("Do not Consume!");
        opiumMeta.setLore(lore);
        //enchantment
        opiumMeta.addEnchant(Enchantment.DURABILITY, 10, true);
        //set the meta
        opium.setItemMeta(opiumMeta);


        //opium
        if (cmd.getName().equalsIgnoreCase("opium")) {

        player.getInventory().addItem(opium);


        }




        if (cmd.getName().equalsIgnoreCase("feed")) {
            player.setFoodLevel(20);
        }

        return true;


    }

}

Whenever I use /opium there is just something in chat that says /opium and there is no errors in console

crude loom
#

How do I refresh the tab player list?

noble cloak
noble lantern
echo basalt
#

how can I make it so multiple pathfindergoals tick together πŸ€”

#

because if one ticks, then the following ones won't

crude loom
tranquil viper
#

How can I loop through every configurationSection and get it's name?

example:

Dirt:
  inv: 
Stone:
  inv:
Water: 
  inv:

return should be Dirt, Stone, Water

echo basalt
#

getKeys(false)

tranquil viper
#

thanks

flat olive
atomic zodiac
#

Can someone help me with metadata and commands

flat olive
#

They leave no instructions on their BukkitAPI page or their github on how to install it.

crude loom
atomic zodiac
# crude loom What do you need?

import net.md_5.bungee.api.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;

import java.util.ArrayList;

public class TutorialCommands implements CommandExecutor {

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
        if (!(sender instanceof Player)) {  return true; }
        Player player = (Player) sender;

        ItemStack opium = new ItemStack(Material.POPPY);
        //meta
        ItemMeta opiumMeta = opium.getItemMeta();
        //name
        opiumMeta.setDisplayName(ChatColor.BLACK + "Raw Opium");
        //lore
        ArrayList<String> lore = new ArrayList<String>();
        lore.add("Highly Illegal");
        lore.add("Do not Consume!");
        opiumMeta.setLore(lore);
        //enchantment
        opiumMeta.addEnchant(Enchantment.DURABILITY, 10, true);
        //set the meta
        opium.setItemMeta(opiumMeta);


        //opium
        if (cmd.getName().equalsIgnoreCase("opium")) {

        player.getInventory().addItem(opium);


        }




        if (cmd.getName().equalsIgnoreCase("feed")) {
            player.setFoodLevel(20);
        }

        return true;


    }

}

Whenever I use /opium it just says /opium in chat

tranquil viper
#

returning true

#

thats why

#

return false

atomic zodiac
#

what does return mean

tranquil viper
#

return ends that code

#

true prints out the command

#

false doesn't

atomic zodiac
#

either way I dont get the item

tranquil viper
#

no

#

wait

#

idk

crude loom
#

Um true doesn't print out anything

tranquil viper
#

I mixed them around

crude loom
#

False prints out the usage message

tranquil viper
#

lol

crude loom
#

Also, try player.updateInventory();

atomic zodiac
crude loom
#

After you add the item here : player.getInventory().addItem(opium);
Try adding player.getInventory().updateInventory();

#

Forgot the getInventory() part

flat olive
#

Returning true, means the instance of the command was ran and has worked successfully. His issue was that he didn't register "opium", his class was only being executed from /feed, so it was never reading /opium also he never indented, which makes it not work.

crude loom
noble lantern
flat olive
#

@noble lantern Hey I have a question, you know how to use API's correct?

mighty pier
#

how do i make a timer that i can access from everywhere and can reset

noble lantern
mighty pier
#

check if player is in combat

flat olive
# noble lantern Yes why?

I just swapped to Java about a week ago from python, haven't worked much with API's in java yet, so can you help me install LunarClient BukkitAPI and LunarClient BukkitAPI-NetHandler?

fringe gate
flat olive
#

as these API's have no instructions to install them, from github or their bukkit webpage.

noble lantern
# mighty pier check if player is in combat

You would need to have a BukkitRunnable running with a HashMap of UUID, and the time they last took damage from

Calculate current time from last time they were in combat, and if the time is = time that you have set for combat time-out remove them from that map

#

You can just have a CombatTimer class that handles this

mighty pier
#

k

noble lantern
#

better off asking in theyre discord idk what your really trying to do

flat olive
#

Well, I'm trying to use their api so whenever theirs a KOTH on my server, I can set a serverside waypoint automatically that cant be removed for lunar client users.

dry forum
#

im trying to not do pyramid method but how would i make it so i wont need to use else for checking if arg[0] is something

                if (args[1].equalsIgnoreCase("create")) {
                    if (!(sender instanceof Player)) {
                        try {
                            throw new IllegalAccessException("Only players can use this command");
                        } catch (IllegalAccessException e) {
                            e.printStackTrace();
                        }
                        return false;
                    }
                    Player p = (Player) sender;
                    if (args.length != 3) {
                        p.sendMessage(Colors.tr("&7[&a+&7] Usage: /uk kit create <name>"));
                        return false;
                    }```
flat olive
#

not the args[0]

#

but I mean you can

dry forum
#

but its all the same command i have mutliple options for args[0]

flat olive
#

but its easier to check what command they sent

dry forum
#

wouldnt using a switch & case work with args?

flat olive
#

yes it would, I tried it last time

#

but the issue was

#

args[0] - however many args was not found for me for some reason

dry forum
#

args[0] never worked?

flat olive
#

so I just used command.getName().equalsIgnoreCase("")

#

yeah

dry forum
#

args[1] did?

flat olive
#

nope

#

none did

dry forum
#

oh

#

ill try storing it in a string 1st

flat olive
#

I had to check the command and see if it equaled whatever they sent

#

Yeah, I'm still new to bukkit library so I'm sure theirs a way to use the args parameter, still not sure how as of right now.

proper pawn
#
InventoryOpenEvent cannot be triggered asynchronously from another thread.

I got this error when wanting to open a inventory from SlashCommandInteractionEvent from JDA but I'm not quite sure how to fix this. Could someone perhaps help me?

#
Player player = Bukkit.getPlayer(UUID.fromString(config.getString("players.discordids." + member.getId())));
if (player == null) {
    EmbedBuilder embed = new EmbedBuilder()
            .setAuthor(
                    "Please join the minecraft server to verify yourself!",
                    null,
                    member.getAvatarUrl()
            )
            .setColor(new Color(255,165,0));
    event.replyEmbeds(embed.build()).setEphemeral(true).queue();
    return;
}
player.openInventory(inventory);
flat olive
#

well, when you open your inventory, there's two events happening

#

Meaning you cant run an event asyncronously

#

when you run the same event at the same time

#

it creates multiple threads

#

that's why it's saying InventoryOpenEvent cannot be triggered asynchronously from another thread.

crude loom
#

I'm currently working on a plugin that handles bans and when the player tries to join I kick them
But whenever he tries to join he shows up in the tab playerList
How do I fix this?

visual tide
crude loom
#

Yeah

wet breach
noble lantern
proper pawn
flat olive
crude loom
noble lantern
flat olive
dry forum
visual tide
crude loom
#

Oh, I will try that thanks!

visual tide
#

theres a way to disable filtering but i gotta look it up, sec

proper pawn
noble lantern
#

because i knows schems have that variable in them

visual tide
#

<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>

flat olive
crude loom
#

Will do

noble lantern
visual tide
# visual tide <resources> <resource> <directory>src/main/resources...

make that

<resources>
    <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
    </resource>
    <resource>
        <directory>src/main/binary-resources</directory>
        <filtering>false</filtering>
    </resource>
</resources>

and move your schems to src/main/binary-resources

quaint mantle
#

I wanna to use the DeluxeMenus plugin to make a book in the menu, I can read this book in the menu when the menu is opened, can anyone help me?

noble lantern
flat olive
visual tide
noble lantern
#

Okay sounds good let me test

proper pawn
#

?paste

undone axleBOT
flat olive
#

Okay so I see what what you're doing

noble lantern
#

let me repush my commits to github

proper pawn
knotty gale
#

how do you make a listener that listens if an entity hits an area

crude loom
#

Is there any way i can get the player's ip from the PlayerLoginEvent?

visual tide
knotty gale
noble lantern
#

sec pushing

flat olive
#

it would help if you could show the entire class this is being used in @proper pawn, because this just looks like two seperate instances to me

noble lantern
#

ik gitignore is fuck ignore for now xD

crude loom
#

It returns null

wet breach
noble lantern
#

interesting never heard of that before

visual tide
#

and if youre using the intellij mcdev plugin you can download the files from the plugin datafolder and try to open them; if it doesnt work then theyre corrupted

flat olive
#

hey that's pretty cool I never knew about that

visual tide
#

eyo neat

noble lantern
#

interesting

#

wonder how its getting corrupted (circled is the one generated from my plugin)

proper pawn
#

i left some thing away because the whole thing is really long

flat olive
#

how many times do you register your command in your main class as well? @proper pawn make sure you aren't registering the event twice

wet breach
noble lantern
#

i save it to a File and then use the File class to get it

wet breach
#

that doesn't mean it works with binary files....

#

I don't have the source to look at how saveResource() is implemented

noble lantern
#

sec i can grab it

wet breach
#

but that is the only thing I can think of how it could get corrupted other then maven not putting in the jar properly

#

so, the alternative is to create the code necessary to pull the file out

proper pawn
visual tide
#

?namingconventions

proper pawn
#

I'll try, thank you.

visual tide
#

@undone axle bad

chrome beacon
#

?conventions

undone axleBOT
visual tide
#

oH

noble lantern
#

Thats the code that spigot uses to save resources from the jar

proper pawn
#

plugin - the reference to the plugin scheduling task

Sorry, I'm not quite sure what this means. Could you help me?

undone axleBOT
wet breach
#

there is more to it than just that

noble lantern
#

well anything i see online that saves binaries from a jar file all use similar code that I linked from spigot's source code

little panther
#

hey, im making a plugin that generates that includes dropping heads on death. But i want to make specifically the skulls this plugin drop not placeable in the world, us this possible and how?

noble lantern
#

kind of ridiculous how complicated this shit can be

#

ill look into it more, ty

proper pawn
#

@flat olive and @last temple Thank you so much for helping!!!

knotty gale
#

how do you make a plugin like world edit where you can select a region?

lavish hemlock
#

You make a plugin like WorldEdit where you can select a region

proper pawn
#

This did @last temple

Bukkit.getScheduler().runTask(....
noble lantern
#

frost

#

im a god

#

i used commons io to copy over the schem file

#

no corruptions bop

trail pilot
noble lantern
#

mans recognized the MUI hair hell yeah

lavish hemlock
#

Aren't you not supposed to use Commons in plugins without importing it yourself cuz Minecraft no longer uses it?

noble lantern
visual tide
#

they said they'd drop it in new versions iirc

#

so shade it & relocate to be save

noble lantern
#

ill likely just rip that method from commons.io myself at a later date

visual tide
#

does it work now?

trail pilot
noble lantern
#

yeah I just get StackOverFlow errors now but its likely to my recursive Location getter

visual tide
#

lessgoo

wintry badger
#

hi guys, i just want to disable evokers dropping undying totems on death, which events should i look into?

noble lantern
#

recursiveness go brrrrrt

wintry badger
#

EntityDeathEvent ?

visual tide
#

recursion = error/bug factory

visual tide
noble lantern
#

^

noble lantern
#

at least i know wtf is happening now

visual tide
#

πŸ‘

tardy delta
noble lantern
#

:((

#

for some reason windows doesnt like color codes

#

works on unix systems though

tardy delta
#

Use Bukkit.getConsoleSender().sendmessage with color codes to.make it work

noble lantern
#

true im just using the normal Java logger but thats for a later date

#

logger class is easy to change

flat olive
#

does anyone know how to keep track of a custon enchanted poppy (placed) bukkit

noble lantern
native siren
#

I didn't know this existed, damn. Thanks!!
I tested it, and it works fine on latest Spigot
Does this "libraries" in the plugin.yml work down to Spigot 1.8.8? Bcuz that's what my plugin supports 1.8.8 - latest

noble lantern
#

POV: stackoverflow errors

sacred mountain
#

Is there a plugin that can set costs for certain commands?

#

i cant be bothered to code one rn

#

if there isnt i'll have to i guess

twilit wharf
#

How do I get the NMS class WorldServer?

little panther
#

I asked earlier so sorry but i would be grateful if anyone could help me.
Im making a plugin that generates that includes dropping heads on death. But i want to make specifically the skulls this plugin drop not placeable in the world, us this possible and how?

twilit wharf
#

(that would also remove things like creeper and skeleton heads, so you would have to do some sort of differentiating)

little panther
noble lantern
#

@wet breach finally got them generating correctly πŸ˜„

twilit wharf
little panther
#

i'll try that. Otherwise i come back

twilit wharf
#

alright

#

what database?

muted sand
#

there's a forge mod blocker, what about a fabric mod blocker?

native siren
# chrome beacon No

Wait so is @noble lantern incorrect then? :

If its a MySQL lib like the one you said yes it will work down to that version, provided the version of java that lib is java 1.8

noble lantern
#

im not entirely caught up in that whole conversation

#

i just saw a mysql lib

twilit wharf
#

I dont know the exact syntax, but there are some good tutorials on the internet to insert/update data into a MySQL data

wet breach
#

mysql is independent of spigot

sterile token
#

How do you uninstall intellij completly (repos ,system path, etc) because im having maven issue and i will reinstall it from 0

#

?paste

undone axleBOT
sterile token
#

For sending long codes or stractrace use paste md5

pure grove
#

oh woops

sterile token
#

And then delete the msg . Thanks

pure grove
#

So do I just paste in the link?

noble lantern
#

yes

pure grove
#

there you go

#

I'm new to this

#

so I don't know if what I'm doing is exactly right

sterile token
#

I just let you know because sometimes the chat get full of long code and its diff to help and to read the chat

pure grove
#

ohh

#

Alright, well when I tried out the command to spawn the zombies in, it didn't actually work, it just told me that there was an internal error with the command

quaint mantle
#

Is it possible to get name from handshake packet?

hollow kayak
#

Hi guys i just tried to start my old server but server stop itself who can help me ?

hollow kayak
#

oh sorry thx

quaint mantle
#

Just confused how spigot is getting the name

sterile token
#

If im not wrong that part its managed there

quaint mantle
#

nvm it's on minecraft, package net.minecraft.server.v1_8_R3;

sterile token
#

Oh ok

quaint mantle
#

sry

sterile token
#

No problem

#

And for reading the data you can use a Socket input stream and then parse the data

rugged cargo
#

is there a way to spawn a particle with no motion?

quaint mantle
flat olive
#

LunarClientAPI.getInstance().sendPacket(player, new LCPacketTitle(player, "Message", 3000, 1000, 1000));



// I have an issue, where it says "player" what would go there? I don't know what String type would be // used:

// Following details on what the lunarAPI shows:

   public LCPacketTitle(String type, String message, long displayTimeMs, long fadeInTimeMs, long fadeOutTimeMs) {
        this(type, message, 1F, displayTimeMs, fadeInTimeMs, fadeOutTimeMs);
    }

    public LCPacketTitle(String type, String message, float scale, long displayTimeMs, long fadeInTimeMs, long fadeOutTimeMs) {
        this.type = type;
        this.message = message;
        this.scale = scale;
        this.displayTimeMs = displayTimeMs;
        this.fadeInTimeMs = fadeInTimeMs;
        this.fadeOutTimeMs = fadeOutTimeMs;
    }


flat olive
#

I don't know what string type to put there

sterile token
#

So?

flat olive
#

it doesn't say

#

what so ever

#

what to put there for the API

sterile token
flat olive
#

nope

#

doesnt have documentation

#

lunarclient api doesn't have this method im using in their documentation

sterile token
#

What you dont know?

flat olive
#

only a few things

#

I don't know what String type to put there

#

I already declared the message being sent

#

there's no need for a string type but they added another in, so idk what to put

supple elk
#

Anyway I can inherit @EventHandler annotation?

supple elk
quasi patrol
#

Is permission node the only way to hide a command from users like it acts like the command doesn't exist for command completion unless meeting certain requirements?

#

Here is an example of what I mean.

sterile token
twilit wharf
#

Does anyone know of a way to regenerate a chunk since World#regenerateChunk() is broken?

twilit wharf
#

I did

#

and I used it the correct way

#

but it is deprecated and produces a massive error when used

#

(1.18.2)

sterile token
#

Oh ok

#

I never generated a world so i cannot help much

small lynx
#

i want to create a top 100 kills like hypixel

#

i using ajleaderboards api and decenthologramsapi

knotty gale
#

?li

#

?listener

#

damnit

quaint mantle
#

?event-api

undone axleBOT
small lynx
#

my code is correctly?

rugged cargo
#

what are the good particle helper libraries for spigot? and would they be required alongside my plugin?

echo basalt
#

but yes, any external library will be required along your plugin unless you shade it

rugged cargo
#

well i mean the fact that using the particle api is kind of a pain in the butt

echo basalt
#

ehh

#

make sure you "precompile" your lines

rugged cargo
#

ive been trying to spawn particles at an exact location for 2 days now. not any closer

echo basalt
#

some particles have funny offsets built-in

#

some don't

rugged cargo
#

i know this now. lol.

subtle folio
#

is there a library for making particles and particle cosmetics that are pre made?

#

i’m feeling quite lazy atm

tranquil viper
#

How do I register an event inside of a runnable in a separate class from my main class

upper crater
#

when executing a command, sender is a Player Object right? i can set gamemode and all?

tranquil viper
#

If (!(sender instanceof Player)) return false;

#

Then you can cast sender to a player object

upper crater
#

oh yeah

#

forgot about that

rugged cargo
#

how common is ProtocolLib amongst plugins?

upper crater
subtle folio
subtle folio
rugged cargo
#

ok. im just gonna bite the bullet and use it. thanks

subtle folio
#

Player p = (Player) sender;

upper crater
#

oh

#

duh

#

thansk

#

how do you add text to the part right above the hunger bar

subtle folio
upper crater
#

no, that's the center of the screen @subtle folio

upper crater
#

what?

#

that's not the right thing

subtle folio
#

are you talking abt a action bar?

upper crater
#

maybe, i'm not sure where that is

#

i htnk

subtle folio
#

check this resource out.

upper crater
#

oh

#

i'm dumb

subtle folio
#

but instead of this you’d get the instance of the main class

tranquil viper
subtle folio
#

?paste

undone axleBOT
tranquil viper
#

This is in a command class, I implemented Listener into the command's class

#

then registered with manager#registerEvents(new SpawnCommand(), this);

subtle folio
#

i don’t think you can have event listeners in bukkit runnables.

brave sparrow
#

Where do you see the event listener

#

Oh I see it

#

No you don’t want to do that

#

Lol

subtle folio
#

yeah πŸ˜…

tranquil viper
#

So just do it in a separate class like normal

#

or outside the runnable

#

I saw some forum that suggested doing it inside the runnable

subtle folio
#

you can’t have a event inside a runnable

#

i suggest learning basic java and spigot api before trying to do things

winged lark
flat olive
#

How do I set a way point based on just a location?

LunarClientAPI.getInstance().sendWaypoint(player, new LCWaypoint("test", new Location(w, x, y, z), 0xFFFF, true));

This is what I have for my waypoints, however, the LunarClientAPI has no documentation on this and its making me angry.


    public LCWaypoint(String name, Location location, int color, boolean forced) {
        this(name, location, color, forced, true);
    }

This is LCWaypoint Method, does anyone know how to define a pre-established location from in game and set a waypoint from it.

subtle folio
#

lunar client has a api??

hot fjord
#

i could be absolutely wrong here but

https://github.com/LunarClient

which has (see pic) the only way to contact someone who might know about the lunar client api

GitHub

Free modpack for all recent Minecraft versions. Now available on Windows, macOS, and Linux. - Lunar Client

#

afaik spigot api has nothing to do with lunar client so there might not be many people here knowing the answers to your questions

flat olive
#

I have no clue how to get this shit working

#

i have been trying for 6 hours

#

still

#

no luck

#

ill try emailing one of the lunar client api devs

sonic idol
#

what is the new UseEntityEvent for 1.17.1

cinder karma
#

Some brief clarification on the ScoreboardManager...what scoreboard is referenced by getMainScoreboard? I wasn't aware of a "primary" scoreboard, what does that mean? And when should I use that instead of getNewScoreboard?

sonic idol
#

nvm

#

Its not even a event lol

tidal hollow
#

Does anyone know how to make being above layer 60 give you a negative effect?

kind hatch
#

Use a runnable that checks player locations, and if they are above Y 60, apply the effect. Otherwise, remove it. (If it's permanent)

rugged cargo
#

is there a discord server for protocollib?

#

if not may' i post some code here?

flat olive
#

I figured out the issue, and im pissed.

#

fucking. pissed.

low temple
flat olive
#

im even more pissed that I have to have Lunar's api in my plugins folder

tranquil viper
#

Anyone know how to (with code) check what flags a player has in a spot via worldguard api.

flat olive
#

I was trying to create a server using one plugin

low temple
flat olive
#

not any above one plugin

#

but instead I have to have lunars api in my plugins folder

#

🀦 ill never make an HCF server without atleast 2 plugins.. πŸ’€

flat olive
#

atleast this works now.

low temple
flat olive
#

Lunar client special staff modules, xray mode, press X in lunar to activate

cinder karma
# sullen marlin The /scoreboard

You can assign multiple objectives to a single scoreboard? Like, I can use getMainScoreboard and assign a bunch of objectives, all able to be used by /scoreboard?

rugged cargo
#

well that'll do it, but do you know why?

#

is it just that its hard to maintain?

echo basalt
#

it's because protocollib wraps NMS packets

#

and NMS packets serialize the packets themselves

rugged cargo
#

oh, so ProtocolLib is just an abstraction layer for that?

echo basalt
#

pretty much

#

a very good layer

rugged cargo
#

ah, ok

#

ill take a look at that link. thank you very much!

rugged cargo
#

somehow i interfered with packet 0x36 which is the Player Info packet. oopsies

#

lol

rugged cargo
#

protocol lib is not helping with my efforts. Offset X Float This is added to the X position after being multiplied by random.nextGaussian() same problem

#

urg. isn't it possible to just spawn a particle in one place with no movement?

sullen marlin
#

You do not need protocollib for particles

#

The API mirrors the protocol entirely

rugged cargo
#

i figured it would allow me more control, but i can't find any resources on how to customize my particle's behaviors i.e. no behavior at all

sullen marlin
#

It does not allow you more control

#

The particle API is 100% complete

rugged cargo
#

well i know that now, and also found out that the particle position randomization is built into the packet

broken helm
#

hello

spring wren
#

will the modern sit, lay and crawl plugin work on 1.12.2

river oracle
#

anyone know of a way to get last death location?

#

I haven't found anything in the api via docs / research on google

hot fjord
#

event listener for player death maybe?

tranquil viper
#

How can I cancel dropping the drops of a block on break?

  • Cannot cancel and set to air
river oracle
hot fjord
#

oh you need a players death location that has already happened?

#

any idea if they logged out immediately after dying?

#

without respawning

river oracle
#

hmmm doesn't look like it

#

looks like I can only add prevention to stop this in the future

hot fjord
#

i was gonna mention essentials has a tpoffline command you could possibly use if they quit out of death

#

yeah a death log helps a bit

crude loom
#

I'm using the player#performCommand method to make the player perform a command
Is there any way I can make the player perform a command that they don't have permission for?

noble lantern
#

Looking for a double confirmation on this:

When using Block#setMetaData(String, FixedMetadataValue) this data is not persistant throughout restarts correct

flat olive
#

how to check if a player has used the same command before

#

what method ?

summer scroll
flat olive
#

bruh

#

if you have a lot of players then tracking it manually will take up space

#

especially for databases

#

or just files

#

space

summer scroll
#

Nah, doesn't take too much space

flat olive
#

space means everything

#

space gets taken

#

space goes bye bye

#

😭

grizzled pollen
#

just saving list of players uuid

flat olive
#

well.. there is a hasPlayedBefore method

#

which makes no sense because that works just fine without storing

grizzled pollen
#

lol?

#

it is stored in a file

#

in playerdata

#

world/playerdata/uuid.dat

flat olive
#

yeah the player is tracked without using and data

#

really?

#

so how big can the uuid file get

#

if I have a big server

#

will it cause issues?

viral temple
#

guys, on average, do you think a server could hit more than 10.000 offline players?

flat olive
#

offline

summer scroll
#

doubt that

viral temple
#

how about 100.000

vocal cloud
#

Depends on how good the server is

summer scroll
#

on average, nah

flat olive
#

How can I keep my server TPS at solid 20 while maintaining only two plugins, lunar API, and my plugin that runs all of its essential stuff inside of it to do multiple things.

viral temple
#

questioning because I've been doing some math, loading only the uuids of 100.000 players into the heap it would take only around 50mb

flat olive
#

bruh thats nothing

viral temple
#

yes

flat olive
#

thats so small

viral temple
#

that's what I've been thinking

flat olive
#

I thought it was gonne be like 200mb for 500 players

viral temple
#

it's even better for uuids

flat olive
#

Yeah lol

viral temple
#

1 uuid = 2 longs meaning 16 bytes

#

16 bytes * 100.000 = 1600000 bytes

flat olive
#

meaning 100 mb

#

doubled.

#

oh im dumb

#

lol

#

nvm

viral temple
#

meaning even less than 2mb

flat olive
#

yeah

viral temple
#

is that correct?

flat olive
#

I think

viral temple
#

πŸ€”

flat olive
#

thats even smaller?

#

how

#

string takes more space up then?

viral temple
#

xD

viral temple
flat olive
#

🀣

#

makes sense then ig

viral temple
#

an uuid is 32 char lenght

#

of course

#

java 18 I think its standardising to use utf8

#

anyway

#

even tho it's less than 2MB, using as a key...

#

if you store them in a hashmap, you probably store an object with it too

granite burrow
#

Is there an event for when a player sets their spawn? Like if they click a bed or something

viral temple
flat olive
#

every time someone interacts with a bed their spawn is set

#

so interact event with material.bed

#

oh true

#

no

#

their spawn still gets set even out of range, daytime, or mob near it

granite burrow
#

yeah thats why I wanted a event but oh well best ill be able to do is just make sure i set the location even if there is a mob nearby

granite burrow
flat olive
#

ah

#

if they interact with it and are in specific range event, set multiple limits within one event to make what you want

granite burrow
#

3 πŸ˜„ just tested that, im not gonna worry about mobs

flat olive
#

kill any mobs automatically within range of all beds near players when they interact with beds🀣

granite burrow
#

put it on peaceful, future proof

flat olive
#

even better: spawn 10 million tnt and light it

granite burrow
#

best option

#

true true true

manic delta
#

Is there a way to disable tp the first time someone enters a server?

#

i made my own for something i'm doing but it run mine first then natural lol

summer scroll
#

Is there even natural teleport? i don't even know

manic delta
#

Yes like a world spawn

summer scroll
#

That's from other plugins

manic delta
#

I don't want it i have a custom one

manic delta
granite burrow
manic delta
#

I made a plugin that does that but to a place that I want but the problem is that first it does tp to mine and then to that random place

granite burrow
#

can you show your code where you teleport them

manic delta
#

Im on phone now but it is just event.getPlayer().teleport(the location here)

#

On JoinEvent

#

I get the location of a config file

granite burrow
#

is that all that happens in the join event?

manic delta
#

Yes

#

The config file

manic delta
granite burrow
#

are those the correct coords?

manic delta
#

Yes

#

First it does tp to those and then to others

#

But only on the first join

granite burrow
#

like when they join the server for the first time ever? or like when they join the server in general?

manic delta
#

First time ever

sharp bough
#

how could i get only the 0,1,19,21,24? using config.getKeys(false) would work but i need it to check only in a given path

summer scroll
#

Well that explains it I guess

sharp bough
summer scroll
#

Player has no data on the server before, so it will spawn on world spawn location

manic delta
#

Yes but i want to fix it

granite burrow
manic delta
#

I don't want him to send them to that place lol

#

I want it to be to the place that I say

summer scroll
granite burrow
#

wait

#

@manic delta are you using PlayerJoinEvent

manic delta
#

I was testing with a friend and this happened

#

Yes

granite burrow
manic delta
#

But

#

It works btw

#

It teleports them to the zone I want and then to the server spawn

#

🀨

granite burrow
#

Im not sure why that would happen, if you could show your full code then I can go through it and try to fix it on my own system, because based on your code it should work thats basically what mine does I just have more logic for first join and messages and other stuff in mine

manic delta
#

is just a tp lol

#

Like

#
Location location = new Location(world, x, y,z, yaw, pitch)
<Player>.teleport(location)
granite burrow
manic delta
#

It also has other things like a login system and I give them an inventory but I really don't think that's it.

manic delta
#

Purpur

#

If I don't find a solution I will make the server wait 5 seconds and just do the tp πŸ’€

granite burrow
#

hmm, it may have to do with something on Purpurs side ive never worked with it before

#

do you have access to discord on your computer?

manic delta
#

I was checking the purpur config and I didn't see anything like that really

manic delta
#

It's 1 in the morning, that's why I'm not on the computer

granite burrow
#

I can try to make a quick plugin and test it on my side to see if it works and send it to you to test out. other than that I have no idea how to fix the issue cuz it should work

manic delta
#

Okay thanks

#

Im searching about it too

granite burrow
manic delta
#

I have some problems with my host service and so I want to do a local database for a while but I can't

#

🀣

#

If not I would use host database

granite burrow
#

ah yeah im not too good with it, I wanna run a server at my house tho so i should be learning soon

#

The locations gonna be hard coded in for me by the way, just to ease the process

manic delta
#

I was watching some videos or guides but I can't do it locally

#

like the luckperms

#

It have a local database

#

But I don't know how to do that

delicate lynx
#

you can use xampp if you're on windows

#

it has a built in SQL server that can run locally

manic delta
#

Yes but I want the plugin to create its file on the plugin folder to use it

#

Like myPlugin/data/playerdata.db

#

I have never done it locally and now I need it

delicate lynx
#

ah, I see

granite burrow
#

JoinEvent Issues

warm light
#

event.getBlock().getDrops().clear(); not working in BlockBreakEvent.
whats the proper way to remove drops?

patent quarry
#

If you want clear the drops event.setDroptItems(false)

warm light
#

ok. thanks

noble lantern
#

intellij is just ridiculous anymore

ebon coral
#

How would I create a VoidGenerator for 1.18?

#

As generateChunkData is deprecated.

ebon coral
#
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220) ~[guava-31.0.1-jre.jar:?]
        at com.google.common.graph.StandardMutableValueGraph.putEdgeValue(StandardMutableValueGraph.java:94) ~[guava-31.0.1-jre.jar:?]
        at com.google.common.graph.StandardMutableGraph.putEdge(StandardMutableGraph.java:52) ~[guava-31.0.1-jre.jar:?]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:235) ~[pufferfish-api-1.18.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.CraftServer.loadPlugins(CraftServer.java:418) ~[pufferfish-1.18.2.jar:git-Pufferfish-61]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:290) ~[pufferfish-1.18.2.jar:git-Pufferfish-61]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1165) ~[pufferfish-1.18.2.jar:git-Pufferfish-61]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:317) ~[pufferfish-1.18.2.jar:git-Pufferfish-61]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
karmic void
#

help

ebon coral
#

Wtf does that mean

river oracle
# karmic void

looks like an issue with your packet injector maybe its not yours πŸ€”

#

you could probably narrow down to the code based off the stack trace to figure your issue

river oracle
# karmic void wwhat

well I'm assuming your sending packets to the server so traceback the stacktrace if you can't do that you shouldn't be coding with packets yet let alone even touching spigot plugins

river oracle
# karmic void IDK

I can't help you if you don't even know your own code πŸ€·β€β™‚οΈ

jagged thicket
#

or is it a server issue

noble lantern
#

sounds like a server issue

#

by the sounds of the confusion

#

if it spams errors from console, its gotta be songoda

river oracle
#

ahahaha oh my

jagged thicket
#

sugondeez

river oracle
#

love that company name though its funny asf

noble lantern
#

not to mention owner of that plugins banned from mcmarket hmmm

river oracle
#

lmao ofc ofc

earnest forum
#

the most powerful anticrash

chrome beacon
#

So powerful it crashes your server

supple elk
#

will the code after I disable my plugin still be ran?

chrome beacon
#

Yes

supple elk
#

how can I stop it then?

earnest forum
#

return

noble lantern
#

^

earnest forum
#

or put an else

supple elk
#

okay but I'm guessing code outside the return will also continue to run?

earnest forum
#

no

#

it stops

#

after it is ran

supple elk
#

okay so after a return it will no longer continue?

earnest forum
#

if its inside the if statement it won't run if the statement isnt true

#

if that's what you are asking?

#

so if the map doesn't contain the key it will not return and still run the code outside

supple elk
#

nah as in when it returns to where the method was called from

earnest forum
#

yes no code after that will run

supple elk
#

kk

earnest forum
#

your ide will probably let u know if u put code after a return

#

that it won't run

supple elk
#

so with this function

#

if I did ```java
regsisterAbility(abilitity);
//other stuff

earnest forum
#

other stuff will run

supple elk
#

okay so it does run

earnest forum
#

nothing runs inside the method but outside of it

#

it will

supple elk
#

each ability is meant to have a unique string

#

a key

noble lantern
#

so just dont enter it in the map

earnest forum
#

yeah...

#

just send a message to console

supple elk
#

means something has gone wrong in code which needs to be fixed .-.

noble lantern
#

so just error log

earnest forum
#

message is plenty enough

supple elk
#

mk

noble lantern
#

this will shut down the plugin if its running on startup

#

oh kek

supple elk
#

πŸ‘Œ

#

I did create an exception

#

but then thought I'd just stop the plugin and print a msg instead

earnest forum
#

can't you create coloured console lines?

faint cypress
#

I have a class that extends BukkitRunnable that is intended to be run asynchronously. In the run() method I callback via a lambda.

@Override
public void run() {
    final List<String> list = new ArrayList<>();
    // Populate list with list.add()
    Bukkit.getScheduler().runTask(plugin, () -> { callbackMethod(list); });
}

...
// In JavaPlugin class:
public void callbackMethod(List<String> list) {
    this.list = list;
}

Is List / Arraylist okay to use here for passing a list of strings back to the main thread?
(Need to use CopyOnWriteArrayList<String> ?)

supple elk
noble lantern
#

exceptions show the stacktrace

supple elk
#

logger.severe() is easiest

noble lantern
#

could be more usefull than a log message

supple elk
earnest forum
#

yeah true, but in the log you could make it unique to that method

#

the message

#

without all the stacktrace spa

#

m

supple elk
#

means I have to handle it each time when really it only needs to handled in the same way each time

#

having said that

noble lantern
#

or make a class extending Exception think

supple elk
noble lantern
#

pog

supple elk
#

you think that's better then?

earnest forum
#

yea that's good

sharp flare
#

any idea why this happens, cant event reproduce it. My guess is the nbt tag inside item are broken

earnest forum
#

also put an else on the if for adding the map

supple elk
#

πŸ‘ that is technically more accurate

supple elk
sick ermine
#

(Damageabs) What is the difference between ItemMeta#setDamage and ItemStack#setDurability?

supple elk
#

if it throws the exception it won't be ran anyway

earnest forum
supple elk
#

lmao

noble lantern
#

boolean type?

sharp flare
#

no boolean pdc type

#

I stored it as string then parse i

earnest forum
#

int then

chrome beacon
#

You should use byte

earnest forum
#

just 0 or 1

eternal night
#

byte

noble lantern
#

yeah byte/int can be cast to a boolean if its 0 or 1 iirc

supple elk
#

Anyway the reason why I wanted to shut down the plugin if an ability was already registered is because it feels like a pretty fatal error

eternal night
#

for booleans usually

sharp flare
#

I can change it but it would affect a lot of players having that item

supple elk
#

wdym?

sharp flare
#

any systematic way of doing it properly

noble lantern
grim ice
#

just make

#

a Logger.warning()

earnest forum
#

make the byte 0 or 1

grim ice
#

why

earnest forum
#

0 for false 1 for true and then convert that

grim ice
#

I dont give a shit

noble lantern
#

oh

faint cypress
grim ice
#

its the server configurator job

noble lantern
grim ice
#

to look through the logs

#

hes getting paid, he should do his fucking job lol

supple elk
grim ice
#

if they dont then thats too little of a server to care about

supple elk
#

it should never be an error which occurs anyway

noble lantern
#

damn