#help-development

1 messages Ā· Page 1004 of 1

slender elbow
tidal kettle
#

dafuq is CraftItemStack

#

and NBTTagCompound

#

is this in 1.20.6?

chrome beacon
#

CraftItemStack is the implementation of ItemStack

#

NBTTagCompound is the nms class for NBT

#

And no it's not 1.20.6

#

Most likely something old like 1.8

tidal kettle
#

how can i get it in 1.20.4?

#

yes

chrome beacon
#

1.20.6 still isn't the default stable version

tidal kettle
#

i think i'm gonnai wait the stable 1.20.6 version and after do the display name thing

golden ember
eternal night
#

object is not an instance of declaring class

#

you are passing the wrong instance

golden ember
#

what bro šŸ˜„

vast ledge
#

i forgor the command

eternal night
#

Share me.Hayden.LevelTools.objects.LevelTool.<init>

#

?ask

undone axleBOT
#

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

golden ember
#

i dont know how to fix it

vast ledge
#

?nocode

undone axleBOT
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

vast ledge
#

There

eternal night
#

ah

eternal night
golden ember
#

oh this is plugin code

eternal night
#

This is a channel for plugin developers having trouble KEKW

golden ember
#

oh sorry bro...

vast ledge
#

Last commit was 1y ago

#

What version are you trying to use

golden ember
#

1.20

eternal night
#

plain 1.20?

vast ledge
#

1.20.?

#

The latest commit says added 1.20 support

golden ember
#

yes

vast ledge
#

Fun fact, that doesnt include 1.20.6, 1.20.5 or any of those

golden ember
#

maybe why my server its 1.20.4

vast ledge
#

1.20.4 isnt 1.20 thats why

tawdry echo
#

I want to create daily and weekly player kills tops and idk how do this, I mean reset at every day and week

vast ledge
#

Save starting time stamp in system nano

river oracle
vast ledge
#

Why not

#

you could use millis aswell

river oracle
#

Use Unix time

vast ledge
#

true

#

@golden ember Is this your Plugin?

vast ledge
tawdry echo
golden ember
vast ledge
river oracle
vast ledge
golden ember
vast ledge
#

Where are you going to check if you can code?

golden ember
#

I don't know

vast ledge
#

Do you know Java, the programming language, that is commonly used, when developing with the spigot/bukkit api?

golden ember
#

no

vast ledge
#

Then you can hope that theres a newer version, this channel, is for users, that are having a problem, with there code, and want to fix it!

golden ember
#

okey bro chill

#

dont wory be hapy

vast ledge
#

?

golden ember
#

nah

#

didnt

blazing ocean
#

what

slender elbow
#

their* šŸ¤“

hollow vessel
#

how can I change item's durability in 1.19.3?

carmine mica
#

not a good way. YOu just have to track it yourself pretty much in the PDC

gaunt vapor
fluid cypress
#

i created a vault economy provider, bc i want to be able to add details to transactions. im checking the stack trace to get info about it, like what plugin did it, what command, etc. but, since im the author, i want to be able to extend it for my own plugins that also use the server economy, so i dont have to check the stack trace for my own plugins. so i need a way to communicate between two of my own plugins, but, without interfering with its economy provider ability, meaning, without modifying the withdraw or deposit methods with a details parameter or something

#

im not a java developer so i have no idea whats the proper way of doing that, i guess getting the plugin by name and then calling methods on it is not the best way, right?

chrome beacon
quaint mantle
fluid cypress
#

i mean, i wont modify quickshop, plotsquared, and all of those plugins, just to add details to when they use the economy provider, i will do some weird stuff with the stack trace and thats it. but, for my own plugins that use the economy, i would like to be able to optionally call some method in the provider to give more details or something

#

and im guessing there is a better way than this, but im not a java developer so i have no idea tbh

if (Bukkit.getPluginManager().getPlugin("MyProvider") != null) {
    Bukkit.getPluginManager().getPlugin("MyProvider").setupDetails("i will do something something")
    provider.withdraw(x)
}
#

idek if that would work tho

quaint mantle
#

There’s no way. Plug-ins should have their hook for custom economy

#

In vault you can’t really track which plugin doing the transaction

fluid cypress
#

well thats what im trying to solve, i already have a way of doing it by checking the call stack trace for all existing plugins, but i wanna do it the proper way with my own plugins

charred blaze
#

does the Bukkit.getEntity(uuid) load the chunk the entity is in?

young knoll
#

no

#

it has to be loaded

patent coyote
#

how can i check when the player does a command and the command failed or they didnt have perms

#

and not just for commands in my own plugin but when commands for other plugins also dont work

hushed scaffold
gaunt vapor
gaunt vapor
teal oracle
#

how do i detect block right clicks?

#

is it the action event?

#

or maybe player interact event

remote swallow
#

player interact event

teal oracle
#

thanks

inner mulch
#

is there a way to make a nametag grayish dark, like when a player sneaks?

teal oracle
#

is this the correct way of doing it?

public void playerClick(PlayerInteractEvent e) {
        if (e.getMaterial() == Material.NETHER_STAR) {

        }
inner mulch
#

did you register it?

teal oracle
#

what does that mean

inner mulch
#

you need to register your listeners

#

for them to be called

teal oracle
#

oh yes i did

inner mulch
#

okay

patent coyote
royal heath
#

Should I dependency inject my plugin instance or make it a singleton? I ask because I have a singleton storage class that stores references to objects needed throughout the program, and its messy to dependency inject into a singleton

#

I ask because I've been using it as a singleton and tons of people on the forums say to inject it

young knoll
#

Neither is necessarily ā€œmore correctā€ but you will find some people that are die hards against having it as a singleton

royal heath
#

Ah okay. I just find it makes the code more messy, especially if you're dealing with another singleton already

#

I could inject my storage class, but I'd like to prevent the ability to make a new instance of the storage class

worthy yarrow
#

The reason for people arguing against your main being a singleton is because iirc bukkit offers a static method of getting your main instance

#

Bukkit#getPlugin(plugin.class) ith if my brain is braining right now

royal heath
#

Right, but I remember having issues with that in the past. I can't exactly remember why as it was well over 4 years ago but I haven't ran into it since because I have been using singleton method since

worthy yarrow
#

It kinda depends on your impl as well, I personally only put startup functions in the main

royal heath
#

I haven't touched spigot as well since about 2021 so I'm still a little rusty on it

worthy yarrow
#

If I had to guess those issues came from premature initialization of some class before the main was actually loaded

royal heath
#

That makes sense. I'll see about using getPlugin, however getInstance looks a lot cleaner than the big Bukkit#getPluginManager(plugin.class) way

young knoll
#

Yeah iirc that also might involve some stacktrace jank

#

Not sure I’ve not looked at the impl

royal heath
#

How would you recommend getting instances of a Bots storage class?

In my plugin I instantiate bots from the config yml, and then store it in a class to manage them. I use it as a singleton. I could dependency inject, but it allows people to make new instances of the bots class

worthy yarrow
#

The only reason I use Bukkit.getPlugin is to define a constant of the main for whatever class I need it in otherwise di imo is just simpler

royal heath
#

I would like to use DI, and I could use it if I also DI the bots class, but I'm not sure if I want to use the bots storage class as a singleton or not

worthy yarrow
#

I’d need more context to give an opinion on that tbf

#

Is bots a rather globally used class?

royal heath
#

Well, it's used in main, an event handler, and a command handler to close and open the pools, as well as reload them. This kinda points me towards utilizing dependency injection, however I'd like to avoid making new instances of the Bots class for obvious reasons

#

I know I could still use bots as a singleton but in implementation it is gross because I'd need to lazy initialize it and pass in the plugin class into the getInstance

worthy yarrow
#

It is possible to only ever have a single instance of said class with di, however the structure has to be solid and initialization has to be precise

worthy yarrow
royal heath
#

Yeah I agree. I guess its not the end of the world if its possible to make a new Bots() class anyways.

worthy yarrow
#

Coming from my Java bible ā€œno impl should be considered ā€œgoodā€ until it’s been rewritten a couple timesā€

#

That’s just to say in the experimentation, you’ll start to find / see different and possibly better approaches

royal heath
#

I like that "proverb"

worthy yarrow
#

You want the actual quote?

royal heath
#

Lol sure

slender elbow
#

di and singleton aren't mutually exclusive patterns

#

but people too often mix and confuse singleton with statically accessible

worthy yarrow
worthy yarrow
slender elbow
#

I'm saying singleton and di can be used together perfectly fine

#

without any kind of static getter

worthy yarrow
#

Sure, but in relation to your main being a singleton

slender elbow
#

your plugin is already a singleton, and that's nothing to do with the getter spigot offers you

royal heath
#

Which from my interpretation was the use of a singleton

worthy yarrow
#

Extends javaPlugin induces the fact it’s a singleton correct?

young knoll
#

21 is the version the game uses and is also LTS

#

So it’s best to stick with

broken nacelle
royal heath
slender elbow
#

and that instance is created by the server

worthy yarrow
#

Idek I ish I had a spigot api book 😦

slender elbow
#

the server injects stuff like the respective Server instance

worthy yarrow
#

I’ve had 3 flights today man I’m tired

worthy yarrow
royal heath
#

Ha no worries I feel ya. I fly for work across the country and it wears you down

worthy yarrow
#

Well when it’s a triple connecting flight to get to your destination… that shit sucks lol

royal heath
#

Lol yep, thats almost always the case for me

#

sitting in airport for 2 hrs

royal heath
#

huh?

worthy yarrow
#

Travel jobs man, my father used to make about 250k miles a year and that’s not even like bad

slender elbow
#

that's crazy

#

mentally draining

royal heath
#

It's usually just for meetings. It sucks lol bc it could be an email, but its also cool because you get to leave where you live for a bit to a lot nicer place

#

Usually for team building

worthy yarrow
#

Yeah you definitely get the benefit of traveling… but there is quite a cost to doing so as often as most people in that position do

royal heath
#

I also have to front it which sucks

#

and expense it

worthy yarrow
#

Eeeeeeeeek really?

royal heath
#

Yeah lol, credit card helps for that though

worthy yarrow
#

At least they reimburse ya but still for mandatory meetings as most of them are, company should be taking those expenses

royal heath
#

I agree lol.

#

Atleast I get free credit card rewards

#

Don't gotta spend a penny

worthy yarrow
#

It was odd, for my fathers work they had him pay for local trips, but paid for international ones

worthy yarrow
#

(Hopefully)

royal heath
#

Yes lol

worthy yarrow
#

Ofc

#

Just odd how they finance the international trips and not domestic

eternal oxide
# patent coyote .

You can't. The best you can do is check if the command is valid and they have permissions to use it.

royal heath
patent coyote
#

how do i check if its valid?

north jetty
#

there lib for detect hold right click?

eternal oxide
patent coyote
#

how do do that

worthy yarrow
#

If (sender != null)

eternal oxide
#

I have a feeling we are in an xy situation here

patent coyote
#

?

worthy yarrow
#

Probably

#

?xy

undone axleBOT
eternal oxide
#

Why do you want to know if a command ran?

patent coyote
#

I want to log every command ran

#

but i dont wanna keep track of commands that dont exist

worthy yarrow
#

Well you can’t keep track of something that doesn’t exist so

patent coyote
#

0-0

worthy yarrow
#

If it does exist then log the usage otherwise there’s no issue

patent coyote
#

im confused?

#

if i do a command like /afauijfbaoijbf obiosly noty a command

#

it still gets logged

worthy yarrow
#

Right

#

Mmm we prolly need some code then

eternal oxide
#

pass the command (no args) in here and see if you get a command back or null.

patent coyote
# worthy yarrow Mmm we prolly need some code then
@EventHandler
    public void onPlayerCommand(@Nonnull PlayerCommandPreprocessEvent event) {
        String playerName = event.getPlayer().getName();
        String command = event.getMessage();
        String timestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
        sendEmbeddedMessage(playerName, command, timestamp);
    }```
#

im logging the commands in a discord server

#

using a discord bot thats included in the plugin

#

lol isnt a command

eternal oxide
#

getMessage, split the command then if (Bukkit.getPluginCommand(command) != null) logMessage

worthy yarrow
#

Elgarl just faster than I

patent coyote
#

ok why does the /msg not work?

eternal oxide
#

msg is a base command, not a plugin

patent coyote
#

ah right

#

how do i tack it for base commands aswell

#

wait

#

can i get what plaugin the command is from

#

cuz thats would be pretty cool

eternal oxide
#

it should be in the returnd command

patent coyote
#

?

eternal oxide
#

has a getPlugin() method

patent coyote
#

ok but hoe do i also check if the command is from minecraft instead of jus plugin commands

#

omg

#

my spelling

#

0-0

eternal oxide
#

not as simple to process though

patent coyote
#

seriously no method to just get minecraft commands?

#

intresting

young knoll
#

You could make a list of them

#

Obviously not ideal tho

patent coyote
#

hmm

ember dew
#

How do people typically develop recipes that allow the items to be swapped out for others(in 1.8), for example, if a recipe has a diamond, coal, and iron, allow the coal to be swapped out for a second iron

#

I understand it's not possible through a recipe, but how would you get around this using a crafting table

royal heath
#

Can't you just make two recipes

ember dew
#

The problem is, I don't have to have hundreds of recipes for larger combos

royal heath
#

What if you make a wrapper for the recipes

#

well, I guess it still runs into the same issue

#

Actually make a class that internally has shapedrecipe, then maybe pass in an array of recipe shapes?

ember dew
#

I just don't think using the vanilla recipe manager would be worth the effort

#

But I'm clueless on where to go to next

royal heath
#

for example, you could do

recipes = new MultipleRecipe([['I','C','I'], ['I','I','I']], item));
recipes.addRecipes();

or something along those lines

ember dew
#

But this would still be adding a lot of recipes, in theory

royal heath
#

Yeah, however you wouldn't have to write out the create recipe logic more than once

ember dew
#

Well yeah

#

There's a collections library that does something like this

#

I tried checking for click events, checking for items in the crafting matrix, and setting the the output, but it causes an invisible output and didn't set the output until the player interacted with the inventory once more

young knoll
#

Have you tried using updateInventory

ember dew
#

That causes a visible flash

#

Hypixel does this exact thing, perfectly

royal heath
#

Ah yeah. You honestly could do it this way too it will be a little messier though:

recipes = new MultipleRecipe(['I/C','I/D/G','I/C'], item));
recipes.addRecipes();

You'd have to map each character to a material though

ember dew
#

And I doubt they're creating hundreds of recipes

ember dew
royal heath
#

It would be easier for mkaing recipe where maybe you could use a wood plank instead of a log

ember dew
#

Currently, I'm doing 5 items

royal heath
#
recipes = new MultipleRecipe(['I','P/L','I'], item));
recipes.addRecipes();

so like Iron, Plank/Log, Iron

ember dew
#

So it's messy

royal heath
#

Ah yeah. I'm not too sure then, this is the only way I could think of.

#

No, I meant make it yourself

#

you'd just iterate through the array

ember dew
#

Thought I overlooked something

royal heath
#

Ah no haha

ember dew
#

Got excited

royal heath
#

Lmaoo, didn't mean to get your hopes up

ember dew
#

I hate working on 1.8

royal heath
#

wait does this work on >1.8?

ember dew
#

I'm pretty sure there's a class for something like this

#

or method

#

Idk

young knoll
#

Where does hypixel have a ton of recipes with swappable items

ember dew
#

I'd have to check to be certain, I just remember one rn

#

I'm referring to UHC in specific

young knoll
#

Hmm

#

It’s been so long I don’t remember anything about uhc

royal heath
#

My way with the slashes is probably the better way at it, however you could run into issues where you want it to be coal iron coal, diamond diamond coal or diamond diamond diamond but not coal diamond diamond

ember dew
#

mhm

#

Also, modern versions have the RecipeChoice class

#

šŸ™

royal heath
#

lol wtf

ember dew
#

Huh?

royal heath
#

nvm thats the interface

ember dew
#

Oh

royal heath
#

I think ExactChoice is just for using itemstacks in your inventory

#

It's an interesting idea, maybe tomorrow I might see if I can rip something up and make a library or something

#

However, might I ask why you are using 1.8?

ember dew
#

For a friend

#

I love 1.8, just not for development

buoyant viper
#

sorry had to do a two parter bc none of the gifs have the full interaction

royal heath
#

hahaha

ember dew
#

lmfao

royal heath
#

I might see if I can rip something up and make it cross version platform. It seems like a good problem to solve

ember dew
#

I wonder if there's downsides of implementing a few thousand recipes

royal heath
#

MC has more than 1000 recipes if I recall

#

Yeah online all they say is to use multiple recipes

hybrid seal
#

So need some help here. First time plugin developing, I figured out how to set up the package structure, but not the code. I'm set up in plugin.yml to call main: com.gmail.nikitis.maximumbuildheight.maximumbuildheight

However, I have no code in the trailing maximumbuildheight class, but it's in my BlockPlaceListener class, but if I call that in plugin.yml main: It complains that I don't have "extends JavaPlugin" in the class line for BlockPlaceListener. How do I fix this? Code below:

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
public final class maximumbuildheight extends JavaPlugin {

}

public class BlockPlaceListener implements Listener {

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent event) {
        double maxY = 256.0; // Set your desired Y-coordinate threshold here

        if (event.getBlock().getLocation().getY() > maxY) {
            event.setCancelled(true);
            // Optionally, you can send a message to the player:
            event.getPlayer().sendMessage("You cannot place blocks above Y " + maxY);
        }
    }
}```
ember dew
#

Or make a method for the listener in the main class, and run it from onEnable

hybrid seal
#

I'd rather keep it as clean as possible, how would I do the latter?

ember dew
hybrid seal
#

I want the plugin to load and always be on.

ember dew
#

Make a method inside of your main class for the event handler

#

Then simply run that method on plugin start

#

Which would be inside of the onEable method, which you don't currently have

hybrid seal
#

So like? ```package com.gmail.nikitis.maximumbuildheight;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
public final class maximumbuildheight extends JavaPlugin {

public class BlockPlaceListener implements Listener {

  @EventHandler
  public void onBlockPlace(BlockPlaceEvent event) {
      double maxY = 256.0; // Set your desired Y-coordinate threshold here

      if (event.getBlock().getLocation().getY() > maxY) {
          event.setCancelled(true);
          // Optionally, you can send a message to the player:
          event.getPlayer().sendMessage("You cannot place blocks above Y " + maxY);
      }
  }

}
}```

reef turret
#

since spigot 1.20.6 is compiled on java 16, is there a way of keeping a plugin backwards compatible to java 8 or should I just make to different versions; one for 1.20.6> and one for 1.20.6<

ember dew
#

Remove the inner class

#

PlacePlaceListener

hybrid seal
#

Could you format it for me?

#

I really have no clue

#

i've never seen a working example

ember dew
#

I'd recommended reading documentation, or watching a video tutorial on plugin creation

hybrid seal
#

i have

#

so many

#

they are all different

#

i need an expert here

sullen marlin
ember dew
#

I'd recommended getting the Minecraft Development extension, if you're using IntilliJ

#

It just makes starting your plugin easier

hybrid seal
#

just using eclipse and maven

#

Linux

#

I get the compiling part of it, and the .jar structure

#

I don't understand how the code is called. or the classes are called

ember dew
#
public final class PluginName extends JavaPlugin {

    @Override
    public void onEnable() {
        
    }

    @Override
    public void onDisable() {

    }
reef turret
#

the server sends you to a game instance which runs on limited resources

ember dew
#

oop

sullen marlin
#

It's called by the onEnable method and then you calling registerListeners

hybrid seal
#

So paste my blockplaceevent code in the onEnable section?

ember dew
#

The event should be outside of onEnable

#

You then call the event from onEnable

sullen marlin
#

No your code is fine you just need to register it as a listener in onEnable

ember dew
#

oh wait, it is

#

Not how I personally do it

hybrid seal
#

So like?

import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPlaceEvent;
public final class maximumbuildheight extends JavaPlugin {

  @Override
      public void onEnable() {
        public class BlockPlaceListener implements Listener {

        @EventHandler
        public void onBlockPlace(BlockPlaceEvent event) {
            double maxY = 256.0; // Set your desired Y-coordinate threshold here

            if (event.getBlock().getLocation().getY() > maxY) {
                event.setCancelled(true);
                // Optionally, you can send a message to the player:
                event.getPlayer().sendMessage("You cannot place blocks above Y " + maxY);
            }
          }
        }
      }

      @Override
      public void onDisable() {

      }
 
}```
echo basalt
#

Well no

#

?learnjava moment

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programming—great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! šŸŽ‰

hybrid seal
#

I really just want the max-build-height value for server.properties to be honored again with spigot.

glad prawn
#

it's possible but yeah no one writes like that

hybrid seal
#

i have a map that I can't allow building over height 256.

#

and when minecraft allowed 320 Y height, it seems to have broken max-build-height variable.

#

Can this be fixed in spigot?

#

I was attempting to learn to make a simple plugin to just cancel the block place event if Y is over 256, but apparently it's too complex for me

#

I feel the code is solid, but I don't know how to arrange it in classes and methods

ember dew
#

You don't have to register your main class for listners, right?

hybrid seal
#

Hell if I know

ember dew
#

I don't remember but

#
public final class Temp extends JavaPlugin implements Listener {


 @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onBlockPlace(BlockPlaceEvent event) {
        double maxY = 256.0; // Set your desired Y-coordinate threshold here

        if (event.getBlock().getLocation().getY() > maxY) {
            event.setCancelled(true);
            // Optionally, you can send a message to the player:
            event.getPlayer().sendMessage("You cannot place blocks above Y " + maxY);
        }

    }

    @Override
    public void onDisable() {

    }

}
hybrid seal
#

if that can work i'll take it

ember dew
#

I don't personally put event handlers in my main

quaint mantle
#

might want to add

 @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
    }```
ember dew
#

OH

#

Yeah

hybrid seal
#

Do i wanna change class Temp to class BlockPlaceListener?

ember dew
#

Yeah

#

My bad

#

Or whatever your main class name is

#

Which appeared to be
maximumbuildheight

glad prawn
#

your plugin name rly is BlockPlaceListener, dam-

ember dew
#

Innovation

hybrid seal
#

maximumbuildheight

ember dew
#

You can remove onDisable since you have no use for it

#

Since you wanted it "clean"

hybrid seal
#

oh snap it works!

ember dew
#

Congrats

#

You're now a plugin developer

glad prawn
reef turret
#

!!!!

hybrid seal
#

Sweet! And thanks for the example. I can learn and play around with that

#

next i'll work on adding perms for bypass.

#

but I think I can learn that from the tutorials

ember dew
#

Perms are really easy

#

Just add an if statement to the top of the event handler

if(event.getPlayer().hasPermission("maximumbuildheight.bypass")) return;
hybrid seal
#

Cool

#

I'll play around with it

ember dew
# hybrid seal Cool

But seriously, if you don't already know some java, I'd spend a few days learning

hybrid seal
#

Yeah, I learned it like back in Java 6 days, Forever ago. I haven't used it in probably 18 years

#

A lot has changed

ember dew
#

Oh shit

#

Well, welcome back!

spice burrow
#

is this correct for Player#spawnParticle()?
e.getPlayer().spawnParticle(Particle.EXPLOSION, eventLocation.getX(), eventLocation.getY(), eventLocation.getZ(), 2)

hybrid seal
#

Like my code worked first time. I just didn't know how to structure it

#

never dealt with groupid's archetypes, etc

#

The IDE is new to me

#

and I didn't know what minecraft required for jars

#

like package structuring

ember dew
spice burrow
hybrid seal
#

I used to code web pages back in the netscape days using only notepad

#

Stopped about when dreamweaver came out

spice burrow
ember dew
#

Well, you can specify x y z, it's just simpler if you just get the players location

spice burrow
#

im stupid

#

i called it after i cancelled the event šŸ˜‚

ember dew
hybrid seal
#

Well I won't tie up the dev channel with chitchat, Thanks again! I'll likely be back as I practice adding commands, and perms.

ember dew
spice burrow
spice burrow
#

i had a spelling error that wasn't showing in intellij for some reason and i spent 3 hours trying to find out what was going on

wraith delta
#

Q: I see several resources for playing specific sounds, but they are all out of date. How would you play a enum sound like cave18 in 1.20?

eternal oxide
#

playing sounds has not changed

wraith delta
#

PacketPlayOutNamedSoundEffect no longer seems to work in 1.20

eternal oxide
#

use teh API not packets

#

No point in packets for sound. Thats literally all the API does

#

Player#playSound and World#playSound

wraith delta
eternal oxide
eternal oxide
#

you will not find the MC naming there

wraith delta
eternal oxide
#

You can play any resource pack sound using its defined name

#

literally the name of the ogg files in your resource pack

wraith delta
eternal oxide
#

you shoudl not need the path

wraith delta
#

If you dont mind showing such example would be awesome. im not sure where that sound comes from besides random from AMBIENT_CAVE

eternal oxide
#

No clue I've not done anything with resource packs

#

um which sound?

wraith delta
#

ambient_cave plays cave# at random choice from 1-19. I want to play cave18

eternal oxide
#

IDE slow to open this morning

wraith delta
#

No worries. I’ve been researching for a while and everything is about 1.8 for playing sounds, which is a bit outdated

eternal oxide
#

seems I've not built remapped for 1.20.6 yet

wraith delta
#

But it may be similar in 1.20.6 idk

chrome beacon
#

yeah you really don't need nms

eternal oxide
#

yeah no, that is just a requirement of my test plugin so I can use anything šŸ˜‰

#

I don;t see any way to access individual ambient sounds though

#

Registry only gives the predefined enum values

chrome beacon
#

You can give play sound a string

#

Which should work the same way as the play sound command

#

iirc

wraith delta
#

I saw on spigot on forums someone posted how to play it with packets, that’s all I know. But it was 1.9

wraith delta
chrome beacon
#

Would probably be faster for you to try it

wraith delta
#

I’ve tested ā€œcave.ambient.cave18ā€ not working

eternal oxide
#

one sec

wraith delta
#

I don’t know if it’s the right directory, but it seems right

#

Unless I forgot to add the category or something. Maybe one of you are smarter with this and find a way

eternal oxide
#

I will in a few, but I seem to have broken my tesst plugin šŸ˜›

wraith delta
#

Ah np. Take your time. If it’s a bit then ping reply me lol

eternal oxide
#

Um, this one has me stumped

#

that makes no sense at all

ivory sleet
#

why not

eternal oxide
#

I can not use player as a variable

#

am I just not awake

#

it says player is undefined in the player. bit

ivory sleet
#

ugh yea, maybe the static analyzer is a bit goofy, did u try to just call a method on the player, like typing it all out

eternal oxide
#

yep it's not accepting it

spice burrow
#

is it preferred to use the string version of player's uuids in my db, or is it okay for them to be stored like this
Binary.createFromBase64('C0+TsPGfbl9ttGqWfULLiQ==', 3)

ivory sleet
#

hmm and you got the right java version?

wraith delta
#

It’s the same thing

eternal oxide
#

yep, one I used fo ra logn time 16 with 1.19.4

ivory sleet
#

sender is of type CommandSender tho

wraith delta
#

You could convert sender to player

eternal oxide
#

This is strange as it works as a variable to pass/use IN a method call

ivory sleet
#

that’s what elgar is doing

#

with negated pattern matching

wraith delta
#

Player player = (Player) commandSender;

eternal oxide
#

This works fine

wraith delta
#

Why do you need a item display for sound?

eternal oxide
#

ok now it magically fixed itself

#

No, this is an old test plugin I was just modifying to test sounds

#

panic avoided, the magical pixies of IDEs fixed itself

valid burrow
eternal oxide
#

yeah I restarted it and cleared caches but it just magically started working

valid burrow
#

mhm

eternal oxide
#

um, perhaps not

valid burrow
#

intellij had a lot if these recently

#

no clue what they did to it

eternal oxide
#

super wierd its not fixed, but it does not see it as a variable

pseudo hazel
eternal oxide
#

yeah, I can use it AS a variable in a method call, but can;t use it as a local variable

pseudo hazel
#

what if you use proper {} around the if

#

might be a weird parsing thing

eternal oxide
#

it would not be available outside the scope I bet

#

works in the scope of {}

pseudo hazel
#

but how, it should be the inverse

eternal oxide
#

if I change to if (sender instanceof Player player) { it works in scope

pseudo hazel
#

right

eternal oxide
#

but early exit its not seen as a local variable UNLESS being passeed as an arg

#

methodCall(player.xxx works fine, but player.xxx does not.

#

wierdest issue I've ever seen

ivory sleet
#

Maybe eclipse is just a bit goofy like that

#

Messing with you

valid burrow
#

did you set your language level in eclipse?

eternal oxide
#

um good point I believe I changed it to 21 recently when testing

#

nope, this is set to 16

#

ah well a problem for future me

wraith delta
#

17 is good

eternal oxide
#

This IDE is out of dsate so I guess it could be a bug

ivory sleet
#

does this mean you finally gonna try out intellij?

eternal oxide
#

lol no, I have other installs of Eclipse šŸ™‚

ivory sleet
#

😭

molten hearth
#

most enjoyable eclipse experience

eternal oxide
#

I did "try" Ij once. Did not like it

ivory sleet
#

really?

#

i believe there is even an eclipse theme for intellij

#

in case u wna make it look like eclipse

eternal oxide
#

I like to have multiple projects open in one view

ivory sleet
#

ah, right, intellij cant do that

wraith delta
#

eclipse is great, feels more lightweight

eternal oxide
#

um this is worrying. I just opened my MC 1.19.4 and it has a wierd server I've never accessed

chrome beacon
#

So I did a bit of research on the sound effect

#

Looks like you can't play a specific variation without a resourcepack

charred blaze
#

?bootstrap

undone axleBOT
#

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

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

wraith delta
#

with packets

chrome beacon
#

I don't think that's the case

#

also the audio id you have is wrong

#

At least for 1.20.4 which I was testing on

wraith delta
#

maybe protocollib could - last resort

eternal oxide
#

oh I broke playSound šŸ˜›

spice burrow
#

Anyone know whatever work around hypixel uses on their scoreboards to prevent the score #s from displaying?
mine vs their comparison below

dry hazel
eternal oxide
#

player.playSound(player, args[0], 1, 1); passing "AMBIENT_SOUND"

#

I guess you have to pass an invalid/valid MC sound name

#

Caused by: net.minecraft.ResourceKeyInvalidException: Non [a-z0-9/._-] character in path of location: minecraft:AMBIENT_CAVE

chrome beacon
#

same as the /playsound command

#

which I mentioned earlier

eternal oxide
#

yep I'm just not reading

wraith delta
#

they have cave18

chrome beacon
#

No

wraith delta
#

?

chrome beacon
#

That only shows one key

#

which is ambient.cave

#

You cannot target the specific cave sound

wraith delta
eternal oxide
#

no

chrome beacon
#

I already told you

#

it's not possible

#

without a resourcepack

eternal oxide
#

notice they are all under Id 7

#

no individual id

wraith delta
#

it worked, by using a string " " with 1.8 jar 😭

#

i need 1.20

eternal oxide
#

not possible

wraith delta
#

i had to test cuz i keep seeing more forums with the answer

#

works fine but not in 1.20

#

because it is a resource pack

#

can try and see what protocollib reads

eternal oxide
#

you can not go outside the protocol

#

the only variation in the protocol for playing sounds is using an id of zero. then you can pass a name

#

for resource pack sounds

smoky anchor
#

only 1.20.3 and up

quaint mantle
spice burrow
wraith delta
eternal oxide
#

no

#

um sec, seems its possible

wraith delta
#

if its gonna popup, id rather go without. kind of annoying to have those downloads.

eternal oxide
#

oh my playing a sound from a set is possible btu it's VERY difficult. It requires working out what random seed is needed to play each

#

so you would still use teh ambient.cave but you specify the seed

wraith delta
#

silly stuff. its weird they wouldnt allow simply adding cave.ambient.#

wraith delta
#

unless you mean a seed that has that location where you are running the code

eternal oxide
#

no, it's literally a weighted seed

#

sounds are loaded on the client from sounds.json

valid burrow
eternal oxide
#

the client pulls a random using the seed you pass

#

if you pass the same seed everytime you should get teh same sound of the set

wraith delta
eternal oxide
#

you have to work out what seed will play the specific sound you want

wraith delta
spice burrow
valid burrow
#

mhm

eternal oxide
wraith delta
#

its ok tho can probably mix some other sounds to make similar

eternal oxide
#

ClientboundSoundPacket

acoustic pendant
#

Hey, so i have a command manager class that uses an arraylist to register commands: ```cs
public CommandManager(NexusCore plugin) {
this.plugin = plugin;
//add subcommand
subCommands.add(new CreateCommand());
subCommands.add(new DeleteCommand());
subCommands.add(new SpawnCommand());
subCommands.add(new NexoCommand());


```cs
 else if (args.length > 0) {
                for (int i = 0; i < getSubCommands().size(); i++) {
                    if (args[0].equalsIgnoreCase(getSubCommands().get(i).getName())) {
                        getSubCommands().get(i).perform(player, args, plugin);
                    }
                }```

https://paste.md-5.net/pijafawocu.bash
#

but for some reason SpawnCommand and NexoCommand

#

when i use them, it says that they are out of bounds

rapid vigil
acoustic pendant
#

because of the if

rapid vigil
acoustic pendant
#

if I use an argument that do exist is when i get that error (only with spawn and nexo )

#

okay

eternal oxide
smoky anchor
eternal oxide
#

just says Holder<SoundEvent>

acoustic pendant
#

and that would be the problem if only the last added wasn't working

smoky anchor
#

oh ye, ignore what I said

acoustic pendant
#

np xd

rapid vigil
#

what is in line 44?

#

in your NexoCommand class

acoustic pendant
#

ooh wait

#

could be args[1]?

#

don't think so

#

yesterday was working actually

eternal oxide
rapid vigil
acoustic pendant
#

oh

#

that makes a lot of sense

#

i'm doing the args check after that

rapid vigil
#

yeah you're getting the argument without checking if it exists

acoustic pendant
#

thanks!

#

yea yea

#

just realized

rapid vigil
glad prawn
#

ill create something like maxArgs to check before doing anything to prevent missing args

acoustic pendant
#

my bad sorry

scarlet gate
#

How would I go about handling the items in regards to calling a BlockDropItemEvent?

#

I currently spawn the item entities and then pass a list of those entities into the event but I don't think this it is respecting the modifying of the list

sullen marlin
#

why are you calling the event?

sullen marlin
eternal oxide
#

Its to play a specific ambient from a set

#

not a randome one

#

Need to be able to define teh random Long

wraith delta
eternal oxide
#

I'm about to test some code

short drift
#

Since permissions can be registered from code as an alternative to registering them from plugin.yml - can the same be done with commands or is it mandatory to define the commands in plugin.yml?

dapper flower
glad prawn
#

Verified šŸ¤”

dapper flower
#

it is fighting back tho, LOL

#

I see the rank coming and getting removed and the name changing too

#

no idea what happened

glad prawn
#

at least ur verified lol

dapper flower
#

why can't i send images tho

#

couldn't verified people send images?

glad prawn
#

bruh

molten hearth
#

LMAO

#

why do i keep seeing it verify and unverify you AHAHA

glad prawn
#

yes lol

dapper flower
#

MAN I AM TELLING YOU

#

I BECAME A BLUE LIGHTBULB

molten hearth
#

you gotta make sure you upload images in the available time frame

dapper flower
#

why does this stuff happen to me

#

even if i unbind the account (idk if can do that even) i still can' load the verify channel

#

oh i can do it everywhere wait lemme test it out

glad prawn
#

rejoin this server bro

dapper flower
dapper flower
#

test

glad prawn
#

yay

dapper flower
#

fixed

glad prawn
#

šŸ¤‘šŸ¤‘

chrome beacon
chrome beacon
#

No need for packets

eternal oxide
#

yeah

dapper flower
#

still 0 idea why that happened tho lmao

echo basalt
#

Prob not

wraith delta
eternal oxide
#

Doesn;t seem to be on Player in 1.19.4

chrome beacon
#

šŸ¤·ā€ā™‚ļø could be

scarlet gate
#

So I am handling the dropping of the items

eternal oxide
#

@wraith delta what does cave18 sound like?

wraith delta
#

copied the video at the time of 18 - its for dungeon door. ima remove the embed

#

I modeled a dungeon using bdengine, and used code to grab the entities and animate it as a open/close lifting door

eternal oxide
#

ok, for older versions this seems to play it```java
long seed = 17;
float volume = 1;
float pitch = 0.5f;

        Location location = player.getLocation();
        double x = location.getX();
        double y = location.getY();
        double z = location.getZ();
        
        SoundEvent event = SoundEvent.createVariableRangeEvent(ResourceLocation.tryParse("minecraft:ambient.cave"));
        ClientboundSoundPacket packet = new ClientboundSoundPacket(Holder.direct(event) , SoundSource.AMBIENT, x, y, z, volume, pitch, seed);
        
        ServerGamePacketListenerImpl connection = ((ServerPlayer) NMSUtils.getServerPlayer(player)).connection;
        connection.send(packet);```
#

newer API has teh seed value so you don;t need nms for that

chrome beacon
#

Did you brute force the seed

eternal oxide
#

yes

wraith delta
#

CTRL+F cave18 - {"id":"minecraft:ambient/cave/cave18","seed":-4481247781671450987}

eternal oxide
#

17 works for me

wraith delta
eternal oxide
#

no idea

#

I wrote it on 1.19.4

wraith delta
#

Where did SoundEvent come from, im not seeing that in jdk17, 1.20.2

eternal oxide
#

a seed of 17 works perfectly on 1.19.4

#

its NMS

wraith delta
#

ive never used NMS. i avoided it for any risk of version complications

eternal oxide
#

then you need to use protocolLib if you can;t do nms

wraith delta
#

but wait, the api method the other guy sent, we have the seed..

eternal oxide
#

on newer spigot, yes

wraith delta
#

ah maybe not 1.20.2

wraith delta
glad prawn
#

dam

scarlet gate
smoky anchor
# wraith delta Heres the door open/close WIP using warden sound since i couldnt get the cave ye...

Small suggestions that could maybe help
You can make all the display entities ride a single display entity and move just that one -> that will make all of them move at once and the weird jump, just like the one at the end, will not happen
Since idk what 1.20.x we have teleportation interpolation too, you could probably use 1 or 2 ticks to make it a bit smoother, your video seems a bit jittery

eternal oxide
#

?nms

eternal oxide
#

that was for me to get teh currnet specialsourcce version

wraith delta
eternal oxide
#

Just to note, 17 as a seed also works on 1.20.6 as well as 1.19.4

#

I just tested it using my code and API

#

In current APIjava player.playSound(player, "minecraft:ambient.cave", SoundCategory.AMBIENT,1f, 1f, 17L);

wraith delta
smoky anchor
#

You can set how long the interpolation should last
You can either just teleport the root entity, that would hold all the entities, to the "open" position and set the interpolation to the amount of ticks you want the door opening animation
or move it bit by bit and have low amount of ticks for smooth movement, you can use different curves in this case, not only linear one

#

Also, doing anything by calling a command from code is just terrible, there has to be a better way to do that

wraith delta
wraith delta
smoky anchor
smoky anchor
wraith delta
#

i modeled the door in bdengine and used the exported command in the code, inputting the location variables that saves it to config etc

#

trying to read those entites after being spawned isnt the easiest lol

spice burrow
#

anyone here know what they're doing when it comes to logarithmic functions šŸ’€

spice burrow
# frail pilot ?

I'm working on a leveling system right now and I'm trying to understand them but I am not exactly your math professor

smoky anchor
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!

wraith delta
eternal oxide
#

yep its a new addition to the API

#

older version you will have to use ProtocolLib or NMS

spice burrow
frail pilot
#

It's derivative is 1/x

#

Which means that when you have hight value of x it increase slower

#

That's why it's quite convenient for leveling functions

spice burrow
#

interesting, ill probably try to play with desmos until i understand it.. my issue is finding xp/level conversions from said function

frail pilot
#

Well you probably have something like level=ln(XP)

#

Ln being the logarithm

#

Note that level=ln(experience) means that experience=exp(level)

#

Exp being the exponential function

spice burrow
#

hmm interesting

#

i keep forgetting log is the inverse of exp

frail pilot
#

Nothing very hard but it involves to do some maths

spice burrow
#

maths i shall attempt to do then, i could just hardcode values but what's the fun in that

lilac dagger
#

you can look at different growth rates using a graphing calculator

#

really useful stuff

short drift
#

In 2024, what are my options for displaying texts and graphics to the players?
8 years ago there was titles and chat and inventory menus .. and .. I think that was about it.

frail pilot
#

Menu can display things

#

I mean inventories

#

Resources packs can do the job

short drift
#

Well, I did mention that. There's nothing, no new techniques?

frail pilot
#

Otherwise using a map

#

Or

#

You go the hard way

#

With display entity

short drift
#

Yeah, like holograms?

frail pilot
#

Basically

#

But you might be able to do better

#

If you lock the player camera

echo basalt
#

display entities and some raycasting

frail pilot
#

And his movements

short drift
#

Do you know anything particularly impressive you could link me as an example?

frail pilot
#

You can display whatever you want

echo basalt
#

Maps and item frames

#

7smile7 once sent a gif here hold on

short drift
#

Right. But those would be stationary.

#

Unless you mean like the map UI when looking at a map.

short drift
#

Right. So basically there's nothing new and ground breaking in UI since the last time I've been meddling with MC 8 years ago.

echo basalt
#

Inventories changed a bunch

short drift
#

What's up with those?

echo basalt
#

Well

#

You can set custom backgrounds and such

short drift
#

What would that look like?

echo basalt
#

Pair that with hiding the player's inventory and you end up with some nice menus

short drift
#

Would you still be constrained to display the things in grids?

echo basalt
#

This but the inventory is hidden

echo basalt
#

Yep

short drift
#

I also saw something like this.

echo basalt
#

That's just the same principle but you change the title a bunch

short drift
#

So that's like ... resource pack + data pack + code or something?

echo basalt
#

With some packet magic

#

Resourcepack + code

short drift
#

I might look into that.

echo basalt
#

I've also managed to make individual slot background colors

short drift
#

Thank you.

echo basalt
#

You can pair that with the others to, for example, highlight / lock an item

shadow night
#

Can you draw like that

echo basalt
#

You can

#

It's really low res

shadow night
#

Make a buffered image to this type of inventory converter

echo basalt
#

(it was a poop emoji)

shadow night
eternal oxide
#

?stash

undone axleBOT
shadow night
#

Make 4 colors per slot fr fr

echo basalt
echo basalt
shadow night
spice burrow
echo basalt
quaint mantle
echo basalt
#

Ah

#

That one

#

That's 7smile7's thing but I've worked on a really similar system

#

Basically maps on invisible itemframes

#

Everything packet-based

quaint mantle
#

How do you do the overlay thing?

echo basalt
#

Do a little raycasting, modify the image

frail pilot
shadow night
quaint mantle
echo basalt
#

For height I'm pretty sure I used multiple fonts that just had different ascents

quaint mantle
echo basalt
echo basalt
#

I wrote this myself

spice burrow
acoustic pendant
#

What should i be using? I mean, what is more efficient

#

storing the name of the world or the world it self

echo basalt
#

.

acoustic pendant
lilac dagger
acoustic pendant
#

okay, i'll do that

#

thanks

royal heath
young knoll
#

Yeah

#

Just some resource pack magic

royal heath
#

I just started getting back into spigot since around 2020

#

I did not know you could do that that is very cool

young knoll
#

It says on the PR if you can see it

#

Nov 17

eternal oxide
#

really? Odd it didn;t show up in 1.20.2 for SoSparkly

#

he must just be mistaken

worldly ingot
#

aPES_RainbowHype I got 100 stars on VeinMiner on GitHub

young knoll
#

34 forks

royal heath
#

You made VeinMiner? You're a blessing to us all

young knoll
#

Now he just needs to port the client mod to all the other modloaders

#

Kek

worldly ingot
#

On the todo list!

young knoll
#

What about quilt!

eternal night
#

what about lynxloader

worldly ingot
#

is quilt different from fabric? I thought it was a fork with just some extra methods

young knoll
#

I think so

#

Isn’t that also the case with neoforge

worldly ingot
#

For now it is, yeah

#

They plan on breaking relatively soon afaik

young knoll
#

Idk if you need different metadata files for each tho

eternal night
#

Hate it when forks break away from their upstream smhduck

#

didn't quilt want to do the same tho?

young knoll
#

They really should have picked more unique names then

#

Especially neoforge

eternal night
#

Quilt is a hard fork of Fabric

#

Yea looks like it lol

molten hearth
#

they will die shortly after 😭 šŸ™

young knoll
#

Ooooh shots fired

eternal night
vast ledge
eternal night
#

Who knows, maybe I am 5Head

molten hearth
#

technically

#

the bottom part of a fork could snap from the handle

vast ledge
devout kite
#

I saw that there is a methode on player where u can show the DemoScreen, and can edit it with resource pack. My question is if u can edit the buttons on what they do?

young knoll
#

Sadly no

devout kite
#

Not eaven on invclick event?

young knoll
#

Nope, it’s not an inventory

devout kite
#

Sad 😦

orchid hinge
#

which fuction changes the name above someones head? i forgor

valid burrow
#

the name above someones head?

#

there is no such thing directly you can either use a scoreboard or armorstand

young knoll
#

(display entities better)

alpine urchin
#

next up is 200

pseudo hazel
#

well technically next up would be 101 šŸ¤“

echo basalt
lilac dagger
pseudo hazel
#

wtf are doubles

lilac dagger
#

i'd love to be able to give 0.99 stars

alpine urchin
#

i only count in hundreds

lilac dagger
#

double?

pseudo hazel
#

oh

worldly ingot
alpine urchin
#

honestly

orchid hinge
#

like these ones?

valid burrow
#

yea

#

if you do it propperlly

orchid hinge
#

im bad at doing it properly but ill try thanks

quaint mantle
pseudo hazel
#

yes you can have multiple scoreboards and display them all diffently

fathom hazel
#

Hi

quaint mantle
pseudo hazel
#

yes

#

you can only have one scoreboard (or objective i dont remember) per display at any one time

#

for example my plugin has multiple scoreboards that all use the sidebar, but only one of them can be visible at a time

warm galleon
#

hello i need help with the redprotect plugin

fair rock
#

Is there a option to run a method after all plugins got enabled?

Why?
I want to make a core plugin where i can register services and managers for some stuff like database, particle, whatever
Now im trying to learn Hibernate for work. When i have a core plugin that means i have to add the "AnnotatedClasses" to Hibernate and create then a session factory

Like:
Core enabled -> other plugins can register annotated classes to hibernate -> builds sessionfactory (After every plugin got enabled)

pseudo hazel
#

you can set your plugin priority to be lower so more plugins load before yours

#

there may be an event or something, idk

young knoll
#

ServerLoadEvent

#

Or schedule a task in onEnable

chrome beacon
#

ServerLoadEvent should work

scarlet gate
#

Is there an event that gets called when harvesting honeycomb from a beehive?

#

I assumed BlockDropItemEvent might cover it but it appears not

scarlet gate
#

Ooh

#

perfect

#

thanks

#

Doesn't seem to work for some reason

eternal oxide
#

?notworking

undone axleBOT
#

"Does not working" is a useless statement. Please describe what exactly is not working, what you expect it to do, and what actually happens. If you get any console errors, also ?paste the entire stacktrace.

scarlet gate
#

Well, it's just not triggering when I harvest the honeycomb

eternal oxide
#

?paste code for the event

undone axleBOT
scarlet gate
#

It's not even running the code, I have a breakpoint on the first line of both BlockDropItemEvent and PlayerHarvestBlockEvent, when harvesting honeycomb from a beehive neither are triggered, when harvesting a sweet berry bush both are triggered

pseudo hazel
#

did you register the event listener

tall dragon
#

well it got called when they did it on a sweet berry bush

#

so yea they did

pseudo hazel
#

oh mb

#

i cant read

tall dragon
#

i suspect the beehive just doesnt use any of those events. might just have to just InteractEvent and make your own checks

#

though it is odd that it does not call PlayerHarvestBlockEvent. i would think that it would

#

on the other hand. they can also be harvested by dispensers so that event woulnt rlly cover everything

scarlet gate
#

What gets called when using a bottle on a cauldron, could it be the same event as that? (Thinking along the lines of water in cauldrons)

tall dragon
#

well there is a CauldronLevelChangeEvent

scarlet gate
#

Ahh probably not that then haha

eternal oxide
#

if I knew how bee hives worked I'd test it

scarlet gate
#

Is there some sort of plugin that just logs to console events being triggered

eternal oxide
#

yep harvest event never fired for Beehive

short drift
#

What is the go-to method for checking whether the player has their hat layer visible or not on the player's skin?

dawn flower
#

why is the inventory name of the event inventory in InventoryOpenEvent always Crafting?

#

oh wait im dumb

pseudo hazel
#

dont compare inventory names to check if you have the right menu reference

dawn flower
#

i'm not doing that

pseudo hazel
#

okay good

#

just so you know xD

dawn flower
#

well i kinda am but if it conflicts with another inventory, it wouldnt really do anything

pseudo hazel
#

seems to be a very common mistake

#

wdym by kinda

dawn flower
#

im basically closing the player's current gui when they open another gui so it resets their mouse position to the middle but i don't want it to do that for some guis

#

like the ah gui

pseudo hazel
#

so you checking the inventory based on the name

blazing ocean
#

i genuinely don't get how people can make GUis without libs such as incendo/interfaces

#

(or, well, the kotlin version)

shadow night
#

Did you say kotlin

blazing ocean
#

bro actually stfu

shadow night
short drift
#

Anyone know anything about using ProtocolLib?

#

I can't get any packets detected.

#

Oh, wait.

#

Wrong file.

#

And registering:

    private void registerHatDetector() {
        System.out.println("CriticalFixes: Loading HatDetector.");
        var hatDetector = new HatDetector(this, protocolManager);
        protocolManager.addPacketListener(hatDetector);
    }

tardy delta
#

we still using pastebin in 2024?

short drift
#

Yes. I have lifetime pro account.

tardy delta
#

you what

short drift
#

They were selling those at one point so I jumped at the chance.

blazing ocean
short drift
#

But if anyone can tell me what I might be doing wrong with ProtocolLib, I would appreciate it.

#

Constructor runs. Whitelists run.

#

But that's it.

tardy delta
#

ngl its a piece of shit

#

ah they updated it and its even worse now

ivory sleet
blazing ocean
ivory sleet
#

whaa

worthy yarrow
#

I think he meant legit anything people confront you with?

#

Idk I’m just enjoying this view

pseudo hazel
#

number 1

worthy yarrow
#

Con check general, bet you’d like to wake up to this everyday (so would I)

pseudo hazel
ivory sleet
#

ooo

#

yea i use nms

#

best gui framework out there (not really but really)

worthy yarrow
#

Ew

pseudo hazel
#

best framework for making frameworks

#

but no(t) really

remote swallow
#

pineapple has best gui

ivory sleet