#help-development

1 messages · Page 2225 of 1

harsh matrix
#

please ... just use intellij

kind hatch
#

Not me using the entire JetBrains suite.

river oracle
#

it makes sense for the project I guess I could completely rip that out of the inventory, but it'd be a pain to implement any other way

harsh matrix
#

If you are a student it is completely free

lost matrix
#

Or you just use jetbrains for everything 😄

tardy delta
#

oh god

harsh matrix
river oracle
tender shard
river oracle
#

My only Enhanced Text Editor is vscode

#

I use it for every language

#

and no one can stop me

tender shard
#

update, ffs

tardy delta
harsh matrix
lost matrix
#

update intensifies

river oracle
#

I'ma be honest I've used both IntelliJ and Pycharm and I didn't like either of them

harsh matrix
#

what'd you do

tardy delta
#

i installed Clion and then i wondered why the heck i was doing c++ at first

river oracle
#

If i were to use an actual IDE i'd rather use Eclipse or Netbeans

tardy delta
#

netbeans sucsk

harsh matrix
#

also how much ram do you have? 4gb?

river oracle
tardy delta
ornate patio
#

beans

harsh matrix
#

also brave 👍

harsh matrix
tardy delta
#

dutch lmao

lost matrix
river oracle
#

my pc is doing fine

harsh matrix
#

chrome would've taken 5gb for 5 tabs lmao

odd lodge
#

i really need help

tardy delta
#

lmao german kinda same thing as dutch

odd lodge
#

can anybody help me with something really simple

river oracle
undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

odd lodge
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

harsh matrix
river oracle
#

I use ubuntu

harsh matrix
#

yea

tardy delta
#

im usin windows cuz school lmao

harsh matrix
kind hatch
#

That's bpytop

tardy delta
#

ubuntu bloat aaa

#

and pop misses features lol

lost matrix
river oracle
harsh matrix
harsh matrix
river oracle
odd lodge
#

idk how to setup intellij so i can make plugins

river oracle
#

also removed their spyware :P

tardy delta
#

dont look at me, im talking nonsense cuz i got an exam maths tmrw

odd lodge
#

it would be great if someone walked me through it

river oracle
#

and add the dependency

#

and your set

odd lodge
#

yes

#

so

#

i added the dependency

#

but i dont think that worked

#

because the java plugin thing which i put in isnt recognised

#

idk

river oracle
#

if you added the dependency in your pom.xml it works 100% of the time

odd lodge
#

could you help in dms so i can send you a screenshot

#

im rly new to this

river oracle
#

just verify

tardy delta
#

!verify

undone axleBOT
#

Usage: !verify <forums username>

tardy delta
#

?dm

harsh matrix
tardy delta
#

ah

#

?dms

ornate patio
#

i literally cannot find this villager ai

tardy delta
#

maybe he lost his brain

brave sparrow
ornate patio
#

im trying

tardy delta
#

kaboom

lost matrix
#

5

buoyant viper
#

at least 3

ornate patio
#

how can i check if a block is a brewing stand in NMS

tall dragon
#

this aint rlly a spigot question but would any1 know how to change Pitch of a sound on the fly without changing playback speed like mc does?

waxen plinth
#

very little

#

usually not more than 2.8

lost matrix
waxen plinth
#

gigahertz I mean

tall dragon
waxen plinth
#

but I always have 3+ghz of ram free

lost matrix
tall dragon
ornate patio
#

how do i get a block at a specific location with nms

tall dragon
#

im just trying to exactly replicate what they do. but got no idea where to start on that

waxen plinth
#

lmao what are you even doing

tardy delta
#

gl lol

tender shard
ornate patio
#

thanks

tardy delta
#

lets code a linux distro

ornate patio
lost matrix
molten hearth
#

Add 37 trackers and perhaps Microsoft will fund you

tender shard
molten hearth
#

(Also a system wide profanity filter to make the OS family friendly)

tender shard
ornate patio
#

its so hard to get nms help man

tardy delta
#

i need to know laplace for my exam

tall dragon
#

well teach me

tardy delta
#

no no its for chance calculation stuff

#

i still need to study smh

lost matrix
tardy delta
#

aaa for calculating a chance

#

lemme take my book

glossy venture
tall dragon
tardy delta
#

ok my book is gone and i need to study it for wednesday smh

glossy venture
tardy delta
#

it was smth like if all chances are equal to e/o then the chance that one of them happens is ... / amount of chances

lost matrix
tardy delta
#

gotta learn my whole book in one evening smh

#

im bad i know

ornate patio
lost matrix
iron glade
#

Is there a built in way to check if a player has still an empty slot in his inventory?

eternal oxide
#

Villager AI is very different

iron glade
lost matrix
eternal oxide
#

Uses a BehaviorController with Actions and Memory

ornate patio
#

im just trying to steal the AI to use in my horse

tardy delta
#

ah yes put villager ai in a horse

lost matrix
ornate patio
#

trying to make the horse find a water source block that it can actually reach

lost matrix
ornate patio
#

zombies can tell where to go

#

villagers can tell which workstation to go

mortal hare
#

man injecting your own merchant inventory causes such weird glitches

#

cancelling events just stops working

ornate patio
#

my horse just tries to reach the water on the other side of the wall and dies of thirst

lost matrix
eternal oxide
#

an algorithm

mortal hare
#

so weird!

ornate patio
mortal hare
#

Moral of the story: dont try to open merchant inventories for multiple people

delicate lynx
#

make sure maven or gradle resolves your dependencies

#

@quaint mantle

tender shard
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

tender shard
#

tip: just use maven

#

gradle doesn't suck

#

but I don't like it

mortal hare
#

it does not

tender shard
#

then show your build.gradle

mortal hare
#

I just need to learn it

#

im not amateur myself

tender shard
#

then we can'T help you now

delicate lynx
#

there should be an error in your IDE

tardy delta
#

meow uwu

lost matrix
#

Sure you can

quaint mantle
#

lol

#

LOL

tardy delta
#

?jar

undone axleBOT
#
"Cant you just send the Spigot jar?"
  No, we can't. It's illegal to distribute Mojang code, meaning that you have to use BuildTools to build the Spigot jar.
delicate lynx
#

yikes

lost matrix
#

?jar

undone axleBOT
#
"Cant you just send the Spigot jar?"
  No, we can't. It's illegal to distribute Mojang code, meaning that you have to use BuildTools to build the Spigot jar.
quaint mantle
#

?bt

undone axleBOT
tardy delta
#

smh

#

i used to do that too

mortal hare
#

same here

delicate lynx
#

"I use gradle" but uses an illegal jar file

tardy delta
#

why does that site still exists

lost matrix
#

illegal

tender shard
#

using gradle but using illegal sites to download the bootstrap, then wonders why it doesn't work and refuses to send their build.gradle file? alright, good luck bro!

tardy delta
#

ur illegal 😏

quaint mantle
#

that website is illegal

lost matrix
#

Using this is actually against the law. Thats what i mean.

tardy delta
#

why is it still on then

mortal hare
#

Using that site is the same as downloading a torrent off a sketchy website

#

it goes under the mojang's copyright

quaint mantle
delicate lynx
#

also extremely outdated

tardy delta
#

no lol

#

maybe other people do

quiet ice
#

I mean you got nothing to loose

#

Either you win and that site goes down or you loose in which case spigot can drop BT

ornate patio
#

i dont know how to do an A*

lost matrix
ornate patio
delicate lynx
#

type with your fingers idk

lost matrix
#

Am i really about to eyeball another pathfinding here...
Whats the range you have in mind? This will decide if it has to be done async or sync.

tardy delta
#

what is happenings here

ornate patio
#

and how would it determine if a block is completely unreachable?

lost matrix
mortal hare
ornate patio
ornate patio
mortal hare
#

and use it somehow to pathfind their goals feaster

ivory sleet
#

?kick @quaint mantle

undone axleBOT
#

Done. That felt good.

mortal hare
#

oof

tardy delta
#

what happenings here

#

i got one braincell left for my exam math tmrw

tiny basin
#

Wassup, is there any way to map all minecraft given commands?

tardy delta
#

whats that supposed to mean

tender shard
#

Cast the PluginManager to SimplePluginManager. Get the declared field "commandMap", get the value and cast it to "SimpleCOmmandMap". It has a private final HashMap<String,Command> called "knownCommands".

#

that contains all plugin registered, vanilla, spigot, bukkit etc commands

tiny basin
#

thanks, love ya

tardy delta
#

reflection stuff 😎

tender shard
# tiny basin thanks, love ya
            try {
                SimplePluginManager pluginManager = (SimplePluginManager) Bukkit.getPluginManager();
                Field knownCommands = SimplePluginManager.class.getDeclaredField("commandMap");
                knownCommands.setAccessible(true);
                SimpleCommandMap commandMap = (SimpleCommandMap) knownCommands.get(pluginManager);
                Field knownCommandsField = SimpleCommandMap.class.getDeclaredField("knownCommands");
                knownCommandsField.setAccessible(true);
                Map<String, Command> commands = (Map<String, Command>) knownCommandsField.get(commandMap);
                commands.forEach((name, command) -> {
                    System.out.println(name);
                });
            } catch (Throwable t) {
                t.printStackTrace();
            }

this prints out all commands

tardy delta
#

what even the difference between getMethods and getDeclaredMethods alex?

#

i guess you know

#

getDeclared also getting privat eones?

tender shard
#

the reason why both exist is:
You could have a class A that defines a method "asd" which is private. B now extends A and also declares a private "asd" method. So getDeclaredMethod("asd") would return different stuff for A and B.

tardy delta
#

ah so getMethod only gets accessible methods

tender shard
#

If "asd" was public on class A and B doesn't override it, then getMethod("asd") on class B would return the method from calss A

tardy delta
#

mmh

tender shard
#

same for fields

tardy delta
#

oki

tender shard
tardy delta
#

good ty

#

i should be studying anyways 😂

tender shard
#

use --rev 1.19 --remapped

opal juniper
#

yes

quiet ice
#

"latest" is 1.18 as of know however as 1.19 is in beta

#

Eh, you probably do not need that flag if you have never used bt before

#

Do you want to use nms or just setting up a server?

#

Okay no

#

You can't do absolutely everything with it but it suffices for most stuff

#

That being said if you really were to use gradle - which I doubt - you wouldn't need to get the spigot-api jar

quaint mantle
#

I have no commands

#

look at the code

#

i sent the code

quiet ice
#

Really, make it yourself easy and learn the basics of gradle (or maven since that is a bit easier in my opinion). You will need to understand it one day and it is better if you do it while you are young

quaint mantle
#

no no ik how to do commands and events perfectly fine

#

its just i dont understand what this error is getting at

quiet ice
halcyon mica
#

How can I get a percent representation of how much more fuel is available and how far along the smelting process is from a furnace?

quaint mantle
quiet ice
#

What do you use then? JDT or IJ Artifacts?

quaint mantle
#
  • i never had this issue ever without one
quaint mantle
eternal oxide
quaint mantle
#

but by default it should of saved the value

quiet ice
#

And that creates such an exception?

quaint mantle
#

like i can send u the loaded config.yml

#
Discord:
  ServerID: "Put your server id here!"
  BotToken: "Put your token here!"
  Activity:
    Playing: true
    Listening: false
    Watching: false
  Events:
    Chat:
      Enabled: true
      ChannelID: "Put your channel id here!"

That's the config.yml

quiet ice
#

I believe your JDA version may be incompatible with the Log4j version provided by the server

quaint mantle
#

hm

eternal oxide
#

also this is a reload, test on a clean startup

quaint mantle
quiet ice
#

Or actually

quiet ice
#

Ugh, why does the logger not know from where the classes come from

quaint mantle
#

hm

quiet ice
#

Could you send the built jar if you don't mind?

quaint mantle
#

the thing is though i can make a discord bot ( outside of mc ) and start it up and host it on my pc and it works fine

quaint mantle
#

i cant upload it so im a dm u it

#

but u have to add me though bc i dont have my msgs on and i dont wanna turn them on

modest garnet
#

is there a way to change the amount of damage a sword does without enchants

quiet ice
#

Probably via attribute modifiers

#

?jd-s

undone axleBOT
halcyon mica
#

The furnace interface only exposes the total cook time and burn time

quiet ice
#

Ah

formal bear
#

I'm tired already, how to fix the config loader

    private final List<DropItems> dropListItems = new ArrayList<>();

    public StoneDrop dropManager() {

        ConfigurationSection stoneDrop = plugin.getConfig().getConfigurationSection("drop.stone");

        if (stoneDrop == null) return;

        for (String key : stoneDrop.getKeys(false)) {

            ConfigurationSection section = stoneDrop.getConfigurationSection(key);
            dropListItems.add(new DropItems(section));

        }
        
    }
drop:
  stone:
    0:
      material: "paper"
    1:
      material: "paper"

size() returns 0 so theres "nothing" in it

humble tulip
formal bear
#

dropListItems.size() = 0

#

after loop

humble tulip
#

After u check if stoneDrop is null do getKeys.size and print it

formal bear
#

ok i will chceck it

brave sparrow
#

A* is quite fast

#

It’s a variant of Dijkstra’s algorithm that uses a heuristic to guide the pathfinding

#

Why it pays off to take an algorithms class kids

tardy delta
#

im scared of those

#

maybe i will learn some next year

#

i hope so

humble tulip
quiet ice
#

It is common knowledge that A* is one of the best all-rounder pathfinding algorithms

lost matrix
brave sparrow
#

It isn’t a 1-1 depiction of an A* algorithm progressing

humble tulip
#

Ah ok

brave sparrow
formal bear
#

config.yml

#

but why ;/

eternal oxide
#

It shouldn;t. You must be debugging wrong.

humble tulip
#

Do plugin.getConfig.getKeys(true)

#

And print all keys

nova sparrow
#

How would you get a player's head in spigot effectively

eternal oxide
#

do you have the Player or OfflinePlayer?

buoyant viper
#

just like get it idk

#

😎

iron glade
#

Is there a way to change a player's GUI scale?

brave sparrow
iron glade
#

sadge

hasty prawn
#

Asking nicely

nova sparrow
#

that's a client side thing

iron glade
#

Yes bet so

nova sparrow
#

I don't believe you can do anything to influence that server side

brave sparrow
#

You can’t even read their GUI scale

nova sparrow
eternal oxide
#

?paste

undone axleBOT
eternal oxide
nova sparrow
#

ok thanks

formal bear
#

Ok it does not return null but not looping either

    public void dropManager() {

        ConfigurationSection stoneDrop = plugin.getConfig().getConfigurationSection("drop.stone");


        // not looping : (
        for (String key : stoneDrop.getKeys(false)) {

            Bukkit.getLogger().info(key);

            ConfigurationSection section = stoneDrop.getConfigurationSection(key);
            dropListItems.add(new DropItems(section));

        }
    }
iron glade
#

Another dumb question: is it possible to show the "1" when an itemstack's amount is one?

quaint mantle
#

not in large quantities at least

quaint mantle
iron glade
#

hm

ornate patio
tardy delta
#

im wondering, are plugins able to use the spigot server jar when they have the <provided> scope because the plugins and the server share the same classloader or smth?

opal juniper
#

the server classes are present in the plugin class loader

ornate patio
tardy delta
#

ah i was kinda close

#

and do all plugins use the same classloader which the server provides or how does that work?

formal bear
hybrid spoke
#

or it doesnt reach this for loop

formal bear
#

its not null either so whats wrong?

smoky oak
#

relevant config section pls

formal bear
#

hm?

eternal oxide
lost matrix
formal bear
#

it works

#

nvm

#

fc me

ornate patio
formal bear
#

bound must be positive

int randomList = random.nextInt(dropListItems.size());

when

dropListItems.size()
``` equals 2?? why it says that bound is not positive
eternal oxide
#

show the actual error

formal bear
#
Caused by: java.lang.IllegalArgumentException: bound must be positive
        at java.util.Random.nextInt(Random.java:322) ~[?:?]
        at java.util.concurrent.ThreadLocalRandom.nextInt(ThreadLocalRandom.java:449) ~[?:?]
        at pl.botprzemek.handlers.StoneDrop.onStoneBreak(StoneDrop.java:53) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        ... 23 more

Line 53 from error

ThreadLocalRandom random = ThreadLocalRandom.current();
        int randomList = random.nextInt(dropListItems.size());
eternal oxide
#

at some point you are passing a size of zero

#

0 is not positive

smoky oak
#

i thought zero is positive

#

why would we have a negative zero

#

in cs

eternal oxide
#

not when its used in an exclusive Random

smoky oak
#

ah

eternal oxide
#

upper bound must be greater than 0

formal bear
#

List size is 2 so what else makes it 0

tender shard
#

the list size is not 2

#

it's 0

formal bear
smoky oak
tender shard
# formal bear

are you doing this directly one line above the THreadLocalRandom part?

tender shard
smoky oak
#

i mean

#

whats that comparison symbol

tender shard
#

that's just ligatures

smoky oak
#

that some setting?

tender shard
#

yes

#

1 sec

formal bear
#

List is loading when enabling, ThreadLocalRandom is in function on event

tender shard
smoky oak
#

ah i see

#

thanks

tender shard
smoky oak
#

i guess that just shortens the display of the two symbols into one?

tender shard
#

yep

formal bear
tender shard
tender shard
ornate patio
smoky oak
#

cuz you might ask here how you do that but not if your sever can handle it

ornate patio
#

it was a question concerning the efficiency of the algorithm

#

like despite how powerful the server is I wanna make sure it’s scalable

echo basalt
smoky oak
#

ah

#

i was looking at the other half of the conversation then

#

also it probably scales linearly regardless

ornate patio
#

alright

eternal oxide
# formal bear

print the size before you call random. You are calling the method more than once.

echo basalt
#

random.nextInt can cause issues if the list size is 1 or 0

#
public final class ListUtils {

    private ListUtils() {
        throw new IllegalStateException("Utility class");
    }

    public static <T> T getRandom(Set<T> set) {
        int size = set.size();
        int index = ThreadLocalRandom.current().nextInt(size);
        int i = 0;

        for (T t : set) {
            if (i == index)
                return t;

            i++;
        }

        return null;
    }

    public static <T> T getRandom(List<T> list) {
        int size = list.size();

        if (size == 0)
            return null;

        if (size == 1)
            return list.get(0);

        Random random = ThreadLocalRandom.current();

        return list.get(random.nextInt(size));
    }
}

#

I just use this

eternal oxide
#

1 should cause no issues. it would completely invalidate any 0-0.99 number

#

he's just calling it with zero with his debug in the wrong place so he only see's the successfull call with a value of 2

tender shard
#

yes 1 will work fine and just always return 0. otherwise the nextInt method wouldn't check if the given bound is <= 0

echo basalt
#

odd

#

Might be specification but I've had weird issues

#

like 3 years ago

eternal oxide
#

my memory is like that too 🙂

#

I could swear Nelson Mandella died in prison

smoky oak
#

thats actually a completely different thing

#

something something mass psychology

eternal oxide
#

Same thing really. Like in an accident one person saw a red car, another saw a blue car and a third saw no car at all.

smoky oak
#

paint your car green on the left and red on the right

#

if you crash someone

eternal oxide
#

lol

smoky oak
#

urgh i now recall those psychodelic abonimations

#

cars with every part painted in a different eye watering neon color

eternal oxide
#

illegal here in teh UK. Cars here must be registered with a single base colour

smoky oak
#

nice but unfortunately im not living in the uk so i have to deal with those nineteen sixty cars

formal bear
#
    public boolean shouldDrop(Random random) {

        return random.nextDouble() > chance;

    }

chance = 0.4 for eaxmple


        ThreadLocalRandom random = ThreadLocalRandom.current();
        int randomList = random.nextInt(dropListItems.size());

        if (randomItem.shouldDrop(random)) {

            player.sendMessage("item dropped");
            block.breakNaturally();

        }

why its always returning true?

eternal oxide
#

you are using random so next double is an unbound double

#

You should be seeing a roughtly 50/50 split

#

If you are actually passing 0.4 as the chance

formal bear
#

i want to make for example 30% chance of dropping, if it returns true then drop

eternal oxide
#

you are going to have to post the actual code you are using not pseudo. You make too many assumptions and mistakes for us to comment on snippets

rough sonnet
#

if chance was 10%, shouldDrop will return true in roughly 90% of the cases

spare prism
#

Is there a way to increase player's swimming speed?
I'm doing it this way, but it automatically pushes me straight while I'm in water:

    @EventHandler
    void onMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        Location from = event.getFrom();
        Location to = event.getTo();

        if (from.getBlock().isLiquid()) {
            Vector changed = to.clone().subtract(from).toVector().multiply(Main.getInstance().getConfig().getDouble("Multiplier"));
            changed.setY(to.clone().subtract(from).toVector().getY());
            player.setVelocity(changed);
        }
    }
odd lodge
#

i did all the coding for a plugin
i have it all done
i just dont know how to make it execute with a command

onyx fjord
#

and commands must be registered btw

odd lodge
#

yes

warm mica
onyx fjord
#

why not attributes tho

spare prism
odd lodge
onyx fjord
#

welp good time to upgrade

warm mica
onyx fjord
onyx fjord
warm mica
#

I don't know, he has to test it, as I already said

onyx fjord
#

neither of these exist on ancient versions 😂

spare prism
onyx fjord
#

thats what updates are for

#

to add new features, and you certainly need them rn

spare prism
onyx fjord
#

welp then tell the person theres no clean way to do it on that specific version

eternal oxide
spare prism
onyx fjord
#

even if it all was good, thats super bad approach

#

players with higher ping will be glitching

#

and your anticheat will scream at them

hexed hatch
#

Is he modifying velocity on move event?

onyx fjord
#

yes

spare prism
hexed hatch
#

Wouldn’t that also cause it multiply exponentially? Lol

eternal oxide
#

You subtract Vectors not locations

spare prism
onyx fjord
hexed hatch
#

So you don’t have people like

#

Flying through the ocean

onyx fjord
#

how does dolphins grace code look like

#

it could be reverse engineered, but i dont think it will work

spare prism
odd lodge
#

do you have to include permissions in the plugin.yml

#

?

eternal oxide
#

if you want teh command to be accessible to some and not others

chrome beacon
shy shadow
#

Hey guys, if u do p.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equals("NameOfItem") it doesn't retrieve the name of the item.
I'm trying to get the name of the item (here, it's a nametag that got named NameOfItem from an Anvil), any idea ? 🤔

delicate lynx
#

output the name of the item to make sure it's actually getting the name, don't compare it

tender shard
shy shadow
#

It was a total missplay from me, I could do something way easier sorry

#

But now I'm getting a weird thing xD

#
public class RenameGoatEvent implements Listener {

    public void onInteract(PlayerInteractAtEntityEvent e){
        Player p = e.getPlayer();
        Entity entity = e.getRightClicked();


        if (entity.getType() == EntityType.GOAT){
            p.sendMessage("Yes");
        }
    }

}```

With this event, when I right clic with anything on a goat, it doesn't send the message and I can't figure what I'm retrieving wrong
eternal oxide
#

no annotation on the event

shy shadow
#

omg

#

the eventhandler

#

aaaaaaah

#

It's too hot for coding

#

I'm sorry guys, thanks for trying to help my stupid brain

tender shard
#

the stupid MC dev plugin for intelliJ should throw a warning if one forgets eventhandler

#

then it would have at least one useful feature

shy shadow
#

Hahaha

tender shard
#

lol I just thought "hey wasnt that the person who loved goats so much"

#

then I looked at your code

#

RenameGoatEvent

#

lol

shy shadow
#

Hahahaha yea

#

Chevre means goat in french too lmao

humble tulip
#

There are goats in mc?

odd lodge
#

why does code in the .yml file keep changing after i press run

shy shadow
odd lodge
#

how do i make it keep the code

humble tulip
#

What're you talking about

humble tulip
#

1.19?

odd lodge
#

every time i press run

#

it reverts back to how it was

#

how do i make it not do that

humble tulip
#

What do u mean run

shy shadow
odd lodge
#

the green

#

play button

humble tulip
#

Oh my god

#

Do u mean when u build with maven?

odd lodge
#

ye

humble tulip
#

Show the plugin.yml before and after building

#

That's a weird af issue

odd lodge
#

i need to verify

#

wait

buoyant viper
odd lodge
buoyant viper
#

usage should be under commands section like

#
commands:
  whereisbrandon:
    usage: /whereisbrandon```
odd lodge
#

wdym

#

where is the commands

buoyant viper
#

u... have to type it

odd lodge
#

that would make sense yes

tender shard
odd lodge
#

nope

#

it still disappeared

#

idk what im doing wrong

buoyant viper
odd lodge
#

yes

#

ive read this

#

so many times

#

the usage disappears

buoyant viper
#

honestly i still read it sometimes

odd lodge
#

every time

humble tulip
#

I've never seen that happen before

shy shadow
#

Something went wrong

humble tulip
tender shard
#

no

#

that's perfect

shy shadow
#

Forgot to check if the target was a goat lol

modest garnet
#

anyone able to help me with code for a small plugin

tender shard
#

?ask

undone axleBOT
#

If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply. Make sure you use the right channel regarding the topic of your question. Create a thread in case the channel is already in use!

golden turret
#

do someone knows a vehicle api plugin?

#

that plugin must not have any preset vehicles

#

only the api

tender shard
#

not sure but maybe LibsDisguises can do this?

golden turret
#

I think I will need to create my own api 😭

#

because I need it to act like a vehicle

#

gradually increase and decrease speed

#

do damage on entities when they collides

modest garnet
#

how to check if bukkitrunnable is still running?

golden turret
#

I guess you have an isCancelled

buoyant viper
#

?jd-s

undone axleBOT
tender shard
modest garnet
golden turret
#

well

#

you can create a boolean

#

like

tender shard
golden turret
#

boolean running

modest garnet
tender shard
modest garnet
#

oh ok ty

#

how do i get a bukkit runnable to run for a certain amount of time

humble tulip
#

Uhhh

tender shard
#

wdym?

humble tulip
#

Alex i doubt he needs to know if the run method is being executed for his usecase

sharp flare
humble tulip
#

Why would a chat game need to know if run is being executed

modest garnet
humble tulip
#

Oh well you don't need to know if it's being executed

#

U just need to know of it's cancelled

odd lodge
#

hey

modest garnet
humble tulip
#

So if a player types tje correct thing u cancel

odd lodge
#

so the code disappears after i press this

#

the Run

modest garnet
#

so i put the listener in the runnable?

humble tulip
#

Ok how do you plan to "end" a chat game

#

Send a msg saying no one did xyz in time

#

?

humble tulip
odd lodge
#

why does my yml code keep disappearing

#

i dont understand

humble tulip
odd lodge
humble tulip
#

Click the dropdown and click edit configurations

odd lodge
#

where is the drop downs

humble tulip
#

Next to the play button

modest garnet
odd lodge
#

is this what you want to see

delicate lynx
#

show your pom.xml

tender shard
humble tulip
odd lodge
humble tulip
#

If someone wins, cancel that runnable

tender shard
#

exactly

#

i actually made the exact same plugin today lol

modest garnet
humble tulip
#

No

#

1

modest garnet
#

wanna give me code lol

#

jk

tender shard
#

lol I coded exactly the same today lmao

modest garnet
#

does that not require a runnable too

tender shard
humble tulip
#

Oh yeah

tender shard
#

that starts your game

humble tulip
#

My bad so yes 2 runnables

odd lodge
#

so is there something wrong with how it set it up

#

as to why my plugin.yml stuff is resetting after i press the play button

tender shard
#

edit the correct file

#

send a screenshot of your project structure

odd lodge
tender shard
#

yeah

odd lodge
#

yes

tender shard
#

you are editing the file in the target folder

odd lodge
#

wdym

tender shard
#

edit the file in /src/main/resources and not the one in /target/

#

you should never do ANYTHING in target

#

target is the working directory where maven builds your stuff

odd lodge
#

oh

#

youre a life saver

tender shard
#

np lol

#

actually imho intellij should show a warning when editing files in target

#

sth like "are you sure you wanna edit THIS file?! it'll get overwritten anyway when you build next time"

ocean lion
#

?paste

undone axleBOT
ocean lion
tender shard
#

you are accessing the first element of the array "args"

#

although no args were entered

#

when args is empty, there is no args[0]

ocean lion
#

Ahhh

odd lodge
#

why doesnt it work

tender shard
#

probably the plugin didnt enable at all, check your console

odd lodge
#

how do i enable it

#

?

tender shard
#

check console for errors

odd lodge
#

there arent any errors

modest garnet
#

can u have 2 runnable in the same class?

odd lodge
#

what do you mean

tender shard
odd lodge
#

oh

modest garnet
tender shard
#

new Runnable { ... ?

#
        Runnable first = () -> { };
        Runnable second = () -> { };
        Runnable third = () -> { };
modest garnet
#

does that work for bukkitrunnables

tender shard
#

of course?

#
public class Test extends JavaPlugin {

    public static class Inner1 implements Runnable {
        @Override
        public void run() {
            
        }
    }
    
    private final Runnable anonymousField = new Runnable() {
        @Override
        public void run() {
            
        }
    };
    
    private final Runnable anonymousField2 = () -> { };


    @EventHandler
    public void onDeath(EntityDeathEvent event) {
        Runnable localAnonymous1 = () -> { };
        Runnable localAnonymous2 = new Runnable() {
            @Override
            public void run() {
                
            }
        };
    }
}
#

there is a million ways

#

you can create anonymous classes, inner classes, use lambdas, do it as local var or field, ...

#

you can of course also just declare it in its own file instead

odd lodge
#

why would this not be loading

iron glade
#

Check your console

#

it's your best friend

tender shard
pastel juniper
#

can sb pls explain to me why this plugin doesn't correctly, it only prints false even if I 'm in spawn chunks

public static Boolean onSpawn(Player player) {
        int spawnboardersize = config.getConfig().getInt("Spawn" + ".spawnboardersize");
        int spawnboarderX = config.getConfig().getInt("Spawn." + ".spawnboarderx");
        int spawnboarderZ = config.getConfig().getInt("Spawn." + ".spawnboarderz");

        int spawnX1 = spawnboardersize - spawnboarderX;
        int spawnX2 = spawnboardersize + spawnboarderX;
        int spawnZ1 = spawnboardersize - spawnboarderZ;
        int spawnZ2 = spawnboardersize + spawnboarderZ;

        int ChunkX = player.getLocation().getChunk().getX();
        int ChunkZ = player.getLocation().getChunk().getZ();

        if (ChunkZ > spawnZ1 && ChunkZ < spawnZ2 && ChunkX > spawnX1 && ChunkX < spawnX2) {
            return true;
        }
        else {
            return false;
        }
    }
}

 public void onMove(PlayerMoveEvent event){
        Player player = event.getPlayer();
        if(SpawnSystem.onSpawn(player) == true){
            player.sendMessage("True");
        }else {
            player.sendMessage("False");
        }
    }
tender shard
#

also you are checking chunk coordinates, and not block coordinates

pastel juniper
#

The chunk boarders are chunks

tender shard
#

and you are also using chunk coordinates in your config?

pastel juniper
#

yes

tender shard
#

then print out those numbers and see why it evaluates to false

pastel juniper
#
int SpawnBoarderX = player.getLocation().getChunk().getX();
                    

int SpawnBoarderZ = player.getLocation().getChunk().getZ();
tender shard
#

also please use proper variable names

#

spawnBorderX and not SpawnBoarderX

pastel juniper
modest garnet
#

@tender shard can you provide me with the code im not trying to copy just want to see your code to get my brain working

odd lodge
#

i checked the console

#

and there isnt even a mention of a plug in

modest garnet
#

look at dms

odd lodge
west scarab
#

when i do /mine i get an internal error, here's my code...

#
package beegens.mines;

import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.ArrayList;
import java.util.Random;

public final class Mines extends JavaPlugin implements Listener {

    public Inventory inv;

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(this, this);
        createinv();

    }

    public String color(String text) {
        return ChatColor.translateAlternateColorCodes('&', text);
    }

    @EventHandler
    public void mine(BlockBreakEvent event) {
        Player p = event.getPlayer();
        World world = p.getWorld();
        Block block = event.getBlock();
        Material material = block.getType();
        ItemStack i = p.getItemInHand();
        String in = i.getItemMeta().getDisplayName();
        int r = getRandomInt(100);
        if(world.getName().equals("mine")) {
            if(in.equalsIgnoreCase(color("&b&lMINER'S PICK"))) {
                if (material.equals(Material.STONE)) {
                    event.setDropItems(material.STONE.isAir());
                    if(r < 101) {
                        if (r > 5) {
                            p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(color("&7You mined a stone &8|| &a+1 shards")));
                            giveShard(p, 1);
                        }
                    }
                    if(r < 6) {
                        if (r > 0) {
                            p.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent(color("&7You mined a stone &8|| &a+1 crystals")));
                            giveCrystal(p, 1);
                        }
                    }
                }
            }
        }
    }

    private void giveShard(Player p, int i) {
        ItemStack item = new ItemStack(Material.PRISMARINE_SHARD, 1);
        ItemMeta itemmeta = item.getItemMeta();
        itemmeta.setDisplayName(color("&3&lMine &b&lShard"));
        ArrayList<String> lore = new ArrayList<String>();
        lore.add(color("&b| &7use &f/mine forge &7to trade!"));
        itemmeta.setLore(lore);
        item.setItemMeta(itemmeta);
        p.getInventory().addItem(item);
    }

    private void giveCrystal(Player p, int i) {
        ItemStack item = new ItemStack(Material.AMETHYST_CLUSTER, 1);
        ItemMeta itemmeta = item.getItemMeta();
        itemmeta.setDisplayName(color("&5&lMine &d&lCrystal"));
        ArrayList<String> lore = new ArrayList<String>();
        lore.add(color("&d| &7use &f/mine forge &7to trade!"));
        itemmeta.setLore(lore);
        item.setItemMeta(itemmeta);
        p.getInventory().addItem(item);
    }

    public static Integer getRandomInt(Integer max) {
        Random ran = new Random();
        return ran.nextInt(max);
    }


    @Override
    public boolean onCommand(CommandSender p, Command command, String label, String[] args) {
        if(command.getName().equalsIgnoreCase("mine")) {
            Player player = (Player) p;
            player.openInventory(inv);
            return true;
        }
        return true;
    }

    public void createinv() {
        Inventory inv = Bukkit.createInventory(null, 45, color("&v&lMine Homepage"));
        inv.setItem(1, new ItemStack(Material.STONE));

    }

}
dusk flicker
#

dear lord use a a paste

tender shard
#

-paste the error

dusk flicker
#

?paste

undone axleBOT
tender shard
#

-paste

#

oh yeah it's ?

dusk flicker
#

alex you okay? lol

tender shard
#

it's -paste on my discord lol

dusk flicker
#

ah lol

tender shard
undone axleBOT
pastel juniper
#

Thank You

tender shard
undone axleBOT
west scarab
#

i fixed it

#

i was doing Inventory inv =

#

instead of inv =

tender shard
quaint mantle
#

How to register and protect a custom plugin message channel

tender shard
#

wdym with "protect"?

#

ah the bratwurst is back

lost matrix
quaint mantle
#

Protection from injection / fake messages

tender shard
#

fake messages? are you afraid that other plugins will use your channel to send messages or what? o0

dusk flicker
#

Im assuming they are thinking of like players sending PMC messages from a client or smth

quaint mantle
#

Yes

lost matrix
#

This only matters if:

  1. The player actually receives the packets
  2. The packets are unencrypted
quaint mantle
dusk flicker
#

If you are truly concerned about someone seeing the packet or its data, I would just use something other than PMCs

lost matrix
#

Wait... it actually doesnt matter at all because the player sends packets in the other pipeline.

tender shard
dusk flicker
#

lol

quaint mantle
tender shard
#

hm?

tender shard
#

base64 is an encoding, not an encryption

dusk flicker
#

I run Redis's pub/sub system which is very similar to PMCs, and dont require players to be on/any part of it exposed

lost matrix
tender shard
lost matrix
#

The server sends the plugin message to the proxy...

tender shard
#

oh wait

#

you wrote "cant"

dusk flicker
#

PMCs are weird fuckery I never want to dive into lol

tender shard
#

my bad i read "can"

lost matrix
#

And the client cant send any packets through the proxy on the bungee cannel iirc.

#

That would be super unsafe

#

So no need to protect the PMC

#

Honestly i think redis is just better for everything cross-server related.

dusk flicker
#

+1 to that

tender shard
#

btw what's going on with this verano dude. a year ago he announced "I'll write a plugin messaging library that will work even without players" and now he starts asking questions like "how can I check whether a player took fall damage in EntityDamageEvent" like wtf lol. Like, did he learn everything backwards lol

#

that dude should definitely stop smoking pot all the time lmao

#

@sterile token stop smoking so much weed lol

#

itsa hurta your brain-a

lost matrix
dusk flicker
#

lmao

ornate patio
tender shard
#

at first I thought he was russian because he was constantly talking about vodka and his name sounded russian too lol

dusk flicker
#

he said someone shouldent get banned for trolling, then if you look at his previous messages he said Troll = Ban lol

echo basalt
echo basalt
#

jokes on him I call everyone an idiot

lost matrix
tender shard
#

that's nothing

dusk flicker
#

lol

uneven fiber
#

i like him he helped me with a question 💪

tender shard
#

didnt want to say that I don't like him, he's a funny dude, but still it's weir dlol

ornate patio
#

no rush

#

you a real one 🙏

tender shard
#

erm okay WTF

#

a popular "adult video" site has a minecraft server?!

echo basalt
dusk flicker
#

does it start with a P?

tender shard
sharp flare
#

Ph

dusk flicker
#

oh lol

sharp flare
#

💯

dusk flicker
#

better question is why are you in that server

echo basalt
#

it's the hub

hasty prawn
#

WOOOO HYPERS

tender shard
sharp flare
#

Lol

dusk flicker
#

Lmao

sharp flare
#

Since when

dire sand
#

Hello, I updated to 1.18

#

And when adding it as a library to my project

#

It doesn't seem to be recognizing all of my bukkit things

#

However, my other deps are being read

#

I am on java 17

lost matrix
dire sand
#

What do I use now?

#

Also when did this change? :p

lost matrix
tender shard
dusk flicker
#

ugh I forget the command for that

dire sand
#

I don't know how to use either of those xd

dusk flicker
#

time to learn

dire sand
#

True, probably for the better

#

Any guides then?

dusk flicker
#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

sharp flare
#

Then the server is f up, maybe all has kick perms xD

dusk flicker
#

ah got it

tender shard
sharp flare
#

Unless u got a special role

lost matrix
dire sand
#

In reading the post it says to download the snapshot which is listed as 1.18.1. But the post says 1.18.x. Does that mean that now jars for ex. this one can be used as an apif or older version like 1.18?

nova sparrow
#

I beliee so

#

as 1.18.1 and 1.18.2 didnt really add anything server-side I believe

tender shard
brave sparrow
dusk flicker
#

1.18.9 best

#

lol

dire sand
#

Ooh gotcha

#

Also since updating my server to 1.18 it attempts to generate the region for minecraft:overworld and appears to run out of memory trying this:

#
[00:48:47] [Worker-Main-2/INFO]: Preparing spawn area: 29%
[00:48:48] [Worker-Main-2/INFO]: Preparing spawn area: 31%
[00:48:48] [Worker-Main-2/INFO]: Preparing spawn area: 33%
[00:48:49] [Worker-Main-2/INFO]: Preparing spawn area: 33%
[00:48:49] [Worker-Main-2/INFO]: Preparing spawn area: 43%
[00:48:50] [Worker-Main-2/INFO]: Preparing spawn area: 51%
>./start.sh: line 1: 106838 Killed                  java -Xms128M -Xmx3G -DIReallyKnowWhatIAmDoingISwear -jar spigot-1.18.jar
#

Any idea on how I can either stop this generation or go around it?

ocean lion
tender shard
ocean lion
#

but

#

instance this; in onEnable

tender shard
#

well but that's way too late

ocean lion
#

I see

tender shard
#

in Hub line 14 you already try to access Hub.instance

#

what's Hub line 14?

ocean lion
#

I saw stupid

#

question

#

Ty for help 😄

tender shard
#

np

dire sand
#

Is there a flag I can include to potentially skip this generation?

#

?paste

undone axleBOT
ocean lion
#

same error

tender shard
#

first, the class gets laoded into memory

#

then all the static stuff gets initialized

#

for example PREFIX

#

that tries to access Hub.instance

#

but that wasn't set yet

dire sand
tender shard
#

either make PREFIX not static, or only set it to a value in onEnable, the constructor, onLoad or in the init block

ocean lion
#

so this is better?

tender shard
#

for example this would work:

public class Hub {
  public static String PREFIX;
  {
    getConfig().getString("...");
  }

tender shard
#

as I said - ALL static fields get "loaded" before any of your non-static stuff gets "loaded"

#

loaded is the wrong word but whatever

#

you should simply make PREFIX and NO_PERMISSION non-static

#

or, as said, only assign them after you have an instance

#

Currently, java does this:

  1. Oh, let's check out Hub.class. Let's check out all the class members (static fields) first
  2. Okay, I see there's a field called "instance" but it's not assigned yet. So it's null, okay, no problem, it will probably be assigned later on
  3. There's a static String called "PREFIX". And it has the return value of Hub.instance.getConfig()...
  4. Oh fuck. instance is still null
  5. RIP
ocean lion
#

Colorize is only for chat util

#

Colorize.sendMessage(player, "");

#

etc

tender shard
#

you pass "null" to ChatColor.translateAlternateColorCodes in commandFreeze line 25 / Colorize lines 17 and 9

ocean lion
#
package com.yanesagrybnow.project;

import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;

public class Colorize {

    public static String format(String str) {
        return ChatColor.translateAlternateColorCodes('&', str);
    }

    public static String stripColor(String str) {
        return ChatColor.stripColor(str);
    }

    public static void sendMessage(CommandSender sender, String message) {
        sender.sendMessage(format(message));
    }
}

#

something wrong with this?

tender shard
#

yes. you are somehow passing "null" to sendMessage

#

in commandFreeze line 25

ocean lion
#

Thats odd

#

im passing

#

Colorize.sendMessage(player, Hub.NO_PERMISSION);

#

from the static Prefix and no permission in Hub

tender shard
#

and what is Hub.NO_PERMISSION ?

ocean lion
#

public static String NO_PERMISSION; {getConfig().getString(PREFIX + "global_no_permission_message");}

tender shard
#

yes, NO_PERMISSION will only have a value once your plugin instance was created

#

you shouldnt make all this stuff static if you don't know how that relates to class loading etc

crisp steeple
#

doesnt look like you ever even assign it

tender shard
#

there is not a single reason to have NO_PERMISSION static

ocean lion
#

I need to access it from the other class

tender shard
tender shard
tender shard
#

why are you sending that as video?

#

?paste the error and ?paste your code

undone axleBOT
woeful crescent
#

bc, the problem is explained there

ocean lion
#

why does it not happen with the prefix right above

tender shard
#
public String NO_PERMISSION = getConfig().getString(PREFIX + "global_no_permission_message");
echo basalt
#

yeah this tells a lot

tender shard
woeful crescent
#

ok, sorry

#

i mean it's more about what happens when i actually try to run the command than the code

#

and how all of the permission attachments are listed when i joined

tender shard
woeful crescent
#

so just skip to 0:38, i guess

tender shard
#

I'll happily take a look once you just paste your code and the error

dusk flicker
#

ah yes the 240p video

woeful crescent
woeful crescent
#

but you should skip to 0:38 to see what actually happens

ocean lion
#

?paste

undone axleBOT
ocean lion
tender shard
#

noone wants to watch that video, it's annoying for us to have to scroll inside some video etc

dusk flicker
#

^

ocean lion
#

Mfnalex it still gives it..

#

even thought I changed it to how u said

woeful crescent
#

uhhh ok, ill explain what happens in text instead?

tender shard
#

what you want is to do this:

public String NO_PERMISSION = PREFIX + getConfig().getString("global_no_permission_message");

and NOT this

public String NO_PERMISSION = getConfig().getString(PREFIX + "global_no_permission_message");
ocean lion
#

ahaha

#

im laughing so hard, im such a noob

#

thank you so much for the help

tender shard
#

np 🙂

woeful crescent
#

nvm im gonna try something

lunar shuttle
#

Is there a straightforward way to check if a block is any type of log or do I need to check it against each log material individually?

tender shard
#
Tag.LOGS.isTagged(type)
lunar shuttle
tender shard
#

for example, you might want to add the nether trees too. I am not sure if those are tagged as LOG

lunar shuttle
echo basalt
#

I'd yell at you for using streams but it's all cached

dusk flicker
#

streams are nice

echo basalt
#

overhead go brr

dusk flicker
#

you dont want to see some of my objects

echo basalt
#

They just don't add anything usefull

echo basalt
tender shard
dusk flicker
#

what is that actually from lol

echo basalt
#

a minigame project I'm working on

dusk flicker
#

lombok is nice

#

lol

tender shard
#

lombok is nice. but it's weird to see someone hating on streams while liking lombok lol

echo basalt
#

lombok does all its magic at compile level

#

if lombok parsed annotations during runtime I'd blow my brains out

#

and not use it anymore

ocean lion
echo basalt
#

👍

ocean lion
#

but /freeze myUsername works

dusk flicker
#

missing a check if the player is online

ocean lion
#

is that different from if (target == null) {

tender shard
#

if you get the player using Bukkit.getPlayer(...), no

ocean lion
#

changed it to isOnline

#

still same error

#

because "target" is null

tender shard
#

?paste the error

undone axleBOT
drowsy helm
#

can you show your code

ocean lion
#

Player target = player.getServer().getPlayerExact(args[0]);

pearl glade
tender shard
#

erm what

drowsy helm
#

what

tender shard
#

why do you get the server from a player object

drowsy helm
#

where did you get that code from

#

Bukkit.getPlayer(args[0])

tender shard
#

you never check if target == null or not

ocean lion
#

I did

tender shard
#

where?

ocean lion
#

until he told me to change to isOnline

#

still gave me an error

drowsy helm
#

thats not in your code either

vocal cloud
#

Man that coloring hurts my eyes

tender shard
#

you can not use isOnline when target is null

#

check if target == null, and if yes, send a message "player not found" and return true

drowsy helm
#

oh nvm it is

steep cove
#

Is there anyways to call getDataFolder() in a class that isn't main without injecting main into the class?

ocean lion
#

so like this right

tender shard
#

line 10

#

you are calling target.getName() although you just confirmed that target is null

tender shard
#

or JavaPlugin.getProvidingClass

vocal cloud
ocean lion
#

how should i get the string they typed then

#

or the name rather their trying to use

tender shard
#

you already did that

#

args[0] ?

ocean lion
#

args[0].toString()

tender shard
#

?!

ocean lion
#

XD

tender shard
#

btw if you ALWAYS add your PREFIX to every message, just add the prefix in your sendMessage method instead of adding it manually to every message