#help-development

1 messages Β· Page 2029 of 1

quaint mantle
#

Why is this happening when i try to make jar for my plugin?

tardy delta
#

What's the error?

mellow edge
#

can I use maven-assembly-plugin instead of shade plugin

#

because I don't get two files into my folder, and one fo them is not shaded

hybrid spoke
tender shard
#

maven shade is basically the better version of maven assembly

mellow edge
#

I set the output directory to my plugins folder but I get these two files

#

only one of them works

tender shard
#

and where's the problem? use the working one

hybrid spoke
#

the original jar is the original without the shaded stuff iirc

mellow edge
#

since the output folder is plugins folder or my server one of them is considered as Ambiguous plugin

tender shard
#

show your maven shade plugin declaration

mellow edge
#

ok

#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>C:\Users\marti\Desktop\minigame\plugins</outputDirectory>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
tender shard
#

yeah

#

you should change the outpur directory in the maven-jar-plugin

#

not in the shade plugin

#

remove the <configuration> from your shade plugin

#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <outputDirectory>C:\mctest\plugins\</outputDirectory>
                    <finalName>MyAwesomePlugin</finalName>
                </configuration>
            </plugin>
#

and use this for the jar plugin

mellow edge
#

then I will get only the plugin with dependencies?

tender shard
#

yes

mellow edge
#

ok, thanks

#

I get nullpointerexception when I run my plugin with this maven plugin

#

[13:23:36 ERROR]: Error occurred while enabling MiniGamePlugin v${project.version} (Is it up to date?)

#

forgot

#

that's not the issue with maven jar plugin

sonic cosmos
#

Show plugin yml

chrome beacon
mellow edge
#

I fixed it the command in plugin in yml had different nameπŸ˜…

manic delta
#

guys with getBlockPlaced().setType(Material.AIR); i can "/setblock" to air right?

#

im using blockplaceEvent and i need to break the block after 10s

tall dragon
#

so use a runnable

manic delta
tall dragon
#

use a runnable to set the block to air after 10 seconds

manic delta
#

no i mean

#

getBlockPlaced().setType(Material.AIR)

#

this part is ok?

tall dragon
#

eh yes?

manic delta
# tall dragon eh yes?

what happens is that I saw that there is a breakNaturally() and maybe it drops items from the block so I want to just disappear it

tall dragon
#

breakNaturally() does not drop the items

#

it will show break particles

manic delta
#

mm

#

i dont want particles too

#

im doing one kbffa plugin

tall dragon
manic delta
#

okay thanks

#

is my first time using blocks im sorry

tall dragon
#

thats ok

tender shard
#

I love how you can use _ to make numbers more readable in java

    public static void main(String... args) {
        for(int i = 0; i < 1_000_000; i++) {
            
        }
    }
tall dragon
#

yes

#

or 1E6

#

:)

lilac dagger
#

that's really nice i agree

#

but i don't really use magic numbers in my code anymore

tall dragon
#

i think there is not. you can store it yourself tho

manic delta
#

πŸ’€

tender shard
#

yeah you could listen to PlayerChangeWorldEvent and then store the visited worlds in a string array in the player's PDC

tall dragon
manic delta
#

oh thanks

#

can i hug you?

tall dragon
#

of course!

tender shard
#

cough gay

manic delta
manic delta
tall dragon
tender shard
tender shard
tall dragon
mellow edge
#

what that returns? Bukkit.getWorld("world");

manic delta
tender shard
mellow edge
#

yes but which world

river oracle
#

The world world

tender shard
#

the world named world, obviously

tall dragon
mellow edge
#

thats exactly what I was looking for

tender shard
tall dragon
#

yeayea gotcha

manic delta
tall dragon
#

a long

manic delta
#

oh

#

thanks

tender shard
#

a loooooooooong one

manic delta
#

how many seconds is 20L πŸ’€

crimson terrace
#

1

tall dragon
#

depends on the tps of the server

#

but normally, 1

manic delta
#

should be always 20tps

#

we have a good machine

crimson terrace
#

if you explode 10000 tnt at once it will drop no matter how good the machine, so still not 20 tps at all times

manic delta
#

haha

proper notch
#

If you need something to be bound by time and not by the game, use a ScheduledExecutorService.

manic delta
#

nah i think this is ok

#

btw is a personal plugin

tender shard
#

a quick cheat sheet about java's datatypes

manic delta
crimson terrace
#

understandable

tall dragon
tender shard
#

np!

mellow edge
#

oh now I get what Bukkit.getworld means, it returns the world with that name in my server, it can be end, nether or overworld

manic delta
#

ok this is working

crimson terrace
tender shard
mellow edge
#

yes

#

for example if my nether is called the_nether I must pass that in to tp in it

tender shard
#

or it's the same float twice

river oracle
#

The float is slightly elevated above the normal numbers

manic delta
tender shard
#

it's like basic java

#

smh

river oracle
#

Smh

mellow edge
#

but how can I get the world name, for example if I put this plugin in some other server and it's world name isn't the same

tender shard
tall dragon
river oracle
#

Config :P

#

Or that

mellow edge
#

and get you get the type for exam. overworld

tall dragon
#

probably have one and add blocks to a map with a time it was placed

tender shard
tall dragon
manic delta
#

umm

#

but what if my timer is 5s

tall dragon
#

then you do 5 seconds?

manic delta
#

i mean

#

i think it's not a long time maybe it won't cause much lag

#

😧

tall dragon
#

maybe. but its bad practise

mellow edge
#
for(World wr : Bukkit.getWorlds()) {
            if(wr.getEnvironment() == World.Environment.NORMAL) {
                System.out.println("the overworld");
            }else if(wr.getEnvironment() == World.Environment.NETHER) {
                System.out.println("the nether");
            }else if(wr.getEnvironment() == World.Environment.THE_END) {
                System.out.println("the end");
            }else {
                System.out.println("costum dimension");
            }
        }```
tall dragon
#

what if you got 100 players placing at the same time

minor garnet
#
public static Map<Player, ArmorStand> HOLOGRAMS = new HashMap<>();
// method...
        if (!(entity instanceof ArmorStand)) return;
        LOOKING.put(player, entity);
        actionBar(player, "Pressione (BOTΓ£O DIREITO DO MOUSE) para coletar este item");

        final String name = entity.getCustomName();
        final String[] str = name.split("delete:");
        ItemStack stack = null;
        stack = this.getLootName(str[1]).get().item();
        final Material type = stack.getType();
        Bukkit.getScheduler().runTask(plugin, () -> {
            ArmorStand hologram = spawnHologram((ArmorStand) entity, type);
            if (hologram == null) {
                plugin.sendMessage("e nullo o holgogram");
            }
            HOLOGRAMS.put(player, hologram);
            if (HOLOGRAMS.get(player) == null) {
                plugin.sendMessage("no map colocando e nullo");
            }
            makeLook(hologram, player, delta);

        });
     //   final ArmorPose pose = ArmorPose.HEAD;
    //    pose.setLocationPose(hologram, player.getLocation());
    }```

im running this method on a async thread but when i spawn on sync trhead `ArmorStand hologram = spawnHologram((ArmorStand) entity, type);` , calling it back i get null error why?
mellow edge
#

that should work?

crimson terrace
#

could do a HashMap where you save the System milliseconds (when the block was placed) as a value to the Block, then have one runnable terminate blocks every 10 ticks or so

manic delta
tall dragon
#

you want me to make you an example?

manic delta
#

yes please

mellow edge
tall dragon
#

it will be very simple and ur gonna have to change most ur self but it should explain how to do it

manic delta
#

i learn better with examples sorrry

#

😧

tender shard
# manic delta i think it's not a long time maybe it won't cause much lag
public class Test extends JavaPlugin implements Listener{

    private final Map<Location,Long> placedBlocks = new HashMap<>();
    private static long fiveSecondsInMilliSeconds = 5 * 1000;
    
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            Iterator<Map.Entry<Location,Long>> it = placedBlocks.entrySet().iterator();
            long currentTime = System.currentTimeMillis();
            while(it.hasNext()) {
                Map.Entry<Location,Long> entry = it.next();
                Location loc = entry.getKey();
                Long time = entry.getValue();
                if(currentTime >= time + fiveSecondsInMilliSeconds) {
                    loc.getBlock().setType(Material.AIR);
                    it.remove();
                }
            }
        }, 2, 2);
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onPlace(BlockPlaceEvent event) {
        placedBlocks.put(event.getBlock().getLocation(),System.currentTimeMillis());
    }
}
#

Do it like this

#

this only uses one runnable

#

that's way better than having 10k runnables

tall dragon
#

ah well

#

there u go

crimson terrace
tender shard
#

notice that an Iterator is required because you cannot remove stuff from a map while iterating over it

tender shard
#

I'd use locations since they are merely a reference to a world + 5 numbers

crimson terrace
#

chunk loader plugin incoming with about 10 lines of code?

#

XD

tender shard
#

you can just use Chunk.addPluginTicket to keep a chunk loaded in one line

tall dragon
mellow edge
#

should that be the nether location: Location loc = new Location(Bukkit.getWorld(World.Environment.NETHER.name()), 1, 1, 1);

tender shard
#

I have a class called SimpleLocation for stuff like that

tall dragon
#

funny

#

mine is named the same

tender shard
#

is that supposed to do

#

that won'T work

mellow edge
#

I wanna get nether name

tender shard
#

you can't

#

there could be 100 different nether worlds

#

or none at all

#

only thing you can do is to loop over all loaded worlds and get the first one that is a nether

#

but as said, a server could have 100 different nethers

mellow edge
#

do you mean like that: java for(World wr : Bukkit.getWorlds()) { if(wr.getEnvironment() == World.Environment.NORMAL) { System.out.println("the overworld"); }else if(wr.getEnvironment() == World.Environment.NETHER) { System.out.println("the nether"); }else if(wr.getEnvironment() == World.Environment.THE_END) { System.out.println("the end"); }else { System.out.println("costum dimension"); } }

tall dragon
mellow edge
#

because I didn't get that idea

manic delta
#

damn i need to do a system to clone the world πŸ’€

tender shard
#

this gets you the first loaded nether world

#

or null if there is none

tender shard
mellow edge
#

wow thanks, but how can there be more than one nether?

tall dragon
#

server owners can create world on demand?

tender shard
#

with plugins like MUltiverse, you can create as many worlds as you want

#

for example I worked for a server that had 3 different nethers

#

ok granted, they were all separate servers on a bungee but I guess many servers just use multiverse or similar

manic delta
#

okay is working

#

@tender shardthank you

mellow edge
#

ok then, thanks

manic delta
#

can i hug you? (no homo)

tender shard
#

only if you change that to yeshomo

manic delta
#

πŸ’€

tender shard
#

fun fact, did you know discord supports the sed replace syntax like s/oldword/newword ?

tall dragon
manic delta
#

but

#

we will have a lot of users

#

it should be weird

#

like particles everywhere

hybrid spoke
#

turn it every tick into another material and then remove it

tall dragon
#

tell them to get better pc

manic delta
#

:kekw:

tender shard
manic delta
hybrid spoke
#

same

tender shard
# hybrid spoke turn it every tick into another material and then remove it

@manic delta

package de.jeff_media.test;



import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;


public class Test extends JavaPlugin implements Listener{

    private final Map<Location,Long> placedBlocks = new HashMap<>();
    private static long fiveSecondsInMilliSeconds = 5 * 1000;
    private static List<Material> blocks = Arrays.stream(Material.values()).filter(Material::isBlock).collect(Collectors.toList());

    private static Material getRandomMaterial() {
        return blocks.get(ThreadLocalRandom.current().nextInt(blocks.size()));
    }

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            Iterator<Map.Entry<Location,Long>> it = placedBlocks.entrySet().iterator();
            long currentTime = System.currentTimeMillis();
            while(it.hasNext()) {
                Map.Entry<Location,Long> entry = it.next();
                Location loc = entry.getKey();
                Long time = entry.getValue();
                if(currentTime >= time + fiveSecondsInMilliSeconds) {
                    loc.getBlock().setType(Material.AIR);
                    it.remove();
                } else {
                    loc.getBlock().setType(getRandomMaterial());
                }
            }
        }, 2, 2);
    }

    @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
    public void onPlace(BlockPlaceEvent event) {
        placedBlocks.put(event.getBlock().getLocation(),System.currentTimeMillis());
    }
}

#

try this lmao

manic delta
#

damn you guy

#

you are crazy

tall dragon
tall dragon
manic delta
#

like wool for vip rank

hybrid spoke
manic delta
tender shard
#

change the List<Material> blocks

crimson terrace
hybrid spoke
tender shard
#

List<Material> blocks = Arrays.asList(new Material[] {Material.DIRT, Material.DIAMOND_BLOCK, ........

hybrid spoke
#

p2w ftw!

manic delta
#

oh

#

thanks

tender shard
#
private static List<Material> blocks = Arrays.asList(Material.DIRT, Material.DIAMOND_BLOCK, Material.BEACON);
lavish hemlock
#

intelligence

manic delta
#

tysm

tender shard
manic delta
#

lol

crimson terrace
#

this is giving me a headache XD

hybrid spoke
#

oh well

tender shard
#

the one at the end turned on too

manic delta
#

lol

crimson terrace
hybrid spoke
crimson terrace
#

Villager nado

tall dragon
#

what the actualy fuck

hybrid spoke
#

forgot a break

manic delta
crimson terrace
#

you saving the players pathing and giving it to the villagers?

hybrid spoke
#

yeah the plan was to have a replay bot

#

i mean the pathing worked

tender shard
#

keep it like that

crimson terrace
#

I would love to see the code for that, could you give me some of it to satisfy my learning thirst?

tender shard
#

the fucking minecraft plugin for intellij sucks so hard

manic delta
hybrid spoke
crimson terrace
#

XD ok, thanks πŸ˜„

manic delta
#

😧

manic delta
#

or no?

hybrid spoke
#

not sure what you mean

manic delta
#

i mean

hybrid spoke
#

it would stay longer in a certain material

#

but also affect the total time

manic delta
tender shard
#

you want to have two loops, one to change the blocks and another one to get rid of them. Or create a custom Location object that also keeps track of when the block was changed in your loop

manic delta
#

and how can I get another colored clay in Material.? xd

tender shard
#

yes, so either use two schedulers running at different speeds, or use a custom class that holds the location and the time of the last block change

manic delta
#

i'm using 1.8 so RED_stained_clay don't exist

tender shard
manic delta
#

yep

tall dragon
#

ur gonna have to work with damage

tender shard
#

no idea how it works, I started with plugins in 1.13 and even then 1.8 was outdated since years

manic delta
#

damn πŸ’€

tender shard
#

you're like 10 major versions behind

manic delta
#

im using 1.8 for the pvp

tall dragon
#

Block#setData()

crimson terrace
#

and thats the only reason to use it imo

#

or is there anything else thats good about 1.8?

manic delta
#

nope

#

just the pvp

#

i dont like 1.9+ pvp

tall dragon
manic delta
#

lol

tall dragon
#

well did that not work?

manic delta
#

i will try

tall dragon
#

bruh fite me

hybrid spoke
#

probably hidden in the vastness of nms

tender shard
#

if I would ever have to use 1.8, I would use XMaterial to do stuff like colored blocks

#

it's in net.minecraft.server

tender shard
manic delta
#

what is it

hybrid spoke
#

sadly there is no XMobs

lavish hemlock
#

cross-compatible versions of different Bukkit APIs

tender shard
lavish hemlock
#

quite useful if you need to support all versions of the API (although I wouldn't suggest coding in 1.8)

tender shard
#

it basically decides at runtime what the block data is, e.g. on 1.8 RED_WOOL it gives you Material.WOOL with a data value of 14, and in proper MC versions it simply returns RED_WOOL

#

but I just see, you'll need XBlock instead of XMaterial

manic delta
#

i just will use 1.8

#

yea XMaterial use ItemStacks

tender shard
#

lol 4850$ for allatori

#

(for one year)

manic delta
#

what is it

lavish hemlock
#

obfuscator

tender shard
#

a code worsener

#

lol

#

let's stop saying obfuscator and start saying code worsener

#

it takes perfectly clean code and makes it look like @lavish hemlock wrote it

lavish hemlock
#

hey what

#

my code is good

hasty prawn
#

damn that was cold...

manic delta
tender shard
#

no idea, I never used XSeries

manic delta
#

i mean using spigot normal

hybrid spoke
#

you dont

tall dragon
#

XBlock is not normal

hybrid spoke
#

you simply cant convert a material to a block

tender shard
#

you clearly use XBlock in the screenshot

manic delta
#

yea but

#

I mean without that

tender shard
#

I don't know, as said I don't use 8 year old versions of this game πŸ˜›

tall dragon
#

you need to get a block and set its type

#

not convert material to block

manic delta
#

uhm

lime jolt
#

does anyone know how I can enable block breaking or something if the player is opped

tall dragon
#

why would block breaking be disabled in the first place

lime jolt
#

no .._.. reason

loud oracle
#

cringe

lime jolt
#

just wana know how to make someone who is opped avoid it

#

;-;

tall dragon
#

thats not what you asked tho

lime jolt
#

how can I enable block breaking or something if the player is opped

hybrid spoke
lime jolt
tall dragon
#

Player#isOp()

lime jolt
#

ok thx

manic delta
#

i can use Xmaterial

#

i hope it should work πŸ™

dark arrow
#

I have created a custom enchantment which work fine but when i combine it with other enchants using anvils it looses its powers

mellow edge
#

how much ticks is one second

hybrid spoke
#

20

mellow edge
#

is runTaskTimer in ticks or mills

hybrid spoke
#

ticks

mellow edge
#

oh that's why it didn't work lol

tender shard
#

you should use the ItemStack's PDC to store your custom enchantments, NOT create new ones using the Enchantment class

#

it's not meant to be extended by plugins

nova prism
#

Persistent data container

eternal oxide
#

?pdc

dark arrow
#

I am not eligible enough to understand but I have an idea I can create a GUI Which will add the enchantment for them

#

like in slimefun

pearl bloom
#

Anyone who ever have experienced a correct code for a crafting recipe. However it doesn't show in-game?
(I know it's correct since I'm outputting recipe result to console. And it's showing the item)

dark arrow
oak saffron
#

where is the site where i can see all "commands" described?

pearl bloom
crimson terrace
#

is it possible to create new naturally spawning mobs in spigot?
(I am talking about things like special Zombies or skeletons which always wear the same armor and have names and things like that)
and make them spawn without exchanging a randomly spawned mob for them?

oak saffron
#

like if i type event i see what uses there is for it

dark arrow
oak saffron
#

there was a webside but i forgot where

pearl bloom
dark arrow
#

what out put was it suppose to give and send the code

pearl bloom
tender shard
pearl bloom
crimson terrace
# pearl bloom

are you trying to hotbox your house? or why would you put weed and a bong together?

pearl bloom
#

(Dont mock me for white-mode in eclispe. I just reset the meta on it xD)

tender shard
crimson terrace
oak saffron
tender shard
#

every of those buds is bigger than the bong and he's using 8 of them

oak saffron
tender shard
#

np!

pearl bloom
#

It's suppose to be glass later on πŸ˜„

crimson terrace
#

hes using the weed to smoke the bong

pearl bloom
#

Don't worry about it xD

#

Just, why doesnt it work

tender shard
crimson terrace
#

facts

tender shard
minor garnet
tender shard
#

are you actually calling that method?

dark arrow
#

have u reloaded the server xD

#

or by typing /pl does it shows your plugin in green

pearl bloom
#

I am calling that method. Cus I wanted to double check any issues πŸ˜›

#

And console says the item should be there xD

minor garnet
dark arrow
pearl bloom
pearl bloom
#

Yes...

crimson terrace
tender shard
pearl bloom
#

Yeah I know 😦

#

Idk what to do 😒

dark arrow
#

Yah

pearl bloom
#

Only custom recipes that's working for me rn is furnace recipes

dark arrow
tender shard
#

send your code in text pls

dark arrow
#

But i was able to find nno solution so i crated a new project

pearl bloom
#

What part do you want

tender shard
#

just the recipe part

dark arrow
#

and used the same logic

tender shard
#

where you register the recipe

#

the one you sent a screenshot of

tender shard
# pearl bloom

did you check whether Items.getBong() actually returns an itemstack?

pearl bloom
#

Yes. I can spawn in the same ItemStack using a command

#
    public static void registerRecipes() {
//////////////////////////////////////////////////////
//                    RECEPIES                        //
//////////////////////////////////////////////////////

NamespacedKey keyJoint = new NamespacedKey(Main.getMain(),"joint_item");
ShapedRecipe JointRecipe = new ShapedRecipe(keyJoint, Items.getJoint());
JointRecipe.shape("PPP","PGP","PPP");
JointRecipe.setIngredient('G', Material.GREEN_DYE);
JointRecipe.setIngredient('P', Material.PAPER);
Bukkit.addRecipe(JointRecipe);
        

NamespacedKey keyBong = new NamespacedKey(Main.getMain(),"bong");
ShapedRecipe Bong = new ShapedRecipe(keyBong, Items.getBong());
Bong.shape("MMM","MBM","MMM");
Bong.setIngredient('M', Material.GREEN_DYE);
Bong.setIngredient('B', Material.BREWING_STAND);
Bukkit.addRecipe(Bong);

NamespacedKey keyCocaine = new NamespacedKey(Main.getMain(),"cocaine");
ShapedRecipe Cocaine = new ShapedRecipe(keyCocaine, Items.getCocaine());
Cocaine.shape("SSS","CCC","GGG");
Cocaine.setIngredient('S', Material.SUGAR_CANE);
Cocaine.setIngredient('C', Material.COAL);
Cocaine.setIngredient('G', Material.GUNPOWDER);
Bukkit.addRecipe(Cocaine);

NamespacedKey keyLSDExtract = new NamespacedKey(Main.getMain(),"lsdextract");
ShapedRecipe LSDExtract = new ShapedRecipe(keyLSDExtract, Items.getLSDExtract());
LSDExtract.shape("PPP","SSS","BBB");
LSDExtract.setIngredient('P', Material.PUFFERFISH);
LSDExtract.setIngredient('S', Material.SPIDER_EYE);
LSDExtract.setIngredient('B', Material.BEETROOT);
Bukkit.addRecipe(LSDExtract);

NamespacedKey keyLSD = new NamespacedKey(Main.getMain(),"lsd");
ShapedRecipe LSD = new ShapedRecipe(keyLSD, Items.getLSD());
LSD.shape("RRR","RRR","PPP");
LSD.setIngredient('R', Material.RED_DYE);
LSD.setIngredient('P', Material.PAPER);
Bukkit.addRecipe(LSD);



@SuppressWarnings("deprecation")
FurnaceRecipe Marijuana = new FurnaceRecipe(Items.getMarijuana(), Material.GREEN_DYE);
Bukkit.getServer().addRecipe(Marijuana);
}
tender shard
#

do you have any other plugins installed that have anything to do with custom crafting recipes?

pearl bloom
#

Nope

#

And console says on startup "Loaded 7 recipes"

tender shard
#

just fyi, "joint_item" is not a valid key name

#

they may only use a-z, 0-9 and -

pearl bloom
#

Alright

tender shard
#

but that shouldnt be a problem

pearl bloom
#

Yeah

tender shard
#

spigot should automatically replace it with a proper key

pearl bloom
#

The furnacerecipe at the bottom works though

worldly ingot
oak saffron
#

ok, i have an other question, is there a way to enable/disable PVP for a specific player. Like e.getPlayer().disable/enable pvp

worldly ingot
#

0-9a-zA-Z/_.- iirc

tender shard
#

oh indeed, underscores work too

worldly ingot
#

Oh, actually, - isn't supported lol

#

[a-z0-9/._-]+

tender shard
#

Namespaces may only contain lowercase alphanumeric characters, periods, underscores, and hyphens.
Keys may only contain lowercase alphanumeric characters, periods, underscores, hyphens, and forward slashes.

worldly ingot
#

Nevermind I'm just blind

pearl bloom
#

It is Choco xD

worldly ingot
#

I was right the first time

tender shard
#

A-Z is not allowed

pearl bloom
#

Anyway πŸ˜„

worldly ingot
#

o ya. lowercase

#

ANYWAYS

tender shard
#

but anyway it should either replace it automatically or throw an error

worldly ingot
#

/tangent

tender shard
#

so tl;dr I have no idea why it's not working

pearl bloom
#

Darn ;-;

tender shard
#

try something simple

tall dragon
#

okay its time to ask

tender shard
#

add only one recipe consisting of only one dirt block

tall dragon
#

what does tl;dr mean

tender shard
#

too long didnt read

pearl bloom
#

I could try a unshaped recipe actually

tender shard
#

basically "to summarize: bla bla"

pearl bloom
#

Since furnace works

tall dragon
#

ah okay

tender shard
#

I also have to add, I always used RecipeChoices instead of directly giving a Material

#

but that shouldn't be problem neither

tall dragon
tender shard
worldly ingot
#

If you see the recipe in your listener being printed but you can't see it in the crafting table, something is cancelling it

#

because outside of strange naming conventions, all else looks fine

tender shard
#

they claimed to not have any other recipe-altering plugins

worldly ingot
#

(assuming that method is called)

pearl bloom
#

Yeah. I am calling that method

tender shard
#

it is called, they say the furnace recipe works

pearl bloom
tender shard
worldly ingot
#

Yeah and you see that being printed?

pearl bloom
#

Don't worry about it πŸ˜„

#

Yeah Choco

worldly ingot
#

Yeah then some code is removing it from the table

tender shard
#

if it gets printed, the event gets cancelled

worldly ingot
#

Set the priority of that event to MONITOR and try there

#

If no print, then ye, confirms it

tender shard
#

(and check if the event is cancelled)

#

a plugin might cancel it without setting the result to null

worldly ingot
#

I don't think it's cancellable. The result can be set to null though

#

So that's really what you should be printing

tender shard
#

oh you're right

#

it's not cancellable

pearl bloom
#

Hang on. I might ahve found something though

tender shard
pearl bloom
#

No 😦

#

😠

manic delta
#

Does anyone know how to have a colored wool as a Material? I'm using 1.8 and I need it as a material, I've been trying various ways but don't work

tall dragon
#

you cant in 1.8

manic delta
#

Really? πŸ’€

tall dragon
#

reallly

hasty prawn
#

It's just WOOL with a data type iirc

#

Magic numbers yay!

hybrid spoke
#

okay guys, serious question: it already took me a while to figure it out and i couldn't find an answer yet... how's your phone number?

tall dragon
#

hes aight

hasty prawn
#

my phone number is doing good thanks for asking

hybrid spoke
#

fuck english

manic delta
#

😭

tall dragon
#

there will be another way to do what u want

#

idk what u want tho

viral crag
#

why dont you just break pvp in 1.16 or 1.18

manic delta
#

Change color to a wool block

hasty prawn
#

Use OCM and ViaVersion

#

And then use 1.18

tall dragon
viral crag
#

would need to do full lore and a resource pack i belive for it to show

tall dragon
#

on 1.8

manic delta
#

Yes

tall dragon
#

yw u can use MaterialData ig

manic delta
#

WAIT

#

I think i found how to do it

pearl bloom
#

Weird Crafting recipe issue

manic delta
#

I give up

hasty prawn
#

Where the byte corresponds to a wool color

manic delta
#

i'll try

quaint mantle
#

can someone show me how the structure or a config.yml would look like if I was planning to change the drop of an item using the config.yml?

hasty prawn
#

Something like that I suppose

quaint mantle
#

yes thx u so much :)

tender shard
#

this is my custom drops config

DIAMOND_ORE:
  '1':
    - material: DIAMOND
    - amount: 1-2
    - chance: 100%
  '2': &super-diamond
    - material: DIAMOND
    - custom-model-data: 1
    - amount: 1
    - chance: 1%
    - display-name: "<#5555ff>Super Diamond<#/000055>"
    - lore:
        - "This is a super diamond."
        - "It's like a normal diamond, but rarer."

ZOMBIE:
  '1': &every-hostile-mob
    - material: ROTTEN_FLESH
    - amount: 5
  '2': *super-diamond
SPIDER:
  '1': *every-hostile-mob
  '2':
    - material: COB_WEB
    - amount: 1
  '3': *super-diamond
quaint mantle
tender shard
#

you have to code that yourself obviously

hasty prawn
#

^

quaint mantle
tender shard
#

I mean

quaint mantle
#

what would I do?

tender shard
#

you have to code that yourself

#

listen to the BlockDropItemEvent

#

cancel it

hasty prawn
#

That's just an example of how you could structure a config.yml for people to use.

tender shard
#

then drop your custom drps

hasty prawn
#

^

quaint mantle
#

ahhh

tender shard
#

that you get from your config

#

adding some stuff to your config never does anything

#

on its own

lilac dagger
#

what name would fit a class that takes a selection and then shrinks it inwards

lilac dagger
#

it doesn't really fit

tender shard
#

why not

#

public static Selection shrink(Selection selection, int amount)

lilac dagger
#

it's not a method

#

i can add blocks/remove as well

tender shard
#

what else would it be if not a method?

lilac dagger
#

?paste

undone axleBOT
lilac dagger
#

the best i found is AreaShrinker

#

but shrinker is not really a word

tender shard
#

no idea what's that supposed to do πŸ˜„

lilac dagger
#

have you played miniwalls before?

tender shard
#

no

lilac dagger
#

well in that game once the deathmatch starts the area starts shrinking

tender shard
#

so like a worldborder

spare harbor
#

can you change the spawn point in a world guard region?

lilac dagger
#

@tender shard yes but it shrinks and takes the blocks away as well

#

The Arcade MiniGames offers you a wide range of fun and casual minigames which are played in a fast-paced style.

β–Ό CHAPTERS β–Ό
00:00 INTRO
00:09 BLOCKPARTY
02:12 TNT RUN
05:32 QUAKE
08:21 TNT TAG
09:18 BOMB LOBBERS
11:58 SPLEGG
13:12 TEMPLE RUN
15:13 PARTY GAMES
20:52 MINI WALLS
27:39 PROP HUNT

━━━━━━━━━━━━━━━━━━━━━━━━
β—† If you enjoy don't forg...

β–Ά Play video
tender shard
#

there's a flag called "spawn"

spare harbor
#

ahh okay thx

tender shard
spare harbor
#

i tried respawn-location

tender shard
lilac dagger
#

that name doesn't explain what the class is doing

tender shard
#

well it does, it holds information about the game's area

lilac dagger
#

but the primary objective of the class is to shrink the area

quaint mantle
#

How would I do this? I know how to cerate the code to do this, but I want it so its not based on how big the inventory is, I want it based on if the inventory is a certain name or smth

tender shard
#

Player is also simply called Player and not "ClassThatAllowsPlayersToBeKilledAndToMoveAroundAndToUseTheChatEtc"

manic delta
quaint mantle
tender shard
glossy venture
#

not possible to just overlay it i think

tender shard
#

otherwise it results in a ton of block updates and it might get laggy

river oracle
tender shard
river oracle
tender shard
#

there's a method for sending block changes but probably not in 1.8

manic delta
#

πŸ’€

quaint mantle
#

*characters

spare harbor
tender shard
quaint mantle
tender shard
#

The location to teleport to when a player dies within the region

tender shard
river oracle
#

lol

spare harbor
#

can you show me a example-command i am too stupid

quaint mantle
river oracle
#

instead of using the normal font use a different font

#

a font is how the text looks

quaint mantle
#

ok, but why would a font be used for updating that stuff

visual tide
quaint mantle
#

thats whats confusing me here lol

river oracle
quaint mantle
tender shard
quaint mantle
#

why is a font/character used

#

exactky

visual tide
river oracle
#

πŸ€·β€β™‚οΈ haven't looked at all the examples, but my best advice is try and see lol

tender shard
#

very weird

#

I mean if it's deprecated, there should at least be a new method

visual tide
#

hangon is that player or livingentity

#

*humanentity

tender shard
#

player

#

human entities don't have any connection related methods

visual tide
#

ooh

#

i always wondered why it existed

mellow edge
#

@tender shard are you there for help 24/7 lol

visual tide
#

except to wrap the nms Player

tender shard
#

I guess HumanEntity was made in case there will be an NPC API some time in the future

#

which hasn't happened in the last 8 years lol

tender shard
visual tide
#

skull emoji

tender shard
#

πŸ’€

viral crag
visual tide
tender shard
viral crag
#

true

#

not in livingEntity

mellow edge
tender shard
#

e.g. only visible to the client, for the server nothing changes

#

so it's nice e.g. for rainbow animations on existing blocks

tender shard
#

only 2 beers so far but I got the jΓ€germeister open now

mellow edge
#

lol

tender shard
opal juniper
#

yes

viral crag
tender shard
#

I prefer to drink the jΓ€ger at room temperature

mellow edge
#

you can't help people without drinking something lol

tender shard
#

oh fucking shit

#

I forgot to book a table at the restaurant

#

guess I'll go there tomorrow instead

viral crag
visual tide
mellow edge
#

xd

visual tide
#

what do you think of my funnel

viral crag
#

show up at opening, you will get a seat

viral crag
#

why is the taper and nozzle transparent ?

tender shard
tender shard
visual tide
#

hmm

quaint mantle
#

but how the hell do i make it only overlay

#

for a spesific ui

#

not based on size

#

:/

visual tide
#

might make a spigot later

tender shard
#

my photoshop skills are yet to be surpassed: a spigot using a funnel to piss on paper

visual tide
#

all this bs went into that one funnel

#

blender profeesional :p

viral crag
visual tide
#

its for a water pump thing

tender shard
#

we need another spigot fork called Pump

visual tide
#

ooh yes

tender shard
#

with this as logo

visual tide
#

like performance spigot

tender shard
#

PumpMC

#

the worst Spigot fork

visual tide
#

hm but dont you need a pump somewhere so stuff even comes out of a spigot

viral crag
#

why is there a Bow event but not one for crossbow ?

visual tide
#

projectlile launch or smth

#

use that and check hand item

viral crag
#

hmm, projectile does include arrow

visual tide
#

yes

viral crag
#

i wonder if it fires for bow in addition to the bow

visual tide
#

uh

viral crag
#

will have to try and see i guess

tender shard
#

water towers were used for that

#

that's why they're always 30 meters high

#

to provide enough pressure for the pipes etc

#

simply using gravity

viral crag
#

hose

#

syphon

tender shard
tardy delta
#

spigot
πŸ€½β€β™‚οΈ

midnight shore
tender shard
#

EntityShootBowEvent fires for bows AND crossbows, not for tridents

midnight shore
tender shard
#

ac is null

tardy delta
#

building pyramids lol

tardy delta
#

whats even better?
if (a == null)return\\n if (b == null)return or if (a == null || b == null) return?

tender shard
#

makes no difference

#

I'd use the first one so I could add debug messages easily in case I ever need to find out whether it's a or b that's null

midnight shore
tender shard
#

obviously it can

hybrid spoke
midnight shore
#

its taking it from an enumerator

tender shard
#

so? Object[] asd = new Object[] { null, null };

#

of course items in a Iterable can be null

#

your stacktrace even clearly says it's exactly "ac" that's null

#

tbh I can't think of any Collection or anytrhing else implementing Iterable that can NOT hold null references

tardy delta
#

{null, null} kekw

tender shard
#

what does kekw even mean lol

#

I keep seeing this kekw

#

but why is it called kekw

hasty prawn
#

why not

tardy delta
#

client=opera-gx 😳

#

link exposing me

hasty prawn
#

No one would've noticed if you didn't point it out

tender shard
#

you should have changed it to internet-explorer

hasty prawn
#

Lol

spare harbor
#

Can I change this?

tender shard
#

by setting it to 0

spare harbor
#

thx

tender shard
#

or -1 if you're brave enough

tardy delta
#

microsoft edge bad lol

spare harbor
#

-0

tender shard
#

or -2 if you want to see puppies dying

hasty prawn
#

What does negative do

tender shard
#

nothing

tardy delta
#

it cant every properly display my css code

hasty prawn
#

Well that's boring.

spare harbor
#

-10 if you agree that the earth is round

tender shard
#

I guess it's boring

#

haven't checked

#

maybe it also fails

tardy delta
#

-1OO if md_5

spare harbor
#

just that you can destroy blocks in the spawn right

tender shard
#

it also prevents things like PlayerInteractEvents there

#

you want to use 0 if you have worldguard anyway

spare harbor
#

yeah but if i have a world guard spawn area it doesnt matter right?

tender shard
#

as said, WorldGuard cannot override it

#

you want to set it to 0

spare harbor
#

but if its 0

tender shard
#

if it's 0, you can simply control everything using WG

spare harbor
#

ok thx

safe edge
#

Someone know whats wrong with this ?

quaint mantle
#

@tender shard Is there something online to get the slot images, or create one?

#

AKA the ui for a 27 slot

#

Or a 36 slot

#

etc

tardy delta
tender shard
#

All I can help you with is a troll face picture of md_5

spare harbor
#

if i die in the region i set the spawn i still spawn at the normal worlds-pawn

quaint mantle
tardy delta
#

resourcepack to create new textures for an item

#

oh lol

#

whats that

quaint mantle
#

for UIs

#

tryna create a custom ui

upbeat tiger
#

Can anybody send me commands of spigotmc so that I can learn spigot coding. Ex - createexplosion

tardy delta
#

texturepack

#

to modify it

quaint mantle
#

but is there any online lol

#

read the question

upbeat tiger
tender shard
quaint mantle
#

i personally cant find any

safe edge
tender shard
#

did you add their repository?

tender shard
#

also why the heck are you using dynmap 2.5?

tardy delta
tender shard
#

isn't that outdated since 200 years?

quaint mantle
#

wth

upbeat tiger
safe edge
tender shard
quaint mantle
#
public FurnaceInventory(Player player, Block block) {
    super(null, "FURNACE_OVERRIDE_MENU", "&f" + CharRepo.FURNACE_OVERRIDE_CONTAINER_27, 27, block);
}

Can somebody give me a brief explanation on what this means?

#

what does "super" do

tender shard
upbeat tiger
#

?jd

tender shard
quaint mantle
tardy delta
#

there is also super.someMethod

#

just saying

spare harbor
#

if I die in the region, I set the spawn, I still spawn at the normal world-spawn

upbeat tiger
#

U guys are frikin smart

spare harbor
tardy delta
#

kek

last tulip
#

how to make new ItemStack that always edible? (even not hungry)

chrome beacon
#

Reskin a golden apple

upbeat tiger
#

?jd

quiet ice
upbeat tiger
#

Do i get like everything from javadocs? Ex - creating explosion, spawning wither

last tulip
#

thanks

tender shard
#

everything that's part of the API

upbeat tiger
#

Ok

#

Also

#

I dont have any money to pay for anything

#

Even mc

quiet ice
upbeat tiger
#

Is there any server hosting that I can use to test my plugins

#

@tender shard sry for the ping

quiet ice
#

Homehosting is pretty good most of the time

upbeat tiger
#

Gimme website link pls @quiet ice (also sry for the ping)

quiet ice
#

127.0.0.1

visual tide
#

localhost

#

πŸ˜‰

upbeat tiger
#

Send me website link man

tall dragon
upbeat tiger
#

Whattt

#

Homehosting website link @geol

#

?????

#

@quiet ice

quiet ice
#

localhost or 127.0.0.1

upbeat tiger
#

I want to host my mc server for free with my own plugins

quiet ice
#

Chances are there is no website there, but you could run one πŸ™‚

upbeat tiger
#

I need a website to do that

quiet ice
#

It's completely free of site

#

Why would one need a website for running a server?

upbeat tiger
#

I dont have premium mcacc

#

Bruh

#

Mc server

#

Multiplayer

quiet ice
#

offline-mode=false exists

tender shard
upbeat tiger
#

Like aternos

#

In aternos u can't upload ur own plugins

chrome beacon
#

Just run the server on your pc

tender shard
#

just host your own server on localhost

hexed hatch
#

Run a local server

#

Simple as that

tender shard
#

if you don't wanna pay for a server, do it at home

upbeat tiger
#

Idh premium acc

tender shard
upbeat tiger
#

Mc premium account idh

quiet ice
#

proof that homehosting is possible

#

My server runs on that machine

hexed hatch
tall dragon
hexed hatch
#

You can still run a local server without a premium account

tender shard
tall dragon
#

nvm found it

upbeat tiger
#

How to set it to offline mode

tender shard
upbeat tiger
#

Unpremium mode

hexed hatch
#

server.properties

tender shard
hexed hatch
#

Because he doesn’t have a premium account

tender shard
#

there is only valid reason, which is to run servers behind a proxy

tender shard
hexed hatch
#

I don’t know, ask them

chrome beacon
#

Buy the game instead of asking how to pirate it

tender shard
#

and you think it's a good idea to openly admit that you downloaded it illegaly?

#

you should at least make up some excuse like "i have to use offline mode because I'm running a bungeecord"

#

or "i want to test my plugin locally with 2+ players but I only have one account"

#

or stuff like that

quiet ice
#

He is not familiar enough with minecraft servers to know that such excuses are possible I assume

tender shard
#

now he knows it

quiet ice
#

That being said, how the hell do you even test a plugin locally with 3+ players with only a single account while avoiding malware and stuff?

tender shard
quiet ice
#

Yep, also a game over on android

tender shard
#

I should pirate it and try it out

#

jk I always buy games on steam and refund them an hour later if I dont like them

quiet ice
#

It probably is not for the average person as it is pretty boring but I have a blast attempting to write a mod loader for it

tall dragon
#

real chads speedrun a game within 2 hours and refund it

quiet ice
#

I mean the game is free over on android so a lot of people just emulate it

calm whale
tender shard
#

?paste

undone axleBOT
calm whale
#

yup I clean up all my dirty tests and I send you back the trace

tender shard
#

oki

quiet ice
#

You are probably decompiling an outdated jar

tender shard
quiet ice
#

Yeah

tender shard
#

of course there's like a thousand spigot versions of 1.17.1, but only one official mojang / NMS version for all of this

quiet ice
#

And here is the field type when I print it:

net.minecraft.world.level.biome.BiomeBase$TemperatureModifier

Hm, this makes it stranger

tender shard
#

what also always helps is sth like this @calm whale :

Class clazz = Class.forName("...BiomeBase");
for(Field field : clazz.getDeclaredFields()) {
  System.out.println(field); // Print out the type, name, etc of this field, no idea if this sout is enough
}
calm whale
#

Already did it before, the field has the right name and type

#

see

#
Field biomeTemperatureModifierField = BiomeBase.a.class.getDeclaredField("f");
biomeTemperatureModifierField.setAccessible(true);
Bukkit.getLogger().info("Β§a"+biomeTemperatureModifierField.getType() + " " + biomeTemperatureModifierField.getName());
BiomeBase.TemperatureModifier biomeTemperatureModifier = (BiomeBase.TemperatureModifier) biomeTemperatureModifierField.get(oldBiome);
newBiome.a(biomeTemperatureModifier);```
tender shard
#

which is line 59?

#

in BiomeBaserWrapper_1_17

calm whale
#
BiomeBase.TemperatureModifier biomeTemperatureModifier = (BiomeBase.TemperatureModifier) biomeTemperatureModifierField.get(oldBiome);```
tender shard
#

are you using remapped mojang .jar?

calm whale
#

from BuildTools

quiet ice
#

At that point it'd say field not found exception though

tender shard
#

if you use reflection, you must always use the "obfuscated" class and method names

#

What is BiomeBase.a.class?

#

I thought "f" is a field in BiomeBase and not in BiomeBase.a?

calm whale
#

it is in the a class

tender shard
#

but oldBiome is of type BiomeBase and not of type BiomeBase.a, right?

calm whale
#

yep

tender shard
#

You are passing a BiomeBase when you actually must pass an object of type BiomeBase.a

calm whale
#

I know that is the problem

#

but

#

I cannot find any instance of the a class anywhere

tender shard
#

what even is BiomeBase.a ?

#

I mean, what's the purpose of it - does it hold any information about a BiomeBase?

calm whale
#

yep

quiet ice
#

biome builder I'd say

#

probably GCed after the biome instance is created

calm whale
#

It holds temperature and some other data

tender shard
calm whale
tender shard
#

okay yeah so BiomeBase.a is just the biomebuilder. the actual biome doesnt have any information about it's former builder

#

one min pls

#

your "f" field is the third parameter passed to BiomeBase.d(...)

#

which is the field "d"

calm whale
#

πŸ€”

tender shard
#

hm that code is a mess lol

#

let me open intellij

#

it's easier than checking it on the pastebin

calm whale
#

sure thank you for your help

minor garnet
upbeat tiger
#

Suppose i now know what banner is in org.bukkit.block.structure

#

How do I code

#

Ike

#

Something

#

I just know the use of it, i want to know that command to do that

tender shard
#

the inner class BiomeBase.d has a field called "d"

#

that's what you need

#

and to get the inner class "BiomeBase.d" you have to check the field "k" in BiomeBase

#

so get BiomeBase.getField("k"), which is of type BiomeBase.d, then get the field "d" of that one

#

that's it

#

so basically
BiomeBaseObject -> get field called "k". this is of type BiomeBase.d. Of this object, get the field "d" -> this is your temperature modifier

calm whale
#

But how can I retrieve it ?

tender shard
#

well something like this:

calm whale
#

I need a cast for this

#

right ?

lime jolt
#

is there a way to let a player go through a block, like literly just walk through it (essentially dissabling the collision)

tender shard
#

no need for casts

#

one minute

#

I'll write sth

upbeat tiger
#

Mfna

#

Reply to me

tender shard
upbeat tiger
#

See my message

#

Up

waxen plinth
#

Entitled

ivory sleet
waxen plinth
#

Elaborating your question would help

upbeat tiger
waxen plinth
#

Telling people to reply will only make you come across as pushy

tender shard
# calm whale But how can I retrieve it ?
BiomeBase.TemperatureModifier modifier = (BiomeBase.TemperatureModifier) biome.getClass().getDeclaredField("k").getClass().getDeclaredField("d").get(biome.getClass().getDeclaredField("k").get(biome));
#

something like this should work

#

haven't tested and it's pretty dirty

#

but yeah you basically have do it all with reflection lol

calm whale
#

ok thnx I'm gonna test it, I will come back to tell you if it works, thnx πŸ™‚

tender shard
#

also keep in mind that those stuff will change in every update

upbeat tiger
#

Mfn reply to me

tender shard
tender shard
#

I don't know how to code "something"

#

you gotta ask a bit more specific questions

upbeat tiger
#

Read it fully lad

upbeat tiger
#

?jd

tender shard
# upbeat tiger Read it fully lad

I don't have time to scroll up and try to understand your question. if you want me to answer, please ask your question in one concise sentence

quiet ice
#

"pls help immediately"

upbeat tiger
#

I want to know the commands to code a spigot plugin, need a website/course to learn(for free ofc). For example ik what the use of banner is in org.bukkit.block.structure.

#

But

tender shard
#

there are no "commands" to code a spigot plugin

upbeat tiger
#

Dont know how to write the command

#

Command means the code sentence

tardy delta
#

plwlease pwlease.. hwelp mwe

#

meow

tender shard
#

there is no "website" that tells you everything about how spigot works. you'll have to dig through the API docs and read the descriptions for the classes and methods that are relevant to you

quiet ice
#

ze help will kome when it iz done

lime jolt
#

does anyone know what a "vehicle" is (I see it everywhere in the Javadocs but dont know what it is reffering to)