#help-development

1 messages Β· Page 1693 of 1

eternal oxide
#
Player player = event.getPlayer();
AttributeInstance attrib = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
attrib.setBaseValue(attrib.getValue() + 2);```
quaint mantle
#

wanted to know if anyone can help before sending it x

eternal oxide
quaint mantle
#

i have. it still reset

eternal oxide
#

?paste

undone axleBOT
eternal oxide
#

^ paste your yaml

quaint mantle
#

ive pasted it

last ledge
tacit drift
quaint mantle
eternal oxide
last ledge
eternal oxide
quaint mantle
#

so why is it resetting?

eternal oxide
#

what are you editing?

quaint mantle
#

exactly that. thats my version of the config. ive changed things like the names of groups, changes trues and falses. if its all valid i cant figure out why essentails wont accept it

eternal oxide
#

did you delete anything?

slim kernel
quaint mantle
#

possibly. things like blacklists with default blocks not to use, ive taken blocks off it

#

if i send the original, would that help? comparing them?

eternal oxide
#

I see your issue

quaint mantle
#

whats wrong?

eternal oxide
#

Line 427 under lists: Admins: owner admin

#

You changed group names

quaint mantle
#

how do i fix that?

eternal oxide
#

actually not sure that is the issue

quaint mantle
#

is it worth trying to fix it and seeing if it works? i think i know how to

#

no it wont be will it. cuz it says moderator, but thats not there either. never was

eternal oxide
#

I guess you are going to have to edit bit by bit, until you see what you are breaking

#

I see nothing obvious that jumps out at me

quaint mantle
#

i cant either. even in a validator, theres no errors :/

eternal oxide
#

don;t just replace the file. Make changes bit by bit

quaint mantle
#

@eternal oxide

eternal oxide
#

clone if you don;t want to modify the actual location

slim kernel
quaint mantle
#

Do threads in java generally improve tps when it comes to large tasks?

#

Or is spigot limited in terms of threading

eternal night
#

well you cannot interact with the spigot API in most places while off the main thread

#

generally, large operations (e.g. database) should be moved onto another thread tho, as long tasks like that prevent the entire server from moving on with ticking

quaint mantle
#

I see, thanks for the info

slim kernel
#

do I compare locations with == or .equals() ?

exotic obsidian
#

hello guys

#

who's have a good plugin api for particales?
Im using 1.8.8 spigot version

eternal night
slim kernel
#

thank you

quaint mantle
#

if (e.getHand() == EquipmentSlot.HAND && e.getHand() == EquipmentSlot.OFF_HAND)
p.sendMessage("ALL_HANDS");

    if (e.getHand() == EquipmentSlot.HAND)
        p.sendMessage("HAND");

    if (e.getHand() == EquipmentSlot.OFF_HAND)
        p.sendMessage("OFF_HAND");
#

why do I write HAND and OFF_HAND instead of ALL_HANDS?

ivory sleet
#

idk, isnt that a question you should be asking yourself?

quaint mantle
#

?

hasty prawn
#

How would we know why you wrote that? Thonk

#

You're the only one that can answer that PeepoHappy

unreal quartz
#

because you have become possessed

eternal oxide
#

His translator is not good. His questions are often wrong

unreal quartz
#

in all seriousness it is because having an ALL_HANDS EquipmentSlot makes no sense

#

it's meant to represent a single slot

quaint mantle
#

when I click with both hands, I do not write ALL_HANDS

stoic osprey
#

how can I save data in some sort of 'tag' in an entity so when it is killed I can access that data

unreal quartz
eternal oxide
#

You can't click with both hands at the same time. One will trigger first

unreal quartz
#

use || (or) instead

quaint mantle
#

how do I make an item get picked up when I click?

#

ItemStack itemm = p.getInventory().getItemInMainHand();
ItemStack itemo = p.getInventory().getItemInOffHand();

    if (e.getHand() == EquipmentSlot.HAND)
        
        p.sendMessage("HAND");
    itemm.setAmount(itemm.getAmount() - 1);
    p.getInventory().setItemInMainHand(itemm);
    
    
    
    if (e.getHand() == EquipmentSlot.OFF_HAND)
        
        p.sendMessage("OFF_HAND");
    itemo.setAmount(itemo.getAmount() - 1);
    p.getInventory().setItemInOffHand(itemo);
#

it works, but if you click with two hands, it takes away in 2 hands

#

or how can I pick up 1 item in the inventory?

last ledge
#

please help

quaint mantle
quaint mantle
echo basalt
echo basalt
last ledge
echo basalt
#

My job isn't to code for you

eternal oxide
#

I already showed you how to add and reduce teh player max health attribute

shadow gazelle
#

Brain fart, would I use this in PrepareItemCraftEvent to check if the recipe is my custom recipe? event.getRecipe().equals("my recipe")

last ledge
echo basalt
shadow gazelle
#

Alright

eternal oxide
shadow gazelle
#

I think checking if it was my recipe would break less things

last ledge
eternal oxide
#

No you are just lazy 😦

shadow gazelle
last ledge
eternal oxide
#

You already made an item that if used increased their health

#

you also know how to reduce their health as you now do it on death

last ledge
#

now i want a command though

#

to store in bottle

#

would be really great, and mean a lot if u could send me code snippet maam

shadow gazelle
#

How can I check per slot in a crafting inventory?

waxen plinth
waxen plinth
shadow gazelle
#

Thanks

solid cargo
#

how can i get the player who spawned the entity

young knoll
#

Spawn egg? Or

solid cargo
#

no, a custom entity spawned by breaking a block

waxen plinth
#

Well if it's custom

solid cargo
#

whenever the entity spawns, make it do shiz

waxen plinth
#

You would have to attach data to it when it spawns

#

So that it knows who spawned it

young knoll
#

If you are controlling the spawn of it, you can do whatever

last ledge
#

private static void heartwithdraw() { ItemStack item = new ItemStack(Material.EXPERIENCE_BOTTLE, 1); ItemMeta meta = item.getItemMeta(); meta.setDisplayName(ChatColor.RED + "Bottle of Heart"); List<String> lore = new ArrayList<>(); lore.add(ChatColor.LIGHT_PURPLE + "Hearts"); meta.setLore(lore); item.setItemMeta(meta); ItemStack heartwithdraw = item; }

#

i made this but

#

i cant import it in my another class:

#

player.getInventory().addItem(ItemManager.);

#

ItemManager. has no name of my custom item

hasty jackal
#

that's obvious: you made it private, so of course it cannot be seen by your other code

young knoll
#

Also it doesn't return the item

lavish hemlock
#

Items are immutable, changing their values doesn't change them in the player's inventory. You'd need to return the item and replace the item in the player's inventory with the one you've returned.

young knoll
#

It's are mutable

#

Most of the time

lavish hemlock
#

Oh, well, correction: The metadata of an item is immutable (as in it doesn't change the item's meta in the player's inventory).

solid cargo
solid cargo
#

how can i refactor to nothing in InteliJ

hasty jackal
#

refactor to nothing? so delete?

#

or you mean void return type?

last ledge
# eternal oxide You already made an item that if used increased their health

`import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import smp.heart.heartsmp.items.ItemManager;

public class withdraw implements Listener {
@EventHandler
public void onWithdraw(PlayerInteractEvent event){
if(event.getAction() == Action.RIGHT_CLICK_AIR){
if(event.getItem() != null){
if(event.getItem().getItemMeta().equals(ItemManager.heartwithdraw.getItemMeta())){
Player player = event.getPlayer();
AttributeInstance attrib = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
attrib.setBaseValue(attrib.getValue() - 2);

            }
        }
    }

}

}`

i managed to pull out till here, now atleast can u help me in how to store those max hearts in bottle?

hasty jackal
#

if you don't have a return it will probably error and then you can do alt+enter and it should offer changing to void

solid cargo
quaint mantle
solid cargo
#

i just want to rename this whole mess to just skeleton.blahBlahBlah

lavish hemlock
#

dear god

solid cargo
#

dont ask about efficency

#

i just need an answer

hasty jackal
#

find and replace then?

hasty prawn
#

But yes Find and Replace is what you want

quiet ice
#

eclipse (and likely any other IDE) have refactor support for mass editing things like these

hasty prawn
last ledge
#

i want 1 bottle = 1 heart

#

pls tell me the code to store it

hasty prawn
#

There's nothing to store if 1 bottle = 1 heart.

last ledge
#

how to do it still

hasty prawn
#

When they drink the bottle just modify their attributes.

last ledge
#

i think i messed up the code above

#

@hasty prawn

last ledge
hasty prawn
#

I don't know, did you?

last ledge
hasty prawn
#

I mean based on what you sent you haven't done anything with a /withdraw command.

last ledge
#

so i will have to add
AttributeInstance attrib = player.getAttribute(Attribute.GENERIC_MAX_HEALTH); attrib.setBaseValue(attrib.getValue() - 2); in withdraw command class

#

not in event handler

hasty prawn
#

Yes

last ledge
#

also

#

if players has only 1 heart

#

how do i stop them from withdrawing hearts?

#

@hasty prawn

hasty prawn
hasty prawn
#

I'm not going to write the plugin for you.

last ledge
#

just tell me the line pls

#

just the simple line

quaint mantle
#

sorry but u r the author of the plugin so I suggest u to write the code

last ledge
#

i just wanted small help -.-

quaint mantle
#

asking help is good and fine, but asking code is not

hasty prawn
#

We are helping, but we're still not going to write the plugin for you.

quaint mantle
#

we explain logic u code

eternal oxide
#

You have everything you need. You just need to put it together.

lavish hemlock
hasty prawn
#

Looking at code is certainly a way to learn but if you constantly just ask for code, you're not learning anything.

quaint mantle
#

now I think about it I read ppl codes as well πŸ˜‚ , (github codes)

last ledge
#

if(player.getMaxHealth()>2)

#

my getmaxheatlh is striked

#

why

lavish hemlock
#

It means it's deprecated.

young knoll
#

You are meant to use getAtrribute now

last ledge
#

whats the soultion

quaint mantle
eternal oxide
#

You already get teh max health attribute. just check its .value() is greater than 2

quaint mantle
#

I feel like i m being toxic rn, I will be taking my leave from this conversation

shadow night
#

How do i check something every tick? For example a users vault balance

ivory sleet
#

?scheduling

undone axleBOT
last ledge
#

pog

#

just realised it was so easy

#

to do

somber hull
#

How would I use packets for a vehicle

#

I just need a basic rundown of what I would need to do, I can figure the rest out

somber hull
quaint mantle
somber hull
#

I have googled

quaint mantle
#

ok

eternal oxide
#

steering packets I believe

quaint mantle
#

suggestion use head on armorstand for steering wheel

somber hull
#

Nothing uses protocolib

#

It’s all nms packets

quaint mantle
#

very good πŸ‘πŸΏ

somber hull
quaint mantle
somber hull
#

Bet

#

I mean

#

I could have looked that up

#

And steering packet just looks for what button is presssed?

#

I’ll look that up too

quaint mantle
#

you never hear that in this channel

#

"I'll look it up"

#

πŸ˜ƒ

somber hull
#

πŸ™‚

gritty urchin
#

Hey, does anyone know how to use an internal module as a maven plugin
which doesn't use the pluginRepositories repo specified in a pom

young knoll
#

Yes

quaint mantle
#

everything in the spigot api is ticks

sacred ice
#

Hello, I have a problem, I changed a player skin using some nms code and packets, that works on localhost but when I move to the real server under bungee code the skins aren't changed. (I have skinrestorer installed on both localhost and server). Have anyone ever dealt with that?

quaint mantle
#

i dont think there's one method where its by second, it would make no sense because the server relies on the tps

last ledge
#

[22:44:21] [Server thread/INFO]: Frolic_gamers issued server command: /heartwithdraw [22:44:21] [Server thread/ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'heartwithdraw' in plugin HeartSMP v1.0F at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[server.jar:3241-Spigot-6c1c1b2-1492826] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[server.jar:3241-Spigot-6c1c1b2-1492826] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:776) ~[server.jar:3241-Spigot-6c1c1b2-1492826] at

#

error in executing command

#

pls help

quaint mantle
#

πŸ‘πŸΏ

last ledge
# quaint mantle send code

`package smp.heart.heartsmp.commands;

import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import smp.heart.heartsmp.items.ItemManager;

public class withdraw implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if (!(sender instanceof Player)) {
sender.sendMessage("This commmand can be executed only by Players");
return true;

    } else {
        Player player = (Player) sender;
        if (command.getName().equalsIgnoreCase("heartwithdraw")) {
            if (player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getDefaultValue() < 2) {
                player.sendMessage("&c&lYou don't have enough hearts");
            } else {
                player.getInventory().addItem(ItemManager.heartwithdraw);
                AttributeInstance attrib = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
                attrib.setBaseValue(attrib.getValue() - 2);

            }
        }


        return true;
    }
}`

}

quaint mantle
#

?paste

undone axleBOT
last ledge
#

k

quaint mantle
#

send full error aswell

eternal oxide
#

your heartwithdraw is null giving you an NPE

last ledge
#

NPE?

#

how is it null

#

i did everything

quaint mantle
#

show where you initialize it

last ledge
# quaint mantle show where you initialize it

`public final class HeartSMP extends JavaPlugin {

@Override
public void onEnable() {
    ItemManager.init();
    getCommand("giveheart").setExecutor(new ItemCommands());
    getCommand("giveheartfragment").setExecutor(new FragmentCommand());
    getCommand("heartwithdraw").setExecutor(new withdraw());
    getServer().getPluginManager().registerEvents(new Heart(), this);
    getServer().getPluginManager().registerEvents(new Killevent(), this);
    getServer().getPluginManager().registerEvents(new smp.heart.heartsmp.events.withdraw(), this);
    System.out.println("Heart SMP plugin Enabled!!!");`
quaint mantle
#

show init method

proud basin
#

How would yall go about to make a event manager?

quaint mantle
#

wym?

proud basin
#

a class that handles events for you

quaint mantle
#

i still dont understand

quaint mantle
#

just make methods that run off that event

last ledge
quaint mantle
#

call it as a static

#

handle it from that

proud basin
#

but its a custom event...

quaint mantle
#

static void handle(Event e){

quaint mantle
last ledge
#

Someone help pls

quaint mantle
last ledge
quaint mantle
#

and ur not helping us to help you give you help with stuff you need help with

#

like

last ledge
#

i gave evrything

#

scroll up

quaint mantle
#

pls allow me to help you to help me to assist you in this

last ledge
#

scroll up

#

bruh

#

u will find everything

quaint mantle
#

using the entire class path

last ledge
#

idk its not taking simple name

proud basin
#

not working with spigot btw

quaint mantle
#

you only need to register the class that handles events

last ledge
#

it comes in red

quaint mantle
#

have you imported everything?

#

show your build path and/or pom

last ledge
#

incompatible types: smp.heart.heartsmp.commands.withdraw cannot be converted to org.bukkit.event.Listener

#

if i type actual name

#

this error comes

quaint mantle
#

._.

last ledge
#

yes

#

`Package smp.heart.heartsmp.events;

import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeInstance;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import smp.heart.heartsmp.items.ItemManager;

public class withdraw implements Listener {
@EventHandler
public void onWithdraw(PlayerInteractEvent event){
if(event.getAction() == Action.RIGHT_CLICK_AIR){
if(event.getItem() != null){
if(event.getItem().getItemMeta().equals(ItemManager.heartwithdraw.getItemMeta())){
Player player = event.getPlayer();
AttributeInstance attrib = player.getAttribute(Attribute.GENERIC_MAX_HEALTH);
attrib.setBaseValue(attrib.getValue() + 2);

                event.getItem().setAmount(event.getItem().getAmount() - 1);


            }
        }
    }

}

}`

#

this is the code

quaint mantle
#

wtf

#

why are you using one event per class

#

holy christ

#

you're literally gonna have hundreds of classes

#

and try the class name.

#

and make it proper case

#

public class Withdraw

#

new Withdraw()

#

etx

last ledge
#

i renamed it to WithdrawEvents

#

still dosent work

quaint mantle
#

ok

#

so show your main class now

last ledge
#

`package smp.heart.heartsmp;

import org.bukkit.plugin.java.JavaPlugin;
import smp.heart.heartsmp.commands.FragmentCommand;
import smp.heart.heartsmp.commands.ItemCommands;
import smp.heart.heartsmp.commands.withdraw;
import smp.heart.heartsmp.events.Heart;
import smp.heart.heartsmp.events.Killevent;
import smp.heart.heartsmp.items.ItemManager;

public final class HeartSMP extends JavaPlugin {

@Override
public void onEnable() {
    ItemManager.init();
    getCommand("giveheart").setExecutor(new ItemCommands());
    getCommand("giveheartfragment").setExecutor(new FragmentCommand());
    getCommand("heartwithdraw").setExecutor(new withdraw());
    getServer().getPluginManager().registerEvents(new Heart(), this);
    getServer().getPluginManager().registerEvents(new Killevent(), this);
    getServer().getPluginManager().registerEvents(new , this);
    System.out.println("Heart SMP plugin Enabled!!!");
    // Plugin startup logic

}`
#

i cant put WithdrawEvents in here

#

still

quaint mantle
#

πŸͺ πŸ•³πŸ§»

#

you arent even calling the class

#

learn Spigot PLEASE

#

like, this is basic Java && Spigot stuff right

last ledge
#

i am calling the class

#

where

quaint mantle
#

you arent

young knoll
#

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

#

new what?

quaint mantle
#

you're calling a 'new withdraw()'

quaint mantle
#

not a new WithdrawEvents() lmaoo

last ledge
#

i cant put my class name

quaint mantle
#

bruh

last ledge
#

its in red

quaint mantle
ivory sleet
#

?learnjava

undone axleBOT
quaint mantle
#

im debating just sending him beginning

#

yes

#

please

#

that all of that

#

πŸ’…πŸ’…πŸ’…

last ledge
#

bruh just tell me the line

#

i will add

#

pls dont make fun of me

ivory sleet
#

I'm not

exotic obsidian
#

hello

ivory sleet
#

but knowing the fundamental syntax of Java is a prerequisite for making spigot plugins

last ledge
#

ik bruh

#

but idk what i missed in here

#

u guys made me confused

exotic obsidian
#

guys Im trying to create particale

#

Im using 1.8.8 version

#

do anyone have a easy way to do that?

young knoll
#

There are probably a bunch of third party APIs

#

IIRC 1.18 was before the methods were added to spigot api

eternal oxide
#

1.8.8 is VERY old (6-7 years) so these answers will be found using Google.

exotic obsidian
#

But it is the most used

quaint mantle
#

But the pvp is the best

eternal oxide
#

no its not

hasty prawn
#

It's only 6 years old, but the point still stands, you won't really get much support here for it.

quaint mantle
#

Timing hits is ok ?

#

And how many people know it

eternal oxide
#

I don't pvp so I don't care πŸ˜‰

quaint mantle
#

Imagine running pvp gamemodes in 1.17.1

exotic obsidian
#

xd

exotic obsidian
ivory sleet
#

you can literally adjust the pvp in 1.17.1 to make it identical to 1.8.8 apart from block hitting but shields replace it much better imo

hasty prawn
#

^^^

#

OCM Prayge

quaint mantle
#

Guys sorry i dont have time
Im gonna go config 1.17.1 bedwars
And hope for 5+ players

ivory sleet
#

πŸ₯²

quaint mantle
quaint mantle
quaint mantle
ivory sleet
#

yeah ocm isnt the best, like its fine for what it does but surely misses some features imo

hasty prawn
#

The only thing it misses is block hitting

#

And it atleast attempts to mimic it

ivory sleet
#

yes because getTo() might return null

#

well you could null check getTo() and then getBlock()

#

also create a variable for getTo()'s return to capture the instance

young knoll
#

I don't think getBlock can be null

ivory sleet
#

then ofc invoke getBlock on that variable once null checked

#

probably not lol

grand leaf
#

hey guys, I have a custom skeleton and entity damage by entity event and im trying to detect if the attacker is the custom skeleton in question, this is what I got so far

#
}else if(e.getDamager() instanceof Arrow) {
                Arrow arrow = (Arrow) e.getDamager();
                if(arrow.getShooter() instanceof Skeleton) { //this if gets checked
                    EntitySkeleton skeleton = ( (CraftSkeleton) arrow.getShooter() ).getHandle();
                    if(skeleton instanceof UndeadArcher) {
                        System.out.println("ossos nao mortos"); //this print doesnt get printed out
                        UndeadArcher attacker = (UndeadArcher) skeleton;
                        damage = attacker.attack() * 100 / (victimStats.get("armor") + 100);
                    }
                }
                
            }```
grand leaf
#

1.16.2

quaint mantle
#

ah ok

grand leaf
#

I did this with a custom zombie and it works nicely

#
}else if(e.getDamager() instanceof Zombie) { //se o atacante e zombie
                EntityZombie zombie = ((CraftZombie)e.getDamager()).getHandle();
                if(zombie instanceof Undead) {
                    Undead attacker = (Undead) zombie;
                    damage = attacker.attack() * 100 / (victimStats.get("armor") + 100);
                }
            }```
somber hull
#

no way its 10 years old

eternal oxide
#

yeah, its 6 or 7

somber hull
#

yea

lost matrix
eternal oxide
#

Fixed. no evidence of my crime

lost matrix
lost matrix
quaint mantle
#

1.7 😩

sullen geyser
#

Not even close to being "even close"

misty current
#

i'm tryna use protocolLib to modify the tablist, but i don't get how i'm supposed to get the different fields. I'm pretty sure i need to use packet.getPlayerInfoAction().getfields() but i don't understand what comes next

upper vale
young knoll
#

Bstats needs better color selection

#

I though the big one was 1.14

grand leaf
#

can someone help?

sullen geyser
# upper vale

To be fair though, that is not entirely representative

quaint mantle
#

Im not too fond of the 1.17 update

sullen geyser
#

It only counts servers and there are a lot of small servers on the newest versions, people playing with friends, test servers etc.

quaint mantle
#

i (personally) would stay on 16 unless im modding

sullen geyser
#

Whereas big servers are only counted once

grand leaf
#

nice help channel\

sullen geyser
#

With that said though, I fully support the movement to the latest version

quaint mantle
grand leaf
#

serious?

quaint mantle
#

ask!

misty current
#

it was above

#

along with mine

grand leaf
#

oh true

quaint mantle
#

i forgor

grand leaf
#

I forgot to literally ask

#

mb

quaint mantle
#

or put it in a thread if its complicated

eternal oxide
# grand leaf serious?

all you did is show some code. You've not asked a question nor stated any issues you are having

misty current
#

well kind of complicated, the player info packet is a mess

grand leaf
#

I was trying to get the handle of the custom skeleton class

#

it worked for the other custom class that I sent below

#

so how do I do it?

sullen geyser
#

What version are you on?

grand leaf
#

1.16.2

#

it worked for the zombie but since the attacker on a skeleton is the arrow, I get the arrow's shooter but for some reason this line "EntitySkeleton skeleton = ( (CraftSkeleton) arrow.getShooter() ).getHandle();" gives me an error

quaint mantle
#

what error

grand leaf
#

for some reason I cant send prints rn wtf

eternal oxide
#

?paste

undone axleBOT
grand leaf
#

its a syntax error

#

not console logged

eternal oxide
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

eternal oxide
#

only verified users can post screens

grand leaf
#

it tells me to cast to EntitySkeleton or to change type of skeleton to EntitySkeletonAbstract

#

I tried both, but none of them get recognized when the skeleton shoots

#

on the zombie one I get no errors, which is why I'm confused

sullen geyser
#

I'm pretty sure craftSkeleton.getHandle() returns EntitySkeletonAbstract and not EntitySkeleton, so that's your syntax error.

#

But then again, I've gotten so used to NMS in 1.17 πŸ€·β€β™‚οΈ

hasty jackal
#

attach a debugger, inspect the values

#

the most straight forward and best solution

proud basin
#

anyone know how I can replace a word in every class with intellij?

#

like the word test

#

i want to replace it with hi

#

but every class that has it

quaint mantle
#

ItemStack item = p.getInventory().getItem(8)

how do I get an item in 8 slots?

#

Refractor ?

hasty jackal
#

you can do replace for all files

sullen geyser
#

Just like you're doing

hasty jackal
#

and there you can also filter for "in string instances only"

quaint mantle
proud basin
#

wym kumpel

quaint mantle
#

1 - 8 slots

proud basin
#

ctrl shift f?

hasty jackal
#

ctrl+shift+f -> search in all files, ctrl+shift+r -> replace in all files

sullen geyser
hasty jackal
#

in the top right you can also change the filter from "anywhere" to "in string literals"

quaint mantle
sullen geyser
quaint mantle
#

I got a slot, but how do I get the item itself?

quaint mantle
#

41 slots

#

for (int i = 0; i < p.getInventory().getSize(); i++) {
ItemStack item = p.getInventory().getItem(i);

sullen geyser
#

Exactly

quaint mantle
#

how do I get an item in these slots?

sullen geyser
#

You just did

#

You named it item

quaint mantle
#

ItemStack?

#

Material.TNT

#

how?

#

i'm dayn

sullen geyser
#

Ah you want the material?

#

item.getType()

quaint mantle
#

now worked

#

not

#

either I'm a dolboeb or it doesn't work

#

item.getType().equals(Material.ACACIA_DOOR);

#

thanks

sullen geyser
#

smells like NPE's but aight 🀣

quaint mantle
#

NPE's?

sullen geyser
#

NullPointerException

#

If any of the slots don't have an item in them

#

They will be null

#

And you'll run item.getType from null, causing a NullPointerException

quaint mantle
#

I didn't understand

#

help me please

#

i'm dolboeb

wary harness
#

so I got code which prevent player to place itemstack to slot 0

#

but sometimes if they spam

#

event is not canceled

#

which is weird

quaint mantle
#

try to re-download, if the item is in the 0 slot, then this does not work

#

if you use the cheststealer cheats in the GUI, the items will go to the inventory, but if you try to transfer them or re-upload them to the server, they will disappear

quaint mantle
#

oh

#

okay

quaint mantle
#

ahaha

#

pidr

#

Dm?

wary harness
#

dragevent

#

my code was preventing

#

inventory click event but not drag event

#

so they were been able to put item

quaint mantle
#

Why did you pinged me

wary harness
#

to furnace slot 0

#

I thougt u are responding on my thing

quaint mantle
proud basin
#

Is Font.PLAIN not a font type?

quaint mantle
#

what

dry marsh
#

Hi I'm Trying To Make A Bukkit Plugin My Friend Showed Me How To Write The Code For It But When I Run It It Doesnt Work I Am Trying To Make A Plugin For Upgrading The Tools In Minecraft

#

Should I Post My Code Here Or Do I Send A Link With The Code Instead? For Like Not Flooding The Chat?

quaint mantle
#

?paste

undone axleBOT
dry marsh
#

Ok Thank You

#

When I Put The File Into The Plugin Folder It Doesnt Show Up In Minecraft

quaint mantle
#

Did you just make a spigot plugin in c++?

proud basin
#

ha

dry marsh
#

Im Not Sure

quaint mantle
#

wtf 😭 😭 😭

#

@errant drift !!!

proud basin
#

how are you not sure

dry marsh
#

What Is c++

proud basin
#

...

quaint mantle
#

the fuck

proud basin
#

Ethereal do you know anything about programming

shadow tide
onyx shale
#

wut

undone axleBOT
shadow tide
#

?learnjava

quaint mantle
#

@errant drift make spigot in c++

dry marsh
#

Is Java The Plugin You Have To Update On Your Computer?

quaint mantle
#

What

proud basin
#

huh

shadow tide
#

wtf

opal frigate
#

He’s trolling too hard

quaint mantle
#

πŸ˜‚

paper viper
#

Whats going on

shadow tide
#

java is a programming language

opal frigate
#

I don’t get pranked 😎

quaint mantle
#

thats definitely a troll

proud basin
#

this can't be real

shadow tide
#

ikr

dry marsh
#

I'm Sorry.. I'll Go Ask Somewhere Else

#

Bye

quaint mantle
#

πŸ€”

proud basin
#

weird

opal frigate
#

Thanks for the entertainment

shadow tide
#

?learnjava no check out these links

undone axleBOT
proud basin
#

they left

paper viper
#

?learnC++

shadow tide
#

mann

quaint mantle
#

Lmaoooo

ivory sleet
shadow tide
#

LOL

paper viper
#
#include "ItemStack.h"
#include "EventHandler.h"
#include "Action.h"

class itemupGrader : public Listener {
private:
    int i_lev;
    std::string s_nm;
    float f_exprence;
public:
    itemUpGrader();
    void upg(const Bukkit::PlayerInteractEvent& ev);
};

itemUpGrader::itemUpGrader() {
    i_lev = 0;
    s_nm = "Beginer";
    f_exprence = 0.0f;
}

void itemupGrader::upg(const Bukkit::PlayerInteractEvent& ev) {
    if (ev.getAction() == Action.Right_Click_Air || ev.getAction() == Action.Right_Click_Block) {
        Bukkit::ItemStack* i = ev.getItem();

        if (i->getType() == Material.Diamond_Pickaxe) {

            //upGrade...
        }
    }
}
#

lol

#

look at his or her code

ivory sleet
#

jesus pulse

#

I hate u already xd

paper viper
#

lol

proud basin
#

can we get that pinned

ivory sleet
#

πŸ™„

paper viper
#

yes

shadow tide
#

say "This is what NOT to do"

proud basin
#

haha my name on minecraft is now Player649

quaint mantle
#
#include<JavaPlugin.h>

class MyPlugin : public JavaPlugin {
    public:
        virtual void on_enable() final {
            this -> get_logger().info("Hey!");
        }
}
#

yes

#

we must make spigot in c++

#

it would be sexy

ivory sleet
#

hmm I dont have the authority to pin messages on my own behalf

quaint mantle
#

It would be funny

proud basin
#

Optic wake up

shadow tide
#

hes online

proud basin
#

How many times does 4 go int o4

quaint mantle
#

0

shadow tide
#

once

quaint mantle
#

its too big

proud basin
#

your too big

ivory sleet
#

🀒

quaint mantle
#

That hurt me

shadow tide
quaint mantle
#

whats going on why do i see c++ code

shadow tide
#

not even gonna say it now

shadow tide
ivory sleet
quaint mantle
#

im very confused

#

i think ill take ur advice and not worry about it lol

shadow tide
#

@quaint mantle why did the chicken cross the road ||this is an off topic roast||

#

||to get to the idiot's house||

#

Knock Knock

ivory sleet
#

🀒

shadow tide
#

I'm just gonna stop so people don't judge me

#

lol

onyx shale
#

its alrdy too late

quaint mantle
#

you have been judged

shadow tide
#

in the EntityDamageByEntityEvent event how would I detect if the entity it was damaged by has a PDC?

#

||this is like my 5th time asking in different wording||

quaint mantle
#

pdc?

shadow tide
#

Persistant Data Container

ivory sleet
#

EntityDamageByEntityEvent::getEntity
PersistentDataHolder::getPersistentDataContainer
PersistentDataContainer::has

#

maybe it EntityDamageByEntityEvent::getDamaged idr

shadow tide
#

also, what method would I use to get the entity that was damaged?

quaint mantle
#

u can look this up on spigot api docs btw

ivory sleet
#

?jd-s

undone axleBOT
young knoll
#

It's just getEntity

shadow tide
#

cool

#

lol

shadow tide
#

thx

quaint mantle
#

unfortunately its in java and not x86 assembly

heavy mason
#

Does CafeBabe have a search feature to return the javadoc of a queried term/phrase?

ivory sleet
#

_Pesto nope sadly not

heavy mason
#

:/

ivory sleet
#

I have suggested to spigot that they should add docdex

shadow tide
quaint mantle
#

lol

heavy mason
ivory sleet
#

πŸ₯²

onyx shale
#

unlikely

heavy mason
#

hence, hope

ivory sleet
#

most likely would be abused 😦

#

because the embeds it creates are kinda big

shadow tide
#

I guess I'm dumb because I didn't have any of this in my EntityDamageByEntityEvent lol java , Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage

heavy mason
shadow tide
#

would I use cause for the damager or actually damager?

heavy mason
#

Then just an embed with a link

ivory sleet
#

ye pesto

heavy mason
#

Can't be that bad can it?

onyx shale
#

it can

ivory sleet
#

was thinking of smtng else but no wouldnt

shadow tide
#

prob damager right?

#

still dumb

ivory sleet
#

Idk

heavy mason
#

Read the javadoc mate, your answers are in there

ivory sleet
#

^

shadow tide
#

yee

#

speedreading

#

Its damager

ivory sleet
#

_Pesto in the long run I hope I can get the chance to recode CafeBabe using discord.js or something since discord.py or whatever it was called was discontinued.

#

and if im correct cafebabe runs on that rn

heavy mason
#

Wait was it? I thought they were going through another update

ivory sleet
#

oh, well from what I understood the maintainer really just couldn't maintain it anymore and any other maintainers didn't want to take over the project.

heavy mason
#

Yeah I'm reading the gist now

#

Kinda sad man :/

wary harness
ivory sleet
#

yup

shadow tide
#

getDamager isn't a method in EntityDamageByEntityEvent for some reason

#

I am waiting for an answer

ivory sleet
#

what version r u using

shadow tide
#

1.17.1

ivory sleet
#

should be a valid instance method

shadow tide
#

i'm doing damagee.getDamager and it says it isn't a method

ivory sleet
#

ofc

shadow tide
#

getDamager cannot be resolved or is not a field

ivory sleet
#

should be event.getDamager()

shadow tide
#

ooooooh

#

lol

#

ok, thanks

#

me dumb

ivory sleet
#

ok, no worries

shadow tide
#

question, in the docs they do Entity damager does this actually return the damager, because if it does my last question is unnecessary

ivory sleet
#

wat

#

no

#

u look at wrong stuff my guy

#

there's a list of methods

ivory sleet
#

and as u know methods always end with ()

shadow tide
#

i mean EntityDamageByEntityEvent​(Entity damager, Entity damagee, EntityDamageEvent.DamageCause cause, double damage)

#

lol

ivory sleet
#

thats the constructor

shadow tide
#

yeah ik

ivory sleet
#

you dont use that to figure out the methods tho

shadow tide
#

does Entity damager return the damager?

ivory sleet
#

no thats a param lol

shadow tide
#

k

ivory sleet
#

u cant even access that parameter variable

shadow tide
#

so I should delete is because it is unnecassary

ivory sleet
#

idk what you're doing but obviously not on the right track

shadow tide
#

in the docs they used that as the constructor

#

k

ivory sleet
#

yes

#

but thats to construct a new instance of the class

#

which is done for you

#

you only consume that instance with your event handler method/callback

shadow tide
#

oooohhhhhh

#

I get it now

ivory sleet
#

pog

shadow tide
#

everything just clicked with the docs

#

so all I need is this? EntityDamageByEntityEvent event

ivory sleet
#

yes

shadow tide
#

cool

ivory sleet
#

then all the methods listed there is usable by calling it from your event variable

shadow tide
#

yay

#

so I'm guessing this would work so I don't have to use event.getDamager every time Entity damager = event.getDamager(); I don't see why it wouldn't

ivory sleet
#

yes

shadow tide
#

yay

ivory sleet
#

thats even better than calling the method every time

#

bonus point actually πŸ˜„

shadow tide
#

yay I'm getting better at java and spigot API

ivory sleet
#

yup

shadow tide
#

sorry

ivory sleet
shadow tide
#

so if I'm doing ```java
if(damager.getPersistentDataContainer(key, PersistentDataType.BYTE, (byte)1)) {

    }``` could I just make a new variable for the key in the event?
ivory sleet
#

uh sure

shadow tide
#

the uh is throwing me off, am I doing something wrong?

ivory sleet
#

I like to cache, store the keys permanently

#

NamespacedKeys that is

shadow tide
#

how?

ivory sleet
#

you declare a variable outside your method

shadow tide
#

k got it

#

so I can have it inside of my listener class?

ivory sleet
#

yes

#

but outside the method

shadow tide
#

got it

ivory sleet
#

usually we also have those variables directly under the
public class Blah ... {

shadow tide
#

its showing me this error when I hover over getPersistentDataContainer The method getPersistentDataContainer() in the type PersistentDataHolder is not applicable for the arguments (NamespacedKey, PersistentDataType<Byte,Byte>, byte)

#

wait nvm

#

me being dumb

#

lol

ivory sleet
#

ofc

shadow tide
#

fixed

ivory sleet
#

lol

#

pog

shadow tide
#

wait no

#

not fixed

#

uhh

#
if(damager.getPersistentDataContainer(key, PersistentDataType.BYTE)) {
            
        }
#

this is my method

#

@ivory sleet

ivory sleet
#

yes

shadow tide
#

help

ivory sleet
#

very incorrect

shadow tide
#

ok

#

ill look at the docs

ivory sleet
#

first of all

shadow tide
#

I understand like half of this @Nullable <T,​Z> Z get​(@NotNull NamespacedKey key, @NotNull PersistentDataType<T,​Z> type) Returns the metadata value that is stored on the PersistentDataHolder instance. Type Parameters: T - the generic type of the stored primitive Z - the generic type of the eventually created complex object Parameters: key - the key to look up in the custom tag map type - the type the value must have and will be casted to Returns: the value or null if no value was mapped under the given value Throws: NullPointerException - if the key to look up is null NullPointerException - if the type to cast the found object to is null IllegalArgumentException - if the value exists under the given key, but cannot be access using the given type IllegalArgumentException - if no suitable adapter will be found for the PersistentDataType.getPrimitiveType()

ivory sleet
#

getPersistentDataContainer does not take any arguments

#

so passing (key, PersistentDataType.BYTE) is not right

shadow tide
#

ok

#

so this?

ivory sleet
#

?

shadow tide
#
        if(damager.getPersistentDataContainer().has(key, PersistentDataType.BYTE)) {
            
        }```?
ivory sleet
#

yes it goes over an intermediate java topic u probably dont understand

#

generics

ivory sleet
#

the <Z>

ivory sleet
#

yeah

shadow tide
#

yay

#

me kinda smart/brain grow

ivory sleet
#

πŸ˜„

shadow tide
#
        if(damager.getPersistentDataContainer().has(key, PersistentDataType.BYTE)) {
            event.setDamage(999999);
        }``` so would this work?
ivory sleet
#

?tryandsee

#

oh

#

the cmd is removed 🍣

young knoll
#

It should, in theory

shadow tide
#

I just don't like starting up my server, it takes 3min and me impatient, but fine

ivory sleet
#

my test server has view distance lowered, end and nether world disabled and some start up /jvm flags to make it bootstrap even faster

shadow tide
#

I would love that

#

could you send the server.properties and the /jvm flags in a paste?

#

?paste

undone axleBOT
quaint mantle
shadow tide
#

lol

#

at one point I didn't know either

ivory sleet
#

It’s what it stands for really

shadow tide
#

and I still don't really know

quaint mantle
#

PDC = Simple NBT

shadow tide
#

it is a data container that is persistant

quaint mantle
#

^

ivory sleet
#

Container, containing
Data, containing data
Persistent, data isn’t lost unless the program intended to explicitly erase it

young knoll
#

Very useful for storing data with

#

Works for items, entities, block entities, and chunks

quaint mantle
#

Yes its a very good container for persistent data

ivory sleet
#

I wish ItemStack implemented PersistentDataHolder but yeah

quaint mantle
#

ItemMeta

ivory sleet
#

Yes but that’s somewhat slow

quaint mantle
#

use eco πŸ€·πŸΏβ€β™‚οΈ

#

FastItemStack

ivory sleet
#

Lmao yeah maybe

young knoll
#

What

#

Like a speed potion?

shadow tide
#

whats something I can use to post a screenshot?

quaint mantle
ivory sleet
#

imgur

young knoll
#

Imgur

paper viper
young knoll
#

Don't think so

#

Hence setItemMeta

ivory sleet
#

Yeah it is

paper viper
#

Yes as in mutable?

quaint mantle
#

it is mutable

paper viper
#

Yeah

ivory sleet
#

But iirc spigot goes through some parsing with strings and what not when using itemmeta thus slow

quaint mantle
#

but itemstack returns a copy for some reason

shadow tide
paper viper
ivory sleet
#

I’m not entirely sure but I remember Auxilor told me

blazing scarab
quaint mantle
ivory sleet
#

?paste

undone axleBOT
shadow tide
shadow tide
quaint mantle
#

we need code

paper viper
#

^

#

stacktrace cant do anything without code

ivory sleet
#

Instantiate is when you call new ClassName()

shadow tide
#

cool

ivory sleet
#

Creating an instance of a class basically

quaint mantle
shadow tide
paper viper
#

lmao

#

it doesnt tell anything about which is the backbone issue (like it tells you what var is null, but you have to look at code to see what could make it null)

#

but you should still use java 16

#

lmao

quaint mantle
ivory sleet
#

Real chads use java 17 😎

shadow tide
#

what

#

huh

quaint mantle
#

send PluginCommands

shadow tide
#

k

quaint mantle
#

you gotta learn to read stack traces

shadow tide
paper viper
young knoll
#

Wait until they add something crazy like string interpolation in java 37

quaint mantle
#

use a switch statement

shadow tide
#

?

quaint mantle
#
String a = "...";

switch (a) {
    case "hi":
        // Do something
}
ivory sleet
quaint mantle
#

instead of a bunch of if statements

paper viper
#

also they finally deprecated the applet api

shadow tide
paper viper
#

lol

#

also he wasnt talking to you

#

:oof:

shadow tide
#

ik

quaint mantle
#

I knew it!!!

#

Null instantiation exception

#

ItemManager's fields are null

#

didnt i already help you with this?

#

send the init method

shadow tide
shadow tide
paper viper
#

what

#

ok anyways

quaint mantle
#

didnt you use ItemManager.init

shadow tide
#

what

quaint mantle
#

?

shadow tide
#

sorry

quaint mantle
#

send itemmanager class

shadow tide
quaint mantle
#

send main class

paper viper
#

dude why is it all static

quaint mantle
#

^

shadow tide
#

because at the time I was following a stupid tutorial because it was my first time writing code for a plugin

ivory sleet
#

a stupid tutorial

#

Not bad admittedly saying it’s bad

paper viper
#

This isnt smthing just applied to plugins, its any sort of Java development or even in a more general scope, any OOP language

ivory sleet
#

Or well stopid

#

Static will limit Java’s power

shadow tide
#

should I remove all static in the class?

ivory sleet
#

If you use it erroneously

#

Ye

paper viper
quaint mantle
ivory sleet
#

πŸ––

quaint mantle
#

πŸ‘½

shadow tide
#

now, was static the problem? will it work now?

paper viper
#

No, its just bad code that you shouldnt be writing

#

and it can lead you to solving the issue

#

(for example, initializing the items inside the constructor instead of a static method)

quaint mantle
#

;o

shadow tide
#

k

ivory sleet
#

Nope but it will help you on the way, simply just trying to solve the problem at hand without resolving possible enhancements of code and design will lead to badly stretched design of your project ultimately making it unbearable once it expands.

quaint mantle
ivory sleet
hasty prawn
#

scandals in the minecraft dev community sj_freakouteyes

shadow tide
#

how would I initialize it, and in what constructor?

ivory sleet
hasty prawn
#

That's hilarious

shadow tide
#

GTG

ivory sleet
#

Cya

#

Ye lol dessie

hasty prawn
#

i like this site

ivory sleet
shadow tide
#

now I actually have to go

hasty prawn
#

wtf LOL

ivory sleet
#

🀣

quaint mantle
#

LMAO

opal juniper
#

lol

hasty prawn
opal juniper
young knoll
#

Really is a good generator

#

β€œTrent removes compatibility between Bungeecord and Bungeecord by request of Choco”

ivory sleet
#

πŸ˜‚

opal juniper
#

Bungeecord no longer supports bungeecord PepeHands

#

i can see it

#

why does spigot use jira πŸ€”

young knoll
#

β€œMojang is not updated for the latest version of Minecraft”

young knoll
quaint mantle
#

Hello does i can get all offlineplayers?

#

i tried Bukkit.getOfflinePlayers() {

#

not works for me

#

for (Player players : Bukkit.getOfflinePlayers() {
}

chrome beacon
#

Well offline players are offline players and not players

#

That loop won't work

quaint mantle
#

i need to use OfflinePlayer players : etc..

#

?

chrome beacon
#

Yes

quaint mantle
#

well ty

lusty bramble
#

I'm looking for an experienced Minecraft server developer for hire and I'm struggling as to where to find one. If you are a developer for hire please let me know! STAFF: If this is not where I should should send this kind of stuff I'm sorry.

young knoll
#

?services

undone axleBOT
lusty bramble
#

Thank you!

quaint mantle
#

k

#

so

#

to remove perms from someone its just

#

PermissionAttachment#setPermission("my permission node here", false);

#

yes?

young knoll
#

Are you managing adding them?

quaint mantle
#

yeah

young knoll
#

Hmm

#

I know you can set them to true false and none with most permission plugins

#

But none isn’t a Boolean

#

Is there a removeAttachment

quaint mantle
#

okay so kinda

#

you have to PermAttachment#setPermission().. for it tow ork

young knoll
#

I see

#

This is why I don’t manage my own permissions

quaint mantle
#

Β―_(ツ)_/Β―

#

it doesnt really matter that much, it works with just setting it to false from what i can see

#

i'll just p.removeAttachment though XD

#

AFTEr setting to false

pliant flame
#

Can armor stands cause a lot of lag. Like if you@plan to make all your mobs with custom models for an MMORPG with model engine, will it lag a lot. Even worse than particles?

gaunt saffron
#

how do i run worldborder commands? is there a way? to get size and add to it?

young knoll
#

From code?

gaunt saffron
#

yes

#

i need battle roylae thingy and cant find code to yoink

young knoll
pliant flame
#

Hmm

young knoll
#

WorldBorder is the class iirc

gaunt saffron
#

oh, thanks good

woeful crescent
#

Would it be possible to do this with a fake entity (entity id only)?

white salmon
#

ayuda

#

no me deja spaunear un npc

#

me dice el numero de id no es un numero

ivory sleet
#

Use English

#

If you don’t know English good, a translator may be helpful

white salmon
#

a soy espaΓ±ol

#

They can help me, I try to respawn an npc but it won't let me say hey the inserted number / id does not look like a number

woeful crescent
#

@white salmon trancudar con https://deepl.com

See why millions translate with DeepL every day. Fast, accurate, and secure – translate texts and full document files instantly. Currently supported languages are: Bulgarian, Chinese, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Latvian, Lithuanian, Polish, Portuguese, Romanian, Russian, ...

#

ademas yo hablo espanol muy poquito

shut wave
#

he's saying that he can't spawn an npc

woeful crescent
#

yeah

#

maybe he's looking at the UUID

shut wave
#

couse of the number

#

but what number

woeful crescent
#

@white salmon muΓ©stranos tu problema a travΓ©s de una imagen

#

@white salmon ΒΏbuscas el id numeric ode la entidad?

shut wave
#

well i need to know if there's any way to change the spawn tick rate or something like that

#

like difficulties do

gaunt saffron
#

disclaimer i suck in java

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e) {
        if (firstplayer == true){
            System.out.println("test, first player");


            Bukkit.getScheduler().runTaskLater(this.plugin, () -> {

                // say a message
                Bukkit.getServer().broadcastMessage(ChatColor.AQUA + "Welcome and Good luck1 !");

            }, 15*20);
            
            Bukkit.getScheduler().runTaskLater(this.plugin, () -> {

                // say a message
                Bukkit.getServer().broadcastMessage(ChatColor.AQUA + "Welcome and Good luck2 !");

            }, 15*20);

        }

        firstplayer = false;


    }

how would i resolve a promise? or whatever so the code luck2 runs 15s after code luck1? is there an easy to to add them? i basically want stuff to happen in predetermined intervals...

#

i basically want - time - code1 -time -code2 - time - code3 - etc

hasty prawn
#

?scheduling

undone axleBOT
vernal pier
#

== true best condition

shadow tide
#

Hi I'm back

quaint mantle
#

Small question, I created npc with nms. If the npc despawns can I respawn the same npc again ? Currently I save the npc object on db not sure if it's possible to query db to respawn it when needed.

shadow tide
#

?paste

undone axleBOT
shadow tide
#

help

quaint mantle
#

Item is null. Share code πŸ™‚

crude charm
#

@shadow tide ^

quaint mantle
#

so how can i make UFOs

#

im jk

#

just make an entity model and set velocity

last ledge
#

This is my main class where i am not able to import that event class

`package smp.heart.heartsmp;

import org.bukkit.plugin.java.JavaPlugin;
import smp.heart.heartsmp.commands.FragmentCommand;
import smp.heart.heartsmp.commands.ItemCommands;
import smp.heart.heartsmp.commands.withdraw;
import smp.heart.heartsmp.events.Heart;
import smp.heart.heartsmp.events.Killevent;
import smp.heart.heartsmp.items.ItemManager;

public final class HeartSMP extends JavaPlugin {

@Override
public void onEnable() {
    ItemManager.init();
    getCommand("giveheart").setExecutor(new ItemCommands());
    getCommand("giveheartfragment").setExecutor(new FragmentCommand());
    getCommand("heartwithdraw").setExecutor(new withdraw());
    getServer().getPluginManager().registerEvents(new Heart(), this);
    getServer().getPluginManager().registerEvents(new Killevent(), this);
    getServer().getPluginManager().registerEvents(new smp.heart.heartsmp.events.withdraw());
    System.out.println("Heart SMP plugin Enabled!!!");
    // Plugin startup logic

}

@Override
public void onDisable() {
    System.out.println("Heart SMP plugin Disabled!!!");
    // Plugin shutdown logic
}

}
`

#

Please help

#

i am not able to import Event class to my main class

paper viper
#

please use a pasting site

#

?paste

undone axleBOT
paper viper
#

And where is the line of error

#

for that you cant import event class

last ledge
paper viper
#

Wdym why?

last ledge
#

getServer().getPluginManager().registerEvents(new

#

this way

paper viper
#

can you show me your withdraw class?

#

i want to make sure the package declaration is correct

last ledge
#

here

paper viper
#

try adding the this part

shadow tide