#help-development

1 messages · Page 1473 of 1

spark finch
#

Is it possible to get the player from ItemSpawnEvent?

eternal night
#

as the item spawn event is called for any form of items being spawned I do not think it is very possible

#

but why not use the drop event ?

spark finch
#

EntityDropItemEvent you mean this one?

#

I've already tried that one

eternal night
#

Yeah that one

spark finch
#

Didn't work

eternal night
#

doubtful

summer scroll
#

what about ItemSpawnEvent#getItem#getThrower

young knoll
#

Assuming there is one

summer scroll
#

EntityDropItemEvent or PlayerDropItemEvent

young knoll
#

But that’s what the other event is for

spark finch
#

I'm trying to limit the amount of items that can be spawned/dropped in a radius of getNearbyEntities basically

spark finch
eternal night
#

oh I thought player drop item event was deprecated

#

doesn't seem to be the case

spark finch
summer scroll
#

getEntity my bad

torn shuttle
#

damn it I just can't get this effect right

spark finch
young knoll
#

Correct

summer scroll
#

yup, so just use PlayerDropItemEvent instead.

spark finch
#

But that doesn't include if someone breaks a chest with the items inside, right?

young knoll
#

Or just turn the activation range for items way down and then not worry about it

summer scroll
#

Bukkit.getPlayer(ItemSpawnEvent#getEntity#getThrower) maybe

young knoll
#

I don’t think the drops of chests will have a thrower anyway

#

BlockDropItemEvent may work for that, maybe

spark finch
summer scroll
#

null check everything xd

spark finch
#

Then I assume I can just message every player near it

#

This works fine xd

#

oops, wrong scope, but otherwise works, spamming everytime a player drops something otherwise

summer scroll
#

not that safe but yeah

spark finch
#

yea

young knoll
#

Rip any items over 60

spark finch
#

Yea 😳

summer scroll
#

will create a Map that saves location and item and have a task to try to respawn the Item work? xd

spark finch
#

A player managed to spawn in more than 2100 item drops. TPS dropped to 8-9

#

They weren't trying to crash the server, just farming their farms, but way too much to have no protection against it at all xd

#

Doubt you can solve that in spigot.yml or paper.yml, if you can please let me know

eternal oxide
young knoll
#

They did

#

But then you lose items

eternal oxide
#

tuff?

spark finch
young knoll
#

Chests get blown up

#

Items gone

eternal oxide
#

perhaps have it check for junk items that automation could produce and only allow x number of those on the floor

#

sand, dirt, cobble, cacti etc

young knoll
#

Combine them into a shulker box

#

Actually that would be pretty cool if it didn’t give people a free shulker box

eternal oxide
#

or just remove x number of junk items. Its not like they are valuable

young knoll
#

I guess you could make a plugin that combines items into a shulker box and then removed the box on pickup

#

That could be fun

eternal oxide
#

So long as you tag it so you only remove YOUR boxes

spark finch
#

There seems to be a total miscalculation of how many entities there actually are as well... (The numbers are the amount of dropped items nearby)

#

1 stack is essentially one item...

#

When a chest breaks, don't they stack up?

#

Or is it only after a while?

young knoll
#

Not immediately iirc

spark finch
#

Oof

summer scroll
#

if there's 1 stacked items on the ground, does that count as 1 item or?

young knoll
#

They probably stack on the next tick

spark finch
#

Should I delay the checks a few ticks or?

#

Runnable?

#

😳

frail sluice
#

how can I get the NBT tag of a player? I want to do something like this

((CraftEntity) player).getHandle.getTag()
#

someone?

ivory sleet
#

getHandle is a method

frail sluice
#

yea

ivory sleet
#

so probably
((CraftPlayer)player).getHandle().getTag()

frail sluice
#

fixed that but there is no getTag()

ivory sleet
#

Idk might be called something else

eternal oxide
#

Inventing methods I see

frail sluice
ivory sleet
#

Uh look for a method declared in EntityPlayer which returns NBTCompound probably

eternal oxide
#

What tag are you trying to get?

frail sluice
#

I want to add a tag

eternal oxide
#

then use the Spigot PDC API

frail sluice
#

uhh how can I get the API?

eternal oxide
summer scroll
#

why don't put the file in the value?

maiden briar
#

I know I asked yesterday, but found no solution:

AccessController.doPrivileged(new PrivilegedAction<VarHandle>()
        {
            public VarHandle run()
            {
                try
                {
                    MODIFIERS = MethodHandles.privateLookupIn(Field.class, MethodHandles.lookup()).findVarHandle(Field.class, "modifiers", int.class);
                    return MODIFIERS;
                }
                catch(NoSuchFieldException | IllegalAccessException e)
                {
                    e.printStackTrace();
                    return null;
                }
            }
        });

Requires me to start the server with --add-opens java.base/java.lang.reflect=ALL-UNNAMED, is there a way to auto start it with that or something else? Somebody told me also that a security manager prevents me

summer scroll
#

wdym reference the file?

#
File file = new File(directory, "file_name.nbs");
maiden briar
#

plugin.getDataFolder = /plugins/<plugin name>

visual tide
#

im trying to make my plugin disable itself with this.getServer().getPluginManager().disablePlugin(this);
but it continues running after it disabled itself and throws an IllegalPluginAccessException

#

any ideas?

ivory sleet
#

Send stacktrace

torn shuttle
#

is it just me or is #checkFinite() really odd?

visual tide
torn shuttle
#

it just throws an exception if a component isn't finite? why isn't it a boolean?

ivory sleet
#

@visual tide what are you doing

#

A scheduled task?

visual tide
#

im want to disable the plugin if something has gone very wrong

young shell
#

I have a Problem, I try making a balloon with a falling Block and a bat, but for some reason, i can't get them to spawn. I'll send the Gists for the 2 relevant methods in a Second

#

I know for a fact that both the create() and startBalloonTask() Method are getting called

ivory sleet
paper viper
#

@ivory sleet

ivory sleet
#

Yeah

paper viper
#

Hi

ivory sleet
paper viper
#

uh, we're friends

#

lmao

ivory sleet
#

No we’re enemies obv

paper viper
#

Yeah obv

ivory sleet
#

Else we wouldn’t greet each other

paper viper
#

mhm

#

lol

ivory sleet
#

But how’s mml going pulse

paper viper
#

ok carry on

paper viper
#

someone decided to give a server

#

anyways imma stop

ivory sleet
#

I saw

#

That’s quite nice

paper viper
#

cause im prolly annoying other ppl

#

Lol

#

Yeah

ivory sleet
#

What was the catch of the server then?

paper viper
#

nothing

visual tide
# ivory sleet Send the code snippet where you do it
PluginCommand myCommandCommand = getCommand("mycommand");

        if (!(myCommandCommand == null)) {
            myCommandCommand.setExecutor(myCommandClass);
            myCommandCommand.setTabCompleter(myCommandClass);
        } else {
            System.out.println("[MyPlugin] An error occurred when trying to register a command.");
            this.getServer().getPluginManager().disablePlugin(this);
        }
ivory sleet
#

Why did he decide to that then

queen dragonBOT
visual tide
#

its my onenable

ivory sleet
#

Put return under disablePlugin(this)

visual tide
#

OH

#

YES

#

of course

ivory sleet
#

What file are you working with?

#

Uh I guess

paper viper
#

you could download it at runtime into your plugins folder

#

or have it in your jar resources

#

which one

ivory sleet
#

Yeah pulse will help you cya folks

sour rampart
#

What's a good way for generating structures?

paper viper
#

ic

#

This should get a resource in your resources folder

#

Yes

#

in your jar file

#

You can't do it in the src folder

#

you just cant do that

maiden briar
#

You mean the resources folder?

paper viper
#

it must be in resources

maiden briar
#

/src/main/resources

paper viper
#

ah

#

then yes

#

thats what im talking about

#

that method works

eternal oxide
maiden briar
paper viper
#

Your src/main/resources is standalone

#

you dont add package names to it

#

you just directly add your files

#

to src/main/resources

#

and it will appear in the root directory of your jar

#

Oh

#

show a screenshot

#

just want to make sure

paper viper
#

you can create it

#

but i want to see what the structure is atm

maiden briar
#

The reflection class: https://paste.md-5.net/vehocoqexo.cs, The test class: https://paste.md-5.net/mileqihofo.java, the statements to check:

Class<?> clazz = Reflection.getClass("me.tvhee.tvheeapi.core.test.AClass");
        System.out.println(clazz); //Works
        Reflection.setStaticField("me.tvhee.tvheeapi.core.test.AClass", "stringField", "anything"); //Error
        System.out.println((String) Reflection.getStaticField("me.tvhee.tvheeapi.core.test.AClass", "stringField").getObject());
        System.out.println((String) Reflection.invokeStaticMethod("me.tvhee.tvheeapi.core.test.AClass", "aMethod", "TEST").getObject());
        Reflection reflection = Reflection.newInstance("me.tvhee.tvheeapi.core.test.AClass", "TEST4");
        System.out.println((String) reflection.invokeMethod("stringMethod", "test1", "test2").getObject());
        reflection.setField("st", "aStringFieldTest");
        System.out.println((String) reflection.getField("st").getObject());
#

Not using Maven?

daring whale
#

someone

paper viper
#

use imgur

#

or get verified

eternal oxide
#

um, java 16?

torn shuttle
#

sorry lad

#

couldn't find a pulse

#

I am sorry for your loss

young shell
#

HE IS DEAD

#

NOOO

#

Pulse

#

no pulse

paper viper
#

uhh

#

well if you arent using maven or gradle

#

you have to put the file on the outside of your folder

#

like where your plugin.yml is located

#

JavaPlugin#getResource

#

for the string?

#

if you pass in that string, it would locate to a folder named songs

#

and that file

#

yes

#

Well, let me tell you this actually

#

The File class is designed for paths that are external to the jar file

#

the issue is, your file is inside the actual jar file

#

so you can't actually create a file object from it, sadly

oak mica
#

bruh

quaint mantle
#

i think you can

#

w8 lemme open my ide

quaint mantle
paper viper
#

you could temporarily create it

#

like a temp file

#

then use that

quaint mantle
#

i think ElgarL or that long name told me this

oak mica
#

this should work right?

quaint mantle
#

you crate the file somewhere

oak mica
#

my name is amogh

#

and that is htat

paper viper
oak mica
quaint mantle
#

Mayhaps.

paper viper
#

i got exams

#

gtg study

quaint mantle
#

EntityDamageByEntityEvent

oak mica
#

java -DIReallyKnowWhatIAmDoingISwear -jar /Users/admin/Desktop/sveta_temp/Amogh/Minecraft/Plugins/Server/1.16.5/server/server.jar
how do i use that with --noguii

keen kelp
#

how do I delete item from player's cursor

quaint mantle
#

java -DIReallyKnowWhatIAmDoingISwear -jar /Users/admin/Desktop/sveta_temp/Amogh/Minecraft/Plugins/Server/1.16.5/server/server.jar -nogui

#

yes

oak mica
#

thanks

quaint mantle
#

yw

#

ohh this is what u meant

oak mica
#

player touch event

quaint mantle
#

and by touch u mean like by getting close?

oak mica
#

idk look at whole thing

#

oh no

#

u need a runnable

keen kelp
#

how do i delete an item from player's hand

oak mica
#

that checks

keen kelp
#

cursor*

oak mica
quaint mantle
oak mica
#

what needed

keen kelp
#

dont ask to ask

quaint mantle
#

player.getItemOnCursor()

#
try {
                InputStream inputStream = instance.getResource("spigot/config.yml");
                OutputStream outStream = new FileOutputStream(getFile());
                byte[] buffer = new byte[inputStream.available()];

                inputStream.read(buffer);
                outStream.write(buffer);
            } catch (IOException exception) {
                instance.log("&r  &cError: &fWhile creating &cconfig &fan error ocurred!");
                exception.printStackTrace();

                instance.getPluginManager().disablePlugin(instance);
            }

try using this

#

in hashmap?

#

why

#

what are the hashmap values

wraith rapids
#

you certainly aren't making a hashmap with a bunch of song classes

#

you're most likely making a map with a bunch of song objects

#

or are you actually putting Class<Song> objects in it

oak mica
#

and it doesnt even give error

wraith rapids
#

yeah those are song objects, not song classes

quaint mantle
#

ohhh

#

i see

#

your trying to compare two metas

#

you should get displaynames from the metas and compare them to each others @oak mica

oak mica
#

ok

quaint mantle
#

idk but i think metas have something like durability and they wont be same and stuff

wraith rapids
#

no, you should not compare the display name

#

you should use the pdc

keen kelp
#

How do I delete an item from player's cursor

wraith rapids
#

using displaynames to identify items is error prone and old fashioned

keen kelp
#

setCursor is deprecated

#

what's pdc btw

quaint mantle
#

persistentdatacontainer

wraith rapids
#

persistent data container

keen kelp
#

thx

quaint mantle
keen kelp
#

no

#

but that returns a ItemStack

#

not the cursor itself

dire marsh
#

setcursor is deprecated because of client desync buggy stuff iirc

keen kelp
#

setCursor​(ItemStack stack)
Deprecated.

dire marsh
#

oh they removed it a while ago i think

wraith rapids
#

not seeing a deprecation note here

keen kelp
wraith rapids
#

in the event yes

#

not in the inventoryview

keen kelp
#

wait what

#

how do I convert

wraith rapids
#

see the docs

quaint mantle
#

eventName#getView

#

i spoonfooded u a code

wraith rapids
#

map.put

keen kelp
#

InventoryClickEvent doesn't have getview

#

nvm

wraith rapids
#

it does, read the docs

keen kelp
#

I said nvm

wraith rapids
#

what is a song object

#

what constructors does it have?

#

yes but what constructors does it have

quaint mantle
#

i and pulsebeat told u need to save the getresource to file

wraith rapids
#

for that just use saveResource

#

then yes you need to save it to a file and then pass the file to that method

#

which means you want to use saveresource, which extracts a resource and writes it to a file

minor garnet
#
        new BukkitRunnable() {
            double delay = 2.6;
            @Override
            public void run() {
                delay = (delay - 0.1);```
delay is 2.5555555559 and blabla, how i make only btween two numbers
wraith rapids
#

or ig you could getresource and write it down manually but that's unnecessary

#

getresource is a method

#

saveresource is also a method

#

you know how to use a method right

#

then what's the problem

#

have you considered, i don't know, reading the docs

#

the plugin's data folder

#

in plugins

#

server/plugins/myplugin

wet breach
#

getDataFolder()

eternal oxide
wet breach
#

?jd

wet breach
#

really should look at the javadocs

maiden briar
wraith rapids
#

google is helpful as well

wet breach
#

because not everyone likes intelliJ @maiden briar

eternal oxide
maiden briar
#

Ah

wet breach
#

I use netbeans 🙂

maiden briar
#

Ok then no problem, then I'll have to wait

wraith rapids
#

did you read the docs

eternal oxide
#

I'll run an update, but Eclipse usually kills itself when you do that

maiden briar
#

I can remember at "TheSourceCode" discord, "@maiden briar, why are you not using IntelliJ ? Eclipse is bad, etc"

minor garnet
wet breach
wraith rapids
#

by learning java

maiden briar
#

Same

quaint mantle
wraith rapids
#

you clearly have zero clue of what you are doing

minor garnet
#

2.5, 2.4, 2.3 and etc

tardy delta
#

hi

minor garnet
#

and if is 0.1 end runnable

wraith rapids
#

if (var <= 0.1) cancel()

minor garnet
#

yes but

#

when i remove 0.1 from the double, send me 2.55555555 and etc

quaint mantle
#

just try it geez

#

and yeah probably is

quaint mantle
oak mica
minor garnet
#

{ }

quaint mantle
#

could u try debugging it?

oak mica
#

how

summer scroll
minor garnet
#

why dont you check in just one condition?

quaint mantle
#

just add System.out.println(1); to everyone but keep increasing the number

minor garnet
#

like this

oak mica
#

ok

eternal oxide
maiden briar
#

Yes but perhaps spigot or bukkit can find a solution

#

If they also need reflection

eternal oxide
#

I went to test yoru code in a standalone project but it fails as you have too bound with spigot

oak mica
maiden briar
#

Yes (for ElgarL)

minor garnet
#
final Material type = item.getType();
if (type == null || type == Material.AIR || type == Material.CAVE_AIR) return;
``` @oak mica
#

CAVE_AIR is material ? 🤔

oak mica
#

yeah

#

ok thanks

#

it stops working after this rn

quaint mantle
#

yeah i think bcz u have the != in there

oak mica
#

no that one works

#

it sends message

minor garnet
#

!= null and when the item you are using does not exist in your hand it will execute this condition

oak mica
#

then this doesnt work

#

this doesnt send message

oak mica
summer scroll
#

use == bro

quaint mantle
#

yeah bcz you are checking if the item ISNT (!=) null and if the item ISNT (!=) null then it cancels (return) everything

quaint mantle
#

the == means if the value equals value

oak mica
#

ok it works now

#

only thing is

summer scroll
#

and use isSimiliar to compare itemstack as i already told you

oak mica
#

this often happens

#

how can i stop myself from teleporting into block

minor garnet
quaint mantle
#

runned your code and it runned fine for me

minor garnet
#

who

quaint mantle
#
double delay = 2.6;
delay = (delay - 0.1);
System.out.println(delay);
Output: 2.5
minor garnet
#

continue removing

severe folio
#

floating point imprecision?

#

wait am i dumb

minor garnet
#

until the result is 0.1

oak mica
quaint mantle
#

it was for @minor garnet sry

oak mica
#

ok

oak mica
quaint mantle
#

maybe your teleporting 1 y below

severe folio
#

from what I can gather, you're trying to teleport a player 25 blocks straight ahead of where they're looking. Why not just check if the block they're gonna end up on is a solid block, and if so use something (SUCH AS) World#getHighestBlockAt(x,z)

#

(assuming thats the behaviour you want)

#

is NoteblockAPI installed on your server

#

yeah

#

you're importing classes from it, right?

#

do you include it in your plugin then?

#

wait why?? its a separate plugin isnt it?

keen kelp
#

how do I set the slot that the player clicks to be an ItemStack

summer scroll
#

you need the plugin on your server unless you shade it

keen kelp
#

how do I get the slot tho

#

is it event.getSlot

royal hawk
#

Guys how set player group in luckperms api i have this code:

api.getUserManager().loadUser(player.getUniqueId()).get().setPrimaryGroup("vip");                        api.getUserManager().saveUser(Objects.requireNonNull(api.getUserManager().getUser(player.getUniqueId())));
keen kelp
#

or getRawSlot or

summer scroll
#

i know

#

that's how it works

#

unless you shade it

severe folio
#

Is the plugin still in your build path

#

Using the correct location?

#

(Did you move the plugin jar to the plugins folder or copy it)

slim magnet
#

Design Question: I'm running multiple instances of a minigame on one spigot server, and each GameInstance has a GameState which is an Enum (GameState.STARTING, GameState.INGAME, etc). Where should I handle the tick logic for each state? Currently I have the logic inside the enum, but I feel like that's stupid because enums are supposed to be constant but I have Map's inside of them for each GameInstance. I don't know what to do. Any suggestions?

quaint mantle
#

I get an error too

#
  1. not related to development (in this channel we help u with your own code and plugin)
  2. you should contact author
#

but show the error

#

maybe i could help u

#

probably sending some message

brittle igloo
#

Is it possible to add something to the an list in config.yml through a command?

quaint mantle
#

yes it is

#

probably dont have it imported

brittle igloo
severe folio
#

If it can't be resolved then it can't be on your build path or its pointing a wrong/nonexistent file

quaint mantle
#

yes

#
config.set(pathInConfig, value);
brittle igloo
#

Thanks now i know I'm not at an dead end

#

oh thanks!

quaint mantle
#

yw

severe folio
#

Exactly. Check the location of the reference. Try readding it and see if that fixes the problem

minor garnet
summer scroll
oak mica
#

ok

summer scroll
#

or

if(!item.isSimiliar(ItemManager.TPsword)) return;
severe folio
# oak mica this should work right?

I was thinking more along the lines of ```java
Location desiredLocation = /* some loc */;
if (!Material.AIR.equals(desiredLocation.getBlock().getType())) {
desiredLocation.setBlockY(desiredLocation.getWorld().getHighestBlockAt(desiredLocation.getX(), desiredLocation.getZ())+1);
}

p.teleport(desiredLocation);

summer scroll
oak mica
#

huh

regal yoke
storm monolith
#

Heyo, I made a custom entity with NMS (custom silverfish), at the moment it walks on the ground, can I specify another Y? (I already tried to change the Y on the onTick method but it doesn't seem to work with custom pathfinders)

#

why I get ignored so hard😥

eternal oxide
#

A silverfish can not fly

stone sinew
late dove
#

Please tell me why it doesn't work? Writes that it is not defined for the NamespacedKey type.

        NamespacedKey.fromString(key);
        return key;
    }
eternal oxide
#

lol

#

that method returns the string you pass in

#

return new NamespacedKey(plugin, key);

late dove
severe folio
#

NamespacedKey doesnt have a static fromString method does it..?

eternal oxide
#

There is no fromString method in NamespacedKey

late dove
eternal oxide
#

Not Spigot

severe folio
#

thats PaperSpigot

eternal oxide
#

It also doen;t just take a string

eternal oxide
#

oh it does

#

nm

severe folio
#

wait what-

eternal oxide
#

ANyway, not Spigot

#

um

severe folio
eternal oxide
#

Yeah, I don;t see that method either

late dove
#

It is in the documentation!

severe folio
#

im gonna run buildtools and see if that method exists when i get a new jar

eternal oxide
#

Its in the docs, its not in the jar though

#

Its definitely in the code, but it does not show up in my IDE

severe folio
#

strange

eternal oxide
#

I've never seen that before

severe folio
#

netiher have i tbf

late dove
#

How else can you get enchantments by name?

near crypt
#

can i get the first OnlinePlayer from the Collection with this code?:

Collection<Player> player1 = (Collection<Player>) Bukkit.getOnlinePlayers().toArray()[1];
eternal oxide
#

oh,nm, its there, it was added in 1.16.5 I was still on 1.16.4

severe folio
#

im also on .4 lol

near crypt
eternal oxide
near crypt
#

oh yes sry

#

haha

#

its [0] ik

wet breach
#

and just fyi you don't need to do toArray() when getOnlinePlayers already returns an array

eternal oxide
#
Collection<? extends Player> players = plugin.getServer().getOnlinePlayers();
Player p = Iterables.getFirst(players, null);
if (p == null) return;```
late dove
eternal oxide
#

What exactly are you trying to do?

near crypt
#

@eternal oxide and how can i get the location of this first player because its no player? can i convert this?

tardy delta
#

is ?tag something?

late dove
eternal oxide
#

or just their names?

late dove
#
  • I need to save them to the database.
quaint mantle
#

Is there some kind of api or how can i do something like updating config from other versions without having to recreate?

cobalt blaze
#

getConfig().options().copyDefaults(true)

quaint mantle
#

i didnt meant that

#

i have a file config.yml, messages.yml and stuff and i want to when i add some sections to it i want it to update

cobalt blaze
#

Like copy the new sections to your config.yml?

quaint mantle
#

yea smth like that

cobalt blaze
#

Without recreating

quaint mantle
#

but with comments

tired spoke
#

i've see plugins that starts from 1.13 and has support from 1.8 to 1.16, how they do that? Native version: 1.12/1.13

severe folio
quaint mantle
#

smth with inputstream and stuff u can

severe folio
#

i mean appending it to the end of the file maybe, but once you save that file then you're gonna lose the comments if you use Bukkit's FileConfiguration#save

quaint mantle
#

yeah ik

#

well nvm gotta find smthing

late dove
cobalt blaze
#

check the config if a key of your new section exists, then use FileWriter to append the new default values

#

something like that

eternal oxide
late dove
near crypt
eternal oxide
near crypt
#

😉

#

so just get and then the number i guess

quaint mantle
eternal oxide
#

You don;t know how many are in the Collection

near crypt
#

yes obviously i check for null

eternal oxide
#

no

near crypt
#

but i know it i have a switch statement for that

eternal oxide
#

there will be no null values in the collection

near crypt
#

is the position 1 the second element?

#

or is it the first?

eternal oxide
#

no, this is not an array

ivory sleet
#

🥲

near crypt
#

okay thx

ivory sleet
#

Skull guy wat u tryna do

eternal oxide
#

I'll give you a hint, you can google the rest. java Iterator itr = players.iterator(); while (itr.hasNext()) {... }

ivory sleet
#

Raw types 😬

eternal oxide
#

I did say I'd give him a clue, not write it all

ivory sleet
#

🥲

#

Gotta figure out the type parameter himself doubt he will be able to do that

kind coral
#

hi, i am just asking to be sure, to reach summon-item it should be like this right?

generators.emerald.summon-item

tawdry plume
#

hey guys, is there a way to get a list of all mob entities? i'd like to spawn a random mob

#

or do i have to manually get all entities and put them in a list before randomizing it

eternal oxide
#

There is no log nor sysout in that code

#

you are logging an object

#

somewhere in code that calls

#

what is the init() method?

#

or the updateState method

#

find the log/sysout line

#

somewhere in your update you are logging an object

full holly
#

how can I create a scoreboard in 1.16.5 with packets?

eternal oxide
#

no]

#

You understand what a logger is?

#

Somewhere you are using the logger or calling System.out

quaint mantle
#

yeah you're just a noob

eternal oxide
#

there we go, finally

tawdry plume
#

is there an event to change a mob? for example if i spawn a zombie it changes to a chicken

wraith rapids
#

you can't change a mob

eternal oxide
#

you can replace it is all

tawdry plume
#

once the zombie spawns it replaces it with a chicken?

eternal oxide
#

no

wraith rapids
#

you can stop the zombie from spawning

#

and spawn a chicken instead

tawdry plume
#

understood

#

how about an event that changes a mob's damage? to make the player flying after every hit

wraith rapids
#

events don't do what you think they do

#

there is a way to change a mob's damage yes, but it doesn't involve events

#

events are things that are called when stuff happens; when a mob spawns, a block is broken, a player joins, so on

tawdry plume
#

ok my apologies, still learning

#

i guess i meant functions since I'm learning the functionality/calls of the spigot api

wraith rapids
#

in java we call functions methods, but yeah, methods

#

here are the javadocs for zombie

#

here we can see that it extends Attributable

#

attributable has a method that lets you get a specific attribute of an entity

#

it takes an Attribute and returns an AttributeInstance

tawdry plume
#

this is great thank you

wraith rapids
#

attributeinstance then lets you modify the values

#

f.e by setting the base value

#

or by adding a new attribute modifier

#

the first thing you want to learn is how to navigate javadocs

lyric briar
#

Hi folks, where can I find the list of available keybinds?

lyric briar
#

In the basic example, there is a keybind (key.jump). I want the keybinds for attack/destroy, use item/place block and swap item with offhand

worldly ingot
#

keybind identifier

lyric briar
#

Thank you!

tawdry plume
#

Is there a way to extend or use methods/attributes in other entities?

#

For example can I have a chicken entity inherit creeper methods to make it explode?

fading lake
#

not automatically no, you'd have to program that behaviour yourself

tawdry plume
#

Hmm yeah I wouldn’t want to see the TNT though. Not sure if that will

eternal oxide
#

you can just set an explosion

tawdry plume
#

Ah right on

tawdry plume
tawdry plume
#

Now I’m thinking if there’s an explosion method that we can do

wraith rapids
#

there is a search box in the top right corner of the javadocs

tawdry plume
#

Create explosion 👀

wraith rapids
#

give it a try

#

write explosion in it

tawdry plume
#

Thanks @eternal oxide very nice of you

wraith rapids
#

again, the first thing you want to learn is how to navigate javadocs

#

searching and being able to find stuff is part of that

#

you can't rely on elgar linking you the relevant methods forever

eternal oxide
#

wrap the code in the runnable in a try/catch

tawdry plume
eternal oxide
#

everything that is in the run method

#

2 methods?

#

does update fun?

#

then one of your if statements is failing

#

actually, its probably itemsList is empty

severe folio
#

wouldnt that also possibly mean itemsList.length is 0

wraith rapids
#

itemsList[n] instanceof BetterCraftArmour
this is probably the fault point

#

where are you obtaining the contents of itemsList?

eternal oxide
#

the only way NEITHER of them can run is if there are no items

#

sysout the length

#

of itemList

#

dude

#

if you won;t listen we can;t help you

#

ok, good luck with that then

wraith rapids
#

you do know what that means don't you

#

i wonder what that might be

eternal oxide
#

so colour me surprised. my telling you to add a try/catch would have shown you that

#

Exceptions in anonymous runnables do not get shown in console

ivory sleet
#

They don’t?

wraith rapids
#

are you sure about that

eternal oxide
#

Yep

wraith rapids
#

exceptions in lambdas sure do

eternal oxide
#

I've come across it before

ivory sleet
#

I threw a RuntimeException in an anonymous Runnable and it showed stacktrace just fine.

eternal oxide
#

odd

wraith rapids
#

are you maybe confusing it with exceptions in static initializers

ivory sleet
#

Maybe it’s cause the runnable was executed in another thread pool with an unset uncaught exception handler or smtng

eternal oxide
#

thast possible

eternal oxide
#

you never set it

brittle igloo
#

Hi! me again haha.. i'm using getDisplayName() to save an itemstack meta name to config but it doesn't make it readable when it has colors. It still works but is there a way to get &k instead of ยง4ยงk 😄

#

String displayName = inv.getItemInMainHand().getItemMeta().getDisplayName();

wraith rapids
#

set the encoding of the file to utf8

#

for the &'s, use String::replace('§','&')

quaint mantle
#

what does the :: mean?

eternal night
#

similar to the # it sometimes notes that the method is non static

#

String#replace(String, String)
String#replace('§','$')
String::replace('§','$')

#

the :: notations comes from the method reference notation introduced in java 8

plucky comet
#

How would i deal with a chatpacket like this. json {"extra":[{"color":"dark_green","text":"Wilderness "}," ",{"color":"dark_gray","text":"["},{"color":"gray","text":"Member"},{"color":"dark_gray","text":"] "},"MangoOnTop",": hello"],"text":""} Im using ```py
def handle_chat(chat_packet):
chat_raw= str(chat_packet)
text = message(chat_packet)
if debug is True:
print(chat_packet.json_data)
print(text)

    if text == '':
        print(text)
    else:
        print(text)
        from_minecraft.put(text)

``` and get Wilderness [Member] when i should get Wilderness [Member] MangoOnTop: hello

brittle igloo
warm vapor
#

I am trying to cancel the default drops for some custom entities so I can replace them with other items
when the entities are spawned I set a string value in their persistent data containers but the value does not persist, as evidenced by debugging my EntityDeathEvent handler
I am not sure why this is the case, or if it is related to how I am spawning the entities
this is the function that attempts to spawn entities and sets the persistent data: https://hatebin.com/diuranwbij
other attributes of the entity that are set before spawning appear to work fine, but the persistent data does not.

lapis pollen
#

hi

#

My fawe plugin (1.12.2) is having problems

#

(log:)

#

I don't have much idea of programming

cedar hamlet
#

Ok quick question

#

I have a functional “snowball launcher”, it shoots snowballs and everything

#

How would I go about making the snowballs do Damage?

#

well heres the thing

#

there is technally, but then it applies to all snowballs

#

i just want snowballs shot from my cannon to do damage

#

oh you are right

#

there is

wraith rapids
#

listen to whatever event is fired when projectiles hit shit

#

apply a metadata value or a pdc tag to the snowballw when fired

#

and check for that in the event

#

and then use the methods on Damageable

#

and I was scrolled like 30 lines up

cedar hamlet
#

ty

cold tartan
#

is there a good way to store data on a player? like maybe tags

wraith rapids
#

yes, the persistent data container

#

player implements persistentdataholder

#

if you don't want them to persist over restarts, use metadata or something

cold tartan
#

ok

wraith rapids
#

inv.getItem(slotsMap.get(equipSlot)) == create()
looks dubious

#

are you sure == does what you think it does

#

a == b returns true if and only if a is b

#

a equals b will also return true if a is the same as b

#

for example two Integer objects each representing the value 3 will return false for ==

#

because they are two objects

cedar hamlet
#

Projectile snowball = p.launchProjectile(Snowball.class);
snowball.setCustomName("snowballLauncherBall");
wraith rapids
#

but they will return true for equals, as they are the same

cedar hamlet
#

this is how i name the projectile yes?

wraith rapids
#

that is, represent 3

#

inv.getItem always returns a new ItemStack object

#

because the returned itemstack is a clone of the actual itemstack

#

so the object you get will never be == to anything you pull from elsewhere

#

don't name the projectile

#

use a pdc tag or metadata

cedar hamlet
#

entity.getPersistentDataContainer().set("snowballLauncherBall");

#

yes?

wraith rapids
#

did you actually read the page

cedar hamlet
#

sorry, i'm "click happy" I'll look through more in depth

wraith rapids
#

it is somewhat similar to a Map

#

but takes 3 parameters instead of 2

#

a Map takes a Key and a Value

left swift
#

Hello, how can i set EntityArmorStand as EntitySlime passanger? i tried with armorStand.startRiding(slime); and slime.passengers.add(armorStand); but it doesnt work :/ Should i send any mount packets? (if i set EntityArmorStand or EntitySlime as player's passanger - works)

wraith rapids
#

the pdc takes a Key, a Type, and a Value

#

and unlike Map, where Key can be anything, PDC only allows you to use NamespacedKey as key

#

throw some stouts at it

#

system.out

twilit rivet
#

Is there a way to get all users that have joined a server without registering them when they join?

wraith rapids
#

in everywhere

twilit rivet
#

I need to do arg > string > uuid (both online and has played)

wraith rapids
#

to see why something isn't running

#

it's called debugging

twilit rivet
#

only works for the uuid though

#

can't do string to offlineplayer(string)

#

as it's deprecated

wraith rapids
#

you can

#

read the deprecation note

#

it's not recommended as the default way of getting a player as you should design your shit to look players up by uuid rather than name

twilit rivet
#

lemme play around with it

wraith rapids
#

but you still can use it and it does work

#

that said it can fire a blocking network request to mojang, so you shouldn't do it on the main thread

twilit rivet
#

ye, essentially need to do string > player > uuid so only really running it when the query is requested

#

it's all async so we good

#

@wraith rapids so this would work right?

#

well, not just yet, but...

wraith rapids
#

yes that should attempt to find an offlineplayer matching the given name

#

what is the null error

#

the full error

cold tartan
#

is there a way to make passive entities (cows, sheep, chickens, pigs) run away from a player?

wraith rapids
#

BetterCraftArmour.playerEquipped(BetterCraftArmour.java:117) ~[?:?]

#

what is this line

#

surely not

#

stout accepts null values

#

it does not throw a npe if it's given null

#

give me the actual class

cedar hamlet
#

@wraith rapids im sorry, i've read this site 10 times over and i still dont understand it

wraith rapids
#

i'll do it myself

#

which part of it are you having trouble with

cedar hamlet
#

So i need a namespacekey for a PersistentDataConatiner correct?

wraith rapids
#

myes

cedar hamlet
#
ItemStack itemStack = ...;
NamespacedKey key = new NamespacedKey(pluginInstance, "our-custom-key");
ItemMeta itemMeta = itemStack.getItemMeta();
itemMeta.getPersistentDataContainer().set(key, PersistentDataType.DOUBLE, Math.PI);
itemStack.setItemMeta(itemMeta);

why on the 4th line does he set it to pi

#

does it just have to be pi

eternal night
#

idk he is an idiot

wraith rapids
#

this is not the same version of the class as what you're running

eternal night
#

don't listen to that author, he is trash

wraith rapids
#

it doesn't have to be pi

#

it can be any double

eternal night
#

^^ it is an example value

#

that is just a handy double people tend to know

wraith rapids
#

69.420 for example

cedar hamlet
#

i see

wraith rapids
#

it's just the data you want to store

eternal night
#

that seems too dope to put into the PDC

wraith rapids
#

(key, type, data)

cedar hamlet
#

so thats the damage value I want to make

wraith rapids
#

you could record the damage the snowball should cause in the pdc, yeah

cedar hamlet
#

say i want snowball to do 3 damage, i put 3?

#

ok

wraith rapids
#

create a namespacedkey like yourplugin:custom-damage or whatever

#

use the DOUBLE type

#

and then write a double

cedar hamlet
#

ok

wraith rapids
#

the code that threw the exception and the code that you're showing aren't the same

#

the only case where line 117 would throw a NPE is if the static field 'out' of System is null

#

which I don't expect to be the case

#

doublecheck and triplecheck

#

something is fucked somewhere

#

or actually, did you include the full error?

#

it would make sense if you only posted a part of the error

#

i don't think you did

#

i'm 90% sure there's a Caused by: block following the stack trace you sent

cedar hamlet
#
                    ItemStack itemStack = ItemStack(Material.SNOWBALL);
                    NamespacedKey key = new NamespacedKey((Plugin) this, "customDamage");
                    ItemMeta itemMeta = itemStack.getItemMeta();
                    itemMeta.getPersistentDataContainer().set(key, PersistentDataType.DOUBLE, 3.0);
                    itemStack.setItemMeta(itemMeta);
#

like this?

wraith rapids
#

restart the server, rebuild the project, and try again

#

and send me the entire server log

eternal night
#

the fact that you have to cast this to a Plugin seems wrong

#

you need your plugin main instance there

wraith rapids
#

'this' is not a plugin

#

Plugin refers to an instance of your main class

lilac dagger
#

can one create javadocs with github pages?

cedar hamlet
#

oh

wraith rapids
#

the 'this' in onEnable

cedar hamlet
#

this code is in another class outside of main

#

in a class called snowballLauncher

wraith rapids
#

that means that you need to somehow obtain the instance of your main class in there

#

for example by passing it down in a constructor

twilit rivet
#

for async on my database function can I use ```java
Thread newThread = new Thread() -> {
...
}
newThread.start();

eternal night
#

o.O

twilit rivet
#

or is there another way to do it

eternal night
#

the most common way would be a completable future

#

which is then executed on an executor

slate pendant
#

Is using "Bukkit.createInventory" often optimized?

#

or should I keep those inventories

compact haven
#

ah wait, is there no custom model data equivalent for blocks?

#

like if I want to give a new custom model into the game, it has to replace a block?

wraith rapids
#

blocks are just a few tightly packed bits in a block palette in a chunk

#

there is no room for extra data like model ids or anything

compact haven
#

so it has to replace a block in the game, for each model? :(

#

its so unfortunate they cant even toss in a few bytes for a custom model data

wraith rapids
#

the exception to this is a tile entity, which is a totally separate thing from blocks and has more in common with a regular entity than a regular block

#

a more apt name might be voxel entity

compact haven
#

yeah but then I'm just better off placing an armor stand with an item on it's head

#

since its the same thing

wraith rapids
#

there are some blocks like mushroom blocks and note blocks that have a large number of block states that you could use a resourcepack to apply custom textures to

#

but no, aside from maybe fucking with tile entities, there is no way to add anything new

#

everything you do involves replacing something that exists

#

since block states and all of their combinations are pre-baked

compact haven
#

minecraft should introduce an block that specially occupies 4 bytes or smth as a custom model block :[

wraith rapids
#

it'd have to be a tile entity with the way how things currently work

#

currently, a block is just a few bits in a block palette

#

basically, a palette maps a number to each material type that exists in the chunk

#

and then the chunk contains those numbers

compact haven
#

🤔 so every block with a custom state is a tile entity?

eternal night
#

I think they might not even be too far off that.They also added I think minecraft:marker which is an entity that doesn't tick at all

compact haven
#

like a door for example has facing states, waterlogged, all of that

wraith rapids
#

since most chunks only contain a few kinds of block types, the resulting numbers are only a few bits in size

#

no, that is not a tile entity

#

but it has additional state

#

which is tracked separately

#

a door for example has a handful of state fields

compact haven
#

then yeah why cant they add what I said and just track is separately

wraith rapids
#

whether it's open, which side the hinges are on, whether it's the top or bottom block

#

because all states need to be pre-baked

gentle yacht
#

do you know how the current block states are implemented dlg?

compact haven
#

wdym banana

gentle yacht
#

how its stored in the block registry, and how its sent to the client

wraith rapids
#

for example, a note block has a few thousand different states

#

or was that a few hundred

#

i don't remember

gentle yacht
#

and what the difference between a tile entity is or not

sullen dome
#

thousands? lol

wraith rapids
#

i know redstone has thousands

#

noteblocks have a few hundred

gentle yacht
#

heres the block palette for 1.15

#

and you can maybe get a better idea of how they're stored dlg

sullen dome
compact haven
#

oh tf

wraith rapids
#

basically, every possible combination of each attribute is precomputed and assigned a number

gentle yacht
#

hmmnm

#

there was about 8xxx blockstates

compact haven
#

I see, I thought they would store a few bytes for the block id then afew for the state

gentle yacht
#

the only difference that tile entities have is that they also get an additional NBTTagCompound to store in the mca files

#

but thats really it

compact haven
#

but if its precomputed then having any extra data thats not locked is impossible

eternal night
#

yea

wraith rapids
#

block state can only hold different combinations of predefined data

#

block data can hold arbitrary data in the form of nbt

gentle yacht
#

you can add extra block states to the block palette if you want, but they need to have the existing id of a vanilla blockstate otherwise they dont appear on the client

wraith rapids
#

annoyingly enough, bukkit calls block state blockdata, and block data blockstate

compact haven
#

lmao

eternal night
#

might just add a block type that contains block state that only references a single integer

wraith rapids
#

yeah, that seems like a relatively sensible approach

eternal night
#

which is mapped on the client side to the respective model

wraith rapids
#

using tile entities for it would have a bit too much overhead i'd wager

gentle yacht
#

it would be fine if the server sent the client the list of blockstates and their ids

eternal night
#

Yeah you wouldn't want them ticked by default

gentle yacht
#

so that the server could add additional numbers

wraith rapids
#

i mean, the additional numbers would just be loaded from the resourcepack

compact haven
gentle yacht
#

and different states

wraith rapids
#

it'd limit you to only having 2^32 different custom block states

eternal night
#

I don't think mojang would actually implement a registry sync for the available block types banana

wraith rapids
#

but the same limit is in place with the model ids for items

compact haven
#

well theres always a limit

gentle yacht
compact haven
#

usually its an integer

wraith rapids
#

it'd be more feasible to hardcode the client to treat a specific range of block states as things to be loaded from the resourcepack if present

#

and then assign that range to a specific block

eternal night
#

I mean, a fully dynamic approach seems problematic because the server would also have to send assets for it else a missing resource pack might explode

#

and at that point you are in mod land

compact haven
#

nah

eternal night
#

which like, mc java doesn't care about

#

because why

gentle yacht
#

no, the resource pack doesnt have to be synced

#

it would just show a missing texture if it wasn't in the pack

eternal night
#

oh yay we are in garrys mod hell

compact haven
#

perhaps there could be a NewBlockState packet, that has the new block state id, then another id representing a state already in the game, which would be the texture & model if a resource pack doesnt override it?

gentle yacht
#

its moderately possible, if they chose to do it

#

the sending of the registry

eternal night
#

It definitely would be yes xD

#

just work that they are probably not going to ever focus on

#

a single block with custom state seems easier

#

like, same with custom model data

wraith rapids
#

like, we're already kind of doing the whole "hardcode the client to treat a specific range of blockstates to be loaded from the resourcepack" thing

#

we just don't have a dedicated block for it

compact haven
#

though the registry would practically have to be locked on world generation, since if u start replacing and adding block states it'll cause problems with already added blocks

wraith rapids
#

so we're using noteblocks and mushroom blocks

compact haven
#

NNY

#

idrk what to call you but

#

is that possible with a resource pack predicate?

wraith rapids
#

having a disposable range of a few thousand states that wouldn't be used in vanilla normally would pretty much solve the whole issue

#

yes yes you can do whatever

gentle yacht
#

yes dlg

eternal night
#

tbf a single blockwith custom "model" blockstate might still have its issues regarding hitboxs

compact haven
#

yeah they could just whitelist 0 to like x and then every minecraft block would start from there :(

wraith rapids
#

depends on how thorough the support is

#

i don't think we can change block models currently, even for specific block states

gentle yacht
#

you can replace any state in the list i sent with 1 custom block model

wraith rapids
#

that'd have to be possible for it to work

eternal night
#

actually no, that wouldn't even be an issue

#

there are already blocks that change hitbox based on blockstate

wraith rapids
#

yeah there are

eternal night
#

e.g stairs

wraith rapids
#

but idk if resourcepacks support modifying them

#

at present, anyway

#

i know for sure we can change the texture of a blockstate, not so sure bout the model

#

i'm not really a resourcepack guy

eternal night
#

I don't think they can right now 😭

wraith rapids
#

but, since items already support custom models, it shouldn't be too difficult to implement for blockstates either

compact haven
#

imagine if minecraft was open source

eternal night
#

imagine how many trash version of minecraft would be around

#

xD

#

ngl, the deobf maps are good enough imo

#

also depending on a modified client seems like a big hurdle for servers

sharp bough
#

why does it create the config file name as Main?

#

instead of the name of the jar

#

and when i try to enable it with pm

wraith rapids
#

i don't know, let me get my crystal ball

sharp bough
#

it doesnt work with the name i want

#

but it works with the name Main

wraith rapids
#

🔮 the crystal ball says... you're doing something wrong

sharp bough
#

that was funny

#

and i laughed

#

but could you tell me if i did something wrong?

wraith rapids
#

i can't tell if you did something wrong

#

because i haven't seen a single line of code

sharp bough
#

i sent the pom

wraith rapids
#

pom is not code

sharp bough
#

isint there the name of the plugin

#

idk what to send

wraith rapids
#

pom does not cause this issue

#

send your code

sharp bough
wraith rapids
#

getServer().getConsoleSender().sendMessage
don't use this for logging

#

the config file should be called config.yml

sharp bough
#

yes thats not the problem

wraith rapids
#

then what is the problem

sharp bough
#

the file containing the config file is

wraith rapids
#

the directory?

#

the plugin directory?

cedar hamlet
#

sorry to bother again, but this time i want to see if a player has an item with a custom name (Grey name, "Ammo Box"), i have
if(p.getInventory().containsAtLeast(new ItemStack(Material.CHEST), 1)){
Which just finds if they have a chest, how do i check the chest's name?

wraith rapids
#

that is controlled by the value in plugin.yml

#

your plugin's name

#

don't check against name

#

write a tag in the persistent data container of the itemstack

#

to mark it as an ammo box

#

then check for that

#

relying on item names is old fashioned, performs poorly, and is error prone

cedar hamlet
#

ah i see

#

i'm still not too familiar on how to do a pdc

wraith rapids
#

an item's pdc is accessible through the ItemMeta

cedar hamlet
#

ok

wraith rapids
#

create a namespacedkey along the lines of yourplugin:item-type of type PersistentDataType.STRING

#

and then save the item type, f.e "ammo_box" on the pdc

#

pdc.set(key, PersistentDataType.STRING, "ammo_box")

#

then you can check whether an item is an ammo box by doing pdc.get(key, PersistentDataType.STRING) and comparing to "ammo_box"

cedar hamlet
#

ight

#

ty

sharp bough
#

also could you tell me why whenever i make a change in the config file it resets to the default?
is it because of the config.options().copyDefaults(true); in the AddDefaults ?

#

this.saveDefaultConfig();
new AddDefaults().add();
saveConfig();

wraith rapids
#

define change

sharp bough
wraith rapids
#

yeah don't do that

#

the only thing you need is saveDefaultConfig

sharp bough
wraith rapids
#

defaults are already read from your bundled config.yml

#

just call saveDefaultConfig and nothing else on startup and you're fine

sharp bough
#

but do i add this after the defaults? config.options().copyDefaults(true);

#

cuz now theres nothing on the config file

#
        this.saveDefaultConfig();```
eternal oxide
#

if you make changes you save teh config not the default

wraith rapids
#

don't copy defaults

#

you don't need to copy defaults

sharp bough
#

but now theres no info

#

the config file is empty

granite stirrup
#

BRO how the fuck does microsoft store use more cpu than google XD

wraith rapids
#

it's probably fucking electron

#

everything is electron these days

#

i'm sure windows 10 will be rewritten on electron eventually

granite stirrup
#

XD

#

discord ptb used alot to

#

it was like 30%

#

XD

wraith rapids
#

pisscord is trash

granite stirrup
#

taskmanager when it starts up it uses 10% cpu

#

oh shit it just used 25% now for like 2 seconds

#

XD

sharp bough
#

doesnt the saveDefaultConfig save the raw data to the config file? so if i add the defaults the saveDefaultConfig should add all of that data to the config file

wraith rapids
#

no

#

savedefaultconfig yanks your config.yml out of your plugin jar

sharp bough
#

now the weird part is, the data is there and i can work with it inside the server, but it doesnt show

wraith rapids
#

and writes it to disk

#

it doesn't deal with any defaults you set programmatically

granite stirrup
wraith rapids
#

saveconfig saves the in-memory config object that you may have modified

#

savedefaultconfig extracts and saves the config.yml file that is in your jar

#

which is why the former kills comments and the latter doesn't; the latter doesn't actually touch any config parsing shit anywhere

#

it just copies a file

eternal oxide
#

savedefault only copies the jar config and saves to file if there is no file there alread

wraith rapids
#

it's functionally equivalent to saveResource("config.yml", false)

sharp bough
#

but if i do something it adds it

eternal oxide
#

savedefaultconfig and config.save are two different things

granite stirrup
#

have u set the defaults up in the config.yml file in ur plugin

sharp bough
#

so anything i add as a default doesnt show

wraith rapids
#

if you want to specify your config and its defaults programmatically, use a better config api/framework

#

you can probably get it to work with the bukkit config api too but i wouldn't recommend it