#help-development

1 messages · Page 70 of 1

obsidian drift
#

Pretty much the same thing

echo basalt
obsidian drift
#

On which component though?

echo basalt
#

the one you're trying to send

obsidian drift
#

I'm only passing the list of components to sendMessage

chrome beacon
#

Looks like you're trying to send null

#

Which won't work for obvious reasons

naive bolt
chrome beacon
#

Now show where this.plugin is

naive bolt
#

i dont have a this.plugin

chrome beacon
#

It exists somewhere

#

We can't help you with the information you've given us

naive bolt
#

oh yeah i do ```java
TownyMySQL plugin;

public SQLGetter(TownyMySQL plugin) {
this.plugin = plugin;
}

chrome beacon
#

and where does that error happen

naive bolt
#

sqlgetter line 21

#

which is Connection connection = plugin.SQL.getConnection();

echo basalt
#

Towny.getPlugin can be null

#

but honestly that's a horrible way to handle sql

naive bolt
#

oh

chrome beacon
#

Anyways the reason why you're getting that error is that you're trying to use plugin before it's set

#

Intellij already appears to warn you

naive bolt
#

how can i get around that? use the Connection connection in each call?

chrome beacon
#

Set the connection in the constructor

wary harness
#

because I got refound request

naive bolt
chrome beacon
#

Yes

naive bolt
#

ty

chrome beacon
#

Isn't this the wrong channel 🤔

wary harness
#

sorryyyy

old geyser
#

someone can help me about "goto" velocity?

chrome beacon
#

?

crisp forum
#

do you have any idea how can I create offers?

young knoll
#

You need to create an EnchantmentOffer

dim bronze
#

In what cases is ItemMeta null when getting from an item? Is it just when the item's material is AIR?

crisp forum
#

Yes I know and created: EnchantmentOffer(Enchantment.ARROW_DAMAGE, 1, 30) but I don't know how can I send it. I've tried
event.offers[0] = EnchantmentOffer(Enchantment.ARROW_DAMAGE, 1, 30), it works on enchantable items but not on unenchantables

young knoll
#

Huh

#

I swear I had it working on non enchantable items

dry forum
#

is it possible to check for a scroll event

obsidian drift
#

Is there a way to send a plugin message without there having to be a player online?

obsidian drift
native gale
#

Hi!

#

In the map format the InhabitedTime tag

#

What time unit does it use?

#

Seconds? Milliseconds? Ticks?

quaint mantle
#

For play.sendMessage
Is there a way to use multiple colors for the message like other plugins got

#

for example :

topaz cape
#

lol

native gale
native gale
#

Or just insert ChatColor.Whatewer whenever you need a new color

obsidian drift
#

that sucks

native gale
iron glade
topaz cape
#

he's asking for plugin messages

quaint mantle
#

and it didnt work

ancient plank
#

But did you really

iron glade
topaz cape
#

@obsidian drift what about you use redis messages(pubsub)

#

that's what i use

quaint mantle
#

player.sendMessage(DARK_PURPLE + "" + BOLD +"Mine" + LIGHT_PURPLE + "" + BOLD +"Swift"+ RESET + LIGHT_PURPLE +"You have been teleported to the spawn.");

topaz cape
#

what in hell

#

why

quaint mantle
#

xd

iron glade
#

Honestly I never used chat color enums but just §0-9, a-f, etc

topaz cape
#

also what's BOLD without ChatColor

iron glade
#

Imagine having a 3 liner because of using ChatColor.<Color> every time

ancient plank
#

text component superiority

quaint mantle
obsidian drift
#

§l

topaz cape
#

omg ur static importing

crisp forum
#

or using kotlin and using with keyword

quaint mantle
#

ah

#

i found the issue

#

i used reset

#

but didnt need to

hollow beacon
#

ChatColor.translateAlternateColorCodes('&', "&fThis&4&bAlso &3works");

#

something like that

#

idk

torn shuttle
#

hey just confirming again, there is no player teleport event right?

#

wait

#

no there is

hollow beacon
torn shuttle
#

my life is a lie

#

when was that added?

young knoll
#

Long time ago

torn shuttle
#

how long is a long time ago

young knoll
#

Pretty sure it was in 1.8

torn shuttle
#

ah see

#

might've not been there when I was first toying with it

young knoll
#

Probably was in before that as well

torn shuttle
#

I swear I remember it not existing

hollow beacon
#

just like my will to live

echo basalt
#

aren't you that guy that made a song about choco?

torn shuttle
#

I am as old as the bones in minecraft's body

#

which actually would make me way younger than I actually am come to think of it

echo basalt
#

as if the minecraft body had bones

torn shuttle
#

look all I'm saying is that when I was looking to stop playing the browser version of mc for free I'm pretty sure mc was still on infdev

echo basalt
#

you're as old as herobrine :)

torn shuttle
#

I still remember getting staff on a server for the first time for one of those servers

ancient plank
#

Running around looking at all the people's public builds

torn shuttle
#

in a limited size world that was pretty tiny lol

ancient plank
#

Yuh

#

Crazy have a group of random people could innocently build without worries of an a****** coming and breaking everything

torn shuttle
#

if you thought that back then then you were truly naive, like I said I got staff for the first time

ancient plank
#

Idk I never experienced any assholes on browser mc

torn shuttle
#

I'd say the griefing scene was at its peak back then

ancient plank
#

And I played it a lot

torn shuttle
#

basically no protections and all public all the time baby

ancient plank
#

Guess I was lucky with the 5 hours a day I was playing

torn shuttle
#

I do not want to know how long I've had minecraft-related things open for since I first started

echo basalt
#

magma

#

I demand you make a lyrical rap about choco

torn shuttle
#

what is this, 2016?

echo basalt
#

yes

#

I might be able to come up with some lyrics

torn shuttle
#

well last time I was paid $5 so with inflation that'll be $5000

echo basalt
#

should we go with a smoother hopsin style or bring out our inner joyner lucas 🤔

dry forum
#

p.hideentity is depricated anyone know if it stil works

echo basalt
#

pass the plugin as the second param

young knoll
#

It’s draft api

azure hawk
#

What is going on here. I was trying to save stuff in my config but this came up. The second is my config.yml

delicate lynx
#

you tried to serialize a TextComponent

azure hawk
#

where

delicate lynx
#

at de.itembingo.commands.Command_start.onCommand(Command_start.java:28) ~[ItemBingo-1.0-SNAPSHOT.jar:?]

azure hawk
#

tf

delicate lynx
#

show the entire start command

young knoll
#

You are trying to save an Item

crisp forum
#

do you have any idea how can I create offers?
I've tried event.offers[0] = EnchantmentOffer(Enchantment.ARROW_DAMAGE, 1, 30), it works on enchantable items but not on unenchantables

young knoll
#

Also why have you called your item variable “itemName” when it is not the items name but the entire item

onyx fjord
#

how do you call a library that allows multiple database types without making different code for each one

crisp forum
#

Using if statements

azure hawk
#

ok

#

i forgot .getName()

young knoll
#

This is why proper variable names are important

crisp forum
#

Sending Enchantment Offers To Unenchantable Items

onyx fjord
compact haven
#

ehhh

grim ice
#

ayo bro

compact haven
#

doesnt hikaricp just do connection pooling

grim ice
#

u gotaa work on ur naming conventions

compact haven
#

I don't think that it transforms your sql statements for each db engine

azure hawk
#

it works so it works lol

hasty prawn
iron glade
#

This looks terrible

#

Casting to player without checking

onyx fjord
#

what do people usually use then?

#

i see often sqlite and mysql as option

compact haven
#

that's because sqlite and mysql syntax differ very little

#

I code in Kotlin so I use Exposed, which uses a lot of syntax sugar to look good, so I have no clue what is popular in Java

#

it's also possible that people just put an abstraction on top of storage (which is recommended) and implement the different engines they support themselves

ivory sleet
#

technically you could java interoperate with kotlin :>

compact haven
#

you could, but that's why I noted this part: "which uses a lot of syntax sugar to look good"

#

Exposed would look like shit written in Java

ivory sleet
#

yeah figures lol

candid shoal
#

How do I make particles spawn on a chunk border

quaint mantle
#

how can i determine the amount of time left on something. Im wanting to make a chat cooldown and if the cooldown isn't past 3 seconds it'll display the time left

chrome beacon
#

Save the timestamp of the last message in a map

#

And then check if it's there and how long ago it was

quaint mantle
#

and how would i display it?

#

like

#

2.2s left

#

or something

rough blaze
#

im getting this issue while building the plugin

chrome beacon
rough blaze
chrome beacon
#

?paste

undone axleBOT
chrome beacon
#

You added jitpack repo twice

rough blaze
chrome beacon
#

Yea

rough blaze
#

uh what would I put there?

chrome beacon
#

I just realized that the repo is all wrong too ;/

rough blaze
chrome beacon
grim ice
#

um

#

if i wanna make

#

a rock paper scissors neural network

#

ill have to turn each choice into a number right

river oracle
#

you don't need a neural network for rock paper scissors

grim ice
#

why tho

rough blaze
river oracle
# grim ice why tho

I mean you could adapt it to a specific player, but its pretty much random unless there is some known mental bias I'm unaware of

chrome beacon
#

?paste Send new pom

undone axleBOT
river oracle
#

I have no clue what type of software you are using to construct it

#

I usually use scikitlearn

grim ice
#

tinynn4j

#

it looked simple

#

and i understand what it doese somewhat

#

so i wanna use it

rough blaze
river oracle
#

ohhh a java thing I can't help you most of my api knowledge would be in scikitlearn in python

grim ice
#

it doesnt matter tbh

#

well to make it i would have to assign

#

each thing a number

#

e.g

#

rock 1
paper 2
scissors 3

river oracle
#

if you assign it to a number all you'd need to do is just make a string map if you want the ui to be good

#

but yeah that should work

grim ice
#

but then

#

what do i do

river oracle
#

well depends what the api offers

#

You can train the network by putting it up against a Random number generator X times

#

than save the dataset

grim ice
#
//(number of inputs, number of nodes in hidden layer, number of outputs)
NeuralNetwork nn = new NeuralNetwork(3,5,1);

nn.setActivationFunction("RELU"); //default is SIGMOID
nn.setLearningRate(0.01f); //default is 0.1f

//3 inputs and 1 output
float[] trainingInputs = {1.0,2.0,3.0};
float[] trainingOutputs = {0.5};

nn.train(trainingInputs,trainingOutputs);

float[] testData = {1.1,2.1,3.1};
//output will be a float[] with size equal to the number of output nodes
float outputs[] = n.predict(testData);
river oracle
#

and feed it in

grim ice
#

example

#

so basically

#

i input a random number

#

from 1 to 3

#

3 times

#

wait

#

what

river oracle
#

I'd do it like 10,000 times or something

#

3 is a horrible training set

grim ice
#

wait wait

#

how many input nodes

#

should it have

rough blaze
river oracle
#

bro

#

?paste

undone axleBOT
chrome beacon
rough blaze
river oracle
rough blaze
#

still little new to this discord

chrome beacon
#

Why is jitpack defined twice

river oracle
#

the output node of the option thrown and whether they won or not true for win false for lose

chrome beacon
#

Remove one of them

grim ice
#

nah the win is calculated somewhere else

river oracle
rough blaze
river oracle
#

I'd track the winning as a sort of points system though for the AI as a reward for winning

grim ice
#

wait so

#

what would the input be

#

and output

river oracle
#

the test set would be sets of rock paper scissor games

grim ice
#

no like

rough blaze
grim ice
#

what will

#

the input and output be

sour wedge
#

Hey hello, i have a second issue, I try to do something with InventoryMoveItemEvent But its not called.
And yes i register my event listener in my Main class.

#HopperEvents.class

        public class HopperEvents implements Listener {
    
        //This one not called
        @EventHandler(priority = EventPriority.HIGHEST)
    public void onInventoryMoveItem(InventoryMoveItemEvent event) {
        
            
         Bukkit.getLogger().log(Level.INFO, "getDestination:"+event.getDestination().getType().name());
         Bukkit.getLogger().log(Level.INFO, "getDestinationHolder:"+event.getDestination().getHolder().toString());
         event.setCancelled(true);

         
    }


        //This one called fine
        @EventHandler(priority = EventPriority.HIGHEST)
    public void onInventoryPickupItem(InventoryPickupItemEvent event) {****}
}


#Main.class
@Override

public void onEnable()
{
      this.getServer().getPluginManager().registerEvents(new me.plugin.HopperEvents(),this);
}

Whats going wrong i'm on API 1.19

chrome beacon
chrome beacon
river oracle
chrome beacon
#

Ah wait nvm

#

Missed class name

#

Common issue is for people to use it with inventory guis

grim ice
#

what

sour wedge
river oracle
#

based off your example though your ai would be basically learning the rules of rock paper scissors versus playing

rough blaze
river oracle
#

so given a game it predicts the outcome if enough tests are given 10 or so it should beable to predict whether the game is won by one player or the other

#

atleast the api example seems to be predictive so you'd need to restructure for it to play

#

I've only done an ai that could play a game like once usually I just use AI to project data and future values

sour wedge
#

HopperEvents.class is listen for sure sinds InventoryPickupItemEvent is working?

chrome beacon
sour wedge
#

I try to detect hopper transfer from a chest to be clear

grim ice
#

the input should be the player's last game input and the output should be the ai's answer @river oracle

#

this sounds good

river oracle
#

but you also need to tell the AI the outcome of the game

river oracle
chrome beacon
rough blaze
sour wedge
# rough blaze

Try to build again when you run as Administrator on your build program

chrome beacon
#

Open the foldee

#

And delete

river oracle
# grim ice how

I'm not sure with that api you'd have to look through the docs but its important the AI knows the output so it can learn otherwise its no better than a rng

rough blaze
#

it gives me the error

chrome beacon
#

Remove the file name

#

From path

rough blaze
#

wait

#

THANK YOU

grim ice
#

normally how would u do it

river oracle
#

ohh lord okay its been a year let me think

#

AI was one of the first programming things I did lol

sour wedge
river oracle
#

only logic

grim ice
#

just do it

#

idc anything

#

any input

#

code or english

#

whatever

supple elk
#

Does anyone know the speed a boat rotates in deg/s?

#

Can't find anything on google

sour wedge
#

This is what i try to detect if i put some items in the upper chest.

#

InventoryMoveItemEvent is right true? to detect on hopper side?

rough basin
#

Is there any way to use warden's sonic boom attack?

worldly ingot
sour wedge
rough basin
#

Thanks

worldly ingot
#

What server are you using, shared? Paper?

sour wedge
#

Paper

worldly ingot
#

They have a setting to disable that event from being called that's enabled by default

#

paper.yml should have something about inventory-move-event. Can't remember the name

grim ice
#

@worldly ingot do u have an idea btw

sour wedge
chrome beacon
#

Performance

worldly ingot
#

The event is notoriously imperformant, but it's a weird choice in setting to enable by default

grim ice
#

i wanna make an ai that u give the player's last choice and itll predict the next choice and reply to it

#

but

#

idk how to tell it

#

good job / bad job

#

to train it

worldly ingot
#

Choice of what?

grim ice
#

rock paper scissor

worldly ingot
#

ngl, RPS is one of those games where a good AI is as simple as a random number generator KEKW There's nothing you can really train an AI on and it will probably perform as well as RNG

alpine urchin
#

someone once asked me if he can train an ai to make an anticheat processing the bytes of packets

supple elk
alpine urchin
#

he wanted to feed it byte arrays

eternal night
#

Only the last choice seems pretty limiting for a neural network for rock paper scissors

#

At which point you'd need a TDNN

worldly ingot
#

If you're insistent on doing an RPS NN, I'd agree with that

alpine urchin
#

train ai to update spigot

rough blaze
#

/paste

alpine urchin
#

thats smarter

rough blaze
#

!paste

alpine urchin
#

?paste

undone axleBOT
worldly ingot
#

The best training data you can give an RPS NN is just... random games of RPS

rough blaze
worldly ingot
#

But at the end of the day it operates based on patterns

sour wedge
worldly ingot
#

I can't remember what the name is called. One sec. I have a config on hand

#

world-settings.default.hopper.disable-move-event: true

#

Set that to false

sour wedge
#

on global?

worldly ingot
#

Wherever you're using the event

sour wedge
#

can i add it anywhere?

#

its not exist

rough blaze
native gale
#

Is there an event for saving a new chunk to the disk?

worldly ingot
# sour wedge can i add it anywhere?

disable-move-event should be somewhere in the paper.yml. I don't know how Paper handles their configs. I seldom edit their config files and I only ever really work with Paper servers while I'm writing software for some company. Configuration is often left to the system admins lol

#

If it's not there you might have to add it. Though where to add it, I'm unsure. Asking the Papercord is probably a better option

sour wedge
#

yeah its a per world setting

#

thanks

alpine urchin
#

are we giving paper support

#

in spigot

sour wedge
#

its a good community, so if it is paper or spigot, if people can help why not, its helps me 😋

rough blaze
#

only in the server log

eternal oxide
rough blaze
eternal oxide
#

?paste yours and we'll tell you whats wrong

undone axleBOT
rough blaze
eternal oxide
#

remove the } at the end

rough blaze
#

alright

rough blaze
eternal oxide
#

did you register an executor?

rough blaze
#

?

rough blaze
eternal oxide
#

check yoru startup for any errors

rough blaze
rough blaze
#

?paste

undone axleBOT
rough blaze
eternal oxide
#

Look down the stacktrace until you spot one of your plugin classesat me.toweles.songplugin.SongPlugin.onCommand(SongPlugin.java:35) ~[?:?]

#

it tells you where the error came from and what line number

#

the error being Caused by: java.lang.IllegalArgumentException: Cannot add null to playlist

rough blaze
dusk flicker
#

he legit provided the number

#

but if you want to see for yourself, paste link line 30

carmine spruce
#

anyone know why i cant use any methods from spigot

#

i got the spigot jar in my build path

lime moat
#
String kick_message = main.getConfig().getString("kick-message");
Player target = Bukkit.getPlayer(args[0]);
target.kick(MiniMessage.miniMessage().deserialize(kick_message));``` ```yml
resource-pack-message: "<red>To download the resource pack, click the server, then click \"edit\". Then \"enable\" the server resource packs!</red>>"```
#

Am I doing something wrong here? I'm not being kicked.

iron glade
#

google java naming conventions please

dusk flicker
#

?conventions

undone axleBOT
iron glade
#

also, you are not checking if target is null

lime moat
#
    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        String prefix_message = main.getConfig().getString("prefix-message");
        String no_permission_message = main.getConfig().getString("no-permission-message");
        String kick_message = main.getConfig().getString("kick-message");
        if (sender instanceof Player) {
            Player player = (Player) sender;
            boolean packstatus = resourcepackManager.getStatus(player.getUniqueId());
            try {
                Player target = Bukkit.getPlayer(args[0]);
                if (sender.hasPermission("xo.texturepack.other")) {
                    if (target != null) {
                        target.kick(MiniMessage.miniMessage().deserialize(kick_message));``` the full code is this :P
dusk flicker
#

?nesting

#

we really need a command about nesting if statements

iron glade
#

ikr

kind hatch
#

?antiarrow

#

darn

#

Thought there was a command for it.

iron glade
#

So, what exactly is line 35?

iron glade
carmine spruce
#

can someone read my message thanks :)

lime moat
#

Ahh, whoops, didn't notice that 😂

#

I'll fix it thank you!

kind hatch
undone axleBOT
#

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

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

carmine spruce
#

i see

#

thanks 👍

granite burrow
#

How can I reload my entire plugin and not just my config file?

vocal cloud
#

Just reload what you want to?

modest garnet
granite burrow
granite burrow
vocal cloud
#

Uh what exactly do you want to reload?

granite burrow
#

I have a file that basically just holds a couple variables that I have to use multiple times through my plugin. I want to reload that since it doesn't reload when the config reloads

modest garnet
granite burrow
modest garnet
#

so the same as /reload lmfao

dusk flicker
#

any form of reload has a chance to break plugins

#

aka why you NEVER use reload on production servers

vocal cloud
#

I don't understand how it's difficult to reset variables

dusk flicker
#

I would consider it fine to use on development servers, but if you have any errors restart to see if its persistant

modest garnet
granite burrow
# vocal cloud Gonna have to send it.
public class Variables {
    private static final Plugin plugin = Plugin.getPlugin(Plugin.class); // Get this from main

    // Get Placeholders
    public String prefix = plugin.getConfig().getString("Placeholders.Prefix");
    public String error = plugin.getConfig().getString("Placeholders.Error");
    public String success = plugin.getConfig().getString("Placeholders.Success");
    public String pluginName = plugin.getConfig().getString("Placeholders.Plugin Name");
}

This is the base of my variable file, the different strings don't change

dusk flicker
#

oh god

#

def could be a lot worse

#

still

vocal cloud
#

^

dusk flicker
#

but yeah do what Lewi is saying

granite burrow
#

Not super scalable, if theres a bunch of variables, or special circumstances for the variable, like converting a string to a material

vocal cloud
#

You want this the easy way? Make an object that generates from a passed in config. Reload command resets the object with the updated config.

#

Don't even need an object but w/e

dusk flicker
#

thats the smart way to do it tbh

#

Can just get the instance from your main class or smth so you really arent abusing static

modest garnet
#

or a config handler where u just call a method whenever you want to get it from config

vocal cloud
#

That too

#

Configs are cached in memory

modest garnet
rough blaze
#

has anyone here worked with noteblock api? I sorta need your help

eternal oxide
#

?ask

undone axleBOT
#

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

rough blaze
#

I need help with with noteblock api, Im getting a "Cannot add null to playlist" when I try to use my command to play a sound

vocal cloud
#

Gonna need code to help you we can't read your mind lol

rough blaze
#

?paste

undone axleBOT
rough blaze
#

errors coming from here

vocal cloud
#

Then paste the error

steel bloom
#

Can someone send a link from the spigot forum how to solve my problem because I can't find a solution or I'm doing something wrong. I want the head of the armor stand to collide with the ground so the head stays on the ground like a block

vocal cloud
#

Debug and log all the data

rough blaze
#

Im not sure how to make the nbs work

eternal oxide
#

have you saved Song.nbs to yoru plugins data folder on the server?

eternal oxide
#

no

rough blaze
#

just the plugins folder?

#

I have it in the plugins folder

eternal oxide
#

Inside YOUR plugins folder

rough blaze
eternal oxide
#

nope

rough blaze
#

?

ornate patio
#

how do you custom hex color codes

eternal oxide
#

getDataFolder().mkdirs();

ornate patio
#

like in String form and not ChatColor.of

rough blaze
eternal oxide
#

in your onEnable()

#

that will just create the folder, you still have to put your Song file in there

ancient plank
iron glade
#

"Plugin Name"

granite burrow
#

Yeah, It works for me atleast

river oracle
#

I'm not sure I'd generally advise against it

iron glade
#

same

river oracle
#

yaml conventions in that picture are not followed at all

iron glade
#

for me at least, I avoided using spaces so far

rough blaze
#

?paste

undone axleBOT
kind hatch
#

Spaces are allowed per the YAML spec, it's just that they aren't used a whole lot.

iron glade
#

Anyone here knows which items will be displayed invisible in inventories?

kind hatch
#

Light gray stained glass pane

iron glade
#

So far I have Material.FIRE and Material.WATER

iron glade
past swan
coral oyster
#

why isnt the debug message being displayed or the "menu" command when I right click the air with the matching displayName?

@EventHandler
public void playerInteractionEvent (PlayerInteractEvent event) {
    Player p = event.getPlayer();
    if(event.getAction() == Action.RIGHT_CLICK_AIR) {
        if (p.getInventory().getItemInMainHand().getItemMeta().getDisplayName().equalsIgnoreCase("§a§lMain Menu §r§7(Right-click)")) {
            System.out.println("(debug msg) player right-clicked the air with a main menu item");
            p.performCommand("menu");
        }
    }
}

and here is how the item is given:

    public void giveMenuItems (Player p) {
        ItemStack Compass = new ItemStack(Material.COMPASS);
        ItemMeta compassMeta = Compass.getItemMeta();
        compassMeta.setDisplayName("§a§lMain Menu §r§7(Right-click)");
        compassMeta.setLore(Collections.singletonList("§7Open the main game menu to switch servers games,etc."));
        Compass.setItemMeta(compassMeta);
        p.getInventory().setItem(0, Compass);
    }
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player p = event.getPlayer();
        giveMenuItems(p);
    }
rough blaze
#

how would I call an api's onenable and ondisable methods?

dusk flicker
#

you wouldent

#

if it has onEnable and onDisable, it means you need that as another plugin

rough blaze
dusk flicker
#

you dont

#

thats just a rabbithole you dont want to dive into

#

probably onlky gonna cause errors

rough blaze
dusk flicker
#

that image aint loading

#

o i c

#

had to open it

#

So you have two options really

#

you can actually do call the onEnable and onDisable methods, id bet this will cause some errors but id bet someone else could confirm that. Or you just run it as another plugin and avoid any headache

rough blaze
#

is there any alternative to noteblockapi?

#

might save me the headaches

dusk flicker
#

Why do you need an alternative?

#

the only headache here is the one you are causing yourself

rough blaze
dusk flicker
#

just add it as another plugin

rough blaze
#

?

dusk flicker
#

then you dont need to screw with any onEnable or onDisable shit

rough blaze
dusk flicker
#

but you don't have to

#

you are legit overcomplicating this

rough blaze
dusk flicker
#

have NoteblockAPI as a secondary plugin in your server, have the plugin you're making depend on NoteblockAPI, then just call the methods from the api as its already initialized

rough blaze
dusk flicker
#

read. the. wiki.

rough blaze
#

alright

#

thanks

dry forum
#

how can i check if a player jumps this @EventHandler public void onJump(PlayerMoveEvent e) { Player player = e.getPlayer(); if ( player.getVelocity().getY() >= 0) { calls the event like 20 times so my code gets executed like 20 times

eternal oxide
#

easier to listen to the jump statistic event

dry forum
#

what event is that

eternal oxide
#

are you tryign to prevent them jumping?

dry forum
#

no

#

run code after they jump

eternal oxide
#

thats fine. You can do either in that event

dry forum
#

ight ty it works

anyone know why this doesnt work @EventHandler public void onShiftClick(PlayerInteractEvent e) { if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) { if (e.getPlayer().isSneaking()) { im trying to do stuff when a player shift right clicks but nothing happens when i shift right click i have it broadcast a message yes its registered

eternal oxide
#

Is your hand empty?

dry forum
#

yes

eternal oxide
#

No event is fired for an empty hand air click

quaint mantle
#

RIGHT_CLICK_AIR

dry forum
#

left click air does

#

^^ and that

quaint mantle
#

Action.RIGHT_CLICK_AIR ?

dry forum
#

i have the exact same event but without the sneaking and it works fine

eternal oxide
#

Not with an empty hand

dry forum
#

nothing in my hand

quaint mantle
#

That makes sense, I'm not sure why I bothered printing RIGHT_CLICK_AIR if I knew that it wouldn't fire with an empty hand.. 😳

#

Anyways... copied and pasted:

Is there a good library to use for MySQL stuff? I'm really not a fan of running everything async, as it's quite repetitive, and a pain if something goes wrong (with statement itself, etc.)

Is there any library that will run it all async for me? Or am I better off to create a statement handler that runs it async and returns values accordingly.

  • Is it even a good idea to make a "StatementHandler" class?
eternal oxide
#

Queries run Sync will lag the server

#

without fail

quaint mantle
#

Of course, and I know that - I love to run it async, I just don't want everything related to the DB to just be async tasks though

#

I'd rather make 1 class for database getters/setters with the tasks there.. than in DBReports and DBUsers

eternal oxide
#

use CompletableFutures with a consumer

quaint mantle
#

Ok, I'll look for some tutorials on that - I've seen that a few times now, so yeah

#

I'll have to ask, would that allow me to make 1 central class for DB statements?

eternal oxide
#

yes, you shoudl have one point of access to yoru db

quaint mantle
#

I do, don't worry.. thank you

#

I'll make another thread here in a few when I test out some CompletableFuture stuff, to ensure it is correct and will work properly.

#

How do you mean

ornate zinc
#

how can i set a mob dropped XP 😐 yes im dumb

quaint mantle
#

MySQL CompletableFuture help

#

I believe so, yes

#

throw (your Error);

#

@quaint mantle

ornate zinc
quaint mantle
#

EntityDeathEvent

#

Entity

#

LivingEntity

ornate zinc
quaint mantle
#

I'm still not sure about how to correctly use CompletableFuture, the examples I've seen don't return anything... but rather do something, like message a player, etc.

I'm trying to get values

eternal oxide
#

You can;t get data real time

#

you have to plan ahead, cache ti or run code to use it once it is retrieved

quaint mantle
#

I'm aware of that, it's just that everything I need to obtain would need to be stored somehow, locally- by class (in my case, NPlayer)

#

I'm really not even sure where to start

eternal oxide
#

You load the data in the async pre login event. Then while the player is online you keep that data in memory, if you make changes you push that (async) back to the db, then drop the data when they quit.

granite burrow
#

does anyone know about the spigot api (api.spigotmc.org)
https://github.com/SpigotMC/XenforoResourceManagerAPI

I don't know if this is the right channel to ask, however, I have a question regarding it. On the site for one of the examples I see it returns json however when I test it I get plain text along with a 1020 error (im using this for a discord bot) anyone know what the issue could be. The link im testing from is https://api.spigotmc.org/simple/0.2/index.php?action=listResources&category=4&page=2

code I followed for this is from the discord.js website. I just changed the url to be the one above
https:// discordjs.guide/additional-info/rest-api.html#retrieving-the-json-response-from-a-request

GitHub

Exposes resource/author information via a simple JSON REST API - GitHub - SpigotMC/XenforoResourceManagerAPI: Exposes resource/author information via a simple JSON REST API

eternal oxide
#

what plain text are you seeing? Its valid json to me

#

and did you enable redirection in your web request?

#

Code I use java HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(5000); conn.setInstanceFollowRedirects(true); conn.addRequestProperty("User-Agent", "Mozilla/4.0"); conn.setDoOutput(false);

robust pike
#

Any suggestions why this isn't working.

` public static void addReport(Player player, String reported, String reason) {

    Connection con = null;
    try {
        con = Main.hikari.getConnection();

        if (con == null) {
            player.sendMessage("§cAn error occured accessing Hikari.");
            return;
        }
        PreparedStatement ps = Main.hikari.getConnection().prepareStatement(
                "insert into playerReports(reportUUID, reporterUUID, reportedUUID, reportedReason, reportOpened) values (?, ?, ?, ?, ?)");
        ps.setString(1, UUID.randomUUID().toString());

        ps.setString(2, User.getUUID(player.getName().toString()));
        ps.setString(3, User.getUUID(reported));
        ps.setString(4, reason);
        ps.setLong(5, System.currentTimeMillis());

        ps.execute();



    } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        Bukkit.broadcastMessage("§cAn error occured: " + e.getMessage());
    }
}

`

When I run the command that runs this method, server just crashes.

#

nvm i'm an idiot.

quaint mantle
#

I.e; private int SHARDS remains 0.. despite me having > 1000 shards and the statement executing

eternal oxide
#

sysout is yoru friend when debugging

quaint mantle
#

It just never updated locally

eternal oxide
#

Thats an issue with yoru code then

drowsy helm
#

the server is essentially pausing the main thread to connect and execute your statement

#

so it's hanging for a few ms

quaint mantle
#

The prepared statements ran, everything ran --- the private int/boolean/String were never updated though

eternal oxide
#

what is your SHARDS field?

quaint mantle
#

Is it because it's private.. but then why wouldn't it be highlighted and/or throwing an error?

drowsy helm
#

why is it all caps lmao

quaint mantle
#

That's not the question I asked, @drowsy helm

fathom tide
eternal oxide
#

do you really store then as int(1)?

#

ther shoudl be an Id

#

like getInt("SHARDS")

quaint mantle
#

Worked properly.. being thrown around very lightly

eternal oxide
#

what is the field name in teh db for shards?

#

column

quaint mantle
eternal oxide
#

then you shoudl be doing SHARDS = RESULTS.getInt("SHARDS");

quaint mantle
eternal oxide
#

getInt(3) will simply try to set null, but as SHARDS is an int it will do nothing

quaint mantle
#

Maybe not throwing an error per-sé, but it is odd it won't work with the specified column number

eternal oxide
#

getInt(3) should get you a result, but using column indexes is not a good idea

#

always use column names

#

you could also sysout the value your result has, so you can see what data is returning

quaint mantle
#

These are good ideas, I'm fixing a lot of stuff with my database right now (code-wise), so I'll post an update on using column labels =)

#

Yeah no it still didn't set the values, I'll output data now

#

I did get this error though? @eternal oxide

near night
#

soo i have a config ```yaml
api:
player:
var: UUID
Logins:
First: blah blah
Last: blah blah

and i dont know how to iterate over the lists coz players can add mor lists in the lists
eternal oxide
#

how many async tasks are you executing?

quaint mantle
eternal oxide
#

not enough memory set for your server?

quaint mantle
#

I feel like 8GB should be good?

eternal oxide
#

yep

quaint mantle
#

I'm not sure what's causing this then, I'm quite upset about this

#

I'm about to start crying and rethinking life choices

#

But seriously, I'm really not too sure anymore --- I'm not sure why stuff like this never seems to work like on the tutorials 😳

near night
coral oyster
drowsy helm
#

use pdc ids its more robust

quaint mantle
#

Or .isSimilar()?

coral oyster
quaint mantle
# eternal oxide yep

I've began printing out information.. yeah the data is there, it prints into .log, but why aren't the variables being set?

drowsy helm
#

yeah or isSimilar but you have to keep a copy of the item

eternal oxide
#

wrong instance of the class?

quaint mantle
eternal oxide
#

I'm just spit-balling things which could cause it, I don;t know your code so it's pure guesswork.

quaint mantle
#

This is my new code, nothing huge has changed..?

drowsy helm
#

have you tried not using scheduler

#

and just java threads

quaint mantle
coral oyster
drowsy helm
drowsy helm
#

keep a copy of the itemstack

drowsy helm
quaint mantle
eternal oxide
quaint mantle
#

I'll look at both how to make a java thread, and spigot thread

drowsy helm
#

it's pretty simple

#

the bukkit async runnable is just a wrapper for this

quaint mantle
drowsy helm
#

It's a shot in the dark not too sure why you're getting the issue

#

dont worry about using it alongside spigot

quaint mantle
drowsy helm
#

yeah db can be a pain sometimes

quaint mantle
#

Should I place this in onEnable()? Is it safer if I make a new Thread class instead?

drowsy helm
#

yeah that works fine

quaint mantle
#

So... would this be or do anything? Or rather should I make multiple threads (which seems risky) for each statement?

#

I'm not sure if run or start are the same thing

drowsy helm
#

yeah thats fine but you have to make sure what you're doing is threadsafe

#

use start

quaint mantle
#

Yes, no Bukkit API

drowsy helm
#

start actually executes it on another thread

quaint mantle
drowsy helm
#

nah

quaint mantle
#

Okay

drowsy helm
#

just run

quaint mantle
#

Okay, so in run() would I place my getters for the database?

drowsy helm
#

yeah

quaint mantle
#

I'm a tad lost, and I'm not sure where

drowsy helm
#

you should be able to copy paste everything over

quaint mantle
#

In that case, I should make a private UUID variable?

drowsy helm
#

for what?

quaint mantle
#

Getting a user's information

drowsy helm
#

depends how you want to structure it

#

you could just pass the entire class in and set them

quaint mantle
#

Expand on that

drowsy helm
#

or just make a thread in update_or_load method

quaint mantle
#

Perhaps, I just fear of making up to 45 threads (nearly) at once

#

(45 Max players on my server)

#

Unless that doesn't matter

#

Obviously I'm not an expert on Threads and databases

drowsy helm
#

well you're not doing it all at once right

#

only when they update or load

quaint mantle
#

It shouldn't be all at once, not after I complete my updates to userinfo

drowsy helm
#

well think about it this way

quaint mantle
#

Which I should do right now

drowsy helm
#

would you rather queue 45 db requests on the same thread and have to wait for them to finish one after another

#

or do them all at the same time

quaint mantle
#

Do them all at the same time

drowsy helm
#

threads are relatively safe anyway

#

the worst that can happen is you crash the server

#

cant crash the machine like c++

quaint mantle
#

XD? In that case, I have a class for local player data (last chat message, last chat time, etc.) NPlayer, should I store the updated values there, and then when they quit - store that to the database?

#

That sounds like the thing that everyone has been telling me, I just haven't found a way to put it to text

drowsy helm
#

yeah thats how most people do it

quaint mantle
#

🤦‍♂️

#

Excellent

drowsy helm
#

then once you get the hang of that try ORM

#

makes your life super easy

quaint mantle
drowsy helm
#

object relational mapping

#

basically i can pass in any object, and it saves all it's variables dynamically

#

without having to manually define each variable

quaint mantle
# drowsy helm object relational mapping

Question,

I store NPlayer's in a hashmap by UUID --- so the new NPlayer(uuid) is only called ONCE.

If that's the case, should I request user info when it's called?

#

I didn't want to reply to that message but regardless

#

And yes, that sounds like very nice

drowsy helm
#

wdym by that?

#

like load from db each tiem you want info?

quaint mantle
#

Load from the DB whenever a new NPlayer(uuid) is created

#

The constructor is only called once per player when they login

drowsy helm
#

oh yeah

#

yeah thats how i do it

quaint mantle
#

Okay cool deal

drowsy helm
#

then save it every so often, and when player leaves

quaint mantle
#

Okay, so make a runnable for..... 60 seconds? To save data if data doesn't match?

drowsy helm
#

just save data

#

dont have to check if it doesnt match

#

it's computationally cheaper to just save blindly

quaint mantle
#

Ahh

quaint mantle
drowsy helm
#

allowed?

#

what wouldnt be allowed

quaint mantle
#

If they are kicked

#

Etc

drowsy helm
#

i mean if you really want to optimise ig

#

seems like a very edgecase scenario

desert frigate
#

how can i remove the death message thingy? basically they dont get the option to "respawn" or "main menu".

ive tried player.spigot().respawn but it doesnt work cause it gets called before the player dies

drowsy helm
#

like instant respawn?

desert frigate
#

ytes

#

exactly

#

ive thought about using eneityDamage event instead

quaint mantle
#

Well, there is a gamerule for it in newer versions of the game

desert frigate
#

oh whats the gamerule

drowsy helm
#

just cancel the EntityDeathEvent

#

set their health to max

#

and tp to spawn

#

oh might be a gamerule idk

desert frigate
#

thats smart-

quaint mantle
#

I think its something like ALLOW_INSTANT_RESPAWN

#

DO_IMMEDIATE_RESPAWN

desert frigate
#

/gamerule doImmediateRespawn

#

found it

#

thanks

lime moat
drowsy helm
#

because "rsp" is null

#

are you depending on the plugins

#

because that will effect initialization order

lime moat
#

I am depending on Vault. depend: [Vault] in my plugin.yml

#

I just don't understand why it's happening. It's quite bizarre.

lime moat
#

I see, but I have no economy hook into it?

quaint mantle
#

k well you still need a chat plugin

#

and a permissions plugin

lime moat
#

I'll get those two, one moment

quaint mantle
#

if you're gonna be accessing these services you need something which implements all the api

lime moat
#

What's the difference between vault's permission hook and something like if (player.hasPermission("xo.texturepack.other")) {?

quaint mantle
#

no idea

lime moat
#

Okay, so that fixed it, however, I'm back to a weird question...

eternal oxide
#

vault will query the permission plugin via its API. Player.has() checks teh current players permission

#

always use Player.has over Vault permission unless you want perms for a different world

lime moat
#

I've tried a few things, such as making the priority the Highest.

#

... alternatively, how would I just get the prefix from Luckperms as I've been trying this for hours and I really have nothing else to try.

eternal oxide
#

listen on Monitor

lime moat
#

Could you explain that a bit further, please?

eternal oxide
#

or delay your sendMessage

#

Monitor level for teh event Listener. It runs last of all

#

you want to process the event as the last plugin

lime moat
#

Hm, is there any documentations on how to Monitor level it?

#

I've never done that before.

eternal oxide
lime moat
#

@EventHandler(priority = EventPriority.MONITOR) just like so?

#

That didn't work either

#

How would I just delay the message?

#

@EventHandler(priority = EventPriority.HIGHEST) I also tried this.

#

and lowest... and everything in between.

quaint mantle
#

What exactly does "MONITOR" mean,, what does monitoring an event mean, how it different from just normal

compact haven
#

the priority is when the listener is called

#

lowest -> low -> normal -> high -> highest -> monitor

#

so while lowest is called as such, it’s technically the first one to have control over the event

#

however, monitor, being the last one, has the final state of the event for logging

#

Listeners with monitor priority should not set any variables in the event or cancel it, only read and log using them

quaint mantle
#

I see then, interesting

#

Thank you

lime moat
#

I'm just going to try to delay it. I have this in my JoinEvent.class java @EventHandler(priority = EventPriority.HIGHEST) public void onJoin(PlayerJoinEvent event) { Player player = event.getPlayer(); String join_message = main.getConfig().getString("join-message"); for (Player e : Bukkit.getOnlinePlayers()) { e.sendMessage(MiniMessage.miniMessage().deserialize(join_message, Placeholder.component("player", player.displayName()))); } // Give the player the resource pack prompt player.setResourcePack("https://www.dropbox.com/s/rieh4n8tvkjh1gw/dd.zip?dl=1"); }

#

In my main.java, I have this: ```java
private void joinEventStuff() {
// Wait on the join event
getServer().getScheduler().runTaskLater(this, () -> {

    }, 1 * 20L);
}```
#

How would I make it delay the onJoin event?

vocal cloud
#

Wait why are you sending a join message to all online players? Does broadcast not work?

lime moat
#

How would I broadcast?

vocal cloud
#

Bukkit.broadcastmessage or whatever it is

lime moat
#

That also sends to console it seems, so I'm going to stick with my way as I think it's better?

vocal cloud
#

it does indeed send to console

lime moat
#

I've just been told multiple times that I should delay the message as the player.displayName() doesn't get the prefix in the join event, but it does in my commands.

vocal cloud
#

Well if it works don't fix it

lime moat
#

I do gotta fix it, I need the prefix.

vocal cloud
#

The scheduler should work, does a delay of 1s not work?

lime moat
#

Just not sure what to put inside the scheduler.

vocal cloud
#

Well, if the player.displayName() needs to be in there put that

lime moat
#

Heh, so I've never really used stuff like this, how would I get player from the joinevent and put it in there

vocal cloud
#
        getServer().getScheduler().runTaskLater(this, () -> {
          for loop here or w/e you need
        }, 1 * 20L);
lime moat
#

Oh, so I put the whole event in there basically?

vocal cloud
#

Yeah, whatever needs to be delayed

lime moat
#
    private void joinEventStuff() {
        // Wait on the join event
        getServer().getScheduler().runTaskLater(this, () -> {
            public void onJoin(PlayerJoinEvent event) {
                Player player = event.getPlayer();
                String join_message = getConfig().getString("join-message");
                for (Player e : Bukkit.getOnlinePlayers()) {
                    e.sendMessage(MiniMessage.miniMessage().deserialize(join_message, Placeholder.component("player", player.displayName())));
                }
                // Give the player the resource pack prompt
                player.setResourcePack("https://www.dropbox.com/s/rieh4n8tvkjh1gw/dd.zip?dl=1");
            }
        }, 20L);
    }``` Like this? 😂
vocal cloud
#

try it and see. Probably don't need the set resource pack in there. Remember only put in there what needs to be run later

lime moat
#

Cannot resolve symbol 'event'

vocal cloud
#

oh jeez

lime moat
#

😂, it's probably horribly wrong

vocal cloud
#

Yes yes it is

lime moat
#

What shall I do differently (I've never done this before as you can tell)

vocal cloud
#

Well besides learning java your scheduler needs to be inside the event not the event inside the scheduler. You can use it inside of it

lime moat
#

How would I getServer().getScheduler().runTaskLater(this, () -> {?

drowsy helm
#

what are you trying to do

lime moat
#

Basically make my whole join event delayed a second so that the prefix actually appears :P

drowsy helm
#

what prefix?

quaint mantle
#

@lime moat are you using Paper's API?

drowsy helm
#

why not have a runnable inside of your event

quaint mantle
#

I couldn't help but notice that you said Player#displayName()

quaint mantle
# lime moat Indeed

So, I'd go to the Paper Discord then, unless you're receiving good help here... this is the Spigot Discord

#

Spigot and BungeeCord

drowsy helm
#

his problem isnt paper specific

quaint mantle
#

Ahhhh, nevermind carry on

quaint mantle
lime moat
#

Is it not possible like this? I feel like this way is much easier and as long as it works... it works :P

drowsy helm
#

your way logically doesnt make sense

quaint mantle
#

Forget I said anything

#

I'm tired

drowsy helm
#

so what do you mean by "prefix actually appears"

quaint mantle
#

Like where is the prefix coming from?

lime moat
#

Luckperms/Vault

#

I've tried all the priority and the monitor.

quaint mantle
#

Ok, so I assume you use LuckPerms for prefix - why not try accessing the LuckPerms & Vault API

#

And set the displayname via your plugin

#

@lime moat ?

lime moat
#

I see, is there documents on how to access the Luckperms prefix? I haven't attempted to got that far?

drowsy helm
#

Froosty you know there is a setJoinMessage method in PlayerJoinEvent

#

you dont need to send a message to all players

lime moat
#

That would still give me the same issue, however, I'll look into that

drowsy helm
#

yeah you'll have the same issue just saying its more efficient lol

quaint mantle
#

@lime moat any update?

lime moat
#

Not really, can't figure anything out.

#

Tomorrow I'll probably just look into luckperms and vault prefixes.

cobalt thorn
iron glade
#

#getBooleanValue() could really use a switch

dim palm
#

and load the messages before that

charred pollen
#

how do i get zombies not to hunt players anymore

dim palm
brave goblet
cobalt thorn
faint frost
#

I'm having a lot of trouble on something seemingly simple. Anyone care to help?

brave goblet
undone axleBOT
#

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

cobalt thorn
brave goblet
brave goblet
#

imagine lobster with boobs

faint frost
#

Well I got some code that makes a player config i.e. uuid.yml. I'm having trouble setting and getting strings in the uuid.yml.

cobalt thorn
charred pollen
faint frost
#

aight im on pc

brave goblet
#

you made the model? it's really nice

faint frost
brave goblet
iron glade
#

Main.getInstance(); 🤮

brave goblet
#

they asked for help

iron glade
#

people really don't wanna use di

chrome beacon
#

?configs

undone axleBOT
chrome beacon
#

^^ also read this

#

?di

undone axleBOT
chrome beacon
#

?main

iron glade
#
        userFile = new File(main.getDataFolder().toString()+ File.separatorChar + "PlayerConfigs" + File.separatorChar + e.getUniqueId().toString() + ".yml");```
You don't need all those .toString()
supple elk
#

Does anyone know what this is?

faint frost
#

changed the main class name

#

im still using di

#

thanks for the suggestion @iron glade

rotund pond
#

?xy

undone axleBOT
shadow zinc
#

?paste

undone axleBOT
shadow zinc
native gale
onyx fjord
#

yes you can clone it

#

you cant redistribute ig

native gale
#

I have no intention to do so, I just wanna figure out how it works in details

sturdy frigate
#

Can there be many event handlers in a single listener? ```java
public class SpawnRelocation implements Listener {
@EventHandler
private void onPlayerJoinEvent(PlayerJoinEvent e) {
}

@EventHandler
private void onPlayerChangedWorldEvent(PlayerChangedWorldEvent e) {
}```
native gale
#

Yes

#

That's the point of the Listener, you can have multiple event handlers in it

sturdy frigate
#

Is there a different way to do with just a single event handler?

lost matrix
#

But you should still use a listener class regardless

shadow zinc
#
public abstract class Command {
    ArrayList<Command> subcommands = new ArrayList<>();
    public List<Command> getSubcommands() {
        return subcommands;
    }```
#

if my abstract class is like this, does everything that extends it have its own instance of the arraylist subcommands or is it joint?

zealous osprey
#

they have their own each

ivory sleet
#

^

shadow zinc
#

nice

zealous osprey
#

if you'd make "subCommands" static then they'd share it

ivory sleet
#

thats one crucial concept of object orientation

shadow zinc
#

Yeah that makes sense

#

Any utils to register a command without the plugin.yml?

#

its for my command builder

tender shard
#

basically you just need to get the CommandMap, then you can call register() on it

#

and you can get the commandmap from the private field in SimplePluginManager (Bukkit.getPluginManager())

shadow zinc
#

Yeah that makes sense, spigot should probably make that more accessible, though it doesn't really matter

tender shard
#

yeah it wouldnt hurt to just make a getter in PluginManager

crude charm
#

How do I make mobs bigger then normal? Like making giant / tiny withers or pigs?

tender shard
#

you can't, iirc

crude charm
#

How does hypixel do it then :/

tender shard
#

can you show a screenshot?

crude charm
#

sure give me 1m

shadow zinc
#

shows a giant

crude charm
#

I wont lmfao

opal juniper
crude charm
#

Massive upside down wither

tender shard
opal juniper
#

it’s under Server i think

tender shard
#

oh yeah. weird, I'd expect it in PluginManager instead

#

paper still hasnt fixed the annotation bug 😦

crude charm
#

finally found a SS

crude charm
tender shard
#

hm good question, no idea. probably some resource pack magic and it's not actually a wither

crude charm
#

Resource pack? It's hypixel skyblock, no resource packs

tender shard
#

then I have absolutely no idea

crude charm
#

Hmm ok

glass mauve
#

how can I get a Map<String, Boolean> from this config:

enabled-commands:
  screen: true
  close: true
tender shard
#

do you actually need a map? Can't you work with the ConfigurationSection?

glass mauve
#

if I would know what that is xD

drowsy helm
#

Apparently naming it dinnerbone makes it mini

tender shard
tender shard
glass mauve
#

ok would use that

#

ty :D

tender shard
#

a configurationsection is basically like a "subconfig"

crude charm
glass mauve
#

oh ok :D

crude charm
#

or does it need to be done with commands / spigot?

#

I thought Dinnerbone was upside down

tender shard
#

okay so

#

i got it to work for certain entities

#

but not for withers

#

here's one 100 sized phantom and one 1 sized phantom (the burning one)

#

a wither always seems to be the same size

#

that's just /summon phantom ~ ~ ~ {Size:<number>}

marble copper
crude charm
#

How would I edit this with code?

crude charm
marble copper
#

Go there

crude charm
#

No

marble copper
#

And see if u can make the thing

#

Why

tender shard
drowsy helm
#

Have you tried neg numbers for wither

marble copper
crude charm
tender shard
marble copper
#

🥺

tender shard
crude charm
#

NBTEditor is good

#

Aight ill play around with what entities work and try to make something good

marble copper
#

Hi can I ask question why does my crate key nbt change sometime and don't work

#

I have nbt api