#help-development

1 messages · Page 699 of 1

quaint mantle
#

you just need to find place in dimension class where the data is stored

#

and just create methods that expose it

ivory sleet
#

do you recommend that or just callback inject the write and load method that takes an nbt compound

quaint mantle
#

i recommend create an interface which has method that returns reference to the data field in dimension class and then you implement it to a dimension class using simple @Override

#

so you have for example this

interface IDimensionData {
    NbtCompound getData();
    static IDimensionData get(DimensionThingy dimension) {
        return (IDimensionData)(Object)dimension;
    }
}```
#

(example)

#

then you have

abstract class MixinDimensionThingy implements IDimensionData {
    @Override
    public NbtCompound getData() {return data;}
}```
#

(it is all example and it will probably not compile)

ivory sleet
#

ah

#

yeah hmm

spare hazel
#

what is the event for interacting with an item? i forgot

quaint mantle
#

i would need to get on my pc anyways

#

and im on vacations rn

drowsy helm
spare hazel
#

alr

#

wait mixins exist for plugins??

near mason
#

whats mixins

#

:d

drowsy helm
#

they're talking about mods

spare hazel
#

the way of modifying minecraft's vanilla behaviors... i believe

#

am i right?

near mason
#

i think it does exist for plugins

spare hazel
#

how can i detect if an item is type of shulker box? there are a bunch of shulker box colors

dawn flower
#

is it possible to make the player's displayed hearts capped at 10?

quaint mantle
#

mixins is way to access and modify classes,methods,fields on runtime

spare hazel
dawn flower
ivory sleet
spare hazel
quaint mantle
ivory sleet
#

fair enough

spare hazel
# dawn flower exactly

you can use packets to send the player only 10 hearts but make it so it counts in the others

eg: 90/100 -> 9/10 | 5/20 - > 2.5 / 10

or you can calculate all the regeneration and damage and other stuff yourself

dawn flower
spare hazel
#

i think the easiest way is to use protocollib for packets

dawn flower
#

its the only health related packet i could find anyways

#

ill try ti

#

it*

spare hazel
#

alright

#

how can i get/set the Inventory stored in a shulker box?

rotund ravine
#

?google

undone axleBOT
tender shard
spare hazel
#

and then i have to cast ShulkerBox to Inventory? or i can just show it to the player?

kindred sentinel
#

How to change vanilla /me?

spare hazel
#

i think you just have to take the vanilla /me command permission from the player and create your own command. or use /PLUGINNAME:me

kind lily
#

Fast Chunk Pregenerator.... I have made a minecraft server and loaded 12000 and it took forever.... if I do it again and say 15000 or 20000... will it start from 12000 and continue or do I need to start all over from scratch? Thanks

sullen marlin
#

try and see?

#

I assume it will start from 12000, or at least be substantially quicker

#

also this is a dev channel

kind lily
#

I just did not want if it started all over... because then i need to wait a week again 🙂

#

Oh sorry

tender shard
#

it is not an inventory

spare hazel
#

i need to open the shulkerbox when the player right clicks the air

#

i did all the interact logic

tender shard
#

As I said, ShulkerBox extends Container which extends InventoryHolder

#

so you can easily get the inventory from any of that

spare hazel
#

can anyone tell me wtf is going on and how to fix this?

tender shard
#

escape

#

you're in multi-line-selection mode

#

which is enabled through middle-click + drag

spare hazel
#

and how can i disable it?

#

i did press escape

tender shard
#

well then press it again

spare hazel
#

yeah but how to disable multi line selection mode. it doesnt disable it

kindred sentinel
spare hazel
#

then why did u ask

quaint mantle
#

just mixin into place where is Me command and disable it

#

you can also unregister it

#

by mixining into registry

#

(Minecraft registry ofc)

#

also wouldn't there be event in bukkit everytime when command is registered

tender shard
kindred sentinel
#

._.

#

Idk

#

Ok

tender shard
#

the CommandMap has a Map<String.Command> if you really wanna mess with that

#

you can get it from the SimplePluginManager using reflection

drowsy helm
tender shard
#

to change audio settings

drowsy helm
#

Pinned though??

#

How much you changing audio settings lol

spare hazel
drowsy helm
#

Gotta micro analyse everything

tender shard
spare hazel
#

how to open an inventory for a player?

tender shard
#

do you sometimes also check the javadocs before you ask here

spare hazel
#

alr

#

?jd-s

undone axleBOT
drowsy helm
#

Personal inventory

tender shard
#

Player#openInventory(Inventory)

drowsy helm
#

Or

near mason
spare hazel
#

the javadocs doesnt have dark theme so i will check spigot forums and then ask here from now on.

near mason
#

xD

spare hazel
#

oh wait...

#

the spigot forums doesnt have dark theme either

tender shard
#

it does

#

not very nice though

orchid trout
tender shard
#

ikr

orchid trout
#

did you try windows 11 for 1 day and then immediately change back to windows 10?

#

or have you not switched yet

spare hazel
#

md_5 hates me

spare hazel
#

is there a way to set a shulkerbox's Inventory?

#

or will it change when i open it's inventory for the player?

#

lemme just

#

?paste

undone axleBOT
tender shard
#

You have to set back the changed BlockState to the BlockstateMeta and set that back to the ItemStack when the inventory is closed or changed

spare hazel
tender shard
#

You should also be using Tag.SHULKER_BOXES to check the material

spare hazel
#

ok

#

how can i get the tag of a material?

eternal oxide
#

a Material doesn;t have a Tag

#

a Tag is a collection of Materials

spare hazel
eternal oxide
#
if (!Tag.SHULKER_BOXES.isTagged(player.getInventory().getItemInMainHand().getType())) return;```
upper hazel
#

help why section - path = ' '

#

mean section == null?

#

minecraft 1.20.1

eternal oxide
#

loadConfiguration does not return a ConfigurationSection

upper hazel
#

oh

#

ahhah

#

wait

#

he return Yaml

#

Config

#

no it returns

#

FileConfiguration?

#

i think YamlConfiguraton this abstract

eternal oxide
shell robin
#
    private final Plugin plugin;

    public NukeTNTCommand(Plugin plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Bu komut sadece oyuncular tarafından kullanılabilir.");
            return true;
        }

        if (args.length < 3) {
            sender.sendMessage("Kullanım: /nuketnt <x> <y> <z>");
            return true;
        }

        try {
            double x = Double.parseDouble(args[0]);
            double y = Double.parseDouble(args[1]);
            double z = Double.parseDouble(args[2]);

            Location centerLocation = new Location(((Player) sender).getWorld(), x, y, z);

            new BukkitRunnable() {
                int tick = 0;
                int maxRadius = 3;
                int maxY = centerLocation.getBlockY();
                boolean shouldExplode = false;

                @Override
                public void run() {
                    if (tick <= maxRadius && !shouldExplode) {
                        for (int dx = -maxRadius; dx <= maxRadius; dx++) {
                            for (int dz = -maxRadius; dz <= maxRadius; dz++) {
                                for (int dy = -maxRadius; dy <= maxRadius; dy++) {
                                    double distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
                                    if (distance <= maxRadius) {
                                        Block block = centerLocation.clone().add(dx, -tick + dy, dz).getBlock();
                                        if (distance < maxRadius - 0.5) {
                                            block.setType(Material.TNT);
                                        } else if (distance < maxRadius) {
                                            block.setType(Material.RED_STAINED_GLASS);
                                        }
                                    }
                                }
                            }
                        }
                        tick++;
                    } else {

                        if (tick > maxRadius + 20) {
                            shouldExplode = true;
                        }
                        if (shouldExplode) {
                            for (int dx = -maxRadius; dx <= maxRadius; dx++) {
                                for (int dz = -maxRadius; dz <= maxRadius; dz++) {
                                    for (int dy = -maxRadius; dy <= maxRadius; dy++) {
                                        double distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
                                        if (distance <= maxRadius) {
                                            Block block = centerLocation.clone().add(dx, -tick + dy, dz).getBlock();
                                            block.setType(Material.AIR);
                                            if (distance <= maxRadius - 1) {
                                                block.getWorld().createExplosion(block.getLocation(), 4.0f, true);
                                            }
                                        }
                                    }
                                }
                            }
                            this.cancel();
                        }
                    }
                }
            }.runTaskTimer(plugin, 0L, 1L);

        } catch (NumberFormatException e) {
            sender.sendMessage("Geçersiz koordinatlar. Kullanım: /nuketnt <x> <y> <z>");
        }

        return true;
    }
}```I have a code like this
This code doesn't give error
It does not move downwards. Normally it should move down and when it touches a block it should prime the tnts and erase the red glass blocks
cunning sundial
#

Hello guys, i am very new to plugin development and have a strange issue. When i add anything to the config.yml building just spits an error saying "newPosition < 0: (-1 < 0)
". I don't understand it. Can anyone help? I will provide any code snippets you need.

shell robin
undone axleBOT
chrome beacon
cunning sundial
grave kayak
#

hello, im trying to read uuid's from a config file to assign prizes to them when they rejoin. im having issues with this iseligibleforofflineprize method. im unsure as to why its not working

        customFile.set("offline-prizes." + playerUUID.toString(), true);
        save();
    }

    public static boolean isEligibleForOfflinePrize(UUID playerUUID) {
        return customFile.getBoolean("offline-prizes." + playerUUID.toString(), false);
    }```

```@EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        UUID playerUUID = player.getUniqueId();

        // Check if the player is eligible for an offline prize
        if (CustomConfig.isEligibleForOfflinePrize(playerUUID)) {
            player.sendMessage("you're eligible for an offline prize!");
            awardPrizes(player);
            CustomConfig.removeEligibilityForOfflinePrize(playerUUID);
        }
    }```

im not getting the message "you are eligible for an offline prize!"
near mason
#

did u register the listener?

tender shard
#

I smell a nice filet steak with sauce bernaise

#

Its much better than static aboooose

#

Pro tip: next time you want to abuse static, eat a steak instead

grave kayak
#

basically this

gilded granite
#

any1 knows how i can add fakeplayers in tab with nms?

tender shard
#

now your config class is not reusable anymore

gilded granite
#

is there any ways i can use both spigot and mojangs mappings?

quiet ice
#

Under what logic do you think that makes sense?

#

Like at that point you'd need to make yet another mappings set

gilded granite
#

what is the packet that add player to the tab?

gilded granite
lilac dagger
#

i wonder why the compiler likes this

tender shard
gilded granite
#

then does a foreach(player)

quiet ice
gilded granite
#

send packet will work.?

tender shard
#

sending packets does work

#

in fact, packets are even meant to be sent

lilac dagger
quiet ice
#

But this has to do with the fact that while (true) is the easiest way to represent a goto without resorting to actually using goto (which is only a reserved keyword in java)

gilded granite
quiet ice
#

And most loops at their base are just a bunch of GOTOs.

small current
quiet ice
#

While/do-while loops are pretty much the only exception as they can only consist of IFNE or IFEQ or other similar opcodes

tender shard
shell robin
small current
shell robin
#

What do you mean by essentials code

onyx fjord
#

creative gamemode is weird

#

theres always issues with it

gilded granite
onyx fjord
#

hmm, isnt the menu clientsided?

tender shard
#

and what's the issue with that? isn't that exactly how it's supposed to be?

near mason
#

good luck

tender shard
#

but clicking in hotbar prints "quickbar" and clicking in the inventory prints "contain", how is that the same thing

#

yes,. that is true. you cannot detect that

#

clients can also create any NBT'ed items when in creative

onyx fjord
spare hazel
#

How can i detect if the player clicked on an item from their hotbar using InventoryClickEvent and then cancel it?

#

I know the cancelling

tender shard
spare hazel
#
@EventHandler
    public void onInventoryClose(InventoryCloseEvent e){
        if(e.getPlayer().getInventory().getItemInMainHand().getType() == Material.SHULKER_BOX){
            BlockStateMeta temp = (BlockStateMeta) e.getPlayer().getInventory().getItemInMainHand().getItemMeta();
            assert temp != null;
            temp.setBlockState((BlockState) e.getInventory());
        }
    }```

and this is giving an error for not being able to cast InventoryHolder to BlockState
gilded granite
#

Is there anyways i can spawn ServerSide npcs?

median fern
#

Yes but its difficult IIRC you need to use CraftBucket stuff
Assuming you want Player NPCS

gilded granite
#

Or should i modify the server code itself?

spare hazel
#

so what can i do. this is serious

#

i want to set it

tender shard
median fern
#

You do SB.getInventory() to get its content

#

ShulkerBox -> SB

spare hazel
#

i want to make it so players can right click the air to open the shulker box and when they close it it stores the contents of that in the shulker box

#

?paste let me paste it

undone axleBOT
tender shard
median fern
#
        Block block;
        if (block.getState() instanceof ShulkerBox box) {
            box.getInventory();
        }

``` I believe this is how, atleast from a block
tender shard
#

you have to set the updated blockstate back to the BlockStateMeta and then set that meta back to the itemstack

smoky anchor
spare hazel
spare hazel
tender shard
#

becasue you are not setting back the updated blockstate to the blockstatemeta and then setting that back to the itemstack, for the third time now

smoky oak
#

...is there a channel to help with minecraft client glitches?

spare hazel
median fern
#
Block block;
if (block.getState() instanceof ShulkerBox box) {
    var inventory = box.getInventory();
    inventory.addItem(new ItemStack(Material.ICE));
    block.setBlockData(box.getBlockData());
}
``` Perhaps this should work
tender shard
#

an inventory is an inventory and nothing else

#

you cannot just randomly cast stuff to whatever you like

cunning sundial
#

Have anyone ever encountered error saying "newPosition < 0: (-1 < 0)"? I am very new to the plugin dev, and got this is I add anything in the config.yml.

Config.yml:
deletionDelay: 15

All times I call something connected with the config

getConfig().options().copyDefaults();
saveDefaultConfig();
long deletionDelay = getConfig().getLong("deletionDelay", 600L); // Default: 600 seconds (10 minutes)
long ticks = deletionDelay * 20L; // Convert seconds to ticks (20 ticks per second)

tender shard
#

show the full stacktrace

spare hazel
willow yacht
#

What is the best way to provide effects to the player when they are holding some item in their offhand?

cunning sundial
tender shard
undone axleBOT
cunning sundial
spare hazel
tender shard
#

try updating the maven-resources-plugin to 3.3.1 in your pom

cunning sundial
median fern
#
// Get ShulkerBox Item and add item
ItemStack stack = new ItemStack(Material.SHULKER_BOX);
if (stack.getItemMeta() instanceof BlockStateMeta meta) {
    if (meta.getBlockState() instanceof ShulkerBox box) {
        var inventory = box.getInventory();
        inventory.addItem(new ItemStack(Material.ICE));
        player.sendMessage(Component.text("WORKED"));
        box.update();
        meta.setBlockState(box);
        stack.setItemMeta(meta);
    }
}

This is how you get/Add stuff to an ShulkerBox Item. Tested it too

cunning sundial
tender shard
cunning sundial
#

Plugin.yml
name: WayPlayPlugin
version: '${project.version}'
main: org.wayplay.wayplay.WayPlayPlugin
api-version: '1.20'
commands:
startevent:
description: Starts the new event
usage: /startevent <X> <Y> <Z>

Config.yml
deletionDelay: 15

Directory called Schematics

cunning sundial
#

can the director ybe the problem?

median fern
#

Yw

tender shard
#

also you should definitely remove this:

                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>

it gives no advantage and only causes problems

#

Many people who are using the maven-shade-plugin commonly set to false for reasons beyond my grasp. This is generally a bad idea, as it can lead to problems if you’re writing a library, and has absolutely no advantages. Here’s a rule of thumbs: If your project shades dependencies, it should create a dependency-reduced-pom.xml. The...

tender shard
#

if disabling resource filtering fixes it, the problem is your schematic files

cunning sundial
#

i mean, without filtering it built successfully

tender shard
#

ok then the schematics are the issue. we can fix this by donig this:

spare hazel
#
@EventHandler
    public void onInventoryClose(InventoryCloseEvent e){
        if(e.getPlayer().getInventory().getItemInMainHand().getType() == Material.SHULKER_BOX){
            BlockStateMeta temp = (BlockStateMeta) e.getPlayer().getInventory().getItemInMainHand().getItemMeta();
            ShulkerBox temp2 = (ShulkerBox) temp.getBlockState();
            temp2.getInventory().setContents(e.getInventory().getContents());
        }
    }```

i hope it works...
tender shard
#
  1. create a new resources directory, called resources-unfiltered
  2. Use this resources config:
<resource>
    <filtering>false</filtering>
    <directory>src/main/resources-unfiltered</directory>
</resource>
<resource>
    <filtering>true</filtering>
    <directory>src/main/resources</directory>
</resource>
  1. move your schematics directory into resources-unfiltered
cunning sundial
tender shard
#

show a screenshot of your project structure pls

#

basically the whole contents of your resources folder

#

sth must be wrong with that

cunning sundial
#

won't let me

tender shard
#

?img

undone axleBOT
#

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

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

cunning sundial
tender shard
#

huh that is very weird

#

try adding back the resource filtering and then run mvn clean package

cunning sundial
#

i haven't even run the command and it works by adding it back

tender shard
#

it was probably a caching issue

cunning sundial
#

black magic, 100%

tender shard
#

probably mvn cleanwould have fixed it

cunning sundial
#

Anyway, thanks for helping

cunning sundial
tender shard
#

lets hope there is no next time lol

cunning sundial
smoky oak
#

can you do a switch instead of an else if chain if you want to be like 'Math random, if below 0.15 do this, if betweeen 0.15 and 0.75 do this, else do this'?

tender shard
#
        switch ((0 <= num && num <= 0.15 ) ? 0 :
                (0.15 <= num && num <= 0.75) ? 1 : 2) {

            case 0:
                // 0 - 0.15
                break;
            case 1:
                // 0.15 - 0.75
                break;
            case 2:
                // > 0.75
                break;
        }
smoky oak
#

i

#

i guess

tender shard
#

why not just use if

smoky oak
#

this is probability stuff, thorns etc

#

i end up with at least 8 cases

#

i presented a reduced example

tender shard
#

but why would you want to use switch/case instead of if/else

smoky oak
#

cuz... its generally faster?

tender shard
#

getting a random number is 10 thousand times slower than the if/else

smoky oak
#

ah

#

fair point then

smoky oak
#

on that topic, is it faster to generate multiple random numbers by using a Random instance, or is it neglilible and i can just do Math.random() each time?

quiet ice
#

Math#random is single-threaded iirc

smoky oak
#

so is minecraft

quiet ice
#

So for huge amounts Math#random is bound to be slower than comparable Random implementations

smoky oak
#

nah i need like 4 numbers

quiet ice
#

Then the overhead of allocating a random (which in turn also requires a random starting seed) is probably not worth it

smoky oak
#

ah ok

tender shard
quiet ice
#

Though to be honest for that project the limits of Maven become quite apparent

#

It be great if maven had as many scopes are gradle has.
And even then I'm not sure if it suffices

spare hazel
#

private ArrayList<Enchantment> enchantments = new ArrayList<>();

is this the right way of storing enchantments for later use?

spare hazel
#

adding them to an item

small current
#

Are you gonna use the index of the arraylist or you are going to loop

spare hazel
#

im gonna use a foreach loop and then add the enchants from there and add a lore listing the enchants

small current
#

Use Set

#

HashSet to be specific

#

Set<Enchantment> salam = new HashSet<>

spare hazel
#

you forgot the ()

small current
#

Whatever

#

U get the idea

spare hazel
#

Set<Enchantment> dadash_irani_hasti_questionmark = new HashSet<>(); @small current

quiet ice
#

I am not sure if HashSet is worth it here

small current
#

It is

quiet ice
#

You'll at most store 4 items into it

quiet ice
#

A plain old array should suffice

small current
#

Depends on the way he is adding

#

If he knows the amount

#

Array is the way

kindred sentinel
#

how to change vanilla campfire recipe?

#

using events

quaint mantle
small current
quiet ice
small current
#

No one is using threads

quiet ice
#

You meant ConcurrentHashMap.newKeySet()

lilac dagger
#

we've got executors and futures

#

is there anything else?

quiet ice
quiet ice
kindred sentinel
#

Why is there no CampFireSmeltEvent? >_<

small current
lilac dagger
#

i see

small current
quiet ice
#

Well being able to use your collections as you wish without a ConcurrentModificationException is still useful

quiet ice
kindred sentinel
#

there is only campfire start event

#

but no campfire smelt event

kindred sentinel
#

oh

small current
kindred sentinel
#

in campfire start there is no setResult method, but i didn't test BlockCookEvent

small current
#

Let him cook

kindred sentinel
#

Yeah it works with block cook event

#

thx

small current
#

Np

distant wave
#

hey guys what event can i use to check when item was moved from slot to slot?

kindred sentinel
#

onInventoryClickEvent

frail pilot
#

With the hotkey it's a direct InventoryClickEvent

#

Otherwise if you talk about picking an item an droping it somewhere else, then two InventoryClickEvent are fired

distant wave
#

im looking for something which occurs when item is equiped to main or offhand or is equiped to armor slot

frail pilot
#

Basically everything is mapped to InventoryClickEvent

eternal oxide
#

and drag

frail pilot
#

Yup

#

You can check the slot and the click type

bleak nacelle
#

i will do a project anyone want to code with me (im not good) but can help

near mason
#

u meant u want to help any project or want to get help for a project?

eternal oxide
#

?services

undone axleBOT
smoky oak
#

Is there a tool that approximates a song in minecraft notes? I know people have been building roller coasters with the paraphrased songs on them usingn noteblocks, but I want a way to convert a .mp3 into a list of minecraft sounds with pitch and volume and play it back using code

livid dove
#

Whats the best way to prevent a specific water block from not spreading water?

worldly ingot
smoky oak
#

thanks

timid jetty
#

Has anyone ever tried to change mobs spawning conditions?

chrome beacon
#

?ask

undone axleBOT
#

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

timid hedge
#

Why does it send 2? when im looking at a chest? and i ave the permission vagtvault.set

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if(sender instanceof Player) {
            Player player = (Player) sender;
            if(label.equalsIgnoreCase("vagtvault")){
                if(player.hasPermission("vagtvault.set")){
                    Material chest = Material.CHEST;
                    Block targetBlock = player.getTargetBlock(Collections.singleton(Material.CHEST), 1);
                    if(targetBlock.getType() == chest) {
                        System.out.println(1);
                    } else{
                        System.out.println(2);
                    }
                }
            }
        }

        return false;
    }
}
tender shard
#

why are you checking the command's label?

#

print out targetBlock

echo basalt
#

He set chest as a transparent block

#

Idiot

#

At least read the docs

half bane
#
Caused by: java.lang.IllegalAccessError: class com.wolfyxon.itemlimiter.ConfigMgr (in unnamed module @0xab24119) cannot access class com.sun.tools.javac.util.List (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0xab24119
    at com.wolfyxon.itemlimiter.ConfigMgr.<clinit>(ConfigMgr.java:11) ~[?:?]
    at com.wolfyxon.itemlimiter.ItemLimiter.<init>(ItemLimiter.java:11) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
    at java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128) ~[?:?]
    at jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) ~[?:?]
    at java.lang.Class.newInstance(Class.java:645) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:79) ~[spigot-api-1.19
.4-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:145) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
    ... 15 more

I get this when the plugin starts

tender shard
#

wrong List import

half bane
#

whats the right one?

tender shard
#

java.util.List

half bane
tender shard
#

List.of is java9+

#

use Arrays.asList

timid hedge
tender shard
#

1 is a distance of 1

#

it starts at your eye location

timid hedge
#

Okay thanks

half bane
half bane
smoky oak
# echo basalt Idiot

i cant help but imagine you like this cuz I've heard that damn speech way too often

echo basalt
#

I'm on the train

tender shard
half bane
#

thats weird

shadow night
#

I was using an older version of java recently so I made my own List.of(...) method lol

half bane
gilded granite
#

is there any packets to update scoreboard?

smoky anchor
#

Yo guys, any Brigadier-like command library ?
The best I found is CommandAPI, but I don't like the way it does execution
just a lambda with Player and Object[]

tender shard
#

cloud

smoky anchor
#

💚

#

tyvm

chrome beacon
#

Or just use Brigadier

tender shard
#

yeah brigadier is probably the closest you can get to be using brigadier lol

smoky anchor
#

Well yes but

#

I need NMS for that

chrome beacon
#

Well no you just need Brigadier as a library

gilded granite
chrome beacon
#

Take a look at Spigadier for how to wrap things

#

or just use that

chrome beacon
true perch
#

Would annyone be able to link me to a solid scoreboard api?

tender shard
#

the scoreboard api is so messy though. would be nice if there'd just be a method that takes a list of strings and shows that as scoreboard

#

without having to deal with creating dummy objectives and shit

eternal oxide
#

basically a billboard

chrome beacon
lilac dagger
#

i've made a simple wrapper myself

#

NameTag is mostly to not clash with Team

#

it supports per player sidebar within the same scoreboard

onyx fjord
#

can persistentdatatype be void?

#

aka only key no value

smoky anchor
#

Don't think so ?

#

Minecraft does not allow NBT keys with no value so I would assume PDC doesn't either

chrome beacon
#

Just store a boolean or smth

smoky anchor
#

Any way to do this without the warning ?

pseudo hazel
#

yes, check the cast

smoky anchor
#

don't think I can do that

pseudo hazel
#

wdym

chrome beacon
#

🤔 Does that return a collection? or is that a stream

smoky anchor
#

a collection

chrome beacon
#

That does look like a stream to me

smoky anchor
#

oh wait

#

right, brain lag ty

chrome beacon
#

e -> e.getBukkitEntity()
You can get rid of the anon method

#

Entity::getBukkitEntity uwu

smoky anchor
#

There's a difference ?
I thought it was just syntax sugar.

chrome beacon
#

Create method a to run method b
or just run method b directly

smoky anchor
#

oh cool, never knew that

distant wave
chrome beacon
#

toList uwu

hushed spindle
#

yo, im loading in a json file for text translations and stuff but it seems gson doesn't support special characters. any way i can make it allow them anyway? disableHtmlEscaping on my gsonbuilder doesnt work. the json file itself has utf8 encoding

chrome beacon
#

Why not use yaml

distant wave
hushed spindle
#

its a big translation file and its a nightmare for my translators to work with

chrome beacon
smoky anchor
hushed spindle
#

why would it be worse

smoky anchor
#

not the same it seems

tender shard
hushed spindle
#

json is easier to debug and harder to make mistakes in imo

chrome beacon
#

eh not really

hushed spindle
#

if you say so

tender shard
#

In json you miss a comma or quote or bracket and file is broken

chrome beacon
#

also yaml has variables

tender shard
#

Yeah anchors are great

hushed spindle
#

same with yml if you miss a closing quote or one space too many in indentation

#

and this is just text anyway i dont need variables

tender shard
#

Yaml was made for mighty pirates

chrome beacon
#

Valid json is valid yaml

tender shard
hushed spindle
#

in any case thats not the issue, i dont have a problem with yml and still use it, its just easier to manipulate in my use case

#

i just wanna know how i can allow special characters like stars in said json files

chrome beacon
#

They should work just fine as long as it's a string

hushed spindle
#

like i said the encoding is being finicky, this (img1) is being translated to this (img2)

eternal oxide
#

your file is not saved as utf8

hushed spindle
#

i mean i think it is, let me double check

#

nop, set it to utf8 and its still the same

chrome beacon
#

Send the file

hushed spindle
#

its 4k lines are you sure

quaint mantle
#

Put it on ghist

#

Or smth

#

Gist

hushed spindle
#

isnt the point to see the encoding of the file

#

not the contents

quaint mantle
#

Oh

#

Maybe I have no clue

eternal oxide
#

your file is not saved as utf8 or you are not reading as utf8

tender shard
eternal oxide
#

likely your IDE encoding is wrong

hushed spindle
#

maven encoding was utf8 also but for some reason global encoding was set to some windows shit despite default encoding being utf8

#

gonna try again

#

still the same

eternal oxide
#

throw your jar in here and someone will check your encoding

hushed spindle
#

in the generated json file itself it displays properly, seems to be a gson loading issue

eternal oxide
#

are you specifying the enbcoding when reading?

hushed spindle
#

there's such a method for gson?

tender shard
#

how are you reading it? BufferedReader, ... ?

eternal oxide
#

you are using teh builder?

#

or as alex says a reader, if so set teh StandardCharsets.UTF_8

hushed spindle
#

yup, using a simple builder with a bufferedreader

#

ill add that to the reader

native bramble
#

is it possible to have tabcompleter with nicknames in chat without command?

chrome beacon
#

Yes

native bramble
#

how?

native bramble
#

can i make appear this tab only after some symbol?

hushed spindle
#

yup that ended up fixing it, thank you olivo and alex

sacred mountain
#

so real

hushed spindle
#

and elgarl

tender shard
#

no clue why UTF8 still isn't the default D:

chrome beacon
#

Backwards compat 🤷‍♂️

hushed spindle
#

😔

onyx fjord
#

would it be safe to assert that itemmeta isnt null here?

#

i do validation for material higher

tender shard
#

If type isnt air, yes

#

Just assert or Objects.rNN it

timid hedge
#

Why dosent net.minecraft imports work for me?

kind hatch
#

Did you run BuildTools with the --remapped flag?

remote swallow
#

have you ran buildtools and updated theimport?

timid hedge
#

Sorry i havent used buildtools before, so i have found this java -jar BuildTools.jar --rev 1.8.8 and where should i paste that in?

shadow night
#

If you haven't used buildtools before, how have you hosted your servers?...

timid hedge
#

I havent used it before in a plugin

kind hatch
#

Prolly some site that hosts 3rd party downloads. Which you shouldn't use btw.

timid hedge
#

I have a localhost

shadow night
#

For me everything is homebuilt, every jar I use was made by java -jar BuildTools.jar

kind hatch
shadow night
#

Shouldn't buildtools install the stuff on the local maven automatically? Also, is your maven dependency spigot-api or just spigot?

kind hatch
#

It does

upper hazel
#

vault support 1.20.1?

kind hatch
#

Yes

upper hazel
#

but spigotMc doesn't say so

river oracle
#

yeah idk what's upwith that project

#

hasn't been updated since 1.17.1 afaik, but regardless it works

upper hazel
#

ok

shadow night
river oracle
#

I mean at the bare minimum just update the number on spigot 🤷‍♂️

timid hedge
#

Can someone please help me with buildtools?

kind hatch
river oracle
shadow night
#

And make sure you have spigot instead of spigot-api in your pom!

kind hatch
#

^

timid hedge
upper hazel
#

and also help why section == null

river oracle
#

have fun lmfao

shadow night
#

Wait, does 1.8 not have player.spigot().sendMessage(...) or whatever it was?

river oracle
kind hatch
river oracle
#

could've been slightly earlier

shadow night
#

We need an open-source nms thingy doing lib

river oracle
#

did mojang even use components in 1.8?

kind hatch
timid hedge
kind hatch
#

If you want an easier time running BuildTools, then yes.

#

Otherwise you'll have to use the command line.

shadow night
#

That one server admin with his windows 95 pc waiting 7 and a half decades for buildtools to finish:

upper hazel
#

file exitst but why null(

kind hatch
#

Sadly can't do anything about people's internet connection speed. :p

upper hazel
#

i just load section

kind hatch
#

The section you are trying to grab probably doesn't exist in the file you have loaded.

#

Most likely reason for it being null

shadow night
#

I'm thinking about buying a pc, because I only have a laptop rn, but I'm not rich and I'm unsure. There is a good thing (I can build spigot jars blazingly fast if I have a pc) and a bad thing (big box ahhh)

upper hazel
#

but how? file not null so section should to be not null

kind hatch
kind hatch
shadow night
kind hatch
#

Pay attention here.

The file may not be null, which is good.
The section in the file that you are looking for may not exist resulting it the section being null.

upper hazel
#

lol

#

then how i can get file manager for getting data

#

section != fileManager?

#

i mean his path

#

just (for comparison) it seemed to me FileConfiguration end file is like location end locaton.getWorld

kind hatch
#

Wdym? You can get whatever value you want using ConfigurationSection#getXYZ()

upper hazel
#

so is there a way to get the data no?

#

this is

native bramble
#

which inventory is for camel?

lost matrix
#

You can use spigot ConfigurationSerializable api to serialize any object you want and store it in a
FileConfiguration

kind hatch
#
File file = new File("config.yml"); 
FileConfiguration config = YamlConfiguration.loadConfiguration(file);  
config.getInt("path.to.int"); 
config.getDouble("path.to.double"); 
``` Doesn't get much simpler than that. ¯\_(ツ)_/¯
upper hazel
#

I do this but for some reason I get null

#

YamlConfiguration.loadConfiguration(file); - this is null

lost matrix
eternal oxide
#

are you forgettign about teh getDataFolder()

kind hatch
native bramble
#

i need to get saddle inside the camel

upper hazel
#

File mineDerictory = new File(plugin.getDataFolder(),"mines");

#

i get in here

kind hatch
#

You forgot the file extension

#

Technically it's part of the name.

upper hazel
#

no this derectory

kind hatch
#

Oh

#

Well there's your issue

#

You can't load a directory into a ConfigurationSection

#

You need an actual YML file

lost matrix
upper hazel
#

1146519473663262720

compact haven
#

if you want to load a directory you’ll need to list all files in the directory (google) and run loadConfiguration on each

upper hazel
#

oh wait

upper hazel
#

i get derictory

#

end load files

#

in this derictory

#

if this not exists i create derictory

compact haven
#

the debugger is clearly showing the sections aren’t null though

#

what’s wrong?

upper hazel
#

section null

#

section - ' '

#

this mean null i think so

compact haven
#

definitely not null, just empty maybe

upper hazel
#

end what this mean

compact haven
#

No

#

That’s normal

onyx fjord
#

what are these called in snakeyaml?

compact haven
#

The empty part is normal

upper hazel
#

really

compact haven
#

but idk how to do that in snake yaml, I’ve tried a few times

onyx fjord
#

how would i iterate over these / set them?

upper hazel
compact haven
# upper hazel really

yes because it’s saying that there’s no key. That’s normal because you’re at the root. Notice how the next sections have entries for that

#

yes bro section exists

remote swallow
#

so check impl ig

timid hedge
#

So whhen i have been downloading buildtools will it automaticaly be in my project from now on or do i need to add it as a depency or something?

upper hazel
#

bruh🥶

remote swallow
#

?nms

remote swallow
#

read

onyx fjord
#

i see

#

great

kind hatch
green plaza
#

?nms

upper hazel
#

so if section.getPath = ' ' - this shold be normal? this not give me file path??

kind hatch
#

You have to load the file using the file path first, then find the data you want in that file using the section path.

upper hazel
#

oh

timid hedge
kind hatch
#

You only have to run BuildTools if you don't have a specific version installed or need an updated version of the spigot jar.

timid hedge
#

But my question is when i am creating a new projekt should i do it with the "minecraft plugin" on intellij or should i just create a projekt as normal and add the spigot shaded.jar or what it is called

kind hatch
#

You can do it however you want. The MCDev plugin is just a convenience tool that does some setup for you. Although people say the plugin has memory issues. (I haven't ran into any though, but mileage may vary)

lost matrix
remote swallow
#

(or gradle)

lost matrix
#

You can do it however you like. Just dont mix up manually adding jars and building artifacts with something like maven or gradle.

timid hedge
remote swallow
#

you can make the plugin with mcdev and then update it

timid hedge
#

Becuase i have downloaded buildtools now but the nms imports dosent still work

remote swallow
#

you need to change the dependency

kind hatch
kind hatch
timid hedge
#

I did the thing in the git app where it loaded many things and downloaded it or what its called

remote swallow
#

once you've ran buildtools for 1.8 you need to change ur spigot depdency from xml <dependency> <groupId>org.spigotmc</groupId> <artifactId>spigot-api</artifactId> <version>1.8.8-R0.1-SNAPSHOT</version> <scope>provided</scope> </dependency> to ```xml
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8.R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

kind hatch
#

They are using 1.8

remote swallow
#

oh

kind hatch
#

Ik

lost matrix
#

Well then scrap everything. Just look up a random tutorial from half a decade ago, throw everything together and hope for the best.

kind hatch
#

PACK ER UP BOYS

timid hedge
kind hatch
timid hedge
#

I didnt download the buildtools gui i downloaded everything from the start

kind hatch
#

So you ran it from the command line then?

#

Using java -jar BuildTools.jar --rev 1.8.8?

timid hedge
#

Yes

kind hatch
#

As long as you got the Success message at the end, then you'll be able to use NMS

timid hedge
#

So the nms imports are working exept for one, the import net.minecraft.server.v1_8_R3.ChatSerializer; isnt working

remote swallow
#

that isnt a direct class

#

its a subclass of IChatBaseComponent

kind hatch
#

IIRC, ChatSerializer is a subclass of IChatBaseComponent

timid hedge
#

So i should import IChatBaseComponent?

kindred sentinel
#

how to save yml config after adding there value?

kind hatch
#

FileConfiguration#save(File file)

#

Or JavaPlugin#saveConfig() if you are using the default one.

kindred sentinel
#

ty

tawdry echo
#

How can check in plugin if player join using 'premium' account

kind hatch
#

online-mode: true

tender shard
#

By using online mode, then listen to PlayerJoinEvent

sterile sapphire
#

Does anyone also have a crate plug-in for 1.20.1?

remote swallow
#

excellent crates

sterile sapphire
#

Didn’t work

kind hatch
remote swallow
remote swallow
#

it comes in the zip you download

sterile sapphire
#

I uploaded it and the zip didn’t create a folder on server restart.

remote swallow
#

unzip the zip on your pc

#

extract the 2 jars

#

upload them to the server

sterile sapphire
#

I’m putting the zip straight into the server files

remote swallow
#

that is wrong

kind hatch
#

^

remote swallow
#

do what i just said to do

sterile sapphire
sinful edge
#

It's a bit late, but the problem was that Minecraft changed how the data is stored - individual values are no longer cut in two if they don't fit into the remainder of the current long. Figured that out a while after that comment after reading trough the relevant article on wiki.vg again. Strangely the new 3D biome data does seem to be packed ...

remote swallow
#

unzip it

sterile sapphire
#

Wait idk if I have the right thing

#

It’s not an option

sterile sapphire
river oracle
#

who knew extracting from a zip file could be so hard

sterile sapphire
#

Not me

small current
#

?paste i wanna use it

undone axleBOT
remote swallow
kind hatch
sterile sapphire
#

Is this a good time to say I’m on a iPad 💀

small current
remote swallow
sterile sapphire
#

Could u dm me the right file?

remote swallow
sterile sapphire
#

What is nex engine sorry?

remote swallow
#

the api the plugin requires to work

kind hatch
#

The core lib needed to run that plugin

sterile sapphire
#

Oh okay thanks

#

Thanks guys so much I’m trying it now

#

Also idk if this counts as help-dev

#

But you know how like most mc server websites have the same ish template for there website

#

How do u get the templates?

remote swallow
#

tebex most likely

sterile sapphire
#

I’ll look into what that is 🤔

crisp forum
#

When does BlockExplodeEvent get called? I tried it with creeper but it didn't work

eternal oxide
#

beds in the nether

crisp forum
quiet ice
#

EntityExplodeEvent?

eternal oxide
#

EntityExplodeEvent

crisp forum
#

Thanks

kindred sentinel
#

Why when i'm trying to get something from config file after reloading of the server it returns instead of data memory section?

kindred sentinel
#

And how to get data from Memory Section

tender shard
#

by using one of the thousand getSomething(...) methods?

kindred sentinel
#

?

lost matrix
elder venture
#

How do I track player specific kill? I was thinking of Arrays to help me but I never really knew how

Like if PlayerA kills PlayerB, I want it to make a score to SPECIFICALLY count PlayerA's kills towards PlayerB

With PlayerA to PlayerC or PlayerA to PlayerD having their own seperate scores

kindred sentinel
remote swallow
#

get should return an object

#

cast it to what you want or use the getX method

#

eg for string
(String) config.get("path") or config.getString("path")

lost matrix
remote swallow
#

all this time ive been running gradle with 64mb of ram and having 1 min nms builds

lunar wigeon
#

I run System.gc() every tick to clear every useless object in memory and it works but I have 17 TPS, what should I do??

remote swallow
#

with 1gb its a solid 11s

lost matrix
kindred sentinel
#

oh ok

#

i think getObject cause i use hashmap to store data

lunar wigeon
elder venture
kindred sentinel
lost matrix
kindred sentinel
#

HashMap

lost matrix
#

Of which type

median fern
#

Trying to load up CraftBukkit

#

And its unable to get jar

kindred sentinel
#

HashMap<String, HashMap<String, String>>

#

._.

lost matrix
remote swallow
median fern
#

Thats what I did

remote swallow
median fern
#

Do I open it from here?

kindred sentinel
lost matrix
quaint mantle
median fern
#

I opened it up CraftBukkit folder in Intelji

quaint mantle
#

i despite you

#

you should burn in hell

remote swallow
quaint mantle
#

why would you ever make double map???

kindred sentinel
#

getObject("field", ConfigurationSection)?

quaint mantle
#

this is literally n² amount of memory used

lost matrix
median fern
#

Ok

quaint mantle
#

yeah

sterile sapphire
#

Is it advised to be running 6 servers on 1 pc. All 6 being only 100x100 blocks, bc someone told me no but there only small servers being like a 100x100 block server.

quaint mantle
#

i read the whole source code

median fern
#

So I got that err when opening CB

sterile sapphire
lost matrix
sterile sapphire
#

6 cores?

#

I’m not a pc guy.

lost matrix
#

CPU core threads

quaint mantle
#

thread isnt core

median fern
#

Correct

quaint mantle
#

core can have multiple threads

median fern
#

He didnt say thread

#

He said Core

lost matrix
#

Yes but i included hyperthreading. 3 cores 6 threads should be fine as well

quaint mantle
#

so, the best would be, to have 24 cores

lost matrix
#

Which is included by saying core threads

quaint mantle
#

lol

sterile sapphire
#

So..

#

What did u mean?

lost matrix
chrome beacon
kindred sentinel
lost matrix
#

And memory if we are at it

chrome beacon
#

True

#

that too

lost matrix
chrome beacon
#

though it's probably not going to need much memory

kindred sentinel
#

like what?

chrome beacon
#

since the worlds are small

sterile sapphire
kindred sentinel
#

i have something like
playerId:
section:
field1: String
field2: String

#

then if i want to get "section" i should do like getConfigurationSection("playerId")?

remote swallow
#

getConfigurationSection("playerId.section")

median fern
#
[ERROR] Failed to execute goal on project craftbukkit: Could not resolve dependencies for project org.bukkit:craftbukkit:jar:1.20.1-R0.1-SNAPSHOT: org.bukkit:bukkit:jar:1.20.1-R0.1-SNAPSHOT was not found in https://libraries.minecraft.net/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of minecraft-libraries has elapsed or updates are forced -> [Help 1]
[ERROR] 
kindred sentinel
lost matrix
kindred sentinel
#

oh i got it thanks

sterile sapphire
median fern
#

Specs?

#

Because we would need to know Specs

sterile sapphire
#

Not sure 🙃

#

I’ll try have a look now

quaint mantle
lost matrix
sterile sapphire
#

System?

#

Btw

median fern
sterile sapphire
#

I do not have the pc on me rn but I will look when I can. This is bc I’m hosting on the pc but operation it through Wi-Fi on my iPad 😅

median fern
#

what?

kindred sentinel
#

So I think there is better way to save this sections instead of adding HashMap<String, HashMap<String, String>> to config file, isn't it?

median fern
#

Yes?

sterile sapphire
kindred sentinel
median fern
#

Figure it out

lost matrix
kindred sentinel
sterile sapphire
#

Is there a place I can send photos In here?

kindred sentinel
sterile sapphire
#

No access

lost matrix
#

For example you could have a whole data manager stored in a config and simply load/save it like this:

FileConfiguration config = ...;
PlayerDataManager dataManager = ...;
config.set("manager", dataManager);

...
FileConfiguration config = ...;
PlayerDataManager dataManager = config.getObject("manager", PlayerDataManager.class);

! As long as you let PlayerDataManager implement ConfigurationSerializable !

quaint mantle
#

dfu is chad

elder venture
tall dragon
#

does any1 know if there is a way to use Minimessage on item names?

sterile sapphire
lost matrix
lost matrix
tall dragon
remote swallow
quaint mantle
lost matrix
#

I thought this was burried

remote swallow
#

nop

quaint mantle
#

never

remote swallow
#

stll used

remote swallow
robust helm
#

for yml something else

lost matrix
robust helm
#

alr ty

quaint mantle
#

use dfu with jsonops

#

for json, dont use just gson

#

dfu is great way of handling json

#

and nbt

#

and other formats if you implement them ofc

worldly ingot
#

DFU is overengineered for most people's purposes

robust helm
#

what dfu?

worldly ingot
lost matrix
#

Didnt really dive deep into it, but isnt it only useful if you have potentially changing schemas
between versions? Doesnt make much sense in most cases.

worldly ingot
#

Correct

quaint mantle
worldly ingot
#

You can say the same thing about Docker and K8s, but I'm still not going to use that to spin up my local test server lol

sullen marlin
remote swallow
worldly ingot
#

I mean I just have my own VPS KEKW I don't need my girlfriend's desktop for it

remote swallow
#

but the desktop is free

lost matrix
#

True. Who needs a gf if you have your own root server. PES_CringeGrin

worldly ingot
remote swallow
#

choco who is ur work husband

worldly ingot
#

Is that a thing people have?

remote swallow
#

yeah

#

bet its chollco

median fern
#

CraftBukkit aint working yea

remote swallow
#

@worldly ingot pr whore', this is ur job

sullen marlin
#

Did you build Bukkit first

kindred sentinel
median fern
#

Ohh

#

That makes sense ngl

#

Yeah Ill build bukkit now

kindred sentinel
#

I think there is easier way...

median fern
#

Now I built it

#

Where do I place the jars?

remote swallow
#

run the install goal then reload craftbukkit maven

kindred sentinel
#

i feel very stupid..

worldly ingot
#

These are called POJOs, Plain Old Java Objects

remote swallow
#

if you could be any exception what would it be

median fern
#

This Install?

remote swallow
#

yeah

median fern
#

Okie

remote swallow
#

id be no class def ex or npe

gilded granite
#

Minecraft has alr a combat log?

public void onEnterCombat() {
        super.onEnterCombat();
        this.connection.send(new ClientboundPlayerCombatEnterPacket());
    }

    public void onLeaveCombat() {
        super.onLeaveCombat();
        this.connection.send(new ClientboundPlayerCombatEndPacket(this.getCombatTracker()));
    }```
remote swallow
#

combat tracking more of combat loggign

gilded granite
#

yeah

worldly ingot
#

I'd be a HeadlessException

worldly ingot
#

So like... 1.7?

gilded granite
#

how i can i use that to prevent freecam or phase

protected void onInsideBlock(BlockState iblockdata) {
        CriteriaTriggers.ENTER_BLOCK.trigger(this, iblockdata);
    }```
remote swallow
worldly ingot
#

You can't stop people from free camming. It's entirely client-sided

#

The client is sent world data too so it's welcome to explore it however it sees fit, especially if it's just moving the camera about and not actually moving the player entity itself

gilded granite
#

What about for phase?

quaint mantle
#

should I do this, or make it a class, or do something completly different

remote swallow
#

this weeks snapshot waas fuckin shite

worldly ingot
#

I mean it's just 1.20.2

#

You can't expect all that many new features lol

remote swallow
#

weve had loads of internal changes recently

#

this and bug fixes

kindred sentinel
#

how to delete field from config file?

lilac dagger
#

set it to null

gilded granite
#

anyways to spawn server side npc

chrome beacon
#

Use Citizens

gilded granite
#

no but with custom pathfinding etc

chrome beacon
#

Yeah Citizens

gilded granite
#

how does citizens do?

quaint mantle
#

like nothing happens

gilded granite
#

is there source ocde?

chrome beacon
#

Yeah it's open source

gilded granite
#

oh nice

chrome beacon
#

Also just use their API

gilded granite
worldly ingot
#

The Twitch integration was sort of half-baked and incomplete so it not working anymore is likely just as a result of Twitch's API changing

gilded granite
#

I will try to remake similar

chrome beacon
#

No need to make yet another implementation

quaint mantle
#

or should I just fgind mc src

#

to learn about it\

worldly ingot
#

It's not worth learning

chrome beacon
#

That's been done so many times and it's just a waste of time

worldly ingot
#

It doesn't exist anymore

quaint mantle
#

im curriousa bout it

#

oh

worldly ingot
#

SethBling made a video about it 9 years ago if you'd like https://www.youtube.com/watch?v=UqDpDIbT-OY

Minecraft+Twitch one-click streaming integration is a new feature coming soon to Minecraft. I give you an exclusive first look at the feature as I help Dinnerbone test it out.

SethBling Twitter: http://twitter.com/sethbling
SethBling Facebook: http://facebook.com/sethbling
SethBling Website: http://sethbling.com
SethBling Shirts: http://sethbli...

▶ Play video
median fern
#

What do these all do?

#

Also I cant access GameProfile

#

I have added CB as dep

remote swallow
#

gameprofile is nms

#

?nms

median fern
#

I can access Craft stuff

median fern
#

Hm

tender shard
#

GameProfile is in authlib

<repositories>
        <repository>
            <id>minecraft-repo</id>
            <url>https://libraries.minecraft.net/</url>
        </repository>
</repositories>
<dependencies>
        <dependency>
            <groupId>com.mojang</groupId>
            <artifactId>authlib</artifactId>
            <version>1.5.21</version>
            <scope>provided</scope>
        </dependency>
</dependencies>
#

but what do you need it for?

median fern
#

Just curious

#

I dont need it

#

Im really after NameTags

#

over head, with the ability to have diferent colors

#

so rainbow for example

worldly ingot
olive lance
#

Remember when they added the custom world generation? and then they just removed it

#

That was actually a great feature

gilded granite
#

why this isnt working

packet.send(new ClientboundMoveEntityPacket.Pos(npc.getId(), (short)(3 * 4096), (short)(106 * 4096), (short)(5 * 4096), true));```
signal kettle
#

Hello so I want to get yaw to rotation and found smth like this

    public static Rotation yawToRotationBackpack(float yaw) {
        return Rotation.values()[Math.round(yaw / 45f) & 0x7];
    }

but it's placing it forward (first photo) and I want reverse of it (second photo), how I can arvhieve it?

gilded granite
quiet ice
#

Like no - I ain't going to learn datapacks just to have fun for a few minutes

olive lance
#

It was so easy to just click create world and use the GUI and then boom you have th exact world you want

remote swallow
#

datapacks is mostly commands

blazing flare
#

I'm confused. I'm using intellij. I have a config file called tools.yml, when it's empty it is fine. When I add my desired content, it errors with newPosition < 0: (-1 < 0), if I then rename the file, it's fine. Any ideas?

sullen marlin
signal kettle
quiet ice
signal kettle
#

yup its enum

quiet ice
#

at which point I have to ask: Since when and why does this exist?

sullen marlin
#

Idk, where is it being used

signal kettle
sullen marlin
#

Looks like it's for item frames

signal kettle
#

to place custom furnitures on item click/use

quiet ice
sullen marlin
#

Are your furnitures based on item frames

gilded granite
#

@signal kettle java public static Rotation yawToRotationBackpackReverse(float yaw) { int totalValues = Rotation.values().length; int index = Math.round(yaw / 45f) & 0x7; int reversedIndex = (index + totalValues / 2) % totalValues; return Rotation.values()[reversedIndex]; } try that

signal kettle
#

yes they base on item frames

blazing flare
fleet falcon
#

learnjavanotbukkitlearnjavanotbukkitlearnjavanotbukkit

remote swallow
#

what

fleet falcon
#

not related above

gilded granite
#

how i can get itemstack from player hand?

tribal quarry