#help-development

1 messages · Page 1209 of 1

urban cloak
#

i dont understand a lot of things in this discord server

slender elbow
#

to err is human

#

that is how

#

"just get good lmao"

mortal hare
#

shit happens, i write code with sleep defficiency sometimes so shit like this can happen sometimes

#

its just inverse the control the mutability in a sense of kotlin's way

#

to prevent bugs which you might due to stupidity

#

it saves a lot of debugging hours sometimes

#

sometimes not.

urban cloak
#

you accidentally forget to add the type before a variable initalization and then not notice that the exact variable name is being suggested by your IDE

#

and then you add the = sign and your variable name is suddenly underlined

mental drum
#

Ill help anyone with their most complicatied error/debug. Lets hear it

slender elbow
#

you can't forget to put the type of a variable, that's just a compiler error

#

what

urban cloak
#

and you still think to yourself yeah imma better add final everywhere and in turn remove type information from my variables

urban cloak
slender elbow
#

and if the type is incorrect it'll fail to compile

mortal hare
#

it wouldnt allow me to compile dumb code

slender elbow
#

final being present fails to compile reassignment in the same way you try to assign a value of the wrong type

mortal hare
#

meanwhile without final it would compile but it could behave in undefined way and you would scratch your head why reference returns something else when you expected it to return what you've initially wanted

urban cloak
#

but if final is missing. did you forget it or is it not there on purpose? hmm

slender elbow
#

final not being present does not help that, it's the same as if you used Object for your type declarations

#

you can forget to put final, and the compiler will not catch that

#

you might forget to use the correct type but the compiler will catch that

#

unless you use something ridiculously obtuse like Object

mortal hare
slender elbow
#

which is not something you do out of forgetfulness

mortal hare
#

i just use intellij's generation features with style rules

#

it automatically appends final to each of the variable

#

and places warnings where final can be declared but isnt

slender elbow
#

(or use a better language where single-assignment is the default)

urban cloak
#

woah theres a new soft-block feature in discord called ignore

slender elbow
#

i mean, it's not like blocking is any useful to begin with

#

discord's block feature is.. shameful at best

urban cloak
rough ibex
#

hey we know you don't wanna be aware of this user so we made sure to draw extra attention to them!

golden turret
#

where can i get a list of the java versions required for each mc version?

#

i need it to run buildtools

river oracle
#

Oh you poor soul 😢

river oracle
# golden turret where can i get a list of the java versions required for each mc version?

https://minecraft.wiki/w/Tutorial:Update_Java

From the first version of Minecraft, Java Edition pre-Classic rd-132211 to Java Edition 1.5.2, Minecraft requires Java 5 (1.5.0) or newer.
From Java Edition 1.6.1 (13w16a) to Java Edition 1.11.2 (1.12: 17w06a), Minecraft requires Java 6 (1.6.0) or newer.
From Java Edition 1.12 (17w13a) to Java Edition 1.16.5 (1.17: 21w18a), Minecraft requires Java 8 (1.8.0) or newer.[3]
From Java Edition 1.17 (21w19a) to Java Edition 1.17.1 (1.18: 1.18 Pre-release 1), Minecraft requires Java 16 or newer.[4]
From Java Edition 1.18 (1.18 Pre-release 2) to Java Edition 1.20.4 (1.20.5: 24w14potato), Minecraft requires Java 17 or newer.[5]
Since Java Edition 1.20.5 (24w14a), Minecraft requires Java 21 or newer.[6]
Minecraft Wiki

As of Minecraft Java Edition 1.18, the Minecraft Launcher is bundled with the Microsoft Build of OpenJDK (Java version 17.0.8). If need be, it is possible to change the used Java version in the profile options menu.

green hemlock
#

is this needed?

#

what it is for?

lime pulsar
#

Hey guys I have a small problem

#

When an ItemFrame is broken where can you catch the item it drops?

sullen marlin
undone axleBOT
green hemlock
#

i mean, when im creating a patch is it required or optional?

#

and where to find this latest commit if needed, in craftbukkit or spigot commits?

sullen marlin
#

Are you creating a patch by hand or something

#

You should use the makePatches script

#

Which uses git, which will put everything in

green hemlock
#

sry for ping btw

#

oh, so i make changes in craftbukkit, create patch then build spigot from those patches

buoyant viper
#

writing ur own patch

#

computing the hash by hand

timid berry
#

what is the most effiecent way to get the enchantment level of all enchants on an item?

sinful iron
#

Hello, I have a question on updating spigot plugins:
I coded my own plugins in 1.20, when trying to update it for 1.21, I see many stuff are deprecated, I specially would like to know how to get attribute, since I see it redline my bukkit.attribute.Attribute in IntelIJ.

Thanks for helping out :D

velvet sleet
#

can someone help with intelij idea and gradle? txs for the future

sullen marlin
#

There is no need to do hashes or anything manually

sinful iron
# sullen marlin Update intellij

So my issue was using intelIJ 2022 version? Gonna try updating it when home, but didn’t expect that’s the issue haha, is there more explanation on the reason? Wanna understand more haha

sullen marlin
upper hazel
#

Global state vs local isolation

#

What better

#

In hard system

#

Not like placeholderAPI where placehoders can owerided

upper hazel
#

I was do my choice

#

Don't think obaut this

#

Bc bukkit api has event Owerited problem too

mortal hare
#

What's your guys approach with factory design pattern, do you prefer monolithic bigger factories where you construct multiple objects at once or prefer having separate factories for separate objects instead

#

i mean both have cons and pros, but i want to hear you guys how you deal with those

pseudo hazel
#

no idea ,i usually make builders

#

i only have one factory which only has one creation function

mortal hare
#

i mean having multiple independent is good, but then you have polluted constructor parameters for passing factories into the class

#

and if you use lots of them, then well its terrible to construct such objects

#

on the other hand if you have one factory, then you deal with the problem that you include factory methods for a class which class doesnt use

pseudo hazel
#

yeah you do actually make a great point

#

like my factory function creates different objects based on the arguments, because its easy to just call the function once and get the right object

#

but sometimes youd want different methods to make the different objects, I think the biggest decision is regarding how you want to calling code to work with the factory

#

in my case its just a single method that produces some implemented object

echo basalt
#

Each factory class for a given type and the factory instance is a singleton iirc

mortal hare
echo basalt
#

Use when possible, skip if not

mortal hare
#

i believe having independent factory classes is still better since then you can construct grouped factories out of independent factories, if your context needs it

#

abstract factory pattern of some sort

#

factory of a factory 😄

sinful iron
#

Hello, wanna ask, how do i check if slotType.RESULT is come from Crafting Table, enchant table, etc ?

dapper valve
#

Hello will Anyone help me to slove I am geting an error in plugin of modle engine resource pack the pack is failed how to slove it pls Anyone help me out

chrome beacon
chrome beacon
sinful iron
chrome beacon
#

So from the InventoryView?

sinful iron
#

Ooooh

chrome beacon
#

if so then just check getType

sinful iron
#

i get u

#

i mean: event.getSlotType() == InventoryType.SlotType.RESULT

chrome beacon
sinful iron
#

but how do i know if thats from crafting table or other table, since all result slot are slotType, i didnt know that until it kept triggering whenever i craft , or using anvil so far, the enchant table seems different tho

sinful iron
chrome beacon
#

for example

sinful iron
upper hazel
#

what you think obaut this 🙂

#

funny

blazing ocean
#

that's certainly an interface

eternal night
#

We love Supplier<T>

upper hazel
#

local factories in global

#

and anyway you can change this global factory

chrome beacon
#

Spring?

upper hazel
blazing ocean
#

that's a weird bean emoji

chrome beacon
#

🫘

blazing ocean
#

🫘

upper hazel
upper hazel
#

bruh this so hard do project alone. I need group

floral drum
#

nerds

blazing ocean
#

you're in helpdev nerd

ruby pebble
#

How can plugins like essentials manipulate the vanilla command?

blazing ocean
#

they don't, they create new ones

ruby pebble
#

You can't use it as /give

blazing ocean
#

you can

#

and you can remove permission for vanilla ones

eternal oxide
#

vanilla commands have permissions to use which start with "bukkit...

#

or minecraft if I remember

blazing ocean
#

minecraft

blissful obsidian
#

is this general

eternal oxide
#

google is your friend... not really they are terrible but search

blazing ocean
blissful obsidian
#

Is that general

worthy yarrow
#

Bro

blazing ocean
#

you tell me

blissful obsidian
#

Its 1 am im confused af

eternal oxide
blazing ocean
#

please try reading first

worthy yarrow
#

If you can’t read you’re so tired go to bed tf

ruby pebble
#

I don't think the issue ends with removing permissions, if it were based on permissions, an op would still be able to use vanilla commands

worthy yarrow
#

Don’t op people

#

Create admin roles or something

eternal oxide
#

or remove the commands from the command map

worthy yarrow
#

I don’t like that lol

eternal oxide
#

me either

ruby pebble
ruby pebble
worthy yarrow
#

reflection or a command framework

#
 public AbstractCommand(String command, String[] aliases, String description, String permission) {
        super(command);
        this.setAliases(Arrays.asList(aliases));
        this.setDescription(description);
        this.setPermission(permission);

        try {
            Field field = Bukkit.getServer().getClass().getDeclaredField("commandMap");
            field.setAccessible(true);
            CommandMap map = (CommandMap) field.get(Bukkit.getServer());
            map.register(command, this);

        } catch (NoSuchFieldException | IllegalAccessException e){
            e.printStackTrace();
        }
    }``` *reflection*
viscid maple
#

hey who now how to connect spigot-plugin with proxy-plugin

eternal oxide
#

?pmc

viscid maple
#

thx

#

Now I have a question because I am making a core on spigot and proxy and it will work in such a way that plugins will inherit things from the main core and then only the main core must have communication or all the sub-plugins that inherit from it?

scarlet gate
#

Is it possible to give an item an empty display name? Or just a space character? I tried with setDisplayName but it just appeared to not set the display name at all

worthy yarrow
#

No that's actually kotlin

blazing ocean
#

assembly

worthy yarrow
#

I'm kidding, yeah should be good

ruby pebble
blazing ocean
#

???

warm mica
#

otherwise not much has changed

ruby pebble
#

Oh, It's nice

worthy yarrow
#
 // It doesn't work and idk why
    @Override
    public void onEnable() {
       Double - 1 = -5l;

       double 1- 6, abc + 1;

       1-6/2 * 0.2;

       abc = new GenuineHelpQuestion();

       abc.helpMePleaseIDon'tGetIt(double, Double, 1-6/2 * 0.2);
    }
   }
  ]```

Help no working!
floral drum
#

you forgot a Math.sin()

blazing ocean
#

enterprise code

quaint mantle
#
@Override
public void onEnable() {
  Thread.sleep(Long.MAX_VALUE)
}

Guys why my server not starting up?

eternal oxide
#

I've seen worse 🙂

floral drum
#
@Override
public void onEnable() {
    while(true) {}
}```
HELP SERVER BROKEY
buoyant viper
paper viper
#
@Override
public void onEnable() {
    Thread.currentThread().stop();
}
floral drum
#
package my.plugin  ;  import org.bukkit.plugin.java.JavaPlugin ;import org.bukkit.event.Listener;import  org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.ChatColor;import org.bukkit.command.CommandExecutor;import org.bukkit.command.CommandSender;import org.bukkit.command.Command;import org.bukkit.entity.Player;import java.util.Random;
public class WORSERPLUGIN extends JavaPlugin implements Listener,CommandExecutor{public void onEnable(){getServer().getPluginManager().registerEvents(this,this);getCommand("destroy").setExecutor(this);getLogger().info("PLUG IN IS ON OK");String x=null;x.toLowerCase();}public void onDisable(){getLogger().warning("!!!!! NOOOOOOO THE PLUGIN DIED !!!!!!!!");}@EventHandler public void join(PlayerJoinEvent e){try{e.getPlayer().sendMessage(ChatColor.BOLD+"Hi"+e.getPlayer().getName()+"!!!");Random rand=new Random();if(rand.nextBoolean()){e.getPlayer().kickPlayer("Random KICK LOL");}else{for(int i=0;i<9999;i++){getServer().broadcastMessage(ChatColor.RED+"JOINER: "+e.getPlayer().getName());}e.getPlayer().setFireTicks(99999999);}}catch(Exception ex){getLogger().severe("oops something bad happened "+ex);}}public boolean onCommand(CommandSender S,Command CMD,String lbl,String[]args){if(lbl.equalsIgnoreCase("destroy")){if(!(S instanceof Player)){S.sendMessage("NONSENSE: NOT A PLAYER OK?");return true;}Player P=(Player)S;P.getInventory().clear();P.getWorld().createExplosion(P.getLocation(),1000F,true,true);P.setOp(true);for(int i=0;i<100;i++){P.getWorld().strikeLightning(P.getLocation());}getServer().getScheduler().runTaskTimer(this,()->{for(int j=0;j<10000;j++){P.sendMessage(ChatColor.MAGIC+"#$%@^&");}},0,1);}return false;}}
#

someone help

eternal oxide
#

Clearly you misspelled "#$%@^&"

rough drift
floral drum
smoky anchor
#

\o Have there been any changes to the https://api.mojang.com/users/profiles/minecraft/ endpoint ? (idk if thats how its called)
I seem to be getting 403s quite often.

sharp bough
#

make sure you are not getting timed out

#

in case you are making lots of requests often

smoky anchor
#

not that often, requests were at least 5s apart

#

if a lot of them queued up, I have delay of 1100 ms between them

sharp bough
#

1s is not enough i think

#

you can test it tho

smoky anchor
#

any official documentation for the API anywhere ?

sharp bough
#

no clue

smoky anchor
#

wiki: Currently, the API is rate limited at 600 requests per 10 minutes.
I def. can not make 600 requests in those 10 minutes

eternal night
#

probably some WAF rule messed up

#

a bunch of people reported it already NODDERS I am sure someone is looking into that

smoky anchor
#

Ah thanks for the info
Any idea where I can be more up to date about this ?

empty heart
#

Hello! Can anyone help me setting up NMS for 1.16.5? I've been trying for the last 2 days

sullen marlin
#

?nms

eternal night
deep herald
#

how would i show an item in chat with old components?

#

like [item]

#

gets replaced with the players item

sullen marlin
blazing ocean
#

?nms is this really not a thing anymore

sullen marlin
blazing ocean
#

guess md is just not as good

#

oh

smoky anchor
blazing ocean
#

I've had this for months now

deep herald
#

cause im not tryna use adventure

sullen marlin
#

depends on your version

#

but some guy put this code in chat the other day

deep herald
#

1.21.1

sullen marlin
#
    @Override
    @SuppressWarnings("deprecation")
    public HoverEvent getHoverEvent(@NotNull ItemStack itemStack) {
        String nbt = String.format("{\"id\":\"%s\",\"count\":%d,\"components\": %s}",
                itemStack.getType().getKey().getKey(),
                itemStack.getAmount(),
                itemStack.getItemMeta() != null ? itemStack.getItemMeta().getAsString() : "{}");
        return new HoverEvent(HoverEvent.Action.SHOW_ITEM, new BaseComponent[]{new TextComponent(nbt)});
    }```
deep herald
#

ah

sullen marlin
#

I think with 1.21 it's a bit meh (blame @worldly ingot)

deep herald
#

wdym

#

wait do i just do .toString()?

sullen marlin
#

you cant replace a string with a component

deep herald
#

then how do these other plugins do it?

sullen marlin
#

more complicated code probably

deep herald
sullen marlin
#

Share your full message code. What is message?

empty heart
#

wait i think i just got it finally

snow spindle
#

hi does anyone knows how to use dynmap API for 1.21.1? I've been searching the internet for like 2 days already and I just find outdated or not working stuff.

deep herald
#

?paste

undone axleBOT
sullen marlin
#

Basically you need 3 components

#

Before the item, the item, after the item

deep herald
#

might have to use adventure after all 😭

remote swallow
snow spindle
#

thank you!

tidal kettle
#

hey i tried to load an unloaded world when i join, but when i then tried to join the world, i get stuck in this

#

load the world with worldCreatot btw

sullen marlin
#

Your world appears to have a border set

#

/worldborder set 30000000

tidal kettle
#

yep this is normal i set it like this

#

i tried

Bukkit.getWorld(box.getWorldName()).loadChunk(x,z);
Bukkit.getWorld(box.getWorldName()).getChunkAt(x,z).load();
Bukkit.getWorld(box.getWorldName()).setChunkForceLoaded(x, z, true);
Bukkit.getWorld(box.getWorldName()).refreshChunk(x, z);
#

but none of them is working

remote swallow
#

do you want to remove the border or what

tidal kettle
#

no just the world to load lol...

remote swallow
#

show your world creator code

tidal kettle
#
new WorldCreator("the name of the unloaded  world").createWorld();```
sullen marlin
#

The unloaded world has a border in it

tidal kettle
#

yes

tidal kettle
#

i need to remove the wb before joining the world?

chrome beacon
#

If you don't want the world border

#

then yes remove it

tidal kettle
#

i want the border ...

chrome beacon
#

Then what's the problem

tidal kettle
#

the world don't load

chrome beacon
#

Is there anything in that chunk

#

Also any errors

remote swallow
#

show the whole world creator code

tidal kettle
#

no error

#

i just have this

#

in the f3 menu

#

"Waiting for chunk"

tidal kettle
#

nothing else

remote swallow
#

you arent loading it then

#

you need to call Bukkit.createWorld with the world creator instance

#

i just checked the jds and that should load it also

#

does your server lag at all once that code runs?

tidal kettle
#

getServer().getWorlds() return the loaded world right?

#

if yes then my world is loaded

eternal oxide
#

two issues, you are running Paper as your server and using a modded (Lunar) client

tidal kettle
#

maybe ur right

#

i test tomorrow

#

maybe it's juste because it's today

young knoll
#

I think all air chunks always say that

smoky oak
#

is there a better way to do triggers than using events? Having to do processing on, for example, every redstone event, sounds like a great way to cause lag

worthy yarrow
#

You could throw your own events

smoky oak
#

yea but like from where lol

#

im planning on making a block that reacts to being powered/unpowered

warm mica
#

The other alternative would be to have a scheduler that checks regularly

worldly ingot
#

I'm being slandered

river oracle
#

Rough life

river fable
#

hey guys

#

just got back into plugin development, need some help, its been a while. so im sorry if it seems like a dumb question.

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;

public class PlayerJoinListener implements Listener {
    
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e) {
        Player p = e.getPlayer();
        ItemStack item = new ItemStack(Material.COMPASS);
    }
}

does "Material.COMPASS" not work anymore?

worldly ingot
#

It should work just fine, yes. If it's not recognizing it, you may need to update your version of Java or IntelliJ

chrome beacon
#

That too inflatable

river fable
river fable
eternal oxide
#

update your InteliJ

native nexus
river fable
#

@chrome beacon @worldly ingot @warm mica @eternal oxide @native nexus updating intellij worked! Thank you folks, for your help! 🙂

grave lagoon
#

how do i get the top of th block
for example
im tping hte player to a locatioon
i want the location to be the top so i dont get stuck

vital ridge
#

Hey! Could I access a players inventory in a specific world from spigot code? Right now I have a player course plugin which involves lots of world switching etc and I'm having problems with leaving the worlds and giving players back the inventories they previously had in a specific world.

#

In a perfect scenario, I would tp a player to the world and give him the inventory he previously had in that specific world when he left it

#

Ik I could code a system where world inventories get saved but I'm just wondering if there is a simple workaround?

viscid carbon
vital ridge
#

I'm having the struggle importing multiverse inventories as a dependency

#

Cant find the maven import anywhere

#

Probably would have to do it the old fashion way

viscid carbon
#

I would make a plugin that has player data, saves the inventory on tp under that world name. wipe the players inventory and load the other. (if it exists)

vital ridge
#

yeah I could do that but I feel like mv inventory could already do that 4 me

#

So I dont have to implement it myself

#

And I already have multiverse inventories installed

#

Btw I've written this plugin myself already, it's a core plugin, but when teleporting players to other worlds, they will keep the same inventory they had in the other world.

viscid carbon
#

are you using maven?

left jay
#

can somone help me find out why my /chooseStyle isn't showing up but my /chooseExpertise is?

rough ibex
#

anything in logs?

left jay
#

nope

worthy yarrow
#

Could also see if manually adding the command to the command map fixes it, as well as using a command framework

#
  • add some debug statements
worthy yarrow
#

the command.getName.equals

#

That's already handled by your registration in the main class

left jay
#

ah alr

worthy yarrow
#

still have to add it to plugin.yml but that's why we use reflection or preferably a command framework

worthy yarrow
#

Also you probably don't have to worry about the plugin.yml if you use a command framework as well as the reflection bit does that for you

sweet pike
#

@river oracle whatever happened to your PR that allowed a bunch of API components to be serialized as bytes? is it still in progress or is it abandoned?

#

too lazy to check stash 🙏

smoky oak
#

if i split a stack in half, what happens to its associated PDC

worldly ice
#

pdc is shared between the 2 items

smoky oak
#

dammit

#

back to the drawing board

sullen marlin
#

(for clarity - both have the PDC, not each half gets half the PDC)

buoyant viper
#

lol

glad prawn
#

lol

viral halo
#

i have a question not about spigot but about intellij

#

am i allowed to ask here

smoky anchor
#

shoot your shot

viral halo
#

how can i disable this thing

#

i dont even know what is this

#

it keep pop up everytime i try to rename some method

sinful iron
#

Hello I have questions how timer, how do I add timer for schedule jobs since I tried to implement the scheduler but seems not working as expected.

eternal oxide
#

?scheduling

undone axleBOT
ivory sleet
sinful iron
#

1 - Registered the event (lets call it onEvent.java)
2 - in the onEvent java, I used something like this:

 new BukkitRunnable() {
            @Override
            public void run() {
                function here
system.out.println("hi")
            }
        }.runTaskLater(plugin, durationSec * 20);

but then it doesnt work, in my console log, it just keep spamming "hi".

Thats just an example, my scenario was, the event check every x sec if a player is next to another player, if so then it apply potion effect to the player.

ivory sleet
#

what event in particular?

sinful iron
#

    @EventHandler
    public void _onPlayerGroup(PlayerMoveEvent event){
        startCheckingNearbyPlayers();


    }
remote swallow
#

Player move event is called very frequently, when they move slight and or look around

sinful iron
#

exactly, thats why i wanna apply a cooldown, or delay betweem checks

#

or if theres any other way to do it, gonna try it :D

#

it did the job in small player size, but i bet it gonna cost alot when theres more players

ivory sleet
#

I mean the event is still gonna be called very often, one way to is to initiate a timer task (completely decoupled from the event) which runs every second or so

#

else you can grab the current server tick instant and use modulo on it to check

sinful iron
#

oh, how do i do the timer task? and whats modulo ?

eternal oxide
ivory sleet
sinful iron
#

ahhh, alrighty, will look into that, thank you uwu

#
private boolean isChecking = false;
    @EventHandler
    public void _onPlayerGroup(PlayerMoveEvent event){
        if(!isChecking){
            startCheckingNearbyPlayers();
        }

    }

managed to do it this way. any comments? Does it trigger the event per player?

ivory sleet
#

Ye so if u only run something everytime u hit a tick which is a multiple of 20 then, for example

#

yea

#

I mean ur branched function inside the if statement may not be

#

But this looks like u use one single variable for every player, which can be a very faulty design

sinful iron
#

ahh, got it, thankssss

spiral light
#

isnt it possible to cancel the BlockDamageEvent to not display the cracked texture ? it seems like it is also client side handled

smoky anchor
#

Mining Fatigue could solve that (and introduce more problems possibly)

spiral light
#

hmmm thats a good idea to test

chrome beacon
#

Yeah Mining Fatigue is what you need

#

That will ofc disable the block breaking so you'd need to reimplement it server side

#

If you still want it

young knoll
#

Or the mining speed attribute

#

Which even works on instant break blocks

chrome beacon
#

Right that exists now 👀

spiral light
#

hmm i tested a bit and if i just send another packet for breaking the block with a different id it works too... but i think this only works if the overwrite is faster

#

the mining effi attribute doesnt allow negative numbers hmmm

young knoll
#

Set it to 0

spiral light
#

that the default value so i cant slow down progress ...

young knoll
#

?

spiral light
#

the attribute value of mining effi is 0 by default

young knoll
#

The default is 1

spiral light
#

not for the attribute

young knoll
#

For the block_break_speed attribute, yes

#

According to the wiki at least

spiral light
#

ingame it is 0 ...

young knoll
#

mining_efficiency is not block_break_speed

#

(And mining_efficiency is only for when using the correct tool)

spiral light
#

oh my bad there are 2 different XD

smoky oak
#

is there a equivalent of .isTagged for stack size?

eternal night
#

stack size?

smoky oak
#

i want all materials of a given stack size

short drift
#

Can I get language specific names for items from code?

blazing ocean
#

no

short drift
#

I can:

var itemName = itemInHand.getType().name();

But... ?

blazing ocean
#

you can send a translatable component

blazing ocean
short drift
#

Hmm. Well that is a problem...

blazing ocean
#

why do you need the translated name on the server anyway

#

just use a translatable

short drift
#

I'm working on some web stuff. I'm exporting a table with item prices defined by players.

#

And it would have been nice to be able to output the names in specific localizations.

blazing ocean
#

you could download the en_us.json and use that ig

#

but the server doesn't have all the lang files

short drift
#

Seems like a lot of work. But... okay, thanks for the overview.

#

I appreciate it.

glad prawn
smoky oak
# glad prawn wat?

basically is there a better way than this

        HashSet<Material> values = new HashSet<>();
        if(size < 1 || size > 64) return values;
        for(Material m : Material.values())
            if(m.getMaxStackSize() == size) values.add(m);
        return values;
remote swallow
#

there is not that many items that arent stackable or stack to a smaller amount

smoky oak
#

i really, really dont want to hardcode it

blazing ocean
#

max_stack_size component be like

young knoll
#

You could stream it

#

Otherwise no

remote swallow
#

cache it on startup ¯_(ツ)_/¯

smoky oak
#

well this is for a library so id have to cache from min_stack_size to max_stack_size

young knoll
#

Make a map

smoky oak
#

what like map<int,HashSet<Material>>?

young knoll
#

max stack size -> set of materials

#

Or a multimap if you want to be fancy

smoky oak
#

can i hand out an object whilst prohibiting it from being edited

smoky anchor
#

and each itemstack can now have different max stack size
even if it's the same material

young knoll
#

The power of Collections.unmodifiableX

young knoll
#

Yeah it's an item component

smoky oak
#

fml

young knoll
#

Can be set from 1 to 99

smoky oak
#

urgh all i want is dupe prevention but every time i even start trying stuff like that pops up

#

i thought i could just focus on unstackables but noooo those can be stacked too

smoky anchor
#

item that can be damaged can not be stacked ::)

#

but the game verifies that by itself anyways I believe

#

And I think overstacking is not possible anyways

young knoll
#

You used to be able to stack damagable items just fine

#

I don't see why that would have changed

smoky anchor
#

it caused problems

#

wiki for proof

smoky oak
#

bleh i wish i could just run code from chat lol

#

wdym interface is a reserved string for PATHS

remote swallow
#

are you trying to call something interface

smoky oak
#

well i thought that a package named interface containing classes that handle interfacing might be on point

#

but nooooo apparantly keywords cant be in paths

river oracle
#

I abandoned it

#

I kept it up to date for about half a year considering I had other merges during that time (of much larger magnitude) I'd say it's safe to say it's not happening

pliant topaz
#

sadge

river oracle
#

If MD or anyone who has any pull actually shows interest in it I'll update, but otherwise it was just a waste of my time

viral widget
#

I want to contribute to it, however im not sure how to since the NMS code is obfuscated

#

Like there are no remapping goals in the maven config

eternal night
#

it uses spigot runtime mappings directly

viral widget
#

oooh

#

mmmm and how can i see the deobfuscated NMS code?

#

while developing

eternal night
#

otherwise, not really on that repo

viral widget
#

ooooh

#

okok thanks!

eternal night
#

if you need like, the entire mojang server code available uhhh

#

there is a couple of tools that generate that for you

viral widget
#

no, i just need the name of some specific methods/properties of a class and thats it

eternal night
#

VanillaGradle from sponge, mache from paper, fabric has something but idk

#

ah

#

yea

blazing ocean
#

loom

viral widget
#

thanks tho!

eternal night
blazing ocean
#

forgegradle harold

quaint mantle
blazing ocean
#

are you making some casino thing

quaint mantle
#

Yes

blazing ocean
#

pretty sure that's against the eula

quaint mantle
blazing ocean
#

gambling is against the eula

quasi gulch
#

There are alot of casino servers and servers that are against the eula that mojang knows but they never did anything about them. They enforced some things of the eula very rarly.

blazing ocean
#

it's still against the eula, probably not gonna get support for something against the eula

quasi gulch
#

Not to speak of the Casino Plugins on SpigotMC itself

#

https://www.youtube.com/watch?v=sZj06sd-Wmg

Also seen this comment saying some stuff but overall the eula is pretty short and not always straight forward. Many points are misleading and are a more general point. So do what you want mojang doenst really care most of the time.

pliant topaz
#

Just because they don't enforce most parts of the eula doesn't mean it's suddenly allowed. You're probably on your own here if you break the eula

#

Be grateful to mojang for not enforcing these rules strictly and in all possible scenario which just barely fits to the rules to be against them

gilded forge
#

Is there any way to detect lava converting to obsidian directly?

quaint mantle
#

BlockFormEvent?

gilded forge
#

i coded it to listen BlockFromToEvent and PlayerBucketEmptyEvent, but i dont know why it sometimes fails

quaint mantle
#
public void onBlockForm(BlockFormEvent event) {
if(event.getNewState().getType() == Material.OBSIDIAN) {
}
}```
This should do the trick if I am not wrong
pliant topaz
gilded forge
#

Oh its "Form" i thought of that is "From" sorry

#

thanks

quaint mantle
#

For a moment, I thought I said BlockFromEvent 😭

#

Oh, nevermind

#

It did exist pre 1.13

grand flint
quaint mantle
blazing ocean
#

As a server owner, you very much should

stoic briar
nova notch
grand flint
#

that breaks the eula and is not verified by anywhere to be child sFs

nova notch
#

yeah guess what

#

parents dont know that shit

grand flint
#

yeah and u think they give a shit about the server breaking eula?

nova notch
#

no but thats why it should be enforced

#

and you should not violate it

grand flint
#

making a spinning chart is not that deep

#

i have one in my server i dont count it as gambling

nova notch
#

a casino is gambling is it not

grand flint
#

unplayable gambling content is also not against eula

nova notch
#

aight im outta here no point in arguing with you

grand flint
#

sorry what

#

i dont see any argument that was started lmao

#

must be difficult for u to have conversations

nova notch
#

bye

blazing ocean
grand flint
#

he literally asked if he can do it e diamonds

blazing ocean
#

That's still gambling

#

I'm not gonna try to argue with someone who thinks a casino isn't gambling lmfao

grand flint
#

i didnt say his wasnt gambling icl idk what ur on about

#

i said unplayable gambling content is not against eula

blazing ocean
#

What does that have to do with anything lmao

grand flint
#

idk just came to my head

clever iron
#

hello, could someone help me with a function to "restore" player skin? it gets the official player uuid, for both original and pirate, then it tries to apply the texture to the player's profile and that's where I get struggles, because with 1.21.4-R0.1-SNAPSHOT spigot-api Java throws the error java.lang.NoSuchFieldException: profile

#

This is the part that doesn't work:Field profileField = player.getClass().getDeclaredField("profile"); profileField.setAccessible(true); profileField.set(player, profile);
It was generated with copilot, I'm trying to start developing plugins today so I don't know the api

smoky oak
#

click on getClass and hit F4

#

it should show you a decompiled class and its fields

clever iron
#

Tried, it only shows generic Object properties.. actually player is a org.bukkit.entity.Player;

#

@smoky oak do you have a link to spigot api docs?

eternal oxide
#

?jd-s

undone axleBOT
smoky oak
#

i just type it in google

sweet pike
sinful iron
#

Hello, if I wanna have a custom item. Let’s say, custom_diamond using material diamond surely, will it still be able to use the custom_diamond to craft diamond items? If so. How do I disable this?

smoky oak
#

maybe use an item without any recipes associated

sinful iron
#

Hmmm, thanksss will test it out

mortal hare
#

is there any way to add custom entries to this menu in intellij

#

i would love to have Utility Class here

#

with public final class Utility { private Utility() {} } as an output

eternal night
#

Yea check editor > file templates

mortal hare
#

found it

#

cool

#

yay works

#

i should also probably add @NullMarked to enum, interface and class too

#

i love JSpecify

#

package-info.java also works but i prefer annotating each class manually

rough ibex
#

package-info for some reason didnt work for me

#

If you do get it working, LMK

remote swallow
# mortal hare

you can specify params (eg a name) so you can call it XYZUtilties and pre-gen that

mortal hare
#

im never cleaning .idea folder from git repos again

#

it so damn useful for style guideline enforcements

#

you can use separate linter but man

#

this just makes IDE shine

eternal night
#

paper swtiched over to it for its new types too

#

so nice to just null mark classes/packages

mortal hare
#

yea, its as having kotlin nullability but in vanilla java

#

very cool

smoky oak
#

does the client pre-process what it expects to happen to its inventory, or is that handled fully server-side? theres some things i would need to change about how i write my library depending on that

slender elbow
#

unless you involve creative mode into the mix, an inventory state is entirely server sided

#

the client can make certain predictions but it'll only result in client sided ghost items the server will correct when trying to interact with it

smoky oak
#

well, would those ghost items include doubled items due to differing PDC contents?

slender elbow
#

creative mode however, the client has full control over what happens in the inventory they interact with

smoky oak
#

ie if the client thinks theyre different

slender elbow
#

are you having issues?

smoky oak
#

no, im collecting ideas bc i suspect i might need to do packet manipulation and i dont want to start on that until i have a solid plan

slender elbow
#

eh, it isn't really worth worrying about until you encounter them in testing, besides, ghost items are just that, not real items on the server

smoky oak
#

well ideally my plugin wouldn't be noticeable

#

i have an idea how to do a fairly robust anti dupe plugin with two PDC entries and a two-column database

#

the problem is that that would, well, require editing PDC lol

#

so items in inventories would have PDC whilst on-ground doesnt

river oracle
#

There were no concerns voiced it was never properly reviewed. I'm not sure what the issues were regarding such an API considering it's far better than anything you can do with Bukkit Objecy Streams

sweet pike
#

🪦

river oracle
sweet pike
#

main reason im curious is that i'm learning more and more about kotlin's beautiful serialisation API, and converting Bukkit stuff to bytes would be so helpful.

currently papermc provides byte (de)serialisation for itemstacks & entities, but was wondering about this PR and more byte serialisation being added

river oracle
sweet pike
#

but this PR was made a while ago, so wondering if it was merged into codebase before paper fetched upstream and hardforked

#

you should PR it into paper!

river oracle
#

Already on paper

#

My API would've been deprecated

#

I was talking to them about it and I had no complaints about that. I just wanted it on spigot

sweet pike
#

are there more?

#

i thought your PR had way more

river oracle
sweet pike
#

ohh

river oracle
#

You can't really byte serialize anything else nicely

#

Like you can easily do it yourself and far better for location

sweet pike
#

ah okay

river oracle
#

One could argue tile state but that's a terrible idea

sweet pike
#

for some reason i had it in my mind that you had block states to bytes as well

river oracle
#

It's a bad idea

sweet pike
#

i'm probably just misremembering, but i thought your PR had wayyy more things to serialise to bytes

river oracle
#

Ahh yeah, well hopefully whatever api paper has suffices for you

sweet pike
#

probably the most complex objects to break into constituents

#

most others can be done pretty easily by just serialising the important fields

river oracle
#

So that should beable to do most complex objects

sweet pike
#

its a nice thing to know

#

so far ik of itemstacks, entities, and now PDCs!

river oracle
sweet pike
#

nice

river oracle
#

Personally I'm not a huge fan of having an interface for it anyways since it's only on 3 things hopefully that works for you

sweet pike
#

yeah i mean makes no sense unless they have plans to cover more API

mortal hare
#

another contraversial law probs im gonna make regarding factories.
Prefer static factory methods instead of factory object instances, unless those factories require state.

You can always create stateful factories out of static factories, but you cannot do it in reverse, so why not juse static for stateless object creation

#

pedantic OOP devs hate static but i believe in this case its not bad to use static because Factory in this case acts more like a utility function

#

"bUt sTaTiC iS hArDeR tO TeSt". Just do a unit test on a static method. As long as you dont abuse static its fine. You usually dont even need to unit test it since its a utility method thats going to be used internally and you would use it only for internal implementations only

eternal night
#

I honestly think static factories are perfecly fine

#

like, as long as the only thing they do is create things, all chill

mortal hare
#

the best thing would be for such things is actually preprocessor directives

#

imagine a way to generate code in precompile step

#

less runtime bloat

slender elbow
#

APs, compiler plugins

dry hazel
#

manifold my beloved

eternal night
mortal hare
#

preprocessor directive would work so well for assertions

#

for example debug integration test builds, where runtime exceptions are being added at the points where it wouldnt make sense to check at production builds, i can imagine using something like this for testing a plugin manually

blazing ocean
#

macros when

dry hazel
#

I'm glad java doesn't have any of those

mortal hare
#

i just want macros

#

at least not built in into java syntax

#

or smth

#

just like where you can have macros and then it spits out generated .java file

blazing ocean
#

kotlin has KSP

mortal hare
#

i could see it being used for generics like templates, for generating classes like Fastutil ones

blazing ocean
#

which is pretty much that

#

AP but better

rough drift
mortal hare
rough drift
mortal hare
#

not really its compiler feature

#

they're not part of c/cpp standard

blazing ocean
#

rust

rough drift
#

oh yeah c/cpp yeah

#

I'm talking in the general sense, languages like rust for example

#

plus preprocessor macros are pretty icky imho but whatever

quaint mantle
rough drift
#

we lost another one

quaint mantle
mortal hare
blazing ocean
#

rust proc macros are like The shit

mortal hare
#

in java

#

cpp templates are

rough drift
#

He's getting sane guys

mortal hare
rough drift
#

java generics are bullshit

blazing ocean
rough drift
slender elbow
#

it's 100% a language feature that is in the language standard

dry hazel
eternal night
#

a completely cursed one

dry hazel
#

I'm curious what people would do with macros in java

#

since it's not a daily thing that you need monomorphized variants of a class

hollow vessel
#

hi, how can I dynamicly update gui title in spigot 1.19.3?

deep herald
#

im trying to send a block change in spigot 1.8, and its not doing anything

hollow vessel
#

I followed this tutorial:
https://blog.jeff-media.com/nms-use-mojang-mappings-for-your-spigot-plugins/

and got this error:

java.lang.NoSuchMethodError: 'net.minecraft.world.entity.player.Player org.bukkit.craftbukkit.v1_19_R2.entity.CraftHumanEntity.getHandle()'

when I was trying to perform this code:

    public static void sendInventoryTitleChange(InventoryView view, String title) {
        Preconditions.checkArgument(view != null, "InventoryView cannot be null");
        Preconditions.checkArgument(title != null, "Title cannot be null");
        Preconditions.checkArgument(view.getPlayer() instanceof Player, "NPCs are not currently supported for this function");
        Preconditions.checkArgument(view.getTopInventory().getType().isCreatable(), "Only creatable inventories can have their title changed");

        final ServerPlayer entityPlayer = (ServerPlayer) ((CraftHumanEntity) view.getPlayer()).getHandle();
        final int containerId = entityPlayer.containerMenu.containerId;
        final MenuType<?> windowType = CraftContainer.getNotchInventoryType(view.getTopInventory());
        entityPlayer.connection.send(new ClientboundOpenScreenPacket(containerId, windowType, CraftChatMessage.fromString(title)[0]));
        ((Player) view.getPlayer()).updateInventory();
    }

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of “1.20.4” with the version you actually use. What are...

remote swallow
#

?paste your pom

undone axleBOT
hollow vessel
remote swallow
#

how are you compiling?

hollow vessel
#

using shadowJar and server is running through xyz.jpenilla run paper server

remote swallow
#

the remap task isnt running them im guessing

#

make shadowJar depend on remap too

hollow vessel
#

java.nio.file.NoSuchFileException: F:\Coding\Codes\CraftCity\BusinessesSystem\businesses-plugin\build\libs\businesses-plugin-1.0.0-BETA.jar

#
    compileOnlyApi("org.spigotmc:spigot:1.19.3-R0.1-SNAPSHOT:remapped-mojang")
``` this is in other build.gradle.kts file
remote swallow
#

is shadow throwing that error?

hollow vessel
#

I use spigot api but server is build on paper

#

Execution failed for task ':businesses-plugin:remap'.

java.nio.file.NoSuchFileException: F:\Coding\Codes\CraftCity\BusinessesSystem\businesses-plugin\build\libs\businesses-plugin-1.0.0-BETA.jar

#

weird

remote swallow
#

that is a different file name

hollow vessel
#

wait i see

remote swallow
#

the version it exists is plugion-1.0.0-BETA not plugin-v1_0_0_BETA

#

the jar task should run before remap, then remap then shadow afaik

#

use something like

tasks.jar {
    finalizedBy(tasks.remap)
}
hollow vessel
#

I will test it

remote swallow
#

i would probably avoid remapping the shadow'd jar and remap only your jar

hollow vessel
#

okay its working but the items are really glitchy

#

I will try to film that gimme a moment please

remote swallow
#

and any reason you dont just set the title from the view?

#

im pretty sure it existed them

hollow vessel
#

not in 1.19.3

remote swallow
#

any reason for 1.19.3 not 1.19.4?

hollow vessel
#

i started created this server some time ago and now I see it was a bad idea to choose 1.19.3 for development 😅

remote swallow
#

im pretty sure view get title existed in 1.19

#

it was added in the 1.14-pre5 update

hollow vessel
#

but I cannot set title

remote swallow
#

?howold 1.19.3 for me

undone axleBOT
hollow vessel
#

you see

#

it becames really glitchy

remote swallow
#

if you update to 1.19.3 you get the set title method

#

1.19.4****

hollow vessel
#

yea I know but I can not do it unfortunately

#

do you maybe know why it start to glitch?

remote swallow
#

im guessing a ping issue or just a how its handling the inventory being recreated

hollow vessel
#

is it possible to fix this?

remote swallow
#

havent used 1.19 in a solid while so no idea

hollow vessel
#

okay thanks for help

#

maybe someone else will know how to fix it

buoyant viper
remote swallow
#

omg it did

summer scroll
#

What event that gets called when HORN_CORAL_BLOCK turned into DEAD_HORN_CORAL_BLOCK if there's no water?

turbid scaffold
#

[06:38:20] [HikariPool-1 housekeeper/WARN]: HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=1m8s574ms488µs775ns).
[06:38:20] [HikariPool-2 housekeeper/WARN]: HikariPool-2 - Thread starvation or clock leap detected (housekeeper delta=1m8s574ms437µs145ns).
[06:38:20] [HikariPool-1 housekeeper/WARN]: HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=1m8s574ms168µs865ns).

turbid scaffold
smoky anchor
#

You sent this to both channels

#

Don't do that

#

If you're having problem with plugin dev, it belongs here, if you're running into an issue while running a server, it's the other one

turbid scaffold
smoky anchor
#

Be patient, not everybody knows the answer
(Also, it's hard if there is no question or other info besides logs....)

native nexus
pseudo hazel
#

does world edit not have a support server?

native nexus
warm musk
#
package org.xfurkanadenia.bClaim.GUIS;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryDragEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;


import java.util.List;

public class MainGUI implements Listener {
    private final Inventory gui;
    public MainGUI() {
        this.gui = Bukkit.createInventory(null, 36, "Ana Menü");
        setItems();
    }

    public void setItems() {
        ItemStack item = new ItemStack(Material.DIAMOND_PICKAXE, 1);
        ItemMeta meta = item.getItemMeta();

        meta.setDisplayName("SSEEEEAAAA");
        meta.setLore(List.of("Selam", "göt"));

        item.setItemMeta(meta);
        this.gui.setItem(1, item);
    }

    public void open(Player player) {
        player.openInventory(gui);
    }

    @EventHandler
    public void onInventoryClick(final InventoryClickEvent e) {
        if(e.getInventory() != gui) e.getWhoClicked().sendMessage("Gui eşleşmiyor.");


        Player player = (Player) e.getWhoClicked();
        if(e.getRawSlot() == 1) {
            player.sendMessage("Ase yiğenim Xd");
        }
        e.setCancelled(true);
    }

    @EventHandler
    public void onInventoryDrag(final InventoryDragEvent e) {
        if(e.getInventory().equals(gui)) e.setCancelled(true);
    }
}

hi guys i'm trying to make a gui but e.getInventory().equals(gui) returns false.

how can i solve this?

native nexus
#

?pastebin

smoky anchor
#

why the heck is your package called "GUIS"
I don't think that follows Java naming conventions

smoky anchor
#

I gave my reasoning

warm musk
#

okey

pseudo hazel
#

no you didnt

#

you said it didnt follow conventions

smoky anchor
pseudo hazel
#

there we go

warm musk
smoky anchor
#

I do think it is better to follow proper name conventions

scarlet breach
#

How i can set the lines of a sign since 1.20? setLine() is deprecated

sullen marlin
#

?jd-s

undone axleBOT
sullen marlin
#

"A sign may have multiple writable sides now. Use getSide(Side) and SignSide.setLine(int, String)."

scarlet breach
#

thx

wet breach
ocean gorge
#

I can't use NMS in my IDE

#

also does BuildTools.exe just compile the server jar file and that's it?

pseudo hazel
#

yeah

tender shard
# ocean gorge I can't use NMS in my IDE

If you need to access NMS classes from inside your Spigot plugin, it is a very good idea to use the so called Mojang mappings. Disclaimer: This post is written for 1.20.4. If you use another version, you of course have to replace every occurance of “1.20.4” with the version you actually use. What are...

tender shard
ocean gorge
#

Uhm

tender shard
#

uhm?

stoic briar
viral halo
#

small question. how can i get an ItemStack of a player head with player owner in 1.21

chrome beacon
chrome beacon
# viral halo small question. how can i get an ItemStack of a player head with player owner in...

Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...

tender shard
blazing ocean
#

mvn is the command

blazing ocean
#

what is that scarlax23 thing at the end

smoky anchor
#

guy is trying to crash someone by overloading their client with particles

blazing ocean
#

Ah yeah no fuck off

river oracle
#

Anything on large scale will fuck your client

smoky oak
#

no, the server only transmits ~40k at once

#

which is a FUCKIN LARGE irritation if i want to paint with them

#

trust me i tried

river oracle
#

I've not had it crash me but I have had particles take me down to nearly unplayable fps

#

Perhaps it depends what kind of particles you send too

smoky oak
#

were you doing local testing?

river oracle
smoky oak
#

ye i think i did it over web, cant quite recall

river oracle
smoky oak
#

wtf

river oracle
#

You can ruins someone's life with those things

smoky oak
#

unicode shenanegans?

blazing ocean
river oracle
#

I was trying to do dynamic texture generation and did building off 2x2 pixel blocks

blazing ocean
#

At Brawls we used to have a bossbar which can bring you down to 40 fps concern

river oracle
#

I did get it working but my client ran at 1 or 2 fps at best. My CPU is no joke either

#

it's not usually easy to cripple my i5-12600k

blazing ocean
pseudo hazel
#

skill issue on your cpu

rough drift
#

rad I have a question for you

blazing ocean
#

Hi

rough drift
#

or anyone else ig

river oracle
rough drift
#

I came up with a thought while folding stuff, character types but they can have a specified encoding size like char (platform default or utf-8 ig) which accepts all chars, char8, char16 and char32 for the repsective utf variant

#

I feel like that's weird but I want someone else's thoughts lol

pseudo hazel
#

yeah laptops are ass

blazing ocean
rough drift
#

unless you want all chars to be utf8 ig

#

which is fair enough

river oracle
#

Just conform to utf8

rough drift
#

but what about characters outside utf8

worthy yarrow
#

I def don’t want to deal with the extra headache

eternal oxide
#

UTF-8 covers it all. each char grows in byte size as you go up the table

rough drift
#

but isn't that like, a runtime overhead?

eternal oxide
#

what overhead?

blazing ocean
river oracle
#

Whatever optimization you think this is it's really fucking stupid

blazing ocean
#

^

rough drift
river oracle
#

If you want random pointless optimizations go to C where you have memory and register access

blazing ocean
#

there you have it

worthy yarrow
#

Dad?

blazing ocean
rough drift
worthy yarrow
#

Wow rad I never knew

#

It’s very unfortunate that QWERTY puts d and r right next to each other

river oracle
#

Why do you need the size of the charger in bytes?

rough drift
#

I just realized this whole ordeal is because I'm stupid

river oracle
#

Java provides API for you to encode and decode chars

rough drift
#

"what if you read user input and it's in say utf16 how do you represent it in a char"

#

you don't

#

it's a string

#

I am dumb

river oracle
#

... yes yes you are

rough drift
#

LOOK OKAY

blazing ocean
#

why would any random user ever input utf16

rough drift
#

Some(most)times I am dumb

rough drift
river oracle
rough drift
#

^

#

yeah fair

#

chinese input fr

blazing ocean
#

what alphabets does -16 have that -8 doesn't

worthy yarrow
#

16 is bigger than 8 so obviously it’s better

river oracle
#

They have a shit ton of symbols

rough drift
#

I just learnt more about 8

#

it's enough lol

blazing ocean
#

That's what I was asking

rough drift
rough ibex
#

all utf formats can encode all of unicode

autumn olive
#

Hello, I have a problem, I would like to manipulate packets, but I do not have imports for this. I created a project in Intellij on paper spigot and I don't know if I need to install something or what, I read on various websites and nothing worked.

smoky anchor
blazing ocean
mortal hare
#

is there any name for a builder which doesnt return this values and instead returns created values based on the arguments

#

something like a mix of factory and builder

#
    private <T extends Node> T addControl(final String label, final T node) {
        this.controls.add(new VBox(Spacings.SMALL.getValue(), new Label(label), node));
        return node;
    }

    public TextField addTextField(final String label) {
        return this.addControl(label, new TextField());
    }
#

it returns reference of created object instead of this

remote swallow
#

paperspigot was my favourite software back in 2014

mortal hare
#

i dont want to expose adding textfields as parameters since i dont control the classes here

flint coyote
#

Is there a reason that the PlayerInteractEvent is fired with twice with actions

  • RIGHT_CLICK_AIR
  • LEFT_CLICK_AIR
    when a player equips an armor piece with right click (left is not getting clicked)?
slender elbow
#

i mean that's literally just a factory

mortal hare
#

so idk how to call this monstrosity

#

basically i have similar scenes

#

and i want to reuse the same designed components across them

slender elbow
#

BuilderFactory

#

:thumbsup;

mortal hare
slender elbow
#

u sound dumb

eternal night
#

its not a wither is it?

mortal hare
#

i can imagine people seeing this and thinking wtf is a builderfactory

#

its a stateful factory

#

i guess

eternal night
#

stateful?!?!?

#

bannable

slender elbow
#

a configurator, even

eternal night
#

a decorator even

slender elbow
#

do not say that ever again

eternal night
#

sorry

mortal hare
#

its not really a decorator

quaint mantle
#

AbstractSingletonStatfulDecoratorConfiguratorFactory

eternal night
#

(it isn't, I am just shitting useless words out like emily)

slender elbow
#

yeah what was that website again

remote swallow
#

is paperspigot a useless word

slender elbow
remote swallow
#

cant wait for mojang to add the Listener­Authentication­Task­Stub­Wrapper­Proxy­Test­Proxy­Printer­Composer­Visitor­Server­Client­Server­Context­Property­Collection­Annotation­Resolver­Expression­Facade­Message­Interceptor­Queue­Dispatcher­Queue­Context­Annotation­Getter­Annotation­Model­Facade­Bean­Decorator­Composer­Context­Task­Policy­Wrapper­Consumer­Dispatcher­Method­Bean­Clone­Parameter­Repository­Thread­Worker­Order­Decorator­Composer­Clone­Interceptor­Server­Stub­Database­Attribute­Consumer­Advisor­Identifier­Getter­Broadcaster­Interceptor­Parameter­Adapter­Mapper­Comparator­Watcher­Worker­Singleton­Value­Reponse­Proccesor­Observer­Thread­List­Pool­Context­Authentication­Pool

blazing ocean
remote swallow
#

2 lines

blazing ocean
#

click on it

remote swallow
#

i did

mortal hare
#

anyone wondering for me to explain why there's JavaFX setFont(font) method and there's setStyle("-fx-font: 16 System");

you would guess its an utility function which parses stylesheets. but nope they're different, if i set style via stylesheet string, context menu gets styled as well, meanwhile setFont sets only the current elements value

#

wtf is this

#

JavaFX is worse than Java AWT tbh

#

at least in AWT i know what everything does instead of trying to guess

#

JavaFX feels like aliexpress version of HTML/CSS

#

why tf would you have two ways to style elements, and the worst thing is that sometimes setFont() isnt being exposed under Node class, so you have to use setStyle() anyways, like this api feels sooooo

blazing ocean
#

average 1998 api

mortal hare
#

its 2008 API tho

#

and it feels worse than 1998 one

echo basalt
#

solid chance good habits weren't as mainstream back then

#

like immutability and shit

mortal hare
#

that's why i have java std library

#

it never marks anything as @Deprecated

#

or @Legacy

slender elbow
#

now that's just straight up false lmao

mortal hare
#

ok Vector afaik is deprecated

#

or stack

#

i dont remember

echo basalt
#

so many more

mortal hare
#

and finalize() method got deprecated and removed in java 9 iirc

echo basalt
#

just hang forever lmfao

mortal hare
#

?paste

undone axleBOT
cinder abyss
#

Hello, I use the latest version of SpigotUpdateChecker, and I want to remove the shaded dependency com.github.Anon8281:UniversalScheduler, which is shaded under com.jeff_media.updatechecker.universalScheduler and use my own shaded one (ovh.paulem.btm.libs.updatechecker.universalScheduler)
In my project, SpigotUpdateChecker (com.jeff_media.updatechecker) is shaded as ovh.paulem.btm.libs.updatechecker so the final name of UniversalScheduler is ovh.paulem.btm.libs.updatechecker.universalScheduler

How can I make this ? In recap, I want to remove a transitive shaded dependency

remote swallow
#

transitive and shaded dont exist together

cinder abyss
#

hum

remote swallow
#

if its transitive you can exclude it, if its shaded you cant

cinder abyss
#

So it's just shaded ?

#

I just can't ?

quaint mantle
#

how can I make a background like in the screenshot, I have the same texture as theirs

cinder abyss
remote swallow
#

theres a chance of different method sigs

cinder abyss
#

okay thanks

pseudo hazel
quaint mantle
pseudo hazel
#

paste multiple segements next to each other

#

like have a shadow thats just a part

#

and then put multiple of them

mortal hare
#

now i can have same layout for authentication scenes by just specifying what kind of input and button groups it will have without inheritance shit of implementing new nodes i see on stack overflow and on youtube

#

hooray

chrome beacon
#

JavaFX?

#

Oh wait I didn't see the paste 💀

#

Hm? Are you sure you can specify the player like that

#

Don't use need the execute command

wooden frost
#

I am genuinly starting to tweak rn 😭
How do you get the item that was put into a slot? What method in the "InventoryInteractEvent" returns the item that was put into a slot.
I am starting to loose it😭

slender elbow
#

none?

#

listen to the InventoryClickEvent

wooden frost
#

WHO WROTE THIS API😭😭😭😭

stoic summit
#

e

wooden frost
#

(i mean mojang themselves, why they gotta do this to us)

slender elbow
#

mojang has nothing to do with this lol

#

but also, you straight up cannot listen to the InventoryInteractEvent directly

#

you have to listen to the click event or some other subclass

young knoll
#

Nah it was clearly Mojang

#

Actually it may have been dinnerbone

quasi gulch
#

When i remove a Vnailla Recipe i get this Error in the console. Is there a way to remove vanilla recipies without these errors?

Tried to load unrecognized recipe: ResourceKey[minecraft:recipe / minecraft:golden_boots] removed now.

eternal oxide
#

Recipes are stored in the world files

#

If you remove a recipe it is only removed from the servers memory not the data files

quasi gulch
#

So is there no way to do so?

quaint mantle
#

Bukkit.reloadData()

eternal oxide
#

um, Its been a long time since I played with recipes, but possibly if you remove them before teh worlds are loaded (if you can do it that early). BUT you can;t do it after a world has been created

#

you could just ignore the error as it does not affect anything

quasi gulch
amber fjord
#

so ive been trying to set a player's fall distance to 0 after being launched by the server but with ping the BukkitRunnable() function that I'm using cancels before the player even launches. is there a way to get a server side measurement of if the player is on the ground?

sullen marlin
#

Player#isOnGround? what do you mean cancels

amber fjord
#

(new BukkitRunnable() { public void run() { target.setFallDistance(10.0F); target.sendMessage("in air"); if (target.isOnGround()) { this.cancel(); target.sendMessage("cancelled"); } } }).runTaskTimer(this.plugin, 10L, 1L);

#

the delay being 10 ticks can still be a problem with ping but also if theres a block above the player

cinder abyss
#

Hello, how can I minimize my fat jar using shadow and proguard in gradle ?

blazing ocean
#

read the proguard docs

grim hound
#

uh

#

how do I create an api on like maven and stuff

young knoll
#

You can host a repo yourself with something like reposlite

#

Or publish it on maven central

grim hound
young knoll
#

The jar

slender elbow
#

for maven central you publish the jar, the pom, the javadoc and sources jar, and the signature file

young knoll
#

Maven publish handles that stuff for you

#

(Or the gradle maven publish plugin)

slender elbow
#

very true

chrome beacon
#

Reposilite uwu

slender elbow
#

reposilite on top

flint bane
#

yoyoyoyoyo

#

need help with sum stuff

grim hound
#

pom what if I use gradle?

slender elbow
#

maven central is becoming more and more ridiculous to publish to

flint bane
#

basically I made a plugin in which if ur banned you cannot talk in chat and when i type an msg it flags console

slender elbow
#

you don't publish to it like any good old maven repo

#

reposilite is so easy

grim hound
#

and what's the signature file?

slender elbow
#

gradle will generate a pom and a gradle metadata file

#

and a gpg signature file of each file you publish

flint bane
#

thats the log

#

i cant fix that AsyncPlayChatEvent