#help-development

1 messages Β· Page 1563 of 1

sick ravine
#

e.g?

eternal night
#

you can just compare /data get entity @p SelectedItem or something like this

#

I think that should print the NBT of the item

#

things like custom model data would also be stored there

sick ravine
#

oo

eternal night
#

welp there you go

sick ravine
#

thanks there is a clue

quaint mantle
#

how would i teleport a player to another player???

quaint mantle
#

huh

#

like

#

like player.teleport

#

read java&spigot docs, dude

dusty herald
#

?jd

hollow river
#

hey so i have npc villagers i place on onEnable, and remove by their uuid on onDisable but when i wakeu up and the server's been running for a while the villagers are duplicated, where one villager is the npc and the others turned back to normal villagers (because they still exist but my eventhandlers aren't checking for their uuid on interactions anymore)

sage swift
#

don't wake up

hollow river
#

does anyone know a best way of having persistent npc villagers? i tried giving them a persistentdatacontainer tag thing where i'd kill every entity with that tag, tests worked but i just woke up and found out that didn't do the trick (so basically sometimes the onDisable doesnt load (part where it kills the villagers) and the onEnable does run (the part where i place them down)

sage swift
#

honestly the best way is to use packets and not have anything server side

eternal oxide
#

onDisable only runs on a clean shutdown

sage swift
#

but that's also hard

hollow river
#

okay so i just reloaded the server and my code does work (to remove all entities with that tag) so maybe it's because the ondisable method where i remove the npcs can't detect them because they're in unloaded chunks??

sage swift
#

reloaded the server

hollow river
#

i could switch over to packets for that, but is there anything i could watch out for before switching to that method?

sage swift
#

for npcs just use citizens api lol

hollow river
#

well its not so much about having a solution, but also for me to experience these kind of things and trying to solve them

#

i might do that but it'll be when im desperate and there's no other solution

quaint mantle
#

How can i make a custom head item nbt in gui?

#

Something like this

chrome beacon
#

Set SkullMeta of item

quaint mantle
#

and?

chrome beacon
#

Set the skull owner to which head you want

quaint mantle
#

How can i set the value?

chrome beacon
#

setOwner

quaint mantle
#

I think i don't know what i mean

unreal quartz
#

relatable

quaint mantle
#

What are you trying to say?

chrome beacon
#

He wants a player head

quaint mantle
#

I mean a custom head value like this:
eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMTI0YmExOWMyM2JhNDU0NzQxZGEyYTE0MjMxMWFhZjRhOTE4ZmMyYjY4Mjk3YmViYzEyNTk0Mjc1ZjU0YzU3OSJ9fX0=

chrome beacon
#

NMS it is then

unreal quartz
#

create a game profile and set the texture property

quaint mantle
#

nms has no java docs

unreal quartz
#

using authlib

smoky elbow
#

is correct?

chrome beacon
#

Yeah premade libraries or look around NMS and figure it out

unreal quartz
#

cache the field

quaint mantle
#

Ew spoon feeding

chrome beacon
#

?spoon

undone axleBOT
#

Spoonfeed a newbie for a day and they'll come back with more questions. Teach them to find their own answers and you'll both be better off: you won't get stuck answering the easy questions and they'll be much more productive than before.

chrome beacon
#

But yeah you need to cache that

smoky elbow
unreal quartz
#

idk

#

what are you doing

quaint mantle
quaint mantle
#

what name should I write in depends: [...] in plugin.yml in JDA API?

#

depends: [nuVotifier, JDA] ? depends: [nuVotifier, ..

chrome beacon
#

JDA is not a plugin

#

So nothing

quaint mantle
#

Also, error occurs when I enable

#

java.lang.NoClassDefFoundError: net/dv8tion/jda/api/entities/MessageChannel

quaint mantle
chrome beacon
chrome beacon
quaint mantle
chrome beacon
#

It's not a plugin

smoky elbow
quaint mantle
quaint mantle
#

also in plugin folder?

#

Remove scope from your dependencys

quaint mantle
#

You must have that in your .jar plugin

chrome beacon
#

You need to shade JDA in to your jar

#

Also make sure to relocate it

quaint mantle
#

Am i doing right?

public static void createItemWithNBT(Inventory inv, int invSlot, String texture, String displayName, String... loreString) {
        GameProfile profile = new GameProfile(UUID.randomUUID(), null);
        ItemStack Item = new ItemStack(Material.PLAYER_HEAD, 1);
        List<String> Lore = color(Arrays.asList(loreString));
        SkullMeta Meta = (SkullMeta) Item.getItemMeta();
        profile.getProperties().put("textures", new Property("textures", texture));
        try {
            Field profileField = Meta.getClass().getDeclaredField("profile");
            profileField.setAccessible(true);
            profileField.set(Meta, profile);
        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }
        Meta.setOwner(String.valueOf(profile));
        Meta.setDisplayName(Utils.color(displayName));
        Meta.setLore(Lore);
        Item.setItemMeta(Meta);
        inv.setItem(invSlot - 1, Item);
    }```
#

hmmmmm maybe it sounds like odd,

#

but how to add file to my plugin

#

I already added depend in my plugin

chrome beacon
#

Are you using maven?

quaint mantle
#

nop

#

i'm using jar depend

#

Gradle?

#

nop

chrome beacon
quaint mantle
#

.jar depend

quaint mantle
quaint mantle
quaint mantle
chrome beacon
#

Anyway cache game profile

quaint mantle
#

Did you send my vid to myself?

#

Lmao

chrome beacon
#

Yeah I just did

unreal quartz
#

you don't need to resolve profileField each time

#

only do it once and you can use it on all other skullmeta instances

#

the namespace is your plugin

#

dunno what RecipeUtil is

unreal quartz
#

Represents a String based key which consists of two components - a namespace and a key. Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.

Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.

chrome beacon
#

?jd

mystic sky
#

Any1 knows where's this msg on Bungee SRC We were unable to connect it to the primary or backup server. Try it again later.

unreal quartz
mystic sky
unreal quartz
#

yes

mystic sky
#

SRC = Source code.

unreal quartz
#

ohh

mystic sky
unreal quartz
#

well it's opeon source

#

you can just search it

mystic sky
#

well it's not on server help

#

Yeah the thing it's that i don't find it XD

unreal quartz
#

and i'm pretty sure it's a configured string

mystic sky
#

yeah too

#

But not finding it also

#

Im sure it's on proxy/Bungee

quaint mantle
#

Hello, I having java.lang.NoClassDefFoundError: net/dv8tion/jda/api/entities/MessageChannel error. how to fix it? I added depend like:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>groupId</groupId>
    <artifactId>plugin</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>
    <build>
        <plugins>
            <plugin>
                <modelVersion>4.0.0</modelVersion>

                <groupId>groupId</groupId>
                <artifactId>plugin</artifactId>
                <version>1.0-SNAPSHOT</version>

                <properties>
                    <maven.compiler.source>11</maven.compiler.source>
                    <maven.compiler.target>11</maven.compiler.target>
                </properties>
                <dependency>
                    <groupId>net.dv8tion</groupId>
                    <artifactId>JDA</artifactId>
                    <version>4.3.0_295</version>
                    <exclusions>
                        <exclusion>
                            <groupId>club.minnced</groupId>
                            <artifactId>opus-java</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </plugin>
        </plugins>
    </build>

</project>
unreal quartz
unreal quartz
#

no clue then

#

u sure it's not fallback_kick

#

it's a very similar message

mystic sky
#

uh i don't think so

mystic sky
#

Most like a packet exception

quaint mantle
#

oh I realized

#

I should shade

#

also, it was a little bit error in pom.xml

#

<modelVersion>4.0.0</modelVersion> invaild content was found...

unreal quartz
#

learn how to use maven

#

the docs teach you

quaint mantle
#

I want to 😦 but there is no spigot pom.xml tutorials

unreal quartz
quaint mantle
#

I saw the thread that says "you should use <plugins>, ``<plugin>` tag to use depend

unreal quartz
#

maven is entirely seperate to bukkit

#

ignore everything spigot related right now

quaint mantle
#

ohhhh

unreal quartz
#

maven is a build system to build your jar and has nothing to do with the depends section of your plugion.yml

waxen plaza
#

What does rank weight do? I noticed it when adding perms for my plugin

chrome beacon
#

It tells which rank is most important

#

If you have multiple at once

waxen plaza
#

so it doesn't have anything to do with other plugins?

chrome beacon
#

Most plugins won't care

waxen plaza
#

ok, good to know

quaint mantle
#
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>groupId</groupId>
    <artifactId>ν† ν† μ„œλ²„ν”ŒλŸ¬κ·ΈμΈ</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>

    <dependencies>

        <dependency>
            <groupId>net.dv8tion</groupId>
            <artifactId>JDA</artifactId>
            <version>4.3.0</version>
            <exclusions>
                <exclusion>
                    <groupId>club.minnced</groupId>
                    <artifactId>opus-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

</project>``` no erros on tags
#

but

unreal quartz
#

you odn't even have the maven compiler pluign

quaint mantle
#

in here, <groupId>net.dv8tion</groupId> it says Dependcy net.dv8tion:4.3.0 not found

quaint mantle
unreal quartz
#

idk if jda is on maven central but if it isnt then you need to specify the repo

#

it is now

#

not

#

**

quaint mantle
#

omg

#

is it not exists now?

unreal quartz
#

it's hosted in a specific repo

#

which you need to add

quaint mantle
#

ahh!

unreal quartz
#

by default maven only looks at maven central

quaint mantle
#

ya so i should paste github linkk

#

Wut

unreal quartz
#

well it shows you exactly hwo to includ eit there

quaint mantle
#

Have you tried clicking the link above and reading?

quaint mantle
#

but

#

You can basically just copy and paste, change version and done

quaint mantle
unreal quartz
#

do i need to highlight it for you

quaint mantle
#

YEahhh

#

in that part

unreal quartz
#

and make sure you replace VERSION

#

with the version

quaint mantle
#

yeahhh

#
            <artifactId>JDA</artifactId>
            <version>4.3.0</version>```
#

errors on net.dv8tion, JDA, 4.3.0

unreal quartz
#

did you add the repo

quaint mantle
#

Depency not found...

#

Add the repo

unreal quartz
#

i feel like we are going around in circles here

#

and that you need to do some reading on how maven works

quaint mantle
#

I'm sorry, I was going to do it earlier, but I gave up because everything went wrong. I'll try again.

#

oh uh where should I put

#

it

#

everywhere is error

unreal quartz
#

you probably did not put it in <repositories> tags

quaint mantle
#
    <id>dv8tion</id>
    <name>m2-dv8tion</name>
    <url>https://m2.dv8tion.net/releases</url>
</repository>``` hmmm nop
unreal quartz
#

then you need to put it in <repositories> tags

quaint mantle
#

ahhhhhhhhhhhhhhhh

#

mb

#

I'm small brain

#

i'm so tired so I read repositories to repository

#

lol

maiden thicket
#

u need both

#

<repositories>
<repository>
.... info here
</repository>
</repositories>

quaint mantle
#

thanks you every1 btw

maiden thicket
#

if ur using spigot u should technically already have a repositories tag if im not mistaken

maiden thicket
#

mm ic

unreal quartz
#

don't do that if you're using maven

maiden thicket
#

yeah

unreal quartz
#

you use maven for a reason and this is one of them

maiden thicket
#

using maven = hunting down either source code and compiling or hunting down repo and dependency info

chrome beacon
#

You can install jars directly

unreal quartz
#

it's spigot

quaint mantle
#

sorry for saying that, but there is still errors on <groupId>net.dv8tion</groupId> <artifactId>JDA</artifactId> <version>4.3.0</version>

maiden thicket
#

and if there isnt a dependency and/or repo for it then u can use the jar with maven

#

u'll define the scope as system and provide a path

chrome beacon
quaint mantle
#
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>groupId</groupId>
    <artifactId>plname</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
    </properties>

    <repositories>
        <repository>
            <id>dv8tion</id>
            <name>m2-dv8tion</name>
            <url>https://m2.dv8tion.net/releases</url>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>net.dv8tion</groupId>
            <artifactId>JDA</artifactId>
            <version>4.3.0</version>
            <exclusions>
                <exclusion>
                    <groupId>club.minnced</groupId>
                    <artifactId>opus-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>


</project>```
chrome beacon
#

Now shade plugin

quaint mantle
#

hmmm

chrome beacon
#

Since you need to include JDA

quaint mantle
#

before that, I think we should solve the error

maiden thicket
#

shade wont do anything just yet until the dependency is actually found right?

#

or does it

unreal quartz
#

the error will be resolved when you reimport maven

maiden thicket
#

olivo arent u usually in pink 😧

chrome beacon
#

I was pink for one month with gifted nitro

maiden thicket
#

or u can right click pom.xml > maven > reload maven project

maiden thicket
maiden thicket
unreal quartz
#

idrc about pings

quaint mantle
#

ya know, i still have a nitro code from a puzzle nobody was able to complete

maiden thicket
#

yoo

quaint mantle
#

when I write mvn clean install

#

in terminal

#

it makes error

#

(I installed mvn already)

maiden thicket
#

whats the error

quaint mantle
#

oh wait nvm

maiden thicket
#

the current latest version of JDA is 4.3.0_295 according to their github

quaint mantle
unreal quartz
#

pretend it says maven

quaint mantle
#

sorry for saying that, after reload, still error on here 😦

night copper
#

I have a bug and its pissing me off

quaint mantle
#

do you need screnee?

chrome beacon
maiden thicket
#

is that the error?

quaint mantle
maiden thicket
#

change the version to 4.3.0_295

quaint mantle
#

wait in 1.8 when i shoot a snowball at somebody it just goes right thru them why????

#

im trying to make a custom item

#

with snowballs

#

but its not working

maiden thicket
#

change

#

the version

quaint mantle
maiden thicket
#

did u reload

quaint mantle
#

Yes (Oh nvm doing that)

#

OH YEAH

tulip sequoia
maiden thicket
#

W

quaint mantle
#

thanks you everyone

#

wait in 1.8 when i shoot a snowball at somebody it just goes right thru them why????
im trying to make a custom item
with snowballs
but its not working

#

so now, I should install shade tool

chrome beacon
tulip sequoia
#

i spend 2 days on this

#

spigot contains 0 good solutions

#

so i started work around staff like that

chrome beacon
#

Just write your own system that breaks the block after mined a certain amount of time

tulip sequoia
#

patching the worst solution
Why worst? Because splitting for each mini-game jars is the most unprofessional thing, i guess

tulip sequoia
#

but creating per-each player when he is trying to break block, i guess it can produce some unpleasant staff

#

i also tried to interrupt in block dig packet but i didn't found any variables which is basically current block damage (As i looked deeper, damage is client-side fully on 1.12.2)

chrome beacon
#

It's there

quaint mantle
#

I gave up installing maven shade plugin

#

cuz there is <version> error

#

and I digged it for 20min+

#

and I can't do it

chrome beacon
#

Well time to stop using JDA then

quaint mantle
#

so how can I add jar to my plugin

quaint mantle
#

NOO

#

but can I add jar myself?

chrome beacon
sharp bough
#

is it possible to define more than 1 variable with the return of a function, i want to remake the classic check for inv clicks

        event.setCancelled(true);
        final ItemStack clickedItem = event.getCurrentItem();
        if (clickedItem == null || clickedItem.getType().isAir()) return;
        //gets data
        final Player player = (Player) event.getWhoClicked();
        final UUID id = player.getUniqueId();```
my idea was something like
``final ItemStack clickedItem, final Player player, final UUID id = new GetDataFromInvClick(event, kitInvForRemove)``
#

and the function would return those values in that order

quaint mantle
night copper
#

This error is pissing me off and idk how to fix it. I can screenshare. Please someone who can help me with this. Its like a wrong java version but I dont know what to do 😭

quaint mantle
#

i just used jda with maven like last week and it worked fine, so whatever you're doing is wrong @quaint mantle

quaint mantle
#

errors on here: 3.2.4

#

in <version>

#

whats the exact error

chrome beacon
night copper
#

Uh

#

Yeah i think

quaint mantle
night copper
#

idk how to check that

quaint mantle
#

only in <version>

quaint mantle
chrome beacon
quaint mantle
#

yup

night copper
#

So how do I update my server to java 16

chrome beacon
#

Are you using a host?

night copper
#

im using my PC

chrome beacon
#

Oh

#

?java16

undone axleBOT
quaint mantle
night copper
#

ok

quaint mantle
#

can I go to bed?

#

it's 1:25 am

chrome beacon
#

Or set the enviromental variable manually

night copper
#

ok thank you

night copper
#

I forgot where the enviromental variable is

quaint mantle
#

But he is helping me

#

okay bye

#

thanks you for your hel[p

hollow arch
#

Is there an event I could listen to which fires when the dragon egg gets placed for the first time in the end?

chrome beacon
night copper
#

update what?

chrome beacon
#

(Spigot)

night copper
#

i reseted the server

#

how

#

I dont know this stuff

quaint mantle
chrome beacon
#

Run build tools again

night copper
#

ok

hollow arch
dusty sphinx
#

Should plugin messaging channels be full duplex (one channel each for input/output) or is half duplex fine (shared channel)

sharp bough
#

does anyone know why .with() doesnt work?

#

im working with tuples

night copper
#

@chrome beacon I runned BuildTools again but it still doesnt work

#

This is pissing me off

chrome beacon
night copper
#

I downloaded BuildTools and opened it

#

and some progress bar appeared

#

1.16

#

1.16.5

chrome beacon
#

Latest 1.16.5 should support Java 16 πŸ€”

night copper
#

maybe it doesnt

chrome beacon
#

Oh well you have downgrade Java in your plugin then

night copper
#

how to do that

chrome beacon
#

How are you building your plugin

night copper
#

uh

#

I create a new project

#

add the spigot 1.16.5 library

#

i can screenshare

dusty sphinx
#

i think they are asking what build system you are using

chrome beacon
#

Yeah

night copper
#

uh

dusty sphinx
#

i.e. maven, gradle, eclipse

night copper
#

eclipse

dusty sphinx
#

oh god i categorized eclipse as a build system

timid kraken
#

is it possible to make CommandSender#sendMessage send a message in all chat and make it fire the AsyncPlayerChatEvent ?

night copper
#

idk

chrome beacon
timid kraken
chrome beacon
#

?eventapi

undone axleBOT
timid kraken
# chrome beacon ?eventapi
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(false, sender, message, recivers);
Bukkit.getPluginManager().callEvent(event);
#

how would i get the receivers?

#

and also does CommandSender#sendMessage send a message in all chat?

chrome beacon
chrome beacon
sharp bough
#

could someone tell me a cleaner way of doing this? if (event.getInventory() != kitInvForRemove) return; event.setCancelled(true); final ItemStack clickedItem = event.getCurrentItem(); if (clickedItem == null || clickedItem.getType().isAir()) return; //gets data final Player player = (Player) event.getWhoClicked(); final UUID id = player.getUniqueId();
maybe turning it into a function, cuz im gonna use this in all my plugin commands

timid kraken
sharp bough
#

but i cant find a way of doing it

timid kraken
chrome beacon
dusty sphinx
chrome beacon
timid kraken
#

ok thanks for your help!

tardy delta
#

I think I forgot but what's the alias used for in oncommand?

ivory sleet
#

Alias?

waxen plaza
#

How can I specify the jdk when I am using buildtools? I am trying to build servers pre 1.17 (java 16)

granite stirrup
ivory sleet
#

I believe you change the path variable

#

Mye

waxen plaza
#

in env?

granite stirrup
#

environment

#

ik how you change on windows

#

idk about linux if your on linux

waxen plaza
#

I know

#

oh I have jdk11

granite stirrup
#

i believe you could also do
"C:\Program Files\Java\jdk-16.0.1\bin\java.exe" -jar BuildTools.jar but not sure

waxen plaza
#

I was trying that rn

sharp bough
#

does anyone have a friendly way of deleting paths in config files

#

for some reason i cant find anytihng on google

unborn tree
#

I'm trying to hook book edits and block them under certain circumstances. I've tried using event.setCancelled(true) and event.setNewBookMeta(oldMeta.clone()), and while they work I can't see the changes client side until I relog. Is there any way to let the client know that the book contents need to be refreshed?

waxen plaza
#

should I make a server for each major version and test my plugin if it works? or is 1.8.8 enough

granite stirrup
maiden thicket
waxen plaza
#

Ok then I'll test only a couple version

maiden thicket
#

its what i do when i switch between jdk 16 and 8

sacred vector
#

Okay so im making my own plugin and im organizing right now moving everything to other classes for player events custom items recipes ect, For event handlers I would just assume i would make a new class in the folder and then just import it, then it would work? but clearly i was wrong and i don't know what to do...

maiden thicket
#

my java home is 16 but when i need to use an outdated version i just move the path to my jdk 8 higher in my Path variable

granite stirrup
maiden thicket
#

thats what you do yes

sacred vector
#

well then how comes i can't access them? i have an event on a player join there health get set to like 60

maiden thicket
#

send a picture of ur layout

sacred vector
#

that doesnt happen, and when i die it shows custom death message

maiden thicket
#

like the little explorer in ur IDE

sacred vector
#

i cant

maiden thicket
#

snipping tool ?

sacred vector
#

no i cant send a pciture

#

pciture

#

and im on linux

maiden thicket
#

can only verified people send pictures

#

use sharex if thats for linux

#

or gyazo if thats for linux

tardy delta
#

should i make when someone is an op, he can use all the commands?

#

or will that be abused?

sacred vector
#

letme verify quickly

#

got to go make an account

granite stirrup
#

i think

granite stirrup
maiden thicket
#

actually i think jus default mc does that

tardy delta
#

ah uhh i was struggling with permissions and so on

granite stirrup
#

oh seems like sharex doesnt have a linux version

tardy delta
#

shareX 😍

unreal quartz
heady garden
#

anyone know why I'm getting this

unreal quartz
#

because it may return null

#

you can safely ignore it if you define "experience" in your plugin.yml as a command

heady garden
#

i have done that

granite stirrup
#

lmao

#

i thought they had a linux version guess they didnt

sacred vector
#

@maiden thicket here this is my explorer for the files

#

all of the stuff in the ITEM folder i can use and works 100%, and for organization i moved out of my main file to sub class folders and now all of my events no longer work

#

and commands

unborn tree
#

it also updates if i throw the book and pick it back up

#

but if it stays in my hand the edits dont show

#

figured it out
the very spooky Player.updateInventory() call did the trick

#

if there is a better way let me know

tired isle
#

Hi! I have a weird problem.

I have 2 own plugins. From one plugin i made a service registration:

public void onEnable(){
        this.mongoProvider = MongoProvider.connect();
        try{
            Bukkit.getServer().getServicesManager().register(Mongo.class, this.mongoProvider, this, ServicePriority.Normal);
        } catch(Exception e){
            Logger.getLogger("").info(e.getMessage());
        }
        getLogger().info("enabled!");
    }

from another i connect to it:

this.DB = this.getServer().getServicesManager().getRegistration(com.hoshion.mongoapi.Mongo.class).getProvider();

and i have an error:
Cannot invoke "org.bukkit.plugin.RegisteredServiceProvider.getProvider()" because the return value of "org.bukkit.plugin.ServicesManager.getRegistration(java.lang.Class)" is null
i made my second plugin depend on first. Minecraft verion 1.16.5

chrome beacon
#

Make sure the second plugin depends or softdepends the first plugin

tired isle
#

plugin.yml of the second plugin

#
name: MongoAPI
main: com.hoshion.mongoapi.Plugin
version: 1.0
api-version: 1.13

plugin.yml of the first plugin

chrome beacon
#

Make sure you did a full restart

#

And not reloaded

tardy delta
#

shall this work or do i really need to put the name there?

tired isle
tardy delta
#

oki

chrome beacon
tired isle
# chrome beacon When are you calling getRegistration

in the onEnable(). i checked services that work before calling getRegistration:

[19:07:08] [Server thread/INFO]: net.luckperms.api.LuckPerms
[19:07:08] [Server thread/INFO]: me.wolfyscript.armorstandtool.metrics.bukkit.Metrics
[19:07:08] [Server thread/INFO]: com.hoshion.mongoapi.Mongo
[19:07:08] [Server thread/INFO]: me.gfly.Management.BStatsManagement
[19:07:08] [Server thread/INFO]: me.wolfyscript.utilities.main.metrics.bukkit.Metrics
[19:07:08] [Server thread/INFO]: com.comphenix.protocol.metrics.Metrics

and there is my service

chrome beacon
#

Strange

humble heath
#

can someone do a tutrial on how to do the new shaped and shapless recipies for crafting as all the ones are depricated

chrome beacon
#

Javadocs has everything you need

#

?jd Spigot

vale cradle
#

you can send screenshots on linux too lol

chrome beacon
#

Find the deprecated method and it usually tells you what to use instead

ivory sleet
chrome beacon
#

Ah

whole stag
sacred vector
#

i got screen shots i know how to do it

#

i just wasnt able to upload them because i wasnt verified

whole stag
#

Well then why'd you bother mentioning linux lol

sacred vector
#

because he said use snipping tool

#

and thats for windows

whole stag
#

And?

sacred vector
#

screenshotting wasn't my concern more about me just verifying my self

whole stag
#

You don't need to verify your choice of OS though

sacred vector
#

not OS

#

verifying so i can send a SCREENSHOT

whole stag
#

Verification makes no difference linux or windows

sacred vector
#

im not talking about a fucking Operating system

#

he said use Snipping tool.. i said im on linux dont have that, and also said i need to verify to send a screen shot in this discord server

#

i have my own screenshotting application that i use.....

whole stag
#

Then why bother saying snipping tool wouldn't work

#

It's like kleenex or bandaid

#

Generic name for screenshot utility

sacred vector
#

i dont understand what your point is here

whole stag
#

I don't understand why you said you use linux when they said to take a screenshot

sacred vector
#

because he said use snipping tool

whole stag
#

Generic name for screenshot utility

sacred vector
#

Okay? and i need to know a generic name for a screenshot utility?

whole stag
#

It has total "i UsE aRcH bTw" vibes

#

We don't care what system you use. Just take a screenshot

#

Whether that's flameshot or snipping tool idc

split egret
#

guys I use debian

sacred vector
#

and all i said was i dont have that im not on windows

split egret
#

am I cool

whole stag
#

They're the same basic program

sacred vector
#

why is it such a big deal saying that i dont have snipping tool

whole stag
#

It's pointless

whole stag
sacred vector
#

that you need to make an argument based of off nothing to make your self seem useful ?

whole stag
#

No, you said you couldn't use snipping tool, so I gave you the alternative

sacred vector
#

i already have one

tired isle
split egret
#

The issue is it sounded like you said it just to assert you're a linux user

sacred vector
#

i already took it

sacred vector
whole stag
#

Either you are just flexing linux, or you were looking for an alternative

tired isle
whole stag
#

I tried to help

quaint mantle
#

i have access to all commands with op level 2? op-permission-level is 2 and level is 2 in ops.json but i can still /stop

split egret
sacred vector
#

arguing over why i mention im on linux because i dont have snipping tool @whole stag making a big deal that no one cares what OS anyone is on...
when the guy above said to use snipping tool when i mention on linux dont have that, then i use my own screenshot application to take one but then needed to verify to send a screenshot

quaint mantle
#

luckperms breaks everything

#

not worth my time

#

i just wanna know what bukkit is doing to perms checks and how to fix it to vanilla like behavior

split egret
#

Setting it up wrong or something. You're changing the ops permission level in server.properties right?

quaint mantle
#

yes]

shadow gazelle
#

How can I modify the version that is shown on the top right of a server in your server list?
Example:

split egret
#

And reloading/restarting after?

quaint mantle
#

yes

split egret
#

Β―_(ツ)_/Β―

whole stag
#

OnlyMoon be like

ivory sleet
#

Already lads no need to argue over Linux and screenshots

quaint mantle
#

any ideas

#

ignoreVanillaPermissions is false

shadow gazelle
ivory sleet
#

I believe there’s an event for that

#

Idr if that was on bungee or spigot tho

shadow gazelle
#

It was

quaint mantle
#

its a paper event i think

shadow gazelle
#

I've seen a plugin do it before

#

Spigot plugin

quaint mantle
#

or just use protolib

shadow gazelle
#

Who the fk decided auto jump would be a good feature

#

anyway

quaint mantle
shadow gazelle
whole stag
whole stag
#

Β―_(ツ)_/Β―

quaint mantle
#

disabled checking for this.getBukkitSender().hasPermission(bukkitPermission);

#

from public boolean hasPermission(int i, String bukkitPermission) {

#

in CommandSourceStack

#

shitty workaround but it works

#

once again bukkit sucks YEP

sage swift
#

ah yes BukkitSender

quaint mantle
#

ive had this issue before

#

with ops getting *

#

for no reasion

sage swift
#

using bukkit permissions

quaint mantle
#

can i disable that

#

found the culprit maybe?

#

PermissableBase

quaint mantle
#

public boolean hasPermission(@NotNull String inName) {

#

it defaults to true if player is op

#

bukkit fucking sucks.

ivory sleet
#

Not really

#

Maybe this part of the api is a bit counter intuitive

quaint mantle
#

the behavior makes 0 sense

#

why should ops have *

ivory sleet
#

I haven’t messed with it so can’t really comment on that.

eternal oxide
#

Bukkit perms itself has no idea what * is

quaint mantle
#

the concept

#

if the permission is not found and the player is op then the check returns true

eternal oxide
#

Yes, bukkit perms has no concept of *. It only assgns perms you set to be assigned

quaint mantle
#

it produces ops having *

whole stag
#

Is it maybe a way to check of the player is an op?

eternal oxide
#

If you want to see if a perm truly exists test isPermissionSet

quaint mantle
#

then why doesnt bukkit use that

eternal oxide
#

No idea

quaint mantle
#

heck, i used luckperms and didnt disable ops and even explicitly denying an op a perm didnt matter they had * no matter what

gleaming grove
#

Someone know which packet force player to sleep?

eternal oxide
#

I've no clue if LP understands op and notop, I know GroupManager doesn;t as its from before those ever existed and I never added them

quaint mantle
#

lp has a disable ops feature

#

it sucks ass

#

the entire bukkit permissions system sucks ass

whole stag
#

Fix it and make a PR

eternal oxide
#

?contribute

quaint mantle
#

not worth my time

eternal oxide
#

Stop bitching then

quaint mantle
#

the only fix is breaking changes

#

being the legacy project that it is, the pr wouldnt get accepted

eternal oxide
#

That doesn;t matter. If it is truly broken then a fix is whats required

#

1.17/18 is a very good time to submit breaking prs

quaint mantle
#

ill think about it

eternal night
#

looks at #576 xD

#

give me those materials

solemn valley
#

When I try and spawn a FallingBlock with

FallingBlock fallingBlock = player.getWorld().spawnFallingBlock(player.getLocation(), Material.OAK_PLANKS);

I get the error Cannot resolve method 'spawnFallingBlock(org.bukkit.Location, org.bukkit.Material)' with 1.16.5

#

Can't find anything online

eternal oxide
#

?jd

solemn valley
#

uhm

eternal oxide
#

BlockData or MaterialData, not Material

solemn valley
#

OH

eternal oxide
#

Thats what the javadocs are for πŸ˜‰

shadow gazelle
#

I just realized there's an issue with my enchantment, when you break a block, it automatically gives you the item instead of dropping it on the ground. With a world guard region, it gives it to you even though the block break was cancelled, I tried using event.isCancelled() but it did nothing, any ideas?

solemn valley
shadow gazelle
#

Would I have to use World Guard's API?

eternal oxide
wild inlet
#

Is there any way to get the portal block from a PlayerPortalEvent

#

Getting the player's block doesn't work obviously as they don't have to be centered on the portal block to travel

sand rune
#

Guys , How to register multiple events in one Class

opal juniper
sand rune
#

Events , as Player Interact event , death , leave

eternal oxide
opal juniper
sand rune
#

No , Normal Events

opal juniper
#

can you show some code of what you mean?

sand rune
#

But when I set player drop item to setcanccled to true , it don't work@opal juniper

wild inlet
eternal oxide
#

Its still not going to be 100% accurate though as its the players collision box that triggers the teleport

wild inlet
#

The player can TOUCH a portal block

#

Without being on the portal

#

Exactly what I meant.

sand rune
#

I send in DM @opal juniper

wild inlet
#

I'd like it to be accurate

#

Seems like the event could give the portal block

opal juniper
eternal oxide
#

try monitoring the interact event then

wild inlet
#

TravelAgent doesn't even exist anymore

#

So can't use that

sand rune
#

On Every Event I Need to do that ? @opal juniper

wild inlet
eternal oxide
#

yes

sand rune
#

Thanks ! @opal juniper

wild inlet
opal juniper
eternal oxide
#

yes, the player will likely interact with teh block before it triggers a teleport

wild inlet
opal juniper
#

add it urself then

#

but i

#

dont know if there is a good way to do it

#

at all

wild inlet
eternal oxide
#

Its about the only chance you have of getting the actual block

wild inlet
#

I have an idea

opal juniper
#

divulge

wild inlet
eternal oxide
#

Hey, I can always stop making suggestions

wild inlet
wild inlet
opal juniper
#

please

eternal oxide
#

Ok, I found your solution.

opal juniper
sand rune
#

πŸ˜† 🍞

eternal oxide
#

Try monitoring the EntityPortalEnterEvent as it MAY trigger for a player

#

so long as the PLayer hasn;t been completely seperated from those events like Vehicles

opal juniper
#

possible but idk

wild inlet
#

But fair idea

opal juniper
#

oh it wont work

#

it says so

opal juniper
#

looks good

eternal oxide
#

If that doesn;t fire then you are out of luck

glass sparrow
#

what’s a good inventory lib? i made my own but i cba to add compatibility for menus that aren’t chest guis

ivory sleet
#

Canvas, inventoryframework, helper, bkcommonlib iirc and mfgui

keen kelp
#

How do I get Location from a RayTraceResult

wild inlet
keen kelp
#
    public void run(Player user) {
        Location loc = user.getEyeLocation();
        Vector dir = loc.getDirection();

        RayTraceResult result = user.getWorld().rayTraceBlocks(loc, dir, 10);

        Location end;
        if(result != null) {
            end = loc.clone().add(result.getHitPosition()).subtract(dir);
        }
        else {
            end = loc.clone().add(dir.multiply(10));
        }

        Bukkit.getLogger().info(String.valueOf(end));

        user.getWorld().spawnParticle(Particle.CLOUD,end,200);
    }
opal juniper
wild inlet
#

It could be passed through by API, but the simpler option is just to redo functionality a little

keen kelp
#

This doesn't work and the result gets to like y = 128

keen kelp
#

Does anyone know what particle is the white dot commonly used for indication?

opal juniper
#

Anyone know an api that I can give two locations and then it returns the β€œpath” an entity needs to follow?

#

I don’t know if the nms pathfinding would work cause there would possibly be unloaded chunks in between

#

The two locations could be 1000’s of blocks away

torn shuttle
#

I know this is insanely specific but has anyone here ever tried using seeded randomization to create voronoi noise patterns which do not require long term data storage beyond just storing the seed?

torn shuttle
#

possibly tens of millions of unloaded blocks at that

opal juniper
#

Ah

#

So

#

It would be in the sky

torn shuttle
#

then just make a straight line

opal juniper
#

Yeah but like buildings and mountains and shit

torn shuttle
#

sucks to suck

keen kelp
#

How do I get the point right before the result of rayTraceBlocks

#

I want the get the location of the air right before it hit the target block

torn shuttle
#

realistically at that point you would want to do the flight in increments and not through unloaded blocks

#

but also the minecraft flight ai is so bad it wouldn't be a loss to the game if it was just deleted

#

so even if you get air pathfinding to work you'll probably wish you didn't

opal juniper
torn shuttle
#

depends on how much accuracy you need really

opal juniper
#

I just don’t want it to fly into shit or thru it

keen kelp
#

Well I just want to get the block before the hit

#

In the middle of the block

torn shuttle
keen kelp
#

Use pdc ig

torn shuttle
#

and if so at what angle

keen kelp
#

1m I think I got an idea

opal juniper
#

Sounds like i need to think this thru though

#

To not be laggy as shit once it has a few entities flying

opal juniper
#

😁

radiant onyx
#

Hi I was wondering if anyone here knew of a good and easy to use plugin obfuscater. if so it helps me a lot if you can tell me where to find it, Thanks!

opal juniper
#

Why are you obfuscating

radiant onyx
#

just in case that people try stealing code where you have been working on for al long time.

keen kelp
#

end = result.getHitBlock().getRelative(result.getHitBlockFace(),1).getLocation();

#

Easy

opal juniper
#

Are you planning on publishing the plugin to spigot?

opal juniper
#

I forget all the block faces

keen kelp
#

There is no diagonals

opal juniper
#

Ah ok

keen kelp
#

Whichever face you hit is the way its going so diagonals are not a thing in this case

opal juniper
radiant onyx
#

no not right now but maybe in the future, I just find it very useful to have I just can't find anything quickly, I've been looking for it for quite a while

opal juniper
#

Well

#

You aren’t supposed to obfuscate plugins on spigot

torn shuttle
#

spigot has very specific guidelines on obfuscation if you want to do that

keen kelp
#

Why would you obfuscate it

opal juniper
#

Trust me - your code is not that ground breaking to need obfuscation

#

But - by all means try to prove me wrong

keen kelp
#

braking

opal juniper
#

Sorry

#

I’m on mobile ><

keen kelp
#

Can't tell

#

Aight anyway after this rt nightmare bs, I shall sloop

opal juniper
#

Yuhuh - have fun

#

In bed

#

Asleep

radiant onyx
#

then I won't publish it, but that doesn't stop me from looking for it because I do work at servers that I make plugins for and I don't want the code to be out on the street right away.

keen kelp
#

Oh an of course I gotta get an error when shutting down the server

keen kelp
#

and*

torn shuttle
#

people trying to obfuscate plugins just never ceases to be funny

keen kelp
#

i aight gonna fix it now it's 530am

opal juniper
#

β€œFirst plugin, time to obfuscate”

torn shuttle
#

just very short sighted

radiant onyx
keen kelp
#

pepsiCan.yeet();
this.sloop(10h);

opal juniper
keen kelp
#

AIght gn ig

opal juniper
#

Ciao

torn shuttle
#

would you look at that, found a random 2013 Bukkit forums voronoi noise implementation that was exactly what I was looking for

#

god bless the internet

#

though I guess I will have to figure out a way to store nodes

#

hmmm

shadow gazelle
#

So I have an enchantment that puts items into your inventory instead of dropping them when you break a block. When in a World Guard region, the blocks act like normal, not being removed, but the player gets the item. I looked through the block break event and the closest thing I found was checking if the event had been cancelled, but that didn't work. Any have any ideas on what I could use to fix this issue?

torn shuttle
#

actually screw storing it, I'll just check if the chunk already existed on the chunk load event

#

way faster

#

ok guess the real work will be meshing the voronoi noise with chunks

dark jackal
#

Hello

#

I have a source code for a plugin to prompt you to download a resource pack

#

How hard would it be to make it force you to do it?

#

To kick you if you decided not to download it

topaz moon
#

the actual kick would be easy, but how do you want to check if the ressource pack is actually downloaded and in use?

dark jackal
#

Great question

#

There is no way

#

But for the event of you clicking the "no" button

#

That is possible right?

topaz moon
#

Sure

granite stirrup
#

im pretty sure it is possible to check if a resource pack is in use

topaz moon
#

idk

granite stirrup
#

unless it isnt

#
public class YourListenerClassName extends Listener {
  public void playerResourcePackStatusEvent(PlayerResourcePackStatusEvent e) {
    if (e.getStatus() == PlayerResourcePackStatusEvent.Status.DECLINED || e.getStatus() == PlayerResourcePackStatusEvent.Status.FAILED_DOWNLOAD) {
      e.getPlayer().kickPlayer("please download the resource pack!");
    }
  }

  public void playerJoinEvent(PlayerJoinEvent e) {
    Player player = e.getPlayer();
    player.setResourcePack("https://your-resourepack.download");
  }
}
``` something like this @dark jackal
#

i think

dire marsh
#

you really should be providing the sha1 hash as well

#

otherwise you're just making it shit for users

shadow gazelle
granite stirrup
dark jackal
#

Thank you

dark jackal
#

But i dont really know how to implement it to that codeπŸ˜„

granite stirrup
#

hang on

dark jackal
#

Because i already have a code juat for downloading it and using it on all servers

#

Just*

granite stirrup
#
import javax.xml.bind.DatatypeConverter;
public class YourListenerClassName extends Listener {
  public static byte[] toByteArray(String s) {
    return DatatypeConverter.parseHexBinary(s);
  }

  public void playerResourcePackStatusEvent(PlayerResourcePackStatusEvent e) {
    if (e.getStatus() == PlayerResourcePackStatusEvent.Status.DECLINED || e.getStatus() == PlayerResourcePackStatusEvent.Status.FAILED_DOWNLOAD) {
      e.getPlayer().kickPlayer("please download the resource pack!");
    }
  }

  public void playerJoinEvent(PlayerJoinEvent e) {
    Player player = e.getPlayer();
    player.setResourcePack("https://your-resourepack.download",toByteArray("your-sha1-hash"));
  }
}```
unreal quartz
#

how were you checking it

shadow gazelle
#

With if (event.isCancelled())

unreal quartz
#

and what is your event priority

shadow gazelle
#

Whatever the default is

#

Should it be lower?

unreal quartz
#

worldguard acts on the lowest i'm pretty sure

#

send ur code

shadow gazelle
#

?paste

undone axleBOT
shadow gazelle
unreal quartz
#

either

shadow gazelle
#

Very nice formatting

unreal quartz
#

there shouldn't be a second arg for the event

#

also you can put ignoreCancelled = true in the event annotation and it will be ignored for yoiu

shadow gazelle
#

I added that after I tested with isCancelled

unreal quartz
#

but get rid of your second argument anyway

shadow gazelle
#

Yeah, did that

shadow gazelle
unreal quartz
#

yes

shadow gazelle
#

Okay, thanks

sharp bough
#

is it possible to add an NBT tag to an inventory?

#

or some kind of unique id?

subtle kite
#
if (sender instanceof Player) {
            Player player = (Player) sender;
        if (!(player.hasPermission("blah blah")

does this look right

#

will this work for player and console commands

opal juniper
#

Yeah

#

But if they use it from console obviously it isn’t an instance of Player

subtle kite
#

how do I set it up for console and player

opal juniper
#

I mean

#

You can just omit the line

#

^^ this is good

sharp bough
#

aight i think i can use that

#

thx

tired isle
#

How to make rgb colors in plugin? version 1.16.5

junior geyser
#

Anyone know how I can get the itemstack of a dropped item?

    for(Entity e:w.getNearbyEntities(loc, 2, 2, 2)){
        if(e.getType() == EntityType.DROPPED_ITEM){
            //I want the itemstack of e if that makes sense
        }
    }
tired isle
#
        for(Entity e:w.getNearbyEntities(loc, 2, 2, 2)){
            if(e.getType() == EntityType.DROPPED_ITEM){
                ItemStack item = ((Item) e).getItemStack(); 
            }
        }
junior geyser
#

Ah ok I was trying to cast it directly to ItemStack

#

Thanks!

tired isle
#

:3

junior geyser
tired isle
junior geyser
#

Oh, cool. I got to try that

tired isle
#

also you can use

```java
something
```

and there will be colors

junior geyser
#

Is that new?

#

I swear those are newish

tired isle
#

or more

dusk flicker
#

those have been here forever

junior geyser
#

oh dang

#

Ive been missing out πŸ˜„ . Thanks again!

hybrid spoke
shrewd solstice
#

how can i detect if an armor stand is a passenger

sharp bough
shrewd solstice
#

if i kill the mob who have an special armorstand on it... the armor stand will killed too

shut field
#

if list contains the armorstand

#

on mob death event

shrewd solstice
#

ok wait i explain (im not good in english)

#

im doing a car and the skin of the car is a armor stand with a custom item with custommodeldata and i want to if i kill the ridable mob, the armorstand die too

shut field
shrewd solstice
#

ok

shut field
shrewd solstice
#

yes

shut field
#

I would think that getting the passengers of the killed entity should return the armor stand if the armor stand is riding that entity

shrewd solstice
#

ok im trying this and if isnt work i come show you what i do πŸ˜„

shrewd solstice
#

how to kill an armor stand πŸ˜…

shut field
shrewd solstice
#

loool

vague mason
#

If you remove the void you can also remove the universe and earth so be careful.

shut field
shut field
#

for some reason itemList is null

granite stirrup
#

that looks like a unchecked cast warning

granite stirrup
#

yeah thats kinda weird tho cuz if the list had nothing it should return a empty list

shut field
#

but I am getting an Unchecked cast warning too

granite stirrup
shut field
granite stirrup
#

ok but is it itemstacks?

shut field
granite stirrup
shut field
granite stirrup
#

make sure that the thing where that list is what you want to get "player YourUUIDbackpack"

shut field
granite stirrup
#

wait can you send me the whole yaml

shut field
#

yep

granite stirrup
#

i wanna check if its valid

shut field
granite stirrup
# shut field

so it is valid but you might not want the null in the thing

shut field
granite stirrup
#

im pretty sure you cant have - in yaml

#

so maybe thats why theres extra characters

#

and ""

proud basin
#

How can you add a space in between each path in a custom yml file

granite stirrup
proud basin
#

I mean like ```yml

test:
blabl: "ww"

test1:
poop: "yay"```

#

without having a config.yml

granite stirrup
#

you set test.blabl to "ww"

#

i think

proud basin
#

I don't think you understand

granite stirrup
#

it should auto do it for you

proud basin
#

The space in between test and test1

granite stirrup
#

im pretty sure

granite stirrup
#

i dont know

#

why do you want to do that with code anyway

proud basin
#

Looks messy without it

proud basin
# granite stirrup oh that

Kinda pissed because I had it work yesterday and then I deleted it by accident and closed my intellij so i can't ctrl + z andd yeaa trying to remake it

granite stirrup
#

f

proud basin
#

Do you want to set the config then saveResource?

granite stirrup
#

Β―_(ツ)_/Β―

proud basin
#

oh look at that a null pointer

#

how great

shrewd solstice
#

how can i create an Itemstack and the Itemstack is the item on the head of my armorstand?

dusty sphinx
#

How can I wait for a response for a plugin message? I tried waiting on a CompleteableFuture but then it locks the main thread and that ain't good

sage swift
#

are you using get

proud basin
#

Right so I have java saveDefaultConfig(); saveResource("messages.yml", false); messageConfig.reload(); config(); messageConfig.save(); on my onEnable then messageConfig.get().getString("prefix") in my command class but it seems that it is null but I'm loading the config and setting it

sage swift
#

get will do it immediately, on the main thread

#

thenApply is a lambda with the result of the future as an input variable

dusty sphinx
#

Hmm

ionic reef
#

hey all! I've tried using the remapped-mojang dependency, but it's not working...
My depedencies:

            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.17-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.17-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.17-R0.1-SNAPSHOT</version>
            <classifier>remapped-mojang</classifier>
            <scope>provided</scope>
        </dependency>```
sage swift
#

isn't remapped spigot, not spigot-api

#

since it's illegal to redistribute mojang code

#

i.e. buildtools output

ionic reef
#

im slightly confused as to what you mean

#

not about the legallity things

#

I've added the maven stuff so that it un-does the remapped stuff

#

but it doesnt seem to remap

somber hull
#

If i have a interface with implemented objects how do i get a random object fropm under the interface? (i hope im saying that right)

sage swift
#

what I'm saying is, spigot-api is api only

#

you need to run buildtools for the version you need to use the base mojang (and remapped) code

ionic reef
#

i have

sage swift
#

so change the dependency to spigot

ionic reef
#

and my re-mapped jar dependency is there

sage swift
#

oh

ionic reef
#

so i have the api

#

the remapped

#

but then i also had to include just 'spigot'

#

bc the remapped didnt seem to work

quaint mantle
#

hi i am trying to add args to a command but i have never tried doing args b4

#

any1 can help ping me please

undone axleBOT
proud basin
#

lmao

#

bing

sage swift
#

was a command

quaint mantle
#

...

proud basin
#

Who uses bing anymore

sage swift
#

i swear I'm not crazy

proud basin
#

sure...

ionic reef
#

does ur config actually contain the string prefix?

proud basin
#

yes

ionic reef
#

is messagesConfig.get() null?

proud basin
#

That is possible let me print out get()

#

It doesn't seem like it is

#

Oh wait yeah it is

#

wait no

#

It's not

#

@ionic reef What's another way I could test to see if messageConfig.get() is null?

#

When I debugged it it didn't seem null but I guess it's the only way

ionic reef
#

legit do something like

#

if (messageConfig.get() == null)

#

// print messag

proud basin
#

that's what I did but I did some other ways some said it was null and others said it wasn't

#

so I'm im just gonna go with that it's null

#

wtf the spaces in between each path is gone in my config are gone now

quaint mantle
#

heyhey

#

i was wondering if its possible to have spigot jar's and the main classes and what-not already be made in Eclipse

#

like, is there an addon.. or a way to make Java projects with pre-loaded stuff?

proud basin
# proud basin wtf the spaces in between each path is gone in my config are gone now

well im tired so ima just leave this here ```java
private File file;
private FileConfiguration fileConfiguration;

public FileConfiguration get() {
    return fileConfiguration;
}

public void reload() {
    file =  new File(plugin.getDataFolder(), "messages.yml");
    if (!file.exists()) {
        try {
            file.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    fileConfiguration = YamlConfiguration.loadConfiguration(file);
}

public void save() {
    try {
        fileConfiguration.save(file);
    } catch (IOException e) {
        System.out.println("no");
    }
}
somber hull
#

wa

#

aaaa

#

Cannot invoke "org.bukkit.command.PluginCommand.setExecutor(org.bukkit.command.CommandExecutor)" because the return value of "me.silentprogram.chaosplugin.MainClass.getCommand(String)" is null```
#

i know it has something to do with the command name but idk

ionic reef
#

wts in ur onEnable

somber hull
#

new MainCommand(this);

#
    public MainCommand(MainClass plugin) {
        this.plugin = plugin;
        plugin.getCommand("chaos").setExecutor(this);
    }
#

this is my constructor for the command

ionic reef
#

thats very wrong

somber hull
#

...

ionic reef
#

in ur on enable do

#

getCommand("chaos").setExecutor(new MainCommand(this));

#

and remove the plugin.getCommand() from that constructor

somber hull
#

o

#

ok

ionic reef
#

Could anyone give me a hand with setting up the remapped-mojang thingo? Its not working for me rn