#development

1 messages · Page 24 of 1

rigid iris
#

Hi, I'm a beginner when it comes to java coding, but today I tried creating a placeholder based on a java string variable. I can't find any recent coding tutorials for placeholderAPI on youtube. I'm trying to get a stopwatch/timer plugin to output the seconds past in a placeholder. I don't know whether the source is allowed to be altered, but I thought for personal use it wouldn't hurt. If anyone could help me out that would be greatly appreciated.

#

Can I link the spigot page here?

ebon whale
#

Sounds interesting ngl. What source?

rigid iris
#

Here's what I've modified so far:

#

And this is the spigot page:

ebon whale
#

Never knew that existed

#

Sadly, code looks really screwed due to the spacing on phone xD

worn jasper
#

funnily enough, rebuilding worked

merry sentinel
#

DeluxMenus, on Spigot 1.18.2 (Plugin version 1.13.6). I can take items from menu, to my hands. How i can fix it?

rigid iris
#

Yeah, me neither. But when you search long enough, you'll most likely find what you're looking has already been done.

worn jasper
#

(technically, all plugins are under that same license, free and paid)

ebon whale
#

Tru tru

worn jasper
worn jasper
#

and I quote intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.

dusky harness
#

Or actually would the developer be at fault? Or maybe it is implicitly under GPL

#

I am no lawyer

worn jasper
#

as said ALL minecraft plugins that use the Bukkit api are under GNU

ebon whale
#

I guess thats settled then

rigid iris
ebon whale
#

I may just be tired but im still trying to figure out what part of that thing is the actual issue

rigid iris
#

java.lang.NoClassDefFoundError: me/clip/placeholderapi/PlaceholderHook

#

I'm trying to make it output the seconds as a placeholder in placeholderAPI

#

as soon as remove the part (commented with start&end alteration) it does work but no placeholder is found. 0 placeholder hook(s) registered!

worn jasper
#

Are you using maven or gradle?

rigid iris
#

The project contains neither, if I'm not mistaken.

#

As i said, I am no expert. Fairly new at coding I suppose.

#

I'm using IntelliJ IDEA for building, and replace the class files inside the original jar.

worn jasper
#

Oh so you are trying to modify an existing project?

#

I am a bit confused now

#

Okay, yes you are.

#

So, I would recommend to maybe extend your knowledge in coding instead of going straight forward to modifying existing code which you may not understand and cause future issues. Otherwise, if you want to risk that (I wouldn't recommend), the issue itself is that the project uses PlaceholderAPI yet it didn't find it. Probably because it isn't present in the server and it probably isn't dependent on it (in the plugin.yml) so it still enables the plugin.

ebon whale
#

The original plugin.yml doesnt have papi so ye, likely just that

worn jasper
#

Yes, but even if it had it, only thing it would change is that the plugin would disable itself

#

instead of giving an error

rigid iris
#

Thanks for the advice. I still want to take the risk however. But not today. In the weekend i might have time to spare. You said it's not a dependency, yet i can see modified plugin.yml containing the dependence. I think i just don't really understand what the following line does:

#

PlaceholderAPI.setPlaceholders(Bukkit.getPlayer(curPlayer), "%stopwatch_seconds%");

worn jasper
#

if you hover your mouse over the method and click ctrl + q it should display it's javadoc description

rigid iris
#

I modified it a couple of times to no result. If you could explain what the first and second argument stand for that would be great

worn jasper
#

Although that returns a string, so make sure to use that, it's not a void method

rigid iris
#

the variable i want to be the output of the placeholder is totalSecs. The player whould be the current player. and the placeholder should be named %stopwatch_seconds%.

worn jasper
#

to use it somewhere else with papi?

rigid iris
#

yes

worn jasper
#

then you are doing totally the opposite xD

worn jasper
rigid iris
#

Ohh..

worn jasper
#

this is what you are searching for

#

(Easier would be With Plugin (internal class))

rigid iris
#

Thanks for clearing that out. I will look into that tomorrow. If i need any help, I'll be back. Thanks again.

worn jasper
#

No problem

cold obsidian
#

Hello I need help dear developers & configurators. So this is a custom GUI menu from DeluxeMenus, how can I do it like a shop

when someone clicks on example: Boots item
- if he has enough money, he will buy, his money will be taken & he will be given the item [boots]

- If he hasn't have enough money, he wont get nothing, only a message in chat like [!] Not enough money

#

DM me so I can send you a picture, the example what I mean

#

I also use AdvancedArmor plugin for this ^

lyric gyro
#

Can i code 1.19 plugins in Java 8 or does it have too be Java 17 >?

proud pebble
dusty frost
#

yeah the whole benefit of later versions is that everyone has to have 17 at a minimum, so you can get away with using those new features

tardy cosmos
#

Does anyone have any idea what this is caused by? I've checked StackOverflow, found practically nothing, and am basically just beating my head against a wall at this point. I'm trying to serialize/deserialize itemstacks using the BukkitObjectInputStream and it seems like certain player heads are causing this to happen. It works for normal items but certain custom heads or items with certain nbt can cause it to just die. Would appreciate it if you could give me a ping with any response

high edge
#

Can I recommend Base64 instead?

dense drift
#

^

sterile hinge
#

yeah sounds like an issue with the bukkit serialization hackery, probably even on writing already

quaint skiff
#

When I use a AttributeModifier.Operation.ADD_NUMBER for attack damage does it add the value to the base damage or does it override the base damage?

dense drift
#

d;AttributeModifier$Operation%ADD_NUMBER

uneven lanternBOT
river solstice
quaint skiff
#

Yes but when I tested it with only the added amount my sword did half a heart of damage instead of 8.5 Hearts like it should (it was a netherite sword)

#

and now I tested it like I would set it and it worked ??

river solstice
#

Code works how you think it works

#

All in your mind

#

🦧

grand zodiac
#

Using ProtocolLib, how can i detec when the status changes?

grand zodiac
#

Interesting. How do I use this? Very new to protocollib

untold plinth
#

I keep getting this error : Caused by: java.lang.IllegalArgumentException: Item cannot be null
This is my code :

public class ItemManager {

    public static ItemStack sword;

    public static void init() {
        ultimateSword();
    }

    public static void ultimateSword() {
        ItemStack ultimateSword = new ItemStack(Material.DIAMOND_SWORD, 1);
        ItemMeta meta = ultimateSword.getItemMeta();
        meta.setDisplayName("§k§4scary§1Ultimate Sword§k§4scary");
        meta.addEnchant(Enchantment.DAMAGE_ALL, 10, false);
        meta.addEnchant(Enchantment.KNOCKBACK, 10, false);
        meta.addEnchant(Enchantment.FIRE_ASPECT, 10, false);
        meta.addEnchant(Enchantment.DURABILITY, 10, false);
        ultimateSword.setItemMeta(meta);
        sword = ultimateSword;
    }
}```
```java
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {

        if (!(sender instanceof Player)) {
            sender.sendMessage(colorize("&4You can't do this!"));
        } else {
            Player p = (Player) sender;
            p.getInventory().addItem(ItemManager.sword);
        }

        return true;
    }```
dense drift
#

is ItemManager#init ever called?

#

you can use a static { } block which will be called automatically

dusky harness
#

in general I would not recommend using the same item instance

#
  • static abuse
  • any changes of the item will apply to every player with that item
lyric gyro
#

mutability 😌

hoary scarab
#

I can't check the code but doesn't giveItem generate a copy?

tardy cosmos
lyric gyro
#

Like it's legitimately broken

tardy cosmos
#

;-;

#

How am I supposed to serialize itemstacks

#

I'm trying to save them in PDC

lyric gyro
#

Paper has serializeToBytes or smth

tardy cosmos
#

Yeah that's paper only tho :(

lyric gyro
#

damn

hoary scarab
#

Gotta make your own methods. Bukkit doesn't serialize nbt data either so it's better to make your own anyways.

dense drift
#

it does serialize nbt from my experience?

tardy cosmos
#

Bukkit does actually serialize nbt I'm pretty sure

#

I'm also pretty sure that's what's breaking it horribly

lyric gyro
#

it does, but it has some really fun quirks and it sometimes just does not work lmao

hoary scarab
lyric gyro
#

tbh just serialize into a YamlConfig and store that lol

#

saveToString or whatever

dense drift
hoary scarab
#

One of my old methods was item -> jsonobj -> base64

dense drift
tardy cosmos
#

I was going to end up going with NMS and serializing it that way since I at least know it wouldn't break, I'll probably end up using something similar to Paper, thanks for the advice everyone :)

queen plank
#

I have a few sub packages in the path com.sniskus.rpg.core.classes with different classes extending the class Ability. How does this not give me any values or keys? ```java
Class<? extends Ability> a : new Reflections("com.sniskus.rpg.core.classes", Scanners.SubTypes).getSubTypesOf(Ability.class)

#

I just get [org.reflections.Reflections] Reflections took 85 ms to scan 113 urls, producing 0 keys and 0 values

untold plinth
#

how would I make a player invincible
for 5 seconds

proud pebble
#

i personally would add the player's uuid to a set of uuids, and have a task to remove the player's uuid from that set in 100 ticks, and then in the entitydamageevent if the player's uuid is in the set then to cancel all damage.

hoary scarab
#

Doesn't Player have setInvulnerable(boolean)?

dusky harness
#

d;spigot Player#setInvulnerable

uneven lanternBOT
#
void setInvulnerable(boolean flag)```
Description:

Sets whether the entity is invulnerable or not.

When an entity is invulnerable it can only be damaged by players in creative mode.

Parameters:

flag - if the entity is invulnerable

dusky harness
#

When an entity is invulnerable it can only be damaged by players in creative mode.
Although make sure to note this

trail burrow
#

looking for some help with conversable.sendRawMessage?

#

can I send a message via minimessage to conversable.sendRawMessage

dusky harness
#

idk exactly what the method is but I assume it takes json?
so you can use the json serializer

#

I assume he's talking about GsonComponentSerializer or smth like that

trail burrow
#

I would if I understood it

#

that makes more sense

dusky harness
#

yeah I don't think there's a json named serializer but there's a gson one

proud pebble
untold plinth
#

alr new thing how do I create a recipe in spigot 1.5.2

dusky harness
#

1.5 or 1.15

untold plinth
#

1.5

dusky harness
#

legally you're unable to obtain 1.5.2 anymore so I doubt there's many people who has experience with that in here

untold plinth
#

i can literally go to bukkit and download it

dusky harness
#

what site

untold plinth
#

hold up

dusky harness
#

bukkit doesn't really care though so they don't take them down

dusky harness
#

yeah that's not allowed iirc but 🤷 there's popular minecraft servers that get their jars below 1.8 since no one takes any action

#

but I'm just saying that it's an extremely old version so people here may not have experience with it

leaden sinew
#

Why do you want to use 1.5?

untold plinth
dusky harness
untold plinth
#

eaglecraft browser minecraft which runs 1.5.2

dusky harness
#

wait no way this actually works

#

15 fps lets go

untold plinth
dusky harness
#

im also on firefox if that matters

#

and on a public mc server

#

i just clicked one of the middle ones

untold plinth
#

it dosen't matter

#

it just can't handle the uh render distance

#

so turn that to mini or small

#

tiny or short*

dusky harness
#

why is there an adderall setting 🥲

untold plinth
#

i've already spent my time making stuff for it like this sword :

    public ItemStack ultimateSword() {
        ItemStack ultimateSword = new ItemStack(Material.DIAMOND_SWORD, 1);
        ItemMeta meta = ultimateSword.getItemMeta();
        meta.setDisplayName("§4§kscary§1Ultimate Sword§4§kscary");
        meta.addEnchant(Enchantment.DAMAGE_ALL, 10, true);
        meta.addEnchant(Enchantment.KNOCKBACK, 10, true);
        meta.addEnchant(Enchantment.FIRE_ASPECT, 10, true);
        meta.addEnchant(Enchantment.DURABILITY, 10, true);
        ultimateSword.setItemMeta(meta);
        return ultimateSword;
    }```
untold plinth
#

it's just a thing added for fun

#

it let's u see fake blocks/items and when you get close to them they run away from u

#

also you screen moves

dusky harness
#

ms edge is like 1000000x fps boost

untold plinth
#

just turn down the graphic settings

dusky harness
#

i mean I see it with my own eyes

#

🥴

#

155 fps ez with ms edge

#

but 30 fps with firefox

#

firefox bad

lyric gyro
#

Not really, Firefox does some weird things with OpenGL for some or the other privacy reasons I cannot be bothered to explain

untold plinth
#

ah

dusky harness
#

oh

untold plinth
#

oh what

dusky harness
#

i turn off anti aliasing and now i get 160 fps

#

😎

untold plinth
#

see all u gotta do is turn it down

dusky harness
#

ooh 170

#

ok thats the max

#

and nothing wants to go near me 😭

untold plinth
dusky harness
#

I would never!

untold plinth
#

lies

dusky harness
#

I can't believe you would ever suggest that

#

😭

untold plinth
#

wanna join my server and see what I have made so far

dusky harness
#

sure

untold plinth
#

alr i'll dm you

tender thicket
#

Man

#

I think I finally finished

#

I've been working on an API & Library which replaces the bukkit scheduler with a non blocking scheduler based on the reactive streams specification

proud pebble
#

doesnt the schedular whe ysed properly not block the main thread?

broken elbow
dense drift
#

when used
judging from the context

proud pebble
#

yes

lyric gyro
#

non-blocking is not the same as "not blocking the main thread"

proud pebble
#

i dont use auto correct

#

then whats the difference?

lyric gyro
#

Generally speaking there is no such concept as "main thread", that's made-up in the context of Minecraft to refer to the server tick loop
non-blocking is more of a mechanism where you don't want to block a thread, any thread, period, non-blocking IO allows for performing file operations or network calls "synchronously" without blocking a thread at all, that's far down the line onto the operating system tho but obvs there are abstractions for that in Java and such

proud pebble
#

i just thought they were doing mysql querys sync or something

lyric gyro
#

Or, in some cases, when a thread is blocked instead the scheduling system will switch the thread from waiting to perform some other queued task

#

async does not mean non-blocking, it just means run this task in another thread and (perhaps) block this other thread instead

proud pebble
#

oh i see

untold plinth
#

so I have this code

        ItemManager itemManager = new ItemManager();
        NamespacedKey ultswo = new NamespacedKey(this, "ultswo");
        ShapedRecipe ultimateSwordRecipe = new ShapedRecipe(ultswo, itemManager.ultimateSword());
        ultimateSwordRecipe.shape(" a ", " b ", " c ");
        ultimateSwordRecipe.setIngredient('a', Material.TNT);
        ultimateSwordRecipe.setIngredient('b', Material.DIAMOND_BLOCK);
        ultimateSwordRecipe.setIngredient('c', Material.STICK);

        Bukkit.addRecipe(ultimateSwordRecipe);

but for some reason I get this error

'ShapedRecipe(org.bukkit.inventory.ItemStack)' in 'org.bukkit.inventory.ShapedRecipe' cannot be applied to '(org.bukkit.NamespacedKey, org.bukkit.inventory.ItemStack)'
dense drift
#

d;ShapedRecipe#ShapedRecipe

uneven lanternBOT
#
public  ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)```
Description:

Create a shaped recipe to craft the specified ItemStack. The constructor merely determines the result and type; to set the actual recipe, you'll need to call the appropriate methods.

Parameters:

key - the unique recipe key
result - The item you want the recipe to create.

tender thicket
#

Is it just me or has paper dropped NamespacedKeys from their api

#

And replaced them with Namespaced thru either kyori or native paper

lyric gyro
#

I mean it's still there

#

And they made NamespacedKey implement both their Namespaced type and Kyori's Key so anything that accepts either of those you can still use NamespacedKey on

tender thicket
#

IntelliJ won't recognize the path to the import

#

Only recognizes com.destroystokyo.paper.Namespaced
And
net.kyori.adventure.key.Namespaced

tired olive
#

And check if it works if u manually import it

lyric gyro
#

I mean the class definitely exists

#

Removing it entirely would break so many things lmao

leaden sinew
#

Didn’t you hear? They removed them in 1.19

tender thicket
#

I dont know about all thay

#

That

lyric gyro
#

yeah because it never happened

dusky harness
#

💀 💀 💀 💀

leaden sinew
#

If you want to see how I did it, it's in #showcase

tender thicket
#

Ok oops!

untold plinth
#

alr so I have this sword code

    public ItemStack ultimateSword() {
        ItemStack ultimateSword = new ItemStack(Material.DIAMOND_SWORD, 1);
        ItemMeta meta = ultimateSword.getItemMeta();
        meta.setDisplayName("§4§kscary§1Ultimate Sword§4§kscary");
        meta.addEnchant(Enchantment.DAMAGE_ALL, 10, true);
        meta.addEnchant(Enchantment.KNOCKBACK, 10, true);
        meta.addEnchant(Enchantment.FIRE_ASPECT, 10, true);
        meta.addEnchant(Enchantment.DURABILITY, 10, true);
        AttributeModifier dmg = new AttributeModifier(UUID.randomUUID(), "generic.attackDamage", 70.0, AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND);
        meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, dmg);
        ultimateSword.setItemMeta(meta);
        return ultimateSword;
    }```
and whenever I try to add an attribute it breaks my event to explode on right click
```java
                if (e.getItem().getItemMeta().equals(itemManager.ultimateSword().getItemMeta())) {
                    if (!cooldown.containsKey(p.getUniqueId()) || System.currentTimeMillis() - cooldown.get(p.getUniqueId()) > 5000) {
                        cooldown.put(p.getUniqueId(), System.currentTimeMillis());
                        p.sendMessage(colorize("&aYou've used the Ultimate Ability!"));
                        p.getWorld().createExplosion(p.getLocation(), 15f);
                    } else {
                        p.sendMessage(colorize("&4You can't use this for another &e" + (5000 - (System.currentTimeMillis() - cooldown.get(p.getUniqueId()))) / 1000 + " &4seconds!"));
                    }
                }```
anyone got any idea why this is happening
dusky harness
#

what breaks exactly

#

don't compare ItemMeta

untold plinth
untold plinth
dusky harness
untold plinth
dusky harness
#

put debugs

untold plinth
#

it just doesn't blow up anymore

#

and if I remove the attribute it works

dusky harness
#

don't compare itemmeta

untold plinth
#

everything worked until I added the dmg attribute

untold plinth
dusky harness
#

or even just compare the displayname (still bad but better than it breaking right now)

#

yes

dusky harness
#

is that not what you want

#

compare the item

untold plinth
#

no

#

you can literally rename any sword and get that same effect

#

well any item

dusky harness
#

PDC

untold plinth
#

what's that

dusky harness
untold plinth
#

e
P Mayonnaise
D on an
C Escalator

untold plinth
dusky harness
#

lol

#

wait

#

isn't this 1.5 spigot

#

PDC is on 1.14

untold plinth
#

nice

#

back to removing the attribute

untold plinth
#

i'm using 1.19.2 🙂

dusky harness
#

oh that's quite the upgrade

#

lol

untold plinth
#

I just decided one day to do 1.5.2

proud pebble
#

you would havs to use nms if it was 1.5

#

just add an id to the items pdc

#

the id is the easy routr

#

what if they change anything about the sword its no longer identifyable

tender thicket
#

So

#

Quick question

#

If I'm extending RunnabeScheduledFuture<T>

#

In an interface

#

I cannot reasonably override get() anywhere except from the end user standpoint, no?

#

if I've got an interface
IService extends RunnableScheduledFuture<IService>

#

And then somewhere down the line I implement an abstract class to provide some sort of basis for individuals to extend from

#

I still have to leave out

@Override
public IService get()```
#

Because I cannot realistically return anything there unless it's from the acting subclass

#

Is that accurate?

#

And also from RunnableScheduledFuture, isPeriodic() is simply asking whether or not the task is allowed to be scheduled and ran more than once?

#

I thought I was finished with my non blocking scheduling system for bukkit

#

But I was wrong

lyric gyro
#

Do with that as you will

#

Contract in javadoc prayga

lyric gyro
#

What are you even trying to do lmao instead of using something like reactor and using parallel/boundedElastic schedulers

dense drift
#

I guess he means he can't override that method and return a value because it is an interface, but that's how interfaces work shrug

lyric gyro
#

default methods are a thing but idk what the goal is

dense drift
#

yeah

tender thicket
#

@lyric gyro i am using reactor and its scheduler

#

Do I only need to have the service extend runnable?

#

Since reactor is non blocking?

lyric gyro
#

what

tender thicket
#

And I'm not using parallel or bounded elastic but instead Schedulers.fromExecutor

lyric gyro
#

what is your goal

tender thicket
#

The service is designed to be a possible future but that doesn't mean it's going to be

#

At any point the task itself may not have its result ready; if I'm already using reactor (and Scheduler#schedule takes a runnable parameter)

#

I dont need to worry about whether or not the service may not be ready at call?

lyric gyro
#

what

tender thicket
#

I feel as if this would be easier if you saw what I'm doing on my github repo

#

It's a lot to describe

lyric gyro
#

At any point the task itself may not have its result ready
That is exactly what a future is, yes

tender thicket
#

There's a scheduling system which creates a ServicePool, which stores all services related to that service pool. Each pool registers either a single threaded executor for the scheduler, or a multi threaded one based on a boolean parameter. The services are all extending RunnableScheduledFuture<IService>, so they can be

  1. Scheduled
  2. Be called at a later date if the result isn't ready without blocking any other threads
#

If I am using Mono and Flux, to create non blocking threads

#

Do I need to bother extending RunnableScheduledFuture

#

Or should I instead extend Runnable

#

And let the scheduler do the bulk work

#

And if I should extend RSF

#

From an api/lib standpoint, I can't override the get method because I have no idea what the service instance should return, and whether or not it's even completed?

#

Or can I override get() from RSF because I know that eventually it'll return an instance of this or the child?

lyric gyro
#

I fail to understand what the goal of all this is

sharp cove
#

Does getting data out of a database cause lag?

#

Like with FILE/YAML I do it Async so it doesn't have effect on the players experience

#

But does that matter for MySQL too?

#

Please @ me

dense drift
#

Queries should be done async

icy shadow
#

it's far more important to do sql queries asynchronously than it is yaml reads lol

#

90% of the time the yaml contents will be cached anyway lol

dusky harness
#

Which I think takes longer than a file

#

But I haven't done any testing

tired olive
#

network io is as slow as it gets

#

mainly cuz of latency but still slow

#

if theres 0 latency, network is actually 3x faster

dusky harness
#

Oh

#

Would using a local ip rather than localhost also give 0 latency? Or no because it goes through the router

tired olive
#

idk

dusky harness
#

Oh

#

🥲

tired olive
dusky harness
#

Wow stanford

tired olive
#

slide 13

sharp cove
robust flower
#

is possible to combine the plain jar, the sources jar and the javadocs jar into one? if so, how could I do this?

tired olive
#

Don't think so

#

Why would u want that tho

robust flower
#

to have to import only one jar instead of three, this also facilitate sharing source jar with others

dense drift
#

it is called using a maven repo 😄

robust flower
#

what if I don't want to have to publish my jar to external sources just to share it?

#

good practices aside, I just want to know if that is possible or not (and if so, how to do it)

dense drift
trail burrow
#

@robust flower Not sure if this would do what you want, When I can't find maven repos I use mvn install:install-file -Dfile=C:\Users\UserName\Documents\Your.jar -DgroupId= -DartifactId= -Dversion= -Dpackaging=jar to add the jar to my local repo

stuck canopy
#

I'm creating a plugin which uses menus and has a config file with which a user can create multiple menus with multiple items in it and options and allows the user to open those menus through a command.
Is it better to get all the menus in a static list when the plugin enables and opens the menu for the player upon using the command?
OR
Is it better to create all the items in the menu according to the other options and then open the menu for the player upon using the command?

glacial sleet
#

Hey im trying to make some placeholders for my plugin but it dont seems working no idea why i checked Wiki on gitub and i dont see any problems Here is my code

https://hastebin.com/uhacopepiz.kotlin

ive registered this in onEnable
new PlaceHolderListener(this).register();
but this dosent seems working tell me if im doing smth wrong

unique badger
#

Hello, i need help.. why It’s not working?

unique badger
#

Oh, i cant paste here a picture

neat pierBOT
broken elbow
glacial sleet
#

sure gimme a minute

broken elbow
glacial sleet
#

ill make it lowercase np

#

and will send you a new SS

unique badger
#

i have added the dependence and repository, but still cant use InventoryGui

#

to create an inventroy

broken elbow
unique badger
#

oh no? how can i do that?

#

i feel so dummy, sorry

#

from this ulr i take the dependence and repository

broken elbow
unique badger
#

now this...

broken elbow
unique badger
#

i have clicked on run and it says that the dependencies have been download, thats all

unique badger
#

yes

broken elbow
unique badger
#

yes, i clicked it

#

now

#

its working

#

thx so much mate

broken elbow
#

no problem

unique badger
#

i am "new" to coding - especially using dependencies

#

i have tried to put player in it, but thats just gave me an error

unique badger
#

I Just figure it out

#

But thx

fiery pollen
#

Hello,

So I have been building this app in Java in Android studio. I am using one of google's API's and I have this credentials.json file that I need to get the data of the server. But I have been trying for the past 2 hours to get the path file/or any other way to get file but it hasn't worked out.

This is the project structure right now (https://imgur.com/a/fM5L30a). I need to get this file in the CalenderAPI.java class. Does anyone of you know how I would get this?

(Please tag me if you are responding)

dusky harness
#

Since it's a resource

#

Rn it's in the Java folder

unique badger
#

hello, can someone tell me, whats wrong? i have created guiElement named like in the code and when player click the element, it should send the player a message - for test the click https://paste.helpch.at/fafudaraze.java

cinder forum
unique badger
#

ok, dík

#

do not know if its by using the lore, but event when i removed the lore, nothing happed, no message to player - i am using Phoenix616's InventoryGui... and yes, i already use the wiki to create the element

#

so, the first problem was that i was returning false at line 45, but that doesnt change that its not sending a player message when player clicked the green_concrete

lyric gyro
worn jasper
#

I am confused java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.UUID (java.lang.String and java.util.UUID are in module java.base of loader 'bootstrap')

public Integer getTotalKills() {
  var ownerP = Bukkit.getOfflinePlayer(owner);
  int temp = ownerP.getStatistic(Statistic.PLAYER_KILLS);
  for (UUID member : getMembers()) {  // This is line 93, apparently it's happening here?
    var p = Bukkit.getOfflinePlayer(member);
    temp += p.getStatistic(Statistic.PLAYER_KILLS);
  }
  return temp;
}```

getMembers() returns a List<UUID>
#

So, I am quite confused where that string is lol

icy shadow
#

type erasure fail im guessing

#

what is getMembers doing

lyric gyro
#

Collections.checkedList PauseChamp?

worn jasper
worn jasper
#

I have an idea on what might be issue

#

going to test it rn

icy shadow
worn jasper
icy shadow
#

mfs will say "this function does a thing"

worn jasper
#

nothing else

icy shadow
#

okay and where is the list coming from

worn jasper
#

From a constructor, which is initialized on start, which is deserialized which is what I am checking rn

#

since I am storing this in json, and the list is probably a list of strings

#

instead of uuid

#

which is probably the issue, which I am testing rn

#

AND it was that lol

#

thx anyways

icy shadow
#

yeah the deserialization is the problem

dusky harness
#

you can also do onPlaceholderRequest instead since you only want a Player

#

onRequest is if the placeholder also allows offline players or no player at all

lyric gyro
#

Ok ill try

unique badger
#

I am missing theInventoryHolder, bcs i have no idea what that is

hoary scarab
#

If I have a string containing a "." how can I make it a path without it nesting?

String string = "Some.Path";
YamlConfiguration.set(string, "value");
```Becomes ```yaml
Some:
  Path: "value"

I need it to be ```yaml
"Some.Path": "value"

crimson portal
#

i make a plugin with Custom minecraft recipes and i have a crafting recipe where i put a water bottle in and then other stuff the water bottle should be after the crafting be empty

tight junco
#

spigot be like that

hoary scarab
tight junco
#

id think something like ;

hoary scarab
#

Might use that. I'm just gonna check if its a configsection first though. Cause the issue is rereading it from config it wasnt checking for nested paths.

#

NVM that would be a pain with multiple nests. Char it is xD

hoary scarab
tight junco
#

like the ```java?

#

no

hoary scarab
#

yeah look at the message lol

dusky harness
#

you put a space after it

hoary scarab
#

It didn't do the markdown

dusky harness
#

it has to be just java

#

not java

hoary scarab
#

Ah

tight junco
hoary scarab
#

I was trying to one line the message originally forgot to remove the space lol

safe whale
#

Hello everyone maybe some of you can help me with my problem with discord ?

#

Or point me in a direction to get it working

tight junco
#

?not-discord

neat pierBOT
#
FAQ Answer:

Looking for discord support?
HelpChat is a Minecraft plugin and development support server and is not affiliated with discord in any way.
If you require support from discord, we recommend you to visit their official support website at https://support.discord.com
On this website, you can read their FAQs, or open a support ticket if necessary.

safe whale
#

I've looked through that but can't find a similar problem

#

Maybe I can explain to some of you and ya can help me quickly as it's really puzzling me

grim oasis
#

We are not discord support, and this channel is not for it either.

#

You can try asking in #off-topic or a completely different discord server. This is a server for minecraft plugin help

safe whale
#

Ohh shoot I joined the wrong server my bad

grim oasis
#

All g, wish ya luck

river solstice
#

how does Player#showPlayer and hidePlayer work?

odd prawn
#

Does anybody know why

console.log(new UserFlagsBitField(user.flags.bitfield).toArray());```

Only outputs ``[ 'HypeSquadOnlineHouse3' ]`` even tho I have multiple  badges
dusky harness
#

I think

#

I don't know JS so I'm assuming a lot right now

#

I'm not sure why it only gives that 1 flag though

#

maybe you have to fetch the flags and await the result

odd prawn
#

Just the first singel badge

dusky harness
odd prawn
#

same result, im going crazy

spiral prairie
#

is anybody here familiar with the command framework lamp?

dusky harness
#

🪔

dusky harness
#

Using 1.16.4 Paper btw
What's the best way to get an item name on how it'd display to the client (English)?
It's not server-side since it uses translatable components iirc so is the best I can do is get the item name, replace _ with , and capitalize it? although the issue with this is that some of the names aren't very good - such as Cooked Beef (COOKED_BEEF) vs Steak

#

Or I guess I don't need to know the item name but is there a way to get the TransatableComponent for the item?

lyric gyro
#

What's your end goal? Send it to a MC client? Log it in console? Send it to Discord? Save it in an internal log?

#

at dkim12345

lyric gyro
#

But that is the one with the [] and like with the italics (I think?) and it's coloured depending on the item rarity etc

dusky harness
lyric gyro
#

getInternationalizationDisplayName

#

it'll be english only tho so bleh

dusky harness
#

would that be the the displayName() but on 1.16.4?

lyric gyro
#

the the

dusky harness
#

the

lyric gyro
#

dunno

dusky harness
#

oh it does

#

the server actually has the lang file

#

assets/minecraft/lang

#

(well only English)

lyric gyro
#

why .4 lol

dusky harness
# lyric gyro why .4 lol

can't use adventure since the server owner is on 1.17 iirc and that adventure version doesn't support minimessage

#

getI18NDisplayName works perfectly tho

#

it returns the english name

lyric gyro
#

why not use 1.17 API then huh

dusky harness
#

that adventure version doesn't support minimessage

#

it has missing classes

#

so if I were to use 1.17 API, I'd have to make sure not to touch any of the API which has adventure

#

since I'd have to shade & relocate adventure

dusky harness
tribal ingot
#

Hello, I was wondering how I can replicate item I'm hovering over in the screenshot (there is no preview). https://i.ibb.co/ZNzbxVJ/ss.png. I've managed to remove the meta's display name, but it still shows where the area where the display name was. A potential solution is just having 1 line in the displayname name and 1 in the lore, but it just looks really bad.

dusky harness
#

I'm pretty sure that's the only way to do this

tribal ingot
#

I've checked ingame, and the font size is the same

#

so I'm assuming there is some way to accomplish it.

tribal ingot
#

yeah, gimme a sec

dusky harness
#

👍

tribal ingot
#

there seems to still be a difference

#

You know what

#

its fine

dusky harness
#

Yeah it's probably a font difference since I don't think bolded letters look like that either (and the arrows are a bit different)

tribal ingot
#

yeah

#

thanks

pine flax
dusky harness
#

it requires latest (or a newer) version of adventure

pine flax
#

Shading an older version of mini doesn’t work?

dusky harness
#

iirc minimessage isn't that old

#

so there isn't an available version

#

unfortunately

#

or actually the server owner removed a bunch of their servers so I'll ask again

steep dragon
#

all older versions of minimessage were snapshots because the lib wasn't finished yet

lyric gyro
#

minimessage bad?

steep dragon
#

shut up emily

lyric gyro
#

u3u

steep dragon
#

xoxo

dusky harness
#

probably cache the data when the player logs in in async event

#

into like a Map<UUID, PlayerData>

#

and also classes should be NamedLikeThis

#

notLikeThis (playerStorage)

#

so maybe Map<UUID, PlayerStorage>

#

It should be AsyncPlayerPreLoginEvent btw

#

you want to run it async

#

so that event should work

#

just remember to update that cache whenever setting stuff to the database or else it's gonna desync

torn heart
#

is it at all possible to have pitch on an armorstand's head?

#

Location#setPitch doesn't seem to change the actual rotation of the head

torn heart
#

so i just need to convert the dir vector into that right

worn jasper
#

Okay bois, here I am again 😎 idk why, but I am getting this error here: https://paste.helpch.at/ezupihokax.rb
I already had it before, and also got told it was a corrupted jar, so I recompiled it, didn't change anything... recompiled again, nothing. Restart Intellij, cause why not, compiled it, same thing. I am legit confused.

#

Since last time I had this issue, recompiling worked.

#

Now it doesn't

tight junco
#

usually whenever i have that error

#

its bcause i didnt wait until gradle properly finished the compiling

worn jasper
tight junco
#

i have no idea

#

i'd just wait a second or two once its finished compiling

lyric gyro
#

skill issue

stuck canopy
neat pierBOT
# stuck canopy error: https://paste.helpch.at/feqozegima.css
Possible Solution Found:

The plugin (or program) you are trying to use was compiled using a newer Java version than the one you using.
To find what version you need, start from 52 which is Java 8 and for example, 60 is Java 16. (8 + 8 = 16 => 52 + 8 = 60)

stuck canopy
#

worked

lyric gyro
#

damn

#

good job barry

rain wasp
#

@fringe spruce you got dms disabled

worn jasper
tight junco
#

reset your .gradle & .intellij?

#

and build file

worn jasper
trail burrow
#

having trouble checking if plugin is enabled because there are two plugins with same name Bukkit.getPluginManager().getPlugin("Quests");

mellow pond
#

Just rename it

#

Easy

#

Recaf it and change Name to like quest2

#

(might work)

tight junco
#

if you need a specific one you're probably best checking authors

trail burrow
#

yes, just not sure how to check for authors

tight junco
#

Plugin#getDescription().getAuthors()

#

wack

#

ive been scammed

trail burrow
#

Thanks, I figured out a work around, but would like to go back to how it was setup in the first place

dusky harness
dark garnet
#

hi, so i have a bunch of yml files in my resources directory of my plugin
i want to get one of those yml files (file A), turn it into a yamlconfiguration, and then loop through each key
in the loop, it will set the value of the same key in another yamlconfiguration (file B), effectively copying the contents from the first yamlconfiguration to the second

what i want in the end: YML file A's (from plugin resources) values are set in YAML file B without removing the other keys/values in YAML file B

#

im struggling with getting the yamlconfiguration from the plugin's resources
ping me if u reply

dense drift
dark garnet
#
Ambiguous plugin name `LuckPerms' for files `plugins/LuckPerms.jar' and `plugins/PluginDownloader-1.0.0.jar' in `plugins'```*just set `name` to `LuckPerms` for my own plugin and also ran the actual LuckPerms*
dark garnet
dark garnet
#

when it logs ONE, its just empty, so i think something is going wrong with YamlConfiguration#loadConfiguration(File), im just not sure how to figure out what

dusky harness
dark garnet
#

specifically:

try {
    logger.severe("ZERO: " + Files.asCharSource(new File(url.getFile()), StandardCharsets.UTF_8).read());
} catch (IOException e) {
    e.printStackTrace();
}```
#

it fails with this exception: java.io.FileNotFoundException: file:/home/container/plugins/PluginDownloader-1.0.0.jar!/configs/test.yml (No such file or directory)

dusky harness
#

iirc

#

you gotta use an InputStream

pine flax
#

Plugin#saveResource -> new File(Plugin#getDataFolder, file) -> YamlConfiguration.load(file) ?

dark garnet
#

im trying to avoid saving it

#

cause then afterward i gotta deal with deleting the files

dusky harness
#

like Class#getClassLoader().getResourceAsStream

dark garnet
dusky harness
#

idk if the url method works and unless you want to test

#

you can use this

#

😃

dark garnet
#

nono nvm ill use that

dusky harness
#

😃 😃 😈

dark garnet
#

now i have to figure out streams 😭

leaden sinew
#

They’re sort of similar to rivers

dark garnet
#

oh hi motf

dusky harness
#

motf

#

I'm gonna call you motf now

dark garnet
#

what a strange coincidence, im making my own pluginchecker >:)

dusky harness
#

plugin checker?

#

like update checker?

dark garnet
#

no not update checker

leaden sinew
dusky harness
dark garnet
#

but now i know how to code, so im making my own except mine will download the plugins (instead of just checking if they exist)

dusky harness
#

oh

#

interesting

leaden sinew
dusky harness
#

time goes zoom

#

fast

dark garnet
leaden sinew
#

Lol everyone has to start somewhere

#

You should see the first things I made

dark garnet
leaden sinew
#

Lol

#

It’s never a bad thing if someone you help becomes better than you

dusky harness
#

it's

leaden sinew
#

Yes

leaden sinew
dark garnet
#

omg

lyric gyro
#

@dark garnet Too many emojis.

dark garnet
#

😭

dark garnet
leaden sinew
#

Why are you using input streams?

dark garnet
#

idk kotlin told me to

lyric gyro
#

kotlin?

leaden sinew
#

Why not just files?

dark garnet
#

yea the language

dark garnet
leaden sinew
#

Spigot already has a YAML library you can use

leaden sinew
dark garnet
dark garnet
lyric gyro
#
YamlConfiguration config;
try (final Reader reader = new InputStreamReader(MyClass.class.getResourceAsStream("/poo.yml"))) {
  config = YamlConfiguration.loadConfiguration(reader);
}
dark garnet
#

oh

lyric gyro
#

you can't get a File of something from inside the jar

dark garnet
dusky harness
#

I forgot about /

#

so i just told him to use classloader and getResourceAsStream

lyric gyro
#

I mean there's also FileConfiguration#load(Reader) lol

dusky harness
#

which ig does similar thing anyways

dark garnet
#

like .properties

lyric gyro
#

sure

#

you just need to subclass it for a properties file save/load logic

dark garnet
lyric gyro
#

yes there is

dark garnet
#

i dont have it, only createPath

lyric gyro
#

It most definitely does exist

lyric gyro
#

I'm looking at it right now

dark garnet
lyric gyro
dark garnet
#

what library

lyric gyro
#

bukkit

dark garnet
#

what?!??!?!

lyric gyro
#

🥴

dark garnet
#

bro it lying

#

its not static

lyric gyro
#

I never said it was

dark garnet
#

oh

#

how do i get a fileconfiguration then hmmmmm

lyric gyro
#

YamlConfiguration extends FileConfiguration

dark garnet
#

what can i use for non-yml files tho

lyric gyro
#

?

dusky harness
#

spigot doesn't have anything built in

#

unless you mean gson

dark garnet
dusky harness
#

gson is built in right

lyric gyro
#

sure

dusky harness
#

yamlconfiguration 💩

#

kotlinx 😌

lyric gyro
#

jackson my beloved

leaden sinew
#

What about EmmySON

#

I heard that was the best

lyric gyro
#

about what now?

#

you must be delusional

#

B.A.A.S - Too many caps!
No need to shout.
Barry's Anti Abuse System | v1.4.7

jade wave
lyric gyro
#

of course you did

dusky harness
#

:(

lyric gyro
#

moderation bypass may lead to punishment

dusky harness
#

what are you talking about

lyric gyro
#

#staff-logs

dusky harness
#

no

#

No

lyric gyro
#

yes

#

Yes

dusky harness
#

never

#

emily

lyric gyro
#

kotlin != emily

dusky harness
#

it sucks when you forget to close resources in settings.gradle.kts

#

woah cmon emily
putting a big commit and naming it only part of the commit

#

wow

#

oh it's only 29 modifications

#

it looked a lot bigger

lyric gyro
#

what's so big about it?

dusky harness
#

many files

#

= big

#

😌

#

renovatebot is awesome

#

everyone should use it!!

lyric gyro
#

fuck no, I don't want my email inbox spammed by that shit

dusky harness
#

gmail automatically flagged github as spam 💀 💀 💀

dark garnet
#

guys it work :)

#
    /**
     * Transfer the file from the plugin to the server
     */
    public void transfer() {
        // Get the file's InputStream
        final InputStream stream = getClass().getResourceAsStream("/configs/" + path);
        if (stream == null) {
            PluginDownloader.logger.severe("&4" + path + "&8|&c File not found!");
            return;
        }

        // Transfer values
        try (final Reader reader = new InputStreamReader(stream)) {
            final YamlConfiguration yaml = YamlConfiguration.loadConfiguration(reader);
            yaml.getKeys(true).forEach(key -> config.set(key, yaml.get(key)));
            config.save(new File(PluginDownloader.pluginsFolder.getParent(), path));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }```
dark garnet
#

now i have new issue :(

#

i dont know how to get like a list of all the files in the jar file (resources)

#

nvm i figured it out :)

icy shadow
#

yw

dark garnet
#

ok now new issue

#

so ive successfully set up both transfer processes for .yml and .properties, but im struggling with .png (since its not a text file). how do i copy the file using Reader onto the server?

#

github copilot told me to do this:

private void png(@NotNull Reader reader) throws IOException {
    final byte[] buffer = new byte[1024];
    int numRead;
    try (final FileOutputStream output = new FileOutputStream(file)) {
        while ((numRead = reader.read(buffer)) > 0) output.write(buffer, 0, numRead);
    }
}```but there were some issues with it (`Reader#read(byte[]` doesnt exist and when i just used `Reader#read` it broke)
rotund sand
#

Question.. Do you have these files inside of your resources folder of your jar?

#

if so you can use JavaPlugin#saveResource() lol

#

which copies any resource from your resources folder that you want into your plugin folder (atleast it works for YAML and property files, never tried it with pngs, but it should)

dark garnet
#

@dark garnet remember to do this later

hoary scarab
#

You have to check if that plugin has an API and cancel its events if it has any

tight junco
#

Just wondering if anyone knows how to get an itemstack compound tag without use of NMS

#

Your event priority is on lowest, event priority is in complete reverse

#

wait

#

i might be stupid

#

yeah that is actually one of the worst event apis ive ever seen

#

or at least wikis

#

Yeah i think you need to try and stop the telepathy event from actually firing to get it to work

#

Yeah telepathy wont trigger the EntityPickupItenEvent because the player isnt picking up the item with telepathy

#

unless it manually fires that event which it probably doesn't

ebon whale
#

if it did, itd detect it

tight junco
#

i think maybe your best chance is EnchantActivateEvent?

#

that event is inside the api from what i can see

#

I can see in the AEAPI class it has a SkipEnchantActivateion(UUID<AEnchantmentType) maybe?

#

so maybe onBlockBreakEvent, if item is filtered, skipEnchantActivation

#

working with plugins that have garbage apis is mostly just about finding the most jank ways around it

tight junco
#

gotta try to do it without nms or adventure api

lyric gyro
#

getAsString or whatever

#

check javadoc

tight junco
#

i need to do it in base spigot

#

can't use paper Sadge

lyric gyro
#

Reflection it is then

tight junco
#

woo Copege

hoary scarab
#

Spigot doesn't offer api for alot NMS, Then they complain when you use it when their API doesn't have methods to access what you need lol

worn jasper
#

Jokes on y'all still haven't fixed my jar corruption problem lmao

#

literally someone help

tired olive
#

Nvm

tight junco
#

be quiet 300/month

dark garnet
#

dont wanna deal with moving the file after its saved, just wanna save it straight to where it should be

thorn cape
#

How would I change the font in a Title?(java)

dark garnet
# thorn cape How would I change the font in a Title?(java)

A) change entire game font
B) create an alphabet of characters that u want to use and save them as images. then put together those imgs to create the string u want
ik B is possible somehow with like unicode characters and resourcepack stuff but im not 100% how

dusky harness
#

no matter what you're going to need a custom resource pack

#

you can either change the general font or use unused unicode characters and set those to your custom font

#

I don't touch resource packs so I don't know exactly how to do it like srnyx

thorn cape
dark garnet
lyric gyro
#

I mean the title is just a component, and components can have fonts specified to them

#

Obviously the client needs to have the font for which you need a resource pack but that's far easier than hacking with unicode shit lol

dusky harness
#

ah I didn't know there were different font options

#

since minecraft iirc only has default font?

lyric gyro
#

sure

#

actually it has another one I think

dusky harness
#

o

lyric gyro
#

the uh one for enchantment table stuff

dusky harness
#

oh maybe

lyric gyro
#

is it possible to use some sort of any hoe syntax instead of checking for each type of hoe

spiral prairie
#

That oddly sounds sus

dense drift
#

Material#name endsWith("_HOE")

sharp hemlock
#

does anyone know how to launch a player in a boat properly? It seems like boats are very limited to how velocity and teleporting works.

I've kind of done it, but sometimes it doesn't launch the player all the way up into the sky and launches them half and then glitches straight back down.

        Vector currentVelocity = /*entity.getVelocity*/ new Vector(0.5, 0, 0.5);
        boat.setVelocity(new Vector(0, 0, 0));
        Bukkit.getScheduler().runTaskLater(BoatRace.getInstance(), () -> {
            boat.setVelocity(currentVelocity.multiply(power).setY(1.5D));
        }, 2L);

It works just fine if you're in a minecart by just adding a Y to the current minecart velocity. But unfortunately im creating a launchpad for a boat race.

I was thinking maybe i could trick the player they're riding a boat when they hit the launchpad, and make the server know its actually a minecart until they land again

proud pebble
#

or do gaby's method

pine flax
#

MaterialSetTag.HOES.isTagged(material)

lyric gyro
#

MaterialTags relieved

dark garnet
#

anyone know if theres a method to get level-name from server.properties?

#

or do i gotta read the file myself and then get the value
ping if reply

proud pebble
#

i would say with certainty that the first world to load is the main overworld, theres no way afaik to prevent the default overworld from loading

#

if that feels too possible to be wrong then reading the server.properties files is the best way

lyric gyro
#

ooooo, thanks!

dark garnet
proud pebble
#

i would assume

#

and afaik you cant load and worlds before the main ones afaik

lyric gyro
#

But.. yeah OMEGAWHEELCHAIR

Just don't use it.

dusky harness
#

why are those all in UnsafeValues?

#

A lot of those seem actually useful

#

oh wait

#

I was gonna mention getItemRarity but that's in ItemStack already

#

I'm assuming the others also have the methods in their own classes

#

but what about getMainLevelName?

spiral prairie
#

Wtf is this happening

#

Both maps are the same

#

WrappableItem and wrapFile.getWraps

sterile hinge
#

? extends A is not equal to ? extends A

spiral prairie
#

What

#

? Extends A was the only way it would work with the API

sterile hinge
#
List<? extends Number> l0 = new ArrayList<BigInteger>();
List<? extends Number> l1 = new ArrayList<BigDecimal>();

while both l0 and l1 have the "same" type parameter, you can't just put elements from one into the other

spiral prairie
#

I see

sterile hinge
#

generally, ? extends A is for producers only, it can't be used to consume something

spiral prairie
#

I want people to have access to the map, without them having access to the internal class

#

And afaik just IWrappableItem didnt work

#

Can't try rn though

#

Welp

sterile hinge
#

I mean those could be totally different implementations, you can't just put them in other maps

spiral prairie
#

Yeah but how do i fix that

#

I see the problem, just not the solution

sterile hinge
#

Well don’t write sich code

spiral prairie
#

Ok...

sterile hinge
#

tell me how

lyric gyro
#

i'd rather not

lyric gyro
#

How can i set a death message just for deaths from the / kill command ?

spiral prairie
haughty zodiac
#

Hey, might be a weird question but ill try explain the best i can. Sorry if this is not in the right channel.

So I'm using a custom resourcepack (unicodes) to display custom images in chat and Tab, such as ranks.

However, this does make things look ugly if you decide to play without the pack. I noticed on a larger server that they do the same thing i do but if you dont play with the resourcepack it will replace with a different prefix in replace of the image such as Sr Mod (images below).. my question is how would i go about doing this?

https://imgur.com/a/q5LKleJ
https://imgur.com/a/aaOtfFg

lyric gyro
#

You can force for them to accept the resource pack to join

#

server.properties require-resource-pack

haughty zodiac
#

but.. thats not my question im saying if they wish not to play with the pack, how can i replace the image with text

lyric gyro
#

I mean I gave one solution to the problem which might be desirable

haughty zodiac
#

Sorry if i seem short, iv been trying to figure it out for days

lyric gyro
#

Anyway, you can check the PlayerResourcePackStatusEvent for the acceptance status, and do a ton of ugly stuff based on whether they accepted it or not, how tablist/chat is displayed etc which is a huge pain in the ass to do per player

haughty zodiac
#

hm, never knew there was an event since i didnt look into that side of it too much, i will take alook! thanks

robust flower
#

I remember spigot have a "command utils" class with some useful methods (at least when coding in Java), do you guys remember what is its name?

lyric gyro
#

what kind of methods?

robust flower
#

methods useful for command completion like a case insensitive "startsWith" that operated on a String list

dusky harness
#

kotlin

#

😌

lyric gyro
#

StringUtil?

icy shadow
#

StringUtils bukkit

robust flower
#

yeah! StringUtils that is its name, thank you

robust flower
#

is there an event for item consumption (I'm thinking of firework rocket usage), something that is fired whenever bukkit decreases the number of an item by 1 in a player inventory?

proud pebble
dark garnet
#

Nvm there is only FireworkExplodeEvent which I highly doubt will be triggered when u use fireworks with an elytra (I assume u want to detect with elytra)

proud pebble
#

its the playerinteractevent

mystic gull
#

Hello,is there a way to get the drops of Nether warts ?

#

its empty and its the only block which the collection is empty

ionic seal
#

Does anyone know how to remove the /plugins command from users?

dusky harness
#

bukkit.command.plugins

#

it's given to all players by default

#

but you can set it to false

#

I'd recommend doing the same with bukkit.command.help

ionic seal
#

Sweet. I’ll try it. Thank you!

dusky harness
#

👍

opaque parrot
#

an mc client question: how would u set it up so people could login to their accounts inside the client, ie lunar etc.

ionic seal
#

Anyone know how to use LP and essentials to show tags & the prefix for the rank using LP, essentials, & deluxetags

proud hound
#

Yo

#

I need help

neat pierBOT
#

There is no time to wait! Ask your question @proud hound!

proud hound
#

In other servers I can’t send images or videos how do I resolve that

dusky harness
#

I don't remember which

#

I think tier 2

#

it depends on how the server owner configures the permissions

#

also #off-topic for discord related help (note that this is a minecraft support server - not a discord support server so discord stuff should be in the off topic channel)

opaque parrot
#

will javas garbage collection get rid of an object if a bukkit task is still running on it?

tired olive
mellow pond
#

it also allows u to see plugins

#

because of /about

dusky harness
#

Oh

lyric gyro
#

Why are people so adamant about hiding their plugins lol

leaden sinew
#

Because then people will see that they are cracked

hoary scarab
lyric gyro
#

that's dumb lol

river solstice
#

It's just annoying, is all

#

also some people might look through the list to find potential ways to fuck with the server if some plugin has some sort of a bug and whatnot

#

all in all, there are more pros than cons of hiding the plugins

hoary scarab
#

Yeah and Bstats make it easy to find what servers use bugged versions of plugins and then people go exploit those servers xD

dense drift
#

What

hoary scarab
# dense drift What

Servers that have bstats or plugin query ports (or other means) can be searched for and you can find servers using versions of plugins that have bugs and you can exploit those servers.

icy shadow
#

what exactly is your point here?

wheat carbon
#

he's arguing for hiding plugins

icy shadow
#

right... but if bstats is the problem then /plugins has nothing to do with it

wheat carbon
#

yapps wasn't directly responding to the /plugins question

#

rather to emily's more open ended question

hoary scarab
#

^^^

icy shadow
#

ah

#

ic

lyric gyro
lyric gyro
# river solstice It's just annoying, is all

How is it annoying? Players get to know what plugins you have -> players are able to know what things they can or cannot do, what kinds of features the server has they might not immediately advertise etc

#

Also, if your server can be copied by simply having the plugin list, and you worry about it, you have larger issues than that and your server is just a template not worth playing

tight junco
#

Reminder if people really want to copy a server, they dont need a plugin list

#

They could probably find any spigot plugin you have just by trial and error and knowing the name of a custom plugin is not gonna do much

dense drift
tight junco
#

Hypixel copies exist and they use custom plugins in almost every place

#

the only public plugin I know they use is headdb

#

but thats only for the builders and not on the actual server itself

wheat carbon
#

citizens

dense drift
#

World guard & edit

tight junco
#

yeah

#

but even then they dont entirely use worldedit

#

i dont think

wheat carbon
#

I doubt they use publicly available builds of any plugin

tight junco
#

Housing has its own worldedit like system in there

hoary scarab
sour phoenix
#

Is the code of deluxemenus open-sourrce?

#

I'm looking to fork a copy that will include functions unrelated to GUI assembly

#

Also what is the scope of the plugins access beyond the bukkit server instance

#

specifically, will there be any complications with backend functions like sending obfuscated tasks to the kernel

lyric gyro
#

bro what

icy shadow
#

what on earth

spiral prairie
#

huh

dusky harness
#

lol

marble nimbus
#

Hello Friends,

I need some Frontend help. Basically a Text I added is moving my whole navbar content to the left and I am not sure how to fix it. Could someone maybe tell me what I can do to fix it? https://play.tailwindcss.com/8CmWYbIFhB [You may need to move the code section to the left to see it]

Thanks

ionic seal
#

Is minestatus down for anyone else too?

wheat carbon
#

anyone know how to check if a chunk contains a structure, in a blockpopulator?

#

basically want to just not do anything in that chunk if it contains a structure

leaden sinew
wheat carbon
#

yeah that wouldn't work

#

not all chunks in a structure have chests

#

might just have to go through all the blocks and check if they're not grass, stone, etc

dusky harness
#

it must be possible though

#

even if it means using nms

#

since it works for the end structure (achievement)

#

idk what its called

wheat carbon
#

yeah don't really want to go the nms route

#

all good I made my own solution now

leaden sinew
#

How did you do it without nms?

leaden sinew
#

Oh nice, I guess it’s a bit easier because you only have to check in the populator and not after the chunk has already been created

wheat carbon
#

yeah was just hoping there'd be some way to see if a structure was in the chunk already

leaden sinew
#

That would be very nice

dense drift
#

what is that @wheat carbon

rugged bane
marble nimbus
marble nimbus
warm steppe
#

Has anyone here user react-native? If so, then why is this popping up?

#

It is inside of a class component constructor

rugged bane
#

to give you an idea

#

thats how I'd do it quick and easy

marble nimbus
#

Cool I will take a look when I am home, is this just playground you created or did you just "fix" my solution

rugged bane
#

a playground

stuck canopy
#

I’m working on a vehicle plugin. What is the best way to create smooth movements for the vehicle? I have a way in mind which is to change its velocity.

hoary scarab
#

Velocity is a good way to start. But with players its hard to keep smooth movements. (in relation to the players pos)

wheat carbon
#

trying to get back in coding groove

#

cuz uhhh

#

yeah

#

bit rusty after over a year of not coding

high edge
#

weak

cursive nest
cursive nest
#

noone 😦

lyric gyro
#

This is #development, most of us here have little to no knowledge regarding DeluxeMenus, which is why there are separate channels for the different kinds of support

icy shadow
#

true

dense drift
#

Id rather do anything code relate than memorize 50 pages of theory until monday LOL

wheat carbon
#

pff

#

that sounds so fun

dense drift
#

Idk how people can finish uni in these conditions

lyric gyro
#

kotlin = is typingtyping

icy shadow
#

really

#

i think you're lying

lyric gyro
#

really

#

i think you're lying

icy shadow
#

?

lyric gyro
#

?

icy shadow
#

stop that right now

lyric gyro
#

u mad? trollface

icy shadow
#

yes actually

#

steam is coming out of my ears

icy shadow
#

😡

dark garnet
#

Cause if so, you could send packets of the player holding/wearing an item that uses a custom vehicle model (or u can’t, idk, I’m not great with packets or resource packs)
Mysticat did something similar when making the player for his 2D Minecraft video

worn jasper
#

java.lang.IllegalArgumentException: Invalid UUID string: what this be?

#

how can an uuid be invalid?

icy shadow
#

"sex" is not a valid uuid string

lyric gyro
#

16:29]Brister Mitten: "sex" is not a valid uuid string is not a valid uuid string

icy shadow
#

True

#

Anyway hope that helps

worn jasper
#

lol

#

not sex

icy shadow
#

well then please provide the context rather than just saying the error message

worn jasper
#

so

#
{"data": {
   "balance": 0,
   "last-join": 1670008885057,
   "uuid": "03cbffb2-3027-4816-9333-4690b4bc7a01"
}}
``` this is currently stored in a json file
#

and when deserializing I am getting the uuid string and using UUID.fromString() and then creating my object

icy shadow
#

Show code

worn jasper
#

sus think I found the issue

#

gib me one second

#

ofc... json.getString("data.uuid~")...