#help-development

1 messages Β· Page 2132 of 1

mighty pier
#

but kitdata doesnt save

#

playerdata saves

earnest forum
#

if you modify the file manually while the server is down the changes will update on the plugin

mighty pier
#

wait

#

playerdata is at the bottom

#

k

quaint mantle
#

What event is going before bungeecord trying to connect player to server?

mighty pier
#

wym

#

the copydefaults?

quaint mantle
#

i readed and tried but not work

mighty pier
#

yes ik

#

thankyou

quaint mantle
#

PreLoginEvent, LoginEvent, PostLoginEvent, ServerConnectEvent

tight tundra
#

One message removed from a suspended account.

mellow edge
#

any idea on how to add bridge egg?

tight tundra
#

One message removed from a suspended account.

#

One message removed from a suspended account.

vocal cloud
#

Just don't name ur main class main dogekek

tight tundra
#

One message removed from a suspended account.

#

One message removed from a suspended account.

sterile grotto
tight tundra
#

One message removed from a suspended account.

golden kelp
pastel juniper
#

I want to and remove minecraft recipes from recipe book, is there a way to do it???

errant narwhal
#

Hi i have a questions I want to make interact event when player clicked the chiseled stone brick but in if e.getblock() it can't equals ItemStakc

#

Can someone help pls

errant narwhal
#

In 1.12.2

#

Chiseled stone brick need have Id like (byte)8

trail oriole
#

why can't I create a spigot maven project for versions lower than 1.8.9

sterile grotto
quaint mantle
#

bruh im so stupid im forgot to register event

trail oriole
#

i can't create for 1.8.9

#

not lower than 1.12

prime kraken
#

Hello, I have one question, I have a system where when I click on a player with my item, it freeze the player and it open me a GUI, in this GUI i have an item and when i click on, i would like to kick this player, i can i get the Entity (so the player i've cliked on) in InventoryClickEvent ?

sterile grotto
#

Am I getting it right? Because I don't really know what you want to do

dark arrow
#
LivingEntity mob = (LivingEntity) player.getLocation().getWorld().spawnEntity(player.getLocation().add(direction.getX(),playerY2-playerY,direction.getZ()), EntityType.WITHER_SKELETON);
                WitherSkeleton gorr_killer = (WitherSkeleton) mob;
                gorr_killer.setCustomName(ChatColor.RED+"THE GORR");
                ItemStack helmet = new ItemStack(Material.NETHERITE_HELMET);
                ItemStack chestplate = new ItemStack(Material.NETHERITE_CHESTPLATE);
                ItemStack leggins = new ItemStack(Material.NETHERITE_LEGGINGS);
                ItemStack boots = new ItemStack(Material.NETHERITE_BOOTS);
                boots.addUnsafeEnchantment(Enchantment.PROTECTION_FALL,69);
                Utils.gorr_equipment(helmet);
                Utils.gorr_equipment(chestplate);
                Utils.gorr_equipment(leggins);
                Utils.gorr_equipment(boots);
                gorr_killer.getEquipment().setHelmet(helmet);
                gorr_killer.getEquipment().setChestplate(chestplate);
                gorr_killer.getEquipment().setLeggings(leggins);
                gorr_killer.getEquipment().setBoots(boots);```
It is suppose to summon wither skeleton with given armour but the skeleton spawn with no armour and there is not consile error?
prime kraken
modern vigil
supple elk
#

Is this called when a vehicle is moved?

#

ok that was poorly worded

#

does an entity have to be riding a vehicle for this event to be called?

#

Or say a player gets off of a boat and the boat continues moving cause of momentum, would it be called then

#

or does the vehicle have to have a rider

earnest forum
#

and see

supple elk
#

πŸ‘Œ

earnest forum
#

if it does work with no rider

#

just check if the entity has a rider

supple elk
#

yup

earnest forum
#

πŸ‘

haughty storm
#

how do you remove one item from a stack in the inventory of a player

golden kelp
#

get inventory

#

get that stack

#

decrease amount

#

and set it at that slot

haughty storm
#

ok, thx

sterile grotto
dark arrow
#
LivingEntity mob = (LivingEntity) player.getLocation().getWorld().spawnEntity(player.getLocation().add(direction.getX(),playerY2-playerY,direction.getZ()), EntityType.WITHER_SKELETON);
                WitherSkeleton gorr_killer = (WitherSkeleton) mob;
                gorr_killer.setCustomName(ChatColor.RED+"THE GORR");
                ItemStack helmet = new ItemStack(Material.NETHERITE_HELMET);
                ItemStack chestplate = new ItemStack(Material.NETHERITE_CHESTPLATE);
                ItemStack leggins = new ItemStack(Material.NETHERITE_LEGGINGS);
                ItemStack boots = new ItemStack(Material.NETHERITE_BOOTS);
                boots.addUnsafeEnchantment(Enchantment.PROTECTION_FALL,69);
                Utils.gorr_equipment(helmet);
                Utils.gorr_equipment(chestplate);
                Utils.gorr_equipment(leggins);
                Utils.gorr_equipment(boots);
                gorr_killer.getEquipment().setHelmet(helmet);
                gorr_killer.getEquipment().setChestplate(chestplate);
                gorr_killer.getEquipment().setLeggings(leggins);
                gorr_killer.getEquipment().setBoots(boots);

It is suppose to summon wither skeleton with given armour but the skeleton spawn with no armour and there is not console error?

tardy delta
#

why casting it to a LivingEntity first and then a WitherSkeleton?

quaint mantle
#

why i cant use method from another file?

#

method is public

tardy delta
#

because it isnt static

quaint mantle
#

"static not allowed here"

chrome beacon
#

Method isn't static

quaint mantle
chrome beacon
#

Opposite my bad

tardy delta
#

?static

#

?static-abuse

#

hmm choco your post is gone

chrome beacon
#

There was a command for that??

tardy delta
#

i thought

chrome beacon
#

?learnjava I guess just link this then

undone axleBOT
tardy delta
#

or maybe some general thing

#

?tags

#

im confused

sterile grotto
prime kraken
prime kraken
sterile grotto
#

just dm you

harsh totem
#

I have this function that's supposed to return true if the inventories are the same but it returns false when it's should be returning true. what's wrong here?

        for (int i = 0; i < this.getInventory().getContents().length; i++){
            if (!(isSimilar(this.getInventory().getItem(i), inv.getItem(i)))){
                return false;
            }
        }
        return true;
    }```
summer scroll
#

That's a bad way to compare If the inventory is the same.

harsh totem
#

so how should it be done

summer scroll
#

Use InventoryHolder

agile sand
#

Hello! I was trying to check if a player have specific item, but method returns null.
I have stupidly simple code:

    @Override // Yep, this is a predicate with player.
    public boolean test(Player player) {
        return player.getInventory().contains(stack);
    }

Stack was loading from config file, using ConfigurationSerialiazable cause my class loads stack using it. With other items it works, with stone and some itemmeta - it fails... Checked - stack parameter loaded right..

summer scroll
# harsh totem so how should it be done

Create an object that implements InventoryHolder, and assign that holder when you create the inventory, and then on the click event you can just check the InventoryHolder of the inventory.

harsh totem
harsh totem
summer scroll
#
if (clickedInventoryHolder instanceof MyInventoryHolder) {
  // That means the inventory is the custom inventory
  // Your code here
}
harsh totem
tall dragon
#

because..

#

its the same one?

harsh totem
#

it is not InventoryHolder clickedInventoryHolder = event.getClickedInventory().getHolder(); Wands holder = (Wands) clickedInventoryHolder;

summer scroll
#

It's the same one

granite owl
#
 attackDamage:
      max: 2048.0
```thats a value from the spigot.yml - how can i retrieve those values with the spigot api?
mellow edge
#
    @EventHandler
    public void canExplode(BlockExplodeEvent e) {
        System.out.println("exploded!");
        if(Start.getCurrentGame() == null) {
            e.setCancelled(true);
            return;
        }
        if(!Start.getCurrentGame().isStarted()) return;

        e.setYield(0);

        Iterator<Block> i = e.blockList().iterator();

        while(i.hasNext()) {
            Block block = i.next();
            if (Start.getCurrentGame().getRemoveBlocks().contains(block)) {
                //what to do here to cancel the block destruction?
            }
        }
    }```
slim kernel
#

How do I create a Location when I dont know the worlds name?

crisp steeple
#

this or extending the craftinventorycustom class itself is usually the best way

crisp steeple
#

event, command, etc

summer scroll
slim kernel
crisp steeple
#

entities, blocks, events

#

many different ways

slim kernel
#

okay thank you hmm

summer scroll
#

Mind telling us what you're trying to do?

crisp steeple
#

yea

slim kernel
#

its okay I just wanted to know what possibilities there are to get the world so I can pick the best one

summer scroll
#

It's usually depends on what you're trying to achieve.

slim kernel
#

yes got it already thank you. πŸ™‚

urban trout
#

hey with ProjectileHitEvent, how would i check if it hit a block or an entity

mellow edge
#

how can I only destory some blocks in .createExplotion

knotty gale
#

any reason this wouldn't work?

 @EventHandler
    public void EntityPickupItem(EntityPickupItemEvent e) {
        if(ArrowPickup == true) {
        if(e.getEntity() instanceof Player) {
        if (e.getItem().getItemStack().getType() == Material.SPECTRAL_ARROW) {
          Bukkit.broadcastMessage(ChatColor.WHITE + "<" + ChatColor.AQUA + "BlockyTel" + ChatColor.WHITE + "> " + ChatColor.RED + e.getEntity().getName() + " picked up the ball");
          e.getEntity().addPotionEffect(new PotionEffect(PotionEffectType.GLOWING, 300, 0));
        }
    }
    }else {
        return;
    }
    }
crisp steeple
#

don’t think so

summer scroll
#

Does someone know the best way to detect when player collide or bump into a block?

tardy delta
#

else { return } omg

harsh totem
#

why do I get null exception when i click on anything that isn't in the inventory that i'm checking?

    public void OnClick(InventoryClickEvent event){
        Wands inv = new Wands();
        Inventory clicked = event.getClickedInventory();
        ItemStack current = event.getCurrentItem();
        InventoryHolder clickedInventoryHolder = Objects.requireNonNull(event.getClickedInventory()).getHolder();
        Wands holder = (Wands) clickedInventoryHolder;
        if (clicked == null || current == null || holder == null || clickedInventoryHolder == null) { return; }
        if (clickedInventoryHolder instanceof Wands) {
            // That means the inventory is the custom inventory
            if (holder == clickedInventoryHolder){
                Player player = (Player) event.getWhoClicked();
                if (inv.isSimilar(current, ItemManager.fireWand)){
                    player.getInventory().addItem(ItemManager.fireWand);
                    player.sendMessage(ChatColor.GOLD + "You now posses the power of fire!");
                    player.closeInventory();
                } else if (inv.isSimilar(current, ItemManager.dragonWand)){
                    player.getInventory().addItem(ItemManager.dragonWand);
                    player.sendMessage(ChatColor.LIGHT_PURPLE + "You now posses the power of the dragon!");
                    player.closeInventory();
                } else if (inv.isSimilar(current, ItemManager.lightningWand)){
                    player.getInventory().addItem(ItemManager.lightningWand);
                    player.sendMessage(ChatColor.YELLOW + "You now posses the power of lightning!");
                    player.closeInventory();
                }
                event.setCancelled(true);
            }
        }
        }```
supple elk
#

where is the null coming from?

#

What's the error msg

harsh totem
supple elk
#

what does the caused by say?

#

can you show the full stack trace

harsh totem
#

there isn't "caused by"

supple elk
#

just send the full trace

#

is this a log that you're looking at?

harsh totem
supple elk
#

caused by

harsh totem
#

bruh

#

i searched it in ctrl f

tardy delta
#

you seearched cause by

supple elk
#

it's a casting exception

tardy delta
#

not caused by

supple elk
#

on line 27

#

whichever line that is

#

I'm guessing there

#

what is it that you're trying to do?

harsh totem
#

this is the line

supple elk
#

mhm

harsh totem
#

InventoryHolder clickedInventoryHolder = Objects.requireNonNull(event.getClickedInventory()).getHolder();

supple elk
#

so clickedInventoryHolder is not an instance of Wands

#

yet you try to cast it to it

#

you've performed an unsafe cast

#

that's why you get the msg

harsh totem
#

System.out.println(clickedInventoryHolder instanceof Wands);

supple elk
#

I don't see any check here?

harsh totem
supple elk
#

right

#

?paste

undone axleBOT
supple elk
#

you can use that

harsh totem
#

ok wait

sacred basin
#

Hello, how can I detect if player press F key?

supple elk
#

you perform those after the cast

#

try printing before the cast

#

they won't be printed if the cast fails cause the error will be thrown

supple elk
#

only actions

#

like if a player hits an entity or something

harsh totem
#

before this? if (clicked == null || current == null || holder == null || clickedInventoryHolder == null) { return; }

supple elk
#

no way to detect a specific key press

supple elk
#

no point in printing after the cast has been peformed

harsh totem
#

I made it like this and it still outputs nothing but errors ``` @EventHandler
public void OnClick(InventoryClickEvent event){
Wands inv = new Wands();
Inventory clicked = event.getClickedInventory();
ItemStack current = event.getCurrentItem();

    InventoryHolder clickedInventoryHolder = Objects.requireNonNull(event.getClickedInventory()).getHolder();
    Wands holder = (Wands) clickedInventoryHolder;
    System.out.println(clickedInventoryHolder);
    System.out.println(holder);
    System.out.println(clickedInventoryHolder instanceof Wands);
    System.out.println(holder == clickedInventoryHolder);
    if (clicked == null || current == null || holder == null || clickedInventoryHolder == null) { return; }

    if (clickedInventoryHolder instanceof Wands) {...```
#

maybe I need to do the null check first

sacred basin
knotty gale
supple elk
#

oh you're trying to detect when they swap hands

sacred basin
#

yes

supple elk
#

just register a listener for that event

sacred basin
#

Thank you πŸ™‚

harsh totem
supple elk
#

send the stack trace

#

and you still print the messages after casting

harsh totem
#

it only gives me null exception when it is not the Wands inventory

supple elk
#

if ClickedInventoryHolder is not an instance of Wands then the print statements will never run and a casting error will be thrown

supple elk
#

that is because you don't check what you're dealing with before casting

#

the InventoryClickEvent triggers when any inventory is clicked

#

then the first thing you try and do is cast

#

so for inventories where the cast isn't true the exception will be thrown

#

add this

cerulean jasper
#

Hi I was wondering yesterday, when accessing directories via ProcessBuilder, where does it originate?

supple elk
#
if (!clickedInventoryHolder instanceof Wands) return;
harsh totem
supple elk
#

πŸ‘

#

same thing

#

what I sent originally might be invalid syntax

#

but gets the idea

harsh totem
#
    public void OnClick(InventoryClickEvent event){
        if (event.getClickedInventory() == null || event.getCurrentItem() == null || (Wands) Objects.requireNonNull(event.getClickedInventory()).getHolder() == null || Objects.requireNonNull(event.getClickedInventory()).getHolder() == null) { return; }

        Wands inv = new Wands();
        ItemStack current = event.getCurrentItem();
        InventoryHolder clickedInventoryHolder = Objects.requireNonNull(event.getClickedInventory()).getHolder();
        Wands holder = (Wands) clickedInventoryHolder;
        System.out.println(clickedInventoryHolder);
        System.out.println(holder);
        System.out.println(clickedInventoryHolder instanceof Wands);
        System.out.println(holder == clickedInventoryHolder);

        if (!(clickedInventoryHolder instanceof Wands)) return;
        if (clickedInventoryHolder instanceof Wands) {```
#

like that?

supple elk
#

no

#

dude

#

you need to check what you are dealing with before you cast

#

do you know what I mean when I say casting

harsh totem
#

but your check required me to cast

#

(!(clickedInventoryHolder instanceof Wands))

#

I need to cast clickedInventoryHolder

supple elk
#

no you don't need to cast it

#

you have an instance of an InventoryHolder

#

that is what inventory.getHolder() returns

#

you are trying to cast an InventoryHolder to an instance of Wands

#

which presumably is a child class of InventoryHolder

#

he found answer

supple elk
#

before you cast it

#

^

#

also learn Java 🀦

crisp steeple
#

truth

#

also i keep seeing a ton of people misuse Objects.requireNonNull

#

yep

harsh totem
#

yes

supple elk
#

Cause I get it a lot

crisp steeple
#

it throws an exception if the argument is null

#

it doesn’t just magically make it not null like a lot of people use it as

supple elk
#

so they should be checking if it's null

crisp steeple
#

yes

supple elk
#

mhm

crisp steeple
#

kotlin on top

harsh totem
#

I don't understand what i am doing wrong. sorry if i'm annoying you

#

yes

#

with anvils

#

you can do that to everything

golden kelp
#

Y e s

supple elk
harsh totem
#

the title is the name of the chest

supple elk
#

??

#

IDE derp or am I dumb?

#

the case 5: is misaligned

golden kelp
#

Yes. The thing in the top can be changed using an anvil

supple elk
#

but just why

golden kelp
#

Yea

supple elk
#

the others are alligned lol

#

but that one just refuses

golden kelp
#

Why dont u use the new switch

supple elk
#

new switch?

junior trench
#

idk I just hopped in with no context

supple elk
#

Bestow upon me this sacred knowledge

golden kelp
#
switch (condition) {
    case 1 -> {
    }

}
#

Ye but ewer than the block type thing

#

Newer

#

Yep u r right

supple elk
#

then what is the new?

golden kelp
#

Newest or Latest
What's more right

supple elk
#

right

harsh totem
#

it says that it is always true if (holder == clickedInventoryHolder

            Wands holder = (Wands) clickedInventoryHolder;```
fossil lintel
#

Or even

if (!(event.getClickedInventory().getHolder() instanceof Wands wands)) return;
System.out.println(wands);

would work

supple elk
undone axleBOT
supple elk
#

what's a good ticking sound?

harsh totem
#

but onw of then is InventoryHolder and the other is Wands

supple elk
#

I want something which sounds like a clock

#

for a countdown

#

like is there a noteblock click?

fossil lintel
#

The dispenser success sound?

harsh totem
supple elk
#

nah that's too plingey

harsh totem
#

maybe some sound from a note block

supple elk
#

yeah that's what I was wondering

harsh totem
#

go to wiki and get the names of the sounds of the note block

supple elk
#

though none of those are really ticks?

#

too plingy ;-;

#

maybe a button press?

supple elk
#

Wands is a subclass of InventoryHolder

#

Wands is an InventoryHolder but with more stuff

harsh totem
#

so how to I check if these inventories are the same

supple elk
#

you check when you cast

kind hatch
supple elk
harsh totem
#

if these inventories are the same size and has the same items in them

kind hatch
supple elk
#

nah stone button

#

not the UI button

fossil lintel
#

I would either use block.dispenser.dispense or block.note_block.snare

harsh totem
#

was the copper_button supposed to be added only if the copper golem won the vote?

harsh totem
#

😒

supple elk
#

there we go

#

but wtf is up with the case 5:

quaint mantle
#

so basically i'm making a duels plugin and there's a bedwars kit what's the best way to track beds because one bed has two locations

fossil lintel
supple elk
quaint mantle
#

break;

#

at the end of each case

#

or else it'll break

fossil lintel
#

It will now fall through and instantly hit all switch cases

kind hatch
supple elk
#

if I backspaced it would go to prev line

#

returning would put it back in same place

kind hatch
#

Select the area with the mouse

supple elk
#

I copied and pasted and it fixed

kind hatch
#

And then backspace

supple elk
supple elk
#

it's equals, not less than

fossil lintel
supple elk
fossil lintel
#

It executes the code in the switch statement until it hits a break; or the end of the whole switch statement

kind hatch
#

Always include a break statement when using the old switch statements.

supple elk
#

right right, but it will actually only execute 1 case each time

#

but it will check all the cases anyway'

#

which is why you want to add breaks?

fossil lintel
fossil lintel
supple elk
#

egergergerg

#

that is weird

supple elk
kind hatch
#

Sort of. It looks a lot like it, but there are some changes under the hood when it comes to the new way.

fossil lintel
#
int num = 3;
switch(num) {
  case 3:
    System.out.println("This is case 3");
  case 3:
    System.out.println("This is case 2");
  case 3:
    System.out.println("This is case 1");
  default:
    System.out.println("This is the default case");
}

Will print:

This is case 3
This is case 2
This is case 1
This is the default case
fossil lintel
#
int num = 3;
switch(num) {
  case 3:
    System.out.println("This is case 3");
    break;
  case 2:
    System.out.println("This is case 2");
    break;
  case 1:
    System.out.println("This is case 1");
    break;
  default:
    System.out.println("This is the default case");
}

Will print:

This is case 3
supple elk
#

I'm guessing you meant to put case3:, case 2:, case 1:

#

rather than 3 lots of case 3 lol

fossil lintel
harsh totem
#

how do I compare 2 inventory type variables

supple elk
#

:p

fossil lintel
#

De lambda-style switch statements will prevent that by default

safe notch
safe notch
#

yea like that

supple elk
#

noice

#

ty

fossil lintel
fossil lintel
fossil lintel
# harsh totem .

What do you want to compare? The contents or it being the exact same inventory?

safe notch
#

yea

kind hatch
#

If you compare the exact inventory, then contents don’t matter in terms of using that for your comparison. It’s also less expensive to compare instances than the whole contents.

supple elk
#

oh yeah, I had another weird question on a completely different topic

#

the first generic of GameType takes an extension of GameMap

trail oriole
#

how do I put actionbar messages without legacyTexts ?

supple elk
#

gameType.addMap(this) is angry as the parameter needs to be the same type as the generic passed to it

kind hatch
supple elk
#

is there a way to say that the first parameter of the passed in GameType must be the same as the class itself?

fossil lintel
supple elk
#

so GameMap must take a GameType<GameMap,>?

#

but if I had a class BoatMap which extends GameMap, it must take a GameType<BoatMap, ?>

#

thus solving the generic issue with addMap()

quaint mantle
#

T extends GameMap

supple elk
quaint mantle
#

Or in this case ? extends GameMap, in place of the first wildcard

supple elk
#

I think you've misunderstood

#

It already has to be a ? extends GameMap because of the definition of GameType

#

I'm saying that I want that to be the same as the class which takes it as a parameter

harsh totem
supple elk
#

so GameMap tkaes a GameType<GameMap,?>

#

and BoatMap (which extends GameMap) takes a GameType<Boatmap,?>

#

GameMap is like the abstract class

#

and I'd like to call generically in there to add the map to the gametype

regal dagger
#

Would this work?

            if(event.getClickedBlock().equals(Material.LEGACY_SOIL)) {
                event.setCancelled(true);
            }```
#

in PlayerInteractEvent

supple elk
#

or getMaterial()

#

whichever one

#

then .equals()

regal dagger
#

Yep, sorry.

quaint mantle
#

Then in the GameType class, it should be something like public class GameType<T extends GameMap, ?>

regal dagger
#

Just asking if that event applies to this

regal dagger
#

Used the move event for this before which is not very optimized

supple elk
quaint mantle
#

Oh I see what you're saying

supple elk
#

the issue is in the parameter taken by the constructor of GameMap

#

I imagine it's not possible

crimson terrace
#

How would I create multiple config files? Currently I have about 600 lines in my config and I would like to split that up a bit

regal dagger
#

Also, is there a event or something that I can use to execute a command once a player enters a portal (nether disabled)?
Currently have to do this (also, not ideal)

   @EventHandler
    public void onMove(PlayerMoveEvent e) {
        Player p = e.getPlayer();

        Location nether = p.getLocation();

        nether.setY(nether.getY() + 1);

        if(nether.getBlock().getType().equals(Material.NETHER_PORTAL)) {
            p.performCommand("dm open menu");
            p.setVelocity(p.getLocation().getDirection().multiply(0.3));
        }```
harsh totem
#

?paste

undone axleBOT
harsh totem
supple elk
#

because you are comparting an Inventory to an InventoryHolder

#

these are different objects

golden turret
#

why this is not called when i rightt click the air even if i hold an item?

quaint mantle
golden turret
regal dagger
#

I think I've tried that but iirc it doesn't fire when nether is off

supple elk
#

I want that T to be the class itself

#

I want a parameter for a GameMap<this.class,?> though that syntax doesn't work

crimson terrace
#

How would I work around having about 20 config files tho? most existing methods for the config are aimed at the config with the name config.yml

harsh totem
#

if (inv.getInventory().equals(event.getClickedInventory())){

#

so like that?

quaint mantle
supple elk
#

right so

ivory sleet
#

its like 2-3 methods that exist for config.yml

supple elk
#

we have the gametype class

quaint mantle
#

right

fossil lintel
supple elk
#

GameMap constructor

harsh totem
regal dagger
#

Does the PlayerInteractEvent work with going into a nether portal when the nether is disabled?

supple elk
#

GameMap is like an abstract class

#

for every type of game I have, it extends GameMap

supple elk
#

in the constructor of GameMap, I would like to add the map to a list of maps for it's corresponding type

fossil lintel
#

You're creating a whole new inventroy and then comparing it to an existing one

supple elk
#

by using the addMap() method in GameType

regal dagger
#

That would still have the nether world loaded which is not ideal for a lobby that is meant to house a couple hundred players

fossil lintel
#

I assume that new Wands makes a entirely new Inventory?

harsh totem
crimson terrace
# ivory sleet they're really not

I think I may have it. I have the .yml files created in my project in intelliJ, inside the code I create the folders they are in, then I make a new YamlConfiguration file in the classes I want them in and to load them I do configuration.load(file). am I missing anything?

harsh totem
supple elk
#

the problem is the addMap() must take the type specified by the generic taken by GameType

#

so calling addMap() in the generic GameMap does not work

ivory sleet
#

you copy the file within your jar to its destination (most likely the plugin folder)

fossil lintel
ivory sleet
#

then yeah... load the contents from the file contained in the plugin folder

supple elk
#

if the constructor of GameMap had to take a GameType which has the first generic be the same as the GameMap class, there wouldn't be an issue

quaint mantle
#

Only way I could see that happening is if you added a generic to the GameMap class

trail oriole
#

how do I put actionbar messages without legacyTexts in 1.8?

supple elk
#

And wouldn't the generic be the same as the class itself lol

fossil lintel
quaint mantle
#

GameMap<T extends GameType>

harsh totem
fossil lintel
#

That is an option

trail oriole
supple elk
#

how does this help

#

?

ivory sleet
#

I mean

trail oriole
#

why would it call when you hold an item

crisp steeple
#

just compare the instances

golden turret
ivory sleet
#

probably because the first predicate you test is true

trail oriole
#

dude

crisp steeple
golden turret
#

faster

#

and small code

#

but

crisp steeple
#

it looks pretty weird

golden turret
#

that will not solve my problem

crisp steeple
#

even if its like 1 second faster to type

#

yea

quaint mantle
supple elk
#

right lol

crisp steeple
golden turret
#

debug

harsh totem
# fossil lintel That is an option
        Inventory here = this.getInventory();
        if (here.getSize() != inv.getSize()) return false;
        for (int i =1; i <= inv.getSize(); i++){
            if (inv.getItem(i) != here.getItem(i)) return false;
        }
        return true;
    }``` like this?
crimson terrace
#

I suppose the .yml files I want to load cannot be inside their own folders?

golden turret
#

this is only called when i right click a block

#

but never when i right click air

crimson terrace
#

this error disappears when I move it out of the folder

quaint mantle
fossil lintel
#

If you open that inventory from your plugin, you probably can keep track of the instances

harsh totem
#

I tried inv.equals(inv2)

#

didn't work

crisp steeple
#

then they probably weren’t the same instance

fossil lintel
#

Yes, but that's because you create a new inventory

supple elk
#

It just means I have to manually add it everytime I add a map

fossil lintel
#

Every time someone clicks in a Wands inventory, you create a new one to compare against

#

But it did not exist before the event was created, thus could never equal the clicked inventory

harsh totem
#

tf

crisp steeple
#

why would the inventory change when you click it

crisp steeple
#

ok… so why are you doing that

#

compare the instance

#

not just the items

harsh totem
#

returned false

crisp steeple
#

if you are creating a new inventory it obviously won’t be the same instance

harsh totem
#

oh i think i got it

#

let me try something

crisp steeple
#

ok

tardy delta
#

whats going on

crisp steeple
#

idk

harsh totem
#

omgggggg it works finally

#

im so happy

#

thank you

crisp steeple
#

neat

dark arrow
#

can we boss bar for other mobs?

tardy delta
#

you can create a bossbar manually

fossil lintel
tardy delta
#

only works for bosses

fossil lintel
crimson terrace
#

would using paths like this cause problems when used on different operating systems?

tardy delta
#

windows uses \

#

instead of the unix /

#

so use File.separator

crimson terrace
#

ok thanks πŸ˜„

#

welp, now it understands it no matter where its run XD

regal dagger
#

Do scheduleSyncDelayedTasks need to be cancelled manually after being ran using cancel() or do they do that automatically?

crimson terrace
#

they end

#

think of those tasks as their own threads (but, like... synced to the main thread)

regal dagger
#

Just asking because I'm trying to optimize basically everything I can rn

crimson terrace
regal dagger
#

Got it, thank you

crimson terrace
#

not a guarantee tho

crisp steeple
#

if you dont want that to happen just add return;

regal dagger
#

Well they only get ran once, my concern is them staying in server memory (if they do, anyway)

crimson terrace
crisp steeple
#

ah

#

ok yeah for just delayed it shouldnt be an issue

tardy delta
#

Β―_(ツ)_/Β―

green prism
#

Good morning, you guys! One question, I’m developing a credit card plug-in where every player to whom a card was created has a credit card number. So I did to get values in both ways like this:
Playername: card: 544152418545 544152418545: owner: Playername
But it seems rather unseemly as in the future I would add something like limit levels of card withdrawals and this would seem to be very unseemly in my opinion. How do you think I could do for better storage? Thanks even if you’ve only read! ❀️

crisp steeple
#

make the players uuid, not name, a configuration section, and then put their credit card number, balance, expiration, or whatever else you want into the config section

green prism
#

The little problem is that I would like to make the cards stealing from other players and I would like them to be able to withdraw from other people’s accounts if they have their own card

crisp steeple
#

what’s the problem with that?

green prism
#

uhhhhh so I can put the uuid in the credit card item instead of the cardnumber

#

gotcha

crisp steeple
#

well then inverse it

#

make the credit card number the configuration section and have the players uuid be a property of the section

#

would be possible as well to not change it but slightly more tedious

green prism
#

So it'll be like that:

UUID-8485-894854:
holder: Sussybaka
expire: 02/02/02
card: 45254455656

45125241541214: UUID-54854854

#

right?

crisp steeple
#

no

#

you just make the card number be the configuration section key

#

and then replace holder with the players uuid

#

you never want to use names for storing players info

green prism
#

why not

crisp steeple
#

because people can change their names

tardy delta
#
uuid:
  card-number: 12345
  credits: 100```
crisp steeple
#

yeah

tardy delta
#

uuid will never change

crisp steeple
#

or card number: uuid: fahd-6737

#

doesn’t really matter either way

green prism
#

yea but what if the player isn't premium

crisp steeple
#

as in a cracked account?

green prism
#

yep

kind hatch
#

Doesn't matter. Offline UUIDs also don't change.
Also, don't support cracked servers. Simple as that.

green prism
#

oh okay

crisp steeple
# green prism yep

well making plugins cracked accounts is a whole new discussion, but yeah just read above

wind tulip
#

Hey, can someone walk me through making my own external library? I've tried, but I don't know how to import it properly.

river oracle
#

Yea make a project upload it by use maven or gradle repository manager like repsy jitpack o

#

Then add library as dependency and shade it

#

EmojiCool enjoy your new external lib

wind tulip
#

okay wait so I make a new gradle project, in the main java class I write my code, then export it, add it as a module or a library?

river oracle
#

You can have as many classes as you want

#

Don't need to do anything special a lib is just a collection of apis and utils

#

Just slap em together bundle it and depend

wind tulip
#

to export the gradle project do I build artifacts? And then to shade it what do I do? I've never done this before

river oracle
#

I think it's shadow on gradle

#

Idk never used gradle

chrome beacon
wind tulip
#

so just normal Build > build project?

chrome beacon
#

Are you using Intellij?

wind tulip
#

yes

kind hatch
#

It's literally as simple as making a project with a bunch of utility classes. Using maven install, then importing that maven project into another project.

chrome beacon
# wind tulip yes

There should be a gradle tab on the right side. Open and Tasks > build > build

fleet pier
#

how to set player suffix via bungeecord?

wind tulip
chrome beacon
#

as for shading you need to use Shadow. However I'm terrible with it and I always struggle so I can't really help with that

tardy delta
#

uhh i kinda forgot but should i add the spigot api via the maven dependency thing or just manually add the jar?

kind hatch
wind tulip
#

alright, that's fine, let me start a new maven project then

kind hatch
#

Spigot Repository:

<repository>
  <id>spigot-repo</id>
  <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>

Spigot API:

<dependency>
  <groupId>org.spigotmc</groupId>
  <artifactId>spigot-api</artifactId>
  <version>1.18.1-R0.1-SNAPSHOT</version>
  <scope>provided</scope>
</dependency>
tardy delta
#

for what is buildtools then?

#

for the nms or smth?

kind hatch
#

More or less.

chrome beacon
#

NMS and Spigot jar

kind hatch
#

It also installs the spigot api into your local maven repos.

tardy delta
#

for what do you need the spigot jar then?

chrome beacon
#

Running the server

tardy delta
#

Β―_(ツ)_/Β―

#

aaaaah aaah i get it

opal herald
#

for this i wanna make a explosion occur when a torch is left clicked but for now i just want it to be if its clilcked in air as a test and im not sure what to do on the e.getClickedBlock because im not sure if air is a block

    public void TorchBomb (PlayerInteractEvent e){
        Player p = e.getPlayer();
        Action action = e.getAction();
        ItemStack item = e.getItem();
        
        if (!item.getType().equals(Material.TORCH)) 
            return;
        
        if (action == Action.LEFT_CLICK_AIR) {
            World w = p.getWorld();
            int Integer;
            boolean Boolean;
            w.createExplosion(e.getClickedBlock().getLocation(), Integer = 1000, Boolean = false);
        }
    }
kind hatch
chrome beacon
#

You can also use the shaded jar

#

?bootstrap

undone axleBOT
#

Bootstrap Jar
The main spigot-1.18.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api-1.18-R0.1-SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.

Please read the release notes for further information: https://www.spigotmc.org/threads/9-years-of-spigotmc-spigot-bungeecord-1-18-1-18-1-release.534760/#post-4305163

quaint mantle
#

a bed has two locations right

wind tulip
#

Creating an External Library via Maven

dark arrow
#

how can i cast a mob health in bossbar?

kind hatch
opal herald
#

the integer is 1000 which is how powerful the blast is and the boolean is if fire works

tardy delta
opal herald
#

i had to do that some reason according to the docs

tardy delta
kind hatch
opal herald
#

oh my god i am a idiot

#

its been a while since i did java lol

#

the variables were defined above that

tardy delta
#

better that than going from rust to java

opal herald
#

yeah

#

i thought this would be a nice project to attempt

chrome beacon
#

The server and it's dependencies are then stored inside the jar as jar files that the bootstrap launches

tardy delta
#

ah a program that launcher another?

modest shard
#

anyone know how to make a shaped recipe where I can get the enchants of an item such as a sword used in the recipe and apply them to the resulted item as well?

opal herald
#

so ive gotten an ideo to make the torch a bomb device but i want the explosion to be on the ground so if you are higher in the air you would pretty much do nothing because you dont have reach

#

im not sure what to do to cause that "reach"

opal herald
#

probably

modest shard
#

ive scoured the internet

#

ive only found things about ench items being crafted and outdated stuff

opal herald
#

look in the docs for something about crafting and then implement a enchant thing

#

into the code for the crafting

modest shard
#

setIngredient doesnt have any that takes in an ItemStack

crisp steeple
opal herald
#

lol

tardy delta
#

true lol

opal herald
#

ive lost all of my braincells because i have no idea how this api works and that was from a begginer from the internet

crisp steeple
#

well just check if the action is left_click_air

#

and then

opal herald
#

im trying something else but i accidently set it to 1000 as the blast radius so my server crashed meaning it worked

#

but im gonna do a normal test

crisp steeple
#

add the players direction vector to their location (adjust it as neccessary) and then spawn the explosion there

#

should have the similar effect to clicking a block

opal herald
#

ok it works with this

    public void TorchBomb (PlayerInteractEvent e){
        Player p = e.getPlayer();
        Action action = e.getAction();
        ItemStack item = e.getItem();

        if (!item.getType().equals(Material.TORCH))
            return;

        if (action == Action.LEFT_CLICK_BLOCK) {
            World w = p.getWorld();
            w.createExplosion(e.getClickedBlock().getLocation(),100,false);
        }
    }```
#

as a left click on a block

#

ill add another statement for air later

crisp steeple
#

ok

modest shard
crisp steeple
#

you can just add a vector to a location with #add(vector)

modest shard
#

interesting

opal herald
#

its complicated is all i know since its a plugin instead of a mod

waxen plinth
#

There's no way to do that with default recipes to my knowledge

modest shard
#

πŸ’€

waxen plinth
#

You have to intercept the event

modest shard
#

oh

#

how to do that?

#

or complicated

opal herald
#

i dont think it is since its a event

dark arrow
#

how to cast health in int

modest shard
dark arrow
modest shard
#

oh

#

like

#

(float) 5?

dark arrow
#

player.gethealth in int

modest shard
#

like

opal herald
modest shard
#

typecast?

dark arrow
#

yup

modest shard
#

just do

opal herald
#

(i just started plugin dev)

modest shard
#

if you wanted to turn 5 into a float

#

do

#

(float) 5

#

should work

opal herald
trail oriole
dark arrow
crisp steeple
modest shard
dark arrow
opal herald
#

or a float

#

doesnt matter

opal herald
#

much simpler than i thought

crisp steeple
#

yea

tardy delta
#

arent locations immutable in newer versions?

crisp steeple
#

i think theyre mutable

#

at least in whatever version i use

#

if not just remove the .clone

tardy delta
#

hmm ye youre right

modest shard
#

is there a way to make players be able to apply books with UnsafeEnchants using anvils then?

tardy delta
#

in 1.17.1

modest shard
#

i never learned how to do that

opal herald
crisp steeple
#

pdc would be a better idea than lore

modest shard
#

are enchants basically just lore?

crisp steeple
#

no

modest shard
#

what pdc

kind hatch
#

?pdc

modest shard
#

ty

#

any notable changes since 1.14?

trail oriole
kind hatch
#

Not really. The PDC has stayed pretty consistent.

modest shard
kind hatch
#

There are expansions for data types though.

trail oriole
crisp steeple
trail oriole
trail oriole
modest shard
#

im not understanding

crisp steeple
#

does it not say Caused by: <>Exception anywhere

kind hatch
#

Oof, 1.8

trail oriole
#

it's been spamming my console for 1 hour so sending the whole thing sounds compliacted

trail oriole
#

best version

crisp steeple
#

not really lol

#

maybe for like pvp

modest shard
#

yea i dont really agree

crisp steeple
#

thats about as good as 1.8 gets

modest shard
#

pvp for people who can only cps

#

im just salty i dont have the hardware for it tho

trail oriole
#

?paste

undone axleBOT
kind hatch
trail oriole
kind hatch
#

What's on line 49?

crisp steeple
trail oriole
crisp steeple
#

oh

modest shard
#

null pointer

crisp steeple
#

this guy sent it

#

im blind

#

whats on line 49

modest shard
#

whats kiwiwands

trail oriole
trail oriole
kind hatch
#

That's why

crisp steeple
#

the item in the player's hand is null

kind hatch
#

Likely no null check.

modest shard
#

oh

#

yea prob that

hybrid spoke
modest shard
#

just add a null check before tht

#

*that

trail oriole
#

oh okay

#

thanks

#

i'm dumb lmao

modest shard
#

πŸ‘

#

not to dumb

#

to fixed error

#

oh yea this reminds me of a porblem i have

trail oriole
#

if (player.getItemInHand() == null) return;

#

this works fine right ?

modest shard
trail oriole
#

alr thanks

modest shard
#

problem i have: i want to make a sword apply wither 2 effect for 5 seconds to the enemy, but the listener doesn't recognize the lore

crisp steeple
#

doesnt recognize?

modest shard
#

im pretyt new to this stuff as well

#

i can send you when i added the lore

trail oriole
#

loop the lore lines

modest shard
#

maybe the chat colors messes it up

modest shard
#

lores are stored in arraylists

trail oriole
#

well exactly

modest shard
#

so i should be able to just use /contains

#

.contains

crisp steeple
#

i dont use eclipse

modest shard
#

oh bruh

kind hatch
modest shard
#

alr thanks ill test it out

#

u think it should work tho?

#

ok ima try that

kind hatch
#

Have you tried debugging it with a bunch of souts?

modest shard
#

no

#

does sout print to console

kind hatch
#

Yes

modest shard
#

oh

#

then whats the point of a logger

crisp steeple
#

no idea tbh

modest shard
#

bruh

kind hatch
#

Formatting.

#

That's really it.

modest shard
#

oh

crisp steeple
#

yeah guess formatting

#

but like

#

if its just debug doesnt really matter that much

kind hatch
#

^

modest shard
#

ty for clarification

#

export as jar file right

#

i havent dont this in months

#

*done

kind hatch
#

Yes, you want a jar file.

modest shard
#

lmao unsure if it was executable version or not

#

*runnable

#

did something change

kind hatch
#

Uhh, well besides the change about becoming a bootstrap jar, no. The jar should download all the dependencies it needs, so this may be another issue.

modest shard
#

hm

#

before i just went to the spigot files and messed with the permissions

#

everytime i booted up the server

kind hatch
#

Permissions for the jar itself or the directory in which it resides?

modest shard
#

the file in the repository

kind hatch
#

I'm confused. How are you trying to run the spigot jar? Linux or Windows environment? Is this on your own computer, or a remote one?

modest shard
#

is it supposedly only supposed to do with the spigot inthe server folder

#

own pc

kind hatch
#

Then why do you need to modify the permissions for the jar file? As long as the files are under your account, you shouldn't need to mess with them.

modest shard
#

idk

#

it works for some reason

midnight shore
modest shard
#

uh

#

for what purpose?

#

sometimes u can just store it as a png instead of having to use a url

midnight shore
#

i need to make a message with this image

kind hatch
#

Well, if you can, I'd recommend resetting the permissions if possible. Otherwise, create a new directory and put a fresh copy of the spigot jar from buildtools in there. Then try to run it normally.

modest shard
#

in console?

midnight shore
midnight shore
#

a chat message

#

translating the pixels of the image to chat colors

modest shard
#

oh what

#

like draw their head using chat colors?

midnight shore
modest shard
#

uh

#

not sure ive never done anything like this

midnight shore
#

like this

kind hatch
#

Pretty sure there is a resource for that somewhere on the forums.

midnight shore
#

or this

midnight shore
modest shard
#

take a look at this

midnight shore
#

thank you

modest shard
eternal oxide
#

um, somethign up with Github auth? it tells me my password is wrong and my email is not the main email

modest shard
#

the bt thing a long time ago

opal herald
#

Location explosionLoc = p.getLocation().clone().add(p.getDirection().multiply(range)); in this i got a error on range

modest shard
#

i dont remember how anymore

#

and im too lazy to go on a youtube expedition

kind hatch
crisp steeple
opal herald
#

oh ok

modest shard
#

what did u put instead of range

crisp steeple
#

ex: you want it to be 2 times as far, change it to 2

opal herald
#

should i set that as int

modest shard
#

yea

#

lol ye

keen obsidian
opal herald
#

oh

kind hatch
#

Just download the jar, and run it with the proper flags.

opal herald
modest shard
crisp steeple
#

might be the wrong method name

opal herald
#

is that facing?

modest shard
#

my tabs rn

undone axleBOT
opal herald
kind hatch
quaint mantle
#

Vivaldi user

kind hatch
#

Tab stacks are fucking great.

wild reef
#

Hey quick question. How can I save a world / trigger /save-all via code?

modest shard
quaint mantle
#

jesus

crisp steeple
quaint mantle
#

dude you need to start from scratch

opal herald
#

ok

crisp steeple
#

dont know if getfacing would make a difference

opal herald
#

probably where the player head is facing

modest shard
crisp steeple
#

did you register the listener

kind hatch
crisp steeple
#

is the event triggering?

#

if it is its probably an issue with .equals(Lentus)

#

are you sure of that

modest shard
#

@kind hatch what do i do with this

kind hatch
#

Run that in your terminal/console.

modest shard
#

oh

crisp steeple
#

bukkit.broadcastmessage("" + player.getInventory().getItemInMainHand().equals(Lentus))

modest shard
#

wait

#

command prompt?

#

or server console

kind hatch
#

Yes

modest shard
#

oh

kind hatch
#

Normal command prompt.

modest shard
#

cmd?

#

ok

kind hatch
#

You need to run the command in the same directory that BuildTools is in.

modest shard
#

uhhh

kind hatch
#

Or specify the full path to where it's located.

modest shard
#

πŸ’€

opal herald
modest shard
#

where is it usually

opal herald
#

typo lol

kind hatch
modest shard
#

downloads digging

#

4 months ago

#

told u its been a while

kind hatch
#

I mean, you probably have one labeld BuildTools (1).jar

#

Which ever is the latest, you will want to use.

modest shard
#

lol

kind hatch
#

Did you not download BuildTools then?

#

Or did you download it to somewhere else?

modest shard
kind hatch
#

Well, it's probably somewhere else then.

opal herald
# crisp steeple neat

i tried to left click but nothing happend unless im in reach heres full code ```package com.tuwtle.TorchHandler;

import com.tuwtle.testplugin;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;

public class TorchHandler implements Listener {
public TorchHandler (testplugin plugin){
Bukkit.getPluginManager().registerEvents(this, plugin);
}

@EventHandler
public void TorchBomb (PlayerInteractEvent e){
    Player p = e.getPlayer();
    Action action = e.getAction();
    ItemStack item = e.getItem();

    if (!item.getType().equals(Material.TORCH))
        return;

    if (action == Action.LEFT_CLICK_BLOCK) {
        World w = p.getWorld();
        w.createExplosion(e.getClickedBlock().getLocation(),100,false);
        Location explosionLoc = p.getLocation().clone().add(p.getLocation().getDirection().multiply(100));
    }
}

}```

modest shard
kind hatch
#

Your browser should tell you where it downloaded to.

modest shard
#

wdym

#

isnt it just in downloads

modest shard
#

but idk how to tell cmd where

crisp steeple
#

that is gonna be very very very far away

opal herald
#

100 blocks?

crisp steeple
#

you're also checking left_click_block

#

not air

opal herald
modest shard
#

i have to go eat breakfast lol its past noon where i am brb πŸ’€

crisp steeple
#

i dont think 100 is the limit

opal herald
#

probably wont work

crisp steeple
#

you're just creating the explosion very far away

opal herald
#

oh

#

i thought that was where the player could do the thing from

#

i set it to 5

kind hatch
# modest shard isnt it just in downloads

Your browser has something that shows you all of the files that you have downloaded in your session. Since I use vivaldi, this is how it looks for me. When I click on one it gives me information about it.

As you can see, the file I have selected was downloaded to my Downloads folder.

opal herald
#

on chrome its like ctrl j

wary harness
#

Is it possible to get Block of chest on InventoryCloseEvent ?
So I can check custom data in PDC on that block.

crisp steeple
#

using the inventoryholder maybe?

opal herald
#

what is the or operator in java

tardy delta
#

||

opal herald
#

ok

#

ty

sterile grotto
kind hatch
#

You should be able to. There is a method in Inventory called getLocation()

tardy delta
#

BRUH now i understand what that method is doin

#

i was like an inventory which has a location huuh

kind hatch
#

@wary harness

opal herald
# crisp steeple oh cool
            World w = p.getWorld();
            w.createExplosion(e.getClickedBlock().getLocation(),100,false);
            Location explosionLoc = p.getLocation().clone().add(p.getLocation().getDirection().multiply(5));
        }``` 
updated code
wary harness
crisp steeple
#

if you left click a block its gonna spawn like underground just so you know

#

not where they actually clicked the block

crisp steeple
#

yes

kind hatch
#

With the way you have your code, it's not going to spawn where you click. It's due to you changing the location of the explosion.

opal herald
#

oh i set it to 1 then

#

if thatll help

crisp steeple
#

just adjust it until it feels right

opal herald
#

ok

#

but would that code be good to do what i want to happend?

crisp steeple
#

probably

opal herald
#

ok

#

ty

kind hatch
#

You mentioned that you wanted to check for distance/if the player is down at someone on the ground. There are some methods that you may want to look into.
Player#getLineOfSight() - Gets all blocks along the living entity's line of sight.
Player#getTargetBlock() - Gets the block that the living entity has targeted.
Player#getTargetBlockExact() - Gets the block that the living entity has targeted. This takes the blocks' precise collision shapes into account. Fluids are ignored.

fallen glade
#

i need a plugin for my gamemode
and dm me if interested
also i can vc with you to talk about it if needed and i can also show you my server so you can get a better understanding of it and how the game works etc
https://paste.helpch.at/ezewobayeh.sql

undone axleBOT
fallen glade
chrome beacon
#

Well this isn't the right place

opal herald
#

i think the second one would work

#

how would i use that method though?

crisp steeple
#

is it worth it to create an api to make plugin messages more structured

#

or has someone already done that

tardy delta
#

what kind of plugin messages?

#

the ones between servers? (f.e. Player#sendPluginMessage)

crisp steeple
#

primarily for like bungee

tardy delta
#

would make sense to write a kind of wrapper for it

crisp steeple
#

yea

#

would also make it support returning values etc