#help-development

1 messages · Page 1526 of 1

granite stirrup
#

apparently u can just call a Location's getBlock() method and it gets the block

ivory garnet
#

i have this error : Caused by: java.lang.NullPointerException

smoky oak
#

Thing is i still want to check if where a point is is air. Even if its a block.
This is the only method that does what I'm searching for - collision. Doesn't seems to exist for points.
In other words by using this it should work.

public boolean isAir(Location l){
  return World.rayTraceBlocks(l, new Vector(0,0,0), 1/64) == null;
}
#

luckily that also means by taking the edges of the player hitbox and shifting them i can do collision detection

ivory garnet
smoky oak
#

fails if there is no lore

#

then you have a pointer pointing to nothing

#

you need to check if that lore has any length before getting lore

granite stirrup
#

can u show full code

#

?paste

undone axleBOT
granite stirrup
ivory garnet
granite stirrup
#

@ivory garnet give full code ;-;

#

not just 1 line

smoky oak
#

I'd do it like this but no guarantee

Lore l = item.getItemMeta().getLore();
boolean haslore = false;
if(l.length()!=0){
  haslore = l.get(0).equals("My very cool lore.");
}```
compact haven
#

it returns a list of string

#

not a lore object

#

and pretty sure its size() or size, length is for arrays

lyric grove
#

Hi, im using this bukkit runnable

#

but it isnt refreshing every few seconds

smoky oak
#

If i had to guess its because youre using the name of a class for a variable name but im not too sure how your ide works

granite stirrup
lyric grove
#

so like this?

smoky oak
#

that only starts it once

#

I think

lyric grove
#

oh

untold kernel
#

i am getting an NPE
[21:33:00 WARN]: java.lang.NullPointerException [21:33:00 WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:493) [21:33:00 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486)
When i try to fire a custom event

valid crescent
#

Hi, does anyone know how can I open a GitHub organization repository in IntelliJ? I'm part of the organization, but IntelliJ only shows my own repositories.

maiden shore
compact haven
#

is it too hard to go to github.com and create repo from there xd

valid crescent
valid crescent
maiden shore
valid crescent
maiden shore
#

You would've gotten an access denied if it was a permissions problem, so I'm assuming because it was a not found error that the link was wrong

#

Is this where you're putting the link?

valid crescent
maiden shore
#

And it ends in .git right?

valid crescent
#

yes

maiden shore
#

What if you try to use a link from a random public repo? Does it work then?

valid crescent
# maiden shore

I tried doing this again, and IntelliJ opened a page asking me to log into my GitHub account

maiden shore
#

Login then

valid crescent
#

but then

#

it said Error 403: Not Authorized
This request is only valid within same origin

maiden shore
#

?

unreal quartz
#

auth over ssh instead then

maiden shore
#

Well

#

You'll probably need to add an SSH key in that case as well

valid crescent
unreal quartz
#

because no auth is needed

#

you're not authenticated

#

if you're struggling over https because of the built in prompt, either do it from the command line (with an access token if you have 2fa) or use ssh

valid crescent
maiden shore
#

You need a key

unreal quartz
#

did you give github your key?

valid crescent
#

How do I get a key?

#

Huh?

unreal quartz
#

step by step guide there

valid crescent
#

ok thanks, i'll try that

quaint mantle
#

Hello there!
I need help with creative inventory. I want to reserve some items in the hotbar (the 5 firs items) so that the player can't move it. Here is my code:

    @EventHandler
    public void onCreativeInventoryClick(InventoryCreativeEvent event) {
        System.out.println("a");
        ItemStack item = event.getCurrentItem();
        if (item != null
                && item.getItemMeta() != null
                && event.getSlot() < 5
                && inspectMode.map.containsKey(event.getWhoClicked().getUniqueId())) {
            event.setCancelled(true);
            System.out.println(event.getCurrentItem());
            System.out.println(event.getCursor());
            System.out.println("b");
        }
    }

The problem is that when I take an item, it is not removed from the hotbar but duplicated

smoky oak
#

add one line that removes items held in cursor?

maiden shore
#

Are you sure you want InventoryCreativeEvent and not InventoryClickEvent?

#

Well I guess InventoryCreativeEvent is a subclass

#

It's been a while since I've done inventory stuff but IIRC cancelling InventoryClickEvent removes the item from the cursor

quaint mantle
maiden shore
#

You sure it isn't just a visual client bug?

quaint mantle
quaint mantle
#

so the player keeps the duplicated item

#

I could set the item held in cursor to air in the next tick but it's pretty ugly

maiden shore
#

What happens if you try to drop the duplicated item, for example? If it's a visual bug the item should just disappear

maiden briar
#
ItemStack[] getContents();

@NotNull
ItemStack[] getStorageContents();

in org.bukkit.inventory.Inventory
I don't understand the difference between those (I read jd)

maiden shore
maiden briar
#

Ah thanks, now I understand

maiden shore
quaint mantle
#

I don't think the server thinks it's air

maiden shore
quaint mantle
#

I think this is just not the same tick

#

when the event occurs it is AIR : the item is not at two different places at the same time

#

but on the next tick it moves to the cursor

maiden shore
#

Drop a runTaskLater in there and check?

quaint mantle
#

but because I cancelled the event, it is not removed from the inventory

#

check if this is not AIR?

#

Why do you want to check that?

maiden shore
#

Just check what the server thinks it is

#

It's not normal for the item to move to the cursor if you cancel the event

quaint mantle
#

I know

#

But I'm not sure event.getCursor() will really give us the new item

maiden shore
#

What spigot version are you using?

quaint mantle
#

I'm pretty sure that when the cursor will change my event.getCursor() will still link to the previous item from the event object

#

1.17

maiden briar
#

What is containsAtLeast​(ItemStack item, int amount) in org.bukkit.inventory.Inventory ?

quaint mantle
#

It checks if your inventory contains at least amount * item?

maiden briar
quaint mantle
#

is the chunk unloaded when none of the players are loading it?

lyric grove
#

Hi, im trying to make a BukkitRunnable but it isn't changing ever few ticks

quaint mantle
#

wtf dude

tall ridge
#

how often do you want it to run, cause right now it looks like 15 minutes

lyric grove
#

oh lol sorry i want it to run every minute

tall ridge
#

change the numbers!

#

u fix

quaint mantle
#

15 hours

lyric grove
#

oh lmao

jade perch
#

15 minutes not hour

#

Just make it 20 x 60

tall ridge
#

bad math guys

quaint mantle
#

20 ticks = 1 minute

jade perch
#

For 1 minute

tall ridge
#

1 second

#

20 ticks = 1 second

#

:U

jade perch
#

Lol

lyric grove
jade perch
#

Yus

lyric grove
#

thanks

tall ridge
#

math

quaint mantle
#

he make^ (20*60)*15

#

that's 15 hours

tall ridge
#

no

#

15 minutes

jade perch
#

No it's not

tall ridge
#

math

quaint mantle
#

ah

tall ridge
#

:U

quaint mantle
#

i bad

tall ridge
#

math math math

quaint mantle
#

sry

tall ridge
#

go bad to math

quaint mantle
#

math

jade perch
#

Don't post help dev answers if you don't know

quaint mantle
#

fucking math

tall ridge
#

back to math*

#

he knows what is wrong

#

!

#

xd

quaint mantle
#

recently woke up, sorry

tall ridge
#

I forgive you

quaint mantle
#

who can just setup geyser for me
?

jade perch
#

No

sage swift
#

?services

undone axleBOT
tall ridge
#

there's no setup required

quaint mantle
tall ridge
#

I just throw the plugin in and I'm done

sage swift
#

where is the getMin/MaxBuildHeight in nms? i can't find the methods at all

tall ridge
#

ooo why not nms

quaint mantle
#

cast to bukkit world

sage swift
#

because the api currently does not support changing world min and max?

#

....

quaint mantle
# quaint mantle go to geysermc discord.

they cant do crap bc they really dont want to help me Is ThEiR A eRrOr like damn i just made the server yesterday and im trying to join from bedrock i mean how the frick am i supposed to set it up

#

do not damn link me to the fricken github

jade perch
tall ridge
#

I've just been generating new level.dats

maiden shore
sage swift
tall ridge
#

by making a level.dat

jade perch
#

That's why it's in a separate data pack....

tall ridge
#

I've been trying to research datapacks and all the spigot configuration for world gen this week

quaint mantle
#

wait a second

#
{
  "logical_height": 384,
  "infiniburn": "minecraft:infiniburn_overworld",
  "effects": "minecraft:overworld",
  "ambient_light": 0.0,
  "respawn_anchor_works": false,
  "has_raids": true,
  "min_y": 0,
  "height": 384,
  "natural": true,
  "coordinate_scale": 1.0,
  "piglin_safe": false,
  "bed_works": true,
  "has_skylight": true,
  "has_ceiling": false,
  "ultrawarm": false
}
#

put it into DATAPACK/data/minecraft/dimension_type how overworld.json

#

in datapack you can change height

#

the second line - logical_height

#

it does not interfere with other plugins, because generation is not specified

#

only the TYPE of the world is set.

tall ridge
#

That almost looks the same as the caves and cliffs dimension_type for overworld

quaint mantle
#

but min_y is upped

#

to 0.0

#

yes

#

without negative y, because the most of plugins don't support this.

#

i free use this with TerraformGenerator

sullen dome
#

guys... i have this code that runs when a player click's the specific item (in this case slot 10), and i want then to update the item's lore. The problem is, the item name doesn't update. it always stays at false. the boolean that is responsive for it changes how it should (same as the config-entry), but the item-name stays the same. even after re-opening the inventory, or even reloading.

    private void handleClick(Player p, int slot) {
        if (slot == 10) {
            Challenges.getPlugin().getLanguageManager().getConfig().set("challenges.blockbreak.enabled", !blockbreak);
            blockbreak = !blockbreak;
        } else if (slot == 18) {
            initMenu(p, SETTINGS_MAIN);
            return;
        }
        initMenu(p, SETTINGS_CHALLENGES);
        System.out.println("Inventory updated: " + blockbreak);
    }```

`initMenu();` is:
```java
    public void initMenu(Player player, Inventory inv) {
        buildItem(SETTINGS_MAIN, Material.RED_BED, 1, 1, LanguageManager.getTranslatedString("title_challenges"), LanguageManager.getTranslatedString("description_challenges"));
        buildItem(SETTINGS_MAIN, Material.LIME_DYE, 1, 8, LanguageManager.getTranslatedString("title_language"), LanguageManager.getTranslatedString("description_language"));
        buildItem(SETTINGS_CHALLENGES, Material.DIAMOND_PICKAXE, 1, 10, LanguageManager.getTranslatedString("title_blockbreak"), LanguageManager.getTranslatedString("description_blockbreak"), "", getEnabled(Challenges.getPlugin().getChallengeSettings().blockbreak));
        buildItem(SETTINGS_CHALLENGES, Material.RED_WOOL, 1, 18, LanguageManager.getTranslatedString("title_back"));
        buildItem(SETTINGS_CHALLENGES, Material.LIME_WOOL, 1, 26, LanguageManager.getTranslatedString("title_forward"));

        player.openInventory(inv);
    }```
quaint mantle
quaint mantle
#

?paste

undone axleBOT
sullen dome
#

i dont really see this as 'large', but sure

quaint mantle
#

item.setMeta(meta);?

sullen dome
sage swift
#

should show buildItem

sullen dome
#
    private void buildItem(Inventory inv, Material mat, int amount, int slot, String displayName, String... lore) {
        ItemStack stack = new ItemStack(mat);
        ItemMeta meta = stack.getItemMeta();
        meta.setDisplayName(displayName);
        meta.setLore(Arrays.asList(lore));
        stack.setAmount(amount);
        stack.setItemMeta(meta);
        inv.setItem(slot, stack);
    }```
#

i mean, it works at the beginning

#

but it doesnt really update

sage swift
#

where are you trying to update it

#

the line after slot == 10?

sullen dome
#

basically when it's slot 18, i want to go to the inventory the player was before. but on slot 10, it just should update the actual inventory.

#

so basically this one

sage swift
#

so getEnabled(Challenges.getPlugin().getChallengeSettings().blockbreak) is always returning false?

sullen dome
#

no

#

in sysout, it returns true/false, whatever is in config, or whatever the boolean is

#

so it's just the update of the item i guess

#

this getEnabled is btw just a converter from true/false to on/off with colorcodes

paper olive
#

I'm trying to prevent a player from putting an item in a chest -- am I correct in my reading of the docs that I'll need to cancel both the InventoryClickEvent and the InventoryDragEvent separately? Or is there a better way to do it?

sullen dome
#

probably both, yeah

#

idk if the InventoryInteractEvent would work for you

paper olive
#

yeah, it doesn't look like I can search for the specific item

#

might be somewhere in Event.Result

#

I want to optimize my build process to automatically restart the server

lofty junco
#

does anyoneknow how to perfom an proxy command on spigot

eternal garnet
#

Hii, my listener is not working.... can Someone help?

quaint mantle
#

?paste

undone axleBOT
eternal garnet
#

ok

sage swift
#

halp! no detail! only halp!

eternal garnet
#

yee sorry xD

solar echo
#

Hi, I would like to ask how can I do that by right-clicking on an item in the GUI. It happens that there must be a certain block, for example OAK_LOG, and when you destroy it, it will write you a message, but if you click the right button on the mouse, it is true, and when you click the left button, it will be false. And sorry for the English.

hybrid spoke
#

why

are

you

using

that

many

spaces

wraith rapids
#

consider learning english

quaint mantle
eternal garnet
wraith rapids
#

no helping allowed

lilac briar
ivory sleet
#

Idk if u could use something like a TranslatableComponent for that

lilac briar
#

Hi, I have a problem with that code

#

equals reference comes up as invalid

#

with the error Cannot resolve method 'equals(java.lang.String)'

ivory sleet
#

looks oddly unusual

lilac briar
#

I am not a professional, still learning

#

but I will try to understand everything

astral depot
ivory sleet
#

wym starter form?

tall ridge
#

false

#

I think

astral depot
#

as you can see it says "public boolean rare = false;" I am setting it to true but it just goes back to false

tall ridge
#

change boolean to static?

ivory sleet
#

dont

#

wont help

tall ridge
#

oof don't listen to me

quasi flint
#

I don't even know what that code wants from me 😂

ivory sleet
#

However DevLab

        if(rare){
            if(e.getMessage().contains(Anime.List.Garou.getName())){
                player.sendMessage("RIGHT!!!!");
                rare = false;

this would make it go back to false when its true and you send a chat?

astral depot
#

yea, it will first send that this was right, and then i want to start again, but i don't get that message

#

I get "false" and "mhaa"

sage swift
#

TranslatableComponent might do the job as well as Conclure said

ivory sleet
#

DevLab basically the initial assignment to rare is false, and then whenever that event triggers it is still false so I don't really know what's the issue here.

quaint mantle
#

im looking at TranslatableComponent, so far looks like it would work

edit: it did, thank you!

ivory sleet
#

Unless you're actually calling that rare() method of yours albeit you should probably use the BukkitScheduler and not TimerTask & Timer (quite outdated class)

eternal garnet
tall ridge
#

I've never seen TranslatableComponent before looks very cool.

quaint mantle
#

yeah same, actually really helpful

astral depot
timid kestrel
#

Just why does deserializing an ItemStack include everything apart from the itemMeta? 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ 🤦‍♂️ !!

timid kestrel
#

You can ItemStack.Serialize(), which will serialize an entire item perfectly, just as requested

#

but then .deserialize() shows up and deserialzies everything but the itemMeta..

#

and there's no ItemMeta.deserialize() function, so I'm royally shafted 🙂

#

need to work out how the hell imma turn this Map<String,Object> object, which contains the ItemMeta as a key, into an ItemMeta...

granite stirrup
#

well u could look at the itemmeta class

ivory sleet
tall ridge
#

ooo

timid kestrel
ivory sleet
#

use ConfigurationSerialization.deserializeObject​(map,ItemMeta.class) also

#

it should work equivalently

timid kestrel
#

fml

#

Thank you to the person who went out of their way to ensure deserializing an ItemStack removes the meta key

quaint mantle
#

Hey guys ! I'm trying to use Worlguard API in my plugin, does anyone knows how could I get the size of a protected region ?
Like I want to do something whenever a region reach a particular size

paper olive
#

bruh. why does InventoryDragEvent not have an equivalent to getClickedInventory()? do I have to look at the raw data myself to determine whether the player is dragging into the top or bottom inventory?

ivory sleet
#

Well there's no click involved in InventoryDragEvent

paper olive
#

getDraggedInventory()

#

wait, can you drag between inventories?

ivory sleet
#

yeah think so

paper olive
#

ah. that would be why. okay cool

#

turns out it's smarter that way

full pelican
#

Hello everyone, I am in the process of making an item menu plugin and am currently having problems with getting the plugin to cancel PlayerDropItemEvent and for it to remove the items when it is dropped on death. I am currently using persistent data to track the item and I can tell the item is getting the data since its running the command I defined which i have coded to only happen if the item has that persistent data. Does anyone have any ideas on how I can fix this? Alternatively if you know a good item menu plugin that I can use instead of making one that would be appreciated.

ivory sleet
#

Couldn't you use PlayerDeathEvent to remove the items on death

tall ridge
#

he could

#

he wants both drop and death events

full pelican
tall ridge
#

or no I misread?

ivory sleet
#

Also what problems are you having specifically.

full pelican
tall ridge
#

what is code for canceling drop event?

full pelican
#

So in terms of the item drop problem the plugin doesnt seem to be canceling the drop event and is freely allowing players to drop the item when its in their hand

For the death problem the item is not being removed when the player dies and items are dropped

#
    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void blockInteractions2(PlayerDropItemEvent event){
        Player p = (Player) event.getPlayer();
        ItemStack item = (ItemStack) event.getItemDrop().getItemStack();
        ItemMeta meta = item.getItemMeta();
        PersistentDataContainer data = meta.getPersistentDataContainer();
        if (data.has(new NamespacedKey(ItemMenu.getPlugin(), "itemmenu"), PersistentDataType.STRING)){
            event.setCancelled(true);
        }
    }```
tall ridge
#

ignorecanceled true?

full pelican
#

and heres the one for the death event

    @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
    public void blockDropdead(PlayerDeathEvent  event){
        Iterator<ItemStack> iterator = event.getDrops().iterator();
        while (iterator.hasNext()) {
            ItemStack next1 = iterator.next();
            ItemMeta meta1 = next1.getItemMeta();
            PersistentDataContainer data1 = meta1.getPersistentDataContainer();
            if (data1.has(new NamespacedKey(ItemMenu.getPlugin(), "itemmenu"), PersistentDataType.STRING)){
                iterator.remove();
            }
        }
    }```
granite stirrup
ivory sleet
#

PlayerDeathEvent isnt cancellable btw

tall ridge
#

xd

#

you can try!

quasi flint
granite stirrup
#

i swear i have before

quasi flint
#

Nop it's not

full pelican
#

ok wait so for the player drop event I remove the ignorecancelled thing

tall ridge
#

I don't see it saying it is cancel able

#

both

granite stirrup
#

u dont need it for both

tall ridge
#

you can't cancel death

#

just remove items from inventory on death

full pelican
#

what exactly does that do then?

tall ridge
#

ignorecanceled?

full pelican
#

yea

tall ridge
#

ignores you canceling it

#

!!!

ivory sleet
#

setting ignore cancelled to true will ensure that your event handler method wont fire if the event is cancelled

tall ridge
#

or that

ivory sleet
#

its ignoring cancelled events basically

full pelican
#

Ok I would have thought that would be a good thing to have but you guys are the experts here

#

and that should fix the playerdropitemevent, right

ivory sleet
#

but yeah as Chew said, for the death event just remove the items straight from the inventory

#

hmm unsure adwm but try and see, I mean if you're cancelling it, then yeah

tall ridge
#

yes

full pelican
#

No Idea how to remove it from the inventory

tall ridge
#

get player inventory

#

look for the item

#

remove the item

ivory sleet
#

worst case would be where you have to call PlayerDropItemEvent#getItem#remove and readd the item instead of cancelling it

full pelican
#

im assuming I can just do like event.getPlayer().getInventory().setItem(8, air)

tall ridge
#

C:

full pelican
#

ok thanks

quaint mantle
#

any tips to calculate number of blocks in a radius of x blocks ?

tall ridge
#

math

quaint mantle
#

yea but not sure how to calculate blocks shaped sphere u know

tall ridge
#

hmmm

full pelican
#

So with the PlayerDeathEvent I cant do event.getPlayer().getInventory().setItem(8, air) since getPlayer is not a method in the event, what should I use instead

ivory sleet
#

getEntity()

#

it returns the type Player

quaint mantle
#

when I try to do build tools does any1 know how to fix this

#

yay a response

ivory sleet
#

Well you need to have the BT jar in the same folder as where you started that prompt in

tall ridge
#

right.

#

what is in the directory

ivory sleet
#

Or navigate to that folder with cd path

quaint mantle
#

how do I know what folder I started the prompt in

full pelican
#

ok this should be the last thing for the death event, but what should I put for air? it wants an itemstack but air isnt an itemstack

ivory sleet
#

new ItemStack(Material.AIR)

quaint mantle
#

whats cd path

ivory sleet
#

It’s a command

#

connect directory then the path

tall ridge
#

cd is like goto folder structure

quaint mantle
#

where do I find the command path

tall ridge
#

path is the directory path

timid kestrel
#

Why does Craftbukkit not have a repo man >_>

ivory sleet
#

The path will look something like this C:/blah/directory/

timid kestrel
#

and why does spigot not contain it's own implementation of CraftMetaItem.... this is such a mess

quaint mantle
#

ok

ivory sleet
#

Popzi cuz it’s api vs implementation

quaint mantle
#

so like my local server folder?

ivory sleet
#

Also you don’t need the cb dependency, we have spigot after all

#

?Bt ohagain check this

tall ridge
#

and yeah that's where you put BuildTools

ivory sleet
#

?bt

undone axleBOT
quaint mantle
#

ive been to that website

timid kestrel
#

then whats the import path for the function to make a new ItemMeta type? for spigot xd

tall ridge
#

its a good website

hardy swan
timid kestrel
#

You said I don't need the craftbukkit dependency

hybrid spoke
#

oh fuck

ivory sleet
#

Yeah Popzi

quaint mantle
#

why did it just generate

ivory sleet
#

we have spigot instead

hardy swan
quaint mantle
timid kestrel
#

So where's the spigot equivelent of org.bukkit.craftbukkit.Inventory.CraftMetaItem ?

tall ridge
#

When I am developing plugins I only use the spigot server jar

tall ridge
#

as a dependency

quaint mantle
#

ok so first where do I put my files

hardy swan
#

Wherever you want

quaint mantle
#

uhhh

hardy swan
#

Then proceed to the directory you put your bt file and run the command

tall ridge
#

I don't see any spigot folders generated after running buildtools btw

timid kestrel
quaint mantle
#

huh i double clicked the build tools file and it generated the files

tall ridge
#

I run buildtools with parameters

#

in cmd line

ivory sleet
tall ridge
#

like you were showing us

ivory sleet
#

Or smtng like that

timid kestrel
#

to add to my point, this is a mess

quaint mantle
tall ridge
#

I'll show you mine

quaint mantle
foggy bough
#

I just need to get something striaght with this code ```java
public class JoinListener implements Listener {

private Main plugin;

public JoinListener(Main plugin) {
    this.plugin = plugin;
}

@EventHandler
public void onJoin(PlayerJoinEvent e) {
    Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() {

        @Override
        public void run() {
            SkinGrabber.changeSkin(e.getPlayer());
            
        }}, 0L, 1200L);
}

}``` so basically when I join the server the scheduler will start and every minute it will do the thing I put in SkinGrabber.changeSkin right?

hardy swan
#

why is there a 0L and 1200L there

#

oh nvm

tall ridge
hardy swan
quaint mantle
foggy bough
foggy bough
tall ridge
#

java -jar BuildTools.jar --rev 1.17 would work if you run it in git bash and git bash's working directory is the same as that of where you installed buildtools

hardy swan
#

it should be, not so sure if it really matters

foggy bough
tall ridge
#

you are still not in the right directory I think

quaint mantle
#

what file and where is the directory I should put it in

#

cause i have like 7

tall ridge
#

okay I will help you some more by telling you what to do

quaint mantle
#

ok

tall ridge
#

does cd Downloads work?

hardy swan
quaint mantle
#

the files are in downloads folder

#

rn

tall ridge
#

yeah but if you type cd Downloads in gitbash will that bring your console's working folder to Downloads?

#

or does it error?

quaint mantle
#

ohh

tall ridge
#

the alternative is something likecd C:/...

quaint mantle
#

im in there

#

it working

timid kestrel
#

why for the love of god is spigot-api available through the repo, but spigot isn't? 🤦‍♂️

tall ridge
#

okay run the buildtools cmd

quaint mantle
#

ok

hardy swan
quaint mantle
#

its doing stuff

foggy bough
tall ridge
#

now next time someone asks you this question ohagain, point them to that page you said you read already

quaint mantle
tall ridge
#

you need to update java

#

you would know that if you read the page!

quaint mantle
#

ok ill do it

hardy swan
quaint mantle
#

i went back to java 16 after it saids only up to java 15 is allowed i think

#

in run.bat

timid kestrel
foggy bough
quaint mantle
#

ill download 16

foggy bough
#

java 8

quaint mantle
#

but its 1.17

ivory sleet
#

What

quaint mantle
#

it requires java 16

hardy swan
quaint mantle
#

should i uninstall java 15

hardy swan
quaint mantle
#

ok

hardy swan
#

in fact you should keep it

ivory sleet
#

No need to uninstall

tall ridge
#
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment 21.3 (build 16.0.1+9)
OpenJDK 64-Bit Server VM 21.3 (build 16.0.1+9, mixed mode, sharing)
[root@router BuildTools]# ```
#

you can have both

#

I uninstalled 15

hardy swan
#

dun uninstall so you can run things that require <= java 15

quaint mantle
#

ok

#

its done

#

so do I rerun the previous command

tall ridge
#

yes

quaint mantle
#

its running

timid kestrel
tall ridge
#

because it basically gave all the instructions I just did >:U

hardy swan
#

instead of downgrading java

ivory sleet
#

I mean it’s probably fine uninstalling j15 but I would advice to have j11 and j8 still

eternal garnet
#

I got this error... can someone help?

I'm using Javacord btw

Code:

        System.out.println("Received message!");
        Optional<TextChannel> channel = api.getTextChannelById(825085528398888970L);
        channel.ifPresent(textChannel -> textChannel.sendMessage("Hi"));
    }```

Error:
```Could not pass event AsyncPlayerChatEvent to project```
weary geyser
#

Anyone know why I get a NoSuchFieldException here? ```java
try {
Field f = item.getClass().getDeclaredField("meta");
f.setAccessible(true);

        ItemMeta meta = (ItemMeta) f.get(null);

        if(meta == null) {
            f.set(null, Bukkit.getItemFactory().getItemMeta(item.getType()));
        }

    } catch (NoSuchFieldException | IllegalAccessException e) {
        e.printStackTrace();
    }``` (item is a ItemStack)
full pelican
#

ok so I built my plugin and put it on my server and I am getting an error saying that it was compiled by a more recent version of the java runtime, how can I build it in a lower version?

full pelican
#

yes

eternal garnet
#

Which version do u buiild ur project @full pelican

weary geyser
full pelican
#

55.0 or lower

eternal garnet
#

Minecraft version ?

full pelican
#

1.15.2

#

and above

eternal garnet
#

And which version is your server?

full pelican
#

1.15.2

ivory sleet
#

and also the f.get(null)

#

That would indicate the field is static

eternal garnet
#

hm...

weary geyser
#

How would you get a field if it's not static? @ivory sleet

tall ridge
#

we just changed your java version

eternal garnet
#

I can't help u further sorry adwm

ivory sleet
#

f.get(instance)

weary geyser
#

Ah

#

So in my case f.get(item)?

humble maple
#

Hello I have a question, for people who are developers, etc ... I am using Intellij idea to create plugins right now and I would like to know if in visual studio code you can also create plugins or not but with maven if

full pelican
#

damn ok, ill keep looking around and see if I cant find a way to do it

ivory sleet
#

Yeah

weary geyser
#

Thanks bro

ivory sleet
eternal garnet
full pelican
#

will do

tall ridge
#

this is an ez fix adwm

full pelican
#

What do I need to do chew

tall ridge
#

your plugin dependency needs to be changed

#

It's old

full pelican
#

how do I do that

tall ridge
#

Well I can show you how I do it in Eclipse is that fine?

full pelican
#

Yea thats fine

tall ridge
#

I would remove the old jar references, and add a new one

full pelican
#

ok I see now, thank you

tall ridge
#

np

weary geyser
#

@ivory sleet Hmm, I still get the same exception

ivory sleet
#

Yea also the class might not have the field

ivory sleet
#

Idk but check if CraftItemStack has a field called meta then?

weary geyser
#

Alright

ivory sleet
#

Else if you wanna be sure to get the right field from the right class use ItemStack.class.getDeclaredField(...)

weary geyser
#

Ight

#

@ivory sleet The reason I'm doing this is becuase I cannot enchant my item with my custom enchantment

#

It does not get added to the enchant list

ivory sleet
#

Sounds odd to use reflection for that then lol

weary geyser
#

item.getEnchants() returned an ImmutableMap, and that was because the ItemMeta was null

#

So I tried to recreate it or smth

ivory sleet
#

Use ItemMeta?

weary geyser
#

It is null

#

The item is a wooden sword

#

Not air

ivory sleet
#

It won’t be once getItemMeta is called

weary geyser
#

Alr

ivory sleet
#

Or I mean setItemMeta I think

#

But yeah just get meta -> apply enchants -< set meta back

weary geyser
#

Mhm

full pelican
#

ok so anyone who using intelliJ got a question for you. I am trying to build my plugin after switch my java version to java 11. I switched everything out in the libraries but somewhere its defined as java 14 and I have no idea where to it is to fix this. Does anyone know where to find and fix this

dense remnant
#

Heyy uhh does anyone know why block coordinates are offset by -1 on x? (when x is smaller than 0)

currently I am standing at -20 76 64. The Block coordinates are -21 76 64

full pelican
#

ok so I finally got the plugin loaded and whenever I die the item still drops on the ground

weary geyser
#

@ivory sleet So, I added the enchants, but ((Player) e.getDamager()).getItemInHand().getEnchantments().containsKey(Enchantment.getByKey(getKey())) still returns false

full pelican
tall ridge
#

bye bye java 16

#

I'll show you an up to date plugin dependency list even though I don't use intelliJ

wraith rapids
#

block coordinates are rounded towards negative infinity

#

the center of a block is at 0.5

#

the block coordinate is the location of the bottom east north corner of the block

#

that is, a block at xyz 000 spans from xyz 000 to xyz 111

#

the apparent difference between -20 76 64 and -21 76 64 is that you are actually standing at -20.23 76.0 64.33

#

the visual numbers are rounded evenly to 20 76 64

#

but the block coordinate is rounded towards negative infinity to 21 76 64

dense remnant
#

No I am standing at the exact coordinates.
Other example:

I am standing at exactly -16 97 20
Block coordinates are -17 97 20

and...

I am standing at exactly 16 97 20
Block coordinates are 16 97 20

wraith rapids
#

what happens if you move to exactly -15.999 97 20

dense remnant
#

This messes a little with my plugin and I dont know how to fix it

#

Block Coordinates move to -16

wraith rapids
#

this is caused by the fact that the lower bound is inclusive

#

but the upper bound is exclusive

#

-16 can only point at one block

dire marsh
#

spigot api dependency suddenly broken today for anyone else?

wraith rapids
#

i know of a fix

#

depend on paper instead

dire marsh
wraith rapids
#

you don't need hangar to depend on paper

dire marsh
#

well this is a plugin on spigot

#

so

wraith rapids
#

and hangar will probably never be out

dire marsh
#

kind of best to depend on spigot api

wraith rapids
#

they'll keep working on it until minecraft dies

dense remnant
#

How do I fix the negative coordinates thingy?

I want my plugin to place a block at the location of a player. When the player is in a positive range everything works like it should but when he is at negative the block placed is always one block off.

wraith rapids
#

it works fine unless you are doing something weird

#

this only happens when a player is standing exactly on the border between two blocks

dense remnant
#

No

wraith rapids
#

which is practically impossible without hacks or commands

#

then you are fucking something up somewhere

#

show code

dire marsh
#

hmm i've tried clearing caches and even deleting local m2 repo

#

sad

dense remnant
#
Location tmp = new Location(loc.getWorld(),loc.getX(),loc.getY()+1,loc.getZ());
        if(loc.getX()<=0){
            loc.setX(loc.getX()+1);
        }else if(loc.getZ()<=0){
            loc.setZ(loc.getZ()+1);
        }
        for(int j = 0;j<2;j++){
            for(int i = -1;i<2;i++){
                switch (direction) {
                    case "NORTH":
                        tmp.setX(loc.getX()+i);
                        break;
                    case "SOUTH":
                        tmp.setX(loc.getX()-i);
                        break;
                    case "EAST":
                        tmp.setZ(loc.getZ()+i);
                        break;
                    case "WEST":
                        tmp.setZ(loc.getZ()-i);
                        break;
                }
                loc.getWorld().getBlockAt(tmp).setType(Material.IRON_BLOCK);
                System.out.println(tmp.toString());
            }
            tmp.setY(tmp.getY()+1);
        }

loc is a location with integers so no rounding

dire marsh
#

Guess I'll just wait for it to fix itself tomororw.

ivory sleet
grave rune
#

I have a question about YAML files:

When I use "FileConfiguration" to read YAML files, the keys seem to be case sensitive. This causes a problem where the plugin can't find certain configurations that a server admin has manually added. I did build a command which sets up the keys correctly, but not every admin uses them and thus it happens that an admin doesn't pay attention to the fact that the keys (parts of them) have to be lowercase.

Example:
"Setttings.Morelaid.Demo" does not seem to be the same as "Settintgs.morelaid.Demo". In this case exactly the part "Morelaid" or "morelaid" is the part the admins should specify in lowercase.

Is there a function which looks at the same key in both cases?
Currently I use "FileConfiguration.getString("Settings.<Username>.Demo")"

wraith rapids
#

well

#

you could iterate through the section and check equalsIgnoreCase on each of the keys

#

and build a key -> actual key map and query the config through that

grave rune
quaint mantle
#

I'm trying to modify a merchants trade result using an InventoryClickEvent listener and checking if its a merchant, basically the problem is it fires in the opposite way I want it to.
my goal is to change the result only if its an enchanted book to another item with the same enchants.

for example: I put in the items that result in a book which says the result is null, if I remove one of the items from the trade, it says its an enchanted book. I couldn't find any other events that I should use either for this.

Code: https://paste.md-5.net/xemiwumuge.java
Example of the problem: https://i.imgur.com/xWOa8ZH.gif

onyx shale
#

but.. why..

novel lodge
#

Is there an event I can use for every single time a block takes damage?

onyx shale
#

just do the trade list urself

#

and set it to the villager

#

or take the current one,loop through it,change what you need,set it back

novel lodge
onyx shale
#

thats handled client side

#

not much you can do

quaint mantle
#

just do the trade list urself
I'd rather not do this

or take the current one,loop through it,change what you need,set it back
this however, I could do. didnt think of that

sage swift
#

it seems like it's calling the click event before it actually finishes moving the items

#

so you can do the check maybe a tick later?

quaint mantle
#

Hmm, guess so.

rocky seal
#

I am pretty new to Plugin development (and java development) and I wanted to get some Custom Skulls in a UI. The issue is for some reason I cannot import GameProfile, which is under com.mojang, and for some reason I get an error when importing it.

#

I was told I needed to add a mojang repository to my pom.xml, which I did do, however it still doesnt work

#

specifically this import

import com.mojang.authlib.GameProfile;

quaint mantle
#

did you add the dependency also?

wraith rapids
#

it's not part of the spigot api

#

that is part of the mojang authlib

#

you will have to import it into your project separately from spigot

rocky seal
quaint mantle
#

the repository just tells maven where to look for it

rocky seal
#

k

wraith rapids
#

yes, you have to do both

rocky seal
#

do you have an example dependency, don't know how to fill in all the different fields

wraith rapids
#

you should be currently depending on spigot-api already, you can look at that for an example

rocky seal
#

yeah I have this one

#

<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

#

but what would I change around here for mojang

quaint mantle
#

group id is com.mojang
artifact id is authlib
idk what the latest version is

rocky seal
#

thank you

quaint mantle
#

2.3.31 for authlib

rocky seal
#

so the spigot api dependency part doesnt have a group id, would I add that for the mojang one

wraith rapids
#

it does

#

<groupId>org.spigotmc</groupId>

rocky seal
#

All it is for me is

<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

wraith rapids
#

yes

quaint mantle
#

its right there

#

lol

wraith rapids
#

literally read the first line

rocky seal
#

oh

#

I am dumb

#

it didnt indent

#

lmao

#

now my intellij is being super slow :wah:

#

wish I could put images in here

#

<dependency>
<groupId>com.mojang</groupId>
<artifactId>authlib</artifactId>
<version>2.3.31</version>
<scope>provided</scope>

#

this is probably wrong? its not working

quaint mantle
#

define "not working"

quaint mantle
rocky seal
#

the text is all appearing as red

#

let me verify

quaint mantle
tiny wolf
#

How can I check if a user on the forums exists with the api ?

rocky seal
#

how would I reload maven? I am new to all of this

rocky seal
#

well the text is no longer red

quaint mantle
#

probably cause it downloaded the jar like it should

rocky seal
#

eyyy it works

#

thank you

rocky seal
#

wish I could use custom emojis here but whatever

quaint mantle
#

ye you need nitro booster lmao, i hate that

rocky seal
#

ah I was actually looking at that settings screen before

#

I think I was playing around with one of the auto complete things in intellij and one of the options was to search for a class you had imported

#

and it took me to one of those settings pages

warm galleon
#

Im making a combo duels plugin, whats the difference between setMaximumNoDamageTicks and setNoDamageTicks?

kind coral
#

how would i register many commands effiently? most of the time i make a subcommand interface and like do

/command arg
and then get from the map the SubCommand with the arg as a key, how would i apply this method to the command directly?

#

like /command is the key

lean hollow
#

Hi, I'm trying to use Gradle toolchains to download J16 as Minecraft 1.17 requires it, but Gradle doesn't download it. I never used toolchains before, so did I forget something? I tried to read the doc on the Gradle's website (https://blog.gradle.org/java-toolchains), but I didn't see something else.

plugins {
    id 'java'
    id 'java-library'
    id "de.undercouch.download" version "4.1.1"
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(16)
    }
}

(Then, I've the rest of my build.gradle.)
kind coral
#

because if that isn't possible i'll have to do like getCommand("").setExecutor(new CommandClass()); like 300 times

eternal night
#

Gradle doesn't download java for you

ivory sleet
eternal night
#

You only specify the target java version in gradle. Your system is responsible for providing the appropriate java compiler

unreal quartz
lean hollow
eternal night
#

Tho it is rather hacky

unreal quartz
#

you have to use java 16 right from the start

eternal night
#

What ?

#

As if gradle would hard lock

#

After running it once on java 8

#

Lol

unreal quartz
#

?

eternal night
#

Why would they have to use java 16 from the start ?

quaint mantle
#

just change the gradle wrapper version..

unreal quartz
#

from what i see they're trying to switch java version while a java application is running ?

#

which is

#

impossible

eternal night
#

Oh that is not at a how I interpreted it

quaint mantle
#

i didnt even read their question :P

torn oyster
#

someone help

#

these appears every single time i compile

#

it takes 2 minutes to compile cuz of it

sage swift
#

didnt paper change their groupId

warm galleon
#

Can a Projectile Source be an instanceof player?

unreal quartz
eternal night
#

But yes

eternal oxide
#

what are you looking for at bintray? it seems to fail for everything

warm galleon
#

ok thanks

#

hope it also works in 1.8.8 lol

tall ridge
#

ewwwww

warm galleon
#

shut

tall ridge
#

no 1.17!

warm galleon
#

im making ender pearl cooldown for combo duels

#

oh

sage swift
#

dont use 1.8

#

for any reason.

tall ridge
#

literally goml

quaint mantle
#

can someone help

warm galleon
#

Why

tall ridge
#

get on my level

wraith rapids
#

1.8 is trash

unreal quartz
warm galleon
#

hypixel is 1.8.8 jar (well heavlily modified for 1.8.9)

sage swift
#

everything that 1.8 "has" can be done using the multitude of available plugins

warm galleon
#

so is practically all practice servers

quaint mantle
warm galleon
#

and duels servers

wraith rapids
#

that doesn't make 1.8 good

warm galleon
#

i know

wraith rapids
#

hypickle is trash too

unreal quartz
quaint mantle
#

1.8.9 lc is the poggest

hexed hatch
#

Implying Hypixel is a good server lol

warm galleon
#

¯_(ツ)_/¯

quaint mantle
quaint mantle
warm galleon
#

tell that to all the people who bought something from their store

tall ridge
#

big yikes

wraith rapids
#

people are stupid

tall ridge
#

paying money for ingame whatevers

sage swift
#

hypixel is a unique server in that their software is "supported" by themselves

warm galleon
#

there are 1500 players online atm which means there are 1.5k players who have a rank (since rn its closed for everyone unless they got a rank)

quaint mantle
#

yeah

#

i wanna join

sage swift
quaint mantle
#

my friend gonna gift me rank but i need to be in game lol

hexed hatch
#

They pay developers 6 figure salaries to basically rebuild the game to their needs

wraith rapids
#

windows 10 is the most popular operating system for common users in the world

#

that people use something doesn't mean its good

#

people are stupid

quaint mantle
#

well people is u

#

oof

eternal night
#

Are you implying windows isn't the perfect os

wraith rapids
#

that would be templeos

tall ridge
#

yes im using win10 and I hate it

#

I want to move to linux

quaint mantle
#

i like windows

wraith rapids
#

you probably like worshiping satan too

eternal night
#

Well let's hope protondb and the steam Linux gaming effort makes progress

#

Then Linux based OSs might be worth it

tall ridge
#

I'd just virtualize windows inside linux

eternal night
#

Then what is stopping you from doing it the other way around rn XD

tall ridge
#

moving my files

quaint mantle
#

help pls

tall ridge
#

oh yeah

sage swift
#

what version of minecraft are you using

tall ridge
#

I was looking for help for you

quaint mantle
#

ok

tall ridge
#

but answer him

quaint mantle
sage swift
#

are you using java 17

quaint mantle
#

16

tall ridge
#

rerun buildtools?

sage swift
#

what build of spigot is it

tall ridge
#

did you not run buildtools after switching java versions

graceful phoenix
#

And actually make sure you're using the 1.17 jar and not a 1.16 one.

wraith rapids
#

"only up to 15 is supported"

quaint mantle
wraith rapids
#

this means that any version above 15 is unsupported

#

don't use java 16

sage swift
#

only up to 15 means 15 or less

#

...

quaint mantle
#

but i want to use 1.17 server

#

not 1.16

wraith rapids
#

1.17 should demand java 16

quaint mantle
#

i want to update it to the newest version of minecraft

#

im using java 16

wraith rapids
#

again, are you sure you're actually running minecraft 1.17

#

because whatever you are running demands 15 or less

tall ridge
#

maybe the java path isn't specified for java 16?

wraith rapids
#

and 1.17 demands 16 or higher

#

so something isn't adding up here

quaint mantle
#

i have java 16

wraith rapids
#

are you even reading what i'm saying

quaint mantle
#

u asked if I had java 1

#

*16

wraith rapids
#

no

#

i did not ask if you are running java 16

quaint mantle
#

then what

wraith rapids
#

literally read

eternal night
#

Your server jar

wraith rapids
#

again, are you sure you're actually running minecraft 1.17

quaint mantle
#

ye

eternal night
#

Is most likely not 1.17

wraith rapids
#

because 1.17 demands java 16

#

and whatever you are using says it wants 15 or lower

#

so something isn't adding up here

quaint mantle
#

lemme see here wait

wraith rapids
#

do you get my drift

#

or do I need to spell it out for you

tall ridge
#

telephone telephone

digital plinth
#

is it possible to halt the code of a custom method until the runnable finishes

#

a runnable inside the method

graceful phoenix
# quaint mantle lemme see here wait

If you had been using a proper 1.17 jar and using an unsupported version of java this is the error you'd receive:

"Unsupported Java detected (52.0). This version of Minecraft requires at least Java 16. Check your Java version with the command 'java -version'."

tall ridge
#

yes I like the java -version!

wraith rapids
#

yes, block on a future or use wait-notify on an object

proven sonnet
#

Guys, i'm trying to build the pom for spigotmc and mongodb

#

but it's giving me an error, can somebody help pls?

sullen dome
opal juniper
proven sonnet
opal juniper
#

Trust

sullen dome
silk torrent
#

Can I transfer ownership from my Premium plugin to another spigot user?

sullen dome
#

you're not allowed to have multiple accounts. and because there would probably be no reason to transfer your plugin to someone else, i'd say no.

silk torrent
#

Someone bought the source code to my plugin and they also want the spigot page

sullen dome
#

yeah... not possible i guess :/

#

maybe consider mailing support email for this?

opal juniper
#

Just give them the contents of the page and let them post it

sullen dome
#

well, premium resources need to be approved... i dont think it get's approved 2 times

silk torrent
opal juniper
#

?support then

undone axleBOT
sullen dome
waxen plinth
#

aus ein

sullen dome
#

means off, on lol

wraith rapids
#

TOTALEN KRIEG

sullen dome
#

oh no, not that again

candid galleon
#

how much struggling did you go through to get that 😂

sullen dome
#

much struggle xd

tall ridge
#

progress

torn oyster
#

is there a metadata event

#

when an object has metadata added

craggy steeple
#

Hi guys, where can I find some other discords that talks about spigot plugins?

sullen dome
#

nowhere. no one can ever leave spigot discord spigot

#

🚰 everywhere 🚰

craggy steeple
#

damn, trying to get some more knowledge about spigot plugins

sullen dome
#

wdym with knowledge

#

you probably won't find people who will spoonfeed you, if you mean that. most people will just tell you learn basic java, and boom

wraith rapids
#

the paper people talk about spigot plugins

#

about how shit they are

craggy steeple
#

like I just want to know people that knows more about plugins

sullen dome
#

they do? i'd thought they ban you instantly lol

#

even if its just a fork of spigot

wraith rapids
#

no that's spigot people talking about paper plugins

sullen dome
#

yeah true... they're not forge discord

#

they don't ban that easily i guess

craggy steeple
#

I'm looking for a alternative FeatherBoard plugin for 1.17! It seems that this plugin is the best scoreboard plugin but I don't have 17.99 EUR to buy it

wraith rapids
#

talking about spigot is fine on the paper discord, although it's more of a joke or a laughing stock than anything serious

sullen dome
#

i dont think much changed in 1.17 for scoreboard

sage swift
wraith rapids
#

conversely, here talking about paper is kind of frowned upon

#

and some people will throw a hissy fit about it

craggy steeple
wraith rapids
#

the spigot forums

#

literally years worth of archived conversations and discussions about development

sage swift
sullen dome
#

well, nvm. take gecko's link.

#

gecko, my button finally works

wraith rapids
#

quickboard is decent iirc

#

that said all scoreboard plugins are gay

sage swift
#

^

sullen dome
#

it actually was because i registered the class 2 times. so it probably fucked something up, idk

#

i guess theere was one i used in past, that wasn't that bad looking

sage swift
#

great im so proud of you

sullen dome
#

idk what it was tho

craggy steeple
wraith rapids
#

we're not rude

sage swift
#

youre not special i hate everyone

sullen dome
#

gecko isn't rude

wraith rapids
#

you're being sensitive

craggy steeple
#

thx for the help too @sullen dome

sullen dome
#

gecko is just gecko xd

sage swift
#

alright my turn for help

sullen dome
#

i like that smol duck

wraith rapids
#

the duck disappears

#

it must hate you

sullen dome
#

ducks never disappear

#

!

#

!

sage swift
#

how to use openssl to generate keystore file and password for site

wraith rapids
#

bukkit.shutdown()

sage swift
#

Bukkit.shutdown(), idiot

#

bukkit is not a class

sullen dome
#

f you

#

i wanted to say that

sage swift
#

kiss me

wraith rapids
#

i don't have the effort to capitalize shit

sage swift
#

i do

#

watch

#

SHIT

wraith rapids
#

well you're gay

sullen dome
#

i actually wanted to be cool with smt like Cannot resolve symbol 'bukkit'
but no, you destroyed it

sage swift
#

ill destroy you with my big wet sloppy kisses next

sullen dome
#

:o

wraith rapids
#

where'd you get that avatar

sullen dome
#

who

wraith rapids
#

i remember you used to have a similar photograph of an actual gecko

sage swift
#

yes someone animated it for me back when i had nitro

wraith rapids
#

ah yes

sullen dome
#

what a cute thing

wraith rapids
#

what comes after ein

sage swift
#

e kleine nachtmusik

sullen dome
#

lol

#

musik*

#

f

#

you

wraith rapids
#

the correct answer is

#

EIN VOLK

sullen dome
#

what comes after tot

wraith rapids
#

EIN REICH

sullen dome
#

TOTALEN KRIEG

#

omg

#

god

#

please

wraith rapids
#

EIN FÜHRER

sullen dome
#

god, i'd be good if i would never have been here

sage swift
#

do you play mine kampf

sullen dome
#

more like mein kraft

wraith rapids
#

my base has 6 million furnaces

torn oyster
#

like 2 of my plugin's repos weren't working

#

i used jitpack

#

they worked

sage swift
#

the game has only been out for 11 years thats not possible

wraith rapids
#

i built 5 thousand furnaces consecutively every day for 7 years

sage swift
#

furnace you say

wraith rapids
#

i also built a large chimney next to my base

#

but it's not connected to it

sage swift
#

what are the furnace doors made of

wraith rapids
#

particle wood

#

keeps the gas in nice and good

sage swift
#

sounds like someone was using a hacked client to build that fast...

dusty herald
#

what the fuck

wispy fossil
#

yoo

#

holocaust??

sage swift
#

that's hitler in his earlier years

wispy fossil
#

how did they find this... dashing footage?

sage swift
#

back in art school

daring sierra
#

gecko i love your pfp

fickle helm
#

anyone know what events if any are fired when a player blocks an attack from a mob, specifically fireballs from blazes

sage swift
#

EntityDamage/DeathEvent?

fickle helm
#

thanks

fiery inlet
#
@Override
    public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
        if(!(sender instanceof Player)) return true;
        Player player = (Player) sender;
        Location targetBlock = player.getTargetBlock(60).getLocation();
        int y = targetBlock.getBlockY();
        for(int i = 1; i < 60; i++){
            targetBlock.setY(y + i);
            if (targetBlock.getBlock().getType().equals(Material.AIR)){
                targetBlock.setPitch(player.getLocation().getPitch());
                targetBlock.setYaw(player.getLocation().getYaw());
                player.teleport(targetBlock);
                break;
            }
        }
        return true;
    }

any way to improve? / opinions

#

its a copy of worldedits /jumpto
command i guess

sullen dome
#

i'm pretty sure you should check for 2 air-blocks, as the player could maybe tp into a 1x1-hole

#

i mean, just theoretically

fiery inlet
#

true

sullen dome
#

but except of that, it looks good to me.

sage swift
#

just go up til you find 2 air blocks

fiery inlet
#

what does "continue" do

sage swift
#

continues with the loop but doesnt run the code after

fiery inlet
#

                if(!(aboveBlock.getBlock().getType().equals(Material.AIR))) continue;

so something like this

sage swift
#

im not gonna lie

#

that's pretty hard to follow

#

i'd break it up into more methods

fiery inlet
#

lets cut it to that

#

aboveBlock is the block above the block that it first sees as air

dusk flicker
#

you really dont need to make all the methods NotNull

dusty herald
#

bruh my brain

sage swift
#

dont need to use .equals for enums

fiery inlet
#

intellij

#

so eh im lazy

dusk flicker
#

must be a plugin that you added

fiery inlet
#

minecraft plugin

#

thing

#

how do i make it teleport me to the same position of the block

#

and not just the corner

#

like add decimals to the location xd

sage swift
#

Location#add

fiery inlet
#
aboveBlock.add(player.getLocation().getDirection().toBlockVector());
```?
sage swift
#

ah yes let's add the direction of the player's location to the block

fiery inlet
#

idk how lol xd

sage swift
#

get the location

#

of the block

fiery inlet
#

mhh i have

sage swift
#

now add the decimals to it

fiery inlet
#

what if i want the same that the player had before lol

#

would splitting it at . and making it a string work

sage swift
#

no

#

use %

fiery inlet
#

huh

sage swift
#

modulus

#

1.4 % 1 = 0.4

#

2004 % 1000 = 4

fiery inlet
#

so player's x location % blocks x location

sage swift
#

nope

#

what part of the number do you want

#

the part after the decimal point, right?

fiery inlet
#

well lets say im standing in the middle of a block, i do /to and i want it to teleport to the same position on the block

#

yeah

#

decimals

sage swift
#

so how can you take away everything except the stuff after the decimal point?

fiery inlet
#

%