#help-development

1 messages Β· Page 1738 of 1

sharp bough
#

are you talking about an api?

burnt current
#

Then how can you put a helmet on mobs that were created like this? How to do it when mobs are created normally is known to me. but not if i create a mob like that:

public class Soldat extends EntityZombie {

    public Soldat(Location loc) {
        super(EntityTypes.ZOMBIE, ((CraftWorld) loc.getWorld()).getHandle());
        this.setPosition(loc.getX(), loc.getY(), loc.getZ());
solid cargo
#

are there any good API's that simplify banning stuff?

quaint mantle
solid cargo
#

s t u f f. no but seriously, a good api that manages bans

quaint mantle
#

like items or players

#

or dupes

solid cargo
#

players

quaint mantle
#

ah

solid cargo
#

punishment api

viscid ember
#

Hello i am in need of some help with config files.

quaint mantle
crimson terrace
viscid ember
#

i dont knwo how to explain it through text tho...

quaint mantle
viscid ember
#

🀣

crimson terrace
#

just try

quaint mantle
serene rampart
#

how can i block players that they cannot switch the items in the 0ffhand?

solid cargo
#

either outdated stuff or straight up a plugin

serene rampart
#

thx

regal moat
#

Guys

#

player.spigot().sendMessage() is not working for my friend

#

it works fine for me

#

but not for my friend

#

he has lunar client

#

uhh

#

send a message

#

when a certain discord command is triggered

#

its ok with that part

#

it works for me

#

yeah

#

i know

#

i use components

#
                    TextComponent extra = new TextComponent(generatedString);
                    extra.setColor(ChatColor.WHITE);
                    extra.setBold(true);
                    extra.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Click me to copy!").create()));
                    extra.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD, generatedString));

                    message.addExtra(extra);

                    p.spigot().sendMessage(message);```
#

so?

#

the message

#

is not

#

getting sent

#

he is on lunar client

#

and i am on vanilla

#

i also got another friend on vanilla to test

#

it worked for them

#

i know its getting triggered

#

because i am sending a message

#

to the discord server

#

via a bot

#

when that happens

#

?paste

undone axleBOT
regal moat
#

this is the whole

#

code

#

umm

#

the problem

#

isnt about jda

#

i would have

#

posted in the jda discord server

#

if it was

#

i am not an idiot, so please.

regal moat
quaint mantle
#

Anyone knows how to add cooldown to a command?

regal moat
#

I did some debugging, the player name gets printed before and after printing

#

it works...

#

just need to know

#

why the hell

#

the message

#

is not getting sent to the player

#

that exact message is not getting sent

#

others are

eternal oxide
#

that says getOwningPlayer does not accept a String

#

hover over it and see what the error says

#

is this skullMeta?

#

then it takes no parameter

#

exactly. It takes no args

#

the skullMeta already has an owner

#

you either set teh owner, or you get the owner

#

thats wrong

#

there will be no owner as you havn't set one

#

setOwningPlayer(OfflinePlayer)

dark spindle
#

what the best anti cheat for spigot

#

free

regal moat
#

Why doesn't

#

EntityZombie

#

and all

#

exist in Spigot 1.17.1

#

net.minecraft.world.entity.Entity does exist thogh

alpine urchin
dark spindle
#

which is

regal moat
#

How can I make a custom entity in 1.17.1 NMS

lavish wave
#

So, I have an API and made a Test Plugin for it. But now I want to add commands, when my API Plugin is started. It can send over methods things to the API. It executes the method, but how can I add commands by code?

gleaming pond
#

how do i completely seize someones ability to move in spigot 1.16.5?

eternal oxide
#

cancel PlayerMoveEvent if x/y/z change

gleaming pond
#

?

#

what

#
    public void OnPlayerMove(PlayerMoveEvent e) {
        if (FrozenPlayers.containsKey(e.getPlayer())) {
            e.setCancelled(true);
        }
    }```
#

that won't work for me

#

if that's what your trying to suggest

eternal oxide
#

yes it will

young knoll
#

Why is frozen players a map

#

And why is it using the player instance

gleaming pond
#

oh

#

it's a freeze command

young knoll
#

Also you can alternatively set their walk speed to 0 and give them jump boost > 128

eternal oxide
#

store players UUID

#

not Player

young knoll
#

and just use a set

eternal oxide
#

and you only need a Set

gleaming pond
#

but then

#

public HashMap<Player, Location> FrozenPlayers = new HashMap<>();

#

what would the player be

#

UUID?

#

or

#

UniquePlayerID

young knoll
#

UUID is the type

eternal oxide
#

if (frozen.contains(e.getPlayer().getUniqueId()) { check getFrom() and getTo() }

quaint mantle
young knoll
#

I prefer the walk speed method because it isn’t as jumpy

#

Sure, but you gotta clear them on disconnect

#

And there is no need in this case

quaint mantle
#

true

gleaming pond
#

wait

#

would it be containsvalue or containskey?

#

containskey right?

eternal oxide
#

neither on a Set

young knoll
#

Just contains

gleaming pond
#

no

#

that's giving errors

#
            e.getPlayer().setWalkSpeed(0);

        }```
eternal oxide
#

then you havn't changed it to a Set

gleaming pond
#

that's giving errors

gleaming pond
eternal oxide
#

change yoru Map to a Set

#

Set<UUID>

gleaming pond
#

wdym?

eternal oxide
#

Set<UUID> frozenPlayers = new HashSet<>();

gleaming pond
#

how do you put then?

#

in sets

eternal oxide
#

you store the players UUID

gleaming pond
#

i know

#

but how?

#

FrozenPlayers.put(target.getUniqueId());

eternal oxide
#

java

gleaming pond
#

isn't correct

lavish wave
#

Hello?

#

So, I have an API and made a Test Plugin for it. But now I want to add commands, when my API Plugin is started. It can send over methods things to the API. It executes the method, but how can I add commands by code?

young knoll
#

getOfflinePlayer or getPlayer

lavish wave
#

Can someone please answer me?

lost matrix
lavish wave
#

I want to make it over code, not manually

lost matrix
young knoll
#

Look into command frameworks

#

You need to reflect into the commandmap otherwise

lavish wave
gleaming pond
#

how do i add a potion effect without effect particles

#

like removing the visual particles

lost matrix
gleaming pond
#

e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000000, 128),true);

#

wait is it that one

#

at the end

young knoll
#

true, false

gleaming pond
#

the , true

young knoll
#

Also they go inside the brackets

#

e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000000, 128, true, false)

prime reef
#

quick question

gleaming pond
#

e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1000000, 128, true));

#

kk

prime reef
#
egg: true```
if I were to `getConfigurationSection("egg")` on this file configuration, would that actually give me back a configurationsection?
#

even an empty one

lost matrix
prime reef
#

hate that you can't do this in java lmao

#

oh you can, but you have to declare the variable beforehand

young knoll
#

You'll want both booleans

prime reef
#

what?

lost matrix
prime reef
gleaming pond
#

how do i set maxwalking speed spigot

lost matrix
gleaming pond
#

yh

prime reef
barren nacelle
prime reef
#

and then if none of that works, writing the object's value to config instead

#

i've already got the code in place, it's just old and i'm trying to clean it up because it's hideous

#

tl;dr if those "ofnullable"s could chain that'd be great

#

actually nvm, I have an idea

regal moat
#

?paste

undone axleBOT
lost matrix
gleaming pond
#

how do i set maxwalking speed spigot

prime reef
#

let me think about this for a sec

lost matrix
#

You can let Jackson serialize objects into yml

prime reef
#

hold up, lemme take a look at Jackson and see how it works

#

i've only used it for xml

#

if I can serialize things according to my own definitions then great

lost matrix
#

And moved-too-quickly-multiplier

rugged topaz
#

is it possible to add an entirely new item with its own texture in 1.17 rather than replacing the texture of an already existing item?

prime reef
#

you cannot add new items to the game

#

but you can effectively do so by modifying an item's nbt and attributes

#

for example, every weapon in my plugin is actually just a stick.

lost matrix
prime reef
#

but players won't know this unless they have debug mode on

rugged topaz
#

and this existed after what version?

lost matrix
lost matrix
prime reef
#

I'll be honest, I really just want to use JSON for my configs lmao

#

shame spigot's stuck on yml

rugged topaz
#

thanks for lmk, ill look into it

lost matrix
prime reef
#

default config.yml can eat an egg

lost matrix
prime reef
#

i dislike that yml types objects for some reason. let me read and interpret everything as either a string, array of strings, or dictionary of strings/arrays

#

i need consistent behavior lmao

#

I will handle the conversions

#

here

barren nacelle
prime reef
#

what are you trying?

barren nacelle
lost matrix
# barren nacelle I tried this but that does not work in an if statement

I dont know what that means but this works:

  @EventHandler
  public void onEat(final PlayerItemConsumeEvent event) {
    final Player player = event.getPlayer();
    final ItemStack eatenItem = event.getItem();
    final Material material = eatenItem.getType();
    
    if (material == Material.COOKED_BEEF) {
      player.sendMessage("You have eaten cooked beef.");
    } else if (material == Material.COOKED_CHICKEN) {
      player.sendMessage("You have eaten cooked chicken.");
    }
  }
prime reef
#

as in, what are you writing in your if statement?

lost matrix
# barren nacelle I tried this but that does not work in an if statement

Btw this would be the propper approach:

  private static final Set<Material> CARNIVORE_FOOD = EnumSet.of(
      Material.COOKED_BEEF,
      Material.COOKED_CHICKEN,
      Material.COOKED_COD,
      Material.COOKED_MUTTON,
      Material.COOKED_RABBIT,
      Material.BEEF
      ... and so on
  );

  private boolean isVegan(final ItemStack foodItem) {
    return foodItem != null && !CARNIVORE_FOOD.contains(foodItem.getType());
  }

  private void punishVeganPlayer(final Player player) {
    final PotionEffect effect = new PotionEffect(PotionEffectType.WITHER, 10000, 10000);
    player.addPotionEffect(effect);
    player.sendMessage("Β§cYou are a Vegan!");
  }

  @EventHandler
  public void onEat(final PlayerItemConsumeEvent event) {
    final Player player = event.getPlayer();
    final ItemStack eatenItem = event.getItem();

    if (this.isVegan(eatenItem)) {
      this.punishVeganPlayer(player);
    }
  }

You should split your code into meaningfully named smaller methods.

#

This way your code gets really readable

young knoll
#

Thanks for reminding me to switch those to enum sets

worldly ingot
#

Yay for efficient bitvector sets PES_Hypers

ashen agate
#

is it possible for all entities to open doors if you add the opendoor pathfinder goal? Cuz I've added it to a Stray but it ain't opening the door.

lost matrix
#

No

#

Yes. Yes its possible. I think.

ashen agate
#

How bruh cuz it won't open the door

#

but it's ticking the goal..

lost matrix
ashen agate
#

add version: 1.0.0 to ur plugin.yml

lost matrix
#

You are trying to get a value from a Map that is not present

ashen agate
lost matrix
#

Ah i see and version is missing the the plugin.yml

ashen agate
#

priority seems to be right? igues

gleaming pond
#

How

#

do

#

i make

#

it list all the args?

#

im making a staffchat

#

so /sc e e e

#

would send

#

e e e

stone sinew
#

Stop spamming for 1

gleaming pond
#

or whatever

stone sinew
#

And second. Use a string builder.

echo basalt
#

String.join(" ", args)

lost matrix
lost matrix
# ashen agate

You are creating an anonymous instance of OpenDoorGoal. Cant you just look at the villager entity to see how they init their goals?

ashen agate
#

they're using brains instead of goals

#

but I guess ye

prime reef
#

@lost matrix I am both grateful and immensely frustrated that you reminded me that Jackson exists.

#

grateful because it'll make things so much easier for me in the long run (including storing player data as SQL, since JSON becomes strings more cleanly than YAML), but frustrated because I have a lot of code to rewrite LOL

#

I think what I might do to save myself a headache is just save the API structure and delete the actual logic in the methods so nothing changes on the surface but I also don't have the mental clutter of existing code

lost matrix
#

If you want to convert into json then i would recommend Gson over Jackson. I find the custom serialisation of Gson superior.
Jackson is better for yml and enterprise stuff.

regal moat
#

i am confused on nms pathfinding

#

in 1.17.1 nms

ashen agate
#

how so

#

also love the mapped version of 1.17 with actual readable nms ay

prime reef
prime reef
#

i require it

#

what did they do?

ashen agate
#

download the buildtool

regal moat
#

i am still confused

prime reef
#

i am downloading the buildtool

regal moat
#

i set nms up

#

i dont know

#

how to use it

prime reef
#

please...please tell me I don't have to update obfuscated shit with each version...

ashen agate
#

you do have to remap (reobfuscate) it

#

but it's pretty easy

prime reef
#

misery

ashen agate
#

at least if you use maven

#

idk about other things

prime reef
#

i try to avoid using nms as much as possible for this reason

#

and I do use maven

#

imagine not using dependency management in 2021 πŸ˜”

regal moat
acoustic pendant
#

Hey, i have a question about placeholder, here the %% would be %plugin_maxHealth% %mainclass__maxHealth% or just %maxHealth% ?

    public String onPlaceholderRequest(Player player, @NotNull String params) {
        if (player == null) {
            return "";
        }

        if (params.equals("maxHealth")) {
            AttributeInstance maxHealth = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);

        }
        return null;
    }```
ashen agate
#

but like Gradle works differently so

ashen agate
regal moat
ashen agate
#

waitt

ashen agate
#

java -jar BuildTools.jar --rev 1.17.1 -mapped execute this with the buildtools

acoustic pendant
#

and that thing will return me the max_health of a player?

ashen agate
solid cargo
#

still hunting for a good method/api that manages your punishments.

ashen agate
#

litebans?

quasi flint
#

litebeans

ashen agate
acoustic pendant
#

wait, is it necessary for a own plugin?

#

placeholder?

ashen agate
#

confusion

solid cargo
ashen agate
solid cargo
#

litebans is a p l u g i n

acoustic pendant
ashen agate
solid cargo
#

pretty sure it doesnt

ashen agate
solid cargo
#

wait

acoustic pendant
ashen agate
acoustic pendant
#

for public plugins ig

#

and config right?

ashen agate
acoustic pendant
#

but if i'm creating a plugin for my use, is it necessary?

#

for example, to put a string from other class to the actionbar

lost matrix
acoustic pendant
#

wdym

lost matrix
#

If you do everything yourself then you dont need papi

acoustic pendant
#

in a server?

ashen agate
#

it really depends where you want to display the data

#

imagine you want to have your plugin's data on a HolographicDisplays hologram, you'll need to add a PAPI placeholder in order to display the data

acoustic pendant
#

no, the action bar is from my plugin as well

#

so i don't need it

#

ok thanks!

lost matrix
#

Example:
You have a hologram plugin which supports papi and you want your
data in those holograms then papi is a quick way to get that working.
But if you have your own holograms then its def better, performance
and flexibility wise, to just design proper APIs and distribute your data
between your plugins.

acoustic pendant
#

ok, Ty!

ashen agate
#

what mobs besides villagers can open doors?

lost matrix
#

Zombies πŸ˜„ kind of

#

Depends how far you stretch the meaning of "open"

ashen agate
#

open/break same thing imo

#

as long as the entity goes through im happy

quiet ice
#

Then vex may fall under this

quasi flint
#

Wither

ashen agate
#

I don't mean they should actually leap through the door lol

lost matrix
#

Enderdragon...

ashen agate
#

they should still open it first before entering

quasi flint
#

When u get that near Ur house

#

U have done smth very wrong

solid cargo
echo basalt
#

so it's

%identifier_params%

calm whale
#

Hello, I would like to know if there is a way to remove players cursors from a map except the map's holder cursor ?

echo basalt
#

uh

#

make a map copy and remove all other cursors

worldly ingot
#

Case in point,

#

"There is no need for an API"

#

"Just execute commands"

echo basalt
#

Lmao

#

singletons for EVERYTHING

#

It's not really an API, you gotta write your own SQL queries

#

The API is just a mysql connection getter

worldly ingot
#

It's horrible, yeah

echo basalt
#

So if they add future mongodb support, everyone's fucked

worldly ingot
#

Just that nobody's made a decent replacement for LiteBans

echo basalt
#

great job πŸ‘

ashen agate
echo basalt
#

I could make a litebans replacement except without the web gui stuff

#

But it'd be extremely overengineered and like a year into development

#

And I just can't bother

worldly ingot
#

Precisely why nobody's done it lol

#

You'd have to compete with Litebans

echo basalt
#

Yeah

#

If I'd make a litebans clone it'd be hell

#

"Illusion's ban plugin, has mysql, mongodb, sqlite, .yml, proprietary extension, all as configurable databases, if you're going multi-proxy, use redis or rabbitmq, works on spigot, bungee, velocity, minestom, glowstone and more!"

quaint mantle
#

what even is litebasn

#

i just use essentials

echo basalt
#

and then people will just say "doesn't have web gui, not buying"

echo basalt
quaint mantle
#

its only unique feature is the web gui

worldly ingot
#

LiteBans is the go-to ban plugin

#

Used on a majority of servers if they don't write their own

quaint mantle
#

i wonder if the bukkit command api is slow

#

im sure its 50x faster actually implementing an api

quaint mantle
echo basalt
#

spigot is written on top of craftbukkit, written on top of bukkit and NMS

#

I believe

#

The amount of layers make it possible that the command system is slow

#

Imagine if spigot allowed you to disable major functions of it πŸ€”

worldly ingot
#

It's not a matter of speed, it's a matter of "Don't hi-jack the command system as a plugin API"

echo basalt
#

Just having a lobby server with no achievement system, everyone is set to adventure so block breaking is not tracked

#

items would not be ticked, worlds wouldn't need to recalc light all the time πŸ€”

vagrant stratus
#

Maybe I should compete with litebans πŸ‘€

echo basalt
#

πŸ‘€

#

Joint ban plugin development, split revenue

quaint mantle
#

prove me wrong

#

πŸ˜΅β€πŸ’«

#

wrong emoji

quaint mantle
vague oracle
#

I think the biggest feature that litebans misses is incremental ban lengths without having to specific the time yourself

echo basalt
#

Players can get banned for different reasons, so maybe a preset ban message depending on a list of configurable reasons

lost matrix
vague oracle
#

Lol

ashen agate
prime reef
#

i realized earlier that i'd accidentally recreated json for yml on a smaller scale and i hate myself

calm whale
#

Hey, does any one know how to hide players cursors from map render except the holder's one ?

undone axleBOT
fringe hemlock
#

What version is this made for?

fringe hemlock
#

From what I just tested

ItemStack item = new ItemStack(Material.PLAYER_HEAD);
SkullMeta meta = (SkullMeta) item.getItemMeta();
OfflinePlayer pl = Bukkit.getOfflinePlayer("IDK");
meta.setOwningPlayer(pl);
item.setItemMeta(meta);

this worked for me

prime reef
#

spigot still doesn't allow any kind of licensing system for plugins, do they

barren nacelle
barren nacelle
lavish hemlock
#

Oh hey fun fact about EnumSet!

#

There's two implementations of it internally.

#

RegularEnumSet, which stores enums as a long and can only keep 64 enum values.

quaint mantle
#

i dont think veganism will ever cause a lack of produce

#

im never eating leaves for my entire life

lavish hemlock
#

And then JumboEnumSet, which stores enums as a long[], and can keep way more than 64 values.

paper geode
#

eating less meat is a good thing for both the environment and your body

lavish hemlock
#

Chances of you having a JumboEnumSet are slim though, since it automatically selects either of the two depending on how many enums you configure for that set.

#

And... most people don't have more than 64 enum constants lol.

quaint mantle
#

😎

paper geode
#

πŸ˜‹

#

raw chicken is better

quaint mantle
#

Warning: Poisoning effect

paper geode
#

i do not care either

#

i eat what i feel like eating

lavish hemlock
#
  1. The environment is already dying because of everyone else, me deciding not to eat a hamburger will not fix that.
  2. I like meat :p (yes homo)
paper geode
#

and when i cant eat what i want, i go for the 2nd best thing

#

a good burger is a good burger

lavish hemlock
#

Also, meat is much more natural than shit like protein shakes if we wanna get real.

paper geode
#

protein shake burgir

lavish hemlock
#

The world was designed as a wasteland where things eat each other all day.

paper geode
#

frozen protein shake as the beef

lavish hemlock
#

This is why forcing your pets into veganism should be considered a form of animal abuse.

paper geode
#

yep

young knoll
#

Depends on the pet

#

Perfectly reasonable for a rabbit

lavish hemlock
#

I mean yeah but the connotation is that we're talking about carnivores.

paper geode
#

ill make my parrot eat a 5 star steak

quaint mantle
#

i feed my cat birds that landed in my yard (cleaned ofc)

paper geode
#

you cant stop me

quaint mantle
subtle kite
#

own chickens ?

quaint mantle
#

good point

subtle kite
#

does that help with anything?

paper geode
#

their brains are too small to remember what they eat

#

kek

lavish hemlock
#

Nahh, animals have decent memory.

quaint mantle
paper geode
#

tearing your skin apart is a choice

lavish hemlock
#

That is true.

paper geode
#

a wise choice

lavish hemlock
#

Also, I believe the whole "memory of a goldfish" thing is actually untrue.

paper geode
#

the goldfishes could just be trolling science

quaint mantle
#

the rats are lieing

lavish hemlock
#

Damn, y'know if I were a goldfish I'd totally fuckin' do that.

paper geode
#

decided to not follow instructions

lavish hemlock
quaint mantle
#

Im gonna find you

#

and tear your limbs apart

paper geode
#

ill steal your frontal lobe and feed it to a turtle

#

πŸ”«

quaint mantle
#
pass # pass? nah.

def on_move(self) -> None:
    0
quasi patrol
#

Confuses my brain cells for waits in a for loop.

waxen plinth
#

It's a block string

#

You can split it across multiple lines

quaint mantle
#

I didnt ask

waxen plinth
#

It's quite stupid that you add docs to a function by just putting a string on the first line of it

quaint mantle
#

Im sorry redempt.

waxen plinth
#

I thought you were posting them to point out how one errored and the other didn't

#

So I was explaining why that happens

quaint mantle
#

yes it dumb

quasi patrol
waxen plinth
#

What's your use case?

#

You should basically never be waiting

#

You should be using the scheduler

quasi patrol
#

Waiting in general not using the wait function…

echo basalt
#

Waits in a for loop are only acceptable if you're doing it async on crucial timing

#

outside of minecraft

young knoll
undone axleBOT
young knoll
#

Keep in mind Minecraft runs on intervals of 50ms

echo basalt
#

not always

young knoll
#

Well, ideally

#

If it is lagging it may run slower, and if it is trying to catch up it man run slightly faster

viscid ember
#

I am making a plugin which once a "crop" is placed it spawns in two Armor stands on the position of that Armor stand a "Name" and "Progress" Armor stand I tried storing these in both hashmaps and config files but A) I cant find a way to store hashmap before a server reload then import it back in B) Configs are a mess and iterating through thousands of placed crops would be very bad

#

any recommendations on what i could do?

#

I have been suggested i should use a DataBase but no clue on how i would go about doing so

vocal cloud
viscid ember
#

@vocal cloud Any recommended tutorials?

vocal cloud
#

That's for lite but you can use the knowledge elsewhere

viscid ember
#

noted

#

thousands of mysql tutorials ill check those out too

#

Does MySql or any other type of database work like a dependency?

opal sluice
#

Hello, is there a way to remove the actual life bar of a rided entity ? (NPC to be exact)

viscid ember
#

@opal sluice what do you mean by that? as in if youre riding the Entity the hearts do not show?

opal sluice
#

The entity's hearts yes

#

I would like to remove that one

viscid ember
#

id say try set mob health to 0 but

#

that would just kill it

opal sluice
#

I guess so ^^'

viscid ember
#

try it maybe it just works

#

nothing ever just works but yh πŸ˜…

opal sluice
#

ahah, I'll give it a shot, rq

vocal cloud
#

A custom texture pack could albeit that's not through plugins

viscid ember
#

^^^

opal sluice
#

Yeah, but that would remove it from any entity

viscid ember
#

if nothing works texture pack is your best bet

opal sluice
#

So not really a solution ^^'

#

if you also have an idea on how to put an EntityPlayer invisible that would also be helpful (already tried to get the bukkit entity and make it invisible)

#

And, setHealth() doesn't seem to work on an EntityPlayer also πŸ₯²

sage pine
#

Hey guys! I am looking for some guidance- I am interviewing some developers and I have no prior experience or in-depth understanding of development. I have drafted some questions to ask during an interview, and I want to know if there is anything else I should cover or ask.

If you're an experienced developer and can help me out, please give me a DM so I can show the questions. Thanks a lot, I really appreciate it!

undone axleBOT
quaint mantle
#

wait

#

you want to ask?

sage pine
#

no, not services haha

quaint mantle
#

just ask here

sage pine
#

I just don't like to publicly display my interview questions

#

I'd prefer to do it 1-on-1

quaint mantle
#

most of the time people dont want to do some dm tho...

sage pine
#

I understand that, that is why you guys have the option to DM me

#

Nobody is forced πŸ€·β€β™‚οΈ

quaint mantle
#

lel

#

just a suggestion

sage pine
#

No problem

ornate rapids
#

how can i Fix collisions false flag Β« speed Prediction Β» on my anticheat?

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. Create a thread in case the help channel you are using is already in use!

quaint mantle
#

Is it possible to "redirect" a player to a link? Like what happens if you were to click one in chat

latent dove
#

its shows a warning

drowsy helm
last ledge
#
                if (gui.getItem(i) == null) {
                    gui.setItem(i, Material.BLACK_STAINED_GLASS_PANE);
                }
            }```
#

error: incompatible types: org.bukkit.Material cannot be converted to org.bukkit.inventory.ItemStack

drowsy helm
#

you are setting an ItemStack as a Material

last ledge
#

what to do then

drowsy helm
#

make it into an ItemStack

#

new ItemStack(Material.BLACK_STAINED_GLASS_PANE)

last ledge
#

ItemStack Black = new ItemStack(Material.BLACK_STAINED_GLASS_PANE);

#

i already defined this too

drowsy helm
#

use it then

#

you arent passing it

last ledge
#

worked

young knoll
#

Also the variable should be lowerCamelCase

remote gazelle
#

is there anyone who can help me code player data with morphia?
i have been always using mysql so i need some help please

quaint mantle
alpine urchin
#

?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. Create a thread in case the help channel you are using is already in use!

latent dove
#

?arse

#

oh no

remote gazelle
#

?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. Create a thread in case the help channel you are using is already in use!

remote gazelle
#

ok

quaint mantle
#

does getInventory.getTitle exist in 1.17.1?

#

Why don't you check?

#

Well Im wondering the replacement if it doesnt

#

because if it does im not able to use it

#

well, check if it exists or not :)

quaint mantle
#

Well, if you try , you'll understand

#

Oh interesting

#

It was replaced with getView

#

No, get view returns InventoryView

#

Not title

#

Yiu can use getView().getTittle()

vagrant stratus
#

For 1.17.1, you just == the inventories

quaint mantle
#

Ya

vagrant stratus
#

The InventoryView was never meant to be for what you need

quaint mantle
#

Thanks

young knoll
#

Or you can compare views

#

That’s the choco approved wayℒ️

quaint mantle
#

so in theory


if (e.getView().getTitle().equals(ChatColor.stripColor(config.getString("string")))) {
  //do something
}
``` should work?
candid galleon
#

The InventoryView was never meant to be for what you need

quaint mantle
#

Well what am I todo then?

ivory sleet
#

I just use InventoryHolders which works fine πŸ˜…

vagrant stratus
#

It's not a supported feature, proper way would be == or .equals with an Inventory object

quaint mantle
#

thats interesting

young knoll
#

.equals with an inventory view works too

#

But the title isn’t recommended

quaint mantle
#

never thought that would work

#

I learned something new today

#

I mean i do every day but

sullen marlin
#

that wouldnt work

candid galleon
#

that won't work

sullen marlin
#

lol

latent dove
quaint mantle
#

Oh

#

Well

#

Then

#

Lmfao

#

I was right

latent dove
#

the potential

#

my man was looking for a string in an inventory object

quaint mantle
#

Listen I got confused ok

latent dove
#

i also do that too

#

sometimes

#

but i hide it

quaint mantle
#

Id rather know im wrong

#

lmao

#

Anyway

#

back to "development"

#

thats how it should beℒ️

#

At least thats what ive seen everywhere else

young knoll
#

Yes but it’s bad

#

Because any plugin could have an inventory with the same name

vagrant stratus
#

You'd want something along the lines of

private static final Inventory INVENTORY = ...;

if(playerInventory.equals(INVENTORY)){//codehere}
young knoll
#

Either compare inventories directly

#

Or compare the view from the event with the view returned by OpenInventory

quaint mantle
#

ah okay

vagrant stratus
#

better to just compare directly, i believe even the view method is discouraged

young knoll
#

False

#

It’s encouraged

vagrant stratus
#

Ah, wasn't sure.
Hard to keep track when you don't code plugins much πŸ‘€

young knoll
torn oyster
#

if (!livesConfig.contains(uuid)) {

#

livesconfig is yamlconfiguration

#

and uuid is player's uuid to string

#

it does exist

#

but it still returns true...

plain helm
#

Shouldn’t you remove the !

torn oyster
plain helm
#

Oh

#

Can you send the complete code

torn oyster
#

if (!livesConfig.contains(uuid)) {
livesConfig.set(uuid + ".lives", 3);
livesConfig.set(uuid + ".spectator-time", -1);
}

#

this is joinevent

plain helm
#

Is the file blank?

torn oyster
#

no

plain helm
#

Like before you trigger the join event did you check if the file was blank?

torn oyster
#

no but i won't ever need to

#

this is for a personal smp

#

the file will never be blank again

plain helm
#

If it doesn’t trigger it means that it found the uuid in the file

torn oyster
#

it does trigger

plain helm
#

Oh

#

What’s the problem then?

#

It triggers all the times?

torn oyster
#

i don't want their lives to be set to 3 every time they join

#

its a semi-hardcore smp

candid galleon
#

would that be soft core or hardsoft

torn oyster
#

no idea

plain helm
#

Is livesConfig like a configuration file?

torn oyster
#

yes

#

lol

plain helm
#

Then you should livesConfig.save()

torn oyster
#

i do that

#

after

#

please help me with my issue

plain helm
#

Try if(livesConfig.get().get(uuid+”.lives”)==null)

vagrant stratus
#

mayhaps you needs to make the UUID a string

plain helm
#

He said uuid is already a string

torn oyster
vagrant stratus
#

Ah

#

hm

plain helm
torn oyster
#

it'd return 0

#

but people can be on 0 lives

plain helm
#

If it’ll return null it means there isn’t their uuid on it and will proceed at setting it to 3. The other times there will ne their uuid and so it won’t do anything

#

And it won’t set again their lives to 3

lost matrix
# torn oyster `if (!livesConfig.contains(uuid)) {`

If you have per player data then its often a good idea to maintain one file per player.
If you have one config for all players then you can also just load all data when the server starts
into memory as the FileConfiguration has to be in memory anyways. For scalability reasons per
player files are cleaner.

vagrant stratus
#

or use something like SQLite

torn oyster
#

"lives"

#

and "spectator-time"

#

im not making an individiual files for each player

#

also this is for a personal smp

#

max of 20 unique ppl

torn oyster
lost matrix
# torn oyster there are 2 entries

Then i would def just load all data when the server starts and save all data when the server stops.
And during runtime i would just use a class and never tinker with the config files.

echo saddle
#

hi, dr. don, here, how can i help?

tardy delta
#

Heh

quaint mantle
echo saddle
#

hmm

rugged topaz
#

ik custom models are possible with resource packs, but only to the extent of modifying a current existing block texture. is there any way to do with without losing a vanilla block in spigot or an alternative for packs?

vagrant stratus
#

lol no

#

Unless you go purely modded

acoustic widget
echo saddle
#

well, it depends on buildSpigot, which depends on cleanSpigotBuild

acoustic widget
#
    buildSpigot
}``` this part is called even i just run a task ? if yes but where do you see cleanSpigotBuild depends on buildSpigot ? 
hasSpigot() = true
#

I'm trying to understand where exactly

echo saddle
#

may be this

#

tasks.register('setupWorkspace'){
dependsOn 'buildSpigot'
}

#

but not sure why either

acoustic widget
#

I tried to put a debug in the buildspigot task, nothing comes here

echo saddle
#

or this?

#

tasks.register('prepareDevServer') { dependsOn 'buildSpigot', 'setupDevServer', 'copyPluginToTestserver' }

#

tasks.register('startDevServer', JavaExec) {
dependsOn 'prepareDevServer'

acoustic widget
#

i'm running setupDevServer

echo saddle
#

^

#

depends on setupDevServer

#

prepareDevServer depends on setuoDevServer

#

and startDevServer depends on prepareDevServer

#

tasks.register('buildSpigot', JavaExec) {
if (hasSpigot()) {
enabled = false;
dependsOn = [];
} else {
dependsOn = ['cleanSpigotBuild', 'downloadBuildTool']
}

acoustic widget
#

hmm yeah startDevServer depend on setupDevServer, but only if i call startDevServer right ??

echo saddle
#

task.register, is there suppose be be something after the 'prepareDevServer"

#

like Copy or JavaExec?

latent dove
#

dude are you like 40+

acoustic widget
lavish hemlock
latent dove
#

I mean you legally have to be over 16 to use weed

lavish hemlock
#
  1. Weed was not legal back in 1997.
  2. That stops no one.
latent dove
#

yes

tacit drift
latent dove
#

i wasn't even born in 1994

lavish hemlock
#

Dunno where you got that date from.

latent dove
#

deitz nuts

echo saddle
#

i lose weeks on a daily basis

latent dove
#

i win weeks

lavish hemlock
#

Get a handful of Dietz Nuts.

latent dove
#

impurity since 1546! :D

echo saddle
#

i'm older than ElgarL so be kind

latent dove
#

rae u 50

echo saddle
#

i once lost a week in the 80's

lavish hemlock
#

I've lost an entire day before from sleep deprivation.

echo saddle
#

yes, how did you think you got all these wonderful games?

lavish hemlock
#

HumbleBundle

#

And EGS's weekly giveaway(s)

echo saddle
#

if it were not for folks modding adventure in Basic-80, well...

#

those of us trying to hack Apple Pascal to understand Wizardry: Proving Grounds of the Mad Overlord..

#

those of us, hand coding games in basic from Byte magazine...

latent dove
#

i lost an entire day in a family event

echo saddle
#

I lost a day to inebriation.

vagrant stratus
echo saddle
#

I gained a day flying to Japan.

#

so it washes out

#

but i got inebriated drinking sake so, well

latent dove
#

i lost a day researching how someone has a big nut and has to buy a hoodie for the nut

echo saddle
#

are hoodie nuts a thing? dayum, i'm so far behind.

echo saddle
#

ok, i'mma gonna open an AMA for my old ass.

latent dove
#

remove embed

#

thanks

echo saddle
#

if you want to know how it was back in my day

#

coding and all

latent dove
#

back in my day

#

i wasn't even born

echo saddle
#

back in my day we didn't have sublime, we had edlin

latent dove
#

i use vim

echo saddle
#

poke was something us used to put a byte at a memory location, not to light up others on a game

latent dove
#

also back in my day

#

we had forge

#

not fabric

echo saddle
#

nah, we had nothing like it, java wasn't even a thing

last ledge
#

import com.destroystokyo.paper.event.entity.CreeperIgniteEvent;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDeathEvent;


public class CreeperDeathEvent implements Listener {
    @EventHandler
    public void onDeath(CreeperIgniteEvent event){
        if(event.getEntity() instanceof Creeper){
            Creeper creeper = (Creeper) event.getEntity();
            creeper.getWorld().spawnEntity(creeper.getLocation(), EntityType.ZOMBIE);

        }

    }
}
latent dove
#

did u register

last ledge
#

yes

latent dove
#

show

last ledge
#

getServer().getPluginManager().registerEvents(new CreeperDeathEvent(), this);

echo saddle
#

pascal was the fancy language, although all the big bois programed in c and asm__

#

if not machine language

#

cobol was passe, as well as fortran

#

borland still existed and facebook, google and twitter didn't exist.

latent dove
#

plus if its creeper ignite event

last ledge
latent dove
#

the entity is 100% creeper

last ledge
#

still doesnt work

#

CreeperDeathEvent

echo saddle
#

not to knock the guys writing fortan, ffs, they sent folks to the moon

echo saddle
#

or maybe it was algol

latent dove
last ledge
#

leme see if it works

echo saddle
#

i bet non of you understand how computers actually work

latent dove
#

u got me

echo saddle
#

i mean digitally, electronically

#

on a physics level

last ledge
latent dove
#

if ur doing entitydeathevent

last ledge
#

import com.destroystokyo.paper.event.entity.CreeperIgniteEvent;
import org.bukkit.entity.Creeper;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDeathEvent;


public class CreeperDeathEvent implements Listener {
    @EventHandler
    public void onDeath(EntityDeathEvent event){
        if(event.getEntity() instanceof Creeper){
            Creeper creeper = (Creeper) event.getEntity();
            creeper.getWorld().spawnEntity(creeper.getLocation(), EntityType.ZOMBIE);

        }

    }
}
latent dove
#

oh yes

#

any error

echo saddle
#

pls spoilers

last ledge
#

no error

echo saddle
#

so spawns an zombie in addition to the creeper

#

what of it?

last ledge
#

when creeper dies, it should spawn zombie

echo saddle
#

and?

last ledge
#

i am making Boss Mob

echo saddle
#

should spawn lit tnt

#

that would be impressive

last ledge
#

no lol i will spawn wither skel ig

#

but its not working

#

idk why

#

pls look upon the code and say if there is any errors

echo saddle
#

is creeper.getLocation() null?

last ledge
#

wherever the creeper dies

echo saddle
#

break that out, check it's not null

last ledge
#

it gets the exact location

vague oracle
#

There is no problem with your code, did you check if the plugin is enabled

last ledge
#

yes

#

the plugin is enabled, rest everything is working

quaint mantle
#

hello i have a question
how to controll an entity if you are riding it
for example if setRiding player for ender dragon.
how to controll it

last ledge
#

except this creeper death thing

vague oracle
#

did you add debug code

echo saddle
#

your code is where?

vague oracle
#

if you add debug after the spawn line, then its probably a configuration issue

echo saddle
#

CreeperDeathEvent

last ledge
echo saddle
#

did you register that class?

last ledge
#

yes

echo saddle
#

where's your main code with registering?

vague oracle
#

Get an instance of your plugin in that class and after the spawn line put

plugin.getLogger().log("This code runs, therefore its a problem with either configuration or another listener on the server stopping zombies spawning")
noble lantern
#

Howdy yall what we helping with today

echo saddle
#

please don't make me open my code

last ledge
echo saddle
#

@last ledge you need to register the listener CreeperDeathEven in your main plugin code, is this happening with something like registerEvents(this, CreeperDeathEvent(), plugin);

last ledge
#

i have already registered in main class

#

getServer().getPluginManager().registerEvents(new CreeperDeathEvent(), this);

echo saddle
#

ok, and you are sure it is "hitting" that class, by putting some log messages?

last ledge
#

doing that wait

echo saddle
#

i always find that putting in some debug log messages will help to find where the problem is

#

if you put log code in where the method/function starrts, you know that your are reaching that code

#

put some log messages in on the event to see that the event is fireing

#

this is how we "debug"

last ledge
#

k

echo saddle
#

log mesages are like breakpoints,but we dont' have that luxury

#

just need to logger.log(Level.SEVERE, "Whatever");

#

assuming you have got a static variable to the logger for your plugin

#

just public static Logger logger; in your main

#

and assign logger = plugin.getLogger();

last ledge
#

ok

echo saddle
#

plugin = this in onEnable()

#
    public void onEnable() {
        // logic to be performed when the plugin is enabled
        plugin = this;
        logger = plugin.getLogger();```
#

and in your main class

#

public static Logger logger;

noble lantern
#

If he already has an instance of his plugin (He has getInstance()) he doesn't necessarily need to have a logger method to get his logged unless you just want it for simplicity sakes

last ledge
#

import frolic.bossmobs.events.CreeperBlow;
import frolic.bossmobs.events.CreeperDeathEvent;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.logging.Logger;

public final class BossMobs extends JavaPlugin {
    private static BossMobs INSTANCE;

    public BossMobs() {
        INSTANCE = this;
    }

    public static BossMobs getInstance() {
        return INSTANCE;
    }
    public static Logger logger;

    @Override
    public void onEnable() {
        plugin = this;
        logger = plugin.getLogger();
        getServer().getPluginManager().registerEvents(new CreeperBlow(), this);
        getServer().getPluginManager().registerEvents(new CreeperDeathEvent(), this);

        // Plugin startup logic

    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }
}
#

this way?

echo saddle
#

then logger.log(Level.SEVERE, "this is bs");

#

yeh, try it

lean gull
#

can anyone help? i'm making a rules command thingie and in this section, it seems that one of the lines (kissing) is a bit off. does anyone know why?

        player.spigot().sendMessage(new ComponentBuilder()
                .append(ChatColor.translateAlternateColorCodes('&', "&8Β» &7You may not do / say anything inappropriate. &8Β» "))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text
                        (ChatColor.translateAlternateColorCodes('&', "&b&lINAPPROPRIACY"
                                + "\n" + "&8Β» &7Page 1, Section A" + "\n\n"
                                + "&b&lTHIS INCLUDES" + "\n"
                                + "  &8Β» &7Kissing" + "\n"
                                + "  &8Β» &7Anything NSFW&7" + "\n"
                                + "  &8Β» &7Inappropriate Skins" + "\n\n"
                                + "&7[WARN]"))))
                .create());```
https://i.imgur.com/yCogXMy.png
echo saddle
#

you can put log messages in to help you debug

last ledge
echo saddle
last ledge
#
        logger = plugin.getLogger();```
#

plugin is coming in red

echo saddle
#

public static Logger logger;

#

then later

#

in onEnable

quaint mantle
#

how to make a player ride an entity

echo saddle
#

oh, have to have your plugin in the main too

quaint mantle
#

setPassenger, found it

noble lantern
echo saddle
#

like public static BossMobs plugin;

last ledge
#

ok

echo saddle
#

then when you do logger= plugin.getLogger(); it should work

lean gull
#

i mean i tried removing it before the double arrow symbol

echo saddle
#

    public static AuctionHouse plugin;

    public static PluginManager pm;
    //public static Permission perm = null;
    public static Chat chat = null;
    public static Economy econ = null;
    public static HeadDatabaseAPI hdb = null;
    public static TokenEnchantAPI te = null;
    public static boolean discord = false;

    public static Connection conn = null;

    public static DiscordSRVListener discordSRVListener = new DiscordSRVListener();

    public static NMS nms;

    public static Config config;
    public static Logger logger;
    public static String version;
    public static int mcVersion;
    public static String servername;
    public static String levelname;

    public static Listings listings = new Listings();
    public static final MenuManager menuManager = new MenuManager();

    public static Map<UUID, Long> playerCooldowns = new HashMap<>();

    public static int tickEventId;
    public static int dropEventId;
    public static int cleanupEventId;

    public static final Map<String, TreeMap<String, String>> locales = new HashMap<>();

    @SuppressWarnings("EmptyMethod")
    public static void main(final String[] args) {
        // main entry point
    }

    @Override
    public void onEnable() {
        // logic to be performed when the plugin is enabled
        plugin = this;
        logger = plugin.getLogger();```
#

i know lots of static

last ledge
#

logger.log(Level.SEVERE, "this is bs"); this in event class right?

noble lantern
echo saddle
#

logger = plugin.getLogger();

#

so it's not spigot's logger, but the plugins' logger

lean gull
echo saddle
#

never use spigot's logger

lavish wave
#

I constructed an API with my team. https://github.com/Lcraft-Developers/Lcraft-APIs. This works as a plugin and runs fine, but we have a problem. The problem is that when we add commands to a test plugin that has only imported the API, it cannot add commands. It has its own detection system for the modules and the module system has nothing to do with Spigot. Now I want to add commands in my test plugin. Until now I have only:

plugin.getDescription().getCommands().put(command, options);
        plugin.getDescription().save();
        plugin.getCommand(command).setExecutor(executor);

But, with the "save()" method it still needs a file to save to and genneral it throws an exception that says you can't interfere with the plugin.yml of the API like that. So how can I now have commands automatically registred via the code of Minecraft without specifying any command in the "plugin.yml"? Or is it not possible?

rigid hazel
#
noble lantern
#

Check and make sure whatever your Casting List to is actually a List first

#

Also why ItemStack[] instead of List<ItemStack>?

rigid hazel
last ledge
#
    public void onEnable() {
        plugin = this;
        logger = plugin.getLogger();
        getServer().getPluginManager().registerEvents(new CreeperBlow(), this);
        getServer().getPluginManager().registerEvents(new CreeperDeathEvent(), this);

        // Plugin startup logic

    }
#

now do i run it?

echo saddle
#

crap, i might have to actually make updates to my code...

#

i should leave b4 i hasve to do this

rigid hazel
echo saddle
#

dayum. i really don't want to deal with all the folks trying to hack and expoit my mod

#

i mean my plugin

rigid hazel
noble lantern
last ledge
rigid hazel
#

Should I do that in saveInventory?

echo saddle
#

no, will not do

noble lantern
echo saddle
#

are you able to get log output?

last ledge
#
    public void onDeath(EntityDeathEvent event){
        if(event.getEntity() instanceof Creeper){
            Creeper creeper = (Creeper) event.getEntity();
            creeper.getWorld().spawnEntity(creeper.getLocation(), EntityType.ZOMBIE);
            logger.log(Level.SEVERE, "this is bs");```
lean gull
#

still like 2 pixels off or smth

last ledge
#

like this in event class right?

lavish wave
#

Adds Commands without using the plugin.yml - Lcraft API

echo saddle
#

so the thing about using the logger is that you can put text to the logger when you hit parts of your code

#

but you can also send formatted text

#

as in something like

#

logger.info(String.format("Registered Service Provider %s for Vault's Economy API", rsp_econ.getPlugin().getName()));

rigid hazel
echo saddle
#

so, you can print out variables and such

rigid hazel
#

This is the exact same thing as in loadInventory.

echo saddle
#

and use String.format

last ledge
#

i just want to print the log message

    public void onDeath(EntityDeathEvent event){
        if(event.getEntity() instanceof Creeper){
            Creeper creeper = (Creeper) event.getEntity();
            creeper.getWorld().spawnEntity(creeper.getLocation(), EntityType.ZOMBIE);
            logger.log(Level.SEVERE, "this is bs");

        }```
#

is this correct?

echo saddle
#

yes, if you setup logger as a static

#

as I mentioned

#

then you can use anywhere in your code

last ledge
#

i did set it as static

#

but the logger is coming in red

#

in my event class

echo saddle
#

this is a good use case for static variable

rigid hazel
#

@noble lantern It didn't work.

#

For sure not.

echo saddle
#

all other uses are evil according to OOP purists

noble lantern
#

GuildInventoryManager.java:58 specifically

rigid hazel
#

Yes. I know. But why you said I should edit saveInventory.

last ledge
noble lantern
echo saddle
#

would need to see the code

noble lantern
#

ItemStack[] content = ((List<ItemStack>) c.get(this.guild.getGuildName() + ".inventory" + "." + type)).toArray(new ItemStack[0]);

This is in loadInventory, and your getting an error because c.get is a singular itemStack

#

And your casting List to a ItemStack

rigid hazel
#

Yes.

#

Oh.

echo saddle
#

in your main you have the public static Logger logger;

last ledge
echo saddle
#

in onEnable, you asssign it the plugins logger with logger = plugin.loger()

rigid hazel
#
ItemStack[] content = new ArrayList<ItemStack>(c.get(this.guild.getGuildName() + ".inventory" + "." + type)));
``` @noble lantern This doesn't work.
#

In loadInventory

noble lantern
echo saddle
#

pluigin is basically this : plugin = this in onEnable()

tardy delta
#

Why do people put ... = null on a field?

rigid hazel
last ledge
#
        logger = plugin.getLogger();
        logger = plugin.loger();
        getServer().getPluginManager().registerEvents(new CreeperBlow(), this);```
noble lantern
last ledge
#

like this?

noble lantern
#

Also, why are you creating an array for a singular item @rigid hazel ?

rigid hazel
echo saddle
#

and its also defined in main as public static BossMobs plugin;

lean gull
echo saddle
#

past your code

#

?paste

undone axleBOT
noble lantern
#

Can you just inventory.addItem(c.get(stuff))

echo saddle
#

nt in chat

rigid hazel
echo saddle
#

to the paste site, copy it there and save, then copy the link to chat

last ledge
#

ah, i am so confused what to do

echo saddle
#

got to here

#

?paste

undone axleBOT
echo saddle
#

copy and paste your code

#

then select save

rigid hazel
#

Please @noble lantern. Perhaps you sent it earlier, but please show the code I have to use.

echo saddle
#

the URL will change

rigid hazel
#

Or explain it easy.

echo saddle
#

copy the URL and paste here in chat

last ledge
#

Klugemonkey, so is my main wrong?

echo saddle
#

look

#

open main

#

then copy your code to that site

#

afterwards, in the upper right corner click on the icon

last ledge
echo saddle
#

for save

#

the url will change

last ledge
echo saddle
#

copy that url and paste here in chat

last ledge
echo saddle
#

awesome you got ti

#

this is how we work in this channel

noble lantern
# rigid hazel I don't know what you mean. I just copied the code from the internet, because mi...

I see now, what your doing you need to do it a little bit differently because your c.get() needs to be a (Right now your actually just pulling a string from config)

FileConfiguration#getItemStack(configPath)

As of right now your just loading strings and not the actual ItemStack from the YAML config, you need to actually loop through the YAML Paths and load each ItemStack with that method and save them into a List

Also since your saving empty Inventories (Your just creating empty inventories in the constructor) in your program you actually wont have any ItemStacks unless your calling saveInventory during runtime, if your doing that you need to loop through all the keys in your config path, and then getItemStack on each config key

echo saddle
#

you just made a big step forward in getting support

#

yay!!

#

πŸ˜„

#

if you paste your code this way, devs and moderators can help you

last ledge
rigid hazel
echo saddle
#

I always explain the problem in chat, post my code and wait for someone to respond

#

might not be immediate, i have to be patient

#

but still

#

right so, like in onEnable, you can put logger.info("Test")'

#

should work