#help-development

1 messages Β· Page 1500 of 1

quaint mantle
lean gull
#

wait so this sets the field "file" to what's inside the config file?
private File customConfigFile;

eternal oxide
lean gull
#

what does that mean

eternal oxide
#

its creating a private field called customConfig of type File.

lean gull
#

oh, and the second one?

#

(private FileConfiguration customConfig;)

eternal oxide
#

its has no assignment so it points to nothing yet. Its only declared

quaint mantle
#

what is problem? Version - 1.17

eternal oxide
#

teh same, its declaring a Field of type FileConfiguration and named customConfig

#

so one is a File and the other is a FileConfiguration

lean gull
#

what's the difference between those two

eternal oxide
#

they are different types.

#

just like String and int

lean gull
#

well duh but what do they do

eternal oxide
#

well, later the File will point to an actual file on your hard disc, and FileConfiguration will be used to load it into memory

lean gull
#

confused again

eternal oxide
#

To access things on your hard disc (filling cabinet) you need something to point to the correct location. That is what the File object is for.

lean gull
#

what's the difference between object and variable

eternal oxide
#

Every single thing in Java is an Object

#

a variable is an object

#

a class is an object

#

etc

#

The whole language is based around Objects

fiery pulsar
#

Guys, there is a way to show the Purse + bank balance in one line ? like Top1: $224,242 (count bank+purse) wiht vault economy & essentials x

eternal oxide
#

when you assigned new HashMap<>() to your Map you assigned an object.

lean gull
#

what you're saying makes no sense

eternal oxide
#

um, not sure how to explain simpler

lean gull
#

there's a difference between int test = 5; and int test = new Integer(5), right?

eternal oxide
#

yes, the second one will error

lean gull
#

whatever the syntax is for new thingie

#

doesn't matter

eternal oxide
#

ok, then no, they are the same

lean gull
#

according to google, the second one is an object and the first one is a variable

lean gull
eternal oxide
#

Integer is an object

lean gull
#

no integer is a type

waxen locust
eternal oxide
#

int is a Field

#

we better not get into primitives and boxing yet

eternal oxide
lean gull
#

i'mma take a break from this, i'll ask later

eternal oxide
#

ok

opal juniper
#

Ok - so my plugin for translating chat is pretty much done - anyone got any features that they think should be included?

What it does is translate the messages either to:

  • One server wide language
  • Per player based on the players locale

Currently the commands are just to like:

  • reload
  • set the mode of translation
  • set the target language

wondered if anyone had anything they think should be added

eternal oxide
#

So long as the players can choose their language

opal juniper
#

the players themselves? I have kinda done it so that the owner enforces a lang across the server

#

or - per persons locale

eternal oxide
#

When I did auto translations I found I had to let players override it. Some would be using german or chinese locale but want english in game.

opal juniper
#

huh - fair enough

#

that makes it a bit more difficult

eternal oxide
#

just set a language flag in the players PDC?

opal juniper
#

True - could do that

eternal oxide
#

if no flag default to whatever

opal juniper
#

then if they don't have one then default the the server 'default'

#

yeah

#

The pain is that is prettty different to everything i have done so far NM_PeepoCryDrink

#

actually, maybe not

#

i would probs have to work out all the languages of translations i needed, get all the translations, then map the Player -> translation. Then send the message

#

Its an idea tho

lofty junco
#

first project

#

second

#

Can someone help me

opal juniper
#

Im not familiar with bungee soooo, not from me Pepe

eternal oxide
lofty junco
#

from first one

#

from second

eternal oxide
#

Why are you shading everything?

lusty cipher
#
channels = config.getIntegerList("discord.channels")
  .map { it.toLong() }

When I print that (channels.toString()) it prints:

[1271005265]

eventhough in my config.yml, I have this:

discord:
  channels:
    - 692063419003699281
#

why is this?

lofty junco
eternal oxide
lusty cipher
#

@ivory sleet but I obviously want 692063419003699281 and not 1271005265?

opal juniper
#

What he means is 692063419003699281 != 1271005265

#

yeah

unreal quartz
#

interger overflow i presume

#

getIntegerList

#

is there a getLongList?

lusty cipher
#

oh yes there is

#

ill try that

#

ah stupid

#

obviously this was it

#

thanks tho

silver cove
lusty cipher
dense geyser
#

It uses strings

unreal quartz
#

the library they use probably only accepts longs

lusty cipher
#

yeah

#

it's based on longs atleast

quiet ice
dense geyser
#

oh im talking about the discord api nvm ignkre me

lusty cipher
#

ah just found it

#

Because Snowflake IDs are up to 64 bits in size (e.g. a uint64), they are always returned as strings in the HTTP API to prevent integer overflows in some languages.

silver cove
dense geyser
#

Does anyone know a way of getting a location of a point, between 2 locations, from a set distance from one of the points? https://gyazo.com/b8893177fc25fb08be1dfb02b8cad30c Take this diagram for example, both red dots are known positions, I need to get the location 3 blocks along the line which connects the 2 (marked as a solid green line to a blue dot). I tried to do something with vectors (getting difference of x/y/z of player then dividing by their distance), but it didn't work, anyone have any idea?

loud swift
#

guys does anyone use intelij and know how to remove the shortcut for ctrl + alt +q ?
I'm trying to add a @ but can't because it gets activated

quiet ice
#

If you have the altgr key, use that one, otherwise Β―_(ツ)_/Β―

loud swift
#

super uncomfortable to use alt gr +ctrl +q

quiet ice
#

Why do you need to use ctrl?

loud swift
#

because ctrl + alt +q is what places @ with my keyboard

lusty cipher
#

Just use AltGR+Q, why should your board not do that

loud swift
#

alt q does not do anything with my keyboard

quiet ice
#

On most keyboards altgr + q does it

unreal quartz
loud swift
#

becuase key combinations depend on what region they keyboard is from

quiet ice
#

Alt + q does not do it, correct

lusty cipher
#

Ah yeah, only AltGR+Q works

loud swift
#

altgr + q does work but its still uncomfortable, i want to stop intelij from hijacking my usual combination for a function i won't even use

snow walrus
#

Is PacketPlayOutEntityTeleport still yaw sensitive in 1.17. It seems to no longer work for me. I am calling setLocation on the fake nms entity first with loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), 0

eternal oxide
dense geyser
#

oh thank you

dense geyser
unreal quartz
#

sets the x and y such that the magnitude of it is 1

eternal oxide
#

ensures its a Unit vector Totals 1

unreal quartz
#

basically means you can multiply it expectedly without getting funky numbers

dense geyser
#

Oh so it sorta trims big things to appear at a sensible size, so you don't get weird floating points after it?

eternal night
#

just keep in mind, Vector#normalize uses a sqrt call internally which might not be the fastest.

unreal quartz
#

well think of a triangle, if you're using the hypotenuse as a direction and you want to get an exact measurement x metres away, when you get a direction vector the length of that hypotenuse could be anything, so to work with it you 'normalise it' (i.e set that length of the hypotenuse to 1)

eternal night
#

should not be an issue unless you spam this on a tick basis

unreal quartz
#

the direction this hypotenuse faces is unchanged, only its length

dense geyser
eternal night
#

I mean, even per tick isn't an issue. This is more of a "store your item meta instead of calling it a bunch of times" situation

dense geyser
#

ah okay, thanks :+1:

snow walrus
#

If you don't normalise it as it is and you multiply by 3 it will print 3 times the distance to the 2nd point

mystic terrace
#

Hello! I'm actually learning how to code Minecraft plugins and I want to know how to get the ID of a dropped item and put in the chat a message something like "You've dropped: (Item x64)"
Actually I have this one but it doesn't works as I want.
Hope that someone can help me ^^

unreal quartz
#

you've got the entity id (the id representing the dropped object), not the actual material itself, you can cast the entity to Item then i believe you can access the material data there

silver cove
snow walrus
# dense geyser ?

Well, I didn't explain me well. I meant if you multiply the substraction you'll get a point wich is x3 times further

dense geyser
#

oh

mystic terrace
#

As I said, I'm new on this so I don't understand at all, can someone please show me a code example?

silver cove
#

if u check the things u can get from event u should be able to find it :) I'm sure u can work it out on ur own!

mystic terrace
#

Because I'm learning Events and I want to know how I can do that

snow walrus
unreal quartz
unreal sandal
#

Hello, it's been several times I sent messages in this chat to solve my problem. I would like to create an event to separate chat per world but when I sent a message in the chat there is nothing. Someone can help me ?

unreal quartz
#

if you send what you've tried then maybe

mystic terrace
#

I tried this

#

But need to finish it

unreal sandal
unreal quartz
#

you want it after you've checked it's an instanceof Item, since entity isn't defined yet, nor have you checked the nearby entity is actually an Item

mystic terrace
#

By the way, "entity" gaves me an error

unreal sandal
#

I sent my listener and my event

mystic terrace
#

This is so hard xd

unreal sandal
#

@unreal quartz If you didn't see because of the others messages, I sent my code

unreal quartz
#

there's a list in World you can access with contains all the players rather than matching the players world with the other players world

#

World#getPlayers()

unreal sandal
#

Okay i try that

quaint mantle
#

Error:

[19:35:03] [Netty Server IO #0/ERROR]: java.lang.IllegalStateException: Parameters not present, but method is0
[19:35:03] [Server thread/INFO]: An1by lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: Parameters not present, but method is0

Error line:

((CraftPlayer) player).getHandle().b.a.k.pipeline().addBefore("packet_handler", "PacketInjector", h);

What I should do for to fix it?

undone light
#

Ok, sweet. Thanks

winter smelt
#

Hey I'm trying to make something similar to 3rd Life from Hermitcraft. I am pretty new to making plugins, and I was wondering if someone could help me. I'm thinking if I can add 1 to a deathTally, then if death tally = 0, nametag = green. if deathTally = 1 yellow, etc. I also want it to be if deathTally = 4, set gamemode to spectator. Does anyone have any ideas on how to do this?

eternal oxide
#

Thats just Scoreboard Teams.

main tangle
#
    public static ShapedRecipe createEnchantedDiamondRecipe(){
        ShapedRecipe rec = new ShapedRecipe(new NamespacedKey(ma, "enchanted_diamond"), EnchantedDiamond.getEnchantedDiamond());
        rec.shape(" x ", "xxx", " x ");
        rec.setIngredient('x', Material.DIAMOND);
        Bukkit.addRecipe(rec);
        return rec;
    }

    @EventHandler
    public void onCraft(PrepareItemCraftEvent e){
        ItemStack[] m = e.getInventory().getMatrix();
        int i = 0;
        if (e.getRecipe() == createEnchantedDiamondRecipe()){
            for (ItemStack x : m){
                if (x.getAmount() >= 32){
                    i += 1;
                }
            }
            if (i == 4){
                e.getInventory().setResult(createEnchantedDiamond());
            } else {
                e.getInventory().setResult(null);
            }
        }
    }
```this doesnt work for some reason, i am having no errors.
#

its supposed to create a custom recipe.

mystic terrace
#

What I should change for getting the item name than the ID?

int amount = item.getAmount();```
ivory sleet
#

What name are we talking about?

#

Localized name or display name?

#

Anyways both are accessible through item.getItemMeta()

mystic terrace
#

I'm actually working on a Drop Item Event

mystic terrace
#

And it sends a message when you dropped the Item

eternal oxide
mystic terrace
#

But i have that and it shows the ID as you can see

#

And I want to display this

hard isle
#

Uhm my plugin isn't loading for some reason I've been stick with this for days

mystic terrace
#

Without the _

main tangle
#

the recipe works

mystic terrace
#

Just the display name and not the ID

main tangle
#

but the event part doesnt

mystic terrace
hard isle
#

getItemMeta().getDisplayName() ?

#

Does this work ?

mystic terrace
#

Lemme check

#

There's a way for that?

main tangle
mystic terrace
#

So... There's no way if the item isn't custom

#

Am I right?

eternal oxide
#

rather than instance comparing your recipe

hard isle
#

Can someone help me btw my plugin isn't loading

mystic terrace
#

pfff, can't be asked, I'm actually learning for making something like that

#

Thank's for all <3

#

Aight

#

Ok, take your time, mention me please.

quaint mantle
#

Who uses PacketReader / PacketHandler for events in 1.17? I have a problem adding PacketInjector after packet_handler.

((CraftPlayer) player).getHandle().b.a.k.pipeline().addBefore("packet_handler", "PacketInjector", h);
mystic terrace
#

How hard is that?

quaint mantle
#

using addLast/addFirst don't help

mystic terrace
#

And how I can apply that to this?

    public void DropID(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemDrop().getItemStack();

        String id = item.getItemMeta().getDisplayName();
        int amount = item.getAmount();

        event.getPlayer().sendMessage(ChatColor.GREEN + "Has dropeado: " +  ChatColor.WHITE + id + " (" + amount + "x)");```
quaint mantle
#

I have this error when join to server:

An1by lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: Parameters not present, but method is0
dusty herald
#

getStringList

ivory sleet
#

for(String str : getConfig().getStringList("blocked-commands")) {
//
}

#

If you’re in main that is

dusty herald
#

i dont knwo what im listening to but its fire

mystic terrace
#

Aight

gaunt hatch
#

OMG I think I got it. OpenJDK16 working in Ubuntu 20.04 in a docker image. That took me way longer then i wanted to lol

dusty herald
#

congrats

lilac valve
#

The Material names might not perfectly reflect minecraft naming conventions but it's close for most

main tangle
eternal oxide
undone axleBOT
lilac valve
#

wdym by lang names, sorry just trying to clarify

mystic terrace
#

Where I need to put that?

#

Yea, but I mean, in which part of the code?

eternal oxide
mystic terrace
#

Can you copy and paste it here where I need to put that please?

    public void DropID(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemDrop().getItemStack();

        String id = item.getItemMeta().getDisplayName();
        int amount = item.getAmount();

        event.getPlayer().sendMessage(ChatColor.GREEN + "Has dropeado: " +  ChatColor.WHITE + id + " (" + amount + "x)");```
#

Because I'm looking the chat component and I'm confused asf

eternal oxide
vital ridge
#

can someone help me with a countdown? I currently have a ticking bomb (chicken) and I added a countdown as a display name which says how many seconds is left till the chicken blows up. My code:

public void tickingExplosionRunnable(Chicken chick) {
        
        secondsLeft = 5.0;
        
        tickingRunnable = new BukkitRunnable() {
            public void run() {
                
                chick.setCustomName("" + ChatColor.RED + secondsLeft);
                
                if (secondsLeft == 0) {
                    
                    stop();
                    createExplosion(chick);
                    
                }
                
                secondsLeft--;
                
                
                
            }
        }.runTaskTimer(BomberChickens.getInstance(), 0, 1);
        
        
        
    }

Now Id want the cooldown to countdown by first milliseconds and then seconds like a real timer, I tried secondsLeft-=0.1 , but this added like ten 9's in my countdown and started some weird countdown.

mystic terrace
#

import org.bukkit.ChatColor;

outer crane
#

I have some code:

if (block.getState() instanceof Sign) {
        Sign sign = (Sign) block.getState();

        sign.getPersistentDataContainer().set(plugin.signKey, PersistentDataType.STRING, command);
        Bukkit.getLogger().info(sign.getPersistentDataContainer().get(plugin.signKey, PersistentDataType.STRING));
        player.sendMessage(Component.text("Set sign at " + location + " to execute command " + command + " on click.", NamedTextColor.YELLOW));
}

for some reason when its triggered, in console it prints null, while i recieve the attached image as output, any idea why its returning null instead of the command?

#

also, yes, i am using kyori/adventure for text handling in the spigot plugin

outer crane
#

alright, i just did some checking, appears that dashes arent allowed in namespaced keys

#

underscores are meant to be used instead

main tangle
outer crane
#

then idk why it works with _ but not -

eternal oxide
main tangle
#

like you craft enchanted stuff in hypixel skyblock

mystic terrace
#

I typed it but I have 2 errors

outer crane
#

do you even know java?

main tangle
#

what do i have to do then, i am using 1.12.2 btw

mystic terrace
#

I did

outer crane
#

tip: don't use bukkit while learning to use java, its a horrible mess

#

same, but i defo would have learnt faster if i wasn't doing stuff with a bukkit plugin

mystic terrace
#
    public void DropID(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemDrop().getItemStack();

        String id = item.getType().toString();
        int amount = item.getAmount();

        if (event.getItemDrop().getItemStack().getType() == Material.CAKE) {
            event.setCancelled(true);

            event.getPlayer().spigot().sendMessage(new TextComponent("Has dropeado: ")).setColor(ChatColor.GREEN.asBungee()),
            new TranslatableComponent((ItemStack.getType().isBlock() ? "block" : "item")+"minecraft"+item.getType().name().toLowerCase()).setColor(ChatColor.WHITE.asBungee()), new TextComponent("("+amount+"x)").setColor(ChatColor.WHITE.asBungee());```
#

But, I don't know why here works but in the other one don't

#

It' doesn't

#

mb mb

#

1 sec

#

It doesn't either

chrome beacon
mystic terrace
#

Ye ye, I get it

chrome beacon
#

And neither is the first screenshot

mystic terrace
#

And there's the last one

chrome beacon
mystic terrace
#

You're talking bout this?

#

When I put item it brokes

urban tundra
#

arrow.setMetadata("teleport", new FixedMetadataValue(, "true")); Having a hard time referencing the owningPlugin for FixedMetadataValue, Ik it should reference main class but about everything seems to return null

mystic terrace
#

And i get this one, and putting and removing parentheses but it still like that

#

It's all fine, just the last one issue

#

xd

gaunt hatch
#

So bungee is still on java 8?

chrome beacon
gaunt hatch
#

hmm then its backwards then cause i am still on java 8 and it works with 1.17

mystic terrace
#

and when I put it appears that

gaunt hatch
#

Yea newest bungee with access to 1.17 still works on java 8

#

Good to know

#

Now i wait for WE and ASWE to update ....

mystic terrace
#

I'm confused

#

You mean all this?

hard isle
#

How do I close an inventory- I feel like that's a really dumb question

#

It closes the inventory that's currently opened ?

#

Okay thanks

gaunt hatch
#

only for that player

#

if you want to do all players you will have to hook into the view of the inventory and find the users to close

hard isle
#

Yeah that's what I want

ivory sleet
#

Dramatication these kind of questions can be found using the javadocs

#

?jd

mystic terrace
#

omg I'm so lost actually

ivory sleet
#

πŸ₯²

mystic terrace
#

I thought that can be more easier than this but omg

gaunt hatch
#

Now comes the best part of a new update. After the plugin updates and server working.

SPIGOT PATCHING!!! YAY!!! NOT!!!!

mystic terrace
#
    public void DropID(PlayerDropItemEvent event) {
        Player player = event.getPlayer();
        ItemStack item = event.getItemDrop().getItemStack();

        String id = item.getType().toString();
        int amount = item.getAmount();

            TranslatableComponent component = new TranslatableComponent("test");
            component.setColor(ChatColor.WHITE.asBungee());

            event.getPlayer().spigot().sendMessage(new TextComponent((ChatColor.GREEN + "Has dropeado: ")));
            new TranslatableComponent((item.getType().isBlock() ? "block" : "item")+"minecraft"+item.getType().name().toLowerCase()).setColor(ChatColor.WHITE.asBungee()), new TextComponent("("+amount+"x)").setColor(ChatColor.WHITE.asBungee());```
#

Thats all the code without fixing it

#

just cause I'm so lost atm

chrome beacon
#

Might I suggest some java tutorials

#

You seem to be stuck on that part

mystic terrace
#

My head hurts xD

#

Sorry, I don't know

#

Can you type it please?

mystic terrace
chrome beacon
#

?learnjava

undone axleBOT
torn shard
#

Can anybody help? I'm looking for the event for when a player destroys (mines) a block.

dusty herald
#

BlockBreakEvent

torn shard
#

thx

green forum
#

Hello there is any method in spigot 1.17 to create a huge world ? With the height more than 256

quiet ice
#

according to the API diff, no

lilac dagger
#

oh right

#

any changes to how chunks operate?

chrome beacon
#

We doing some programming homework or smth πŸ‘€

quiet ice
#

the values you gave a far from linear

#

let me open up desmos and plot a few graphs

#

\frac{x}{\log\left(x+10\right)}-x+20 would do something like that

past maple
#

it's not linear

quiet ice
#

Sure, but is is pretty linear

#

of course one needs to play further with the values, but something like that could be a good initial suggestion

#

true linear would be something like x = y - z

unreal sandal
#

Hello, I have a question is it possible to cancel a sendMessage ?

tough zephyr
#

You'd have to cancel the packet @unreal sandal

loud swift
#

mmm

loud swift
#

i think there might be an event too

unreal sandal
#

How can I do that @quiet ice ?

quiet ice
#

If you mean recieve then it is possible via AsyncPlayerChatEvent or something like that, sending requires packet forgery afaik

tough zephyr
#

Yeah I doubt sendMessage executes an event

lean gull
#

does anyone know how to make a very simple variable file so the variables don't get erased on restart?

loud swift
# unreal sandal Hello, I have a question is it possible to cancel a sendMessage ?
#

i think one of those would probably execute on sendMessage, add a listener and try

tough zephyr
#

@lean gull Simplest way? Just use the YAML stuff

#

You can even serialize a class with it

lean gull
#

yeah i have no clue what that means

tough zephyr
#

Or you could look into Serializable

#

Which is a Java thing

quiet ice
quiet ice
tough zephyr
#

It'll save all your object fields, and such into a binary file

unreal sandal
#

@quiet ice Yes, but when a player send a message, I cancel already the packet and after i send a message to player, because I want to separate chat per world

tough zephyr
#

@quiet ice Why not?

#

It's incredibly efficient compared to YAML

#

And only a couple of lines of code

quiet ice
#

Did you ever actually try it?

tough zephyr
#

Yes

lean gull
tough zephyr
#

I've been programming for 10 years lol. Works great

quiet ice
#

It is really dumb if you ever want to change the class

tough zephyr
#

True

wraith rapids
#

json is a decent middle ground

tough zephyr
#

Could just use the YAML stuff from Spigot then. Super simple

quiet ice
#

Works really good if the class never changes, otherwise really dangerous stuff

tough zephyr
#

That's why I use Externalizable

#

Easier to manage

loud swift
#

Lol

#

didn't know that was a thing

quiet ice
#

And then you need to understand the meaning of transistive and co

loud swift
#

funny name though πŸ™‚ externalizable

tough zephyr
#

Not with the other 1

eternal oxide
tough zephyr
#

But obviously refactoring will fuck it

quiet ice
#

I just encode everything via ByteBuffers heh

lilac dagger
#

you can create a class that can write read things

quiet ice
#

Or json-simple, which has also done a good job in the past while not being too complicated for me

lilac dagger
#

and if something is missing it simply leaves the defaults

quaint mantle
#

how to use PacketPlayOutScoreboardTeam in 1.17?

lilac dagger
#

supposed that the bytecode contains a header and the payload format

tough zephyr
#

That Spigot wiki is so lacking lol

obtuse basin
wraith rapids
#

wut

#

you press keys on your keyboard

#

to write text

#

or are you asking how to deal with nested configuration keys with the bukkit config api

#

"do" is quite vague

wraith rapids
#

key.subkey

obtuse basin
#

k thx

#

makes life so much easier

obtuse basin
obtuse basin
#

ah nvm

#

ye, idk stuck on 1.7-1.16 sry

lean gull
eternal oxide
#

no

#

That tutorial is very basic

lean gull
#

apparently not basic enough for me :/

wraith rapids
#

you should try doing something else first

#

right now you don't know anything about anything

#

do some stuff that you vaguely know how to do, and get more experience

lean gull
#

this is the second time you said i know nothing, i'mma just block you

wraith rapids
#

you literally don't

#

you are trying to write a computer program, but you don't know what a hard drive is

#

you are trying to use an object oriented language, but you don't know what an object is

lean gull
#

does anyone else know how to help?

wraith rapids
#

do something simple; approach these concepts at your own pace by doing simple things

#

right now your foundation is next to nonexistent

eternal oxide
#

The tutorial I linked you IS the help. You need to understand it as it is how to save and load configs

lean gull
#

i can't

eternal oxide
#

There is fully working code there, you just need to practice with it.

eternal oxide
lean gull
#

yeah i'm blocking you too

wraith rapids
#

lmao

eternal oxide
#

lol, I spent hours tutoring you. ungrateful noob

lean gull
#

is anyone here not mean, not telling me what i can or can't do, not saying i'm somewhat incompetent that can help?

quaint mantle
#

the issue is that you are incompetent

#

you should listen to what people say

lean gull
#

do you really want me to block you too? dw, i will now

quaint mantle
#

Elgar and NNY are both right

eternal oxide
#

He's going to get very lonely in here.

wraith rapids
#

lol

iron condor
#

if im using lucky permissions can I give temporary permission to player via spigot API or do I have to use luckyperm API?

lean gull
#

you mean luckperms?

wraith rapids
#

bukkit does not have a concept of temporary permissions

iron condor
#

Ill code that myself

#

just giving the perms

#

and removing them

wraith rapids
#

i would use vault's permission module

eternal oxide
#

No idea if LP supports temporary, Other plugins like GroupManager do πŸ™‚

wraith rapids
#

as otherwise your setup won't work with any other permission plugins

#

like pex, which is better than groupmanager

eternal oxide
#

King of the gutter

wraith rapids
#

real men store their permission data all in one permissions.yml

eternal oxide
#

Real men don;t need no permissions

iron condor
#

op everyone

wraith rapids
#

real men aren't permissible

iron condor
#

so I should switch to PermissionsEx?

wraith rapids
#

no

#

pex is trash

eternal oxide
#

haha no πŸ™‚

wraith rapids
#

LP is the standard

#

but you should program against vault's permission module rather than a specific permissions plugin

quiet ice
#

Well, v2 (I think that was the right one) would work, but it isn't the one you can obtain easily

wraith rapids
#

yes

#

google "how to use vault"

#

i'm sure you'll find something

iron condor
#

im sure that wont help much

#

as vault is a real life thing

eternal oxide
#

But honestly, GM supports timed perms. Pretty sure LP doesn't you'd have to code them yourself.

wraith rapids
#

then append "spigot" after the search

quiet ice
#

or "bukkit"

iron condor
#

and that will show me how to install it

quiet ice
#

The latest releases of PEX (which are a few years old) have not been supported for some time, however if you build the latest commit yourself I think it is somewhat supported iirc

wraith rapids
quiet ice
#

Vault is a plugin you will have either way

wraith rapids
#

brought to you by the power of google

iron condor
#

thanks google

quiet ice
#

It is probably the most used library plugin, though it is heavily outdated in design

iron condor
#

honestly I searched alot about vault and its the first time I encounter this page

wraith rapids
#

"feature complete"

lean gull
wraith rapids
#

there is little to explain

#

getCustomConfig is a method that returns a Configuration

#

you then call getString on that returned Configuration

#

to get the value of some specific config key

#

getCustomConfig is something that you'll have to write yourself in your main class

iron condor
#

so lucky perms uses vault?

wraith rapids
#

no

#

vault uses lucky perms

#

and/or any other permission plugin

#

vault's job is to find and provide access to whatever economy and permissions plugin might be installed on the server

#

so instead of you having to write your plugin against a specific economy and permissions plugin, you can write it against vault

iron condor
#

so this is outdated? ```Vault currently Supports:

Perms: Permissions 3, bPermissions, PEX, GroupManager, PermissionsBukkit, zPermission, SimplyPerms, Privileges, DroxPerms, xPerms```

wraith rapids
#

probably yes

iron condor
#

or is it automated?

#

alright, thanks

wraith rapids
#

try it and see; i'd expect it to work seeing as LP is the industry standard

#

but i suppose I've seen weirder things

obtuse basin
#

ye, LP is the most used now

#

and the best solution tbh

last sleet
#

Hello, I need help on preventing player from placing /throwing custom items. For example, I have an enderpearl called the transmission conduit, and I want to setCancelled the event when a player throws that pearl, but not if it's a vanilla one.

quaint mantle
#

Luck Perms is prob the best perms system we got

#

nothing better

wraith rapids
#

add a tag in the pdc of your custom items

#

and check whether that tag is present when throwing/placing/using, if so, cancel

last sleet
#

PDC? Sorry, im kinda new to this Spigot plugin thing ^^'

dusty herald
#

so uh

wraith rapids
#

persistent data container

iron condor
#

cant he just compare to vanilla Materials?

wraith rapids
#

basically a Map that stays on the item forever

last sleet
#

Okay, thanks!

dusty herald
#

what the hell does this mean? am using gradle with a final class, doing the auto fix thing does nothing

past maple
#

or simply the custom name ?

dusty herald
#

im not used to gradle πŸ˜‚

wraith rapids
#

no, custom items have the same material as their vanilla counterparts

#

you cannot add new materials

#

comparing the name is gay as well, as the name could be changed by a player

iron condor
last sleet
#

When throwing an item, meta gets deleted

quaint mantle
# dusty herald

I had that same issue today actually but nothing happend when I clicked it

iron condor
#

isSimilar()

lusty cipher
# dusty herald

You haven't declared the dependency correctly or Eclipse/IDEA have not yet been reloaded properly to reflect the changes in Gradle, probably

wraith rapids
#

isSimilar is too specific

iron condor
last sleet
#

Is there an event for that?

wraith rapids
#

if the item changes durability or is renamed or anything about is changed, it will return false

lusty cipher
obtuse basin
#

does if (!sender instanceof Player) would work for cmds?

wraith rapids
#

no

lean gull
#

i tried doing it on my own and uhhh

    if (!(this.getCustomConfig().getString("chat-color"))) {
        this.getConfig().set("chat-color", true);
    }```
https://i.imgur.com/NE5FQt7.png
wraith rapids
#

it'd have to be if(!(sender instanceof Player))

#

since ! is evaluated before instanceof

#

and you can't do !sender

#

because sender isn't boolean

eternal oxide
lean gull
#

i have no clue what i'm doin lol

wraith rapids
#

yes, we can see that

#

getString returns a String

#

you cannot use a String in an if directly

#

you need a boolean

#

you can either compare this string to something, or getBoolean

#

basically, learn java

dusty herald
obtuse basin
wraith rapids
#

instanceof returns a boolean

#

so it would not be a non-boolean thing

obtuse basin
#

k thx

dusty herald
obtuse basin
dusty herald
#

get a player import

covert valve
#

oh

#

reload the gradle project

#

or failing that, invalidate caches / restart

dusty herald
#

alright ill try reload

#

how does one do that πŸ˜…

obtuse basin
covert valve
#

gradle window

#

the arrows

#

yep ,that

dusty herald
#

shit

lean gull
#

can someone please help with what i sent?

dusty herald
#

invalidating

wraith rapids
#

no, but if you want to support vault, which you should, you should register your plugin as an economy provider

iron condor
#

I meant this private boolean setupPermissions() { RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class); perms = rsp.getProvider(); return perms != null; }

#

to access the perms

wraith rapids
#

seems about right

obtuse basin
last sleet
iron condor
#

I want a minimal one

last sleet
#

I don't know if I did something wrong, I don't really understand PDC syntax

wraith rapids
#

an EntityType will never be equal to a Material

eternal oxide
dusty herald
#

what the fuck

quiet ice
#

I know a few more minimal ones too

dusty herald
#

it's still happening

obtuse basin
dusty herald
#

could it be that this java file is in the test folder aux?

#

things in the main folder are just fine

obtuse basin
#

just adding money, nothing more

wraith rapids
#

use whatever but stay away from theneweconomy

iron condor
last sleet
#

I don't know if this is I'm supposed to check if something has a specific pdc?

wraith rapids
#

sort of, yes

#

but you're doing it in the wrong place

obtuse basin
wraith rapids
#

number one

#

an EntityType will never be equal to a Material

#

so this will never run

#

number two

last sleet
#

Well where else should I do it, since I need to put a setCancelled(true)

wraith rapids
#

you are checking the pdc of the entity, not the item

last sleet
#

Yeah, its e.getEntity

wraith rapids
#

listen to either the interact event or the specific throwing event

#

and check the item

vestal dome
#

I have this error, anyone has any idea?

wraith rapids
#

the tag will be on the item; not on the entity

iron condor
#

also helped me learn the API a bit better

wraith rapids
#

use commands.yml to create a /bits -> /eco alias

obtuse basin
#

there u can define aliases for cmds

eternal oxide
quiet ice
full gull
vestal dome
#

I'm doing a Node that can create a server instance on DEMAND...

#

it copies everything and edits server.properties to feature the correct port, and it gives that

iron condor
vestal dome
#

can give code if needed.

#

and I also get spammed with this error every 1 nano second at join on the server.

last sleet
vestal dome
#

anyone has ideas...

mystic terrace
#

Hello, I'm looking for a Join Title code but I don't found nothing, someone can help me please?

wraith rapids
#

@last sleet yes, but that's gay and imperformant

last sleet
#

just tested it and i didnt work ;w;

wraith rapids
#

and not applicable to everything

last sleet
#

yeah im gonna use pd

wraith rapids
#

you should learn to do it right the first time around

last sleet
#

c

wraith rapids
#

that way you'll have an easier time in the future

eternal oxide
lean gull
#

i still need help ._.

wraith rapids
#

maybe you shouldn't have fucking blocked everyone who was helping you

obtuse basin
lean gull
#

i did

quaint mantle
wraith rapids
#

and like I said, you can't throw a random string in an if condition

#

you need a boolean

quiet ice
#

You have a very low knowledge of java lingo, which makes it a bit hard for us to explain anything as we automatically use that lingo.

eternal oxide
#

His issue is he knows almost nothing about java,plugins or computers and is unable to understand the basics.

quaint mantle
#

That directs you to the string associated with the path of where it is in your config

lean gull
#

i don't understand that

quaint mantle
#

Well test it out then

#

And see what you don’t understand

vestal dome
eternal oxide
#

He won;t understand path, label or anything you say. I already spent hours explaining it very carefully.

wraith rapids
#

before getting blocked for refusing to spell it out step by step again

lean gull
#
    String notSet = this.getCustomConfig().getString("chat-color");
    if (notSet) {
        this.getCustomConfig().set("chat-color", true);
    }```https://i.imgur.com/DJJtc75.png
wraith rapids
#

yeah, that's not how java works

lean gull
#

ignore that it will be the oppisite

quaint mantle
#

Notset == bull

#

Null

quiet ice
#

Isn't there a #hasString()?

wraith rapids
#

yeah, and an isSet

lean gull
eternal oxide
#

He's gone off the tutorial and is already attempting to implement in his plugin not knowing any of it. Its all wrong. He has a Map<String, String> he needs to save to a config. As its a Map all he has to do is use put

#

or set

hollow kayak
#

Why cant I use CraftPlayer in 1.17 Spigot

eternal oxide
#

I forget which

#

set I believe

iron condor
#

so wait, I have this in my eco plugin getServer().getServicesManager().register(Economy.class, this, vault, ServicePriority.Highest); do I need to do the same for perms as well?

quiet ice
#

put is for maps

wraith rapids
#

elgar is a noob

quaint mantle
#

Well @lean gull don’t use a config

wraith rapids
#

doesn't even know how to use maps

eternal oxide
#

haha

lean gull
#

that's not helpful

quaint mantle
#

Don’t use it till you have enough knowledge

#

Of basic java

eternal oxide
#

his choice was a database or file. We went with the simplest

quiet ice
#

how else do you want to store stuff persistently?

quaint mantle
#

Don’t use either yet you need to stick to storing stuff in memory

#

He’s not ready for either of those obviously.

#

So he just shouldn’t do it yet….

lean gull
#

how the hell am i gonna save on restart if i save on memory

quiet ice
#

Meh, BufferedReaders/BufferedWriters are pretty easy

eternal oxide
#

he's not ready for plugins, but I was willing to teach.

wraith rapids
#

lmao

ivory sleet
#

Elgar πŸ₯²

quaint mantle
lean gull
#

bomp just stop helping please, alright?

quaint mantle
#

Lol there’s no way to help you

eternal oxide
#

lol, you'll be blocked too πŸ™‚

quaint mantle
#

You’re a skid

#

Trying to get code spoon fed

quiet ice
#

But I encourage to use configs since BR/BW are non-conventional

lean gull
#

then you shall be the 4th person i've blocked in the last hour

quaint mantle
#

I encourage you to go sit in a main method in a new project

wraith rapids
#

he's going to have the whole guild blocked before long

lean gull
#

i have no clue what br/bw is Β―_(ツ)_/Β―

ivory sleet
#

I assume buffered writer and reader

quaint mantle
#

Whatever clsss you want to pass

wraith rapids
#

if you are writing a permissions plugin, yes

quaint mantle
#

Into another plugin

wraith rapids
#

that is, a replacement for luckperms

quaint mantle
#

You add to your services manager

#

If they need to run in sync

last sleet
iron condor
#

so I get an error

wraith rapids
#

hey laurent, want to do me a favor

last sleet
#

Yes?

wraith rapids
#

tell @lean gull that he smells bad

last sleet
#

um

#

@lean gull You smell bad

iron condor
#
'register(java.lang.Class<T>, T, org.bukkit.plugin.Plugin, org.bukkit.plugin.ServicePriority)' in 'org.bukkit.plugin.ServicesManager' cannot be applied to '(java.lang.Class<net.milkbowl.vault.permission.Permission>, com.elunar.plugin.BitEconomy, org.bukkit.plugin.Plugin, org.bukkit.plugin.ServicePriority)'```
wraith rapids
#

good job

lean gull
#

):

ivory sleet
#

Axilirate your class needs to implement the Permission interface iirc

eternal oxide
#

Economy

wraith rapids
#

anyway, the better way to test for a custom item is through the PDC

ivory sleet
#

Assuming you wanna provide an implementation for that also

lean gull
#

why is 90% of every server are mean

wraith rapids
#

instead of reading and comparing the lore, read and compare the PDC

zinc coyote
#

Anyone know the permission to bypass checks for a player so they don't get banned? Tried nocheatplus.checks.* and everything but nothing works. I am using PermissionsEx for permissions.

iron condor
#

oh my bad

last sleet
#

ty

iron condor
#

missed that'

quaint mantle
#

Depends what makes the item custom lol

iron condor
#

what does that mean? Class 'BitEconomy' must either be declared abstract or implement abstract method 'hasSuperPermsCompat()' in 'Permission'

wraith rapids
#

this means that your class is implementing Permission

#

which declares a method named hasSuperPermsCompat

#

but your class does not implement that method

ivory sleet
#

@lean gull but let’s be real here, people are here to help others who already know code. By the looks from it, you seem to lack the very fundamentals of java and object oriented programming. I would humbly recommend you to start with learning Java solely then try to tackle the Spigot API. You kinda need to be able to walk before being able to run.

#

?learnjava

undone axleBOT
eternal oxide
wraith rapids
#

you must either implement that functionality, or make the class abstract (and implement it in an extending class)

#

i have no clue what he's doing by this point

lean gull
#

i'd rather do it this way

#

it's more fun :P

iron condor
#

just dumping everything in one class in my econ plugin so I can use vaults permmisions

eternal oxide
#

um, eco/permissions

wraith rapids
#

unless you are writing a replacement for luckperms, you don't implement Permission

ivory sleet
#

If you do then you have to accept the fact people won’t help you here. We’re not Java teachers.

eternal oxide
#

what are you trying to do? register yoru eco with vault, or access vault for permissions?

quaint mantle
#

I mean i learned java in minecraft pretty much

wraith rapids
#

what you are doing right now is writing a new permissions plugin, to replace PEX or groupmanager or luckperms

quaint mantle
#

He can do it, he obviously isn’t trying very hard tho

wispy fossil
#

Sure we are
we can be java teachers
(in a way)

iron condor
#

ok now it clicked

lean gull
wraith rapids
#

anyone can do anything if they're willing to go far enough

#

unfortunately this guy isn't willing to get off his ass and open up google

wispy fossil
#

can I ask you a question NNYaKNpGms0eUVpiSdHx
where did you get your name from?

iron condor
wraith rapids
#

from a random string generator

eternal oxide
# iron condor ok now it clicked

If you want to read permisions, just read them off the Player. If you want other plugins to access your eco you register with vault

wispy fossil
lean gull
#

in 2 months i'll be none of your business years old!

wraith rapids
#

it'll be very secure

wispy fossil
#

no one will know

wispy fossil
lean gull
#

thank you!

ivory sleet
# lean gull this article is in the spigotmc website...

Yes and it applies here nevertheless. If you’re lucky enough you might find someone which will help you a bit but you’ll still have to accept the fact not everyone is willing to help you. As Bomp said doing this in parallel is possible but I don’t know if it’s the smartest thing.

iron condor
wraith rapids
#

yes

#

you want to get the permission provider, through vault

#

what you are doing now is registering a new permission provider

quaint mantle
#

Id make your own system @iron condor it’s a good learning experience πŸ˜›

eternal oxide
#

ok, giving a perm you can do, however, you wanted it timed? which means no point in using vault

mystic terrace
#

I'm trying to make a Login playsound but it doesn't works, maybe I need to add/fix smth? Please help (I'm new coding)

wraith rapids
#

he wants to do the timed part himself

#

as in adding it, and then removing it after a delay

eternal oxide
#

as he is tracking it for timed theres no point in pushing it to vault

quiet ice
#

Actually doing meaningful stuff instead of fucking around is better at some point

quaint mantle
#

Making a permissions plugin is prolly the most beginner project imo lol.(well medium idk)

lean gull
#

some people said to not set stuff on the config from other classes than main, is that true?

eternal oxide
#

Just add it on Player join and remove when expires

quiet ice
lean gull
#

alright, thank you

halcyon topaz
quiet ice
#

However it always depends on how exactly it is done

quaint mantle
#

Could it be your pitch and volume

lean gull
#

i'm doing it like in the article,

// Reading from the config
String name = plugin.getConfig().getString("player-name");

// Writing to the config
plugin.getConfig().set("player-name", name);```
quaint mantle
#

I assume 0 cancels it out

iron condor
#

so I just use the Permission.class provider?

mystic terrace
#

I tried both

quaint mantle
halcyon topaz
#

Is your sound even on

mystic terrace
mystic terrace
quaint mantle
#

Yes it’s pitch and volume ….

#

You can’t use 0

mystic terrace
#

oh

#

mb

#

sorry

#

thanks ^^

quaint mantle
#

Make sure you ctrl left click on the methods and see what there doing when it’s not working. Lmk yw

eternal oxide
iron condor
#

alright, shouldn't be that hard

wraith rapids
#

ctrl left click is for pussies

#

real men use mmb

mystic terrace
#
    public void onLogin(PlayerLoginEvent event) {
        Player player = event.getPlayer();
        player.playSound(player.getLocation(), Sound.BLOCK_BEACON_POWER_SELECT, 50, 1);
    }```
wraith rapids
#

consider delaying the sound a few ticks after the join event

mystic terrace
#

how?

wraith rapids
#

the bukkit scheduler

mystic terrace
#

how? (I'm a noobie)

wraith rapids
#

google "bukkit scheduler programming"

mystic terrace
#

I have that xd

eternal oxide
wraith rapids
#

Bukkit.getScheduler().runTaskLater(plugin, () -> { delayed code here }, delay);

eternal oxide
#

You will also need to delay it till after the Join event has finished ^

mystic terrace
#

I'm lost

quaint mantle
#

Change volume back to 1…

#

Use playerjoinevent

mystic terrace
#

Done

quaint mantle
#

see what happens if you haven’t already tried it

mystic terrace
#

Oke

#

Doesn't works

quaint mantle
#

I mean you can try player.world.playSound see what happens too

wraith rapids
#

you need to delay it

quaint mantle
#

But yea try a delay or try a different sound

lean gull
quaint mantle
#

Omg bro lol

quaint mantle
wraith rapids
#

and here we go again

eternal oxide
#

Good luck

mystic terrace
#

As I said, I'm new on this so I don't understand at all, can you make me an example with the code of here please?

@EventHandler
public void onLogin(PlayerJoinEvent event) {
    Player player = event.getPlayer();

    player.playSound(player.getLocation(), Sound.BLOCK_BEACON_POWER_SELECT, 1, 1);
}
wraith rapids
#

Bukkit.getScheduler().runTaskLater(plugin, () -> { delayed code here }, delay);

lean gull
#

non-static method cannot be referenced from static context

mystic terrace
#

Ok, but, where I need to put it exactly?

wraith rapids
#

in your code

#

you want to delay the play sound, yes?

mystic terrace
#

Yes

quaint mantle
#

That line wraps around the code you want to run

wraith rapids
#

can you put 2 and 2 together

#

you want to delay play sound

lean gull
wraith rapids
#

look at what I sent

#

it has a "delayed code here"

#

what might you want to put there

mystic terrace
#

Like this?
Bukkit.getScheduler().runTaskLater(plugin, () -> { player.playSound(player.getLocation(), Sound.BLOCK_BEACON_POWER_SELECT, 1, 1); }, delay);

steep nova
quaint mantle
#

Yes

eternal oxide
wraith rapids
#

and get a plugin

#

this is probably the biggest challenge for you if you're an oop or java noob

mystic terrace
mystic terrace
eternal oxide
#

replace delay with 5L

lean gull
#

i removed static and it still not working

mystic terrace
wraith rapids
#

now, you need an instance of your main class

mystic terrace
#

Now i have those

wraith rapids
#

import Bukkit

mystic terrace
#

Done

#

Now I need plugin

wraith rapids
#

now, get an instance of your main class

#

there are two mainstream ways of doing so

quaint mantle
#

Pass your main class into that classes constructor

wraith rapids
#

one is to create a static getter in your main class

#

and then call it

mystic terrace
#

whot

wraith rapids
#

MainClass.getMyInstance()

eternal oxide
#

Is this code in a class thats not your main?

wraith rapids
#

the other is to pass the instance to the other class via constructor

mystic terrace
#

Lemme send a ss

steep nova
lean gull
#

idk Β―_(ツ)_/Β―

wraith rapids
#

somebody seriously needs to write a "how to dependency injection" tutorial

eternal oxide
#

just change plugin to this

quaint mantle
#

I mean your main should never be passed to a lower level class in true injection zzz

steep nova
lean gull
#

i'm very new to java and spigot

steep nova
#

If you don’t know what you’re doing how can I help

wraith rapids
#

true injection is gay

quaint mantle
wraith rapids
#

only junkies inject shit

eternal oxide
#

blocked number 5?

mystic terrace
eternal oxide
quaint mantle
#

Only noobs pass there main class into every class possible

mystic terrace
#

now it's completed or I need to do something more?

wispy fossil
mystic terrace
lean gull
#

i replaced WooToo with plugin like the article said, now plugin is red

wraith rapids
#

nobody passes the main class anywhere

#

what would you do with a Class<MainClass>

quaint mantle
#

What?

wraith rapids
#

you don't pass the class; you pass the instance

quaint mantle
#

@wraith rapids don’t be annoying you know my point

wraith rapids
#

i'm a pretty annoying guy

eternal oxide
#

Thats like telling water to not be wet

quaint mantle
#

You can’t write a tutorial on how to do something wrong

mystic terrace
#

Doesn't works XD

quaint mantle
#

That’s just stupid

wraith rapids
#

passing the main class instance is fine

#

if you actually want to go DI purism, use a framework

mystic terrace
#

I don't know why but it still without working

wraith rapids
#

but as said that's gay

quaint mantle
#

What lol, it’s fine but it’s still bad practice

eternal oxide
quaint mantle
#

Use a framework?

terse scaffold
#

Hey, I'm trying to importing new NMS classes to craftbukkit. i paste all of NMS Classes (in work/decompile-xxx) to Spigot/Craftbukkit/src/main/net/minecraft/server folder then i opening project in IDE but I'm getting lots of error in classes, plz help

eternal oxide
#

wront quote

steep nova
mystic terrace
#

Ye, i did

wraith rapids
#

here it comes

eternal oxide
#

in game type /plugins

#

make sure its there and enabled

mystic terrace
#

It is

eternal oxide
#

then set the delay a little longer. You need enough time to finish the login

mystic terrace
#

How much?

#

I have 5L

waxen locust
#

Hey, I can’t find an event for when a mooshroom changes variant due to a lightning strike. I know it’s very niche, would just using the normal lightning strike event work for preventing the change to a brown mooshroom?

eternal oxide
#

20L

wraith rapids
#

like guice

mystic terrace
#

Whot the L means?

wraith rapids
#

long

eternal oxide
#

Long

mystic terrace
#

Just to know

#

Thanks ^^

wraith rapids
#

f would be float, d would be double

quaint mantle
#

That stuffs stupid imo, Just pass it through lol. It’s so easy

vestal dome
#

uhm

wraith rapids
#

if you want to be a DI purist, you most of the time need a DI framework for it

quaint mantle
#

No you don’t

wraith rapids
#

or, basically write what is a DI framework into your plugin

#

but that hardly counts

quaint mantle
#

Do you know what you’re speaking about with all honesty?

mystic terrace
#

Lmao, I don't know, it still without working

wraith rapids
#

yes

waxen locust
quaint mantle
#

Guice got me dead

mystic terrace
quaint mantle
#

A di framework

wraith rapids
#

perhaps what we are disagreeing on is the definition of purism

ivory sleet
#

Have you tried dagger Bomp?

eternal oxide
quaint mantle
#

It’s a simple concept of just having ordered level classes

vestal dome
#

Uhhhh

wraith rapids
#

that is one component of it, but not its full extent

young knoll
#

Access your main instance is the single most controversial topic here

quaint mantle
#

If you’re talking about dependency inversion principle inheritance and abstraction plays part

#

For simple dependency injection yes that’s pretty much it

vestal dome
#

I have an error, I'm doing a jar program which can create a server using a template, but every time that server starts up it starts with this error, any ideas guys?
-> https://paste.helpch.at/oputajinot.apache

#

the jar also changes the port of the server, but it doesn't matter...

quaint mantle
wraith rapids
#

let us agree to disagree then

eternal oxide
#

Don;t look NNYa

last sleet
#

Which slot number is the result slot?

quaint mantle
ivory sleet
#

And unsafe iirc

mystic terrace
#

I don't know whot I need to do for real xD

quaint mantle
#

Ah yea that’s why I don’t use any injection helpers lol

wraith rapids
#

you probably don't use the bukkit event bus either, then

quaint mantle
#

I made my own wrapper for it yes

eternal oxide
wraith rapids
#

but you are still using it

quaint mantle
#

I mean you can simply make a fresh class that implements plugin. Fill out the methods

#

No I don’t use handler list

mystic terrace
#

Lemme try xD

wraith rapids
#

literally what are you doing then

mystic terrace
#

I guess my ear aren't broken, I mean, I'm hearing a sheep like for 2 hours

#

xD

eternal oxide
#

Perhaps there is no sheep!!!

mystic terrace
#

mb

#

sheep

#

xd

wraith rapids
#

the sound of sheep is just the cogs of capitalism turning

#

there is no need to be concerned by it

mystic terrace
wraith rapids
#

i only deal in advice and 5 star reviews

#

and holocaust jokes

mystic terrace
#

You should try to listen to Lil Darkie

#

Btw @eternal oxide it still without work

wraith rapids
#

perhaps that is because of rising unemployment

eternal oxide
#

lol, back in 10 mins

mystic terrace
#

Try it on your's

#

I tried all

#

50L

#

100L

#

I changed the sound

quaint mantle
#

Is the plugin loading haha

mystic terrace
#

O_O

vestal dome
wraith rapids
#

oh yeah by the way

mystic terrace
vestal dome
#

help me

wraith rapids
#

your class needs to implement listener

vestal dome
#

pls

mystic terrace
#

OMG

#

EUIOFGHYEPF

wraith rapids
#

the method has to be annotated with @EventHandler

mystic terrace
#

How

quaint mantle
#

Yea I was about to say

wraith rapids
#

and it needs to be registered with the event bus

mystic terrace
#

cand you show me how?

vestal dome
wraith rapids
#

i saw it in your class and was going to mention it but was distracted by the DI purism debate

vestal dome
#

hello?

#

learn Java?

mystic terrace
#

Hello?

#

omg

vestal dome
#

πŸ˜΅β€πŸ’«

#

I'm annoyed.

wraith rapids
#

me too

mystic terrace
#

ok we didn't asked

wraith rapids
#

i'm a pretty annoyed guy

#

lots of things annoy me

mystic terrace
#

xD

#

I'm so sorry

vestal dome
#

ok maybe waste a lil bit

mystic terrace
#

So, you can help me?

wraith rapids
#

google "how to implement an interface java"

#

and then "how to register an event listener spigot"

ivory sleet
vestal dome
wraith rapids
#

your project kind of goes beyond the scope of things I can effectively help with

#

what is the exact issue

#

i also can't see replies

eternal oxide
quaint mantle
#

class Main implements Listener { is how you implement an interface

vestal dome
#

I have an error, I'm doing a jar program which can create a server using a template, but every time that server starts up it starts with this error, any ideas guys?
-> https://paste.helpch.at/oputajinot.apache

#

that's it

#

ugh

wraith rapids
#

open up the server source and figure out why that is null