#help-development

1 messages · Page 537 of 1

vast ledge
#

Loading Commands from yml

#

then continueing with registering events

#

and further on

nimble oxide
#

ye?

vast ledge
#

So if it cant load the YML correctly

#

itl exit

#

and not continue

nimble oxide
#

I registered my command

#

in the plugin.yml

vast ledge
#

ok

nimble oxide
#

so I guess it can't be that

eternal oxide
#

yep no error in commands shown

nimble oxide
#

Wait

#

is the plugin.yml case sensitive?

tardy delta
#

yes

nimble oxide
#

ohh

#

I typed in when I registered the command all lower case, but in the yml it has a few uppercase

#

Alr

nimble oxide
quaint mantle
#

can i control player vanilla level from db ?
is there a way to integrate it?

vast ledge
#

Wat

#

explain that question

#

please

tardy delta
#

Player#setExp

eternal oxide
tardy delta
#

i believe

vast ledge
#

Oh that level

tardy delta
#

only need the math ig

eternal oxide
#

its not? google says it is

quaint mantle
# vast ledge Wat

i add player vanilla levels to db
when player level up db level will up
but if i change level from db ingame player level not changing

eternal oxide
#

its Citizens

smoky anchor
eternal oxide
#

yes

smoky anchor
#

Who designed that

hazy parrot
#

that is how bukkit event handling works

#

i dont like it too

#

what

young knoll
#

In bukkit it’s also two events to listen to entity left and right click iirc

tardy delta
#

check the arg if it starts with -?

hazy parrot
#

.startsWith ?

smoky anchor
#

for (String s : args)
if (s.startsWith(...))
...

hazy parrot
#

check if args[args.length - 1] equals to -s

#

if you want it to always be last arg

young knoll
#

Just don’t support that :p

eternal oxide
#

stream and filter for -

young knoll
#

Or you’d have to filter out those args and remake the array without them

eternal oxide
#

extract all args with - at teh start

#

Arrays.stream

young knoll
#

Args is an array

hazy parrot
#

Arrays.stream(args).filter(arg -> arg.startsWith("-")).toList()

#

and you have all args with - infront

tardy delta
#

nobody using Stream.of :(

young knoll
#

If you remove it you’ll just be left with a null

eternal oxide
#

invert the filter

hazy parrot
#

Arrays.stream(args).filter(arg -> !arg.startsWith("-")).toList(), but tbh i would not support - args being anywhere in command

eternal oxide
#

it will give you a List containing ALL args which start with -

hazy parrot
#

because there is no env where it works like that

eternal oxide
#

that gives you everything else

young knoll
#

It also means tab completion will be weird

eternal oxide
#

add that first 🙂

#

then you'll see why you shoudl have specific positions for args

young knoll
#

Implement TabCompleter

#

Or TabExecutor which covers both TabCompleter and CommandExecutor

eternal oxide
#

^

subtle folio
tardy delta
#

i use acf 💀

young knoll
#

mfw ur too slow

subtle folio
#

shutup i was finding the link

subtle folio
tardy delta
#

java annotations weird

subtle folio
#

exactly

young knoll
#

Boo shading things

tardy delta
#

but i like minestoms framework more (only working on minestom ™️ )

young knoll
#

If ur plugin isn’t smaller than super Mario bros 3 then it’s bad

subtle folio
#

how big is mb3

tardy delta
#

works with a lookup tree or smth

young knoll
#

256kb

subtle folio
#

my api is smaller than that

#

jk

#

69x the siez

young knoll
#

Mine is public but it has no docs

#

So good luck

tardy delta
#

brigadier 💀

#

isnt brigadier that horrible syntax with .then(() -> ) and stuff

#

or am i confusing it

young knoll
#

Yeah it’s builders

#

Big ones

tardy delta
#

oh ye exactly this gross stuff

#

looks more like react

subtle folio
ivory sleet
subtle folio
#

no way that is java command framework

river oracle
subtle folio
#

disgusting

#

wtf

ivory sleet
#

Na

#

Fourteen just showed a poor example

tardy delta
#

prove me

ivory sleet
#

I can do once I get home

subtle folio
#

what's it supposed to be written like

river oracle
#

brigadier is awesome

subtle folio
#

bc rn ACF is looking bettter than this

ivory sleet
#

ACF is just preference tho

tardy delta
#

acf is just weird with a bunch of annotations

river oracle
#

You just can't implement it to spigot without bms

ivory sleet
#

Like its just annotations instead

#

Like fuck object orientation but ye

young knoll
#

Spigot brigadier api when

river oracle
#

I get it

tardy delta
#

id be happy if java had annotations like

[Command("test"), Syntax("/test <a>")]```
#

but thats more like rust

#

hmm looks trash

subtle folio
#

i love value, yourVaule

tardy delta
#

jls you mean

subtle folio
#

groovy support when

tardy delta
#

actually compiler

#

just find a transpiler

subtle folio
#

scala when

tardy delta
#

man what am i even saying

#

i thought orbyfied was writing some kind of java extension thing

young knoll
#

Java? More like I hava no friends

tardy delta
#

man discord lets spoilers really look nasty

#

with the vague blur

young knoll
#

You what

twilit roost
#

is there some way to trick the server/client and make walking basically on air possible?
Im using Block Displays for moving blocks, since they don't snap to whole x,y,z
just they aren't collidable
how can I make them collide/walked-on?

vast ledge
#

create a barrier under them

#

or set them as flying

#

and limit y movement

twilit roost
#

but barrier doesn't fit the model of some blocks

#

mmm flying might be the option

#

but what about starts for example

vast ledge
#

stairs?

#

at var.5 force y movement by .5

chrome beacon
#

Didn't we tell you that yesterday?

vast ledge
#

Can shulkers adapt to stairs?

chrome beacon
#

.

twilit roost
#

AI is going to take over the world

twilit roost
subtle folio
vast ledge
#

xD

subtle folio
#

i knew trees didn't make it

vast ledge
#

Weve all been fooled

chrome beacon
#

I just linked the message

twilit roost
#

I aint no Marcely or sum

chrome beacon
#

They answered you

#

Click the message to go there

vast ledge
twilit roost
#

oh right
I didn't pay attention to previous messages

subtle folio
#

Why is Player#hidePlayer backwards? Its so weird..

vast ledge
#

wdym backwards?

subtle folio
#

Like if I want to hide Player A from player B

#

i have to do b.hidePlayer(A)

#

I would assume it to be the other way around

vast ledge
#

i personally think it makes more sense the way it is, but its a personal thing i guess

subtle folio
#

javadoc is very undescribing

vast ledge
#

He knows what it does

subtle folio
#

that makes no sense

hushed spindle
#

why not

subtle folio
#

it should be the other way around

vast ledge
#

he was just asking, why it is that way around and not the other

#

ikd

#

for me it makes more sense the way it is

subtle folio
#

It's counter intuivited

#

I'd assume that Id be hiding the targeted player

#

not the player i put in the args

#

if that existed

#

id be less angry

#

kk

hushed spindle
#

i guess you're reading it more like
player.hideFrom(player)
instead of
player.hideForMe(player)

subtle folio
#

Yeah

zenith gate
#

What’s the difference between spawn and spawn naturally?

shadow night
#

is there a certain event that is triggered when somebody is damaged by an explosion? Or is it just the Entity damaged by entity event with damager TNTPrimed?

hushed spindle
#

anyway, i was wondering if anyone knew of a way to basically implement tables in things like item lore, i just want equal spacing between certain strings. i was thinking maybe negative space characters, but then the strings i would want to space apart would have to be displayed as a character of their own with 0 width. any way around this?

#

spawn naturally just means 0.5 is added to the x y and z of the spawn coordinate is all

hushed spindle
#

so it spawns in the center of the block rather than on the corner of a block

zenith gate
#

Ohh okay, idc for that. Thanks.

twilit roost
#

if I spawn shulker box somewhere via Packets, will it still be walkable but won't disturb water for example?
I don't want it to replace the block there is present on position of spawn

young knoll
#

A shulker or a shulker box

twilit roost
#

*shulker

young knoll
#

It shouldn't disturb water

#

Idk if it'll be walkable tho, the server might get real mad

hushed spindle
#

i use this

public Config reload() {
    if (file == null)
        this.file = new File(plugin.getDataFolder(), this.name);

    this.config = YamlConfiguration.loadConfiguration(file);

    Reader defConfigStream;
    try {
        defConfigStream = new InputStreamReader(plugin.getResource(this.name), "UTF8");

        if (defConfigStream != null) {
            YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
            this.config.setDefaults(defConfig);
        }
    } catch (UnsupportedEncodingException | NullPointerException ignored) {
    }
    return this;
}
#

where this.file is simple a File and this.config is YamlConfiguration

ivory sleet
#

What do you want by reload?

#

load the file again?

hushed spindle
#

also keep in mind that obviously when you're reloading a config you should also reload the instantiated properties of your plugin

ivory sleet
#

Or first write to it and then load it?

#

Also ur async version is not safe

#

You can use FileConfiguration#load(file)

livid dove
#

Quick one I'd think you'd all appreciate. Go actually look what "Git" stands for (not the word , the actual wiki article for the distributed version control)

ivory sleet
#

You don’t need loadConfiguration technically

hushed spindle
#

yea that would work if thats what you want

ivory sleet
#

just load()

eternal oxide
#

I just noticed your teamCheck can be optimizedjava private void teamCheck(EntityDamageEvent e, Player p1, Player p2) { String p1Team = TeamUtils.getPlayerTeam(p1); String p2Team = TeamUtils.getPlayerTeam(p2); if (p1Team != null && p1Team.equals(p2Team)) e.setCancelled(true); }

young knoll
#

Objects.equals :p

opal juniper
#

Objects.requirenonnull

eternal oxide
#

he doesn;t want it to blow up

young knoll
#

Doesn't Objects.equals handle nulls

eternal oxide
#

it does, two nulls will be equal

#

so not useable without the != null check before, so no advantage in using it

vast ledge
#

if test is null no

lucid gazelle
#

u replied after an hour lol

hushed spindle
#

i mean in this example test will never be null because he just instantiated it

eternal oxide
#

yeah I went to close a page in my browser 🙂

quaint mantle
#

why i got this error ?

remote swallow
#

show ur sql

quaint mantle
remote swallow
quaint mantle
remote swallow
quaint mantle
#

wait don't tell me i find

shadow night
#

what event is triggered when somebody changes the hotbar slot they're on?

quaint mantle
#

bro where is

#

i can't find

#

omg

remote swallow
#

you set the name, but you are also trying to set the level

#

you dont actually need to update the name, you only need to change the level

quaint mantle
#

.__.

#

ty btw

#

i feel stupid, omg

tardy delta
#

i hope you dont do that sync

quaint mantle
#

yes

#

i got same error again

#

😄

remote swallow
#

what does ur code look like now

shadow night
quaint mantle
tardy delta
#

theres only 1

remote swallow
#

you are still trying to set the name

quaint mantle
#

but question mark

remote swallow
#

yeah

#

ur trying to set the 2nd

quaint mantle
#

alright wait

hushed spindle
warm mica
#

Instead of insert and update you could also just use replace

remote swallow
quaint mantle
#

i know

#

😄 ty

#

btw

warm mica
#

And please don't use names to store their stats

hushed spindle
#

use UUID!

warm mica
#

People are able to change names

quaint mantle
#

i know

#

but this offline

#

don't hate me

warm mica
#

You can use uuids nonetheless even if it's offline

hushed spindle
#

i'd still use uuid tbh

quaint mantle
#

i trying to learn

quaint mantle
#

those mixed characters

#

i have a disease for this

#

😄

subtle folio
# quaint mantle yes uuid confused me

UUIDS are unnique identifiers used for storing unique IDS of players, if you really got confused you could make a column for the player name, but the ID column should be unique.

tardy delta
#

consists of two longs

quaint mantle
#

actually good idea

hazy parrot
#

you shouldn't be using uuid as primary key

quaint mantle
#

is this column index?

remote swallow
#

no

tardy delta
#

thats the first ?

remote swallow
#

its the amount of question marks in ur prep statement

tardy delta
#

somehow they decided to let it start at 1

#

its not the amount, its the index of it + 1

#

as in "first" in english

quaint mantle
#

im confused again if i
if i stated ?

#

i need add ? paramater index

#

wait i will show u guys

#

after i add playername to here

tardy delta
#

index 1 is for first ?, 2 is for second ?

quaint mantle
#

plugin will works

quaint mantle
#

but i need getplayername in updateplayerstats ?

tardy delta
#

what

quaint mantle
#

when i remove this

#

code will not work

tardy delta
#

cuz that second ? isnt filled in then

#

prepared statement validates its params

quaint mantle
#

yes but EpicEbic tells me

#

maybe i misunderstood

quaint mantle
#

how can i set playerlevel from database ?

#

can i check db events with jdbc ?

remote swallow
#

add it to start with or update it

agile anvil
quaint mantle
#

but this level is minecraft vanilla level

remote swallow
#

why are you storing that in db

agile anvil
#

Save it in db when player disconnect

tardy delta
agile anvil
#

When he joins fetch the level with a SELECT

quaint mantle
remote swallow
#

result set

quaint mantle
#

level system works with vanilla levels

remote swallow
#

do what _Rolyn said

tardy delta
quaint mantle
tardy delta
#

had sql exam today lol

quaint mantle
#

I wanted to do this kind of process to add experience to myself.

green falcon
#

whats the proper way to get an entity to "look at" something? Mob.lookAt() doesn't update Mob.yRot

fast breach
#

Hi, I'm trying to add support for spigot 1.16.5 to my plugin however I have run into some issues and I was wondering if there is a known solution to them
My project currently uses some extra apis from paper that I would like to use when possible as they make everything run a bit smoother. I have gradle-subprojects set up to abstract those behind an interface that is only loaded when they are available. This works great for 1.17-1.19.4.

This solution unfortunatly breaks down at 1.16.5. Because the apis I use are only present in the 1.19.3+ versions of paper I have to build the project with at least Java 17, but spigot 1.16.5 tops out at java 16 (and I can't seem to skip the java version check in spigot)

I tried to set the Java versions per subproject with the main project being 16 and only the subprojects that need java 17 at 17. The subprojects aren't going to be loaded unless the minecraft version is at 1.19+ (Java 17+) anyways so in my head it should work, but gradle doesn't seem to want to let me do that. Is there any way to override/work around this

warm mica
fast breach
#

It doesn't let me. It claims that the dependency (1.19.3 paper) requires Java 17

#

Let me grab the error rq

#

Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of project :versions was found. The consumer was configured to find a library for use during compile-time, compatible with Java 16, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:

  • Variant 'apiElements' capability net.bonn2:versions:2.3.5 declares a library for use during compile-time, packaged as a jar, and its dependencies declared externally:
    • Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 16
    • Other compatible attribute:
      • Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
#

The project structure is this

- BigDoorsPhysics
  - Versions
    - v1_17
    - v1_19
    - v1_19_3 <- This one needs paper 1.19.3 (Java 17) as it added an api to handle teleporting stacked entities

No matter what I do it always errors out, either because paper 1.19.3 requires Java 17 or the subproject v_1_19_3 needs java 17

#

v1_17 only uses apis that have been around forever so if I can get past this Java version issue then I should be able to have my ad-on go all the way back to 1.11 and cover all the supported BigDoors versions

remote swallow
#

you can specify use toolchains a java version, and it can go in the submodule build.gradle

fast breach
#

I'm pretty sure I've tried toolchains, but I'll give it another go

nimble oxide
#

ANyone who knows how I would add money to a players balance?

#

or am I forced to use the essentials api

remote swallow
#

you should probably use vault for that

nimble oxide
quaint mantle
#

can someone help me with installing a plugin ?

nimble oxide
#

or where I can find it

nimble oxide
#

How can I implement it with maven

#

repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
compileOnly "com.github.MilkBowl:VaultAPI:1.7"
}

remote swallow
#

its right above that

nimble oxide
#

oh lmao thx

nimble oxide
remote swallow
#

Economy#depositPlayer(player, 99.99);

nimble oxide
#

so I cant do player.deposit?

remote swallow
#

that would require a modification to the api, which plugins cant really do

flint coyote
#

kotlin can. And I think lombok, too

#

Obviously those are changes before compilation

nimble oxide
remote swallow
nimble oxide
#

Do I need to add everything of it

remote swallow
#

just the stuff relating to economy

nimble oxide
#

Or cant I just put this at the top

#

private static Economy econ = null;

remote swallow
#

that would npe

nimble oxide
#

?

#

what does npe mean

remote swallow
#

?npe

undone axleBOT
#

The NullPointerException, (commonly referred to as NPE), is thrown in the following cases, but not sealed to: 1. null is passed into a method or constructor which does not allow it; 2. When trying to access a field on an object pointing to null; 3. Casting null to a primitive. See https://stackoverflow.com/a/3988794/17047120 for information on how to debug NPEs.

nimble oxide
#

so not work basicly

remote swallow
#

public class ExamplePlugin extends JavaPlugin {
    
    private static final Logger log = Logger.getLogger("Minecraft");
    private static Economy econ = null;

    @Override
    public void onDisable() {
        log.info(String.format("[%s] Disabled Version %s", getDescription().getName(), getDescription().getVersion()));
    }

    @Override
    public void onEnable() {
        if (!setupEconomy() ) {
            log.severe(String.format("[%s] - Disabled due to no Vault dependency found!", getDescription().getName()));
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
    }
    
    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        econ = rsp.getProvider();
        return econ != null;
    }
   
    
    public boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) {
        if(!(sender instanceof Player)) {
            log.info("Only players are supported for this Example Plugin, but you should not do this!!!");
            return true;
        }
        
        Player player = (Player) sender;
        
        econ.depositPlayer(player, 99.99);
        return true;
    }
    
    public static Economy getEconomy() {
        return econ;
    }
   
}
nimble oxide
#

is it all I need?

remote swallow
#

that has what you need

nimble oxide
worldly ingot
#

private static final Logger log = Logger.getLogger("Minecraft");

#

That's not part of Vault's README is it?

remote swallow
#

that is most deffo part of the readme

worldly ingot
#

I'll stab a bitch PikaStab

remote swallow
nimble oxide
#

does it need to?

remote swallow
#

you should load that in ur main class

#

the command isnt needed

nimble oxide
#

How can I use it in another class then

worldly ingot
#

lmao I forgot I was the latest commit to the VaultAPI repo

remote swallow
#

notice the static? MainClassName.getEconomy()

worldly ingot
#

TIME TO MAKE ANOTHER PR TO REMOVE THE LOGGER

nimble oxide
remote swallow
#

?paste the class

undone axleBOT
nimble oxide
#

wtf is this

#

oka thx how would i use MainClassName.getEconomy()

#

in my other class

flint coyote
#

I don't really get the "you should not do this" part. Some commands just don't make sense when executed from the console

remote swallow
nimble oxide
#

I dont really get it, do you have an example?

undone axleBOT
remote swallow
#

if you cant understand MainClassName.getEconomy() you need to go and learn java

fast breach
# remote swallow you can specify use toolchains a java version, and it can go in the submodule bu...

adding java java { toolchain { languageVersion = JavaLanguageVersion.of(16) } } to the higher level projects build.grade and java java { toolchain { languageVersion = JavaLanguageVersion.of(17) } } to v1_19 and v1_19_3 just produces the same error. Is there a more complex setup that this would need? I'm looking at the docs for toolchain now and I'm not seeing this described as a use case. It just seems to be for compiling the entire project in different versions, not different sub-projects

nimble oxide
remote swallow
fast breach
#

Alright, thanks for the help

worldly ingot
#

:((

remote swallow
#

well done choco

river oracle
#

I don't think it's updated in a while

worldly ingot
#

No?

remote swallow
#

close enough to

worldly ingot
#

It doesn't need to update

#

It's an API

remote swallow
#

it needs an update

worldly ingot
#

5 years ago

remote swallow
#

maybe if they see it come from choco it will get merged

worldly ingot
#

Granted it took 2 fucking years lol

#

but it got merged

remote swallow
#

real

visual laurel
#

https://paste.md-5.net/eveyuxerib.cs all other recipes register, just not a few of the smithing ones

some extra info:

  • sometimes it appears for a few ticks then disappears
  • all other recipes work just not the ones under the comment with (broken)
eternal oxide
#

md5 mentioned a VERY recent fix to smithing recipies, is that affecting you?

remote swallow
#

you have another method inside a method

#

the above method doesnt have a closing brace

quaint mantle
#

how can i check Farmland Moisture change type
i mean water or rain ?

quaint mantle
eternal oxide
#

you can't differentiate between rain or water though

eternal oxide
quaint mantle
#

maybe block physics event ? bcs fire burn out in the rain

eternal oxide
#

You are not making sense

quaint mantle
#

i wanna cancel MoistureChangeEvent at rainy day

#

but Moisture event will work with water

worldly ingot
#

Wants to know how the moisture changed, whether it be rain or a water source

#

I didn't think farmland was watered with rain?

#

At least I don't recall seeing that when I added that event

eternal oxide
#

Pretty sure only modded waters with rain

worldly ingot
#

Yeah, it doesn't

severe folio
#

it can be

worldly ingot
#

Oh wait no it does

#

!isNearWater(worldserver, blockposition) && !worldserver.isRainingAt(blockposition.above())

#

TIL

remote swallow
#

go pr a cause

worldly ingot
#

tbh there's really not much reason to. It will hydrate either while raining or near water. There's not really a distinction. It's either or

#

So I'd say if it's raining, cancel it

quaint mantle
worldly ingot
#

That unfortunately means that soil won't hydrate at all while raining but I mean... not really much other option unless you want to check for nearby water yourself, which is certainly an option

candid kindle
#
  • im trying to build an artifact directly into a folder in IntelliJ and keep getting an error with my dependency, HikariCP, not being included
  • its fine if i use the "run" button and take the jar from the target folder, but thats not what i want
  • the error i get is java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig

these are my dependencies:

<dependencies>
    <dependency>
        <groupId>org.spigotmc</groupId>
        <artifactId>spigot-api</artifactId>
        <version>1.19.4-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.zaxxer</groupId>
        <artifactId>HikariCP</artifactId>
        <version>5.0.1</version>
    </dependency>
</dependencies>
eternal oxide
#

you need the shade plugin

candid kindle
#

i think i have it, unless theres more i need to do with it

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.2.4</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
        </execution>
    </executions>
</plugin>
eternal oxide
#

or use the libraries feature in plugin.yml

#

set the scope on Hikari to compile

#

although no scope shoudl default to compile

candid kindle
#

didnt work

#

oh wait i didnt reload lol

eternal oxide
#

how are you running maven to build?

#

ok

candid kindle
#

i reloaded maven, same issue

eternal oxide
#

how are you running maven?

candid kindle
#

not entirely sure what you mean, im just clicking this thing. i assume ill have to use a command?

remote swallow
#

that isnt the maven build

eternal oxide
#

right side window is an m tab

remote swallow
#

iirc that uses intellij build system

eternal oxide
#

open that and run package

#

under lifecycles

candid kindle
#

it drops it in the target folder. am i able to build it directly in the server folder as i did before?

eternal oxide
#

yes but don;t

eternal oxide
#

Epic on teh ball. You had that one prepared 🙂

remote swallow
#

im just speedy

worldly ingot
#

I hate hard-coded paths, especially in open source software

nimble oxide
#

Does anyone know where I can find the docs for Skript API?

worldly ingot
#

skunity I believe hosts them

remote swallow
#

/in real

nimble oxide
flint coyote
#

who smuggled that into the javadoc? uwu

#

\o/

remote swallow
#

theres loads

nimble oxide
worldly ingot
#

I linked it right below that message, silly

remote swallow
#

fun things in the javadocs

worldly ingot
remote swallow
#

theres some dolphin stuff somewhere

flint coyote
#

True actually there's one right above lol.

Squee'ek uh'k kk'kkkk squeek eee'eek.```
There's also a typo `increses`
young knoll
#

All the silly potion effect stuff was MD

#

I later added the actual ones

nimble oxide
young knoll
#

And apparently failed at spelling

worldly ingot
#

Yeah. You said Skript, right?

remote swallow
#

you asked for the skript api

worldly ingot
#

OH SKRIPT API

#

Like the plugin

#

Uhh... I don't know if they have public Javadocs for that

nimble oxide
#

Oka, thx! can you help me with adding something to a skript variable using the api? 😄

compact haven
worldly ingot
#

That Discord probably would be the best place to ask tbh

#

I think the people in Spigot here with Skript API experience will be far and few between

young knoll
#

When do we get a proper worldgen feature API
😩

subtle folio
#

Any CI’s that people recommend that I can host/use for my spigot plug-ins?

worldly ingot
#

Jenkins is pretty standard

#

Or just GitHub Actions if you're using API

young knoll
#

Actions can handle buildtools

subtle folio
#

Jenkins got it

remote swallow
young knoll
#

That was a statement

remote swallow
#

it sounded like a question

young knoll
#

It didn't sound like anything

#

It's text

remote swallow
#

in how i read it it sounded like a question

worldly ingot
young knoll
#

He didn’t get to the part of English class yet

remote swallow
#

i thought he missed the ?

quaint mantle
#

i don't understand getState isnt int ? for MoistureChangeEvent

#

what is the Moisture states ?

remote swallow
#

im guessing you cast the block state to Farmland and then check moisture content

quaint mantle
#

no

#

actually i do nothing

remote swallow
#

can do that then

quaint mantle
#

can u look my code at dm ?

#

if i can write here

#

they will make fun of me

young knoll
#

It’s not state

#

It’s getBlockData

remote swallow
#

?learnjava! @quaint mantle

undone axleBOT
quaint mantle
#

this has nothing to do with learning java

remote swallow
#

it does

quaint mantle
#

farmland states is'nt 0 1 2 3 4 5 6 7 ?

remote swallow
#

most likely is, you just have to access that field correctly

quaint mantle
#

ah so i need add farmland block to MoistureChangeEvent?

remote swallow
#

MoistureChangeEvent event ...; // ur event
Farmland farmland = (Farmland) event.getNewState().getBlockData();
farmland.getMoisture()
quaint mantle
#

e.getBlock or getNewState already getting farmland ?

#

bcs Moisture only for farmland

#

I thought so

remote swallow
#

try it and see

quaint mantle
#
    @EventHandler
    public void test(MoistureChangeEvent e){
        Farmland farmland = (Farmland) e.getNewState().getBlockData();
        World world = e.getBlock().getWorld();
        if (world.isClearWeather() && farmland.getMoisture() == 1){
            e.setCancelled(true);
            farmland.setMoisture(0);
        }
    }```
#

at this code if player have big farm

#

this code will do lag ?

young knoll
#

Why are you cancelling it and setting it to 0

quaint mantle
#

farmland.getMoisture is getting next moisture ?

young knoll
#

Yes

#

Because you are using the new state

quaint mantle
#

example if my farmland moisture is 2

#

oh i u understand

#

oke

quaint mantle
young knoll
#

Nah

quaint mantle
#

if player has farm with 10k blocks?

young knoll
#

Farmland only hydrates when it gets a random block tick

#

Which only happens 3 times per chunk per tick

#

It’s really not a huge deal

quaint mantle
#

so no lag

#

oke

#

ty

merry viper
#

how i can make this works on PlayerChat Event?

TextComponent component = new TextComponent(message.replace("[item]", player.getInventory().getItemInMainHand().getItemMeta().getDisplayName()));

HoverEvent hoverEvent = new HoverEvent(HoverEvent.Action.SHOW_TEXT, new BaseComponent[]{new TextComponent("test")});
component.setHoverEvent(hoverEvent);

player.spigot().sendMessage(component);

i am trying to do when someone write

hello look my cool item [item]

everyone will see instead

hello look my cool item [Diamond Sword x1]

and when they hovering the text it will show the lore of the item like enchantments stats and ech..

but i cant put TextComponent inside event.setMessage because it get only Strings, i tried TextComponent.toLegacyText() but the hover event not working

and i noticed only player#spigot.sendMessage working, but i want it will edit the player message

anyone can help me?

young knoll
#

You need to rebuild the message with components and then use player.spigot.sendMessage

zenith gate
#

What event would it be for when a creeper is about to blow up? I need to cancel it.

young knoll
#

ExplosionPrimeEvent

merry viper
zenith gate
merry viper
#

or you mean like

spigot.sendMessage("<player> message " + comp)

young knoll
#

Split the message up around [item] and convert all the parts into text components

#

Then append them with your item component in between

merry viper
#

ok i will try

merry viper
# young knoll Split the message up around [item] and convert all the parts into text component...

but how i making only the "text" be hovered and not all the message?

TextComponent component = new TextComponent("<" + player.getDisplayName() + ">" + message.replace("[item]", player.getInventory().getItemInMainHand().getItemMeta().getDisplayName()));

            HoverEvent hoverEvent = new HoverEvent(HoverEvent.Action.SHOW_TEXT, new BaseComponent[]{new TextComponent("test")});
            component.setHoverEvent(hoverEvent);

            event.setCancelled(true);

            player.spigot().sendMessage(component);
young knoll
#

Use multiple components

#

Also the ComponentBuilder

#

Also the built in show item hover event

quaint mantle
#

if i do this

#

after equal event not cancelled ?

young knoll
#

Yes

#

The final cancellation state is all that matters

zenith gate
#

does anyone have a resource for boss bars? I want some of my entities to display their health in a boss bar.

zenith gate
young knoll
#

Use the api for it

#

Bukkit.createBossBar

#

Then you just update it to reflect the entities health, and add or remove players based on proximity

zenith gate
#

yeah my prox will probably be 30 blocks.

quaint mantle
#

i can't find if world is raining method so this work ?
if (!(world.isClearWeather())){

young knoll
#

Yes

quaint mantle
#

ty

zenith gate
young knoll
#

You can update the health with just the damage event

merry viper
young knoll
#

But for adding and removing players you probably need a runnable

zenith gate
#

so at that point i might as well wrap the health in the runnable to

young knoll
merry viper
remote swallow
#

look at interactive chats code

zenith gate
#

should I have a keyed boss bar or no?

merry viper
remote swallow
young knoll
young knoll
zenith gate
young knoll
#

Then don’t use a key

merry viper
remote swallow
merry viper
#

kk thx

tame bay
#

Hey there, I was trying to play around with the custom fonts etc.
See the picture above, yeah I know I know great design skills xD

public static Scoreboard createScoreboard(){
  Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
  scoreboard.registerNewTeam("000Developer");
  scoreboard.registerNewTeam("001Player");

  scoreboard.getTeam("000Developer").setPrefix("§f\u1940 ");
  return scoreboard;
}

public static void setPrefix(Player player) {
  if (player.hasPermission("rank.developer")) {
    Prefixtest.scoreboard.getTeam("000Developer").addPlayer(player);
    player.setDisplayName(Prefixtest.scoreboard.getTeam("000Developer").getPrefix() + "§b" + player.getName());
    System.out.println(Prefixtest.scoreboard.getTeam("000Developer").getPrefix());
  }
  for (Player currentPlayer : Bukkit.getOnlinePlayers()) {
    currentPlayer.setScoreboard(Prefixtest.scoreboard);
  }
}

However when the player trys to send a message ingame I get the following error in console and no message is send to the server.

[19:51:04] [Async Chat Thread - #1/ERROR]: Chain link failed, continuing to next one
java.lang.IllegalStateException: Missing key in ResourceKey[minecraft:root / minecraft:chat_type]: ResourceKey[minecraft:chat_type / minecraft:raw]
        at net.minecraft.core.IRegistry.e(SourceFile:88) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:59) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at net.minecraft.network.chat.ChatMessageType.a(ChatMessageType.java:49) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at net.minecraft.server.network.PlayerConnection.chat(PlayerConnection.java:2121) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2189) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at net.minecraft.server.network.PlayerConnection.lambda$17(PlayerConnection.java:1895) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3756-Spigot-7d7b241-b346a5f]
        at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
        at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
subtle folio
#

How do people accomplish those rank titles?

tame bay
#

You can just replace a random unicode character with a image with a custom server texturepack

#

And then display the unicode

subtle folio
#

creative

tame bay
subtle folio
#

Let me look I haven't read it

subtle folio
tame bay
#

Thats the full error

lavish robin
#

What is the maven command to compile to jar?

quaint mantle
#

anyone know click repice bookevent ?

icy beacon
#

mvn clean package

river oracle
#

And click

#

Og event

#

Yeah thays not an event

quaint mantle
#

😄

river oracle
#

Prey sure that's fully client sided

icy beacon
#

maybe there's inventoryclickevent called?

quaint mantle
#

yes ?

icy beacon
#

just a guess

river oracle
icy beacon
#

yup

river oracle
#

I'm almost certain recipe book is client sided though

icy beacon
#

the book itself def is

#

but maybe the click can be caught

worldly ingot
#

It can't. Opening and closing the window

#

No reason for the server to know whether or not it's open

true perch
#

If my plugin depends on another plugin, what are some ways my plugin could communicate with the depended on plugin?

river oracle
#

API

tame bay
#

Well

tall furnace
tame bay
#

Seems like no one has a idea D:

tall furnace
tall furnace
#

Custom fonts, do you mean custom text formatting?

quaint mantle
#

when i want to remove a pcd from all players, can i just run through all online players? or does it trow an error at the once that dont have it

tall furnace
tame bay
#

I made a custom texture pack which replaces certain unicodes with a custom image

#

thats what I meant with custom textures. my b ad

onyx fjord
tame bay
#

I dont understand why though

#

I always made my prefixes like that

onyx fjord
remote swallow
#

it shouldnt throw an error iirc

worldly ingot
#

Yeah it won't

#

You can remove safely without issue

quaint mantle
#

okay thyx

quaint mantle
onyx fjord
#

packets

quaint mantle
#

😦

#

can i do this with packets easly ?

#

bcs i don't know packets

onyx fjord
#

what you wanna do with the book tho

worldly ingot
remote swallow
#

choco pr go

quaint mantle
onyx fjord
worldly ingot
#

Someone PR a Player#updateRecipeBook(RecipeBookType, boolean [opened], boolean [filterActive])

#

Or something like that idk

onyx fjord
remote swallow
#

you

onyx fjord
#

actually

quaint mantle
onyx fjord
#

check if player sends the packet if the book is clicked

#

if even can lol

#

isnt it server -> client only?

tall furnace
#

You can open an inventory for players, and IIRC you can close an inventory for them. So it seems to me that if a player clicked, you could determine that they clicked the book and simply close their inventory and open a custom one.

onyx fjord
#

yea the thing is

#

we know that player inv is client side

#

maybe the book also is

#

server doesnt know when u open your inv

#

which is sad 😦

quaint mantle
#

i was see this at one server

onyx fjord
#

hard to prevent invmove

quaint mantle
#

i clicked book and open custom gui

onyx fjord
#

okay i will invest my time to make it work

#

hopefully

#

wrr i was about to study 😂

#

looks like i wont! whoopsie

tall furnace
# onyx fjord maybe the book also is

Thing is we know when the player clicks. If the clicked slot is not 0-40, it's not an inventory slot. Therefore it is either a crafting slot or a recipe book. If it's not a crafting slot, it IS the recipe book.

#

Then just cancel and make your own inventory.

true perch
tall furnace
onyx fjord
#

thats the question

tall furnace
#

Any click while an inventory is open, even clicking outside the inv will fire the event

tall furnace
true perch
#

How will my IDE see all of the variables associated with the instance of the plugin I'm depending on?

#

I'm assuming this Bukkit.getPluginManager.getPlugin("name") retrieves an instance of the JavaPlugin class within X plugin?

onyx fjord
#

to your project

#

the plugin.yml line is so that your plugin

  1. wont start if dependency isnt present
  2. load after it i think
tall furnace
true perch
onyx fjord
#

so you add the said plugin to your ide (build system i mean)

#

like any other dependency

#

but you dont shade it

true perch
#

Ah just add the jar file as a dependency?

tall furnace
#

It's actually a simple thing. If it seems to be getting really complicated, you're probably doing it wrong.

onyx fjord
#

dont do that

true perch
#

or implement it through maven?

tall furnace
quaint mantle
#

guys im sorry but i find this

#

😄

onyx fjord
#

maven deprecated that i think

quaint mantle
#

PlayerRecipeBookClickEvent

tall furnace
#

Personally I don't use maven or gradle

tall furnace
quaint mantle
#

do you know what?

quaint mantle
#

im sad

#

omg

onyx fjord
#

thats a paper event

#

tho

quaint mantle
#

yes

tall furnace
#

oof

onyx fjord
#

avoid

tall furnace
#

This is for Spigot

#

thus, SpigotMC

onyx fjord
#

if you plan to release your plugin on spigot it will get removed

#

it has to work on spigot

tall furnace
# true perch Ah just add the jar file as a dependency?

I use Eclipse. So I add the depended jar to my build path, add it in my plugin.yml dependencies, and then load the main class in my onEnable. Alternatively, if the plugin has an API class you can reference, I grab an instance of that. Again, alternatively, if your depended plugin fires custom events, just set up a listener and catch those events.

true perch
remote swallow
#

bet not using maven or gradle with nms is fun

tall furnace
#

When I create plugins that are intended to be used as an API, I set them up with a bunch of events. Clean and useful.

tall furnace
tall furnace
onyx fjord
#

this is how paper does it

true perch
#

omg I think I get it now

#

finally

tall furnace
#

Nice! Run it and see what happens XD

true perch
#

true lmao

onyx fjord
#

oh wait

#

dang

true perch
tall furnace
#

Have fun with your new-found magical skillz

true perch
#

omg yes

#

this opens up so much..... AHHH

quaint mantle
#

only cancel to click this

#

nvm maybe i need learn packets

onyx fjord
#

if i make it work without packets ill make a small library that adds the event

quaint mantle
onyx fjord
#

sure

tall furnace
#

I've actually only ever used packets once, for a disguise plugin that would make players look like specific creatures. That was like, 9 years ago. Everything I ever do now does not use packets.

onyx fjord
#

doesnt trigger inventory click event @tall furnace

#

sadly

quaint mantle
#

u guys know any api for control this recipebook ?

#

maybe protocollib?

eternal oxide
#

wasn't that creative?

true perch
# tall furnace Good start

For some reason it seems to enable my plugin before it's dependencies. I thought the dependencies were supposed to load first? Seems like due to this I can't get the instance of the dependency JavaPlugin?

[21:08:36 INFO]: Loaded 7 recipes
[21:08:36 INFO]: [Realms] Loading server plugin Realms v1.0-SNAPSHOT
[21:08:36 INFO]: [ModelEngine] Loading server plugin ModelEngine vR3.1.7
[21:08:36 INFO]: Server permissions file permissions.yml is empty, ignoring it
[21:08:36 INFO]: [Realms] Enabling Realms v1.0-SNAPSHOT
[21:08:36 INFO]: Realm Server starting up..
[21:08:36 INFO]: [ModelEngine] Enabling ModelEngine vR3.1.7
[21:08:36 INFO]: Timings Reset```Maybe?
tall furnace
tall furnace
true perch
# tall furnace Can you show your plugin.yml?
version: '${project.version}'
main: me.combatborn.realms.Realms
prefix: 7 Realms
authors: [ CombatBorn ]
description: The plugin used for Realm Servers.
api-version: 1.19
depend: [ ModelEngine ]```
tall furnace
#

And the Model Engine plugin.yml?

true perch
#

don't have access to it

carmine mica
#

you can unzip the jar and look at it

true perch
#

oo okay

#
author: Ticxo
main: com.ticxo.modelengine.ModelEngine
version: R3.1.7
api-version: 1.16
softdepend:
  - MythicMobs
  - Citizens
commands:
  meg:
    description: All things Model Engine related.
    permission-message: You do not have permission to use this command.
permissions:
  modelengine.command:
    description: Access to reload.
    default: op```
agile anvil
#

Isn't it "depends" ?

tall furnace
true perch
#

says depend

#

yeah

tall furnace
#

If I were home I could look at my own

true perch
#

ill try depends

agile anvil
#

No it's depend alr 🤣

true perch
#

I don't notice a difference when I change it to depends

tall furnace
#

Did you make sure you exported the new plugin.yml in your file?

onyx fjord
#

okay so rn all i know @quaint mantle is that player triggers SET_RECIPE_BOOK_STATE on click

#

so thats success already

young knoll
#

Ahh why has I been pingeded

tall furnace
young knoll
#

No

#

That’s for betas

#

Or something

remote swallow
onyx fjord
#

real!

young knoll
#

What am I the PR slave now

#

Smh

onyx fjord
#

also the event

young knoll
#

Can the server actually do that

#

I know it gets a packet when they click the book but I had no idea the server could edit it

onyx fjord
#

how do i make a custom async playerevent?

young knoll
#

Event takes a Boolean in its constructor to indicate if it’s async or not

onyx fjord
#

why is that

quaint mantle
#

can i control player ping icons ?

chrome beacon
#

Yeah but why

quaint mantle
#

and i do pings with number

#

can u give me docs ?

#

i can't find

#

without packets btw

chrome beacon
#

Resource pack to remove the icon

quaint mantle
chrome beacon
#

Or packets to change the ping amount

native ruin
#

seems pretty hard without packets unless you want to use external librarys

quaint mantle
#

yes i see

#

but which event control this ?

chrome beacon
#

Control what

#

Ping? If so it wasn't supposed to messed with so there is no api to change it

quaint mantle
#

example can i do this icon

#

to this ?

chrome beacon
#

Use packets

quaint mantle
#

;-;

visual laurel
#

why are some of my recipes not registering even though they have java getServer().addRecipe(UpgradeRecipe)

mortal hare
#

can somebody explain wtf is happenning in cpp

#

i declare the last object inside 6th index of array right

#

while somehow

#

it gets copied in the 0th index too

#

i do not modify this array at all

#

removing the last element of array returns it back to normal

#

how can this element fuck up this array so much?

tame bay
#

Ok I have one more problem I dont get though

tardy delta
#

i achieved to directly talk to the win32 kernel with java 💀

tame bay
#
scoreboard.getTeam("000Developer").setPrefix("§f\u1940 §b");

This should make the player name colored in aqua

#

But the name is still white

tardy delta
#

nah that native function call thing

#

i was surprised windows even allowed me

mortal hare
#

arent prefixes separated from names

#

of teams

#

i dont remember correctly

tardy delta
#

believe so

#

type smth in chat

tame bay
#

How would I make the name a different color then? I always made it like that

#

I have a different chat layout

tardy delta
#

anyways, i was trying to render smth

mortal hare
#

Win32KeyInputContext &context = g_contexts[actionIndex];

#

apparently references cannot be rebound

#

context = g_contexts[actionIndex+6];

#

i did this

#

so it basically copied the contents of the specified element to the referenced object

#

too used to pointers i guess

quaint mantle
#

saturation is potioneffect or food consume effect ?

zenith gate
#

can someone explain this to me?

Cannot invoke "me.toast.wired.OverhaulMonsters.getConfigFile()" because "me.toast.wired.Listeners.CustomMobAbilities.Tesla.plugin" is null
tardy delta
#

plugin is null

zenith gate
#

it doesnt tell me exactly what is null

zenith gate
#

google is giving me answers from like 5-6 years ago that dont help.

severe folio
quaint mantle
#

😄

quaint mantle
tardy delta
#

that your plugin? show code

zenith gate
#

yeah its mine

tardy delta
#

i believe i already know what happened

zenith gate
#

?paste

undone axleBOT
zenith gate
tardy delta
#

your instance is static and you never set it, dont do that

#

?di use this instead

undone axleBOT
tardy delta
#

and no reason for your event methods to be static

young knoll
#

Zoinks!

zenith gate
tardy delta
#

also early returns :(

remote swallow
tardy delta
#

those methods shouldnt, spigot uses reflection to get those anyways

zenith gate
#

Ahhhhhh okayy. Thank you.

#

ima look into that link now.

mint nova
#

How i can make, that player has limited write for X characters (Idk how to write it, but i mean when he uses command he cant write above 120 characters)? And when he write more than X the messages will not send only message with idk like error or something

tardy delta
#

isnt there a commend preprocess event with the raw text

eternal oxide
#

are you talking about messages or commands?

tardy delta
#

when he uses command
command ig

eternal oxide
#

he also says send messages, so

mint nova
#

but like

#

idk how to explain properly so sorry

eternal oxide
#

are you trying to limit player chat to 120 characters?

mint nova
#

you have command /g <messages> and its send messages in chat

eternal oxide
#

per message

mint nova
#

and the <messages> has limit

eternal oxide
#

is the /g your command?

mint nova
#

yea to say

#

like

#

premium chat

#

or something

eternal oxide
#

so /g is in your plugin?

mint nova
#

yea

eternal oxide
#

then async chat event and check event.getMessage().length

#

oh command

mint nova
#

yea

#

in command

eternal oxide
#

then you are going to be using coimmand args

#

command

#

String.join(" ", args).length

mint nova
#

thanks

severe folio
#

😭

eternal oxide
#

because you didn;t learn java basics 😛

severe folio
#

clearly lmao

#

so basically for the longest time ive been using a for loop with a string builder

quiet ice
#

well at least you use a string builder

#

Would've been worse if it were a string buffer

mortal hare
quiet ice
#

So is String#concat for a length <= 2

mortal hare
#

wait lol no

#

its the opposite

#

String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.

#

strings buffers are slower single thread applications

tardy delta
#

yes

mortal hare
#

while string builders are not thread safe, thus no synchronization

novel flame
#

i need help switching versions on my server

young knoll
#

TIL string buffer

quiet ice
#

It's one of those auto-completion results noone needs

novel flame
#

it says "unable to access jarfile spigot-1.19.4.jar"

quiet ice
#

Where did you get that jar?

novel flame
#

pretty sure from the website

mortal hare
#

dont do that pls

#

use buildtools

#

you could be running malicious code on your pc

young knoll
#

the website

mortal hare
#

by executing third party jar files

novel flame
#

the spigot one

mortal hare
#

he probably used the mirror downloads of prebuilt spigot jar files

river oracle
#

probably used the get one

#

like most people do

#

after all its the first se result

mortal hare
young knoll
#

Yay seo

novel flame
#

should i change the .bat file to buildtools instead

mortal hare
#

just read the tutorial

#

i gave you above

novel flame
#

it says unable to access the buildtools.jar when i run the code in git bash

quiet ice
#

Are you sure that your pwd is correct?

novel flame
#

what is that

quiet ice
#

uh we have a problem then

#

Have you ever used cd at the very least and know what it does?

novel flame
#

isnt that the commmand terminal for windows?

quiet ice
#

Okay so you don't know DOS/UNIX basics 101. Since I can't be bothered I'll show you the quick route: Go to the folder in which your spigot jar is located in and type cmd in the address bar, then hit enter

zenith gate
#

@tardy delta So ive been working around with my plugin. It has to do with my config. I commented out anything that referenced values from my config and now it all works. What could be the issue then? nothing is static no more. Everything is spelt correctly or at least the same in the config and my code.

quiet ice
#

Only then you can execute your java -jar <X> thing

novel flame
novel flame
#

oh it worked

#

thanks

zenith gate
#

its confusing the hell out of me

tardy delta
#

make your variables final so it tells when they arent being initialized

zenith gate
#

okay 1 moment

quiet ice
#

just use @NotNull everywhere and let your properly configured IDE do the real job

novel flame
#

ok well i ran the command and it said everything was copied successfully so what should i put in my start.bat file?

quiet ice
#

what did you execute

tardy delta
#

show code

zenith gate
#

and i dont see anywhere it telling me anything else

novel flame
zenith gate
#

?paste

undone axleBOT
quiet ice
undone axleBOT
zenith gate
tardy delta
#

spigot should have a read the docs emote

#

well you never give any value to your plugin

#

dependency injection works as following

class SomeListenerOrWhatever {
  private final PluginX plugin;

  SomeListener...(PluginX plugin) { this.plugin = blablbla }
}

class PluginX {
  void onEnable() {
     ListenerThing listener = new ListenningThing(this);
  }
}```
#

just realized java constructors are bloat

young knoll
#

ur bloat

tardy delta
#

ur mom

river oracle
#

smh

tardy delta
#

i like c++ constructors: Something s(params)

#

and gets like the java one when doing a heap allocation

river oracle
#

I like the haxe constructors

quiet ice
river oracle
#
public function new(){
  // code here
}
tardy delta
#

whats haxe

river oracle
#

a programming language

zenith gate
tardy delta
#

well typing the type twice (if you use an interface as first then not)

#

also use "new"

#

idk i got into some kind of mood where i want everything as short as possible

tardy delta
quiet ice
#

I reckon this will be fixed in future JEPs

tardy delta
#

already expected that answer :(

zenith gate
novel flame
#

i ran the command multiple times but every time I ran start.bat it said Unable to access jarfile spigot-1.19.4.jar