#help-development

1 messages · Page 2100 of 1

manic delta
#

yep thanks

#

i just forgot it

delicate lynx
#

I question it sometimes and have to check

#

I feel that

frigid rock
#

lol

#

so does anyone know anything about this?

last ledge
#

..

small lynx
#

How i stop the scoreboard flickiring

#

I want it to update without flicker

#

Any anwsers?

bright jasper
unreal nymph
#

I'm trying to get into plugin development and I've seen talk about maven for plugins, where should I start?

bright jasper
#

Time to make a legitimate JS api for spigot by accessing java classes in JS to make a friendlier JS based API for spigot plugins?

crisp steeple
#

get the time it starts and time it ends

bright jasper
#

By actually registering the JS object as a spigot plugin within spigot itself because objects are on the JVM?

#

🤡 this may be a bad idea but it might be a good one

crisp steeple
#

and then reload the items in the inventory

#

to match the time it should be

bright jasper
#

Alright real talk, how would you guys like an actual legitimate Javascript API for Spigot plugins

#

Like theoretically if it was possible would you support it or no?

#

And what if it stopped caring so much about compatibility because and keeping everything the same because its not plagued by people who can't update code and a dumbass license lawsuit for the past 10 years

crisp steeple
#

i mean theoretically it’s possible

#

chattriggers did it for client side modding

#

although i’m not sure what purpose it would serve for spigot though and it might get pretty complicated

bright jasper
#

I've been looking into Graal and its Java interop is a bit interesting to me

#

You could theoretically get direct access to the bukkit instance and register a JS class instance as a plugin

#

So it wouldn't be an adapter API host that just runs stuff like a proxy. It would actually be a small library that adapts directly to java classes and makes wrappers to make it all look nice

small lynx
#

How i stop the scoreboard flickiring

prisma needle
#

Creating unique string from two integers.

bright jasper
#

It does not flicker and does not require convoluted teams and stuff like that

torn shuttle
sharp bough
#

so i know "(serverMessages.en).getKeys(true) returns all children and sub childrens, but how could i filter what im looking for? in this case i have serverMessage.en. and i want all displays and messages

#

it would be something like get(serverMessages.en.ANYTHING.display ?

tardy delta
#

loop over servermessages.en.getKeys(false) and use the string param to get servermessages.en.string's display string

torn shuttle
#

or even split by full stop and match the last element, which again would probably not be great

#

if you need to correlate the data in any way I'd make an object that parses and stores all of this data in an easy to access way

midnight shore
#

why isn't this replacing anything?

#

the string returned is just like the one i've entered

#

no changes

#

this is the whole enum

tardy delta
#

no need for creating a new string tho

#

lemme see

midnight shore
#

ignore that

#

i was just trying to find the problem

#

basically it works by getting a string, replacing all the values according to the enum and then sending to the player the colored one

#

like Hypixel if you know how do they do that

tardy delta
#

ah wait

#

String#replace is returning a new string object so you need to assign it

#

strings are immutable remember

midnight shore
#

so like this?

kind hatch
#

More or less

midnight shore
kind hatch
#

That’ll work, it’s just that there are cleaner ways to write it.

tardy delta
#

and chatColor.getColors().toString() instead of creating new empty string which is dropped directly

midnight shore
midnight shore
#

isn't it an enum?

#

uhh i see

tardy delta
#

i mean ""+chatColors.getColor() -> chatColors.getColor().toString()

granite owl
#

why can i serialize an empty inventories content but not while holding any item

midnight shore
#

empty inventories will just serialize to null i guess

granite owl
#

empty ```txt
¬í ur ![Lorg.bukkit.inventory.ItemStack;–lr¤Ï xp )ppppppppppppppppppppppppppppppppppppppppp

#

with content

#
¬í ur ![Lorg.bukkit.inventory.ItemStack;–lr¤Ï  xp   ){sr  java.io.NotSerializableException(Vx ç†5  xr java.io.ObjectStreamExceptiondÃäk9ûß  xr java.io.IOExceptionl€sde%ð«  xr java.lang.ExceptionÐý>;Ä  xr java.lang.ThrowableÕÆ5'9w¸Ë L causet Ljava/lang/Throwable;L 
detailMessaget Ljava/lang/String;[ 
stackTracet [Ljava/lang/StackTraceElement;L suppressedExceptionst Ljava/util/List;xpq ~     t 8org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStackur [Ljava.lang.StackTraceElement;F*<<ý"9  xp   sr java.lang.StackTraceElementa    Åš&6Ý… B formatI 
lineNumberL classLoaderNameq ~ L declaringClassq ~ L fileNameq ~ L 
methodNameq ~ L 
moduleNameq ~ L 
moduleVersionq ~ xp  ­pt java.io.ObjectOutputStreamt ObjectOutputStream.javat writeObject0t     java.baset 17.0.1sq ~ 
  opq ~ q ~ t 
writeArrayq ~ q ~ sq ~ 
  £pq ~ q ~ q ~ q ~ q ~ sq ~ 
  bpq ~ q ~ t writeObjectq ~ q ~ sq ~ 
    .pt utils.Utilst 
Utils.javat serializeToFileppsq ~ 
ÿÿÿþpt -jdk.internal.reflect.NativeMethodAccessorImplt NativeMethodAccessorImpl.javat  invoke0q ~ q ~ sq ~ 
   Mpq ~ q ~ t invokeq ~ q ~ sq ~ 
   +pt 1jdk.internal.reflect.DelegatingMethodAccessorImplt !DelegatingMethodAccessorImpl.javaq ~ "q ~ q ~ sq ~ 
  8pt java.lang.reflect.Methodt Method.javaq ~ "q ~ q ~ sq ~ 
   *pt utils.SystemControl$Utilst SystemControl.javaq ~ ppsq ~ 
    )pt #admin.commands.ViewInventoryCommandt ViewInventoryCommand.javat onPlayerQuitppsq ~ 
    ;pt     main.maint     main.javaq ~ /ppsq ~ 
ÿÿÿþpq ~ q ~ q ~  q ~ q ~ sq ~ 
   Mpq ~ q ~ q ~ "q ~ q ~ sq ~ 
   +pq ~ $q ~ %q ~ "q ~ q ~ sq ~ 
  8pq ~ 'q ~ (q ~ "q ~ q ~ sq ~ 
   2pt )org.bukkit.plugin.java.JavaPluginLoader$1t ...
tardy delta
#

and while holding an item?

granite owl
#

^

#

the second

#

while the inv is not empty

midnight shore
#

It worked! ty @tardy delta

tardy delta
#

ah

granite owl
#

i serialize the ItemStack[]

tardy delta
#

isnt it serialized?

granite owl
#

wdym

tardy delta
#

ah its an exception

granite owl
#

ItemStack implements the ConfigurableSerializable

#

interface

tardy delta
#

i saw those weird  and i thought that was serialized stuff

granite owl
#

it is

#

partially it serializedf

#

the itemstack array itself serialized

#

but its content failed to

#

partially serialized

#

partially error msg

supple elk
#

Hey guys, I'm trying to set the skin of an NPC

granite owl
#

any help maybe?

supple elk
#

unfortunately it's not working

#

any clues why?

#

The packets I send

tardy delta
#

isnt there a packet for the skin?

supple elk
#

I think that's player info

#

and I just found out what's wrong -_-

#

of course, the moment I send it

#

it's cause I remove the player info the same tick I think

supple elk
#

yeah there we go

#

delaying by a tick fixes

tardy delta
#

ah

#

Bukkit.getScheduler().runTask is enough

supple elk
#

o ok

#

won't that run mutliple times or?

tardy delta
#

its the same as Bukkit.getScheduler().runTaskLater(/* */, 1)

#

basically runs it once, after one tick

supple elk
#

have to cancel it tho

#

or does the sync delayed task repeat?

tardy delta
#

nope

granite owl
#

@tardy delta okay i prob figured how, the ItemStack implements its own serialize() method which puts its own content into a map thats returned which i then can serialize to put it onto the harddrive

supple elk
#

ah, the thing is happening now

#

having removed the player info, if the player moves out of render distance then the entity will no longer render back in

granite owl
#

so i create an ArrayList that holds one map per item

#

and then serialize this ArrayList

#
public static void onPlayerQuit(Player p)
    {
        File invDir = new File(Utils.getOwnDir + "inv");
        if (!invDir.exists()) invDir.mkdir();
        
        ItemStack[] itemArray = p.getInventory().getContents();
        ArrayList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
        for (ItemStack is : itemArray)
        {
            list.add(is.serialize());
        }
        
        Utils.serializeToFile(list, invDir.getPath() + '/' + p.getUniqueId().toString() + ".bin");
    }
``` this is a yet untested prototype
cerulean mirage
#

ItemMeta probably wont get serialized automatically and you need to access it with reflection

#

If your item has an itemMeta

granite owl
#

ill test that

#

itemstack implements ConfigurationSerializable

#

and the ConfigurationSerializable interface has a Map<String,Object> serialize() member

cerulean mirage
#

Look how it serializes itemmeta

#

You are better of converting to nms itemstack and storing the itemstack.gettype + " " + itemstack.getamount + " " CraftItemstack.getnmscopy.gettag or sum

#

cant remember

#

nbt

granite owl
#

why cant i just store the damn inventory

#

jeez

cerulean mirage
#

same

#

i did it by storing type, amount and nbt

#

in a single string

#

and splitting it

crisp steeple
cerulean mirage
#

in a VARCHAR[] if you are using a sql database

crisp steeple
#

yaml?

#

or database

granite owl
#

i use the ObjectInputStream which should cast it to a byte stream thats then written to the harddrive

cerulean mirage
#

Using serialize method in Itemstack wont work

granite owl
#

and why not?

#
¬í sr java.util.ArrayListxÒ™Ça I sizexp   w   sr java.util.LinkedHashMap4ÀN\lÀû Z 
accessOrderxr java.util.HashMap ÚÁÃ`Ñ F 
loadFactorI     thresholdxp?@     w      t vsr java.lang.Integerâ ¤÷‡8 I valuexr java.lang.Number†¬•
”à‹  xp  
Ÿt typet DIRTx x
``` tried to serialize a dirt block
#

at least it got the type and the number

#

using this

#
public static void onPlayerQuit(Player p)
    {
        File invDir = new File(Utils.getOwnDir + "inv");
        if (!invDir.exists()) invDir.mkdir();
        
        ItemStack[] itemArray = p.getInventory().getContents();
        
        if (itemArray.length > 0)
        {
            ArrayList<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
            int i = 0;
            for (ItemStack is : itemArray)
            {
                if (is != null)
                {
                    list.add(is.serialize());
                }
                else
                {
                    Bukkit.getServer().getConsoleSender().sendMessage("empty slot " + Integer.toString(i));
                }
                
                i++;
            }
            
            Utils.serializeToFile(list, invDir.getPath() + '/' + p.getUniqueId().toString() + ".bin");
        }
        else
        {
            Bukkit.getServer().getConsoleSender().sendMessage("couldnt get inv");
        }
        
    }
cerulean mirage
#

Do the itemstacks have an itemmeta?

granite owl
#

not yet

cerulean mirage
#

If they dont, it will work

#

else it wont

granite owl
#

sure lemme try its done easily

#

ill just ench a sword sec

#

it threw an exception for the itemmeta

#

so

#

best shot = splitting type amount and meta in a wrapper class and serialize a wrapper class array?

cerulean mirage
#

no just a string

#

and not serializeing

granite owl
#

hm?

cerulean mirage
#

cuz you dont need it for string

granite owl
#

item tostring?

#

or wym

cerulean mirage
#

like use "__" or sum

#

something that nbt doesnt use

#

to split your string later

#

nbt uses _

#

so i used __

sharp bough
#

so how could i have default values? i want to have a lan: "en" and a few other values and i want to save them in cofig, i already tried with addDefault and this https://www.spigotmc.org/threads/loading-default-config.206088/#:~:text=brkpnt-,The easiest,-way is to
also i added the stuff i want in the config.yml and they still get overridden whenever i saveconfig

#

its not complex

#

the other way of doing it would be a list of values and paths, with a for loop i would check
if path != null : path = value

granite owl
#

okay @cerulean mirage ive managed to cast the item type to string and create new itemstack with it then add it to the player like this

#
ItemStack[] itemArray = p.getInventory().getContents();
        
        itemArray[0].getType().toString();
        
        ItemStack test = new ItemStack(Material.valueOf(itemArray[0].getType().toString()), 1);
        
        p.getInventory().addItem(test);
tardy delta
#

.options().saveDefaults()?

karmic phoenix
#

Hi, how to get how many bars that the consumed item filled?

sharp bough
#

or ii might have done something wrong

cerulean mirage
karmic phoenix
#

Yes.

granite owl
#

so i can serialize the type as string

cerulean mirage
#

ow ok

granite owl
#

then the itemmeta is serializeable

#

and primitives like ints are always serializable

#

so i can serialize the item using a wrapper class

cerulean mirage
#

Like the way you did

granite owl
#

xD `

#

3x

crude loom
#

Is there a maximum inventory size?

granite owl
crisp steeple
#

yea

granite owl
#

amount of items

#

or slots

crisp steeple
#

i’ve gotten up to like 99999 before it crashes anyone who opens it

crude loom
#

When I create an inventory, I specify a size, what is the maximum?

granite owl
#

no but at a certain point ur inventory GUI breaks

#

visually

granite owl
#

and u cant access all slots at a certain point anymore

crude loom
#

Ohh

#

Yeah that makes sence

granite owl
crude loom
#

😂

cerulean mirage
#

just put it in a string

granite owl
#

and how do i then create an itemmeta from string later on?

cerulean mirage
#

MojangParser.parse

#

convert itemstack to nms, do setTag

#

then parse nbt into that

verbal heron
#

can anyone help me use nms on 1.18.2

cerulean mirage
#

MojangsonParser*

chrome beacon
verbal heron
#

Idk how to use the specialsource plugin

chrome beacon
#

Copy paste that in to your pom that's it

verbal heron
#

I did

#

I build, i get error that i can't find spigotmc artifact

chrome beacon
#

I assume you haven't ran BuildTools

#

?bt

undone axleBOT
verbal heron
#

Specialsource removes the obfuscation right?

chrome beacon
#

It maps methods and fields with the mappings provided by mojang. So yes it mostly removes the obfuscation

chrome beacon
#

MojangsonParser is called TagParser with Mojmaps if you want to use them

verbal heron
#

i do install-remapped-file?

sterile token
#

Its possible to create custom placeholders with arguments like:

%bungee_status_[server-name]%

celest scaffold
#

on intellij how do i get 1.8?

sterile token
#

I didnt understand your question

celest scaffold
#

i mean i get only 1.12 if i go last version then change the version from pam.xml

#

this plugin for Intellij

tardy delta
#

you are trying to get the 1.8 spigot api?

celest scaffold
#

yes

tardy delta
#

change the version tag in your pom

celest scaffold
#

i tried

#

minimum i get is 1.12

tardy delta
#

compiler says that or what?

celest scaffold
tardy delta
#

1.8.8-R0.1-SNAPSHOT

granite owl
tardy delta
#

fill it in

#

and refresh

cerulean mirage
celest scaffold
supple elk
#

Hey guys, I'm trying to recreate the fixSkinHelmetLayerForPlayers function from this

tardy delta
#

press the reload button on the top right

celest scaffold
#

ah thanks

supple elk
#

This is my attempt

celest scaffold
#

nevermind

#

not working

#

ah now it works

supple elk
#

getting this error

#

not sure why, any clues?

tardy delta
#

you dont need a Byte, just byte enough

#

it was redundant when i tried

supple elk
tardy delta
#

ye

#

dunno if that will solve it

supple elk
#

so like that?

tardy delta
#

i guess

#

is that intellij?

supple elk
#

ok different error now 🤔

supple elk
tardy delta
#

mine gives warnings about that 🤔

#

whats under the caused by

supple elk
#

u can see, ClassCastException

#

or did u mean that stuff

tardy delta
#

yes

#

ah uh

visual tide
#

odd

#

where stacktrace gone

granite owl
supple elk
tardy delta
#

lemme look at my code

supple elk
#

perhaps the byte data has changed from 1.16 to 1.18?

#

I think I translated the classes correctly...

tardy delta
#

why do i have access to my windows data when im on linux 🤔

supple elk
#

🤔

#

I've done a lot of this packet stuff before when I was making a tab menu

#

but one thing I never got working was the extra layer

#

I dunno why it's so much more complicated that everything else

tardy delta
#

whats actually the thing youre tryin?

#

giving the npc a skin?

supple elk
#

yeah

#

nah I've given the skin

#

I just need to fix the head layer

#

for example

tardy delta
#

im digging to my code

#

lol

supple elk
#

my maid dream npc

tardy delta
#

i should watch his video again

supple elk
#

is working perfectly

tardy delta
#

but im too lazy

supple elk
#

but is missing the bow and cat ears

#

cause the outside layer isn't showing

#

or at least on the head

tardy delta
#

wait is the skin showing or not?

#

apart from the ears and stuff

supple elk
#

yeah

#

the screenshot i sent is my npc

tardy delta
#

then you just need this

supple elk
#

yup ik

#

look at the screen shots I sent

#

that's exactly what I'm trying to replicate

#

I knew how to do the other stuff

#

there's my full class

#

the last bit of the display() function

#

the names are diffrent cause I'm using the mc nms mappings

tardy delta
#

i dont see EntityDataSerializer in my code

supple elk
#

use this website here

#

it shows the link between the spigot mappings and nms mappings

latent jungle
#

Hi; who use intelij ?

supple elk
#

I do

supple elk
tardy delta
#

thats why people say nms is a pain

supple elk
#

yup it is

#

I had to use it though cause otherwise all the functions were just a() b() etc and same for fields

latent jungle
#

I have "File is ready-online" and i can't do anithing
Do u know what i have to do ?

supple elk
#

nope

#

mhm

latent jungle
#

yes

tardy delta
#

jdk internals?

#

ofc it is readonly then

latent jungle
#

Yet it's my plugin, my code

tardy delta
#

what code are you looking at?

#

some api?

#

bruh why are people dming if they can send it here

latent jungle
#

I can"t send here

supple elk
#

you could send a pastebin link or similar

sterile token
#

What do you think?

supple elk
#

Can you send send me the equivalent code you used for fixing the outside layer even if it's not the same mappings?

tardy delta
supple elk
#

ok so one thing which is kinda weird

#

now I'm not gonna pretend like i know exactly how this stuff works however

#

the registry is set to 16, but it looks as if 17 is the value which lets the skin layers be changed??

sterile token
tardy delta
#

what are we talkin about?

night copper
#

How do I stop the player from placing down a block

tardy delta
#

cancel blockplaceevent

night copper
#
    @EventHandler
    public void onPlace(BlockPlaceEvent e) {
        
        Player p = e.getPlayer();
        
        if(p.getInventory().getItemInOffHand().getItemMeta() == null || p.getInventory().getItemInOffHand() == null) return;
        if(p.getInventory().getItemInMainHand().getItemMeta() == null || p.getInventory().getItemInMainHand() == null) return;
        
        
        if(p.getInventory().getItemInMainHand().getItemMeta().getPersistentDataContainer().has(Constants.FACT_BOOK, PersistentDataType.STRING) || p.getInventory().getItemInOffHand().getItemMeta().getPersistentDataContainer().has(Constants.FACT_BOOK, PersistentDataType.STRING))    
            e.setCancelled(true);
        
        if(p.getInventory().getItemInMainHand().getItemMeta().getEnchantLevel(Enchantment.BINDING_CURSE) == 252 || p.getInventory().getItemInOffHand().getItemMeta().getEnchantLevel(Enchantment.BINDING_CURSE) == 252)     
            e.setCancelled(true);
    }
}
#

this doesnt work

#

when i hold the item in my off hand

night copper
#

Bugs: 1. When holding the item in my off hand, when placing a block on my main hand it will cancel the place event
2. You can place the block using your off hand

supple elk
#

@tardy delta now have cat ears on dream

#

needed to change the 16 to a 17

night copper
#

How do I stop a player from placing down a block using the off hand

#

?

tardy delta
#

check the hand

night copper
#

ty

little cradle
#

How do I make a custom crafting recipe and an additional crafting recipe that when you put the custom item in the crafting recipe it gives you back your items you used to craft it. Btw this is a plugin im working on already and have tried many ways to get this to work but for some reason nothing happen i don't even get an error ill send the code of it as well.

#
package me.chr1s.weedz.items;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Item;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.RecipeChoice;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.ArrayList;
import java.util.List;

import static me.chr1s.weedz.items.Bud.bud;

public class Ounce {

    public static ItemStack ounce;

    public static void init(JavaPlugin plugin) {

        createOunce(plugin);
    }

    private static void createOunce(JavaPlugin plugin) {
        ItemStack item = new ItemStack(Material.WHEAT);

        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(ChatColor.translateAlternateColorCodes('&',"&aOunce"));

        List<String> lore = new ArrayList<>();
        lore.add(ChatColor.translateAlternateColorCodes('&',"&7A Ounce of Weed."));
        meta.setLore(lore);

        item.setItemMeta(meta);
        ounce = item;

        NamespacedKey key = new NamespacedKey(plugin, "ounce");
        ShapedRecipe recipe = new ShapedRecipe(key, item);
        recipe.shape(
                "BBB",
                "BBB",
                "BBB");
        recipe.setIngredient('B', new RecipeChoice.ExactChoice(Bud.bud));

        Bukkit.addRecipe(recipe);

        ItemStack item2 = new ItemStack(Material.WHEAT, 9);

        ItemMeta meta2 = item2.getItemMeta();
        meta2.setDisplayName(ChatColor.translateAlternateColorCodes('&',"&aOunce"));

        List<String> lore2 = new ArrayList<>();
        lore2.add(ChatColor.translateAlternateColorCodes('&',"&7A Ounce of Weed."));
        meta2.setLore(lore2);

        item2.setItemMeta(meta);

        ounce = item;

        NamespacedKey key2 = new NamespacedKey(plugin, "ounce1");
        ShapedRecipe recipe2 = new ShapedRecipe(key2, item2);

        recipe2.shape(
                "   ",
                " E ",
                "   ");
        recipe2.setIngredient('E', new RecipeChoice.ExactChoice(Pound.pound));

        Bukkit.addRecipe(recipe2);
    }
}
night copper
#

SO

#

you want a custom recipe for a custom item?

#

is that so?

tardy delta
#

construtors exist for a reason

midnight shore
#

is there any way to detect for when a player opens its tablist?

little cradle
#

in a way yes a custom recipe for a custom item

night copper
#
ShapedRecipe feedboks = new ShapedRecipe(Constants.FEED_BOX, items.FoodBox());

        feedboks.shape("CSC","CNC","CSC");
        
        feedboks.setIngredient('C', Material.COOKED_BEEF);
        feedboks.setIngredient('S', Material.SHULKER_SHELL);
        feedboks.setIngredient('N', Material.NETHER_STAR);
        
        Bukkit.addRecipe(feedboks);
#

this is how i did it

#

so you create an item FoodBox in another file and heres the item...

#
@Deprecated
    public ItemStack FoodBox() {
        
        ItemStack foodbox =  new ItemStack(SkullCreator.itemWithBase64(SkullCreator.createSkull(), (key);
        
        return foodbox;
    }
#

i just removed the lore and custom name

#

and it works

#

you can create a new file called "Items" where you have custom items

#

and when you want to get an item you do "Items item = new Items()" and item.MyItem()

little cradle
#

ok thank you but i guess i worded it wrong i know how to make a custom recipe but i can't get it to do what i'd like it do which is when you put the item you just crafted back in the crafting table it gives the items back and the items used to craft it is just a single material

night copper
#

oh

little cradle
#

ye sorry if i wasn't specific

night copper
#

use shapeless recipe for the "ounce of weed" to get weed

little cradle
#

i've tried doing it with a shapeless recipe and it never worked even before I added the second rcipe

#

recipe*

night copper
little cradle
#

Pound is the class and pound is the item

night copper
#

thats the problem i think

little cradle
#

bc of the same name?

night copper
#

no

#

because it doesnt return the itemstack

night copper
#

it has "return (nameOfItemStack)"

little cradle
#

hm let me try that rq

proper lark
#

Does anyone know a scoreboard plugin that i can set to only show in certain worlds

little cradle
#

can i send links in here?

#

if its to spigotmc?

hasty prawn
#

Yes

little cradle
#

ok thanks

proper lark
#

Thx

little cradle
#

np

proper lark
#

Do you have any others

proper lark
#

Okay

little cradle
night copper
#

you see

#

C is cooked beef

#

S is shulker shell

#

N is nether star

sterile token
#

Oh ok but why dont put? Shulker?

#

Isnt the same yeath?

night copper
#

you cant it has to be a character

sterile token
#

OHHH OK

#

That why my recipe its not working

#

🤡

#

That the issue

midnight shore
#

quick question

little cradle
midnight shore
#

does the ArrayList get(); start from 0 or from 1?

little cradle
#

i think 0

midnight shore
#

okayy

quaint mantle
#

Yea, from 0.

night copper
little cradle
#

ye 0

little cradle
#
Error occurred while enabling Weedz v0.0.0 (Is it up to date?)
java.lang.IllegalStateException: Duplicate recipe ignored with ID weedz:ounce
        at net.minecraft.world.item.crafting.CraftingManager.addRecipe(CraftingManager.java:92) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at org.bukkit.craftbukkit.v1_18_R1.inventory.CraftShapedRecipe.addToCraftingManager(CraftShapedRecipe.java:59) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at org.bukkit.craftbukkit.v1_18_R1.CraftServer.addRecipe(CraftServer.java:1273) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at org.bukkit.Bukkit.addRecipe(Bukkit.java:852) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at me.chr1s.weedz.items.Ounce.createOunce(Ounce.java:46) ~[?:?]
        at me.chr1s.weedz.items.Ounce.init(Ounce.java:22) ~[?:?]
        at me.chr1s.weedz.Weedz.onEnable(Weedz.java:20) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at com.volmit.bile.BileUtils.load(BileUtils.java:128) ~[?:?]
        at com.volmit.bile.BileUtils.reload(BileUtils.java:75) ~[?:?]
        at com.volmit.bile.BileTools.onTick(BileTools.java:548) ~[?:?]
        at com.volmit.bile.BileTools$2.run(BileTools.java:324) ~[?:?]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:82) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:415) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1255) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:428) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1206) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1034) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3432-Spigot-699290c-cc5ddd7]
        at java.lang.Thread.run(Thread.java:833) [?:?]
chrome beacon
#

Don't register your recipe twice

rough drift
#

Can you execute a command, and get its output as text? (Would a custom command sender be required?)

chrome beacon
#

Yeah a custom sender would probably work

rough drift
#

alright

chrome beacon
#

But why do you need the message?

little cradle
rough drift
# chrome beacon But why do you need the message?

I just have a server I want to put in as little maintenance as possible, as it needs to be highly available, so I just want to run version checks on other plugins, and if they have an update, collect them, download, and restart (I have a set of plugins I need to be constantly up to date)

fossil lily
#

Does anyone have an example of retrieving data with MongoDB? I can't figure it out :(

night copper
#

send your code and error

night copper
#

I need to go sleep rn maybe someone will help

little cradle
#

ok thank you for your help tho!

fossil lily
brave goblet
#

For future references

chrome beacon
bright jasper
#

Anyone have an alternative to SWM that works with 1.18 and has a larger world limit/can store worlds in database chunked?

crude loom
#

?paste

undone axleBOT
sterile token
#

Which are the items flags?

crude loom
fossil lily
hasty prawn
#

In a paste

lavish robin
#

To save location objects with gson would I make a custom gson serilizer and deserilizer?

opal juniper
#

no

quaint mantle
opal juniper
hasty prawn
#

Which line is 261

crude loom
#

The 'return true' line at the goTo command

hasty prawn
#

wot

crude loom
#

Yeah this is really weird

hasty prawn
#

Run it again and see what line it is

#

You probably moved it

lavish robin
crude loom
hasty prawn
#

Does that world exist

#

"SkyWars"

crude loom
#

It should detect it, I will check for both the location and the world

hasty prawn
#

Well you don't return if it's null

#

So

#

It just sends null to the sender and then carries on

crude loom
#

Ah, the world returned null
I ended up 'creating the world' and then it finds the world
And this makes it work for some reason

quartz valve
#

When I do this

Bukkit.getPluginManager().disablePlugin(Bukkit.getPluginManager().getPlugin("WorldEdit"));

the WorldEdit commands are not unloaded. How can I change this?

fossil lily
#

How can I make it JSON?

Document uuid = mongoCollection.find(new Document("_id", p.getUniqueId().toString())).first();
String uuids = uuid.toJson();
JSONObject json = (JSONObject) JSON.parse(uuids);
p.sendMessage(json.get(1).toString());
little cradle
#

does anything know how to make a second crafting recipe for the same itemstack item?

lavish robin
fossil lily
noble lantern
noble lantern
little cradle
#

yes

#

i think so at least its really hard to explain

little cradle
#

the items used to craft it are also an itemstack item

sand vector
#

Is it ok to have like 3-5 event classes for different things? Like one for general stuff, one for enchants and one for crates

ivory sleet
#

mye

#

it sounds like a good choice of design quite frankly

sand vector
#

Ok

noble lantern
#

typically you want to keep classes relatively short and not have them handle a million different things at once

#

Makes it a lot easier to handle your project down the line & easier to find fixes for something

ivory sleet
#

ye the general principle you could consider here would be single responsibility, "a class must only change for one major reason"

noble lantern
#

You could

little cradle
#

ye thats what i want to do

noble lantern
#

set a PDT to the item on what material was used to craft them

#

then when its put into the result slot set the material to the one you have stored in PDT

#

IE if you use wood to make gold blocks

#

set a PDT of the type of wood you used, then when its put into the crafting slots, use that item as the result slot

#

cant do this with the crafting recipe api though

#

youll have to handle with either

the prepare crafting event, or inventory click event

little cradle
#

thanks and do you think it'd be easier to do if i made a custom crafting table like as a gui?

noble lantern
little cradle
#

yes but im unfamiliar with PDT so im not sure where to even start

noble lantern
#

?pdt

#

BRUH

ivory sleet
#

?pdc

ivory sleet
#

:3

noble lantern
#

oh fuck i did t

#

actual 4head i am

ivory sleet
#

no worries

#

im usually a 5hed

noble lantern
#

i think i need to get more coffee

little cradle
#

thank you

noble lantern
#

only just woke up an hour ago

ivory sleet
noble lantern
#

also big hype doc PR'd my fix for spigot i_chikabop

#

well

#

fixed my issue for spigot*

ivory sleet
#

thats nic

noble lantern
#

i didnt make the PR LMAO

ivory sleet
noble lantern
#

ngl I wasnt expecting a fix so fast

#

just realized i afk'd on my test server all night

ivory sleet
#

oh

#

thats a lot of snakes certainly

little cradle
#

im still a little confused but im kinda getting it so basically i'll store my itemstack item with PDC and whenever i put the item i want the recipes items back for i change the return item to the item i want?

noble lantern
#

store the material used to craft it as a string, or you could make your own custom PDC for Material

little cradle
#

thats still really confusing but at least im moving forward lmao

#

if i store it as a string is there anything that could interfere with it

noble lantern
#

can you explain by interefering

little cradle
#

like if i put the original item that isn't an itemstacked item does it have a change to still give the items im wanting?

noble lantern
#

BUT

#

if its a block type

#

and you place it

#

pdc is lost

little cradle
#

ok thank you

lavish robin
#

will a plugin treat the directory it is in as the root directory?

noble lantern
#

i could be wrong though

lavish robin
#

is there any reason not to use the built in file reader /writer objects?

ivory sleet
#

over?

#

or like in comparison to?

noble lantern
#

under the hood spigot just writed to files using java InputStreams/OutputStreams (for yaml)

lavish robin
#

I don't know if spigot has any that would be better

#

else im just going to use javas

noble lantern
#

your fine using spigots, its just using javas code under the hood

ivory sleet
#

The most common writer u want to use is probably BufferedReader/Writer

lavish robin
#

buffered writer ever?

ivory sleet
#

which when working with file io are instantiatable through Files using Path objects

#

mye

#

well just make sure u're not double buffering

noble lantern
flat olive
#

anybody now how to remove the mongodb connection warnings from console?

ivory sleet
#

it just uses Yaml from snakeyaml and invokes dump respectively load

ivory sleet
noble lantern
#

too lazy to find that in snakeyamls code base z_aCRYYY

ivory sleet
#

🥲

flat olive
#

like when I connect a thread to my database it just warns me that someone connected, cause I have a change stream up

ivory sleet
#

looks like mongo hooks into ur logger system

flat olive
#

yeah

#

so how can I remove it

#

is this a fix?

#
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;

...

static Logger root = (Logger) LoggerFactory
        .getLogger(Logger.ROOT_LOGGER_NAME);

static {
    root.setLevel(Level.INFO);
}
crisp steeple
#

i got that a lot too

#

had to change something with the logger settings like what you did

ivory sleet
#

mye

flat olive
#

what I just pasted?

crisp steeple
#

i think i had to provide the mongo name somewhere

ivory sleet
#

well idk if spigot uses logback

#

but it'd be sth like that, altho that looks like itd disable all warnings

flat olive
flat olive
crisp steeple
#

yea one sec

flat olive
crude loom
#

Is it possible to save a list of lists in the config?

ivory sleet
#

ye

#
list:
  - [1,2,3]
  - [false,true,false]
  - ["hi"]
crude loom
#

thanks!

flat olive
#
        Logger.getLogger("org.mongodb.driver").setLevel(Level.SEVERE);

#

I believe this is it.

crisp steeple
#

this is what i did

flat olive
#

Thanks i'll test it out! 😄

vivid hill
#

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;

public class Compass implements Listener {
    @EventHandler
    public void onPlayerInteract(InventoryInteractEvent event){
        Player player = (Player) event.getWhoClicked();
        if (player.getItemInHand().getType() != Material.COMPASS) {
            PlayerInventory inventory = (PlayerInventory) Bukkit.createInventory(null, 9*3, "§d§lErze");


            player.openInventory(inventory);






        }

    }
}
#

how can i make cliable items

#

thats what i got so far

crisp steeple
vivid hill
#

i already saw that but it does not explain how to open a gui by clicking on a compass

#

like i need an funktion that makes so I can click on a compass and a gui is openning

echo basalt
#

listener

flat olive
#

it doesnt work for me

vivid hill
#

or me to

#

for me too

flat olive
#

im talking about mongodb disabling their logger warnings

vivid hill
#

oh

#
    @EventHandler
    public void onJoin(PlayerJoinEvent event){
        Player player = event.getPlayer();
        event.setJoinMessage("§7§lWelcome§r " + player.getName());
        player.playSound(player.getLocation(), ENTITY_PLAYER_LEVELUP, 500.0f, 1.0f);
        player.getInventory().setItem(1,ItemManager.createItem(Material.SLIME_BALL, 1, 0, "§cSpieler verstecken"));
        player.getInventory().setItem(4,ItemManager.createItem(Material.CLOCK, 1, 0, "§cNavigator"));
        player.getInventory().setItem(7,ItemManager.createItem(Material.ENDER_CHEST, 1, 0, "§cExtras"));
    }
}
```why am i getting errors at ItemManager
delicate lynx
#

well

#

what is the error

vivid hill
#

Cannot resolve symbole ItemManager

delicate lynx
#

?di

undone axleBOT
delicate lynx
#

it's pretty clear what the problem is

little cradle
# vivid hill i already saw that but it does not explain how to open a gui by clicking on a co...
public void openInventory(final HumanEntity ent) {
        ent.openInventory(inv);
    }

public class NAME implements Listener {

    @EventHandler
    public void onPlayerUse(PlayerInteractEvent event) {

        Player p = event.getPlayer();
if (event.getAction().equals(Action.RIGHT_CLICK_AIR) || event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
            if (p.getInventory().getItemInMainHand().equals(Matieral.COMPASS)) {
                 ent.openInventory(inv);
                   }

That should work haven't tested it thought

#

it works with the article that person sent you

vivid hill
#

I will try it thank you

little cradle
#

also its prolly hella messed up with indents bc i typed it in discord but you can just fix em up a bit

#

np

delicate lynx
#

that won't work

vivid hill
#

damn haha

#

why

delicate lynx
#

also please use variable names that are helpful rather than just a single letter

#

p.getInventory().getItemInMainHand().equals(Matieral.COMPASS)

#

getItemInMainHand() returns an ItemStack

#

you also shouldn't use equals() for this type of comparison

little cradle
#

ye its prolly hella wrong sorry i grabbed it from some old code

vivid hill
little cradle
#

yeahhh don't use that

vivid hill
#

okey

#

like i am really struggeling at the moment

#

haha

little cradle
#

just google it like "how to run a command when you click and item spigot" or something like that to find some similar and piece it together

#

helps you learn more than ppl just giving you the code

delicate lynx
#

don't just copy code without understanding it

little cradle
#

^

vivid hill
#

thank you

noble lantern
#

Inventory API requires a living entity, which implies we can open inventories to mobs

little cradle
#

make sure you read the code slowly and try to understand why it works

noble lantern
little cradle
noble lantern
#

i wanna do something like that one day

little cradle
#

that'd be impressive

noble lantern
#

Use a markov chain that when players do something on a server, the entity will learn from it and play the server accordingly

sand vector
#

Is there a way of setting a max stack size for a custom item?

#

Ok cheers

noble lantern
#

thats possible

#

wether they work correctly or not, dunno

#

use essentials /i command

delicate lynx
#

I don't see that method

noble lantern
#

/i dpick

#

gives you a stack of 64 diamond picks

#

however the actual functionality is broken and you cant really use it, or take one and palce the stack in your inventory

#

yep that too lmao

#

i wish MC supported stacks like these ngl

little cradle
#

hey burchard im still messing with the PDC just wanna know if this looks right for the saving its value

public class Bud {

    public static ItemStack bud;

    public static void init(JavaPlugin plugin) {
        createBud(plugin);
    }

    private static void createBud(JavaPlugin plugin) {
        ItemStack item = new ItemStack(Material.FERN, 1);
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(ChatColor.translateAlternateColorCodes('&',"&2Bud"));

        List<String> lore = new ArrayList<>();
        lore.add(ChatColor.translateAlternateColorCodes('&',"&7Freshly Harvested Bud."));
        meta.setLore(lore);

        item.setItemMeta(meta);
        bud = item;

        NamespacedKey Key = new NamespacedKey(plugin, "bud");
        meta.getPersistentDataContainer().set(Key, PersistentDataType.DOUBLE, Math.PI);
        item.setItemMeta(meta);
    }
}
noble lantern
#

^ i havent really touched pdc in so long though

#

i made a wrapper around the api so i havent touched it in a long time

little cradle
#

yeah im actually fix that rn ive been putting if off

little cradle
#

lol

noble lantern
#

yep definatly really usefull

#

most shit in bukkit i havent touched in so long because i use my own API

#

the other day i tried to use the normal extends BukkitCommand api and lord

#

took me like 20 mins to relearn it lmfao

#

redo the inventory and command apis'a re the main ones

#

current inventory api is aids to handle

flat olive
#

I fixed it, I had multiple slf4, plus you only need api, not simple pac

noble lantern
#

oh cmon discord its a 38kb picture

#

there

little cradle
#

when im retrieving the value does it come before or after the itemstack method? because if its after how would I put the value for the itemstack output?

noble lantern
#

command api is done in a very similar way, in fact i even made a step by step guide on how to do this on spigot

flat olive
#

I'm currently making use of a change stream using mongodb, plus im about to make a chat core with essential commands all custom

ivory sleet
#

the code u wrote up there is a bit ugh... weird

noble lantern
#

why are so many ppl making drug plugins lately lmao

ivory sleet
#

usually you get the item meta, then you get the pdc from the item meta, then change the pdc, then set the item meta back

flat olive
#

oh yeah someone came to me about it

#

they didnt know how to track the drug blocks

little cradle
noble lantern
#

indeed and theyre both optional, so if you only want console executors you only need to call onConsoleSender

#

i need to add tab completion to it

noble lantern
little cradle
#

fr? lmao

#

thats insane

noble lantern
#

yep and the code ive seen from them is....

#

okay i cant shit talk anyones code cause sometimes mine is rather questionable

#

but the code ive seen is rather questionable lmao

#

i meeeaaaan

#

50% of the time im drunk or high when coding, but hey it works

#

havent smoked in months though

flat olive
#

💀

noble lantern
#

youd be surprised

flat olive
#

jp

#

lol

noble lantern
#

how many spigot devs actually drink/smoke

#

alex has a bottle of jaeger on the daily it seems

#

i need to stream when i code my dogshit plugin(s)

#

only issue is

#

i dont wanna answer peoples coding questions

#

cause when i talk about this shit irl i make no sense when i try to talk about it

#

like i can type what i want in text just fine

#

but when i try to speak it i literally sound like a sped dude

flat olive
#

drunk texting perhaps?

little cradle
noble lantern
#

im turning 21 in almost 2 weeks

flat olive
#

oh

noble lantern
#

so im holding off on everything

undone axleBOT
little cradle
#

btw in PDC the container is the recipe box right?

little cradle
#
if(container.has(key1, PersistentDataType.DOUBLE)) {
            
        }
noble lantern
#

just tried it is

little cradle
#

like thats checking the crafting table and whats in it?

noble lantern
#

the result slots pdc?

little cradle
#

idk thats what im asking you XD

#

im trying to go off the post you sent me

#

im trying to mess with it and test it to understand it better

#

wait

noble lantern
#

well thats how you check if a key exists so that part is right yes

#
code blocks or github
little cradle
#

wait so container is the saved itemMeta?

noble lantern
echo basalt
#

I honestly hate when I'm not sober

noble lantern
echo basalt
#

nah

#

we had a blast workin together

noble lantern
#

i honestly cant wait until im old enough to buy my own beer and crack a few while ripping some code out

echo basalt
#

made a client-side hologram menu system with hitbox detection

echo basalt
noble lantern
#

but its a different feeling when i can go anywhere and buy it

#

or order it to my house

echo basalt
#

I know an indian dude buying beer at 15

#

man can buy beer but they asked for his ID when he wanted a red bull 💀

noble lantern
#

i once got asked to show my ID when buying cough syrup one time

echo basalt
#

lmao wtf

noble lantern
#

sometimes you get asked for one when buying nail polish remover too

echo basalt
#

acetone

echo basalt
#

that dude's a brazilian youtuber 💀

noble lantern
#

oh fr

#

whats he do?

echo basalt
#

he got popular doing those hot knife videos

noble lantern
#

OHH

echo basalt
#

and tasting MRes from the entire world

noble lantern
#

that dude

echo basalt
#

he's the crazyrussianhacker of brazil

noble lantern
#

i need to make a channel called

#

CrazyAmericanCoder

echo basalt
#

I should just make a spigot youtube series

noble lantern
#

ive been wanting to do that

echo basalt
#

"hey welcome to my programming series where we use colorful language against static abuse"

#

but I have a horrible accent and a very monotone voice

noble lantern
#

but i feel like i wouldn't be good at explaining things

#

my voice aint too bad

#

sec

#

mic quality is meh in it though

#

sounds like im some shy sheltered 20 year old

echo basalt
#

okay your voice is not monotone

little cradle
#

sounds pretty good id just suggest using something like kripst for back ground noise other than thats its not bad

echo basalt
#

and get a decent mic

noble lantern
echo basalt
#

I picked mine up for like 80 bucks

noble lantern
#

my headset mic is actually decent but that video wasnt make with it

echo basalt
#

headset mic kinda poopy

#

sure it does the job

noble lantern
echo basalt
#

"aint too bad" isn't "god tier"

little cradle
#

ye its good just it has a limit on the free version

noble lantern
echo basalt
#

coding tutorial with autotune when

noble lantern
echo basalt
#

true

noble lantern
#

just something that gets your point accross in a fun way

echo basalt
#

if you can hear the laptop fans and the track pad being scratched

#

then you know it's good

noble lantern
#

💀

#

in discord calls you cant hear it haha

#

my laptop fans are super quiet too

#

so its pretty amazing you hear that

#

through a 40$ headset too

echo basalt
#

¯_(ツ)_/¯

#

my water pump starts making a funny rattling noise which shakes through my very thin walls

#

mic surprisingly doesn't catch it

noble lantern
#

i need to re-setup my desktop

#

i just need a better cpu for it

#

everything else is good

echo basalt
#

I think my gpu is kinda garbage compared to the rest of my system

noble lantern
#

my laptop has a 2060, and dekstop has a rx580 iirc

echo basalt
#

bruh

#

I got a 1060 6gb on my desktop

#

but also 32gb ram

noble lantern
#

yeah laptop only has 16gigs

echo basalt
#

a water-cooled 5600x

noble lantern
#

doing development on it is aids

echo basalt
#

just because

echo basalt
noble lantern
#

well i need to run

echo basalt
#

I'm probably gonna stay up all night

#

coding

noble lantern
#

1 intellij tab
30 chrome tabs
3 mc servers
2-6 clients depending on how fast i want to test multiversion support

echo basalt
#

5 intellij tabs

#

about 48 chrome tabs

#

who needs mc servers

little cradle
#

you guys can run chrome?

echo basalt
#

ehh don't worry we've all been there

noble lantern
#

i do have a 64gb ram dual cpu server in my house though

echo basalt
#

my first like 3 years of spigot were on a laptop with a 4th gen i3 and 4gb ram on a hdd

noble lantern
#

oml you poor thing

echo basalt
#

then I took some commissions and built a pc

noble lantern
echo basalt
#

and I had no monitor so I had to use a book on my lap to hold the mouse and keyboard

#

and code on my 720p tv

little cradle
#

i think morice just humbled me XD

noble lantern
#

i need to wait another month to get paid for ae work, then im doing some hard upgrades

little cradle
#

6 gb ram and a gt 630

echo basalt
#

rip wood pc

#

instead of upgrading my rig imma get those fancy nanoleaf lights because rgb = fps right?

#

just gotta finish this commission so I can afford more than like 2 lights 💀

noble lantern
#

you can just download more ram

#

i cant stand commission work

#

people always change shit when i have a whole system setup

echo basalt
#

:)

#

youtubers don't really do that

noble lantern
#

and theyre addition normally means rewriting my entire system i have written

echo basalt
#

they just provide you with a document

noble lantern
#

TELL BROKESKIES THAT

echo basalt
#

lmao

noble lantern
#

fucking asshole

#

hate that guy now

#

uhm

#

right click iirc

echo basalt
#

preston and socksfor1 have always been fine for me

#

maybe you just had a bad experience

noble lantern
echo basalt
#

nop

noble lantern
#

uhmm

echo basalt
#

socks has a private team

noble lantern
#

ahh

echo basalt
#

preston has media companies

noble lantern
#

youtubers do pay bank though

echo basalt
#

depends

noble lantern
#

they typically over pay for most things

echo basalt
#

ehh

little cradle
#

what'd you do for brokeskies?

echo basalt
#

they pay the same rates as a reputable server

#

preston underpaid me surprisingly

noble lantern
#

and i had to rewrite songoda's skyblock to basically be a prison thing

noble lantern
little cradle
#

oh god

#

does he even play minecraft anymore?

noble lantern
#

nope hes a fortnite dude now

echo basalt
#

not sure about server work, I mostly just do individual videos

#

they're extremely technical but all the technical stuff never appears to the audience

noble lantern
echo basalt
#

lmao

#

I made a plugin where you could literally eat any block

#

to do that, I only had to rewrite half the server

#

because everything was a retextured golden apple 💀

noble lantern
#

yea i remember that one vid you sent eating bedrock

#

was kinda of bullshit (in a good way)

#

you should release it as a public plugin

echo basalt
#

nah I got paid good money for it

#

I can resell it but uploading it is kinda ehhh

#

it's also not that good on an actual server, just decent for a video

noble lantern
#

give source code ill maintain it for 35%

#

jk

echo basalt
#

bro I had to write a second project to write the .json files automatically from the game's assets

noble lantern
#

thank god you didnt do that by hand

echo basalt
#

but whatever I had fun doing it

#

now I'm messing with pathfinders to make satanic mobs

noble lantern
#

override zombie ai, set entity speed to 10

echo basalt
#

that's way too easy

#

cows with spinning pentagrams that fly up and down and shoot fireballs at nearby entities just like a blaze

little cradle
noble lantern
#

gotta go do some shit

little cradle
#

ight thanks bro

echo basalt
#

I only use spigot listeners to inject the nms pathfinder when chunks load

#

fun thing I discovered

#

all entities have a target, even passive mobs

little cradle
echo basalt
#

you can add a pathfinder and passive mobs now have a target that you can grab and make them attack

little cradle
#

too easy? damn lmfao

dense geyser
#

does anyone know what WorldType.VERSION_1_1 is in spigot 1.8.8?

little cradle
#

i mean if you want a challenge i can give you some better ideas

echo basalt
#

I'm not looking for challenges

#

if I want a challenge I can just start optimizing all my client-side block code to work with chunk packets

little cradle
#

that gave me a headache just reading it

echo basalt
#

or make reverb by sending packets quicker than 20tps

little cradle
#

reverb?

echo basalt
#

yeah like a sound engine

little cradle
#

oh ok thats what i thought i wasn't srue tho

echo basalt
#

listen to a sound packet, do some async processing and resent more packets

#

make intellij on minecraft

little cradle
#

is that even possible?

echo basalt
#

yessir

#

maps and item frames

#

raytracing player eye every tick

little cradle
#

i was just finna ask how you'd even do that

echo basalt
#

I didn't

#

Just giving insane ideas

little cradle
#

no ik but i mean like how someone would even go about doing it

echo basalt
#

also if you type a / in the chat

#

all characters written after that will send an individual packet

#

(for command completion)

little cradle
#

kinda reminds me of that old captain sparkles video with the verizon phone

flat olive
#

modding minecraft is totally different from plugin developing

echo basalt
#

that is possible but quite technical tbh

ivory sleet
#

but I mean from a certain pov not so

echo basalt
#

you could run a server, do some image processing and conversion and render it in-game

little cradle
flat olive
#

yes of course

echo basalt
#

the audio part isn't really that possible

flat olive
#

its modding making them do things not implemented into the game

#

commands are just what execute what code you have

#

executing mods make it a mod

echo basalt
#

ehh

flat olive
#

executing commands to do bukkit things is a plugin

echo basalt
#

you can always abuse the minecraft protocol

flat olive
#

so modding is easy if you learn how

echo basalt
#

instead of banning cheaters why don't we just crash their client 🤔

ivory sleet
#

I mean

#

bukkit plugins do modify server sided stuff

noble lantern
ivory sleet
#

just mostly using an abstraction as opposed to nms itself

flat olive
noble lantern
#

but modding also requires server sided stuff if you plan to have multiplayer support to the server

noble lantern
ivory sleet
#

spigot is event based

noble lantern
#

you can pretty much do anything in plugins

flat olive
#

yeah but it would considerably take a large amount of code

ivory sleet
#

so with a couple of events it should be doable

#

nah

noble lantern
#

besides registering GUI,s keybinds and other things

echo basalt
#

not even events

#

just nms pathfinders

#

if you're doing custom mobs, pathfinders are the way

#

you can use the offhand-key as a hotkey for plugins

#

and that's about it

ivory sleet
#

sth like paper does offer a goal api so no need to use nms pathfinders for trivial stuff

echo basalt
#

I mean pathfinders for attack stages and such

#

or would you rather have a big map?

ivory sleet
#

big map?

#

I mean goal selectors map goals to priorities

echo basalt
#

¯_(ツ)_/¯

#

I still don't know what's the difference between both goal selectors

ivory sleet
#

oh one is for deciding the target

#

and one is for deciding where to walk

#

and so they run independently from each other

echo basalt
#

bruh

ivory sleet
#

mye its a bit dodo altho Ig it has its advantages

echo basalt
#

only thing I don't like is how if you return true for the a() method, no more pathfinders will run

#

so I just call the e() method and return false

#

:)

ivory sleet
#

lol ye

#

well Idk the obfuscated names of the methods but indeed

echo basalt
#

a() is a canTick

#

and e() is a tick

#

something like that

ivory sleet
#

a

#
    public abstract boolean canUse();

    /**
     * @return whether the goal should continue executing
     */
    public boolean canContinueToUse() {
        return this.canUse();
    }

    public boolean isInterruptable() {
        return true;
    }

    /**
     * Called when the goal is about to start executing
     */
    public void start() {
    }

    /**
     * Called when the goal stops executing, usually to reset the mob's state.
     */
    public void stop() {
    }

    public boolean requiresUpdateEveryTick() {
        return false;
    }

    /**
     * Called every tick to update a goal that is in progress.
     */
    public void tick() {
    }

mojmaps

echo basalt
#

bruh

ivory sleet
#

ye lol

echo basalt
#

I don't use mojMaps

ivory sleet
#

figures 🥲

echo basalt
#

lack of groovy tutorials

ivory sleet
#

for gradle?

echo basalt
#

yeh

ivory sleet
#

ah I just use kotlin dsl

echo basalt
#

there are lots of kotlin ones

#

but I use groovy

ivory sleet
#

yuh