#help-development

1 messages Β· Page 1031 of 1

sour mountain
#

its just weird how this was working before though

ivory sleet
#

daily life of being a programmer

sour mountain
#

uh

#

I tried BukkitScheduler.runTask(plugin, p.openInventory(gui)); and it didnt work

#

idk what to do

#

im too dumb to figure stuff out

#

is there a tutorial on this somewhere?

sour mountain
#

nvm found answer

twilit mulch
#

Hey, is there any way to check whether a command is formatted correctly and will run without actually dispatching it? (also sorry if i dont get back to this quick, I am just about to leave my house)

real lagoon
torn shuttle
#

it's like I'm eating crazy pills, I keep getting recommended videos by youtube saying that either AI is a fad that will never have any use or that it doesn't have a use yet meanwhile I've had it doing support (and even content creation) for my plugins with an accuracy that is honestly better than the random people from my community that chime in to try to do support

#

plus it's not exactly great for programming but it's really good at finding general approaches that you might not have been aware of to solving a problem that you otherwise just didn't know about, though it's not yet so good that it can come up with sane implementations for those solutions for most non-trivial cases

young knoll
#

Being better than random people on the internet isn’t exactly a high bar

torn shuttle
#

sure but random people on the internet amounts to most advice you can get on doing most things on the internet

pseudo hazel
#

its like google but easier to narrow it down to what you are looking for

#

until you get to the details then it falls apart

torn shuttle
#

the one thing they're currently really bad at is realizing that some unknown knowledge they have can't be inferred, and I'm not 100% sure this will have a direct fix tbh

#

google somewhat tried fixing this by adding a second pass for fact checking but the results are questionable at best

pseudo hazel
#

its just a very smart person on drugs essentially

torn shuttle
#

I'd say it's more like someone who memorized an entire wikipedia article about something but they did that 3 years ago and never though about it again, so they might just be making shit up

pseudo hazel
#

oh yeah thats a better one

torn shuttle
#

"Oh yeah I definitely remember playing warcraft 2 when I was a kid, you want to know what happens in the game? Yeah so..."

rough ibex
#

and is also pressured by their boss to always give an answer and to never say 'no'

torn shuttle
#

You wouldn't say no right? πŸ˜ƒ πŸ”«

rough ibex
#

Certainly! 'Counter Strike Ultra 5 Deluxe' is a video game released by Valve in 2024...

#

Whatever you say boss

torn shuttle
#

when did the US get conquered by atlantis?

rough ibex
#

Who is the current cabinet administrator of the department of defense of Georgia, the US state?

young knoll
#

Me

grim charm
#

i dont think theres a public facing elected official over the GA dept of defense

covert phoenix
#

Hello How are? If I have a question about the JetMinions plugin, could you help me?

chrome beacon
covert phoenix
covert phoenix
elder dune
twilit mulch
real lagoon
#

Why do you need this?

zenith saddle
#

How would you make a chunk generator that raises the world by 30 blocks?

#

I have a generator that randomly gens chunks at different heights, but can not figure out how to get the the same height

prisma jolt
#

?paste

undone axleBOT
prisma jolt
wet breach
#

I am not sure how you are doing the chunk generation. But ideally you would use block populator and from there you should be able to check the height at which the blocks are going to be placed.

prisma jolt
#

here is my structure

wet breach
#

This class i have is designed to be loaded and reference maintained to it. In regards to yours not entirely sure from a glance what it is you are doing wrong but your load method or your method to return the yamlconfig can be done better by checking that the value isnt null and if it is set it

#

It was on line 70

echo basalt
#

ew

wet breach
# echo basalt ew

I know my config thing is terrible but its also like years since i touched that code base lmao

prisma jolt
#

I am just not sure why it won't save

#

Would it change if I made it a json and not yml

wet breach
#

Try using a similar if condition like mine that is outside of the try

#

Also, setup line 70 to load the config as well as a return

prisma jolt
wet breach
#

Or at least have it check its not null. My config class is ultimately setup as a singleton that loads if there isnt a reference to said class before

prisma jolt
#

Here is what I've done. I've taken your loadplayerdata and put it in my plugin gonna see if it works but highly doubt it will change

wet breach
#

If anything probably have to wait till i get home and am on pc or someone else here spots the issue lol. Currently at work using phone uwu

prisma jolt
#

I have been looking at documentation and such but no luck...

twilit mulch
prisma jolt
twilit mulch
prisma jolt
#

well does it come up in the chat?

#

what you start typing the command

twilit mulch
#

No, I'm dispatching the commands using a plugin. I'm not the one typing it

prisma jolt
simple oracle
#

Does anyone here know how to implement 1.20.5+ food properties on items?
I've been looking through the documentation and can only find 'FoodComponent'. Which I can't seem to find a way to use it directly without overriding the class initializer.

Here is an example item using the new 'food' component:

/give @p black_dye[custom_name='{"text":"Banana"}',custom_model_data=10,food={nutrition:5,saturation:5,is_meat:false,can_always_eat:false,eat_seconds:1.5,effects:[{effect:{id:"minecraft:jump_boost",amplifier:3,duration:60,show_particles:0b,show_icon:0b},probability:0.3}]}] 1

I want to apply the same properties to an ItemStack. This includes all the basic food properties (nutrition, saturation, etc) and the effects when eaten.

I appreciate anyone's help!

wet breach
wet breach
#

Nice. Glad that was what fixed it for you and glad i was able to spot the problem. uwu

blazing robin
#

Hey guys, I'm creating a cooking plugin
and I really dunno how to manage if the key is multiple.

I have to share the CookingRoomInventory instance with those keys UUID,CookingPotType,Integer

is there any better way to do this?

Below is example code.

private static CookingRoomInventoryManager instance;
    private final Map<UUID, Map<CookingPotType, Map<Integer, CookingRoomInventory>>> optimizedInventoryMap = new ConcurrentHashMap<>();

    public static CookingRoomInventoryManager getInstance() {
        if (instance == null) {
            instance = new CookingRoomInventoryManager();
        }
        return instance;
    }

    private CookingRoomInventoryManager() {
    }

    public CookingRoomInventory getInventory(UUID uuid, CookingPotType potType, int identifier) {
        return Optional.ofNullable(optimizedInventoryMap.get(uuid))
                .map(potMap -> potMap.get(potType))
                .map(idMap -> idMap.get(identifier))
                .orElse(null);
    }

    public boolean isExist(UUID uuid, CookingPotType potType, int identifier) {
        return Optional.ofNullable(optimizedInventoryMap.get(uuid))
                .map(potMap -> potMap.get(potType))
                .map(idMap -> idMap.containsKey(identifier))
                .orElse(false);
    }

    public void open(Player player, CookingPotType potType, int identifier) {
        UUID uuid = player.getUniqueId();
        optimizedInventoryMap.computeIfAbsent(uuid, k -> new ConcurrentHashMap<>())
                .computeIfAbsent(potType, k -> new ConcurrentHashMap<>())
                .computeIfAbsent(identifier, k -> new CookingRoomInventory(potType, identifier))
                .open(player);
    }

DONT MENTION BOUT MAP OF MAP OF MAP

green prism
blazing robin
wet breach
green prism
#

Yep, you can make a pojo

blazing robin
blazing robin
wet breach
#

not sure what you mean it doesn't share

green prism
# blazing robin wdym pojo?

Plain old java object example:

public class EmployeePojo {

    public String firstName;
    public String lastName;
    private LocalDate startDate;

    public EmployeePojo(String firstName, String lastName, LocalDate startDate) {
        this.firstName = firstName;
        this.lastName = lastName;
        this.startDate = startDate;
    }

    public String name() {
        return this.firstName + " " + this.lastName;
    }

    public LocalDate getStart() {
        return this.startDate;
    }
}
blazing robin
#

like when I tried to put, remove, get

green prism
#

I would use it for the values

glad prawn
blazing robin
green prism
glad prawn
#

let me read again, just entered πŸ˜”

wet breach
#

I guess you could set it up so it could be that way too

blazing robin
wet breach
#

ideally though you should try to make it so its a single key, you could I guess go with a generic map that doesn't take in a specific type for a key in which case you could assign the same value object for those keys

#

but would probably get messy from there lmao

blazing robin
wet breach
#

probably look at the issue differently. Most times its an organization problem

blazing robin
wet breach
#

well, that isn't something we can really solve for you. It is something you are going to have to learn to do. Maybe it might help if you used some brainstorming techniques so you can better understand the data you are wanting to reference. At the moment I am not entirely sure why you need multiple keys in the same map that are not the same type pointing to the same values

#

in most cases that is a bit redundant, so its best to find where then are these types share similar data and then make the references from there

blazing robin
wet breach
#

that still doesn't make sense. So each key has 3 conditions that need to be met first?

blazing robin
#

is there any way to fit 3 conditions without multiple map?

wet breach
#

ok, then what you need is two maps for this. The first map needs to be UUID and your custom object. Custom object holds the data for the conditions and the method necessary to get the value if said condition is met.

#

probably don't even need two maps for this

#

could probably just need a custom object for the value

blazing robin
wet breach
#

why can't all three of those things exist in a custom object?

#

why does each one need to have a map

blazing robin
wet breach
#

kind of but not necessarily

blazing robin
wet breach
#

I think you just might not be understanding how you can structure your classes differently so that when you create a custom object, that object contains all the elements you need it to have, and then all you need is just a list or map to store this object in

#

for instance, inheritance may solve some of this problem

#

and maybe some interfaces

blazing robin
#

should I make new class for the key?

#
import lombok.AllArgsConstructor;

import java.util.Objects;
import java.util.UUID;

@AllArgsConstructor
public class KeyObject {

    private final UUID uuid;
    private final CookingPotType potType;
    private final int identifier;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        KeyObject key = (KeyObject) o;
        return identifier == key.identifier &&
                uuid.equals(key.uuid) &&
                potType == key.potType;
    }

    @Override
    public int hashCode() {
        return Objects.hash(uuid, potType, identifier);
    }
}

How do you think this code?

wet breach
#

I think, you really need to learn how to brain storm and organize your idea in a way so that you can structure this differently. I also suspect this is also due to a lack of knowledge and understanding of java in regards what exactly is at your disposal instead of limiting yourself to simply maps and lists to solve this problem. From what I have gathered so far this isn't a problem that can easily be solved by someone just giving you a simple spoonfed answer.

blazing robin
wet breach
#

so the two objects for example you gave above, CookingRoomInventory and CookingPotType. You can easily have interfaces for these and use inheritance with the interfaces and then implement appropriately. Then the object should contain all the data, but inheritance also lets you easily swap or compare between stuff. Like using isntanceof for example.

wet breach
#

something you probably should go research if you don't know what it is

#

it may prove useful for you

tall dragon
#

may? ;d

#

its pretty much what java is build to do

wet breach
# tall dragon may? ;d

while I am pretty confident that it will, I don't bet on anything unless its a sure bet πŸ˜‰

#

for all I know, they could see it as something that gets in the way or something lmao

blazing robin
tall dragon
#

but he did in fact tell you how to solve it.

wet breach
#

I will point you in the right direction

#

which I have done

#

it is up to you whether or not you want to follow that path and do some research and learning

#

but as you said earlier if you know different ways to solve it, not sure why you are even here then as it sounds like it is a non-issue πŸ˜‰

blazing robin
wet breach
#

I did tell you a better way

#

you didn't understand it

blazing robin
tall dragon
#

and aperantly refuse to do research about it πŸ˜‚

wet breach
#

and you are right I don't have spoonfed answers because I don't spoonfeed people answers here or rarely do anyways

blazing robin
wet breach
#

if I don't know how to solve a problem, generally I don't say anything or I actually specify if I am not entirely certain. Please stop assuming you know me here πŸ™‚

blazing robin
wet breach
#

your comment here indicates you don't know what inheritance is, therefore you should go research that

#

even if I wanted to spoonfeed an answer I wouldn't be able to anyways simply because the concept I would tell you is something you don't understand

blazing robin
wet breach
blazing robin
wet breach
#

well not all problems here are simple answers either

#

which again seems to be what you keep looking for

blazing robin
#

I wanna heard your recommandation

wet breach
#

the problem you presented is not. Oh hey I have an NPE and don't know why. Your problem is more about organizational and structure of your project to the extent that it may involve utilizing a different concept. The one I proposed was making use of inheritance to combine your data so that when you create the object said object should have everything you are needing. Or at minimum possibly two objects but are now easily related to each other. There is no best way to solve your problem because it is dependent on you. All of us here would go about this problem differently and all the various ways you could do it are all valid and acceptable for the most part. The only time that isn't, is if there is more constraints or you are running into some other kind of problem you have not specified

blazing robin
#

🀭

tulip obsidian
wet breach
#

now that is out of the way, I don't think you understand the whole concept of brainstorming? Your problem again isn't just a simple here do this. If that is what you are looking for, then you are in the wrong place and should just go look on SO or something

#

what we do here for such questions like yours is try to show and introduce different things you could do by telling you concepts or some other info and then letting you loose to conduct your own research and trials

#

because that is how you learn

blazing robin
tall dragon
#

I admire your ability to stay calm frostalf. I wouldve burned this boat by now. πŸ”₯ clown_pepe

wet breach
#

and therefore your problem is not one that has a simple answer

#

other then the answer I gave of course

blazing robin
#

I already have these interface classes
CookingRoom , CookingRoomIdentifier, PotTypeCookingRoom UserCookingRoom

wet breach
#

and because you already have those that means that is all you need or it doesn't require revising?

#

do you make things perfect on the first try?

#

Seems you are finally getting into what development really is about

pseudo hazel
#

there is really no best way to do anything

#

usually you just take an approach thats reasonable for the requirements you think you have

#

and then change it later as the requirements change

wet breach
blazing robin
#

CookingRoom Have to be searched by theese things PotTypeCookingRoom , CookingRoomIdentifier, UUID

pseudo hazel
#

well I was talking about this yesterday and I still dont even know what the room identifier means or why its better than just keeping a list of cooking rooms

blazing robin
pseudo hazel
#

yeah

wet breach
#

I could see how it could come in handy, but depending on the design it could also be a useless element too

pseudo hazel
#

lists have indices too

spiral tusk
#

And why have a UUID and a CookingRoomIdentifier? Seems to me they both serve the same purpose to identify the CookingRoom?

pseudo hazel
#

the uuid is the player using it

spiral tusk
#

Ah okay never mind then sorry

blazing robin
pseudo hazel
#

they way they pitched it to me looked like it could be solved with a Map<UUID, List<CookingRoom>>

#

might not be the most java way

wet breach
#

all those things above you listed could easily be combined into a single object if inheritance is used. For example, if there is a cookingroomidentifier, that means cookingroom object shouldn't be able to be created without having this identifier part of it. cookingroom, could implement pottype, with pottype having its own inheritances for the variety of different pots or whatever.

pseudo hazel
#

but its good enough for almost any case

wet breach
pseudo hazel
#

I mean I guess but as some point you will need either a list of a map to store multiple things

blazing robin
#

I know that listed have index too, but that CookingRoom have index each other. like, 1,2,3,4,5,6
so it's couldn't be a simple list

pseudo hazel
#

okay

#

so then I just dont know the requirements

blazing robin
wet breach
# pseudo hazel I mean I guess but as some point you will need either a list of a map to store m...

Well sure, I even stated this, however instead of of multiple maps you would just have a single one in theory of course since I don't know exactly what is all required just know what they have specified and so far to avoid the usage of multiple maps based on what info they gave it will require them to restructure or reorganize their project to make use of inheritance and abstraction more then what they are doing right now.

pseudo hazel
#

of the system

spiral tusk
blazing robin
pseudo hazel
#

well yes

#

and anything surrounding it

#

like why the index is needed for example

#

or just like anything else we need to make a decision about what the structure could be

blazing robin
# pseudo hazel well yes

I showed my code yesterday,

public interface CookingRoom extends ConfigurationSerializable {

    ItemStack[][] getRecipeItems();

    void setRecipeItems(ItemStack[][] items);

    ItemStack getResultItem();

    void setResultItem(ItemStack item);
}
public interface CookingRoomIdentifier extends ConfigurationSerializable {

    int getIdentifier();

    void setIdentifier(int identifier);

    CookingRoom getCookingRoom();

    void setCookingRoom(CookingRoom cookingRoom);
}
public interface CookingRoomIdentifier extends ConfigurationSerializable {

    int getIdentifier();

    void setIdentifier(int identifier);

    CookingRoom getCookingRoom();

    void setCookingRoom(CookingRoom cookingRoom);
}
public interface UserCookingRoom extends ConfigurationSerializable {

    UUID getOwner();

    PotTypeCookingRoom getDefaultTypeCookingRoom();

    PotTypeCookingRoom getPremiumTypeCookingRoom();

    PotTypeCookingRoom getCookingRoomByType(CookingPotType potType, int identifier);
}
pseudo hazel
#

its not about the code

wet breach
#

^

pseudo hazel
#

its about why you wrote the code in that way

#

whats the idea behind it

#

what is the reason why you wrote it like this

wet breach
#

I tried stating this earlier maybe I just wasn't clear enough

pseudo hazel
#

if we dont know then we cant do anything other than iterate on this code

blazing robin
#

could I send a image on here?

wet breach
#

told them, they may need to learn how to brainstorm their idea using brainstorming techniques. IE, maybe create a spider web thingy

pseudo hazel
#

this image tells me nothing

#

this is just a gui that can be solved in a billion ways

wet breach
pseudo hazel
#

based on this I just have a list of rooms inside of some manager

wet breach
#

is there only 2 pot types?

pseudo hazel
#

a cooking room is one of those colored squares?

blazing robin
wet breach
#

so....why not use a 2d array

blazing robin
wet breach
#

there is only 2 pots, each pot has 8 rooms

blazing robin
#

yeah

wet breach
#

so a 2x8 array

blazing robin
pseudo hazel
#

seems to me like you just want to make a pot gui and then add the rooms to that

#

so you just have a class for a pot and that has a list of rooms

#

or a map

#

whatever you want

pseudo hazel
#

and then each pot type inherits pot

wet breach
#

see, seems you were just going about this problem in the wrong way

#

and just needed to look at it differently

blazing robin
# pseudo hazel or a map

And The Room Inventory's instance have to shared to each structured classes
So I created a manager, And I Created a map but <--- here's the problem 'cause I hate the multiple map

#
public class CookingRoomInventoryManager {

    private static CookingRoomInventoryManager instance;
    private final Map<UUID, Map<CookingPotType, Map<Integer, InventoryItem>>> inventoryMap = new ConcurrentHashMap<>();

    public static CookingRoomInventoryManager getInstance() {
        if (instance == null) {
            instance = new CookingRoomInventoryManager();
        }
        return instance;
    }

    private CookingRoomInventoryManager() {
    }

    public void openInventory(Player player, CookingPotType potType, int identifier) {
        InventoryItem inventory = getOrCreateInventory(player.getUniqueId(), potType, identifier);
        inventory.open(player);
    }

    public InventoryItem getOrCreateInventory(UUID uuid, CookingPotType potType, int identifier) {
        return inventoryMap.computeIfAbsent(uuid, k -> new ConcurrentHashMap<>())
                .computeIfAbsent(potType, k -> new ConcurrentHashMap<>())
                .computeIfAbsent(identifier, k -> new CookingRoomInventory(uuid, potType, identifier));
    }

    public boolean exist(UUID uuid, CookingPotType potType, int identifier) {
        return Optional.ofNullable(inventoryMap.get(uuid))
                .map(potMap -> potMap.get(potType))
                .map(idMap -> idMap.containsKey(identifier))
                .orElse(false);
    }
}
pseudo hazel
#

you only need one map

blazing robin
wet breach
pseudo hazel
#

who is emote spamming

wet breach
#

they are

tulip obsidian
blazing robin
#

lol

wet breach
#

oh it was you this time >>

pseudo hazel
#

if you want to say something use your words xD

wet breach
#

anyways, I guess I will leave it to you steaf

#

seems your words are piercing the veil that covers their eyes

pseudo hazel
#

im kinda getting sick of this xD

blazing robin
pseudo hazel
#

i keep telling the way I would do it but then its not how you want and then we go back to the ideal solution that just happens to be a few maps

blazing robin
pseudo hazel
#

like I still havent found a good reason as to why a map of player uuid and cooking room lists is not a good idea

#

you can use the index in the array as the room index

#

a list is not gonna shuffle itself by accident

wet breach
wet breach
blazing robin
wet breach
#

because the rooms have numbers

pseudo hazel
#

because you have multiple of them

wet breach
#

and lists have numbers

pseudo hazel
#

yeah

blazing robin
#

just like this?

pseudo hazel
#

a set could work too but you want the indices

blazing robin
#
 private final Map<UUID, Map<CookingPotType, List<CookingRoom>>> inventoryMap
pseudo hazel
#

yes

#

and now put that list inside of the cooking pot class

#

and then youre done

blazing robin
wet breach
#

why would the list size have 1 element

#

what happened to all the other rooms?

blazing robin
pseudo hazel
#

in general the reason to choose between a map or list is you choose a map if you want to use something other than int for index or you don't care about the (insertion) order or thats very big and you wanna look for something

#

a list if if you want to keep stuff in order

#

thats about it

blazing robin
#

(insertion) order?

pseudo hazel
#

well

#

the order at which you put stuff in the map

#

and how it ends up looking like

wet breach
tulip obsidian
pseudo hazel
#

lol

#

I mean he is right though

#

why would you only have 1 room but want its index to be 8

#

what else is the room number based on

blazing robin
pseudo hazel
#

do you need that number for anything other than telling the rooms apart

spiral tusk
wet breach
#

the way you would retrieve room 8 from a list that has 8 rooms is

int roomNumber = 0;
List<Rooms> roomList = new ArrayList<>();
if(roomNumber != 0) {
    --roomNumber
     roomList[roomNumber]
)

some sudo code in how it would basically work. Ideally all the rooms would be in the list at all times, unless there is a reason why rooms should be missing.

eternal oxide
#

if its always 8 you just need an array

tulip obsidian
pseudo hazel
#

why

#

you already have the set order of the list

tulip obsidian
#

hmm..

wet breach
pseudo hazel
#

or just dont use roomnumbers as they seem to be useless in the first place

tulip obsidian
wet breach
#

otherwise the sudo code above I provided is how you would match the room numbers to the indice

tulip obsidian
wet breach
pseudo hazel
#

yeah thats been the problem all this time

#

we dont know what they want

#

im just guessing until they say its what they want

spiral tusk
#

But it's quite funny to read to be honest xD

wet breach
tulip obsidian
#

🀨

wet breach
#

and if we all agree, then we can go back to whatever it was we were doing I guess

blazing robin
wet breach
#

its sudo code to just illustrate how you would match rooms to indices

blazing robin
#

who's them?

upper hazel
#

why i get this error - org.spigotmc:spigotπŸ«™remapped-mojang:1.12-R0.1-SNAPSHOT was not found in https://hub.spigotmc.org/nexus/content/repositories/snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of spigotmc-repo has elapsed or updates are forced

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

spiral tusk
#

Don't let my boss know πŸ‘€

blazing robin
wet breach
#

and some others are regulars

wet breach
#

I have achieved my compliment for the day it seems

spiral tusk
blazing robin
#

it was mean for negative "AI"

wet breach
#

pretty sure any AI is still smarter then your average person

#

even if its negative

#

so I take it as a compliment regardless πŸ™‚

spiral tusk
#

Now a days? for sure

tulip obsidian
#

yes you so smart 😳

blazing robin
blazing robin
#

Learn how to talk

spiral tusk
#

Love it xD

wet breach
#

you need to generate the remap using buildtools

#

in that link somewhere it should tell you how to get it

upper hazel
wet breach
#

ah, then you need to install it into your local maven repo

upper hazel
wet breach
#

your IDE should be able to do that with dependencies

wet breach
#

because the remapped jar is appended with remapped in its name

#

does someone have a link to alex's guide on this?

upper hazel
#

oh wait

#

yea its not exists

wet breach
#

yeah, need to have your ide install it into your local repo or if you have maven installed use the maven command to do it

upper hazel
#

but I don’t understand why this is so. I checked the box to generate remapped jar in gui

wet breach
#

yes it generated the jar

#

and should be in the buildtools directory

#

however, your IDE and maven don't look at buildtools directory when building

#

so you need to put that jar where they do look for it

#

I wish I had alex's guide link

upper hazel
#

Is it legal to share spigot repository data on the Internet?

wet breach
#

@tender shard we need your link

wet breach
pseudo hazel
#

isnt it open source?

upper hazel
#

is open source but not ofical for minecraft

wet breach
upper hazel
#

mojang dont like it

#

this is why boild tools exists i gess

pseudo hazel
#

i see

wet breach
#

it isn't because of mojang

pseudo hazel
#

well then your answer seems pretty clear

spiral tusk
upper hazel
#

i want get correct repos

#

from iternet

#

just by downloading

pseudo hazel
#

build tools is gonna be the fastest way to build spigot

wet breach
#

spigot is gpl, because cb is gpl, however the sharing of the server jar is generally prohibited because one mojang technically would prefer you not distribute mc server code that way albeit they are pretty relaxed, two there is the whole DMCA thingy and why we have buildtools and patches

eternal night
#

Its such a funny cyclic fuckery with the spigot DMCA, I love it

umbral ridge
#

gpl is shit

upper hazel
umbral ridge
#

XD

eternal night
#

because you don't have a legal way to download mojang source code

eternal oxide
wet breach
upper hazel
pseudo hazel
#

and what was the reason paper has downloads?

eternal night
#

Well, it is such a weird move to DMCA a repo because not your own code, but other code in the repo was mislicenced and could not be emitted as source code and that breaks GPL and that means your code is mislicenced

wet breach
eternal oxide
#

paper builds at runtime

pseudo hazel
#

do they just not give a damn or is it a loophole

upper hazel
#

that's why they ignored me when I asked to send me a repository for nms lol

pseudo hazel
#

i see

#

lol

wet breach
eternal night
#

Yea

pseudo hazel
#

anyways im glad we even get to use spigot at all

eternal night
#

Well, mojangs code was

#

is what I meant to imply

umbral ridge
#

πŸ₯³

#

time for

#

β˜•

wet breach
#

and so because of that reason I choose to not acknowledge the DMCA

umbral ridge
#

and

eternal night
#

I mean, patches solve the whole issue Β―_(ツ)_/Β―

umbral ridge
#

🚬

eternal night
#

and means you also don't technically fuck with mojang either

#

win win

wet breach
#

also there is more to it and all, considering I was there for the whole thing >>

pseudo hazel
#

this is a smoking free zone

upper hazel
#

the old owner allowed his game to be stolen, so they didn't stop and created a bukkit api

#

heh

umbral ridge
#

smoking free enterance zone

wet breach
#

I guess that is my one claim for glory as being a prior Bukkit Dev staff member

#

that I was there for the show

#

I just wished I had recorded it or whatever lmao

charred blaze
#

is there a site i can upload text and change it whenever i want without its url getting changed? i need it for my plugin's update checker

wet breach
#

you can use md's paste site

#

or someone elses

#

or hastebin in general

pseudo hazel
#

or use git

wet breach
#

or just toss it into a text file I guess?

#

not sure why we are uploading text

pseudo hazel
#

its probably just about reading most recent version of the text and comparing it to the plugin

eternal oxide
pseudo hazel
#

yeah

wet breach
#

because you know there is an API for that

pseudo hazel
#

though there are a billion plugins that do that

#

or api my bad

wet breach
#

because spigotmc site has an api for fetching that

#

XD

pseudo hazel
#

yeah

wet breach
#

you can even fetch other plugins with it too

pseudo hazel
#

long live the dependency warzone

charred blaze
wet breach
#

no

#

you didn't specify that being one of your requirements

charred blaze
#

i literally did

wet breach
#

you said upload text

charred blaze
wet breach
#

oh didn't see the change part

charred blaze
#

dw

wet breach
#

well you will probably need to look at some hosting thing

#

but

#

how about clarifying why you even need this though?

pseudo hazel
#

like git πŸ™ƒ

charred blaze
wet breach
#

to check what?

charred blaze
#

im not posting plugin on spigot thats why im not using spigots api

spiral tusk
charred blaze
spiral tusk
#

Okay nevermind

#

xD

wet breach
spiral tusk
#

Or do you use a automated build server or something like that?

wet breach
pseudo hazel
#

its where the rest of you plugin is anyways (presumably)

wet breach
#

well in buildtools case its just where the data is at

pseudo hazel
#

yeah sure

wet breach
#

that it needs

pseudo hazel
#

same thing

charred blaze
#

it requires ultimate plan

wet breach
#

to do what?

charred blaze
#

which im not going to buy

#

bbb

tardy delta
charred blaze
wet breach
#

just get some free webhosting space

tardy delta
#

github gists

#

github works too

charred blaze
#

oh havent thought about that one

#

thanks

wet breach
upper hazel
#

why boild tools not generate remapped 1.12 jar

#

I ticked this box

#

i have file "spigot-1.12-R0.1-SNAPSHOT-remapped-mojang.jar.lastUpdated"

#

but not jar

#

oh wait

#

wth

#

i not found remapped jar

#

this is really not exists

#

why i have 2 folders

eternal oxide
#

2 folders for what?

upper hazel
#

idk

#

in repos

#

for nms

eternal oxide
#

what do you mean by 2 folders?

sullen marlin
#

Remapping is only available 1.17+

upper hazel
#

wha

#

then how i shold use nms

eternal oxide
#

in earlier versions you have to use old mappings

#

?mappings

undone axleBOT
upper hazel
#

remapped is needed due to obuffification

#

server not accept plugin i gess

eternal oxide
#

do you REALLY need nms?

upper hazel
#

yes i need

eternal oxide
#

then you have your work cut out for you. building/mapping for every release

upper hazel
#

oh

upper hazel
eternal oxide
#

in almost every versions nms changes. You have to code for those changes in every version

upper hazel
#

well, that's not a problem, it's only for 1.12

#

Is it possible to use the plugin with remapped in other versions without using modules?

eternal oxide
#

no

upper hazel
#

so this mean you shuld do this anyway

eternal oxide
#

remapped just makes it easier to see/write code that uses nms

pseudo hazel
#

nms is always a pain

eternal oxide
#

you still have to rewrite your code for every version

#

always use teh API over nms if you can

pseudo hazel
#

thats why I rely on plugins that do it for me so I can just reap all the benefits and none of the struggles

#

like packet events

buoyant sonnet
#

is some 1 here to help my code wont work dont knowhy

pseudo hazel
#

?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!

buoyant sonnet
#

my scrn shot wont send

eternal oxide
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

pseudo hazel
#

?img

undone axleBOT
#

Can't send images? That's because you're not verified! Use !verify to complete verification.
Alternatively, you can upload screenshots to any image hosting site and share the link.

Here's some screenshot utilities that you can use to upload images.
Lightshot: https://prnt.sc
Imgur: https://imgur.com/upload
Flameshot: https://flameshot.org

pseudo hazel
#

lol

buoyant sonnet
pseudo hazel
#

you added brackets

buoyant sonnet
#

where

pseudo hazel
#

where the red line is at

#

()

buoyant sonnet
#

thx

#

is there a way to do a custom brewing stand recipe

#

and then instead of blaze powder a other item

fickle drum
#

hi

buoyant sonnet
#

hi

fickle drum
#

can anyone help

buoyant sonnet
#

with what

fickle drum
#

i have use znpcs and make survival and creative clone but my member cannot click it

#

they have no permission

buoyant sonnet
#

is there a error

fickle drum
#

its saying you do not have permission to use this command

buoyant sonnet
#

never mind

eternal oxide
#

string duper?

buoyant sonnet
#

you need a site

undone axleBOT
#

Usage: !verify <forums username>

buoyant sonnet
#

now a fiks anyone

tardy delta
#

dutch

buoyant sonnet
kindred sentinel
#

I created something like custom block plugin-library lol, is it useful?

acoustic pendant
#

Hey, could someone tell me why is this error happening?

kindred sentinel
#

which one 16 line?

acoustic pendant
eternal night
#

Are you depending on the 1.20.4 API ?

kindred sentinel
eternal night
#

because that constructor does not exist anymore

acoustic pendant
eternal night
#

Yea

acoustic pendant
#

so the version

eternal night
#

that constructor got yeeted

acoustic pendant
#

mb

#

Let me try downgrading to 1.20.1 the server

eternal night
#

Still so baffled people are on .1 KEKW

acoustic pendant
#

ik lol

acoustic pendant
eternal night
#

nothing

ivory sleet
#

man these patch versions don’t really feel like patches all the time

eternal night
#

you cannot extend enchantment anymore really

#

its a proper internal type these days, backed by a registry

eternal night
acoustic pendant
eternal night
#

You'd have to deep dive into NMS for it

acoustic pendant
#

So now using PersistentDataContainer is the way?

eternal night
#

Well, or a data pack in 1.21

acoustic pendant
eternal night
#

which releases today so

#

yknow

ivory sleet
#

today is crazy

acoustic pendant
#

Yea, the plugin worked now

eternal night
#

@ivory sleet especially for us xD we still need to push through an upstream update omegaroll

kindred sentinel
eternal night
#

yea, the PDC route

kindred sentinel
#

Or use attributes

#

whatever you want

eternal night
#

|| if we just don't do it, does that mean softspoon finally arrived? ||

buoyant sonnet
#

can i get help

eternal oxide
#

if the recipe is not valid that event will not fire

#

you need to listen to the click event and custom tick the stand yourself for fake recipes

buoyant sonnet
#

?

eternal oxide
#

the BrewingStand event only fires when a stand starts to brew.

buoyant sonnet
#

oke

#

and how do i fiks it

#

there a 2 things that are nothing

kindred sentinel
#

did you import BrewingStandEvent?

eternal oxide
#

doesn;t matter

kindred sentinel
#

Oh, it's not BrewingStandEvent

eternal oxide
#

he's trying to do custom recipes

kindred sentinel
#

it's BrewingStartEvent

#

lol

kindred sentinel
buoyant sonnet
#

that are the imports

#

but wath is al wrong

#

hello

kindred sentinel
#
  • I don't think it will work
buoyant sonnet
#

why

kindred sentinel
#

Cause it fires only on start

buoyant sonnet
#

how i fiks that

kindred sentinel
#

Idk

eternal oxide
#

if your reicpe is not valid the event will never fire

buoyant sonnet
#

is there than a good tt

eternal oxide
#

not really

#

you can fake it

buoyant sonnet
#

what you mean

#

or can i make my own crafting table idea

kindred sentinel
eternal oxide
#

can't be done

kindred sentinel
#

hah, the same thing as anvil "Too expensive"

buoyant sonnet
#

is there a way for a custom crafting table

eternal oxide
#

you can create any recipe for crafting you want

buoyant sonnet
#

never mind

kindred sentinel
#

like custom block for crafts

pseudo hazel
#

probably possible

#

but not without a lot of effort

kindred sentinel
#

Well, you can but it's too much work

pliant topaz
#

what if u would just have an interaction entity and using PlayerInteractEntityEvent open a gui?

kindred sentinel
#

I spent about 2 days just to create custom blocks library

#

with inventories

pliant topaz
#

if he wants he can use that

#

or am i wrong?

buoyant sonnet
#

how do i make custom mob with texture

wraith apex
pseudo hazel
#

is the book sign ui fully client side?

kindred sentinel
#

Like button or what?

pseudo hazel
#

well the menu

#

like idk if there is a way to make it appear for a player for input stuff

#

and if text is editable

#

i would guess its all client side

remote swallow
#

Books are client side yes

pseudo hazel
#

okay

#

so really the only menu I can use for player input string is the anvil

#

(and chat I guess)

kindred sentinel
#

Well you can just open a book and get the text from it after "done"

#

I think

wraith apex
#

yeah but you can adapt it to 1.20

young knoll
#

You can’t open a non signed book

#

Sadly

pseudo hazel
#

right but its pointless to create a book

kindred sentinel
#

I thought you can

wraith apex
#

comparing the mappings of 1.16 to now

pseudo hazel
#

how are the book contents saved then

#

book nbt?

young knoll
#

The client has a hardcoded check for it

wraith apex
#

build tools

#

get a remapped version of 1.16 and 1.20.4 and compare

#

Have a look at this

worldly ingot
#

mfw AI art

smoky anchor
#

How pathetic

wraith apex
worldly ingot
#

Yes

#

The subtext is fucked

wraith apex
#

nvm

worldly ingot
#

Also very grainy towards the middle, a few fucked non-straight lines throughout

wraith apex
#

I see steves left arm

worldly ingot
#

KEKW yeah

wraith apex
#

his left arm is uh...

#

whatever that is

#

xD

#

just give this image to an actual artist, and pay them to make something like this

young knoll
#

Why did they do the text via ai too

worldly ingot
#

As we all know, text is very difficult to do

#

(/s)

wraith apex
#

omg it is

#

it's so hard to open illustrator or photoshop an-

#

/s

icy beacon
wraith apex
#

I agree

#

that's why I still use CS6

#

:kekw:

#

I ain't paying for no creative cloud bs

twin venture
#

Hi using ubuntu 20.04 where i can find the mongodb users , passwords?

pseudo hazel
#

then run them in game

#

like

#

idk what else to say

twin venture
#

hi , how helped me with mongodb last time ,-,?

#

i don't remmber xD

#

someone told me to secure it

warped rain
#

im baacck

#

i need more help

pseudo hazel
#

?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!

kindred sentinel
#

I need persistant data container for inventory πŸ’€

pseudo hazel
#

why

kindred sentinel
#

?paste

undone axleBOT
kindred sentinel
#

I created something like plugin-library for custom blocks with custom inventories, so inventories are not binded to block, that's why I need to somehow differ base inventories like from chests or something like that from inventories from custom blocks using another plugin. that's the logic of custom inventories that I have to transfer somehow to another plugins:
https://paste.md-5.net/zibujuhisu.cs

icy beacon
#

?blockpdc ?

undone axleBOT
kindred sentinel
pseudo hazel
#

how did you tie inventory to block

kindred sentinel
#

and map with uuid and inventories of players that opened inventories

pseudo hazel
#

so what more would you need

kindred sentinel
#

for example in other plugin I have event on inventory click

#

And I want to differ inventory from chest from custom inventory

#

in this event

icy beacon
#

why doesn't your library provide some method like "isCustomInventory" if it keeps track of all open custom inventories

kindred sentinel
#

because Idk how to transfer tracked inventories to the another class

#

Like they are kept in the event class

#

and how to transfer all this data to another class

icy beacon
#

if you have a map with all custom inventories in one class and you want to move it to another class... just move it to another class and update references

#

i don't understand your problem

blazing ocean
icy beacon
#

just move this somewhere else???????????

robust ginkgo
#

Can Block be casted to NoteBlock? I don't see Block as one of the superclasses so I'm not sure.

kindred sentinel
#

Nah, I didn't understand

kindred sentinel
#

Ok, I move it to another class

#

For example
CustomInventories class
Then I should use
CustomInventories abc = new CustomInventories()
...
And I still have to transfer this abc to another plugin

robust ginkgo
kindred sentinel
icy beacon
#

im doing math rn i didn't look thru your entire code snippet so no
maybe smbd else comes in to save the day

buoyant sonnet
#

can soame help me with custom mob

icy beacon
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!

buoyant sonnet
#

i asked right and what i wanted

icy beacon
#

no

buoyant sonnet
#

why not

icy beacon
#

"can someonehelp me with custom mob" is not a valid question

#

ask exactly what you want

#

instead of asking to ask

#

state your problem, tell what you want to accomplish, what you tried

buoyant sonnet
#

how do i do that then

icy beacon
#

send code snippets if necessary

buoyant sonnet
#

dont know where to start

icy beacon
icy beacon
buoyant sonnet
#

you say how i do it

icy beacon
#

do you want me to tell you how to make custom mobs

#

from the beginning

buoyant sonnet
#

yes

#

i cant find it

pseudo hazel
#

wqsnt there a link earlier today?

icy beacon
#

yeah so you should ask "please tell me how to make custom mobs" instead of "help me with custom mobs"

buoyant sonnet
#

isnt that what i sead

icy beacon
icy beacon
#

this question means nothing

buoyant sonnet
#

i cant find a good 1

#

is the same

icy beacon
#

what exactly do you wanna accomplish? as in, something more complex like custom pathfinders, or just change health and name?

robust ginkgo
icy beacon
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.

robust ginkgo
#

right whoops

buoyant sonnet
#

i want a second zombie with name above him and my custom armor and custom sword he trops sword used and 0 to 5 magic powder what i made

kindred sentinel
#

Ok, I will reform my question. (To understand better If someone would like to help)
I have a plugin-library to use it for another plugins. In this plugin, I got the list of custom inventories in the event class, for example Map<UUID, CustomInventory> InventoryHolders = new HashMap()<>
And I want to create method to get this list from another plugin.
Here's the logic that I use in my plugin-library
https://paste.md-5.net/zibujuhisu.cs

icy beacon
#

you are talking in terms that only you know

buoyant sonnet
#

my custom item

icy beacon
#

you will not get any help this way

buoyant sonnet
#

magic powder what i made

icy beacon
robust ginkgo
buoyant sonnet
#

sorry

robust ginkgo
#

yeah I need to not be stupid for once

icy beacon
#

:p

buoyant sonnet
#

but what i found was make the zombie the custom one

#

but does it spawn naturly then

icy beacon
#

if you listen to CreatureSpawnEvent and add your stuff to zombies there then yes

buoyant sonnet
#

i dont understand the blog where do i put my code

pseudo hazel
#

when you want to spawn the mob

buoyant sonnet
#

if i do a command

pseudo hazel
#

okay

#

then the code will be in the command listener

buoyant sonnet
#

all of it

#

?

pseudo hazel
#

sure

#

if you use the consumer method you can make a separate class or method that can supply these custom mob variants

robust ginkgo
#

How can I prevent a noteblock from changing notes/instruments?

young knoll
#

Cancel the interact event

robust ginkgo
carmine mica
#

cancel the physics event

young knoll
#

^

half heron
#

Hello! I need to pass information between a mod and a plugin I'm working on, so I decided to use plugin channels. However, I want my plugin to work for 1.8-latest spigot, but in 1.8-1.12, channels ban be named as PLUGIN|NAMESPACE wheras in 1.13+ channels must be named plugin:namespace. I think I'll just use version specific adapters to get around this, but that means I need to listen to two channels on the client.

My first question is that are any ways to get around this naming restriction so I only need to listen to one channel on the client, or no. Secondly, in my debugging, I couldn't get the client to receive the message. There were no errors on the server end, but I didn't receive any messages. My server setup that I was testing on was Server -> Bungee -> Client, so perhaps Bungee was doing something/not forwarding the plugin message? Could anyone provide some insight?

robust ginkgo
# carmine mica cancel the physics event

Am I doing this right?

@EventHandler
public void onBlockPhysics(BlockPhysicsEvent event) {
     Block targetBlock = event.getBlock();
     if (targetBlock.getType() == Material.NOTE_BLOCK
        && ((NoteBlock) targetBlock.getBlockData()).getInstrument() == Instrument.PIANO
     ) {
         event.setCancelled(true);
     }
}

The instrument still changes from harp to a different one when I place a block under it. (also sorry if it's hella inefficient)

#

It does trigger the event though. Placing an info log before running event.setCancelled gives this message.

#

Now what? I'm trying to make custom blocks but I don't think people are supposed to play notes on them or let them change the block type.

kindred sentinel
#

How to add plugin other as dependency?

#

Like... What should I put in repository or something like that

pseudo hazel
#

this depends on the plugin you wanna use

kindred sentinel
#

Like, I created 1 plugin

pseudo hazel
#

usually they explain what precisely you need to write down

kindred sentinel
#

and how to add it as dependency in the second plugin?

pseudo hazel
#

hmm

#

idk

#

what I did for my menu lib was just add the code as a dependency from my local repo I think

kindred sentinel
#

I know only that I should export 1 plugin using install, but how to add it as dependency in other plugin Idk

pseudo hazel
#

i have to double check

#

but p sure thats what I did

#

but in my case the menu lib is not a plugin

#

just a collection of classes

kindred sentinel
#

Hmm

pseudo hazel
#

but I think it works in the same way

kindred sentinel
#

I'm not sure

pseudo hazel
#

like both the plugin and lib are in the same github repo

#

so when you install the lib it gets put into local maven repo and then it just works if I add it as a dependency in pom of the plugin

river oracle
kindred sentinel
river oracle
#

Like you would any other dependency

#

If it's not on maven central add the repo

kindred sentinel
river oracle
#

Add the repo for it then

kindred sentinel
#

But are you sure that it will work as plugin?

#

And I would be able to get the information from plugin?

river oracle
#

I told you already you're not shading it

pseudo hazel
#

as long as you compile it with your main plugin there is no issue

kindred sentinel
#

ok

river oracle
#

You simply add it in the depends field

kindred sentinel
#

thanks

river oracle
#

And add the maven repo and dependency

kindred sentinel
#

So I should make local repo for this plugin, and add plugin in repo?

river oracle
kindred sentinel
#

but it still can't find it

#

It's trying to find it in spigot repository

pseudo hazel
#

invalidate cache maybe

kindred sentinel
#

But if I used maven install, I don't have to add some kind of repositories here?

pseudo hazel
#

no

river oracle
#

No maven uses youe local repository automatically

pseudo hazel
#

it looks in your local first

kindred sentinel
#

Then I don't understand

river oracle
#

Might be worth looking at your local manually and ensuring its there

#

You need a version

#

You have no version

kindred sentinel
#

Oh

#

Ohh now it works I think

#

thanks

astral pilot
#

how do you click a button from a command

astral pilot
#
int ticksPressed = (block.getType() == Material.STONE_BUTTON) ? 20 : 30;

        Powerable data = (Powerable) block.getBlockData();
        data.setPowered(!data.isPowered());
        block.setBlockData(data);

        new BukkitRunnable() {
            @Override
            public void run() {
                data.setPowered(!data.isPowered());
                block.setBlockData(data);
            }
        }.runTaskLater(main, ticksPressed);

I have this right now, but the thing is, its a simulation

#

and not actual button clicks

#

as if the player clicked the button

river oracle
#

Don't cast things to things that they are not

kindred sentinel
#

What?

pseudo hazel
#

lmao

#

?code

#

what every the command is

#

whats the code on the error

river oracle
#

?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.

kindred sentinel
#

I used class from the other plugin which I added as dependency I mean..

river oracle
#

Yeah I doubt that

pseudo hazel
#

where did you use it

kindred sentinel
#

In another plugin

river oracle
#

You wouldn't get a ClassCastExceptipn you'd get a ClassNotFoundException

pseudo hazel
#

show how you use it

river oracle
#

Clearly you have a bad cast

kindred sentinel
#
public final class TestBHPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        Bukkit.getPlayer("_Warrio38_").getInventory().addItem(new CustomBlock(100, Material.WOODEN_AXE,2,"Β§fAAA",true).getItem());
    }

}
package org.warrio38.mc.wblockhandler;

import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

public class CustomBlock {
    public CustomBlock(int breakingTime, Material instrumentType, int customModelData, String name, boolean requiresToolForDrop){ ... }
 }
pseudo hazel
#

what line is the error on

kindred sentinel
river oracle
#

?paste

undone axleBOT
kindred sentinel
pseudo hazel
#

ah

#

yeah that wont work

#

why do you keep a reference to your plugin in there

#

or like

kindred sentinel
#

Wdm?

pseudo hazel
#

whats the at customblock:16

kindred sentinel
buoyant sonnet
#

i cant find a good custom mob tt and if i try 1 my hole code broke so i fiks my code now but i want a custom mob

kindred sentinel
#

it explains a lot

#

wait

#

then how to..

pseudo hazel
#

it depends on why you di the plugin in the first place

tardy delta
#

people still using bukkitrunnables instead of using the scheduler πŸ’€

pseudo hazel
#

maybe just using JavaPlugin is good enough

tardy delta
kindred sentinel
tardy delta
#

wait getItem()

kindred sentinel
blazing ocean
pseudo hazel
#

wtf is radlib

blazing ocean
#
runTask(10L) {
    println("half a second delay")
}
pseudo hazel
#

ratlib

#

is it available for java

river oracle
blazing ocean
#
buildText {
    append("magic")
    font("minecraft:test")
}
#

i mean it could work

#

never tried it

pseudo hazel
#

then you have your answer

blazing ocean
#

but it doesn't work on spigot :PP

pseudo hazel
#

then you have a second answer xD

kindred sentinel
# pseudo hazel how to what

I mean... In my plugin-library I used pdc to work, so in the other plugin I need my plugin-library to set pdc for work

pseudo hazel
#

do you use the plugin library as a standalone plugin

kindred sentinel
#

wdm?

pseudo hazel
#

well

#

you are including one plugin into another

#

can you use that plugin on its own

barren peak
kindred sentinel
#

no

pseudo hazel
#

or is it meant to only work as part of another one

#

okay

kindred sentinel
pseudo hazel
#

then you should consider changing how you access the pdc from that plugin

#

like not using a plugin instance because I think it got confused

scarlet gate
#

Is it possible to display a book gui without having an actual book? or is this something that i would need to use packets for?

kindred sentinel
pseudo hazel
#

but idk if you can have it without an actual book

pseudo hazel
#

like CustomBlock(JavaPlugin user)

pseudo hazel
#

or something

kindred sentinel
#

It makes sense

sharp cosmos
#

Is sending localized/translated messages possible?
I'm trying to send a fake "player has joined" message, but in the correct language for each person

blazing ocean
#

Player#getLocale iirc

#

you could send a translatable component if you use a resource pack

sharp cosmos
#

Can I send a translatable component using a vanilla translatable text as well or only when using a resource pack?

scarlet gate
sharp cosmos
blazing ocean
kindred sentinel
pseudo hazel
#

then set a register someplace else

#

foo.setListener(bar.listener)

#

for example

kindred sentinel
#

Well it makes sense

pseudo hazel
#

you can send any text thats translated in the language files

#

as a translatable component

kindred sentinel
pseudo hazel
#

well yeah I guess

twin venture
#

anyone can help me with mongodb connection?

pseudo hazel
#

there would be no other way I think

#

but please someone correct me if im wrong

kindred sentinel
twin venture
#

i set the ip , port , and the password

#

howwould i know the username?

kindred sentinel
robust ginkgo
#

When a player right clicks the note block, it changes the note. How do I stop this from happening and make it run the shift click behavior? (aka place a block if it can be placed)

#

If you can't directly do that, how would I check if a block can be placed on a surface?

twin venture
#

is there a way i can check the users / passwords of mongodb?

#

i been trying for hours

twin venture
#

😦

#

been trying for hours

#

The full response is {"ok": 0.0, "errmsg": "Authentication failed.", "code": 18, "codeName": "AuthenticationFailed"}

sharp cosmos
#

Is it possible to make your plugin disable before others? (I'm getting errors because the API i'm using is getting disabled before my plugin)

eternal oxide
#

loadbefore: plugin in your plugin.yml will cause you to load before the API provider, and disable before too. However you should not access it until its loaded

tardy delta
young knoll
#

They do update the blockdata

eternal oxide
#

however you must note that is only for a proper shutdown. If the API provider is reloaded or shuts down for any other reason you still break

#

depending on external API's in onDisable is not a good idea

tardy delta
#

thought there was some kind of update()

young knoll
#

That's for state

#

For data it's setBlockData

astral pilot