#help-development

1 messages ยท Page 1739 of 1

last ledge
#

so i dont add anything in event class?

echo saddle
#

then when you load the plugin that shoudl show up in the log

#

what event class?

last ledge
#

CreeperDeathEvent

echo saddle
#

you have an event class, you are not registering it itn onEnable()

last ledge
#

i did register already ๐Ÿ™‚

echo saddle
#

ok, so you need the actual class (you can paste that as well)

#

but in the main, you have to register it

last ledge
#

?paste

undone axleBOT
echo saddle
#

that was empty

last ledge
#

i am having problems in event class ๐Ÿ™‚ when creeper dies zombie doesnt spawn

echo saddle
#

just fyi, Spigot has some good support

#

we have a Wiki section on the main website

#

here you can find nice info

#

which talks about how to setup event handling

last ledge
#

sir, i know how to use it, but this specific zombie spawning is not working, can you please look upon my code and say if there is any mistake i did or not ๐Ÿ™‚

echo saddle
#

but i digress

#

in your main

rigid hazel
#

I have this now:

Yadel:
  inventory:
    lumberjack:
    - null
      ...
ArrayList<ItemStack> content = (ArrayList<ItemStack>) this.c.getList(this.guild.getGuildName() + ".inventory" + "." + type);
``````[12:46:49 ERROR]: Could not pass event BlockBreakEvent to CimeyRolePlay v1.1.0
java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.size()" because "content" is null
        at de.cimeyclust.utils.guilds.GuildInventoryManager.loadInventory(GuildInventoryManager.java:59) ~[CimeyRolePlay-1.1.0.jar:?]```
echo saddle
#

you need to register the events

rigid hazel
#

@noble lantern Why content is now null?

last ledge
#

sir, i already registered on my main class ๐Ÿ™‚

#

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

echo saddle
#

yeh

noble lantern
last ledge
#

i have already registered dude

noble lantern
#

if null, continue and load next item

rigid hazel
echo saddle
#

any it not workign?

rigid hazel
last ledge
noble lantern
echo saddle
#

ah, so do you know that it is hitting your event handler?

noble lantern
#

If its null just ignore it

last ledge
noble lantern
#

And possibly add a method to remove hte null value from your config

echo saddle
#

put in some log messages to see that it is hitting inside your event handler

rigid hazel
echo saddle
#

yas

#

๐Ÿ˜„

last ledge
#

thats what i was asking, how do i make logger message in my event class ๐Ÿ™‚

echo saddle
#

hmm ,it not working?

last ledge
#

no

echo saddle
#

remove logger = plugin.loger();

vague oracle
#

I sent you the code to log a line

last ledge
noble lantern
#

ItemStacks cannot be null, hence why you have that error

echo saddle
#

should just be logger = plugin.getLogger();

#

where is the paste for the handler?

last ledge
#

here sir

echo saddle
#

the handler, not the main class

last ledge
echo saddle
#

for both CreeperDeathEvent and CreeperBlow

last ledge
#

CreeperBlow is working

#

only CreeperDeathEvent is not

echo saddle
#

lol

#

implements Listener

#

you need this in your main

last ledge
#

bruh

echo saddle
#

public final class BossMobs extends JavaPlugin {

#

should be

#

public final class BossMobs extends JavaPlugin implements Listener {

last ledge
#

bruh

echo saddle
#

๐Ÿ˜„

last ledge
#

i have seperate classes for events

#

i dont do all stuffs in main itself

dire marsh
#

implement listener on the event classes then

last ledge
#

can u just see my paste

#

above?

echo saddle
#

no where?

noble lantern
#

this class

echo saddle
#

hmm

#

I still put in main

noble lantern
#

Wait so what even is the issue here?

#

I dont mean to intrude but i see you all have been working on this for a while

last ledge
# echo saddle no where?

bro I, swear, ah the way you are talking, the peacefully you are talking, dont mind me but i think you are high.

echo saddle
#

he's not getting into the event

last ledge
#

sorry if i sounded rude ^^

echo saddle
#

soz, i scrolled up and saw main not the event part, but i found it

#

not and not hgh, just a bit of wine ๐Ÿ˜„

last ledge
#

i already pasted event class 4th time

echo saddle
#

i found it

last ledge
echo saddle
#

not to worry

last ledge
#

i knew it

echo saddle
#

just you linked to the main nto the event

last ledge
#

i grab people in their chat itself

echo saddle
#

but nvm

#

what happens if you put in the implements Listener intot he main

last ledge
#

listener is for events

#

and i dont do events on my main

#

oh my freaking goddd

noble lantern
last ledge
#

its not working

echo saddle
#

ok well, you have yet to show me that you can throw a message to the logger in your event

last ledge
#

idk why

dire marsh
#

did you put some debug before your if statement

echo saddle
#

so ,i'mt at a loss,

last ledge
#

get some rest

#

and come back when u r fresh

noble lantern
noble lantern
last ledge
#

?paste

undone axleBOT
dire marsh
#

also I presume EntityExplodeEvent would be called instead of death if a creeper explodes?

last ledge
echo saddle
#

plus you need to import logger into your event code as a static

last ledge
echo saddle
#

well maybe not

rigid hazel
#
ArrayList<ItemStack> content = (ArrayList<ItemStack>) this.c.getList(this.guild.getGuildName() + ".inventory." + type);
        ItemStack[] items = new ItemStack[content.size()];
        for (int i = 0; i < content.size(); i++) {
            ItemStack item = content.get(i);
            if (item != null)
            {
                items[i] = item;
            }
        }
        Inventory inventory = Bukkit.createInventory(new GuildInventory(), 54, type + "-Inventory von " + this.guild.getGuildName());
        inventory.setContents(items);
        return inventory;
dire marsh
#

@last ledge are you making the creeper explode or not

rigid hazel
#
java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.size()" because "content" is null```
rigid hazel
#

I still have this error with the code.

dire marsh
#

You need to listen to EntityExplodeEvent

rigid hazel
#

Even if ignore a null item completely

noble lantern
#

You might need to listen to both events

last ledge
#

it worked

dire marsh
#

you need to listen to both if you want to catch all creeper deaths

noble lantern
last ledge
#

man u r saviour

echo saddle
#

you can import static frolic.bosmobs.logger;

last ledge
#

oh my frekaing goddddddddddd

#

can u stop ur logger

#

pls

#

for god sake stop your loger

dire marsh
last ledge
#

if u say loger one more time

#

then imma

#

ijfir

#

og

echo saddle
#

./kick

#

look dude, don't be rude, i'm just trying to help you

last ledge
echo saddle
#

maybe you need to communicate what your issue is more clearly

last ledge
#

i was just irritated with the word "logger"

noble lantern
#

back to work on mah dragon ball z plugin ping me if someone needs help

echo saddle
#

if it is not the basics of the event is not being reached then the next conclusion is that the event is wrong

#

but we have to go through the process

last ledge
#

and now when Creeper dies it spawns Zombie as intended

echo saddle
#

yes, because it wasn't the correct event to begin with

last ledge
#

yes sir, my bad ^^

#

thank you so much for helping me

echo saddle
#

well sorry for the bottoms up analysis, should have just looked at the event

last ledge
#

ah how do i edit my inventory from another class ?

echo saddle
#

but if I didn't explain how to paste code, no one else would understand

last ledge
#

ah sir if u dont know

#

then i had already pasted the code, before even u said

echo saddle
#

as my bad then

noble lantern
echo saddle
#

i'm quite tired, it's 4am, just trying to help another dev out.

noble lantern
echo saddle
#

yeh, don't know why i'm even back on this discord

#

other than folks complaining about my plugins

rigid hazel
#

I worked one time:

[13:09:51 INFO]: [CCRP] is correct block
[13:09:51 ERROR]: Could not pass event BlockBreakEvent to CimeyRolePlay v1.1.0
java.lang.NullPointerException: Cannot invoke "java.util.ArrayList.size()" because "contents" is null
        at de.cimeyclust.utils.guilds.GuildInventoryManager.loadInventory(GuildInventoryManager.java:60) ~[CimeyRolePlay-1.1.0.jar:?]
```But then I got the error again.
```java
ArrayList<ItemStack> contents = (ArrayList<ItemStack>) this.c.getList(this.guild.getGuildName() + ".inventory." + type);
        ItemStack[] newContent = new ItemStack[]{};
        for(int i = 0; i < contents.size(); i++)
        {
            if(contents.get(i) != null)
            {
                newContent[i] = contents.get(i);
            }
        }
        Inventory inventory = Bukkit.createInventory(new GuildInventory(), 54, type + "-Inventory von " + this.guild.getGuildName());
        inventory.setContents(newContent);
        return inventory;
echo saddle
#

well good luck then

noble lantern
last ledge
#

so my question is

#

how do i import my inventory from another class

#

to reopen it

echo saddle
#

well, yeah.

#

duh.

#

๐Ÿ˜„

noble lantern
echo saddle
#

o fudge, maybe i can just remove all my plugins from spigot

quaint mantle
#

how to change target block of an entity
i mean where the entity is going

noble lantern
last ledge
chrome ferry
#

yeah just

#

open it back up a tick later

noble lantern
#

Soon ill make this new plugin im working on public its gonna be badass

echo saddle
#

menus are a pain

chrome ferry
#

menus are easy af

noble lantern
chrome ferry
#

(when using my menu framework)

noble lantern
#

e.setCanceled

last ledge
#

so my question is how do i import my inventory from another class to my event class?

echo saddle
#

no they aren't, it's more complex that is thought

chrome ferry
#

if u use a well built framework

noble lantern
chrome ferry
#

then its really easy

#

i can do animations in mine

#

and paged systems

echo saddle
#

did you know you can have an menu (container) that is open by two persons?

chrome ferry
#

yeah?

echo saddle
#

yeh

last ledge
# chrome ferry yeah?

so my question is how do i import my inventory from another class to my event class?

noble lantern
#

e.setCancelled

last ledge
chrome ferry
#

basically

last ledge
#

u cant cancel inventory close event

noble lantern
chrome ferry
#

one tick later

#

open it again

#

and to check if the inventory is that inv

#

you can use a InventoryHolder

noble lantern
#

^

last ledge
#

impossible to cancel inventory close event

noble lantern
#

You can store the inventory using e.getInventory iirc

echo saddle
#

you now guys, i haven't looked at spigot code in 6 months

last ledge
noble lantern
chrome ferry
#

so you cant cancel it, it doesn't implement cancellable

rigid hazel
#
public Inventory loadInventory(String type)
    {
        ArrayList<ItemStack> contents = (ArrayList<ItemStack>) this.c.getList(this.guild.getGuildName() + ".inventory." + type);
        List<ItemStack> items = new ArrayList<ItemStack>();
        for(ItemStack content : contents)
        {
            if(content != null)
            {
                items.add(content);
            }
        }
        Inventory inventory = Bukkit.createInventory(new GuildInventory(), 54, type + "-Inventory von " + this.guild.getGuildName());
        inventory.setContents((ItemStack[]) items.toArray());
        return inventory;
    }
```I will try this now @noble lantern
last ledge
noble lantern
#

InventoryCloseEvent
e.getInventory
one tick later
open inventory to player

chrome ferry
#

so u cannot cancel it

#

InventoryEvent also doesn't implement cancellable either

noble lantern
#

yee i had to of mixed it up with something else i was doing

chrome ferry
#

so idk why how u did InventoryCloseEvent#setCancelled

#

ah

#

was u confused with clickEvent?

noble lantern
noble lantern
chrome ferry
#

Ye

#

Thats what i did with mine

echo saddle
#

what does your event provde?

noble lantern
#

ah yep i did have it confused with that

chrome ferry
#

ew

#

u used "e"

#

dont use one letter variables

#

its bad practice

echo saddle
#

wait, so event gives you the inventory you want or you want another inventory?

noble lantern
#

Meh fine for me im the only contributer on this project

chrome ferry
#

so?

#

its bad practice

noble lantern
echo saddle
#

i'm confused

noble lantern
#

and Events is the only place one letter variables are used in this project

#

Exceptions are either ex or ignored on here

last ledge
chrome ferry
#

I know, but having one letter variables is very bad practice

#

you should at least use full letter variables which are short

#

like for example if you have InventoryMenuContainer, i would name it invMenu

noble lantern
echo saddle
#

What you are trying to get from the inventory

chrome ferry
#

Well do it in the future

noble lantern
#

๐Ÿ˜‚

chrome ferry
#

nah do it in the future for new projects

#

shit wrong person

#

@echo saddle

#

do something similar to that, on close wait a tick

#

open it up again

noble lantern
chrome ferry
#

i mean

#

not really

noble lantern
chrome ferry
#

2k lines is nothing tho

chrome ferry
#

lmao

#

no documentation whatsoever

noble lantern
echo saddle
#

ok nvm, my opinion is crap

#

good luck with that

noble lantern
chrome ferry
#

nah not even a github

#

i might make it public if i can be arsed lmao

noble lantern
#

kinda like that lambda interface right there, pretty sexy

#

fair enough

chrome ferry
#

there is way more

last ledge
#

how to open one tick later inventory?

chrome ferry
#

its not that hard

#
@EventHandler
public onInventoryClose(InventoryCloseEvent event) {
    Inventory inv = event.getInventory();
    // do your check for the inv here
    Bukkit.getScheduler().runTaskLater(plugin, () -> event.getPlayer().openInventory(inv), 1);
}
noble lantern
last ledge
#

i havent used it

noble lantern
#

but TBF you might not even need it for this idk

barren nacelle
#

its not that its just a vegan teacher POV ๐Ÿ˜‚

chrome ferry
#

like i shown above

last ledge
#

Bukkit.getScheduler().runTaskLater(plugin, () -> event.getPlayer().openInventory(inv));

#

plugin word is throwing error

chrome ferry
#

because you need ur plugin instance

#

cmon man, its not rocket science

#

do you even know basic java?

last ledge
#

just tell me how to do it

#

dude

barren nacelle
noble lantern
chrome ferry
#

if you dont know

#

how to get your plugin instance...

last ledge
#

ik

#

bruh

chrome ferry
#

and also extend my APIBase

barren nacelle
chrome ferry
#

which, that event wont be in ur main

#

because thats stupid

barren nacelle
#

Ok

chrome ferry
#

you can either do two ways

#

save your instance statically in your plugin class

noble lantern
chrome ferry
#

or pass it through all the classes when needed

#

this is one of my main classes for one of my plugins

barren nacelle
chrome ferry
#

pretty sexc

echo saddle
#

I do something like this

#
            @Override
            public void run() {
                menu.show(player, page);
            }
        }.runTaskLater(plugin, 1);```
chrome ferry
#

so much more cleaner

last ledge
#

no suitable method found for runTaskLater(frolic.kingdomplugin.events.Closeinventory,()->event.[...](gui))

chrome ferry
#

than u using an anonymous class

chrome ferry
#

ur saying ur plugin is an event?

#

put your plugin instance, not the class its in

last ledge
#

ye i did this

chrome ferry
#

yah

#

thats wrong

#

its not in your main class

#

for example in your main class have a field

public static MAIN_CLASS_NAME INSTANCE;

noble lantern
chrome ferry
#

then in your enable, set INSTANCE = this

last ledge
#

i jave already dont it leme showu

chrome ferry
#

then in your disable set INSTANCE = null

last ledge
#

?paste

undone axleBOT
last ledge
#

see i have already made an instance

chrome ferry
#

yeah do that then and use ur getter

#

BossMobs.getInstance()

#

set ur instance to null in the disable please

noble lantern
chrome ferry
#

i dont understand

#

i have a custom abstraction class named OlziePlugin

#

then that extends and implement other classes

#

and also extends JavaPlugin

noble lantern
#

ohhh i see now nvm

#

was about to say damn i can make my shit so much more organized cause my onEnable method is just shitloads of initializers

chrome ferry
#

Ohh

noble lantern
#

Like... this shits nasty asf lmao

#

Kinda need to store those events and cancel them in onDisable but meh later time

last ledge
#

i sent my wrong main class lamo

echo saddle
#

you color scheme is nasty

last ledge
#

?paste

undone axleBOT
noble lantern
last ledge
chrome ferry
noble lantern
#

i was actually gonna tell you off but, your right

last ledge
#

this is my main class

chrome ferry
#

kinda ugly

echo saddle
#

yeh

noble lantern
chrome ferry
#

man

#

u should use a custom event framework

#

automatically register events

#

like my command framework, holy fuck

#

that can load over 300 unique commands within seconds and literally execute one method for it

echo saddle
#

i use a custom color scheme

#
        if (economy.equalsIgnoreCase("vault")) {
            EconomyResponse withdrawResponse = econ.withdrawPlayer(player, world, amount);
            if (withdrawResponse != null && withdrawResponse.transactionSuccess()) {
                return true;
            } else {
                if (debug) {
                    logger.info("Warning! Vault could not withdraw from the buyer");
                    if (withdrawResponse == null) {
                        logger.info("Economy plugin response is null!");
                    } else {
                        logger.info(String.format("Economy plugin response type %s", withdrawResponse.type.toString()));
                        logger.info(String.format("Economy plugin response message %s", withdrawResponse.errorMessage));
                    }
                }
                return false;
            }
        } else if(economy.equalsIgnoreCase("tokenenchant")) {
            double tokens = te.getTokens(player);
            if (tokens >= amount) {
                te.removeTokens(player, amount);
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
#

lol

chrome ferry
#

seesssggg tgat arrow code

#

๐Ÿ˜ญ

echo saddle
#

well that sucks

chrome ferry
#

that amount of elses

#

i never use an else lmao

noble lantern
# chrome ferry i never use an else lmao

I could probably do the same thing if i modify my command api to be like spigots HANDLER_LIST and just add each class into the list and then loop through each and execute

chrome ferry
echo saddle
chrome ferry
#

yeah also i did lazy caching too

noble lantern
# echo saddle

Boi you talking how my color scheme is ugly and yours looks like almost all white xD

chrome ferry
#

with Configuration.getString() lmao

echo saddle
#

its not bad, would change the background color

chrome ferry
#

well

#

thats the default intellij color scheme

#

and tbh its ugly

#

i use material theme, premium

echo saddle
#

yeh

noble lantern
#

i cant even remember if my theme is default or not

#

i think i installed one a long time ago idk?

chrome ferry
echo saddle
#

I opt for a combi of light and dark

noble lantern
#

i code till like 5-7am i prefer dark modes

#

jesus thanks for the flashbang

chrome ferry
#

damn

#

i just use dark mode everything

noble lantern
#

i totally didnt just update my intellij from 2019 to 2021 a few hours ago

echo saddle
#

yeh, no, i like just in my code, you should see my sublime with my "synchonicity" theme

chrome ferry
#

its so annoying

noble lantern
#

might go look at intellij themes now

chrome ferry
#

but the other did i was doing some NMS and reflection

#

and i needed to decompile a class i think it was

noble lantern
chrome ferry
#

CraftSkullMeta

#

and i did it

#

and oh boy intellij was hungry

#

IntelliJ ate 6gb of my ram

#

and 50% of my cpu

#

it was a memory leak or something lmao

noble lantern
#

my intellij is kinda always hungry with this project open

chrome ferry
#

i mean same

#

but

#

SIX

#

gigabytes

#

of ram

noble lantern
#

Was it just the one file?

echo saddle
#

here it is

chrome ferry
#

yep

last ledge
#

@noble lantern come dm

chrome ferry
#

one file

echo saddle
noble lantern
#

had to of been a fatass file ngl

chrome ferry
chrome ferry
#

it was CraftSkullMeta

#

thats fine

#

i gave it 10gb of ram to eat up if it needs to

echo saddle
#

uh, yeh.

noble lantern
#

Try doing Player class now :kek:

chrome ferry
#

nah nah

#

do Material

echo saddle
#

hate material, i do like this color scheme i made tho

noble lantern
echo saddle
#

kinna reminded me of the colors on the cover of the Police: Synchronicity album

#

thus the name

chrome ferry
#

why

#

are

#

these

#

static

#

๐Ÿ˜ฉ

#

thats not a util class

echo saddle
chrome ferry
#

alright well i am off

#

gonna play some gta v

echo saddle
#

yeh, gotta go play some skyfactory-one, and bug darkosto about bugs

#

but before I go...

#

!spacex

undone axleBOT
#

A Spacex Falcon 9 is scheduled to launch Crew-3 from KSC LC 39A in 10 days 18 hours 32 minutes.

chrome ferry
#

gta v :))

#

ah yes

echo saddle
#

you have a gta v server?

chrome ferry
#

no

#

its not fivem lmao

echo saddle
#

:I

noble lantern
#

i would go play rust but

#

e f f o r t

chrome ferry
#

why do u think i own a server

echo saddle
#

we have a rust server, but it's down atm on comfy

chrome ferry
#

ah rip

#

i just realised

#

how many apps i have open

echo saddle
#

we are playing modpacks and the usual factorio stuff on our servers

noble lantern
#

someone ask for help i dont wanna work on this plugin rn

echo saddle
#

we might have valheim still running tho

chrome ferry
echo saddle
#

pm me if you want the url

chrome ferry
#

if i ever see that exact question

#

i will want to shoot myself

latent dove
#

hOw mAkE jAr fIlE in InTeLlIj

noble lantern
chrome ferry
#

me neither

#

lmfao

#

intellij is where its at

noble lantern
#

my answer would just be google

echo saddle
#

what, dont you use netbeans?

chrome ferry
#

nah

#

netbeans like

#

it is a bit sus

noble lantern
#

:out:

echo saddle
#

oof, don't tell the orange dude that

chrome ferry
#

oh shit

#

i cannot use custom emojis either

#

just realised

echo saddle
#

netbeans is like sus md_5

#

should buy him a sub to jetbrains enterprise.

latent dove
#

am i just dumb

#

how to makr jars

#

in intelkij

noble lantern
#

im out

chrome ferry
#

gta v ๐Ÿ˜ฉ

chrome ferry
#

please tell me ur joking

echo saddle
#

depends on whether you use maven or gradle or intellij artifacts

latent dove
#

but i want to use intellij artifacts

noble lantern
#

ngl i was kinda enjoying gradle for the short time i was using it

echo saddle
#

yeh, its not that hard then

chrome ferry
#

WHY intellij

#

artifacts

noble lantern
chrome ferry
#

use a project manager

#

like maven or gradle

noble lantern
#

soooooo much more complicated using the intellij artifacts

latent dove
#

TELL ME HOW TO JUST MAKE ARTIFACTS

#

GOD DAMN IT

#

oh shit

noble lantern
#

never

latent dove
#

WSTIL

#

tell me how to mKAE ARTIFCATS

#

OR I TELL AFGHANISTAN TO BOMB UR HOUSE

chrome ferry
#

partyyyy

echo saddle
#

upper right, gear, dont' go into settings, but go into project structure

#

select Artifacts under Project Settings

noble lantern
chrome ferry
echo saddle
#

Click the + key

latent dove
noble lantern
echo saddle
#

Select Jar

latent dove
#

what jar

echo saddle
#

from modules with dependencies

chrome ferry
#

thats the wrong bit

#

man

#

just use maven

echo saddle
#

pick your main class, should be in your code

#

click ok

latent dove
#

how to build artifcats

#

whats the key

noble lantern
#

lowkey forgot how to even do intellij artifacts theyre kinda not good

echo saddle
#

click on the little check box that says include in project build

#

click apply

latent dove
#

oh

#

i did it

noble lantern
latent dove
#

thank

latent dove
noble lantern
#

its so much harder to shade/import in dependencies using the artifacts

latent dove
#

what does that mean

#

as i junior

#

i do not udnerstand

noble lantern
#

just google it

echo saddle
#

you could setup your project using maven or gradle

noble lantern
#

^

chrome ferry
#

yeah

echo saddle
#

its much more complex to etup

chrome ferry
#

please

#

do

echo saddle
#

setup

chrome ferry
#

nah

latent dove
chrome ferry
#

its really not

noble lantern
#

Spigot forums has a super simple copy pasta for maven

latent dove
#

$ sudo apt deny-all

echo saddle
#

and shading meands including jars in your plugin that you can access but doesn't conflict with other jars available in the java classpath

noble lantern
#

oh god for a sec i thought i was in papermc and i was gonna get roasted for a spigot link

#

i was like shit better delete that

echo saddle
#

we must ban you now for saying the p-word

#

nice knowing you

latent dove
#

what

noble lantern
#

But i love paper

#

i love paper cuts

#

i love the smell of paper

#

I love writing down notes on paper

echo saddle
#

where is that auto-kick bot, slacking off again.. . reee

noble lantern
#

@spare hull kick me you wont

#

see

#

scared little bot

echo saddle
#

/8ball

#

/8ball will you kick Icky?

noble lantern
#

jtx you been typing a while you okay?

latent dove
#

why kick me

echo saddle
#

!8ball will you kick icky?

latent dove
#

dyno is disabled

echo saddle
#

hmm

#

!help

noble lantern
#

sheesh im almost at 2k messages in here

echo saddle
#

!fortune

#

bot is dead?

#

!spacex

undone axleBOT
#

A Spacex Falcon 9 is scheduled to launch Crew-3 from KSC LC 39A in 10 days 18 hours 17 minutes.

echo saddle
#

well i guess the SpaceX bot still works

proud basin
noble lantern
echo saddle
#

wait wasn't there a command to show quotes?

#

!help

noble lantern
#

wym

echo saddle
#

there is a bot command to show last iportant quote by a member

noble lantern
#

oh idk

echo saddle
#

?help

undone axleBOT
#
CafeBabe Help Menu
*Red V3*
**__Admin:__**

selfrole Add or remove a selfrole from yourself.

**__Cleanup:__**

cleanup Base command for deleting messages.

**__Core:__**

embedset Commands for toggling embeds on or off.
info Shows info about CafeBabe.
licenseinfo Get info about Red's licenses.
mydata Commands which interact with the data CafeBabe has about...
set Commands for changing CafeBabe's settings.
uptime Shows CafeBabe's uptime.

**__Downloader:__**

findcog Find which cog a command comes from.

**__Mod:__**

names Show previous names and nicknames of a member.
userinfo Show information about a member.

**__ModLog:__**

listcases List cases for the specified member.
reason Specify a reason for a modlog case.

**__Permissions:__**

permissions Command permission management tools.

noble lantern
#

i just hop in here every few months and help people then ghost chat

echo saddle
#

maybe it's changed

#

used to be able to see how much you have been chatting too

#

?userinfo

undone axleBOT
#

Playing: wine64-preloader

Joined Discord on

<t:1486626330>
(<t:1486626330:R>)

Joined this server on

<t:1585771062>
(<t:1585771062:R>)

Role

<@&695824786605080576>

noble lantern
#

oh you can just ctrl f for that

#

?userinfo

undone axleBOT
#

Playing: IntelliJ IDEA Ultimate

Joined Discord on

<t:1550095582>
(<t:1550095582:R>)

Joined this server on

<t:1612333145>
(<t:1612333145:R>)

Role

<@&695824786605080576>

Previous Names

DJ D B w/ A CD ft. CBT, D B

noble lantern
#

uhm

#

dont look

#

at those previous names

echo saddle
#

dalton,sounds country-sexy

quaint mantle
#

Hey guys wonder if we compare 2 worlds is laggy than compare 2 world's names?

latent dove
#

?userinfo

undone axleBOT
#

Playing: JetBrains IDE

Joined Discord on

<t:1618568172>
(<t:1618568172:R>)

Joined this server on

<t:1634296713>
(<t:1634296713:R>)

Role

<@&695824786605080576>

quaint mantle
#

?userinfo 486203444709949450

undone axleBOT
#

Member "486203444709949450" not found.

noble lantern
young knoll
#

You could compare UUIDs if youโ€™re really concerned

noble lantern
#

^

quaint mantle
#

as think it maybe need to get each element of the world, and more stuff to compare. not like string only get name of the world

echo saddle
#

lol i guess i joined april fools like all the other folks who were on IRC

latent dove
#

im teaching a local AI to learn how to write code as i give it comments

#

so far i made it type "c"

quaint mantle
noble lantern
#

You can compare World UUID if you are concerned like Coll said

echo saddle
#

hmm

quaint mantle
echo saddle
#

oh shoot 5am

#

i need to get a beer

latent dove
#

now i quit

quaint mantle
#

hey, what plugin do people usually use for /warn? i'm trying to hook into it for something

latent dove
#

advancedban

noble lantern
#

What are you trying to hook into it for?

#

gah discord lag

latent dove
#

some1 teach me java

#

ehm

noble lantern
latent dove
#

MINING AWAY

#

im bored

quaint mantle
#

I have essentials (and vault to access it) but it doesn't have /warn. Is it one of their other addons e.g essentials protect? @noble lantern

latent dove
#

ADVANCED

#

BAN

#

give

#

me

#

like

#

attention

echo saddle
latent dove
#

900328581526351902

#

^ worst thread

noble lantern
noble lantern
latent dove
#

nodejs is ballshit

quaint mantle
#

yeah it doesn't have /warn :/ I guess people most likely use advancedban like icky mentioned, thanks guys :D

echo saddle
#

watch the video

noble lantern
noble lantern
trail flume
#

Hiya, I'm having a problem: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
I'm using the Worldedit API , how can I fix this?

noble lantern
#

im literally getting triggered by this video ngl

latent dove
#

virginia

noble lantern
trail flume
#

Maven

lost matrix
trail flume
#

Wdym?

noble lantern
lost matrix
#
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.20</version>
      <scope>provided</scope>
    </dependency>
#

Example

echo saddle
#

he's joking

echo saddle
#

this is one of the most funniest posts i've ever encountered as a dev...

noble lantern
latent dove
#

thnk u

echo saddle
#

this is not how you PR

ancient plank
echo saddle
#

my bad.

latent dove
#

guys do i do it

noble lantern
#

why?

latent dove
#

tell me

#

yes or no

#

i ran it

#

WTF

#

OH SHIT

#

WHAT IN THE F

echo saddle
#

u unlucky

latent dove
#

oiJFOTEGY8RG

#

u gotta go senpai mode now

#

ow my gawd senpaii

echo saddle
#

well shoot, 5am, i'm prone to be a bad influence

peak depot
#

anyone know how use the HoverEvent in bungeecord with the show text action?

latent dove
#

my faowkin luck iis shait senpaii uwu

echo saddle
#

dude, langwage

latent dove
#

ok senpaiii UwU

lavish wave
#

When I use "spigot.yml", "bukkit.yml", "paper.yml" and "purpur.yml" in my plugin. It dont work

chrome ferry
#

bruh no

#

thats wrong

#

its the plugin.yml

#

spigot.yml, bukkit.yml, paper.yml is for the server implementation

lavish wave
#

But I want to make it Spigot and Bungeecord support

chrome ferry
#

Okay? so create a plugin.yml for bukkit, spigot, etc...

#

then create a bungee.yml for bungeecord

lavish wave
#

oh

chrome ferry
#

and you have a main in both of those files which chooses what main classes is for what

#

When creating those types of plugins, i normally have a Spigot module, a BungeeCord module and a Core module

rancid pine
#

How can I unregister a vanilla event?

chrome ferry
#

a vanilla event?

rancid pine
#

Iโ€™m trying to make my own playerjoin event when a player joins the server but I added it and there is still the minecraftโ€ player joined the gameโ€

#

Maybe not vanilla but just like default events

chrome ferry
#

Oh easy

#

PlayerJoinEvent

#

and then set the join message to null

rancid pine
#

Ohh ok Iโ€™ll try it thanks

quaint mantle
#

is there a way to spawn a floating leash? or not make the leash unleash from an entity?

acoustic widget
#

Anyone know how to fix configurations.runtime call here for gradle 7.2 ?

    from {
        configurations.runtime
    }
    include("spigot-" + project.property("apiversion") + ".jar")
    rename("spigot-" + project.property("apiversion") + ".jar", "server.jar")
    into "testserver/"
}```

> Could not get unknown property 'runtime' for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
hybrid lake
#

hi, is allowed to host Spigot (with NMS and OBC) on private Maven Repository?

chrome ferry
#

yeah

#

probably

dull sparrow
#

Hi, I am trying to trace/render the pathfinder "path" of an entity using blocks. I have a location the entity is trying to reach as i've set its pathfindergoal to that location, I was wondering how it's possible to draw a path from where the entity is to the path it's taking to get to its target..? (Version 1.17)

acoustic pendant
#

Is there any thread about custom events?

chrome ferry
#

yea

acoustic pendant
#

ty

chrome ferry
#

up to u

muted sand
#

Is it better to have a big large fat plugin doing everything my server needs to, or is it better splitting it up to mutiple plugins?

chrome ferry
#

have a core, then "modules"

#

splitting them in plugins

#

but thats my opinion

muted sand
#

so the core would, be the core of my server with individual tasks within a "module"?

lost matrix
muted sand
#

how would one make a "module"? Is it any different from a plugin?

lost matrix
muted sand
#

ohh

#

alrighty, thank you!

burnt current
#

Hey quick question: I have created a custommob that follows the player who spawns it. To do this, I created the following command:

@Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if(sender instanceof Player) {
            Player player = (Player) sender;

            if(player.hasPermission("test.commands")) {
                CustomMob mob = new CustomMob(player.getLocation(), player);
                WorldServer world = ((CraftWorld) player.getWorld()).getHandle();
                if(args.length == 1) {
                    int number = Integer.parseInt(args[0]);

                    for(int i = 0; i < number; i++){
                        world.addEntity(mob);
                    }
                } else if(args.length == 0)
                    world.addEntity(mob);
            }
        }
        return false;
    }```

In the command, you can either specify no argument or an argument that must be a number. Depending on the size of the number, so many custommobs will be spawned. However, no matter what number I enter, only one custommob is spawned.
mob is spawned. Does anyone know how I can fix this?
eternal night
#

Adding the same entity multiple times should error concerning its uuid should be the same ?

trail flume
#

CommandBlock#setCommand(String command) seems to not be working, it's not actually setting the command. Any ideas?

eternal night
#

are you updating the block state

trail flume
#

Well I though I'd need to but I can't find how

eternal night
#

its a tile state

#

so just .update()

trail flume
#

oh ok ty

last ledge
#

I am in a awkward situation. I made a Gui which has many options, and option to go to another GUI. This Gui will appear when player joins the server for the first time, to basically choose teams, they wanna join. Before choosing the team they cannot close the GUI, or if they try, they will be be kicked of the server. This GUI has information about teams, and another GUI has options to choose team. so when players click on "choose teams" option to go to team choosing GUI they get kicked, how do i fix it?

tardy delta
#

why doesnt ImmutableMap.of supports more parameters?

ivory sleet
#

Well, you gotta stop somewhere

opal juniper
#

its 5 afaik

tardy delta
#

5 isnt that much

eternal oxide
#

its more than 4

tardy delta
#

lemme use the builder than ๐ŸŽƒ

opal juniper
#

what he said

ancient whale
#

Hi I'm running into an issue while trying to build, got this plugin from a previous dev and I can't figure out how to fix this Im using Intelij, Gradle
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider me.lucko.helper.plugin.ap.PluginProcessor not found

tardy delta
#

ugh is this good enough?

eternal oxide
#

looks good

last ledge
#

I am in a awkward situation. I made a Gui which has many options, and option to go to another GUI. This Gui will appear when player joins the server for the first time, to basically choose teams, they wanna join. Before choosing the team they cannot close the GUI, or if they try, they will be be kicked of the server. This GUI has information about teams, and another GUI has options to choose team. so when players click on "choose teams" option to go to team choosing GUI they get kicked, how do i fix it?

#

someone?

eternal oxide
#

seems pointless though

tardy delta
eternal oxide
#

when you open the second GUI, the first is closing

#

so yoru InventoryCloseEvent is firing

last ledge
#

ye thats what

#

i am confused how to fix it

last ledge
#
    @EventHandler
    public void onClose(InventoryCloseEvent event){
        Player player = (Player) event.getPlayer();
        if(event.getView().getTitle().equalsIgnoreCase("Willkommen auf ยงbHydramc.de")) {


            player.kickPlayer(ChatColor.translateAlternateColorCodes('&', "ยง7Du wurdest rausgeworfen\n ยง7Grund | ยง7Wรคhle ein Reich aus!"));
        }

        //player.openInventory();
        }

    }
#

where do i add

eternal oxide
#

Only kick them if they don;t have either of the inventories open

tardy delta
#

or check for that specific slot to override

#

๐Ÿคทโ€โ™‚๏ธ

#

hehe german

opal juniper
#

it seems like an extra step

last ledge
opal juniper
#

its not even less lines

unkempt citrus
ancient whale
#

From what I understood the dude before me used a plugin on Intelij it might be the cause of my issue ๐Ÿ˜’

tardy delta
opal juniper
#

???

eternal oxide
opal juniper
#

It still gets called 10 times

eternal oxide
#

if it is, don;t kick them

vague oracle
#

Also, why do you kick them, just open it again

last ledge
#

when i try to do it

eternal oxide
#

you can;t open an inventory in a close event

#

the javadocs tell you so

vague oracle
#

You can wait 1 tick?

eternal oxide
#

yes

#

but hsi issue is he wants to open a second inventory but he's not checking for the second inventory

#

he's just kicking them if the first closes

tardy delta
#

oh hmm

last ledge
#

player.hasinventoryopen exist?

tardy delta
#

cant you just put players is a set when they click on the choose team button and ignore that set in the inv close?

vale ember
#

hey, i am working on plugin that providing better way of creating commands (i know that there is similar things but still) and i made a sample, ill be glad if u check it and give some suggestions/advice about how to make it better, https://paste.md-5.net/onifirusik.java

eternal oxide
#

he only needs to add both his inventories to a Set, then on the close event, get the open inventory of the player and .contains on the Set.

#

if its not there then kick the player

ivory sleet
ivory sleet
#

Imo

vale ember
ivory sleet
#

Standard event system does that because itโ€™s the best alternative

eternal oxide
#
Set<Inventory> gui = new HashSet<>();
gui.add(inventory);```
ivory sleet
eternal oxide
#

you add the gui's you create

peak depot
#

anyone know how use the HoverEvent in bungeecord with the show text action?

tardy delta
#

yes

ivory sleet
quaint mantle
ivory sleet
#

Justify

peak depot
burnt current
tardy delta
#

can you spawn an entity with an uuid defined?

last ledge
#
    private boolean isSelected = false;

    @EventHandler
    public void onClose(InventoryCloseEvent event) {
        Player player = (Player) event.getPlayer();

        // so here you check if the proper gui was closed right?
        if (event.getView().getTitle().equalsIgnoreCase("Willkommen auf ยงbHydramc.de")) {
            // check if player did not select the item
            if (!isSelected) {
                player.kickPlayer(ChatColor.translateAlternateColorCodes('&', "ยง7Du wurdest rausgeworfen\n ยง7Grund | ยง7Wรคhle ein Reich aus!"));
            }
        }
    }
    
    //somewhere where you check if player clicked an item, add this
    isChecked = true;
    
}```
#

will this work?

#

@eternal oxide

near aurora
#

Hello, how can I make a username where I can hover over it?

eternal night
#

in general, you do not want to add the same instance of an entity multiple times

ivory sleet
tardy delta
eternal night
#

create the instance as often as you need it and add it after

near aurora
tardy delta
#

and uhh i guess that's chat

near aurora
eternal oxide
burnt current
ivory sleet
# near aurora Yeah

You probably have to cancel the chat event and send the message as a component manually where youโ€™ve added a hover event to all online players

tardy delta
#

i think you need to listen for the AsyncPlayerChatEvent and cancel it send a TextComponent with player.spigot() to all players that receive the chat

#

smh ๐Ÿ˜‚

ivory sleet
#

๐ŸŒž

vague oracle
#

Bukkit.spigot()

#

getServer()

eternal night
tardy delta
#

?

burnt current
eternal night
#

yea but world.spawn creates a new instace

#

you are trying to throw in the same instance of a mob

burnt current
#

oh ok

#

is there another way to do it?

eternal night
#

create the instance multiple times ?

#

you are already doing new CustomMob(bla,bla)

tardy delta
#

i got issues with mob uuids too

jovial nymph
#

i have a quik question. I am trying to clear the inventory of an player when he picks up an item and everything gets delete except the item he is picking up. Should i do it with an runnable or is there anything i can do. Event: EntityPickupItemEvent because old one got deprecated

round elbow
#

how can I link some object to a player?
I only know how to use HashMaps as something to link stuff
my question is
how to link BUT save the data even after server restarts/reloads or whatever

eternal oxide
#

If the event is cancellable, just empty the inventory, then let teh event run as normal. It will pickup after you clear

eternal night
#

or use a proper database ๐Ÿ™‚

hasty prawn
#

proper design? DansChamp

eternal oxide
jovial nymph
tardy delta
#

anyways to save data every 5 minutes, should i make a runnable with saves it bla bla bla and nothing else?

round elbow
tardy delta
#

is ondisable called on crash?

#

or when a monkey closes the console

jovial nymph
tardy delta
#

json can be handy

round elbow
#

thank you so much

#

what

#

when did this exist

jovial nymph
round elbow
#

why didnt no one tell me lmao

tardy delta
#

bcs pdc is advanced stuff ๐Ÿ˜ณ ๐Ÿ˜ณ ๐Ÿ˜‚

round elbow
#

uhh

#

seems like it

tardy delta
#

i dont even understand half of that tutorial

round elbow
#

especially that i haven't finished high school yet so i have no idea what some math stuff means when people use them

#

also the byte part

#

no idea what it does

tardy delta
#

bytes are mostly used in form of an array

round elbow
#

okay this is too complicated for me

#

is there another way to do this?
example: have more than 1 value in a HashMap
i know this sounds dumb but that is just an example

tardy delta
#

what are you even trying to save?

fringe hemlock
round elbow
hasty prawn
#

Why would you need to do that

round elbow
#

im making a waypoints plugin and i need to save multiple per player

#

depending on the max an admin would give per player to have

#

I already have the max integer command done
i just need some kind of dataCombiner to link all waypoints created by a player to them

tardy delta
#

unfortunatly java doesnt has structs

round elbow
#

i already know how to save data through serializer input and output streams

#

oh

#

hmm

last ledge
#

how do i make giants attack players

austere harbor
#

There is a plugin that makes a command when you are online?
Like every hour you are online it will make a command

eternal night
round elbow
#

Yea but what if server shuts down?
their waypoint data will be wiped and when they come back nothing will be returned to fill it?

#

or am I wrong? I see you are using Map instead of HashMap

#

not sure what are the differences

#

does Map save even after server restart?

eternal night
#

map is just a common interface, what implementation you use is up to you

#

but you may simple save the data for all online players when your plugin disables

round elbow
eternal night
#

or that ยฏ_(ใƒ„)_/ยฏ

round elbow
#

1 last question though
dont wanna be annoying

#

how can I make some kind of function that returns how many waypoints a player has?

eternal night
#

depends entirely on how you store them

fringe hemlock
eternal night
#

it is a waypoint system, idk how many you expect to be saved ๐Ÿ˜…

fringe hemlock
round elbow
round elbow
fringe hemlock
#

That works

eternal night
#

I'd go for a Map<UUID, PlayerWaypointData> to map each player to their waypoint data

#

PlayerWaypointData can then just contain Map<String, Location> to map a waypoint name to a location

round elbow
#

is there something were i can check for how many values are in a map?

#

1 sec

eternal night
#

Map#size

round elbow
#
public class WayPoint() {
  String name;
  Location loc;
  UUID uuid;
  // extra variables here for info
WayPoint(UUID uuid, String name, Location loc) {
  this.uuid = uuid;
  this.name = name;
  this.Location = loc;
}
}

// now for how i can save the map

HashMap<UUID, WayPoint> wayPoints = new HashMap<>();
wayPoints.put(uuid, new WayPoint(uuid, name, location));
#

is that good?

fringe hemlock
#

this.loc = loc*

round elbow
#

ye

#

but ignoring that
do u think that is a good way of storing it?

#

for file storing ill just use serializer i guess

#

onDisable and onCreation

fringe hemlock
#

That should work but that class only stores one location for one waypoint

round elbow
#

ye

#

i can make multiple instances of that same class

#

with a command

#

so players can make more

#

that is just a blueprint

#

right?

fringe hemlock
#

The hash map can contain multiple of the same value but not the same key, youโ€™ll save one waypoint with their UUID and if you try to add another it would override their last one

round elbow
#

that is why i save on creation

#

and not onDisable

scenic zenith
#

i want to make every chunk in a world exactly the same i had the idea of pasting a schematic in the chunkloading event with fawe but this would be very power consuming.
is there a better way?

misty current
#

can you check if an object in an instanceof a method's generic?

last ledge
eternal oxide
#

wrong import

#

Main

last ledge
#

what

#

to do

chrome beacon
#

Change to correct import

last ledge
#

which one?

chrome beacon
#

Main

last ledge
#

there are so many import options of main

#

i mean which one to import

chrome beacon
#

Import the one that is yours?

#

Are you just copying code?

worldly ingot
#

Welcome back to: Reasons you should not name your plugin's class "Main"

eternal oxide
#

this is why you shoudl never call your plugin instance Main

#

Ok there are a few issues...

#

First bad import

#

Second you create a Field called plugin of type Main, but you never initialise it

#

Third, your plugin seems to be called BossMobs so I assume your plugin Class is BossMobs, as that is imported too.

#

so line 25 change to BossMobs plugin;

#

then add a constructor so you can pass an instance of your plugin

#

Dependency Injection

#

?di

undone axleBOT
lean gull
#
        player.spigot().sendMessage(new ComponentBuilder()
                .append(ChatColor.translateAlternateColorCodes('&', "  &8ยป &b&lRULES INFO &7[CLICK]"))
                .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text
                        (ChatColor.translateAlternateColorCodes('&',
                                "&b&lRULES" + "\n"
                                        + "  &8ยป &7Page 1, Section A" + "\n\n"
                                        + "&b&lTHIS INCLUDES" + "\n"
                                        + "  &8ยป &7How to use /rules correctly" + "\n"
                                        + "  &8ยป &7Hovering over text & Clicking on text in /rules" + "\n"
                                        + "  &8ยป &7Pages and Sections" + "\n"
                                        + "  &8ยป &7How to tell when someone is breaking a rule" + "\n"
                                        + "  &8ยป &7What to do when someone is breaking a rule"))))```does anyone know why every line after a line that is bold is like 2 pixels off
#

i'll send a screenshot 1 sec

eternal oxide
#

have you tried adding a reset to the end of each line (before the CR

lean gull
#

what's CR

eternal oxide
#

carriage return the \n

lean gull
#

huh

eternal oxide
#

do &r\n

#

try it

#

I think &r is reset

lean gull
#

ok

#

works, thanks

tardy delta
#

&r is reset yes

acoustic pendant
#

Is there a way that when an armor stand collision with a block i send some action? For example:
I set the armor stand gravity to 0 and i want it go straight bit if it collision a block it explotes

last ledge
#

player.setVelocity(new Vector(0, 2, 0));
error:
no suitable constructor found for Vector(int,int,int)

tardy delta
#

any ways to improve this code block?

private boolean isAuthorized(CommandSender sender, Permission permission) {
        if (sender instanceof BlockCommandSender) return false;
        if (sender instanceof Player) {
            executor = (Player) sender;
            if (!permission.has(executor)) {
                PlayerUtils.message(executor, Lang.NO_PERMISSION.get());
                return false;
            }
        } else isConsoleSender = true;
        if (!(this instanceof ConsoleCommand) && isConsoleSender) {
            PlayerUtils.message(sender, Lang.NO_CONSOLE.get());
            return false;
        }
        return true;
    }
eternal oxide
#

wth? Yes, use the built in permissions